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.55-1
1.0.56-1
101 changes: 101 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,107 @@ All notable changes to this project will be documented in this file. This change

## [Unreleased]

### Added (post-v1.0.0-beta.4 sync, round 6)
- **`:agent-mode` and `:display-prompt` send options** — `session/send!`
(and async/streaming variants) now accept:
- `:agent-mode` — keyword in `#{:interactive :plan :autopilot :shell}`,
wire-encoded as `agentMode`. Lets the model run with different agent
behaviours per message. (upstream PR #1438)
- `:display-prompt` — string shown in the timeline UI instead of the
model-facing `:prompt`. Useful when the model prompt contains
machinery or context that should not be surfaced to the end user.
Wire-encoded as `displayPrompt`. (upstream PR #1470)
- **`:mcp-oauth-token-storage` config option** — Controls where MCP OAuth
tokens are persisted. Enum `#{:persistent :in-memory}`, defaulting to
the server's default (persistent disk-backed). Set to `:in-memory` in
multi-tenant hosts that must not leak tokens to disk. Wire-encoded as
`mcpOAuthTokenStorage` (the wire key is set directly to bypass the
default kebab-camel converter which would mangle `OAuth`). Accepted on
both create and resume. (upstream PR #1326)
- **Multitenancy per-session granular flags** — All optional, accepted on
both `create-session` and `resume-session`:
- `:embedding-cache-storage` (`#{:persistent :in-memory}`, wire
`embeddingCacheStorage`)
- `:skip-embedding-retrieval` (boolean)
- `:organization-custom-instructions` (string)
- `:enable-on-demand-instruction-discovery` (boolean)
- `:enable-file-hooks` (boolean)
- `:enable-host-git-operations` (boolean)
- `:enable-session-store` (boolean)
- `:enable-skills` (boolean)

Lets multi-tenant hosts opt individual sessions out of disk-backed
caches, host git, hooks, sessions store, and skills discovery without
switching to a separate client. (upstream PR #1474)
- **`:plugin-directories` config option** — `[string]` of extra plugin
directories. Wire-encoded as `pluginDirectories`. Loaded even when
`:enable-config-discovery` is `false`, so multi-tenant hosts can
inject a curated plugin set without enabling general discovery.
Accepted on both create and resume. (upstream PR #1482)
- **Cloud sessions can defer `sessionId` to the server** — When
`:cloud` is set and `:session-id` is omitted from `create-session` /
`<create-session`, the SDK now omits `sessionId` from the
`session.create` request and captures the server-assigned id from the
response. A new inline-response callback (registered with
`protocol/send-request`'s `{:on-response-inline}` option) runs
synchronously in the JSON-RPC reader thread before the next inbound
message is processed, so any session-scoped notification arriving
immediately after the response is correctly routed to the
newly-registered session. Callers may still supply `:session-id`
explicitly; if both caller and server provide an id, they must agree.
(upstream PR #1479)
- **Config parity additions** — Existed in upstream `SessionConfigBase`
prior to this window; added to close pre-existing parity gaps. All
optional, accepted on both create and resume:
- `:reasoning-summary` (`#{"none" "concise" "detailed"}`, wire
`reasoningSummary`) — controls inclusion/granularity of reasoning
summaries in assistant turns. String-valued for consistency with
the existing `:reasoning-effort` option.
- `:context-tier` (`#{:default :long-context}`, wire `contextTier` as
`"default"` / `"long_context"`) — selects long-context model variants.
- `:large-output` on `resume-session` — already accepted on create;
now also forwarded on resume (wire `largeOutput`).
- **`:config-directory` and `:output-directory` option aliases** —
Non-breaking aliases for `:config-dir` and `:output-dir`
(`:output-directory` is inside the `:large-output` map). Wire keys
stay `configDir` / `outputDir`. When both old and new keys are
supplied, the new key wins. (upstream PR #1482 source-side rename)
- **New event types** — Added to the public `event-types` set and
picked up automatically by the generated wire spec:
- `:copilot/hook.progress` — ephemeral progress updates from
long-running hooks. Curated `::hook.progress-data` spec exposes
`:message` (non-blank string); `:session-id` / `:timestamp` live on
the envelope.
- `:copilot/session.autopilot_objective_changed` — autopilot
objective lifecycle events. Generated wire spec carries
`:operation` (required, one of `"create"` / `"update"` /
`"delete"`), with optional `:id` (integer) and `:status`. The
`:status` enum is widened to include `"active"`, `"paused"`,
`"cap_reached"`, `"completed"`.
- `:copilot/session.permissions_changed` — emitted when per-session
permission flags change. Curated `::session.permissions_changed-data`
spec requires `:allow-all-permissions` and
`:previous-allow-all-permissions` (both booleans).
- **Schema bump** — `.copilot-schema-version` advanced from `1.0.55-1`
to `1.0.56-1`, covering upstream tags `v1.0.0-beta.9` and
`v1.0.0-beta.10`. Schema regen picks up several new optional event
fields (`working-directory` on `external_tool.requested-data`,
`context-tier` on `session.resume-data`, autopilot status values) and
the three new event types above.

### Deferred (round 6)
- **Multitenancy Client Mode (upstream PR #1428)** — Substantial new
public API surface (`mode = "empty" | "copilot-cli"`, `ToolSet`,
`toolFilterPrecedence`, ambient flags via `session.options.update`).
Tracked for a dedicated future sync round with its own plan.
- **Removal of the legacy `:config-dir` / `:output-dir` option keys
(upstream PR #1482 follow-up)** — The new `:config-directory` /
`:output-directory` aliases ship in this release (see Added). The
breaking removal of the older spellings is tracked alongside the
other rename PRs (#1357 etc.) for a coordinated rename release.
- **Canvas runtime, MCP Apps `enableMcpApps`** — Continue to defer as
experimental coupled surfaces.

### Added (post-v1.0.0-beta.4 sync, round 5)
- **`:on-post-tool-use-failure` hook** — New lifecycle hook in the
`:hooks` map. Fires after a tool execution whose result was `"failure"`;
Expand Down
20 changes: 19 additions & 1 deletion doc/reference/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,19 @@ Create a client and session together, ensuring both are cleaned up on exit.
| `:model-capabilities` | map | Model capabilities override. DeepPartial of model capabilities, e.g. `{:model-supports {:supports-vision true}}`. (upstream PR #1029) |
| `:include-sub-agent-streaming-events?` | boolean | Forward streaming events from sub-agents to the parent session's event stream. Defaults to `true` on the wire. (upstream PR #1108) |
| `:remote-session` | keyword | Per-session Mission Control mode: `:off`, `:export`, or `:on`. When omitted, the CLI applies its default. `:off` disables remote, `:export` exports session events to Mission Control without enabling remote steering, `:on` enables both. Forwarded as `remoteSession`. (upstream PR #1295, CLI 1.0.48) |
| `:cloud` | map | (create-session only) Creates a remote cloud session. Shape: `{:repository {:owner "octocat" :name "hello-world" :branch "main"}}` — `:owner` and `:name` are required non-blank strings; `:branch` is optional. Forwarded as `cloud.repository.*` on `session.create`. Not accepted on `resume-session` (matches upstream `ResumeSessionConfig`). (upstream PR #1306) |
| `:cloud` | map | (create-session only) Creates a remote cloud session. Shape: `{:repository {:owner "octocat" :name "hello-world" :branch "main"}}` — `:owner` and `:name` are required non-blank strings; `:branch` is optional. Forwarded as `cloud.repository.*` on `session.create`. Not accepted on `resume-session` (matches upstream `ResumeSessionConfig`). When `:cloud` is set and `:session-id` is omitted, the SDK defers id assignment to the server and registers the session under the server-returned id (upstream PR #1479). (upstream PR #1306) |
| `:mcp-oauth-token-storage` | keyword | Controls where MCP OAuth tokens are persisted. `#{:persistent :in-memory}`. Default is server-side (persistent). Set to `:in-memory` in multi-tenant hosts that must not leak tokens to disk. Wire-encoded as `mcpOAuthTokenStorage`. (upstream PR #1326) |
| `:embedding-cache-storage` | keyword | `#{:persistent :in-memory}`. Controls where the embedding cache lives. Wire-encoded as `embeddingCacheStorage`. (upstream PR #1474) |
| `:skip-embedding-retrieval` | boolean | Skip embedding-based context retrieval. (upstream PR #1474) |
| `:organization-custom-instructions` | string | Organization-wide instructions injected by the host. (upstream PR #1474) |
| `:enable-on-demand-instruction-discovery` | boolean | Auto-discover instruction files on demand. (upstream PR #1474) |
| `:enable-file-hooks` | boolean | Enable file-watcher-style lifecycle hooks. (upstream PR #1474) |
| `:enable-host-git-operations` | boolean | Allow the CLI to run git operations through the host. (upstream PR #1474) |
| `:enable-session-store` | boolean | Enable the disk-backed session store. (upstream PR #1474) |
| `:enable-skills` | boolean | Enable skills discovery and loading. (upstream PR #1474) |
| `:plugin-directories` | vector | Extra plugin directories loaded even when `:enable-config-discovery` is `false`. Wire-encoded as `pluginDirectories`. (upstream PR #1482) |
| `:reasoning-summary` | string | `"none"` / `"concise"` / `"detailed"`. Controls inclusion/granularity of reasoning summaries on assistant turns. Wire-encoded as `reasoningSummary`. String-valued for consistency with `:reasoning-effort`. |
| `:context-tier` | keyword \| `nil` | `#{:default :long-context}` selects the long-context model variant; `nil` explicitly clears any prior tier (wire-encoded as JSON `null`). Omit the key entirely to leave the current setting untouched. Wire-encoded as `contextTier` with values `"default"` / `"long_context"`. |

#### `resume-session`

Expand All @@ -280,6 +292,7 @@ Resume an existing session by ID. The `config` map accepts the same options as `
|---|---|---|
| `:disable-resume?` | boolean | When true, skip emitting the session.resume event (default: false) |
| `:continue-pending-work?` | boolean | When true, the runtime re-emits any pending `permission.requested` and external tool calls so handlers can re-respond on resume; default false treats pending work as interrupted. Forwarded as `continuePendingWork` on `session.resume`. |
| `:large-output` | map | (Experimental) Tool output handling config. Now also forwarded on `session.resume` (matching upstream `client.ts:1308`). |

When `:on-permission-request` is set to `default-join-session-permission-handler`, the SDK sends `requestPermission: false` on the wire, telling the CLI that this client does not handle permission requests. Any other handler sends `requestPermission: true`.

Expand Down Expand Up @@ -696,6 +709,8 @@ Send a message to the session. Returns immediately with the message ID.
| `:prompt` | string | The message/prompt to send |
| `:attachments` | vector | File attachments (see below) |
| `:mode` | keyword | `:enqueue` or `:immediate` |
| `:agent-mode` | keyword | `#{:interactive :plan :autopilot :shell}`. Per-message agent mode. Wire-encoded as `agentMode`. (upstream PR #1438) |
| `:display-prompt` | string | Alternate prompt shown in the timeline UI instead of `:prompt`. Useful when the model-facing prompt contains machinery or context that should not be surfaced to the end user. Wire-encoded as `displayPrompt`. (upstream PR #1470) |
| `:request-headers` | map | Extra HTTP headers (string→string) forwarded to the model provider for this request. Merged with provider-level `:headers`. (upstream PR #1094) |

**Attachment types:**
Expand Down Expand Up @@ -1380,6 +1395,8 @@ Convert an unqualified event keyword to a namespace-qualified `:copilot/` keywor
| `:copilot/session.task_complete` | Task completed by the session agent; data: `{:summary "..." :aborted? false}` (both optional) |
| `:copilot/session.schedule_created` | Scheduled prompt registered via `/every`; data: `{:id <pos-int> :interval-ms <pos-int> :prompt "..."}` (upstream schema 1.0.42) |
| `:copilot/session.schedule_cancelled` | Scheduled prompt cancelled from the schedule manager dialog; data: `{:id <pos-int>}` (upstream schema 1.0.42) |
| `:copilot/session.autopilot_objective_changed` | Autopilot objective lifecycle events; data: `{:operation #{"create" "update" "delete"}}` (required) with optional `:id` (integer) and `:status` (upstream schema 1.0.56). The `:status` enum is widened to include `"active"`, `"paused"`, `"cap_reached"`, `"completed"`. |
| `:copilot/session.permissions_changed` | Per-session permission flags changed; data: `{:allow-all-permissions boolean :previous-allow-all-permissions boolean}` (upstream schema 1.0.56). |
| `:copilot/skill.invoked` | Skill invocation triggered; data includes :name, :path, :content, optional :description, :plugin-name, :plugin-version |
| `:copilot/user.message` | User message added |
| `:copilot/pending_messages.modified` | Pending message queue updated |
Expand All @@ -1404,6 +1421,7 @@ Convert an unqualified event keyword to a namespace-qualified `:copilot/` keywor
| `:copilot/subagent.selected` | Subagent selected |
| `:copilot/subagent.deselected` | Subagent deselected |
| `:copilot/hook.start` | Hook invocation started |
| `:copilot/hook.progress` | Ephemeral progress update from a long-running hook; data: `{:message "..."}` (upstream schema 1.0.56). |
| `:copilot/hook.end` | Hook invocation finished |
| `:copilot/system.message` | System message emitted |
| `:copilot/system.notification` | System notification with structured `:kind` discriminator (e.g. `agent_completed`, `shell_completed`, `shell_detached_completed`) |
Expand Down
2 changes: 1 addition & 1 deletion schemas/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ These files are fetched verbatim from the `@github/copilot` npm package at the v

**Do not edit by hand.** To update, run `bb schemas:fetch` after bumping `.copilot-schema-version`.

Currently pinned version: `1.0.55-1`
Currently pinned version: `1.0.56-1`
Loading
Loading