You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove Rust-only Session convenience methods for cross-SDK parity
Same audit shape as the send_telemetry removal: a sweep of public
methods that exist as Rust convenience wrappers on top of a typed
RPC, with no equivalent surface in the Node, Python, Go, or .NET
SDKs (zero matches across all four SDK source trees).
The methods are reachable cross-SDK through the typed `rpc()`
namespace — Rust callers simply switch from
`session.method()` to `session.rpc().<namespace>().<method>()`,
mirroring how Node/Python/Go/.NET consumers already drive these.
Removed from `Session`:
- get_model
- set_mode / get_mode
- set_name / get_name
- read_plan / update_plan / delete_plan
- list_workspace_files / read_workspace_file / create_workspace_file
- start_fleet
- set_approve_all_permissions
- call_rpc (generic forwarder; the typed rpc() namespace replaces it)
Removed from `Client`:
- get_quota (typed `client.rpc().account().get_quota()` already
available everywhere including Rust)
Kept on Session: send, send_and_wait, abort, set_model, log,
disconnect/destroy, subscribe, capabilities, cancellation_token,
stop_event_loop, ui (and the field accessors id/cwd/workspace_path/
remote_url). These are either present in every SDK already (abort,
set_model, send/send_and_wait, log, disconnect) or are Rust-shape
helpers that don't have a typed RPC equivalent (subscribe,
cancellation_token, ui sub-API).
Updated:
- README "Rust-only API" section: dropped the "First-class Session
convenience methods" bullet and the Client::get_quota bullet.
What remains as Rust-only is now strictly language-shape items
(newtypes, Transport enum, permission builders, from_streams,
on_auto_mode_switch).
- CHANGELOG: dropped enumeration of the removed methods; restated
what stays.
- 5 integration tests removed (get_name, set_name, list_workspace_files,
read_workspace_file, create_workspace_file) plus the dispatch-table
case for session.plan.delete.
- Unused imports cleaned up in session.rs.
Migration for the github-app consumer (the only known caller):
- session.set_approve_all_permissions(b)
-> session.rpc().permissions().set_approve_all(
PermissionsSetApproveAllRequest { enabled: b })
- session.set_mode("plan")
-> session.rpc().mode().set(ModeSetRequest { mode: ... })
- session.read_plan()
-> session.rpc().plan().read()
- (etc — all typed RPC namespace calls)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments