Add cloud session config support#1306
Conversation
Expose the session.create cloud option across SDK clients and forward repository metadata to the runtime. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
This PR adds a create-only cloud session configuration option across all SDKs, allowing callers to request cloud-backed remote sessions and (optionally) attach GitHub repository metadata. The change forwards cloud only on session.create requests (not session.resume), adds serialization/forwarding tests, and documents usage.
Changes:
- Add
cloudsession config/repository option types to Node, Python, Go, .NET, and Rust, and forward them onsession.create. - Add targeted tests validating JSON serialization/forwarding behavior for the new
cloudoption. - Document “cloud sessions” usage across SDKs and note that it’s create-only; add an Unreleased changelog entry.
Show a summary per file
| File | Description |
|---|---|
| rust/tests/session_test.rs | Extends SessionConfig serialization test to cover cloud.repository fields and omission when unset. |
| rust/src/types.rs | Adds Rust CloudSessionOptions/CloudSessionRepository types and SessionConfig.cloud with builder. |
| python/test_client.py | Adds a test ensuring cloud is forwarded in session.create payloads. |
| python/copilot/client.py | Introduces Python CloudSessionOptions/CloudSessionRepository and forwards cloud in create_session. |
| python/copilot/init.py | Exposes new cloud session types from the Python package. |
| nodejs/test/client.test.ts | Adds a test asserting cloud is included in the session.create request. |
| nodejs/src/types.ts | Defines TS CloudSessionOptions/CloudSessionRepository and adds cloud to SessionConfig. |
| nodejs/src/index.ts | Re-exports the new TS cloud session types. |
| nodejs/src/client.ts | Forwards cloud in the session.create JSON-RPC payload. |
| go/types.go | Adds Go CloudSessionOptions/CloudSessionRepository and exposes SessionConfig.Cloud. |
| go/client.go | Wires SessionConfig.Cloud into the session.create request payload. |
| go/client_test.go | Adds JSON serialization tests for cloud presence/omission in create-session requests. |
| dotnet/test/Unit/SerializationTests.cs | Adds a unit test validating create-session request JSON contains cloud.repository fields. |
| dotnet/test/Unit/CloneTests.cs | Extends clone coverage to include SessionConfig.Cloud. |
| dotnet/src/Types.cs | Adds .NET CloudSessionOptions/CloudSessionRepository and SessionConfig.Cloud cloning support. |
| dotnet/src/Client.cs | Adds Cloud to the internal CreateSessionRequest record sent over JSON-RPC. |
| docs/features/remote-sessions.md | Documents “Cloud sessions” usage across SDKs and clarifies create-only behavior. |
| CHANGELOG.md | Adds an Unreleased entry describing the new cloud create-session option with examples. |
Copilot's findings
- Files reviewed: 18/18 changed files
- Comments generated: 1
This comment has been minimized.
This comment has been minimized.
SteveSandersonMS
left a comment
There was a problem hiding this comment.
Looks great, thanks @tiagonbotelho!
Only change request is to not include the changelog content, since we'll generate that later. We don't have an "unreleased" section inside the changelog file as it would constantly conflict as we're working, plus we want our changelog generator to be able to summarize across all the work that's happened in a given release.
Remove the manual changelog entry and standardize Rust doc examples on the published crate name. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Accept. Thanks for the consistency review; this confirms the cross-SDK API and create-only behavior are aligned, so no code changes were needed for this comment. |
|
Accept as a positive consistency check. I also removed the changelog examples in response to maintainer feedback, so the feature docs now carry the usage examples while release notes remain generated. |
Cross-SDK Consistency Review ✅This PR adds the API surface comparison
Structural consistency
Language-idiom notes (no action needed)
No inconsistencies found. 🎉
|
The runtime is adding a
cloudoption tosession.createso SDK consumers can request cloud-backed remote sessions with repository metadata. This exposes that create-only option consistently across all SDK clients.Summary
cloudonly on session creation payloads, leaving resume behavior unchanged.Notes
Generated RPC/schema files were not updated because the current runtime schema does not expose the high-level
session.createrequest used by these SDK clients.