Skip to content

Upstream sync: copilot-sdk v1.0.0-beta.12 (schema 1.0.57)#115

Merged
krukow merged 5 commits into
mainfrom
upstream-sync/v1.0.0-beta.12
Jun 2, 2026
Merged

Upstream sync: copilot-sdk v1.0.0-beta.12 (schema 1.0.57)#115
krukow merged 5 commits into
mainfrom
upstream-sync/v1.0.0-beta.12

Conversation

@krukow
Copy link
Copy Markdown
Collaborator

@krukow krukow commented Jun 2, 2026

Generated via Copilot on behalf of @krukow

Syncs the Clojure SDK from upstream github/copilot-sdk v1.0.0-beta.10 (schema 1.0.56-1 + PR #1428) up to v1.0.0-beta.12 / npm @github/copilot ^1.0.57.

Changes

  • feat(session):context-tier (:default / :long-context) and :reasoning-summary ("none" / "concise" / "detailed") on switch-model! / set-model!, matching the upstream setModel() API (upstream PR #1522). context-tier->wire moved from client.clj (private) to util.clj (shared, avoids a circular dependency). fdefs + specs updated.
  • feat(events):model optional field on ::tool.execution_start-data (npm 1.0.57, mirroring ::tool.execution_complete-data); preserve opaque :payload on extension_context attachments (reachable on user.message via session.getMessages and on session.extensions.attachments_pushed) so wire->clj doesn't kebab-case caller-supplied keys.
  • chore(codegen) — schema bump 1.0.56-11.0.57; regenerated event_specs.clj (new session.extensions.attachments_pushed event, extension_context attachment branch) (upstream PR #1517).
  • chore(release) — version 1.0.0-beta.4.11.0.0-beta.12.0.
  • docsdoc/reference/API.md + CHANGELOG.md.

contextTier wire semantics

Unlike create/resume config patching, switch-model! omits contextTier when :context-tier is nil rather than sending contextTier: null — upstream setModel spreads ...options (drops undefined) and ModelSwitchToRequest.contextTier has no null variant in the schema ("omit this field"). Caught by multi-model review (see below).

Validation

  • bb test344 tests / 1597 assertions, 0 failures (instrumented).
  • bb validate-docs ✓ · bb jar ✓ (1.0.0-beta.12.0) · ./run-all-examples.sh ✓ (real E2E).
  • bb codegen output committed and stable (no drift).

Multi-model review (Claude Opus 4.8 + GPT-5.3-codex)

# Finding Source Severity Decision
1 switch-model! sent contextTier: null for :context-tier nil; switchTo schema has no null tier GPT Medium Valid — fixed (omit-when-nil) + test added
2 restore-extension-context-payloads mapv could truncate on length mismatch GPT High False positive — raw/converted attachment vectors are the same event pre/post wire->clj, which preserves count/order (confirmed by Opus)
3 Full review of wire/spec/test/idioms Opus No significant issues; both notification + getMessages paths and event-type coverage confirmed

Out of scope (API parity / existing surface)

  • extensionSdkPath / canvas-extension host config — Clojure has intentionally not ported the cohesive extension/canvas host surface; exposing only extensionSdkPath would be inert/misleading.
  • suppressCustomAgentPrompt (rpc field not in Node public config), brand-casing cosmetics (TS identifiers; wire unchanged), disableResume wire fix (Clojure already correct).
  • The pre-existing inbound-attachment idiom-spec :type keyword/string mismatch is tracked separately.

This PR is backed by a session plan.md (commit classification table + scope decisions); its contents are reflected in the sections above.

krukow and others added 5 commits June 2, 2026 09:20
…wire specs

Bump the pinned @github/copilot schema to 1.0.57 and regenerate the wire
event specs. New generated surface from upstream:

- session.extensions.attachments_pushed event (ephemeral)
- extension_context attachment branch
- :model optional field on tool.execution_start-data

Upstream: github/copilot-sdk v1.0.0-beta.12, PRs #1517, npm 1.0.57.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…el!/set-model!

Surface two model options on switch-model!/set-model! to match the
upstream setModel() API:

- :context-tier (:default | :long-context) -> wire contextTier
  "default" / "long_context" (upstream PR #1522)
- :reasoning-summary ("none" | "concise" | "detailed") -> wire
  reasoningSummary (setModel parity)

contextTier is omitted from the wire request when nil: upstream spreads
...options (undefined is dropped) and ModelSwitchToRequest.contextTier has
no null variant in the schema ("omit this field").

Move context-tier->wire from client.clj (private) to util.clj so both
client and session can share it without a circular dependency. Register
the new options in the switch-model!/set-model! fdefs so instrumented
tests enforce them.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Two inbound event-data changes from the 1.0.57 schema:

- Add :model to the :opt-un of ::tool.execution_start-data, mirroring
  ::tool.execution_complete-data (upstream npm 1.0.57).
- Preserve the opaque :payload of extension_context attachments. These
  appear on user.message events (reachable via session.getMessages) and
  on session.extensions.attachments_pushed events. wire->clj would
  kebab-case the caller-supplied payload keys, so restore them verbatim
  on both the live notification and historical response paths.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Advance the Clojure SDK version to track the upstream copilot-sdk release
tag v1.0.0-beta.12: 1.0.0-beta.4.1 -> 1.0.0-beta.12.0.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Document the new switch-model!/set-model! options (:context-tier,
:reasoning-summary), the :model field on tool.execution_start event data,
and add the v1.0.0-beta.12 sync section to the changelog.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 2, 2026 07:22
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

Syncs the Clojure Copilot SDK to upstream v1.0.0-beta.12 (schema 1.0.57), extending model-switch options for parity with upstream setModel() and updating event/schema handling for new attachment and event shapes.

Changes:

  • Add :context-tier and :reasoning-summary support to switch-model! / set-model!, including correct wire encoding and omit-when-nil behavior for contextTier.
  • Extend event/spec support for schema 1.0.57, including optional :model on tool.execution_start and generated support for session.extensions.attachments_pushed.
  • Preserve opaque extension_context attachment :payload during wire->clj normalization so caller-supplied keys are not kebab-cased.
Show a summary per file
File Description
test/github/copilot_sdk/integration_test.clj Adds regression/coverage tests for :model in tool start events, extension attachment payload preservation, and contextTier semantics in model switching.
src/github/copilot_sdk/util.clj Introduces shared context-tier->wire mapping to produce correct underscore wire values.
src/github/copilot_sdk/specs.clj Updates curated specs to allow optional :model on ::tool.execution_start-data.
src/github/copilot_sdk/session.clj Forwards reasoningSummary and contextTier on session.model.switchTo, omitting contextTier when unset.
src/github/copilot_sdk/protocol.clj Restores opaque extension_context attachment payloads post-wire->clj for both live and historical event paths.
src/github/copilot_sdk/instrument.clj Extends fdefs for switch-model! / set-model! to include :reasoning-summary and :context-tier.
src/github/copilot_sdk/generated/event_specs.clj Regenerates wire event specs for schema 1.0.57 (new event type + updated fields).
src/github/copilot_sdk/client.clj Routes :context-tier wire conversion through util/context-tier->wire (avoids circular deps).
schemas/session-events.schema.json Bumps pinned upstream session-events schema and incorporates new attachment/event definitions.
schemas/api.schema.json Bumps pinned upstream API schema (new RPCs/types, updated contextTier semantics, attachment unification).
schemas/README.md Updates pinned schema version note to 1.0.57.
.copilot-schema-version Updates the pinned schema version to 1.0.57.
doc/reference/API.md Documents the new switch-model! options and the new optional :model event field.
CHANGELOG.md Adds v1.0.0-beta.12 sync notes for added/fixed/changed behavior.
README.md Updates dependency version to 1.0.0-beta.12.0.
build.clj Bumps project version to 1.0.0-beta.12.0.

Copilot's findings

  • Files reviewed: 14/16 changed files
  • Comments generated: 0

@krukow krukow merged commit 9243f6f into main Jun 2, 2026
3 checks passed
@krukow krukow deleted the upstream-sync/v1.0.0-beta.12 branch June 2, 2026 09:24
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