@agentclientprotocol/claude-agent-acp 0.110.1-preview.5 → 0.110.2-preview.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { type HasConnectionContext, type McpServer, type McpServerAcp } from "@agentclientprotocol/sdk/unstable";
2
- import type { McpHttpServerConfig, McpServerConfig } from "@anthropic-ai/claude-agent-sdk";
2
+ import type { HookCallbackMatcher, McpHttpServerConfig, McpServerConfig } from "@anthropic-ai/claude-agent-sdk";
3
3
  /**
4
4
  * Makes the SDK config of an MCP server that the client serves over the ACP
5
5
  * connection (`"type": "acp"`): {@link McpOverAcp.sdkConfig} for a connection.
@@ -44,10 +44,83 @@ export declare function sdkMcpServers(servers: readonly McpServer[] | null | und
44
44
  * `MCP_PROTOCOL_NEGOTIATION=legacy` or its
45
45
  * `tengu_mcp_protocol_negotiation_http` flag turns that off. Then it sends
46
46
  * `initialize`, and the server is listed as failed.
47
+ *
48
+ * An `mcp/message` request names the ACP session and the tool call that it is
49
+ * sent for (`sessionId` and `toolCallId`), when the adapter knows them. An
50
+ * HTTP request does not say them. It carries the id of its tool use (see
51
+ * {@link TOOL_USE_ID_META}), and the adapter learns each tool use of an `acp`
52
+ * server's tool from a PreToolUse hook, before Claude Code runs the tool
53
+ * ({@link toolUseHooks}). Both cores report a tool call under the id of its
54
+ * tool use, so that id is the `toolCallId`.
55
+ *
56
+ * When a `session/update` reported a tool call of that id ({@link sending}),
57
+ * the request names the session of that report, and the tool call. Before
58
+ * the report, and without one, it names by the agent that runs the tool:
59
+ *
60
+ * - the main conversation: the root session, and the tool call;
61
+ * - a subagent with an announced child session: that session, and the tool
62
+ * call;
63
+ * - a subagent of a client without child sessions: the root session, which
64
+ * reports the subagent's tool calls, and the tool call;
65
+ * - an agent that never gets a child session: the root session, whose work
66
+ * it does, and no tool call, since no session reports one. These are an
67
+ * agent that a workflow runs, and any agent of a client without child
68
+ * sessions that the core does not know as a subagent;
69
+ * - a subagent whose child session is not announced yet, because the session
70
+ * has not read its start or a replay holds its `subagent_update`: the
71
+ * request waits for that announcement, for at most
72
+ * {@link announcementWaitMs}, and then names the child session and the tool
73
+ * call. When the time passes first, it names nothing;
74
+ * - any other agent: nothing, without a wait. The core forgot its child
75
+ * session, or no `subagent_update` announces one for it.
76
+ *
77
+ * The root session never stands in for a child session.
78
+ *
79
+ * A request names neither when one of these holds:
80
+ *
81
+ * - it has no tool use id, as `server/discover` and `tools/list` have none;
82
+ * - no PreToolUse hook reported its tool use, as for a server that a resume
83
+ * gave the session's running query ({@link sessionServersChanged}), or the
84
+ * tool use ended;
85
+ * - the client closed the root session, or its last setup request did not
86
+ * declare the request's server;
87
+ * - the session of the agent is a child session that no `subagent_update`
88
+ * announced to the client: one of AIR's draft, one that a conversation
89
+ * reset made the core forget, or one whose announcement did not go out
90
+ * within {@link announcementWaitMs};
91
+ * - the agent has the type of a workflow's agents, the client gets child
92
+ * sessions, and the session defines an agent of that name: the agent can
93
+ * be a subagent whose child session is not announced yet.
94
+ *
95
+ * Nothing orders the tool call's report before the request. Claude Code
96
+ * streams a tool use before it runs the tool, but the session can read its
97
+ * stream after the HTTP request arrives. The request then names a tool call
98
+ * that the client does not hold yet.
47
99
  */
48
100
  export declare class McpOverAcp {
49
101
  private readonly caller;
50
102
  private readonly bridge;
103
+ /** The `acp` servers of each active session that has any, or whose query started with any. */
104
+ private readonly sessions;
105
+ /** The child sessions that a `subagent_update` announced to the client (see {@link sending}). */
106
+ private readonly children;
107
+ /** The tool uses of `acp` servers' tools that Claude Code runs, by id (see {@link toolUseHooks}). */
108
+ private readonly toolUses;
109
+ /**
110
+ * The session of each tool call that the client holds without a final
111
+ * status, by tool call id (see {@link sending}).
112
+ */
113
+ private readonly toolCalls;
114
+ /**
115
+ * The requests that wait for the announcement of their agent's child
116
+ * session, by tool use id: what ends each one's wait (see {@link held}).
117
+ */
118
+ private readonly waiting;
119
+ /**
120
+ * How long a request waits for the announcement of its agent's child
121
+ * session (see {@link ANNOUNCEMENT_WAIT_MS}). Mutable so tests can change it.
122
+ */
123
+ announcementWaitMs: number;
51
124
  /**
52
125
  * Hands an `mcp/message` notification of the client (such as the progress
53
126
  * of a tool call) to the HTTP response of the MCP request that it names. An
@@ -63,5 +136,145 @@ export declare class McpOverAcp {
63
136
  * connection is closed. The next call tries to open the listener again.
64
137
  */
65
138
  sdkConfig(client: HasConnectionContext, server: McpServerAcp): Promise<McpHttpServerConfig>;
139
+ /**
140
+ * A setup request (`session/new`, `load`, `resume` or `fork`) made the
141
+ * session `sessionId` active with `servers`, on a query that started with
142
+ * the hooks of {@link toolUseHooks} for them.
143
+ */
144
+ sessionStarted(sessionId: string, servers: readonly McpServer[] | null | undefined): void;
145
+ /**
146
+ * A setup request gave the active session `sessionId` the servers
147
+ * `servers` in place of its earlier ones, on its running query. Returns
148
+ * the names of the `acp` servers among them that the query did not start
149
+ * with. Its hooks cannot change, so no hook reports the tool uses of these
150
+ * servers, and their requests name no session until the session's next
151
+ * query starts.
152
+ */
153
+ sessionServersChanged(sessionId: string, servers: readonly McpServer[] | null | undefined): string[];
154
+ /**
155
+ * The client ended the session `sessionId` (`session/close`, or a request
156
+ * that closes it too, such as `session/delete`): its requests and those of
157
+ * its child sessions name no session from now on. Forgets its servers, its
158
+ * announced children, its tool uses and its tool calls.
159
+ */
160
+ sessionClosed(sessionId: string): void;
161
+ /**
162
+ * Takes a session update that goes to the client. A `subagent_update`
163
+ * announces a child session. A `tool_call`, or a `tool_call_update` with a
164
+ * status, reports a tool call of its session, which is kept until an update
165
+ * of that session or of another one under the same root gives the tool call
166
+ * a final status. That update also ends the tool use of the same id. An
167
+ * announcement, and a tool call's report, end the wait of the requests
168
+ * that they let name a session (see {@link held}).
169
+ *
170
+ * Only the tool calls of an active session with `acp` servers
171
+ * ({@link sessionStarted}) and of its announced child sessions are kept. The
172
+ * tool calls of a child session of AIR's draft, which a `subagent_spawned`
173
+ * announces, are not.
174
+ */
175
+ sending(notification: SentUpdate): void;
176
+ /**
177
+ * The hooks of the query of the root session `sessionId`, which starts with
178
+ * `servers`, or undefined when none of them is an `acp` server: such a
179
+ * query has no MCP request to name a session for. They record each tool
180
+ * use of a tool of the `acp` servers before Claude Code runs it
181
+ * (PreToolUse), with the session of the agent that runs it (see the class
182
+ * doc), until the tool returned or failed (PostToolUse,
183
+ * PostToolUseFailure). Claude Code runs them for no other tool, and they
184
+ * make no decision.
185
+ *
186
+ * A tool use that neither hook ends, such as one that Claude Code does not
187
+ * run after all, stays until its tool call gets a final status
188
+ * ({@link sending}) or the client closes the session
189
+ * ({@link sessionClosed}).
190
+ */
191
+ toolUseHooks(sessionId: string, servers: readonly McpServer[] | null | undefined, agents: SessionAgents): Record<"PreToolUse" | "PostToolUse" | "PostToolUseFailure", HookCallbackMatcher> | undefined;
192
+ /** The root session of the announced child session `sessionId`, or `sessionId` itself. */
193
+ private rootOf;
194
+ /**
195
+ * Forgets the tool use `id` and its tool call, when they are of the root
196
+ * session `root`, and ends the wait of the tool use's requests. A fork
197
+ * replays the tool calls of its original under their ids: its updates
198
+ * leave those of the original alone.
199
+ */
200
+ private toolEnded;
201
+ /**
202
+ * Resolves when a request of the tool use `toolUseId` need wait no longer
203
+ * for the announcement of its agent's child session: {@link release} ended
204
+ * the wait, or {@link announcementWaitMs} passed. It never rejects.
205
+ *
206
+ * Nothing that an announcement needs waits for the request. The hook that
207
+ * recorded the tool use has answered. The session reads Claude Code's
208
+ * stream whatever its tools do, and Claude Code wrote the subagent's start
209
+ * to that stream before it ran the subagent's tool. A replay ends without
210
+ * the request too.
211
+ */
212
+ private held;
213
+ /**
214
+ * Ends the wait of the requests of the tool use `toolUseId` ({@link held}):
215
+ * its agent's child session is announced, its tool call is reported, or it
216
+ * ended, also with the close of its session. Each request then names what
217
+ * it can.
218
+ */
219
+ private release;
220
+ /**
221
+ * The session and tool call that the `mcp/message` request of the MCP
222
+ * request `request` names, or undefined when it names none (see the class
223
+ * doc). A request of a subagent whose child session is not announced yet
224
+ * resolves once it is, or names nothing after {@link announcementWaitMs}.
225
+ * It neither throws nor rejects: the bridge would answer Claude Code with
226
+ * HTTP 500 instead of sending the request.
227
+ *
228
+ * It does not read `request.connection`. Each agent app (`v1AgentApp`,
229
+ * `v2AgentApp`) makes its own `McpOverAcp` for its one connection, so every
230
+ * request and every recorded session is of that connection.
231
+ */
232
+ private attribution;
233
+ /**
234
+ * What a request of the tool use `toolUseId` to the server `serverId` names
235
+ * now, or `unannounced` when it names nothing because the child session of
236
+ * its agent, which a `subagent_update` announces, is not announced yet.
237
+ */
238
+ private named;
66
239
  }
