Skip to content

[upstream-sync] Port upstream: match release v0.1.28#34

Merged
krukow merged 3 commits into
mainfrom
upstream-sync/2026-02-27-94f6be4d64868188
Feb 27, 2026
Merged

[upstream-sync] Port upstream: match release v0.1.28#34
krukow merged 3 commits into
mainfrom
upstream-sync/2026-02-27-94f6be4d64868188

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

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 with totalResponseSizeBytes. Previously, totalResponseSizeBytes was an optional field on assistant.message_delta; it has been moved to this dedicated event.
  • session.task_complete — was added to the ::event-type spec in a previous sync but was incorrectly missing from the public event-types var. 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

  • Added ::session.mode_changed, ::session.plan_changed, ::session.workspace_file_changed, ::assistant.streaming_delta to ::event-type spec
  • Added data specs: ::session.mode_changed-data, ::session.plan_changed-data, ::session.workspace_file_changed-data, ::session.task_complete-data, ::assistant.streaming_delta-data
  • Added ::total-response-size-bytes spec (nat-int?)
  • Removed ::total-response-size-bytes from ::assistant.message_delta-data :opt-un (moved to assistant.streaming_delta)

src/github/copilot_sdk.clj

  • Added 5 new event types to event-types var
  • Added session events to session-events var
  • Added assistant.streaming_delta to assistant-events var

doc/reference/API.md

  • Updated event reference table with all new event types and their data shapes

CHANGELOG.md

  • Updated [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:

PR Reason
#601 Python wheel build — Python-specific
#600 Docs validation tooling — docs/CI only
#597, #529 OpenTelemetry guide — documentation only
#596 Python is not None fix — Python-specific
#595, #594, #593 Dependabot dependency bumps — CI/tooling
#586 Go client data races — Go-specific
#566 Go docs fix — Go/documentation
#561 Python minimum version bump — Python-specific
#466 More e2e nodejs tests — test-only (51 files, all in nodejs/test/ and test/snapshots/)

Testing

  • Clojure syntax validation: both modified source files parse cleanly (bb --config /dev/null)
  • Documentation validation: bb validate-docs passes (9 files, 0 warnings)
  • Note: full test suite (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-bytes from ::assistant.message_delta-data — matching the upstream removal in PR #544. The field is now carried by the new assistant.streaming_delta event instead.

Generated by Upstream Sync Agent

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

…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>
@krukow krukow marked this pull request as ready for review February 27, 2026 15:44
Copilot AI review requested due to automatic review settings February 27, 2026 15:44
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

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, and session.task_complete
  • Moved total-response-size-bytes field from assistant.message_delta-data to new assistant.streaming_delta-data spec
  • 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>
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

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 ::path and shared ::operation keys; 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]))

Comment thread doc/reference/API.md Outdated
Comment thread src/github/copilot_sdk/specs.clj Outdated
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>
@krukow krukow changed the title [upstream-sync] Port upstream PR #544: new event types (streaming_delta, mode_changed, plan_changed, workspace_file_changed) [upstream-sync] Port upstream: match release v0.1.28 Feb 27, 2026
@krukow krukow merged commit a96b59e into main Feb 27, 2026
1 check passed
@krukow krukow deleted the upstream-sync/2026-02-27-94f6be4d64868188 branch February 27, 2026 16:38
@github-actions github-actions Bot mentioned this pull request Feb 27, 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