Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .copilot-schema-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.81-5
1.0.81-6
5 changes: 5 additions & 0 deletions .github/skills/update-upstream/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,14 @@ without copying temporary audit notes into evergreen docs. Add a concise
Use the smallest targeted gates during iteration, then run:

```bash
COPILOT_UPSTREAM_VALIDATION=true bb test
bb ci:full
```

The first command validates committed exact-pin evidence against the resolved
local upstream checkout. Normal `bb test` and CI remain hermetic when that
external checkout is unavailable.

If authenticated end-to-end prerequisites are unavailable, run `bb ci` and
state the limitation. Review example output, generated diffs, and the
machine-readable parity inventory.
Expand Down
16 changes: 10 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ All notable changes to this project will be documented in this file. This change
[upstream PR #2364](https://github.com/github/copilot-sdk/pull/2364))

### Changed (post-v1.0.12-preview.0 sync)
- Updated the runtime schema pin from `1.0.80` to `1.0.81-5` and recertified
- Updated the runtime schema pin from `1.0.80` to `1.0.81-6` and recertified
the complete stable Node SDK public surface through upstream commit
[`ea41dadb199725766d5097f4592c17be3200035f`](https://github.com/github/copilot-sdk/commit/ea41dadb199725766d5097f4592c17be3200035f).
[`cc0438d66e3e68c333537cb935d9425d4e4ed8d5`](https://github.com/github/copilot-sdk/commit/cc0438d66e3e68c333537cb935d9425d4e4ed8d5).
Experimental assisted-approval controls, ephemeral UI queries, factory
lifecycle events, generated-only RPC declarations, and Node-specific package
resolution remain intentionally excluded.
Expand All @@ -40,16 +40,20 @@ All notable changes to this project will be documented in this file. This change
`:assisted-approval-model`. This replaces the removed aggregate allow-all
booleans and `"off"` / `"auto"` / `"on"` mode fields.
- `resume-session`, `<resume-session`, and `join-session` now apply supplied MCP
server configuration through `session.mcp.reloadWithConfig` after resume.
Reload failures and bounded timeouts propagate and clean up the partially
registered local session.
([upstream PR #2358](https://github.com/github/copilot-sdk/pull/2358))
server configuration directly in `session.resume`, without a redundant
`session.mcp.reloadWithConfig` follow-up.
([upstream PR #2367](https://github.com/github/copilot-sdk/pull/2367))

### Fixed (post-v1.0.12-preview.0 sync)
- Create, resume, and join now send omitted command descriptions as `""`, and
elicitation results omit absent content rather than serializing JSON `null`.
([upstream PR #2358](https://github.com/github/copilot-sdk/pull/2358))

### Fixed (examples)
- Scoped the manual pending-tool resume example to its declaration-only custom
tool so host-configured MCP tools cannot exhaust the selected model's prompt
budget before the example begins.

## [1.0.11.0] - 2026-08-16
### Added (v1.0.11 sync)
- Added client-level `:builtin-plugin-directories` for absolute, trusted plugin
Expand Down
2 changes: 1 addition & 1 deletion doc/api/API.html
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ <h4><a href="#resume-session" id="resume-session"></a><code>resume-session</code
<tr><td> <code>:large-output</code> </td><td> map </td><td> Tool output handling config. Forwarded on <code>session.resume</code> as the official SDK’s <code>largeOutput</code> field. </td></tr>
</tbody>
</table>
<p>When <code>:mcp-servers</code> is present, the SDK first resumes the session and then calls <code>session.mcp.reloadWithConfig</code> with the same converted server configuration. This applies to blocking and async resume, and therefore to <code>join-session</code>. Reload errors propagate, and the partially registered local session is removed; the SDK does not silently fall back for older runtimes. Reload requests use a bounded timeout of at least 60 seconds, extended to the largest configured <code>:mcp-timeout</code> plus a five-second transport margin.</p>
<p>When <code>:mcp-servers</code> is present, the SDK sends the converted server configuration as <code>mcpServers</code> in the <code>session.resume</code> request. This applies to blocking and async resume, and therefore to <code>join-session</code>. Omitting the key omits <code>mcpServers</code>; an empty map sends an empty configuration.</p>
<p>When <code>:on-permission-request</code> is set to <code>default-join-session-permission-handler</code>, the SDK sends <code>requestPermission: false</code> on the wire, telling the CLI that this client does not handle permission requests. Any other handler sends <code>requestPermission: true</code>.</p>
<pre><code class="language-clojure">;; Resume with a different model and reasoning effort
(copilot/resume-session client "session-123"
Expand Down
2 changes: 1 addition & 1 deletion doc/api/github.copilot-sdk.client.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
</div></div></div><div class="public anchor" id="var-ping"><h3>ping</h3><div class="usage"><code>(ping client)</code><code>(ping client message)</code></div><div class="doc"><div class="markdown"><p>Ping the server to check connectivity. Returns {:message :timestamp :protocol-version}.</p>
<p><code>:timestamp</code> is either an ISO 8601 date-time string (e.g. “2026-05-21T08:00:00Z”; CLI ≥ 1.0.51, upstream PR #1340) or a numeric epoch-millis value, depending on the CLI version; the SDK forwards whatever the server sends.</p>
</div></div></div><div class="public anchor" id="var-resume-session"><h3>resume-session</h3><div class="usage"><code>(resume-session client session-id config)</code></div><div class="doc"><div class="markdown"><p>Resume an existing session by ID.</p>
<p>Config options (<code>:on-permission-request</code> is <strong>optional</strong> since upstream PR #1308 — omit it to leave permission requests pending for manual resolution via <code>copilot/handle-pending-permission-request!</code>): - :on-permission-request - Permission handler function (optional, e.g. <code>approve-all</code>). When omitted, permission requests are surfaced as <code>:copilot/permission.requested</code> events and remain pending until resolved by the application. - :client-name - Client name to identify the application (included in User-Agent header) - :model - Change the model for the resumed session - :tools - Tools exposed to the CLI server - :system-message - System message configuration {:mode :content} - :available-tools - List of tool names to allow - :excluded-tools - List of tool names to disable - :tool-search - Tool discovery config {:enabled :defer-threshold} - :provider - Custom provider configuration (BYOK) - :streaming? - Enable streaming responses - :mcp-servers - MCP server configurations. When present, resume applies the same config with session.mcp.reloadWithConfig after session.resume; reload failures fail the resume and clean up the local session. - :custom-agents - Custom agent configurations - :default-agent - Built-in agent config, e.g. {:excluded-tools <a href="&quot;private_tool&quot;">“private_tool”</a>} - :config-directory - Override configuration directory. :config-dir remains a deprecated alias. - :skill-directories - Directories to load skills from - :disabled-skills - Skills to disable - :infinite-sessions - Infinite session configuration - :memory - Persistent memory config {:enabled boolean} (upstream PR #1617). Parity with create-session; omitted when unset. - :reasoning-effort - Reasoning effort level: “low”, “medium”, “high”, or “xhigh” - :github-token - GitHub token for this session (sent as gitHubToken) - :on-user-input-request - Handler for ask_user requests - :on-elicitation-request - Handler for elicitation requests (upstream PRs #908, #960). Single-arg handler receives an ElicitationContext map with :session-id, :message, :requested-schema, :mode, :elicitation-source, :url. Returns an ElicitationResult map; omit :content for decline/cancel results. - :on-mcp-auth-request - Handler for interactive MCP OAuth requests (upstream PR #1669). Same shape as <code>create-session</code>. On resume, interest in <code>mcp.oauth_required</code> is registered before the resume RPC so OAuth needed while the runtime replays state reaches the handler. - :hooks - Lifecycle hooks map - :on-event - Event handler (1-arg fn) registered before the RPC call. Guarantees early events like session.start are not missed. - :enable-config-discovery - Boolean. Auto-discover .mcp.json, skills, etc. (upstream PR #1044) - :enable-mcp-apps - Boolean (@experimental). See <code>create-session</code>; explicit true sends <code>requestMcpApps: true</code> on resume, while false and omission send nothing. (<a href="https://github.com/github/copilot-sdk/pull/1335">https://github.com/github/copilot-sdk/pull/1335</a>) - :model-capabilities - Model capabilities override map (upstream PR #1029). Same shape as <code>create-session</code>; :adaptive-thinking and :max-output-tokens are experimental CLI-protocol extras. - :include-sub-agent-streaming-events? - Boolean. When true (default), streaming events from sub-agents are forwarded to this session’s event stream. (upstream PR #1108) - :enable-session-telemetry? - Boolean. See <code>create-session</code> (upstream PR #1224). - :excluded-builtin-agents - Vector of strings. See <code>create-session</code> (upstream PR #1865). - :enable-citations - Boolean (@experimental). See <code>create-session</code> (upstream PR #1865). - :enable-file-change-tracking? - Boolean. See <code>create-session</code>. On resume, tracking can start only when the runtime still has a valid baseline; earlier untracked turns cannot be reconstructed. - :session-limits - Map (@experimental). See <code>create-session</code> (upstream PR #1865). - :enable-managed-settings? - Boolean. See <code>create-session</code> (upstream PR #1925). - :request-extensions? - Boolean. See <code>create-session</code>; explicit false is forwarded. - :extension-sdk-path - String path override for extension subprocesses. See <code>create-session</code>. - :extension-info - Stable extension identity <code>{:source string :name string}</code>. - :canvas-provider - Map <code>{:id .. :name ..}</code>. See <code>create-session</code> (upstream PR #1847). - :on-exit-plan-mode - Handler for exitPlanMode.request RPCs. See <code>create-session</code> (upstream PR #1228). - :on-auto-mode-switch - Handler for autoModeSwitch.request RPCs. See <code>create-session</code> (upstream PR #1228).</p>
<p>Config options (<code>:on-permission-request</code> is <strong>optional</strong> since upstream PR #1308 — omit it to leave permission requests pending for manual resolution via <code>copilot/handle-pending-permission-request!</code>): - :on-permission-request - Permission handler function (optional, e.g. <code>approve-all</code>). When omitted, permission requests are surfaced as <code>:copilot/permission.requested</code> events and remain pending until resolved by the application. - :client-name - Client name to identify the application (included in User-Agent header) - :model - Change the model for the resumed session - :tools - Tools exposed to the CLI server - :system-message - System message configuration {:mode :content} - :available-tools - List of tool names to allow - :excluded-tools - List of tool names to disable - :tool-search - Tool discovery config {:enabled :defer-threshold} - :provider - Custom provider configuration (BYOK) - :streaming? - Enable streaming responses - :mcp-servers - MCP server configurations, applied as part of session.resume. - :custom-agents - Custom agent configurations - :default-agent - Built-in agent config, e.g. {:excluded-tools <a href="&quot;private_tool&quot;">“private_tool”</a>} - :config-directory - Override configuration directory. :config-dir remains a deprecated alias. - :skill-directories - Directories to load skills from - :disabled-skills - Skills to disable - :infinite-sessions - Infinite session configuration - :memory - Persistent memory config {:enabled boolean} (upstream PR #1617). Parity with create-session; omitted when unset. - :reasoning-effort - Reasoning effort level: “low”, “medium”, “high”, or “xhigh” - :github-token - GitHub token for this session (sent as gitHubToken) - :on-user-input-request - Handler for ask_user requests - :on-elicitation-request - Handler for elicitation requests (upstream PRs #908, #960). Single-arg handler receives an ElicitationContext map with :session-id, :message, :requested-schema, :mode, :elicitation-source, :url. Returns an ElicitationResult map; omit :content for decline/cancel results. - :on-mcp-auth-request - Handler for interactive MCP OAuth requests (upstream PR #1669). Same shape as <code>create-session</code>. On resume, interest in <code>mcp.oauth_required</code> is registered before the resume RPC so OAuth needed while the runtime replays state reaches the handler. - :hooks - Lifecycle hooks map - :on-event - Event handler (1-arg fn) registered before the RPC call. Guarantees early events like session.start are not missed. - :enable-config-discovery - Boolean. Auto-discover .mcp.json, skills, etc. (upstream PR #1044) - :enable-mcp-apps - Boolean (@experimental). See <code>create-session</code>; explicit true sends <code>requestMcpApps: true</code> on resume, while false and omission send nothing. (<a href="https://github.com/github/copilot-sdk/pull/1335">https://github.com/github/copilot-sdk/pull/1335</a>) - :model-capabilities - Model capabilities override map (upstream PR #1029). Same shape as <code>create-session</code>; :adaptive-thinking and :max-output-tokens are experimental CLI-protocol extras. - :include-sub-agent-streaming-events? - Boolean. When true (default), streaming events from sub-agents are forwarded to this session’s event stream. (upstream PR #1108) - :enable-session-telemetry? - Boolean. See <code>create-session</code> (upstream PR #1224). - :excluded-builtin-agents - Vector of strings. See <code>create-session</code> (upstream PR #1865). - :enable-citations - Boolean (@experimental). See <code>create-session</code> (upstream PR #1865). - :enable-file-change-tracking? - Boolean. See <code>create-session</code>. On resume, tracking can start only when the runtime still has a valid baseline; earlier untracked turns cannot be reconstructed. - :session-limits - Map (@experimental). See <code>create-session</code> (upstream PR #1865). - :enable-managed-settings? - Boolean. See <code>create-session</code> (upstream PR #1925). - :request-extensions? - Boolean. See <code>create-session</code>; explicit false is forwarded. - :extension-sdk-path - String path override for extension subprocesses. See <code>create-session</code>. - :extension-info - Stable extension identity <code>{:source string :name string}</code>. - :canvas-provider - Map <code>{:id .. :name ..}</code>. See <code>create-session</code> (upstream PR #1847). - :on-exit-plan-mode - Handler for exitPlanMode.request RPCs. See <code>create-session</code> (upstream PR #1228). - :on-auto-mode-switch - Handler for autoModeSwitch.request RPCs. See <code>create-session</code> (upstream PR #1228).</p>
<p>Returns a CopilotSession.</p>
</div></div></div><div class="public anchor" id="var-set-foreground-session-id.21"><h3>set-foreground-session-id!</h3><div class="usage"><code>(set-foreground-session-id! client session-id)</code></div><div class="doc"><div class="markdown"><p>Set the foreground session (TUI+server mode). Requests the TUI to switch to displaying the specified session.</p>
</div></div></div><div class="public anchor" id="var-start.21"><h3>start!</h3><div class="usage"><code>(start! client)</code></div><div class="doc"><div class="markdown"><p>Start the CLI server and establish connection. Blocks until connected or throws on error.</p>
Expand Down
2 changes: 1 addition & 1 deletion doc/api/github.copilot-sdk.html
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@
<p><code>telemetry</code> is a map of string bucket names to JSON object maps.</p>
</div></div></div><div class="public anchor" id="var-resume-factory.21"><h3>resume-factory!</h3><div class="usage"><code>(resume-factory! session run-id)</code><code>(resume-factory! session run-id options)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-resume-session"><h3>resume-session</h3><div class="usage"><code>(resume-session client session-id config)</code></div><div class="doc"><div class="markdown"><p>Resume an existing session by ID. Accepts the same config options as <code>create-session</code> (except <code>:session-id</code> and <code>:cloud</code>), including the experimental <code>:enable-mcp-apps</code> host opt-in, plus: - :disable-resume? - When true, skip emitting the session.resume event (default: false)</p>
<p><code>:on-permission-request</code> is <strong>optional</strong> (since upstream PR #1308) — omit it to leave permission requests pending for manual resolution.</p>
<p>When <code>:mcp-servers</code> is present, resume applies the same configuration with <code>session.mcp.reloadWithConfig</code> after <code>session.resume</code>. A reload failure fails the resume and cleans up the local session.</p>
<p>When <code>:mcp-servers</code> is present, the configuration is applied by <code>session.resume</code>.</p>
<p>Example:</p>
<pre><code class="language-clojure">(def session (copilot/resume-session client "session-123"
{:on-permission-request copilot/approve-all}))
Expand Down
5 changes: 2 additions & 3 deletions doc/api/overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,8 @@ <h3><a href="#remote-server-httpsse" id="remote-server-httpsse"></a>Remote Serve
<tr><td> <code>:mcp-headers</code> </td><td> map </td><td> No </td><td> HTTP headers (e.g., for authentication) </td></tr>
</tbody>
</table>
<h3><a href="#resume-time-reload" id="resume-time-reload"></a>Resume-Time Reload</h3>
<p>When <code>:mcp-servers</code> is supplied to <code>resume-session</code> or <code>&lt;resume-session</code>, the SDK sends the configuration with <code>session.resume</code> and then applies the same converted map through <code>session.mcp.reloadWithConfig</code>. <code>join-session</code> inherits this behavior because it resumes the parent session internally.</p>
<p>The reload is part of the resume contract: an RPC error or closed response fails the operation and removes the partially registered local session. There is no silent fallback for runtimes that do not support the reload method. Omitting <code>:mcp-servers</code> sends neither a reload request nor an empty configuration.</p>
<h3><a href="#resume-time-configuration" id="resume-time-configuration"></a>Resume-Time Configuration</h3>
<p>When <code>:mcp-servers</code> is supplied to <code>resume-session</code> or <code>&lt;resume-session</code>, the SDK sends the converted configuration as <code>mcpServers</code> in the <code>session.resume</code> request. <code>join-session</code> inherits this behavior because it resumes the parent session internally. Omitting <code>:mcp-servers</code> omits the wire key; an empty map sends an empty configuration.</p>
<h3><a href="#disabling-mcp-servers" id="disabling-mcp-servers"></a>Disabling MCP Servers</h3>
<p>Disable specific servers for a session without removing their <code>:mcp-servers</code> entry:</p>
<pre><code class="language-clojure">(copilot/with-client-session [session
Expand Down
Loading
Loading