@agentclientprotocol/claude-agent-acp 0.109.0 → 0.109.1-preview.10
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.
- package/README.md +10 -5
- package/dist/acp-subagents.d.ts +39 -0
- package/dist/acp-subagents.d.ts.map +1 -1
- package/dist/acp-subagents.js +47 -0
- package/dist/auth-status-reporter.d.ts +2 -3
- package/dist/auth-status-reporter.d.ts.map +1 -1
- package/dist/auth-status-reporter.js +32 -29
- package/dist/auth-status.d.ts +6 -7
- package/dist/auth-status.d.ts.map +1 -1
- package/dist/auth-status.js +9 -8
- package/dist/client-system-prompt.d.ts +6 -4
- package/dist/client-system-prompt.d.ts.map +1 -1
- package/dist/client-system-prompt.js +7 -2
- package/dist/context-compaction.d.ts.map +1 -1
- package/dist/context-compaction.js +4 -3
- package/dist/native-subagents.d.ts +102 -7
- package/dist/native-subagents.d.ts.map +1 -1
- package/dist/native-subagents.js +208 -17
- package/dist/plans.d.ts +4 -4
- package/dist/providers.d.ts +34 -1
- package/dist/providers.d.ts.map +1 -1
- package/dist/providers.js +37 -1
- package/dist/serve.d.ts +1 -1
- package/dist/serve.js +1 -1
- package/dist/session-config-options.d.ts.map +1 -1
- package/dist/session-config-options.js +13 -0
- package/dist/subagent-replay.d.ts +49 -33
- package/dist/subagent-replay.d.ts.map +1 -1
- package/dist/subagent-replay.js +49 -52
- package/dist/tool-calls/renderer.d.ts +0 -9
- package/dist/tool-calls/renderer.d.ts.map +1 -1
- package/dist/tool-calls/renderer.js +1 -19
- package/dist/tool-calls/reporters/interaction.d.ts +9 -0
- package/dist/tool-calls/reporters/interaction.d.ts.map +1 -1
- package/dist/tool-calls/reporters/interaction.js +23 -1
- package/dist/tool-calls/reporters/search.d.ts +7 -3
- package/dist/tool-calls/reporters/search.d.ts.map +1 -1
- package/dist/tool-calls/reporters/search.js +9 -4
- package/dist/v1/acp-agent.d.ts +35 -19
- package/dist/v1/acp-agent.d.ts.map +1 -1
- package/dist/v1/acp-agent.js +123 -67
- package/dist/v1/client-connection.d.ts +4 -2
- package/dist/v1/client-connection.d.ts.map +1 -1
- package/dist/v1/client-connection.js +6 -2
- package/dist/v1/session-fingerprint.d.ts.map +1 -1
- package/dist/v1/session-fingerprint.js +1 -2
- package/dist/v2/agent.d.ts.map +1 -1
- package/dist/v2/agent.js +53 -19
- package/dist/v2/auth.d.ts +6 -5
- package/dist/v2/auth.d.ts.map +1 -1
- package/dist/v2/auth.js +2 -2
- package/dist/v2/permissions.d.ts +1 -1
- package/dist/v2/permissions.js +1 -1
- package/dist/v2/replay-hold.d.ts +15 -5
- package/dist/v2/replay-hold.d.ts.map +1 -1
- package/dist/v2/replay-hold.js +21 -7
- package/dist/v2/reports.d.ts +4 -0
- package/dist/v2/reports.d.ts.map +1 -1
- package/dist/v2/reports.js +10 -1
- package/dist/v2/session-requests.js +3 -1
- package/dist/v2/session-update.js +3 -3
- package/dist/v2/session.d.ts.map +1 -1
- package/dist/v2/session.js +2 -0
- package/dist/v2/subagent-replay.d.ts +20 -18
- package/dist/v2/subagent-replay.d.ts.map +1 -1
- package/dist/v2/subagent-replay.js +16 -31
- package/dist/v2/tasks.d.ts +55 -6
- package/dist/v2/tasks.d.ts.map +1 -1
- package/dist/v2/tasks.js +147 -19
- package/dist/v2/tool-call.d.ts.map +1 -1
- package/dist/v2/tool-call.js +23 -1
- package/package.json +4 -4
package/dist/providers.js
CHANGED
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
* `providers/disable`, and the legacy gateway logins (`authenticate` or
|
|
5
5
|
* `auth/login` with `gateway` or `gateway-bedrock`). Each core holds its own
|
|
6
6
|
* {@link ProviderConfig} and gateway login, and builds the query env of its
|
|
7
|
-
* sessions with {@link createEnvForProvider}.
|
|
7
|
+
* sessions with {@link createEnvForProvider}. It holds that route above the
|
|
8
|
+
* user's and the project's settings with {@link providerRouteSettings} and
|
|
9
|
+
* {@link applyProviderRoute}.
|
|
8
10
|
*/
|
|
9
11
|
import { RequestError, } from "@agentclientprotocol/sdk/unstable";
|
|
10
12
|
import { GatewayListingError, listBedrockModels, listGatewayModels, PROVIDER_AUTH_TOKEN_PLACEHOLDER, selectBedrockRegion, } from "./gateway-models.js";
|
|
@@ -96,6 +98,40 @@ export function createEnvForProvider(config) {
|
|
|
96
98
|
ANTHROPIC_AUTH_TOKEN: PROVIDER_AUTH_TOKEN_PLACEHOLDER, // Bypass local Claude login checks
|
|
97
99
|
};
|
|
98
100
|
}
|
|
101
|
+
/**
|
|
102
|
+
* The route of a provider as settings of Claude Code, for the tier of the
|
|
103
|
+
* `settings` option. `env` is the result of {@link createEnvForProvider}.
|
|
104
|
+
*
|
|
105
|
+
* Claude Code applies the `env` of settings files after the process env, so
|
|
106
|
+
* without this tier the user's or the project's settings could restore another
|
|
107
|
+
* `ANTHROPIC_BASE_URL`. The empty `apiKeyHelper` turns off a helper of theirs.
|
|
108
|
+
*/
|
|
109
|
+
export function providerRouteSettings(env) {
|
|
110
|
+
return { apiKeyHelper: "", env };
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Sends `route` to the running session, into the tier of the `settings`
|
|
114
|
+
* option (`applyFlagSettings`). Call it right after the query's initialize
|
|
115
|
+
* response, before a request of the session reaches the provider:
|
|
116
|
+
* `getContextUsage()` sends one (`count_tokens`).
|
|
117
|
+
*
|
|
118
|
+
* The `settings` option holds the route too, in one object with the client's
|
|
119
|
+
* settings and the model configuration. Claude Code loads that object as a
|
|
120
|
+
* whole or not at all: one value that fails validation, e.g.
|
|
121
|
+
* `permissions.allow: "Bash"`, leaves all of it out. This call does not depend
|
|
122
|
+
* on that object. When the object did load, the call changes nothing: Claude
|
|
123
|
+
* Code merges `env` key by key.
|
|
124
|
+
*
|
|
125
|
+
* Throws when Claude Code refuses the route. The caller must close the query.
|
|
126
|
+
*/
|
|
127
|
+
export async function applyProviderRoute(query, route) {
|
|
128
|
+
try {
|
|
129
|
+
await query.applyFlagSettings(route);
|
|
130
|
+
}
|
|
131
|
+
catch (error) {
|
|
132
|
+
throw RequestError.internalError({ details: error instanceof Error ? error.message : String(error) }, "The session was not started, because Claude Code did not take its provider or gateway route. Try again, or set the provider or the gateway login again.");
|
|
133
|
+
}
|
|
134
|
+
}
|
|
99
135
|
function sameHeaders(a, b) {
|
|
100
136
|
const aKeys = Object.keys(a);
|
|
101
137
|
return aKeys.length === Object.keys(b).length && aKeys.every((key) => b[key] === a[key]);
|
package/dist/serve.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export declare function serveAcp(logger: Logger | undefined, options: {
|
|
|
24
24
|
/**
|
|
25
25
|
* Routes a connection to the protocol version that the client negotiates in
|
|
26
26
|
* `initialize`. With `auto`, a client that requests version 2 or later gets
|
|
27
|
-
*
|
|
27
|
+
* ACP v2, and every other client gets ACP v1. With `v1`, a v2
|
|
28
28
|
* client is negotiated down to v1. With `v2`, the router rejects the
|
|
29
29
|
* `initialize` of a v1 client as an unsupported protocol version. `onAgent`
|
|
30
30
|
* receives the agent of a v1 connection (`ClaudeAcpAgent`) once the router
|
package/dist/serve.js
CHANGED
|
@@ -38,7 +38,7 @@ export function serveAcp(logger, options) {
|
|
|
38
38
|
/**
|
|
39
39
|
* Routes a connection to the protocol version that the client negotiates in
|
|
40
40
|
* `initialize`. With `auto`, a client that requests version 2 or later gets
|
|
41
|
-
*
|
|
41
|
+
* ACP v2, and every other client gets ACP v1. With `v1`, a v2
|
|
42
42
|
* client is negotiated down to v1. With `v2`, the router rejects the
|
|
43
43
|
* `initialize` of a v1 client as an unsupported protocol version. `onAgent`
|
|
44
44
|
* receives the agent of a v1 connection (`ClaudeAcpAgent`) once the router
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-config-options.d.ts","sourceRoot":"","sources":["../src/session-config-options.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,6BAA6B,EACnC,MA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AAQ,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,IAAI,CAAA;CAAE,GAC3C,OAAO,CAAC,IAAI,CAAC,CAUf"}
|
|
@@ -18,12 +18,25 @@ import { createUltracodeConfigOption, resolveUltracodeEnabled, ULTRACODE_CONFIG_
|
|
|
18
18
|
// personas, so we filter them out and only surface the Agent picker when the
|
|
19
19
|
// user (or a plugin/project) has configured custom agents. Update this set if
|
|
20
20
|
// the SDK's built-in roster changes.
|
|
21
|
+
//
|
|
22
|
+
// The set is matched by name because `AgentInfo` does not say where an agent
|
|
23
|
+
// comes from. `getContextUsage().agents` lists only the agents that are not
|
|
24
|
+
// built in, but session setup does not wait for that request (see
|
|
25
|
+
// `readContextWindow`).
|
|
26
|
+
//
|
|
27
|
+
// Claude Code does not list two of them in every session: `web-fetch` only
|
|
28
|
+
// where its staged rollout or `CLAUDE_CODE_WEB_FETCH_AGENT=1` turns it on, and
|
|
29
|
+
// `claude-code-guide` only where the adapter's environment sets
|
|
30
|
+
// `CLAUDE_CODE_ENTRYPOINT` (the SDK sets `sdk-ts` when it is unset, and Claude
|
|
31
|
+
// Code leaves the agent out for that value).
|
|
21
32
|
export const BUILTIN_AGENT_NAMES = new Set([
|
|
22
33
|
"claude",
|
|
34
|
+
"claude-code-guide",
|
|
23
35
|
"general-purpose",
|
|
24
36
|
"Explore",
|
|
25
37
|
"Plan",
|
|
26
38
|
"statusline-setup",
|
|
39
|
+
"web-fetch",
|
|
27
40
|
]);
|
|
28
41
|
// Value of the synthetic "Default" entry in the agent picker, which maps to the
|
|
29
42
|
// standard Claude Code agent (`applyFlagSettings({ agent: null })`). It is a
|
|
@@ -25,11 +25,12 @@
|
|
|
25
25
|
* replayed child by its agent id carries the RFD's `session` reference to it
|
|
26
26
|
* (`ReplayTranscript.withTarget`).
|
|
27
27
|
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
28
|
+
* The replay sends no `config_option_update` of a child: one that arrives
|
|
29
|
+
* before the load response is a past value to the client. Each child's
|
|
30
|
+
* configuration goes out after the response, with its current state
|
|
31
|
+
* (`currentStates`): the configuration of a child that still runs in this
|
|
32
|
+
* process, else the `model` option with the model of the latest response in
|
|
33
|
+
* its transcript. A child that neither runs nor has a response gets none.
|
|
33
34
|
*
|
|
34
35
|
* A launch without metadata has no known id, so it is not announced: the RFD
|
|
35
36
|
* forbids inventing one. Its Agent call stays an ordinary tool call of the
|
|
@@ -38,7 +39,7 @@
|
|
|
38
39
|
import type { SessionConfigOption } from "@agentclientprotocol/sdk/unstable";
|
|
39
40
|
import type { SessionMessage } from "@anthropic-ai/claude-agent-sdk";
|
|
40
41
|
import type { AcpSessionNotification, SubagentState } from "./acp-subagents.js";
|
|
41
|
-
import { type
|
|
42
|
+
import { type SubagentModels, type WorkState } from "./native-subagents.js";
|
|
42
43
|
import type { SubagentHistory, SubagentRecord } from "./subagent-history.js";
|
|
43
44
|
type Publish = (notification: AcpSessionNotification) => Promise<void>;
|
|
44
45
|
/** A child that the replay shows: its launch has metadata. */
|
|
@@ -62,8 +63,6 @@ export type ReplayChild = {
|
|
|
62
63
|
promptSent: boolean;
|
|
63
64
|
/** Whether it handed a report to its parent with a SubagentHandback call. */
|
|
64
65
|
handedBack?: boolean;
|
|
65
|
-
/** The `model` option entry that the replay sent. */
|
|
66
|
-
model?: ModelEntry;
|
|
67
66
|
/** The model id of the latest response in its transcript. */
|
|
68
67
|
responseModel?: string;
|
|
69
68
|
};
|
|
@@ -123,25 +122,24 @@ export declare class ReplayTranscript<Child extends ReplayChild = ReplayChild> {
|
|
|
123
122
|
export declare class RfdSubagentReplay {
|
|
124
123
|
private readonly history;
|
|
125
124
|
private readonly publish;
|
|
126
|
-
private readonly models?;
|
|
127
125
|
/**
|
|
128
|
-
*
|
|
129
|
-
* A load
|
|
130
|
-
*
|
|
126
|
+
* The session's model list, which {@link currentStates} maps each child's
|
|
127
|
+
* model to. A load can lack the list until the CLI started, so it is read
|
|
128
|
+
* after the load response.
|
|
131
129
|
*/
|
|
132
|
-
private readonly
|
|
130
|
+
private readonly models?;
|
|
133
131
|
/** The working directory of the root session, which a child inherits unless it reports its own. */
|
|
134
132
|
private readonly rootCwd?;
|
|
135
133
|
private readonly transcript;
|
|
136
134
|
/** Children whose transcript could not be read: only their association is replayed. */
|
|
137
135
|
private withoutHistory;
|
|
138
|
-
constructor(history: SubagentHistory, publish: Publish,
|
|
136
|
+
constructor(history: SubagentHistory, publish: Publish,
|
|
139
137
|
/**
|
|
140
|
-
*
|
|
141
|
-
* A load
|
|
142
|
-
*
|
|
138
|
+
* The session's model list, which {@link currentStates} maps each child's
|
|
139
|
+
* model to. A load can lack the list until the CLI started, so it is read
|
|
140
|
+
* after the load response.
|
|
143
141
|
*/
|
|
144
|
-
|
|
142
|
+
models?: SubagentModels | undefined,
|
|
145
143
|
/** The working directory of the root session, which a child inherits unless it reports its own. */
|
|
146
144
|
rootCwd?: string | undefined);
|
|
147
145
|
/**
|
|
@@ -156,21 +154,15 @@ export declare class RfdSubagentReplay {
|
|
|
156
154
|
/**
|
|
157
155
|
* Announces `child` on its parent, as live: running, with the parent's
|
|
158
156
|
* labels, and with its recorded `cwd` when that differs from its parent's.
|
|
159
|
-
* Then it sends `firstModel`, the model of the child's first response, when
|
|
160
|
-
* the transcript has one.
|
|
161
157
|
*/
|
|
162
|
-
announce(child: ReplayChild
|
|
158
|
+
announce(child: ReplayChild): Promise<void>;
|
|
163
159
|
/**
|
|
164
160
|
* The working directory of the session `sessionId` as the client holds it:
|
|
165
161
|
* a child's reported `cwd`, else its parent's, up to the root's.
|
|
166
162
|
*/
|
|
167
163
|
private effectiveCwd;
|
|
168
|
-
/**
|
|
169
|
-
|
|
170
|
-
* whose model changes gets its `model` option again.
|
|
171
|
-
*/
|
|
172
|
-
responseModel(owner: ReplayChild, model: string | undefined): Promise<void>;
|
|
173
|
-
private sendModel;
|
|
164
|
+
/** Takes the model of a replayed response of the child `owner` (see {@link trackResponseModel}). */
|
|
165
|
+
responseModel(owner: ReplayChild, model: string | undefined): void;
|
|
174
166
|
/**
|
|
175
167
|
* The rest of a child's user message to replay, or `null` when nothing is
|
|
176
168
|
* left, after its text went out as the child's incoming `session_message`.
|
|
@@ -209,11 +201,13 @@ export declare class RfdSubagentReplay {
|
|
|
209
201
|
* subagent history is missing.
|
|
210
202
|
*/
|
|
211
203
|
finish(supportsNotices: boolean, rootSessionId: string): Promise<void>;
|
|
204
|
+
/** Whether the replay announced the child session `sessionId`. */
|
|
205
|
+
announced(sessionId: string): boolean;
|
|
212
206
|
/**
|
|
213
|
-
* The current state of each announced child, to send
|
|
214
|
-
* response. The RFD makes that response the freshness
|
|
215
|
-
* treats the replayed states before it as history, so
|
|
216
|
-
* activity and allow no cancel.
|
|
207
|
+
* The current state and configuration of each announced child, to send
|
|
208
|
+
* after the load response. The RFD makes that response the freshness
|
|
209
|
+
* boundary: a client treats the replayed states before it as history, so
|
|
210
|
+
* they show no current activity and allow no cancel.
|
|
217
211
|
*
|
|
218
212
|
* `live` gives the work state of a child that still runs in this process, as
|
|
219
213
|
* when a live session is loaded again. Such a child reports that state and
|
|
@@ -223,6 +217,10 @@ export declare class RfdSubagentReplay {
|
|
|
223
217
|
* A replayed `cwd` whose directory is gone, such as a worktree that Claude
|
|
224
218
|
* Code removed when the child finished, is cleared with `cwd: null`, as the
|
|
225
219
|
* RFD requires after a reconnection.
|
|
220
|
+
*
|
|
221
|
+
* Each child's configuration follows its state (see
|
|
222
|
+
* {@link currentChildConfiguration}). `liveConfiguration` gives the one
|
|
223
|
+
* that the client last got for a child that still runs in this process.
|
|
226
224
|
*/
|
|
227
225
|
currentStates(live: (sessionId: string) => WorkState["state"] | undefined, liveConfiguration?: (sessionId: string) => SessionConfigOption[] | undefined): AcpSessionNotification[];
|
|
228
226
|
/** The prompt of the launch, with the launch's id, to the parent and the child, as live. */
|
|
@@ -241,8 +239,26 @@ export declare class RfdSubagentReplay {
|
|
|
241
239
|
private sendDelivery;
|
|
242
240
|
private sendMessage;
|
|
243
241
|
}
|
|
244
|
-
/**
|
|
245
|
-
|
|
242
|
+
/**
|
|
243
|
+
* Takes `model`, the model id of a replayed response of `child`. The latest
|
|
244
|
+
* one is the child's model after the replay (see
|
|
245
|
+
* {@link currentChildConfiguration}). A response without a model id, or with
|
|
246
|
+
* `<synthetic>`, which marks a message that no model wrote, changes nothing.
|
|
247
|
+
*/
|
|
248
|
+
export declare function trackResponseModel(child: ReplayChild, model: unknown): void;
|
|
249
|
+
/**
|
|
250
|
+
* The configuration of the replayed `child` to send once the replay is over:
|
|
251
|
+
* after the load response on v1, after the root's `replay_complete` on v2. A
|
|
252
|
+
* child's `config_option_update` inside a replay is a past value to the
|
|
253
|
+
* client, so the replay sends none, and this one goes also when the client
|
|
254
|
+
* held the same configuration before.
|
|
255
|
+
*
|
|
256
|
+
* `live` is the configuration that the client last got for a child that still
|
|
257
|
+
* runs in this process. Any other child gets its `model` option, with the
|
|
258
|
+
* model of the latest response in its transcript, as the session's model list
|
|
259
|
+
* `models` names it. Undefined for such a child without responses.
|
|
260
|
+
*/
|
|
261
|
+
export declare function currentChildConfiguration(child: ReplayChild, live: SessionConfigOption[] | undefined, models: SubagentModels | undefined): SessionConfigOption[] | undefined;
|
|
246
262
|
/**
|
|
247
263
|
* The end of a foreground launch from its tool result: an error result that
|
|
248
264
|
* names a stop is a cancellation, any other error a failure.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subagent-replay.d.ts","sourceRoot":"","sources":["../src/subagent-replay.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"subagent-replay.d.ts","sourceRoot":"","sources":["../src/subagent-replay.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,KAAK,EAAE,cAAc,EAAE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,SAAS,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,CAO7E;AAED,iGAAiG;AACjG,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAAC,EAAE;IAAE,aAAa,EAAE,QAAQ,CAAA;CAAE,CAAC,CASxE"}
|
package/dist/subagent-replay.js
CHANGED
|
@@ -113,24 +113,22 @@ export class RfdSubagentReplay {
|
|
|
113
113
|
history;
|
|
114
114
|
publish;
|
|
115
115
|
models;
|
|
116
|
-
mapsDuringReplay;
|
|
117
116
|
rootCwd;
|
|
118
117
|
transcript;
|
|
119
118
|
/** Children whose transcript could not be read: only their association is replayed. */
|
|
120
119
|
withoutHistory = 0;
|
|
121
|
-
constructor(history, publish,
|
|
120
|
+
constructor(history, publish,
|
|
122
121
|
/**
|
|
123
|
-
*
|
|
124
|
-
* A load
|
|
125
|
-
*
|
|
122
|
+
* The session's model list, which {@link currentStates} maps each child's
|
|
123
|
+
* model to. A load can lack the list until the CLI started, so it is read
|
|
124
|
+
* after the load response.
|
|
126
125
|
*/
|
|
127
|
-
|
|
126
|
+
models,
|
|
128
127
|
/** The working directory of the root session, which a child inherits unless it reports its own. */
|
|
129
128
|
rootCwd) {
|
|
130
129
|
this.history = history;
|
|
131
130
|
this.publish = publish;
|
|
132
131
|
this.models = models;
|
|
133
|
-
this.mapsDuringReplay = mapsDuringReplay;
|
|
134
132
|
this.rootCwd = rootCwd;
|
|
135
133
|
this.transcript = new ReplayTranscript(history);
|
|
136
134
|
}
|
|
@@ -152,10 +150,8 @@ export class RfdSubagentReplay {
|
|
|
152
150
|
/**
|
|
153
151
|
* Announces `child` on its parent, as live: running, with the parent's
|
|
154
152
|
* labels, and with its recorded `cwd` when that differs from its parent's.
|
|
155
|
-
* Then it sends `firstModel`, the model of the child's first response, when
|
|
156
|
-
* the transcript has one.
|
|
157
153
|
*/
|
|
158
|
-
async announce(child
|
|
154
|
+
async announce(child) {
|
|
159
155
|
if (child.announced)
|
|
160
156
|
return;
|
|
161
157
|
const labels = rfdLabels(child.record.name ?? child.input.name, child.record.agentType ?? child.input.subagent_type, child.record.description ?? child.input.description);
|
|
@@ -177,7 +173,6 @@ export class RfdSubagentReplay {
|
|
|
177
173
|
});
|
|
178
174
|
child.cwd = cwd;
|
|
179
175
|
child.announced = true;
|
|
180
|
-
await this.responseModel(child, firstModel);
|
|
181
176
|
}
|
|
182
177
|
/**
|
|
183
178
|
* The working directory of the session `sessionId` as the client holds it:
|
|
@@ -194,28 +189,9 @@ export class RfdSubagentReplay {
|
|
|
194
189
|
}
|
|
195
190
|
return this.rootCwd;
|
|
196
191
|
}
|
|
197
|
-
/**
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
*/
|
|
201
|
-
async responseModel(owner, model) {
|
|
202
|
-
const entry = responseModelEntry(model, this.mapsDuringReplay ? this.models : undefined);
|
|
203
|
-
if (!entry || !owner.announced)
|
|
204
|
-
return;
|
|
205
|
-
owner.responseModel = model;
|
|
206
|
-
await this.sendModel(owner, entry);
|
|
207
|
-
}
|
|
208
|
-
async sendModel(child, model) {
|
|
209
|
-
if (child.model?.value === model.value && child.model.name === model.name)
|
|
210
|
-
return;
|
|
211
|
-
child.model = model;
|
|
212
|
-
await this.publish({
|
|
213
|
-
sessionId: child.sessionId,
|
|
214
|
-
update: {
|
|
215
|
-
sessionUpdate: "config_option_update",
|
|
216
|
-
configOptions: [childModelOption(model)],
|
|
217
|
-
},
|
|
218
|
-
});
|
|
192
|
+
/** Takes the model of a replayed response of the child `owner` (see {@link trackResponseModel}). */
|
|
193
|
+
responseModel(owner, model) {
|
|
194
|
+
trackResponseModel(owner, model);
|
|
219
195
|
}
|
|
220
196
|
/**
|
|
221
197
|
* The rest of a child's user message to replay, or `null` when nothing is
|
|
@@ -337,11 +313,15 @@ export class RfdSubagentReplay {
|
|
|
337
313
|
await this.publish({ sessionId: rootSessionId, update: missingHistoryNotice(missing) });
|
|
338
314
|
}
|
|
339
315
|
}
|
|
316
|
+
/** Whether the replay announced the child session `sessionId`. */
|
|
317
|
+
announced(sessionId) {
|
|
318
|
+
return this.transcript.byAgentId.get(sessionId)?.announced === true;
|
|
319
|
+
}
|
|
340
320
|
/**
|
|
341
|
-
* The current state of each announced child, to send
|
|
342
|
-
* response. The RFD makes that response the freshness
|
|
343
|
-
* treats the replayed states before it as history, so
|
|
344
|
-
* activity and allow no cancel.
|
|
321
|
+
* The current state and configuration of each announced child, to send
|
|
322
|
+
* after the load response. The RFD makes that response the freshness
|
|
323
|
+
* boundary: a client treats the replayed states before it as history, so
|
|
324
|
+
* they show no current activity and allow no cancel.
|
|
345
325
|
*
|
|
346
326
|
* `live` gives the work state of a child that still runs in this process, as
|
|
347
327
|
* when a live session is loaded again. Such a child reports that state and
|
|
@@ -351,6 +331,10 @@ export class RfdSubagentReplay {
|
|
|
351
331
|
* A replayed `cwd` whose directory is gone, such as a worktree that Claude
|
|
352
332
|
* Code removed when the child finished, is cleared with `cwd: null`, as the
|
|
353
333
|
* RFD requires after a reconnection.
|
|
334
|
+
*
|
|
335
|
+
* Each child's configuration follows its state (see
|
|
336
|
+
* {@link currentChildConfiguration}). `liveConfiguration` gives the one
|
|
337
|
+
* that the client last got for a child that still runs in this process.
|
|
354
338
|
*/
|
|
355
339
|
currentStates(live, liveConfiguration) {
|
|
356
340
|
return [...this.transcript.children.values()]
|
|
@@ -360,12 +344,7 @@ export class RfdSubagentReplay {
|
|
|
360
344
|
const state = liveState === undefined || liveState === "idle"
|
|
361
345
|
? replayEndState(child)
|
|
362
346
|
: { state: liveState };
|
|
363
|
-
|
|
364
|
-
const entry = responseModelEntry(child.responseModel, this.models);
|
|
365
|
-
const replayed = child.model ? JSON.stringify([childModelOption(child.model)]) : undefined;
|
|
366
|
-
const current = liveConfiguration?.(child.sessionId) ?? (entry ? [childModelOption(entry)] : undefined);
|
|
367
|
-
// A configuration that the replay already sent does not go again.
|
|
368
|
-
const configOptions = current && JSON.stringify(current) !== replayed ? current : undefined;
|
|
347
|
+
const configOptions = currentChildConfiguration(child, liveConfiguration?.(child.sessionId), this.models);
|
|
369
348
|
return [
|
|
370
349
|
{
|
|
371
350
|
sessionId: child.parentSessionId,
|
|
@@ -432,16 +411,34 @@ export class RfdSubagentReplay {
|
|
|
432
411
|
});
|
|
433
412
|
}
|
|
434
413
|
}
|
|
435
|
-
/**
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
414
|
+
/**
|
|
415
|
+
* Takes `model`, the model id of a replayed response of `child`. The latest
|
|
416
|
+
* one is the child's model after the replay (see
|
|
417
|
+
* {@link currentChildConfiguration}). A response without a model id, or with
|
|
418
|
+
* `<synthetic>`, which marks a message that no model wrote, changes nothing.
|
|
419
|
+
*/
|
|
420
|
+
export function trackResponseModel(child, model) {
|
|
421
|
+
if (typeof model === "string" && responseModelEntry(model, undefined)) {
|
|
422
|
+
child.responseModel = model;
|
|
443
423
|
}
|
|
444
|
-
|
|
424
|
+
}
|
|
425
|
+
/**
|
|
426
|
+
* The configuration of the replayed `child` to send once the replay is over:
|
|
427
|
+
* after the load response on v1, after the root's `replay_complete` on v2. A
|
|
428
|
+
* child's `config_option_update` inside a replay is a past value to the
|
|
429
|
+
* client, so the replay sends none, and this one goes also when the client
|
|
430
|
+
* held the same configuration before.
|
|
431
|
+
*
|
|
432
|
+
* `live` is the configuration that the client last got for a child that still
|
|
433
|
+
* runs in this process. Any other child gets its `model` option, with the
|
|
434
|
+
* model of the latest response in its transcript, as the session's model list
|
|
435
|
+
* `models` names it. Undefined for such a child without responses.
|
|
436
|
+
*/
|
|
437
|
+
export function currentChildConfiguration(child, live, models) {
|
|
438
|
+
if (live)
|
|
439
|
+
return live;
|
|
440
|
+
const entry = responseModelEntry(child.responseModel, models);
|
|
441
|
+
return entry ? [childModelOption(entry)] : undefined;
|
|
445
442
|
}
|
|
446
443
|
/**
|
|
447
444
|
* The end of a foreground launch from its tool result: an error result that
|
|
@@ -318,14 +318,5 @@ export declare class AcpToolCallRenderer {
|
|
|
318
318
|
input?: unknown;
|
|
319
319
|
}, cwd?: string): ToolUpdateMeta;
|
|
320
320
|
}
|
|
321
|
-
/**
|
|
322
|
-
* Splits `mcp__<server>__<tool>` the way Claude Code does: the server is the
|
|
323
|
-
* segment up to the next `__`, the tool is the whole rest. `server` is the
|
|
324
|
-
* normalized name, not the config key.
|
|
325
|
-
*/
|
|
326
|
-
export declare function mcpToolName(name: string): {
|
|
327
|
-
server: string;
|
|
328
|
-
tool: string;
|
|
329
|
-
} | undefined;
|
|
330
321
|
export {};
|
|
331
322
|
//# sourceMappingURL=renderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../src/tool-calls/renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,IAAI,qBAAqB,EAC3C,wBAAwB,EACxB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,cAAc,EACf,MAAM,mCAAmC,CAAC;AAS3C,OAAO,EAAuB,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAClF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAM5F,MAAM,MAAM,cAAc,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAC;AAK3D;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAA6B,cAAc,CAAC;AAErE,wFAAwF;AACxF,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAExF;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE;IAAE,WAAW,EAAE,MAAM,CAAC;IA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CAAC,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,cAAc;CA2BtF"}
|
|
@@ -4,7 +4,7 @@ import { isAbortedToolResult } from "../tool-result-meta.js";
|
|
|
4
4
|
import { ClientCapabilities } from "./client-capabilities.js";
|
|
5
5
|
import { resultText, textContent, toAcpContentUpdate, toolResponseMarkers } from "./content.js";
|
|
6
6
|
import { reporterFor } from "./reporters/index.js";
|
|
7
|
-
import { resolveSkillPath } from "./reporters/interaction.js";
|
|
7
|
+
import { mcpToolName, resolveSkillPath } from "./reporters/interaction.js";
|
|
8
8
|
import { shellDescription } from "./reporters/bash.js";
|
|
9
9
|
import { grepPath } from "./reporters/search.js";
|
|
10
10
|
/** The id suffix of the call that clears the plan file of an approved plan for AIR. */
|
|
@@ -632,24 +632,6 @@ export class AcpToolCallRenderer {
|
|
|
632
632
|
return meta;
|
|
633
633
|
}
|
|
634
634
|
}
|
|
635
|
-
/**
|
|
636
|
-
* Splits `mcp__<server>__<tool>` the way Claude Code does: the server is the
|
|
637
|
-
* segment up to the next `__`, the tool is the whole rest. `server` is the
|
|
638
|
-
* normalized name, not the config key.
|
|
639
|
-
*/
|
|
640
|
-
export function mcpToolName(name) {
|
|
641
|
-
const prefix = "mcp__";
|
|
642
|
-
if (!name.startsWith(prefix))
|
|
643
|
-
return undefined;
|
|
644
|
-
const rest = name.slice(prefix.length);
|
|
645
|
-
const separator = rest.indexOf("__");
|
|
646
|
-
if (separator <= 0)
|
|
647
|
-
return undefined;
|
|
648
|
-
const tool = rest.slice(separator + 2);
|
|
649
|
-
if (!tool)
|
|
650
|
-
return undefined;
|
|
651
|
-
return { server: rest.slice(0, separator), tool };
|
|
652
|
-
}
|
|
653
635
|
/** The input with the path of the plan file in place of the plan text. */
|
|
654
636
|
function planFileInput(rawInput, planFilePath) {
|
|
655
637
|
const input = rawInput && typeof rawInput === "object" && !Array.isArray(rawInput)
|
|
@@ -53,6 +53,15 @@ export declare class GenericReporter implements ToolReporter {
|
|
|
53
53
|
constructor(toolName: string);
|
|
54
54
|
toolUse(input: unknown): ToolUseFacts;
|
|
55
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Splits `mcp__<server>__<tool>` the way Claude Code does: the server is the
|
|
58
|
+
* segment up to the next `__`, the tool is the whole rest. `server` is the
|
|
59
|
+
* normalized name, not the config key.
|
|
60
|
+
*/
|
|
61
|
+
export declare function mcpToolName(name: string): {
|
|
62
|
+
server: string;
|
|
63
|
+
tool: string;
|
|
64
|
+
} | undefined;
|
|
56
65
|
/**
|
|
57
66
|
* An agent control tool (SendMessage, TaskStop, ListAgents, Monitor). AIR
|
|
58
67
|
* shows the result in its own frame and parses the JSON result of SendMessage
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interaction.d.ts","sourceRoot":"","sources":["../../../src/tool-calls/reporters/interaction.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EACV,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,YAAY,EACb,MAAM,aAAa,CAAC;AAErB;;;;;;;GAOG;AACH,qBAAa,oBAAqB,YAAW,YAAY;IACvD,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,YAAY,EAAE,EAAE,cAAc,GAAG,YAAY;IAYvE,iEAAiE;IACjE,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,eAAe;IASvD;;;OAGG;IACH,WAAW,CAAC,OAAO,EAAE,iBAAiB,GAAG,eAAe,GAAG,SAAS;CASrE;AAED,2GAA2G;AAC3G,qBAAa,qBAAsB,YAAW,YAAY;IACxD,OAAO,IAAI,YAAY;CAGxB;AAqBD,oEAAoE;AACpE,qBAAa,uBAAwB,YAAW,YAAY;IAC1D;;;OAGG;IACH,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,YAAY,EAAE,EAAE,cAAc,GAAG,YAAY;CAgB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
|
|
163
163
|
}
|
|
164
164
|
toolUse(input) {
|
|
165
165
|
if (this.toolName !== "Other") {
|
|
166
|
-
|
|
166
|
+
const mcp = mcpToolName(this.toolName);
|
|
167
|
+
return {
|
|
168
|
+
title: mcp ? `${mcp.server}: ${mcp.tool}` : this.toolName || "Unknown Tool",
|
|
169
|
+
kind: "other",
|
|
170
|
+
};
|
|
167
171
|
}
|
|
168
172
|
let json;
|
|
169
173
|
try {
|
|
@@ -179,6 +183,24 @@ export class GenericReporter {
|
|
|
179
183
|
};
|
|
180
184
|
}
|
|
181
185
|
}
|
|
186
|
+
/**
|
|
187
|
+
* Splits `mcp__<server>__<tool>` the way Claude Code does: the server is the
|
|
188
|
+
* segment up to the next `__`, the tool is the whole rest. `server` is the
|
|
189
|
+
* normalized name, not the config key.
|
|
190
|
+
*/
|
|
191
|
+
export function mcpToolName(name) {
|
|
192
|
+
const prefix = "mcp__";
|
|
193
|
+
if (!name.startsWith(prefix))
|
|
194
|
+
return undefined;
|
|
195
|
+
const rest = name.slice(prefix.length);
|
|
196
|
+
const separator = rest.indexOf("__");
|
|
197
|
+
if (separator <= 0)
|
|
198
|
+
return undefined;
|
|
199
|
+
const tool = rest.slice(separator + 2);
|
|
200
|
+
if (!tool)
|
|
201
|
+
return undefined;
|
|
202
|
+
return { server: rest.slice(0, separator), tool };
|
|
203
|
+
}
|
|
182
204
|
/**
|
|
183
205
|
* An agent control tool (SendMessage, TaskStop, ListAgents, Monitor). AIR
|
|
184
206
|
* shows the result in its own frame and parses the JSON result of SendMessage
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import type { ToolReporter, ToolUseFacts } from "../facts.js";
|
|
2
|
-
/**
|
|
1
|
+
import type { ToolReporter, ToolUseContext, ToolUseFacts } from "../facts.js";
|
|
2
|
+
/**
|
|
3
|
+
* Glob: the file list is the result to show. A v1 client gets the path and
|
|
4
|
+
* the pattern as Markdown code spans, like upstream. A v2 tool call title is
|
|
5
|
+
* plain text, so a v2 client gets them as they are.
|
|
6
|
+
*/
|
|
3
7
|
export declare class GlobReporter implements ToolReporter {
|
|
4
|
-
toolUse(input: unknown): ToolUseFacts;
|
|
8
|
+
toolUse(input: unknown, { capabilities }: ToolUseContext): ToolUseFacts;
|
|
5
9
|
}
|
|
6
10
|
/** Grep: the title is the equivalent grep command line. */
|
|
7
11
|
export declare class GrepReporter implements ToolReporter {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/tool-calls/reporters/search.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/tool-calls/reporters/search.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE9E;;;;GAIG;AACH,qBAAa,YAAa,YAAW,YAAY;IAC/C,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,YAAY,EAAE,EAAE,cAAc,GAAG,YAAY;CAaxE;AAED,2DAA2D;AAC3D,qBAAa,YAAa,YAAW,YAAY;IAC/C,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY;CAoBtC;AAgBD;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAK3D"}
|