Skip to content

[wip] Add canvas launch authorization and session retention - #2630

Draft
ulugbekna wants to merge 1 commit into
mainfrom
ulugbekna/local-canvas-sdk-launch
Draft

[wip] Add canvas launch authorization and session retention#2630
ulugbekna wants to merge 1 commit into
mainfrom
ulugbekna/local-canvas-sdk-launch

Conversation

@ulugbekna

@ulugbekna ulugbekna commented Sep 11, 2026

Copy link
Copy Markdown

Summary

Add the public Node SDK launch-provider and no-turn retention contracts required by a host that runs explicitly approved local canvas packages.

Included

  • CopilotClientOptions.extensionLaunchProvider, public request/result/profile/source types, and exact live { contractVersion: 1 } acknowledgement before creation/resume and on replacement connections.
  • Shared startup, cancellation and replacement-connection handling; older/null/error acknowledgements fail closed rather than retrying without the provider.
  • Generated session.retain / session.retained bindings and client.retainSession(sessionId) for connected-client retention while an initial create/resume is still waiting on a launch resolver.
  • Documentation and focused unit/E2E fixtures covering registration, denial/error, reconnect, retention, reentrant startup and actual package execution.
  • Clients without a launch provider preserve their existing behavior.

This API is not a code-integrity mechanism, trust store or backend sandbox. The consuming host still owns exact package/revision/workspace approval.

Validation

  • Fresh pre-PR run: npx vitest run test/extension-launch-provider.test.ts23 passing.
  • The implementation handoff additionally records 93 targeted tests, type/lint/format checks, real compatible-runtime tests and packed-package consumption checks.
  • The compatible stack was exercised through actual native canvas creation, actions, lifecycle and canvas-originated model requests.
  • The generated protocol files came from the runtime's canonical schema generation, not manual mirror edits.
  • Generation reflects the complete supplied schema snapshot, including unrelated upstream declaration changes; it does not imply additional SDK feature implementation or compatibility coverage.

WIP / dependencies

  • Requires a companion compatible runtime implementation; registration with an incompatible runtime must reject.
  • The previously reproduced model-selection/disconnect/same-ID-resume failure is fixed in the companion runtime. The unchanged public SDK reproducer and full three-test host integration file now pass with that corrected runtime; no additional SDK API change was needed.
  • This draft does not bump/release SDK packages or claim all-language SDK parity for the new Node client option.

Local .local/ and nodejs/.local/ caches, packed artifacts, runtime logs and consumer scratch directories are intentionally excluded.

Public companion drafts

The runtime implementation is tracked separately in its existing private repository.

Require an exact live launch-provider contract acknowledgement before session
startup and on replacement connections. Preserve ordinary client behavior
when no provider is configured, and fail closed instead of falling back.

Expose explicit no-turn retention through generated session RPCs and a
connected-client retain-by-ID helper. Include source, reconnect, runtime and
packed-consumer regression coverage and document the public contract.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: a069b1a2-65a9-4427-b3fe-6546a3bffc9e
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.

1 participant