feat(tools): sync upstream tool metadata and search#156
Merged
Conversation
Port opaque tool metadata, session tool-search configuration, current tool metadata injection, tool references, and protocol schemas 1.0.71-2 while preserving the official Node SDK public surface. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2a0ff497-f07d-461b-8083-1b8ee4fdcbbc
Document tool metadata, tool-search configuration, invocation metadata, tool references, canvas icons, and model billing promotions, then regenerate Codox output. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2a0ff497-f07d-461b-8083-1b8ee4fdcbbc
Contributor
There was a problem hiding this comment.
Pull request overview
Ports upstream Copilot SDK tool-search support and opaque tool metadata into the Clojure SDK, while updating pinned protocol schemas to @github/copilot 1.0.71-2 and keeping the public API/spec surface aligned and documented.
Changes:
- Add tool-definition
:metadatapassthrough and session-level:tool-searchconfig, includingtool_search_toolreceiving a current tool metadata snapshot as:available-tools. - Extend public specs and instrumentation for tool-search invocation/result fields (e.g.,
:tool-references) and current-tool-metadata shapes. - Regenerate and curate schema-driven updates (e.g., canvas
:icon, model-billing:promo, internal-onlysession.memory_changedexcluded from curated event-types).
Show a summary per file
| File | Description |
|---|---|
| test/github/copilot_sdk/mock_server.clj | Adds mock RPC support for session.tools.getCurrentMetadata with injectable response/Throwable. |
| test/github/copilot_sdk/integration_test.clj | Adds integration coverage for tool metadata forwarding, tool-search config wire shape, and tool_search_tool metadata snapshot behavior. |
| test/github/copilot_sdk/codegen_test.clj | Excludes protocol-internal session event types from the curated public event-types drift guard. |
| src/github/copilot_sdk/tools.clj | Extends tool constructors/docs to accept and retain optional :metadata; documents tool-search invocation extras. |
| src/github/copilot_sdk/specs.clj | Adds specs for :metadata, :tool-search, :tool-invocation (incl. :available-tools), :tool-references, canvas :icon, and model-billing :promo. |
| src/github/copilot_sdk/session.clj | Fetches current tool metadata on-demand only for tool_search_tool and includes it in the invocation map. |
| src/github/copilot_sdk/instrument.clj | Ensures tool helper namespaces are loaded and adds fdefs for define-tool / define-tool-from-spec. |
| src/github/copilot_sdk/client.clj | Forwards :tool-search in create/resume params; forwards tool :metadata in tool wire serialization; updates model-billing mapping doc comment. |
| src/github/copilot_sdk.clj | Updates top-level API docs to mention model-billing promo and session :tool-search; updates canvas snapshot docs for :icon. |
| schemas/session-events.schema.json | Adds schema updates (canvas icon; internal session.memory_changed; other upstream schema deltas). |
| schemas/README.md | Updates pinned schema version text to 1.0.71-2. |
| schemas/api.schema.json | Updates pinned API schema, including CurrentToolMetadata shape used by metadata snapshot RPC. |
| resources/github/copilot_sdk/api_surface.edn | Exposes newly added public specs (tool-search/tool metadata, icon, promo fields, etc.) in the API surface registry. |
| doc/reference/API.md | Documents :tool-search, tool :metadata, tool invocation :available-tools, tool result :tool-references, canvas :icon, and model-billing :promo. |
| doc/api/github.copilot-sdk.tools.html | Regenerated API docs for tools namespace reflecting :metadata and tool-search additions. |
| doc/api/github.copilot-sdk.session.html | Regenerated API docs reflecting canvas :icon in open-canvases. |
| doc/api/github.copilot-sdk.html | Regenerated top-level docs reflecting :tool-search, tool metadata, :tool-references, and model-billing promo. |
| doc/api/github.copilot-sdk.helpers.html | Regenerated docs clarifying query-seq! cleanup semantics (doc-only change). |
| doc/api/github.copilot-sdk.client.html | Regenerated docs reflecting new/updated options (including :tool-search) and other schema-aligned doc updates. |
| doc/api/getting-started.html | Regenerated getting-started page with updated version/sha examples. |
| doc/api/API.html | Regenerated full API reference HTML reflecting the updated docs/spec surface. |
| CHANGELOG.md | Adds an Unreleased entry describing tool metadata/search support and schema bump to 1.0.71-2. |
| .copilot-schema-version | Bumps pinned schema version to 1.0.71-2. |
Review details
- Files reviewed: 23/24 changed files
- Comments generated: 0
- Review effort level: Low
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.
Ports official SDK support for opaque tool metadata and tool search from upstream PR #1864 and upstream PR #1933, and updates the pinned protocol schemas to
@github/copilot1.0.71-2. This keeps the Clojure SDK aligned with the Node.js public API while preserving idiomatic data shapes.Implementation notes
tool_search_toolreceives the current tool metadata snapshot; lookup failures remain non-fatal, matching the Node.js SDK.includedBuiltinAgentsand internalsession.memory_changedstay outside the public Clojure API.Validation
bb ci:full— 412 tests, 2,266 assertions, E2E tests, all examples, documentation validation, and JAR build.Review findings