Skip to content

Canvases: Add Agent Host inventory for Copilot Extensions (aka Canvas Extensions) - #343438

Merged
Joaquín Ruales (jruales) merged 3 commits into
mainfrom
jruales-copilot-extension-inventory-24e
Oct 22, 2026
Merged

Joaquín Ruales (jruales) merged 3 commits into
mainfrom
jruales-copilot-extension-inventory-24e

Conversation

@jruales

@jruales Joaquín Ruales (jruales) commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This prerequisite extracted from #340458 adds the Agent Host extension inventory layer needed by the Canvas UI without including Canvas UI/lifecycle, marketplace installation or discovery, navigation, fixtures, or documentation.

  • Adds shared inventory types plus optional list/set protocol methods, validation, capability metadata, and local/remote forwarding.
  • Implements persisted User/Plugin inventory and enablement, cold-chat fallback, safe queued reconciliation for session-targeted mutations, and forward-compatible response handling.
  • Includes Project extensions in live inventory as read-only entries. Project and Session enable/disable mutation are deferred to the upper Canvas PR.
  • Advertises the combined capability only to writable connections and retains server-side relay/read-only mutation refusal as defense in depth.
  • Skips malformed or unsupported individual entries without discarding valid inventory; persisted enabled entries remain unknown until observed live.

Validation

  • npm run build-fast -- --client-only — passed.
  • npm run eslint -- src/vs/platform/agentHost/browser/agentHostProtocolClient.ts src/vs/platform/agentHost/common/agent.ts src/vs/platform/agentHost/node/copilot/copilotAgent.ts src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts src/vs/platform/agentHost/node/protocolServerHandler.ts src/vs/platform/agentHost/test/electron-browser/agentHostProtocolClient.test.ts src/vs/platform/agentHost/test/node/copilotAgent.test.ts src/vs/platform/agentHost/test/node/copilotAgentSession.test.ts src/vs/platform/agentHost/test/node/protocolServerHandler.test.ts — passed (9 files).
  • npm run typecheck-client — passed.
  • ./scripts/test.sh --reporter dot --run src/vs/platform/agentHost/test/electron-browser/agentHostProtocolClient.test.ts --run src/vs/platform/agentHost/test/node/protocolServerHandler.test.ts --run src/vs/platform/agentHost/test/node/copilotAgent.test.ts --run src/vs/platform/agentHost/test/node/copilotAgentSession.test.ts --grep 'Copilot extensions|Copilot extension|extension inventory|discovers extensions|live extensions|extension membership|extension reconciliation|runtime owned by the Copilot SDK platform package' — passed (15 tests).

🤖 Written by GitHub Copilot on behalf of Joaquín Ruales (@jruales).

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 4a6f443d-8d37-4a07-bd90-c9764c0f80a2
Copilot AI balanced review requested due to automatic review settings October 22, 2026 08:38
@jruales Joaquín Ruales (jruales) changed the title Add Agent Host extension inventory Canvases: Add Agent Host extension inventory Oct 22, 2026
@jruales Joaquín Ruales (jruales) changed the title Canvases: Add Agent Host extension inventory Canvases: Add Agent Host inventory for Copilot Extensions Oct 22, 2026
@jruales Joaquín Ruales (jruales) changed the title Canvases: Add Agent Host inventory for Copilot Extensions Canvases: Add Agent Host inventory for Copilot Extensions, aka Canvas Extensions Oct 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

3 open issues
What changed in this PR

Adds a Copilot/Agent Host “extension inventory + enablement” surface area (types, protocol methods, server/client routing) and corresponding Copilot provider/session implementations, enabling the Canvas UI to query and toggle extensions without bringing in Canvas UI/lifecycle/marketplace features.

