Skip to content

chat: Add Copilot connectors as an authenticated customization source - #337649

Merged
Paul (pwang347) merged 113 commits into
mainfrom
pwang/copilot-connectors-marketplace-v2
Sep 26, 2026
Merged

Paul (pwang347) merged 113 commits into
mainfrom
pwang/copilot-connectors-marketplace-v2

Conversation

@pwang347

@pwang347 Paul (pwang347) commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds an independently gated, authenticated Copilot Connectors source to the customization Marketplace and MCP management UI.

  • Keeps connector discovery and consent separate from the anonymous GitHub Feed and MCP Gallery. Desktop requests use a scoped native channel with typed operations, bounded responses, cancellation, and per-request credentials; web uses the workbench request path.
  • Preserves normal default-account sign-in scopes. Generic catalog browsing uses an ordinary GitHub session when supported. Check Connection and connection actions explicitly request missing connector permission for the same account; rollout-time HTTP 403 responses remain recoverable and never trigger passive consent.
  • Composes connector results with other Marketplace sources using bounded ranked search and round-robin browse. One source failing, requiring sign-in, or being disabled does not hide healthy sources.
  • Shows connected connector MCP servers under Installed and products under Connectors, with status-aware actions, details, explicit empty states, and user/workspace MCP precedence.
  • Gates connector discovery and Copilot session availability on the default-off chat.customizations.copilotConnectors.enabled setting. Marketplace visibility remains independently controlled by chat.customizations.marketplace.enabled.
  • Scopes session-time support to the Copilot Agent Host provider. VS Code retains the pre-session catalog and consent UI, while the bundled Copilot runtime owns session-time connector reconciliation, validation, managed MCP projection, credentials, collision handling, and lifecycle through session.rpc.connectors.*.
  • Awaits runtime reconciliation before a Copilot session becomes available, so a connector that was just connected is usable in the first fresh session. Reconciliation failure is non-fatal to ordinary Copilot chat.

VS Code does not project connector endpoints or forward GitHub credentials to them. Credential delivery remains runtime-owned and endpoint-bound.

Validation

  • 1,064 changed-file unit tests pass locally (1 existing pending).
  • npm run typecheck-client passes.
  • npm run valid-layers-check passes.
  • Changed-file ESLint passes.
  • Copilot Agent Host runtime-MCP lifecycle replay passes.
  • Twelve connector/MCP component fixtures render without errors and remain stable in dark and light themes, including the empty Connectors tab and connector detail.
  • Live verification connected Microsoft Learn Docs, created a completely fresh Copilot Agent session, invoked the runtime-managed microsoft_docs_search tool, and returned an official Microsoft Learn result. The connector was disconnected after validation.

Manual test

  1. Toggle Marketplace visibility separately from the public GitHub Feed and Copilot Connectors settings. With Marketplace off, verify Overview and legacy MCP management remain available. With Marketplace on, verify Discover and each enabled source independently.
  2. Search, browse, filter, paginate, and fail or disable each source independently. Healthy results must remain available and retry must restart from the first page.
  3. Start signed out, sign in with ordinary GitHub scopes, and browse the generic connector catalog without a connector-consent prompt when the backend permits it. Use Check Connection or Connect to explicitly upgrade the same account. Verify cancellation and recoverable rollout-time HTTP 403 behavior.
  4. Connect and disconnect a connector. Verify its status and details, its connected MCP servers under Installed, and user/workspace MCP precedence.
  5. Create a fresh Copilot Agent session immediately after connecting and invoke one of the connector's MCP tools. Disable the connector experiment and verify fresh Copilot sessions no longer expose connector tools.

Paul (pwang347) and others added 30 commits September 21, 2026 11:24
Add a discovery-only AgentFinder section with metadata cards, GitHub owner avatars, search, filters, pagination, and accessible states. Route desktop catalog requests through a bounded, cancellable shared-process client and preserve encoded resource URLs.

Co-authored-by: Copilot <[email protected]>
Route validated catalog resources through existing MCP and plugin installation flows, and import complete skill packages into confirmed harness locations. Preserve repository revisions and subdirectories, enforce trust and policy, and cover cancellation, overwrite protection, limits, and installation UI states.

Isolate customization lifecycle tests from production registrations to fix full-suite CI failures.

Co-authored-by: Copilot <[email protected]>
Bound catalog metadata before IPC and rendering, bind ResizeObserver to the widget window, preserve catalog state on unrelated entitlement changes, and label Accessible View metadata groups and destinations. Add regression coverage and accept the current AgentFinder screenshot baselines.

Co-authored-by: Copilot <[email protected]>
Accept the verified sidebar and migration-navigation changes caused by the AgentFinder tab. Preserve unrelated baselines and the previously accepted AgentFinder card fixtures.

Co-authored-by: Copilot <[email protected]>
Add chat.agentFinder.enabled with a disabled default and automatic experiment assignment. Gate section visibility and instantiation, catalog IPC and browser clients, and installation observers and work. Keep the shared-process catalog client truly lazy and cancel pending discovery/imports when the experiment is disabled.

Add disabled-path, runtime-toggle and lazy-initialization coverage plus a disabled UI fixture.

