Repository navigation
agentHost: bump Copilot SDK to 2.0.4 - #351277
Draft
TylerLeonhardt wants to merge 3 commits into
Draft
TylerLeonhardt wants to merge 3 commits into
TylerLeonhardt wants to merge 3 commits into
Conversation
Bundle @microsoft/copilot-sdk 2.0.4 and runtime 1.0.117, and adapt the Agent Host to the SDK's breaking changes: - Extension approval: `extension-permission-access` became `extension-launch`. Extensions now ask to start, so the host adds a `launch` consent kind with its own wording and remembers the decision under the extension identity instead of its capability list. - Accounts: the runtime identifies accounts by `accountId` instead of `selectionId`, and no longer reports `authSelectionId`. - Entra identity: the runtime requires the tenant, so an identity is returned once an ID token has named it. Two host issues that the new launch request exposed are fixed: - A runtime slash command sent as the first message hung when an extension that starts with the session still waited for approval, because the runtime holds the command until that extension starts. - Retrying a canvas after declining its environment variable request reported a generic failure instead of a decline kept for the session. Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
A stale permission mode after an idle switch from Allow All to Default can let /env approve queued extension launches or sensitive-environment requests without user consent.
1 open issue
2 files not reviewed
pnpm-lock.yaml: Generated fileremote/pnpm-lock.yaml: Generated file
What changed in this PR
Updates VS Code’s Agent Host to Copilot SDK 2.0.4 and runtime 1.0.117, adapting extension consent and Microsoft authentication to the new SDK contracts.
Changes:
- Aligns desktop and remote dependency versions and refreshes the managed-settings schema snapshot.
- Adds extension-launch consent, enables consent during slash-command startup, and refines canvas retry reporting.
- Migrates account selection to
accountId, requires tenant-aware Entra identities, and updates related tests.
| File | Description |
|---|---|
src/vs/workbench/contrib/canvases/test/common/agentHostCanvasConsent.test.ts |
Tests launch-consent dialog and denial wording. |
src/vs/workbench/contrib/canvases/common/agentHostCanvasConsent.ts |
Adds canvas launch-consent messages. |
src/vs/platform/agentHost/test/node/sessionPermissions.test.ts |
Updates the extension permission kind. |
src/vs/platform/agentHost/test/node/providerIntegration/copilotNativeExtensions.integrationTest.ts |
Handles and verifies native extension launch consent. |
src/vs/platform/agentHost/test/node/providerIntegration/copilotMockLlm.integrationTest.ts |
Verifies launch consent before environment consent. |
src/vs/platform/agentHost/test/node/providerIntegration/copilotExtensionEnvConsent.integrationTest.ts |
Approves launch before testing environment access. |
src/vs/platform/agentHost/test/node/providerIntegration/copilotAccountContext.integrationTest.ts |
Updates account identifiers and tenant-bearing credentials. |
src/vs/platform/agentHost/test/node/e2e/KNOWN_ISSUES.md |
Documents retained declines in runtime 1.0.117. |
src/vs/platform/agentHost/test/node/copilotSessionLauncher.test.ts |
Migrates the account fixture to accountId. |
src/vs/platform/agentHost/test/node/copilotEntraAuthentication.test.ts |
Tests tenant-required identities and recovery. |
src/vs/platform/agentHost/test/node/copilotEntraAuthentication.integrationTest.ts |
Updates transport tests for tenant-aware authentication. |
src/vs/platform/agentHost/test/node/copilotAgentSession.test.ts |
Covers launch consent and blocked slash-command startup. |
src/vs/platform/agentHost/test/node/copilotAgent.test.ts |
Updates account and identity fixtures. |
src/vs/platform/agentHost/test/node/copilotAccountService.test.ts |
Adapts account-selection mocks to the SDK contract. |
src/vs/platform/agentHost/test/node/agentService.test.ts |
Updates expected Microsoft identities. |
src/vs/platform/agentHost/test/node/__snapshots__/Copilot_SDK_-_managed_settings_bundled_managedSettings_schema_matches_the_snapshot.schema.json |
Records the additional CA certificate setting. |
src/vs/platform/agentHost/node/copilot/copilotToolDisplay.ts |
Maps the new extension-launch permission kind. |
src/vs/platform/agentHost/node/copilot/copilotEntraAuthentication.ts |
Requires a known tenant when returning an identity. |
src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts |
Adapts consent handling and slash-command prompt readiness. |
src/vs/platform/agentHost/node/copilot/copilotAgent.ts |
Distinguishes retried consent from other extension requests. |
src/vs/platform/agentHost/node/copilot/copilotAccountService.ts |
Selects and verifies accounts using accountId. |
src/vs/platform/agentHost/common/copilotAccountContext.ts |
Renames the shared account identifier field. |
src/vs/platform/agentHost/common/agentHostSchema.ts |
Updates approval-setting documentation for launch consent. |
src/vs/platform/agentHost/common/agent.ts |
Adds launch consent while retaining legacy capability consent. |
remote/pnpm-lock.yaml |
Locks remote SDK platform packages to 2.0.4. |
remote/package.json |
Updates remote SDK and runtime declarations. |
pnpm-lock.yaml |
Locks root SDK platform packages to 2.0.4. |
package.json |
Updates root SDK and runtime declarations. |
Review effort: Balanced
…ile idle A turn that runs a runtime command does not apply a permission mode that changed while the chat was idle, so an extension request waiting for that turn could be approved under the earlier Allow All. Allow All now approves such a request only while it is both applied and still selected. Co-authored-by: Copilot <[email protected]>
…ion file Loading the class registered it for every editor, so its test made unrelated editor tests fail when they created an editor without the feedback service. Co-authored-by: Copilot <[email protected]>
This branch has not been deployed
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.