240
+ /**
241
+ * What {@link McpOverAcp.toolUseHooks} asks the core of a session about the
242
+ * agents of its query.
243
+ */
244
+ export type SessionAgents = {
245
+ /**
246
+ * Whether the client gets a child session per subagent. Without child
247
+ * sessions, the root session's updates carry the work of every agent.
248
+ */
249
+ childSessions: boolean;
250
+ /**
251
+ * The session whose updates report the tool calls of the subagent `agentId`
252
+ * as the core routes them now: its announced child session, or the root
253
+ * session for a client without child sessions. Undefined for an agent that
254
+ * the core does not know as a subagent (it has not read its
255
+ * `task_started`, which an agent that a workflow runs never gets), and for
256
+ * one whose child session is not announced.
257
+ */
258
+ reporting(agentId: string): string | undefined;
259
+ /**
260
+ * The id of the child session that a `subagent_update` announces for the
261
+ * subagent `agentId`, whether it went out yet or not. Undefined for a
262
+ * client that gets no child session from a `subagent_update`: one without
263
+ * child sessions, or with those of AIR's draft.
264
+ */
265
+ childSessionId(agentId: string): string | undefined;
266
+ /** Whether the session had an agent definition of the name `name` when its query started. */
267
+ definesAgent(name: string): boolean;
268
+ };
269
+ /** A session update that goes to the client, as far as {@link McpOverAcp.sending} reads it. */
270
+ type SentUpdate = {
271
+ sessionId: string;
272
+ update: {
273
+ sessionUpdate: string;
274
+ sessionId?: unknown;
275
+ toolCallId?: unknown;
276
+ status?: unknown;
277
+ };
278
+ };
279
+ export {};
67
280
  //# sourceMappingURL=mcp-servers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-servers.d.ts","sourceRoot":"","sources":["../src/mcp-servers.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACd,KAAK,YAAY,EAClB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAE3F;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,YAAY,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAEtF;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAElF,wEAAwE;AACxE,MAAM,MAAM,aAAa,GAAG;IAC1B,qEAAqE;IACrE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IACzC,2DAA2D;IAC3D,QAAQ,EAAE,iBAAiB,EAAE,CAAC;CAC/B,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,SAAS,SAAS,EAAE,GAAG,IAAI,GAAG,SAAS,EAChD,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,aAAa,CAAC,CAgCxB;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA0B;IACjD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAyC;IAEhE;;;;OAIG;IACH,QAAQ,CAAC,kBAAkB,+FAAkC;IAE7D;;;;;;;OAOG;IACG,SAAS,CACb,MAAM,EAAE,oBAAoB,EAC5B,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,mBAAmB,CAAC;CAkBhC"}
