Skip to content

feat(tools): sync upstream tool metadata and search#156

Merged
krukow merged 2 commits into
mainfrom
krukow-upstream-sync-latest
Jul 16, 2026
Merged

feat(tools): sync upstream tool metadata and search#156
krukow merged 2 commits into
mainfrom
krukow-upstream-sync-latest

Conversation

@krukow

@krukow krukow commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Generated via Copilot on behalf of @krukow

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/copilot 1.0.71-2. This keeps the Clojure SDK aligned with the Node.js public API while preserving idiomatic data shapes.

Implementation notes

  • Create and resume share the same tool serializer, preserving explicit empty metadata maps and opaque string-keyed data.
  • Only tool_search_tool receives the current tool metadata snapshot; lookup failures remain non-fatal, matching the Node.js SDK.
  • Protocol-only includedBuiltinAgents and internal session.memory_changed stay 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

Finding Source Severity Validity Decision
No actionable findings Claude Opus 4.6 Clean
No actionable findings Gemini 3.1 Pro Clean

krukow added 2 commits July 16, 2026 15:53
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
Copilot AI review requested due to automatic review settings July 16, 2026 15:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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 :metadata passthrough and session-level :tool-search config, including tool_search_tool receiving 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-only session.memory_changed excluded 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

@krukow
krukow merged commit d7d0837 into main Jul 16, 2026
3 checks passed
@krukow
krukow deleted the krukow-upstream-sync-latest branch July 16, 2026 15:40
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