Compare commits

...

24 Commits

Author SHA1 Message Date
acp-release-bot[bot]
e692462249 chore(main): release 0.43.0 (#752)
🤖 I have created a release *beep* *boop*
---


##
[0.43.0](https://github.com/agentclientprotocol/claude-agent-acp/compare/v0.42.0...v0.43.0)
(2026-06-09)


### Features

* Add experimental elicitation support
([#756](https://github.com/agentclientprotocol/claude-agent-acp/issues/756))
([12bd276](12bd2762d9))
* **deps:** update to @anthropic-ai/claude-agent-sdk 0.3.169
([#754](https://github.com/agentclientprotocol/claude-agent-acp/issues/754))
([bd0ae4d](bd0ae4dde1))
* Update ACP SDK to 0.25.0
([#753](https://github.com/agentclientprotocol/claude-agent-acp/issues/753))
([0dbccf5](0dbccf588f))


### Bug Fixes

* Forward unstreamed assistant text blocks
([#757](https://github.com/agentclientprotocol/claude-agent-acp/issues/757))
([7ff6b7f](7ff6b7fd6b))
* Validate cwd before creating sessions
([#751](https://github.com/agentclientprotocol/claude-agent-acp/issues/751))
([9854b0c](9854b0c679)),
closes
[#749](https://github.com/agentclientprotocol/claude-agent-acp/issues/749)

---
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-06-09 08:58:23 +00:00
dependabot[bot]
bd0ae4dde1 feat(deps): update to @anthropic-ai/claude-agent-sdk 0.3.169 (#754)
Bumps the minor group with 12 updates:

| Package | From | To |
| --- | --- | --- |
|
[@anthropic-ai/claude-agent-sdk](https://github.com/anthropics/claude-agent-sdk-typescript)
| `0.3.165` | `0.3.168` |
|
[@anthropic-ai/sdk](https://github.com/anthropics/anthropic-sdk-typescript)
| `0.100.1` | `0.102.0` |
|
[@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)
| `25.9.1` | `25.9.2` |
| @anthropic-ai/claude-agent-sdk-darwin-arm64 | `0.3.165` | `0.3.168` |
| @anthropic-ai/claude-agent-sdk-darwin-x64 | `0.3.165` | `0.3.168` |
| @anthropic-ai/claude-agent-sdk-linux-arm64 | `0.3.165` | `0.3.168` |
| @anthropic-ai/claude-agent-sdk-linux-arm64-musl | `0.3.165` |
`0.3.168` |
| @anthropic-ai/claude-agent-sdk-linux-x64 | `0.3.165` | `0.3.168` |
| @anthropic-ai/claude-agent-sdk-linux-x64-musl | `0.3.165` | `0.3.168`
|
| @anthropic-ai/claude-agent-sdk-win32-arm64 | `0.3.165` | `0.3.168` |
| @anthropic-ai/claude-agent-sdk-win32-x64 | `0.3.165` | `0.3.168` |
| [hono](https://github.com/honojs/hono) | `4.12.23` | `4.12.24` |

Updates `@anthropic-ai/claude-agent-sdk` from 0.3.165 to 0.3.168
<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.168</h2>
<h2>What's changed</h2>
<ul>
<li>Updated to parity with Claude Code v2.1.168</li>
</ul>
<h2>Update</h2>
<pre lang="sh"><code>npm install @anthropic-ai/claude-agent-sdk@0.3.168
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.168
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.168
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.168
</code></pre>
<h2>v0.3.167</h2>
<h2>What's changed</h2>
<ul>
<li>Updated to parity with Claude Code v2.1.167</li>
</ul>
<h2>Update</h2>
<pre lang="sh"><code>npm install @anthropic-ai/claude-agent-sdk@0.3.167
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.167
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.167
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.167
</code></pre>
<h2>v0.3.166</h2>
<h2>What's changed</h2>
<ul>
<li>Fixed MCP resource tools not being injected for servers added at
runtime via the <code>mcp_set_servers</code> control request</li>
</ul>
<h2>Update</h2>
<pre lang="sh"><code>npm install @anthropic-ai/claude-agent-sdk@0.3.166
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.166
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.166
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.166
</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.168</h2>
<ul>
<li>Updated to parity with Claude Code v2.1.168</li>
</ul>
<h2>0.3.167</h2>
<ul>
<li>Updated to parity with Claude Code v2.1.167</li>
</ul>
<h2>0.3.166</h2>
<ul>
<li>Fixed MCP resource tools not being injected for servers added at
runtime via the <code>mcp_set_servers</code> control request</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="2c2eeb8ce4"><code>2c2eeb8</code></a>
chore: Update CHANGELOG.md</li>
<li><a
href="3e35050adc"><code>3e35050</code></a>
chore: Update CHANGELOG.md</li>
<li><a
href="bc853fcd68"><code>bc853fc</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.165...v0.3.168">compare
view</a></li>
</ul>
</details>
<br />

Updates `@anthropic-ai/sdk` from 0.100.1 to 0.102.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.102.0</h2>
<h2>0.102.0 (2026-06-06)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.101.0...sdk-v0.102.0">sdk-v0.101.0...sdk-v0.102.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> small updates to Managed Agents types (<a
href="8ba4f92df3">8ba4f92</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>client:</strong> run middleware before request signing (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-typescript/issues/45">#45</a>)
(<a
href="95f1a4a406">95f1a4a</a>)</li>
</ul>
<h2>sdk: v0.101.0</h2>
<h2>0.101.0 (2026-06-05)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.100.1...sdk-v0.101.0">sdk-v0.100.1...sdk-v0.101.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>client:</strong> add support for middleware (<a
href="9b01120796">9b01120</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>apply request timeout to inner fetch only, not middleware chain (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-typescript/issues/40">#40</a>)
(<a
href="25c13f6183">25c13f6</a>)</li>
<li><strong>streaming:</strong> carry stop_details through beta
message_delta accumulation (<a
href="ed3fec7ace">ed3fec7</a>)</li>
<li><strong>streaming:</strong> correctly parse json numbers with
scientific notation (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-typescript/issues/9">#9</a>)
(<a
href="7d5e6422dc">7d5e642</a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li><strong>internal:</strong> fix artifact url (<a
href="925ec276fa">925ec27</a>)</li>
<li><strong>internal:</strong> fix branch names (<a
href="fa3cf2c491">fa3cf2c</a>)</li>
<li><strong>internal:</strong> update private repo name (<a
href="a8ac213b8c">a8ac213</a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li>point security reports to Anthropic's HackerOne program (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-typescript/issues/16">#16</a>)
(<a
href="5c7912c36e">5c7912c</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.102.0 (2026-06-06)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.101.0...sdk-v0.102.0">sdk-v0.101.0...sdk-v0.102.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> small updates to Managed Agents types (<a
href="8ba4f92df3">8ba4f92</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>client:</strong> run middleware before request signing (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-typescript/issues/45">#45</a>)
(<a
href="95f1a4a406">95f1a4a</a>)</li>
</ul>
<h2>0.101.0 (2026-06-05)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.100.1...sdk-v0.101.0">sdk-v0.100.1...sdk-v0.101.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>client:</strong> add support for middleware (<a
href="9b01120796">9b01120</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>apply request timeout to inner fetch only, not middleware chain (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-typescript/issues/40">#40</a>)
(<a
href="25c13f6183">25c13f6</a>)</li>
<li><strong>streaming:</strong> carry stop_details through beta
message_delta accumulation (<a
href="ed3fec7ace">ed3fec7</a>)</li>
<li><strong>streaming:</strong> correctly parse json numbers with
scientific notation (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-typescript/issues/9">#9</a>)
(<a
href="7d5e6422dc">7d5e642</a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li><strong>internal:</strong> fix artifact url (<a
href="925ec276fa">925ec27</a>)</li>
<li><strong>internal:</strong> fix branch names (<a
href="fa3cf2c491">fa3cf2c</a>)</li>
<li><strong>internal:</strong> update private repo name (<a
href="a8ac213b8c">a8ac213</a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li>point security reports to Anthropic's HackerOne program (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-typescript/issues/16">#16</a>)
(<a
href="5c7912c36e">5c7912c</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="f7dfb972f6"><code>f7dfb97</code></a>
chore: release main</li>
<li><a
href="a3f3c97258"><code>a3f3c97</code></a>
feat(api): small updates to Managed Agents types</li>
<li><a
href="a5c98d117a"><code>a5c98d1</code></a>
fix(client): run middleware before request signing (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-typescript/issues/45">#45</a>)</li>
<li><a
href="185ec061cf"><code>185ec06</code></a>
chore: release main</li>
<li><a
href="fab891069a"><code>fab8910</code></a>
codegen metadata</li>
<li><a
href="7ff4036756"><code>7ff4036</code></a>
fix: apply request timeout to inner fetch only, not middleware chain (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-typescript/issues/40">#40</a>)</li>
<li><a
href="257bc1f56b"><code>257bc1f</code></a>
feat(client): add support for middleware</li>
<li><a
href="5b3ace5ec5"><code>5b3ace5</code></a>
chore(internal): fix artifact url</li>
<li><a
href="70966be8fc"><code>70966be</code></a>
fix(streaming): correctly parse json numbers with scientific notation
(<a
href="https://redirect.github.com/anthropics/anthropic-sdk-typescript/issues/9">#9</a>)</li>
<li><a
href="7e22f20552"><code>7e22f20</code></a>
docs: point security reports to Anthropic's HackerOne program (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-typescript/issues/16">#16</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.100.1...sdk-v0.102.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `@types/node` from 25.9.1 to 25.9.2
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node">compare
view</a></li>
</ul>
</details>
<br />

Updates `@anthropic-ai/claude-agent-sdk-darwin-arm64` from 0.3.165 to
0.3.168

Updates `@anthropic-ai/claude-agent-sdk-darwin-x64` from 0.3.165 to
0.3.168

Updates `@anthropic-ai/claude-agent-sdk-linux-arm64` from 0.3.165 to
0.3.168

Updates `@anthropic-ai/claude-agent-sdk-linux-arm64-musl` from 0.3.165
to 0.3.168

Updates `@anthropic-ai/claude-agent-sdk-linux-x64` from 0.3.165 to
0.3.168

Updates `@anthropic-ai/claude-agent-sdk-linux-x64-musl` from 0.3.165 to
0.3.168

Updates `@anthropic-ai/claude-agent-sdk-win32-arm64` from 0.3.165 to
0.3.168

Updates `@anthropic-ai/claude-agent-sdk-win32-x64` from 0.3.165 to
0.3.168

Updates `hono` from 4.12.23 to 4.12.24
<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.24</h2>
<h2>What's Changed</h2>
<ul>
<li>docs(contribution): simplifyAI Usage Policy by <a
href="https://github.com/yusukebe"><code>@​yusukebe</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/4972">honojs/hono#4972</a></li>
<li>chore: remove <code>@​types/glob</code> by <a
href="https://github.com/rtritto"><code>@​rtritto</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/4978">honojs/hono#4978</a></li>
<li>fix(bearer-auth): mention verifyToken in missing-options error
message by <a
href="https://github.com/tan7vir"><code>@​tan7vir</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/4987">honojs/hono#4987</a></li>
<li>refactor(language): Test/improve tests on languages middleware by <a
href="https://github.com/iNeoO"><code>@​iNeoO</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/4980">honojs/hono#4980</a></li>
<li>fix(utils/ipaddr): expand &quot;::&quot; to eight zero groups by <a
href="https://github.com/youcefzemmar"><code>@​youcefzemmar</code></a>
in <a
href="https://redirect.github.com/honojs/hono/pull/4973">honojs/hono#4973</a></li>
<li>fix: clean up config files trailing comma, stale excludes,
typesVersions gaps, jsr paths by <a
href="https://github.com/Mohammad-Faiz-Cloud-Engineer"><code>@​Mohammad-Faiz-Cloud-Engineer</code></a>
in <a
href="https://redirect.github.com/honojs/hono/pull/4982">honojs/hono#4982</a></li>
<li>refactor(timing): Test/add test for middleware timing by <a
href="https://github.com/iNeoO"><code>@​iNeoO</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/4991">honojs/hono#4991</a></li>
<li>fix(utils/ipaddr): render the unspecified address binary as
&quot;::&quot; by <a
href="https://github.com/sarathfrancis90"><code>@​sarathfrancis90</code></a>
in <a
href="https://redirect.github.com/honojs/hono/pull/4998">honojs/hono#4998</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/honojs/hono/compare/v4.12.23...v4.12.24">https://github.com/honojs/hono/compare/v4.12.23...v4.12.24</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="5fdde5ab5a"><code>5fdde5a</code></a>
4.12.24</li>
<li><a
href="c78932d745"><code>c78932d</code></a>
fix(utils/ipaddr): render the unspecified address binary as
&quot;::&quot; (<a
href="https://redirect.github.com/honojs/hono/issues/4998">#4998</a>)</li>
<li><a
href="5ef800ee45"><code>5ef800e</code></a>
refactor(timing): Test/add test for middleware timing (<a
href="https://redirect.github.com/honojs/hono/issues/4991">#4991</a>)</li>
<li><a
href="d743bb7dc0"><code>d743bb7</code></a>
fix: clean up config files trailing comma, stale excludes, typesVersions
gaps...</li>
<li><a
href="d22ff9c6fe"><code>d22ff9c</code></a>
fix(utils/ipaddr): expand &quot;::&quot; to eight zero groups (<a
href="https://redirect.github.com/honojs/hono/issues/4973">#4973</a>)</li>
<li><a
href="8e2cccc2fb"><code>8e2cccc</code></a>
refactor(language): Test/improve tests on languages middleware (<a
href="https://redirect.github.com/honojs/hono/issues/4980">#4980</a>)</li>
<li><a
href="413d3cbd0e"><code>413d3cb</code></a>
fix(bearer-auth): mention verifyToken in missing-options error message
(<a
href="https://redirect.github.com/honojs/hono/issues/4987">#4987</a>)</li>
<li><a
href="2cbeadda34"><code>2cbeadd</code></a>
chore: remove <code>@​types/glob</code> (<a
href="https://redirect.github.com/honojs/hono/issues/4978">#4978</a>)</li>
<li><a
href="9051d3e80a"><code>9051d3e</code></a>
docs(contribution): simplifyAI Usage Policy (<a
href="https://redirect.github.com/honojs/hono/issues/4972">#4972</a>)</li>
<li>See full diff in <a
href="https://github.com/honojs/hono/compare/v4.12.23...v4.12.24">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-06-09 08:56:57 +00:00
Ben Brandt
7ff6b7fd6b fix: Forward unstreamed assistant text blocks (#757) 2026-06-09 08:48:48 +00:00
Ben Brandt
12bd2762d9 feat: Add experimental elicitation support (#756)
This is still unstable on ACP, but experimenting with the latest api for
testing. Also allows for a representation of the AskUserQuestion tool
2026-06-09 09:59:06 +02:00
Ben Brandt
0dbccf588f feat: Update ACP SDK to 0.25.0 (#753) 2026-06-05 13:21:20 +00:00
Ben Brandt
9854b0c679 fix: Validate cwd before creating sessions (#751)
Closes #749
2026-06-05 11:04:47 +00:00
acp-release-bot[bot]
d877ee7133 chore(main): release 0.42.0 (#745)
🤖 I have created a release *beep* *boop*
---


##
[0.42.0](https://github.com/agentclientprotocol/claude-agent-acp/compare/v0.41.0...v0.42.0)
(2026-06-05)


### Features

* **deps-dev:** bump obug from 2.1.1 to 2.1.2 in the minor group
([#743](https://github.com/agentclientprotocol/claude-agent-acp/issues/743))
([7ffb78c](7ffb78c572))
* Send message ids for assistant and user messages
([#750](https://github.com/agentclientprotocol/claude-agent-acp/issues/750))
([18516a3](18516a3088))
* Update Claude Agent SDK to 0.3.165
([#746](https://github.com/agentclientprotocol/claude-agent-acp/issues/746))
([23cbe6f](23cbe6f58f))


### Bug Fixes

* Prevent cross-family model matching in resolveModelPreference
([#731](https://github.com/agentclientprotocol/claude-agent-acp/issues/731))
([f4704c1](f4704c168f))
* Prune tool cache per session after results
([#748](https://github.com/agentclientprotocol/claude-agent-acp/issues/748))
([ec14211](ec14211056))
* Update to better utilize existing SDK data
([#747](https://github.com/agentclientprotocol/claude-agent-acp/issues/747))
([398f763](398f763f71))

---
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-06-05 10:54:26 +00:00
Ben Brandt
18516a3088 feat: Send message ids for assistant and user messages (#750) 2026-06-05 10:53:21 +00:00
Ben Brandt
ec14211056 fix: Prune tool cache per session after results (#748) 2026-06-05 09:11:34 +00:00
Ben Brandt
398f763f71 fix: Update to better utilize existing SDK data (#747)
- **feat: Better surface permission, progress, and rate updates**
- **Use SDK context usage and thinking config**
- **Keep learned context size after compaction**
2026-06-05 08:59:06 +00:00
Ben Brandt
23cbe6f58f feat: Update Claude Agent SDK to 0.3.165 (#746) 2026-06-05 07:58:26 +00:00
dependabot[bot]
7ffb78c572 feat(deps-dev): bump obug from 2.1.1 to 2.1.2 in the minor group (#743)
Bumps the minor group with 1 update:
[obug](https://github.com/sxzz/obug).

Updates `obug` from 2.1.1 to 2.1.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/sxzz/obug/releases">obug's
releases</a>.</em></p>
<blockquote>
<h2>v2.1.2</h2>
<p><em>No significant changes</em></p>
<h5>    <a
href="https://github.com/sxzz/obug/compare/v2.1.1...v2.1.2">View changes
on GitHub</a></h5>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="1f9500da5b"><code>1f9500d</code></a>
chore: release v2.1.2</li>
<li><a
href="6dcc07cd49"><code>6dcc07c</code></a>
chore: upgrade deps</li>
<li><a
href="9bcc620b15"><code>9bcc620</code></a>
ci: staging publish</li>
<li><a
href="c9688880be"><code>c968888</code></a>
chore: migrate tsdown config</li>
<li><a
href="2d652378be"><code>2d65237</code></a>
chore: add &quot;engines&quot; field to <code>package.json</code> (<a
href="https://redirect.github.com/sxzz/obug/issues/3">#3</a>)</li>
<li><a
href="a1191fd954"><code>a1191fd</code></a>
test: add file extensions to imports</li>
<li><a
href="b8239e5b9e"><code>b8239e5</code></a>
docs: add 'How to use' section to README [ci skip] (<a
href="https://redirect.github.com/sxzz/obug/issues/2">#2</a>)</li>
<li><a
href="55fe075260"><code>55fe075</code></a>
test: ignore dynamic import warning</li>
<li><a
href="a71beb8092"><code>a71beb8</code></a>
chore: update workflow references to main branch</li>
<li><a
href="e39bee9fcf"><code>e39bee9</code></a>
chore: upgrade deps</li>
<li>Additional commits viewable in <a
href="https://github.com/sxzz/obug/compare/v2.1.1...v2.1.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=obug&package-manager=npm_and_yarn&previous-version=2.1.1&new-version=2.1.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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>
2026-06-05 09:49:53 +02:00
Luca Dibattista
f4704c168f fix: Prevent cross-family model matching in resolveModelPreference (#731)
## Summary

Partially addresses #639. Builds on #702 which added version-aware
matching.

When the SDK's `opus` alias resolves to a newer version than what's in
`availableModels` (e.g. the SDK was bumped to Opus 4.8 but
`availableModels` still contains `claude-opus-4-6[1m]`), the version
check from #702 correctly rejects the `opus` entry (4.8 ≠ 4.6). However,
the tokenized matcher then falls through to `sonnet[1m]` because the
`1m` context hint token alone scores 3 points — enough to win. This
causes `claude-opus-4-6[1m]` to display as "Sonnet (1M context)".

Fix: `scoreModelMatch` now returns 0 when the only matching token is the
context hint. This prevents cross-family matches without hardcoding
model family names.

Note: Claude initially recommended hardcoding model families to be 100%
sure we avoid cross-family matching. While it would be a stronger
signal, I didn't find references to model families in the codebase
(except for opusplan --> opus) so I'm assuming the family list is
transparent to claude-agent-acp.

## Test plan

- [x] Added test: `does not inherit display info across mismatched model
families` — verifies `claude-opus-4-6[1m]` does not resolve to `Sonnet
(1M context)`
- [x] Existing tests pass (20/20 in `acp-agent-settings.test.ts`)
- [x] New test confirmed to fail on unmodified `main` and pass with the
fix

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-05 07:46:22 +00:00
acp-release-bot[bot]
49d73b2ad3 chore(main): release 0.41.0 (#741)
🤖 I have created a release *beep* *boop*
---


##
[0.41.0](https://github.com/agentclientprotocol/claude-agent-acp/compare/v0.40.0...v0.41.0)
(2026-06-04)


### Features

* **deps:** upgrade to @anthropic-ai/claude-agent-sdk@0.3.162
([#740](https://github.com/agentclientprotocol/claude-agent-acp/issues/740))
([add7e31](add7e31704))


### Bug Fixes

* Force cancellation when SDK query hangs
([#742](https://github.com/agentclientprotocol/claude-agent-acp/issues/742))
([cffea4b](cffea4be28)),
closes
[#680](https://github.com/agentclientprotocol/claude-agent-acp/issues/680)

---
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-06-04 14:16:42 +02:00
Ben Brandt
cffea4be28 fix: Force cancellation when SDK query hangs (#742)
Closes #680
2026-06-04 11:47:13 +00:00
dependabot[bot]
add7e31704 feat(deps): upgrade to @anthropic-ai/claude-agent-sdk@0.3.162 (#740)
Bumps the minor group with 9 updates:

| Package | From | To |
| --- | --- | --- |
|
[@anthropic-ai/claude-agent-sdk](https://github.com/anthropics/claude-agent-sdk-typescript)
| `0.3.160` | `0.3.162` |
| @anthropic-ai/claude-agent-sdk-darwin-arm64 | `0.3.160` | `0.3.162` |
| @anthropic-ai/claude-agent-sdk-darwin-x64 | `0.3.160` | `0.3.162` |
| @anthropic-ai/claude-agent-sdk-linux-arm64 | `0.3.160` | `0.3.162` |
| @anthropic-ai/claude-agent-sdk-linux-arm64-musl | `0.3.160` |
`0.3.162` |
| @anthropic-ai/claude-agent-sdk-linux-x64 | `0.3.160` | `0.3.162` |
| @anthropic-ai/claude-agent-sdk-linux-x64-musl | `0.3.160` | `0.3.162`
|
| @anthropic-ai/claude-agent-sdk-win32-arm64 | `0.3.160` | `0.3.162` |
| @anthropic-ai/claude-agent-sdk-win32-x64 | `0.3.160` | `0.3.162` |

Updates `@anthropic-ai/claude-agent-sdk` from 0.3.160 to 0.3.162
<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.162</h2>
<h2>What's changed</h2>
<ul>
<li>Refusal error messages now carry <code>stop_reason:
&quot;refusal&quot;</code> and <code>stop_details</code> on the
assistant message and in session transcripts, so SDK consumers can
detect refusals without text-matching the error content</li>
<li>Agent SDK sessions on native builds now default to fast embedded
<code>find</code>/<code>grep</code> search in Bash, matching the
interactive CLI, instead of always registering the dedicated Grep/Glob
tools. To keep the dedicated tools (e.g. to intercept searches via
<code>canUseTool</code> or hooks), name them in the <code>tools</code>
option or reference them in <code>allowedTools</code></li>
</ul>
<h2>Update</h2>
<pre lang="sh"><code>npm install @anthropic-ai/claude-agent-sdk@0.3.162
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.162
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.162
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.162
</code></pre>
<h2>v0.3.161</h2>
<h2>What's changed</h2>
<ul>
<li>The <code>initialize</code> control request is now idempotent: a
second <code>initialize</code> returns the same success payload instead
of an <code>Already initialized</code> error.
<code>ControlResponse</code> gains an optional
<code>pending_permission_requests</code> field, mirroring
<code>ControlErrorResponse</code></li>
<li><code>applyFlagSettings</code> now live-applies <code>agent</code>
changes: switching the active agent (or passing <code>null</code> to
reset) takes effect on the next turn in a running session</li>
</ul>
<h2>Update</h2>
<pre lang="sh"><code>npm install @anthropic-ai/claude-agent-sdk@0.3.161
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.161
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.161
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.161
</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.162</h2>
<ul>
<li>Refusal error messages now carry <code>stop_reason:
&quot;refusal&quot;</code> and <code>stop_details</code> on the
assistant message and in session transcripts, so SDK consumers can
detect refusals without text-matching the error content</li>
<li>Agent SDK sessions on native builds now default to fast embedded
<code>find</code>/<code>grep</code> search in Bash, matching the
interactive CLI, instead of always registering the dedicated Grep/Glob
tools. To keep the dedicated tools (e.g. to intercept searches via
<code>canUseTool</code> or hooks), name them in the <code>tools</code>
option or reference them in <code>allowedTools</code></li>
</ul>
<h2>0.3.161</h2>
<ul>
<li>The <code>initialize</code> control request is now idempotent: a
second <code>initialize</code> returns the same success payload instead
of an <code>Already initialized</code> error.
<code>ControlResponse</code> gains an optional
<code>pending_permission_requests</code> field, mirroring
<code>ControlErrorResponse</code></li>
<li><code>applyFlagSettings</code> now live-applies <code>agent</code>
changes: switching the active agent (or passing <code>null</code> to
reset) takes effect on the next turn in a running session</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="e9f26a0e02"><code>e9f26a0</code></a>
chore: Update CHANGELOG.md</li>
<li><a
href="2f67c51150"><code>2f67c51</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.160...v0.3.162">compare
view</a></li>
</ul>
</details>
<br />

Updates `@anthropic-ai/claude-agent-sdk-darwin-arm64` from 0.3.160 to
0.3.162

Updates `@anthropic-ai/claude-agent-sdk-darwin-x64` from 0.3.160 to
0.3.162

Updates `@anthropic-ai/claude-agent-sdk-linux-arm64` from 0.3.160 to
0.3.162

Updates `@anthropic-ai/claude-agent-sdk-linux-arm64-musl` from 0.3.160
to 0.3.162

Updates `@anthropic-ai/claude-agent-sdk-linux-x64` from 0.3.160 to
0.3.162

Updates `@anthropic-ai/claude-agent-sdk-linux-x64-musl` from 0.3.160 to
0.3.162

Updates `@anthropic-ai/claude-agent-sdk-win32-arm64` from 0.3.160 to
0.3.162

Updates `@anthropic-ai/claude-agent-sdk-win32-x64` from 0.3.160 to
0.3.162


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-06-04 12:45:17 +02:00
acp-release-bot[bot]
f1736a9371 chore(main): release 0.40.0 (#728)
🤖 I have created a release *beep* *boop*
---


##
[0.40.0](https://github.com/agentclientprotocol/claude-agent-acp/compare/v0.39.0...v0.40.0)
(2026-06-02)


### Features

* **deps-dev:** bump the minor group with 2 updates
([#726](https://github.com/agentclientprotocol/claude-agent-acp/issues/726))
([51a370e](51a370e4fe))
* **deps:** bump actions/checkout from 6.0.2 to 6.0.3
([#736](https://github.com/agentclientprotocol/claude-agent-acp/issues/736))
([9cda07b](9cda07ba9d))
* **deps:** bump the minor group with 50 updates
([#737](https://github.com/agentclientprotocol/claude-agent-acp/issues/737))
([32175b8](32175b83a0))


### Bug Fixes

* Optimize local command marker stripping
([#738](https://github.com/agentclientprotocol/claude-agent-acp/issues/738))
([895422c](895422c72d)),
closes
[#727](https://github.com/agentclientprotocol/claude-agent-acp/issues/727)

---
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-06-02 23:10:01 +02:00
Ben Brandt
895422c72d fix: Optimize local command marker stripping (#738)
Closes #727
2026-06-02 23:07:04 +02:00
dependabot[bot]
32175b83a0 feat(deps): bump the minor group with 50 updates (#737)
Bumps the minor group with 50 updates:

| Package | From | To |
| --- | --- | --- |
|
[@agentclientprotocol/sdk](https://github.com/agentclientprotocol/typescript-sdk)
| `0.22.1` | `0.24.0` |
|
[@anthropic-ai/claude-agent-sdk](https://github.com/anthropics/claude-agent-sdk-typescript)
| `0.3.156` | `0.3.160` |
|
[@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin)
| `8.60.0` | `8.60.1` |
|
[@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser)
| `8.60.0` | `8.60.1` |
| [eslint](https://github.com/eslint/eslint) | `10.4.0` | `10.4.1` |
|
[vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest)
| `4.1.7` | `4.1.8` |
| @anthropic-ai/claude-agent-sdk-darwin-arm64 | `0.3.156` | `0.3.160` |
| @anthropic-ai/claude-agent-sdk-darwin-x64 | `0.3.156` | `0.3.160` |
| @anthropic-ai/claude-agent-sdk-linux-arm64 | `0.3.156` | `0.3.160` |
| @anthropic-ai/claude-agent-sdk-linux-arm64-musl | `0.3.156` |
`0.3.160` |
| @anthropic-ai/claude-agent-sdk-linux-x64 | `0.3.156` | `0.3.160` |
| @anthropic-ai/claude-agent-sdk-linux-x64-musl | `0.3.156` | `0.3.160`
|
| @anthropic-ai/claude-agent-sdk-win32-arm64 | `0.3.156` | `0.3.160` |
| @anthropic-ai/claude-agent-sdk-win32-x64 | `0.3.156` | `0.3.160` |
|
[@eslint/plugin-kit](https://github.com/eslint/rewrite/tree/HEAD/packages/plugin-kit)
| `0.7.1` | `0.7.2` |
|
[@oxc-project/types](https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types)
| `0.132.0` | `0.133.0` |
|
[@rolldown/binding-android-arm64](https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown)
| `1.0.2` | `1.0.3` |
|
[@rolldown/binding-darwin-arm64](https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown)
| `1.0.2` | `1.0.3` |
|
[@rolldown/binding-darwin-x64](https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown)
| `1.0.2` | `1.0.3` |
|
[@rolldown/binding-freebsd-x64](https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown)
| `1.0.2` | `1.0.3` |
|
[@rolldown/binding-linux-arm-gnueabihf](https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown)
| `1.0.2` | `1.0.3` |
|
[@rolldown/binding-linux-arm64-gnu](https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown)
| `1.0.2` | `1.0.3` |
|
[@rolldown/binding-linux-arm64-musl](https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown)
| `1.0.2` | `1.0.3` |
|
[@rolldown/binding-linux-ppc64-gnu](https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown)
| `1.0.2` | `1.0.3` |
|
[@rolldown/binding-linux-s390x-gnu](https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown)
| `1.0.2` | `1.0.3` |
|
[@rolldown/binding-linux-x64-gnu](https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown)
| `1.0.2` | `1.0.3` |
|
[@rolldown/binding-linux-x64-musl](https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown)
| `1.0.2` | `1.0.3` |
|
[@rolldown/binding-openharmony-arm64](https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown)
| `1.0.2` | `1.0.3` |
|
[@rolldown/binding-wasm32-wasi](https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown)
| `1.0.2` | `1.0.3` |
|
[@rolldown/binding-win32-arm64-msvc](https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown)
| `1.0.2` | `1.0.3` |
|
[@rolldown/binding-win32-x64-msvc](https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown)
| `1.0.2` | `1.0.3` |
|
[@typescript-eslint/project-service](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/project-service)
| `8.60.0` | `8.60.1` |
|
[@typescript-eslint/scope-manager](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/scope-manager)
| `8.60.0` | `8.60.1` |
|
[@typescript-eslint/tsconfig-utils](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/tsconfig-utils)
| `8.60.0` | `8.60.1` |
|
[@typescript-eslint/type-utils](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/type-utils)
| `8.60.0` | `8.60.1` |
|
[@typescript-eslint/types](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/types)
| `8.60.0` | `8.60.1` |
|
[@typescript-eslint/typescript-estree](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-estree)
| `8.60.0` | `8.60.1` |
|
[@typescript-eslint/utils](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/utils)
| `8.60.0` | `8.60.1` |
|
[@typescript-eslint/visitor-keys](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/visitor-keys)
| `8.60.0` | `8.60.1` |
|
[@vitest/expect](https://github.com/vitest-dev/vitest/tree/HEAD/packages/expect)
| `4.1.7` | `4.1.8` |
|
[@vitest/mocker](https://github.com/vitest-dev/vitest/tree/HEAD/packages/mocker)
| `4.1.7` | `4.1.8` |
|
[@vitest/pretty-format](https://github.com/vitest-dev/vitest/tree/HEAD/packages/pretty-format)
| `4.1.7` | `4.1.8` |
|
[@vitest/runner](https://github.com/vitest-dev/vitest/tree/HEAD/packages/runner)
| `4.1.7` | `4.1.8` |
|
[@vitest/snapshot](https://github.com/vitest-dev/vitest/tree/HEAD/packages/snapshot)
| `4.1.7` | `4.1.8` |
|
[@vitest/spy](https://github.com/vitest-dev/vitest/tree/HEAD/packages/spy)
| `4.1.7` | `4.1.8` |
|
[@vitest/utils](https://github.com/vitest-dev/vitest/tree/HEAD/packages/utils)
| `4.1.7` | `4.1.8` |
|
[rolldown](https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown)
| `1.0.2` | `1.0.3` |
| [tinyexec](https://github.com/tinylibs/tinyexec) | `1.2.3` | `1.2.4` |
| [tinyglobby](https://github.com/SuperchupuDev/tinyglobby) | `0.2.16` |
`0.2.17` |
| [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) |
`8.0.14` | `8.0.16` |

Updates `@agentclientprotocol/sdk` from 0.22.1 to 0.24.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>v0.24.0</h2>
<h2><a
href="https://github.com/agentclientprotocol/typescript-sdk/compare/v0.23.0...v0.24.0">0.24.0</a>
(2026-06-02)</h2>
<h3>Features</h3>
<ul>
<li>Add resilient schema deserialization (<a
href="https://redirect.github.com/agentclientprotocol/typescript-sdk/issues/167">#167</a>)
(<a
href="5864e7306e">5864e73</a>)</li>
<li><strong>schema:</strong> Stabilize addl dirs and remove unstable
model selectors (<a
href="https://redirect.github.com/agentclientprotocol/typescript-sdk/issues/165">#165</a>)
(<a
href="fa6e302808">fa6e302</a>)</li>
</ul>
<h2>v0.23.0</h2>
<h2><a
href="https://github.com/agentclientprotocol/typescript-sdk/compare/v0.22.1...v0.23.0">0.23.0</a>
(2026-06-01)</h2>
<h3>Features</h3>
<ul>
<li><strong>schema:</strong> Stabilize logout and update schema to
v0.13.4 (<a
href="https://redirect.github.com/agentclientprotocol/typescript-sdk/issues/163">#163</a>)
(<a
href="cfd900a981">cfd900a</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/v0.23.0...v0.24.0">0.24.0</a>
(2026-06-02)</h2>
<h3>Features</h3>
<ul>
<li>Add resilient schema deserialization (<a
href="https://redirect.github.com/agentclientprotocol/typescript-sdk/issues/167">#167</a>)
(<a
href="5864e7306e">5864e73</a>)</li>
<li><strong>schema:</strong> Stabilize addl dirs and remove unstable
model selectors (<a
href="https://redirect.github.com/agentclientprotocol/typescript-sdk/issues/165">#165</a>)
(<a
href="fa6e302808">fa6e302</a>)</li>
</ul>
<h2><a
href="https://github.com/agentclientprotocol/typescript-sdk/compare/v0.22.1...v0.23.0">0.23.0</a>
(2026-06-01)</h2>
<h3>Features</h3>
<ul>
<li><strong>schema:</strong> Stabilize logout and update schema to
v0.13.4 (<a
href="https://redirect.github.com/agentclientprotocol/typescript-sdk/issues/163">#163</a>)
(<a
href="cfd900a981">cfd900a</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="8966c11c6e"><code>8966c11</code></a>
chore(main): release 0.24.0 (<a
href="https://redirect.github.com/agentclientprotocol/typescript-sdk/issues/166">#166</a>)</li>
<li><a
href="5864e7306e"><code>5864e73</code></a>
feat: Add resilient schema deserialization (<a
href="https://redirect.github.com/agentclientprotocol/typescript-sdk/issues/167">#167</a>)</li>
<li><a
href="fa6e302808"><code>fa6e302</code></a>
feat(schema): Stabilize addl dirs and remove unstable model selectors
(<a
href="https://redirect.github.com/agentclientprotocol/typescript-sdk/issues/165">#165</a>)</li>
<li><a
href="0c2e622a11"><code>0c2e622</code></a>
chore(main): release 0.23.0 (<a
href="https://redirect.github.com/agentclientprotocol/typescript-sdk/issues/164">#164</a>)</li>
<li><a
href="cfd900a981"><code>cfd900a</code></a>
feat(schema): Stabilize logout and update schema to v0.13.4 (<a
href="https://redirect.github.com/agentclientprotocol/typescript-sdk/issues/163">#163</a>)</li>
<li><a
href="171a253ae6"><code>171a253</code></a>
chore(deps-dev): bump concurrently from 9.2.1 to 10.0.0 (<a
href="https://redirect.github.com/agentclientprotocol/typescript-sdk/issues/162">#162</a>)</li>
<li><a
href="0ecf00184f"><code>0ecf001</code></a>
chore(deps): bump the minor group with 19 updates (<a
href="https://redirect.github.com/agentclientprotocol/typescript-sdk/issues/161">#161</a>)</li>
<li><a
href="ca74103730"><code>ca74103</code></a>
chore(deps): bump crate-ci/typos from 1.46.2 to 1.47.0 (<a
href="https://redirect.github.com/agentclientprotocol/typescript-sdk/issues/160">#160</a>)</li>
<li><a
href="c6a9c9487d"><code>c6a9c94</code></a>
chore(deps): bump crate-ci/typos from 1.46.1 to 1.46.2 (<a
href="https://redirect.github.com/agentclientprotocol/typescript-sdk/issues/158">#158</a>)</li>
<li><a
href="c7256e7c5d"><code>c7256e7</code></a>
chore(deps): bump the minor group with 43 updates (<a
href="https://redirect.github.com/agentclientprotocol/typescript-sdk/issues/159">#159</a>)</li>
<li>See full diff in <a
href="https://github.com/agentclientprotocol/typescript-sdk/compare/v0.22.1...v0.24.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `@anthropic-ai/claude-agent-sdk` from 0.3.156 to 0.3.160
<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.160</h2>
<h2>What's changed</h2>
<ul>
<li>Fixed SDK hook callbacks swallowing abort signals: aborting during a
PostToolUse hook now ends the turn with a final <code>result</code>
message instead of hanging the calling process</li>
</ul>
<h2>Update</h2>
<pre lang="sh"><code>npm install @anthropic-ai/claude-agent-sdk@0.3.160
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.160
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.160
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.160
</code></pre>
<h2>v0.3.159</h2>
<h2>What's changed</h2>
<ul>
<li>Updated to parity with Claude Code v2.1.159</li>
</ul>
<h2>Update</h2>
<pre lang="sh"><code>npm install @anthropic-ai/claude-agent-sdk@0.3.159
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.159
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.159
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.159
</code></pre>
<h2>v0.3.158</h2>
<h2>What's changed</h2>
<ul>
<li>Updated to parity with Claude Code v2.1.158</li>
</ul>
<h2>Update</h2>
<pre lang="sh"><code>npm install @anthropic-ai/claude-agent-sdk@0.3.158
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.158
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.158
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.158
</code></pre>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</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.160</h2>
<ul>
<li>Fixed SDK hook callbacks swallowing abort signals: aborting during a
PostToolUse hook now ends the turn with a final <code>result</code>
message instead of hanging the calling process</li>
</ul>
<h2>0.3.159</h2>
<ul>
<li>Updated to parity with Claude Code v2.1.159</li>
</ul>
<h2>0.3.158</h2>
<ul>
<li>Updated to parity with Claude Code v2.1.158</li>
</ul>
<h2>0.3.157</h2>
<ul>
<li>Updated to parity with Claude Code v2.1.157</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b33e8d5626"><code>b33e8d5</code></a>
chore: Update CHANGELOG.md</li>
<li><a
href="84f8395802"><code>84f8395</code></a>
chore: Update CHANGELOG.md</li>
<li><a
href="e3a20564b5"><code>e3a2056</code></a>
chore: Update CHANGELOG.md</li>
<li><a
href="7337b9fdd2"><code>7337b9f</code></a>
chore: Update CHANGELOG.md</li>
<li><a
href="80b644339f"><code>80b6443</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.156...v0.3.160">compare
view</a></li>
</ul>
</details>
<br />

Updates `@typescript-eslint/eslint-plugin` from 8.60.0 to 8.60.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/typescript-eslint/typescript-eslint/releases">@​typescript-eslint/eslint-plugin's
releases</a>.</em></p>
<blockquote>
<h2>v8.60.1</h2>
<h2>8.60.1 (2026-06-01)</h2>
<h3>🩹 Fixes</h3>
<ul>
<li><strong>eslint-plugin:</strong> respect ECMAScript line terminators
in ts-comment rules (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12352">#12352</a>)</li>
<li><strong>eslint-plugin:</strong> [no-shadow] correct rule to match
ESLint v10 handling (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12182">#12182</a>)</li>
</ul>
<h3>❤️ Thank You</h3>
<ul>
<li>lumir</li>
<li>Nevette Bailey <a
href="https://github.com/nevette-bailey"><code>@​nevette-bailey</code></a></li>
</ul>
<p>See <a
href="https://github.com/typescript-eslint/typescript-eslint/releases/tag/v8.60.1">GitHub
Releases</a> for more information.</p>
<p>You can read about our <a
href="https://typescript-eslint.io/users/versioning">versioning
strategy</a> and <a
href="https://typescript-eslint.io/users/releases">releases</a> on our
website.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md">@​typescript-eslint/eslint-plugin's
changelog</a>.</em></p>
<blockquote>
<h2>8.60.1 (2026-06-01)</h2>
<h3>🩹 Fixes</h3>
<ul>
<li><strong>eslint-plugin:</strong> [no-shadow] correct rule to match
ESLint v10 handling (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12182">#12182</a>)</li>
<li><strong>eslint-plugin:</strong> respect ECMAScript line terminators
in ts-comment rules (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12352">#12352</a>)</li>
</ul>
<h3>❤️ Thank You</h3>
<ul>
<li>lumir</li>
<li>Nevette Bailey <a
href="https://github.com/nevette-bailey"><code>@​nevette-bailey</code></a></li>
</ul>
<p>See <a
href="https://github.com/typescript-eslint/typescript-eslint/releases/tag/v8.60.1">GitHub
Releases</a> for more information.</p>
<p>You can read about our <a
href="https://typescript-eslint.io/users/versioning">versioning
strategy</a> and <a
href="https://typescript-eslint.io/users/releases">releases</a> on our
website.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="4f84a697ae"><code>4f84a69</code></a>
chore(release): publish 8.60.1</li>
<li><a
href="598af564db"><code>598af56</code></a>
docs(eslint-plugin): clarify no-redeclare type-value collision not
covered by...</li>
<li><a
href="1849b530c2"><code>1849b53</code></a>
chore: typecheck using tsgo (<a
href="https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin/issues/12139">#12139</a>)</li>
<li><a
href="5341d59dd3"><code>5341d59</code></a>
chore: fix lint issues (<a
href="https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin/issues/12369">#12369</a>)</li>
<li><a
href="f525814f01"><code>f525814</code></a>
fix(eslint-plugin): [no-shadow] correct rule to match ESLint v10
handling (<a
href="https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin/issues/1">#1</a>...</li>
<li><a
href="2df540cd8b"><code>2df540c</code></a>
chore(eslint-plugin): defer type checks to improve rules performance (<a
href="https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin/issues/12296">#12296</a>)</li>
<li><a
href="1ab4284789"><code>1ab4284</code></a>
fix(eslint-plugin): respect ECMAScript line terminators in ts-comment
rules (...</li>
<li><a
href="2f49df599b"><code>2f49df5</code></a>
docs: update references to <code>@stylistic/eslint-plugin</code> rules
in documentation ...</li>
<li>See full diff in <a
href="https://github.com/typescript-eslint/typescript-eslint/commits/v8.60.1/packages/eslint-plugin">compare
view</a></li>
</ul>
</details>
<br />

Updates `@typescript-eslint/parser` from 8.60.0 to 8.60.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/typescript-eslint/typescript-eslint/releases">@​typescript-eslint/parser's
releases</a>.</em></p>
<blockquote>
<h2>v8.60.1</h2>
<h2>8.60.1 (2026-06-01)</h2>
<h3>🩹 Fixes</h3>
<ul>
<li><strong>eslint-plugin:</strong> respect ECMAScript line terminators
in ts-comment rules (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12352">#12352</a>)</li>
<li><strong>eslint-plugin:</strong> [no-shadow] correct rule to match
ESLint v10 handling (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12182">#12182</a>)</li>
</ul>
<h3>❤️ Thank You</h3>
<ul>
<li>lumir</li>
<li>Nevette Bailey <a
href="https://github.com/nevette-bailey"><code>@​nevette-bailey</code></a></li>
</ul>
<p>See <a
href="https://github.com/typescript-eslint/typescript-eslint/releases/tag/v8.60.1">GitHub
Releases</a> for more information.</p>
<p>You can read about our <a
href="https://typescript-eslint.io/users/versioning">versioning
strategy</a> and <a
href="https://typescript-eslint.io/users/releases">releases</a> on our
website.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md">@​typescript-eslint/parser's
changelog</a>.</em></p>
<blockquote>
<h2>8.60.1 (2026-06-01)</h2>
<p>This was a version bump only for parser to align it with other
projects, there were no code changes.</p>
<p>See <a
href="https://github.com/typescript-eslint/typescript-eslint/releases/tag/v8.60.1">GitHub
Releases</a> for more information.</p>
<p>You can read about our <a
href="https://typescript-eslint.io/users/versioning">versioning
strategy</a> and <a
href="https://typescript-eslint.io/users/releases">releases</a> on our
website.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="4f84a697ae"><code>4f84a69</code></a>
chore(release): publish 8.60.1</li>
<li><a
href="1849b530c2"><code>1849b53</code></a>
chore: typecheck using tsgo (<a
href="https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser/issues/12139">#12139</a>)</li>
<li>See full diff in <a
href="https://github.com/typescript-eslint/typescript-eslint/commits/v8.60.1/packages/parser">compare
view</a></li>
</ul>
</details>
<br />

Updates `eslint` from 10.4.0 to 10.4.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/eslint/eslint/releases">eslint's
releases</a>.</em></p>
<blockquote>
<h2>v10.4.1</h2>
<h2>Bug Fixes</h2>
<ul>
<li><a
href="e557467db7"><code>e557467</code></a>
fix: update <code>@eslint/plugin-kit</code> version to 0.7.2 (<a
href="https://redirect.github.com/eslint/eslint/issues/20930">#20930</a>)
(Francesco Trotta)</li>
<li><a
href="d4ce898796"><code>d4ce898</code></a>
fix: propagate failures from delegated commands (<a
href="https://redirect.github.com/eslint/eslint/issues/20917">#20917</a>)
(Minh Vu)</li>
<li><a
href="f4f3507460"><code>f4f3507</code></a>
fix: prefer-arrow-callback invalid autofix with newline after
<code>async</code> (<a
href="https://redirect.github.com/eslint/eslint/issues/20916">#20916</a>)
(kuldeep kumar)</li>
<li><a
href="c5bc78b37e"><code>c5bc78b</code></a>
fix: false positive for reference in <code>finally</code> block (<a
href="https://redirect.github.com/eslint/eslint/issues/20655">#20655</a>)
(Tanuj Kanti)</li>
<li><a
href="27538c01f5"><code>27538c0</code></a>
fix: add missing CodePath and CodePathSegment types (<a
href="https://redirect.github.com/eslint/eslint/issues/20853">#20853</a>)
(Pixel998)</li>
</ul>
<h2>Documentation</h2>
<ul>
<li><a
href="61b0add61f"><code>61b0add</code></a>
docs: remove deprecated rule from related rules of
<code>max-params</code> (<a
href="https://redirect.github.com/eslint/eslint/issues/20921">#20921</a>)
(Tanuj Kanti)</li>
<li><a
href="305d5b91ae"><code>305d5b9</code></a>
docs: remove deprecated rules from related rules section (<a
href="https://redirect.github.com/eslint/eslint/issues/20911">#20911</a>)
(Tanuj Kanti)</li>
<li><a
href="49b0202d01"><code>49b0202</code></a>
docs: fix <code>display: none</code> of ad (<a
href="https://redirect.github.com/eslint/eslint/issues/20901">#20901</a>)
(Tanuj Kanti)</li>
<li><a
href="9067f9492e"><code>9067f94</code></a>
docs: switch build to Node.js 24 (<a
href="https://redirect.github.com/eslint/eslint/issues/20893">#20893</a>)
(Milos Djermanovic)</li>
<li><a
href="c91b0417e3"><code>c91b041</code></a>
docs: Update README (GitHub Actions Bot)</li>
<li><a
href="e349265cb3"><code>e349265</code></a>
docs: clarify semver strings in rule deprecation objects (<a
href="https://redirect.github.com/eslint/eslint/issues/20885">#20885</a>)
(Milos Djermanovic)</li>
</ul>
<h2>Chores</h2>
<ul>
<li><a
href="b0e466b6ab"><code>b0e466b</code></a>
test: add <code>data</code> property to invalid tests cases for rules
(<a
href="https://redirect.github.com/eslint/eslint/issues/20924">#20924</a>)
(Tanuj Kanti)</li>
<li><a
href="f78838bc4c"><code>f78838b</code></a>
test: add CodePath type coverage (<a
href="https://redirect.github.com/eslint/eslint/issues/20904">#20904</a>)
(Pixel998)</li>
<li><a
href="1daa4bd734"><code>1daa4bd</code></a>
chore: update <code>eslint-plugin-eslint-comments</code> test data to
latest commit (<a
href="https://redirect.github.com/eslint/eslint/issues/20922">#20922</a>)
(Francesco Trotta)</li>
<li><a
href="002942ce98"><code>002942c</code></a>
ci: declare contents:read on update-readme workflow (<a
href="https://redirect.github.com/eslint/eslint/issues/20919">#20919</a>)
(Arpit Jain)</li>
<li><a
href="64bca24e7b"><code>64bca24</code></a>
chore: update ecosystem plugins (<a
href="https://redirect.github.com/eslint/eslint/issues/20912">#20912</a>)
(ESLint Bot)</li>
<li><a
href="6d7c832950"><code>6d7c832</code></a>
chore: ignore fflate updates in renovate (<a
href="https://redirect.github.com/eslint/eslint/issues/20908">#20908</a>)
(Pixel998)</li>
<li><a
href="b2c8638216"><code>b2c8638</code></a>
ci: bump pnpm/action-setup from 6.0.7 to 6.0.8 (<a
href="https://redirect.github.com/eslint/eslint/issues/20889">#20889</a>)
(dependabot[bot])</li>
<li><a
href="a9b8d7f74c"><code>a9b8d7f</code></a>
chore: increase maxBuffer for ecosystem tests (<a
href="https://redirect.github.com/eslint/eslint/issues/20881">#20881</a>)
(sethamus)</li>
<li><a
href="b702ead5e1"><code>b702ead</code></a>
chore: update ecosystem update PR settings (<a
href="https://redirect.github.com/eslint/eslint/issues/20884">#20884</a>)
(Pixel998)</li>
<li><a
href="507f60e9a7"><code>507f60e</code></a>
chore: update ecosystem plugins (<a
href="https://redirect.github.com/eslint/eslint/issues/20882">#20882</a>)
(ESLint Bot)</li>
<li><a
href="92f5c5bb6b"><code>92f5c5b</code></a>
test: add unit test for message-count (<a
href="https://redirect.github.com/eslint/eslint/issues/20878">#20878</a>)
(kuldeep kumar)</li>
<li><a
href="df321080af"><code>df32108</code></a>
chore: add <code>@​eslint/markdown</code> and typescript-eslint
ecosystem tests (<a
href="https://redirect.github.com/eslint/eslint/issues/20837">#20837</a>)
(sethamus)</li>
<li><a
href="327f91d36a"><code>327f91d</code></a>
chore: use includeIgnoreFile internally (<a
href="https://redirect.github.com/eslint/eslint/issues/20876">#20876</a>)
(Kirk Waiblinger)</li>
<li><a
href="f0dc4bd893"><code>f0dc4bd</code></a>
chore: pin fflate@0.8.2 (<a
href="https://redirect.github.com/eslint/eslint/issues/20877">#20877</a>)
(Milos Djermanovic)</li>
<li><a
href="0f4bd257a6"><code>0f4bd25</code></a>
ci: run Discord alert for ecosystem test failures (<a
href="https://redirect.github.com/eslint/eslint/issues/20873">#20873</a>)
(Copilot)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="4a3d15a99c"><code>4a3d15a</code></a>
10.4.1</li>
<li><a
href="43e7e2bdc5"><code>43e7e2b</code></a>
Build: changelog update for 10.4.1</li>
<li><a
href="e557467db7"><code>e557467</code></a>
fix: update <code>@eslint/plugin-kit</code> version to 0.7.2 (<a
href="https://redirect.github.com/eslint/eslint/issues/20930">#20930</a>)</li>
<li><a
href="b0e466b6ab"><code>b0e466b</code></a>
test: add <code>data</code> property to invalid tests cases for rules
(<a
href="https://redirect.github.com/eslint/eslint/issues/20924">#20924</a>)</li>
<li><a
href="d4ce898796"><code>d4ce898</code></a>
fix: propagate failures from delegated commands (<a
href="https://redirect.github.com/eslint/eslint/issues/20917">#20917</a>)</li>
<li><a
href="f4f3507460"><code>f4f3507</code></a>
fix: prefer-arrow-callback invalid autofix with newline after
<code>async</code> (<a
href="https://redirect.github.com/eslint/eslint/issues/20916">#20916</a>)</li>
<li><a
href="f78838bc4c"><code>f78838b</code></a>
test: add CodePath type coverage (<a
href="https://redirect.github.com/eslint/eslint/issues/20904">#20904</a>)</li>
<li><a
href="61b0add61f"><code>61b0add</code></a>
docs: remove deprecated rule from related rules of
<code>max-params</code> (<a
href="https://redirect.github.com/eslint/eslint/issues/20921">#20921</a>)</li>
<li><a
href="1daa4bd734"><code>1daa4bd</code></a>
chore: update <code>eslint-plugin-eslint-comments</code> test data to
latest commit (<a
href="https://redirect.github.com/eslint/eslint/issues/20">#20</a>...</li>
<li><a
href="002942ce98"><code>002942c</code></a>
ci: declare contents:read on update-readme workflow (<a
href="https://redirect.github.com/eslint/eslint/issues/20919">#20919</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/eslint/eslint/compare/v10.4.0...v10.4.1">compare
view</a></li>
</ul>
</details>
<br />

Updates `vitest` from 4.1.7 to 4.1.8
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vitest-dev/vitest/releases">vitest's
releases</a>.</em></p>
<blockquote>
<h2>v4.1.8</h2>
<h3>   🐞 Bug Fixes</h3>
<ul>
<li><strong>browser</strong>:
<ul>
<li>Disable client <code>cdp</code> API when <code>allowWrite/allowExec:
false</code> [backport to v4]  -  by <a
href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a> and
<strong>Codex</strong> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10450">vitest-dev/vitest#10450</a>
<a href="https://github.com/vitest-dev/vitest/commit/e4067b3b1"><!-- raw
HTML omitted -->(e4067)<!-- raw HTML omitted --></a></li>
<li>Remove orphaned Playwright route when same module is mocked via
multiple ids [backport to v4]  -  by <a
href="https://github.com/toxik"><code>@​toxik</code></a> and <a
href="https://github.com/Zelys-DFKH"><code>@​Zelys-DFKH</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10474">vitest-dev/vitest#10474</a>
<a href="https://github.com/vitest-dev/vitest/commit/675b4343f"><!-- raw
HTML omitted -->(675b4)<!-- raw HTML omitted --></a></li>
</ul>
</li>
</ul>
<h5>    <a
href="https://github.com/vitest-dev/vitest/compare/v4.1.7...v4.1.8">View
changes on GitHub</a></h5>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="e61f2dd2a0"><code>e61f2dd</code></a>
chore: release v4.1.8</li>
<li><a
href="e4067b3b15"><code>e4067b3</code></a>
fix(browser): disable client <code>cdp</code> API when
<code>allowWrite/allowExec: false</code> [ba...</li>
<li>See full diff in <a
href="https://github.com/vitest-dev/vitest/commits/v4.1.8/packages/vitest">compare
view</a></li>
</ul>
</details>
<br />

Updates `@anthropic-ai/claude-agent-sdk-darwin-arm64` from 0.3.156 to
0.3.160

Updates `@anthropic-ai/claude-agent-sdk-darwin-x64` from 0.3.156 to
0.3.160

Updates `@anthropic-ai/claude-agent-sdk-linux-arm64` from 0.3.156 to
0.3.160

Updates `@anthropic-ai/claude-agent-sdk-linux-arm64-musl` from 0.3.156
to 0.3.160

Updates `@anthropic-ai/claude-agent-sdk-linux-x64` from 0.3.156 to
0.3.160

Updates `@anthropic-ai/claude-agent-sdk-linux-x64-musl` from 0.3.156 to
0.3.160

Updates `@anthropic-ai/claude-agent-sdk-win32-arm64` from 0.3.156 to
0.3.160

Updates `@anthropic-ai/claude-agent-sdk-win32-x64` from 0.3.156 to
0.3.160

Updates `@eslint/plugin-kit` from 0.7.1 to 0.7.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/eslint/rewrite/releases">@​eslint/plugin-kit's
releases</a>.</em></p>
<blockquote>
<h2>plugin-kit: v0.7.2</h2>
<h2><a
href="https://github.com/eslint/rewrite/compare/plugin-kit-v0.7.1...plugin-kit-v0.7.2">0.7.2</a>
(2026-05-23)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>add missing .d.cts files while building plugin-kit (<a
href="https://redirect.github.com/eslint/rewrite/issues/445">#445</a>)
(<a
href="49e101ba92">49e101b</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/eslint/rewrite/blob/main/packages/plugin-kit/CHANGELOG.md">@​eslint/plugin-kit's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/eslint/rewrite/compare/plugin-kit-v0.7.1...plugin-kit-v0.7.2">0.7.2</a>
(2026-05-23)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>add missing .d.cts files while building plugin-kit (<a
href="https://redirect.github.com/eslint/rewrite/issues/445">#445</a>)
(<a
href="49e101ba92">49e101b</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="ab64b15b8f"><code>ab64b15</code></a>
chore: release main (<a
href="https://github.com/eslint/rewrite/tree/HEAD/packages/plugin-kit/issues/454">#454</a>)</li>
<li><a
href="49e101ba92"><code>49e101b</code></a>
fix: add missing .d.cts files while building plugin-kit (<a
href="https://github.com/eslint/rewrite/tree/HEAD/packages/plugin-kit/issues/445">#445</a>)</li>
<li><a
href="d46c928474"><code>d46c928</code></a>
docs: Update README sponsors</li>
<li><a
href="f8d08d64ce"><code>f8d08d6</code></a>
docs: Update README sponsors</li>
<li><a
href="334038d4f0"><code>334038d</code></a>
docs: Update README sponsors</li>
<li><a
href="70b69970a2"><code>70b6997</code></a>
docs: Update README sponsors</li>
<li><a
href="be8981f13f"><code>be8981f</code></a>
ci: add type tests for TypeScript 5.x to CI workflow (<a
href="https://github.com/eslint/rewrite/tree/HEAD/packages/plugin-kit/issues/440">#440</a>)</li>
<li><a
href="35b6b944eb"><code>35b6b94</code></a>
chore: update TypeScript to v6 (<a
href="https://github.com/eslint/rewrite/tree/HEAD/packages/plugin-kit/issues/417">#417</a>)</li>
<li><a
href="7807d7107c"><code>7807d71</code></a>
docs: Update README sponsors</li>
<li><a
href="57001eafe0"><code>57001ea</code></a>
docs: Update README sponsors</li>
<li>Additional commits viewable in <a
href="https://github.com/eslint/rewrite/commits/plugin-kit-v0.7.2/packages/plugin-kit">compare
view</a></li>
</ul>
</details>
<br />

Updates `@oxc-project/types` from 0.132.0 to 0.133.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/oxc-project/oxc/releases">@​oxc-project/types's
releases</a>.</em></p>
<blockquote>
<h2>oxc crates_v0.133.0</h2>
<h3>🚀 Features</h3>
<ul>
<li>e857b0c napi/minify: Expose legalComments option and result (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/20370">#20370</a>)
(Boshen)</li>
<li>661132d parser: More friendly error messages for rest assignment
target and rest binding element (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22719">#22719</a>)
(sapphi-red)</li>
<li>ee659b6 transformer/legacy-decorator: Add
<code>strictNullChecks</code> option for nullable-union design:type (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22266">#22266</a>)
(Kyle Cannon)</li>
</ul>
<h3>🐛 Bug Fixes</h3>
<ul>
<li>e1d064e transformer/class-properties: Reparent lifted private method
helpers (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22716">#22716</a>)
(Cameron)</li>
<li>4ac0fca minifier: Preserve <code>0 &amp;&amp; (module.exports = {
... })</code> cjs-module-lexer hint (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22729">#22729</a>)
(Dunqing)</li>
<li>40ff611 minifier: Mark peephole loop changed when dropping
dead-after-throw statement (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22722">#22722</a>)
(Dunqing)</li>
<li>2f7b210 codegen: Emit pife-arrow/function leading comments inside
the wrap (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22720">#22720</a>)
(Dunqing)</li>
<li>e184f74 parser: Improve invalid <code>import</code> property access
diagnostic (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22693">#22693</a>)
(camc314)</li>
<li>7baed9c transformer/private-method: Clear inherited strict flags (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22508">#22508</a>)
(camc314)</li>
<li>a9ad27e parser: Keep annotation comments leading without preceding
newline (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22711">#22711</a>)
(Dunqing)</li>
<li>9ea4d64 minifier: Re-evaluate pure/no-side-effects flags after
peephole inlining (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22595">#22595</a>)
(Dunqing)</li>
<li>07afbb6 minifier: Drop empty-body IIFE wrapper when called with
arguments (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22589">#22589</a>)
(Dunqing)</li>
<li>fa7c463 semantic: Correct TS enum member symbol spans (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22689">#22689</a>)
(camc314)</li>
<li>26b9396 semantic: Resolve parameter decorators outside parameter
scope (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22623">#22623</a>)
(camc314)</li>
<li>b284045 parser: Switch to module goal eagerly on <code>export</code>
(<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22684">#22684</a>)
(Boshen)</li>
<li>dfa931d semantic: Propagate unresolved auto-increment enum value
instead of defaulting to 0 (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22646">#22646</a>)
(Dunqing)</li>
<li>69a6ba6 transformer/legacy-decorator: Emit Array for
ReadonlyArray<!-- raw HTML omitted --> in decorator metadata (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22265">#22265</a>)
(Kyle Cannon)</li>
<li>e421ef0 transformer/legacy-decorator: Return runtime binding for
design:type (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22640">#22640</a>)
(Dunqing)</li>
<li>d61e1d7 codegen: Preserve verbatim text of pure/no-side-effects
comments (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22525">#22525</a>)
(Dunqing)</li>
<li>702b14e minifier: Preserve IIFE structure in DCE-only mode (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22547">#22547</a>)
(Dunqing)</li>
<li>917da24 parser: Apply PURE comment through member-access chains (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22566">#22566</a>)
(Dunqing)</li>
<li>a069b1c codegen: Preserve quotes for cjs-module-lexer equality
strings (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22551">#22551</a>)
(Dunqing)</li>
</ul>
<h3>⚡ Performance</h3>
<ul>
<li>2f623b0 semantic: Skip unresolved checks for re-exports (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22660">#22660</a>)
(camc314)</li>
<li>0d9553d semantic: Early-exit <code>check_object_expression</code>
for objects with &lt;2 properties (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22668">#22668</a>)
(Dunqing)</li>
<li>d721ad9 semantic: Use direct grandparent lookup for TS type
parameters (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22658">#22658</a>)
(camc314)</li>
<li>0aff288 semantic: Reorder numeric literal strict mode checks (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22657">#22657</a>)
(camc314)</li>
<li>4d5ddb1 semantic: Reorder binding identifier checks (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22656">#22656</a>)
(camc314)</li>
<li>e32acd8 semantic: Reorder identifier ambient binding check (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22653">#22653</a>)
(camc314)</li>
<li>09fe178 semantic: Reorder ident reference strict mode check (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22652">#22652</a>)
(camc314)</li>
<li>4b6add2 semantic: Avoid duplicate ident clone for bindings (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22663">#22663</a>)
(camc314)</li>
<li>82f9662 parser: Check identifier kind before context flag (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22662">#22662</a>)
(camc314)</li>
<li>d7cd951 parser: Fast path identifier parsing and inline operator
helpers (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22650">#22650</a>)
(Boshen)</li>
<li>7b84314 semantic: Use direct byte access for numeric leading-zero
check (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22642">#22642</a>)
(camc314)</li>
<li>0345a31 semantic: Pre-size class elements hash map (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22618">#22618</a>)
(camc314)</li>
<li>04d3065 minifier: Drop per-call buffers in try_fold_concat (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22596">#22596</a>)
(Dunqing)</li>
<li>4f289f1 semantic: Resolve_references_for_current_scope without a
temp Vec (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22599">#22599</a>)
(Dunqing)</li>
<li>e862c15 semantic: Avoid heap alloc for var hoist scope ids (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22603">#22603</a>)
(Dunqing)</li>
<li>8ff8674 semantic: Early return if <code>excess</code> is
<code>0</code> in <code>Stats::increase_by</code> (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22616">#22616</a>)
(camc314)</li>
<li>7a4120e semantic: Pre-reserve unresolved_references using
Stats::references (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22580">#22580</a>)
(Dunqing)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="83328b65ce"><code>83328b6</code></a>
release(crates): oxc v0.133.0 (<a
href="https://github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types/issues/22734">#22734</a>)</li>
<li>See full diff in <a
href="https://github.com/oxc-project/oxc/commits/crates_v0.133.0/npm/oxc-types">compare
view</a></li>
</ul>
</details>
<br />

Updates `@rolldown/binding-android-arm64` from 1.0.2 to 1.0.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/rolldown/rolldown/releases">@​rolldown/binding-android-arm64's
releases</a>.</em></p>
<blockquote>
<h2>v1.0.3</h2>
<h2>[1.0.3] - 2026-05-27</h2>
<h3>🚀 Features</h3>
<ul>
<li>transform: respect decorator strictNullChecks option (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9580">#9580</a>)
by <a
href="https://github.com/kylecannon"><code>@​kylecannon</code></a></li>
<li>drop <code>defer</code> keyword (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9503">#9503</a>)
by <a
href="https://github.com/TheAlexLichter"><code>@​TheAlexLichter</code></a></li>
</ul>
<h3>🐛 Bug Fixes</h3>
<ul>
<li>ci: create target dir before cargo release-oxc update (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9584">#9584</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>ci: reorder prepare-release steps to avoid dirty git check failure
(<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9583">#9583</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>testing: canonicalize temp dir early and use platform-specific
separator in test262 (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9582">#9582</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>testing: resolve symlinked temp dir in test262 snapshot
normalization (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9581">#9581</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>testing: canonicalize temp dir path in test262 snapshot
normalization (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9579">#9579</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>dev: <code>onOutput</code> called twice when initial build fails (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9552">#9552</a>)
by <a href="https://github.com/hyf0"><code>@​hyf0</code></a></li>
<li>dev: make <code>ensureCurrentBuildFinish</code> not returning error
when engine closes (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9564">#9564</a>)
by <a href="https://github.com/h-a-n-a"><code>@​h-a-n-a</code></a></li>
<li>oxc-runtime: route require() to CJS helper variant (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9263">#9263</a>)
(<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9526">#9526</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>generator: use exporter chunk's export mode for CJS default
re-exports (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9299">#9299</a>)
(<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9529">#9529</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>rolldown: always run reduced-atom static cycle check (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9441">#9441</a>)
(<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9514">#9514</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>apply transform.dropLabels before scanning (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9521">#9521</a>)
(<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9522">#9522</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>rolldown_watcher: take <code>rolldown</code> dep through the
workspace (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9510">#9510</a>)
by <a href="https://github.com/Boshen"><code>@​Boshen</code></a></li>
<li>cache: keep the scan-stage cache consistent when a build fails (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9495">#9495</a>)
by <a href="https://github.com/h-a-n-a"><code>@​h-a-n-a</code></a></li>
<li>skip JSON default-import namespace optimization for write targets
(<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9484">#9484</a>)
(<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9489">#9489</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>deps: skip pnpm frozen-lockfile on Netlify to dodge catalog mismatch
bug (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9471">#9471</a>)
by <a href="https://github.com/Boshen"><code>@​Boshen</code></a></li>
</ul>
<h3>🚜 Refactor</h3>
<ul>
<li>oxc-runtime: use Cow for helper path construction (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9538">#9538</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>fold import defer phase drop into PreProcessor (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9524">#9524</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>distinguish <code>map: null</code> vs <code>map: undefined</code> in
transform hook output (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9497">#9497</a>)
by <a
href="https://github.com/sapphi-red"><code>@​sapphi-red</code></a></li>
</ul>
<h3>📚 Documentation</h3>
<ul>
<li>explain the policy for Rust crates (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9547">#9547</a>)
by <a
href="https://github.com/sapphi-red"><code>@​sapphi-red</code></a></li>
<li>cache: add design doc for cache (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9544">#9544</a>)
by <a href="https://github.com/h-a-n-a"><code>@​h-a-n-a</code></a></li>
<li>guide/troubleshooting: add TDZ error section (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9537">#9537</a>)
by <a
href="https://github.com/sapphi-red"><code>@​sapphi-red</code></a></li>
<li>dev-engine: add design doc for dev-engine (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9479">#9479</a>)
by <a href="https://github.com/h-a-n-a"><code>@​h-a-n-a</code></a></li>
<li>lazy-barrel: tweak some words (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9483">#9483</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>lazy-barrel: expand reasoning behind LARGE_BARREL_MODULES advice (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9477">#9477</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
</ul>
<h3>⚡ Performance</h3>
<ul>
<li>generate: thread ast_table by value into codegen consumer (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9555">#9555</a>)
by <a href="https://github.com/Boshen"><code>@​Boshen</code></a></li>
<li>finalizers: replace <code>_reExport</code> construction with a
direct call to avoid calling <code>clone_in</code> (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9501">#9501</a>)
by <a href="https://github.com/Dunqing"><code>@​Dunqing</code></a></li>
<li>reorder hot-path boolean checks to short-circuit on cheap predicates
first (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9523">#9523</a>)
by <a href="https://github.com/Boshen"><code>@​Boshen</code></a></li>
</ul>
<h3>🧪 Testing</h3>
<ul>
<li>rolldown: regression fixture for <a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9401">#9401</a>
(<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9418">#9418</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rolldown/rolldown/blob/main/CHANGELOG.md">@​rolldown/binding-android-arm64's
changelog</a>.</em></p>
<blockquote>
<h2>[1.0.3] - 2026-05-27</h2>
<h3>🚀 Features</h3>
<ul>
<li>transform: respect decorator strictNullChecks option (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9580">#9580</a>)
by <a
href="https://github.com/kylecannon"><code>@​kylecannon</code></a></li>
<li>drop <code>defer</code> keyword (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9503">#9503</a>)
by <a
href="https://github.com/TheAlexLichter"><code>@​TheAlexLichter</code></a></li>
</ul>
<h3>🐛 Bug Fixes</h3>
<ul>
<li>ci: create target dir before cargo release-oxc update (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9584">#9584</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>ci: reorder prepare-release steps to avoid dirty git check failure
(<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9583">#9583</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>testing: canonicalize temp dir early and use platform-specific
separator in test262 (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9582">#9582</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>testing: resolve symlinked temp dir in test262 snapshot
normalization (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9581">#9581</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>testing: canonicalize temp dir path in test262 snapshot
normalization (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9579">#9579</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>dev: <code>onOutput</code> called twice when initial build fails (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9552">#9552</a>)
by <a href="https://github.com/hyf0"><code>@​hyf0</code></a></li>
<li>dev: make <code>ensureCurrentBuildFinish</code> not returning error
when engine closes (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9564">#9564</a>)
by <a href="https://github.com/h-a-n-a"><code>@​h-a-n-a</code></a></li>
<li>oxc-runtime: route require() to CJS helper variant (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9263">#9263</a>)
(<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9526">#9526</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>generator: use exporter chunk's export mode for CJS default
re-exports (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9299">#9299</a>)
(<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9529">#9529</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>rolldown: always run reduced-atom static cycle check (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9441">#9441</a>)
(<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9514">#9514</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>apply transform.dropLabels before scanning (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9521">#9521</a>)
(<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9522">#9522</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>rolldown_watcher: take <code>rolldown</code> dep through the
workspace (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9510">#9510</a>)
by <a href="https://github.com/Boshen"><code>@​Boshen</code></a></li>
<li>cache: keep the scan-stage cache consistent when a build fails (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9495">#9495</a>)
by <a href="https://github.com/h-a-n-a"><code>@​h-a-n-a</code></a></li>
<li>skip JSON default-import namespace optimization for write targets
(<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9484">#9484</a>)
(<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9489">#9489</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>deps: skip pnpm frozen-lockfile on Netlify to dodge catalog mismatch
bug (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9471">#9471</a>)
by <a href="https://github.com/Boshen"><code>@​Boshen</code></a></li>
</ul>
<h3>🚜 Refactor</h3>
<ul>
<li>oxc-runtime: use Cow for helper path construction (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9538">#9538</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>fold import defer phase drop into PreProcessor (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9524">#9524</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>distinguish <code>map: null</code> vs <code>map: undefined</code> in
transform hook output (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9497">#9497</a>)
by <a
href="https://github.com/sapphi-red"><code>@​sapphi-red</code></a></li>
</ul>
<h3>📚 Documentation</h3>
<ul>
<li>explain the policy for Rust crates (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9547">#9547</a>)
by <a
href="https://github.com/sapphi-red"><code>@​sapphi-red</code></a></li>
<li>cache: add design doc for cache (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9544">#9544</a>)
by <a href="https://github.com/h-a-n-a"><code>@​h-a-n-a</code></a></li>
<li>guide/troubleshooting: add TDZ error section (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9537">#9537</a>)
by <a
href="https://github.com/sapphi-red"><code>@​sapphi-red</code></a></li>
<li>dev-engine: add design doc for dev-engine (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9479">#9479</a>)
by <a href="https://github.com/h-a-n-a"><code>@​h-a-n-a</code></a></li>
<li>lazy-barrel: tweak some words (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9483">#9483</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>lazy-barrel: expand reasoning behind LARGE_BARREL_MODULES advice (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9477">#9477</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
</ul>
<h3>⚡ Performance</h3>
<ul>
<li>generate: thread ast_table by value into codegen consumer (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9555">#9555</a>)
by <a href="https://github.com/Boshen"><code>@​Boshen</code></a></li>
<li>finalizers: replace <code>_reExport</code> construction with a
direct call to avoid calling <code>clone_in</code> (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9501">#9501</a>)
by <a href="https://github.com/Dunqing"><code>@​Dunqing</code></a></li>
<li>reorder hot-path boolean checks to short-circuit on cheap predicates
first (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9523">#9523</a>)
by <a href="https://github.com/Boshen"><code>@​Boshen</code></a></li>
</ul>
<h3>🧪 Testing</h3>
<ul>
<li>rolldown: regression fixture for <a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9401">#9401</a>
(<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9418">#9418</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>failing test for <a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9441">#9441</a>
(<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9504">#9504</a>)
by <a
href="https://github.com/TheAlexLichter"><code>@​TheAlexLichter</code></a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="a287faaa3d"><code>a287faa</code></a>
release: v1.0.3 (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9586">#9586</a>)</li>
<li><a
href="e3b77564d4"><code>e3b7756</code></a>
feat(transform): respect decorator strictNullChecks option (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9580">#9580</a>)</li>
<li><a
href="8326121d51"><code>8326121</code></a>
chore(deps): upgrade oxc to 0.133.0 (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9563">#9563</a>)</li>
<li><a
href="c7bbe2d4c1"><code>c7bbe2d</code></a>
fix(dev): <code>onOutput</code> called twice when initial build fails
(<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9552">#9552</a>)</li>
<li><a
href="95ed7caa16"><code>95ed7ca</code></a>
fix(dev): make <code>ensureCurrentBuildFinish</code> not returning error
when engine clo...</li>
<li><a
href="f06c2a06f5"><code>f06c2a0</code></a>
fix(oxc-runtime): route require() to CJS helper variant (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9263">#9263</a>)
(<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9526">#9526</a>)</li>
<li><a
href="1de499a7a7"><code>1de499a</code></a>
feat: drop <code>defer</code> keyword (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9503">#9503</a>)</li>
<li><a href=...

_Description has been truncated_

---------

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-06-02 22:52:25 +02:00
dependabot[bot]
9cda07ba9d feat(deps): bump actions/checkout from 6.0.2 to 6.0.3 (#736)
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.2
to 6.0.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/checkout/releases">actions/checkout's
releases</a>.</em></p>
<blockquote>
<h2>v6.0.3</h2>
<h2>What's Changed</h2>
<ul>
<li>Update changelog by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2357">actions/checkout#2357</a></li>
<li>fix: expand merge commit SHA regex and add SHA-256 test cases by <a
href="https://github.com/yaananth"><code>@​yaananth</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2414">actions/checkout#2414</a></li>
<li>Fix checkout init for SHA-256 repositories by <a
href="https://github.com/yaananth"><code>@​yaananth</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2439">actions/checkout#2439</a></li>
<li>Update changelog for v6.0.3 by <a
href="https://github.com/yaananth"><code>@​yaananth</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2446">actions/checkout#2446</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/yaananth"><code>@​yaananth</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/2414">actions/checkout#2414</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v6...v6.0.3">https://github.com/actions/checkout/compare/v6...v6.0.3</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/actions/checkout/blob/main/CHANGELOG.md">actions/checkout's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<h2>v6.0.3</h2>
<ul>
<li>Fix checkout init for SHA-256 repositories by <a
href="https://github.com/yaananth"><code>@​yaananth</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2439">actions/checkout#2439</a></li>
<li>fix: expand merge commit SHA regex and add SHA-256 test cases by <a
href="https://github.com/yaananth"><code>@​yaananth</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2414">actions/checkout#2414</a></li>
</ul>
<h2>v6.0.2</h2>
<ul>
<li>Fix tag handling: preserve annotations and explicit fetch-tags by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2356">actions/checkout#2356</a></li>
</ul>
<h2>v6.0.1</h2>
<ul>
<li>Add worktree support for persist-credentials includeIf by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2327">actions/checkout#2327</a></li>
</ul>
<h2>v6.0.0</h2>
<ul>
<li>Persist creds to a separate file by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2286">actions/checkout#2286</a></li>
<li>Update README to include Node.js 24 support details and requirements
by <a href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/2248">actions/checkout#2248</a></li>
</ul>
<h2>v5.0.1</h2>
<ul>
<li>Port v6 cleanup to v5 by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2301">actions/checkout#2301</a></li>
</ul>
<h2>v5.0.0</h2>
<ul>
<li>Update actions checkout to use node 24 by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2226">actions/checkout#2226</a></li>
</ul>
<h2>v4.3.1</h2>
<ul>
<li>Port v6 cleanup to v4 by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2305">actions/checkout#2305</a></li>
</ul>
<h2>v4.3.0</h2>
<ul>
<li>docs: update README.md by <a
href="https://github.com/motss"><code>@​motss</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1971">actions/checkout#1971</a></li>
<li>Add internal repos for checking out multiple repositories by <a
href="https://github.com/mouismail"><code>@​mouismail</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1977">actions/checkout#1977</a></li>
<li>Documentation update - add recommended permissions to Readme by <a
href="https://github.com/benwells"><code>@​benwells</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2043">actions/checkout#2043</a></li>
<li>Adjust positioning of user email note and permissions heading by <a
href="https://github.com/joshmgross"><code>@​joshmgross</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2044">actions/checkout#2044</a></li>
<li>Update README.md by <a
href="https://github.com/nebuk89"><code>@​nebuk89</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2194">actions/checkout#2194</a></li>
<li>Update CODEOWNERS for actions by <a
href="https://github.com/TingluoHuang"><code>@​TingluoHuang</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/2224">actions/checkout#2224</a></li>
<li>Update package dependencies by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2236">actions/checkout#2236</a></li>
</ul>
<h2>v4.2.2</h2>
<ul>
<li><code>url-helper.ts</code> now leverages well-known environment
variables by <a href="https://github.com/jww3"><code>@​jww3</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/1941">actions/checkout#1941</a></li>
<li>Expand unit test coverage for <code>isGhes</code> by <a
href="https://github.com/jww3"><code>@​jww3</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1946">actions/checkout#1946</a></li>
</ul>
<h2>v4.2.1</h2>
<ul>
<li>Check out other refs/* by commit if provided, fall back to ref by <a
href="https://github.com/orhantoy"><code>@​orhantoy</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1924">actions/checkout#1924</a></li>
</ul>
<h2>v4.2.0</h2>
<ul>
<li>Add Ref and Commit outputs by <a
href="https://github.com/lucacome"><code>@​lucacome</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1180">actions/checkout#1180</a></li>
<li>Dependency updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>- <a
href="https://redirect.github.com/actions/checkout/pull/1777">actions/checkout#1777</a>,
<a
href="https://redirect.github.com/actions/checkout/pull/1872">actions/checkout#1872</a></li>
</ul>
<h2>v4.1.7</h2>
<ul>
<li>Bump the minor-npm-dependencies group across 1 directory with 4
updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1739">actions/checkout#1739</a></li>
<li>Bump actions/checkout from 3 to 4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1697">actions/checkout#1697</a></li>
<li>Check out other refs/* by commit by <a
href="https://github.com/orhantoy"><code>@​orhantoy</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1774">actions/checkout#1774</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="df4cb1c069"><code>df4cb1c</code></a>
Update changelog for v6.0.3 (<a
href="https://redirect.github.com/actions/checkout/issues/2446">#2446</a>)</li>
<li><a
href="1cce3390c2"><code>1cce339</code></a>
Fix checkout init for SHA-256 repositories (<a
href="https://redirect.github.com/actions/checkout/issues/2439">#2439</a>)</li>
<li><a
href="900f2210b1"><code>900f221</code></a>
fix: expand merge commit SHA regex and add SHA-256 test cases (<a
href="https://redirect.github.com/actions/checkout/issues/2414">#2414</a>)</li>
<li><a
href="0c366fd6a8"><code>0c366fd</code></a>
Update changelog (<a
href="https://redirect.github.com/actions/checkout/issues/2357">#2357</a>)</li>
<li>See full diff in <a
href="de0fac2e45...df4cb1c069">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=6.0.2&new-version=6.0.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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 this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-02 21:50:48 +02:00
dependabot[bot]
51a370e4fe feat(deps-dev): bump the minor group with 2 updates (#726)
Bumps the minor group with 2 updates:
[@anthropic-ai/sdk](https://github.com/anthropics/anthropic-sdk-typescript)
and [tinyexec](https://github.com/tinylibs/tinyexec).

Updates `@anthropic-ai/sdk` from 0.100.0 to 0.100.1
<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.100.1</h2>
<h2>0.100.1 (2026-05-29)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.100.0...sdk-v0.100.1">sdk-v0.100.0...sdk-v0.100.1</a></p>
<h3>Bug Fixes</h3>
<ul>
<li><strong>streaming:</strong> carry encrypted_content on beta
compaction blocks (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-typescript/issues/1025">#1025</a>)
(<a
href="eccddf3ed2">eccddf3</a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li><strong>client:</strong> update lockfiles to have proper
dependencies on standardwebhooks (<a
href="5e9b5237e5">5e9b523</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.100.1 (2026-05-29)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.100.0...sdk-v0.100.1">sdk-v0.100.0...sdk-v0.100.1</a></p>
<h3>Bug Fixes</h3>
<ul>
<li><strong>streaming:</strong> carry encrypted_content on beta
compaction blocks (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-typescript/issues/1025">#1025</a>)
(<a
href="eccddf3ed2">eccddf3</a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li><strong>client:</strong> update lockfiles to have proper
dependencies on standardwebhooks (<a
href="5e9b5237e5">5e9b523</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="512605fa9b"><code>512605f</code></a>
chore: release main</li>
<li><a
href="d0148df188"><code>d0148df</code></a>
codegen metadata</li>
<li><a
href="4d836b47ef"><code>4d836b4</code></a>
codegen metadata</li>
<li><a
href="323e350620"><code>323e350</code></a>
codegen metadata</li>
<li><a
href="ea36df73ef"><code>ea36df7</code></a>
chore(client): update lockfiles to have proper dependencies on
standardwebhooks</li>
<li><a
href="0ea1922fad"><code>0ea1922</code></a>
codegen metadata</li>
<li><a
href="991d88f14b"><code>991d88f</code></a>
fix(streaming): carry encrypted_content on beta compaction blocks (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-typescript/issues/1025">#1025</a>)</li>
<li>See full diff in <a
href="https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.100.0...sdk-v0.100.1">compare
view</a></li>
</ul>
</details>
<br />

Updates `tinyexec` from 1.2.2 to 1.2.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tinylibs/tinyexec/releases">tinyexec's
releases</a>.</em></p>
<blockquote>
<h2>1.2.3</h2>
<h2>What's Changed</h2>
<ul>
<li>chore(deps-dev): bump the development-dependencies group with 4
updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/tinylibs/tinyexec/pull/135">tinylibs/tinyexec#135</a></li>
<li>fix: destroy piped streams on child exit to prevent grandchild
deadlock by <a
href="https://github.com/Mearman"><code>@​Mearman</code></a> in <a
href="https://redirect.github.com/tinylibs/tinyexec/pull/137">tinylibs/tinyexec#137</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/Mearman"><code>@​Mearman</code></a> made
their first contribution in <a
href="https://redirect.github.com/tinylibs/tinyexec/pull/137">tinylibs/tinyexec#137</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/tinylibs/tinyexec/compare/1.2.2...1.2.3">https://github.com/tinylibs/tinyexec/compare/1.2.2...1.2.3</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="20e4117b26"><code>20e4117</code></a>
fix: destroy piped streams on child exit to prevent grandchild deadlock
(<a
href="https://redirect.github.com/tinylibs/tinyexec/issues/137">#137</a>)</li>
<li><a
href="51e4f279b6"><code>51e4f27</code></a>
chore(deps-dev): bump the development-dependencies group with 4 updates
(<a
href="https://redirect.github.com/tinylibs/tinyexec/issues/135">#135</a>)</li>
<li>See full diff in <a
href="https://github.com/tinylibs/tinyexec/compare/1.2.2...1.2.3">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>
2026-05-29 20:31:05 +02:00
acp-release-bot[bot]
edde96ebaf chore(main): release 0.39.0 (#724)
🤖 I have created a release *beep* *boop*
---


##
[0.39.0](https://github.com/agentclientprotocol/claude-agent-acp/compare/v0.38.0...v0.39.0)
(2026-05-29)


### Features

* **deps:** update Claude Agent SDK to 0.3.156
([#722](https://github.com/agentclientprotocol/claude-agent-acp/issues/722))
([3fb6db4](3fb6db4e5e))

---
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-05-29 12:12:17 +02:00
XiaoYan Li
3fb6db4e5e feat(deps): update Claude Agent SDK to 0.3.156 (#722)
## Summary

- Updates `@anthropic-ai/claude-agent-sdk` from `0.3.154` to `0.3.156`.
- Refreshes the npm lockfile entries for the SDK and its optional
platform packages.

## Why this is important

This upgrade pulls in the Claude Code `v2.1.156` fix for Opus 4.8 where
thinking blocks could be modified, leading to API errors. That makes the
dependency update important for keeping Opus 4.8 sessions stable and
avoiding request failures caused by malformed thinking block handling.

Release note:
https://github.com/anthropics/claude-code/releases/tag/v2.1.156

## Verification

- `npm run check`
- `npm run build`
- `npm run test:run`
2026-05-29 10:10:32 +00:00
Ben Brandt
41e3771881 Revert "fix: Remove hide Claude auth flag handling" (#723)
Reverts agentclientprotocol/claude-agent-acp#707
2026-05-29 12:06:08 +02:00
17 changed files with 2891 additions and 573 deletions

View File

@@ -21,7 +21,7 @@ jobs:
timeout-minutes: 5
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
- name: Use Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e

View File

@@ -44,7 +44,7 @@ jobs:
contents: read
id-token: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
with:

View File

@@ -1,3 +1,3 @@
{
".": "0.38.0"
".": "0.43.0"
}

View File

@@ -1,5 +1,69 @@
# Changelog
## [0.43.0](https://github.com/agentclientprotocol/claude-agent-acp/compare/v0.42.0...v0.43.0) (2026-06-09)
### Features
* Add experimental elicitation support ([#756](https://github.com/agentclientprotocol/claude-agent-acp/issues/756)) ([12bd276](https://github.com/agentclientprotocol/claude-agent-acp/commit/12bd2762d9ba0ccb7497a3848a5928b8bb2ce820))
* **deps:** update to @anthropic-ai/claude-agent-sdk 0.3.169 ([#754](https://github.com/agentclientprotocol/claude-agent-acp/issues/754)) ([bd0ae4d](https://github.com/agentclientprotocol/claude-agent-acp/commit/bd0ae4dde160f59559ab4ac1bf703fcf151eff17))
* Update ACP SDK to 0.25.0 ([#753](https://github.com/agentclientprotocol/claude-agent-acp/issues/753)) ([0dbccf5](https://github.com/agentclientprotocol/claude-agent-acp/commit/0dbccf588ff702015494dd29969d47f0b7402feb))
### Bug Fixes
* Forward unstreamed assistant text blocks ([#757](https://github.com/agentclientprotocol/claude-agent-acp/issues/757)) ([7ff6b7f](https://github.com/agentclientprotocol/claude-agent-acp/commit/7ff6b7fd6b157aedbce0c636087f51ae7d1df3a7))
* Validate cwd before creating sessions ([#751](https://github.com/agentclientprotocol/claude-agent-acp/issues/751)) ([9854b0c](https://github.com/agentclientprotocol/claude-agent-acp/commit/9854b0c6790ebafff514e3c4c8e03a131f065a4a)), closes [#749](https://github.com/agentclientprotocol/claude-agent-acp/issues/749)
## [0.42.0](https://github.com/agentclientprotocol/claude-agent-acp/compare/v0.41.0...v0.42.0) (2026-06-05)
### Features
* **deps-dev:** bump obug from 2.1.1 to 2.1.2 in the minor group ([#743](https://github.com/agentclientprotocol/claude-agent-acp/issues/743)) ([7ffb78c](https://github.com/agentclientprotocol/claude-agent-acp/commit/7ffb78c57280fc32af77862896c0035ce0e690b7))
* Send message ids for assistant and user messages ([#750](https://github.com/agentclientprotocol/claude-agent-acp/issues/750)) ([18516a3](https://github.com/agentclientprotocol/claude-agent-acp/commit/18516a3088f847a38f5eee0fe81ad5ca3e2a751c))
* Update Claude Agent SDK to 0.3.165 ([#746](https://github.com/agentclientprotocol/claude-agent-acp/issues/746)) ([23cbe6f](https://github.com/agentclientprotocol/claude-agent-acp/commit/23cbe6f58fa9e10ad736f664c4cf94dbd1c6ad65))
### Bug Fixes
* Prevent cross-family model matching in resolveModelPreference ([#731](https://github.com/agentclientprotocol/claude-agent-acp/issues/731)) ([f4704c1](https://github.com/agentclientprotocol/claude-agent-acp/commit/f4704c168f917e6710f2b3cd49e1fef49613a469))
* Prune tool cache per session after results ([#748](https://github.com/agentclientprotocol/claude-agent-acp/issues/748)) ([ec14211](https://github.com/agentclientprotocol/claude-agent-acp/commit/ec142110561f680330c6976783805685c5c069ec))
* Update to better utilize existing SDK data ([#747](https://github.com/agentclientprotocol/claude-agent-acp/issues/747)) ([398f763](https://github.com/agentclientprotocol/claude-agent-acp/commit/398f763f71bd2fe2ca9e8269de120d26a744b7a8))
## [0.41.0](https://github.com/agentclientprotocol/claude-agent-acp/compare/v0.40.0...v0.41.0) (2026-06-04)
### Features
* **deps:** upgrade to @anthropic-ai/claude-agent-sdk@0.3.162 ([#740](https://github.com/agentclientprotocol/claude-agent-acp/issues/740)) ([add7e31](https://github.com/agentclientprotocol/claude-agent-acp/commit/add7e31704581aa70febb6341ca0e8cee5d93b43))
### Bug Fixes
* Force cancellation when SDK query hangs ([#742](https://github.com/agentclientprotocol/claude-agent-acp/issues/742)) ([cffea4b](https://github.com/agentclientprotocol/claude-agent-acp/commit/cffea4be28e6def91027110433a99e80b1be8a0c)), closes [#680](https://github.com/agentclientprotocol/claude-agent-acp/issues/680)
## [0.40.0](https://github.com/agentclientprotocol/claude-agent-acp/compare/v0.39.0...v0.40.0) (2026-06-02)
### Features
* **deps-dev:** bump the minor group with 2 updates ([#726](https://github.com/agentclientprotocol/claude-agent-acp/issues/726)) ([51a370e](https://github.com/agentclientprotocol/claude-agent-acp/commit/51a370e4feb8a74279698b156e35b96631a74d74))
* **deps:** bump actions/checkout from 6.0.2 to 6.0.3 ([#736](https://github.com/agentclientprotocol/claude-agent-acp/issues/736)) ([9cda07b](https://github.com/agentclientprotocol/claude-agent-acp/commit/9cda07ba9df27b48bd94332e365eed982e3f5613))
* **deps:** bump the minor group with 50 updates ([#737](https://github.com/agentclientprotocol/claude-agent-acp/issues/737)) ([32175b8](https://github.com/agentclientprotocol/claude-agent-acp/commit/32175b83a0227d0baa1f7d7eedabe743b4b870e8))
### Bug Fixes
* Optimize local command marker stripping ([#738](https://github.com/agentclientprotocol/claude-agent-acp/issues/738)) ([895422c](https://github.com/agentclientprotocol/claude-agent-acp/commit/895422c72d5f955903f227dc6887df823d2730e6)), closes [#727](https://github.com/agentclientprotocol/claude-agent-acp/issues/727)
## [0.39.0](https://github.com/agentclientprotocol/claude-agent-acp/compare/v0.38.0...v0.39.0) (2026-05-29)
### Features
* **deps:** update Claude Agent SDK to 0.3.156 ([#722](https://github.com/agentclientprotocol/claude-agent-acp/issues/722)) ([3fb6db4](https://github.com/agentclientprotocol/claude-agent-acp/commit/3fb6db4e5ee5bd1f431cf5d2ce5331ce983f9597))
## [0.38.0](https://github.com/agentclientprotocol/claude-agent-acp/compare/v0.37.0...v0.38.0) (2026-05-28)

527
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,7 @@
"publishConfig": {
"access": "public"
},
"version": "0.38.0",
"version": "0.43.0",
"description": "An ACP-compatible coding agent powered by the Claude Agent SDK (TypeScript)",
"main": "dist/lib.js",
"types": "dist/lib.d.ts",
@@ -60,22 +60,22 @@
"author": "Zed Industries",
"license": "Apache-2.0",
"dependencies": {
"@agentclientprotocol/sdk": "0.22.1",
"@anthropic-ai/claude-agent-sdk": "0.3.154",
"@agentclientprotocol/sdk": "0.25.0",
"@anthropic-ai/claude-agent-sdk": "0.3.169",
"zod": "^3.25.0 || ^4.0.0"
},
"devDependencies": {
"@anthropic-ai/sdk": "0.100.0",
"@anthropic-ai/sdk": "0.102.0",
"@eslint/js": "10.0.1",
"@types/node": "25.9.1",
"@typescript-eslint/eslint-plugin": "8.60.0",
"@typescript-eslint/parser": "8.60.0",
"eslint": "10.4.0",
"@types/node": "25.9.2",
"@typescript-eslint/eslint-plugin": "8.60.1",
"@typescript-eslint/parser": "8.60.1",
"eslint": "10.4.1",
"eslint-config-prettier": "10.1.8",
"globals": "17.6.0",
"prettier": "3.8.3",
"ts-node": "10.9.2",
"typescript": "6.0.3",
"vitest": "4.1.7"
"vitest": "4.1.8"
}
}

File diff suppressed because it is too large Load Diff

249
src/elicitation.ts Normal file
View File

@@ -0,0 +1,249 @@
import { randomUUID } from "node:crypto";
import type {
CreateElicitationRequest,
CreateElicitationResponse,
ElicitationPropertySchema,
ElicitationSchema,
EnumOption,
} from "@agentclientprotocol/sdk";
import type { ElicitationRequest, ElicitationResult } from "@anthropic-ai/claude-agent-sdk";
import type {
AskUserQuestionInput,
AskUserQuestionOutput,
} from "@anthropic-ai/claude-agent-sdk/sdk-tools.js";
/**
* Bridges between the Claude Agent SDK's elicitation/dialog callbacks and ACP's
* (unstable) elicitation protocol.
*
* Two distinct SDK surfaces flow through here:
*
* 1. `onElicitation` — fired when an MCP server requests user input. These map
* directly onto ACP `session/create_elicitation` (form or url mode).
* 2. The built-in AskUserQuestion tool — when a `canUseTool` callback is
* registered the SDK routes its permission check through `canUseTool`
* (not the interactive `permission_ask_user_question` dialog). We render
* its questions as an ACP form elicitation and feed the user's selections
* back as the tool's `updatedInput`, which the tool's own `call()` reads.
*/
/** Modes the connected client advertised support for. */
export type ElicitationSupport = {
form: boolean;
url: boolean;
};
/**
* Convert an MCP elicitation request (from the SDK's `onElicitation` callback)
* into an ACP `CreateElicitationRequest`. Returns `null` when the request can't
* be represented (e.g. a url-mode request with no url).
*/
export function mcpElicitationToCreateRequest(
request: ElicitationRequest,
sessionId: string,
): CreateElicitationRequest | null {
if (request.mode === "url") {
if (!request.url) {
return null;
}
return {
mode: "url",
sessionId,
message: request.message,
url: request.url,
// URL elicitations need a stable id so the client can correlate the
// later `session/complete_elicitation` notification. MCP servers usually
// provide one; fall back to a generated id if not.
elicitationId: request.elicitationId ?? randomUUID(),
};
}
// Form mode (the default). The MCP `requestedSchema` is already a JSON Schema
// with primitive-typed properties, which is structurally what ACP expects.
return {
mode: "form",
sessionId,
message: request.message,
requestedSchema: normalizeElicitationSchema(request.requestedSchema),
};
}
/**
* Map an ACP elicitation response back to the MCP `ElicitResult` the SDK expects
* to hand back to the requesting server.
*/
export function createElicitationResponseToElicitResult(
response: CreateElicitationResponse,
): ElicitationResult {
switch (response.action) {
case "accept":
return { action: "accept", content: response.content ?? {} };
case "decline":
return { action: "decline" };
case "cancel":
default:
return { action: "cancel" };
}
}
/**
* A single question as supplied by the AskUserQuestion tool. Derived from the
* SDK's input type so the shape stays in sync; the SDK validates the model's
* tool call against this schema before it reaches us.
*/
export type AskUserQuestion = AskUserQuestionInput["questions"][number];
/**
* Pull the well-formed questions out of an AskUserQuestion tool input. Returns
* `null` when there are no usable questions — including the case where every
* entry is malformed and filtering leaves an empty list — so callers can treat
* "nothing to ask" uniformly.
*/
export function extractAskUserQuestions(input: Record<string, unknown>): AskUserQuestion[] | null {
const questions = (input as { questions?: unknown }).questions;
if (!Array.isArray(questions)) {
return null;
}
const valid = questions.filter(
(q): q is AskUserQuestion =>
!!q && typeof q.question === "string" && Array.isArray(q.options) && q.options.length > 0,
);
return valid.length > 0 ? valid : null;
}
/** Stable form-field key for the question at the given index. */
function questionFieldKey(index: number): string {
return `question_${index}`;
}
/** Form-field key for the optional free-text "custom answer" field. */
const CUSTOM_ANSWER_FIELD = "customAnswer";
/**
* Render the AskUserQuestion tool's questions as an ACP form elicitation.
*
* Fields are keyed by a short stable id (`question_<n>`) rather than the full
* 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.
*
* A trailing optional free-text field mirrors the CLI's custom-answer box: the
* user can type their own answer instead of (or as well as) picking an option.
* Nothing is marked required, so the user can also just skip — matching the
* built-in tool, which always offers Skip + a free-text box.
*/
export function askUserQuestionsToCreateRequest(
questions: AskUserQuestion[],
sessionId: string,
toolCallId: string | undefined,
): CreateElicitationRequest {
const single = questions.length === 1;
const properties: Record<string, ElicitationPropertySchema> = {};
questions.forEach((question, index) => {
const options: EnumOption[] = question.options.map((option) => ({
const: option.label,
title: option.description ? `${option.label} — ${option.description}` : option.label,
}));
// For a single question the prompt is carried by `message`, so we don't
// repeat it in the field description. With multiple questions each field
// needs its own question text.
const description = single ? undefined : question.question;
const title = question.header || undefined;
properties[questionFieldKey(index)] = question.multiSelect
? { type: "array", title, description, items: { anyOf: options } }
: { type: "string", title, description, oneOf: options };
});
properties[CUSTOM_ANSWER_FIELD] = {
type: "string",
title: "Other",
description: "Type your own answer instead of choosing an option above (optional).",
};
const requestedSchema: ElicitationSchema = {
type: "object",
properties,
};
const message = single ? questions[0].question : "Please answer the following questions.";
return {
mode: "form",
sessionId,
...(toolCallId ? { toolCallId } : {}),
message,
requestedSchema,
};
}
/** Outcome of an AskUserQuestion elicitation, decoupled from any transport. */
export type AskUserQuestionOutcome =
| { action: "answered"; updatedInput: Record<string, unknown> }
| { action: "cancel" };
/**
* Fold an ACP elicitation response into the AskUserQuestion tool's input.
*
* Selected labels are read back from the indexed form fields and written into
* `answers` as a `{ [questionText]: label }` map (comma-joining multi-selects)
* — the key shape the tool's own `call()` reads. Free text from the custom-
* answer field becomes the tool's top-level `response`. Decline yields empty
* answers (the model is told the user skipped rather than the turn aborting);
* cancel 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 ?? {};
// 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"] = {};
questions.forEach((question, index) => {
const value = content[questionFieldKey(index)];
if (value === undefined || value === null) {
return;
}
const text = Array.isArray(value) ? value.join(", ") : String(value);
if (text === "") {
return;
}
answers[question.question] = text;
});
const updatedInput: Record<string, unknown> = { ...toolInput, answers };
const custom = content[CUSTOM_ANSWER_FIELD];
if (typeof custom === "string" && custom.trim() !== "") {
const response: AskUserQuestionOutput["response"] = custom;
updatedInput.response = response;
}
return { action: "answered", updatedInput };
}
/**
* Coerce an arbitrary MCP `requestedSchema` into an ACP `ElicitationSchema`.
* The two are structurally compatible JSON Schemas; we just guarantee the
* `type: "object"` discriminator is present.
*/
function normalizeElicitationSchema(
schema: Record<string, unknown> | undefined,
): ElicitationSchema {
if (!schema || typeof schema !== "object") {
return { type: "object", properties: {} };
}
return { ...(schema as ElicitationSchema), type: "object" };
}

View File

@@ -225,7 +225,9 @@ describe("ClaudeAcpAgent settings", () => {
// No setModel call is needed because no override was applied — the SDK is
// already on its own default.
expect(setModelSpy).not.toHaveBeenCalled();
expect(response.models.currentModelId).toBe("claude-sonnet-4-6");
expect(response.configOptions?.find((o: any) => o.id === "model")?.currentValue).toBe(
"claude-sonnet-4-6",
);
});
describe("auto mode availability per model", () => {
@@ -578,10 +580,12 @@ describe("ClaudeAcpAgent settings", () => {
});
expect(setModelSpy).toHaveBeenCalledWith("claude-haiku-4-5");
expect(response.models.currentModelId).toBe("claude-haiku-4-5");
expect(response.configOptions?.find((o: any) => o.id === "model")?.currentValue).toBe(
"claude-haiku-4-5",
);
});
it("does not inherit display info across mismatched model family versions", async () => {
it("does not inherit display info across mismatched model versions", async () => {
// https://github.com/agentclientprotocol/claude-agent-acp/issues/639:
// when the SDK's `opus` alias resolves to Opus 4.7, an allowlist entry
// of `claude-opus-4-6` (or `claude-opus-4-6[1m]`) used to substring-match
@@ -642,6 +646,60 @@ describe("ClaudeAcpAgent settings", () => {
expect(byValue["claude-opus-4-7"].name).toBe("Opus 4.7");
expect(byValue["claude-opus-4-7[1m]"].name).toMatch(/Opus 4\.7/);
});
it("does not inherit display info across mismatched model families", async () => {
// https://github.com/agentclientprotocol/claude-agent-acp/issues/639:
// when the SDK's `opus` alias resolves to Opus 4.8, `claude-opus-4-6[1m]`
// fails the version check against `opus` but the tokenized matcher
// falls through to `sonnet[1m]` because the `1m` context hint alone
// is enough to score a match.
await fs.promises.writeFile(
path.join(tempDir, "settings.json"),
JSON.stringify({
availableModels: ["claude-opus-4-6", "claude-opus-4-6[1m]"],
}),
);
const projectDir = path.join(tempDir, "project");
await fs.promises.mkdir(projectDir, { recursive: true });
mockQueryWithModels([
{ value: "default", displayName: "Default", description: "Default model" },
{
value: "sonnet",
displayName: "Sonnet",
description: "Sonnet 4.6 · Best for everyday tasks",
},
{
value: "sonnet[1m]",
displayName: "Sonnet (1M context)",
description: "Sonnet 4.6 for long sessions",
},
{
value: "opus",
displayName: "Opus 4.8",
description: "Claude Opus 4.8",
},
]);
const { ClaudeAcpAgent } = await import("../acp-agent.js");
const agent: ClaudeAcpAgentType = new ClaudeAcpAgent(createMockClient());
const response = await (agent as any).createSession({
cwd: projectDir,
mcpServers: [],
_meta: { disableBuiltInTools: true },
});
const modelOption = response.configOptions.find((o: any) => o.id === "model");
const byValue: Record<string, { name: string; description?: string }> = {};
for (const opt of modelOption.options) {
byValue[opt.value] = { name: opt.name, description: opt.description };
}
expect(byValue["claude-opus-4-6[1m]"].name).toBe("claude-opus-4-6[1m]");
expect(byValue["claude-opus-4-6"].name).toBe("claude-opus-4-6");
});
});
it("resolves model aliases like opus[1m] to the correct model", async () => {
@@ -687,7 +745,9 @@ describe("ClaudeAcpAgent settings", () => {
});
expect(setModelSpy).toHaveBeenCalledWith("claude-opus-4-6-1m");
expect(response.models.currentModelId).toBe("claude-opus-4-6-1m");
expect(response.configOptions?.find((o: any) => o.id === "model")?.currentValue).toBe(
"claude-opus-4-6-1m",
);
});
it("skips the initial setModel when the resolved value matches the SDK's model list verbatim", async () => {
@@ -727,7 +787,9 @@ describe("ClaudeAcpAgent settings", () => {
});
expect(setModelSpy).not.toHaveBeenCalled();
expect(response.models.currentModelId).toBe("claude-opus-4-6");
expect(response.configOptions?.find((o: any) => o.id === "model")?.currentValue).toBe(
"claude-opus-4-6",
);
} finally {
if (originalEnv === undefined) {
delete process.env.ANTHROPIC_MODEL;
@@ -777,6 +839,8 @@ describe("ClaudeAcpAgent settings", () => {
});
expect(setModelSpy).toHaveBeenCalledWith("claude-haiku-4-5");
expect(response.models.currentModelId).toBe("claude-haiku-4-5");
expect(response.configOptions?.find((o: any) => o.id === "model")?.currentValue).toBe(
"claude-haiku-4-5",
);
});
});

View File

@@ -6,6 +6,8 @@ import {
AvailableCommand,
Client,
ClientSideConnection,
CreateElicitationRequest,
CreateElicitationResponse,
ndJsonStream,
NewSessionResponse,
ReadTextFileRequest,
@@ -33,10 +35,16 @@ import {
claudeCliPath,
describeAlwaysAllow,
streamEventToAcpNotifications,
messageIdForGrouping,
type SDKMessageFilter,
} from "../acp-agent.js";
import { Pushable } from "../utils.js";
import { deleteSession, query, SDKAssistantMessage } from "@anthropic-ai/claude-agent-sdk";
import {
deleteSession,
getSessionMessages,
query,
SDKAssistantMessage,
} from "@anthropic-ai/claude-agent-sdk";
import { randomUUID } from "crypto";
vi.mock("@anthropic-ai/claude-agent-sdk", async (importOriginal) => {
@@ -83,6 +91,10 @@ describe.skipIf(!process.env.RUN_INTEGRATION_TESTS)("ACP subprocess integration"
agent: Agent;
files: Map<string, string> = new Map();
receivedText: string = "";
// Records for the AskUserQuestion elicitation test.
elicitations: CreateElicitationRequest[] = [];
permissionToolInputs: unknown[] = [];
chosenAnswers: Record<string, string | string[]> = {};
resolveAvailableCommands: (commands: AvailableCommand[]) => void;
availableCommandsPromise: Promise<AvailableCommand[]>;
@@ -101,11 +113,39 @@ describe.skipIf(!process.env.RUN_INTEGRATION_TESTS)("ACP subprocess integration"
}
async requestPermission(params: RequestPermissionRequest): Promise<RequestPermissionResponse> {
// Record what asked for permission so a test can assert that
// AskUserQuestion did NOT fall back to a generic permission prompt.
this.permissionToolInputs.push(params.toolCall?.rawInput);
const optionId = params.options.find((p) => p.kind === "allow_once")!.optionId;
return { outcome: { outcome: "selected", optionId } };
}
async unstable_createElicitation(
params: CreateElicitationRequest,
): Promise<CreateElicitationResponse> {
this.elicitations.push(params);
if (params.mode !== "form") {
return { action: "decline" };
}
// Accept the first option of every choice field (skip the free-text one).
const content: Record<string, string | string[]> = {};
for (const [key, prop] of Object.entries(params.requestedSchema.properties ?? {})) {
if (key === "customAnswer") continue;
const p = prop as {
oneOf?: Array<{ const: string }>;
items?: { anyOf?: Array<{ const: string }> };
};
if (p.oneOf?.length) {
content[key] = p.oneOf[0].const;
} else if (p.items?.anyOf?.length) {
content[key] = [p.items.anyOf[0].const];
}
}
this.chosenAnswers = content;
return { action: "accept", content };
}
async sessionUpdate(params: SessionNotification): Promise<void> {
console.error("RECEIVED", JSON.stringify(params, null, 4));
@@ -158,6 +198,9 @@ describe.skipIf(!process.env.RUN_INTEGRATION_TESTS)("ACP subprocess integration"
readTextFile: true,
writeTextFile: true,
},
elicitation: {
form: {},
},
},
});
@@ -170,7 +213,7 @@ describe.skipIf(!process.env.RUN_INTEGRATION_TESTS)("ACP subprocess integration"
}
it("should connect to the ACP subprocess", async () => {
const { client, connection, newSessionResponse } = await setupTestSession("./");
const { client, connection, newSessionResponse } = await setupTestSession(process.cwd());
await connection.prompt({
prompt: [
@@ -261,6 +304,60 @@ describe.skipIf(!process.env.RUN_INTEGRATION_TESTS)("ACP subprocess integration"
expect(client.takeReceivedText()).toContain("Compacting...\n\nCompacting completed.");
}, 60000);
// Regression guard for the SDK's AskUserQuestion routing. The built-in
// AskUserQuestion tool is delivered to us through `canUseTool` (not the
// interactive `onUserDialog` path), where we intercept it and render an ACP
// form elicitation, returning the answer via `updatedInput`. If a future SDK
// changes that routing — e.g. stops calling `canUseTool` for it, or no longer
// reads answers back from `updatedInput` — this test fails: either no
// elicitation arrives, the tool falls back to a permission prompt, or the
// answer never reaches the model's reply.
it("routes AskUserQuestion through ACP form elicitation and round-trips the answer", async () => {
const { client, connection, newSessionResponse } = await setupTestSession(process.cwd());
await connection.prompt({
prompt: [
{
type: "text",
text:
"Use the AskUserQuestion tool right now to ask me to choose a favorite color. " +
"Offer exactly two options: 'Red' and 'Blue'. Do not use any other tool and do " +
"not ask in plain text. After I answer, reply with one short sentence naming the " +
"color I picked.",
},
],
sessionId: newSessionResponse.sessionId,
});
// The tool surfaced as an ACP form elicitation...
expect(client.elicitations.length).toBeGreaterThan(0);
const elicitation = client.elicitations[0];
expect(elicitation.mode).toBe("form");
// ...built by our converter (indexed field key + free-text "Other" field),
// which confirms our interception path produced it rather than some other
// mechanism.
const properties =
elicitation.mode === "form" ? Object.keys(elicitation.requestedSchema.properties ?? {}) : [];
expect(properties).toContain("question_0");
expect(properties).toContain("customAnswer");
// AskUserQuestion must NOT fall back to a generic permission prompt: no
// permission request should have carried AskUserQuestion's `questions`.
const fellBackToPermission = client.permissionToolInputs.some(
(input) =>
!!input &&
typeof input === "object" &&
Array.isArray((input as { questions?: unknown }).questions),
);
expect(fellBackToPermission).toBe(false);
// The chosen answer round-trips: the model's reply names the picked option.
const picked = String(Object.values(client.chosenAnswers)[0] ?? "");
expect(picked).not.toEqual("");
expect(client.takeReceivedText().toLowerCase()).toContain(picked.toLowerCase());
}, 60000);
});
describe("tool conversions", () => {
@@ -1318,6 +1415,67 @@ describe.skipIf(!process.env.RUN_INTEGRATION_TESTS)("SDK behavior", () => {
const { value } = await q.next();
expect(value).toMatchObject({ type: "system", session_id: sessionId });
}, 10000);
// Pins the SDK invariant our `messageId` plumbing relies on: the Anthropic
// API message id is available at `message_start` (before any delta), is the
// same on the consolidated assistant message, and is recoverable from the
// persisted transcript — so a turn keeps one stable id across streaming and
// replay. The per-`stream_event` uuid is NOT used because it is unique per
// event and never persisted; this test would fail if a future SDK regressed
// any of those properties.
it("uses the API message id as a stable anchor across streaming and replay", async () => {
const sessionId = randomUUID();
const q = query({
prompt: "Reply with exactly these words and nothing else: hello there my friend",
options: {
systemPrompt: { type: "preset", preset: "claude_code" },
sessionId,
includePartialMessages: true,
maxTurns: 1,
allowedTools: [],
},
});
let messageStartApiId: string | undefined;
let consolidatedApiId: string | undefined;
let sawDelta = false;
let allPartialsTopLevel = true;
for await (const message of q) {
if (message.type === "assistant") {
consolidatedApiId = message.message.id;
}
if (message.type !== "stream_event") continue;
// Every streaming partial must belong to the top-level agent
// (parent_tool_use_id === null). Subagent work is folded into tool-result
// messages rather than surfaced as partial streams, which is what lets us
// track a single anchor without keying by parent_tool_use_id.
if (message.parent_tool_use_id !== null) allPartialsTopLevel = false;
if (message.event.type === "message_start") {
messageStartApiId = message.event.message.id;
} else if (message.event.type === "content_block_delta") {
sawDelta = true;
}
}
// The API message id is present at message_start (before deltas), so we can
// tag every streamed chunk with it, and it is identical on the consolidated
// assistant message.
expect(messageStartApiId).toBeTruthy();
expect(sawDelta).toBe(true);
expect(allPartialsTopLevel).toBe(true);
expect(consolidatedApiId).toBe(messageStartApiId);
// ...and the SAME id is recoverable from the persisted transcript, so chunks
// grouped live keep their id when the session is replayed.
const persisted = await getSessionMessages(sessionId);
const replayedAssistant = persisted.find((m) => m.type === "assistant");
expect(replayedAssistant).toBeDefined();
expect((replayedAssistant!.message as { id?: string }).id).toBe(messageStartApiId);
// The helper used in production must derive that same id from the replayed
// message.
expect(messageIdForGrouping(replayedAssistant!)).toBe(messageStartApiId);
}, 30000);
});
describe("permission requests", () => {
@@ -1548,6 +1706,8 @@ describe("stop reason propagation", () => {
emitRawSDKMessages: false,
contextWindowSize: 200000,
taskState: new Map(),
toolUseCache: {},
messageIdToUuid: new Map(),
};
}
@@ -1692,6 +1852,8 @@ describe("stop reason propagation", () => {
emitRawSDKMessages: false,
contextWindowSize: 200000,
taskState: new Map(),
toolUseCache: {},
messageIdToUuid: new Map(),
};
const response = await agent.prompt({
@@ -1851,6 +2013,8 @@ describe("session/close", () => {
emitRawSDKMessages: false,
contextWindowSize: 200000,
taskState: new Map(),
toolUseCache: {},
messageIdToUuid: new Map(),
};
return agent.sessions[sessionId]!;
}
@@ -1935,6 +2099,8 @@ describe("session/delete", () => {
emitRawSDKMessages: false,
contextWindowSize: 200000,
taskState: new Map(),
toolUseCache: {},
messageIdToUuid: new Map(),
};
return agent.sessions[sessionId]!;
}
@@ -1948,7 +2114,7 @@ describe("session/delete", () => {
const agent = createMockAgent();
const session = injectSession(agent, "session-1");
const result = await agent.unstable_deleteSession({ sessionId: "session-1" });
const result = await agent.deleteSession({ sessionId: "session-1" });
expect(result).toEqual({});
expect(agent.sessions["session-1"]).toBeUndefined();
@@ -1961,7 +2127,7 @@ describe("session/delete", () => {
it("deletes a session from disk that is not currently active", async () => {
const agent = createMockAgent();
const result = await agent.unstable_deleteSession({ sessionId: "not-active" });
const result = await agent.deleteSession({ sessionId: "not-active" });
expect(result).toEqual({});
expect(deleteSession).toHaveBeenCalledWith("not-active");
@@ -1971,7 +2137,7 @@ describe("session/delete", () => {
const agent = createMockAgent();
vi.mocked(deleteSession).mockRejectedValueOnce(new Error("Session not found on disk"));
await expect(agent.unstable_deleteSession({ sessionId: "missing" })).rejects.toThrow(
await expect(agent.deleteSession({ sessionId: "missing" })).rejects.toThrow(
"Session not found on disk",
);
});
@@ -1981,7 +2147,7 @@ describe("session/delete", () => {
injectSession(agent, "session-a");
injectSession(agent, "session-b");
await agent.unstable_deleteSession({ sessionId: "session-a" });
await agent.deleteSession({ sessionId: "session-a" });
expect(agent.sessions["session-a"]).toBeUndefined();
expect(agent.sessions["session-b"]).toBeDefined();
@@ -2036,6 +2202,8 @@ describe("getOrCreateSession param change detection", () => {
emitRawSDKMessages: false,
contextWindowSize: 200000,
taskState: new Map(),
toolUseCache: {},
messageIdToUuid: new Map(),
};
return agent.sessions[sessionId]!;
}
@@ -2271,6 +2439,8 @@ describe("usage_update computation", () => {
emitRawSDKMessages: false,
contextWindowSize: 200000,
taskState: new Map(),
toolUseCache: {},
messageIdToUuid: new Map(),
};
}
@@ -3108,6 +3278,309 @@ describe("usage_update computation", () => {
// size should be 1000000 (Opus), not 200000 (the fallback if <synthetic> overrode the model)
expect(usageUpdate.update.size).toBe(1000000);
});
it("compact_boundary uses authoritative getContextUsage for used, keeps session window for size", async () => {
const { agent, updates } = createMockAgentWithCapture();
injectSession(agent, [
{ type: "system", subtype: "compact_boundary", session_id: "test-session" },
{ type: "system", subtype: "session_state_changed", state: "idle" },
]);
const session = agent.sessions["test-session"];
// A 1M window learned earlier (e.g. from modelUsage) must survive compaction
// — getContextUsage's window field under-reports it, so we don't use it.
session.contextWindowSize = 1000000;
(session.query as any).getContextUsage = vi
.fn()
.mockResolvedValue({ totalTokens: 12345, rawMaxTokens: 200000 });
await agent.prompt({ sessionId: "test-session", prompt: [{ type: "text", text: "test" }] });
const usageUpdate = updates.find((u: any) => u.update?.sessionUpdate === "usage_update");
expect(usageUpdate).toBeDefined();
expect(usageUpdate.update.used).toBe(12345);
// size stays at the session's learned window, NOT getContextUsage's value.
expect(usageUpdate.update.size).toBe(1000000);
expect(session.contextWindowSize).toBe(1000000);
});
it("compact_boundary falls back to used:0 when getContextUsage fails", async () => {
const { agent, updates } = createMockAgentWithCapture();
injectSession(agent, [
{ type: "system", subtype: "compact_boundary", session_id: "test-session" },
{ type: "system", subtype: "session_state_changed", state: "idle" },
]);
const session = agent.sessions["test-session"];
session.contextWindowSize = 200000;
(session.query as any).getContextUsage = vi.fn().mockRejectedValue(new Error("boom"));
await agent.prompt({ sessionId: "test-session", prompt: [{ type: "text", text: "test" }] });
const usageUpdate = updates.find((u: any) => u.update?.sessionUpdate === "usage_update");
expect(usageUpdate).toBeDefined();
expect(usageUpdate.update.used).toBe(0);
expect(usageUpdate.update.size).toBe(200000);
expect(session.contextWindowSize).toBe(200000);
});
});
describe("assembled assistant text fallback", () => {
const ZERO_USAGE = {
input_tokens: 0,
output_tokens: 0,
cache_read_input_tokens: 0,
cache_creation_input_tokens: 0,
};
function createMockAgentWithCapture() {
const updates: any[] = [];
const mockClient = {
sessionUpdate: async (notification: any) => {
updates.push(notification);
},
} as unknown as AgentSideConnection;
const agent = new ClaudeAcpAgent(mockClient, { log: () => {}, error: () => {} });
return { agent, updates };
}
function messageStart(apiId: string) {
return {
type: "stream_event" as const,
parent_tool_use_id: null,
uuid: randomUUID(),
session_id: "test-session",
event: {
type: "message_start" as const,
message: { id: apiId, model: "claude-sonnet-4-20250514", usage: ZERO_USAGE },
},
};
}
function textDelta(text: string) {
return {
type: "stream_event" as const,
parent_tool_use_id: null,
uuid: randomUUID(),
session_id: "test-session",
event: {
type: "content_block_delta" as const,
index: 0,
delta: { type: "text_delta" as const, text },
},
};
}
function assistantMessage(apiId: string, content: any[], parentToolUseId: string | null = null) {
return {
type: "assistant" as const,
parent_tool_use_id: parentToolUseId,
uuid: randomUUID(),
session_id: "test-session",
message: {
id: apiId,
role: "assistant" as const,
model: "claude-sonnet-4-20250514",
content,
usage: ZERO_USAGE,
},
};
}
function result() {
return {
type: "result" as const,
subtype: "success" as const,
stop_reason: "end_turn",
is_error: false,
result: "",
errors: [],
duration_ms: 0,
duration_api_ms: 0,
num_turns: 1,
total_cost_usd: 0,
usage: ZERO_USAGE,
modelUsage: {},
permission_denials: [],
uuid: randomUUID(),
session_id: "test-session",
};
}
const idle = { type: "system", subtype: "session_state_changed", state: "idle" };
function injectSession(agent: ClaudeAcpAgent, messages: any[]) {
const input = new Pushable<any>();
async function* messageGenerator() {
const iter = input[Symbol.asyncIterator]();
const { value: userMessage, done } = await iter.next();
if (!done && userMessage) {
yield {
type: "user",
message: userMessage.message,
parent_tool_use_id: null,
uuid: userMessage.uuid,
session_id: "test-session",
isReplay: true,
};
}
yield* messages;
}
agent.sessions["test-session"] = {
query: messageGenerator() as any,
input,
cancelled: false,
cwd: "/test",
sessionFingerprint: JSON.stringify({ cwd: "/test", mcpServers: [] }),
modes: { currentModeId: "default", availableModes: [] },
models: { currentModelId: "default", availableModels: [] },
modelInfos: [],
settingsManager: { dispose: vi.fn() } as any,
accumulatedUsage: {
inputTokens: 0,
outputTokens: 0,
cachedReadTokens: 0,
cachedWriteTokens: 0,
},
configOptions: [],
promptRunning: false,
pendingMessages: new Map(),
nextPendingOrder: 0,
abortController: new AbortController(),
emitRawSDKMessages: false,
contextWindowSize: 200000,
taskState: new Map(),
toolUseCache: {},
messageIdToUuid: new Map(),
};
}
function messageChunkTexts(updates: any[]): string[] {
return updates
.filter((u) => u.update?.sessionUpdate === "agent_message_chunk")
.map((u) => u.update.content.text);
}
function thoughtChunkTexts(updates: any[]): string[] {
return updates
.filter((u) => u.update?.sessionUpdate === "agent_thought_chunk")
.map((u) => u.update.content.text);
}
it("emits the assembled text when no content_block_delta was streamed", async () => {
const { agent, updates } = createMockAgentWithCapture();
// Gateway delivers a fully assembled message with no preceding deltas.
injectSession(agent, [
assistantMessage("msg-no-stream", [{ type: "text", text: "the final answer" }]),
result(),
idle,
]);
await agent.prompt({ sessionId: "test-session", prompt: [{ type: "text", text: "hi" }] });
expect(messageChunkTexts(updates)).toEqual(["the final answer"]);
});
it("does not re-emit text already streamed via content_block_delta", async () => {
const { agent, updates } = createMockAgentWithCapture();
// Normal streaming: deltas arrive, then the consolidated message repeats them.
injectSession(agent, [
messageStart("msg-streamed"),
textDelta("hello "),
textDelta("world"),
assistantMessage("msg-streamed", [{ type: "text", text: "hello world" }]),
result(),
idle,
]);
await agent.prompt({ sessionId: "test-session", prompt: [{ type: "text", text: "hi" }] });
// Only the two streamed deltas — the assembled block is filtered out.
expect(messageChunkTexts(updates)).toEqual(["hello ", "world"]);
});
it("dedupes per block type: streamed text is dropped but an un-streamed thinking block in the same message is forwarded", async () => {
const { agent, updates } = createMockAgentWithCapture();
// Gateway streams the text live but delivers the thinking block only in the
// assembled message (no thinking_delta). The dedupe must be per-type so the
// thinking survives. This also makes the test non-vacuous: if the fallback
// were removed (text/thinking always dropped) the thought chunk disappears.
injectSession(agent, [
messageStart("msg-mixed"),
textDelta("streamed text"),
assistantMessage("msg-mixed", [
{ type: "text", text: "streamed text" },
{ type: "thinking", thinking: "private reasoning" },
]),
result(),
idle,
]);
await agent.prompt({ sessionId: "test-session", prompt: [{ type: "text", text: "hi" }] });
// Streamed text appears once (delta only — assembled copy deduped).
expect(messageChunkTexts(updates)).toEqual(["streamed text"]);
// The un-streamed thinking block is forwarded despite text having streamed.
expect(thoughtChunkTexts(updates)).toEqual(["private reasoning"]);
});
it("does not leak subagent assistant text into the top-level feed", async () => {
const { agent, updates } = createMockAgentWithCapture();
// Subagent assistant messages (parent_tool_use_id !== null) are never
// streamed live; their text/thinking is internal to the tool call and must
// stay filtered out, not surface as a fallback chunk.
injectSession(agent, [
assistantMessage(
"msg-subagent",
[{ type: "text", text: "subagent internal prose" }],
"tool_use_1",
),
result(),
idle,
]);
await agent.prompt({ sessionId: "test-session", prompt: [{ type: "text", text: "hi" }] });
expect(messageChunkTexts(updates)).toEqual([]);
expect(thoughtChunkTexts(updates)).toEqual([]);
});
it("forwards distinct blocks that a gateway splits across same-id messages", async () => {
const { agent, updates } = createMockAgentWithCapture();
// Observed with OpenAI-compatible gateways: one response id split into an
// empty thinking block, then the real text — both with no deltas.
injectSession(agent, [
assistantMessage("msg-split", [{ type: "thinking", thinking: "" }]),
assistantMessage("msg-split", [{ type: "text", text: "the real answer" }]),
result(),
idle,
]);
await agent.prompt({ sessionId: "test-session", prompt: [{ type: "text", text: "hi" }] });
// The text survives even though an earlier same-id message already triggered
// the fallback for a different (thinking) block.
expect(messageChunkTexts(updates)).toEqual(["the real answer"]);
// The empty thinking block carries nothing and must not produce a stray
// empty thought chunk.
expect(thoughtChunkTexts(updates)).toEqual([]);
});
it("re-forwards a block a gateway re-delivers (no content-keyed dedupe)", async () => {
const { agent, updates } = createMockAgentWithCapture();
// The fallback intentionally keys only on whether the id streamed live, not
// on block content — so a gateway re-delivering the same assembled block
// emits it twice. This is the accepted, cosmetic tradeoff for not caching
// every fallback block's full text; see `streamedTextMessageIds`.
injectSession(agent, [
assistantMessage("msg-dup", [{ type: "text", text: "answer" }]),
assistantMessage("msg-dup", [{ type: "text", text: "answer" }]),
result(),
idle,
]);
await agent.prompt({ sessionId: "test-session", prompt: [{ type: "text", text: "hi" }] });
expect(messageChunkTexts(updates)).toEqual(["answer", "answer"]);
});
});
describe("emitRawSDKMessages", () => {
@@ -3171,6 +3644,8 @@ describe("emitRawSDKMessages", () => {
emitRawSDKMessages,
contextWindowSize: 200000,
taskState: new Map(),
toolUseCache: {},
messageIdToUuid: new Map(),
};
}
@@ -3399,6 +3874,8 @@ describe("result origin handling", () => {
emitRawSDKMessages: false,
contextWindowSize: 200000,
taskState: new Map(),
toolUseCache: {},
messageIdToUuid: new Map(),
};
}
@@ -3574,6 +4051,8 @@ describe("memory_recall handling", () => {
emitRawSDKMessages: false,
contextWindowSize: 200000,
taskState: new Map(),
toolUseCache: {},
messageIdToUuid: new Map(),
};
}
@@ -3804,6 +4283,8 @@ describe("post-error recovery", () => {
emitRawSDKMessages: false,
contextWindowSize: 200000,
taskState: new Map(),
toolUseCache: {},
messageIdToUuid: new Map(),
};
return { interrupt };
}
@@ -3877,6 +4358,186 @@ describe("post-error recovery", () => {
});
});
describe("session/cancel wedge recovery (issue #680)", () => {
function createMockAgent() {
const mockClient = {
sessionUpdate: async () => {},
} as unknown as AgentSideConnection;
return new ClaudeAcpAgent(mockClient, { log: () => {}, error: () => {} });
}
// Generator that replays the prompt's user message and then blocks forever,
// simulating the SDK wedged in a `TaskOutput { block: true }` poll against a
// hung background task. `interrupt()` is a no-op — it does NOT unblock the
// generator, matching the SDK behavior described in the issue.
function injectWedgedSession(agent: ClaudeAcpAgent, opts: { interruptUnblocks?: boolean } = {}) {
const input = new Pushable<any>();
const interrupt = vi.fn(async () => {});
const close = vi.fn();
// A promise the wedged poll awaits. When `interruptUnblocks` is set, the
// mocked interrupt() resolves it so the generator yields a trailing idle —
// the normal, healthy interrupt path.
let releaseBlock!: () => void;
const blocked = new Promise<void>((resolve) => {
releaseBlock = resolve;
});
if (opts.interruptUnblocks) {
interrupt.mockImplementation(async () => {
releaseBlock();
});
}
async function* messageGenerator() {
const iter = input[Symbol.asyncIterator]();
const first = await iter.next();
if (!first.done && first.value) {
yield {
type: "user",
message: first.value.message,
parent_tool_use_id: null,
uuid: first.value.uuid,
session_id: "test-session",
isReplay: true,
};
}
// Wedge: never yield again unless interrupt() releases us.
await blocked;
yield { type: "system", subtype: "session_state_changed", state: "idle" };
}
const gen = Object.assign(messageGenerator(), { interrupt, close });
agent.sessions["test-session"] = {
query: gen as any,
input,
cancelled: false,
cwd: "/test",
sessionFingerprint: JSON.stringify({ cwd: "/test", mcpServers: [] }),
modes: { currentModeId: "default", availableModes: [] },
models: { currentModelId: "default", availableModels: [] },
modelInfos: [],
settingsManager: { dispose: vi.fn() } as any,
accumulatedUsage: {
inputTokens: 0,
outputTokens: 0,
cachedReadTokens: 0,
cachedWriteTokens: 0,
},
configOptions: [],
promptRunning: false,
pendingMessages: new Map(),
nextPendingOrder: 0,
abortController: new AbortController(),
emitRawSDKMessages: false,
contextWindowSize: 200000,
taskState: new Map(),
toolUseCache: {},
messageIdToUuid: new Map(),
};
return { interrupt };
}
it("resolves the pending prompt with cancelled when the SDK never yields after interrupt", async () => {
const agent = createMockAgent();
// Shrink the grace period so the test doesn't wait the production default.
agent.forceCancelGraceMs = 20;
const { interrupt } = injectWedgedSession(agent);
const promptPromise = agent.prompt({
sessionId: "test-session",
prompt: [{ type: "text", text: "run cargo test" }],
});
// Let the loop consume the replay and block on the wedged query.next().
await new Promise((r) => setTimeout(r, 5));
await agent.cancel({ sessionId: "test-session" });
const response = await promptPromise;
expect(response.stopReason).toBe("cancelled");
expect(interrupt).toHaveBeenCalled();
});
it("returns cancelled through the normal idle path without waiting the grace period when interrupt works", async () => {
const agent = createMockAgent();
// Large grace so that if the test ever falls through to the backstop it
// would hang past the test timeout instead of passing by accident.
agent.forceCancelGraceMs = 60_000;
const { interrupt } = injectWedgedSession(agent, { interruptUnblocks: true });
const promptPromise = agent.prompt({
sessionId: "test-session",
prompt: [{ type: "text", text: "run cargo test" }],
});
await new Promise((r) => setTimeout(r, 5));
await agent.cancel({ sessionId: "test-session" });
const response = await promptPromise;
expect(response.stopReason).toBe("cancelled");
expect(interrupt).toHaveBeenCalled();
// Backstop timer must have been cleared so it can't fire later.
expect(agent.sessions["test-session"].forceCancelTimer).toBeUndefined();
});
it("does not arm the backstop when no prompt is running", async () => {
const agent = createMockAgent();
injectWedgedSession(agent);
await agent.cancel({ sessionId: "test-session" });
const session = agent.sessions["test-session"];
expect(session.cancelled).toBe(true);
expect(session.forceCancelTimer).toBeUndefined();
});
it("does not reset the force-cancel floor on repeated cancels", async () => {
const agent = createMockAgent();
// Long floor so the timer handle stays observable across both cancels.
agent.forceCancelGraceMs = 60_000;
injectWedgedSession(agent);
const promptPromise = agent.prompt({
sessionId: "test-session",
prompt: [{ type: "text", text: "run cargo test" }],
});
await new Promise((r) => setTimeout(r, 5));
await agent.cancel({ sessionId: "test-session" });
const firstTimer = agent.sessions["test-session"].forceCancelTimer;
expect(firstTimer).toBeDefined();
await agent.cancel({ sessionId: "test-session" });
// Same handle: the second cancel did not clear-and-rearm (which would push
// the floor out). The deadline stays anchored to the first cancel.
expect(agent.sessions["test-session"].forceCancelTimer).toBe(firstTimer);
// Clean up the wedged prompt + long timer.
await agent.closeSession({ sessionId: "test-session" });
await expect(promptPromise).resolves.toEqual({ stopReason: "cancelled" });
});
it("resolves an in-flight wedged prompt immediately when the session is closed", async () => {
const agent = createMockAgent();
// Large floor: if closeSession relied on the force-cancel timer this would
// hang past the test timeout. Teardown must wake the loop via
// cancelController instead.
agent.forceCancelGraceMs = 60_000;
injectWedgedSession(agent);
const promptPromise = agent.prompt({
sessionId: "test-session",
prompt: [{ type: "text", text: "run cargo test" }],
});
await new Promise((r) => setTimeout(r, 5));
await agent.closeSession({ sessionId: "test-session" });
await expect(promptPromise).resolves.toEqual({ stopReason: "cancelled" });
expect(agent.sessions["test-session"]).toBeUndefined();
});
});
describe("streamEventToAcpNotifications", () => {
it("treats `ping` keep-alive events as no-ops without logging to stderr", () => {
const errors: unknown[][] = [];
@@ -3910,4 +4571,166 @@ describe("streamEventToAcpNotifications", () => {
expect(result).toEqual([]);
expect(errors).toEqual([]);
});
it("attaches the supplied messageId to streamed text chunks", () => {
const messageId = randomUUID();
const message = {
type: "stream_event",
parent_tool_use_id: null,
uuid: randomUUID(),
session_id: "test-session",
event: {
type: "content_block_delta",
index: 0,
delta: { type: "text_delta", text: "hello" },
},
} as Parameters<typeof streamEventToAcpNotifications>[0];
const result = streamEventToAcpNotifications(
message,
"test",
{},
{} as AgentSideConnection,
console,
{ messageId },
);
expect(result).toEqual([
{
sessionId: "test",
update: {
sessionUpdate: "agent_message_chunk",
content: { type: "text", text: "hello" },
messageId,
},
},
]);
});
});
describe("toAcpNotifications messageId", () => {
const messageId = "11111111-2222-3333-4444-555555555555";
it("sets messageId on agent message chunks from string content", () => {
const result = toAcpNotifications(
"hello world",
"assistant",
"test",
{},
{} as AgentSideConnection,
console,
{ messageId },
);
expect(result).toEqual([
{
sessionId: "test",
update: {
sessionUpdate: "agent_message_chunk",
content: { type: "text", text: "hello world" },
messageId,
},
},
]);
});
it("sets messageId on user message chunks and thought chunks", () => {
const userResult = toAcpNotifications(
[{ type: "text", text: "hi" }],
"user",
"test",
{},
{} as AgentSideConnection,
console,
{ messageId },
);
expect(userResult[0].update).toMatchObject({
sessionUpdate: "user_message_chunk",
messageId,
});
const thoughtResult = toAcpNotifications(
[{ type: "thinking", thinking: "hmm", signature: "" }],
"assistant",
"test",
{},
{} as AgentSideConnection,
console,
{ messageId },
);
expect(thoughtResult[0].update).toMatchObject({
sessionUpdate: "agent_thought_chunk",
messageId,
});
});
it("omits messageId when none is supplied", () => {
const result = toAcpNotifications(
"hello",
"assistant",
"test",
{},
{} as AgentSideConnection,
console,
);
expect(result[0].update).not.toHaveProperty("messageId");
});
it("never sets messageId on non-chunk updates (tool_call)", () => {
const result = toAcpNotifications(
[
{
type: "tool_use",
id: "toolu_abc",
name: "Read",
input: { file_path: "/tmp/x" },
},
],
"assistant",
"test",
{},
{} as AgentSideConnection,
console,
{ messageId, registerHooks: false },
);
expect(result[0].update.sessionUpdate).toBe("tool_call");
expect(result[0].update).not.toHaveProperty("messageId");
});
});
describe("messageIdForGrouping", () => {
it("uses the Anthropic API message id for assistant messages", () => {
const message = {
type: "assistant",
uuid: "de242400-cdb3-4af7-9856-d3b114b20af9",
message: { id: "msg_018DQGVuZbGYwVnvDakAP9Do", role: "assistant" },
};
// The API id is identical at message_start, on the consolidated message,
// and in the persisted transcript — so it stays stable across replay,
// unlike the per-message uuid.
expect(messageIdForGrouping(message)).toBe("msg_018DQGVuZbGYwVnvDakAP9Do");
});
it("falls back to the uuid for assistant messages without an API id", () => {
const message = {
type: "assistant",
uuid: "de242400-cdb3-4af7-9856-d3b114b20af9",
message: { role: "assistant" },
};
expect(messageIdForGrouping(message)).toBe("de242400-cdb3-4af7-9856-d3b114b20af9");
});
it("uses the uuid for user messages (they carry no API id and aren't streamed)", () => {
const message = {
type: "user",
uuid: "11111111-2222-3333-4444-555555555555",
message: { id: "msg_should_be_ignored", role: "user" },
};
expect(messageIdForGrouping(message)).toBe("11111111-2222-3333-4444-555555555555");
});
it("returns undefined when there is no usable id", () => {
expect(messageIdForGrouping({ type: "system", message: {} })).toBeUndefined();
expect(messageIdForGrouping({ type: "assistant", uuid: "", message: {} })).toBeUndefined();
});
});

View File

@@ -39,7 +39,7 @@ vi.mock("../tools.js", async () => ({
describe("additionalRoots", () => {
let agent: ClaudeAcpAgentType;
const tempDirs: string[] = [];
const newSession = (meta: Record<string, unknown>, cwd = "/test") =>
const newSession = (meta: Record<string, unknown>, cwd = process.cwd()) =>
agent.newSession({ cwd, mcpServers: [], _meta: meta });
beforeEach(async () => {
@@ -79,7 +79,7 @@ describe("additionalRoots", () => {
it("prefers the official ACP additionalDirectories field over _meta.additionalRoots", async () => {
await agent.newSession({
cwd: "/test",
cwd: process.cwd(),
mcpServers: [],
additionalDirectories: ["/from/official"],
_meta: { additionalRoots: ["/from/meta"] },
@@ -89,7 +89,7 @@ describe("additionalRoots", () => {
it("merges official ACP additionalDirectories with claudeCode SDK additionalDirectories", async () => {
await agent.newSession({
cwd: "/test",
cwd: process.cwd(),
mcpServers: [],
additionalDirectories: ["/from/official"],
_meta: { claudeCode: { options: { additionalDirectories: ["/from/sdk"] } } },
@@ -99,7 +99,7 @@ describe("additionalRoots", () => {
it("falls back to _meta.additionalRoots when the official field is omitted", async () => {
await agent.newSession({
cwd: "/test",
cwd: process.cwd(),
mcpServers: [],
_meta: { additionalRoots: ["/from/meta"] },
});

View File

@@ -103,7 +103,7 @@ describe("authorization", () => {
});
await agent.newSession({
cwd: "testRoot",
cwd: process.cwd(),
mcpServers: [],
_meta: {
claudeCode: {
@@ -148,7 +148,7 @@ describe("authorization", () => {
});
await agent.newSession({
cwd: "testRoot",
cwd: process.cwd(),
mcpServers: [],
});
@@ -166,6 +166,63 @@ describe("authorization", () => {
);
});
it("hide claude authentication without terminal-auth", async () => {
const [agent] = await createAgentMock();
vi.stubGlobal("process", { ...process, argv: ["--hide-claude-auth"] });
const initializeResponse = await agent.initialize({
protocolVersion: 1,
clientCapabilities: {
auth: { _meta: { gateway: true } },
} as any,
});
expect(initializeResponse.authMethods).not.toContainEqual(
expect.objectContaining({ id: "claude-ai-login" }),
);
expect(initializeResponse.authMethods).not.toContainEqual(
expect.objectContaining({ id: "console-login" }),
);
expect(initializeResponse.authMethods).toContainEqual(
expect.objectContaining({ id: "gateway" }),
);
});
it("hide claude auth but still show console login when terminal-auth is set", async () => {
const [agent] = await createAgentMock();
vi.stubGlobal("process", { ...process, argv: ["--hide-claude-auth"] });
const initializeResponse = await agent.initialize({
protocolVersion: 1,
clientCapabilities: {
_meta: { "terminal-auth": true },
},
});
expect(initializeResponse.authMethods).not.toContainEqual(
expect.objectContaining({ id: "claude-ai-login" }),
);
expect(initializeResponse.authMethods).toContainEqual(
expect.objectContaining({ id: "console-login" }),
);
});
it("hide claude auth but still show console login with terminal capability", async () => {
const [agent] = await createAgentMock();
vi.stubGlobal("process", { ...process, argv: ["--hide-claude-auth"] });
const initializeResponse = await agent.initialize({
protocolVersion: 1,
clientCapabilities: {
auth: { terminal: true },
},
});
expect(initializeResponse.authMethods).not.toContainEqual(
expect.objectContaining({ id: "claude-ai-login" }),
);
expect(initializeResponse.authMethods).toContainEqual(
expect.objectContaining({ id: "console-login" }),
);
});
it("SSH session falls back to single legacy login method", async () => {
const [agent] = await createAgentMock();
vi.stubGlobal("process", { ...process, env: { ...process.env, SSH_TTY: "/dev/pts/0" } });
@@ -206,6 +263,24 @@ describe("authorization", () => {
);
});
it("remote environment respects hide-claude-auth", async () => {
const [agent] = await createAgentMock();
vi.stubGlobal("process", {
...process,
argv: ["--hide-claude-auth"],
env: { ...process.env, SSH_CONNECTION: "192.168.1.1 12345 192.168.1.2 22" },
});
const initializeResponse = await agent.initialize({
protocolVersion: 1,
clientCapabilities: { auth: { terminal: true } },
});
expect(initializeResponse.authMethods).not.toContainEqual(
expect.objectContaining({ id: "claude-login" }),
);
});
it("show claude authentication", async () => {
const [agent] = await createAgentMock();

View File

@@ -1,7 +1,10 @@
import { describe, it, expect, beforeEach, afterEach, vi } from "vitest";
import { AgentSideConnection, SessionNotification } from "@agentclientprotocol/sdk";
import { AgentSideConnection, RequestError, SessionNotification } from "@agentclientprotocol/sdk";
import type { Options } from "@anthropic-ai/claude-agent-sdk";
import type { ClaudeAcpAgent as ClaudeAcpAgentType } from "../acp-agent.js";
import * as fs from "node:fs";
import * as os from "node:os";
import * as path from "node:path";
let capturedOptions: Options | undefined;
vi.mock("@anthropic-ai/claude-agent-sdk", async () => {
@@ -65,7 +68,7 @@ describe("createSession options merging", () => {
it("merges user-provided disallowedTools with ACP internal list", async () => {
await agent.newSession({
cwd: "/test",
cwd: process.cwd(),
mcpServers: [],
_meta: {
claudeCode: {
@@ -85,7 +88,7 @@ describe("createSession options merging", () => {
it("works when user provides no disallowedTools", async () => {
await agent.newSession({
cwd: "/test",
cwd: process.cwd(),
mcpServers: [],
});
@@ -94,7 +97,7 @@ describe("createSession options merging", () => {
it("works when user provides empty disallowedTools", async () => {
await agent.newSession({
cwd: "/test",
cwd: process.cwd(),
mcpServers: [],
_meta: {
claudeCode: {
@@ -110,7 +113,7 @@ describe("createSession options merging", () => {
it("sets tools to empty array when disableBuiltInTools is true", async () => {
await agent.newSession({
cwd: "/test",
cwd: process.cwd(),
mcpServers: [],
_meta: {
disableBuiltInTools: true,
@@ -133,7 +136,7 @@ describe("createSession options merging", () => {
const userPreToolUseHook = { hooks: [{ command: "echo pre" }] };
await agent.newSession({
cwd: "/test",
cwd: process.cwd(),
mcpServers: [],
_meta: {
claudeCode: {
@@ -155,7 +158,7 @@ describe("createSession options merging", () => {
it("inherits HOME and PATH from process.env when no env is provided", async () => {
await agent.newSession({
cwd: "/test",
cwd: process.cwd(),
mcpServers: [],
});
@@ -165,7 +168,7 @@ describe("createSession options merging", () => {
it("merges user-provided env vars on top of process.env", async () => {
await agent.newSession({
cwd: "/test",
cwd: process.cwd(),
mcpServers: [],
_meta: {
claudeCode: {
@@ -185,7 +188,7 @@ describe("createSession options merging", () => {
it("allows user-provided env vars to override process.env entries", async () => {
await agent.newSession({
cwd: "/test",
cwd: process.cwd(),
mcpServers: [],
_meta: {
claudeCode: {
@@ -203,7 +206,7 @@ describe("createSession options merging", () => {
it("defaults tools to claude_code preset when not provided", async () => {
await agent.newSession({
cwd: "/test",
cwd: process.cwd(),
mcpServers: [],
});
@@ -212,7 +215,7 @@ describe("createSession options merging", () => {
it("passes through user-provided tools string array", async () => {
await agent.newSession({
cwd: "/test",
cwd: process.cwd(),
mcpServers: [],
_meta: {
claudeCode: {
@@ -228,7 +231,7 @@ describe("createSession options merging", () => {
it("explicit tools array takes precedence over disableBuiltInTools", async () => {
await agent.newSession({
cwd: "/test",
cwd: process.cwd(),
mcpServers: [],
_meta: {
disableBuiltInTools: true,
@@ -245,7 +248,7 @@ describe("createSession options merging", () => {
it("passes through empty tools array to disable all built-in tools", async () => {
await agent.newSession({
cwd: "/test",
cwd: process.cwd(),
mcpServers: [],
_meta: {
claudeCode: {
@@ -261,7 +264,7 @@ describe("createSession options merging", () => {
describe("systemPrompt via _meta", () => {
it("defaults to the claude_code preset when not provided", async () => {
await agent.newSession({ cwd: "/test", mcpServers: [] });
await agent.newSession({ cwd: process.cwd(), mcpServers: [] });
expect(capturedOptions!.systemPrompt).toEqual({
type: "preset",
@@ -271,7 +274,7 @@ describe("createSession options merging", () => {
it("replaces the preset when a string is provided", async () => {
await agent.newSession({
cwd: "/test",
cwd: process.cwd(),
mcpServers: [],
_meta: { systemPrompt: "custom prompt" },
});
@@ -281,7 +284,7 @@ describe("createSession options merging", () => {
it("forwards append", async () => {
await agent.newSession({
cwd: "/test",
cwd: process.cwd(),
mcpServers: [],
_meta: { systemPrompt: { append: "extra instructions" } },
});
@@ -295,7 +298,7 @@ describe("createSession options merging", () => {
it("forwards excludeDynamicSections", async () => {
await agent.newSession({
cwd: "/test",
cwd: process.cwd(),
mcpServers: [],
_meta: { systemPrompt: { excludeDynamicSections: true } },
});
@@ -309,7 +312,7 @@ describe("createSession options merging", () => {
it("forwards append and excludeDynamicSections together", async () => {
await agent.newSession({
cwd: "/test",
cwd: process.cwd(),
mcpServers: [],
_meta: {
systemPrompt: {
@@ -329,7 +332,7 @@ describe("createSession options merging", () => {
it("ignores caller-provided type/preset overrides", async () => {
await agent.newSession({
cwd: "/test",
cwd: process.cwd(),
mcpServers: [],
_meta: {
systemPrompt: {
@@ -369,7 +372,7 @@ describe("createSession options merging", () => {
modelOverrides: { "claude-opus-4-6": "us.anthropic.claude-opus-4-6-v1" },
});
await agent.newSession({ cwd: "/test", mcpServers: [] });
await agent.newSession({ cwd: process.cwd(), mcpServers: [] });
expect(capturedOptions!.settings).toEqual({
modelOverrides: { "claude-opus-4-6": "us.anthropic.claude-opus-4-6-v1" },
@@ -381,7 +384,7 @@ describe("createSession options merging", () => {
availableModels: ["opus", "sonnet"],
});
await agent.newSession({ cwd: "/test", mcpServers: [] });
await agent.newSession({ cwd: process.cwd(), mcpServers: [] });
expect(capturedOptions!.settings).toEqual({
availableModels: ["opus", "sonnet"],
@@ -394,7 +397,7 @@ describe("createSession options merging", () => {
availableModels: ["opus"],
});
await agent.newSession({ cwd: "/test", mcpServers: [] });
await agent.newSession({ cwd: process.cwd(), mcpServers: [] });
expect(capturedOptions!.settings).toEqual({
modelOverrides: { "claude-opus-4-6": "us.anthropic.claude-opus-4-6-v1" },
@@ -403,7 +406,7 @@ describe("createSession options merging", () => {
});
it("does not add settings when env var is not set", async () => {
await agent.newSession({ cwd: "/test", mcpServers: [] });
await agent.newSession({ cwd: process.cwd(), mcpServers: [] });
expect(capturedOptions!.settings).toBeUndefined();
});
@@ -414,7 +417,7 @@ describe("createSession options merging", () => {
});
await agent.newSession({
cwd: "/test",
cwd: process.cwd(),
mcpServers: [],
_meta: {
claudeCode: {
@@ -438,13 +441,13 @@ describe("createSession options merging", () => {
it("throws on invalid JSON", async () => {
process.env.CLAUDE_MODEL_CONFIG = "not-json";
await expect(agent.newSession({ cwd: "/test", mcpServers: [] })).rejects.toThrow();
await expect(agent.newSession({ cwd: process.cwd(), mcpServers: [] })).rejects.toThrow();
});
});
it("merges user-provided mcpServers with ACP mcpServers", async () => {
await agent.newSession({
cwd: "/test",
cwd: process.cwd(),
mcpServers: [
{
name: "acp-server",
@@ -473,4 +476,140 @@ describe("createSession options merging", () => {
// ACP-provided MCP server should also be present
expect(capturedOptions!.mcpServers).toHaveProperty("acp-server");
});
describe("thinking config from MAX_THINKING_TOKENS", () => {
let originalMaxThinking: string | undefined;
beforeEach(() => {
originalMaxThinking = process.env.MAX_THINKING_TOKENS;
delete process.env.MAX_THINKING_TOKENS;
});
afterEach(() => {
if (originalMaxThinking !== undefined) {
process.env.MAX_THINKING_TOKENS = originalMaxThinking;
} else {
delete process.env.MAX_THINKING_TOKENS;
}
});
it("leaves thinking unset (SDK default) when env var is absent", async () => {
await agent.newSession({ cwd: process.cwd(), mcpServers: [] });
expect(capturedOptions!.thinking).toBeUndefined();
// The deprecated option must not be set either.
expect(capturedOptions!.maxThinkingTokens).toBeUndefined();
});
it("maps 0 to disabled thinking", async () => {
process.env.MAX_THINKING_TOKENS = "0";
await agent.newSession({ cwd: process.cwd(), mcpServers: [] });
expect(capturedOptions!.thinking).toEqual({ type: "disabled" });
});
it("maps a positive value to a fixed thinking budget", async () => {
process.env.MAX_THINKING_TOKENS = "12000";
await agent.newSession({ cwd: process.cwd(), mcpServers: [] });
expect(capturedOptions!.thinking).toEqual({ type: "enabled", budgetTokens: 12000 });
});
it("ignores a non-numeric value", async () => {
process.env.MAX_THINKING_TOKENS = "lots";
await agent.newSession({ cwd: process.cwd(), mcpServers: [] });
expect(capturedOptions!.thinking).toBeUndefined();
});
it("lets a user-provided thinking option override the env default", async () => {
process.env.MAX_THINKING_TOKENS = "12000";
await agent.newSession({
cwd: process.cwd(),
mcpServers: [],
_meta: {
claudeCode: {
options: {
thinking: { type: "adaptive" },
},
},
},
});
expect(capturedOptions!.thinking).toEqual({ type: "adaptive" });
});
});
describe("cwd validation", () => {
it("rejects a relative cwd with invalidParams", async () => {
await expect(
agent.newSession({ cwd: "relative/path", mcpServers: [] }),
).rejects.toMatchObject({ code: RequestError.invalidParams().code });
});
it("rejects a non-existent cwd with invalidParams", async () => {
const missing = path.join(os.tmpdir(), "claude-acp-does-not-exist-xyz");
await expect(agent.newSession({ cwd: missing, mcpServers: [] })).rejects.toMatchObject({
code: RequestError.invalidParams().code,
});
});
it("rejects a cwd that points at a file with invalidParams", async () => {
const file = path.join(os.tmpdir(), "claude-acp-cwd-is-a-file.txt");
fs.writeFileSync(file, "not a directory");
try {
await expect(agent.newSession({ cwd: file, mcpServers: [] })).rejects.toMatchObject({
code: RequestError.invalidParams().code,
});
} finally {
fs.rmSync(file, { force: true });
}
});
it("accepts an existing absolute directory", async () => {
await expect(agent.newSession({ cwd: process.cwd(), mcpServers: [] })).resolves.toBeDefined();
});
});
describe("elicitation", () => {
it("keeps AskUserQuestion disabled and omits callbacks without elicitation capability", async () => {
await agent.initialize({ protocolVersion: 1, clientCapabilities: {} });
await agent.newSession({ cwd: process.cwd(), mcpServers: [] });
expect(capturedOptions!.disallowedTools).toContain("AskUserQuestion");
expect(capturedOptions!.onElicitation).toBeUndefined();
});
it("enables AskUserQuestion and wires the elicitation callback when form is supported", async () => {
await agent.initialize({
protocolVersion: 1,
clientCapabilities: { elicitation: { form: {} } },
});
await agent.newSession({ cwd: process.cwd(), mcpServers: [] });
expect(capturedOptions!.disallowedTools).not.toContain("AskUserQuestion");
expect(typeof capturedOptions!.onElicitation).toBe("function");
});
it("wires callbacks for url-only elicitation but keeps AskUserQuestion disabled", async () => {
await agent.initialize({
protocolVersion: 1,
clientCapabilities: { elicitation: { url: {} } },
});
await agent.newSession({ cwd: process.cwd(), mcpServers: [] });
expect(capturedOptions!.disallowedTools).toContain("AskUserQuestion");
expect(typeof capturedOptions!.onElicitation).toBe("function");
});
it("still merges user-provided disallowedTools when AskUserQuestion is enabled", async () => {
await agent.initialize({
protocolVersion: 1,
clientCapabilities: { elicitation: { form: {} } },
});
await agent.newSession({
cwd: process.cwd(),
mcpServers: [],
_meta: { claudeCode: { options: { disallowedTools: ["WebSearch"] } } },
});
expect(capturedOptions!.disallowedTools).toContain("WebSearch");
expect(capturedOptions!.disallowedTools).not.toContain("AskUserQuestion");
});
});
});

View File

@@ -0,0 +1,309 @@
import { describe, it, expect } from "vitest";
import type { CreateElicitationRequest, CreateElicitationResponse } from "@agentclientprotocol/sdk";
import type { ElicitationRequest } from "@anthropic-ai/claude-agent-sdk";
import {
applyAskElicitationResponse,
askUserQuestionsToCreateRequest,
AskUserQuestion,
createElicitationResponseToElicitResult,
extractAskUserQuestions,
mcpElicitationToCreateRequest,
} from "../elicitation.js";
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.
*/
function mkQuestion(
question: string,
options: Array<{ label: string; description?: string }>,
opts: { header?: string; multiSelect?: boolean } = {},
): AskUserQuestion {
return {
question,
header: opts.header ?? "",
multiSelect: opts.multiSelect ?? false,
options: options.map((o) => ({ label: o.label, description: o.description ?? "" })),
} as AskUserQuestion;
}
describe("mcpElicitationToCreateRequest", () => {
it("maps a form-mode request, defaulting the schema type to object", () => {
const request: ElicitationRequest = {
serverName: "server",
message: "Need your name",
mode: "form",
requestedSchema: { properties: { name: { type: "string" } } },
};
const result = mcpElicitationToCreateRequest(request, SESSION_ID);
expect(result).toEqual({
mode: "form",
sessionId: SESSION_ID,
message: "Need your name",
requestedSchema: { type: "object", properties: { name: { type: "string" } } },
});
});
it("maps a url-mode request and preserves the elicitation id", () => {
const request: ElicitationRequest = {
serverName: "server",
message: "Authorize",
mode: "url",
url: "https://example.com/auth",
elicitationId: "el-123",
};
expect(mcpElicitationToCreateRequest(request, SESSION_ID)).toEqual({
mode: "url",
sessionId: SESSION_ID,
message: "Authorize",
url: "https://example.com/auth",
elicitationId: "el-123",
});
});
it("generates an elicitation id when a url request omits one", () => {
const request: ElicitationRequest = {
serverName: "server",
message: "Authorize",
mode: "url",
url: "https://example.com/auth",
};
const result = mcpElicitationToCreateRequest(request, SESSION_ID);
expect(result?.mode).toBe("url");
expect((result as { elicitationId: string }).elicitationId).toMatch(/.+/);
});
it("returns null for a url request with no url", () => {
const request: ElicitationRequest = {
serverName: "server",
message: "Authorize",
mode: "url",
};
expect(mcpElicitationToCreateRequest(request, SESSION_ID)).toBeNull();
});
});
describe("createElicitationResponseToElicitResult", () => {
it("maps accept with content", () => {
const response = { action: "accept", content: { name: "Ada" } } as CreateElicitationResponse;
expect(createElicitationResponseToElicitResult(response)).toEqual({
action: "accept",
content: { name: "Ada" },
});
});
it("defaults accept content to an empty object", () => {
const response = { action: "accept" } as CreateElicitationResponse;
expect(createElicitationResponseToElicitResult(response)).toEqual({
action: "accept",
content: {},
});
});
it("maps decline and cancel", () => {
expect(
createElicitationResponseToElicitResult({ action: "decline" } as CreateElicitationResponse),
).toEqual({ action: "decline" });
expect(
createElicitationResponseToElicitResult({ action: "cancel" } as CreateElicitationResponse),
).toEqual({ action: "cancel" });
});
});
describe("extractAskUserQuestions", () => {
const question = mkQuestion("Which?", [{ label: "A" }, { label: "B" }]);
it("reads questions off the tool input", () => {
expect(extractAskUserQuestions({ questions: [question] })).toEqual([question]);
});
it("returns null when there are no questions", () => {
expect(extractAskUserQuestions({})).toBeNull();
expect(extractAskUserQuestions({ questions: [] })).toBeNull();
});
it("filters out malformed questions (missing options, empty options, bad question)", () => {
const input = {
questions: [
question,
{ question: "missing options" },
{ options: [] },
{ options: [], question: "empty" },
],
} as unknown as Record<string, unknown>;
expect(extractAskUserQuestions(input)).toEqual([question]);
});
it("returns null when every question is filtered out", () => {
const input = {
questions: [{ question: "no options" }, { options: [{ label: "A" }] }],
} as unknown as Record<string, unknown>;
expect(extractAskUserQuestions(input)).toBeNull();
});
});
describe("askUserQuestionsToCreateRequest", () => {
it("keys a single-select question by a stable id and carries the prompt in message only", () => {
const questions = [
mkQuestion(
"Which library?",
[{ label: "date-fns", description: "Lightweight" }, { label: "luxon" }],
{
header: "Library",
},
),
];
const result = askUserQuestionsToCreateRequest(questions, SESSION_ID, "tool-1");
expect(result).toMatchObject({
mode: "form",
sessionId: SESSION_ID,
toolCallId: "tool-1",
message: "Which library?",
});
const schema = (result as Extract<CreateElicitationRequest, { mode: "form" }>).requestedSchema;
// Nothing is required; the user can pick, type a custom answer, or skip.
expect(schema.required).toBeUndefined();
// Single question → no duplicated description (prompt is in `message`).
expect(schema.properties?.["question_0"]).toEqual({
type: "string",
title: "Library",
description: undefined,
oneOf: [
{ const: "date-fns", title: "date-fns — Lightweight" },
{ const: "luxon", title: "luxon" },
],
});
// The full question text is not used as a property key.
expect(schema.properties?.["Which library?"]).toBeUndefined();
});
it("includes an optional free-text custom-answer field", () => {
const questions = [mkQuestion("Which?", [{ label: "A" }, { label: "B" }])];
const schema = (
askUserQuestionsToCreateRequest(questions, SESSION_ID, undefined) as Extract<
CreateElicitationRequest,
{ mode: "form" }
>
).requestedSchema;
expect(schema.properties?.["customAnswer"]).toMatchObject({ type: "string", title: "Other" });
});
it("builds an array property for multi-select questions and includes per-field question text", () => {
const questions = [
mkQuestion("Pick one?", [{ label: "A" }, { label: "B" }]),
mkQuestion("Which features?", [{ label: "auth" }, { label: "logging" }], {
multiSelect: true,
}),
];
const result = askUserQuestionsToCreateRequest(questions, SESSION_ID, undefined);
const schema = (result as Extract<CreateElicitationRequest, { mode: "form" }>).requestedSchema;
expect(result).not.toHaveProperty("toolCallId");
// Multiple questions → generic message, each field carries its own question.
expect(result.message).toBe("Please answer the following questions.");
expect(schema.properties?.["question_1"]).toEqual({
type: "array",
title: undefined,
description: "Which features?",
items: {
anyOf: [
{ const: "auth", title: "auth" },
{ const: "logging", title: "logging" },
],
},
});
});
});
describe("applyAskElicitationResponse", () => {
const questions = [
mkQuestion("Single?", [{ label: "A" }, { label: "B" }]),
mkQuestion("Multi?", [{ label: "X" }, { label: "Y" }], { multiSelect: true }),
];
const toolInput = { questions, metadata: { source: "test" } };
it("writes selected labels (keyed by indexed fields) into updatedInput on accept", () => {
const response = {
action: "accept",
content: { question_0: "A", question_1: ["X", "Y"] },
} as CreateElicitationResponse;
expect(applyAskElicitationResponse(response, toolInput, questions)).toEqual({
action: "answered",
updatedInput: {
questions,
metadata: { source: "test" },
answers: { "Single?": "A", "Multi?": "X, Y" },
},
});
});
it("maps the free-text custom-answer field to the tool's response", () => {
const response = {
action: "accept",
content: { question_0: "A", customAnswer: "something else entirely" },
} as CreateElicitationResponse;
expect(applyAskElicitationResponse(response, toolInput, questions)).toEqual({
action: "answered",
updatedInput: {
questions,
metadata: { source: "test" },
answers: { "Single?": "A" },
response: "something else entirely",
},
});
});
it("ignores empty selections and blank custom answers", () => {
const response = {
action: "accept",
content: { question_1: [], customAnswer: " " },
} as CreateElicitationResponse;
expect(applyAskElicitationResponse(response, toolInput, questions)).toEqual({
action: "answered",
updatedInput: { questions, metadata: { source: "test" }, answers: {} },
});
});
it("treats decline as answered with no answers", () => {
const response = { action: "decline" } as CreateElicitationResponse;
expect(applyAskElicitationResponse(response, toolInput, questions)).toEqual({
action: "answered",
updatedInput: { questions, metadata: { source: "test" }, answers: {} },
});
});
it("returns cancel on cancel", () => {
const response = { action: "cancel" } as CreateElicitationResponse;
expect(applyAskElicitationResponse(response, toolInput, questions)).toEqual({
action: "cancel",
});
});
it("omits answers for questions the user left unanswered", () => {
const response = {
action: "accept",
content: { question_0: "B" },
} as CreateElicitationResponse;
const result = applyAskElicitationResponse(response, toolInput, questions);
expect(result.action).toBe("answered");
expect((result as Extract<typeof result, { action: "answered" }>).updatedInput.answers).toEqual(
{ "Single?": "B" },
);
});
});

View File

@@ -148,13 +148,13 @@ describe("session config options", () => {
describe("newSession returns configOptions", () => {
it("includes configOptions in the response", async () => {
const response = await agent.newSession({ cwd: "/test", mcpServers: [] });
const response = await agent.newSession({ cwd: process.cwd(), mcpServers: [] });
expect(response.configOptions).toBeDefined();
expect(response.configOptions).toEqual(MOCK_CONFIG_OPTIONS);
});
it("includes mode and model config options", async () => {
const response = await agent.newSession({ cwd: "/test", mcpServers: [] });
const response = await agent.newSession({ cwd: process.cwd(), mcpServers: [] });
const modeOption = response.configOptions?.find((o) => o.id === "mode");
const modelOption = response.configOptions?.find((o) => o.id === "model");
expect(modeOption).toBeDefined();
@@ -173,7 +173,7 @@ describe("session config options", () => {
(agent as unknown as { loadSession: typeof loadSessionSpy }).loadSession = loadSessionSpy;
const response = await agent.loadSession({
cwd: "/test",
cwd: process.cwd(),
sessionId: SESSION_ID,
mcpServers: [],
});
@@ -377,33 +377,30 @@ describe("session config options", () => {
});
});
describe("unstable_setSessionModel sends config_option_update", () => {
describe("setSessionConfigOption(model) returns updated configOptions", () => {
beforeEach(() => {
populateSession();
});
it("sends config_option_update when model is changed via setSessionModel", async () => {
await agent.unstable_setSessionModel({
it("returns configOptions with the new model when changed", async () => {
const response = await agent.setSessionConfigOption({
sessionId: SESSION_ID,
modelId: "claude-sonnet-4-6",
configId: "model",
value: "claude-sonnet-4-6",
});
const configUpdate = sessionUpdates.find(
(n) => n.update.sessionUpdate === "config_option_update",
);
expect(configUpdate).toBeDefined();
expect(configUpdate?.update).toMatchObject({
sessionUpdate: "config_option_update",
configOptions: expect.arrayContaining([
expect(response.configOptions).toEqual(
expect.arrayContaining([
expect.objectContaining({ id: "model", currentValue: "claude-sonnet-4-6" }),
]),
});
);
});
it("updates stored configOptions currentValue when model changes", async () => {
await agent.unstable_setSessionModel({
await agent.setSessionConfigOption({
sessionId: SESSION_ID,
modelId: "claude-sonnet-4-6",
configId: "model",
value: "claude-sonnet-4-6",
});
const session = (
@@ -415,7 +412,7 @@ describe("session config options", () => {
expect(modelOption?.currentValue).toBe("claude-sonnet-4-6");
});
it("includes updated effort in config_option_update when model drops effort support", async () => {
it("drops effort from returned configOptions when model drops effort support", async () => {
const session = (agent as unknown as { sessions: Record<string, any> }).sessions[SESSION_ID];
session.modelInfos = [
{
@@ -433,23 +430,18 @@ describe("session config options", () => {
},
];
await agent.unstable_setSessionModel({
const response = await agent.setSessionConfigOption({
sessionId: SESSION_ID,
modelId: "claude-sonnet-4-6",
configId: "model",
value: "claude-sonnet-4-6",
});
const configUpdate = sessionUpdates.find(
(n) => n.update.sessionUpdate === "config_option_update",
);
expect(configUpdate).toBeDefined();
const effortOption = (configUpdate?.update as any).configOptions.find(
(o: any) => o.id === "effort",
);
const effortOption = response.configOptions.find((o) => o.id === "effort");
expect(effortOption).toBeUndefined();
expect(applyFlagSettingsSpy).toHaveBeenCalledWith({ effortLevel: null });
});
it("clamps effort in config_option_update when new model has different supported levels", async () => {
it("clamps effort in returned configOptions when new model has different supported levels", async () => {
// Set current effort to "max" which the new model won't support
const session = (agent as unknown as { sessions: Record<string, any> }).sessions[SESSION_ID];
const effortOpt = session.configOptions.find((o: any) => o.id === "effort");
@@ -472,39 +464,31 @@ describe("session config options", () => {
},
];
await agent.unstable_setSessionModel({
const response = await agent.setSessionConfigOption({
sessionId: SESSION_ID,
modelId: "claude-sonnet-4-6",
configId: "model",
value: "claude-sonnet-4-6",
});
const configUpdate = sessionUpdates.find(
(n) => n.update.sessionUpdate === "config_option_update",
);
const effortOption = (configUpdate?.update as any).configOptions.find(
(o: any) => o.id === "effort",
);
const effortOption = response.configOptions.find((o) => o.id === "effort");
expect(effortOption).toBeDefined();
expect(effortOption.currentValue).toBe("default");
expect(effortOption?.currentValue).toBe("default");
expect(applyFlagSettingsSpy).toHaveBeenCalledWith({ effortLevel: null });
});
it("preserves effort in config_option_update when new model supports same level", async () => {
it("preserves effort in returned configOptions when new model supports same level", async () => {
// Set effort to "low" first
const session = (agent as unknown as { sessions: Record<string, any> }).sessions[SESSION_ID];
const effortOpt = session.configOptions.find((o: any) => o.id === "effort");
if (effortOpt) effortOpt.currentValue = "low";
await agent.unstable_setSessionModel({
const response = await agent.setSessionConfigOption({
sessionId: SESSION_ID,
modelId: "claude-sonnet-4-6",
configId: "model",
value: "claude-sonnet-4-6",
});
const configUpdate = sessionUpdates.find(
(n) => n.update.sessionUpdate === "config_option_update",
);
const effortOption = (configUpdate?.update as any).configOptions.find(
(o: any) => o.id === "effort",
);
const effortOption = response.configOptions.find((o) => o.id === "effort");
expect(effortOption?.currentValue).toBe("low");
// Effort didn't change, so applyFlagSettings should NOT be called
expect(applyFlagSettingsSpy).not.toHaveBeenCalled();
@@ -821,10 +805,11 @@ describe("session config options", () => {
expect(session.configOptions.find((o) => o.id === "mode")?.currentValue).toBe("plan");
});
it("setSessionModel also syncs configOptions", async () => {
await agent.unstable_setSessionModel({
it("setSessionConfigOption(model) also syncs configOptions", async () => {
await agent.setSessionConfigOption({
sessionId: SESSION_ID,
modelId: "claude-sonnet-4-6",
configId: "model",
value: "claude-sonnet-4-6",
});
const session = (
@@ -947,58 +932,21 @@ describe("session config options", () => {
it("drops `auto` from available modes when switching to Haiku", async () => {
setupHaikuOpusSession("default");
await agent.unstable_setSessionModel({
const response = await agent.setSessionConfigOption({
sessionId: SESSION_ID,
modelId: "claude-haiku-4-5",
configId: "model",
value: "claude-haiku-4-5",
});
const configUpdate = sessionUpdates.find(
(n) => n.update.sessionUpdate === "config_option_update",
);
expect(configUpdate).toBeDefined();
const modeOption = (configUpdate?.update as any).configOptions.find(
(o: any) => o.id === "mode",
);
const modeOption = response.configOptions.find((o) => o.id === "mode");
expect(modeOption).toBeDefined();
const modeValues = modeOption.options.map((o: any) => o.value);
const modeValues = (modeOption as any).options.map((o: any) => o.value);
expect(modeValues).not.toContain("auto");
expect(modeValues).toEqual(
expect.arrayContaining(["default", "acceptEdits", "plan", "dontAsk"]),
);
});
it("clamps to `default` and emits current_mode_update when Opus(auto) → Haiku", async () => {
setupHaikuOpusSession("auto");
await agent.unstable_setSessionModel({
sessionId: SESSION_ID,
modelId: "claude-haiku-4-5",
});
// SDK was synced to "default".
expect(setPermissionModeSpy).toHaveBeenCalledWith("default");
// current_mode_update was emitted before config_option_update so a
// client applying notifications in order observes the mode change
// before re-rendering the config-option list.
const modeUpdateIdx = sessionUpdates.findIndex(
(n) => n.update.sessionUpdate === "current_mode_update",
);
const configUpdateIdx = sessionUpdates.findIndex(
(n) => n.update.sessionUpdate === "config_option_update",
);
expect(modeUpdateIdx).toBeGreaterThanOrEqual(0);
expect(configUpdateIdx).toBeGreaterThanOrEqual(0);
expect(modeUpdateIdx).toBeLessThan(configUpdateIdx);
expect((sessionUpdates[modeUpdateIdx].update as any).currentModeId).toBe("default");
// configOptions reflect the clamped mode.
const modeOption = (sessionUpdates[configUpdateIdx].update as any).configOptions.find(
(o: any) => o.id === "mode",
);
expect(modeOption.currentValue).toBe("default");
});
it("re-adds `auto` when switching from Haiku back to Opus", async () => {
const session = setupHaikuOpusSession("default");
// Pretend Haiku is the current model with no `auto`.
@@ -1013,19 +961,15 @@ describe("session config options", () => {
description: m.description,
}));
await agent.unstable_setSessionModel({
const response = await agent.setSessionConfigOption({
sessionId: SESSION_ID,
modelId: "claude-opus-4-5",
configId: "model",
value: "claude-opus-4-5",
});
const configUpdate = sessionUpdates.find(
(n) => n.update.sessionUpdate === "config_option_update",
);
expect(configUpdate).toBeDefined();
const modeOption = (configUpdate?.update as any).configOptions.find(
(o: any) => o.id === "mode",
);
const modeValues = modeOption.options.map((o: any) => o.value);
const modeOption = response.configOptions.find((o) => o.id === "mode");
expect(modeOption).toBeDefined();
const modeValues = (modeOption as any).options.map((o: any) => o.value);
expect(modeValues).toContain("auto");
// The current mode ("default") is still valid on Opus, so no
@@ -1039,9 +983,10 @@ describe("session config options", () => {
it("preserves the current mode when it remains valid after a model switch", async () => {
setupHaikuOpusSession("plan");
await agent.unstable_setSessionModel({
const response = await agent.setSessionConfigOption({
sessionId: SESSION_ID,
modelId: "claude-haiku-4-5",
configId: "model",
value: "claude-haiku-4-5",
});
// `plan` is in availableModes for both Opus and Haiku, so no clamp.
@@ -1052,20 +997,15 @@ describe("session config options", () => {
);
expect(modeUpdates).toHaveLength(0);
const configUpdate = sessionUpdates.find(
(n) => n.update.sessionUpdate === "config_option_update",
);
const modeOption = (configUpdate?.update as any).configOptions.find(
(o: any) => o.id === "mode",
);
expect(modeOption.currentValue).toBe("plan");
const modeOption = response.configOptions.find((o) => o.id === "mode");
expect((modeOption as any).currentValue).toBe("plan");
});
it("clamps mode and emits current_mode_update via setSessionConfigOption(model)", async () => {
// Mirrors the unstable_setSessionModel(auto → Haiku) test, but goes
// through the request/response API. The `current_mode_update` side
// effect must still fire so clients learn about the clamp regardless of
// which entry point triggered the model switch.
// Switching Opus(auto) → Haiku clamps the mode to "default". The
// `current_mode_update` side effect must fire so clients learn about the
// clamp even though the request/response API returns the new
// configOptions rather than emitting a config_option_update.
setupHaikuOpusSession("auto");
const response = await agent.setSessionConfigOption({

View File

@@ -1,4 +1,4 @@
import { describe, it, expect } from "vitest";
import { describe, it, expect, beforeEach } from "vitest";
import { AgentSideConnection, ClientCapabilities } from "@agentclientprotocol/sdk";
import { ImageBlockParam, ToolResultBlockParam } from "@anthropic-ai/sdk/resources";
import {
@@ -673,14 +673,19 @@ describe("Bash terminal output", () => {
});
describe("toAcpNotifications with clientCapabilities", () => {
const toolUseCache: ToolUseCache = {
toolu_bash: {
type: "tool_use",
id: "toolu_bash",
name: "Bash",
input: { command: "ls -la" },
},
};
// Reset before each test: toAcpNotifications prunes the cache entry once it
// maps the tool_result, so a shared object would be empty by the 2nd test.
let toolUseCache: ToolUseCache;
beforeEach(() => {
toolUseCache = {
toolu_bash: {
type: "tool_use",
id: "toolu_bash",
name: "Bash",
input: { command: "ls -la" },
},
};
});
const bashResult: BetaBashCodeExecutionResultBlock = {
type: "bash_code_execution_result",
@@ -792,11 +797,21 @@ describe("Bash terminal output", () => {
{ clientCapabilities: { _meta: { terminal_output: true } } },
);
// Fresh cache: the withSupport call above already consumed the entry,
// since toAcpNotifications prunes the tool_use once it maps the result.
const toolUseCacheWithoutSupport: ToolUseCache = {
toolu_bash: {
type: "tool_use",
id: "toolu_bash",
name: "Bash",
input: { command: "ls -la" },
},
};
const withoutSupport = toAcpNotifications(
[toolResult],
"assistant",
"test-session",
toolUseCache,
toolUseCacheWithoutSupport,
mockClient,
mockLogger,
);
@@ -848,6 +863,31 @@ describe("Bash terminal output", () => {
});
});
describe("toolUseCache pruning", () => {
it("retains the tool_use entry until its result, then prunes it", () => {
const toolUseCache: ToolUseCache = {};
const toolUse = {
type: "tool_use" as const,
id: "toolu_read",
name: "Read",
input: { file_path: "/tmp/x.txt" },
};
// tool_use is cached and kept (the matching result hasn't arrived yet).
toAcpNotifications([toolUse], "assistant", "s", toolUseCache, mockClient, mockLogger);
expect(toolUseCache.toolu_read).toBeDefined();
// tool_result resolves it, so the entry is pruned to bound memory.
const toolResult: ToolResultBlockParam = {
type: "tool_result",
tool_use_id: "toolu_read",
content: [{ type: "text", text: "hello" }],
};
toAcpNotifications([toolResult], "assistant", "s", toolUseCache, mockClient, mockLogger);
expect(toolUseCache.toolu_read).toBeUndefined();
});
});
describe("post-tool-use hook sends diff content for Edit tool", () => {
it("should include content and locations from structuredPatch in hook update", async () => {
const toolUseCache: ToolUseCache = {};

View File

@@ -8,6 +8,7 @@ import {
import { HookCallback } from "@anthropic-ai/claude-agent-sdk";
import {
AgentInput,
AskUserQuestionInput,
BashInput,
FileEditInput,
FileReadInput,
@@ -415,6 +416,24 @@ export function toolInfoFromToolUse(
};
}
case "AskUserQuestion": {
const input = toolUse.input as Partial<AskUserQuestionInput> | undefined;
const questions = Array.isArray(input?.questions) ? input.questions : [];
return {
title:
questions.length === 1 && questions[0]?.question
? questions[0].question
: "Asking for your input",
kind: "other",
content: questions
.filter((q) => typeof q?.question === "string")
.map((q) => ({
type: "content" as const,
content: { type: "text" as const, text: q.question },
})),
};
}
case "Other": {
const input = toolUse.input;
let output;