Skip to content

Commit 2aeb70d

Browse files
krukowCopilot
andcommitted
Add session.handoff :host field spec and docs (from PR #65)
Port upstream PR #900 change: session.handoff event data now includes optional :host and :remote-session-id fields. Adds ::session.handoff-data and ::remote-session-id specs. Updates API.md event table with data shape documentation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 2a78459 commit 2aeb70d

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file. This change
88
- **UI Elicitation convenience API** — new public functions `confirm!`, `select!`, `input!` wrap the existing `ui-elicitation!` with typed schemas. `capabilities` accessor returns host capabilities from session create/resume response. `elicitation-supported?` predicate checks if the host supports elicitation dialogs. All convenience methods throw with a clear error when elicitation is unsupported (upstream PR #906).
99
- **`COPILOT_CLI_PATH` env var fallback** — client constructor now checks `COPILOT_CLI_PATH` environment variable before defaulting to `"copilot"` when no explicit `:cli-path` or `:cli-url` is provided (upstream PR #906).
1010
- **New event type** `session.custom_agents_updated` added to event type enum.
11+
- **`:host` field on `session.handoff` events** — event data now includes optional `:host` field with the GitHub host URL. New `::session.handoff-data` spec documents the shape (upstream PR #900).
1112
- New specs: `::command-definition`, `::commands`, `::session-capabilities`, `::elicitation-params`, `::elicitation-result`, `::input-options`.
1213
- Function specs and instrumentation for `capabilities`, `elicitation-supported?`, `confirm!`, `select!`, `input!`.
1314
- Integration tests for command wire format, command.execute routing, unknown command errors, handler errors, capabilities storage, and elicitation guards.

doc/reference/API.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,7 @@ Convert an unqualified event keyword to a namespace-qualified `:copilot/` keywor
10931093
| `:copilot/session.idle` | Session finished processing |
10941094
| `:copilot/session.info` | Informational session update |
10951095
| `:copilot/session.model_change` | Session model changed |
1096-
| `:copilot/session.handoff` | Session handed off to another agent |
1096+
| `:copilot/session.handoff` | Session handed off to another agent; data: `{:remote-session-id "..." :host "https://github.com"}` (both optional) |
10971097
| `:copilot/session.usage_info` | Token usage information |
10981098
| `:copilot/session.context_changed` | Session context (cwd, repo, branch) changed |
10991099
| `:copilot/session.title_changed` | Session title updated |

src/github/copilot_sdk/specs.clj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,11 @@
580580

581581
(s/def ::session.idle-data map?)
582582

583+
(s/def ::remote-session-id string?)
584+
585+
(s/def ::session.handoff-data
586+
(s/keys :opt-un [::remote-session-id ::host]))
587+
583588
(s/def ::agent-mode #{:interactive :plan :autopilot :shell})
584589
(s/def ::interaction-id string?)
585590

0 commit comments

Comments
 (0)