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.84-5
1.0.84-8
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,29 @@ All notable changes to this project will be documented in this file. This change

## [Unreleased]

### Added (v1.0.84-8 sync)
- Added stable event provenance for assistant originating messages, configured
MCP server identity/source, subagent model selection, and managed MCP server
display names, and added the `"error"` outcome to the public MCP
headers-refresh completion contract.
([upstream PR #2658](https://github.com/github/copilot-sdk/pull/2658))

### Changed (v1.0.84-8 sync)
- Updated the runtime and schema pin to `1.0.84-8` and recertified the complete
stable Node SDK public surface through upstream commit
[`e9df3938b0f2bb028b203f4095d48b75f155c008`](https://github.com/github/copilot-sdk/commit/e9df3938b0f2bb028b203f4095d48b75f155c008).
Factory pause/checkpoint APIs, shell completion facts, managed catalog and
workspace RPC additions, and internal skill-reference events remain outside
the stable Clojure API.
([upstream PR #2658](https://github.com/github/copilot-sdk/pull/2658),
[upstream PR #2662](https://github.com/github/copilot-sdk/pull/2662))

### Fixed (v1.0.84-8 sync)
- Factory abort requests now cancel only the matching execution token, so a
stale attempt cannot cancel another attempt sharing the durable run ID.
The new factory pause/checkpoint API remains intentionally excluded.
([upstream PR #2537](https://github.com/github/copilot-sdk/pull/2537))

### Added (v1.0.84-5 sync)
- Added stable `:mcp-transport` metadata to
`:copilot/tool.execution_start` events. The optional field accepts `"stdio"`,
Expand Down
22 changes: 11 additions & 11 deletions doc/api/API.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion doc/api/agent-factories.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ <h2><a href="#cancellation" id="cancellation"></a>Cancellation</h2>
<p>There are three distinct cancellation mechanisms, and they don’t overlap:</p>
<ol>
<li><strong>Cooperative, inside <code>:run</code></strong> — react to <code>:cancel-chan</code> closing or poll <code>:cancelled?</code> to stop early. Cancellation does not interrupt <code>:run</code> automatically; the factory must check for it.</li>
<li><strong>From outside, server-side</strong> - <code>cancel-factory-run!</code> asks the CLI to cancel a run. The runtime then sends a reverse <code>factory.abort</code> request, which closes the run’s <code>:cancel-chan</code> and eventually delivers a <code>:cancelled</code> terminal status.</li>
<li><strong>From outside, server-side</strong> - <code>cancel-factory-run!</code> asks the CLI to cancel a run. The runtime then sends a reverse <code>factory.abort</code> request for the active execution token, which closes only that attempt’s <code>:cancel-chan</code> and eventually delivers a <code>:cancelled</code> terminal status. An older attempt cannot cancel a replacement that shares the durable run ID.</li>
<li><strong>Aborting a local wait, not the run</strong> — <code>wait-for-factory-run!</code> accepts an optional <code>:cancel-chan</code>; closing it makes the <em>wait</em> throw <code>ex-info</code> with <code>{:type :factory-wait-cancelled}</code> without cancelling the run itself. Use this to stop blocking on a run you still want to keep executing.</li>
</ol>
<h2><a href="#limits" id="limits"></a>Limits</h2>
Expand Down
3 changes: 2 additions & 1 deletion doc/api/github.copilot-sdk.session.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@
</div></div></div><div class="public anchor" id="var-handle-elicitation-request.21"><h3>handle-elicitation-request!</h3><div class="usage"><code>(handle-elicitation-request! client session-id context)</code></div><div class="doc"><div class="markdown"><p>Handle an incoming elicitation.requested broadcast event. Calls the session’s elicitation handler with a single ElicitationContext arg (includes :session-id alongside request fields). Returns a channel with the result. If the handler fails, returns {:action “cancel”} to avoid hanging requests.</p>
</div></div></div><div class="public anchor" id="var-handle-exit-plan-mode-request.21"><h3>handle-exit-plan-mode-request!</h3><div class="usage"><code>(handle-exit-plan-mode-request! client session-id request)</code></div><div class="doc"><div class="markdown"><p>Handle an incoming exitPlanMode.request RPC (upstream PR #1228). The server asks the client whether to exit plan mode. Calls the session’s :exit-plan-mode-handler with <code>(request, {:session-id ...})</code>. If the handler returns a channel, awaits its value. Returns a channel with a wire-shaped response wrapped in {:result …} or {:error …}.</p>
<p>Default behavior (no handler): {:result {:approved true}}. Handler must return an idiomatic map containing :approved? (required boolean), optional :selected-action (string), :feedback (string). If the handler result is malformed (non-map, missing :approved?, or :approved? is not a boolean), a warning is logged and the response falls back to {:result {:approved true}} (matching the no-handler default). Exceptions thrown by the handler are converted to {:error {:code -32603 :message …}}.</p>
</div></div></div><div class="public anchor" id="var-handle-factory-abort.21"><h3>handle-factory-abort!</h3><div class="usage"><code>(handle-factory-abort! client session-id run-id)</code></div><div class="doc"><div class="markdown"><p>Cooperatively cancel active executions for a durable factory run.</p>
</div></div></div><div class="public anchor" id="var-handle-factory-abort.21"><h3>handle-factory-abort!</h3><div class="usage"><code>(handle-factory-abort! client session-id run-id)</code><code>(handle-factory-abort! client session-id run-id execution-token)</code></div><div class="doc"><div class="markdown"><p>Cooperatively cancel factory executions.</p>
<p>The four-arity form targets one execution attempt. The three-arity form retains run-wide cancellation for direct callers of this low-level handler.</p>
</div></div></div><div class="public anchor" id="var-handle-factory-execute.21"><h3>handle-factory-execute!</h3><div class="usage"><code>(handle-factory-execute! client session-id {:keys [name run-id execution-token], :as params})</code></div><div class="doc"><div class="markdown"><p>Execute an extension-authored factory for a runtime reverse RPC.</p>
</div></div></div><div class="public anchor" id="var-handle-hooks-invoke.21"><h3>handle-hooks-invoke!</h3><div class="usage"><code>(handle-hooks-invoke! client session-id hook-type input)</code></div><div class="doc"><div class="markdown"><p>Handle an incoming hooks invocation. Returns a channel with the result. PR #269 feature.</p>
</div></div></div><div class="public anchor" id="var-handle-mcp-auth-request.21"><h3>handle-mcp-auth-request!</h3><div class="usage"><code>(handle-mcp-auth-request! client session-id request)</code></div><div class="doc"><div class="markdown"><p>Handle an <code>mcp.oauth_required</code> MCP OAuth request (upstream PR #1669). Returns a channel yielding the wire <code>result</code> map for session.mcp.oauth.handlePendingRequest.</p>
Expand Down
2 changes: 1 addition & 1 deletion doc/guides/agent-factories.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ A thunk or stage that throws is either **fatal** or **ordinary**:
There are three distinct cancellation mechanisms, and they don't overlap:

1. **Cooperative, inside `:run`** — react to `:cancel-chan` closing or poll `:cancelled?` to stop early. Cancellation does not interrupt `:run` automatically; the factory must check for it.
2. **From outside, server-side** - `cancel-factory-run!` asks the CLI to cancel a run. The runtime then sends a reverse `factory.abort` request, which closes the run's `:cancel-chan` and eventually delivers a `:cancelled` terminal status.
2. **From outside, server-side** - `cancel-factory-run!` asks the CLI to cancel a run. The runtime then sends a reverse `factory.abort` request for the active execution token, which closes only that attempt's `:cancel-chan` and eventually delivers a `:cancelled` terminal status. An older attempt cannot cancel a replacement that shares the durable run ID.
3. **Aborting a local wait, not the run** — `wait-for-factory-run!` accepts an optional `:cancel-chan`; closing it makes the *wait* throw `ex-info` with `{:type :factory-wait-cancelled}` without cancelling the run itself. Use this to stop blocking on a run you still want to keep executing.

## Limits
Expand Down
Loading