Changes:

  • Introduces shared extension inventory/enablement types and a new advertised capability (vscode.copilotExtensions).
  • Adds two extension protocol methods (vscode/listAgentExtensions, vscode/setAgentExtensionEnabled) and wires them through protocol server/client, management, and local service layers.
  • Implements Copilot provider/session behaviors (discover, enable/disable, reconcile) plus targeted unit tests.
File Description
src/​vs/​platform/​agentHost/​test/​node/​protocolServerHandler.test.ts Adds protocol server tests covering Copilot extension inventory routing + capability advertising.
src/​vs/​platform/​agentHost/​test/​node/​copilotAgentSession.test.ts Adds session-level tests for listing/toggling/reconciling live extensions.
src/​vs/​platform/​agentHost/​test/​node/​copilotAgent.test.ts Adds provider-level tests for persisted inventory, preference persistence, and live-session reconciliation behaviors.
src/​vs/​platform/​agentHost/​test/​electron-browser/​agentHostProtocolClient.test.ts Adds protocol client tests for calling new extension methods, capability gating, and invalid resource rejection.
src/​vs/​platform/​agentHost/​node/​protocolServerHandler.ts Advertises new capability and routes new extension methods with param validation + URI parsing.
src/​vs/​platform/​agentHost/​node/​copilot/​copilotFailureTelemetry.ts Extends Copilot client operation telemetry union with extension operations.
src/​vs/​platform/​agentHost/​node/​copilot/​copilotAgentSession.ts Implements live session extension list/enable/disable/reconcile via SDK RPC.
src/​vs/​platform/​agentHost/​node/​copilot/​copilotAgent.ts Implements persisted inventory discovery, preference persistence, and live reconciliation.
src/​vs/​platform/​agentHost/​node/​agentService.ts Exposes extension inventory/enablement on the agent service, dispatching to the right provider.
src/​vs/​platform/​agentHost/​node/​agentHostManagementService.ts Forwards extension inventory/enablement through the management service.
src/​vs/​platform/​agentHost/​electron-browser/​localAgentHostService.ts Forwards extension inventory/enablement through the local agent host service client.
src/​vs/​platform/​agentHost/​common/​meta/​agentHostCopilotExtensionsMeta.ts Adds capability meta key + helper to detect support from initialize result.
src/​vs/​platform/​agentHost/​common/​agentService.ts Extends common service interfaces to include new extension inventory/enablement APIs.
src/​vs/​platform/​agentHost/​common/​agentHostExtensionProtocol.ts Adds new protocol methods, validators, result type, and capability advertisement.
src/​vs/​platform/​agentHost/​common/​agent.ts Adds shared extension inventory types and new optional agent APIs.
src/​vs/​platform/​agentHost/​browser/​agentHostProtocolClient.ts Implements client-side support: capability gating, request/response validation, and URI translation.

Review effort: Lite

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 4a6f443d-8d37-4a07-bd90-c9764c0f80a2
@jruales Joaquín Ruales (jruales) changed the title Canvases: Add Agent Host inventory for Copilot Extensions, aka Canvas Extensions Canvases: Add Agent Host inventory for Copilot Extensions Oct 22, 2026
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 4a6f443d-8d37-4a07-bd90-c9764c0f80a2
@jruales
Joaquín Ruales (jruales) marked this pull request as ready for review October 22, 2026 10:19
@jruales Joaquín Ruales (jruales) changed the title Canvases: Add Agent Host inventory for Copilot Extensions Canvases: Add Agent Host inventory for Copilot Extensions (aka Canvas Extensions) Oct 22, 2026
@jruales
Joaquín Ruales (jruales) enabled stacked auto-merge (squash) October 22, 2026 11:00
@jruales
Joaquín Ruales (jruales) merged commit 8b4875c into main Oct 22, 2026
59 checks passed
@jruales
Joaquín Ruales (jruales) deleted the jruales-copilot-extension-inventory-24e branch October 22, 2026 11:53
@vs-code-engineering vs-code-engineering Bot added this to the 1.144.0 milestone Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants