diff --git a/.copilot-schema-version b/.copilot-schema-version index 2147b21..0b71356 100644 --- a/.copilot-schema-version +++ b/.copilot-schema-version @@ -1 +1 @@ -1.0.99-2 +1.0.100-1 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 36f09e2..f2339ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: uses: actions/checkout@v6 with: repository: github/copilot-sdk - ref: 404304416ac5358651e3877a33bc9e8f4e482162 + ref: b96cd2b54f7eb87458fd50f485a751c712e88f62 path: .upstream/copilot-sdk persist-credentials: false fetch-depth: 0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c78fde..c4fe11c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. This change ## [Unreleased] ### Added (post-v1.0.22 sync) +- Added capability-gated MCP OAuth runtime refresh handoff, persisted recovery + outcomes, live-only MCP tool-readiness events, and request-compression fallback + diagnostics on usage and failure events. + ([upstream snapshot](https://github.com/github/copilot-sdk/commit/b96cd2b54f7eb87458fd50f485a751c712e88f62)) - Added creation-time session names; discovery-only agent and hook directories; interactive-user telemetry and read-only GitHub-cache-store options; and declarative custom-agent hooks with preserved JSON keys. @@ -13,6 +17,8 @@ All notable changes to this project will be documented in this file. This change ([upstream snapshot](https://github.com/github/copilot-sdk/commit/404304416ac5358651e3877a33bc9e8f4e482162)) ### Fixed (post-v1.0.22 sync) +- Explicit MCP OAuth cancellation takes precedence over a supplied token; + empty or non-string tokens cancel rather than reaching the runtime as tokens. - Forward discovery-root strings unchanged so the runtime can trim whitespace and ignore blank entries consistently across skills, instructions, agents, and file hooks. @@ -24,7 +30,9 @@ All notable changes to this project will be documented in this file. This change - **BREAKING**: Removed the retired `::specs/factory-run-id` contract; use `:workflow-run-id` for subagent Workflow attribution. Historical event maps still pass through unknown fields. -- Advanced CLI compatibility and schema provenance to `1.0.99-2`, preserving +- Documented additional startup directories as authorization for repository + hooks, including containing Git roots, cold-resume scope, and hook controls. +- Advanced CLI compatibility and schema provenance to `1.0.100-1`, preserving historical certification and explicitly inventorying source-only snapshots without upstream tests. New experimental and internal APIs remain excluded. The library version remains `1.0.16.0`; no release, tag, or deployment is cut. diff --git a/doc/adr/2026-10-19-mcp-recovery-and-readiness.md b/doc/adr/2026-10-19-mcp-recovery-and-readiness.md new file mode 100644 index 0000000..a38ec75 --- /dev/null +++ b/doc/adr/2026-10-19-mcp-recovery-and-readiness.md @@ -0,0 +1,57 @@ +# ADR: Preserve MCP recovery and readiness contracts + +- Status: Accepted +- Related: [upstream snapshot](https://github.com/github/copilot-sdk/commit/b96cd2b54f7eb87458fd50f485a751c712e88f62) + +## Context + +The Node SDK lets an MCP OAuth handler delegate advertised, noninteractive +credential renewal to the runtime. New events distinguish authorization +recovery completion from accepting the host response, and MCP tool readiness +from connection status. Usage and failure events gain compression-fallback +diagnostics. Other additions remain experimental or internal. + +## Decision + +Use the canonical handler result `{:kind :runtime-refresh}` and send +`"runtimeRefresh"` only when the request has `:runtime-refresh-supported true`. +Preserve omission and explicit false in callback data. Explicit cancellation +takes precedence over a token; a nonempty string token takes precedence over +handoff. Preserve bare-token maps and existing optional-token-field omission. +Malformed results and handler exceptions are logged and cancel the host request. +The same callback path serves create, resume, join, and channel variants. + +Keep renewal, grant storage, reconnect, and cancellation runtime-owned. +Handoff acceptance is not completion. Expose the persisted +`:copilot/mcp.oauth_recovery_completed` event with its request/server identity +and exact `"succeeded"`, `"cancelled"`, or `"failed"` outcome. +Expose ephemeral `:copilot/session.mcp_server_tools_loaded` with string server +name and the schema's integer tool count. Do not infer readiness from +`"connected"`, impose event ordering, or fabricate history for an ephemeral event. + +Expose the three optional compression diagnostic fields on both usage and +failure events. Preserve string enums and the schema's integer status range +of 0-999. Omission is not zero; explicit `nil` is invalid. Keep payload maps +open for future fields and preserve live/history behavior without new coercion. + +Retain the existing `:additional-directories` and `:enable-file-hooks` APIs. +Document startup directories as trust in repository commands and prompts, +including the containing Git root. Prove enabled/disabled and cold-resume +behavior with isolated repositories and a local model provider. Do not add +runtime discovery or authorization logic to the SDK. + +Keep skill-provider supporting files, Azure ML model acquisition, catalog +category filtering, hosting discovery hints, and generated MCP configuration +observations outside the supported API. Internal provider-type telemetry and +the durable compression-disable marker remain wire-only. + +## Consequences + +The public snapshot adds event/spec membership and the existing OAuth +dispatcher's fdef, without new client or session operations. Complete +symbol-based evidence extends the historical certification at its original pin. +The target has no Node test tree; retained upstream tests remain historical, +while new behavior is checked through local protocol and real-runtime tests. + +CLI compatibility and schema provenance advance to `1.0.100-1`. The library +version stays `1.0.16.0`; this decision does not cut a release, tag, or deployment. diff --git a/doc/api/2026-08-08-query-seq-scoped-lifecycle.html b/doc/api/2026-08-08-query-seq-scoped-lifecycle.html index df4abf8..71a47ff 100644 --- a/doc/api/2026-08-08-query-seq-scoped-lifecycle.html +++ b/doc/api/2026-08-08-query-seq-scoped-lifecycle.html @@ -1,6 +1,6 @@ -ADR: Add scope-bound query sequences before deprecating query-seq!

ADR: Add scope-bound query sequences before deprecating query-seq!

+ADR: Add scope-bound query sequences before deprecating query-seq!

ADR: Add scope-bound query sequences before deprecating query-seq!