1
+ {"version":3,"file":"mcp-servers.d.ts","sourceRoot":"","sources":["../src/mcp-servers.ts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GG;IACH,aAAa,EAAE,OAAO,CAAC;IACvB;;;;;;;OAOG;IACH,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAC/C;;;;;OAKG;IACH,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACpD,6FAA6F;IAC7F,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;CACrC,CAAC;AAwEF,+FAA+F;AAC/F,KAAK,UAAU,GAAG;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE;QAAE,aAAa,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,OAAO,CAAC;QAAC,UAAU,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;CAChG,CAAC"}
@@ -1,5 +1,50 @@
1
- import { McpOverAcpCaller, } from "@agentclientprotocol/sdk/unstable";
2
- import { McpOverAcpHttpBridge } from "@agentclientprotocol/sdk/experimental/mcp-http";
1
+ import { isMcpServerAcp, McpOverAcpCaller, } from "@agentclientprotocol/sdk/unstable";
2
+ import { McpOverAcpHttpBridge, } from "@agentclientprotocol/sdk/experimental/mcp-http";
3
+ import { AnnouncedChildren } from "./acp-subagents.js";
4
+ import { isFinalToolCallStatus } from "./tool-calls/renderer.js";
5
+ /**
6
+ * Where Claude Code's MCP client (2.1.330) puts the id of the tool use in the
7
+ * `params._meta` of the `tools/call` that it sends for it. Its other requests,
8
+ * such as `server/discover` and `tools/list`, have none.
9
+ */
10
+ const TOOL_USE_ID_META = "claudecode/toolUseId";
11
+ /**
12
+ * The `agent_type` in the hooks of an agent that a workflow runs (Claude Code
13
+ * 2.1.330). Such an agent gets no `task_started` and never a child session,
14
+ * and its tool uses do not stream: the root session shows its work on the
15
+ * Workflow call. A user can give an agent definition the same name: its
16
+ * agents are ordinary subagents.
17
+ */
18
+ const WORKFLOW_AGENT_TYPE = "workflow-subagent";
19
+ /**
20
+ * How long an MCP request of a subagent waits for the `subagent_update` of
21
+ * the subagent's child session, before it goes out without a session (see
22
+ * {@link McpOverAcp.announcementWaitMs}).
23
+ *
24
+ * The wait covers a session that reads Claude Code's stream after the
25
+ * request arrives. With a scripted model, which answers at once, a session
26
+ * sent the report of a subagent's tool call 1.5 to 12 ms before the request
27
+ * of that tool use arrived (15 runs with Claude Code 2.1.330 on one machine),
28
+ * and it sends the child's announcement before that report. So the session
29
+ * is ahead by milliseconds when it is not busy. 500 ms is about 40 times the
30
+ * largest of these gaps, as room for a session that is.
31
+ *
32
+ * A longer wait would cost more where it cannot help: a replay can hold an
33
+ * announcement for longer than any wait, and an agent that the adapter
34
+ * cannot tell from a subagent, but that never gets a child session, waits
35
+ * this long for each of its tool uses.
36
+ */
37
+ const ANNOUNCEMENT_WAIT_MS = 500;
38
+ /**
39
+ * The hook matcher of the tools of the MCP servers `names`. Claude Code
40
+ * (2.1.330) matches it against the whole name of a tool, which is
41
+ * `mcp__<server>__<tool>` with `_` for each character of the server's name
42
+ * outside `[A-Za-z0-9_-]`: `mcp__my_tools__echo` for the server `my tools`.
43
+ */
44
+ function mcpToolsMatcher(names) {
45
+ const servers = names.map((name) => name.replace(/[^A-Za-z0-9_-]+/g, "_+"));
46
+ return `mcp__(?:${servers.join("|")})__.*`;
47
+ }
3
48
  /**
4
49
  * The SDK configs of a session's ACP MCP servers. HTTP and SSE servers keep
5
50
  * their URL and headers; a server without `type` is stdio; an `acp` server
@@ -58,10 +103,85 @@ export async function sdkMcpServers(servers, overAcp) {
58
103
  * `MCP_PROTOCOL_NEGOTIATION=legacy` or its
59
104
  * `tengu_mcp_protocol_negotiation_http` flag turns that off. Then it sends
60
105
  * `initialize`, and the server is listed as failed.
106
+ *
107
+ * An `mcp/message` request names the ACP session and the tool call that it is
108
+ * sent for (`sessionId` and `toolCallId`), when the adapter knows them. An
109
+ * HTTP request does not say them. It carries the id of its tool use (see
110
+ * {@link TOOL_USE_ID_META}), and the adapter learns each tool use of an `acp`
111
+ * server's tool from a PreToolUse hook, before Claude Code runs the tool
112
+ * ({@link toolUseHooks}). Both cores report a tool call under the id of its
113
+ * tool use, so that id is the `toolCallId`.
114
+ *
115
+ * When a `session/update` reported a tool call of that id ({@link sending}),
116
+ * the request names the session of that report, and the tool call. Before
117
+ * the report, and without one, it names by the agent that runs the tool:
118
+ *
119
+ * - the main conversation: the root session, and the tool call;
120
+ * - a subagent with an announced child session: that session, and the tool
121
+ * call;
122
+ * - a subagent of a client without child sessions: the root session, which
123
+ * reports the subagent's tool calls, and the tool call;
124
+ * - an agent that never gets a child session: the root session, whose work
125
+ * it does, and no tool call, since no session reports one. These are an
126
+ * agent that a workflow runs, and any agent of a client without child
127
+ * sessions that the core does not know as a subagent;
128
+ * - a subagent whose child session is not announced yet, because the session
129
+ * has not read its start or a replay holds its `subagent_update`: the
130
+ * request waits for that announcement, for at most
131
+ * {@link announcementWaitMs}, and then names the child session and the tool
132
+ * call. When the time passes first, it names nothing;
133
+ * - any other agent: nothing, without a wait. The core forgot its child
134
+ * session, or no `subagent_update` announces one for it.
135
+ *
136
+ * The root session never stands in for a child session.
137
+ *
138
+ * A request names neither when one of these holds:
139
+ *
140
+ * - it has no tool use id, as `server/discover` and `tools/list` have none;
141
+ * - no PreToolUse hook reported its tool use, as for a server that a resume
142
+ * gave the session's running query ({@link sessionServersChanged}), or the
143
+ * tool use ended;
144
+ * - the client closed the root session, or its last setup request did not
145
+ * declare the request's server;
146
+ * - the session of the agent is a child session that no `subagent_update`
147
+ * announced to the client: one of AIR's draft, one that a conversation
148
+ * reset made the core forget, or one whose announcement did not go out
149
+ * within {@link announcementWaitMs};
150
+ * - the agent has the type of a workflow's agents, the client gets child
151
+ * sessions, and the session defines an agent of that name: the agent can
152
+ * be a subagent whose child session is not announced yet.
153
+ *
154
+ * Nothing orders the tool call's report before the request. Claude Code
155
+ * streams a tool use before it runs the tool, but the session can read its
156
+ * stream after the HTTP request arrives. The request then names a tool call
157
+ * that the client does not hold yet.
61
158
  */
62
159
  export class McpOverAcp {
63
160
  caller = new McpOverAcpCaller();
64
- bridge = new McpOverAcpHttpBridge(this.caller);
161
+ bridge = new McpOverAcpHttpBridge(this.caller, {
162
+ attribution: (request) => this.attribution(request),
163
+ });
164
+ /** The `acp` servers of each active session that has any, or whose query started with any. */
165
+ sessions = new Map();
166
+ /** The child sessions that a `subagent_update` announced to the client (see {@link sending}). */
167
+ children = new AnnouncedChildren();
168
+ /** The tool uses of `acp` servers' tools that Claude Code runs, by id (see {@link toolUseHooks}). */
169
+ toolUses = new Map();
170
+ /**
171
+ * The session of each tool call that the client holds without a final
172
+ * status, by tool call id (see {@link sending}).
173
+ */
174
+ toolCalls = new Map();
175
+ /**
176
+ * The requests that wait for the announcement of their agent's child
177
+ * session, by tool use id: what ends each one's wait (see {@link held}).
178
+ */
179
+ waiting = new Map();
180
+ /**
181
+ * How long a request waits for the announcement of its agent's child
182
+ * session (see {@link ANNOUNCEMENT_WAIT_MS}). Mutable so tests can change it.
183
+ */
184
+ announcementWaitMs = ANNOUNCEMENT_WAIT_MS;
65
185
  /**
66
186
  * Hands an `mcp/message` notification of the client (such as the progress
67
187
  * of a tool call) to the HTTP response of the MCP request that it names. An
@@ -90,4 +210,302 @@ export class McpOverAcp {
90
210
  headers: Object.fromEntries(http.headers.map((header) => [header.name, header.value])),
91
211
  };
92
212
  }
213
+ /**
214
+ * A setup request (`session/new`, `load`, `resume` or `fork`) made the
215
+ * session `sessionId` active with `servers`, on a query that started with
216
+ * the hooks of {@link toolUseHooks} for them.
217
+ */
218
+ sessionStarted(sessionId, servers) {
219
+ const acp = (servers ?? []).filter(isMcpServerAcp);
220
+ if (acp.length === 0) {
221
+ this.sessions.delete(sessionId);
222
+ return;
223
+ }
224
+ this.sessions.set(sessionId, {
225
+ declared: new Set(acp.map((server) => server.serverId)),
226
+ hooked: new Set(acp.map((server) => server.name)),
227
+ });
228
+ }
229
+ /**
230
+ * A setup request gave the active session `sessionId` the servers
231
+ * `servers` in place of its earlier ones, on its running query. Returns
232
+ * the names of the `acp` servers among them that the query did not start
233
+ * with. Its hooks cannot change, so no hook reports the tool uses of these
234
+ * servers, and their requests name no session until the session's next
235
+ * query starts.
236
+ */
237
+ sessionServersChanged(sessionId, servers) {
238
+ const acp = (servers ?? []).filter(isMcpServerAcp);
239
+ const hooked = this.sessions.get(sessionId)?.hooked ?? new Set();
240
+ if (acp.length === 0 && hooked.size === 0)
241
+ this.sessions.delete(sessionId);
242
+ else {
243
+ this.sessions.set(sessionId, {
244
+ declared: new Set(acp.map((server) => server.serverId)),
245
+ hooked,
246
+ });
247
+ }
248
+ return acp.flatMap((server) => (hooked.has(server.name) ? [] : [server.name]));
249
+ }
250
+ /**
251
+ * The client ended the session `sessionId` (`session/close`, or a request
252
+ * that closes it too, such as `session/delete`): its requests and those of
253
+ * its child sessions name no session from now on. Forgets its servers, its
254
+ * announced children, its tool uses and its tool calls.
255
+ */
256
+ sessionClosed(sessionId) {
257
+ for (const [toolUseId, toolUse] of this.toolUses) {
258
+ if (toolUse.rootSessionId !== sessionId)
259
+ continue;
260
+ this.toolUses.delete(toolUseId);
261
+ this.release(toolUseId);
262
+ }
263
+ for (const [toolCallId, session] of this.toolCalls) {
264
+ if (this.rootOf(session) === sessionId)
265
+ this.toolCalls.delete(toolCallId);
266
+ }
267
+ this.children.rootClosed(sessionId);
268
+ this.sessions.delete(sessionId);
269
+ }
270
+ /**
271
+ * Takes a session update that goes to the client. A `subagent_update`
272
+ * announces a child session. A `tool_call`, or a `tool_call_update` with a
273
+ * status, reports a tool call of its session, which is kept until an update
274
+ * of that session or of another one under the same root gives the tool call
275
+ * a final status. That update also ends the tool use of the same id. An
276
+ * announcement, and a tool call's report, end the wait of the requests
277
+ * that they let name a session (see {@link held}).
278
+ *
279
+ * Only the tool calls of an active session with `acp` servers
280
+ * ({@link sessionStarted}) and of its announced child sessions are kept. The
281
+ * tool calls of a child session of AIR's draft, which a `subagent_spawned`
282
+ * announces, are not.
283
+ */
284
+ sending(notification) {
285
+ this.children.sending(notification);
286
+ const { sessionId, update } = notification;
287
+ const { sessionUpdate, toolCallId, status } = update;
288
+ if (sessionUpdate === "subagent_update") {
289
+ for (const toolUseId of [...this.waiting.keys()]) {
290
+ if (this.toolUses.get(toolUseId)?.awaits === update.sessionId)
291
+ this.release(toolUseId);
292
+ }
293
+ }
294
+ if (sessionUpdate !== "tool_call" && sessionUpdate !== "tool_call_update")
295
+ return;
296
+ if (typeof toolCallId !== "string")
297
+ return;
298
+ const root = this.rootOf(sessionId);
299
+ if (isFinalToolCallStatus(status)) {
300
+ this.toolEnded(toolCallId, root);
301
+ }
302
+ else if ((sessionUpdate === "tool_call" || status != null) && this.sessions.has(root)) {
303
+ this.toolCalls.set(toolCallId, sessionId);
304
+ // A request that waits can name the session of this report.
305
+ this.release(toolCallId);
306
+ }
307
+ }
308
+ /**
309
+ * The hooks of the query of the root session `sessionId`, which starts with
310
+ * `servers`, or undefined when none of them is an `acp` server: such a
311
+ * query has no MCP request to name a session for. They record each tool
312
+ * use of a tool of the `acp` servers before Claude Code runs it
313
+ * (PreToolUse), with the session of the agent that runs it (see the class
314
+ * doc), until the tool returned or failed (PostToolUse,
315
+ * PostToolUseFailure). Claude Code runs them for no other tool, and they
316
+ * make no decision.
317
+ *
318
+ * A tool use that neither hook ends, such as one that Claude Code does not
319
+ * run after all, stays until its tool call gets a final status
320
+ * ({@link sending}) or the client closes the session
321
+ * ({@link sessionClosed}).
322
+ */
323
+ toolUseHooks(sessionId, servers, agents) {
324
+ const acp = (servers ?? []).filter(isMcpServerAcp);
325
+ if (acp.length === 0)
326
+ return undefined;
327
+ const matcher = mcpToolsMatcher(acp.map((server) => server.name));
328
+ const starts = {
329
+ matcher,
330
+ hooks: [
331
+ async (input, toolUseId) => {
332
+ if (toolUseId !== undefined) {
333
+ this.toolUses.set(toolUseId, {
334
+ rootSessionId: sessionId,
335
+ ...agentSession(sessionId, input, agents, (child) => this.children.has(child)),
336
+ });
337
+ }
338
+ return { continue: true };
339
+ },
340
+ ],
341
+ };
342
+ const ends = {
343
+ matcher,
344
+ hooks: [
345
+ async (_input, toolUseId) => {
346
+ if (toolUseId !== undefined)
347
+ this.toolEnded(toolUseId, sessionId);
348
+ return { continue: true };
349
+ },
350
+ ],
351
+ };
352
+ return { PreToolUse: starts, PostToolUse: ends, PostToolUseFailure: ends };
353
+ }
354
+ /** The root session of the announced child session `sessionId`, or `sessionId` itself. */
355
+ rootOf(sessionId) {
356
+ return this.children.rootOf(sessionId) ?? sessionId;
357
+ }
358
+ /**
359
+ * Forgets the tool use `id` and its tool call, when they are of the root
360
+ * session `root`, and ends the wait of the tool use's requests. A fork
361
+ * replays the tool calls of its original under their ids: its updates
362
+ * leave those of the original alone.
363
+ */
364
+ toolEnded(id, root) {
365
+ if (this.toolUses.get(id)?.rootSessionId === root) {
366
+ this.toolUses.delete(id);
367
+ this.release(id);
368
+ }
369
+ const reportedIn = this.toolCalls.get(id);
370
+ if (reportedIn !== undefined && this.rootOf(reportedIn) === root)
371
+ this.toolCalls.delete(id);
372
+ }
373
+ /**
374
+ * Resolves when a request of the tool use `toolUseId` need wait no longer
375
+ * for the announcement of its agent's child session: {@link release} ended
376
+ * the wait, or {@link announcementWaitMs} passed. It never rejects.
377
+ *
378
+ * Nothing that an announcement needs waits for the request. The hook that
379
+ * recorded the tool use has answered. The session reads Claude Code's
380
+ * stream whatever its tools do, and Claude Code wrote the subagent's start
381
+ * to that stream before it ran the subagent's tool. A replay ends without
382
+ * the request too.
383
+ */
384
+ held(toolUseId) {
385
+ return new Promise((resolve) => {
386
+ const waiters = this.waiting.get(toolUseId) ?? new Set();
387
+ this.waiting.set(toolUseId, waiters);
388
+ const end = () => {
389
+ clearTimeout(timer);
390
+ waiters.delete(end);
391
+ if (waiters.size === 0 && this.waiting.get(toolUseId) === waiters) {
392
+ this.waiting.delete(toolUseId);
393
+ }
394
+ resolve();
395
+ };
396
+ const timer = setTimeout(end, this.announcementWaitMs);
397
+ // The request's HTTP connection keeps the process alive, not this timer.
398
+ timer.unref();
399
+ waiters.add(end);
400
+ });
401
+ }
402
+ /**
403
+ * Ends the wait of the requests of the tool use `toolUseId` ({@link held}):
404
+ * its agent's child session is announced, its tool call is reported, or it
405
+ * ended, also with the close of its session. Each request then names what
406
+ * it can.
407
+ */
408
+ release(toolUseId) {
409
+ for (const end of [...(this.waiting.get(toolUseId) ?? [])])
410
+ end();
411
+ }
412
+ /**
413
+ * The session and tool call that the `mcp/message` request of the MCP
414
+ * request `request` names, or undefined when it names none (see the class
415
+ * doc). A request of a subagent whose child session is not announced yet
416
+ * resolves once it is, or names nothing after {@link announcementWaitMs}.
417
+ * It neither throws nor rejects: the bridge would answer Claude Code with
418
+ * HTTP 500 instead of sending the request.
419
+ *
420
+ * It does not read `request.connection`. Each agent app (`v1AgentApp`,
421
+ * `v2AgentApp`) makes its own `McpOverAcp` for its one connection, so every
422
+ * request and every recorded session is of that connection.
423
+ */
424
+ attribution({ serverId, params, }) {
425
+ const meta = params?._meta;
426
+ const toolUseId = typeof meta === "object" && meta !== null
427
+ ? meta[TOOL_USE_ID_META]
428
+ : undefined;
429
+ if (typeof toolUseId !== "string")
430
+ return undefined;
431
+ const now = this.named(toolUseId, serverId);
432
+ if (now !== "unannounced")
433
+ return now;
434
+ return this.held(toolUseId).then(() => {
435
+ const then = this.named(toolUseId, serverId);
436
+ return then === "unannounced" ? undefined : then;
437
+ });
438
+ }
439
+ /**
440
+ * What a request of the tool use `toolUseId` to the server `serverId` names
441
+ * now, or `unannounced` when it names nothing because the child session of
442
+ * its agent, which a `subagent_update` announces, is not announced yet.
443
+ */
444
+ named(toolUseId, serverId) {
445
+ const toolUse = this.toolUses.get(toolUseId);
446
+ if (!toolUse)
447
+ return undefined;
448
+ const root = toolUse.rootSessionId;
449
+ if (!this.sessions.get(root)?.declared.has(serverId))
450
+ return undefined;
451
+ // The session that reported the tool call names it. A tool call of
452
+ // another root has the same id in a fork's replayed history.
453
+ const reportedIn = this.toolCalls.get(toolUseId);
454
+ if (reportedIn !== undefined && this.rootOf(reportedIn) === root) {
455
+ return { sessionId: reportedIn, toolCallId: toolUseId };
456
+ }
457
+ const { sessionId, awaits } = toolUse;
458
+ if (sessionId !== undefined && this.rootOf(sessionId) === root) {
459
+ return toolUse.reportsToolCall ? { sessionId, toolCallId: toolUseId } : { sessionId };
460
+ }
461
+ // Not the root, and no announced child of it. Once the child session of
462
+ // its agent is announced, that session reports the agent's tool calls.
463
+ if (awaits === undefined)
464
+ return undefined;
465
+ return this.rootOf(awaits) === root
466
+ ? { sessionId: awaits, toolCallId: toolUseId }
467
+ : "unannounced";
468
+ }
469
+ }
470
+ /**
471
+ * The session of the agent that runs the tool use of the PreToolUse hook
472
+ * `input`, for a query of the root session `root`, whether that session
473
+ * reports the tool use as a tool call, and the child session whose
474
+ * announcement a request of the tool use waits for (see the class doc of
475
+ * {@link McpOverAcp}). `announced` says whether a `subagent_update` announced
476
+ * a child session.
477
+ */
478
+ function agentSession(root, input, agents, announced) {
479
+ // A session reports the tool calls of the messages that it reads, but for
480
+ // the work that a cancel stopped: it drops that work's tool uses, and its
481
+ // tool can run all the same. Nothing tells that at this point, so the
482
+ // request of such a tool use names a tool call that the client never gets.
483
+ if (input.agent_id === undefined)
484
+ return { sessionId: root, reportsToolCall: true };
485
+ const reporting = agents.reporting(input.agent_id);
486
+ const child = agents.childSessionId(input.agent_id);
487
+ if (reporting !== undefined) {
488
+ // A child session whose `subagent_update` has not gone out, as a replay
489
+ // can hold it: a request waits for it.
490
+ return {
491
+ sessionId: reporting,
492
+ reportsToolCall: true,
493
+ ...(reporting === child ? { awaits: child } : {}),
494
+ };
495
+ }
496
+ // No session reports the tool calls of this agent. Its work is the root's
497
+ // when it cannot be a child session: the client gets none, or a workflow
498
+ // runs it. An agent definition of the workflow agents' type makes that
499
+ // type say nothing: its agent can be a child that is not announced yet.
500
+ const workflowType = input.agent_type === WORKFLOW_AGENT_TYPE;
501
+ if (!agents.childSessions || (workflowType && !agents.definesAgent(WORKFLOW_AGENT_TYPE))) {
502
+ return { sessionId: root, reportsToolCall: false };
503
+ }
504
+ // The core does not know the agent as a subagent. One whose start it has
505
+ // not read yet gets its child session next: a request waits for it. Not an
506
+ // agent of the workflow agents' type, which mostly gets none, and not one
507
+ // whose child session was announced before: the core forgot that child at
508
+ // a conversation reset, and reports nothing of it any more.
509
+ const awaits = child !== undefined && !workflowType && !announced(child) ? child : undefined;
510
+ return { sessionId: undefined, reportsToolCall: false, ...(awaits ? { awaits } : {}) };
93
511
  }
@@ -15,7 +15,7 @@ import { SessionBackgroundWork } from "./background-work.js";
15
15
  import { type AsyncTaskStopRequest, type AsyncTaskStopResponse } from "./async-task-stop.js";
16
16
  import { type SteerRequest, type SteerResponse } from "./steering.js";
17
17
  import { type AuthStatus, type AuthStatusKind } from "../auth-status.js";
18
- import { type UnservedMcpServer } from "../mcp-servers.js";
18
+ import { McpOverAcp, type UnservedMcpServer } from "../mcp-servers.js";
19
19
  import { SettingsManager } from "../settings.js";
20
20
  import { type SessionFailureState } from "../session-failure-extension.js";
21
21
  import { type ClaudeSubscriptionGuardState } from "../hide-claude-auth.js";
@@ -858,6 +858,12 @@ export type Session = {
858
858
  signOutRespawn?: Promise<void>;
859
859
  } & sessionIndex.SessionIndexFields;
860
860
  export declare class ClaudeAcpAgent {
861
+ /**
862
+ * Names the session and tool call of the MCP requests that Claude Code
863
+ * sends to the client's `acp` servers (see `mcp-servers.ts`): the one that
864
+ * `client` serves those servers with.
865
+ */
866
+ private readonly mcp;
861
867
  sessions: {
862
868
  [key: string]: Session;
863
869
  };
@@ -930,7 +936,13 @@ export declare class ClaudeAcpAgent {
930
936
  * `Turn.deferredSettle`.
931
937
  */
932
938
  private endsTurnsWithLiveSubagents;
933
- constructor(client: AcpClient, logger?: Logger);
939
+ constructor(client: AcpClient, logger?: Logger,
940
+ /**
941
+ * Names the session and tool call of the MCP requests that Claude Code
942
+ * sends to the client's `acp` servers (see `mcp-servers.ts`): the one that
943
+ * `client` serves those servers with.
944
+ */
945
+ mcp?: McpOverAcp);
934
946
  initialize(request: InitializeRequest): Promise<InitializeResponse>;
935
947
  newSession(params: NewSessionRequest): Promise<NewSessionResponse>;
936
948
  /**
@@ -1469,6 +1481,13 @@ export declare class ClaudeAcpAgent {
1469
1481
  * the callback beats the spawning Agent/Task frame, the root keeps it; the
1470
1482
  * later frame announces the child with its correct nested lineage. A
1471
1483
  * workflow agent gets no task_started, so the root always keeps its tool use.
1484
+ *
1485
+ * `reportingSessionId` is the session whose updates report the agent's tool
1486
+ * calls as the consumer reads them from the stream: the root session for
1487
+ * the main conversation, a subagent's child session once it is announced,
1488
+ * and the root session for a subagent of a client without child sessions.
1489
+ * Undefined for an agent whose task_started the consumer has not read,
1490
+ * which a workflow agent never gets, and for a child that is not announced.
1472
1491
  */
1473
1492
  private toolUseOwner;
1474
1493
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"acp-agent.d.ts","sourceRoot":"","sources":["../../src/v1/acp-agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EACR,mBAAmB,EAEnB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAGlB,sBAAsB,EACtB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAElB,oBAAoB,EACpB,qBAAqB,EAErB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EAEb,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EAEpB,kBAAkB,EAClB,mBAAmB,EAEnB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAEhB,6BAA6B,EAC7B,8BAA8B,EAC9B,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,oB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,cAAc,CAAC,CAczB;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,OAAO,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,GACvC,QAAQ,CAqGV"}
1
+ {"version":3,"file":"acp-agent.d.ts","sourceRoot":"","sources":["../../src/v1/acp-agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EACR,mBAAmB,EAEnB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAGlB,sBAAsB,EACtB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAElB,oBAAoB,EACpB,qBAAqB,EAErB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EAEb,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EAEpB,kBAAkB,EAClB,mBAAmB,EAEnB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAEhB,6BAA6B,EAC7B,8BAA8B,EAC9B,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EAEtB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAc,UAAU,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EACL,SAAS,EACT,UAAU,EACV,sBAAsB,EAKtB,SAAS,EAIT,cAAc,EAEd,KAAK,EASL,cAAc,EACd,QAAQ,EACT,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAKL,WAAW,EACX,mBAAmB,EACnB,YAAY,EAIb,MAAM,q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,CAAC;IAWnE;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CAAC,kBAAkB;IAgB1B;;;;;;;;;;OAUG;IACG,4BAA4B,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAqBpE;;;;;;;OAOG;YACW,0BAA0B;YAsB1B,kBAAkB;IAmBhC;;;;;;OAMG;IACH,OAAO,CAAC,gCAAgC;YAwB1B,sBAAsB;IAwJpC;;;;;;;kDAO8C;YAChC,4BAA4B;IA+B1C;;;oBAGgB;IAChB,OAAO,CAAC,qBAAqB;IAW7B;;;iEAG6D;YAC/C,aAAa;IAS3B;;;sCAGkC;YACpB,cAAc;IAY5B;;;;;;;;;;;oBAWgB;YACF,iBAAiB;YAqCjB,kBAAkB;IAsEhC;;;;;;;;OAQG;YACW,WAAW;IAkCzB,4EAA4E;IAC5E,OAAO,CAAC,oBAAoB;YAQd,aAAa;IA40B3B;;;;OAIG;YACW,qBAAqB;IA4CnC,0FAA0F;YAC5E,yBAAyB;IAqBvC,2IAA2I;YAC7H,mBAAmB;IAwCjC,sHAAsH;YACxG,qBAAqB;IA8DnC,OAAO,CAAC,4BAA4B;IAcpC,2FAA2F;IAC3F,OAAO,CAAC,iCAAiC;CAyC1C;AAuQD;;;;;;;;;;;oEAWoE;AACpE,wBAAsB,yBAAyB,CAC7C,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC,EAC3D,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,cAAc,CAAC,CAczB;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,OAAO,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,GACvC,QAAQ,CAqGV"}
@@ -346,6 +346,7 @@ function startMcpServerAuthentication(host, sessionId, requestedServers) {
346
346
  }, requestedServers);
347
347
  }
348
348
  export class ClaudeAcpAgent {
349
+ mcp;
349
350
  sessions;
350
351
  client;
351
352
  clientCapabilities;
@@ -436,11 +437,20 @@ export class ClaudeAcpAgent {
436
437
  return (subagentForm(this.clientCapabilities) === "rfd" ||
437
438
  clientSupportsAirCapability(this.clientCapabilities, AIR_BACKGROUND_SUBAGENTS_CAPABILITY));
438
439
  }
439
- constructor(client, logger) {
440
+ constructor(client, logger,
441
+ /**
442
+ * Names the session and tool call of the MCP requests that Claude Code
443
+ * sends to the client's `acp` servers (see `mcp-servers.ts`): the one that
444
+ * `client` serves those servers with.
445
+ */
446
+ mcp = new McpOverAcp()) {
447
+ this.mcp = mcp;
440
448
  this.sessions = {};
441
- this.client = new ChangedMetaClient(client, () => this.toolCallCapabilities.air.client,
442
- // Before the client can name the child that a `subagent_update` announces.
443
- (update) => this.announcedChildren.sending(update));
449
+ this.client = new ChangedMetaClient(client, () => this.toolCallCapabilities.air.client, (update) => {
450
+ // Before the client can name the child that a `subagent_update` announces.
451
+ this.announcedChildren.sending(update);
452
+ this.mcp.sending(update);
453
+ });
444
454
  this.logger = logger ?? console;
445
455
  this.exitPlan = new ExitPlanCoordinator({
446
456
  currentSession: (id) => this.sessions[id],
@@ -5829,6 +5839,7 @@ export class ClaudeAcpAgent {
5829
5839
  await this.teardownSession(sessionId);
5830
5840
  // After the teardown's last updates, which name the children.
5831
5841
  this.announcedChildren.rootClosed(sessionId);
5842
+ this.mcp.sessionClosed(sessionId);
5832
5843
  }
5833
5844
  /** Idempotent: a session that is not loaded here is already closed. */
5834
5845
  async closeSession(params) {
@@ -6705,17 +6716,30 @@ export class ClaudeAcpAgent {
6705
6716
  * the callback beats the spawning Agent/Task frame, the root keeps it; the
6706
6717
  * later frame announces the child with its correct nested lineage. A
6707
6718
  * workflow agent gets no task_started, so the root always keeps its tool use.
6719
+ *
6720
+ * `reportingSessionId` is the session whose updates report the agent's tool
6721
+ * calls as the consumer reads them from the stream: the root session for
6722
+ * the main conversation, a subagent's child session once it is announced,
6723
+ * and the root session for a subagent of a client without child sessions.
6724
+ * Undefined for an agent whose task_started the consumer has not read,
6725
+ * which a workflow agent never gets, and for a child that is not announced.
6708
6726
  */
6709
6727
  toolUseOwner(session, sessionId, agentID) {
6710
- const parentToolUseId = agentID
6711
- ? session.liveBackgroundTasks.get(agentID)?.parentToolUseId
6712
- : undefined;
6713
- const child = clientSupportsSubagents(this.clientCapabilities) && agentID
6714
- ? session.nativeSubagentsByTaskId?.get(agentID)
6715
- : undefined;
6728
+ const task = agentID ? session.liveBackgroundTasks.get(agentID) : undefined;
6729
+ const childSessions = clientSupportsSubagents(this.clientCapabilities);
6730
+ const child = childSessions && agentID ? session.nativeSubagentsByTaskId?.get(agentID) : undefined;
6731
+ const announced = child?.announced ? child.sessionId : undefined;
6732
+ const reportingSessionId = !agentID
6733
+ ? sessionId
6734
+ : childSessions
6735
+ ? announced
6736
+ : task?.isSubagent
6737
+ ? sessionId
6738
+ : undefined;
6716
6739
  return {
6717
- ...(parentToolUseId ? { parentToolUseId } : {}),
6718
- toolCallSessionId: child?.announced ? child.sessionId : sessionId,
6740
+ ...(task?.parentToolUseId ? { parentToolUseId: task.parentToolUseId } : {}),
6741
+ toolCallSessionId: announced ?? sessionId,
6742
+ ...(reportingSessionId !== undefined ? { reportingSessionId } : {}),
6719
6743
  };
6720
6744
  }
6721
6745
  /**
@@ -7677,6 +7701,19 @@ export class ClaudeAcpAgent {
7677
7701
  const subagentConfigHook = subagentForm(this.clientCapabilities)
7678
7702
  ? this.subagentConfigurationHook(sessionId)
7679
7703
  : undefined;
7704
+ // None for a session without `acp` MCP servers: it has no MCP request to
7705
+ // name a session for, so Claude Code waits on no hook of these.
7706
+ const mcpToolUse = this.mcp.toolUseHooks(sessionId, params.mcpServers, {
7707
+ childSessions: clientSupportsSubagents(this.clientCapabilities),
7708
+ reporting: (agentId) => {
7709
+ const session = this.sessions[sessionId];
7710
+ return session && this.toolUseOwner(session, sessionId, agentId).reportingSessionId;
7711
+ },
7712
+ // In the RFD form, a subagent's child session has its agent id (see
7713
+ // `NativeSubagentRuntime`). AIR's draft announces none with `subagent_update`.
7714
+ childSessionId: (agentId) => subagentForm(this.clientCapabilities) === "rfd" ? agentId : undefined,
7715
+ definesAgent: (name) => this.sessions[sessionId]?.agents.some((agent) => agent.name === name) === true,
7716
+ });
7680
7717
  const suggestionForms = {
7681
7718
  meta: this.toolCallCapabilities.air.client,
7682
7719
  update: clientTakesPromptSuggestions(this.clientCapabilities?.session),
@@ -7766,17 +7803,19 @@ export class ClaudeAcpAgent {
7766
7803
  ...(userProvidedOptions?.hooks?.SubagentStop ?? []),
7767
7804
  { hooks: [subagentConfigHook] },
7768
7805
  ],
7769
- PostToolUseFailure: [
7770
- ...(userProvidedOptions?.hooks?.PostToolUseFailure ?? []),
7771
- { hooks: [subagentConfigHook] },
7772
- ],
7773
7806
  }
7774
7807
  : {}),
7775
- ...(subagentConfigHook
7808
+ ...(subagentConfigHook || mcpToolUse
7776
7809
  ? {
7810
+ PostToolUseFailure: [
7811
+ ...(userProvidedOptions?.hooks?.PostToolUseFailure ?? []),
7812
+ ...(subagentConfigHook ? [{ hooks: [subagentConfigHook] }] : []),
7813
+ ...(mcpToolUse ? [mcpToolUse.PostToolUseFailure] : []),
7814
+ ],
7777
7815
  PreToolUse: [
7778
7816
  ...(userProvidedOptions?.hooks?.PreToolUse || []),
7779
- { hooks: [subagentConfigHook] },
7817
+ ...(subagentConfigHook ? [{ hooks: [subagentConfigHook] }] : []),
7818
+ ...(mcpToolUse ? [mcpToolUse.PreToolUse] : []),
7780
7819
  ],
7781
7820
  }
7782
7821
  : {}),
@@ -7793,6 +7832,7 @@ export class ClaudeAcpAgent {
7793
7832
  }),
7794
7833
  ],
7795
7834
  },
7835
+ ...(mcpToolUse ? [mcpToolUse.PostToolUse] : []),
7796
7836
  ],
7797
7837
  // Mirror model switches the adapter didn't drive into the ACP picker
7798
7838
  // and the model-dependent bookkeeping (context window, mode clamping,
@@ -8151,6 +8191,7 @@ export class ClaudeAcpAgent {
8151
8191
  fileChangeReporter,
8152
8192
  promptSuggestions: PromptSuggestions.forClient(suggestionForms),
8153
8193
  };
8194
+ this.mcp.sessionStarted(sessionId, params.mcpServers);
8154
8195
  const registered = this.sessions[sessionId];
8155
8196
  registered.idleCompaction = new IdleCompaction({
8156
8197
  // `openUserInputs` also covers permission requests: `requestPermission`
@@ -8674,7 +8715,7 @@ export function v1AgentApp(logger, onAgent) {
8674
8715
  };
8675
8716
  const app = acpAgent({ name: "claude-code-acp" })
8676
8717
  .onConnect((connection) => {
8677
- agent = new ClaudeAcpAgent(new ClientConnection(connection.client, mcp), logger);
8718
+ agent = new ClaudeAcpAgent(new ClientConnection(connection.client, mcp), logger, mcp);
8678
8719
  onAgent(agent);
8679
8720
  })
8680
8721
  .onNotification(methods.agent.mcp.message, mcp.handleNotification)
package/dist/v2/agent.js CHANGED
@@ -181,6 +181,9 @@ class V2Agent {
181
181
  // Before the client can name the child that a `subagent_update` announces.
182
182
  this.children.sending(notification);
183
183
  const send = () => {
184
+ // When the update goes out, after a replay that holds it: an MCP request
185
+ // names no child session whose `subagent_update` still waits.
186
+ this.mcp.sending(notification);
184
187
  this.ctx.notify(v2.methods.client.session.update, notification).catch((error) => {
185
188
  this.logger.error(`Failed to send a ${notification.update.sessionUpdate} update:`, error);
186
189
  });
@@ -442,6 +445,12 @@ class V2Agent {
442
445
  else {
443
446
  const served = await this.sdkMcpServers(sessionId, request.mcpServers);
444
447
  await session.setMcpServers({ ...clientOptions(params._meta)?.mcpServers, ...served.configs }, served.unserved);
448
+ const unhooked = this.mcp.sessionServersChanged(sessionId, request.mcpServers);
449
+ if (unhooked.length > 0) {
450
+ this.logger.log(`Session ${sessionId}: the MCP requests of ${unhooked.join(", ")} name no session ` +
451
+ "until the session's query starts again. The running query started without " +
452
+ "the hooks that report their tool uses.");
453
+ }
445
454
  this.restarts.track(sessionId, params);
446
455
  }
447
456
  }
@@ -629,6 +638,7 @@ class V2Agent {
629
638
  this.restarts.closed(sessionId);
630
639
  // After the close's last updates, which name the session's children.
631
640
  this.children.rootClosed(sessionId);
641
+ this.mcp.sessionClosed(sessionId);
632
642
  return {};
633
643
  }
634
644
  /** Deleting a session that does not exist succeeds, as v2 asks. */
@@ -855,6 +865,7 @@ class V2Agent {
855
865
  keys.queryStarted(resume !== undefined);
856
866
  session.start(q, config, opened.mcpServers, keys, resume !== undefined);
857
867
  this.sessions.set(sessionId, session);
868
+ this.mcp.sessionStarted(sessionId, opened.request.mcpServers);
858
869
  this.stopped.delete(sessionId);
859
870
  // A route change during the start did not find this session live.
860
871
  this.restarts.track(sessionId, params, {
@@ -936,6 +947,15 @@ class V2Agent {
936
947
  const session = new V2Session(sessionId, request.cwd, request.additionalDirectories ?? [], this, input, perTaskStopAffordance, additionalDirectories);
937
948
  const elicitationOptions = session.elicitations.queryOptions();
938
949
  const subagent = subagentHooks((input) => session.tasks.subagentHook(input));
950
+ // None for a query without `acp` servers. A resume cannot give a running
951
+ // query these hooks (see `McpOverAcp.sessionServersChanged`).
952
+ const mcpToolUse = this.mcp.toolUseHooks(sessionId, request.mcpServers, {
953
+ childSessions: true,
954
+ reporting: (agentId) => session.tasks.childSession(agentId),
955
+ // A subagent's child session has its agent id (see `tasks.ts`).
956
+ childSessionId: (agentId) => agentId,
957
+ definesAgent: (name) => session.tasks.configs.definesAgent(name),
958
+ });
939
959
  const options = {
940
960
  systemPrompt: sessionSystemPrompt(clientPrompt, params._meta?.systemPrompt),
941
961
  settingSources: ["user", "project", "local"],
@@ -994,11 +1014,21 @@ class V2Agent {
994
1014
  // A subagent's `cwd` (such as its worktree) and configuration, from its hooks.
995
1015
  SubagentStart: [subagent.SubagentStart],
996
1016
  SubagentStop: [subagent.SubagentStop],
997
- PostToolUseFailure: [subagent.PostToolUseFailure],
998
- // An Edit or Write shows its exact patch before it runs.
999
- PreToolUse: [subagent.PreToolUse, fileChangePreviewHook(session, this.logger)],
1017
+ PostToolUseFailure: [
1018
+ subagent.PostToolUseFailure,
1019
+ ...(mcpToolUse ? [mcpToolUse.PostToolUseFailure] : []),
1020
+ ],
1021
+ // An Edit or Write shows its exact patch before it runs. The tool use
1022
+ // of an `acp` server's tool is recorded for the `mcp/message` requests
1023
+ // that it sends.
1024
+ PreToolUse: [
1025
+ subagent.PreToolUse,
1026
+ fileChangePreviewHook(session, this.logger),
1027
+ ...(mcpToolUse ? [mcpToolUse.PreToolUse] : []),
1028
+ ],
1000
1029
  PostToolUse: [
1001
1030
  subagent.PostToolUse,
1031
+ ...(mcpToolUse ? [mcpToolUse.PostToolUse] : []),
1002
1032
  {
1003
1033
  hooks: [
1004
1034
  createPostToolUseHook({ onEnterPlanMode: async () => session.modeChanged("plan") }),
@@ -30,6 +30,8 @@ export declare class ChildConfigurations {
30
30
  constructor(host: ConfigurationHost);
31
31
  /** The session's custom agents, from Claude Code's initialization (see `customAgents`). */
32
32
  configureAgents(agents: readonly AgentInfo[]): void;
33
+ /** Whether the session's custom agents have one named `name`. */
34
+ definesAgent(name: string): boolean;
33
35
  /** The options that a hook of a subagent reports of it. */
34
36
  hookOptions(input: HookInput): SessionConfigOption[];
35
37
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"child-config.d.ts","sourceRoot":"","sources":["../../src/v2/child-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC/F,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAChG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAO7D,0DAA0D;AAC1D,MAAM,WAAW,iBAAiB;IAChC,wDAAwD;IACxD,KAAK,IAAI,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IAC5C,uEAAuE;IACvE,MAAM,IAAI,cAAc,CAAC;IACzB,uDAAuD;IACvD,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,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the session's custom agents have one named `name`. */
19
+ definesAgent(name) {
20
+ return this.agents.some((agent) => agent.name === name);
21
+ }
18
22
  /** The options that a hook of a subagent reports of it. */
19
23
  hookOptions(input) {
20
24
  return subagentHookOptions(input, {
@@ -193,6 +193,14 @@ export declare class SessionTasks {
193
193
  * `AnnouncedChildren`).
194
194
  */
195
195
  private hasChild;
196
+ /**
197
+ * The child session of the subagent `agentId`, whose stream reports the
198
+ * subagent's tool calls: the one that this root announced in its current
199
+ * conversation (see {@link hasChild}), under the agent's id. Undefined for
200
+ * an agent without one: its `task_started` has not come, which an agent
201
+ * inside a workflow never gets, or its child is not announced.
202
+ */
203
+ childSession(agentId: string): string | undefined;
196
204
  /**
197
205
  * The session that a permission request of the agent `agentId` goes to:
198
206
  * its child session once it is announced, else the root. A request can
@@ -1 +1 @@
1
- {"version":3,"file":"tasks.d.ts","sourceRoot":"","sources":["../../src/v2/tasks.ts"],"names":[],"mappings":"AAuDA,OAAO,EAAgB,KAAK,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACxF,OAAO,KAAK,KAAK,EAAE,MAAM,mDAAmD,CAAC;AAC7E,OAAO,KAAK,EACV,SAAS,EACT,UAAU,EACV,cAAc,EACd,cAAc,EACf,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAElE,OAAO,EAKL,KAAK,UAAU,EAEhB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAqBL,KAAK,cAAc,EACpB,MAAM,wBAAwB,CAAC;AAUhC,OAAO,KAAK,EAAkB,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACnF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,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O,CAAC,oBAAoB;IAe5B,OAAO,CAAC,SAAS;IAWjB,kEAAkE;IAClE,OAAO,CAAC,KAAK;IAMb,OAAO,CAAC,QAAQ;IAKhB;;;OAGG;IACH,OAAO,CAAC,YAAY;IAepB,qDAAqD;IACrD,OAAO,CAAC,YAAY;IAepB;;;;;;;OAOG;IACH,OAAO,CAAC,KAAK;IA4Cb;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,UAAU;IAmBlB,6EAA6E;IAC7E,OAAO,CAAC,UAAU;IAelB;;;;;;OAMG;IACH,OAAO,CAAC,gBAAgB;IAkBxB,yFAAyF;IACzF,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,YAAY;IAUpB,OAAO,CAAC,YAAY;IAkBpB,OAAO,CAAC,WAAW;IAUnB,OAAO,CAAC,OAAO;CAGhB;AAoBD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CASlE"}
package/dist/v2/tasks.js CHANGED
@@ -373,6 +373,16 @@ export class SessionTasks {
373
373
  hasChild(sessionId) {
374
374
  return this.children.get(sessionId)?.announced === true;
375
375
  }
376
+ /**
377
+ * The child session of the subagent `agentId`, whose stream reports the
378
+ * subagent's tool calls: the one that this root announced in its current
379
+ * conversation (see {@link hasChild}), under the agent's id. Undefined for
380
+ * an agent without one: its `task_started` has not come, which an agent
381
+ * inside a workflow never gets, or its child is not announced.
382
+ */
383
+ childSession(agentId) {
384
+ return this.hasChild(agentId) ? agentId : undefined;
385
+ }
376
386
  /**
377
387
  * The session that a permission request of the agent `agentId` goes to:
378
388
  * its child session once it is announced, else the root. A request can
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.110.1-preview.5",
6
+ "version": "0.110.2-preview.1",
7
7
  "description": "An ACP-compatible coding agent powered by the Claude Agent SDK (TypeScript)",
8
8
  "main": "dist/lib.js",
9
9
  "types": "dist/lib.d.ts",
@@ -68,7 +68,7 @@
68
68
  "node": ">=22"
69
69
  },
70
70
  "dependencies": {
71
- "@agentclientprotocol/sdk": "2.9.1",
71
+ "@agentclientprotocol/sdk": "2.11.0",
72
72
  "@anthropic-ai/claude-agent-sdk": "0.3.330",
73
73
  "diff": "9.0.0",
74
74
  "zod": "4.6.7"