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.0.55-1
27 changes: 23 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ 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)
- **`:on-post-tool-use-failure` hook** — New lifecycle hook in the
`:hooks` map. Fires after a tool execution whose result was `"failure"`;
`:on-post-tool-use` only fires for successful results, so register this
handler to observe or react to failed tool outcomes. Note: `"rejected"`,
`"denied"`, and `"timeout"` results do not currently trigger this hook —
only `"failure"` does. Handler input has `:tool-name`, `:tool-args`,
`:error` (string), plus the base hook fields (`:session-id`,
`:timestamp`, `:cwd`). Optional return value:
`{:additional-context "..."}` is appended as hidden guidance to the
model alongside the failed tool result. (upstream PR #1421)
- **`: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`.
Expand Down Expand Up @@ -32,10 +42,19 @@ All notable changes to this project will be documented in this file. This change
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.
`1.0.55-1`. Picked up the 1.0.52-4 pre-release (upstream PR #1393), the
1.0.52 stable release (upstream PR #1405), the 1.0.53-2 pre-release
(upstream PR #1408), and the 1.0.53 / 1.0.54 / 1.0.55-0 / 1.0.55-1
schema bumps (upstream PRs #1410, #1411, #1412, #1432). Schema regen
surfaces new wire-only canvas event types (`session.canvas.opened`,
`session.canvas.registry_changed`) and their field set in the
generated `event-specs` namespace. The canvas runtime (extension
manifests, `requestCanvasRenderer`, `openCanvases`, etc. — upstream
PRs #1401, #1413) is **not yet exposed** on the public Clojure API,
including the curated `event-types` set. Canvas runtime support
(including opaque-field preservation for `data.input` and nested
`inputSchema` payloads on canvas events) will land in a dedicated
future sync round.

### Changed (post-v1.0.0-beta.4 sync, round 5)
- **BREAKING: Minimum supported protocol version raised from 2 to 3.** The
Expand Down
23 changes: 21 additions & 2 deletions doc/reference/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -2258,11 +2258,30 @@ Lifecycle hooks allow custom logic at various points during the session:

:on-post-tool-use
(fn [input invocation]
;; Called after each tool execution
;; input contains {:tool-name "..." :result {...}}
;; Called after each *successful* tool execution
;; input contains {:tool-name "..." :tool-args {...} :tool-result {...}}
;; For failed tool calls, register :on-post-tool-use-failure below.
(println "Tool completed:" (:tool-name input))
nil)

:on-post-tool-use-failure
(fn [input invocation]
;; Called after a tool execution whose result was `"failure"`
;; (upstream PR #1421). :on-post-tool-use only fires for
;; successful results, so register this handler to observe
;; failed tool outcomes. Note: `"rejected"`, `"denied"`, and
;; `"timeout"` results do NOT currently trigger this hook —
;; only `"failure"` does.
;; input contains {:tool-name "..." :tool-args {...}
;; :error "failure message string"
;; :session-id "..." :timestamp 12345}
;; Optional return: {:additional-context "..."} is appended as
;; hidden guidance to the model alongside the failed result.
;; Other fields (e.g. :modified-result, :suppress-output) are
;; not honored for failure hooks.
(println "Tool failed:" (:tool-name input) (:error input))
{:additional-context "Tip: try `ls` first to see available files."})

:on-pre-mcp-tool-call
(fn [input invocation]
;; Called before each MCP tool call is dispatched (upstream PR #1366).
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`
Currently pinned version: `1.0.55-1`
Loading
Loading