Skip to content

Plumb Extension SDK Path Through Session Create And Resume#1494

Merged
MRayermannMSFT merged 6 commits into
mainfrom
marayerm/extension-sdk-path-passthrough
May 29, 2026
Merged

Plumb Extension SDK Path Through Session Create And Resume#1494
MRayermannMSFT merged 6 commits into
mainfrom
marayerm/extension-sdk-path-passthrough

Conversation

@MRayermannMSFT
Copy link
Copy Markdown
Contributor

What

Adds an extensionSdkPath option 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 local copilot-sdk/ folder that should be injected into extension subprocesses for that session, in place of whatever @github/copilot-sdk was 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 extensionSdkPath to the JSON-RPC session.create and session.resume payloads, 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-sdk build 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.

@github-actions

This comment has been minimized.

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Generated by SDK Consistency Review Agent for issue #1494 · ● 2.8M

@github-actions

This comment has been minimized.

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Generated by SDK Consistency Review Agent for issue #1494 · ● 4.2M

@github-actions

This comment has been minimized.

@MRayermannMSFT MRayermannMSFT marked this pull request as ready for review May 29, 2026 18:03
@MRayermannMSFT MRayermannMSFT requested a review from a team as a code owner May 29, 2026 18:03
Copilot AI review requested due to automatic review settings May 29, 2026 18:03
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 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 extensionSdkPath across Node.js, Go, Python, Rust, and .NET.
  • Forwards the new field into session.create and session.resume wire payloads.
  • Bumps the Node.js @github/copilot dependency 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

Comment thread nodejs/src/extension.ts
@github-actions

This comment has been minimized.

@MRayermannMSFT MRayermannMSFT enabled auto-merge May 29, 2026 18:46
@MRayermannMSFT MRayermannMSFT added this pull request to the merge queue May 29, 2026
Merged via the queue into main with commit c91d8c7 May 29, 2026
39 checks passed
@MRayermannMSFT MRayermannMSFT deleted the marayerm/extension-sdk-path-passthrough branch May 29, 2026 18:48
@github-actions
Copy link
Copy Markdown
Contributor

Cross-SDK Consistency Review ✅

This PR maintains strong cross-SDK consistency. Here's a summary of findings:

SDK create/createSession resume/resumeSession joinSession handling
Node.js extensionSdkPath extensionSdkPath ✅ Omitted from JoinSessionConfig type + stripped at runtime for untyped callers
Python extension_sdk_path extension_sdk_path N/A — no join_session
Go ExtensionSdkPath ExtensionSdkPath N/A — no JoinSession
.NET ExtensionSdkPath ExtensionSdkPath N/A — no JoinSession
Rust extension_sdk_path + with_extension_sdk_path() builder extension_sdk_path + with_extension_sdk_path() builder N/A — no join_session
Java Intentionally deferred Intentionally deferred N/A

Naming follows language conventions throughout:

  • TypeScript/Node: extensionSdkPath (camelCase)
  • Python: extension_sdk_path (snake_case)
  • Go/.NET: ExtensionSdkPath (PascalCase)
  • Rust: extension_sdk_path (snake_case), builder with_extension_sdk_path()

Notable: The Node.js extension.ts defensively strips extensionSdkPath at runtime (not just at type level) to guard against untyped JS callers — a thoughtful extra precaution consistent with the stated intent.

No consistency issues found. The Java deferral is well-justified in the PR description.

Generated by SDK Consistency Review Agent for issue #1494 · ● 5.4M ·

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