Upstream sync: Copilot CLI 1.0.48#103
Merged
Merged
Conversation
Pinned upstream @github/copilot npm version advanced from 1.0.46 to the 1.0.48 GA release. Regenerated session-events.schema.json and api.schema.json from the upstream package, then regenerated wire specs in generated/event_specs.clj. This brings the schema in line with upstream PRs: - PR #1292 (CLI 1.0.48) — session.custom_notification event - PR #1295 (CLI 1.0.48) — remoteSession session config option - and the previously-pinned 1.0.48-1 prerelease changes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Three upstream features ported with idiomatic Clojure surface:
1. Per-session remote mode for remote-enable (PR #1288, CLI 1.0.48-1)
- session/remote-enable! now accepts a 2-arity overload with :mode
opts (:off / :export / :on). Existing 1-arity form preserved.
- New ::remote-session-mode and ::remote-enable-opts specs.
2. :remote-session session config option (PR #1295, CLI 1.0.48)
- create-session and resume-session accept :remote-session set to
:off, :export, or :on; forwarded on the wire as remoteSession.
Validated by ::remote-session (alias of ::remote-session-mode);
bogus values are rejected at session-create time.
3. :copilot/session.custom_notification event (PR #1292, CLI 1.0.48)
- Skills can emit application-level events via the Notify block.
Exposed in sdk/event-types and sdk/session-events; idiom spec
::session.custom_notification-data covers :source, :name,
:payload, :subject, :version.
- Protocol normalizer preserves :subject and :payload verbatim
(no kebab-casing) because both carry source-defined identifiers
and opaque JSON. Mirrors the existing escape hatch for
external_tool.requested arguments.
Also surfaces post-1.0.46 wire fields previously left implicit:
:recurring on schedule events, :is-autopilot-continuation on user
messages, and :api-endpoint on extension auth events. Extension
permission kinds (:extension-management,
:extension-permission-access) added to ::permission-kind.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- test-custom-notification-event-type: verifies public event-types/ session-events registration, idiom spec acceptance, and that protocol/normalize-incoming preserves source-defined :subject keys (e.g., :GitHub-Login) and opaque :payload contents verbatim. - test-remote-session-config-forwarded-on-wire: covers :on, :export, :off, omission, and spec rejection of bogus values for both session.create and session.resume params. - Fix two pre-existing tests (test-schedule-created-recurring-field, test-user-message-is-autopilot-continuation-field) to use keyword-keyed wire data — util/wire->clj only transforms keyword keys, so string-keyed fixtures bypassed conversion silently. - Codegen fixture for session.custom_notification added so wire/idiom spec drift would be caught. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- CHANGELOG: schema bump to 1.0.48 GA, new :remote-session config (PR #1295), new :copilot/session.custom_notification event with key-preservation note (PR #1292), plus the previously-pinned 1.0.48-1 entries. - doc/reference/API.md: :remote-session row in create-session config table; :copilot/session.custom_notification row in events table. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Syncs this Clojure Copilot SDK with upstream Copilot CLI 1.0.48 GA by bumping schemas/codegen and porting the corresponding SDK-surfaced features (remote-session config, remote-enable mode opts, and the custom notification event), plus tests/docs.
Changes:
- Bumped
.copilot-schema-versionto1.0.48and refreshed schemas + regenerated wire event specs. - Added/ported support for
:remote-sessionsession config andsession/remote-enable{:mode ...}opts, with spec + integration test coverage. - Added
:copilot/session.custom_notificationsupport, including protocol-level key preservation for:subject/:payload, plus tests and API docs.
Show a summary per file
| File | Description |
|---|---|
| test/github/copilot_sdk/integration_test.clj | Adds end-to-end tests for session.custom_notification key preservation, :remote-session forwarding/spec rejection, and new event fields. |
| test/github/copilot_sdk/codegen_test.clj | Extends generated-spec fixtures to cover session.custom_notification. |
| src/github/copilot_sdk/specs.clj | Adds idiomatic specs for :remote-session, remote mode/opts, session.custom_notification data, and new event fields. |
| src/github/copilot_sdk/session.clj | Adds 2-arity remote-enable overload supporting {:mode ...}. |
| src/github/copilot_sdk/protocol.clj | Updates normalize-incoming to preserve :subject/:payload verbatim for session.custom_notification. |
| src/github/copilot_sdk/instrument.clj | Updates fdef for session/remote-enable to allow optional opts. |
| src/github/copilot_sdk/generated/event_specs.clj | Regenerated wire event specs for schema 1.0.48 additions. |
| src/github/copilot_sdk/client.clj | Forwards :remote-session into session.create/session.resume wire params; updates create-session docstring. |
| src/github/copilot_sdk.clj | Registers :copilot/session.custom_notification in public event sets. |
| schemas/session-events.schema.json | Updated upstream schema snapshot (custom notification event, new fields, etc.). |
| schemas/api.schema.json | Updated upstream API schema snapshot for CLI 1.0.48. |
| schemas/README.md | Updates pinned schema version note to 1.0.48. |
| doc/reference/API.md | Documents :remote-session, remote-enable opts, and session.custom_notification event. |
| CHANGELOG.md | Adds Unreleased entries describing the sync and new surfaced features. |
| .copilot-schema-version | Bumps pinned schema version to 1.0.48. |
Copilot's findings
- Files reviewed: 14/15 changed files
- Comments generated: 1
Copilot Code Review round 1: the CHANGELOG entry said the schema was 'previously pinned at 1.0.48-1' but main had 1.0.46 at the point this PR branched. Fix to reflect 1.0.46 → 1.0.48. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Three findings, all valid: 1. CHANGELOG already-fixed in 6ff9421 (round 1). 2. doc/reference/API.md said custom_notification fields :subject and :version were `:subject?`/`:version?`. The actual keys do not carry a `?` suffix (subject is a map, version is a positive int — neither is a boolean, and camel-snake-kebab doesn't append `?`). Fix the row to use the actual keys and call out that they are optional in prose. 3. protocol/normalize-incoming only preserved opaque event fields (subject/payload for custom_notification; arguments for external_tool.requested) on live session.event notifications. Historical events returned by session.getMessages flow through the same function as response messages (no :method, id present) and fell into the :else branch, so their opaque keys were kebab-cased. Refactor the preservation logic into preserve-event-opaque-fields and apply it to both live notifications and response :result :events collections, so live and historical events have the same shape. New test covers both new (custom_notification) and existing (external_tool.requested) event preservation through the response path. 4. session/remote-enable 2-arity did not validate the :mode opt before sending — outside spec instrumentation, {:mode :bogus} would forward as wire data. Validate opts against ::remote-enable-opts at the API boundary and throw on bad shape, matching the synchronous rejection create-session does for :remote-session. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced May 15, 2026
krukow
added a commit
that referenced
this pull request
May 16, 2026
Bumps version marker from 1.0.0-beta.3.0 to 1.0.0-beta.4.0. Upstream v1.0.0-beta.4 (2026-05-13) shipped no new Node.js SDK API surface relative to v1.0.0-beta.3. Every SDK-visible change in the upstream diff was already brought in by the earlier CLI 1.0.48 schema sync (PR #103): - ModelBilling.multiplier optional - extension-management / extension-permission-access permission kinds - StartData.detachedFromSpawningParentSessionId - AssistantMessageData.{anthropicAdvisorBlocks,anthropicAdvisorModel,model} - Model.modelPickerCategory / modelPickerPriceCategory - session.commands.respondToQueuedCommand (exposed as Out-of-scope per the API-parity rule (Node.js public surface unchanged): session.tasks.sendMessage and Go/C# specific changes. Files changed: - build.clj, README.md: version bump - CHANGELOG.md: rename Unreleased sub-headings to '(v1.0.0-beta.4 sync)' and add a top-of-section note recording that beta.4's nodejs/src diff was pre-covered by the CLI 1.0.48 schema sync. Validation: bb ci (254 tests, 1197 assertions, 0 failures), bb validate-docs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
krukow
added a commit
that referenced
this pull request
May 18, 2026
Add optional :agent-model to entries in :custom-agents. When set, the runtime tries to use that model for the agent, falling back to the parent session model if unavailable. Wire conversion goes through util/clj->wire automatically: :agent-model becomes :agentModel on the wire, sent on both session.create and session.resume custom-agents entries — consistent with the existing :agent-name / :agent-display-name / :agent-skills convention. Upstream parity: matches the new model?: string field added to CustomAgentConfig in nodejs/src/types.ts (upstream commit d0eb531e, PR #1309). No other upstream changes since v1.0.0-beta.4 require porting: - #1295 (remote_session) was already shipped in CLI 1.0.48 sync (PR #103) - E2E test stabilization commits affect upstream test fixtures only - CLI version bumps (1.0.49-*) are prerelease; we stay pinned to 1.0.48 Tests: 3 new integration tests (spec validation, wire payload on session.create/resume, omission when not set). Full suite: 257 tests, 1203 assertions, 0 failures. bb ci:full passes. 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.
Sync the Clojure SDK with upstream
github/copilot-sdkthrough the CLI 1.0.48 GA release (npm@github/copilot@1.0.48).Changes
Schema bump (
8b41b5d).copilot-schema-version:1.0.44-2→1.0.48schemas/{api,session-events}.schema.jsonandsrc/github/copilot_sdk/generated/event_specs.cljNew SDK features ported (
6136960)session/remote-enable!2-arity overload with:modeopts:remote-sessionsession config option forcreate-session/resume-session:copilot/session.custom_notificationevent (SkillsNotify):is-autopilot-continuationonuser.message,:api-endpointonassistant.usage:recurringonsession.schedule_created:extension-management,:extension-permission-access)Key-preservation for
session.custom_notification— the new event's:subjectand:payloadfields carry source-defined identifiers and opaque JSON.protocol/normalize-incomingnow preserves their keys verbatim (no kebab-casing), matching the existing escape hatch forexternal_tool.requestedarguments. Without this, identifiers like"GitHub-Login"and"Actor"/"actor"would collapse or change shape.Tests (
bd7e271)test-custom-notification-event-type— exercisesprotocol/normalize-incomingend-to-end with a raw wire-shape event and verifies preserved keys.test-remote-session-config-forwarded-on-wire— covers:on/:export/:off/ absence / spec rejection of bogus values for bothsession.createandsession.resume.wire->clj).Docs (
8d679df)CHANGELOG.md— entries under[Unreleased]citing each upstream PRdoc/reference/API.md—:remote-sessionconfig row, custom-notification event rowValidation
bb test— 254 tests, 1192 assertions, 0 failures, 0 errorsbb validate-docs— 13 files, 0 warningsbb ci— green (tests + docs + jar build)bb ci:full— green except for one transienttest-e2e-blob-attachmenttimeout unrelated to this change./run-all-examples.sh— all examples greenMulti-model code review
Two reviewers were run in parallel before commit (Claude Opus 4.7 and GPT-5.5).
:remote-sessionhad nos/def→:bogusaccepted and forwarded on the wire(s/def ::remote-session ::remote-session-mode)and a regression test that:remote-session :bogusnow throws on create-sessionsubject/payloadkeys silently kebab-cased bynormalize-incoming, mangling source-defined identifiers and collapsing"actor"/"Actor"into one keywordcondbranch tonormalize-incomingforsession.custom_notification, preserving:subjectand:payloadraw; added an end-to-end normalize testtest-custom-notification-event-typeonly validated static registration, no wire round-tripprotocol/normalize-incomingBranch notes
This branch was created fresh off
mainafter the prior 1.0.46 sync (#102) was squash-merged. The 4 commits here are the net-new 1.0.47 + 1.0.48 work.