[upstream-sync] Port upstream: match release v0.1.28#34
Merged
Conversation
…d, workspace_file_changed events - Add :copilot/assistant.streaming_delta event type with totalResponseSizeBytes data - Remove total-response-size-bytes from ::assistant.message_delta-data spec (moved to streaming_delta) - Add :copilot/session.mode_changed event type with previousMode/newMode data - Add :copilot/session.plan_changed event type with operation data - Add :copilot/session.workspace_file_changed event type with path/operation data - Fix :copilot/session.task_complete missing from event-types var (was in spec but not exported) - Add all new events to session-events / assistant-events sub-category vars - Update API.md event reference table with new event types and data shapes - 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
This PR ports new event types from upstream copilot-sdk PR #544, adding support for streaming delta events and several session-related event types (mode changes, plan changes, workspace file changes, and task completion). The changes are purely additive except for moving total-response-size-bytes from assistant.message_delta to a new dedicated assistant.streaming_delta event, matching the upstream refactoring.
Changes:
- Added 5 new event types:
assistant.streaming_delta,session.mode_changed,session.plan_changed,session.workspace_file_changed, andsession.task_complete - Moved
total-response-size-bytesfield fromassistant.message_delta-datato newassistant.streaming_delta-dataspec - Updated documentation and changelog to reflect all additions
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/github/copilot_sdk/specs.clj |
Added 5 new event types to ::event-type spec, created 5 new data specs for these events, and moved ::total-response-size-bytes from ::assistant.message_delta-data to ::assistant.streaming_delta-data |
src/github/copilot_sdk.clj |
Added 5 new event types to event-types var, 4 session events to session-events var, and assistant.streaming_delta to assistant-events var |
doc/reference/API.md |
Added documentation for all 5 new event types with their data shapes in the event reference table |
CHANGELOG.md |
Documented all additions and changes under the [Unreleased] section with proper upstream PR #544 attribution |
…pecs The specs used invented prefixed field names (plan-operation, workspace-file-path, workspace-file-operation) that don't match the upstream wire format. After the protocol layer's camelCase→kebab-case conversion, upstream sends :operation and :path — not the prefixed variants. Updated specs, docs, and changelog to match. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
src/github/copilot_sdk/specs.clj:459
- This spec reuses the generic
::pathand shared::operationkeys; if you split the operation spec as suggested above, also update this to use the workspace-file-specific operation spec so the workspace event can’t validate impossible operations (e.g., "delete").
;; ::path already defined above; ::operation reused (superset covers both events)
(s/def ::session.workspace_file_changed-data
(s/keys :req-un [::path ::operation]))
Address PR review feedback: - Constrain workspace_file_changed operation to only accept "create"|"update" (not "delete") using s/and, while keeping the correct :operation wire key name - Remove backslash-escaped pipes in API.md table backtick content (GFM renders them literally) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Closed
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 missing event type changes from upstream copilot-sdk PR #544 ("Add SDK support for agent selection and session compaction APIs").
Upstream Changes Ported
New event types from PR #544 (
nodejs/src/generated/session-events.ts):assistant.streaming_delta— new ephemeral event emitted during streaming withtotalResponseSizeBytes. Previously,totalResponseSizeByteswas an optional field onassistant.message_delta; it has been moved to this dedicated event.session.task_complete— was added to the::event-typespec in a previous sync but was incorrectly missing from the publicevent-typesvar. Fixed.Additional missing event types identified during review (present in current upstream but not yet ported):
session.mode_changed— emitted when the session agent mode changes; data:{:previous-mode "...", :new-mode "..."}session.plan_changed— emitted when the session plan changes; data:{:plan-operation "create"|"update"|"delete"}session.workspace_file_changed— emitted when a workspace file is created/updated; data:{:workspace-file-path "...", :workspace-file-operation "create"|"update"}Changes
src/github/copilot_sdk/specs.clj::session.mode_changed,::session.plan_changed,::session.workspace_file_changed,::assistant.streaming_deltato::event-typespec::session.mode_changed-data,::session.plan_changed-data,::session.workspace_file_changed-data,::session.task_complete-data,::assistant.streaming_delta-data::total-response-size-bytesspec (nat-int?)::total-response-size-bytesfrom::assistant.message_delta-data:opt-un(moved toassistant.streaming_delta)src/github/copilot_sdk.cljevent-typesvarsession-eventsvarassistant.streaming_deltatoassistant-eventsvardoc/reference/API.mdCHANGELOG.md[Unreleased]section under### Added/Changed (upstream PR #544 sync)Skipped Upstream Changes
All other PRs merged since the last sync (2026-02-26) were skipped:
is not Nonefix — Python-specificnodejs/test/andtest/snapshots/)Testing
bb --config /dev/null)bb validate-docspasses (9 files, 0 warnings)bb test) could not run in sandboxed environment (no network for Maven deps). CI will run the full suite on PR.API Parity
These are purely additive event type additions. No existing behavior is changed except removing
total-response-size-bytesfrom::assistant.message_delta-data— matching the upstream removal in PR #544. The field is now carried by the newassistant.streaming_deltaevent instead.