You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This replaces the caller-managed Connector/MCP bridge with the runtime-owned experimental Connector session API across Node.js, Python, Go, .NET, Java, and Rust.
The runtime owns Connector catalog validation, GitHub authorization, bounded connection polling, MCP projection, and authoritative same-session reconciliation.
The SDK host owns opaque account selection, browser/consent UI, destructive-action confirmation, and presentation.
Connector methods accept only an opaque account selection ID. Connector DTOs never accept or return credentials or provider tokens.
Managed-MCP implementation details and Connector credential callbacks are not exposed as public SDK APIs.
Existing mcpServers behavior is unchanged and remains the API for MCP servers configured directly by the application.
Generated clients share one exact, fail-closed schema overlay until the pinned schema contains the Connector contract.
No dependencies, lockfiles, runtime pins, project files, or workflows are changed.
Exposed functions
Function
Purpose
Result
getCapabilities()
Detect API availability and read hard continuation bounds without a Connector service request
API version, availability, account-selection support, and polling ceilings
getStatus()
Read authoritative session state without a Connector service request
Pinned account ID, cached catalog, pending continuations, and live Connector-owned MCP status
list({ accountId })
Read the cached catalog, fetching it when the session has no catalog
Validated Connector catalog
refresh({ accountId })
Refresh and validate the catalog
Validated Connector catalog
connect({ accountId, connectorName })
Start an idempotent connection flow without opening a browser
connected, consent_required, or pending
reconnect({ accountId, connectorName })
Restart the same connection flow for an existing Connector
Continue consent/connection polling within caller-supplied and runtime-enforced bounds
Typed connection result
disconnect({ accountId, connectorName })
Disconnect a Connector and remove its session-owned MCP projection
Disconnect result plus authoritative session status
reconcile({ accountId, refreshCatalog? })
Reconcile the authoritative catalog into the current session
Authoritative session status
SDK surface
SDK
Namespace
Node.js
session.rpc.connectors
Python
session.rpc.connectors
Go
session.RPC.Connectors
.NET
session.Rpc.Connectors
Java
session.getRpc().connectors
Rust
session.rpc().connectors()
Each SDK includes wire-shape coverage for all nine methods and typed result/enum serialization. Shared documentation now distinguishes direct mcpServers configuration from runtime-managed Connectors and demonstrates the capability → account selection → list → reconcile → connect → consent → bounded continuation flow.
Validation
Shared and Java code generation are reproducible with no diff and match the compatible runtime Connector schema exactly.
Node.js: formatting, lint, typecheck, and Connector/codegen tests pass.
Python: Ruff checks and Connector tests pass.
Go: Connector and generated RPC packages pass with the race detector.
.NET: all three Connector RPC tests and the all-target build pass.
Java: Spotless, Checkstyle, focused Connector serialization/RPC tests, and the full JDK 25 verification suite pass.
Rust: nightly formatting, Clippy with warnings denied, all-feature tests, doctests, and documentation with warnings denied pass.
Real authenticated E2E passes through both standalone stdio and in-process transports: capability detection, catalog retrieval, reconciliation, three live Connector MCP servers, authoritative connected status, and live tools/list results (22, 1, and 3 tools).
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🟡 Changes recommended
The overlay accepts partial schemas, Go leaves handler panics unrecovered, and several public APIs introduce compatibility or experimental-gating breaks.
Get a fresh assessment by requesting another Copilot review.
Keep runtime managed-MCP details behind Connector-facing configuration, validate authorization against the real runtime, and remove the obsolete schema overlay.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the pull request focused on Connector session configuration and authorization.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
mattdholloway
changed the title
Add Copilot Connectors support
Expose Copilot Connector session support across SDKs
Sep 16, 2026
mattdholloway
changed the title
Expose Copilot Connector session support across SDKs
Expose experimental Copilot Connector APIs across SDKs
Sep 18, 2026
mattdholloway
changed the title
Expose experimental Copilot Connector APIs across SDKs
Expose Copilot Connector session support
Sep 18, 2026
API generators accept an explicit schema path, but this basename guard applies the overlay only when that path is literally named api.schema.json. For example, passing /tmp/connector-api.json through getApiSchemaPath(cliArg) silently generates clients without the Connector contract. Identify API versus session-event schemas at the call sites instead of inferring the schema kind from the filename.
This PR adds the experimental Copilot Connector session API uniformly across all six SDKs, with matching:
Method surface (9 methods each): getCapabilities/get_capabilities/GetCapabilities, getStatus/get_status/GetStatus, list/List, refresh/Refresh, connect/Connect, reconnect/Reconnect, continueConnection/continue_connection/ContinueConnection, disconnect/Disconnect, reconcile/Reconcile — each following the correct language idiom (camelCase for Node/Python via snake_case/Java, PascalCase for Go/.NET, snake_case for Rust).
Namespace access pattern, matching the documented table in docs/features/mcp.md:
Node.js: session.rpc.connectors
Python: session.rpc.connectors
Go: session.RPC.Connectors
.NET: session.Rpc.Connectors
Java: session.getRpc().connectors
Rust: session.rpc().connectors()
Experimental gating consistent with each SDK's existing experimental-API conventions (Java's @AllowCopilotExperimental annotation + compiler-enforced opt-in with new CopilotExperimentalProcessorTest coverage, .NET's [Experimental(Diagnostics.Experimental)], Rust's doc-comment experimental warnings, Go's // Experimental: comments).
Discriminated connect/continuation result types (connected / consent_required / pending) implemented equivalently in each language's union/enum idiom (Go tagged unions with Kind(), TS discriminated unions, Java sealed-style DTOs, Rust enums, Python dataclasses).
Security-relevant behavior parity: every SDK's docs/tests confirm the API accepts only opaque account IDs and continuation IDs — no credentials or provider tokens cross the wire — and that consent-URL handling/browser UX remains host-owned in all six implementations.
Test coverage added per SDK: dotnet/test/Unit/RpcConnectorsTests.cs, go/connectors_rpc_test.go, java/sdk/src/test/java/.../RpcWrappersTest.java + CopilotExperimentalProcessorTest.java, nodejs/test/connectors.test.ts, python/test_connectors.py, rust/tests/api_types_test.rs / session_test.rs.
README updates are present and mutually consistent for all 6 languages, plus the shared docs/features/mcp.md overview with a per-SDK access table.
No inconsistencies, one-off single-language features, or naming/behavior mismatches were found. This is a good example of a coordinated, feature-parity-preserving cross-SDK change (codegen-driven from scripts/codegen/connector-session-api-overlay.json / connectorSessionApiOverlay.ts, with per-language generator updates in scripts/codegen/rust.ts, java/scripts/codegen/java.ts, and scripts/codegen/utils.ts).
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
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.
Summary
This replaces the caller-managed Connector/MCP bridge with the runtime-owned experimental Connector session API across Node.js, Python, Go, .NET, Java, and Rust.
mcpServersbehavior is unchanged and remains the API for MCP servers configured directly by the application.Exposed functions
getCapabilities()getStatus()list({ accountId })refresh({ accountId })connect({ accountId, connectorName })connected,consent_required, orpendingreconnect({ accountId, connectorName })connected,consent_required, orpendingcontinueConnection({ continuationId, maxAttempts, pollIntervalMs, deadlineMs })disconnect({ accountId, connectorName })reconcile({ accountId, refreshCatalog? })SDK surface
session.rpc.connectorssession.rpc.connectorssession.RPC.Connectorssession.Rpc.Connectorssession.getRpc().connectorssession.rpc().connectors()Each SDK includes wire-shape coverage for all nine methods and typed result/enum serialization. Shared documentation now distinguishes direct
mcpServersconfiguration from runtime-managed Connectors and demonstrates the capability → account selection → list → reconcile → connect → consent → bounded continuation flow.Validation
connectedstatus, and livetools/listresults (22, 1, and 3 tools).