You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. This change
3
3
4
4
## [Unreleased]
5
5
6
+
### Added (post-v0.2.2 sync)
7
+
-**`convert-mcp-call-tool-result`** — new public function in `tools` namespace that converts MCP `CallToolResult` format into the SDK's `ToolResultObject`. Handles text, image, and resource content types. (upstream PR #1049)
8
+
-**`default-join-session-permission-handler`** — new permission handler for `resume-session` that returns `{:kind :no-result}`, signaling the CLI to handle permissions itself. Sends `requestPermission: false` on the wire. (upstream PR #1056)
9
+
-**MCP config spec aliases** — `::mcp-stdio-server` and `::mcp-http-server` as aliases for `::mcp-local-server` and `::mcp-remote-server` respectively, matching upstream rename from Local→Stdio, Remote→HTTP. Old names kept for backward compatibility. (upstream PR #1051)
10
+
-**Per-agent skills field** — `::agent-skills` (vector of strings) on `::custom-agent` spec, allowing skill injection per custom agent. (upstream PR #995)
- Integration tests for all new features (18 tests covering convert-mcp-call-tool-result, spec renames, agent skills, requestPermission behavior, new RPCs, and memory specs)
18
+
19
+
### Changed (post-v0.2.2 sync)
20
+
-**`requestPermission` on resume** — `resume-session` now sends `requestPermission: false` when using `default-join-session-permission-handler`, and `true` when using any other handler (e.g., `approve-all`). Previously always sent `true`. (upstream PR #1056)
21
+
6
22
### Added (v0.2.2 sync)
7
23
-**`enableConfigDiscovery` session option** — new boolean `:enable-config-discovery` on session and resume configs. Auto-discovers `.mcp.json`, `.vscode/mcp.json`, skills, etc. Instruction files are always loaded regardless. (upstream PR #1044)
8
24
-**`modelCapabilities` override** — new `:model-capabilities` option on session config, resume config, and `switch-model!`/`set-model!`. Pass a partial capabilities map (e.g. `{:model-supports {:supports-vision true}}`) to override model capabilities for the session. (upstream PR #1029)
Copy file name to clipboardExpand all lines: doc/api/github.copilot-sdk.tools.html
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,11 @@
1
1
<!DOCTYPE html PUBLIC ""
2
2
"">
3
-
<html><head><metacharset="UTF-8" /><title>github.copilot-sdk.tools documentation</title><linkrel="stylesheet" type="text/css" href="css/default.css" /><linkrel="stylesheet" type="text/css" href="css/highlight.css" /><scripttype="text/javascript" src="js/highlight.min.js"></script><scripttype="text/javascript" src="js/jquery.min.js"></script><scripttype="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divid="header"><h2>Generated by <ahref="https://github.com/weavejester/codox">Codox</a></h2><h1><ahref="index.html"><spanclass="project-title"><spanclass="project-name"></span><spanclass="project-version"></span></span></a></h1></div><divclass="sidebar primary"><h3class="no-link"><spanclass="inner">Project</span></h3><ulclass="index-link"><liclass="depth-1 "><ahref="index.html"><divclass="inner">Index</div></a></li></ul><h3class="no-link"><spanclass="inner">Topics</span></h3><ul><liclass="depth-1 "><ahref="API.html"><divclass="inner"><span>API Reference</span></div></a></li><liclass="depth-1 "><ahref="azure-managed-identity.html"><divclass="inner"><span>Azure Managed Identity with BYOK</span></div></a></li><liclass="depth-1 "><ahref="byok.html"><divclass="inner"><span>BYOK (Bring Your Own Key)</span></div></a></li><liclass="depth-1 "><ahref="custom-agents.html"><divclass="inner"><span>Custom Agents & Sub-Agent Orchestration</span></div></a></li><liclass="depth-1 "><ahref="debugging.html"><divclass="inner"><span>MCP Server Debugging Guide</span></div></a></li><liclass="depth-1 "><ahref="getting-started.html"><divclass="inner"><span>Getting Started with the Copilot SDK for Clojure</span></div></a></li><liclass="depth-1 "><ahref="index.html"><divclass="inner"><span>Authentication</span></div></a></li><liclass="depth-1 "><ahref="index.html"><divclass="inner"><span>Documentation</span></div></a></li><liclass="depth-1 "><ahref="overview.html"><divclass="inner"><span>Using MCP Servers with the Copilot SDK for Clojure</span></div></a></li><liclass="depth-1 "><ahref="style.html"><divclass="inner"><span>Documentation Style Guide</span></div></a></li></ul><h3class="no-link"><spanclass="inner">Namespaces</span></h3><ul><liclass="depth-1"><divclass="no-link"><divclass="inner"><spanclass="tree"><spanclass="top"></span><spanclass="bottom"></span></span><span>github</span></div></div></li><liclass="depth-2"><ahref="github.copilot-sdk.html"><divclass="inner"><spanclass="tree"><spanclass="top"></span><spanclass="bottom"></span></span><span>copilot-sdk</span></div></a></li><liclass="depth-3 branch"><ahref="github.copilot-sdk.client.html"><divclass="inner"><spanclass="tree"><spanclass="top"></span><spanclass="bottom"></span></span><span>client</span></div></a></li><liclass="depth-3 branch"><ahref="github.copilot-sdk.helpers.html"><divclass="inner"><spanclass="tree"><spanclass="top"></span><spanclass="bottom"></span></span><span>helpers</span></div></a></li><liclass="depth-3 branch"><ahref="github.copilot-sdk.instrument.html"><divclass="inner"><spanclass="tree"><spanclass="top"></span><spanclass="bottom"></span></span><span>instrument</span></div></a></li><liclass="depth-3 branch"><ahref="github.copilot-sdk.logging.html"><divclass="inner"><spanclass="tree"><spanclass="top"></span><spanclass="bottom"></span></span><span>logging</span></div></a></li><liclass="depth-3 branch"><ahref="github.copilot-sdk.process.html"><divclass="inner"><spanclass="tree"><spanclass="top"></span><spanclass="bottom"></span></span><span>process</span></div></a></li><liclass="depth-3 branch"><ahref="github.copilot-sdk.protocol.html"><divclass="inner"><spanclass="tree"><spanclass="top"></span><spanclass="bottom"></span></span><span>protocol</span></div></a></li><liclass="depth-3 branch"><ahref="github.copilot-sdk.session.html"><divclass="inner"><spanclass="tree"><spanclass="top"></span><spanclass="bottom"></span></span><span>session</span></div></a></li><liclass="depth-3 branch"><ahref="github.copilot-sdk.specs.html"><divclass="inner"><spanclass="tree"><spanclass="top"></span><spanclass="bottom"></span></span><span>specs</span></div></a></li><liclass="depth-3 branch current"><ahref="github.copilot-sdk.tools.html"><divclass="inner"><spanclass="tree"><spanclass="top"></span><spanclass="bottom"></span></span><span>tools</span></div></a></li><liclass="depth-3"><ahref="github.copilot-sdk.util.html"><divclass="inner"><spanclass="tree"><spanclass="top"></span><spanclass="bottom"></span></span><span>util</span></div></a></li></ul></div><divclass="sidebar secondary"><h3><ahref="#top"><spanclass="inner">Public Vars</span></a></h3><ul><liclass="depth-1"><ahref="github.copilot-sdk.tools.html#var-define-tool"><divclass="inner"><span>define-tool</span></div></a></li><liclass="depth-1"><ahref="github.copilot-sdk.tools.html#var-define-tool-from-spec"><divclass="inner"><span>define-tool-from-spec</span></div></a></li><liclass="depth-1"><ahref="github.copilot-sdk.tools.html#var-result-denied"><divclass="inner"><span>result-denied</span></div></a></li><liclass="depth-1"><ahref="github.copilot-sdk.tools.html#var-result-failure"><divclass="inner"><span>result-failure</span></div></a></li><liclass="depth-1"><ahref="github.copilot-sdk.tools.html#var-result-rejected"><divclass="inner"><span>result-rejected</span></div></a></li><liclass="depth-1"><ahref="github.copilot-sdk.tools.html#var-result-success"><divclass="inner"><span>result-success</span></div></a></li></ul></div><divclass="namespace-docs" id="content"><h1class="anchor" id="top">github.copilot-sdk.tools</h1><divclass="doc"><divclass="markdown"><p>Helper functions for defining tools.</p>
4
-
</div></div><divclass="public anchor" id="var-define-tool"><h3>define-tool</h3><divclass="usage"><code>(define-tool name {:keys [description parameters handler overrides-built-in-tool]})</code></div><divclass="doc"><divclass="markdown"><p>Define a tool with a handler function.</p>
3
+
<html><head><metacharset="UTF-8" /><title>github.copilot-sdk.tools documentation</title><linkrel="stylesheet" type="text/css" href="css/default.css" /><linkrel="stylesheet" type="text/css" href="css/highlight.css" /><scripttype="text/javascript" src="js/highlight.min.js"></script><scripttype="text/javascript" src="js/jquery.min.js"></script><scripttype="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divid="header"><h2>Generated by <ahref="https://github.com/weavejester/codox">Codox</a></h2><h1><ahref="index.html"><spanclass="project-title"><spanclass="project-name"></span><spanclass="project-version"></span></span></a></h1></div><divclass="sidebar primary"><h3class="no-link"><spanclass="inner">Project</span></h3><ulclass="index-link"><liclass="depth-1 "><ahref="index.html"><divclass="inner">Index</div></a></li></ul><h3class="no-link"><spanclass="inner">Topics</span></h3><ul><liclass="depth-1 "><ahref="API.html"><divclass="inner"><span>API Reference</span></div></a></li><liclass="depth-1 "><ahref="azure-managed-identity.html"><divclass="inner"><span>Azure Managed Identity with BYOK</span></div></a></li><liclass="depth-1 "><ahref="byok.html"><divclass="inner"><span>BYOK (Bring Your Own Key)</span></div></a></li><liclass="depth-1 "><ahref="custom-agents.html"><divclass="inner"><span>Custom Agents & Sub-Agent Orchestration</span></div></a></li><liclass="depth-1 "><ahref="debugging.html"><divclass="inner"><span>MCP Server Debugging Guide</span></div></a></li><liclass="depth-1 "><ahref="getting-started.html"><divclass="inner"><span>Getting Started with the Copilot SDK for Clojure</span></div></a></li><liclass="depth-1 "><ahref="index.html"><divclass="inner"><span>Authentication</span></div></a></li><liclass="depth-1 "><ahref="index.html"><divclass="inner"><span>Documentation</span></div></a></li><liclass="depth-1 "><ahref="overview.html"><divclass="inner"><span>Using MCP Servers with the Copilot SDK for Clojure</span></div></a></li><liclass="depth-1 "><ahref="style.html"><divclass="inner"><span>Documentation Style Guide</span></div></a></li></ul><h3class="no-link"><spanclass="inner">Namespaces</span></h3><ul><liclass="depth-1"><divclass="no-link"><divclass="inner"><spanclass="tree"><spanclass="top"></span><spanclass="bottom"></span></span><span>github</span></div></div></li><liclass="depth-2"><ahref="github.copilot-sdk.html"><divclass="inner"><spanclass="tree"><spanclass="top"></span><spanclass="bottom"></span></span><span>copilot-sdk</span></div></a></li><liclass="depth-3 branch"><ahref="github.copilot-sdk.client.html"><divclass="inner"><spanclass="tree"><spanclass="top"></span><spanclass="bottom"></span></span><span>client</span></div></a></li><liclass="depth-3 branch"><ahref="github.copilot-sdk.helpers.html"><divclass="inner"><spanclass="tree"><spanclass="top"></span><spanclass="bottom"></span></span><span>helpers</span></div></a></li><liclass="depth-3 branch"><ahref="github.copilot-sdk.instrument.html"><divclass="inner"><spanclass="tree"><spanclass="top"></span><spanclass="bottom"></span></span><span>instrument</span></div></a></li><liclass="depth-3 branch"><ahref="github.copilot-sdk.logging.html"><divclass="inner"><spanclass="tree"><spanclass="top"></span><spanclass="bottom"></span></span><span>logging</span></div></a></li><liclass="depth-3 branch"><ahref="github.copilot-sdk.process.html"><divclass="inner"><spanclass="tree"><spanclass="top"></span><spanclass="bottom"></span></span><span>process</span></div></a></li><liclass="depth-3 branch"><ahref="github.copilot-sdk.protocol.html"><divclass="inner"><spanclass="tree"><spanclass="top"></span><spanclass="bottom"></span></span><span>protocol</span></div></a></li><liclass="depth-3 branch"><ahref="github.copilot-sdk.session.html"><divclass="inner"><spanclass="tree"><spanclass="top"></span><spanclass="bottom"></span></span><span>session</span></div></a></li><liclass="depth-3 branch"><ahref="github.copilot-sdk.specs.html"><divclass="inner"><spanclass="tree"><spanclass="top"></span><spanclass="bottom"></span></span><span>specs</span></div></a></li><liclass="depth-3 branch current"><ahref="github.copilot-sdk.tools.html"><divclass="inner"><spanclass="tree"><spanclass="top"></span><spanclass="bottom"></span></span><span>tools</span></div></a></li><liclass="depth-3"><ahref="github.copilot-sdk.util.html"><divclass="inner"><spanclass="tree"><spanclass="top"></span><spanclass="bottom"></span></span><span>util</span></div></a></li></ul></div><divclass="sidebar secondary"><h3><ahref="#top"><spanclass="inner">Public Vars</span></a></h3><ul><liclass="depth-1"><ahref="github.copilot-sdk.tools.html#var-convert-mcp-call-tool-result"><divclass="inner"><span>convert-mcp-call-tool-result</span></div></a></li><liclass="depth-1"><ahref="github.copilot-sdk.tools.html#var-define-tool"><divclass="inner"><span>define-tool</span></div></a></li><liclass="depth-1"><ahref="github.copilot-sdk.tools.html#var-define-tool-from-spec"><divclass="inner"><span>define-tool-from-spec</span></div></a></li><liclass="depth-1"><ahref="github.copilot-sdk.tools.html#var-result-denied"><divclass="inner"><span>result-denied</span></div></a></li><liclass="depth-1"><ahref="github.copilot-sdk.tools.html#var-result-failure"><divclass="inner"><span>result-failure</span></div></a></li><liclass="depth-1"><ahref="github.copilot-sdk.tools.html#var-result-rejected"><divclass="inner"><span>result-rejected</span></div></a></li><liclass="depth-1"><ahref="github.copilot-sdk.tools.html#var-result-success"><divclass="inner"><span>result-success</span></div></a></li></ul></div><divclass="namespace-docs" id="content"><h1class="anchor" id="top">github.copilot-sdk.tools</h1><divclass="doc"><divclass="markdown"><p>Helper functions for defining tools.</p>
4
+
</div></div><divclass="public anchor" id="var-convert-mcp-call-tool-result"><h3>convert-mcp-call-tool-result</h3><divclass="usage"><code>(convert-mcp-call-tool-result {:keys [content is-error]})</code></div><divclass="doc"><divclass="markdown"><p>Convert an MCP CallToolResult into the SDK’s ToolResultObject format.</p>
5
+
<p>The input map should have Clojure-idiomatic keys: - :content - vector of content blocks, each with :type and type-specific fields - :is-error - optional boolean, when true the result-type is “failure”</p>
<p>Returns a ToolResultObject map with :text-result-for-llm, :result-type, and optionally :binary-results-for-llm.</p>
8
+
</div></div></div><divclass="public anchor" id="var-define-tool"><h3>define-tool</h3><divclass="usage"><code>(define-tool name {:keys [description parameters handler overrides-built-in-tool]})</code></div><divclass="doc"><divclass="markdown"><p>Define a tool with a handler function.</p>
5
9
<p>Arguments: - name - Tool name (string) - opts map: - :description - Tool description - :parameters - JSON schema for parameters (or nil) - :handler - Function (fn <ahref="args invocation">args invocation</a> -> result) - :overrides-built-in-tool - When true, explicitly overrides a built-in tool of the same name. Without this flag, name clashes with built-in tools cause an error.</p>
6
10
<p>The handler receives: - args - The parsed arguments from the LLM (no key conversion) - invocation - Map with :session-id, :tool-call-id, :tool-name, :arguments</p>
7
11
<p>The handler should return one of: - A string (treated as success) - A map with :text-result-for-llm and :result-type - Any other value (JSON-encoded as success) - A core.async channel that will yield one of the above</p>
0 commit comments