[upstream-sync] Port upstream CLI 0.0.420 protocol changes (copilot-sdk PR #605)#37
Merged
Merged
Conversation
- 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>
Contributor
There was a problem hiding this comment.
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.deselectedto the publicevent-typesand::event-typespec. - Added a new
:github-referenceattachment 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]. |
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ports protocol-level changes from upstream
github/copilot-sdkPR #605 (CLI version bump to 0.0.420) into idiomatic Clojure spec updates.Upstream Changes Ported
From upstream PR #605 (Update
@github/copilotto 0.0.420), the generated protocol types changed innodejs/src/generated/session-events.ts:New event type
:copilot/subagent.deselected— new event emitted when a subagent is deselected. Added toevent-typesvar incopilot_sdk.cljand::event-typespec inspecs.clj.New attachment type
:github-reference— new variant in theuser.request_submittedevent's attachments array, representing a GitHub issue, PR, or discussion. Added::github-reference-attachmentspec 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-datamodel— 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-dataNew spec
::assistant.turn_start-data— previously undocumented, now has a formal spec withturn-id(required) andinteraction-id(optional)Changes Skipped (not relevant to Clojure port)
stop()now raisesExceptionGroupinstead of returning a list. Python idiom, not applicable.boolean?(already optional).Testing
bb --config /dev/null script/validate_docs.clj)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/updatessrc/github/copilot_sdk.clj— New event type inevent-typesdoc/reference/API.md— Event reference table updatedCHANGELOG.md—[Unreleased]section updated