Bump Copilot CLI SDK packages to 1.0.64-1 / 1.0.3#322645
Open
anthonykim1 wants to merge 25 commits into
Open
Conversation
…tension postinstall
Contributor
There was a problem hiding this comment.
Pull request overview
Updates VS Code’s Agent Host + built-in Copilot extension integration to work with the newer Copilot CLI/SDK package layout, and bumps the repo dependency versions accordingly. This primarily impacts how the Copilot CLI runtime is resolved/packaged across desktop, remote (reh), and the built-in extension.
Changes:
- Bump
@github/copilotto^1.0.64-1and@github/copilot-sdkto^1.0.3in root + remote + Copilot extension, updating lockfiles. - Update Agent Host and extension-side code to tolerate new SDK/runtime shapes (attachment data typing changes, longer-running SDK import + native-binary checks).
- Extend build/packaging logic to include and (when cross-building) materialize the correct
@github/copilot-<platform>optional package, plus macOS universal app handling and new build-level tests for the packaging rules.
Show a summary per file
| File | Description |
|---|---|
| src/vs/platform/agentHost/node/copilot/mapSessionEvents.ts | Adds stricter type guard for blob attachment data before decoding/forwarding. |
| src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts | Adjusts MCP sampling forwarding to satisfy updated SDK typing for mcpRequestId. |
| src/vs/platform/agentHost/node/copilot/copilotAgent.ts | Adds platform-package CLI resolution helpers and switches CLI launch to the resolved path. |
| remote/package.json | Bumps Copilot CLI + SDK dependency versions for remote agent host. |
| remote/package-lock.json | Lockfile updates for the remote dependency bumps and transitive changes. |
| package.json | Bumps root Copilot CLI + SDK dependency versions. |
| package-lock.json | Lockfile updates for the root dependency bumps and transitive changes. |
| extensions/copilot/src/extension/chatSessions/copilotcli/vscode-node/test/copilotCLISDKUpgrade.spec.ts | Increases timeouts and relaxes native-binary assertions for non-current platform payloads. |
| extensions/copilot/src/extension/chatSessions/copilotcli/node/permissionHelpers.ts | Loosens helper input type to unknown for JSON formatting. |
| extensions/copilot/src/extension/chatSessions/copilotcli/node/copilotcliSession.ts | Adjusts casting around copilotUsage access for updated SDK event typing. |
| extensions/copilot/src/extension/chatSessions/copilotcli/common/copilotCLITools.ts | Guards blob attachment decoding on data being a string. |
| extensions/copilot/script/postinstall.ts | Materializes the SDK layout from platform packages and patches exports for @github/copilot/sdk imports. |
| extensions/copilot/package.json | Bumps extension’s @github/copilot dependency version. |
| extensions/copilot/package-lock.json | Lockfile updates for the extension dependency bump and transitive changes. |
| extensions/copilot/.vscodeignore | Excludes additional optional native payload directories from VSIX packaging. |
| build/lib/test/copilot.test.ts | Adds unit tests validating Copilot packaging filters and platform package materialization behavior. |
| build/lib/copilot.ts | Implements platform-package inclusion/exclusion globs, lockfile-based package materialization, and built-in extension prebuild restoration. |
| build/gulpfile.vscode.ts | Ensures target platform package exists before packaging desktop builds. |
| build/gulpfile.reh.ts | Ensures target platform package exists before packaging remote server builds. |
| build/darwin/create-universal-app.ts | Treats Copilot darwin platform packages as arch-specific inputs for universal app merging. |
Copilot's findings
Files not reviewed (2)
- extensions/copilot/package-lock.json: Generated file
- remote/package-lock.json: Generated file
- Files reviewed: 17/20 changed files
- Comments generated: 1
sandy081
approved these changes
Jun 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wanting to see if excluding SEA and using index.js would work. Coming from: #322430
PLEASE REVIEW EXPANDED CHANGE SUMMARY.
This bump is more than a lockfile update because
@github/copilot@1.0.64-1changed package layout. The top-level package is now mostly a loader, while real CLI/SDK assets live in platform packages like@github/copilot-linux-x64.@github/copilot@^1.0.64-1and public Agent Host SDK usage to@github/copilot-sdk@^1.0.3.@github/copilot-<platform>/index.jsentrypoint, with old top-level@github/copilot/index.jsfallback.@github/copilot-<platform>/copilot/copilot.exe) out of VS Code packaging while preserving the platform JS/runtime files we need.@github/copilot/sdkimports working across local install, VSIX packaging, and built-in product packaging.linuxmusl-*, macOS universal handling, and cross-arch optional-package materialization.Expanded change summary
Package versions
remotemove@github/copilot-sdk^1.0.2 -> ^1.0.3; root,remote, andextensions/copilotmove@github/copilot^1.0.64-0 -> ^1.0.64-1.@github/copilot-sdk@1.0.3expects the newer Copilot CLI package shape, and the extension internal SDK path needs the matching CLI package version.Package layout shift
@github/copilot@1.0.64-1moves the old top-level CLI/SDK/runtime layout into@github/copilot-<platform>packages.index.js/sdk/prebuildslayout.Agent Host CLI launch path
copilotAgent.tsresolves@github/copilot-<platform>/index.jsdirectly, with fallback to the old top-level@github/copilot/index.jslayout.npm-loader.jsand the standalone SEA executable.@github/copilot-<platform>/copilot/copilot.exe.Agent Host packaging and platform packages
build/lib/copilot.tsre-adds the selected@github/copilot-<platform>/**package after.moduleignorestrips platform packages globally.@github/copilot-<platform>/copilotand@github/copilot-<platform>/copilot.exe.index.js,app.js, runtime prebuilds,tgrep/ripgreppayloads, and related support files without taking the SEA size hit.Runtime prebuilds kept
runtime.node, Unixpty.node, macOSspawn-helper, and Windowsconpty.node,conpty_console_list.node,conpty/OpenConsole.exe, andconpty/conpty.dll.Copilot Chat extension SDK layout
postinstall.tsmaterializes@github/copilot/sdkfrom@github/copilot-<platform>.@github/copilot/sdk, while the new package layout moved real SDK files into platform packages.Built-in Copilot extension target natives
prepareBuiltInCopilotRipgrepShimrestores target-platform SDKprebuilds/<platform>andtgrep/bin/<platform>from the selected product@github/copilot-<platform>package before pruning non-target SDK folders.runtime.node/ related SDK prebuilds inextensions/copilot/node_modules/@github/copilot/sdk/prebuilds/<platform>and targettgrepin both top-level and SDK layouts.macOS universal architecture-specific Copilot files
@github/copilot-darwin-*as architecture-specific as a whole package.prebuilds/darwin-*,ripgrep/bin/darwin-*, andtgrep/bin/darwin-*.Optional native payload guardrails
clipboard,pvrecorder,mxc-bin,foundry-local-sdk,computer.node,keytar.node, and non-Windowscli-native.node.Cross-arch package materialization
ensureCopilotPlatformPackagematerializes a missing selected@github/copilot-<platform>package from the package lock before desktop/server packaging, verifying npm integrity when present.linuxmusl packaging
linuxmusl-x64/linuxmusl-arm64.Linux dependency generation
node_modules/@github/copilot-*/copilotis removed from this branch.SDK typing fallout
copilotUsage, permission helper formatting, and MCP sampling request IDs.Dependency summary
NPM package dependencies
@github/copilot-sdk@1.0.3declares these dependencies:{ "@github/copilot": "^1.0.64-1", "vscode-jsonrpc": "^8.2.1", "zod": "^4.3.6" }Verified with:
@github/copilot@1.0.64-1declares platform packages as optional dependencies:{ "@github/copilot-linux-x64": "1.0.64-1", "@github/copilot-win32-x64": "1.0.64-1", "@github/copilot-darwin-x64": "1.0.64-1", "@github/copilot-linux-arm64": "1.0.64-1", "@github/copilot-win32-arm64": "1.0.64-1", "@github/copilot-darwin-arm64": "1.0.64-1", "@github/copilot-linuxmusl-x64": "1.0.64-1", "@github/copilot-linuxmusl-arm64": "1.0.64-1" }Verified with:
Package layout used by VS Code
Platform runtime files
The platform packages still ship runtime prebuilds that packaged builds need. For example:
Relevant files include:
Linux packages similarly ship
runtime.nodeandpty.node; Windows packages shipruntime.nodeand ConPTY files such asconpty.node,conpty_console_list.node,conpty/OpenConsole.exe, andconpty/conpty.dll.Built-in extension native files
The built-in Copilot extension must contain the target SDK native files after product packaging, not only the Linux files from the Linux-built VSIX. The target files are copied from the product platform package:
into the built-in extension SDK layout:
Optional native payloads filtered from product packaging
The selected platform package is included, but product packaging filters out optional payloads we do not need for this integration path:
This keeps the runtime package usable while avoiding the standalone SEA executable and unrelated optional native binaries.
Validation
Latest local validation after the SEA-executable pivot:
cd build && npm run test -- lib/test/copilot.test.tsnode --experimental-strip-types build/hygiene.ts build/lib/copilot.ts build/lib/test/copilot.test.ts src/vs/platform/agentHost/node/copilot/copilotAgent.ts build/linux/dependencies-generator.tscd build && npm run typecheckAdditional targeted validation used while iterating this PR:
node --experimental-strip-types build/hygiene.ts build/darwin/create-universal-app.tsnode --experimental-strip-types build/hygiene.ts build/gulpfile.vscode.ts build/gulpfile.reh.tscd extensions/copilot && npm run typecheckcd extensions/copilot && npx vitest --run src/extension/chatSessions/copilotcli/vscode-node/test/copilotCLISDKUpgrade.spec.ts --pool=forksInspirations from:
build/gulpfile.vscode.ts.build/gulpfile.reh.ts.build/.moduleignore.extensions/copilot/.vscodeignore.