Compare commits

...

32 Commits

Author SHA1 Message Date
acp-release-bot[bot]
0a88de2a83 chore(main): release 0.60.0 (#884)
🤖 I have created a release *beep* *boop*
---


##
[0.60.0](https://github.com/agentclientprotocol/claude-agent-acp/compare/v0.59.0...v0.60.0)
(2026-07-20)


### Features

* **deps:** Update to claude-agent-sdk 0.3.215
([#890](https://github.com/agentclientprotocol/claude-agent-acp/issues/890))
([92548f0](92548f0435))
* implement configurable LLM providers
([#853](https://github.com/agentclientprotocol/claude-agent-acp/issues/853))
([82cd692](82cd692e50))


### Bug Fixes

* parse Agent/Task trailers without regex
([#879](https://github.com/agentclientprotocol/claude-agent-acp/issues/879))
([06c3d7b](06c3d7bdbd))
* remove ~15s stall on session/new and model switch by seeding the
context window synchronously
([#894](https://github.com/agentclientprotocol/claude-agent-acp/issues/894))
([ff9b96d](ff9b96d462))
* Silence missing PostToolUse callbacks
([#895](https://github.com/agentclientprotocol/claude-agent-acp/issues/895))
([1887ada](1887ada215)),
closes
[#889](https://github.com/agentclientprotocol/claude-agent-acp/issues/889)

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

Co-authored-by: acp-release-bot[bot] <246668977+acp-release-bot[bot]@users.noreply.github.com>
2026-07-20 14:51:04 +02:00
Luca Dibattista
ff9b96d462 fix: remove ~15s stall on session/new and model switch by seeding the context window synchronously (#894)
## Summary

`session/new` and switching models via `configOptions` regressed to ~15s
each in v0.59.0. This removes the blocking call responsible and seeds
the context window synchronously instead, restoring sub-second behavior
on both paths.

## Root cause

v0.59.0 added an inline `await query.getContextUsage()` on the
session-creation and model-switch paths. That SDK control request is not
serviced by the CLI until the session's first prompt turn has run —
before then it stalls ~15s. And because SDK control requests are
serialized over a single stdin/stdout channel, an awaited `setModel`
queued behind the wedged `getContextUsage` inherited the full stall. So
both paths blocked ~15s before returning.

Verified with the real CLI (setModel alone pre-prompt: ~1ms;
getContextUsage alone pre-prompt: ~16s; getContextUsage-then-setModel:
both resolve together at ~16s, confirming the serialization).

## Fix

Drop `getContextUsage` from both hot paths. The context window is seeded
synchronously by `immediateContextWindow(...)`:

1. an authoritative value from a per-(provider, model) cache, if
learned; else
2. a synchronous text heuristic (`\b1m\b` → 1,000,000); else
3. `DEFAULT_CONTEXT_WINDOW` (200,000).

The authoritative window is learned the moment it's actually available —
from each turn's `result.modelUsage` — and written into the cache, so
later sessions/switches to the same model seed the correct window
immediately with no IPC. A model that has never run a turn shows the
heuristic/default window until its first response, matching pre-0.59.0
behavior.

### Cache design

- **Keyed on `(provider, resolved model id)`.** The resolved id
(`ModelInfo.resolvedModel`, e.g. `claude-sonnet-5[1m]`) matches the
`result.modelUsage` keys, so the write key and the read keys line up.
Keying on the resolved id (not the picker value) dedups aliases that
resolve to the same model; keying on the provider keeps two providers
that reuse an id string for different windows from crossing wires
(per-session provider config, #853). The provider is captured at session
creation, since the effective provider can change process-wide over the
adapter's lifetime.
- **Non-positive/NaN windows are ignored** — they neither overwrite the
session's learned window nor enter the cache.

## Impact (measured, real CLI)

| Path | Before | After |
| --- | --- | --- |
| `session/new` | ~17.4s | ~0.9s |
| model switch (before first prompt) | ~15s | ~3ms |
| model switch (after a turn) | ~14.7s | <1ms |

## Tests

- New end-to-end cache test: a turn's authoritative window (learned
under the resolved id even when the assistant message reports the bare
id) is served on a later switch with no `getContextUsage`.
- New provider-isolation test: the same resolved id on a different
provider does not read another provider's cached window; the same
provider does.
- New non-positive-window test: a nonsensical `contextWindow` is ignored
and never poisons the cache.
- Rewrote the existing context-window tests to the new contract (assert
no `getContextUsage` on session/new and switch; window from
cache/inference/default).

Closes #886
Closes #880

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2026-07-20 12:48:40 +00:00
Ben Brandt
1887ada215 fix: Silence missing PostToolUse callbacks (#895)
Closes #889
2026-07-20 11:43:08 +00:00
José Gurruchaga
06c3d7bdbd fix: parse Agent/Task trailers without regex (#879)
## Summary

Closes:
https://github.com/agentclientprotocol/claude-agent-acp/issues/878
Fixes the potential ReDoS warning reported by CodeQL in
`stripAgentTrailer()`.

- Replaces regex-based trailer stripping with bounded linear parsing
- Preserves valid `<usage>…</usage>` and `agentId: … (…)` trailer
handling
- Adds coverage for malformed trailers, which are left unchanged

## Testing

- `npm test -- --run src/tests/tools.test.ts`

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-20 11:21:52 +00:00
dependabot[bot]
92548f0435 feat(deps): Update to claude-agent-sdk 0.3.215 (#890)
Bumps the minor group with 7 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
|
[@anthropic-ai/claude-agent-sdk](https://github.com/anthropics/claude-agent-sdk-typescript)
| `0.3.207` | `0.3.212` |
|
[@anthropic-ai/sdk](https://github.com/anthropics/anthropic-sdk-typescript)
| `0.111.0` | `0.112.1` |
|
[@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin)
| `8.63.0` | `8.64.0` |
|
[@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser)
| `8.63.0` | `8.64.0` |
|
[express-rate-limit](https://github.com/express-rate-limit/express-rate-limit)
| `8.5.2` | `8.6.0` |
| [obug](https://github.com/sxzz/obug) | `2.1.3` | `2.1.4` |
| [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) |
`8.1.4` | `8.1.5` |


Updates `@anthropic-ai/claude-agent-sdk` from 0.3.207 to 0.3.212
<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.212</h2>
<h2>What's changed</h2>
<ul>
<li>Fixed dash-leading <code>resumeSessionAt</code> and
<code>sessionId</code> values being passed to the CLI as separate argv
tokens; both now use equals-form (<code>--flag=value</code>)</li>
<li>Agent tool output now includes the resolved model when a mid-turn
model swap changed the subagent's model</li>
</ul>
<h2>Update</h2>
<pre lang="sh"><code>npm install @anthropic-ai/claude-agent-sdk@0.3.212
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.212
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.212
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.212
</code></pre>
<h2>v0.3.211</h2>
<h2>What's changed</h2>
<ul>
<li>Fixed <code>--replay-user-messages</code> with
<code>--include-partial-messages</code> emitting the turn-start user
replay after the first content block instead of before the turn's
content events</li>
<li>Added <code>SDKAssistantMessage.timestamp</code> (ISO-8601) to the
live stream, matching <code>SDKUserMessage</code>; older emitters omit
it, consumers should fall back to receive time</li>
<li>Added rate-limit message prefix buckets
(<code>USAGE_LIMIT_ERROR_PREFIXES</code> and siblings) as
<code>@alpha</code> exports for classifying rate-limit messages without
hand-mirrored lists</li>
<li>Improved process-exit errors to include the CLI's stderr output, so
a failed child reports its actual cause instead of only an exit
code</li>
</ul>
<h2>Update</h2>
<pre lang="sh"><code>npm install @anthropic-ai/claude-agent-sdk@0.3.211
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.211
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.211
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.211
</code></pre>
<h2>v0.3.210</h2>
<h2>What's changed</h2>
<ul>
<li>Added <code>timedOutAfterMs</code> to <code>BashToolOutput</code>,
set when a command is auto-backgrounded on timeout</li>
</ul>
<h2>Update</h2>
<pre lang="sh"><code>npm install @anthropic-ai/claude-agent-sdk@0.3.210
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.210
# or
&lt;/tr&gt;&lt;/table&gt; 
</code></pre>
</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.212</h2>
<ul>
<li>Fixed dash-leading <code>resumeSessionAt</code> and
<code>sessionId</code> values being passed to the CLI as separate argv
tokens; both now use equals-form (<code>--flag=value</code>)</li>
<li>Agent tool output now includes the resolved model when a mid-turn
model swap changed the subagent's model</li>
</ul>
<h2>0.3.211</h2>
<ul>
<li>Fixed <code>--replay-user-messages</code> with
<code>--include-partial-messages</code> emitting the turn-start user
replay after the first content block instead of before the turn's
content events</li>
<li>Added <code>SDKAssistantMessage.timestamp</code> (ISO-8601) to the
live stream, matching <code>SDKUserMessage</code>; older emitters omit
it, consumers should fall back to receive time</li>
<li>Added rate-limit message prefix buckets
(<code>USAGE_LIMIT_ERROR_PREFIXES</code> and siblings) as
<code>@alpha</code> exports for classifying rate-limit messages without
hand-mirrored lists</li>
<li>Improved process-exit errors to include the CLI's stderr output, so
a failed child reports its actual cause instead of only an exit
code</li>
</ul>
<h2>0.3.210</h2>
<ul>
<li>Added <code>timedOutAfterMs</code> to <code>BashToolOutput</code>,
set when a command is auto-backgrounded on timeout</li>
</ul>
<h2>0.3.209</h2>
<ul>
<li>Updated to parity with Claude Code v2.1.209</li>
</ul>
<h2>0.3.208</h2>
<ul>
<li>Fixed a caller abort during a pending SDK hook callback being
converted into hook success, which let PreToolUse-gated tools execute
after the abort</li>
<li>Fixed a per-query resource leak in the SDK's process tracking when
spawning the CLI fails (nonexistent or inaccessible executable
path)</li>
<li>Fixed an SDK <code>UserPromptSubmit</code> hook callback exceeding
its timeout killing the entire query with an empty error; it now blocks
the prompt with a clear timeout message and the session continues</li>
<li>Fixed <code>extraArgs</code> values that look like flags (e.g.
<code>resume: '--version'</code>) being parsed as their own CLI flags;
dash-leading values are now bound with equals-form argv</li>
<li>Fixed an abort-listener leak: streaming queries sharing one
<code>AbortController</code> no longer accumulate <code>abort</code>
listeners on its signal after each completed query</li>
<li>Fixed <code>createSdkMcpServer</code> docs pointing at a nonexistent
env var; the MCP tool-call timeout knob is
<code>MCP_TOOL_TIMEOUT</code></li>
<li>Fixed an uncaught exception when writing to stdin after the Claude
Code subprocess has exited</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="f1206afbf0"><code>f1206af</code></a>
chore: Update CHANGELOG.md</li>
<li><a
href="d7f244a55e"><code>d7f244a</code></a>
chore: Update CHANGELOG.md</li>
<li><a
href="018efaa0c3"><code>018efaa</code></a>
chore: Update CHANGELOG.md</li>
<li><a
href="d9eca208ac"><code>d9eca20</code></a>
chore: Update CHANGELOG.md</li>
<li><a
href="34426a18f0"><code>34426a1</code></a>
Escape untrusted issue fields in the Slack notification workflow (<a
href="https://redirect.github.com/anthropics/claude-agent-sdk-typescript/issues/375">#375</a>)</li>
<li><a
href="96e19a548a"><code>96e19a5</code></a>
chore: Update CHANGELOG.md</li>
<li><a
href="02b0475071"><code>02b0475</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.207...v0.3.212">compare
view</a></li>
</ul>
</details>
<br />

Updates `@anthropic-ai/sdk` from 0.111.0 to 0.112.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.112.1</h2>
<h2>0.112.1 (2026-07-16)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.112.0...sdk-v0.112.1">sdk-v0.112.0...sdk-v0.112.1</a></p>
<h2>sdk: v0.112.0</h2>
<h2>0.112.0 (2026-07-16)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.111.0...sdk-v0.112.0">sdk-v0.111.0...sdk-v0.112.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> add support for MCP Tunnels (<a
href="597ac4181f">597ac41</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.112.1 (2026-07-16)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.112.0...sdk-v0.112.1">sdk-v0.112.0...sdk-v0.112.1</a></p>
<h2>0.112.0 (2026-07-16)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.111.0...sdk-v0.112.0">sdk-v0.111.0...sdk-v0.112.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> add support for MCP Tunnels (<a
href="597ac4181f">597ac41</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="dd61964bbe"><code>dd61964</code></a>
chore: release main</li>
<li><a
href="b48ac4b46a"><code>b48ac4b</code></a>
ci: force version bump (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-typescript/issues/225">#225</a>)</li>
<li><a
href="4aac845a7a"><code>4aac845</code></a>
chore: release main</li>
<li><a
href="8db6f8449c"><code>8db6f84</code></a>
ci: Update readme to force release (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-typescript/issues/224">#224</a>)</li>
<li><a
href="d4aa171e5e"><code>d4aa171</code></a>
chore: release main</li>
<li><a
href="bc2d2674b3"><code>bc2d267</code></a>
codegen metadata</li>
<li><a
href="d05ddf6961"><code>d05ddf6</code></a>
feat(api): add support for MCP Tunnels</li>
<li>See full diff in <a
href="https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.111.0...sdk-v0.112.1">compare
view</a></li>
</ul>
</details>
<br />

Updates `@typescript-eslint/eslint-plugin` from 8.63.0 to 8.64.0
<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.64.0</h2>
<h2>8.64.0 (2026-07-13)</h2>
<h3>🚀 Features</h3>
<ul>
<li>support parsing <code>import defer</code> (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12513">#12513</a>)</li>
<li><strong>eslint-plugin:</strong> [no-loop-func] support
<code>using</code> / <code>await using</code> declarations and deprecate
the rule (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12500">#12500</a>)</li>
<li><strong>typescript-estree:</strong> throw for invalid definite
assignment in class properties (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12543">#12543</a>)</li>
</ul>
<h3>🩹 Fixes</h3>
<ul>
<li><strong>eslint-plugin:</strong> [require-array-sort-compare] handle
constrained arrays (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12512">#12512</a>)</li>
</ul>
<h3>❤️ Thank You</h3>
<ul>
<li>Evyatar Daud <a
href="https://github.com/StyleShit"><code>@​StyleShit</code></a></li>
<li>송재욱</li>
</ul>
<p>See <a
href="https://github.com/typescript-eslint/typescript-eslint/releases/tag/v8.64.0">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.64.0 (2026-07-13)</h2>
<h3>🚀 Features</h3>
<ul>
<li><strong>eslint-plugin:</strong> [no-loop-func] support
<code>using</code> / <code>await using</code> declarations and deprecate
the rule (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12500">#12500</a>)</li>
<li><strong>typescript-estree:</strong> throw for invalid definite
assignment in class properties (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12543">#12543</a>)</li>
</ul>
<h3>🩹 Fixes</h3>
<ul>
<li><strong>eslint-plugin:</strong> [require-array-sort-compare] handle
constrained arrays (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12512">#12512</a>)</li>
</ul>
<h3>❤️ Thank You</h3>
<ul>
<li>Evyatar Daud <a
href="https://github.com/StyleShit"><code>@​StyleShit</code></a></li>
<li>송재욱</li>
</ul>
<p>See <a
href="https://github.com/typescript-eslint/typescript-eslint/releases/tag/v8.64.0">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="414d9abbf6"><code>414d9ab</code></a>
chore(release): publish 8.64.0</li>
<li><a
href="bcfe16fd2c"><code>bcfe16f</code></a>
feat(eslint-plugin): [no-loop-func] support <code>using</code> /
<code>await using</code> declarati...</li>
<li><a
href="5b5bfdeb8f"><code>5b5bfde</code></a>
fix(eslint-plugin): [require-array-sort-compare] handle constrained
arrays (#...</li>
<li><a
href="321856cdad"><code>321856c</code></a>
chore: cleanup cspell config (<a
href="https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin/issues/12526">#12526</a>)</li>
<li><a
href="b418cf577f"><code>b418cf5</code></a>
feat(typescript-estree): throw for invalid definite assignment in class
prope...</li>
<li><a
href="737de2b569"><code>737de2b</code></a>
docs: align unified-signatures correct example parameter (<a
href="https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin/issues/12506">#12506</a>)</li>
<li><a
href="a63c17ab74"><code>a63c17a</code></a>
docs: fix shadowed parameter name in unified-signatures example (<a
href="https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin/issues/12502">#12502</a>)</li>
<li>See full diff in <a
href="https://github.com/typescript-eslint/typescript-eslint/commits/v8.64.0/packages/eslint-plugin">compare
view</a></li>
</ul>
</details>
<br />

Updates `@typescript-eslint/parser` from 8.63.0 to 8.64.0
<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.64.0</h2>
<h2>8.64.0 (2026-07-13)</h2>
<h3>🚀 Features</h3>
<ul>
<li>support parsing <code>import defer</code> (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12513">#12513</a>)</li>
<li><strong>eslint-plugin:</strong> [no-loop-func] support
<code>using</code> / <code>await using</code> declarations and deprecate
the rule (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12500">#12500</a>)</li>
<li><strong>typescript-estree:</strong> throw for invalid definite
assignment in class properties (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12543">#12543</a>)</li>
</ul>
<h3>🩹 Fixes</h3>
<ul>
<li><strong>eslint-plugin:</strong> [require-array-sort-compare] handle
constrained arrays (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12512">#12512</a>)</li>
</ul>
<h3>❤️ Thank You</h3>
<ul>
<li>Evyatar Daud <a
href="https://github.com/StyleShit"><code>@​StyleShit</code></a></li>
<li>송재욱</li>
</ul>
<p>See <a
href="https://github.com/typescript-eslint/typescript-eslint/releases/tag/v8.64.0">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.64.0 (2026-07-13)</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.64.0">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="414d9abbf6"><code>414d9ab</code></a>
chore(release): publish 8.64.0</li>
<li>See full diff in <a
href="https://github.com/typescript-eslint/typescript-eslint/commits/v8.64.0/packages/parser">compare
view</a></li>
</ul>
</details>
<br />

Updates `@anthropic-ai/claude-agent-sdk-darwin-arm64` from 0.3.207 to
0.3.212

Updates `@anthropic-ai/claude-agent-sdk-darwin-x64` from 0.3.207 to
0.3.212

Updates `@anthropic-ai/claude-agent-sdk-linux-arm64` from 0.3.207 to
0.3.212

Updates `@anthropic-ai/claude-agent-sdk-linux-arm64-musl` from 0.3.207
to 0.3.212

Updates `@anthropic-ai/claude-agent-sdk-linux-x64` from 0.3.207 to
0.3.212

Updates `@anthropic-ai/claude-agent-sdk-linux-x64-musl` from 0.3.207 to
0.3.212

Updates `@anthropic-ai/claude-agent-sdk-win32-arm64` from 0.3.207 to
0.3.212

Updates `@anthropic-ai/claude-agent-sdk-win32-x64` from 0.3.207 to
0.3.212

Updates `@typescript-eslint/project-service` from 8.63.0 to 8.64.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/typescript-eslint/typescript-eslint/releases">@​typescript-eslint/project-service's
releases</a>.</em></p>
<blockquote>
<h2>v8.64.0</h2>
<h2>8.64.0 (2026-07-13)</h2>
<h3>🚀 Features</h3>
<ul>
<li>support parsing <code>import defer</code> (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12513">#12513</a>)</li>
<li><strong>eslint-plugin:</strong> [no-loop-func] support
<code>using</code> / <code>await using</code> declarations and deprecate
the rule (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12500">#12500</a>)</li>
<li><strong>typescript-estree:</strong> throw for invalid definite
assignment in class properties (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12543">#12543</a>)</li>
</ul>
<h3>🩹 Fixes</h3>
<ul>
<li><strong>eslint-plugin:</strong> [require-array-sort-compare] handle
constrained arrays (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12512">#12512</a>)</li>
</ul>
<h3>❤️ Thank You</h3>
<ul>
<li>Evyatar Daud <a
href="https://github.com/StyleShit"><code>@​StyleShit</code></a></li>
<li>송재욱</li>
</ul>
<p>See <a
href="https://github.com/typescript-eslint/typescript-eslint/releases/tag/v8.64.0">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/project-service/CHANGELOG.md">@​typescript-eslint/project-service's
changelog</a>.</em></p>
<blockquote>
<h2>8.64.0 (2026-07-13)</h2>
<p>This was a version bump only for project-service 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.64.0">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="414d9abbf6"><code>414d9ab</code></a>
chore(release): publish 8.64.0</li>
<li>See full diff in <a
href="https://github.com/typescript-eslint/typescript-eslint/commits/v8.64.0/packages/project-service">compare
view</a></li>
</ul>
</details>
<br />

Updates `@typescript-eslint/scope-manager` from 8.63.0 to 8.64.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/typescript-eslint/typescript-eslint/releases">@​typescript-eslint/scope-manager's
releases</a>.</em></p>
<blockquote>
<h2>v8.64.0</h2>
<h2>8.64.0 (2026-07-13)</h2>
<h3>🚀 Features</h3>
<ul>
<li>support parsing <code>import defer</code> (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12513">#12513</a>)</li>
<li><strong>eslint-plugin:</strong> [no-loop-func] support
<code>using</code> / <code>await using</code> declarations and deprecate
the rule (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12500">#12500</a>)</li>
<li><strong>typescript-estree:</strong> throw for invalid definite
assignment in class properties (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12543">#12543</a>)</li>
</ul>
<h3>🩹 Fixes</h3>
<ul>
<li><strong>eslint-plugin:</strong> [require-array-sort-compare] handle
constrained arrays (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12512">#12512</a>)</li>
</ul>
<h3>❤️ Thank You</h3>
<ul>
<li>Evyatar Daud <a
href="https://github.com/StyleShit"><code>@​StyleShit</code></a></li>
<li>송재욱</li>
</ul>
<p>See <a
href="https://github.com/typescript-eslint/typescript-eslint/releases/tag/v8.64.0">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/scope-manager/CHANGELOG.md">@​typescript-eslint/scope-manager's
changelog</a>.</em></p>
<blockquote>
<h2>8.64.0 (2026-07-13)</h2>
<h3>🚀 Features</h3>
<ul>
<li>support parsing <code>import defer</code> (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12513">#12513</a>)</li>
</ul>
<h3>❤️ Thank You</h3>
<ul>
<li>Evyatar Daud <a
href="https://github.com/StyleShit"><code>@​StyleShit</code></a></li>
</ul>
<p>See <a
href="https://github.com/typescript-eslint/typescript-eslint/releases/tag/v8.64.0">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="414d9abbf6"><code>414d9ab</code></a>
chore(release): publish 8.64.0</li>
<li><a
href="07af21b912"><code>07af21b</code></a>
feat: support parsing <code>import defer</code> (<a
href="https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/scope-manager/issues/12513">#12513</a>)</li>
<li>See full diff in <a
href="https://github.com/typescript-eslint/typescript-eslint/commits/v8.64.0/packages/scope-manager">compare
view</a></li>
</ul>
</details>
<br />

Updates `@typescript-eslint/tsconfig-utils` from 8.63.0 to 8.64.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/typescript-eslint/typescript-eslint/releases">@​typescript-eslint/tsconfig-utils's
releases</a>.</em></p>
<blockquote>
<h2>v8.64.0</h2>
<h2>8.64.0 (2026-07-13)</h2>
<h3>🚀 Features</h3>
<ul>
<li>support parsing <code>import defer</code> (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12513">#12513</a>)</li>
<li><strong>eslint-plugin:</strong> [no-loop-func] support
<code>using</code> / <code>await using</code> declarations and deprecate
the rule (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12500">#12500</a>)</li>
<li><strong>typescript-estree:</strong> throw for invalid definite
assignment in class properties (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12543">#12543</a>)</li>
</ul>
<h3>🩹 Fixes</h3>
<ul>
<li><strong>eslint-plugin:</strong> [require-array-sort-compare] handle
constrained arrays (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12512">#12512</a>)</li>
</ul>
<h3>❤️ Thank You</h3>
<ul>
<li>Evyatar Daud <a
href="https://github.com/StyleShit"><code>@​StyleShit</code></a></li>
<li>송재욱</li>
</ul>
<p>See <a
href="https://github.com/typescript-eslint/typescript-eslint/releases/tag/v8.64.0">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/tsconfig-utils/CHANGELOG.md">@​typescript-eslint/tsconfig-utils's
changelog</a>.</em></p>
<blockquote>
<h2>8.64.0 (2026-07-13)</h2>
<p>This was a version bump only for tsconfig-utils 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.64.0">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="414d9abbf6"><code>414d9ab</code></a>
chore(release): publish 8.64.0</li>
<li>See full diff in <a
href="https://github.com/typescript-eslint/typescript-eslint/commits/v8.64.0/packages/tsconfig-utils">compare
view</a></li>
</ul>
</details>
<br />

Updates `@typescript-eslint/type-utils` from 8.63.0 to 8.64.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/typescript-eslint/typescript-eslint/releases">@​typescript-eslint/type-utils's
releases</a>.</em></p>
<blockquote>
<h2>v8.64.0</h2>
<h2>8.64.0 (2026-07-13)</h2>
<h3>🚀 Features</h3>
<ul>
<li>support parsing <code>import defer</code> (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12513">#12513</a>)</li>
<li><strong>eslint-plugin:</strong> [no-loop-func] support
<code>using</code> / <code>await using</code> declarations and deprecate
the rule (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12500">#12500</a>)</li>
<li><strong>typescript-estree:</strong> throw for invalid definite
assignment in class properties (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12543">#12543</a>)</li>
</ul>
<h3>🩹 Fixes</h3>
<ul>
<li><strong>eslint-plugin:</strong> [require-array-sort-compare] handle
constrained arrays (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12512">#12512</a>)</li>
</ul>
<h3>❤️ Thank You</h3>
<ul>
<li>Evyatar Daud <a
href="https://github.com/StyleShit"><code>@​StyleShit</code></a></li>
<li>송재욱</li>
</ul>
<p>See <a
href="https://github.com/typescript-eslint/typescript-eslint/releases/tag/v8.64.0">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/type-utils/CHANGELOG.md">@​typescript-eslint/type-utils's
changelog</a>.</em></p>
<blockquote>
<h2>8.64.0 (2026-07-13)</h2>
<p>This was a version bump only for type-utils 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.64.0">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="414d9abbf6"><code>414d9ab</code></a>
chore(release): publish 8.64.0</li>
<li>See full diff in <a
href="https://github.com/typescript-eslint/typescript-eslint/commits/v8.64.0/packages/type-utils">compare
view</a></li>
</ul>
</details>
<br />

Updates `@typescript-eslint/types` from 8.63.0 to 8.64.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/typescript-eslint/typescript-eslint/releases">@​typescript-eslint/types's
releases</a>.</em></p>
<blockquote>
<h2>v8.64.0</h2>
<h2>8.64.0 (2026-07-13)</h2>
<h3>🚀 Features</h3>
<ul>
<li>support parsing <code>import defer</code> (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12513">#12513</a>)</li>
<li><strong>eslint-plugin:</strong> [no-loop-func] support
<code>using</code> / <code>await using</code> declarations and deprecate
the rule (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12500">#12500</a>)</li>
<li><strong>typescript-estree:</strong> throw for invalid definite
assignment in class properties (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12543">#12543</a>)</li>
</ul>
<h3>🩹 Fixes</h3>
<ul>
<li><strong>eslint-plugin:</strong> [require-array-sort-compare] handle
constrained arrays (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12512">#12512</a>)</li>
</ul>
<h3>❤️ Thank You</h3>
<ul>
<li>Evyatar Daud <a
href="https://github.com/StyleShit"><code>@​StyleShit</code></a></li>
<li>송재욱</li>
</ul>
<p>See <a
href="https://github.com/typescript-eslint/typescript-eslint/releases/tag/v8.64.0">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/types/CHANGELOG.md">@​typescript-eslint/types's
changelog</a>.</em></p>
<blockquote>
<h2>8.64.0 (2026-07-13)</h2>
<p>This was a version bump only for types 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.64.0">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="414d9abbf6"><code>414d9ab</code></a>
chore(release): publish 8.64.0</li>
<li>See full diff in <a
href="https://github.com/typescript-eslint/typescript-eslint/commits/v8.64.0/packages/types">compare
view</a></li>
</ul>
</details>
<br />

Updates `@typescript-eslint/typescript-estree` from 8.63.0 to 8.64.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/typescript-eslint/typescript-eslint/releases">@​typescript-eslint/typescript-estree's
releases</a>.</em></p>
<blockquote>
<h2>v8.64.0</h2>
<h2>8.64.0 (2026-07-13)</h2>
<h3>🚀 Features</h3>
<ul>
<li>support parsing <code>import defer</code> (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12513">#12513</a>)</li>
<li><strong>eslint-plugin:</strong> [no-loop-func] support
<code>using</code> / <code>await using</code> declarations and deprecate
the rule (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12500">#12500</a>)</li>
<li><strong>typescript-estree:</strong> throw for invalid definite
assignment in class properties (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12543">#12543</a>)</li>
</ul>
<h3>🩹 Fixes</h3>
<ul>
<li><strong>eslint-plugin:</strong> [require-array-sort-compare] handle
constrained arrays (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12512">#12512</a>)</li>
</ul>
<h3>❤️ Thank You</h3>
<ul>
<li>Evyatar Daud <a
href="https://github.com/StyleShit"><code>@​StyleShit</code></a></li>
<li>송재욱</li>
</ul>
<p>See <a
href="https://github.com/typescript-eslint/typescript-eslint/releases/tag/v8.64.0">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/typescript-estree/CHANGELOG.md">@​typescript-eslint/typescript-estree's
changelog</a>.</em></p>
<blockquote>
<h2>8.64.0 (2026-07-13)</h2>
<h3>🚀 Features</h3>
<ul>
<li><strong>typescript-estree:</strong> throw for invalid definite
assignment in class properties (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12543">#12543</a>)</li>
<li>support parsing <code>import defer</code> (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12513">#12513</a>)</li>
</ul>
<h3>❤️ Thank You</h3>
<ul>
<li>Evyatar Daud <a
href="https://github.com/StyleShit"><code>@​StyleShit</code></a></li>
</ul>
<p>See <a
href="https://github.com/typescript-eslint/typescript-eslint/releases/tag/v8.64.0">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="414d9abbf6"><code>414d9ab</code></a>
chore(release): publish 8.64.0</li>
<li><a
href="b418cf577f"><code>b418cf5</code></a>
feat(typescript-estree): throw for invalid definite assignment in class
prope...</li>
<li><a
href="07af21b912"><code>07af21b</code></a>
feat: support parsing <code>import defer</code> (<a
href="https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-estree/issues/12513">#12513</a>)</li>
<li>See full diff in <a
href="https://github.com/typescript-eslint/typescript-eslint/commits/v8.64.0/packages/typescript-estree">compare
view</a></li>
</ul>
</details>
<br />

Updates `@typescript-eslint/utils` from 8.63.0 to 8.64.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/typescript-eslint/typescript-eslint/releases">@​typescript-eslint/utils's
releases</a>.</em></p>
<blockquote>
<h2>v8.64.0</h2>
<h2>8.64.0 (2026-07-13)</h2>
<h3>🚀 Features</h3>
<ul>
<li>support parsing <code>import defer</code> (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12513">#12513</a>)</li>
<li><strong>eslint-plugin:</strong> [no-loop-func] support
<code>using</code> / <code>await using</code> declarations and deprecate
the rule (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12500">#12500</a>)</li>
<li><strong>typescript-estree:</strong> throw for invalid definite
assignment in class properties (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12543">#12543</a>)</li>
</ul>
<h3>🩹 Fixes</h3>
<ul>
<li><strong>eslint-plugin:</strong> [require-array-sort-compare] handle
constrained arrays (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12512">#12512</a>)</li>
</ul>
<h3>❤️ Thank You</h3>
<ul>
<li>Evyatar Daud <a
href="https://github.com/StyleShit"><code>@​StyleShit</code></a></li>
<li>송재욱</li>
</ul>
<p>See <a
href="https://github.com/typescript-eslint/typescript-eslint/releases/tag/v8.64.0">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/utils/CHANGELOG.md">@​typescript-eslint/utils's
changelog</a>.</em></p>
<blockquote>
<h2>8.64.0 (2026-07-13)</h2>
<p>This was a version bump only for utils 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.64.0">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="414d9abbf6"><code>414d9ab</code></a>
chore(release): publish 8.64.0</li>
<li><a
href="321856cdad"><code>321856c</code></a>
chore: cleanup cspell config (<a
href="https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/utils/issues/12526">#12526</a>)</li>
<li>See full diff in <a
href="https://github.com/typescript-eslint/typescript-eslint/commits/v8.64.0/packages/utils">compare
view</a></li>
</ul>
</details>
<br />

Updates `@typescript-eslint/visitor-keys` from 8.63.0 to 8.64.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/typescript-eslint/typescript-eslint/releases">@​typescript-eslint/visitor-keys's
releases</a>.</em></p>
<blockquote>
<h2>v8.64.0</h2>
<h2>8.64.0 (2026-07-13)</h2>
<h3>🚀 Features</h3>
<ul>
<li>support parsing <code>import defer</code> (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12513">#12513</a>)</li>
<li><strong>eslint-plugin:</strong> [no-loop-func] support
<code>using</code> / <code>await using</code> declarations and deprecate
the rule (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12500">#12500</a>)</li>
<li><strong>typescript-estree:</strong> throw for invalid definite
assignment in class properties (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12543">#12543</a>)</li>
</ul>
<h3>🩹 Fixes</h3>
<ul>
<li><strong>eslint-plugin:</strong> [require-array-sort-compare] handle
constrained arrays (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12512">#12512</a>)</li>
</ul>
<h3>❤️ Thank You</h3>
<ul>
<li>Evyatar Daud <a
href="https://github.com/StyleShit"><code>@​StyleShit</code></a></li>
<li>송재욱</li>
</ul>
<p>See <a
href="https://github.com/typescript-eslint/typescript-eslint/releases/tag/v8.64.0">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/visitor-keys/CHANGELOG.md">@​typescript-eslint/visitor-keys's
changelog</a>.</em></p>
<blockquote>
<h2>8.64.0 (2026-07-13)</h2>
<p>This was a version bump only for visitor-keys 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.64.0">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="414d9abbf6"><code>414d9ab</code></a>
chore(release): publish 8.64.0</li>
<li>See full diff in <a
href="https://github.com/typescript-eslint/typescript-eslint/commits/v8.64.0/packages/visitor-keys">compare
view</a></li>
</ul>
</details>
<br />

Updates `express-rate-limit` from 8.5.2 to 8.6.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/express-rate-limit/express-rate-limit/releases">express-rate-limit's
releases</a>.</em></p>
<blockquote>
<h2>v8.6.0</h2>
<p>You can view the changelog <a
href="https://express-rate-limit.mintlify.app/reference/changelog">here</a>.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="fffb3c4d6e"><code>fffb3c4</code></a>
8.6.0</li>
<li><a
href="f366b2d360"><code>f366b2d</code></a>
docs: debugging guide, time constants, &amp; v8.6.0 changelog (<a
href="https://redirect.github.com/express-rate-limit/express-rate-limit/issues/652">#652</a>)</li>
<li><a
href="593ddd2f4f"><code>593ddd2</code></a>
fix: make debug output easier to read (<a
href="https://redirect.github.com/express-rate-limit/express-rate-limit/issues/653">#653</a>)</li>
<li><a
href="ef8c1295ff"><code>ef8c129</code></a>
fix: Pin safe version of <code>@​asyncapi/specs</code> dev dep (<a
href="https://redirect.github.com/express-rate-limit/express-rate-limit/issues/659">#659</a>)</li>
<li><a
href="7b05e0dbd8"><code>7b05e0d</code></a>
feat: add time constants to support more readable values for windowMs
(<a
href="https://redirect.github.com/express-rate-limit/express-rate-limit/issues/655">#655</a>)</li>
<li><a
href="863e730c2f"><code>863e730</code></a>
chore(deps-dev): bump the development-dependencies group with 3 updates
(<a
href="https://redirect.github.com/express-rate-limit/express-rate-limit/issues/657">#657</a>)</li>
<li><a
href="e0e711e4c0"><code>e0e711e</code></a>
fix: correct wording in usage documentation for express-rate-limit (<a
href="https://redirect.github.com/express-rate-limit/express-rate-limit/issues/656">#656</a>)</li>
<li><a
href="fcd3aa7d5e"><code>fcd3aa7</code></a>
chore(deps-dev): bump the development-dependencies group with 3 updates
(<a
href="https://redirect.github.com/express-rate-limit/express-rate-limit/issues/651">#651</a>)</li>
<li><a
href="99d4298bda"><code>99d4298</code></a>
feat: use <code>debug</code> for debug logging (<a
href="https://redirect.github.com/express-rate-limit/express-rate-limit/issues/641">#641</a>)</li>
<li><a
href="23e4ddef55"><code>23e4dde</code></a>
feat: Run validations once each (<a
href="https://redirect.github.com/express-rate-limit/express-rate-limit/issues/650">#650</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/express-rate-limit/express-rate-limit/compare/v8.5.2...v8.6.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `obug` from 2.1.3 to 2.1.4
<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.4</h2>
<h3>   🐞 Bug Fixes</h3>
<ul>
<li>Fallbacks for when env variables are disallowed  -  by <a
href="https://github.com/vrugtehagel"><code>@​vrugtehagel</code></a> and
<a href="https://github.com/sxzz"><code>@​sxzz</code></a> in <a
href="https://redirect.github.com/sxzz/obug/issues/5">sxzz/obug#5</a> <a
href="https://github.com/sxzz/obug/commit/faf1f47"><!-- raw HTML omitted
-->(faf1f)<!-- raw HTML omitted --></a></li>
</ul>
<h5>    <a
href="https://github.com/sxzz/obug/compare/v2.1.3...v2.1.4">View changes
on GitHub</a></h5>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="e50bedcb5f"><code>e50bedc</code></a>
chore: release v2.1.4</li>
<li><a
href="12086c0ec0"><code>12086c0</code></a>
chore: upgrade deps</li>
<li><a
href="faf1f47e4f"><code>faf1f47</code></a>
fix: fallbacks for when env variables are disallowed (<a
href="https://redirect.github.com/sxzz/obug/issues/5">#5</a>)</li>
<li>See full diff in <a
href="https://github.com/sxzz/obug/compare/v2.1.3...v2.1.4">compare
view</a></li>
</ul>
</details>
<br />

Updates `vite` from 8.1.4 to 8.1.5
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vitejs/vite/releases">vite's
releases</a>.</em></p>
<blockquote>
<h2>v8.1.5</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v8.1.5/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md">vite's
changelog</a>.</em></p>
<blockquote>
<h2><!-- raw HTML omitted --><a
href="https://github.com/vitejs/vite/compare/v8.1.4...v8.1.5">8.1.5</a>
(2026-07-16)<!-- raw HTML omitted --></h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>bundled-dev:</strong> avoid duplicated <code>buildEnd</code>
(<a
href="https://redirect.github.com/vitejs/vite/issues/22931">#22931</a>)
(<a
href="8100320970">8100320</a>)</li>
<li><strong>client:</strong> overlay error message format align rolldown
(<a
href="https://redirect.github.com/vitejs/vite/issues/22869">#22869</a>)
(<a
href="5a72b87807">5a72b87</a>)</li>
<li><strong>deps:</strong> update all non-major dependencies (<a
href="https://redirect.github.com/vitejs/vite/issues/22921">#22921</a>)
(<a
href="fef682d3f0">fef682d</a>)</li>
<li><strong>deps:</strong> update rolldown-related dependencies (<a
href="https://redirect.github.com/vitejs/vite/issues/22922">#22922</a>)
(<a
href="3c345e475a">3c345e4</a>)</li>
<li><strong>module-runner:</strong> don't crash stack-trace source
mapping when globalThis.Buffer is absent (<a
href="https://redirect.github.com/vitejs/vite/issues/22945">#22945</a>)
(<a
href="f8b38e316b">f8b38e3</a>)</li>
<li><strong>optimizer:</strong> respect importer module format for
dynamic import interop with CJS deps (<a
href="https://redirect.github.com/vitejs/vite/issues/22951">#22951</a>)
(<a
href="6c08c39ac4">6c08c39</a>)</li>
<li><strong>ssr:</strong> scope switch-case declarations to the switch,
not the function (<a
href="https://redirect.github.com/vitejs/vite/issues/22893">#22893</a>)
(<a
href="b59a73f76f">b59a73f</a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li><strong>build:</strong> fix incorrect <code>@default</code> for
build.cssMinify (<a
href="https://redirect.github.com/vitejs/vite/issues/22948">#22948</a>)
(<a
href="c88c236186">c88c236</a>)</li>
<li><strong>build:</strong> fix incorrect <code>@default</code> for
build.lib.formats (<a
href="https://redirect.github.com/vitejs/vite/issues/22911">#22911</a>)
(<a
href="369ed609a4">369ed60</a>)</li>
</ul>
<h3>Tests</h3>
<ul>
<li>avoid scanner scanning all files under <code>__tests__</code> (<a
href="https://redirect.github.com/vitejs/vite/issues/22912">#22912</a>)
(<a
href="c961cae286">c961cae</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="5e7fe129a4"><code>5e7fe12</code></a>
release: v8.1.5</li>
<li><a
href="6c08c39ac4"><code>6c08c39</code></a>
fix(optimizer): respect importer module format for dynamic import
interop wit...</li>
<li><a
href="5a72b87807"><code>5a72b87</code></a>
fix(client): overlay error message format align rolldown (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/22869">#22869</a>)</li>
<li><a
href="f8b38e316b"><code>f8b38e3</code></a>
fix(module-runner): don't crash stack-trace source mapping when
globalThis.Bu...</li>
<li><a
href="8100320970"><code>8100320</code></a>
fix(bundled-dev): avoid duplicated <code>buildEnd</code> (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/22931">#22931</a>)</li>
<li><a
href="c88c236186"><code>c88c236</code></a>
docs(build): fix incorrect <code>@default</code> for build.cssMinify (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/22948">#22948</a>)</li>
<li><a
href="b59a73f76f"><code>b59a73f</code></a>
fix(ssr): scope switch-case declarations to the switch, not the function
(<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/22">#22</a>...</li>
<li><a
href="fef682d3f0"><code>fef682d</code></a>
fix(deps): update all non-major dependencies (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/22921">#22921</a>)</li>
<li><a
href="3c345e475a"><code>3c345e4</code></a>
fix(deps): update rolldown-related dependencies (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/22922">#22922</a>)</li>
<li><a
href="369ed609a4"><code>369ed60</code></a>
docs(build): fix incorrect <code>@default</code> for build.lib.formats
(<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/22911">#22911</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/vitejs/vite/commits/v8.1.5/packages/vite">compare
view</a></li>
</ul>
</details>
<br />


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

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

---

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

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


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2026-07-20 11:02:00 +00:00
Ilia Shulgin
cc5d5e8b80 build: Trigger registry update after publishing new version (#888) 2026-07-17 10:18:20 +02:00
Mark Tkachenko
82cd692e50 feat: implement configurable LLM providers (#853)
According to [custom endpoints
rfd](https://github.com/agentclientprotocol/agent-client-protocol/blob/main/docs/rfds/custom-llm-endpoint.mdx)
Implement the Configurable LLM Providers RFD so clients can discover and
route the agent's LLM traffic through their own proxy or gateway without
relying solely on the ad-hoc gateway auth _meta mechanism.
2026-07-16 17:37:08 +02:00
acp-release-bot[bot]
30b7c06f76 chore(main): release 0.59.0 (#860)
🤖 I have created a release *beep* *boop*
---


##
[0.59.0](https://github.com/agentclientprotocol/claude-agent-acp/compare/v0.58.1...v0.59.0)
(2026-07-13)


### Features

* **deps-dev:** bump nanoid from 3.3.15 to 3.3.16
([#875](https://github.com/agentclientprotocol/claude-agent-acp/issues/875))
([e67dacd](e67dacdcac))
* **deps:** bump @anthropic-ai/claude-agent-sdk to 0.3.207
([#874](https://github.com/agentclientprotocol/claude-agent-acp/issues/874))
([c7f5b8f](c7f5b8fe76))


### Bug Fixes

* Add subagent parent tool use attribution
([#859](https://github.com/agentclientprotocol/claude-agent-acp/issues/859))
([9cd48c5](9cd48c597a))
* forward result text when the turn emitted no assistant message
([#858](https://github.com/agentclientprotocol/claude-agent-acp/issues/858))
([61ae860](61ae8609d4))
* hold a turn open while its background subagents are still live
([#870](https://github.com/agentclientprotocol/claude-agent-acp/issues/870))
([7a70f82](7a70f82739))
* Refine tool calls from streamed input
([#867](https://github.com/agentclientprotocol/claude-agent-acp/issues/867))
([2c19974](2c19974d5b))
* Seed context window from SDK usage report
([#868](https://github.com/agentclientprotocol/claude-agent-acp/issues/868))
([3ba2d36](3ba2d367a2)),
closes
[#596](https://github.com/agentclientprotocol/claude-agent-acp/issues/596)
* Skip synthetic login messages on replay
([#869](https://github.com/agentclientprotocol/claude-agent-acp/issues/869))
([c7dff3c](c7dff3cf7e)),
closes
[#863](https://github.com/agentclientprotocol/claude-agent-acp/issues/863)

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

Co-authored-by: acp-release-bot[bot] <246668977+acp-release-bot[bot]@users.noreply.github.com>
2026-07-13 18:46:18 +02:00
dependabot[bot]
c7f5b8fe76 feat(deps): bump @anthropic-ai/claude-agent-sdk to 0.3.207 (#874)
Bumps the minor group with 14 updates:

| Package | From | To |
| --- | --- | --- |
|
[@anthropic-ai/claude-agent-sdk](https://github.com/anthropics/claude-agent-sdk-typescript)
| `0.3.206` | `0.3.207` |
|
[@anthropic-ai/sdk](https://github.com/anthropics/anthropic-sdk-typescript)
| `0.110.0` | `0.111.0` |
| [eslint](https://github.com/eslint/eslint) | `10.6.0` | `10.7.0` |
| @anthropic-ai/claude-agent-sdk-darwin-arm64 | `0.3.206` | `0.3.207` |
| @anthropic-ai/claude-agent-sdk-darwin-x64 | `0.3.206` | `0.3.207` |
| @anthropic-ai/claude-agent-sdk-linux-arm64 | `0.3.206` | `0.3.207` |
| @anthropic-ai/claude-agent-sdk-linux-arm64-musl | `0.3.206` |
`0.3.207` |
| @anthropic-ai/claude-agent-sdk-linux-x64 | `0.3.206` | `0.3.207` |
| @anthropic-ai/claude-agent-sdk-linux-x64-musl | `0.3.206` | `0.3.207`
|
| @anthropic-ai/claude-agent-sdk-win32-arm64 | `0.3.206` | `0.3.207` |
| @anthropic-ai/claude-agent-sdk-win32-x64 | `0.3.206` | `0.3.207` |
| [es-module-lexer](https://github.com/guybedford/es-module-lexer) |
`2.3.0` | `2.3.1` |
| [hono](https://github.com/honojs/hono) | `4.12.29` | `4.12.30` |
| [postcss](https://github.com/postcss/postcss) | `8.5.16` | `8.5.19` |

Updates `@anthropic-ai/claude-agent-sdk` from 0.3.206 to 0.3.207
<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.207</h2>
<h2>What's changed</h2>
<ul>
<li>Fixed <code>canUseTool</code> returning <code>{behavior:
'allow'}</code> without <code>updatedInput</code> being rejected as a
deny with a raw ZodError message; the tool now runs with the original
input per the documented contract</li>
<li>The Agent tool's structured result now has a published SDK type
(<code>AgentToolCompletedOutput</code>) that matches the emitted object
exactly</li>
</ul>
<h2>Update</h2>
<pre lang="sh"><code>npm install @anthropic-ai/claude-agent-sdk@0.3.207
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.207
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.207
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.207
</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.207</h2>
<ul>
<li>Fixed <code>canUseTool</code> returning <code>{behavior:
'allow'}</code> without <code>updatedInput</code> being rejected as a
deny with a raw ZodError message; the tool now runs with the original
input per the documented contract</li>
<li>The Agent tool's structured result now has a published SDK type
(<code>AgentToolCompletedOutput</code>) that matches the emitted object
exactly</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="79b6350e13"><code>79b6350</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.206...v0.3.207">compare
view</a></li>
</ul>
</details>
<br />

Updates `@anthropic-ai/sdk` from 0.110.0 to 0.111.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.111.0</h2>
<h2>0.111.0 (2026-07-10)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.110.0...sdk-v0.111.0">sdk-v0.110.0...sdk-v0.111.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> add support for dreaming (<a
href="77b28a6472">77b28a6</a>)</li>
<li><strong>tools:</strong> gate session tool calls on
evaluated_permission; bound idle by server stop_reason (<a
href="68a6d7b92a">68a6d7b</a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li><strong>docs:</strong> small updates to field descriptions (<a
href="e25b885eac">e25b885</a>)</li>
<li><strong>docs:</strong> update model example (<a
href="a33f3f0b7c">a33f3f0</a>)</li>
<li><strong>docs:</strong> updates to descriptions and examples (<a
href="eac4bace32">eac4bac</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.111.0 (2026-07-10)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.110.0...sdk-v0.111.0">sdk-v0.110.0...sdk-v0.111.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> add support for dreaming (<a
href="77b28a6472">77b28a6</a>)</li>
<li><strong>tools:</strong> gate session tool calls on
evaluated_permission; bound idle by server stop_reason (<a
href="68a6d7b92a">68a6d7b</a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li><strong>docs:</strong> small updates to field descriptions (<a
href="e25b885eac">e25b885</a>)</li>
<li><strong>docs:</strong> update model example (<a
href="a33f3f0b7c">a33f3f0</a>)</li>
<li><strong>docs:</strong> updates to descriptions and examples (<a
href="eac4bace32">eac4bac</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="9e46760688"><code>9e46760</code></a>
chore: release main</li>
<li><a
href="8d461ea962"><code>8d461ea</code></a>
feat(api): add support for dreaming</li>
<li><a
href="9436e29159"><code>9436e29</code></a>
codegen metadata</li>
<li><a
href="0aec1e748b"><code>0aec1e7</code></a>
feat(tools): gate session tool calls on evaluated_permission; bound idle
by s...</li>
<li><a
href="ac2fc6779d"><code>ac2fc67</code></a>
chore(docs): update model example</li>
<li><a
href="c8af65d6af"><code>c8af65d</code></a>
chore(docs): updates to descriptions and examples</li>
<li><a
href="2a3a9042ab"><code>2a3a904</code></a>
codegen metadata</li>
<li><a
href="57c56c9172"><code>57c56c9</code></a>
chore(docs): small updates to field descriptions</li>
<li>See full diff in <a
href="https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.110.0...sdk-v0.111.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `eslint` from 10.6.0 to 10.7.0
<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.7.0</h2>
<h2>Features</h2>
<ul>
<li><a
href="cf2a9bf2d9"><code>cf2a9bf</code></a>
feat: add errorClassNames option to preserve-caught-error rule (<a
href="https://redirect.github.com/eslint/eslint/issues/21032">#21032</a>)
(sethamus)</li>
<li><a
href="f8b873aae5"><code>f8b873a</code></a>
feat: max-nested-callbacks option for constructor callbacks (<a
href="https://redirect.github.com/eslint/eslint/issues/21063">#21063</a>)
(fnx)</li>
<li><a
href="557fde8bc6"><code>557fde8</code></a>
feat: support computed <code>Number.parseInt</code> member access in
<code>radix</code> rule (<a
href="https://redirect.github.com/eslint/eslint/issues/21041">#21041</a>)
(Pixel)</li>
<li><a
href="0b4a73b658"><code>0b4a73b</code></a>
feat: add suggestions to no-compare-neg-zero (<a
href="https://redirect.github.com/eslint/eslint/issues/21034">#21034</a>)
(den$)</li>
<li><a
href="96cdd427db"><code>96cdd42</code></a>
feat: report invalid signed numeric radix values in <code>radix</code>
rule (<a
href="https://redirect.github.com/eslint/eslint/issues/21030">#21030</a>)
(Pixel)</li>
</ul>
<h2>Bug Fixes</h2>
<ul>
<li><a
href="3e7bf15e69"><code>3e7bf15</code></a>
fix: apply <code>ignoreClassesWithImplements</code> to class expressions
(<a
href="https://redirect.github.com/eslint/eslint/issues/21069">#21069</a>)
(Pixel)</li>
<li><a
href="0d7d70cf01"><code>0d7d70c</code></a>
fix: insert cause outside wrapping parens in preserve-caught-error (<a
href="https://redirect.github.com/eslint/eslint/issues/21062">#21062</a>)
(Mahin Anowar)</li>
<li><a
href="75ec753226"><code>75ec753</code></a>
fix: handle static template literals in <code>eqeqeq</code> rule (<a
href="https://redirect.github.com/eslint/eslint/issues/21058">#21058</a>)
(Pixel)</li>
<li><a
href="b717a22e24"><code>b717a22</code></a>
fix: prevent <code>eqeqeq</code> null option from reporting non-equality
operators (<a
href="https://redirect.github.com/eslint/eslint/issues/21057">#21057</a>)
(Pixel)</li>
<li><a
href="e35b05f196"><code>e35b05f</code></a>
fix: avoid <code>no-invalid-regexp</code> false positive for shadowed
RegExp (<a
href="https://redirect.github.com/eslint/eslint/issues/21051">#21051</a>)
(Pixel)</li>
<li><a
href="a3172b69c7"><code>a3172b6</code></a>
fix: avoid <code>no-control-regex</code> false positive for shadowed
RegExp (<a
href="https://redirect.github.com/eslint/eslint/issues/21050">#21050</a>)
(Pixel)</li>
<li><a
href="d1f637eca2"><code>d1f637e</code></a>
fix: parenthesize sequence expression operands in no-implicit-coercion
(<a
href="https://redirect.github.com/eslint/eslint/issues/21045">#21045</a>)
(spokodev)</li>
<li><a
href="8859bafb01"><code>8859baf</code></a>
fix: avoid prefer-numeric-literals false positive for shadowed globals
(<a
href="https://redirect.github.com/eslint/eslint/issues/21047">#21047</a>)
(한국)</li>
<li><a
href="a9e5961050"><code>a9e5961</code></a>
fix: use-isnan false positive on shadowed NaN/Number (<a
href="https://redirect.github.com/eslint/eslint/issues/20958">#20958</a>)
(sethamus)</li>
<li><a
href="8a240a7610"><code>8a240a7</code></a>
fix: avoid false positives in <code>radix</code> rule for spread
arguments (<a
href="https://redirect.github.com/eslint/eslint/issues/21044">#21044</a>)
(Pixel)</li>
</ul>
<h2>Documentation</h2>
<ul>
<li><a
href="c30d80801c"><code>c30d808</code></a>
docs: Update README (GitHub Actions Bot)</li>
<li><a
href="5139800b23"><code>5139800</code></a>
docs: document ESLint migration codemods in v9 and v10 guides (<a
href="https://redirect.github.com/eslint/eslint/issues/20980">#20980</a>)
(Alex Bit)</li>
<li><a
href="04174cbfaa"><code>04174cb</code></a>
docs: Update README (GitHub Actions Bot)</li>
<li><a
href="026e130408"><code>026e130</code></a>
docs: update semver policy for bug fixes (<a
href="https://redirect.github.com/eslint/eslint/issues/21048">#21048</a>)
(Milos Djermanovic)</li>
<li><a
href="9d42fefb0e"><code>9d42fef</code></a>
docs: Update README (GitHub Actions Bot)</li>
<li><a
href="b23015955c"><code>b230159</code></a>
docs: Update README (GitHub Actions Bot)</li>
<li><a
href="0129972ba1"><code>0129972</code></a>
docs: correct <code>**/.js</code> glob to <code>**/*.js</code> in config
files guide (<a
href="https://redirect.github.com/eslint/eslint/issues/21036">#21036</a>)
(EduardF1)</li>
</ul>
<h2>Chores</h2>
<ul>
<li><a
href="948937986f"><code>9489379</code></a>
chore: update dependency <code>@​eslint/eslintrc</code> to ^3.3.6 (<a
href="https://redirect.github.com/eslint/eslint/issues/21076">#21076</a>)
(renovate[bot])</li>
<li><a
href="81a4774a92"><code>81a4774</code></a>
chore: updates for v9.39.5 release (Jenkins)</li>
<li><a
href="9835414913"><code>9835414</code></a>
chore: enable <code>$ExpectType</code> annotations in all TypeScript
files (<a
href="https://redirect.github.com/eslint/eslint/issues/21071">#21071</a>)
(Francesco Trotta)</li>
<li><a
href="72adf6bd21"><code>72adf6b</code></a>
chore: restrict <code>markdownlint-cli2</code> updates in renovate (<a
href="https://redirect.github.com/eslint/eslint/issues/21067">#21067</a>)
(lumir)</li>
<li><a
href="833ec10fd7"><code>833ec10</code></a>
chore: update dependency prettier to v3.9.4 (<a
href="https://redirect.github.com/eslint/eslint/issues/21061">#21061</a>)
(renovate[bot])</li>
<li><a
href="7ea106ddcb"><code>7ea106d</code></a>
chore: update ecosystem plugins (<a
href="https://redirect.github.com/eslint/eslint/issues/21059">#21059</a>)
(ESLint Bot)</li>
<li><a
href="8fb550e7c2"><code>8fb550e</code></a>
chore: add prettier update commit to <code>.git-blame-ignore-revs</code>
(<a
href="https://redirect.github.com/eslint/eslint/issues/21056">#21056</a>)
(lumir)</li>
<li><a
href="e4e11668ea"><code>e4e1166</code></a>
chore: update dependency prettier to v3.9.1 (<a
href="https://redirect.github.com/eslint/eslint/issues/21055">#21055</a>)
(renovate[bot])</li>
<li><a
href="0493f53f3f"><code>0493f53</code></a>
chore: update prettier to v3.9.0 (<a
href="https://redirect.github.com/eslint/eslint/issues/21054">#21054</a>)
(Pixel)</li>
<li><a
href="1056a996c6"><code>1056a99</code></a>
chore: update dependency prettier to v3.8.5 (<a
href="https://redirect.github.com/eslint/eslint/issues/21049">#21049</a>)
(renovate[bot])</li>
<li><a
href="4d4155df4a"><code>4d4155d</code></a>
ci: run ecosystem tests on pull requests (<a
href="https://redirect.github.com/eslint/eslint/issues/21027">#21027</a>)
(sethamus)</li>
<li><a
href="993539fd45"><code>993539f</code></a>
chore: update dependency <code>@​eslint/json</code> to ^2.0.1 (<a
href="https://redirect.github.com/eslint/eslint/issues/21042">#21042</a>)
(renovate[bot])</li>
<li><a
href="53f8b69c15"><code>53f8b69</code></a>
test: add error locations to <code>no-constant-binary-expression</code>
(<a
href="https://redirect.github.com/eslint/eslint/issues/21039">#21039</a>)
(lumir)</li>
<li><a
href="5ab71d52f9"><code>5ab71d5</code></a>
refactor: clean up radix rule internals (<a
href="https://redirect.github.com/eslint/eslint/issues/21015">#21015</a>)
(Pixel)</li>
<li><a
href="a80a9a4614"><code>a80a9a4</code></a>
chore: update ecosystem plugins (<a
href="https://redirect.github.com/eslint/eslint/issues/21035">#21035</a>)
(ESLint Bot)</li>
<li><a
href="7c9a02933c"><code>7c9a029</code></a>
ci: add Node.js 26 to CI (<a
href="https://redirect.github.com/eslint/eslint/issues/20847">#20847</a>)
(lumir)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="fabd99bb74"><code>fabd99b</code></a>
10.7.0</li>
<li><a
href="37c5e75949"><code>37c5e75</code></a>
Build: changelog update for 10.7.0</li>
<li><a
href="948937986f"><code>9489379</code></a>
chore: update dependency <code>@​eslint/eslintrc</code> to ^3.3.6 (<a
href="https://redirect.github.com/eslint/eslint/issues/21076">#21076</a>)</li>
<li><a
href="81a4774a92"><code>81a4774</code></a>
chore: updates for v9.39.5 release</li>
<li><a
href="3e7bf15e69"><code>3e7bf15</code></a>
fix: apply <code>ignoreClassesWithImplements</code> to class expressions
(<a
href="https://redirect.github.com/eslint/eslint/issues/21069">#21069</a>)</li>
<li><a
href="9835414913"><code>9835414</code></a>
chore: enable <code>$ExpectType</code> annotations in all TypeScript
files (<a
href="https://redirect.github.com/eslint/eslint/issues/21071">#21071</a>)</li>
<li><a
href="cf2a9bf2d9"><code>cf2a9bf</code></a>
feat: add errorClassNames option to preserve-caught-error rule (<a
href="https://redirect.github.com/eslint/eslint/issues/21032">#21032</a>)</li>
<li><a
href="c30d80801c"><code>c30d808</code></a>
docs: Update README</li>
<li><a
href="f8b873aae5"><code>f8b873a</code></a>
feat: max-nested-callbacks option for constructor callbacks (<a
href="https://redirect.github.com/eslint/eslint/issues/21063">#21063</a>)</li>
<li><a
href="72adf6bd21"><code>72adf6b</code></a>
chore: restrict <code>markdownlint-cli2</code> updates in renovate (<a
href="https://redirect.github.com/eslint/eslint/issues/21067">#21067</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/eslint/eslint/compare/v10.6.0...v10.7.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `@anthropic-ai/claude-agent-sdk-darwin-arm64` from 0.3.206 to
0.3.207

Updates `@anthropic-ai/claude-agent-sdk-darwin-x64` from 0.3.206 to
0.3.207

Updates `@anthropic-ai/claude-agent-sdk-linux-arm64` from 0.3.206 to
0.3.207

Updates `@anthropic-ai/claude-agent-sdk-linux-arm64-musl` from 0.3.206
to 0.3.207

Updates `@anthropic-ai/claude-agent-sdk-linux-x64` from 0.3.206 to
0.3.207

Updates `@anthropic-ai/claude-agent-sdk-linux-x64-musl` from 0.3.206 to
0.3.207

Updates `@anthropic-ai/claude-agent-sdk-win32-arm64` from 0.3.206 to
0.3.207

Updates `@anthropic-ai/claude-agent-sdk-win32-x64` from 0.3.206 to
0.3.207

Updates `es-module-lexer` from 2.3.0 to 2.3.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/guybedford/es-module-lexer/releases">es-module-lexer's
releases</a>.</em></p>
<blockquote>
<h2>2.3.1</h2>
<h2>What's Changed</h2>
<ul>
<li>perf: fast native UTF-16 source copy into Wasm memory on Node by <a
href="https://github.com/guybedford"><code>@​guybedford</code></a> in <a
href="https://redirect.github.com/guybedford/es-module-lexer/pull/224">guybedford/es-module-lexer#224</a></li>
<li>perf(lexer): gate keywordStart on the next byte for i/c tokens by <a
href="https://github.com/BridgeAR"><code>@​BridgeAR</code></a> in <a
href="https://redirect.github.com/guybedford/es-module-lexer/pull/223">guybedford/es-module-lexer#223</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/guybedford/es-module-lexer/compare/2.3.0...2.3.1">https://github.com/guybedford/es-module-lexer/compare/2.3.0...2.3.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="2b2e6209ba"><code>2b2e620</code></a>
2.3.1</li>
<li><a
href="8c21b74b1f"><code>8c21b74</code></a>
perf(lexer): gate keywordStart on the next byte for i/c tokens (<a
href="https://redirect.github.com/guybedford/es-module-lexer/issues/223">#223</a>)</li>
<li><a
href="b8f9d89f9d"><code>b8f9d89</code></a>
perf: fast native UTF-16 source copy into Wasm memory on Node (<a
href="https://redirect.github.com/guybedford/es-module-lexer/issues/224">#224</a>)</li>
<li>See full diff in <a
href="https://github.com/guybedford/es-module-lexer/compare/2.3.0...2.3.1">compare
view</a></li>
</ul>
</details>
<br />

Updates `hono` from 4.12.29 to 4.12.30
<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.30</h2>
<h2>What's Changed</h2>
<ul>
<li>chore(benchmark/routers): bump deps in <a
href="https://redirect.github.com/honojs/hono/pull/5107">honojs/hono#5107</a></li>
<li>chore(benchmark): remove not used benchmarks in <a
href="https://redirect.github.com/honojs/hono/pull/5108">honojs/hono#5108</a></li>
<li>chore: update to ts6 in prep for ts7 in <a
href="https://redirect.github.com/honojs/hono/pull/5104">honojs/hono#5104</a></li>
<li>fix(cache): deduplicate Cache-Control directives case-insensitively
in <a
href="https://redirect.github.com/honojs/hono/pull/5025">honojs/hono#5025</a></li>
<li>fix(compress): do not compress 206 Partial Content responses in <a
href="https://redirect.github.com/honojs/hono/pull/5020">honojs/hono#5020</a></li>
<li>fix(client): replaceUrlParam should not match a param that prefixes
another in <a
href="https://redirect.github.com/honojs/hono/pull/5096">honojs/hono#5096</a></li>
<li>fix(method-override): set duplex when forwarding a stream body in
query mode in <a
href="https://redirect.github.com/honojs/hono/pull/5110">honojs/hono#5110</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/honojs/hono/compare/v4.12.29...v4.12.30">https://github.com/honojs/hono/compare/v4.12.29...v4.12.30</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b2ae3a2204"><code>b2ae3a2</code></a>
4.12.30</li>
<li><a
href="e0cdeb0a89"><code>e0cdeb0</code></a>
fix(method-override): set duplex when forwarding a stream body in query
mode ...</li>
<li><a
href="653025e5c3"><code>653025e</code></a>
fix(client): replaceUrlParam should not match a param that prefixes
another (...</li>
<li><a
href="67efb27f7b"><code>67efb27</code></a>
fix(compress): do not compress 206 Partial Content responses (<a
href="https://redirect.github.com/honojs/hono/issues/5020">#5020</a>)</li>
<li><a
href="a48c8bf248"><code>a48c8bf</code></a>
fix(cache): deduplicate Cache-Control directives case-insensitively (<a
href="https://redirect.github.com/honojs/hono/issues/5025">#5025</a>)</li>
<li><a
href="3bb9a0e3a7"><code>3bb9a0e</code></a>
chore: update to ts6 in prep for ts7 (<a
href="https://redirect.github.com/honojs/hono/issues/5104">#5104</a>)</li>
<li><a
href="d3f97caa29"><code>d3f97ca</code></a>
chore(benchmark): remove not used benchmarks (<a
href="https://redirect.github.com/honojs/hono/issues/5108">#5108</a>)</li>
<li><a
href="29a3f73fd5"><code>29a3f73</code></a>
chore(benchmark/routers): bump deps (<a
href="https://redirect.github.com/honojs/hono/issues/5107">#5107</a>)</li>
<li>See full diff in <a
href="https://github.com/honojs/hono/compare/v4.12.29...v4.12.30">compare
view</a></li>
</ul>
</details>
<br />

Updates `postcss` from 8.5.16 to 8.5.19
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/postcss/postcss/releases">postcss's
releases</a>.</em></p>
<blockquote>
<h2>8.5.19</h2>
<ul>
<li>Fixed cleaning <code>before</code> for new nodes inserted to
<code>Root</code> (by <a
href="https://github.com/MahinAnowar"><code>@​MahinAnowar</code></a>).</li>
</ul>
<h2>8.5.18</h2>
<ul>
<li>Restricted loading previous source maps file to the
<code>opts.from</code> folder for security reasons (use <code>unsafeMap:
true</code> to disable the check).</li>
</ul>
<h2>8.5.17</h2>
<ul>
<li>Fixed <code>Maximum call stack size exceeded</code> error.</li>
<li>Fixed Prototype hijacking for <code>postcss.fromJSON()</code>.</li>
<li>Fixed <code>Input#origin()</code> for unmapped end position (by <a
href="https://github.com/chatman-media"><code>@​chatman-media</code></a>).</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/postcss/postcss/blob/main/CHANGELOG.md">postcss's
changelog</a>.</em></p>
<blockquote>
<h2>8.5.19</h2>
<ul>
<li>Fixed cleaning <code>before</code> for new nodes inserted to
<code>Root</code> (by <a
href="https://github.com/MahinAnowar"><code>@​MahinAnowar</code></a>).</li>
</ul>
<h2>8.5.18</h2>
<ul>
<li>Restricted loading previous source maps file to the
<code>opts.from</code> folder for security reasons (use <code>unsafeMap:
true</code> to disable the check).</li>
</ul>
<h2>8.5.17</h2>
<ul>
<li>Fixed <code>Maximum call stack size exceeded</code> error.</li>
<li>Fixed Prototype hijacking for <code>postcss.fromJSON()</code>.</li>
<li>Fixed <code>Input#origin()</code> for unmapped end position (by <a
href="https://github.com/chatman-media"><code>@​chatman-media</code></a>).</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="9543b22769"><code>9543b22</code></a>
Release 8.5.19 version</li>
<li><a
href="3d13bf9360"><code>3d13bf9</code></a>
Fix CI on Windows too</li>
<li><a
href="00d0dd2322"><code>00d0dd2</code></a>
Keep explicitly set raws.before when inserting nodes into root (<a
href="https://redirect.github.com/postcss/postcss/issues/2111">#2111</a>)</li>
<li><a
href="7a05b33e7a"><code>7a05b33</code></a>
Temporary fix CI</li>
<li><a
href="4c0d194c13"><code>4c0d194</code></a>
Release 8.5.18 version</li>
<li><a
href="92b4e7891e"><code>92b4e78</code></a>
Update dependencies</li>
<li><a
href="95663d3eb7"><code>95663d3</code></a>
Limit where source map can be loaded for security reasons</li>
<li><a
href="74e25ae9f4"><code>74e25ae</code></a>
Release 8.5.17 version</li>
<li><a
href="d1518afd5a"><code>d1518af</code></a>
Fix Maximum call stack size exceeded error</li>
<li><a
href="2421312ffe"><code>2421312</code></a>
Fix linter</li>
<li>Additional commits viewable in <a
href="https://github.com/postcss/postcss/compare/8.5.16...8.5.19">compare
view</a></li>
</ul>
</details>
<br />


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

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

---

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

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


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2026-07-13 16:44:29 +00:00
Ben Brandt
7a70f82739 fix: hold a turn open while its background subagents are still live (#870)
## Problem

`session/prompt` settled at the turn's terminal `result`, but a turn
that launched an **async subagent** is not done at that point.
Everything after settlement — the subagent's streamed tool calls, the
model's promised task-notification followup summary, and any
`session/request_permission` the subagent raises — landed **outside any
turn**. Some clients stops consuming updates at the prompt response, so
the output was silently lost and the permission request deadlocked on an
RPC nobody answers.

Reported as #864 (no signal for the post-turn activity), #865
(background tasks not trackable), and #866 (end-to-end field report
incl. the permission deadlock).

## What I verified before designing this

Driving the adapter over real ACP stdio against the bundled CLI
(2.1.206) with `emitRawSDKMessages` on showed that the SDK's trailing
`session_state_changed: idle` **does not wait for background agents** —
it follows the user result immediately, while the subagent is still
running, and the session then cycles:

```
user result → idle → (subagent works) → task_notification → followup turn → result(origin: task-notification) → idle
```

So the old #463-era "settle at idle" design would **not** fix this on
current CLIs (and plain re-adopting it would still trade away #773). The
hold has to be keyed on the live-subagent set and span those idle
cycles.

## Fix

A user turn whose terminal result arrives while subagents **it spawned**
are still live stores its outcome on `Turn.deferredSettle` instead of
settling. The prompt stays pending, so all of the subagent's output and
permission requests arrive inside a live turn. It settles with the
stored stop reason/usage:

- at the **task-notification followup's terminal result** — the promised
summary has fully streamed by then (the common case), or
- at an **idle with none of its subagents left**, when no followup
comes, or
- earlier, via `session/cancel` or the next prompt's echo hand-off — a
long-running subagent never holds the prompt hostage, and the hand-off
reports the recorded stop reason instead of rewriting it to `end_turn`.

Tracking: `Turn.spawnedTaskIds` ∩ `session.liveSubagentTasks`, fed by
`task_started` (only entries with `subagent_type`; background shells are
deliberately excluded — a dev server outlives every turn), pruned at
`task_notification`/terminal `task_updated`, and reconciled against
`background_tasks_changed`'s replace-semantics payload so a lost bookend
can't wedge the hold. A spawn during the held-open window (an agent
chain) extends the hold naturally.

Turns that spawned nothing (or whose subagents finished in-turn) still
settle at their result — the #773 responsiveness is untouched.

## Live verification (adapter on real stdio, CLI 2.1.206, temp cwd)

Prompt: *"launch a background agent to read the two files and create
summary.txt, then end your turn saying you'll report back"*:

```
[ 15.72] raw: result success            ← user result; subagent live → HELD
[ 15.72] raw: session_state_changed idle  ← immediate idle survives the hold
[ 17.50] update: tool_call Read hello.txt       ← subagent work, in-turn
[ 21.39] update: tool_call Write summary.txt    ← in-turn
[ 24.17] raw: task_notification completed
[ 34.35] update: agent_message_chunk "The background agent finished. It created summary.txt…"  ← promised summary, in-turn
[ 35.70] raw: result success (origin task-notification)
[ 35.70] PROMPT RESOLVED end_turn, usage = user turn's own tokens
```

No-regression check: a plain `"say hello"` prompt resolves the instant
its result lands (2.09s, zero added latency).

## Hardening from the adversarial review pass

A high-effort review (8 finder angles) of the change surfaced three
confirmed defects, each fixed with a regression test that fails pre-fix:

- **cancel() of a held turn stalled ~30s**: the session is already idle
during the hold, so the interrupt may never emit the trailing idle the
cancelled-settle path waited on. cancel() now settles a deferred turn
immediately (its result is already in hand); this also prevents the
force-cancel backstop from seeding a phantom orphan for a result that
already passed.
- **A followup's `is_error` / "Please run /login" could reject a held
user turn** whose own result was a success (reachable with parallel
subagents). Followup results now never touch the user-turn lifecycle.
- **The followup's own trailing idle was un-owed**: settling at the
followup result unblocks the client at exactly the moment that idle can
lag past the next prompt's echo — which would have been read as the
fresh turn ending without a result (#825 false-fail). All results now
record their trailer debt.

A second review round on the post-merge state (after resolving conflicts
with #858) found and fixed five more: an echo-less command (`/context`)
during a hold overwrote the held turn's outcome and hung
(ensureActiveTurn now hands the held turn off and promotes the head);
the refusal lane bypassed the deferral gate (result-time settles now
route through a shared `settleOrDefer`); cancel()'s inline settle
couldn't record the interrupt trailer's owed-idle debt (the counter
moved onto the Session) and skipped the backstop disarm; `failAllTurns`
rejected a held turn whose answer had already streamed (now resolves the
stored outcome, like stream-done); and a followup result inside a cancel
window skipped the trailer count. Settling at a followup result also now
closes the #453 delivery stretch so a following replayed turn's fallback
isn't suppressed.

Known residuals, deliberately accepted: a subagent whose settle bookends
are all lost parks the held turn until `session/cancel` or the next
prompt (same rescue contract as the adapter's other wedge classes); a
wake whose origin can't be attributed (the SDK's `origin` carries no
task id) can settle the turn one followup early, degrading to today's
behavior, never worse.

## Verification

Unit: 530 tests green; the deferral/cancel/false-fail tests were each
run against the pre-fix adapter and fail there. Live (real ACP stdio,
CLI 2.1.206): held turn with in-turn subagent output + followup summary,
resolution at the followup's result; plain prompts resolve instantly at
their result.

## Out of scope (follow-ups)

- A background **shell**'s exit waking the model between turns remains
an out-of-turn episode — there is no turn to hold for it without
blocking every prompt behind a dev server. Same for clients that want a
session-level active/idle or background-task level signal (#864/#865's
additive asks): both raw signals are already available today via
`_meta.claudeCode.emitRawSDKMessages` → `_claude/sdkMessage` ext
notifications.
- Flipping the spawning `Task` tool call's status at terminal
`task_updated` (#865's optional ask).

A third review round on the consolidated state fixed: the reconciliation
deleting live sync-subagent attribution entries (the level's universe is
background-only — absent subagent entries are now kept but marked
`endedPerLevel` so holds stop waiting on them);
peer/coordinator/observer-origin results being treated as the user's
turn (now gated via `AUTONOMOUS_RESULT_ORIGINS`, preserving
channel-origin behavior); `emittedAssistantText` moving onto the Session
so every held-turn settle lane closes the #453 delivery stretch (with
the snapshot taken after the held-turn hand-off); the interrupt-trailer
pre-count gated on a running cycle so idle-cancels can't mask future
#825 detections; and `turnAwaitingSubagents` now reading `isSubagent` as
defense in depth for the shells-never-defer contract. Plus
`isHeldOpen()`/`disarmForceCancel()` deduplicating the hold predicate
and backstop disarm.

(An earlier follow-up — folding the attribution map and the
live-subagent set into one task registry — is now done in this PR:
`liveBackgroundTasks` keyed by task id, so the
`background_tasks_changed` reconciliation heals both concerns and future
terminal paths can't prune one but not the other.)

Fixes #866. Addresses the settlement half of #864 / #865.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 17:16:11 +02:00
dependabot[bot]
e67dacdcac feat(deps-dev): bump nanoid from 3.3.15 to 3.3.16 (#875)
Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.15 to 3.3.16.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/ai/nanoid/releases">nanoid's
releases</a>.</em></p>
<blockquote>
<h2>3.3.16</h2>
<ul>
<li>Fixed infinite loop on negative size (by <a
href="https://github.com/greymoth-jp"><code>@​greymoth-jp</code></a>).</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/ai/nanoid/blob/main/CHANGELOG.md">nanoid's
changelog</a>.</em></p>
<blockquote>
<h2>3.3.16</h2>
<ul>
<li>Fixed infinite loop on negative size (by <a
href="https://github.com/greymoth-jp"><code>@​greymoth-jp</code></a>).</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="9760e11275"><code>9760e11</code></a>
Release 3.3.16 version</li>
<li><a
href="e835c9b71e"><code>e835c9b</code></a>
fix(non-secure): clamp negative size to prevent infinite loop (<a
href="https://redirect.github.com/ai/nanoid/issues/601">#601</a>)</li>
<li><a
href="96dd086eb2"><code>96dd086</code></a>
Update CI action</li>
<li><a
href="ba0bc3b6b9"><code>ba0bc3b</code></a>
Do not create latest release for v3</li>
<li>See full diff in <a
href="https://github.com/ai/nanoid/compare/3.3.15...3.3.16">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=nanoid&package-manager=npm_and_yarn&previous-version=3.3.15&new-version=3.3.16)](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-07-13 16:46:19 +02:00
Josh Kappler
61ae8609d4 fix: forward result text when the turn emitted no assistant message (#858)
Fixes #453.

On a cache-replayed turn the CLI can answer on the `result` alone:
output_tokens is 0, no `stream_event` deltas, and no consolidated
`assistant` message. The result handler never forwarded that text, so
the client rendered an empty turn.

The check suggested in the issue (output_tokens === 0 and a non-empty
result) isn't enough by itself. I tried it: it emits the answer twice
when the consolidated `assistant` message already delivered it,
including the case where the echo lands mid-message and the consolidated
message dedupes to nothing, and it forwards a background
task-notification followup's output into the user's turn.

So this tracks whether any top-level assistant text already reached the
client since the last user-turn result, and forwards `message.result`
only when none did and the turn isn't a task-notification followup. The
direct emitters in the `status` handler (compaction notices, local
command output) set the flag too, since they bypass the forwarding
loops. `compact_boundary` doesn't, because it only sends a usage update.

Tests: six added to the "assembled assistant text fallback" block.
Reverting the source change fails "forwards the result text when nothing
else carried it"; the other five pin the guards, and they catch the
naive version, which double-emits and leaks task-notification output.
Full suite: 501 passed, 2 failed, and both failures reproduce on a clean
main (Windows path separator assertions in the tool-conversion tests).
eslint, tsc --noEmit, and prettier --check are clean.

---------

Co-authored-by: Josh Kappler <boffytv@gmail.com>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 12:21:23 +00:00
nikita-ashihmin
2c19974d5b fix: Refine tool calls from streamed input (#867)
## Why

Tool-use `content_block_start` events arrive before their JSON input.
This leaves pending calls with generic labels such as `Read File` or
`Terminal`; long-running and concurrent calls can remain
indistinguishable in clients while they execute.

Anthropic specifies `input_json_delta.partial_json` as arbitrary string
fragments, so delta boundaries cannot be assumed to align with fields or
JSON values.

## What changed

- Buffer `input_json_delta` fragments per parent message and
content-block index.
- Recover completed top-level fields while the overall JSON is still
incomplete.
- Refine the existing ACP tool call immediately when distinguishing
fields such as `file_path`, `command`, `query`, `pattern`, `url`, or
`description` become available.
- Continue refining as later fields arrive, while keeping the early
pending lifecycle and cleaning incomplete buffers at block/message
boundaries.
- Avoid publishing ambiguous numeric suffixes (`10` may still become
`100` or `10.5`) until a delimiter arrives.

## Test coverage

Parameterized coverage now includes Agent/Task, Bash, Read/Write/Edit,
Glob/Grep, WebFetch/WebSearch, ReportFindings, ExitPlanMode,
AskUserQuestion, Other, custom MCP calls, TodoWrite plan updates, and
intentionally suppressed TaskCreate/Update/List/Get calls. Edge cases
cover arbitrary field splits, unfinished strings, escaped quotes and
commas, numbers, booleans, null, arrays, nested objects, and all three
tool block types (`tool_use`, `server_tool_use`, `mcp_tool_use`).

## Validation

- `npm run build`
- `npm run test:run` (535 passed, 20 skipped)
- `npm run check`

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 12:17:37 +00:00
Ben Brandt
c7dff3cf7e fix: Skip synthetic login messages on replay (#869)
Closes #863
2026-07-13 11:42:19 +00:00
Ben Brandt
3ba2d367a2 fix: Seed context window from SDK usage report (#868)
Closes #596
2026-07-13 11:35:03 +00:00
dependabot[bot]
f4e750decf feat(deps): bump the minor group with 11 updates (#862)
Bumps the minor group with 11 updates:

| Package | From | To |
| --- | --- | --- |
|
[@anthropic-ai/claude-agent-sdk](https://github.com/anthropics/claude-agent-sdk-typescript)
| `0.3.205` | `0.3.206` |
| [prettier](https://github.com/prettier/prettier) | `3.9.4` | `3.9.5` |
| @anthropic-ai/claude-agent-sdk-darwin-arm64 | `0.3.205` | `0.3.206` |
| @anthropic-ai/claude-agent-sdk-darwin-x64 | `0.3.205` | `0.3.206` |
| @anthropic-ai/claude-agent-sdk-linux-arm64 | `0.3.205` | `0.3.206` |
| @anthropic-ai/claude-agent-sdk-linux-arm64-musl | `0.3.205` |
`0.3.206` |
| @anthropic-ai/claude-agent-sdk-linux-x64 | `0.3.205` | `0.3.206` |
| @anthropic-ai/claude-agent-sdk-linux-x64-musl | `0.3.205` | `0.3.206`
|
| @anthropic-ai/claude-agent-sdk-win32-arm64 | `0.3.205` | `0.3.206` |
| @anthropic-ai/claude-agent-sdk-win32-x64 | `0.3.205` | `0.3.206` |
| [hono](https://github.com/honojs/hono) | `4.12.28` | `4.12.29` |

Updates `@anthropic-ai/claude-agent-sdk` from 0.3.205 to 0.3.206
<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.206</h2>
<h2>What's changed</h2>
<ul>
<li>Added <code>command_lifecycle</code> frames to stream-json and SDK
sessions, reporting each uuid-stamped message's terminal state
(<code>queued</code>/<code>started</code>/<code>completed</code>/<code>cancelled</code>/<code>discarded</code>);
zero-API results no longer report stale
<code>duration_api_ms</code></li>
</ul>
<h2>Update</h2>
<pre lang="sh"><code>npm install @anthropic-ai/claude-agent-sdk@0.3.206
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.206
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.206
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.206
</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.206</h2>
<ul>
<li>Added <code>command_lifecycle</code> frames to stream-json and SDK
sessions, reporting each uuid-stamped message's terminal state
(<code>queued</code>/<code>started</code>/<code>completed</code>/<code>cancelled</code>/<code>discarded</code>);
zero-API results no longer report stale
<code>duration_api_ms</code></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="9fc7ea5ff6"><code>9fc7ea5</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.205...v0.3.206">compare
view</a></li>
</ul>
</details>
<br />

Updates `prettier` from 3.9.4 to 3.9.5
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/prettier/prettier/releases">prettier's
releases</a>.</em></p>
<blockquote>
<h2>3.9.5</h2>
<p>🔗 <a
href="https://github.com/prettier/prettier/blob/3.9.5/CHANGELOG.md#395">Changelog</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/prettier/prettier/blob/main/CHANGELOG.md">prettier's
changelog</a>.</em></p>
<blockquote>
<h1>3.9.5</h1>
<p><a
href="https://github.com/prettier/prettier/compare/3.9.4...3.9.5">diff</a></p>
<h4>Markdown: Cap ordered list mark at 999,999,999 (<a
href="https://redirect.github.com/prettier/prettier/pull/19351">#19351</a>
by <a href="https://github.com/tats-u"><code>@​tats-u</code></a>)</h4>
<p>CommonMark parsers only support ordered list item numbers up to
999,999,999.</p>
<p>With this change, Prettier now caps the ordered list item number at
999,999,999 to ensure that the output is correctly parsed as an ordered
list by CommonMark parsers. Numbers larger than 999,999,999 are not
parsed as list item numbers and are left unchanged in the output:</p>
<!-- raw HTML omitted -->
<pre lang="markdown"><code>&lt;!-- Input --&gt;
999999998. text
999999998. text
999999998. text
999999998. text
<p>1234567890123456789012) text</p>
<p>&lt;!-- Prettier 3.9.4 --&gt;
999999998. text
999999999. text
1000000000. text
1000000001. text</p>
<p>1234567890123456789012) text</p>
<p>&lt;!-- Prettier 3.9.5 --&gt;
999999998. text
999999999. text
999999999. text
999999999. text</p>
<p>1234567890123456789012) text
</code></pre></p>
<h4>Markdown: Avoid corrupting empty link with title (<a
href="https://redirect.github.com/prettier/prettier/pull/19487">#19487</a>
by <a href="https://github.com/andersk"><code>@​andersk</code></a>)</h4>
<p>Do not remove <code>&lt;&gt;</code> from an inline link or image with
an empty URL and a title, as this removal would change its
interpretation.</p>
<!-- raw HTML omitted -->
<pre lang="md"><code>&lt;!-- Input --&gt;
[link](https://github.com/prettier/prettier/blob/main/&lt;&gt;
&quot;title&quot;)
<p>&lt;!-- Prettier 3.9.4 --&gt;
[link](<a
href="https://github.com/prettier/prettier/blob/main/">https://github.com/prettier/prettier/blob/main/</a>
&quot;title&quot;)</p>
<p>&lt;!-- Prettier 3.9.5 --&gt;
&lt;/tr&gt;&lt;/table&gt;
</code></pre></p>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b6c7d18068"><code>b6c7d18</code></a>
Release 3.9.5</li>
<li><a
href="cd54ccc728"><code>cd54ccc</code></a>
Avoid corrupting empty Markdown link with title (<a
href="https://redirect.github.com/prettier/prettier/issues/19487">#19487</a>)</li>
<li><a
href="2bb67ce8cd"><code>2bb67ce</code></a>
Preserving comments' <code>placement</code> property (<a
href="https://redirect.github.com/prettier/prettier/issues/19567">#19567</a>)</li>
<li><a
href="91bcac88ec"><code>91bcac8</code></a>
Add more tests for comment-only object type (<a
href="https://redirect.github.com/prettier/prettier/issues/19587">#19587</a>)</li>
<li><a
href="cbee7377a1"><code>cbee737</code></a>
Remove space in empty object type (<a
href="https://redirect.github.com/prettier/prettier/issues/19583">#19583</a>)</li>
<li><a
href="6394c73209"><code>6394c73</code></a>
Align empty module declaration with TS (<a
href="https://redirect.github.com/prettier/prettier/issues/19568">#19568</a>)</li>
<li><a
href="a4e6f7a026"><code>a4e6f7a</code></a>
Prevent the addition of space in <code>type()</code> with <code>+</code>
(<a
href="https://redirect.github.com/prettier/prettier/issues/19516">#19516</a>)</li>
<li><a
href="3d063b57b1"><code>3d063b5</code></a>
Ignore dangling comments when checking type parameter comments (<a
href="https://redirect.github.com/prettier/prettier/issues/19572">#19572</a>)</li>
<li><a
href="908503e9ee"><code>908503e</code></a>
Handle dangling comments in <code>SwitchStatement</code> (<a
href="https://redirect.github.com/prettier/prettier/issues/19581">#19581</a>)</li>
<li><a
href="943a475c35"><code>943a475</code></a>
Angular: Support expression for exhaustive typechecking (<a
href="https://redirect.github.com/prettier/prettier/issues/19571">#19571</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/prettier/prettier/compare/3.9.4...3.9.5">compare
view</a></li>
</ul>
</details>
<br />

Updates `@anthropic-ai/claude-agent-sdk-darwin-arm64` from 0.3.205 to
0.3.206

Updates `@anthropic-ai/claude-agent-sdk-darwin-x64` from 0.3.205 to
0.3.206

Updates `@anthropic-ai/claude-agent-sdk-linux-arm64` from 0.3.205 to
0.3.206

Updates `@anthropic-ai/claude-agent-sdk-linux-arm64-musl` from 0.3.205
to 0.3.206

Updates `@anthropic-ai/claude-agent-sdk-linux-x64` from 0.3.205 to
0.3.206

Updates `@anthropic-ai/claude-agent-sdk-linux-x64-musl` from 0.3.205 to
0.3.206

Updates `@anthropic-ai/claude-agent-sdk-win32-arm64` from 0.3.205 to
0.3.206

Updates `@anthropic-ai/claude-agent-sdk-win32-x64` from 0.3.205 to
0.3.206

Updates `hono` from 4.12.28 to 4.12.29
<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.29</h2>
<h2>What's Changed</h2>
<ul>
<li>fix(client): merge function headers with per-request headers by <a
href="https://github.com/yusukebe"><code>@​yusukebe</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/5092">honojs/hono#5092</a></li>
<li>chore: fix no-op tsc in test script by <a
href="https://github.com/yusukebe"><code>@​yusukebe</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/5093">honojs/hono#5093</a></li>
<li>fix(lambda-edge): resolve the handler with the value passed to the
callback by <a
href="https://github.com/yusukebe"><code>@​yusukebe</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/5094">honojs/hono#5094</a></li>
<li>docs(language): add JSDoc <a
href="https://github.com/example"><code>@​example</code></a> to
languageDetector by <a
href="https://github.com/codebybilal18"><code>@​codebybilal18</code></a>
in <a
href="https://redirect.github.com/honojs/hono/pull/5081">honojs/hono#5081</a></li>
<li>test(workerd): add <code>compatibilityDate</code> by <a
href="https://github.com/yusukebe"><code>@​yusukebe</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/5100">honojs/hono#5100</a></li>
<li>fix(lambda-edge): base64 encode content-encoded response bodies by
<a href="https://github.com/yusukebe"><code>@​yusukebe</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/5099">honojs/hono#5099</a></li>
<li>fix(aws-lambda): treat any non-identity content-encoding as binary
by <a href="https://github.com/yusukebe"><code>@​yusukebe</code></a> in
<a
href="https://redirect.github.com/honojs/hono/pull/5101">honojs/hono#5101</a></li>
<li>fix(types): strip extra properties from array types in JSONParsed by
<a
href="https://github.com/Arman-Luthra"><code>@​Arman-Luthra</code></a>
in <a
href="https://redirect.github.com/honojs/hono/pull/5103">honojs/hono#5103</a></li>
<li>fix(trie-router): match empty wildcard remainder after regexp param
by <a href="https://github.com/usualoma"><code>@​usualoma</code></a> in
<a
href="https://redirect.github.com/honojs/hono/pull/5102">honojs/hono#5102</a></li>
<li>fix(etag): treat If-None-Match: <code>*</code> as a match by <a
href="https://github.com/yusukebe"><code>@​yusukebe</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/5084">honojs/hono#5084</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/codebybilal18"><code>@​codebybilal18</code></a>
made their first contribution in <a
href="https://redirect.github.com/honojs/hono/pull/5081">honojs/hono#5081</a></li>
<li><a
href="https://github.com/Arman-Luthra"><code>@​Arman-Luthra</code></a>
made their first contribution in <a
href="https://redirect.github.com/honojs/hono/pull/5103">honojs/hono#5103</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/honojs/hono/compare/v4.12.28...v4.12.29">https://github.com/honojs/hono/compare/v4.12.28...v4.12.29</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="cda1af2002"><code>cda1af2</code></a>
4.12.29</li>
<li><a
href="2126289c15"><code>2126289</code></a>
fix(etag): treat If-None-Match: <code>*</code> as a match (<a
href="https://redirect.github.com/honojs/hono/issues/5084">#5084</a>)</li>
<li><a
href="0fc7ffc949"><code>0fc7ffc</code></a>
fix(trie-router): match empty wildcard remainder after regexp param (<a
href="https://redirect.github.com/honojs/hono/issues/5102">#5102</a>)</li>
<li><a
href="ab590e4ec8"><code>ab590e4</code></a>
fix(types): strip extra properties from array types in JSONParsed (<a
href="https://redirect.github.com/honojs/hono/issues/5103">#5103</a>)</li>
<li><a
href="b93a2547a3"><code>b93a254</code></a>
fix(aws-lambda): treat any non-identity content-encoding as binary (<a
href="https://redirect.github.com/honojs/hono/issues/5101">#5101</a>)</li>
<li><a
href="6217f4b74c"><code>6217f4b</code></a>
fix(lambda-edge): base64 encode content-encoded response bodies (<a
href="https://redirect.github.com/honojs/hono/issues/5099">#5099</a>)</li>
<li><a
href="ba89e973c7"><code>ba89e97</code></a>
test(workerd): add <code>compatibilityDate</code> (<a
href="https://redirect.github.com/honojs/hono/issues/5100">#5100</a>)</li>
<li><a
href="46557ef820"><code>46557ef</code></a>
docs(language): add JSDoc <a
href="https://github.com/example"><code>@​example</code></a> to
languageDetector (<a
href="https://redirect.github.com/honojs/hono/issues/5081">#5081</a>)</li>
<li><a
href="24547a6ed5"><code>24547a6</code></a>
fix(lambda-edge): resolve the handler with the value passed to the
callback (...</li>
<li><a
href="9c6ccd76f1"><code>9c6ccd7</code></a>
chore: fix no-op tsc in test script (<a
href="https://redirect.github.com/honojs/hono/issues/5093">#5093</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/honojs/hono/compare/v4.12.28...v4.12.29">compare
view</a></li>
</ul>
</details>
<br />


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

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

---

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

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


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2026-07-13 13:00:40 +02:00
Ben Brandt
9cd48c597a fix: Add subagent parent tool use attribution (#859)
Hopefully help address #851
2026-07-10 09:10:55 +00:00
acp-release-bot[bot]
3500ef736f chore(main): release 0.58.1 (#856)
🤖 I have created a release *beep* *boop*
---


##
[0.58.1](https://github.com/agentclientprotocol/claude-agent-acp/compare/v0.58.0...v0.58.1)
(2026-07-09)


### Bug Fixes

* Use valid npm version for publish
([#855](https://github.com/agentclientprotocol/claude-agent-acp/issues/855))
([8b366d8](8b366d8e9a))

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

Co-authored-by: acp-release-bot[bot] <246668977+acp-release-bot[bot]@users.noreply.github.com>
2026-07-09 14:19:30 +02:00
Ben Brandt
8b366d8e9a fix: Use valid npm version for publish (#855) 2026-07-09 11:57:22 +00:00
acp-release-bot[bot]
5144aabc52 chore(main): release 0.58.0 (#847)
🤖 I have created a release *beep* *boop*
---


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


### Features

* **deps:** update to @anthropic-ai/claude-agent-sdk 0.3.205
([#854](https://github.com/agentclientprotocol/claude-agent-acp/issues/854))
([f664ced](f664ced76d))


### Bug Fixes

* Preserve live model on resumed sessions
([#848](https://github.com/agentclientprotocol/claude-agent-acp/issues/848))
([f3d8ae3](f3d8ae3eb3)),
closes
[#845](https://github.com/agentclientprotocol/claude-agent-acp/issues/845)
* Report usage for cancelled active turns
([#846](https://github.com/agentclientprotocol/claude-agent-acp/issues/846))
([b03318f](b03318f59c)),
closes
[#844](https://github.com/agentclientprotocol/claude-agent-acp/issues/844)
* tolerate missing text in streamed thinking chunks
([#852](https://github.com/agentclientprotocol/claude-agent-acp/issues/852))
([e944ced](e944ceddea))
* Use SDK guards for elicitation validation
([#850](https://github.com/agentclientprotocol/claude-agent-acp/issues/850))
([32b9350](32b93501d7))

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

Co-authored-by: acp-release-bot[bot] <246668977+acp-release-bot[bot]@users.noreply.github.com>
2026-07-09 13:40:22 +02:00
dependabot[bot]
f664ced76d feat(deps): update to @anthropic-ai/claude-agent-sdk 0.3.205 (#854)
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.202` | `0.3.204` |
|
[@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)
| `26.1.0` | `26.1.1` |
| @anthropic-ai/claude-agent-sdk-darwin-arm64 | `0.3.202` | `0.3.204` |
| @anthropic-ai/claude-agent-sdk-darwin-x64 | `0.3.202` | `0.3.204` |
| @anthropic-ai/claude-agent-sdk-linux-arm64 | `0.3.202` | `0.3.204` |
| @anthropic-ai/claude-agent-sdk-linux-arm64-musl | `0.3.202` |
`0.3.204` |
| @anthropic-ai/claude-agent-sdk-linux-x64 | `0.3.202` | `0.3.204` |
| @anthropic-ai/claude-agent-sdk-linux-x64-musl | `0.3.202` | `0.3.204`
|
| @anthropic-ai/claude-agent-sdk-win32-arm64 | `0.3.202` | `0.3.204` |
| @anthropic-ai/claude-agent-sdk-win32-x64 | `0.3.202` | `0.3.204` |
|
[rolldown](https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown)
| `1.1.4` | `1.1.5` |
| [std-env](https://github.com/unjs/std-env) | `4.1.0` | `4.2.0` |

Updates `@anthropic-ai/claude-agent-sdk` from 0.3.202 to 0.3.204
<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.204</h2>
<h2>What's changed</h2>
<ul>
<li>Updated to parity with Claude Code v2.1.204</li>
</ul>
<h2>Update</h2>
<pre lang="sh"><code>npm install @anthropic-ai/claude-agent-sdk@0.3.204
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.204
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.204
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.204
</code></pre>
<h2>v0.3.203</h2>
<h2>What's changed</h2>
<ul>
<li>Added a <code>background_tasks_changed</code> system message with
the full set of live background tasks on every membership change, so
consumers can track background activity as a level instead of pairing
<code>task_started</code>/<code>task_notification</code> edges</li>
<li>Fixed stable releases shipping a <code>sdk.d.ts</code> with
unresolved type references that broke consumer typechecking with
<code>skipLibCheck</code> disabled</li>
</ul>
<h2>Update</h2>
<pre lang="sh"><code>npm install @anthropic-ai/claude-agent-sdk@0.3.203
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.203
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.203
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.203
</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.204</h2>
<ul>
<li>Updated to parity with Claude Code v2.1.204</li>
</ul>
<h2>0.3.203</h2>
<ul>
<li>Added a <code>background_tasks_changed</code> system message with
the full set of live background tasks on every membership change, so
consumers can track background activity as a level instead of pairing
<code>task_started</code>/<code>task_notification</code> edges</li>
<li>Fixed stable releases shipping a <code>sdk.d.ts</code> with
unresolved type references that broke consumer typechecking with
<code>skipLibCheck</code> disabled</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7feb85d829"><code>7feb85d</code></a>
chore: Update CHANGELOG.md</li>
<li><a
href="eb18b2a6de"><code>eb18b2a</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.202...v0.3.204">compare
view</a></li>
</ul>
</details>
<br />

Updates `@types/node` from 26.1.0 to 26.1.1
<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.202 to
0.3.204

Updates `@anthropic-ai/claude-agent-sdk-darwin-x64` from 0.3.202 to
0.3.204

Updates `@anthropic-ai/claude-agent-sdk-linux-arm64` from 0.3.202 to
0.3.204

Updates `@anthropic-ai/claude-agent-sdk-linux-arm64-musl` from 0.3.202
to 0.3.204

Updates `@anthropic-ai/claude-agent-sdk-linux-x64` from 0.3.202 to
0.3.204

Updates `@anthropic-ai/claude-agent-sdk-linux-x64-musl` from 0.3.202 to
0.3.204

Updates `@anthropic-ai/claude-agent-sdk-win32-arm64` from 0.3.202 to
0.3.204

Updates `@anthropic-ai/claude-agent-sdk-win32-x64` from 0.3.202 to
0.3.204

Updates `rolldown` from 1.1.4 to 1.1.5
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/rolldown/rolldown/releases">rolldown's
releases</a>.</em></p>
<blockquote>
<h2>v1.1.5</h2>
<h2>[1.1.5] - 2026-07-08</h2>
<h3>🚀 Features</h3>
<ul>
<li>detect top-level import-binding reads as execution-order sensitive
(<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10180">#10180</a>)
by <a href="https://github.com/hyf0"><code>@​hyf0</code></a></li>
<li>sourcemap_filenames: add a sourcemapFileNames option (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9271">#9271</a>)
by <a
href="https://github.com/V1OL3TF0X"><code>@​V1OL3TF0X</code></a></li>
<li>binding: record plugin hook result kind in tracing spans (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10154">#10154</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>linking: skip side-effect-free modules in per-entry reachability (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10111">#10111</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>improve error message for unresolved virtual imports (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10156">#10156</a>)
by <a
href="https://github.com/sapphi-red"><code>@​sapphi-red</code></a></li>
<li>add descriptive metadata to plugin API (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10106">#10106</a>)
by <a
href="https://github.com/sapphi-red"><code>@​sapphi-red</code></a></li>
<li>add <code>--configLoader=native</code> option (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10118">#10118</a>)
by <a
href="https://github.com/sapphi-red"><code>@​sapphi-red</code></a></li>
</ul>
<h3>🐛 Bug Fixes</h3>
<ul>
<li>improve invalid annotation warnings (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10185">#10185</a>)
by <a href="https://github.com/hyf0"><code>@​hyf0</code></a></li>
<li>keep deduplicated asset filenames stable once they can be observed
(<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10191">#10191</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>sourcemap_filenames: use public option name in pattern errors (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10188">#10188</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>sourcemap_filenames: hash prepared sourcemap content (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10178">#10178</a>)
by <a href="https://github.com/hyf0"><code>@​hyf0</code></a></li>
<li>tree-shake unused circular declarators exported via export list (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10166">#10166</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>dev: don't panic when an HMR rebuild hits an unresolved import (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10162">#10162</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>propagate errors from output.globals function (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9880">#9880</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>dev: revert cache mutations when a partial scan fails (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10110">#10110</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>dev: update importer relationships of cached modules in incremental
build (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10107">#10107</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>hmr: fall back to full reload when a changed module is not
registered as executed (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10132">#10132</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>chunk-optimizer: follow entry facade edges in runtime placement
cycle check (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10101">#10101</a>)
by <a href="https://github.com/hyf0"><code>@​hyf0</code></a></li>
<li>dev: ignore watcher events after close (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10113">#10113</a>)
by <a href="https://github.com/hyf0"><code>@​hyf0</code></a></li>
<li>emit async wrapper for TLA modules under onDemandWrapping (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10086">#10086</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>gate sideEffects:false modules' side effects on body demand (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10080">#10080</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>rolldown_plugin_vite_resolve: return empty object for <code>browser:
false</code> mapped modules (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10082">#10082</a>)
by <a
href="https://github.com/sapphi-red"><code>@​sapphi-red</code></a></li>
<li>reset the word-boundary state on newline in Hires::Boundary
sourcemaps (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10025">#10025</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>trim an emptied chunk's outro/intro instead of skipping past it (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10029">#10029</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>test each edited chunk's own start against indent exclude ranges (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10026">#10026</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>preserve sourcemap mappings for indented lines when a CJS module
shares the chunk (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10074">#10074</a>)
by <a href="https://github.com/hyf0"><code>@​hyf0</code></a></li>
</ul>
<h3>🚜 Refactor</h3>
<ul>
<li>separate tree-shaking side effects from execution order sensitivity
(<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10168">#10168</a>)
by <a href="https://github.com/hyf0"><code>@​hyf0</code></a></li>
<li>type construct_vite_preload_call to take an ObjectPattern (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10135">#10135</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>treeshake: single-source the own-export classification shared with
the lazy-barrel loader (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10098">#10098</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>dev: reuse Vite's bundledDev server (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10081">#10081</a>)
by <a href="https://github.com/h-a-n-a"><code>@​h-a-n-a</code></a></li>
<li>clippy: ban std HashMap/HashSet in favour of FxHashMap/FxHashSet (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10108">#10108</a>)
by <a href="https://github.com/Boshen"><code>@​Boshen</code></a></li>
<li>treeshake: make body demand a second module bit instead of a stmt
multimap (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10097">#10097</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>seal used_symbol_refs by construction after its last writer (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10091">#10091</a>)
by <a href="https://github.com/hyf0"><code>@​hyf0</code></a></li>
<li>treeshake: replace inclusion mutual recursion with a worklist engine
(<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10096">#10096</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>treeshake: split include_statements.rs into focused modules (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10095">#10095</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>drop redundant is_user_defined filter on partitioned entries (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10050">#10050</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>project the retained export interface out of used_symbol_refs (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10089">#10089</a>)
by <a href="https://github.com/hyf0"><code>@​hyf0</code></a></li>
<li>track used external symbols separately from used_symbol_refs (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10088">#10088</a>)
by <a href="https://github.com/hyf0"><code>@​hyf0</code></a></li>
<li>make module namespace inclusion an explicit linking metadata field
(<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10087">#10087</a>)
by <a href="https://github.com/hyf0"><code>@​hyf0</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's
changelog</a>.</em></p>
<blockquote>
<h2>[1.1.5] - 2026-07-08</h2>
<h3>🚀 Features</h3>
<ul>
<li>detect top-level import-binding reads as execution-order sensitive
(<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10180">#10180</a>)
by <a href="https://github.com/hyf0"><code>@​hyf0</code></a></li>
<li>sourcemap_filenames: add a sourcemapFileNames option (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9271">#9271</a>)
by <a
href="https://github.com/V1OL3TF0X"><code>@​V1OL3TF0X</code></a></li>
<li>binding: record plugin hook result kind in tracing spans (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10154">#10154</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>linking: skip side-effect-free modules in per-entry reachability (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10111">#10111</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>improve error message for unresolved virtual imports (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10156">#10156</a>)
by <a
href="https://github.com/sapphi-red"><code>@​sapphi-red</code></a></li>
<li>add descriptive metadata to plugin API (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10106">#10106</a>)
by <a
href="https://github.com/sapphi-red"><code>@​sapphi-red</code></a></li>
<li>add <code>--configLoader=native</code> option (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10118">#10118</a>)
by <a
href="https://github.com/sapphi-red"><code>@​sapphi-red</code></a></li>
</ul>
<h3>🐛 Bug Fixes</h3>
<ul>
<li>improve invalid annotation warnings (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10185">#10185</a>)
by <a href="https://github.com/hyf0"><code>@​hyf0</code></a></li>
<li>keep deduplicated asset filenames stable once they can be observed
(<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10191">#10191</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>sourcemap_filenames: use public option name in pattern errors (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10188">#10188</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>sourcemap_filenames: hash prepared sourcemap content (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10178">#10178</a>)
by <a href="https://github.com/hyf0"><code>@​hyf0</code></a></li>
<li>tree-shake unused circular declarators exported via export list (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10166">#10166</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>dev: don't panic when an HMR rebuild hits an unresolved import (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10162">#10162</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>propagate errors from output.globals function (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9880">#9880</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>dev: revert cache mutations when a partial scan fails (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10110">#10110</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>dev: update importer relationships of cached modules in incremental
build (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10107">#10107</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>hmr: fall back to full reload when a changed module is not
registered as executed (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10132">#10132</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>chunk-optimizer: follow entry facade edges in runtime placement
cycle check (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10101">#10101</a>)
by <a href="https://github.com/hyf0"><code>@​hyf0</code></a></li>
<li>dev: ignore watcher events after close (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10113">#10113</a>)
by <a href="https://github.com/hyf0"><code>@​hyf0</code></a></li>
<li>emit async wrapper for TLA modules under onDemandWrapping (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10086">#10086</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>gate sideEffects:false modules' side effects on body demand (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10080">#10080</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>rolldown_plugin_vite_resolve: return empty object for <code>browser:
false</code> mapped modules (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10082">#10082</a>)
by <a
href="https://github.com/sapphi-red"><code>@​sapphi-red</code></a></li>
<li>reset the word-boundary state on newline in Hires::Boundary
sourcemaps (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10025">#10025</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>trim an emptied chunk's outro/intro instead of skipping past it (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10029">#10029</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>test each edited chunk's own start against indent exclude ranges (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10026">#10026</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>preserve sourcemap mappings for indented lines when a CJS module
shares the chunk (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10074">#10074</a>)
by <a href="https://github.com/hyf0"><code>@​hyf0</code></a></li>
</ul>
<h3>🚜 Refactor</h3>
<ul>
<li>separate tree-shaking side effects from execution order sensitivity
(<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10168">#10168</a>)
by <a href="https://github.com/hyf0"><code>@​hyf0</code></a></li>
<li>type construct_vite_preload_call to take an ObjectPattern (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10135">#10135</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>treeshake: single-source the own-export classification shared with
the lazy-barrel loader (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10098">#10098</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>dev: reuse Vite's bundledDev server (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10081">#10081</a>)
by <a href="https://github.com/h-a-n-a"><code>@​h-a-n-a</code></a></li>
<li>clippy: ban std HashMap/HashSet in favour of FxHashMap/FxHashSet (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10108">#10108</a>)
by <a href="https://github.com/Boshen"><code>@​Boshen</code></a></li>
<li>treeshake: make body demand a second module bit instead of a stmt
multimap (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10097">#10097</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>seal used_symbol_refs by construction after its last writer (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10091">#10091</a>)
by <a href="https://github.com/hyf0"><code>@​hyf0</code></a></li>
<li>treeshake: replace inclusion mutual recursion with a worklist engine
(<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10096">#10096</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>treeshake: split include_statements.rs into focused modules (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10095">#10095</a>)
by <a
href="https://github.com/IWANABETHATGUY"><code>@​IWANABETHATGUY</code></a></li>
<li>drop redundant is_user_defined filter on partitioned entries (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10050">#10050</a>)
by <a
href="https://github.com/shulaoda"><code>@​shulaoda</code></a></li>
<li>project the retained export interface out of used_symbol_refs (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10089">#10089</a>)
by <a href="https://github.com/hyf0"><code>@​hyf0</code></a></li>
<li>track used external symbols separately from used_symbol_refs (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10088">#10088</a>)
by <a href="https://github.com/hyf0"><code>@​hyf0</code></a></li>
<li>make module namespace inclusion an explicit linking metadata field
(<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10087">#10087</a>)
by <a href="https://github.com/hyf0"><code>@​hyf0</code></a></li>
<li>rename statement evaluation metadata (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10078">#10078</a>)
by <a href="https://github.com/hyf0"><code>@​hyf0</code></a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="f09947ab01"><code>f09947a</code></a>
release: v1.1.5 (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10194">#10194</a>)</li>
<li><a
href="bb66570a26"><code>bb66570</code></a>
fix: improve invalid annotation warnings (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10185">#10185</a>)</li>
<li><a
href="fb1d3b40d6"><code>fb1d3b4</code></a>
fix(sourcemap_filenames): use public option name in pattern errors (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10188">#10188</a>)</li>
<li><a
href="cccee78311"><code>cccee78</code></a>
test: move string_wizard replace unit tests to the JS magic-string suite
(<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10">#10</a>...</li>
<li><a
href="4b018b35c8"><code>4b018b3</code></a>
fix(sourcemap_filenames): hash prepared sourcemap content (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10178">#10178</a>)</li>
<li><a
href="72ce2b99c8"><code>72ce2b9</code></a>
feat(sourcemap_filenames): add a sourcemapFileNames option (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9271">#9271</a>)</li>
<li><a
href="7fe2c4d611"><code>7fe2c4d</code></a>
chore(deps): update oxc to 0.139.0 (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10161">#10161</a>)</li>
<li><a
href="f730cac127"><code>f730cac</code></a>
fix: propagate errors from output.globals function (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/9880">#9880</a>)</li>
<li><a
href="5b4a4080ff"><code>5b4a408</code></a>
chore(rolldown_plugin_utils): remove dead asset-url and css scaffolding
(<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10131">#10131</a>)</li>
<li><a
href="460900aeda"><code>460900a</code></a>
docs(cli): clarify disabling boolean/object flags like codeSplitting (<a
href="https://github.com/rolldown/rolldown/tree/HEAD/packages/rolldown/issues/10153">#10153</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/rolldown/rolldown/commits/v1.1.5/packages/rolldown">compare
view</a></li>
</ul>
</details>
<br />

Updates `std-env` from 4.1.0 to 4.2.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/unjs/std-env/releases">std-env's
releases</a>.</em></p>
<blockquote>
<h2>v4.2.0</h2>
<h3>🚀 Enhancements</h3>
<ul>
<li>Add Junie agent support (<a
href="https://redirect.github.com/unjs/std-env/pull/195">#195</a>)</li>
</ul>
<h3>🩹 Fixes</h3>
<ul>
<li><strong>agents:</strong> Don't detect kiro IDE integrated terminal
as an agent (<a
href="https://redirect.github.com/unjs/std-env/pull/196">#196</a>)</li>
</ul>
<h3>❤️Contributors</h3>
<ul>
<li>Pooya Parsa (<a
href="https://github.com/pi0"><code>@​pi0</code></a>)</li>
<li>Gauthier POGAM (<a
href="https://github.com/GauthierPLM"><code>@​GauthierPLM</code></a>])</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/unjs/std-env/blob/main/CHANGELOG.md">std-env's
changelog</a>.</em></p>
<blockquote>
<h2>v4.2.0</h2>
<p><a
href="https://github.com/unjs/std-env/compare/v4.1.0...v4.2.0">compare
changes</a></p>
<h3>🚀 Enhancements</h3>
<ul>
<li>Add Junie agent support (<a
href="https://redirect.github.com/unjs/std-env/pull/195">#195</a>)</li>
</ul>
<h3>🩹 Fixes</h3>
<ul>
<li><strong>agents:</strong> Don't detect kiro IDE integrated terminal
as an agent (<a
href="https://redirect.github.com/unjs/std-env/pull/196">#196</a>)</li>
</ul>
<h3>🏡 Chore</h3>
<ul>
<li>Update deps (<a
href="https://github.com/unjs/std-env/commit/aaeddcd">aaeddcd</a>)</li>
<li>Update tsconfig (<a
href="https://github.com/unjs/std-env/commit/9e44e17">9e44e17</a>)</li>
<li>Update tsconfig (<a
href="https://github.com/unjs/std-env/commit/1b2503d">1b2503d</a>)</li>
</ul>
<h3>❤️ Contributors</h3>
<ul>
<li>Pi0x <a href="mailto:x@pi0.io">x@pi0.io</a></li>
<li>Pooya Parsa (<a
href="https://github.com/pi0"><code>@​pi0</code></a>)</li>
<li>Gauthier POGAM--LE MONTAGNER (<a
href="https://github.com/GauthierPLM"><code>@​GauthierPLM</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="ddd5e9e076"><code>ddd5e9e</code></a>
chore(release): v4.2.0</li>
<li><a
href="09d5e7805f"><code>09d5e78</code></a>
fix(agents): don't detect kiro IDE integrated terminal as an agent (<a
href="https://redirect.github.com/unjs/std-env/issues/196">#196</a>)</li>
<li><a
href="c5b59ac814"><code>c5b59ac</code></a>
chore(deps): update github-actions to v7 (<a
href="https://redirect.github.com/unjs/std-env/issues/187">#187</a>)</li>
<li><a
href="1b2503d788"><code>1b2503d</code></a>
chore: update tsconfig</li>
<li><a
href="9e44e17f8e"><code>9e44e17</code></a>
chore: update tsconfig</li>
<li><a
href="aaeddcdb8f"><code>aaeddcd</code></a>
chore: update deps</li>
<li><a
href="56aade8cc2"><code>56aade8</code></a>
feat: add Junie agent support (<a
href="https://redirect.github.com/unjs/std-env/issues/195">#195</a>)</li>
<li>See full diff in <a
href="https://github.com/unjs/std-env/compare/v4.1.0...v4.2.0">compare
view</a></li>
</ul>
</details>
<br />


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

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

---

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

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


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2026-07-09 13:07:01 +02:00
Jazzen Chen
e944ceddea fix: tolerate missing text in streamed thinking chunks (#852)
## Summary

This makes streamed text/thinking chunk handling defensive when gateways
emit empty or malformed delta payloads.

- Guard `text_delta.text` and `thinking_delta.thinking` before reading
`.length`
- Skip missing/non-string text or thinking content the same way empty
chunks are already skipped
- Add regression coverage for a missing `thinking` delta before a real
text delta
- Add direct `toAcpNotifications` coverage for missing/non-string text
and thinking chunks

## Why

The adapter already skips empty thinking chunks, but some
Anthropic-compatible gateways can emit signature-only or omitted
thinking deltas where `thinking` is absent rather than an empty string.
In that case the adapter currently throws:

```text
Cannot read properties of undefined (reading 'length')
```

That aborts the ACP session even though the following text chunks are
valid.

This change keeps the existing behavior for valid chunks, while treating
missing/non-string chunk text as empty content.

## Test Plan

- `npm run check`
- `npm test -- --run`
- `npm run build`

Also verified manually through a VibeAround Web Chat flow using Claude
Code ACP with an Anthropic-compatible custom endpoint; the session
completed and returned a normal assistant response.

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2026-07-08 11:23:13 +00:00
Ben Brandt
32b93501d7 fix: Use SDK guards for elicitation validation (#850) 2026-07-07 15:52:37 +00:00
Ben Brandt
f08c4521ec Fix hinted model alias resolution (#849) 2026-07-07 15:44:54 +00:00
Ben Brandt
f3d8ae3eb3 fix: Preserve live model on resumed sessions (#848)
Closes #845
2026-07-07 17:37:21 +02:00
Ben Brandt
b03318f59c fix: Report usage for cancelled active turns (#846)
Closes #844
2026-07-07 12:05:19 +00:00
acp-release-bot[bot]
2bf865eb42 chore(main): release 0.57.0 (#842)
🤖 I have created a release *beep* *boop*
---


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


### Features

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


### Bug Fixes

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

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

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

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

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

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

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

## Fix

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

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

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

## Tests

Three unit tests added on `toAcpNotifications`:

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

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

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

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


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

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

---

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

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


</details>

---------

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


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


### Features

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

---

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

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


</details>

---------

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

View File

@@ -50,8 +50,31 @@ jobs:
with:
node-version: "lts/*"
registry-url: "https://registry.npmjs.org"
- name: Update npm
run: npm install -g npm@latest
- run: npm ci
- run: npm run build
- run: npm publish
trigger-registry-update:
needs: publish-npm
runs-on: ubuntu-latest
environment: release
permissions: {}
steps:
- name: Generate token scoped to the registry repo
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1
id: registry-token
with:
app-id: ${{ secrets.REGISTRY_UPDATER_APP_ID }}
private-key: ${{ secrets.REGISTRY_UPDATER_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: registry
- name: Dispatch registry version update
env:
GH_TOKEN: ${{ steps.registry-token.outputs.token }}
run: |
gh workflow run update-versions.yml \
--repo ${{ github.repository_owner }}/registry \
--ref main \
-f apply=true \
-f agents=claude-acp

View File

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

View File

@@ -1,5 +1,79 @@
# Changelog
## [0.60.0](https://github.com/agentclientprotocol/claude-agent-acp/compare/v0.59.0...v0.60.0) (2026-07-20)
### Features
* **deps:** Update to claude-agent-sdk 0.3.215 ([#890](https://github.com/agentclientprotocol/claude-agent-acp/issues/890)) ([92548f0](https://github.com/agentclientprotocol/claude-agent-acp/commit/92548f043547b0ddac95921ece020e69f7c12c5f))
* implement configurable LLM providers ([#853](https://github.com/agentclientprotocol/claude-agent-acp/issues/853)) ([82cd692](https://github.com/agentclientprotocol/claude-agent-acp/commit/82cd692e500eedec182f817b18cebb005c4b98ce))
### Bug Fixes
* parse Agent/Task trailers without regex ([#879](https://github.com/agentclientprotocol/claude-agent-acp/issues/879)) ([06c3d7b](https://github.com/agentclientprotocol/claude-agent-acp/commit/06c3d7bdbd8cc9415c8cabac060a50e0951c758b))
* remove ~15s stall on session/new and model switch by seeding the context window synchronously ([#894](https://github.com/agentclientprotocol/claude-agent-acp/issues/894)) ([ff9b96d](https://github.com/agentclientprotocol/claude-agent-acp/commit/ff9b96d462831b1c3b96722ea20215ff6e529cb1))
* Silence missing PostToolUse callbacks ([#895](https://github.com/agentclientprotocol/claude-agent-acp/issues/895)) ([1887ada](https://github.com/agentclientprotocol/claude-agent-acp/commit/1887ada215b27bb1025d9b7696a46ae7a4ac0f7a)), closes [#889](https://github.com/agentclientprotocol/claude-agent-acp/issues/889)
## [0.59.0](https://github.com/agentclientprotocol/claude-agent-acp/compare/v0.58.1...v0.59.0) (2026-07-13)
### Features
* **deps-dev:** bump nanoid from 3.3.15 to 3.3.16 ([#875](https://github.com/agentclientprotocol/claude-agent-acp/issues/875)) ([e67dacd](https://github.com/agentclientprotocol/claude-agent-acp/commit/e67dacdcac629b00e5bdcda94b3de57459696b1e))
* **deps:** bump @anthropic-ai/claude-agent-sdk to 0.3.207 ([#874](https://github.com/agentclientprotocol/claude-agent-acp/issues/874)) ([c7f5b8f](https://github.com/agentclientprotocol/claude-agent-acp/commit/c7f5b8fe768507afa28cdffe5cc3c054c56306ad))
### Bug Fixes
* Add subagent parent tool use attribution ([#859](https://github.com/agentclientprotocol/claude-agent-acp/issues/859)) ([9cd48c5](https://github.com/agentclientprotocol/claude-agent-acp/commit/9cd48c597af68f630774ec00bc3adc85f6b0fd4b))
* forward result text when the turn emitted no assistant message ([#858](https://github.com/agentclientprotocol/claude-agent-acp/issues/858)) ([61ae860](https://github.com/agentclientprotocol/claude-agent-acp/commit/61ae8609d4343da6758c2376c6cf684c7fb0956a))
* hold a turn open while its background subagents are still live ([#870](https://github.com/agentclientprotocol/claude-agent-acp/issues/870)) ([7a70f82](https://github.com/agentclientprotocol/claude-agent-acp/commit/7a70f82739e085014cad878f08513cdef7b7fe16))
* Refine tool calls from streamed input ([#867](https://github.com/agentclientprotocol/claude-agent-acp/issues/867)) ([2c19974](https://github.com/agentclientprotocol/claude-agent-acp/commit/2c19974d5b80d3178b35e80a4bb0a1050588aab9))
* Seed context window from SDK usage report ([#868](https://github.com/agentclientprotocol/claude-agent-acp/issues/868)) ([3ba2d36](https://github.com/agentclientprotocol/claude-agent-acp/commit/3ba2d367a282fe3053a73804a416a435cb01ee08)), closes [#596](https://github.com/agentclientprotocol/claude-agent-acp/issues/596)
* Skip synthetic login messages on replay ([#869](https://github.com/agentclientprotocol/claude-agent-acp/issues/869)) ([c7dff3c](https://github.com/agentclientprotocol/claude-agent-acp/commit/c7dff3cf7eeb03cb993493efafa96344f18de81b)), closes [#863](https://github.com/agentclientprotocol/claude-agent-acp/issues/863)
## [0.58.1](https://github.com/agentclientprotocol/claude-agent-acp/compare/v0.58.0...v0.58.1) (2026-07-09)
### Bug Fixes
* Use valid npm version for publish ([#855](https://github.com/agentclientprotocol/claude-agent-acp/issues/855)) ([8b366d8](https://github.com/agentclientprotocol/claude-agent-acp/commit/8b366d8e9ad55e9237bf2d618cfc99b57fac570d))
## [0.58.0](https://github.com/agentclientprotocol/claude-agent-acp/compare/v0.57.0...v0.58.0) (2026-07-09)
### Features
* **deps:** update to @anthropic-ai/claude-agent-sdk 0.3.205 ([#854](https://github.com/agentclientprotocol/claude-agent-acp/issues/854)) ([f664ced](https://github.com/agentclientprotocol/claude-agent-acp/commit/f664ced76df00674d88aedd018a4261da3bc3f3a))
### Bug Fixes
* Preserve live model on resumed sessions ([#848](https://github.com/agentclientprotocol/claude-agent-acp/issues/848)) ([f3d8ae3](https://github.com/agentclientprotocol/claude-agent-acp/commit/f3d8ae3eb389ee9367f48c8762562a55280ade0a)), closes [#845](https://github.com/agentclientprotocol/claude-agent-acp/issues/845)
* Report usage for cancelled active turns ([#846](https://github.com/agentclientprotocol/claude-agent-acp/issues/846)) ([b03318f](https://github.com/agentclientprotocol/claude-agent-acp/commit/b03318f59c6165146c8d8e036227f35c3abd0ff4)), closes [#844](https://github.com/agentclientprotocol/claude-agent-acp/issues/844)
* tolerate missing text in streamed thinking chunks ([#852](https://github.com/agentclientprotocol/claude-agent-acp/issues/852)) ([e944ced](https://github.com/agentclientprotocol/claude-agent-acp/commit/e944ceddea79950d6bfb6339266862507c4b964f))
* Use SDK guards for elicitation validation ([#850](https://github.com/agentclientprotocol/claude-agent-acp/issues/850)) ([32b9350](https://github.com/agentclientprotocol/claude-agent-acp/commit/32b93501d7a35a3b405b5022b4caaad492eed11c))
## [0.57.0](https://github.com/agentclientprotocol/claude-agent-acp/compare/v0.56.0...v0.57.0) (2026-07-07)
### Features
* Update @anthropic-ai/claude-agent-sdk to 0.3.202 ([#843](https://github.com/agentclientprotocol/claude-agent-acp/issues/843)) ([1612c07](https://github.com/agentclientprotocol/claude-agent-acp/commit/1612c078953c134e12368a2d968a9bcf14d31b55))
### Bug Fixes
* don't emit empty agent_message_chunk ([#841](https://github.com/agentclientprotocol/claude-agent-acp/issues/841)) ([d74dd1d](https://github.com/agentclientprotocol/claude-agent-acp/commit/d74dd1d9d356050fc87f9fdab8599f1546b12a2c))
## [0.56.0](https://github.com/agentclientprotocol/claude-agent-acp/compare/v0.55.0...v0.56.0) (2026-07-06)
### Features
* **deps:** bump @anthropic-ai/claude-agent-sdk to 0.3.201 ([#837](https://github.com/agentclientprotocol/claude-agent-acp/issues/837)) ([ff2a8a9](https://github.com/agentclientprotocol/claude-agent-acp/commit/ff2a8a963536a4265700e4f2003a0ffff93c9087))
## [0.55.0](https://github.com/agentclientprotocol/claude-agent-acp/compare/v0.54.1...v0.55.0) (2026-07-02)

627
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.55.0",
"version": "0.60.0",
"description": "An ACP-compatible coding agent powered by the Claude Agent SDK (TypeScript)",
"main": "dist/lib.js",
"types": "dist/lib.d.ts",
@@ -63,23 +63,23 @@
"node": ">=22"
},
"dependencies": {
"@agentclientprotocol/sdk": "1.1.0",
"@anthropic-ai/claude-agent-sdk": "0.3.198",
"@agentclientprotocol/sdk": "1.2.1",
"@anthropic-ai/claude-agent-sdk": "0.3.215",
"zod": "^3.25.0 || ^4.0.0"
},
"devDependencies": {
"@anthropic-ai/sdk": "0.109.1",
"@anthropic-ai/sdk": "0.112.3",
"@eslint/js": "10.0.1",
"@tsconfig/node22": "22.0.5",
"@types/node": "26.1.0",
"@typescript-eslint/eslint-plugin": "8.62.1",
"@typescript-eslint/parser": "8.62.1",
"eslint": "10.6.0",
"@types/node": "26.1.1",
"@typescript-eslint/eslint-plugin": "8.64.0",
"@typescript-eslint/parser": "8.64.0",
"eslint": "10.7.0",
"eslint-config-prettier": "10.1.8",
"globals": "17.7.0",
"prettier": "3.9.4",
"prettier": "3.9.5",
"ts-node": "10.9.2",
"typescript": "6.0.3",
"vitest": "4.1.9"
"vitest": "4.1.10"
}
}

File diff suppressed because it is too large Load Diff

View File

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

38
src/sdk-shims.d.ts vendored
View File

@@ -1,38 +0,0 @@
/**
* Shims for types the `@anthropic-ai/claude-agent-sdk` 0.3.198 `sdk.d.ts`
* references in its `SDKMessage` union but never declares
* (`SDKControlRequestProgressMessage`, `SDKConversationResetMessage`). With
* `skipLibCheck` the dangling references silently become error-`any`, which
* poisons narrowing on the whole union — every exhaustive switch over
* `SDKMessage` stops compiling.
*
* These must stay GLOBAL declarations (no top-level import/export in this
* file): unqualified names inside the SDK's module declaration fall back to
* the global scope, which is the only way a consumer can supply them. Shapes
* are transcribed from the zod schemas embedded in the bundled CLI binary.
* Delete this file once the SDK ships the declarations itself — a proper
* module-scoped declaration will shadow these.
*/
/** Progress for a long-running client-originated control request (currently
* only `side_question`), correlated by `request_id`. */
declare type SDKControlRequestProgressMessage = {
type: "control_request_progress";
request_id: string;
status: "started" | "api_retry";
attempt?: number;
max_retries?: number;
retry_delay_ms?: number;
error_status?: number | null;
uuid: import("crypto").UUID;
session_id: string;
};
/** Emitted by `/clear`, plan-mode exit, and fresh-session flows; the surface
* should mount a fresh transcript under `new_conversation_id`. */
declare type SDKConversationResetMessage = {
type: "conversation_reset";
new_conversation_id: import("crypto").UUID;
uuid: import("crypto").UUID;
session_id: string;
};

View File

@@ -3,6 +3,7 @@ import * as fs from "node:fs";
import * as path from "node:path";
import * as os from "node:os";
import type { AcpClient, ClaudeAcpAgent as ClaudeAcpAgentType } from "../acp-agent.js";
import { makeMockQuery } from "./helpers.js";
const { querySpy } = vi.hoisted(() => ({
querySpy: vi.fn(),
@@ -34,7 +35,7 @@ describe("ClaudeAcpAgent settings", () => {
const setModelSpy = vi.fn();
querySpy.mockImplementation(({ options }: any) => {
capturedOptions = options;
return {
return makeMockQuery({
initializationResult: async () => ({
models: [
{
@@ -45,8 +46,7 @@ describe("ClaudeAcpAgent settings", () => {
],
}),
setModel: setModelSpy,
supportedCommands: async () => [],
} as any;
}) as any;
});
return { getCapturedOptions: () => capturedOptions, setModelSpy };
}
@@ -240,12 +240,11 @@ describe("ClaudeAcpAgent settings", () => {
const setPermissionModeSpy = vi.fn();
querySpy.mockImplementation(({ options }: any) => {
capturedOptions = options;
return {
return makeMockQuery({
initializationResult: async () => ({ models }),
setModel: setModelSpy,
setPermissionMode: setPermissionModeSpy,
supportedCommands: async () => [],
} as any;
}) as any;
});
return {
getCapturedOptions: () => capturedOptions,
@@ -396,11 +395,10 @@ describe("ClaudeAcpAgent settings", () => {
} {
const setModelSpy = vi.fn();
querySpy.mockImplementation(() => {
return {
return makeMockQuery({
initializationResult: async () => ({ models }),
setModel: setModelSpy,
supportedCommands: async () => [],
} as any;
}) as any;
});
return { setModelSpy };
}
@@ -875,7 +873,7 @@ describe("ClaudeAcpAgent settings", () => {
const setModelSpy = vi.fn();
querySpy.mockImplementation(({ options: _options }: any) => {
return {
return makeMockQuery({
initializationResult: async () => ({
models: [
{
@@ -891,8 +889,7 @@ describe("ClaudeAcpAgent settings", () => {
],
}),
setModel: setModelSpy,
supportedCommands: async () => [],
} as any;
}) as any;
});
const { ClaudeAcpAgent } = await import("../acp-agent.js");
@@ -923,7 +920,7 @@ describe("ClaudeAcpAgent settings", () => {
const setModelSpy = vi.fn();
querySpy.mockImplementation(() => {
return {
return makeMockQuery({
initializationResult: async () => ({
models: [
{ value: "default", displayName: "Default", description: "" },
@@ -932,8 +929,7 @@ describe("ClaudeAcpAgent settings", () => {
],
}),
setModel: setModelSpy,
supportedCommands: async () => [],
} as any;
}) as any;
});
try {
@@ -977,7 +973,7 @@ describe("ClaudeAcpAgent settings", () => {
const setModelSpy = vi.fn();
querySpy.mockImplementation(() => {
return {
return makeMockQuery({
initializationResult: async () => ({
models: [
{ value: "default", displayName: "Default", description: "" },
@@ -985,8 +981,7 @@ describe("ClaudeAcpAgent settings", () => {
],
}),
setModel: setModelSpy,
supportedCommands: async () => [],
} as any;
}) as any;
});
const { ClaudeAcpAgent } = await import("../acp-agent.js");

File diff suppressed because it is too large Load Diff

View File

@@ -7,30 +7,30 @@ import type { AcpClient, ClaudeAcpAgent as ClaudeAcpAgentType } from "../acp-age
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
let capturedOptions: Options | undefined;
vi.mock("@anthropic-ai/claude-agent-sdk", async () => ({
...(await vi.importActual<typeof import("@anthropic-ai/claude-agent-sdk")>(
vi.mock("@anthropic-ai/claude-agent-sdk", async () => {
const actual = await vi.importActual<typeof import("@anthropic-ai/claude-agent-sdk")>(
"@anthropic-ai/claude-agent-sdk",
)),
query: ({ options }: { options: Options }) => {
capturedOptions = options;
return {
initializationResult: async () => ({
models: [
{
value: "claude-sonnet-4-6",
displayName: "Claude Sonnet",
description: "Fast",
supportsAutoMode: true,
},
],
}),
setModel: async () => {},
setPermissionMode: async () => {},
supportedCommands: async () => [],
[Symbol.asyncIterator]: async function* () {},
};
},
}));
);
const { makeMockQuery } = await import("./helpers.js");
return {
...actual,
query: ({ options }: { options: Options }) => {
capturedOptions = options;
return makeMockQuery({
initializationResult: async () => ({
models: [
{
value: "claude-sonnet-4-6",
displayName: "Claude Sonnet",
description: "Fast",
supportsAutoMode: true,
},
],
}),
});
},
};
});
vi.mock("../tools.js", async () => ({
...(await vi.importActual<typeof import("../tools.js")>("../tools.js")),
registerHookCallback: vi.fn(),

View File

@@ -1,18 +1,8 @@
import { describe, expect, it, Mock, vi, afterEach, beforeEach } from "vitest";
import { AcpClient, ClaudeAcpAgent } from "../acp-agent.js";
import { makeMockQuery } from "./helpers.js";
const mockQuery = vi.hoisted(() =>
vi.fn(() => ({
initializationResult: vi.fn().mockResolvedValue({
models: [
{ value: "id", displayName: "name", description: "description", supportsAutoMode: true },
],
}),
setModel: vi.fn(),
setPermissionMode: vi.fn(),
supportedCommands: vi.fn().mockResolvedValue([]),
})),
);
const mockQuery = vi.hoisted(() => vi.fn());
vi.mock("@anthropic-ai/claude-agent-sdk", async () => ({
...(await vi.importActual<typeof import("@anthropic-ai/claude-agent-sdk")>(
@@ -24,6 +14,22 @@ vi.mock("@anthropic-ai/claude-agent-sdk", async () => ({
describe("authorization", () => {
beforeEach(() => {
vi.useFakeTimers();
// Set here (not in vi.fn(impl) at hoist time) so the helper import is
// available; afterEach's resetAllMocks clears it, beforeEach re-sets it.
mockQuery.mockImplementation(() =>
makeMockQuery({
initializationResult: async () => ({
models: [
{
value: "id",
displayName: "name",
description: "description",
supportsAutoMode: true,
},
],
}),
}),
);
});
afterEach(() => {

View File

@@ -7,15 +7,17 @@ import * as os from "node:os";
import * as path from "node:path";
let capturedOptions: Options | undefined;
let contextUsageResult: (() => Promise<{ rawMaxTokens: number; model?: string }>) | undefined;
vi.mock("@anthropic-ai/claude-agent-sdk", async () => {
const actual = await vi.importActual<typeof import("@anthropic-ai/claude-agent-sdk")>(
"@anthropic-ai/claude-agent-sdk",
);
const { makeMockQuery, DEFAULT_CONTEXT_USAGE } = await import("./helpers.js");
return {
...actual,
query: (args: { prompt: unknown; options: Options }) => {
capturedOptions = args.options;
return {
return makeMockQuery({
initializationResult: async () => ({
models: [
{
@@ -26,11 +28,9 @@ vi.mock("@anthropic-ai/claude-agent-sdk", async () => {
},
],
}),
setModel: async () => {},
setPermissionMode: async () => {},
supportedCommands: async () => [],
[Symbol.asyncIterator]: async function* () {},
};
getContextUsage: () =>
contextUsageResult ? contextUsageResult() : Promise.resolve(DEFAULT_CONTEXT_USAGE),
});
},
};
});
@@ -58,6 +58,7 @@ describe("createSession options merging", () => {
beforeEach(async () => {
capturedOptions = undefined;
contextUsageResult = undefined;
vi.resetModules();
const acpAgent = await import("../acp-agent.js");
@@ -514,8 +515,13 @@ describe("createSession options merging", () => {
it("ignores a non-numeric value", async () => {
process.env.MAX_THINKING_TOKENS = "lots";
// The bad value is deliberate — capture the agent's warning instead of
// letting it hit the console.
const errorSpy = vi.fn();
(agent as any).logger = { log: () => {}, error: errorSpy };
await agent.newSession({ cwd: process.cwd(), mcpServers: [] });
expect(capturedOptions!.thinking).toBeUndefined();
expect(errorSpy).toHaveBeenCalledWith(expect.stringContaining("MAX_THINKING_TOKENS"));
});
it("lets a user-provided thinking option override the env default", async () => {
@@ -614,6 +620,109 @@ describe("createSession options merging", () => {
});
});
describe("context window seeding", () => {
function sessionFor(sessionId: string) {
return (agent as unknown as { sessions: Record<string, any> }).sessions[sessionId];
}
it("does not call getContextUsage during session creation", async () => {
// getContextUsage stalls until the session's first prompt turn has run
// (it is not serviced pre-turn), so session/new must never call it —
// awaiting it inline is what regressed session/new latency in 0.59.0.
const ctxSpy = vi.fn(async () => ({ rawMaxTokens: 967000 }));
contextUsageResult = ctxSpy;
await agent.newSession({ cwd: process.cwd(), mcpServers: [] });
expect(ctxSpy).not.toHaveBeenCalled();
});
it("seeds contextWindowSize from text inference, falling back to the default when it misses", async () => {
// The mock model ("claude-sonnet-4-6" / "Claude Sonnet" / "Fast") carries
// no "1m" token anywhere, so inference misses and the window falls back to
// the default; the authoritative value arrives later via result.modelUsage.
contextUsageResult = async () => ({ rawMaxTokens: 967000 });
const response = await agent.newSession({ cwd: process.cwd(), mcpServers: [] });
expect(sessionFor(response.sessionId).contextWindowSize).toBe(200000);
expect(sessionFor(response.sessionId).contextWindowAuthoritative).toBe(false);
});
it("session/load seeds the window from the resumed session's getContextUsage report", async () => {
// Resumed sessions get getContextUsage serviced pre-turn (issue #845 uses
// it to restore the live model), and the same response carries the
// authoritative window (`rawMaxTokens`). After a process restart the
// module cache is empty and text inference misses natively-1M aliases, so
// discarding this in-hand value would replay the issue-#596 flicker on
// every reload — the flagship scenario. 888_000 can only come from the
// report: inference on the mock model yields null → 200_000 default.
contextUsageResult = async () => ({ rawMaxTokens: 888_000, model: "claude-sonnet-4-6" });
await (
agent as unknown as {
createSession: (params: object, opts: { resume?: string }) => Promise<unknown>;
}
).createSession({ cwd: process.cwd(), mcpServers: [] }, { resume: "resumed-window-probe" });
const session = sessionFor("resumed-window-probe");
expect(session.contextWindowSize).toBe(888_000);
expect(session.contextWindowAuthoritative).toBe(true);
});
it("scopes providerCacheKey by per-session env routing", async () => {
// The context-window cache key must distinguish backends exactly as the
// CLI will see them: a session routed to a proxy via _meta env shares a
// model id spelling with default-routed sessions but not a context lane,
// so it must land in its own cache bucket (and two default-routed
// sessions must share one).
const r1 = await agent.newSession({ cwd: process.cwd(), mcpServers: [] });
const r2 = await agent.newSession({
cwd: process.cwd(),
mcpServers: [],
_meta: {
claudeCode: {
options: { env: { ANTHROPIC_BASE_URL: "https://window-probe-proxy.example" } },
},
},
});
const r3 = await agent.newSession({ cwd: process.cwd(), mcpServers: [] });
expect(sessionFor(r2.sessionId).providerCacheKey).not.toBe(
sessionFor(r1.sessionId).providerCacheKey,
);
expect(sessionFor(r3.sessionId).providerCacheKey).toBe(
sessionFor(r1.sessionId).providerCacheKey,
);
});
it("scopes providerCacheKey by provider headers: same endpoint, different headers → different buckets", async () => {
// Two providers/set configs sharing apiType+baseUrl but differing in
// headers (e.g. an `anthropic-beta: context-1m-…` routing header) can
// serve different context lanes for the same model id, so they must not
// share a window-cache bucket.
await agent.unstable_setProvider({
providerId: "main",
apiType: "anthropic",
baseUrl: "https://gw.example",
headers: {},
});
const plain = await agent.newSession({ cwd: process.cwd(), mcpServers: [] });
await agent.unstable_setProvider({
providerId: "main",
apiType: "anthropic",
baseUrl: "https://gw.example",
headers: { "anthropic-beta": "context-1m-2025-08-07" },
});
const beta = await agent.newSession({ cwd: process.cwd(), mcpServers: [] });
expect(sessionFor(beta.sessionId).providerCacheKey).not.toBe(
sessionFor(plain.sessionId).providerCacheKey,
);
});
});
describe("refusal fallback dialog", () => {
it("declares the dialog kind and callback when the client supports form elicitation", async () => {
await agent.initialize({
@@ -711,6 +820,10 @@ describe("createSession options merging", () => {
it("cancels on a malformed payload without presenting anything", async () => {
const { onUserDialog, createElicitation } = await setupDialog();
// The malformed payload is deliberate — capture the agent's warning
// instead of letting it hit the console.
const errorSpy = vi.fn();
(agent as any).logger = { log: () => {}, error: errorSpy };
const result = await onUserDialog(
{ dialogKind: "refusal_fallback_prompt", payload: { fallbackModel: 42 } },
@@ -719,11 +832,16 @@ describe("createSession options merging", () => {
expect(result).toEqual({ behavior: "cancelled" });
expect(createElicitation).not.toHaveBeenCalled();
expect(errorSpy).toHaveBeenCalledWith(expect.stringContaining("unexpected shape"));
});
it("cancels when the elicitation request fails", async () => {
const { onUserDialog, createElicitation } = await setupDialog();
createElicitation.mockRejectedValue(new Error("client exploded"));
// The client failure is deliberate — capture the agent's warning
// instead of letting it hit the console.
const errorSpy = vi.fn();
(agent as any).logger = { log: () => {}, error: errorSpy };
const result = await onUserDialog(
{
@@ -734,6 +852,7 @@ describe("createSession options merging", () => {
);
expect(result).toEqual({ behavior: "cancelled" });
expect(errorSpy).toHaveBeenCalledWith(expect.stringContaining("client exploded"));
});
});
});

View File

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

34
src/tests/helpers.ts Normal file
View File

@@ -0,0 +1,34 @@
/**
* Shared test doubles. Deliberately vitest-free so `vi.mock` async factories
* can `await import("./helpers.js")` without ordering hazards; tests supply
* their own vi.fn spies via `overrides`.
*/
/** The context-usage report the base mock query returns. `rawMaxTokens`
* matches the agent's DEFAULT_CONTEXT_WINDOW so window-related assertions
* don't shift in tests that don't care about context usage. */
export const DEFAULT_CONTEXT_USAGE = { totalTokens: 0, rawMaxTokens: 200000 };
/**
* Base stub for the SDK `query()` return object, covering the surface
* ClaudeAcpAgent touches unconditionally at session creation. Tests pass
* `overrides` for the parts they assert on (spies, custom models, rejecting
* getContextUsage, …).
*
* When the agent starts calling a new SDK method on every session, add it
* here once — the getContextUsage adoption required hand-editing ~10 inline
* mocks across five files, and any missed copy didn't fail: it silently
* rerouted that test through the error-fallback branch and re-polluted test
* output.
*/
export function makeMockQuery(overrides: Record<string, unknown> = {}) {
return {
initializationResult: async () => ({ models: [] }),
setModel: async () => {},
setPermissionMode: async () => {},
supportedCommands: async () => [],
getContextUsage: async () => DEFAULT_CONTEXT_USAGE,
[Symbol.asyncIterator]: async function* () {},
...overrides,
};
}

View File

@@ -2,7 +2,11 @@ import { describe, it, expect } from "vitest";
import { randomUUID } from "crypto";
import { query } from "@anthropic-ai/claude-agent-sdk";
import type { ModelInfo } from "@anthropic-ai/claude-agent-sdk";
import { resolveModelPreference, applyAvailableModelsAllowlist } from "../acp-agent.js";
import {
resolveModelPreference,
applyAvailableModelsAllowlist,
matchResumedModel,
} from "../acp-agent.js";
// Mirrors a real `supportedModels()` response: alias rows carry
// `resolvedModel`, and "Sonnet 5" has no `major.minor` dot unlike older
@@ -68,6 +72,124 @@ describe("resolveModelPreference - resolvedModel matching", () => {
it("returns null for a preference that matches nothing", () => {
expect(resolveModelPreference(LIVE_SHAPED_MODELS, "claude-gpt-99")).toBeNull();
});
it("matches a '-1m' id-suffix preference against a '[1m]'-spelled resolvedModel", () => {
// Without hint canonicalization the exact tier misses and the substring
// tier lands on the bare 200k sibling, silently downgrading a 1M pin.
const models: ModelInfo[] = [
{
value: "sonnet",
resolvedModel: "claude-sonnet-5",
displayName: "Sonnet",
description: "Sonnet 5 · Efficient for routine tasks",
},
{
value: "sonnet[1m]",
resolvedModel: "claude-sonnet-5[1m]",
displayName: "Sonnet",
description: "Sonnet 5 with 1M context",
},
];
expect(resolveModelPreference(models, "claude-sonnet-5-1m")?.value).toBe("sonnet[1m]");
});
it("matches a '-1m'-suffix alias directly against a '[1m]'-spelled value", () => {
expect(resolveModelPreference(LIVE_SHAPED_MODELS, "opus-1m")?.value).toBe("opus[1m]");
});
// Rows without resolvedModel (older SDKs, allowlist-synthesized entries,
// option-derived lists) can't use the exact resolved tier, so the hinted
// preference must not be absorbed by the bare sibling in the substring
// tier — the tokenized tier scores the hinted row correctly instead.
it("does not let a bare sibling absorb a hinted preference when resolvedModel is absent", () => {
const models: ModelInfo[] = [
{ value: "sonnet", displayName: "Sonnet", description: "" },
{ value: "sonnet[1m]", displayName: "Sonnet", description: "" },
];
expect(resolveModelPreference(models, "claude-sonnet-5[1m]")?.value).toBe("sonnet[1m]");
expect(resolveModelPreference(models, "claude-sonnet-5-1m")?.value).toBe("sonnet[1m]");
// Bare preferences still land on the bare row via the substring tier.
expect(resolveModelPreference(models, "claude-sonnet-5")?.value).toBe("sonnet");
});
});
describe("matchResumedModel", () => {
// Environment shape from issue #845: the default resolves to Sonnet, the
// session was explicitly switched to Opus before the process restart.
const SONNET_DEFAULT_MODELS: ModelInfo[] = [
{
value: "default",
resolvedModel: "claude-sonnet-5",
displayName: "Default (recommended)",
description: "Use the default model (currently Sonnet 5)",
},
{
value: "opus",
resolvedModel: "claude-opus-4-6[1m]",
displayName: "Opus",
description: "Opus 4.6 · Most capable for complex work",
},
{
value: "sonnet",
resolvedModel: "claude-sonnet-5",
displayName: "Sonnet",
description: "Sonnet 5 · Efficient for routine tasks",
},
{
value: "sonnet[1m]",
resolvedModel: "claude-sonnet-5[1m]",
displayName: "Sonnet",
description: "Sonnet 5 with 1M context",
},
];
it("maps an explicitly-switched session's live model to its picker alias", () => {
expect(matchResumedModel(SONNET_DEFAULT_MODELS, "claude-opus-4-6").value).toBe("opus");
expect(matchResumedModel(SONNET_DEFAULT_MODELS, "claude-opus-4-6[1m]").value).toBe("opus");
});
it("keeps Default selected when the live model is what Default resolves to", () => {
expect(matchResumedModel(SONNET_DEFAULT_MODELS, "claude-sonnet-5").value).toBe("default");
});
it("prefers an exact named-row resolvedModel match over the hint-stripped Default tier", () => {
// "claude-sonnet-5[1m]" differs from Default's "claude-sonnet-5" only by
// the context hint; stripping both would misreport the explicit 1M row as
// Default (and infer the wrong context window downstream). Both hint
// spellings must land on the row regardless of which one it uses.
expect(matchResumedModel(SONNET_DEFAULT_MODELS, "claude-sonnet-5[1m]").value).toBe(
"sonnet[1m]",
);
expect(matchResumedModel(SONNET_DEFAULT_MODELS, "claude-sonnet-5-1m").value).toBe("sonnet[1m]");
});
it("normalizes the '-1m' id-suffix hint form and casing against Default's resolution", () => {
expect(matchResumedModel(LIVE_SHAPED_MODELS, "claude-opus-4-8-1m").value).toBe("default");
expect(matchResumedModel(LIVE_SHAPED_MODELS, "Claude-Opus-4-8[1M]").value).toBe("default");
});
it("prefers Default over a named row sharing the identical resolvedModel", () => {
// "opus[1m]" carries the same resolvedModel as Default; the live id can't
// tell the two apart, so a never-customized session stays on Default.
expect(matchResumedModel(LIVE_SHAPED_MODELS, "claude-opus-4-8[1m]").value).toBe("default");
});
it("ignores '[1m]' context hints when comparing against Default's resolution", () => {
// The transcript-restored model drops the "[1m]" context hint, so a
// session that never left the 1M-context default resumes as the bare id.
expect(matchResumedModel(LIVE_SHAPED_MODELS, "claude-opus-4-8").value).toBe("default");
});
it("still resolves non-default live models against the picker entries", () => {
expect(matchResumedModel(LIVE_SHAPED_MODELS, "claude-sonnet-5").value).toBe("sonnet");
expect(matchResumedModel(LIVE_SHAPED_MODELS, "claude-haiku-4-5-20251001").value).toBe("haiku");
});
it("tracks a live model with no picker counterpart verbatim", () => {
const result = matchResumedModel(LIVE_SHAPED_MODELS, "claude-gpt-99");
expect(result.value).toBe("claude-gpt-99");
expect(result.displayName).toBe("claude-gpt-99");
});
});
describe("applyAvailableModelsAllowlist - resolvedModel matching", () => {

303
src/tests/providers.test.ts Normal file
View File

@@ -0,0 +1,303 @@
import { describe, expect, it, Mock, vi, afterEach, beforeEach } from "vitest";
import { AcpClient, ClaudeAcpAgent } from "../acp-agent.js";
const mockQuery = vi.hoisted(() =>
vi.fn(() => ({
initializationResult: vi.fn().mockResolvedValue({
models: [
{ value: "id", displayName: "name", description: "description", supportsAutoMode: true },
],
}),
setModel: vi.fn(),
setPermissionMode: vi.fn(),
supportedCommands: vi.fn().mockResolvedValue([]),
})),
);
vi.mock("@anthropic-ai/claude-agent-sdk", async () => ({
...(await vi.importActual<typeof import("@anthropic-ai/claude-agent-sdk")>(
"@anthropic-ai/claude-agent-sdk",
)),
query: mockQuery,
}));
// `logout` shells out to `claude auth logout`; make execFile succeed so the
// real logout body runs (and clears provider config) without a live CLI.
vi.mock("node:child_process", async () => {
const actual = await vi.importActual<typeof import("node:child_process")>("node:child_process");
return {
...actual,
execFile: vi.fn((_file: string, _args: string[], cb: (...a: unknown[]) => void) =>
cb(null, { stdout: "", stderr: "" }),
),
};
});
describe("providers", () => {
beforeEach(() => {
vi.useFakeTimers();
});
afterEach(() => {
vi.runAllTimers();
vi.useRealTimers();
vi.unstubAllGlobals();
vi.resetAllMocks();
});
async function createAgentMock(): Promise<[ClaudeAcpAgent, Mock]> {
const connectionMock = {
sessionUpdate: async (_: any) => {},
} as AcpClient;
const agent = new ClaudeAcpAgent(connectionMock);
return [agent, mockQuery];
}
it("advertises the providers capability in initialize", async () => {
const [agent] = await createAgentMock();
const response = await agent.initialize({ protocolVersion: 1, clientCapabilities: {} });
expect(response.agentCapabilities?.providers).toEqual({});
});
it("lists a single optional 'main' provider, unconfigured by default", async () => {
const [agent] = await createAgentMock();
const response = await agent.unstable_listProviders({});
expect(response.providers).toEqual([
{
providerId: "main",
supported: ["anthropic", "bedrock", "vertex"],
required: false,
current: null,
},
]);
});
it("reflects apiType/baseUrl after set, and never echoes headers", async () => {
const [agent] = await createAgentMock();
await agent.unstable_setProvider({
providerId: "main",
apiType: "anthropic",
baseUrl: "https://gateway.example/v1",
headers: { authorization: "Bearer secret" },
});
const response = await agent.unstable_listProviders({});
expect(response.providers[0].current).toEqual({
apiType: "anthropic",
baseUrl: "https://gateway.example/v1",
});
// headers must not leak through list
expect(JSON.stringify(response.providers)).not.toContain("secret");
});
it("rejects set for an unknown providerId", async () => {
const [agent] = await createAgentMock();
await expect(
agent.unstable_setProvider({
providerId: "openai",
apiType: "anthropic",
baseUrl: "https://gateway.example",
}),
).rejects.toMatchObject({ code: -32602 });
});
it("rejects set for an unsupported apiType", async () => {
const [agent] = await createAgentMock();
await expect(
agent.unstable_setProvider({
providerId: "main",
apiType: "openai",
baseUrl: "https://gateway.example",
}),
).rejects.toMatchObject({ code: -32602 });
});
it("rejects set for an empty or non-http baseUrl", async () => {
const [agent] = await createAgentMock();
await expect(
agent.unstable_setProvider({ providerId: "main", apiType: "anthropic", baseUrl: "" }),
).rejects.toMatchObject({ code: -32602 });
await expect(
agent.unstable_setProvider({
providerId: "main",
apiType: "anthropic",
baseUrl: "ftp://nope.example",
}),
).rejects.toMatchObject({ code: -32602 });
});
it("disables the 'main' provider by clearing config and reporting current: null", async () => {
const [agent] = await createAgentMock();
await agent.unstable_setProvider({
providerId: "main",
apiType: "anthropic",
baseUrl: "https://gateway.example/v1",
});
expect((await agent.unstable_listProviders({})).providers[0].current).not.toBeNull();
await expect(agent.unstable_disableProvider({ providerId: "main" })).resolves.toEqual({});
expect((await agent.unstable_listProviders({})).providers[0].current).toBeNull();
});
it("treats disabling an unknown provider as an idempotent no-op", async () => {
const [agent] = await createAgentMock();
await expect(agent.unstable_disableProvider({ providerId: "openai" })).resolves.toEqual({});
});
it("routes anthropic provider config into session env", async () => {
const [agent, mockQuery] = await createAgentMock();
await agent.initialize({ protocolVersion: 1, clientCapabilities: {} });
await agent.unstable_setProvider({
providerId: "main",
apiType: "anthropic",
baseUrl: "https://gateway.example",
headers: { "x-api-key": "test" },
});
await agent.newSession({ cwd: process.cwd(), mcpServers: [] });
expect(mockQuery).toHaveBeenCalledWith(
expect.objectContaining({
options: expect.objectContaining({
env: expect.objectContaining({
ANTHROPIC_AUTH_TOKEN: " ",
ANTHROPIC_BASE_URL: "https://gateway.example",
ANTHROPIC_CUSTOM_HEADERS: "x-api-key: test",
}),
}),
}),
);
});
it("routes bedrock provider config into session env", async () => {
const [agent, mockQuery] = await createAgentMock();
await agent.initialize({ protocolVersion: 1, clientCapabilities: {} });
await agent.unstable_setProvider({
providerId: "main",
apiType: "bedrock",
baseUrl: "https://gateway.example",
headers: { "custom-header": "test" },
});
await agent.newSession({ cwd: process.cwd(), mcpServers: [] });
expect(mockQuery).toHaveBeenCalledWith(
expect.objectContaining({
options: expect.objectContaining({
env: expect.objectContaining({
CLAUDE_CODE_USE_BEDROCK: "1",
AWS_BEARER_TOKEN_BEDROCK: " ",
ANTHROPIC_BEDROCK_BASE_URL: "https://gateway.example",
ANTHROPIC_CUSTOM_HEADERS: "custom-header: test",
}),
}),
}),
);
});
it("accepts vertex config via _meta and routes it into session env", async () => {
const [agent, mockQuery] = await createAgentMock();
await agent.initialize({ protocolVersion: 1, clientCapabilities: {} });
await agent.unstable_setProvider({
providerId: "main",
apiType: "vertex",
baseUrl: "https://vertex.example",
headers: { "custom-header": "test" },
_meta: { claudeCode: { vertex: { projectId: "my-project", region: "us-east5" } } },
});
// list surfaces apiType/baseUrl but not the _meta extras
const listed = await agent.unstable_listProviders({});
expect(listed.providers[0].current).toEqual({
apiType: "vertex",
baseUrl: "https://vertex.example",
});
await agent.newSession({ cwd: process.cwd(), mcpServers: [] });
expect(mockQuery).toHaveBeenCalledWith(
expect.objectContaining({
options: expect.objectContaining({
env: expect.objectContaining({
CLAUDE_CODE_USE_VERTEX: "1",
ANTHROPIC_VERTEX_BASE_URL: "https://vertex.example",
ANTHROPIC_VERTEX_PROJECT_ID: "my-project",
CLOUD_ML_REGION: "us-east5",
ANTHROPIC_CUSTOM_HEADERS: "custom-header: test",
}),
}),
}),
);
});
it("rejects vertex set without _meta project/region", async () => {
const [agent] = await createAgentMock();
await expect(
agent.unstable_setProvider({
providerId: "main",
apiType: "vertex",
baseUrl: "https://vertex.example",
}),
).rejects.toMatchObject({ code: -32602 });
// partial _meta (missing region) is also rejected
await expect(
agent.unstable_setProvider({
providerId: "main",
apiType: "vertex",
baseUrl: "https://vertex.example",
_meta: { claudeCode: { vertex: { projectId: "my-project" } } } as any,
}),
).rejects.toMatchObject({ code: -32602 });
});
it("providers/set takes precedence over gateway auth", async () => {
const [agent, mockQuery] = await createAgentMock();
await agent.initialize({
protocolVersion: 1,
clientCapabilities: { auth: { terminal: true, _meta: { gateway: true } } } as any,
});
// Gateway auth first...
await agent.authenticate({
methodId: "gateway",
_meta: { gateway: { baseUrl: "https://gateway.example", headers: {} } },
});
// ...then providers/set wins.
await agent.unstable_setProvider({
providerId: "main",
apiType: "anthropic",
baseUrl: "https://provider.example",
});
await agent.newSession({ cwd: process.cwd(), mcpServers: [] });
expect(mockQuery).toHaveBeenCalledWith(
expect.objectContaining({
options: expect.objectContaining({
env: expect.objectContaining({
ANTHROPIC_BASE_URL: "https://provider.example",
}),
}),
}),
);
});
it("clears provider config on logout", async () => {
const [agent] = await createAgentMock();
// Avoids resolving the native CLI binary in claudeCliPath().
vi.stubEnv("CLAUDE_CODE_EXECUTABLE", "/bin/true");
await agent.unstable_setProvider({
providerId: "main",
apiType: "anthropic",
baseUrl: "https://provider.example",
});
expect((await agent.unstable_listProviders({})).providers[0].current).not.toBeNull();
await agent.logout({});
expect((await agent.unstable_listProviders({})).providers[0].current).toBeNull();
});
});

View File

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

View File

@@ -2,6 +2,7 @@ import { describe, it, expect, beforeEach, vi } from "vitest";
import { SessionNotification } from "@agentclientprotocol/sdk";
import type { ModelInfo } from "@anthropic-ai/claude-agent-sdk";
import type { AcpClient, ClaudeAcpAgent as ClaudeAcpAgentType } from "../acp-agent.js";
import { makeMockQuery } from "./helpers.js";
const { registerHookCallbackSpy } = vi.hoisted(() => ({
registerHookCallbackSpy: vi.fn(),
@@ -101,12 +102,11 @@ describe("session config options", () => {
applyFlagSettingsSpy = vi.fn();
(agent as unknown as { sessions: Record<string, unknown> }).sessions[SESSION_ID] = {
query: {
query: makeMockQuery({
setPermissionMode: setPermissionModeSpy,
setModel: setModelSpy,
applyFlagSettings: applyFlagSettingsSpy,
supportedCommands: async () => [],
},
}),
input: null,
cancelled: false,
permissionMode: "default",
@@ -819,6 +819,85 @@ describe("session config options", () => {
expect(setModelSpy).toHaveBeenCalledWith("claude-sonnet-4-6");
});
// Option entries carry no resolvedModel, so alias resolution must consult
// session.modelInfos — otherwise a full model id in either hint spelling
// ("[1m]"/"-1m") falls to the substring tier and lands on the bare 200k
// sibling, silently downgrading the session's context lane.
it("resolves a full model id onto its hinted row via session.modelInfos", async () => {
const session = (agent as unknown as { sessions: Record<string, any> }).sessions[SESSION_ID];
session.models = {
currentModelId: "sonnet",
availableModels: [
{ modelId: "sonnet", name: "Sonnet", description: "" },
{ modelId: "sonnet[1m]", name: "Sonnet", description: "" },
],
};
session.modelInfos = [
{
value: "sonnet",
resolvedModel: "claude-sonnet-5",
displayName: "Sonnet",
description: "",
},
{
value: "sonnet[1m]",
resolvedModel: "claude-sonnet-5[1m]",
displayName: "Sonnet",
description: "",
},
];
session.configOptions = session.configOptions.map((o: { id: string }) =>
o.id === "model"
? {
...o,
currentValue: "sonnet",
options: [
{ value: "sonnet", name: "Sonnet" },
{ value: "sonnet[1m]", name: "Sonnet" },
],
}
: o,
);
await agent.setSessionConfigOption({
sessionId: SESSION_ID,
configId: "model",
value: "claude-sonnet-5[1m]",
});
expect(setModelSpy).toHaveBeenCalledWith("sonnet[1m]");
setModelSpy.mockClear();
await agent.setSessionConfigOption({
sessionId: SESSION_ID,
configId: "model",
value: "claude-sonnet-5-1m",
});
expect(setModelSpy).toHaveBeenCalledWith("sonnet[1m]");
});
// A session can be running a model with no picker entry (resumed onto a
// model excluded by the availableModels allowlist, or a refusal
// fallback); its verbatim id is then the option's currentValue. A client
// round-tripping that reported value must not get "Invalid value".
it("accepts the reported currentValue even when it has no options entry", async () => {
const session = (agent as unknown as { sessions: Record<string, any> }).sessions[SESSION_ID];
session.models = { ...session.models, currentModelId: "claude-offlist-9" };
session.configOptions = session.configOptions.map((o: { id: string }) =>
o.id === "model" ? { ...o, currentValue: "claude-offlist-9" } : o,
);
const response = await agent.setSessionConfigOption({
sessionId: SESSION_ID,
configId: "model",
value: "claude-offlist-9",
});
expect(setModelSpy).toHaveBeenCalledWith("claude-offlist-9");
expect(response.configOptions?.find((o) => o.id === "model")?.currentValue).toBe(
"claude-offlist-9",
);
});
it("setSessionMode also syncs configOptions", async () => {
await agent.setSessionMode({ sessionId: SESSION_ID, modeId: "plan" });
@@ -848,6 +927,84 @@ describe("session config options", () => {
});
});
describe("context window on model change", () => {
beforeEach(() => {
populateSession();
});
function getSession() {
return (agent as unknown as { sessions: Record<string, any> }).sessions[SESSION_ID];
}
it("sets the window from text inference on model switch, without any getContextUsage IPC", async () => {
// getContextUsage stalls until the session's first prompt turn, so the
// switch path must never call it; the window is seeded from the text
// heuristic (here via the new model's resolvedModel) and later confirmed
// by result.modelUsage.
const session = getSession();
session.query.getContextUsage = vi.fn(async () => ({ rawMaxTokens: 967000 }));
session.modelInfos = session.modelInfos.map((m: ModelInfo) =>
m.value === "claude-sonnet-4-6" ? { ...m, resolvedModel: "claude-sonnet-5[1m]" } : m,
);
await agent.setSessionConfigOption({
sessionId: SESSION_ID,
configId: "model",
value: "claude-sonnet-4-6",
});
expect(session.query.getContextUsage).not.toHaveBeenCalled();
expect(session.contextWindowSize).toBe(1_000_000);
});
it("falls back to the default window when inference misses, without any getContextUsage IPC", async () => {
const session = getSession();
session.contextWindowSize = 1_000_000;
// Present but must NOT be called; the switch never consults it.
session.query.getContextUsage = vi.fn(async () => ({ rawMaxTokens: 967000 }));
// claude-sonnet-4-6 carries no "1m" token in its id, resolvedModel,
// displayName, or description, so inference misses → default window.
await agent.setSessionConfigOption({
sessionId: SESSION_ID,
configId: "model",
value: "claude-sonnet-4-6",
});
expect(session.query.getContextUsage).not.toHaveBeenCalled();
expect(session.contextWindowSize).toBe(200000);
});
it("does not call getContextUsage even when switching to a fresh model", async () => {
const session = getSession();
const spy = vi.fn(async () => ({ rawMaxTokens: 967000 }));
session.query.getContextUsage = spy;
await agent.setSessionConfigOption({
sessionId: SESSION_ID,
configId: "model",
value: "claude-sonnet-4-6",
});
expect(spy).not.toHaveBeenCalled();
});
it("keeps the learned window when re-asserting the current model", async () => {
const session = getSession();
session.contextWindowSize = 1_000_000;
session.query.getContextUsage = vi.fn(async () => ({ rawMaxTokens: 200000 }));
await agent.setSessionConfigOption({
sessionId: SESSION_ID,
configId: "model",
value: "claude-opus-4-5",
});
expect(session.query.getContextUsage).not.toHaveBeenCalled();
expect(session.contextWindowSize).toBe(1_000_000);
});
});
describe("auto mode availability per model", () => {
/**
* Augment the session populated by `populateSession()` with a Haiku entry

View File

@@ -6,9 +6,11 @@ import { AcpClient, ClaudeAcpAgent } from "../acp-agent.js";
import { Pushable } from "../utils.js";
import type { SDKUserMessage } from "@anthropic-ai/claude-agent-sdk";
function createMockClient(): AcpClient {
function createMockClient(
sessionUpdate: (notification: SessionNotification) => Promise<void> = async () => {},
): AcpClient {
return {
sessionUpdate: async (_notification: SessionNotification) => {},
sessionUpdate,
requestPermission: async () => ({ outcome: { outcome: "cancelled" } }),
readTextFile: async () => ({ content: "" }),
writeTextFile: async () => ({}),
@@ -330,4 +332,52 @@ describe.skipIf(!process.env.RUN_INTEGRATION_TESTS)("session load/resume lifecyc
}
expect(recordedUserChunks.some((c) => c.includes("hi"))).toBe(true);
}, 60000);
// Regression test for https://github.com/agentclientprotocol/claude-agent-acp/issues/845
// On resume the CLI restores the model the session's transcript was running,
// so loadSession must report that live model instead of recomputing the
// env/settings/default choice from scratch. Haiku is used because no account
// resolves its default there, so the restored model provably differs from
// the freshly-computed default. Requires no ANTHROPIC_MODEL env var and no
// "model" key in settings.json (either would pin the model on resume and
// mask the reconciliation this test covers).
it("ACP: loadSession reports the model the resumed session is actually running", async () => {
const agentChunks: string[] = [];
const client = createMockClient(async (notification) => {
if (notification.update.sessionUpdate === "agent_message_chunk") {
const content = notification.update.content;
if (content.type === "text") agentChunks.push(content.text);
}
});
const modelOf = (opts: { id: string; currentValue?: unknown }[] | null | undefined) =>
opts?.find((o) => o.id === "model")?.currentValue;
const agent = new ClaudeAcpAgent(client);
try {
const cwd = process.cwd();
const { sessionId, configOptions } = await agent.newSession({ cwd, mcpServers: [] });
expect(modelOf(configOptions)).not.toBe("haiku");
await agent.setSessionConfigOption({ sessionId, configId: "model", value: "haiku" });
// A real turn on Haiku, so the transcript's last assistant message —
// which is what the CLI restores the model from — records it.
await agent.prompt({
sessionId,
prompt: [{ type: "text", text: "Reply with only the word OK" }],
});
await agent.closeSession({ sessionId });
const loadResp = await agent.loadSession({ sessionId, cwd, mcpServers: [] });
expect(modelOf(loadResp.configOptions)).toBe("haiku");
// And the reported option agrees with the live session (`/context`).
agentChunks.length = 0;
await agent.prompt({ sessionId, prompt: [{ type: "text", text: "/context" }] });
const liveModel = agentChunks.join("\n").match(/\*\*Model:\*\*\s*(\S+)/)?.[1];
expect(liveModel).toContain("haiku");
} finally {
await agent.dispose();
}
}, 120000);
});

View File

@@ -1,4 +1,4 @@
import { describe, it, expect, beforeEach } from "vitest";
import { describe, it, expect, beforeEach, vi } from "vitest";
import { ClientCapabilities } from "@agentclientprotocol/sdk";
import { ImageBlockParam, ToolResultBlockParam } from "@anthropic-ai/sdk/resources";
import {
@@ -1024,7 +1024,7 @@ describe("Bash terminal output", () => {
);
// Fire PostToolUse hook with a structuredPatch in tool_response
const hook = createPostToolUseHook(mockLogger);
const hook = createPostToolUseHook();
await hook(
{
hook_event_name: "PostToolUse",
@@ -1102,7 +1102,7 @@ describe("Bash terminal output", () => {
mockLogger,
);
const hook = createPostToolUseHook(mockLogger);
const hook = createPostToolUseHook();
await hook(
{
hook_event_name: "PostToolUse",
@@ -1182,7 +1182,7 @@ describe("Bash terminal output", () => {
mockLogger,
);
const hook = createPostToolUseHook(mockLogger);
const hook = createPostToolUseHook();
await hook(
{
hook_event_name: "PostToolUse",
@@ -1203,6 +1203,36 @@ describe("Bash terminal output", () => {
expect(hookUpdate.content).toBeUndefined();
expect(hookUpdate.locations).toBeUndefined();
});
// Regression for issue #889: tool uses that never register a callback
// (TodoWrite/Task* are rendered as plan updates, not tool_calls) fire the
// PostToolUse hook too. That's expected — the hook must stay silent
// instead of spamming "No onPostToolUseHook found" to stderr.
it("should not log an error when no callback is registered for the tool use", async () => {
const errorSpy = vi.spyOn(console, "error").mockImplementation(() => {});
try {
const hook = createPostToolUseHook();
const result = await hook(
{
hook_event_name: "PostToolUse",
tool_name: "TodoWrite",
tool_input: { todos: [] },
tool_response: { success: true },
tool_use_id: "toolu_todo_no_callback",
session_id: "test-session",
transcript_path: "/tmp/test",
cwd: "/tmp",
},
"toolu_todo_no_callback",
{ signal: AbortSignal.abort() },
);
expect(result).toEqual({ continue: true });
expect(errorSpy).not.toHaveBeenCalled();
} finally {
errorSpy.mockRestore();
}
});
});
describe("post-tool-use hook sends diff content for Write tool", () => {
@@ -1239,7 +1269,7 @@ describe("Bash terminal output", () => {
mockLogger,
);
const hook = createPostToolUseHook(mockLogger);
const hook = createPostToolUseHook();
await hook(
{
hook_event_name: "PostToolUse",
@@ -1315,7 +1345,7 @@ describe("Bash terminal output", () => {
mockLogger,
);
const hook = createPostToolUseHook(mockLogger);
const hook = createPostToolUseHook();
await hook(
{
hook_event_name: "PostToolUse",
@@ -1438,7 +1468,7 @@ describe("Bash terminal output", () => {
expect((resultNotifications[1].update as any).status).toBe("completed");
// Step 3: Fire the PostToolUse hook (simulates what Claude Code SDK does)
const hook = createPostToolUseHook(mockLogger);
const hook = createPostToolUseHook();
await hook(
{
hook_event_name: "PostToolUse",
@@ -1519,7 +1549,7 @@ describe("Bash terminal output", () => {
);
// Fire hook
const hook = createPostToolUseHook(mockLogger);
const hook = createPostToolUseHook();
await hook(
{
hook_event_name: "PostToolUse",
@@ -2153,3 +2183,568 @@ describe("createTaskHook", () => {
expect(changes).toBe(0);
});
});
describe("empty message content is not emitted", () => {
const mockClient = {} as AcpClient;
const mockLogger: Logger = { log: () => {}, error: () => {} };
it("drops an empty string content instead of emitting an empty agent_message_chunk", () => {
const notifications = toAcpNotifications(
"",
"assistant",
"test-session",
{},
mockClient,
mockLogger,
);
expect(notifications).toHaveLength(0);
});
it("still emits non-empty string content", () => {
const notifications = toAcpNotifications(
"hello",
"assistant",
"test-session",
{},
mockClient,
mockLogger,
);
expect(notifications).toHaveLength(1);
expect(notifications[0].update).toMatchObject({
sessionUpdate: "agent_message_chunk",
content: { type: "text", text: "hello" },
});
});
it("drops an empty streamed text block but keeps a non-empty one", () => {
const notifications = toAcpNotifications(
[
{ type: "text", text: "" },
{ type: "text", text: "real" },
] as any,
"assistant",
"test-session",
{},
mockClient,
mockLogger,
);
expect(notifications).toHaveLength(1);
expect(notifications[0].update).toMatchObject({
sessionUpdate: "agent_message_chunk",
content: { type: "text", text: "real" },
});
});
});
describe("Agent/Task tool_result rendering from tool_use_result", () => {
const mockClient = {} as AcpClient;
const mockLogger: Logger = { log: () => {}, error: () => {} };
const TRAILER =
"\nagentId: a0e1eff08fcb6e2e8 (use SendMessage with to: 'a0e1eff08fcb6e2e8', summary: '<5-10 word recap>' to continue this agent)\n<usage>subagent_tokens: 11735\ntool_uses: 2\nduration_ms: 21237</usage>";
const agentToolUse = {
type: "tool_use" as const,
id: "toolu_agent",
name: "Task",
input: { description: "Explore", prompt: "look around" },
};
const rawResult: ToolResultBlockParam = {
type: "tool_result",
tool_use_id: "toolu_agent",
content: [{ type: "text", text: `The report.${TRAILER}` }],
};
const structured = {
status: "completed",
agentId: "a0e1eff08fcb6e2e8",
content: [{ type: "text", text: "The structured report." }],
totalTokens: 11735,
totalToolUseCount: 2,
totalDurationMs: 21237,
};
it("renders the structured subagent report instead of the raw trailer text", () => {
const update = toolUpdateFromToolResult(rawResult, agentToolUse, false, structured);
expect(update).toEqual({
content: [{ type: "content", content: { type: "text", text: "The structured report." } }],
});
});
it("strips the trailer from the raw fallback when tool_use_result is absent", () => {
// Replayed sessions and older CLIs have no structured report; the
// tail-anchored strip is the only cleanup available there.
const update = toolUpdateFromToolResult(rawResult, agentToolUse, false);
expect(update).toEqual({
content: [{ type: "content", content: { type: "text", text: "The report." } }],
});
});
it("strips only matching trailer parts and leaves unrecognized text alone", () => {
const oddResult: ToolResultBlockParam = {
type: "tool_result",
tool_use_id: "toolu_agent",
content: [
{ type: "text", text: "Report A.\n<usage>subagent_tokens: 5</usage>" },
{ type: "text", text: "Report B.\nagentId: abc-123 (for resuming)" },
{ type: "text", text: "agentId mentioned mid-text (not a trailer) stays.\nDone." },
],
};
const update = toolUpdateFromToolResult(oddResult, agentToolUse, false);
expect(update.content).toEqual([
{ type: "content", content: { type: "text", text: "Report A." } },
{ type: "content", content: { type: "text", text: "Report B." } },
{
type: "content",
content: { type: "text", text: "agentId mentioned mid-text (not a trailer) stays.\nDone." },
},
]);
});
it("leaves malformed trailers alone", () => {
// Incomplete trailers are ordinary report text, not metadata to strip.
const malformedResult: ToolResultBlockParam = {
type: "tool_result",
tool_use_id: "toolu_agent",
content: [
{ type: "text", text: "Report.\n<usage>missing closing tag" },
{ type: "text", text: "Report.\nagentId: abc-123 (missing closing paren" },
],
};
const update = toolUpdateFromToolResult(malformedResult, agentToolUse, false);
expect(update.content).toEqual([
{ type: "content", content: { type: "text", text: "Report.\n<usage>missing closing tag" } },
{
type: "content",
content: { type: "text", text: "Report.\nagentId: abc-123 (missing closing paren" },
},
]);
});
it("strips only the trailer when the report itself mentions <usage>", () => {
const result: ToolResultBlockParam = {
type: "tool_result",
tool_use_id: "toolu_agent",
content: "Grep for <usage> found 3 hits.\n<usage>subagent_tokens: 5</usage>",
};
const update = toolUpdateFromToolResult(result, agentToolUse, false);
expect(update.content).toEqual([
{ type: "content", content: { type: "text", text: "Grep for <usage> found 3 hits." } },
]);
});
it("handles adversarial trailer-shaped input in linear time", () => {
// Regression: the old regex-based strip backtracked quadratically on
// these shapes (CodeQL js/polynomial-redos) — at this size it would
// blow the test timeout rather than merely run slow.
const result: ToolResultBlockParam = {
type: "tool_result",
tool_use_id: "toolu_agent",
content: [
{ type: "text", text: "agentId: - (".repeat(20000) },
{ type: "text", text: "<usage>".repeat(30000) },
],
};
const update = toolUpdateFromToolResult(result, agentToolUse, false);
// Neither is a real trailer, so both come through unchanged.
expect(update.content).toEqual([
{ type: "content", content: { type: "text", text: "agentId: - (".repeat(20000) } },
{ type: "content", content: { type: "text", text: "<usage>".repeat(30000) } },
]);
});
it("falls back (trailer-stripped) when tool_use_result is the async_launched variant", () => {
const update = toolUpdateFromToolResult(rawResult, agentToolUse, false, {
status: "async_launched",
agentId: "a0e1eff08fcb6e2e8",
description: "Explore",
});
expect(update.content).toEqual([
{ type: "content", content: { type: "text", text: "The report." } },
]);
});
it("falls back (trailer-stripped) when the structured content array is empty", () => {
// A completed subagent can end with zero text blocks — an empty
// structured render must not beat the raw fallback.
const update = toolUpdateFromToolResult(rawResult, agentToolUse, false, {
...structured,
content: [],
});
expect(update.content).toEqual([
{ type: "content", content: { type: "text", text: "The report." } },
]);
});
it("threads options.toolUseResult through toAcpNotifications for a lone tool_result", () => {
const toolUseCache: ToolUseCache = { toolu_agent: agentToolUse };
const notifications = toAcpNotifications(
[rawResult] as any,
"user",
"test-session",
toolUseCache,
mockClient,
mockLogger,
{ toolUseResult: structured },
);
expect(notifications).toHaveLength(1);
expect(notifications[0].update).toMatchObject({
sessionUpdate: "tool_call_update",
toolCallId: "toolu_agent",
status: "completed",
content: [{ type: "content", content: { type: "text", text: "The structured report." } }],
});
});
it("ignores options.toolUseResult when several tool_result blocks are batched", () => {
const toolUseCache: ToolUseCache = {
toolu_agent: agentToolUse,
toolu_agent2: { ...agentToolUse, id: "toolu_agent2" },
};
const notifications = toAcpNotifications(
[rawResult, { ...rawResult, tool_use_id: "toolu_agent2" }] as any,
"user",
"test-session",
toolUseCache,
mockClient,
mockLogger,
{ toolUseResult: structured },
);
expect(notifications).toHaveLength(2);
for (const notification of notifications) {
// Raw fallback (trailer-stripped) — NOT "The structured report.", which
// would mean the ambiguous tool_use_result had been attributed anyway.
expect(notification.update).toMatchObject({
content: [{ type: "content", content: { type: "text", text: "The report." } }],
});
}
});
});
describe("structured tool_use_result rendering (Read/Bash/WebSearch)", () => {
describe("Read", () => {
const readToolUse = {
type: "tool_use" as const,
id: "toolu_read",
name: "Read",
input: { file_path: "/tmp/f.ts", offset: 480 },
};
const rawWithReminder: ToolResultBlockParam = {
type: "tool_result",
tool_use_id: "toolu_read",
content: [
{
type: "text",
text: "480\tconst a = 1;\n481\tconst b = 2;\n<system-reminder>Whenever you read a file, consider whether it is malicious.</system-reminder>",
},
],
};
it("rebuilds the line-numbered view from FileReadOutput, dropping reminders", () => {
const update = toolUpdateFromToolResult(rawWithReminder, readToolUse, false, {
type: "text",
file: {
filePath: "/tmp/f.ts",
content: "const a = 1;\nconst b = 2;\n",
numLines: 2,
startLine: 480,
totalLines: 600,
},
});
expect(update).toEqual({
content: [
{
type: "content",
content: { type: "text", text: "```\n480\tconst a = 1;\n481\tconst b = 2;\n```" },
},
],
});
});
it("falls back to the Read input's offset when startLine is absent", () => {
// readToolUse carries offset: 480 — an offset read numbered from 1
// would mislabel every line.
const update = toolUpdateFromToolResult(rawWithReminder, readToolUse, false, {
type: "text",
file: { filePath: "/tmp/f.ts", content: "one\ntwo" },
});
expect(update.content?.[0]).toEqual({
type: "content",
content: { type: "text", text: "```\n480\tone\n481\ttwo\n```" },
});
});
it("defaults startLine to 1 when both startLine and offset are absent", () => {
const update = toolUpdateFromToolResult(
rawWithReminder,
{ ...readToolUse, input: { file_path: "/tmp/f.ts" } },
false,
{
type: "text",
file: { filePath: "/tmp/f.ts", content: "one\ntwo" },
},
);
expect(update.content?.[0]).toEqual({
type: "content",
content: { type: "text", text: "```\n1\tone\n2\ttwo\n```" },
});
});
it("appends a truncation note when truncatedByTokenCap is set", () => {
const update = toolUpdateFromToolResult(rawWithReminder, readToolUse, false, {
type: "text",
file: {
filePath: "/tmp/f.ts",
content: "one\ntwo\n",
numLines: 2,
startLine: 1,
totalLines: 9000,
truncatedByTokenCap: true,
},
});
expect(update.content?.[0]).toEqual({
type: "content",
content: {
type: "text",
text: "```\n1\tone\n2\ttwo\n[File truncated: showing 2 of 9000 lines]\n```",
},
});
});
it("falls back to raw content for non-text variants", () => {
const update = toolUpdateFromToolResult(rawWithReminder, readToolUse, false, {
type: "image",
file: { base64: "aGk=", type: "image/png", originalSize: 3 },
});
// Raw path: markdown-escaped raw text (reminder included — image reads
// don't carry reminders in practice).
expect(update.content).toHaveLength(1);
expect((update.content?.[0] as any).content.text).toContain("const a = 1;");
});
});
describe("Bash", () => {
const bashToolUse = {
type: "tool_use" as const,
id: "toolu_bash",
name: "Bash",
input: { command: "git push" },
};
const HINT =
"\n[This command modified 1 file you've previously read: src/foo.ts. Call Read before editing.]";
const rawWithHint: ToolResultBlockParam = {
type: "tool_result",
tool_use_id: "toolu_bash",
content: `pushed ok${HINT}`,
};
const structured = {
stdout: "pushed ok",
stderr: "",
interrupted: false,
isImage: false,
};
it("prefers structured stdout/stderr over raw text with model-directed hints", () => {
const update = toolUpdateFromToolResult(rawWithHint, bashToolUse, true, structured);
expect(update._meta?.terminal_output).toEqual({
terminal_id: "toolu_bash",
data: "pushed ok",
});
expect(update._meta?.terminal_exit).toEqual({
terminal_id: "toolu_bash",
exit_code: 0,
signal: null,
});
});
it("joins stderr after stdout like the code-execution path", () => {
const update = toolUpdateFromToolResult(rawWithHint, bashToolUse, false, {
...structured,
stderr: "warning: something",
});
expect(update.content).toEqual([
{
type: "content",
content: { type: "text", text: "```console\npushed ok\nwarning: something\n```" },
},
]);
});
it("falls back to raw text for backgrounded commands", () => {
const update = toolUpdateFromToolResult(rawWithHint, bashToolUse, true, {
...structured,
stdout: "",
backgroundTaskId: "bash_1",
});
expect(update._meta?.terminal_output?.data).toBe(`pushed ok${HINT}`);
});
it("falls back to the raw content array for image output", () => {
const imageResult: ToolResultBlockParam = {
type: "tool_result",
tool_use_id: "toolu_bash",
content: [
{ type: "image", source: { type: "base64", data: "aGk=", media_type: "image/png" } },
],
};
const update = toolUpdateFromToolResult(imageResult, bashToolUse, true, {
...structured,
isImage: true,
});
expect(update.content).toEqual([
{
type: "content",
content: { type: "image", data: "aGk=", mimeType: "image/png" },
},
]);
});
it("re-establishes the abort notice and a failing exit code for interrupted commands", () => {
const update = toolUpdateFromToolResult(rawWithHint, bashToolUse, true, {
...structured,
stdout: "partial output",
interrupted: true,
});
expect(update._meta?.terminal_output).toEqual({
terminal_id: "toolu_bash",
data: "partial output\n[Command was aborted before completion]",
});
expect(update._meta?.terminal_exit).toEqual({
terminal_id: "toolu_bash",
exit_code: 1,
signal: null,
});
});
it("re-establishes the truncation note and persisted path for too-large outputs", () => {
const update = toolUpdateFromToolResult(rawWithHint, bashToolUse, true, {
...structured,
stdout: "clipped stdout",
persistedOutputPath: "/tmp/tool-results/abc.txt",
persistedOutputSize: 38100,
});
expect(update._meta?.terminal_output).toEqual({
terminal_id: "toolu_bash",
data: "clipped stdout\n[Output truncated (38100 bytes total): full output saved to /tmp/tool-results/abc.txt]",
});
});
});
describe("WebSearch", () => {
const searchToolUse = {
type: "tool_use" as const,
id: "toolu_search",
name: "WebSearch",
input: { query: "npm sigstore bug" },
};
const rawDump: ToolResultBlockParam = {
type: "tool_result",
tool_use_id: "toolu_search",
content:
'Web search results for query: "npm sigstore bug"\n\nLinks: [{"title":"Issue #9722","url":"https://github.com/npm/cli/issues/9722"}]',
};
it("renders hits as Title (url) lines from WebSearchOutput", () => {
const update = toolUpdateFromToolResult(rawDump, searchToolUse, false, {
query: "npm sigstore bug",
durationSeconds: 5.5,
results: [
"I found one relevant issue:",
{
tool_use_id: "srvtoolu_1",
content: [
{ title: "Issue #9722", url: "https://github.com/npm/cli/issues/9722" },
{ title: "sigstore-js", url: "https://github.com/sigstore/sigstore-js" },
],
},
],
});
expect(update).toEqual({
content: [
{
type: "content",
content: {
type: "text",
text: "I found one relevant issue:\nIssue #9722 (https://github.com/npm/cli/issues/9722)\nsigstore-js (https://github.com/sigstore/sigstore-js)",
},
},
],
});
});
it("falls back to the raw dump when tool_use_result is absent", () => {
const update = toolUpdateFromToolResult(rawDump, searchToolUse, false);
expect((update.content?.[0] as any).content.text).toContain("Web search results for query");
});
it("skips off-spec hits instead of rendering undefined fields", () => {
const update = toolUpdateFromToolResult(rawDump, searchToolUse, false, {
query: "npm sigstore bug",
durationSeconds: 5.5,
results: [
{
tool_use_id: "srvtoolu_1",
content: [
{ error_code: "provider_error" },
{ title: "Issue #9722", url: "https://github.com/npm/cli/issues/9722" },
],
},
],
});
expect(update).toEqual({
content: [
{
type: "content",
content: {
type: "text",
text: "Issue #9722 (https://github.com/npm/cli/issues/9722)",
},
},
],
});
});
it("falls back to the raw dump when every hit is off-spec", () => {
const update = toolUpdateFromToolResult(rawDump, searchToolUse, false, {
query: "npm sigstore bug",
durationSeconds: 5.5,
results: [{ tool_use_id: "srvtoolu_1", content: [{ error_code: "provider_error" }] }],
});
expect((update.content?.[0] as any).content.text).toContain("Web search results for query");
});
});
});

View File

@@ -8,10 +8,13 @@ import {
import { HookCallback } from "@anthropic-ai/claude-agent-sdk";
import {
AgentInput,
AgentOutput,
AskUserQuestionInput,
BashInput,
BashOutput,
FileEditInput,
FileReadInput,
FileReadOutput,
FileWriteInput,
GlobInput,
GrepInput,
@@ -22,6 +25,7 @@ import {
TodoWriteInput,
WebFetchInput,
WebSearchInput,
WebSearchOutput,
} from "@anthropic-ai/claude-agent-sdk/sdk-tools.js";
import {
ImageBlockParam,
@@ -56,7 +60,6 @@ import {
BetaWebSearchToolResultBlockParam,
} from "@anthropic-ai/sdk/resources/beta.mjs";
import path from "node:path";
import { Logger } from "./acp-agent.js";
/**
* Union of all possible content types that can appear in tool results from the Anthropic SDK.
@@ -486,6 +489,88 @@ export function toolInfoFromToolUse(
}
}
/**
* Narrow the untyped message-level `tool_use_result` toward a per-tool Output
* shape: rejects everything but a plain non-null object (arrays pass a bare
* `typeof === "object"` check, so they're excluded here). The returned value
* is only *nominally* typed — it arrives over the wire from arbitrary CLI
* versions, so each caller must still guard the specific fields it reads
* before trusting them.
*/
function structuredResult<T extends object>(toolUseResult: unknown): T | undefined {
return toolUseResult !== null &&
typeof toolUseResult === "object" &&
!Array.isArray(toolUseResult)
? (toolUseResult as T)
: undefined;
}
/**
* Strip the model-directed trailer from a raw Agent/Task tool_result text:
* a `<usage>…</usage>` totals block and/or an
* `agentId: <id> (use SendMessage …)` continuation line at the end of the
* text. Both patterns are tail-anchored and independent (older CLIs emit
* variants with only one of them), so a format change makes them stop
* matching rather than mangle the report.
*/
function stripAgentTrailer(text: string): string {
return stripAgentIdLine(stripUsageBlock(text));
}
const USAGE_OPEN = "<usage>";
const USAGE_CLOSE = "</usage>";
/** Remove a trailing `<usage>…</usage>` block, plus trailing whitespace and
* one preceding newline. Matches from the *last* `<usage>` so a report that
* merely mentions the marker earlier isn't truncated at the mention. */
function stripUsageBlock(text: string): string {
const body = text.trimEnd();
if (!body.endsWith(USAGE_CLOSE)) {
return text;
}
const open = body.lastIndexOf(USAGE_OPEN, body.length - USAGE_CLOSE.length - USAGE_OPEN.length);
if (open === -1) {
return text;
}
return body.slice(0, open > 0 && body[open - 1] === "\n" ? open - 1 : open);
}
/** The continuation line, anchored to a whole line so the regex has a single
* start position and no ambiguous repetition (`[\w-]+` can't consume the
* following space, `[^)]*` can't consume the closing paren) — it runs in
* linear time on any input. */
const AGENT_ID_LINE = /^agentId: [\w-]+ \([^)]*\)$/;
/** Remove a final `agentId: <id> (…)` line, plus trailing whitespace and the
* newline that preceded the line. */
function stripAgentIdLine(text: string): string {
const body = text.trimEnd();
const lineStart = body.lastIndexOf("\n") + 1;
if (!AGENT_ID_LINE.test(body.slice(lineStart))) {
return text;
}
return body.slice(0, Math.max(lineStart - 1, 0));
}
/** Apply {@link stripAgentTrailer} across a raw tool_result `content` (plain
* string or block array), leaving non-text blocks untouched. */
function stripAgentTrailerFromContent(content: unknown): unknown {
if (typeof content === "string") {
return stripAgentTrailer(content);
}
if (Array.isArray(content)) {
return content.map((block) =>
block !== null &&
typeof block === "object" &&
block.type === "text" &&
typeof block.text === "string"
? { ...block, text: stripAgentTrailer(block.text) }
: block,
);
}
return content;
}
export function toolUpdateFromToolResult(
toolResult:
| ToolResultBlockParam
@@ -500,6 +585,7 @@ export function toolUpdateFromToolResult(
| BetaToolSearchToolResultBlockParam,
toolUse: any | undefined,
supportsTerminalOutput: boolean = false,
toolUseResult?: unknown,
): ToolUpdate {
if (
"is_error" in toolResult &&
@@ -512,8 +598,63 @@ export function toolUpdateFromToolResult(
return toAcpContentUpdate(toolResult.content, true);
}
// Shared raw-text fallback: renders the tool_result content the model saw.
// The structured cases below fall back to this when `tool_use_result` is
// absent or fails its shape guard (older CLIs, replayed sessions).
const rawContentUpdate = () =>
toAcpContentUpdate(toolResult.content, "is_error" in toolResult ? toolResult.is_error : false);
switch (toolUse?.name) {
case "Read":
case "Read": {
// The raw tool_result text is the model-facing view: line-numbered
// content plus any appended <system-reminder> blocks (malicious-code
// checks, memory staleness notes, …) that clients shouldn't see. The
// structured FileReadOutput carries the clean content — rebuild the
// line-numbered view from it. Non-text variants (image/notebook/pdf)
// fall back to the raw content blocks, which already render fine.
const structuredRead = structuredResult<FileReadOutput>(toolUseResult);
if (
structuredRead?.type === "text" &&
typeof structuredRead.file?.content === "string" &&
// An empty file has nothing to line-number; keep the raw view (the
// model-facing "file is empty" note) rather than a phantom blank line.
structuredRead.file.content.length > 0
) {
// startLine is typed non-optional but defended anyway; a Read's
// `offset` input is the same 1-based starting line, so it beats a
// blind 1 when an emitter omits the field.
const startLine =
structuredRead.file.startLine ??
(toolUse.input as FileReadInput | undefined)?.offset ??
1;
// A trailing newline is a line terminator, not an extra line — don't
// number a phantom empty line after it.
let numbered = structuredRead.file.content
.replace(/\n$/, "")
.split("\n")
.map((line, i) => `${startLine + i}\t${line}`)
.join("\n");
// The model-facing truncation banner doesn't survive reconstruction
// from file.content (the SDK flag exists for exactly this case) —
// re-establish it so a partial first page doesn't read as the whole
// file.
if (structuredRead.file.truncatedByTokenCap) {
const { numLines, totalLines } = structuredRead.file;
const detail =
typeof numLines === "number" && typeof totalLines === "number"
? `: showing ${numLines} of ${totalLines} lines`
: "";
numbered += `\n[File truncated${detail}]`;
}
return {
content: [
{
type: "content",
content: { type: "text", text: markdownEscape(numbered) },
},
],
};
}
if (Array.isArray(toolResult.content) && toolResult.content.length > 0) {
return {
content: toolResult.content.map((content: any) => ({
@@ -541,6 +682,7 @@ export function toolUpdateFromToolResult(
};
}
return {};
}
case "Bash": {
const result = toolResult.content;
@@ -548,15 +690,57 @@ export function toolUpdateFromToolResult(
const isError = "is_error" in toolResult && toolResult.is_error;
// Extract output and exit code from either format:
// 1. BetaBashCodeExecutionResultBlock: { type: "bash_code_execution_result", stdout, stderr, return_code }
// 2. Plain string content from a regular tool_result
// 3. Array content (e.g. [{ type: "text", text: "..." }] for stdout,
// 1. The structured BashOutput (message-level tool_use_result): its
// stdout/stderr exclude the model-directed suffixes the raw text
// carries (stale-read hints, gh rate-limit hints, the
// persisted-output wrapper for too-large outputs — the interruption
// and truncation facts those carried are re-established from the
// structured flags below). Skipped for image output (the raw content
// array carries the actual image blocks) and backgrounded commands
// (the raw text carries the background-task notice; structured
// stdout may be empty).
// 2. BetaBashCodeExecutionResultBlock: { type: "bash_code_execution_result", stdout, stderr, return_code }
// 3. Plain string content from a regular tool_result
// 4. Array content (e.g. [{ type: "text", text: "..." }] for stdout,
// or [{ type: "image", source: {...} }] when the local Bash tool
// produces an image, e.g. piping a base64 data URI)
let output = "";
let exitCode = isError ? 1 : 0;
const structuredBash = structuredResult<BashOutput>(toolUseResult);
if (
structuredBash &&
typeof structuredBash.stdout === "string" &&
typeof structuredBash.stderr === "string" &&
!structuredBash.isImage &&
structuredBash.backgroundTaskId === undefined
) {
output = [structuredBash.stdout, structuredBash.stderr].filter(Boolean).join("\n");
// Two raw-text notices don't survive the structured stdout/stderr —
// re-establish them so the client isn't shown a clean-looking result:
// the CLI appends its abort marker only to the model-facing text, and
// an aborted command isn't a success, so synthesize a failing exit
// code when the result wasn't already an error.
if (structuredBash.interrupted) {
output = [output, "[Command was aborted before completion]"].filter(Boolean).join("\n");
exitCode = 1;
}
// Structured stdout is clipped (~30k chars) when the full output was
// persisted to disk; without this note the clip is silent and the
// path to the full output is lost.
if (typeof structuredBash.persistedOutputPath === "string") {
const size =
typeof structuredBash.persistedOutputSize === "number"
? ` (${structuredBash.persistedOutputSize} bytes total)`
: "";
output = [
output,
`[Output truncated${size}: full output saved to ${structuredBash.persistedOutputPath}]`,
]
.filter(Boolean)
.join("\n");
}
} else if (
result &&
typeof result === "object" &&
"type" in result &&
@@ -619,6 +803,45 @@ export function toolUpdateFromToolResult(
return {};
}
case "Agent":
case "Task": {
// The raw tool_result text ends with a model-directed trailer (an
// `agentId: … (use SendMessage …)` line plus a `<usage>` totals block)
// that ACP clients shouldn't see. The message-level `tool_use_result`
// carries the structured AgentOutput whose `content` is the subagent's
// report without the trailer — render from it when present (per the SDK
// 0.3.207 guidance) and fall back to the raw text otherwise (older CLIs,
// replayed sessions).
// Narrowed to the full union, not the completed variant — the status
// check below is what discriminates it, and pre-narrowing would let
// future field reads typecheck against a variant the runtime value may
// not be.
const structured = structuredResult<AgentOutput>(toolUseResult);
if (
structured?.status === "completed" &&
Array.isArray(structured.content) &&
// A completed subagent can end with zero text blocks; an empty
// structured render would beat the raw fallback for no benefit.
structured.content.length > 0
) {
return toAcpContentUpdate(
structured.content,
"is_error" in toolResult ? toolResult.is_error : false,
);
}
// No structured report to render from (replayed sessions —
// getSessionMessages doesn't expose the transcript's toolUseResult —
// and older CLIs). The SDK advises rendering from tool_use_result
// instead of parsing the text, but with no structured value the
// tail-anchored strip is the only cleanup available; if the trailer
// format changes it simply stops matching and the full raw text
// renders, no worse than before.
return toAcpContentUpdate(
stripAgentTrailerFromContent(toolResult.content),
"is_error" in toolResult ? toolResult.is_error : false,
);
}
case "Edit": // Edit is handled in hooks
case "Write": {
return {};
@@ -628,15 +851,54 @@ export function toolUpdateFromToolResult(
return { title: "Exited Plan Mode" };
}
case "WebSearch": {
// The raw tool_result text is a model-directed dump ("Web search
// results for query: …\n\nLinks: [{…json…}]"). The structured
// WebSearchOutput carries the hits — render them the way server-side
// web_search_result blocks render ("Title (url)").
const structuredSearch = structuredResult<WebSearchOutput>(toolUseResult);
if (structuredSearch && Array.isArray(structuredSearch.results)) {
const lines = structuredSearch.results.flatMap((entry) =>
typeof entry === "string"
? [entry]
: Array.isArray(entry?.content)
? // tool_use_result arrives untyped across CLI version skew —
// skip off-spec hits rather than rendering
// "undefined (undefined)" lines.
entry.content.flatMap((hit) =>
typeof hit?.title === "string" && typeof hit?.url === "string"
? [formatWebSearchHit(hit)]
: [],
)
: [],
);
if (lines.length > 0) {
return {
content: [
{
type: "content",
content: { type: "text", text: lines.join("\n") },
},
],
};
}
}
return rawContentUpdate();
}
default: {
return toAcpContentUpdate(
toolResult.content,
"is_error" in toolResult ? toolResult.is_error : false,
);
return rawContentUpdate();
}
}
}
/** One display format for a web-search hit, shared by the structured
* WebSearchOutput render and the server-side `web_search_result` block so
* the two paths can't drift. */
function formatWebSearchHit(hit: { title: string; url: string }): string {
return `${hit.title} (${hit.url})`;
}
function toAcpContentUpdate(
content: any,
isError: boolean = false,
@@ -711,7 +973,7 @@ function toAcpContentBlock(content: ToolResultContent, isError: boolean): Conten
`Error: ${content.error_code}${content.error_message ? ` - ${content.error_message}` : ""}`,
);
case "web_search_result":
return wrapText(`${content.title} (${content.url})`);
return wrapText(formatWebSearchHit(content));
case "web_search_tool_result_error":
return wrapText(`Error: ${content.error_code}`);
case "web_fetch_result":
@@ -954,12 +1216,7 @@ export const registerHookCallback = (
/* A callback for Claude Code that is called when receiving a PostToolUse hook */
export const createPostToolUseHook =
(
logger: Logger = console,
options?: {
onEnterPlanMode?: () => Promise<void>;
},
): HookCallback =>
(options?: { onEnterPlanMode?: () => Promise<void> }): HookCallback =>
async (input: any, toolUseID: string | undefined): Promise<{ continue: boolean }> => {
if (input.hook_event_name === "PostToolUse") {
// Handle EnterPlanMode tool - notify client of mode change after successful execution
@@ -971,11 +1228,8 @@ export const createPostToolUseHook =
const onPostToolUseHook = toolUseCallbacks[toolUseID]?.onPostToolUseHook;
if (onPostToolUseHook) {
await onPostToolUseHook(toolUseID, input.tool_input, input.tool_response);
delete toolUseCallbacks[toolUseID]; // Cleanup after execution
} else {
logger.error(`No onPostToolUseHook found for tool use ID: ${toolUseID}`);
delete toolUseCallbacks[toolUseID];
}
delete toolUseCallbacks[toolUseID]; // Cleanup after execution
}
}
return { continue: true };