Bundle
@microsoft/copilot-sdk2.0.4 and runtime 1.0.117 (release notes), and adapt the Agent Host to the SDK's breaking changes. There is no tracking issue.Changes
package.json,pnpm-lock.yamlextension-permission-accesswithextension-launch: it asks before an extension's process starts and no longer names capabilities. The host adds alaunchconsent kind with its own wording in the turn and in the canvas dialog, and remembers the decision under the extension identity. Thecapabilitieskind stays readable for hosts that still send it.accountIdinstead ofselectionId, and no longer reportsauthSelectionId.Behavior changes to review
project:extension is keyed by its name, as capability decisions were.SDK bump checklist
copilotBuiltinToolAllowlist.integrationTest.tspasses unchanged.extraCaCertificates. No tool-related settings.exposure,onlyOverridesBuiltInTool,maxToolTurns,sessionLifecycleMode,resolveSessionFsProvider,sessionHandoff) are optional and keep their defaults. None is on by default.How to test
.github/extensions, open one of its canvases. The dialog asks to start the extension, and Always Allow stops it from asking again./envas the first message. The turn asks to start the extension, then shows the command output.Validation
Run locally on macOS arm64.
pnpm run typecheck-client: passed.pnpm run oxlint <changed TypeScript files>: passed../scripts/test-integration.sh --runGlob "**/agentHost/test/node/{providerIntegration/,}copilot*.integrationTest.js"./scripts/test-agent-host-e2e.sh, two full runs:GET /api/eventsreplay request. Both pass when run alone, twice each, and the 2.0.3 runtime contains the same request path, so this does not look specific to the bump.🧪 Run Agent Host E2E tests (Electron)task passed on Windows, Linux and macOS, with every suite process passing on each platform and no unrecorded replay request.mainhas at this branch's base commit:AgentFeedbackEditorInputContributionthrowsCannot read properties of undefined (reading 'onDidChangeFeedbackScope')in editor tests, and the other failures are its knock-on effects (console output, leaked disposables, repeateddone()). No failing test is in a suite this change touches.