Bump Copilot CLI SDK packages to 1.0.64-1 / 1.0.3#322430
Conversation
There was a problem hiding this comment.
Pull request overview
Updates VS Code’s pinned Copilot CLI SDK packages and adjusts the agent host + built-in Copilot extension integration points (CLI entry resolution, attachment handling, packaging, and upgrade tests) to stay compatible with the new SDK layout/platform packages.
Changes:
- Bump
@github/copilotto^1.0.64-1and@github/copilot-sdkto^1.0.3across root + remote + built-in Copilot extension dependencies/locks. - Harden attachment handling for
blobpayloads and adjust MCP sampling forwarding/types for the updated SDK surface. - Update Copilot extension postinstall + build packaging helpers and upgrade tests to account for linuxmusl platform packages and revised SDK layout.
Show a summary per file
| File | Description |
|---|---|
| src/vs/platform/agentHost/node/copilot/mapSessionEvents.ts | Guard blob attachment conversion when SDK blob data isn’t a string. |
| src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts | Adjust MCP executeSampling call to match updated SDK param typing. |
| src/vs/platform/agentHost/node/copilot/copilotAgent.ts | Resolve Copilot CLI entrypoint via @github/copilot’s bin field instead of hardcoding index.js. |
| remote/package.json | Bump Copilot CLI packages for the remote server build. |
| remote/package-lock.json | Lockfile updates for bumped remote dependencies (incl. platform packages). |
| package.json | Bump Copilot CLI packages for core. |
| package-lock.json | Lockfile updates for bumped core dependencies (incl. platform packages). |
| extensions/copilot/src/extension/chatSessions/copilotcli/vscode-node/test/copilotCLISDKUpgrade.spec.ts | Extend/relax binary expectations and add platform-aware “missing binary” filtering; increase import timeout. |
| extensions/copilot/src/extension/chatSessions/copilotcli/node/permissionHelpers.ts | Loosen codeBlock helper parameter type to unknown. |
| extensions/copilot/src/extension/chatSessions/copilotcli/node/copilotcliSession.ts | Adjust typing around copilotUsage extraction in usage events. |
| extensions/copilot/src/extension/chatSessions/copilotcli/common/copilotCLITools.ts | Guard blob attachment data type before base64 decoding when building history references. |
| extensions/copilot/script/postinstall.ts | Materialize Copilot CLI SDK layout from platform packages and patch exports to expose ./sdk. |
| extensions/copilot/package.json | Bump built-in Copilot extension’s @github/copilot dependency. |
| extensions/copilot/package-lock.json | Lockfile updates for built-in Copilot extension dependency bump. |
| build/lib/copilot.ts | Include linuxmusl platform packages in packaging filters and runtime file preservation logic. |
Copilot's findings
Files not reviewed (2)
- extensions/copilot/package-lock.json: Generated file
- remote/package-lock.json: Generated file
- Files reviewed: 12/15 changed files
- Comments generated: 5
| const canAsar = false; // TODO@esm ASAR disabled in ESM | ||
| const nativeModulesPath = path.join(buildDir, 'resources', 'app', canAsar ? 'node_modules.asar.unpacked' : 'node_modules'); | ||
| const findResult = spawnSync('find', [nativeModulesPath, '-name', '*.node']); | ||
| const findResult = spawnSync('find', [ |
There was a problem hiding this comment.
- VS Code Linux packaging computes deb/rpm dependencies by scanning native files that are shipped in the product.
- Previously the scanner only looked for native addon files under
node_modules, mainly*.node. @github/[email protected]now ships platform executables such asnode_modules/@github/copilot-linux-x64/copilot.- That file is a native Linux executable, but it is not a
*.nodefile. - Because the scanner missed it, CI incorrectly thought
libstdc++6 (>= 6)was no longer required. - Scanning this executable also lets CI catch too-new
GLIBC/GLIBCXXrequirements for the actual files we ship. - So the fix is to include
node_modules/@github/copilot-*/copilotin the dependency scan, not to removelibstdc++6fromdep-lists.tsunless the corrected scan still says it is gone.
…tension postinstall
a639c7b to
3a5f8d8
Compare
|
@DonJayamanne @deepak1556 @rzhao271 This ended up being a scary amount of changes because The top-level Could you guys please take a look at the “Expanded change summary” and "dependency summary" above? |
PLEASE REVIEW EXPANDED CHANGE SUMMARY.
This bump is more than a lockfile update because
@github/[email protected]changed package layout. The top-level package now delegates throughnpm-loader.js, 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's declaredbin.copilotentrypoint and packaged@github/copilot-<platform>runtime files.@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/[email protected]expects the newer Copilot CLI package shape, and the extension internal SDK path needs the matching CLI package version.Agent Host CLI launch path
copilotAgent.tsresolves@github/copilot/package.jsonbin.copilotinstead of hardcodingnode_modules/@github/copilot/index.js.@github/[email protected]no longer has top-levelindex.js; the package-declared executable isnpm-loader.js.index.jsfallback.Agent Host packaged runtime path
copilotAgent.tssetsCOPILOT_CLI_DIST_DIRwhen the selected@github/copilot-<platform>package is available in packagednode_modules.runtime.node, PTY/ConPTY files, loaders, and the platform executable.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
prepareBuiltInCopilotRipgrepShimnow restores target-platform SDKprebuilds/<platform>andtgrep/bin/<platform>from the selected product@github/copilot-<platform>package before pruning non-target SDK folders.Native addon "runtime" not found for win32-x64anddarwin-arm64.runtime.node/ related SDK prebuilds inextensions/copilot/node_modules/@github/copilot/sdk/prebuilds/<platform>and targettgrepin both top-level and SDK layouts.Agent Host packaging and platform packages
build/lib/copilot.tsre-adds the selected@github/copilot-<platform>/**package after.moduleignorestrips platform packages globally.npm-loader.jsneeds the selected platform executable, and the CLI package still ships runtime prebuilds used at runtime.Runtime prebuilds kept
runtime.node, Unixpty.node, macOSspawn-helper, and Windowsconpty.node,conpty_console_list.node,conpty/OpenConsole.exe, andconpty/conpty.dll.macOS universal architecture-specific Copilot files
@github/copilot-darwin-*as architecture-specific as a whole package.prebuilds/darwin-*,ripgrep/bin/darwin-*,tgrep/bin/darwin-*, and the platform executable. Azure build450413failed on@github/copilot-darwin-arm64/ripgrep/bin/darwin-arm64/rg, and the same package also containstgrep.Optional native payload guardrails
clipboard,pvrecorder,mxc-bin,foundry-local-sdk,computer.node,keytar.node, and non-Windowscli-native.node.Cross-arch desktop package materialization
ensureCopilotPlatformPackagematerializes a missing selected@github/copilot-<platform>package from the package lock before desktop packaging, verifying npm integrity when present.linuxmusl packaging
linuxmusl-x64/linuxmusl-arm64.Linux dependency generation
dependencies-generator.tsscansnode_modules/@github/copilot-*/copilotin addition to*.node..nodeaddon, so the old scanner missed it.Linux package dependency references
build/linux/debian/dep-lists.tsandbuild/linux/rpm/dep-lists.tsare updated to match generated CI output after the Copilot platform executable/runtime files are included.450406:libstdc++6 (>= 7)libstdc++6 (>= 7)libstdc++.so.6(GLIBCXX_3.4.22)(64bit)450413:SDK typing fallout
copilotUsage, permission helper formatting, and MCP sampling request IDs.Dependency summary
NPM package dependencies
@github/[email protected]declares these dependencies:{ "@github/copilot": "^1.0.64-1", "vscode-jsonrpc": "^8.2.1", "zod": "^4.3.6" }Verified with:
@github/[email protected]declares 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 shift
@github/[email protected]no longer provides the old top-levelindex.js/sdklayout used by previous VS Code wiring. The top-level package exposesbin.copilotasnpm-loader.js, while platform packages carry the real runtime and SDK assets.The practical split in this PR is:
Platform runtime files
The platform packages still ship runtime prebuilds that packaged builds need. For example:
Relevant files include:
Linux packages similarly ship
copilot,runtime.node, andpty.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:
This addresses the Windows/macOS smoke failure shape where the extension looked for
sdk/prebuilds/<platform>/runtime.nodeand found only the Linux-built VSIX contents.macOS universal platform package files
The macOS universal step now treats these copied platform package trees as architecture-specific:
That is broader than a single
prebuildsglob on purpose. The package contains several arch-specific locations (copilot,prebuilds,ripgrep,tgrep), and CI already failed on one of those tool paths.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 extra native binaries and GLIBC surface area.
Linux package dependency references
The dependency generator now scans
node_modules/@github/copilot-*/copilot, so deb/rpm dependency generation sees the native platform executable we ship.Azure build
450406generated these remaining reference corrections:Those lines came from the
Prepare deb package/Prepare rpm packagedependency-list guard after packaging the current Copilot platform runtime files.Validation
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 build/darwin/create-universal-app.tsnode --experimental-strip-types build/hygiene.ts build/gulpfile.vscode.ts build/gulpfile.reh.tsnode --experimental-strip-types build/hygiene.ts src/vs/platform/agentHost/node/copilot/copilotAgent.tsnode --experimental-strip-types build/hygiene.ts build/linux/debian/dep-lists.tsnode --experimental-strip-types build/hygiene.ts build/linux/rpm/dep-lists.tscd build && npm run typecheckcd extensions/copilot && npm run typecheckcd extensions/copilot && npx vitest --run src/extension/chatSessions/copilotcli/vscode-node/test/copilotCLISDKUpgrade.spec.ts --pool=forksnpx tsgo --noEmit --project src/tsconfig.jsonInspirations from:
build/gulpfile.vscode.ts.build/gulpfile.reh.ts.build/.moduleignore.build/linux/dependencies-generator.ts.build/linux/debian/dep-lists.ts.build/linux/rpm/dep-lists.ts.