Co-authored-by: Copilot <[email protected]>
Preserve AgentFinder installation and experiment gating alongside upstream MCP compatibility/detail and migration activity changes. Combine test/fixture imports and retain the latest reviewed MCP screenshot baselines.

Co-authored-by: Copilot <[email protected]>
Use the standard control height, inherited typography, and padded select treatment so the resource dropdown aligns with search and Refresh on both native and custom select implementations. Assert control geometry in wide and narrow fixtures.

Co-authored-by: Copilot <[email protected]>
Introduce source-neutral marketplace contracts, opaque source-owned pagination, and source/version-scoped identities. Keep AgentFinder as the sole REST-backed source while presenting Marketplace throughout Customizations.

Rename the default-off experiment to chat.customizations.unifiedMarketplace.enabled and retain lazy loading, installation safeguards, and accessibility behavior.

Co-authored-by: Copilot <[email protected]>
Preserve the unified customization marketplace and upstream changes. Resolve shared screenshot baseline conflicts in favor of current main while retaining catalog entries pending fresh CI.

Co-authored-by: Copilot <[email protected]>
Replace the separate customization overview and AgentFinder section with one Discover surface. Add typed quick filters, grouped virtualized installed and available results, catalog paging and cancellation, and integrated accessibility coverage.

Co-authored-by: Copilot <[email protected]>
Match the compact customization search sizing, inherit the management surface background, align virtualized results with the page header, and reuse Marketplace filter actions with modern panel-tab filter styling.

Co-authored-by: Copilot <[email protected]>
Constrain virtualized selection surfaces to the page measure and give browse cards and search results distinct marketplace-style content hierarchies.

Co-authored-by: Copilot <[email protected]>
Accept the visually inspected MarketplaceTab and customization navigation images from CI run 35783902863 for head 3564d3f. Preserve all unrelated baselines.

Co-authored-by: Copilot <[email protected]>
Gate Copilot connector discovery behind an automatic experiment, compose the authenticated connector catalog into the unified marketplace, route consent through the existing GitHub account, and surface connected servers in their own MCP section with connector-managed details.

Co-authored-by: Copilot <[email protected]>
Replace the global marketplace experiment with an AgentFinder public-feed source gate. Select sources per window, preserve lazy backends, and scope discovery and installation lifetimes to source enablement.

Co-authored-by: Copilot <[email protected]>
Restore cached Featured items immediately when a search is cleared, and let Discover queries target all registered marketplace feeds or one selected source.

Co-authored-by: Copilot <[email protected]>
Move connector status, lifecycle actions, connected MCP servers, and rich connector details into the MCP page design. Keep available connector discovery in the unified Discover surface and remove the MCP page's duplicate Available marketplace section.

Co-authored-by: Copilot <[email protected]>
Merge AgentFinder base d83276e while preserving Discover and connector MCP management. Adapt the split public/authenticated transport to per-source gates and opaque globally paginated cursors. Rank the cached connector catalog with bounded, field-weighted fuzzy matching and add source, IPC, installation, and Discover regression coverage.

Co-authored-by: Copilot <[email protected]>
Keep native connector pages on a bounded ranked catalog snapshot across refreshes. Invalidate source and aggregator continuations when the selected account, authentication session, or source lifetime changes, including buffered results. Cover catalog refreshes, changed rankings and membership, cursor bounds and retries, and account-switch races without moving authentication across IPC or widening scopes.

Co-authored-by: Copilot <[email protected]>
Merge AgentFinder base 9a42a6b while preserving connector snapshots, source gates, and Discover/MCP management. Validate round-robin continuations across page boundaries, source exhaustion, retries, cancellation, and account changes.

Co-authored-by: Copilot <[email protected]>
Integrate per-source marketplace enablement and ranked feed pagination while preserving unified Discover. Reactivate Discover after an editor input is reopened so Agent Finder results are not left cancelled.

Co-authored-by: Copilot <[email protected]>
Keep browse content scrollable, quiet non-interactive result headings, and distinguish fallback artwork while aligning the import action with its behavior.

Co-authored-by: Copilot <[email protected]>
Paul (pwang347) and others added 16 commits September 24, 2026 18:42
Delegate session-time connector discovery, credentials, and managed MCP lifecycle to the Copilot runtime while preserving the pre-session Marketplace experience.

Co-authored-by: Copilot <[email protected]>
Resolve the MCP customization test overlap by preserving both connector recovery coverage and upstream source-grouping coverage.

Co-authored-by: Copilot <[email protected]>
Persist account-scoped connector history, retain unavailable catalog entries, and route repair and disconnect through authoritative connector state.

Co-authored-by: Copilot <[email protected]>
Preserve configured Plugin marketplace composition and continuous Discover paging alongside Copilot connector sources and account-scoped connector records.

Co-authored-by: Copilot <[email protected]>
Retain connector discovery coverage while adopting the latest continuous paging regression fix.

Co-authored-by: Copilot <[email protected]>
@pwang347
Paul (pwang347) marked this pull request as ready for review September 26, 2026 03:01
@pwang347
Paul (pwang347) enabled auto-merge (squash) September 26, 2026 03:01
@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

Robo (@deepak1556)

Matched files:

  • src/vs/code/electron-utility/sharedProcess/sharedProcessMain.ts

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants