Compare commits

..

6 Commits

Author SHA1 Message Date
acp-release-bot[bot]
2bf865eb42 chore(main): release 0.57.0 (#842)
🤖 I have created a release *beep* *boop*
---


##
[0.57.0](https://github.com/agentclientprotocol/claude-agent-acp/compare/v0.56.0...v0.57.0)
(2026-07-07)


### Features

* Update @anthropic-ai/claude-agent-sdk to 0.3.202
([#843](https://github.com/agentclientprotocol/claude-agent-acp/issues/843))
([1612c07](1612c07895))


### Bug Fixes

* don't emit empty agent_message_chunk
([#841](https://github.com/agentclientprotocol/claude-agent-acp/issues/841))
([d74dd1d](d74dd1d9d3))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: acp-release-bot[bot] <246668977+acp-release-bot[bot]@users.noreply.github.com>
2026-07-07 10:37:50 +02:00
Ben Brandt
1612c07895 feat: Update @anthropic-ai/claude-agent-sdk to 0.3.202 (#843) 2026-07-07 08:28:35 +00:00
Ege Chelebi
d74dd1d9d3 fix: don't emit empty agent_message_chunk (#841)
## Why this is needed

`toAcpNotifications` can emit an `agent_message_chunk` whose content is
an empty string. This happens in two situations:

1. **Streamed text deltas** — the `text` / `text_delta` case builds the
update unconditionally from `chunk.text`, and the Claude Agent SDK can
stream zero-length text deltas (for example, an empty trailing assistant
block at the end of a turn).
2. **Full-string content** — the string-content path emits a chunk even
when the string is empty.

An empty message chunk carries no information, so at best it is noise.
At worst it breaks clients: the ACP spec does not forbid empty content,
so clients handle it inconsistently and some throw. In JetBrains Air the
frontend event consumer throws on an empty-content `agent_message_chunk`
(`Failed to handle agent event`); once that happens the transcript is
**frozen for the rest of the turn** — no further updates render and
queued prompts are never dispatched. In practice this reproduced
repeatedly around image reads and end-of-turn, and the only recovery was
restarting the IDE.

Because the adapter is client-agnostic, this affects any ACP client that
is strict about chunk content, not a single editor — so the correct
place to fix it is here, in the adapter, rather than working around it
in each client.

## Fix

Do not emit empty content. Both call sites are guarded, mirroring the
empty-`thinking` guard that already exists a few lines below in the same
function, so behavior is consistent across content types:

- `text` / `text_delta`: only build the update when `chunk.text.length >
0`;
- string content: return `[]` when the string is empty.

The change is intentionally minimal and conservative — no information is
lost, and non-empty chunks are entirely unaffected.

## Tests

Three unit tests added on `toAcpNotifications`:

- empty string content → no notifications emitted;
- non-empty string content → still emitted unchanged;
- a stream containing an empty text block followed by a non-empty one →
only the non-empty block is emitted.

Full suite green (476 passing); eslint and prettier clean.
2026-07-07 08:17:17 +00:00
dependabot[bot]
f1bf4da891 chore(deps): bump the minor group with 2 updates (#840)
Bumps the minor group with 2 updates:
[@agentclientprotocol/sdk](https://github.com/agentclientprotocol/typescript-sdk)
and [hono](https://github.com/honojs/hono).

Updates `@agentclientprotocol/sdk` from 1.1.0 to 1.2.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/agentclientprotocol/typescript-sdk/releases">@​agentclientprotocol/sdk's
releases</a>.</em></p>
<blockquote>
<h2>v1.2.0</h2>
<h2><a
href="https://github.com/agentclientprotocol/typescript-sdk/compare/v1.1.0...v1.2.0">1.2.0</a>
(2026-07-06)</h2>
<h3>Features</h3>
<ul>
<li>Update schema to 1.17.0 (<a
href="https://redirect.github.com/agentclientprotocol/typescript-sdk/issues/204">#204</a>)
(<a
href="fa8b5bd426">fa8b5bd</a>)</li>
<li>Update schema to 1.19.0 (<a
href="https://redirect.github.com/agentclientprotocol/typescript-sdk/issues/213">#213</a>)
(<a
href="6599433640">6599433</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>make ndJsonStream receive path linear in message size (<a
href="https://redirect.github.com/agentclientprotocol/typescript-sdk/issues/210">#210</a>)
(<a
href="2fc41d2822">2fc41d2</a>)</li>
<li>unify JSON-RPC message validation policy across transports (<a
href="https://redirect.github.com/agentclientprotocol/typescript-sdk/issues/212">#212</a>)
(<a
href="5e01eb2ac2">5e01eb2</a>),
closes <a
href="https://redirect.github.com/agentclientprotocol/typescript-sdk/issues/211">#211</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/agentclientprotocol/typescript-sdk/blob/main/CHANGELOG.md">@​agentclientprotocol/sdk's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/agentclientprotocol/typescript-sdk/compare/v1.1.0...v1.2.0">1.2.0</a>
(2026-07-06)</h2>
<h3>Features</h3>
<ul>
<li>Update schema to 1.17.0 (<a
href="https://redirect.github.com/agentclientprotocol/typescript-sdk/issues/204">#204</a>)
(<a
href="fa8b5bd426">fa8b5bd</a>)</li>
<li>Update schema to 1.19.0 (<a
href="https://redirect.github.com/agentclientprotocol/typescript-sdk/issues/213">#213</a>)
(<a
href="6599433640">6599433</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>make ndJsonStream receive path linear in message size (<a
href="https://redirect.github.com/agentclientprotocol/typescript-sdk/issues/210">#210</a>)
(<a
href="2fc41d2822">2fc41d2</a>)</li>
<li>unify JSON-RPC message validation policy across transports (<a
href="https://redirect.github.com/agentclientprotocol/typescript-sdk/issues/212">#212</a>)
(<a
href="5e01eb2ac2">5e01eb2</a>),
closes <a
href="https://redirect.github.com/agentclientprotocol/typescript-sdk/issues/211">#211</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="f587c0be56"><code>f587c0b</code></a>
chore(main): release 1.2.0 (<a
href="https://redirect.github.com/agentclientprotocol/typescript-sdk/issues/205">#205</a>)</li>
<li><a
href="6599433640"><code>6599433</code></a>
feat: Update schema to 1.19.0 (<a
href="https://redirect.github.com/agentclientprotocol/typescript-sdk/issues/213">#213</a>)</li>
<li><a
href="5e01eb2ac2"><code>5e01eb2</code></a>
fix: unify JSON-RPC message validation policy across transports (<a
href="https://redirect.github.com/agentclientprotocol/typescript-sdk/issues/212">#212</a>)</li>
<li><a
href="2fc41d2822"><code>2fc41d2</code></a>
fix: make ndJsonStream receive path linear in message size (<a
href="https://redirect.github.com/agentclientprotocol/typescript-sdk/issues/210">#210</a>)</li>
<li><a
href="e73e42af1f"><code>e73e42a</code></a>
chore(deps): bump crate-ci/typos from 1.47.2 to 1.48.0 (<a
href="https://redirect.github.com/agentclientprotocol/typescript-sdk/issues/207">#207</a>)</li>
<li><a
href="f733390ebe"><code>f733390</code></a>
chore(deps-dev): bump the minor group with 8 updates (<a
href="https://redirect.github.com/agentclientprotocol/typescript-sdk/issues/208">#208</a>)</li>
<li><a
href="fa8b5bd426"><code>fa8b5bd</code></a>
feat: Update schema to 1.17.0 (<a
href="https://redirect.github.com/agentclientprotocol/typescript-sdk/issues/204">#204</a>)</li>
<li>See full diff in <a
href="https://github.com/agentclientprotocol/typescript-sdk/compare/v1.1.0...v1.2.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `hono` from 4.12.27 to 4.12.28
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/honojs/hono/releases">hono's
releases</a>.</em></p>
<blockquote>
<h2>v4.12.28</h2>
<h2>What's Changed</h2>
<ul>
<li>fix(serve-static): treat empty string content as found by <a
href="https://github.com/yusukebe"><code>@​yusukebe</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/5062">honojs/hono#5062</a></li>
<li>docs(MIGRATION): fix req.raw.headers reference (property, not
method) by <a
href="https://github.com/EduardF1"><code>@​EduardF1</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/5047">honojs/hono#5047</a></li>
<li>chore: don't publish <code>*.tsbuildinfo</code> by <a
href="https://github.com/yusukebe"><code>@​yusukebe</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/5066">honojs/hono#5066</a></li>
<li>fix(utils/body,validator): normalize Content-Type media type for
case-insensitive matching by <a
href="https://github.com/yusukebe"><code>@​yusukebe</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/5067">honojs/hono#5067</a></li>
<li>fix: avoid circular dependency between body.ts and request.ts by <a
href="https://github.com/usualoma"><code>@​usualoma</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/5071">honojs/hono#5071</a></li>
<li>fix(bun): report the requested subprotocol on WSContext.protocol by
<a href="https://github.com/greymoth-jp"><code>@​greymoth-jp</code></a>
in <a
href="https://redirect.github.com/honojs/hono/pull/5059">honojs/hono#5059</a></li>
<li>chore: bump <code>devDependencies</code> by <a
href="https://github.com/yusukebe"><code>@​yusukebe</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/5085">honojs/hono#5085</a></li>
<li>fix(aws-lambda): detect V2 events by request context, not rawPath
alone by <a
href="https://github.com/VihaanAgarwal"><code>@​VihaanAgarwal</code></a>
in <a
href="https://redirect.github.com/honojs/hono/pull/5033">honojs/hono#5033</a></li>
<li>docs(context-storage): fix JSDoc by <a
href="https://github.com/yusukebe"><code>@​yusukebe</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/5086">honojs/hono#5086</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/EduardF1"><code>@​EduardF1</code></a>
made their first contribution in <a
href="https://redirect.github.com/honojs/hono/pull/5047">honojs/hono#5047</a></li>
<li><a
href="https://github.com/greymoth-jp"><code>@​greymoth-jp</code></a>
made their first contribution in <a
href="https://redirect.github.com/honojs/hono/pull/5059">honojs/hono#5059</a></li>
<li><a
href="https://github.com/VihaanAgarwal"><code>@​VihaanAgarwal</code></a>
made their first contribution in <a
href="https://redirect.github.com/honojs/hono/pull/5033">honojs/hono#5033</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/honojs/hono/compare/v4.12.27...v4.12.28">https://github.com/honojs/hono/compare/v4.12.27...v4.12.28</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="626b185d0e"><code>626b185</code></a>
4.12.28</li>
<li><a
href="d6b1d32a69"><code>d6b1d32</code></a>
docs(context-storage): fix JSDoc (<a
href="https://redirect.github.com/honojs/hono/issues/5086">#5086</a>)</li>
<li><a
href="45b081b9b9"><code>45b081b</code></a>
fix(aws-lambda): detect V2 events by request context, not rawPath alone
(<a
href="https://redirect.github.com/honojs/hono/issues/5033">#5033</a>)</li>
<li><a
href="a05813c058"><code>a05813c</code></a>
chore: bump <code>devDependencies</code> (<a
href="https://redirect.github.com/honojs/hono/issues/5085">#5085</a>)</li>
<li><a
href="872997d283"><code>872997d</code></a>
fix(bun): report the requested subprotocol on WSContext.protocol (<a
href="https://redirect.github.com/honojs/hono/issues/5059">#5059</a>)</li>
<li><a
href="82b321b5b0"><code>82b321b</code></a>
fix: avoid circular dependency between body.ts and request.ts (<a
href="https://redirect.github.com/honojs/hono/issues/5071">#5071</a>)</li>
<li><a
href="b20d4225c9"><code>b20d422</code></a>
fix(utils/body,validator): normalize Content-Type media type for
case-insensi...</li>
<li><a
href="9728702911"><code>9728702</code></a>
chore: don't publish <code>*.tsbuildinfo</code> (<a
href="https://redirect.github.com/honojs/hono/issues/5066">#5066</a>)</li>
<li><a
href="ed8795e5cc"><code>ed8795e</code></a>
docs(MIGRATION): fix req.raw.headers reference (property, not method)
(<a
href="https://redirect.github.com/honojs/hono/issues/5047">#5047</a>)</li>
<li><a
href="03a9416a13"><code>03a9416</code></a>
fix(serve-static): treat empty string content as found (<a
href="https://redirect.github.com/honojs/hono/issues/5062">#5062</a>)</li>
<li>See full diff in <a
href="https://github.com/honojs/hono/compare/v4.12.27...v4.12.28">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2026-07-06 17:58:26 +02:00
acp-release-bot[bot]
837989ef96 chore(main): release 0.56.0 (#839)
🤖 I have created a release *beep* *boop*
---


##
[0.56.0](https://github.com/agentclientprotocol/claude-agent-acp/compare/v0.55.0...v0.56.0)
(2026-07-06)


### Features

* **deps:** bump @anthropic-ai/claude-agent-sdk to 0.3.201
([#837](https://github.com/agentclientprotocol/claude-agent-acp/issues/837))
([ff2a8a9](ff2a8a9635))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: acp-release-bot[bot] <246668977+acp-release-bot[bot]@users.noreply.github.com>
2026-07-06 11:31:10 +02:00
dependabot[bot]
ff2a8a9635 feat(deps): bump @anthropic-ai/claude-agent-sdk to 0.3.201 (#837)
Bumps the minor group with 11 updates:

| Package | From | To |
| --- | --- | --- |
|
[@anthropic-ai/claude-agent-sdk](https://github.com/anthropics/claude-agent-sdk-typescript)
| `0.3.198` | `0.3.199` |
|
[@anthropic-ai/sdk](https://github.com/anthropics/anthropic-sdk-typescript)
| `0.109.1` | `0.110.0` |
| @anthropic-ai/claude-agent-sdk-darwin-arm64 | `0.3.198` | `0.3.199` |
| @anthropic-ai/claude-agent-sdk-darwin-x64 | `0.3.198` | `0.3.199` |
| @anthropic-ai/claude-agent-sdk-linux-arm64 | `0.3.198` | `0.3.199` |
| @anthropic-ai/claude-agent-sdk-linux-arm64-musl | `0.3.198` |
`0.3.199` |
| @anthropic-ai/claude-agent-sdk-linux-x64 | `0.3.198` | `0.3.199` |
| @anthropic-ai/claude-agent-sdk-linux-x64-musl | `0.3.198` | `0.3.199`
|
| @anthropic-ai/claude-agent-sdk-win32-arm64 | `0.3.198` | `0.3.199` |
| @anthropic-ai/claude-agent-sdk-win32-x64 | `0.3.198` | `0.3.199` |
| [picomatch](https://github.com/micromatch/picomatch) | `4.0.4` |
`4.0.5` |

Updates `@anthropic-ai/claude-agent-sdk` from 0.3.198 to 0.3.199
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/anthropics/claude-agent-sdk-typescript/releases">@​anthropic-ai/claude-agent-sdk's
releases</a>.</em></p>
<blockquote>
<h2>v0.3.199</h2>
<h2>What's changed</h2>
<ul>
<li>Added <code>requestId</code> to <code>canUseTool</code> callback
options for correlating out-of-band permission responses, and support
for returning <code>null</code> to suppress the SDK's automatic control
response</li>
<li>Added <code>blocked</code> field to <code>workflow_agent</code>
progress events indicating when an agent was blocked by the auto-mode
safety classifier</li>
<li>Added <code>mode:&quot;mask&quot;</code> and per-credential
<code>injectHosts</code> to <code>sandbox.credentials</code> settings
types for injecting masked credentials into sandboxed commands</li>
</ul>
<h2>Update</h2>
<pre lang="sh"><code>npm install @anthropic-ai/claude-agent-sdk@0.3.199
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.199
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.199
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.199
</code></pre>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/anthropics/claude-agent-sdk-typescript/blob/main/CHANGELOG.md">@​anthropic-ai/claude-agent-sdk's
changelog</a>.</em></p>
<blockquote>
<h2>0.3.199</h2>
<ul>
<li>Added <code>requestId</code> to <code>canUseTool</code> callback
options for correlating out-of-band permission responses, and support
for returning <code>null</code> to suppress the SDK's automatic control
response</li>
<li>Added <code>blocked</code> field to <code>workflow_agent</code>
progress events indicating when an agent was blocked by the auto-mode
safety classifier</li>
<li>Added <code>mode:&quot;mask&quot;</code> and per-credential
<code>injectHosts</code> to <code>sandbox.credentials</code> settings
types for injecting masked credentials into sandboxed commands</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="a0c02d6d99"><code>a0c02d6</code></a>
chore: Update CHANGELOG.md</li>
<li>See full diff in <a
href="https://github.com/anthropics/claude-agent-sdk-typescript/compare/v0.3.198...v0.3.199">compare
view</a></li>
</ul>
</details>
<br />

Updates `@anthropic-ai/sdk` from 0.109.1 to 0.110.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/anthropics/anthropic-sdk-typescript/releases">@​anthropic-ai/sdk's
releases</a>.</em></p>
<blockquote>
<h2>sdk: v0.110.0</h2>
<h2>0.110.0 (2026-07-02)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.109.1...sdk-v0.110.0">sdk-v0.109.1...sdk-v0.110.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> add agent-memory-2026-07-22 beta header (<a
href="a470e10aaa">a470e10</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/anthropics/anthropic-sdk-typescript/blob/main/CHANGELOG.md">@​anthropic-ai/sdk's
changelog</a>.</em></p>
<blockquote>
<h2>0.110.0 (2026-07-02)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.109.1...sdk-v0.110.0">sdk-v0.109.1...sdk-v0.110.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> add agent-memory-2026-07-22 beta header (<a
href="a470e10aaa">a470e10</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="4f2eb80719"><code>4f2eb80</code></a>
chore: release main (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-typescript/issues/1107">#1107</a>)</li>
<li>See full diff in <a
href="https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.109.1...sdk-v0.110.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `@anthropic-ai/claude-agent-sdk-darwin-arm64` from 0.3.198 to
0.3.199

Updates `@anthropic-ai/claude-agent-sdk-darwin-x64` from 0.3.198 to
0.3.199

Updates `@anthropic-ai/claude-agent-sdk-linux-arm64` from 0.3.198 to
0.3.199

Updates `@anthropic-ai/claude-agent-sdk-linux-arm64-musl` from 0.3.198
to 0.3.199

Updates `@anthropic-ai/claude-agent-sdk-linux-x64` from 0.3.198 to
0.3.199

Updates `@anthropic-ai/claude-agent-sdk-linux-x64-musl` from 0.3.198 to
0.3.199

Updates `@anthropic-ai/claude-agent-sdk-win32-arm64` from 0.3.198 to
0.3.199

Updates `@anthropic-ai/claude-agent-sdk-win32-x64` from 0.3.198 to
0.3.199

Updates `picomatch` from 4.0.4 to 4.0.5
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/micromatch/picomatch/releases">picomatch's
releases</a>.</em></p>
<blockquote>
<h2>4.0.5</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: preserve all branches when rewriting risky repeated extglobs by
<a href="https://github.com/MerlijnW70"><code>@​MerlijnW70</code></a> in
<a
href="https://redirect.github.com/micromatch/picomatch/pull/182">micromatch/picomatch#182</a></li>
<li>fix: honor the windows option when matching basenames by <a
href="https://github.com/MerlijnW70"><code>@​MerlijnW70</code></a> in <a
href="https://redirect.github.com/micromatch/picomatch/pull/183">micromatch/picomatch#183</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/MerlijnW70"><code>@​MerlijnW70</code></a> made
their first contribution in <a
href="https://redirect.github.com/micromatch/picomatch/pull/182">micromatch/picomatch#182</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/micromatch/picomatch/compare/4.0.4...4.0.5">https://github.com/micromatch/picomatch/compare/4.0.4...4.0.5</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="4f41a8edad"><code>4f41a8e</code></a>
4.0.5</li>
<li><a
href="02cfc1bf91"><code>02cfc1b</code></a>
Update .verb.md and run verb to generate README documentation</li>
<li><a
href="cc52ff6e86"><code>cc52ff6</code></a>
Only run the upload code coverage step for 1 matrix permutation</li>
<li><a
href="6d426d7fe9"><code>6d426d7</code></a>
Allow workflow to continue if the code coverage step to fails</li>
<li><a
href="a00b954c04"><code>a00b954</code></a>
Merge branch 'codeql-coverage'</li>
<li><a
href="96803818ca"><code>9680381</code></a>
Merge pull request <a
href="https://redirect.github.com/micromatch/picomatch/issues/183">#183</a>
from MerlijnW70/fix/matchbase-windows-basename</li>
<li><a
href="648b4f2f13"><code>648b4f2</code></a>
Merge pull request <a
href="https://redirect.github.com/micromatch/picomatch/issues/182">#182</a>
from MerlijnW70/fix/repeated-extglob-drops-branches</li>
<li><a
href="70e6485a54"><code>70e6485</code></a>
Configure code coverage upload for CodeQL</li>
<li><a
href="ab8bc4df81"><code>ab8bc4d</code></a>
fix: honor the windows option when matching basenames</li>
<li><a
href="628930764f"><code>6289307</code></a>
fix: preserve all branches when rewriting risky repeated extglobs</li>
<li>Additional commits viewable in <a
href="https://github.com/micromatch/picomatch/compare/4.0.4...4.0.5">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2026-07-06 11:18:45 +02:00
10 changed files with 375 additions and 246 deletions

View File

@@ -1,3 +1,3 @@
{
".": "0.55.0"
".": "0.57.0"
}

View File

@@ -1,5 +1,24 @@
# Changelog
## [0.57.0](https://github.com/agentclientprotocol/claude-agent-acp/compare/v0.56.0...v0.57.0) (2026-07-07)
### Features
* Update @anthropic-ai/claude-agent-sdk to 0.3.202 ([#843](https://github.com/agentclientprotocol/claude-agent-acp/issues/843)) ([1612c07](https://github.com/agentclientprotocol/claude-agent-acp/commit/1612c078953c134e12368a2d968a9bcf14d31b55))
### Bug Fixes
* don't emit empty agent_message_chunk ([#841](https://github.com/agentclientprotocol/claude-agent-acp/issues/841)) ([d74dd1d](https://github.com/agentclientprotocol/claude-agent-acp/commit/d74dd1d9d356050fc87f9fdab8599f1546b12a2c))
## [0.56.0](https://github.com/agentclientprotocol/claude-agent-acp/compare/v0.55.0...v0.56.0) (2026-07-06)
### Features
* **deps:** bump @anthropic-ai/claude-agent-sdk to 0.3.201 ([#837](https://github.com/agentclientprotocol/claude-agent-acp/issues/837)) ([ff2a8a9](https://github.com/agentclientprotocol/claude-agent-acp/commit/ff2a8a963536a4265700e4f2003a0ffff93c9087))
## [0.55.0](https://github.com/agentclientprotocol/claude-agent-acp/compare/v0.54.1...v0.55.0) (2026-07-02)

312
package-lock.json generated
View File

@@ -1,66 +1,66 @@
{
"name": "@agentclientprotocol/claude-agent-acp",
"version": "0.55.0",
"version": "0.57.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@agentclientprotocol/claude-agent-acp",
"version": "0.55.0",
"version": "0.57.0",
"license": "Apache-2.0",
"dependencies": {
"@agentclientprotocol/sdk": "1.1.0",
"@anthropic-ai/claude-agent-sdk": "0.3.198",
"@agentclientprotocol/sdk": "1.2.0",
"@anthropic-ai/claude-agent-sdk": "0.3.202",
"zod": "^3.25.0 || ^4.0.0"
},
"bin": {
"claude-agent-acp": "dist/index.js"
},
"devDependencies": {
"@anthropic-ai/sdk": "0.109.1",
"@anthropic-ai/sdk": "0.110.0",
"@eslint/js": "10.0.1",
"@tsconfig/node22": "22.0.5",
"@types/node": "26.1.0",
"@typescript-eslint/eslint-plugin": "8.62.1",
"@typescript-eslint/parser": "8.62.1",
"@typescript-eslint/eslint-plugin": "8.63.0",
"@typescript-eslint/parser": "8.63.0",
"eslint": "10.6.0",
"eslint-config-prettier": "10.1.8",
"globals": "17.7.0",
"prettier": "3.9.4",
"ts-node": "10.9.2",
"typescript": "6.0.3",
"vitest": "4.1.9"
"vitest": "4.1.10"
},
"engines": {
"node": ">=22"
}
},
"node_modules/@agentclientprotocol/sdk": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@agentclientprotocol/sdk/-/sdk-1.1.0.tgz",
"integrity": "sha512-NT2KqphUJ3w6EksUL51ZhJgIYgq/ZLGcBPkyMKgRSO5PMVwe9DnKKX+Htnvk6KHh6dUuh34UHK4gKp+4te1Mdg==",
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@agentclientprotocol/sdk/-/sdk-1.2.0.tgz",
"integrity": "sha512-rJ3766M2eouZsNCaK21JbPD++JLBZ0PWq38dzj1sA4/i0njaQEkiC2F5v7MlizFW6akX+qu5Ks8R00Xw+YMHKA==",
"license": "Apache-2.0",
"peerDependencies": {
"zod": "^3.25.0 || ^4.0.0"
}
},
"node_modules/@anthropic-ai/claude-agent-sdk": {
"version": "0.3.198",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk/-/claude-agent-sdk-0.3.198.tgz",
"integrity": "sha512-xt469sSCyclTPtzpLAg0Aschy665GiRMgZKabSmESbGUA5/H56HcILVOiFxclXswkeMUk2fQxfHJUY9UZfiTnA==",
"version": "0.3.202",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk/-/claude-agent-sdk-0.3.202.tgz",
"integrity": "sha512-LnaLxDtsZP7J6g++xRSnnpTX7CHNe4v+cvBRIlD2ar+N+xi0aqY2YDaCsxPsl+haVUB9kqlUMd0zosmwsfTGjQ==",
"license": "SEE LICENSE IN README.md",
"engines": {
"node": ">=18.0.0"
},
"optionalDependencies": {
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.198",
"@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.198",
"@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.198",
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.198",
"@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.198",
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.198",
"@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.198",
"@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.198"
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.202",
"@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.202",
"@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.202",
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.202",
"@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.202",
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.202",
"@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.202",
"@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.202"
},
"peerDependencies": {
"@anthropic-ai/sdk": ">=0.93.0",
@@ -69,9 +69,9 @@
}
},
"node_modules/@anthropic-ai/claude-agent-sdk-darwin-arm64": {
"version": "0.3.198",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-darwin-arm64/-/claude-agent-sdk-darwin-arm64-0.3.198.tgz",
"integrity": "sha512-ZmiAybQKIKcP1qEAE/vfXvfxtKxG9CnJn98QTXC5Zxiwuy7Mllx2ALXh9dfmsf0V87CGEodlZQmMgUJotNIsUw==",
"version": "0.3.202",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-darwin-arm64/-/claude-agent-sdk-darwin-arm64-0.3.202.tgz",
"integrity": "sha512-ujR3zDthDPkZs+AxW95iHpqLT5cuwGImsS3mVxLt1DlDij4qeTnihLX8+EpQTK+oNW9jjvFA86yKwa84fa1KYA==",
"cpu": [
"arm64"
],
@@ -82,9 +82,9 @@
]
},
"node_modules/@anthropic-ai/claude-agent-sdk-darwin-x64": {
"version": "0.3.198",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-darwin-x64/-/claude-agent-sdk-darwin-x64-0.3.198.tgz",
"integrity": "sha512-XwH5vgN46WSwg8aC1OagNofnJpV/G1ciEu118GEKer8ZhVkq/dvK/DqShxMkb6r1jV7u5IJ7zPXu9uKliyNJAw==",
"version": "0.3.202",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-darwin-x64/-/claude-agent-sdk-darwin-x64-0.3.202.tgz",
"integrity": "sha512-s/RVSGgkVmIMfyt1ndR8braLLu82bARoijmt1kk8d4IptUZ0Sc+zNUWKoFXwR9XqDBu6rBbBF9RIzD02raT57w==",
"cpu": [
"x64"
],
@@ -95,9 +95,9 @@
]
},
"node_modules/@anthropic-ai/claude-agent-sdk-linux-arm64": {
"version": "0.3.198",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-arm64/-/claude-agent-sdk-linux-arm64-0.3.198.tgz",
"integrity": "sha512-qmz8dxEtDIlKntU5qYe0R4aWTxTue5S7zIQknatLX7aJ6HN/nq1aCNXWn5smTH2FViBkUPPR+sCIsNwSk6AT6Q==",
"version": "0.3.202",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-arm64/-/claude-agent-sdk-linux-arm64-0.3.202.tgz",
"integrity": "sha512-a4YtRkgGYt3ogePJDW8Ts6bNW690jb9LHyZaiWXsi+zT53xCNqJB2zKPyRc7hXWOqzIk4nCfwJpjmhLzMu3WIg==",
"cpu": [
"arm64"
],
@@ -111,9 +111,9 @@
]
},
"node_modules/@anthropic-ai/claude-agent-sdk-linux-arm64-musl": {
"version": "0.3.198",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-arm64-musl/-/claude-agent-sdk-linux-arm64-musl-0.3.198.tgz",
"integrity": "sha512-Q7lKVNjIrUQ2B/AR77OvRf0zeOdEjonFVaR9FYrrwtzGeEqum69WSht5nM7Y7el3wjbNi0/eV0QTUM0DlsTEfw==",
"version": "0.3.202",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-arm64-musl/-/claude-agent-sdk-linux-arm64-musl-0.3.202.tgz",
"integrity": "sha512-abSb3Gah45kUNyOeKjmQ/dd1KZ4CaQz5JAr9YQxRDXoOwx8wJVx6huBIpDxjms9wyS9X5Rqxn0Lx7zFP+wV2zQ==",
"cpu": [
"arm64"
],
@@ -127,9 +127,9 @@
]
},
"node_modules/@anthropic-ai/claude-agent-sdk-linux-x64": {
"version": "0.3.198",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-x64/-/claude-agent-sdk-linux-x64-0.3.198.tgz",
"integrity": "sha512-Zqxyz2AT1UM5WlOOoLJhLssZDgZo8rBK5ku6daveK12zp+UTJGZhGsjFghz1/ASxH08KqOTbUePNTORnPhHAEQ==",
"version": "0.3.202",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-x64/-/claude-agent-sdk-linux-x64-0.3.202.tgz",
"integrity": "sha512-XIvhdCWAAT4OdOA82fOJII+WH0Tf8pFckckEbJMMmOgQBKOnHT+609Pd3Ehw6zGcA9iFrhG5mY8Ncuckeo1aMw==",
"cpu": [
"x64"
],
@@ -143,9 +143,9 @@
]
},
"node_modules/@anthropic-ai/claude-agent-sdk-linux-x64-musl": {
"version": "0.3.198",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-x64-musl/-/claude-agent-sdk-linux-x64-musl-0.3.198.tgz",
"integrity": "sha512-h1SrWVIMjLInYNPlf+TxXuKTOdoiOfJLBSoQG97315Z2Nh0IpBfqWExlqYTtPCgKE7q2iga31U283QfHpIDlSQ==",
"version": "0.3.202",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-x64-musl/-/claude-agent-sdk-linux-x64-musl-0.3.202.tgz",
"integrity": "sha512-fze5nAQL1ErcMCQNB10ILaWdM0QbJSaTQzBz8NVAy0FGW8ZL0t4Wf/VgFkfzXbfkaxmPuM1C27Dn5HiU7UDEHQ==",
"cpu": [
"x64"
],
@@ -159,9 +159,9 @@
]
},
"node_modules/@anthropic-ai/claude-agent-sdk-win32-arm64": {
"version": "0.3.198",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-win32-arm64/-/claude-agent-sdk-win32-arm64-0.3.198.tgz",
"integrity": "sha512-mjIHf1HFiRuXefewWTaNZFlTZlCaEt/xsRjc1nSTCEEpFolZayVhrDKz+O2QFVcDtPl8x8GeYSL0kiikg1DZjQ==",
"version": "0.3.202",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-win32-arm64/-/claude-agent-sdk-win32-arm64-0.3.202.tgz",
"integrity": "sha512-N1J0HRvC+8a69bqNY7+ENIYQzR0i7s+rOIGH5XtuLxvLqOnZO8LHxWEZOe8ezabGq5eZqphSCgL6vQnQQpNh+A==",
"cpu": [
"arm64"
],
@@ -172,9 +172,9 @@
]
},
"node_modules/@anthropic-ai/claude-agent-sdk-win32-x64": {
"version": "0.3.198",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-win32-x64/-/claude-agent-sdk-win32-x64-0.3.198.tgz",
"integrity": "sha512-y3HLuCCz1kDwUrhd6OnqO+d5BUpTFSzNUsPT9kf3r1vk9HYKF+eMC9eIlcOhiW2kX491kxEvuEOfqgIkGx15cg==",
"version": "0.3.202",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-win32-x64/-/claude-agent-sdk-win32-x64-0.3.202.tgz",
"integrity": "sha512-ytLGEC1fjTSiVSoXukS+j9G+06Mi20NSzxxzlG6uE75SEB0+17tHdWUaHqd8PhH/6GPzcYx81czxWQl1MVbq4Q==",
"cpu": [
"x64"
],
@@ -185,9 +185,9 @@
]
},
"node_modules/@anthropic-ai/sdk": {
"version": "0.109.1",
"resolved": "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-0.109.1.tgz",
"integrity": "sha512-q9OnEKLr5H9nxSuXdgDgJhxfYMiE+AaUEBze2Gk91UcaaLnsN+Lx5fbCYywiqurU/APLdwv23x03Wm6WN3EBsg==",
"version": "0.110.0",
"resolved": "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-0.110.0.tgz",
"integrity": "sha512-hOP4bNYXDFHDxxiEgzlILXrxZIYCDnhe8sry0RDRKD/QnsEpvZcQpablCdm9X/WuD/YgOiSIkkqsL1mLLlTqJw==",
"license": "MIT",
"dependencies": {
"json-schema-to-ts": "^3.1.1",
@@ -944,17 +944,17 @@
}
},
"node_modules/@typescript-eslint/eslint-plugin": {
"version": "8.62.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.62.1.tgz",
"integrity": "sha512-4EQM77WgVNxj7OkL/5b/D/xZsw00G577+UriYTC7JF5opcF3T2AuoeY7ueLaZgSVjSgCS6yOAJB5bRGLPSJUzA==",
"version": "8.63.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.63.0.tgz",
"integrity": "sha512-rvwSgqT+DHpWdzfSzPatRLm02a0GlESt++9iy3hLCDY4BgkaLcl8LBi9Yh7XGFBpwcBE/K3024QuXWTpbz4FfQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@eslint-community/regexpp": "^4.12.2",
"@typescript-eslint/scope-manager": "8.62.1",
"@typescript-eslint/type-utils": "8.62.1",
"@typescript-eslint/utils": "8.62.1",
"@typescript-eslint/visitor-keys": "8.62.1",
"@typescript-eslint/scope-manager": "8.63.0",
"@typescript-eslint/type-utils": "8.63.0",
"@typescript-eslint/utils": "8.63.0",
"@typescript-eslint/visitor-keys": "8.63.0",
"ignore": "^7.0.5",
"natural-compare": "^1.4.0",
"ts-api-utils": "^2.5.0"
@@ -967,22 +967,22 @@
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependencies": {
"@typescript-eslint/parser": "^8.62.1",
"@typescript-eslint/parser": "^8.63.0",
"eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
"typescript": ">=4.8.4 <6.1.0"
}
},
"node_modules/@typescript-eslint/parser": {
"version": "8.62.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.62.1.tgz",
"integrity": "sha512-sPhE4iHuJDSvoAiec+Ro8JyXw8f0ql13HFR82P99nCm9GwTEKG0KYLvDe6REk8BCXuit6vJAv/Yxg5ABaNS2rA==",
"version": "8.63.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.63.0.tgz",
"integrity": "sha512-gwh4gvvlaVDKKxyfxMG+Gnu1u9X0OQBwyGLkbwB65dIzBKnxeRiJlNFqlI3zwVhNXJIs6qV7mlFCn/BIajlVig==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/scope-manager": "8.62.1",
"@typescript-eslint/types": "8.62.1",
"@typescript-eslint/typescript-estree": "8.62.1",
"@typescript-eslint/visitor-keys": "8.62.1",
"@typescript-eslint/scope-manager": "8.63.0",
"@typescript-eslint/types": "8.63.0",
"@typescript-eslint/typescript-estree": "8.63.0",
"@typescript-eslint/visitor-keys": "8.63.0",
"debug": "^4.4.3"
},
"engines": {
@@ -998,14 +998,14 @@
}
},
"node_modules/@typescript-eslint/project-service": {
"version": "8.62.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.62.1.tgz",
"integrity": "sha512-yQ3RgY5RkSBpsNS1Bx/JQEcA24FOSdfGktoyprAr5u18390UQdtVcfnEv4nIrIshNnavlVyZBKxQwT1fIAE6cg==",
"version": "8.63.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.63.0.tgz",
"integrity": "sha512-e5dh0/UI0ok53AlZ5wRkXCB32z/f2jUZqPR/ygAw5WYaSw8j9EoJWlS7wQjr/dmOaqWjnPIn2m+HhVPCMWGZVQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/tsconfig-utils": "^8.62.1",
"@typescript-eslint/types": "^8.62.1",
"@typescript-eslint/tsconfig-utils": "^8.63.0",
"@typescript-eslint/types": "^8.63.0",
"debug": "^4.4.3"
},
"engines": {
@@ -1020,14 +1020,14 @@
}
},
"node_modules/@typescript-eslint/scope-manager": {
"version": "8.62.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.62.1.tgz",
"integrity": "sha512-r4d249KbQ1SFdpeStvob8Ih6aPPIzfqllPVOtvhve6ZcpuVcYo5/7zUWckKpHE7StASX4kTKZTLf0WQm/wPkcg==",
"version": "8.63.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.63.0.tgz",
"integrity": "sha512-uUyfMWCnDSN8bCpcrY8nGP2BLkQ9Xn0GsipcONcpIDWhwhO4ZSyHvyS14U3X75mzxWxL3I2UZIrenTzdzcJO8A==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.62.1",
"@typescript-eslint/visitor-keys": "8.62.1"
"@typescript-eslint/types": "8.63.0",
"@typescript-eslint/visitor-keys": "8.63.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -1038,9 +1038,9 @@
}
},
"node_modules/@typescript-eslint/tsconfig-utils": {
"version": "8.62.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.62.1.tgz",
"integrity": "sha512-xadytJqX9vJVQ2fdQjkcIVigwaOJNWkpjdLt6cEQ+xPnrI1fkp+/jZE/I97k9KUjqtpd25i0HeyZf3T6dutv2g==",
"version": "8.63.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.63.0.tgz",
"integrity": "sha512-sUAbkulqBAsncKnbRP3+7CtQFRKicexnj7ZwNC6ddCR7EmrXvjvdCYMJbUIqMd6lwoEriZjwLo08aS5tSjVMHg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -1055,15 +1055,15 @@
}
},
"node_modules/@typescript-eslint/type-utils": {
"version": "8.62.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.62.1.tgz",
"integrity": "sha512-aXM5xlqXiTxPibXB93cLAURfT3rlizf7uMXISCXy66Isr/9hISJx3yDsKl0L7lKa51b8JpFuNKby0/O0pEm9jg==",
"version": "8.63.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.63.0.tgz",
"integrity": "sha512-Nzzh/OGxVCOjObjaj1CQF2RUasyYy2Jfuh+zZ3PjLzG2fYRriAiZLib9UKtO+CpQAS3YHiAS+ckZDclwqI1TPA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.62.1",
"@typescript-eslint/typescript-estree": "8.62.1",
"@typescript-eslint/utils": "8.62.1",
"@typescript-eslint/types": "8.63.0",
"@typescript-eslint/typescript-estree": "8.63.0",
"@typescript-eslint/utils": "8.63.0",
"debug": "^4.4.3",
"ts-api-utils": "^2.5.0"
},
@@ -1080,9 +1080,9 @@
}
},
"node_modules/@typescript-eslint/types": {
"version": "8.62.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.62.1.tgz",
"integrity": "sha512-ooCzJFaf+Hg+uG6fA3NRFGuFjlfNlDhBthbv4ZPU/0elCAFUfnyXUvf/WOpHz/jYwSmvU2GkR2LtyUfy1AxZ1Q==",
"version": "8.63.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.63.0.tgz",
"integrity": "sha512-xyLtl9DUBBFrcJS4x2pIqGLH68/tC2uOa4Z7pUteW09D3bXnnXUom4dyPikzWgB7llmIc1zoeI3aoUdC4rPK/Q==",
"dev": true,
"license": "MIT",
"engines": {
@@ -1094,16 +1094,16 @@
}
},
"node_modules/@typescript-eslint/typescript-estree": {
"version": "8.62.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.62.1.tgz",
"integrity": "sha512-xMcW9oP9u7fAMXYs9A65CVmtLQe2r//oXINHfi8HV+oiqhih17sbLdhXr4540YWlgpDKQdY854OL5ZrdCiQsAA==",
"version": "8.63.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.63.0.tgz",
"integrity": "sha512-ygBkU+B7ex5UI/gKhaqexWev79uISfIv7XQCRNYO/jmD8rGLPyWLAb3KMRT6nd8Gt9bmUBi9+iX6tBdYfOY81Q==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/project-service": "8.62.1",
"@typescript-eslint/tsconfig-utils": "8.62.1",
"@typescript-eslint/types": "8.62.1",
"@typescript-eslint/visitor-keys": "8.62.1",
"@typescript-eslint/project-service": "8.63.0",
"@typescript-eslint/tsconfig-utils": "8.63.0",
"@typescript-eslint/types": "8.63.0",
"@typescript-eslint/visitor-keys": "8.63.0",
"debug": "^4.4.3",
"minimatch": "^10.2.2",
"semver": "^7.7.3",
@@ -1122,16 +1122,16 @@
}
},
"node_modules/@typescript-eslint/utils": {
"version": "8.62.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.62.1.tgz",
"integrity": "sha512-sHtbPfuKNZCG+ih8SyjjucqRntSVmp8XgL5u6o9mAhiSn8ds5o/M/XdM0abweme2Tln3szOstOrZ9OXitvPh0g==",
"version": "8.63.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.63.0.tgz",
"integrity": "sha512-fUKaeAvrTuQg/Tgt3nliAUSZHJM6DlCcfyEmxCvlX8kieWSStBX+5O5Fnidtc3i2JrH+9c/GL4RY2iasd/GPTA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@eslint-community/eslint-utils": "^4.9.1",
"@typescript-eslint/scope-manager": "8.62.1",
"@typescript-eslint/types": "8.62.1",
"@typescript-eslint/typescript-estree": "8.62.1"
"@typescript-eslint/scope-manager": "8.63.0",
"@typescript-eslint/types": "8.63.0",
"@typescript-eslint/typescript-estree": "8.63.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -1146,13 +1146,13 @@
}
},
"node_modules/@typescript-eslint/visitor-keys": {
"version": "8.62.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.62.1.tgz",
"integrity": "sha512-4g3BLxfdTMy8iZG0MaBkadnlRrCJ74cQiFbyEVMrkwIoqdyaXXQM22cotDvrl4x28wgIZ9rEJRoM+mmhSJpJ1g==",
"version": "8.63.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.63.0.tgz",
"integrity": "sha512-UexrHGnGTpbuQHct2ExOc2ZcFbGUS9FOesCxxqdBGcpI1BxYu/LZ6U8Aq6/72XtF/qRBk9nhuGHFJIXXMhPMdw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.62.1",
"@typescript-eslint/types": "8.63.0",
"eslint-visitor-keys": "^5.0.0"
},
"engines": {
@@ -1177,16 +1177,16 @@
}
},
"node_modules/@vitest/expect": {
"version": "4.1.9",
"resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.9.tgz",
"integrity": "sha512-vl/rYsUKcBr3SnQn166+XR5ZQcgMx3DQhFWdfli/cWpLnLUmbxZvyrJZotLFUryib+LtArYMSTJ5RbQ57ZqrlA==",
"version": "4.1.10",
"resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.10.tgz",
"integrity": "sha512-YsCn+qAk1GWjQOWFEsEcL2gNQ0zmVmQu3T03qP6UyjhtmdtwtbuI+DASn/7iQB3HGTXkdBwGddzxPlmiql5vlA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@standard-schema/spec": "^1.1.0",
"@types/chai": "^5.2.2",
"@vitest/spy": "4.1.9",
"@vitest/utils": "4.1.9",
"@vitest/spy": "4.1.10",
"@vitest/utils": "4.1.10",
"chai": "^6.2.2",
"tinyrainbow": "^3.1.0"
},
@@ -1195,13 +1195,13 @@
}
},
"node_modules/@vitest/mocker": {
"version": "4.1.9",
"resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.9.tgz",
"integrity": "sha512-EVkXzBjrPGM+cK8/ANWgBrkUCfJfb38/EfTSO8h7pWvKkyPkpWxvR7BkD2MyItMF62C97zAEoqdpUixwR/e+Rw==",
"version": "4.1.10",
"resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.10.tgz",
"integrity": "sha512-v0xaezt+DKEmKfaxg133ldzADrwLGd7Ze1MfQQTYfvs8OqZIwbxyxaYURivwV7sWy5fqn3rH5uOrSp07bp44Ow==",
"dev": true,
"license": "MIT",
"dependencies": {
"@vitest/spy": "4.1.9",
"@vitest/spy": "4.1.10",
"estree-walker": "^3.0.3",
"magic-string": "^0.30.21"
},
@@ -1222,9 +1222,9 @@
}
},
"node_modules/@vitest/pretty-format": {
"version": "4.1.9",
"resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.9.tgz",
"integrity": "sha512-s0iufns3iIFitdgm+YR7g1whCAaGtXz459VS9/PqyKDEEFgYIhsHOQmXgIgDuYCt7DeQmiZT0Qe2OA2p4ZPu5A==",
"version": "4.1.10",
"resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.10.tgz",
"integrity": "sha512-W1HsjSH4MXQ9YfmmhLAoIYf1HRfekQCGngeIgcei6MP5QQGWUe0gkopdZQaVCFO+JDJMrAJGwa5pRpNpvy4P8Q==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1235,13 +1235,13 @@
}
},
"node_modules/@vitest/runner": {
"version": "4.1.9",
"resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.9.tgz",
"integrity": "sha512-KXLMDtc7oe70+3mJfGrPUWPesswH+3sTxAMAMl8DG7I8IUQT4XW718dY5ID3vPUcmlu27CcKfY4P3h3I29SLJg==",
"version": "4.1.10",
"resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.10.tgz",
"integrity": "sha512-IKI6kpIH+LmpROplyLwBBaCfMgOZOMsygVa6BARD6ahA04VRuJSa6OaVG7kRvSEMD870Vd91rSSw0eegtWyLGg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@vitest/utils": "4.1.9",
"@vitest/utils": "4.1.10",
"pathe": "^2.0.3"
},
"funding": {
@@ -1249,14 +1249,14 @@
}
},
"node_modules/@vitest/snapshot": {
"version": "4.1.9",
"resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.9.tgz",
"integrity": "sha512-Jc7RKGNBo8Z28WYIm0Niej4xdSPByRf6mU58VpHQkd6Zh05rlnA+twjbK5HyeIGHxrzsc3mJgS43uM0CZKzaIA==",
"version": "4.1.10",
"resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.10.tgz",
"integrity": "sha512-xRkfOT1qpTAi/Ti4Y1LtfRc3kEuqxGw59eN2jN9pRWMtS/XDevekhcFSqvQqjUNGksfjMJu3Y+oJ+4Ypn2OaJw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@vitest/pretty-format": "4.1.9",
"@vitest/utils": "4.1.9",
"@vitest/pretty-format": "4.1.10",
"@vitest/utils": "4.1.10",
"magic-string": "^0.30.21",
"pathe": "^2.0.3"
},
@@ -1265,9 +1265,9 @@
}
},
"node_modules/@vitest/spy": {
"version": "4.1.9",
"resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.9.tgz",
"integrity": "sha512-fHpsS6mIi+PiEW+vcRVOMkX1oSaPKne3VOclSFICPcGOmfKgXPU5iAah+wcNcj2xPrCCmfq99IDGf+EojhhvhA==",
"version": "4.1.10",
"resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.10.tgz",
"integrity": "sha512-PLf/Ugvoq5wO/b4rwYCR1h2PSIdXz7wnkQFMiUpLdtM7l6pqVFcQIBEHyT1+l+cj7mNwAfZHzqXqDyjvOuwbDw==",
"dev": true,
"license": "MIT",
"funding": {
@@ -1275,13 +1275,13 @@
}
},
"node_modules/@vitest/utils": {
"version": "4.1.9",
"resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.9.tgz",
"integrity": "sha512-A51o8ymO5PpqlWNnBP9ZHPXDIpuMtTLlGSjN7la4US+LJzoUMyhwjA5QXlm39JexgwHKW4Xjs8Z2d3dLCXOeuA==",
"version": "4.1.10",
"resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.10.tgz",
"integrity": "sha512-fy9am/HWxbaGt/Sawrp90vt6Y6jQwf1RX77cz3uwoJwJVMli/e1IEwRPnMNJ7vKfPTwo0diXifkpPvwH9v7nGA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@vitest/pretty-format": "4.1.9",
"@vitest/pretty-format": "4.1.10",
"convert-source-map": "^2.0.0",
"tinyrainbow": "^3.1.0"
},
@@ -2371,9 +2371,9 @@
}
},
"node_modules/hono": {
"version": "4.12.27",
"resolved": "https://registry.npmjs.org/hono/-/hono-4.12.27.tgz",
"integrity": "sha512-1yrb/+w6HWQJrUCLkJ2IF5jNIPvvFkblV5RNOYl6bV+OA6p9GLcMpHFFGTosSvHvcAUibuUukRqhlYI4z32C7Q==",
"version": "4.12.28",
"resolved": "https://registry.npmjs.org/hono/-/hono-4.12.28.tgz",
"integrity": "sha512-YwUvVpSF7m1yOblFPrU3Hbo8XhPheBoiyfGuII6z19LnOr6JpDnyyp7LFNrfV56wS8tpvtBFGRISHN02pDdLOA==",
"license": "MIT",
"peer": true,
"engines": {
@@ -2402,9 +2402,9 @@
}
},
"node_modules/iconv-lite": {
"version": "0.7.2",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz",
"integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==",
"version": "0.7.3",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.3.tgz",
"integrity": "sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ==",
"license": "MIT",
"peer": true,
"dependencies": {
@@ -3165,9 +3165,9 @@
"license": "ISC"
},
"node_modules/picomatch": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz",
"integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==",
"version": "4.0.5",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz",
"integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==",
"dev": true,
"license": "MIT",
"engines": {
@@ -3904,19 +3904,19 @@
}
},
"node_modules/vitest": {
"version": "4.1.9",
"resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.9.tgz",
"integrity": "sha512-nE3/LEyc0z87uHYLZebqCUOaJr2hdtuPp7BQ4BosVFnfltxgAvMG08NyrSGlPpOUWvR27c5flSmYFTNr78L9GQ==",
"version": "4.1.10",
"resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.10.tgz",
"integrity": "sha512-R9jUTe5S4Qb0HCd4TNqpC7oGcrMssMRGXLW80ubjWsW9VH5GF8y1Y0SFLY9AbqSk6nt0PnOx4H4WNJYZ13GUPw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@vitest/expect": "4.1.9",
"@vitest/mocker": "4.1.9",
"@vitest/pretty-format": "4.1.9",
"@vitest/runner": "4.1.9",
"@vitest/snapshot": "4.1.9",
"@vitest/spy": "4.1.9",
"@vitest/utils": "4.1.9",
"@vitest/expect": "4.1.10",
"@vitest/mocker": "4.1.10",
"@vitest/pretty-format": "4.1.10",
"@vitest/runner": "4.1.10",
"@vitest/snapshot": "4.1.10",
"@vitest/spy": "4.1.10",
"@vitest/utils": "4.1.10",
"es-module-lexer": "^2.0.0",
"expect-type": "^1.3.0",
"magic-string": "^0.30.21",
@@ -3944,12 +3944,12 @@
"@edge-runtime/vm": "*",
"@opentelemetry/api": "^1.9.0",
"@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0",
"@vitest/browser-playwright": "4.1.9",
"@vitest/browser-preview": "4.1.9",
"@vitest/browser-webdriverio": "4.1.9",
"@vitest/coverage-istanbul": "4.1.9",
"@vitest/coverage-v8": "4.1.9",
"@vitest/ui": "4.1.9",
"@vitest/browser-playwright": "4.1.10",
"@vitest/browser-preview": "4.1.10",
"@vitest/browser-webdriverio": "4.1.10",
"@vitest/coverage-istanbul": "4.1.10",
"@vitest/coverage-v8": "4.1.10",
"@vitest/ui": "4.1.10",
"happy-dom": "*",
"jsdom": "*",
"vite": "^6.0.0 || ^7.0.0 || ^8.0.0"

View File

@@ -3,7 +3,7 @@
"publishConfig": {
"access": "public"
},
"version": "0.55.0",
"version": "0.57.0",
"description": "An ACP-compatible coding agent powered by the Claude Agent SDK (TypeScript)",
"main": "dist/lib.js",
"types": "dist/lib.d.ts",
@@ -63,23 +63,23 @@
"node": ">=22"
},
"dependencies": {
"@agentclientprotocol/sdk": "1.1.0",
"@anthropic-ai/claude-agent-sdk": "0.3.198",
"@agentclientprotocol/sdk": "1.2.0",
"@anthropic-ai/claude-agent-sdk": "0.3.202",
"zod": "^3.25.0 || ^4.0.0"
},
"devDependencies": {
"@anthropic-ai/sdk": "0.109.1",
"@anthropic-ai/sdk": "0.110.0",
"@eslint/js": "10.0.1",
"@tsconfig/node22": "22.0.5",
"@types/node": "26.1.0",
"@typescript-eslint/eslint-plugin": "8.62.1",
"@typescript-eslint/parser": "8.62.1",
"@typescript-eslint/eslint-plugin": "8.63.0",
"@typescript-eslint/parser": "8.63.0",
"eslint": "10.6.0",
"eslint-config-prettier": "10.1.8",
"globals": "17.7.0",
"prettier": "3.9.4",
"ts-node": "10.9.2",
"typescript": "6.0.3",
"vitest": "4.1.9"
"vitest": "4.1.10"
}
}

View File

@@ -578,6 +578,9 @@ export function isLocalCommandMetadata(content: unknown): boolean {
const PERMISSION_MODE_ALIASES: Record<string, PermissionMode> = {
auto: "auto",
default: "default",
// Claude Code 2.1.200 renamed the "default" mode to "Manual" and accepts
// `"defaultMode": "manual"` in settings.json; honor the same alias here.
manual: "default",
acceptedits: "acceptEdits",
dontask: "dontAsk",
plan: "plan",
@@ -4047,8 +4050,10 @@ function buildAvailableModes(modelInfo: ModelInfo | undefined): SessionModeState
modes.push(
{
// Claude Code 2.1.200 renamed this mode to "Manual" across its surfaces;
// the wire id stays "default" ("manual" is only an accepted input alias).
id: "default",
name: "Default",
name: "Manual",
description: "Standard behavior, prompts for dangerous operations",
},
{
@@ -4852,6 +4857,9 @@ export function toAcpNotifications(
const registerHooks = options?.registerHooks !== false;
const supportsTerminalOutput = options?.clientCapabilities?._meta?.["terminal_output"] === true;
if (typeof content === "string") {
if (content.length === 0) {
return [];
}
const update: SessionNotification["update"] = {
sessionUpdate: role === "assistant" ? "agent_message_chunk" : "user_message_chunk",
content: {
@@ -4881,13 +4889,15 @@ export function toAcpNotifications(
switch (chunk.type) {
case "text":
case "text_delta":
update = {
sessionUpdate: role === "assistant" ? "agent_message_chunk" : "user_message_chunk",
content: {
type: "text",
text: chunk.text,
},
};
if (chunk.text.length > 0) {
update = {
sessionUpdate: role === "assistant" ? "agent_message_chunk" : "user_message_chunk",
content: {
type: "text",
text: chunk.text,
},
};
}
break;
case "image":
update = {

View File

@@ -2,6 +2,8 @@ import { randomUUID } from "node:crypto";
import type {
CreateElicitationRequest,
CreateElicitationResponse,
ElicitationAcceptAction,
ElicitationContentValue,
ElicitationPropertySchema,
ElicitationSchema,
EnumOption,
@@ -68,6 +70,45 @@ export function mcpElicitationToCreateRequest(
};
}
/** A wire value allowed in elicitation form content. */
function isElicitationContentValue(value: unknown): value is ElicitationContentValue {
return (
typeof value === "string" ||
typeof value === "number" ||
typeof value === "boolean" ||
(Array.isArray(value) && value.every((item) => typeof item === "string"))
);
}
/**
* Content of an accepted elicitation response.
*
* The response union includes a custom/future-action variant whose `action` is
* plain `string`, so a positive `=== "accept"` check can never narrow it away
* and `content` reads as `unknown`. Rather than asserting which union member
* this is, validate the values: the SDK's own wire validation has the same
* blind spot (an accept response with malformed content parses via the
* catch-all variant), so ill-typed values are dropped here either way.
*/
function acceptedElicitationContent(
response: CreateElicitationResponse,
): NonNullable<ElicitationAcceptAction["content"]> {
if (response.action !== "accept") {
return {};
}
const { content } = response;
if (!content || typeof content !== "object") {
return {};
}
const validated: NonNullable<ElicitationAcceptAction["content"]> = {};
for (const [key, value] of Object.entries(content)) {
if (isElicitationContentValue(value)) {
validated[key] = value;
}
}
return validated;
}
/**
* Map an ACP elicitation response back to the MCP `ElicitResult` the SDK expects
* to hand back to the requesting server.
@@ -77,7 +118,7 @@ export function createElicitationResponseToElicitResult(
): ElicitationResult {
switch (response.action) {
case "accept":
return { action: "accept", content: response.content ?? {} };
return { action: "accept", content: acceptedElicitationContent(response) };
case "decline":
return { action: "decline" };
case "cancel":
@@ -126,33 +167,13 @@ function questionCustomFieldKey(index: number): string {
}
/**
* `_meta` key under which a bridged enum option carries its structured
* `description`/`preview`, since ACP's `EnumOption` has no field for either.
* Namespaced like the agent's other `_meta` extensions (`_claude/...`).
* `_meta` key under which a bridged enum option carries its `preview`, the one
* option field ACP's `EnumOption` still has no slot for (descriptions are
* first-class as of schema 1.19). Namespaced like the agent's other `_meta`
* extensions (`_claude/...`).
*/
const OPTION_META_KEY = "_claude/askUserQuestionOption";
/** A single option as supplied by the AskUserQuestion tool. */
type AskUserQuestionOption = AskUserQuestion["options"][number];
/**
* Build the `_meta` payload that carries an option's structured `description`
* and optional `preview` for clients that can render them as distinct fields.
* Returns `undefined` when neither is present, so we don't emit an empty `_meta`.
*/
function askUserQuestionOptionMeta(
option: AskUserQuestionOption,
): NonNullable<EnumOption["_meta"]> | undefined {
const detail: { description?: string; preview?: string } = {};
if (option.description) {
detail.description = option.description;
}
if (option.preview) {
detail.preview = option.preview;
}
return Object.keys(detail).length > 0 ? { [OPTION_META_KEY]: detail } : undefined;
}
/**
* Render the AskUserQuestion tool's questions as an ACP form elicitation.
*
@@ -160,7 +181,8 @@ function askUserQuestionOptionMeta(
* question text, so the question text appears in exactly one place per field.
* Single-select questions use a titled `oneOf` enum; multi-select questions use
* an array with a titled `anyOf` item enum. The enum `const` is always the
* option label, since that is what the tool records as the answer.
* option label, since that is what the tool records as the answer; an option's
* secondary text travels in the enum option's own `description` field.
*
* Each question is followed by its own optional free-text "custom answer" field
* (`question_<n>_custom`), mirroring the CLI's per-question "Other" box: the
@@ -180,19 +202,16 @@ export function askUserQuestionsToCreateRequest(
const options: EnumOption[] = question.options.map((option) => {
const enumOption: EnumOption = {
const: option.label,
// `title` stays a flattened "label — description" string so clients that
// only read `const`/`title` still surface the description. Clients that
// understand the `_meta` below should prefer its structured fields (and
// treat `const` as the clean label) rather than parsing this title.
title: option.description ? `${option.label} — ${option.description}` : option.label,
title: option.label,
};
// The SDK option carries a `description` (secondary text) and an optional
// `preview` (mockups, code snippets, comparisons shown on focus). Neither
// has a structural slot in `EnumOption`, so forward them under ACP's
// reserved `_meta` extension point for clients that can render them.
const meta = askUserQuestionOptionMeta(option);
if (meta) {
enumOption._meta = meta;
if (option.description) {
enumOption.description = option.description;
}
// The SDK option's `preview` (mockups, code snippets, comparisons shown
// on focus) still has no structural slot in `EnumOption`, so forward it
// under ACP's reserved `_meta` extension point for clients that render it.
if (option.preview) {
enumOption._meta = { [OPTION_META_KEY]: { preview: option.preview } };
}
return enumOption;
});
@@ -243,22 +262,23 @@ export type AskUserQuestionOutcome =
* custom-answer field (`question_<n>_custom`) takes precedence over that
* question's selection, since the user typed their own answer instead of
* picking one. Decline yields empty answers (the model is told the user skipped
* rather than the turn aborting); cancel aborts the tool call.
* rather than the turn aborting); cancel — and any custom/future action we
* don't understand — aborts the tool call.
*/
export function applyAskElicitationResponse(
response: CreateElicitationResponse,
toolInput: Record<string, unknown>,
questions: AskUserQuestion[],
): AskUserQuestionOutcome {
if (response.action === "cancel") {
return { action: "cancel" };
}
if (response.action === "decline") {
return { action: "answered", updatedInput: { ...toolInput, answers: {} } };
}
const content = response.content ?? {};
if (response.action !== "accept") {
return { action: "cancel" };
}
const content = acceptedElicitationContent(response);
// Typed against the tool's own output schema so the answer/response shapes
// stay in sync with what the built-in tool's call() expects to read back.
const answers: AskUserQuestionOutput["answers"] = {};
@@ -372,7 +392,7 @@ export function refusalFallbackToCreateRequest(
sessionId,
message:
`${prompt.originalModel} declined this request${category}. ` +
`Retry with ${prompt.fallbackModel}? The session would continue on ${prompt.fallbackModel}.` +
`Retry with ${prompt.fallbackModel}?` +
guidance,
requestedSchema: {
type: "object",
@@ -380,8 +400,16 @@ export function refusalFallbackToCreateRequest(
[REFUSAL_FALLBACK_CHOICE_KEY]: {
type: "string",
oneOf: [
{ const: RETRY_FALLBACK_RESULT, title: `Retry with ${prompt.fallbackModel}` },
{ const: KEEP_REFUSAL_RESULT, title: "Keep the refusal" },
{
const: RETRY_FALLBACK_RESULT,
title: `Retry with ${prompt.fallbackModel}`,
description: `The session continues on ${prompt.fallbackModel}.`,
},
{
const: KEEP_REFUSAL_RESULT,
title: "Keep the refusal",
description: "You can send a new message.",
},
],
},
},
@@ -397,9 +425,6 @@ export function refusalFallbackToCreateRequest(
* switch the user didn't ask for.
*/
export function refusalFallbackResultFromResponse(response: CreateElicitationResponse): string {
if (response.action !== "accept") {
return KEEP_REFUSAL_RESULT;
}
const choice = response.content?.[REFUSAL_FALLBACK_CHOICE_KEY];
const choice = acceptedElicitationContent(response)[REFUSAL_FALLBACK_CHOICE_KEY];
return choice === RETRY_FALLBACK_RESULT ? RETRY_FALLBACK_RESULT : KEEP_REFUSAL_RESULT;
}

View File

@@ -204,7 +204,9 @@ describe.skipIf(!process.env.RUN_INTEGRATION_TESTS)("ACP subprocess integration"
params: CreateElicitationRequest,
): Promise<CreateElicitationResponse> {
this.elicitations.push(params);
if (params.mode !== "form") {
// The `in` check also excludes the custom/future-mode variant, whose
// `mode: string` would otherwise survive the literal comparison.
if (params.mode !== "form" || !("requestedSchema" in params)) {
return { action: "decline" };
}
// Accept the first option of every choice field (skip the free-text one).
@@ -436,7 +438,9 @@ describe.skipIf(!process.env.RUN_INTEGRATION_TESTS)("ACP subprocess integration"
// which confirms our interception path produced it rather than some other
// mechanism.
const properties =
elicitation.mode === "form" ? Object.keys(elicitation.requestedSchema.properties ?? {}) : [];
elicitation.mode === "form" && "requestedSchema" in elicitation
? Object.keys(elicitation.requestedSchema.properties ?? {})
: [];
expect(properties).toContain("question_0");
expect(properties).toContain("question_0_custom");

View File

@@ -22,7 +22,7 @@ const SESSION_ID = "session-1";
/**
* Build a question matching the SDK's (strict) AskUserQuestion schema while
* keeping test sites terse. Option descriptions default to "" (the tool always
* provides one); pass a description to exercise the "label — description" title.
* provides one); pass a description to exercise the enum option's description.
*/
function mkQuestion(
question: string,
@@ -127,6 +127,14 @@ describe("createElicitationResponseToElicitResult", () => {
createElicitationResponseToElicitResult({ action: "cancel" } as CreateElicitationResponse),
).toEqual({ action: "cancel" });
});
it("maps a custom/future action to cancel", () => {
expect(
createElicitationResponseToElicitResult({
action: "_zed/snooze",
} as CreateElicitationResponse),
).toEqual({ action: "cancel" });
});
});
describe("extractAskUserQuestions", () => {
@@ -190,14 +198,10 @@ describe("askUserQuestionsToCreateRequest", () => {
title: "Library",
description: undefined,
oneOf: [
{
const: "date-fns",
title: "date-fns — Lightweight",
// Structured description forwarded under `_meta` so clients can render
// it as secondary text instead of parsing it out of the title.
_meta: { "_claude/askUserQuestionOption": { description: "Lightweight" } },
},
// No description → no `_meta` emitted.
// The description travels in the enum option's first-class field; the
// title stays the clean label (no "label — description" flattening).
{ const: "date-fns", title: "date-fns", description: "Lightweight" },
// No description → the field is omitted entirely.
{ const: "luxon", title: "luxon" },
],
});
@@ -205,7 +209,7 @@ describe("askUserQuestionsToCreateRequest", () => {
expect(schema.properties?.["Which library?"]).toBeUndefined();
});
it("forwards option description and preview under _meta for rich clients", () => {
it("carries descriptions structurally and forwards previews under _meta", () => {
const questions = [
mkQuestion("Which layout?", [
{
@@ -226,24 +230,22 @@ describe("askUserQuestionsToCreateRequest", () => {
).requestedSchema;
const oneOf = (schema.properties?.["question_0"] as { oneOf: EnumOption[] }).oneOf;
// Both description and preview travel structurally; the title still flattens
// the description for clients that only read const/title.
// The description uses the enum option's own field; only the preview —
// which still has no structural slot — rides under `_meta`.
expect(oneOf[0]).toEqual({
const: "Grid",
title: "Grid — Cards in a responsive grid",
title: "Grid",
description: "Cards in a responsive grid",
_meta: {
"_claude/askUserQuestionOption": {
description: "Cards in a responsive grid",
preview: "```\n[ ] [ ] [ ]\n[ ] [ ] [ ]\n```",
},
},
});
// Description only → preview omitted from _meta.
expect(oneOf[1]._meta).toEqual({
"_claude/askUserQuestionOption": { description: "Stacked rows" },
});
// Neither → no _meta at all.
expect(oneOf[2]._meta).toBeUndefined();
// Description only → no _meta needed.
expect(oneOf[1]).toEqual({ const: "List", title: "List", description: "Stacked rows" });
// Neither → just the label.
expect(oneOf[2]).toEqual({ const: "Plain", title: "Plain" });
});
it("includes a per-question optional free-text custom-answer field", () => {
@@ -379,6 +381,13 @@ describe("applyAskElicitationResponse", () => {
});
});
it("returns cancel for a custom/future action it does not understand", () => {
const response = { action: "_zed/snooze" } as CreateElicitationResponse;
expect(applyAskElicitationResponse(response, toolInput, questions)).toEqual({
action: "cancel",
});
});
it("omits answers for questions the user left unanswered", () => {
const response = {
action: "accept",
@@ -450,11 +459,14 @@ describe("refusalFallbackToCreateRequest", () => {
const choice = request.requestedSchema.properties?.choice as {
type: string;
oneOf: Array<{ const: string; title: string }>;
oneOf: Array<{ const: string; title: string; description?: string }>;
};
expect(choice.type).toBe("string");
expect(choice.oneOf.map((o) => o.const)).toEqual(["retry_fallback", "cancelled"]);
expect(choice.oneOf[0].title).toContain("claude-opus-4-8");
// Each option explains its consequence in the description field.
expect(choice.oneOf[0].description).toContain("claude-opus-4-8");
expect(choice.oneOf[1].description).toBeTruthy();
});
it("omits the category marker and appends guidance when provided", () => {

View File

@@ -29,6 +29,13 @@ describe("resolvePermissionMode", () => {
expect(resolvePermissionMode("bypass")).toBe("bypassPermissions");
});
it("resolves 'manual' as an alias for 'default'", () => {
const { logger, error } = mockLogger();
expect(resolvePermissionMode("manual", logger)).toBe("default");
expect(resolvePermissionMode("Manual", logger)).toBe("default");
expect(error).not.toHaveBeenCalled();
});
it("trims whitespace", () => {
expect(resolvePermissionMode(" dontAsk ")).toBe("dontAsk");
});

View File

@@ -2153,3 +2153,55 @@ describe("createTaskHook", () => {
expect(changes).toBe(0);
});
});
describe("empty message content is not emitted", () => {
const mockClient = {} as AcpClient;
const mockLogger: Logger = { log: () => {}, error: () => {} };
it("drops an empty string content instead of emitting an empty agent_message_chunk", () => {
const notifications = toAcpNotifications(
"",
"assistant",
"test-session",
{},
mockClient,
mockLogger,
);
expect(notifications).toHaveLength(0);
});
it("still emits non-empty string content", () => {
const notifications = toAcpNotifications(
"hello",
"assistant",
"test-session",
{},
mockClient,
mockLogger,
);
expect(notifications).toHaveLength(1);
expect(notifications[0].update).toMatchObject({
sessionUpdate: "agent_message_chunk",
content: { type: "text", text: "hello" },
});
});
it("drops an empty streamed text block but keeps a non-empty one", () => {
const notifications = toAcpNotifications(
[
{ type: "text", text: "" },
{ type: "text", text: "real" },
] as any,
"assistant",
"test-session",
{},
mockClient,
mockLogger,
);
expect(notifications).toHaveLength(1);
expect(notifications[0].update).toMatchObject({
sessionUpdate: "agent_message_chunk",
content: { type: "text", text: "real" },
});
});
});