github / github/copilot-sdk

Parity backlog: high-level session/client methods exposed in Rust SDK only

Đang mở
#1,166 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement
Ngôn ngữ chính
Java
Star
10.5k
Fork
1.5k
Merge trung bình
1 ngày 14 giờ
Pull request đã merge (30 ngày)
129

Mô tả

The Rust SDK's [Cross-SDK Consistency Review](https://github.com/github/copilot-sdk/pull/1164#issuecomment-3162199497) on PR #1164 surfaced several methods that the Rust SDK promotes to first-class `Session` / `Client` methods, but which are reachable from other SDKs only via the lower-level generated RPC layer (or not at all).

These are real protocol methods backed by the CLI server. The Rust SDK established a richer high-level surface; the other SDKs are consistent with each other but lag behind. Tracking here as a parity backlog item across Node/Python/Go/.NET.

### Methods the Rust SDK exposes at the high level

| Method | RPC call | Status in other SDKs |
|---|---|---|
| `Session::get_model()` | `session.model.getCurrent` | Generated RPC only |
| `Session::get_mode()` / `set_mode()` | `session.mode.get` / `session.mode.set` | Generated RPC only |
| `Session::get_name()` / `set_name()` | `session.name.get` / `session.name.set` | Generated RPC only |
| `Session::list_workspace_files()` / `read_workspace_file()` / `create_workspace_file()` | `session.workspace.*` | Not exposed |
| `Session::read_plan()` / `update_plan()` / `delete_plan()` | `session.plan.*` | Not exposed |
| `Session::start_fleet()` | `session.fleet.start` | Not exposed |
| `Session::send_telemetry()` | `session.sendTelemetry` | Not exposed at session level |
| `Client::get_quota()` | `account.getQuota` | .NET generated only |

### Why it matters

- Consumers shouldn't have to drop into the generated RPC layer for first-class Copilot session features.
- Names, signatures, and ergonomics across SDKs should converge so the Rust SDK isn't a moving target.

### Suggested approach

Each SDK could pick this up independently — most additions are mechanical wrappers around the existing generated RPC types. We should agree on naming first so we don't end up with `getModel` / `Model` / `GetCurrentModel` / `get_model` style drift.

The Rust signatures in `rust/src/session.rs` and `rust/src/lib.rs` (PR #1164) can serve as the reference shape. If a different SDK has a stronger reason to deviate, that's worth a discussion before landing.

### Out of scope

Idiomatic differences like Rust's `subscribe()` returning a `tokio::sync::broadcast::Receiver` vs Node's callback `on(handler)` are correctly idiomatic for each language — the consistency review flagged these as expected, and they don't belong here.

  Generated via Copilot (Claude Opus 4.7) on behalf of @tclem

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với rust/src/session.rs và rust/src/lib.rs, là các tệp định nghĩa những phương thức cấp cao tham chiếu của Session và Client, sau đó kiểm tra lớp RPC được tạo trong một SDK đích. Chọn một phương thức hoặc SDK cụ thể và xác nhận các kiểu RPC hiện có cùng quy ước đặt tên của nó trước khi đề xuất wrapper. Công việc được xem là hoàn tất khi SDK đã chọn cung cấp phương thức cấp cao đã thống nhất mà không yêu cầu bên sử dụng gọi các RPC được tạo.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
go, node.js, python, rust
Lĩnh vực
api, developer-experience
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.