Plumb Extension SDK Path Through Session Create And Resume#1494
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Generated by SDK Consistency Review Agent for issue #1494 · ● 2.8M
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Generated by SDK Consistency Review Agent for issue #1494 · ● 4.2M
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
Adds extensionSdkPath plumbing to session create/resume surfaces so SDK callers can direct extension subprocesses to use a local copilot-sdk/ folder instead of the bundled runtime SDK.
Changes:
- Adds public/session config fields for
extensionSdkPathacross Node.js, Go, Python, Rust, and .NET. - Forwards the new field into
session.createandsession.resumewire payloads. - Bumps the Node.js
@github/copilotdependency to the runtime version that supports the new payload field.
Show a summary per file
| File | Description |
|---|---|
rust/src/wire.rs |
Adds the serialized wire field for create/resume requests. |
rust/src/types.rs |
Adds Rust config fields, defaults, debug output, builders, and wire conversion. |
python/copilot/client.py |
Adds Python create/resume parameters and payload serialization. |
nodejs/src/types.ts |
Documents and exposes extensionSdkPath on session config. |
nodejs/src/extension.ts |
Updates JoinSessionConfig typing to omit extensionSdkPath. |
nodejs/src/client.ts |
Forwards extensionSdkPath in create/resume RPC calls. |
nodejs/package.json |
Updates the runtime dependency version. |
nodejs/package-lock.json |
Locks the updated runtime and platform packages. |
go/types.go |
Adds Go config/request fields and JSON tags. |
go/client.go |
Copies the Go config field into create/resume requests. |
dotnet/src/Types.cs |
Adds the .NET config property and clone support. |
dotnet/src/Client.cs |
Adds the .NET request field and forwards it in create/resume calls. |
Copilot's findings
Files not reviewed (1)
- nodejs/package-lock.json: Language not supported
- Files reviewed: 11/12 changed files
- Comments generated: 1
This comment has been minimized.
This comment has been minimized.
Cross-SDK Consistency Review ✅This PR maintains strong cross-SDK consistency. Here's a summary of findings:
Naming follows language conventions throughout:
Notable: The Node.js No consistency issues found. The Java deferral is well-justified in the PR description.
|
What
Adds an
extensionSdkPathoption to the session-creation and session-resume surfaces of the Node.js, Go, Python, Rust, and .NET SDKs. Callers can now point the host at a localcopilot-sdk/folder that should be injected into extension subprocesses for that session, in place of whatever@github/copilot-sdkwas bundled with the CLI that the SDK depends on.The field is intentionally absent from implementations of
joinSession, because by the time an extension joins, its subprocess has already been forked with whatever SDK the host chose.Java is unchanged because it does not yet expose the broader extension surface (
requestExtensions, canvases, etc.) — when that lands, this field should be added alongside it using the same pattern.Why
A corresponding runtime PR added
extensionSdkPathto the JSON-RPCsession.createandsession.resumepayloads, but each language SDK only forwards explicitly-named fields. Without this passthrough, SDK consumers had no first-class way to test or pin a custom@github/copilot-sdkbuild end-to-end short of dropping down to raw JSON-RPC or rebuilding the entire host CLI. Adding the field across all currently-supported SDKs keeps the per-language surface in sync with the runtime and lets extension authors and SDK integrators iterate on SDK changes with a single typed option.