Draft
Conversation
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>
Contributor
There was a problem hiding this comment.
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-discoveryand:model-capabilities, ensuring correct wire forwarding (including explicitfalse). - Rename compaction RPC to
session.history.compactand add experimentalhistory-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?) |
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.
Upstream Sync: v0.2.1 → v0.2.2
Ports 3 changes from upstream copilot-sdk v0.2.2 (4th was already implemented):
Changes
enableConfigDiscovery— New boolean session config option (upstream PR #1044)SessionConfig,ResumeSessionConfig,JoinSessionConfigspecssome?guard sofalseis explicitly sent on wiremodelCapabilitiesoverride — New on SessionConfig + switchModel (upstream PR #1029)switch-model!opts::model-capabilitiesspec (already DeepPartial-shaped)util/clj->wirefor recursive camelizationRPC rename + new RPCs (upstream PR #1039)
session.compaction.compact→session.history.compacthistory-truncate!experimental RPCsessions-fork!experimental RPCValidation
bb validate-docs✅clj -T:build jar✅Multi-Model Code Review
Files Changed (10)
specs.clj— New::enable-config-discoveryspec, added keys to config specsclient.clj— Wire threading for enableConfigDiscovery + modelCapabilitiessession.clj— switch-model! modelCapabilities, RPC rename, 2 new RPCsinstrument.clj— fdefs + instrument/unstrument lists for new functionsintegration_test.clj— 7 new tests covering all changesmock_server.clj— Handlers for new RPC methodsAPI.md,CHANGELOG.md— Documentation updatesbuild.clj,README.md— Version bump to 0.2.2.0