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

## [Unreleased]

### Added (post-v1.0.0-beta.4 sync, round 5)
- **`:runtime-instructions` system message section** — New section recognized
by the SDK's `:system-message` `:customize` mode. Wire-encoded as
`"runtime_instructions"` and accepted by `::specs/system-prompt-section`.
Upstream PR #1377 also renamed `SystemPromptSection` → `SystemMessageSection`
in TypeScript; for source compatibility the Clojure side keeps
`specs/system-prompt-sections` as the canonical name and exposes
`specs/system-message-sections` (and `::specs/system-message-section`) as
aliases pointing at the same data. (upstream PR #1377)
- **`:copilot/mcp_app.tool_call_complete` event** — New session event emitted
when a tool call from an MCP App completes (upstream schema 1.0.52-4,
SEP-1865). Added to the public `event-types` set. The `:arguments` and
`:result` fields are preserved opaquely by `protocol/preserve-event-opaque-fields`
(they survive `normalize-incoming` without kebab-case rewriting so
source-defined keys round-trip verbatim).
- **Additional event-data fields (passive, via schema regen)** — All optional;
generated `:opt-un` specs pick them up automatically:
- `:service-request-id` on `:error`, `:assistant.message`, `:assistant.usage`,
`:model.call_failure`, `:session.compaction_complete` event data
(Copilot CAPI service-request-id for correlation with CAPI logs).
- `:context-tier` (`"long_context" | "default" | nil`) on
`:session.model_change` data.
- `:transport`, `:plugin-name`, `:plugin-version` on the loaded MCP server
spec inside `:session.mcp_servers_loaded` data.
- `:error` on `:session.mcp_server_status_changed` data.
- `:source` and `:trigger` (`"user-invoked" | "agent-invoked" | "context-load"`)
on `:skill.invoked` data.
- `:tool-description` and `:ui-resource` on `:tool.execution_complete` data.
- **Schema bump** — `.copilot-schema-version` advanced from `1.0.52-1` to
`1.0.52` (stable). Picked up the 1.0.52-4 pre-release (upstream PR #1393)
and then advanced to the 1.0.52 stable release (upstream PR #1405); the
shipped JSON Schemas are byte-identical between 1.0.52-4 and 1.0.52, so
no additional schema-driven changes were required.

### Changed (post-v1.0.0-beta.4 sync, round 5)
- **BREAKING: Minimum supported protocol version raised from 2 to 3.** The
SDK will now reject CLI servers that report protocol version 2. The
back-compat shims that adapted v2 `tool.call` / `permission.request`
JSON-RPC requests into v3 broadcast-event flows have been removed from
`set-request-handler!` and from `protocol/normalize-incoming`. Clients
must use a Copilot CLI that supports protocol v3 (CLI 1.0.46 or later).
(upstream PR #1378)

### Removed (post-v1.0.0-beta.4 sync, round 5)
- **v2 protocol RPC dispatcher cases** — `tool.call` and `permission.request`
request handlers (and their associated tests
`test-tool-call-response-shape`, `test-tool-handler-runs-on-blocking-thread`,
`test-permission-denied-with-deny-handler`,
`test-permission-approved-with-handler`,
`test-permission-unknown-session-response-shape`,
`test-permission-custom-handler`, `test-permission-no-result-v2`). v3
broadcast handlers `handle-v3-tool-requested!` / `handle-v3-permission-requested!`
cover the same behaviour. (upstream PR #1378)

### Added (post-v1.0.0-beta.4 sync, round 4)
- **`:on-pre-mcp-tool-call` hook** — New lifecycle hook in the `:hooks` map
that fires before an MCP tool call is dispatched to its server (upstream
Expand Down
17 changes: 15 additions & 2 deletions doc/reference/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -1435,6 +1435,7 @@ Convert an unqualified event keyword to a namespace-qualified `:copilot/` keywor
| `:copilot/sampling.completed` | MCP sampling request completed; ephemeral |
| `:copilot/session.remote_steerable_changed` | Session remote steering capability changed; data: `{:remote-steerable true/false}` |
| `:copilot/capabilities.changed` | Session capabilities dynamically changed (e.g., elicitation support); ephemeral. Data: `{:ui {:elicitation true/false}}` |
| `:copilot/mcp_app.tool_call_complete` | An MCP App tool call completed (upstream schema 1.0.52-4, SEP-1865); ephemeral. Data: `{:server-name ... :tool-name ... :duration-ms ... :success bool :arguments {...} :result {...}}` — `:arguments` and `:result` are opaque source-defined maps whose keys are preserved verbatim (not kebab-cased). |

### Example: Handling Events

Expand Down Expand Up @@ -1705,7 +1706,7 @@ For full control (removes all guardrails), use `:mode :replace`:

#### Customize Mode

The `:customize` mode enables section-level overrides of the system prompt. Ten sections are configurable:
The `:customize` mode enables section-level overrides of the system prompt. Eleven sections are configurable:

| Section | Description |
|---------|-------------|
Expand All @@ -1718,6 +1719,7 @@ The `:customize` mode enables section-level overrides of the system prompt. Ten
| `:safety` | Environment limitations, prohibited actions, security |
| `:tool-instructions` | Per-tool usage instructions |
| `:custom-instructions` | Repository and organization custom instructions |
| `:runtime-instructions` | Runtime-provided context (system notifications, memories, mode-specific instructions, content-exclusion policy) — added in upstream PR #1377 |
| `:last-instructions` | End-of-prompt instructions |

Each section supports static actions (`:replace`, `:remove`, `:append`, `:prepend`) and transform callbacks (1-arity functions).
Expand Down Expand Up @@ -1756,9 +1758,20 @@ Inspect available sections with the `system-prompt-sections` constant:
```clojure
copilot/system-prompt-sections
;; => {:identity {:description "Agent identity preamble and mode statement"}
;; :tone {:description "Response style, conciseness rules, ..."} ...}
;; :tone {:description "Response style, conciseness rules, ..."}
;; :runtime-instructions {:description "Runtime instructions injected ..."} ...}
```

Available section keys: `:identity`, `:tone`, `:tool-efficiency`,
`:environment-context`, `:code-change-rules`, `:guidelines`, `:safety`,
`:tool-instructions`, `:custom-instructions`, `:runtime-instructions`
(added in upstream PR #1377), `:last-instructions`.

> **Naming note** — Upstream renamed `SystemPromptSection` →
> `SystemMessageSection` in the TypeScript SDK. The Clojure SDK keeps
> `system-prompt-sections` as the canonical name (for back-compat) and
> exposes `system-message-sections` as an alias.

Unknown section keywords are allowed — they gracefully fall back to appending content to additional instructions.

### Default Agent Tool Exclusions
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.52-1`
Currently pinned version: `1.0.52`
Loading
Loading