Skip to content

Upstream sync: copilot-sdk v0.2.2#87

Draft
krukow wants to merge 1 commit intomainfrom
upstream-sync/v0.2.2
Draft

Upstream sync: copilot-sdk v0.2.2#87
krukow wants to merge 1 commit intomainfrom
upstream-sync/v0.2.2

Conversation

@krukow
Copy link
Copy Markdown
Collaborator

@krukow krukow commented Apr 11, 2026

Upstream Sync: v0.2.1 → v0.2.2

Ports 3 changes from upstream copilot-sdk v0.2.2 (4th was already implemented):

Changes

  1. enableConfigDiscovery — New boolean session config option (upstream PR #1044)

    • Added to SessionConfig, ResumeSessionConfig, JoinSessionConfig specs
    • Uses some? guard so false is explicitly sent on wire
  2. modelCapabilities override — New on SessionConfig + switchModel (upstream PR #1029)

    • Added to session/resume config and switch-model! opts
    • Reuses existing ::model-capabilities spec (already DeepPartial-shaped)
    • Converted via util/clj->wire for recursive camelization
  3. RPC rename + new RPCs (upstream PR #1039)

    • session.compaction.compactsession.history.compact
    • Added history-truncate! experimental RPC
    • Added sessions-fork! experimental RPC

Validation

  • 156 tests, 478 assertions, 0 failures, 0 errors
  • bb validate-docs
  • clj -T:build jar
  • Version synced to 0.2.2.0

Multi-Model Code Review

Reviewer Model Finding
Opus claude-opus-4.5 No issues
GPT gpt-5.4 No issues
Sonnet claude-sonnet-4 No issues

Files Changed (10)

  • specs.clj — New ::enable-config-discovery spec, added keys to config specs
  • client.clj — Wire threading for enableConfigDiscovery + modelCapabilities
  • session.clj — switch-model! modelCapabilities, RPC rename, 2 new RPCs
  • instrument.clj — fdefs + instrument/unstrument lists for new functions
  • integration_test.clj — 7 new tests covering all changes
  • mock_server.clj — Handlers for new RPC methods
  • API.md, CHANGELOG.md — Documentation updates
  • build.clj, README.md — Version bump to 0.2.2.0

Port 3 changes from upstream v0.2.2 (4th was already implemented):

1. enableConfigDiscovery - new boolean session config option (PR #1044)
   - Added to SessionConfig, ResumeSessionConfig, JoinSessionConfig specs
   - Uses some? guard so false is explicitly sent on wire

2. modelCapabilities override - new on SessionConfig + switchModel (PR #1029)
   - Added to session/resume config and switch-model! opts
   - Reuses existing ::model-capabilities spec (already DeepPartial-shaped)
   - Converted via util/clj->wire for recursive camelization

3. RPC rename + new RPCs (PR #1039)
   - session.compaction.compact → session.history.compact
   - Added history-truncate! experimental RPC
   - Added sessions-fork! experimental RPC

Validation: 156 tests, 478 assertions, 0 failures, 0 errors.
Multi-model review (Opus 4.5, GPT 5.4, Sonnet 4): no issues found.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 11, 2026 18:26
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

Ports upstream github/copilot-sdk changes from v0.2.1 → v0.2.2 into the Clojure SDK, extending session configuration/wire params, updating session history RPC method names, and adding experimental RPC wrappers with accompanying tests/docs/version bumps.

Changes:

  • Add session/resume/join config support for :enable-config-discovery and :model-capabilities, ensuring correct wire forwarding (including explicit false).
  • Rename compaction RPC to session.history.compact and add experimental history-truncate! + sessions-fork! wrappers.
  • Update mock server handlers, integration tests, documentation, changelog, and project version to 0.2.2.0.
Show a summary per file
File Description
src/github/copilot_sdk/specs.clj Adds ::enable-config-discovery and permits new keys in session/resume/join config specs.
src/github/copilot_sdk/client.clj Threads new config options into session.create/session.resume parameter building.
src/github/copilot_sdk/session.clj Adds :model-capabilities support to switch-model!; renames compaction RPC and adds history-truncate! / sessions-fork!.
src/github/copilot_sdk/instrument.clj Adds fdefs + instrumentation registration for new experimental session functions.
test/github/copilot_sdk/integration_test.clj Adds integration tests asserting wire params and RPC method routing for all new behavior.
test/github/copilot_sdk/mock_server.clj Adds mock handlers for new/renamed RPC methods used by integration tests.
doc/reference/API.md Documents new config keys, switch-model! option, and new experimental session functions.
CHANGELOG.md Records v0.2.2 sync additions/changes under Unreleased.
README.md Updates dependency version to 0.2.2.0.
build.clj Bumps library version to 0.2.2.0.

Copilot's findings

  • Files reviewed: 10/10 changed files
  • Comments generated: 1

Comment on lines +299 to +305
(s/fdef github.copilot-sdk.session/history-truncate!
:args (s/cat :session ::specs/session)
:ret map?)

(s/fdef github.copilot-sdk.session/sessions-fork!
:args (s/cat :session ::specs/session)
:ret map?)
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