Skip to content

Upstream sync: Copilot CLI 1.0.46 - #102

Merged
krukow merged 5 commits into
mainfrom
upstream-sync/cli-1.0.46
May 13, 2026
Merged

krukow merged 5 commits into
mainfrom
upstream-sync/cli-1.0.46

Conversation

@krukow

@krukow krukow commented May 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Sync the Clojure Copilot SDK with upstream Copilot CLI changes between v1.0.0-beta.3 and CLI 1.0.46. Covers three post-tag commits in github/copilot-sdk (nodejs/):

  • 1.0.44-3 (ac55e9ad): new permission kinds extension-management, extension-permission-access; new detachedFromSpawningParentSessionId on SessionStart.
  • 1.0.45 (7e7dac2a): new session.commands.respondToQueuedCommand RPC; new anthropicAdvisorBlocks, anthropicAdvisorModel, model fields on AssistantMessage.
  • 1.0.46 (a9c763e9): new modelPickerCategory, modelPickerPriceCategory fields on ModelInfo.

Changes

Area What changed
Schemas .copilot-schema-version bumped 1.0.44-2 → 1.0.46; schemas/*.json re-fetched; generated/event_specs.clj re-generated via bb codegen.
Specs (idiom) ::permission-kind, ::assistant.message-data, ::session.start-data, ::model-info extended. New ::handled?, ::stop-processing-queue?, ::model-picker-category, ::model-picker-price-category.
Client parse-model-info now surfaces :model-picker-category and :model-picker-price-category through list-models.
Session New ^:experimental respond-to-queued-command! wrapping session.commands.respondToQueuedCommand RPC.
Tests 3 new deftests: spec additions, model-picker field flow-through, queued-command wire shape.
Docs doc/reference/API.md updated (list-models, new Queued Commands section). CHANGELOG.md [Unreleased] updated with the new sync entries plus a "Tracked-but-not-ported" subsection.

Tracked but not ported

These upstream changes are intentionally not in this PR:

  • session.tasks.sendMessage (upstream-experimental task pipeline; whole session.tasks.* surface is not yet ported in Clojure)
  • Pre-existing session_sync_level removal (no Clojure surface change needed)

Validation

  • bb test → 246 tests, 1131 assertions, 0 failures
  • COPILOT_E2E_TESTS=true bb test → 0 failures + 1 pre-existing flaky timeout in test-e2e-blob-attachment (also fails on main, model-side latency in image-description prompt; not caused by this PR).
  • ./run-all-examples.sh → exit 0
  • bb validate-docs → clean
  • Multi-model code review (Claude Opus 4.7 + GPT-5.5) → both flagged the same issue: :handled? was :opt-un in the fdef, but it is the wire-required discriminator between QueuedCommandHandled / QueuedCommandNotHandled (per upstream rpc.ts). Fixed: moved to :req-un in instrument.clj so instrumentation enforces it.

Code-review findings table

# Finding Source Severity Decision
1 respond-to-queued-command! fdef: :handled? should be :req-un (it's the wire-required discriminator) Opus + GPT-5.5 (concurrent) Medium Fixed

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

krukow and others added 4 commits May 13, 2026 09:40
Regenerated from `@github/copilot@1.0.46` npm tarball.

- .copilot-schema-version: 1.0.44-2 → 1.0.46
- schemas/api.schema.json, schemas/session-events.schema.json: re-fetched
- src/github/copilot_sdk/generated/event_specs.clj: re-generated via `bb codegen`

New wire shapes (post-v1.0.0-beta.3 upstream commits):
- assistant.message-data: anthropic-advisor-blocks, anthropic-advisor-model, model
- session.start-data: detached-from-spawning-parent-session-id
- permission-request / prompt-request: extension-management,
  extension-permission-access permission kinds (upstream 1.0.44-3)
- models.list: modelPickerCategory, modelPickerPriceCategory (upstream 1.0.46)
- session.commands.respondToQueuedCommand RPC (upstream 1.0.45)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…re fields

Add idiom specs (kebab-case, ?-suffixed booleans) for new wire fields
introduced in upstream CLI 1.0.44-3, 1.0.45, and 1.0.46.

specs.clj:
- ::permission-kind: add :extension-management, :extension-permission-access
- ::assistant.message-data: add anthropic-advisor-blocks, anthropic-advisor-model
- ::session.start-data: add detached-from-spawning-parent-session-id
- ::model-info: add model-picker-category, model-picker-price-category
  (kept as open strings to let unknown future categories pass through)
- Add ::handled? and ::stop-processing-queue? for the new queued-command RPC

client.clj:
- parse-model-info: add model-picker-category and model-picker-price-category
  to the select-keys whitelist so they're surfaced through list-models
- list-models docstring: document the two new fields

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Wraps the new `session.commands.respondToQueuedCommand` RPC introduced in
upstream Copilot CLI 1.0.45. Marked ^:experimental to mirror the upstream
Node.js SDK, which exposes it only via the generated low-level RPC layer
(no high-level helper).

session.clj:
- New respond-to-queued-command! function. Wire shape:
  {sessionId, requestId, result: {handled, stopProcessingQueue?}}
  Idiomatic API: {:request-id ... :handled? bool :stop-processing-queue? bool?}

instrument.clj:
- Register fdef with :handled? as :req-un (it is the discriminator
  between QueuedCommandHandled and QueuedCommandNotHandled per upstream
  rpc.ts) so spec instrumentation enforces presence.

mock_server.clj:
- Stub session.commands.respondToQueuedCommand returning {:success true}.

integration_test.clj:
- test-cli-1.0.46-sync-spec-additions: validate new wire/idiom specs.
- test-list-models-surfaces-model-picker-fields: model picker fields
  flow through parse-model-info.
- test-respond-to-queued-command: wire shape for handled=true with
  stop-processing-queue, and handled=false (stopProcessingQueue omitted).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- CHANGELOG: new "post-v1.0.0-beta.3 CLI sync" section under [Unreleased]
  with Added and Tracked-but-not-ported subsections.
- doc/reference/API.md: list-models return shape now documents
  :model-picker-category and :model-picker-price-category. New

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 13, 2026 07:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Syncs this Clojure SDK’s wire schemas, idiom specs, and thin RPC wrappers to match upstream Copilot CLI 1.0.46, including new event/model fields and a new queued-command acknowledgment RPC.

Changes:

  • Bump pinned upstream schema version to 1.0.46 and regenerate wire event specs/schemas.
  • Extend hand-written idiom specs for new permission kinds, session.start field, assistant message fields, and model picker categorization.
  • Add experimental session/respond-to-queued-command!, surface model picker fields in list-models, and add integration tests + API docs.
Show a summary per file
File Description
test/github/copilot_sdk/mock_server.clj Adds mock handling for the new session.commands.respondToQueuedCommand RPC.
test/github/copilot_sdk/integration_test.clj Adds tests covering new specs, list-models picker fields, and queued-command wire shape.
src/github/copilot_sdk/specs.clj Extends idiom specs for new CLI fields (permission kinds, session.start, assistant message, model picker fields) and queued-command params.
src/github/copilot_sdk/session.clj Adds experimental respond-to-queued-command! wrapper over the new RPC.
src/github/copilot_sdk/instrument.clj Adds fdef/instrumentation for respond-to-queued-command!.
src/github/copilot_sdk/generated/event_specs.clj Regenerated wire event specs reflecting upstream schema changes.
src/github/copilot_sdk/client.clj Surfaces :model-picker-category and :model-picker-price-category in parse-model-info / list-models.
schemas/session-events.schema.json Updates upstream-fetched session events schema with new fields/unions.
schemas/api.schema.json Updates upstream-fetched API schema with new RPC + model picker enums (and other upstream drift).
schemas/README.md Updates documented pinned schema version.
.copilot-schema-version Bumps pinned schema version to 1.0.46.
doc/reference/API.md Documents model picker categorization fields and queued commands API.
CHANGELOG.md Adds Unreleased entries for this upstream sync + tracked-but-not-ported notes.

Copilot's findings

  • Files reviewed: 12/13 changed files
  • Comments generated: 2

Comment thread src/github/copilot_sdk/session.clj Outdated
Comment thread src/github/copilot_sdk/instrument.clj
@krukow
krukow marked this pull request as ready for review May 13, 2026 07:51
   value (including false) when key is present, instead of only when
   truthy. Previously {:stop-processing-queue? false} was silently
   dropped from the wire payload.

2. instrument.clj fdef: tighten params spec so :stop-processing-queue?
   is only allowed when :handled? is true (mirrors upstream wire union
   QueuedCommandHandled vs QueuedCommandNotHandled where the field
   only exists on the handled=true branch).

3. integration_test: add coverage for explicit
   stop-processing-queue?=false forwarding.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@krukow
krukow merged commit 85547ba into main May 13, 2026
2 checks passed
@krukow
krukow deleted the upstream-sync/cli-1.0.46 branch May 13, 2026 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants