Skip to content

Add Node cloud session SDK API#1256

Closed
JasonEtco wants to merge 2 commits into
mainfrom
jasonetco/cloud-runtime-plan
Closed

Add Node cloud session SDK API#1256
JasonEtco wants to merge 2 commits into
mainfrom
jasonetco/cloud-runtime-plan

Conversation

@JasonEtco
Copy link
Copy Markdown

Summary

Adds the Node SDK pieces for creating and controlling Mission Control cloud sandbox sessions:

  • add a UI-free Mission Control client for cloud task creation, task lookup, task event polling, and task steering
  • add CloudSession for remote-control usage (send, sendAndWait, prompt response helpers, mode switching, event subscriptions, replay/dedupe, and disconnect)
  • add CopilotClient.createCloudSession() and connectCloudSession()
  • require explicit repository context or a repo-less owner instead of probing Git state from the SDK
  • document the new cloud session API and add focused unit coverage

Validation

  • cd nodejs && npx eslint src/client.ts src/types.ts src/index.ts src/cloud/missionControlClient.ts src/cloud/cloudSession.ts test/cloudSession.test.ts
  • cd nodejs && npm run typecheck -- --pretty false
  • cd nodejs && npm test -- cloudSession.test.ts
  • cd nodejs && npm run build

Move the Mission Control cloud task/client-control pieces into the Node SDK by adding cloud session creation, connection, task event polling, steering helpers, and public cloud session types.

Require callers to pass explicit repository context or a repo-less owner instead of probing Git state in the SDK.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 11, 2026 15:16
@JasonEtco JasonEtco requested a review from a team as a code owner May 11, 2026 15:16
Comment thread nodejs/src/client.ts Fixed
Comment thread nodejs/src/cloud/missionControlClient.ts Fixed
Comment thread nodejs/src/cloud/missionControlClient.ts Fixed
@github-actions

This comment has been minimized.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Node/TypeScript “cloud session” surface area that provisions and controls Mission Control cloud sandbox tasks (polling task events and steering via the Mission Control API), exposes the API via CopilotClient, and documents/tests the feature.

Changes:

  • Introduce MissionControlClient + CloudSession to create/connect to Mission Control tasks, poll events, and steer sessions.
  • Add new public types/exports for cloud session options, metadata, events, and command types.
  • Document the API in the Node README and add a focused unit test suite for core flows.
Show a summary per file
File Description
nodejs/src/cloud/missionControlClient.ts New Mission Control HTTP client (create task, get task, list events, steer).
nodejs/src/cloud/cloudSession.ts New CloudSession facade (connect, polling, send/steer helpers, subscriptions).
nodejs/src/client.ts Adds createCloudSession() / connectCloudSession() to CopilotClient and MC client wiring.
nodejs/src/types.ts Adds cloud-session-related public types (options, metadata, events, command types).
nodejs/src/index.ts Re-exports new cloud session APIs/types from the package entrypoint.
nodejs/README.md Documents createCloudSession / connectCloudSession usage and options.
nodejs/test/cloudSession.test.ts Adds unit coverage for create/connect flows, steering, dedupe/sort, and error mapping.

Copilot's findings

  • Files reviewed: 7/7 changed files
  • Comments generated: 7

Comment thread nodejs/src/cloud/missionControlClient.ts Outdated
Comment thread nodejs/src/cloud/cloudSession.ts
Comment thread nodejs/src/client.ts
Comment thread nodejs/README.md
Comment thread nodejs/src/client.ts
Comment thread nodejs/src/cloud/cloudSession.ts
Comment thread nodejs/src/cloud/cloudSession.ts
Harden Mission Control event validation, clarify cloud repository branch semantics, align CloudSession API naming/deprecation, and replace trailing slash regex normalization with a linear helper.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

Cross-SDK Consistency Review 🔍

This PR introduces a substantial new Cloud Session API (Mission Control integration) exclusively to the Node.js SDK. Here's the consistency assessment across all four SDK implementations:

New API surface added (Node.js only)

Feature Node.js Python Go .NET
createCloudSession() ✅ Added ❌ Missing ❌ Missing ❌ Missing
connectCloudSession() ✅ Added ❌ Missing ❌ Missing ❌ Missing
CloudSession class (remote control) ✅ Added ❌ Missing ❌ Missing ❌ Missing
MissionControlClient (HTTP layer) ✅ Added ❌ Missing ❌ Missing ❌ Missing
CloudSessionOptions / CloudConnectOptions ✅ Added ❌ Missing ❌ Missing ❌ Missing

Assessment

This is a Node.js-first rollout of a new cloud session capability. The other SDKs only expose Mission Control as a Remote option within SessionConfig (for local-to-cloud delegation), but none have the standalone cloud session client that this PR adds.

The new feature is meaningful and would be useful in all SDK languages. To preserve cross-SDK feature parity going forward, the equivalent APIs would be:

  • Python: create_cloud_session() / connect_cloud_session() + CloudSession class
  • Go: CreateCloudSession() / ConnectCloudSession() + CloudSession struct
  • .NET: CreateCloudSessionAsync() / ConnectCloudSessionAsync() + CloudSession class

Recommendation

If the intent is to ship Node.js first and add other languages later, consider opening tracking issues for parity in Python, Go, and .NET so this doesn't drift. Otherwise, if other SDKs should have this feature too, this PR is a good reference implementation to port from.

This is not a blocker — Node.js-first rollouts are a reasonable pattern — but flagging it so the team can decide on a follow-up plan for the other three SDKs.

Generated by SDK Consistency Review Agent for issue #1256 · ● 381K ·

@JasonEtco JasonEtco closed this May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants