Upstream sync: copilot-sdk v1.0.0-beta.12 (schema 1.0.57)#115
Merged
Conversation
…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>
Contributor
There was a problem hiding this comment.
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-tierand:reasoning-summarysupport toswitch-model!/set-model!, including correct wire encoding and omit-when-nil behavior forcontextTier. - Extend event/spec support for schema
1.0.57, including optional:modelontool.execution_startand generated support forsession.extensions.attachments_pushed. - Preserve opaque
extension_contextattachment:payloadduringwire->cljnormalization 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
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.
Syncs the Clojure SDK from upstream
github/copilot-sdkv1.0.0-beta.10 (schema1.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") onswitch-model!/set-model!, matching the upstreamsetModel()API (upstream PR #1522).context-tier->wiremoved fromclient.clj(private) toutil.clj(shared, avoids a circular dependency). fdefs + specs updated.feat(events)—:modeloptional field on::tool.execution_start-data(npm 1.0.57, mirroring::tool.execution_complete-data); preserve opaque:payloadonextension_contextattachments (reachable onuser.messageviasession.getMessagesand onsession.extensions.attachments_pushed) sowire->cljdoesn't kebab-case caller-supplied keys.chore(codegen)— schema bump1.0.56-1→1.0.57; regeneratedevent_specs.clj(newsession.extensions.attachments_pushedevent,extension_contextattachment branch) (upstream PR #1517).chore(release)— version1.0.0-beta.4.1→1.0.0-beta.12.0.docs—doc/reference/API.md+CHANGELOG.md.contextTierwire semanticsUnlike create/resume config patching,
switch-model!omitscontextTierwhen:context-tierisnilrather than sendingcontextTier: null— upstreamsetModelspreads...options(dropsundefined) andModelSwitchToRequest.contextTierhas no null variant in the schema ("omit this field"). Caught by multi-model review (see below).Validation
bb test— 344 tests / 1597 assertions, 0 failures (instrumented).bb validate-docs✓ ·bb jar✓ (1.0.0-beta.12.0) ·./run-all-examples.sh✓ (real E2E).bb codegenoutput committed and stable (no drift).Multi-model review (Claude Opus 4.8 + GPT-5.3-codex)
switch-model!sentcontextTier: nullfor:context-tier nil; switchTo schema has no null tierrestore-extension-context-payloadsmapvcould truncate on length mismatchwire->clj, which preserves count/order (confirmed by Opus)getMessagespaths and event-type coverage confirmedOut of scope (API parity / existing surface)
extensionSdkPath/ canvas-extension host config — Clojure has intentionally not ported the cohesive extension/canvas host surface; exposing onlyextensionSdkPathwould be inert/misleading.suppressCustomAgentPrompt(rpc field not in Node public config), brand-casing cosmetics (TS identifiers; wire unchanged),disableResumewire fix (Clojure already correct).:typekeyword/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.