feat: sync stable SDK APIs to v1.0.11 - #191
Merged
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9cad5456-8b73-40a3-8089-d2bc53b5ed67
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9cad5456-8b73-40a3-8089-d2bc53b5ed67
Contributor
There was a problem hiding this comment.
Pull request overview
Recertifies the Clojure Copilot SDK against upstream github/copilot-sdk v1.0.11 and advances this library to 1.0.11.0, porting the two stable public API deltas described in the stable-delta inventory: client-level built-in plugin directory registration and attributed permission results.
Changes:
- Added client option
:builtin-plugin-directories(absolute path validation + startup-timeplugins.builtin.setregistration). - Added attributed permission result helpers (
attributed-permission-result,attributed-permission-result?) with new closed specs and wire mapping fordecisionContext. - Updated stable sync inventory/tests, runtime schema pin, docs, and versioning to
1.0.11.0/ schema1.0.80.
Show a summary per file
| File | Description |
|---|---|
| test/resources/stable_upstream_delta_4472fcb.edn | Adds machine-readable stable delta inventory for upstream commit 4472fcb (v1.0.11). |
| test/github/copilot_sdk/integration/stable_sync_811adc_test.clj | Keeps the historical oracle test pinned to schema 1.0.79-9 while validating the 811adc inventory. |
| test/github/copilot_sdk/integration/stable_sync_4472fcb_test.clj | New integration coverage for v1.0.11 stable deltas (builtin plugin dirs + attributed permission results). |
| src/github/copilot_sdk/specs.clj | Adds specs for :builtin-plugin-directories, permission decision context, and attributed permission results. |
| src/github/copilot_sdk/session.clj | Normalizes permission handler results to support attributed context and correct wire string mappings. |
| src/github/copilot_sdk/instrument.clj | Instruments new public helpers with clojure.spec fdefs. |
| src/github/copilot_sdk/client.clj | Implements builtin plugin registration during startup and forwards decisionContext for permission responses. |
| src/github/copilot_sdk.clj | Re-exports attributed permission helper functions at the top-level public namespace. |
| schemas/README.md | Updates documented pinned schema version to 1.0.80. |
| resources/github/copilot_sdk/api_surface.edn | Updates public API surface snapshot (new vars + fdefs + spec keys). |
| README.md | Bumps the dependency example version to 1.0.11.0. |
| doc/upstream-doc-gap-matrix.md | Updates upstream audit commit and notes intentional exclusion of experimental argsSchema authoring. |
| doc/reference/API.md | Documents :builtin-plugin-directories and the new attributed-permission-result helper. |
| doc/getting-started.md | Updates getting-started dependency version to 1.0.11.0. |
| doc/api/upstream-doc-gap-matrix.html | Regenerated docs output reflecting upstream audit commit and exclusions. |
| doc/api/style.html | Regenerated docs output reflecting updated style guidance around AGENTS.md symlink. |
| doc/api/index.html | Regenerated docs index output after doc/source changes. |
| doc/api/github.copilot-sdk.html | Regenerated API docs including new top-level re-exported helpers. |
| doc/api/github.copilot-sdk.client.html | Regenerated client namespace docs including new permission helper functions and option docs. |
| doc/api/getting-started.html | Regenerated docs output reflecting dependency/version bumps. |
| doc/api/API.html | Regenerated API reference HTML including new client option and permission helper documentation. |
| CHANGELOG.md | Adds [Unreleased] entries for the v1.0.11 sync (new APIs + schema/version bump). |
| build.clj | Bumps library version to 1.0.11.0. |
| .copilot-schema-version | Updates pinned runtime schema version to 1.0.80. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Suppressed comments (1)
src/github/copilot_sdk/specs.clj:2256
- Same as
::permission-decision-context: this uses an ad-hoc closed-map check instead of the existingclosed-keyshelper used throughout this namespace (e.g., specs.clj:239). Aligning on one closure pattern makes specs easier to maintain and keeps unknown-key behavior consistent.
(s/def ::attributed-permission-result
(s/and
map?
#(= #{:kind :result :decision-context} (set (keys %)))
#(= :attributed (:kind %))
- Files reviewed: 24/24 changed files
- Comments generated: 2
- Review effort level: Lite
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9cad5456-8b73-40a3-8089-d2bc53b5ed67
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9cad5456-8b73-40a3-8089-d2bc53b5ed67
Contributor
There was a problem hiding this comment.
Review details
Suppressed comments (1)
src/github/copilot_sdk/client.clj:1179
attributed-permission-result?currently returns true for any map with:kind :attributed, even if it’s missing required keys like:result/:decision-contextor otherwise malformed. Since this is a public predicate, it should reflect whether the value is a valid attributed permission result (consistent with other predicates likesession-fs-sqlite-transaction-failure?which validate shape).
(defn attributed-permission-result?
"Return true when `result` is a well-formed attributed permission result."
[result]
(s/valid? ::specs/attributed-permission-result result))
- Files reviewed: 24/24 changed files
- Comments generated: 0 new
- Review effort level: Lite
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.
Recertifies the Clojure SDK against upstream
v1.0.11at4472fcb9ad342b02aae14ccc3cf1c8083603863e, ports the two stable public API deltas, and advances this library to1.0.11.0.Design notes
:builtin-plugin-directoriesis distinct from per-session plugin discovery. It validates absolute paths, registers the complete non-empty set after protocol negotiation, and force-stops startup on registration failure. Unsupported runtimes fail loudly rather than silently discarding host trust configuration. This follows upstream PR #2330.:no-resultstill suppresses the response RPC. This follows upstream PR #2294.811adcoracle remains pinned. A separate machine-readable inventory classifies every commit through the new target; runtime schema1.0.80is byte-identical to the prior API and event schemas, so code generation remains unchanged.Deliberate exclusion
Factory
argsSchemaremains excluded because the entire Factory authoring surface is experimental upstream; this stable recertification does not expand it speculatively.