Skip to content

[upstream-sync] Port upstream CLI 0.0.420 protocol changes (copilot-sdk PR #605)#37

Merged
krukow merged 2 commits into
mainfrom
upstream-sync/2026-03-02-bbca1053a6e0e066
Mar 3, 2026
Merged

[upstream-sync] Port upstream CLI 0.0.420 protocol changes (copilot-sdk PR #605)#37
krukow merged 2 commits into
mainfrom
upstream-sync/2026-03-02-bbca1053a6e0e066

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Mar 2, 2026

Summary

Ports protocol-level changes from upstream github/copilot-sdk PR #605 (CLI version bump to 0.0.420) into idiomatic Clojure spec updates.

Upstream Changes Ported

From upstream PR #605 (Update @github/copilot to 0.0.420), the generated protocol types changed in nodejs/src/generated/session-events.ts:

New event type

  • :copilot/subagent.deselected — new event emitted when a subagent is deselected. Added to event-types var in copilot_sdk.clj and ::event-type spec in specs.clj.

New attachment type

  • :github-reference — new variant in the user.request_submitted event's attachments array, representing a GitHub issue, PR, or discussion. Added ::github-reference-attachment spec with fields: number, title, reference-type ("issue"/"pr"/"discussion"), state, url.

New optional fields on event data specs

  • interaction-id — optional string field added to: ::user.message-data, ::assistant.turn_start-data, ::assistant.message_delta-data, ::tool.execution_complete-data
  • model — optional string field added to ::tool.execution_complete-data (model used for the execution)
  • plugin-name / plugin-version — optional string fields added to ::skill.invoked-data

New spec

  • ::assistant.turn_start-data — previously undocumented, now has a formal spec with turn-id (required) and interaction-id (optional)

Changes Skipped (not relevant to Clojure port)

  • PR #603 — Python-specific change: stop() now raises ExceptionGroup instead of returning a list. Python idiom, not applicable.
  • PR #601, #596, #592, #561 — Python-specific fixes/improvements. Skip.
  • PR #604, #582, #595, #594, #593, #579 — CI/CD and dependency bumps. Skip.
  • PR #600, #597, #566, #556, #529 — Documentation-only changes for other SDKs. Skip.
  • PR #586 — Go client data race fixes. Skip.
  • PR #541, #533, #543 — .NET/Go specific. Skip.
  • vision/reasoningEffort optionality (rpc.ts) — Already handled: Clojure specs define these as boolean? (already optional).

Testing

  • ✅ Documentation validation passed (bb --config /dev/null script/validate_docs.clj)
  • ⚠️ Full test suite not runnable in this environment (network blocked, Maven Central unreachable)

Changes are purely additive spec updates (new optional fields, new event type, new attachment variant) with no behavioral logic changes. All existing functionality is preserved.

Files Changed

  • src/github/copilot_sdk/specs.clj — Spec additions/updates
  • src/github/copilot_sdk.clj — New event type in event-types
  • doc/reference/API.md — Event reference table updated
  • CHANGELOG.md[Unreleased] section updated

Generated by Upstream Sync Agent

  • expires on Mar 9, 2026, 2:08 PM UTC

- Add :copilot/subagent.deselected event type to event-types and ::event-type spec
- Add :github-reference attachment type to ::attachment-type and ::attachment specs
- Add ::github-reference-attachment spec for GitHub issue/PR/discussion attachments
- Add :interaction-id optional field to user.message, assistant.turn_start,
  assistant.message_delta, and tool.execution_complete event data specs
- Add ::assistant.turn_start-data spec with turn-id (req) and interaction-id (opt)
- Add :model optional field to ::tool.execution_complete-data spec
- Add :plugin-name and :plugin-version optional fields to ::skill.invoked-data spec
- Update API.md event reference table with subagent.deselected
- Update CHANGELOG.md under [Unreleased]

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@krukow krukow marked this pull request as ready for review March 3, 2026 11:25
Copilot AI review requested due to automatic review settings March 3, 2026 11:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Ports upstream Copilot CLI 0.0.420 protocol schema updates into the Clojure SDK by extending clojure.spec coverage and updating the public event reference.

Changes:

  • Added :copilot/subagent.deselected to the public event-types and ::event-type spec.
  • Added a new :github-reference attachment variant and expanded several event data specs with new optional fields (e.g., :interaction-id, :model, plugin metadata).
  • Updated the API reference event table and the [Unreleased] changelog notes.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/github/copilot_sdk/specs.clj Extends protocol/message/event specs with new attachment type, new event type, and new optional fields.
src/github/copilot_sdk.clj Adds the new event type to the exported event-types constant.
doc/reference/API.md Documents the new :copilot/subagent.deselected event in the event reference table.
CHANGELOG.md Records the upstream-sync additions under [Unreleased].

Comment thread src/github/copilot_sdk/specs.clj
- Add (s/def ::model string?) for tool.execution_complete-data
- Add :github-reference case to attachment->wire with correct wire format
- Add ::attachment-state spec and collision comment for clarity
- Add :github-reference row to API.md attachment types table

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@krukow krukow merged commit f57db27 into main Mar 3, 2026
1 check passed
@krukow krukow deleted the upstream-sync/2026-03-02-bbca1053a6e0e066 branch March 3, 2026 12:18
@github-actions github-actions Bot mentioned this pull request Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants