@agentclientprotocol/claude-agent-acp 0.106.1-preview.6 → 0.106.1-preview.7
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 +1 -76
- package/dist/native-subagents.d.ts +72 -9
- package/dist/native-subagents.d.ts.map +1 -1
- package/dist/native-subagents.js +130 -12
- package/dist/subagent-replay.d.ts +16 -1
- package/dist/subagent-replay.d.ts.map +1 -1
- package/dist/subagent-replay.js +28 -1
- package/dist/v1/acp-agent.d.ts +11 -0
- package/dist/v1/acp-agent.d.ts.map +1 -1
- package/dist/v1/acp-agent.js +24 -5
- package/dist/v2/agent.js +10 -4
- package/dist/v2/subagent-replay.js +2 -2
- package/dist/v2/tasks.d.ts +29 -11
- package/dist/v2/tasks.d.ts.map +1 -1
- package/dist/v2/tasks.js +69 -19
- package/dist/v2/tool-call.js +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -53,81 +53,6 @@ npm run build:binary
|
|
|
53
53
|
npm run smoke:binary # add `-- --full` to drive a real session; needs a Claude login
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
### Subagent sessions
|
|
57
|
-
|
|
58
|
-
A client that declares `clientCapabilities.subagents`, other than JetBrains AIR, gets each Agent or
|
|
59
|
-
Task subagent as its own child session, following the [subagents RFD](https://github.com/agentclientprotocol/agent-client-protocol/blob/main/docs/rfds/subagents.mdx):
|
|
60
|
-
|
|
61
|
-
- `subagent_update` on the parent announces the child before any of its traffic, with the
|
|
62
|
-
parent's `title` and `description` for it, and reports its work state: `running`,
|
|
63
|
-
`requires_action` while one of its requests is open (and `running` again when the last one ends,
|
|
64
|
-
unless a cancel withdrew it: the child is stopping then), and `idle` when its work ends, with
|
|
65
|
-
`end_turn` or `cancelled` when the SDK gives the reason. A failure is `idle` with the `error`
|
|
66
|
-
stop reason and the SDK's error text as its `error`. The child keeps its session for every
|
|
67
|
-
delegation to it.
|
|
68
|
-
- A child that runs outside its parent's working directory, such as an Agent call with
|
|
69
|
-
`isolation: "worktree"`, gets its `cwd` on `subagent_update` before its first tool call. The
|
|
70
|
-
adapter takes it from the `cwd` of the child's own hooks: its SubagentStart hook runs before its
|
|
71
|
-
first model request. It sends `cwd: null` when the child is back in its parent's directory. A
|
|
72
|
-
child in its parent's directory gets no `cwd`, and no child gets `additionalDirectories`: Claude
|
|
73
|
-
Code gives a subagent the session's additional directories, so it inherits them. A replay
|
|
74
|
-
announces a child with the `cwd` that its transcript recorded, and clears it after the response
|
|
75
|
-
when that directory no longer exists.
|
|
76
|
-
- Session messages replace the Agent or Task call that launches the child, which its parent is
|
|
77
|
-
not shown:
|
|
78
|
-
- The launch's prompt is a `session_message` in both transcripts: the parent's outgoing view and
|
|
79
|
-
the child's incoming one. Both use the launch's tool use id, and each names the other with the
|
|
80
|
-
draft RFD's `recipientMessageId` and `senderMessageId`.
|
|
81
|
-
- A foreground child's answer, from the launch's result, is the child's `session_message` to
|
|
82
|
-
the parent. In Claude Code's hand-back mode, the child's `SubagentHandback` call is its
|
|
83
|
-
message to the parent instead, in both transcripts and linked the same way.
|
|
84
|
-
- A launch whose child is never exposed is shown as a tool call after all, with its final
|
|
85
|
-
status.
|
|
86
|
-
- The message of a SendMessage call that resumes the child is a `session_message` in the child's
|
|
87
|
-
transcript. The SendMessage call stays a tool call of the session that made it.
|
|
88
|
-
- `session/cancel` on the parent interrupts Claude Code, which stops the foreground children that
|
|
89
|
-
the turn waits on. Background children keep running, as the RFD prefers; a client stops one with
|
|
90
|
-
its own `cancel`. Each stopped child reports `idle` with `cancelled` from Claude Code's own
|
|
91
|
-
events, and its open requests are withdrawn. The adapter ends no child at a cancel itself, so a
|
|
92
|
-
child that keeps running keeps its open requests and its open tool calls. To spare background
|
|
93
|
-
children, the adapter declares the SDK option `perTaskStopAffordance`, which a client can turn
|
|
94
|
-
off in `_meta.claudeCode.options`. That option spares background workflows too, which a client
|
|
95
|
-
cannot stop, so the adapter stops them after the interrupt, as Claude Code did without it.
|
|
96
|
-
Background commands keep running after a cancel either way. A tool call of a stopped child that Claude Code reports no
|
|
97
|
-
result for, such as the command it was running, ends in the child's session before the cancelled
|
|
98
|
-
prompt resolves. When Claude Code stops a background child after that, or while no prompt runs,
|
|
99
|
-
the tool call ends right after the child reports `idle`. A child that still runs when Claude Code
|
|
100
|
-
exits is `idle` with no stop reason.
|
|
101
|
-
- A child whose parent is not yet known when it ends is not exposed, since the RFD forbids
|
|
102
|
-
guessing its parent.
|
|
103
|
-
- A replay restores each child under its live session id, from its own transcript, with the same
|
|
104
|
-
session messages as live, and its end is an `idle` before the response.
|
|
105
|
-
A launch without Claude Code's metadata file for the child stays an ordinary tool call of the
|
|
106
|
-
parent, and a notice, for a client that takes notices, says that subagent history is missing.
|
|
107
|
-
- After a load or resume, with or without replay, a SendMessage that resumes an agent from before
|
|
108
|
-
it runs that agent in its session from before. Before the agent's traffic, each of its ancestors
|
|
109
|
-
that the client was not told about in this connection is announced, parent before child and
|
|
110
|
-
with no work state, as the RFD requires. An agent whose launch the session's history does not
|
|
111
|
-
record stays unexposed.
|
|
112
|
-
- Each running child is announced with the `cancel` capability. `session/cancel` with the child's
|
|
113
|
-
session id stops that child's current work, through the SDK's `Query.stopTask`, and not its
|
|
114
|
-
parent's: Claude Code also stops the foreground children it waits on, and the parent's turn goes
|
|
115
|
-
on. Each stopped child reports `idle` with `cancelled` from Claude Code's own events, and its
|
|
116
|
-
requests that the stop withdraws report no `running` first. A replayed child, which no longer
|
|
117
|
-
runs, gets no capabilities. A client cannot prompt or otherwise change a child.
|
|
118
|
-
|
|
119
|
-
An [ACP v2](#experimental-acp-v2) client gets the same without declaring anything, since subagents
|
|
120
|
-
are part of v2's baseline. Each child also reports its work state as its own `state_update`, right
|
|
121
|
-
after the parent's copy.
|
|
122
|
-
|
|
123
|
-
JetBrains AIR keeps the earlier draft of the RFD (`subagent_spawned`, `subagent_state_update`),
|
|
124
|
-
which it enables with `nativeSubagentSessions` in `_meta.jetbrains.air.capabilities`. See
|
|
125
|
-
[AIR extensions](docs/air-extensions.md#native-subagent-sessions).
|
|
126
|
-
|
|
127
|
-
Without either signal, Agent and Task stay ordinary tool calls and child interactions stay on the
|
|
128
|
-
root session. Clients that use the historical `_meta["subagent-transcript"]` capability or the
|
|
129
|
-
`forwardSubagentText` session option retain the flattened child transcript.
|
|
130
|
-
|
|
131
56
|
### Experimental ACP v2
|
|
132
57
|
|
|
133
58
|
The adapter also serves the [draft ACP v2](https://agentclientprotocol.com/protocol/v2/overview):
|
|
@@ -143,7 +68,7 @@ with replay, `session/close`, `session/prompt`, `session/cancel`), `session/dele
|
|
|
143
68
|
`session/fork`, `session/status`, `session/options` (with initial `configOptions` on `session/new` and
|
|
144
69
|
`session/resume`), `session/set_title`, additional directories, config options (the mode is one), plans, notices,
|
|
145
70
|
compaction, display terminals for commands, permission requests, elicitation, providers, auth, and
|
|
146
|
-
[subagents](
|
|
71
|
+
[subagents](docs/subagent-sessions.md). Steering is v1 only for now.
|
|
147
72
|
|
|
148
73
|
v2 is served by the v2 agent in `src/v2/`, which runs straight on Claude
|
|
149
74
|
Code instead of translating to v1. A v2 client that declares JetBrains AIR
|
|
@@ -97,10 +97,15 @@ export type TaskEnd = {
|
|
|
97
97
|
/** The SDK's reason for an unusual end, such as `worker_restart`. */
|
|
98
98
|
reason?: string;
|
|
99
99
|
/**
|
|
100
|
-
* The adapter knows that the work ended, but not why: the stream ended
|
|
101
|
-
*
|
|
100
|
+
* The adapter knows that the work ended, but not why: the stream ended
|
|
101
|
+
* with the task still running.
|
|
102
102
|
*/
|
|
103
103
|
unexplained?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* The adapter stops following the task, which may still run: the
|
|
106
|
+
* conversation was reset, and the runtime forgets its children.
|
|
107
|
+
*/
|
|
108
|
+
unobservable?: boolean;
|
|
104
109
|
};
|
|
105
110
|
type TaskStarted = {
|
|
106
111
|
taskId: string;
|
|
@@ -193,6 +198,11 @@ export declare class NativeSubagentRuntime {
|
|
|
193
198
|
* input, and the call that delegated the run.
|
|
194
199
|
*/
|
|
195
200
|
private readonly handbacks;
|
|
201
|
+
/**
|
|
202
|
+
* The RFD form: the agent that each TaskStop or SendMessage call names (see
|
|
203
|
+
* {@link targetAgentId}), until the call's final update.
|
|
204
|
+
*/
|
|
205
|
+
private readonly targetByToolCall;
|
|
196
206
|
private readonly generationByTaskId;
|
|
197
207
|
private readonly pending;
|
|
198
208
|
private pendingCount;
|
|
@@ -307,12 +317,24 @@ export declare class NativeSubagentRuntime {
|
|
|
307
317
|
finishTask(taskId: string, status: unknown, deliver: Publish, toolUseId?: string | null, end?: TaskEnd): Promise<void>;
|
|
308
318
|
/**
|
|
309
319
|
* Ends every child that still runs, because the stream ended or the
|
|
310
|
-
* conversation was reset. AIR's draft reports `state` for each.
|
|
311
|
-
*
|
|
312
|
-
*
|
|
313
|
-
*
|
|
320
|
+
* conversation was reset. AIR's draft reports `state` for each.
|
|
321
|
+
*
|
|
322
|
+
* The RFD form, at the end of the stream: Claude Code's process ran the
|
|
323
|
+
* children and is gone, or the caller closes the query next, which
|
|
324
|
+
* terminates it, so their work ended. Its cause is unknown, so each is idle with no stop reason: a
|
|
325
|
+
* child that a cancel stopped already reported it from the SDK's events,
|
|
326
|
+
* and a background child that outlived the cancel was not cancelled.
|
|
327
|
+
*
|
|
328
|
+
* The RFD form, at a conversation reset (`mayStillRun`): Claude Code can
|
|
329
|
+
* keep the old conversation's subagents running, and the caller forgets
|
|
330
|
+
* them next (`clear`), so no later event of theirs is reported. Their work
|
|
331
|
+
* did not end as far as the adapter knows, so each is `unknown`, as the
|
|
332
|
+
* RFD requires when a child can no longer be observed, and loses its
|
|
333
|
+
* `cancel` capability. A child that is idle keeps its state.
|
|
314
334
|
*/
|
|
315
|
-
finishAll(state: SubagentState, deliver: Publish
|
|
335
|
+
finishAll(state: SubagentState, deliver: Publish, { mayStillRun }?: {
|
|
336
|
+
mayStillRun?: boolean;
|
|
337
|
+
}): Promise<void>;
|
|
316
338
|
/**
|
|
317
339
|
* The parent session got `session/cancel`. AIR's draft ends every child as
|
|
318
340
|
* cancelled here. The RFD form reports nothing: acknowledging a cancel is no
|
|
@@ -423,7 +445,10 @@ export declare class NativeSubagentRuntime {
|
|
|
423
445
|
* then its configuration. A runtime without a form never does.
|
|
424
446
|
*/
|
|
425
447
|
private announce;
|
|
426
|
-
/**
|
|
448
|
+
/**
|
|
449
|
+
* The RFD form: publishes the work state of `child` on its parent, with
|
|
450
|
+
* `capabilities` when the child's change with it.
|
|
451
|
+
*/
|
|
427
452
|
private reportState;
|
|
428
453
|
/**
|
|
429
454
|
* Routes an update to the child session. It never goes to the root session:
|
|
@@ -473,6 +498,23 @@ export declare class NativeSubagentRuntime {
|
|
|
473
498
|
* final status. Any other update is returned as is.
|
|
474
499
|
*/
|
|
475
500
|
private routeRfdSendMessage;
|
|
501
|
+
/** The RFD form: remembers the agent that a TaskStop or SendMessage call names. */
|
|
502
|
+
private rememberTarget;
|
|
503
|
+
/**
|
|
504
|
+
* The RFD form: `notification`, an update that the client is shown, with
|
|
505
|
+
* the RFD's `session` reference when it is of a tool call that operates on
|
|
506
|
+
* an announced child of another session (see {@link withSessionReference}):
|
|
507
|
+
*
|
|
508
|
+
* - a TaskStop or SendMessage call that names the child by its agent id;
|
|
509
|
+
* - a SendMessage call that resumed the child, and stays shown because a
|
|
510
|
+
* permission request showed it;
|
|
511
|
+
* - an Agent/Task call that launched the child, and stays shown for the
|
|
512
|
+
* same reason.
|
|
513
|
+
*
|
|
514
|
+
* The RFD requires the announcement before the reference, so a call whose
|
|
515
|
+
* child is not announced yet gets none.
|
|
516
|
+
*/
|
|
517
|
+
private withTarget;
|
|
476
518
|
/** Whether `update` is of an Agent/Task call, by its tool name or, in the
|
|
477
519
|
* RFD form, by the id of a call the client is not shown. */
|
|
478
520
|
private isControlUpdate;
|
|
@@ -550,10 +592,28 @@ export declare function finishNativeSubagent(session: NativeSubagentSession, tas
|
|
|
550
592
|
* prompt goes from the parent to the child, a SendMessage call, whose message
|
|
551
593
|
* goes from its sender to a child, or a child's SubagentHandback call, whose
|
|
552
594
|
* report goes from the child to the parent. Both views use the
|
|
553
|
-
* call's tool use id, and each names the other with the
|
|
595
|
+
* call's tool use id, and each names the other with the RFD's
|
|
554
596
|
* `recipientMessageId` and `senderMessageId`.
|
|
555
597
|
*/
|
|
556
598
|
export declare function linkedSessionMessages(toolUseId: string, senderSessionId: string, recipientSessionId: string, text: string): AcpSessionNotification[];
|
|
599
|
+
/**
|
|
600
|
+
* The RFD form: the agent that a tool call names as the one it operates on:
|
|
601
|
+
* the `task_id` of a TaskStop call, or the `to` of a SendMessage call. It is
|
|
602
|
+
* an agent only if it is the id of one: an agent's id is its child session's
|
|
603
|
+
* id. Both tools also take a name, which is not resolved here: Claude Code
|
|
604
|
+
* resolves it, and the adapter cannot tell which agent it picked. `undefined`
|
|
605
|
+
* for any other call.
|
|
606
|
+
*/
|
|
607
|
+
export declare function targetAgentId(toolName: unknown, rawInput: unknown): string | undefined;
|
|
608
|
+
/**
|
|
609
|
+
* The RFD form: `notification`, a tool call's report, with a `session`
|
|
610
|
+
* reference to `sessionId` after its content: `{ "type": "session",
|
|
611
|
+
* "sessionId": "..." }`, which links the call to the session it operates on.
|
|
612
|
+
* A `tool_call_update` replaces the content that the client holds, so the
|
|
613
|
+
* reference goes on every report that carries content, and a
|
|
614
|
+
* `tool_call_update` without content is returned as it is.
|
|
615
|
+
*/
|
|
616
|
+
export declare function withSessionReference(notification: AcpSessionNotification, sessionId: string): AcpSessionNotification;
|
|
557
617
|
/**
|
|
558
618
|
* The tool with which a child hands its report to its parent, when Claude
|
|
559
619
|
* Code runs in hand-back mode. The Agent/Task result then only says that the
|
|
@@ -586,6 +646,9 @@ export declare function launchReply(launchId: string, childSessionId: string, pa
|
|
|
586
646
|
* A task that a worker restart orphaned, or that was still running when the
|
|
587
647
|
* stream ended, is idle with no stop reason: its work ended, but the adapter
|
|
588
648
|
* did not see a cancellation or a failure, which the RFD forbids claiming.
|
|
649
|
+
*
|
|
650
|
+
* A child that the adapter can no longer observe and that may still run is
|
|
651
|
+
* not idle but `unknown` (see `NativeSubagentRuntime.finishAll`).
|
|
589
652
|
*/
|
|
590
653
|
export declare function rfdEndState(state: SubagentState, end: TaskEnd | undefined): WorkState;
|
|
591
654
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native-subagents.d.ts","sourceRoot":"","sources":["../src/native-subagents.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACzB,MAAM,mCAAmC,CAAC;AAG3C,OAAO,KAAK,EAAE,sBAAsB,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAM9F,kFAAkF;AAClF,MAAM,MAAM,SAAS,GAAG,WAAW,CACjC,OAAO,CAAC,mBAAmB,CAAC,QAAQ,CAAC,EAAE;IAAE,aAAa,EAAE,iBAAiB,CAAA;CAAE,CAAC,CAAC,OAAO,CAAC,CACtF,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2DAA2D;IAC3D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;IAC/B;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,4EAA4E;IAC5E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;gDAC4C;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;I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DxB;AA0CD,mGAAmG;AACnG,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,GAAG,SAAS,CAU7E;AAED,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,gBAAgB,GAAG,SAAS,EACtC,IAAI,EAAE,gBAAgB,GACrB,gBAAgB,CAOlB;AA0CD;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAKjF"}
|
package/dist/native-subagents.js
CHANGED
|
@@ -64,6 +64,11 @@ export class NativeSubagentRuntime {
|
|
|
64
64
|
* input, and the call that delegated the run.
|
|
65
65
|
*/
|
|
66
66
|
handbacks = new Map();
|
|
67
|
+
/**
|
|
68
|
+
* The RFD form: the agent that each TaskStop or SendMessage call names (see
|
|
69
|
+
* {@link targetAgentId}), until the call's final update.
|
|
70
|
+
*/
|
|
71
|
+
targetByToolCall = new Map();
|
|
67
72
|
generationByTaskId = new Map();
|
|
68
73
|
pending = new Map();
|
|
69
74
|
pendingCount = 0;
|
|
@@ -112,7 +117,11 @@ export class NativeSubagentRuntime {
|
|
|
112
117
|
if (!routed)
|
|
113
118
|
return routed;
|
|
114
119
|
this.rememberSendMessage(routed);
|
|
115
|
-
|
|
120
|
+
if (this.form !== "rfd")
|
|
121
|
+
return routed;
|
|
122
|
+
this.rememberTarget(routed);
|
|
123
|
+
const shown = this.routeRfdSendMessage(routed, forcedSessionId);
|
|
124
|
+
return shown && this.withTarget(shown);
|
|
116
125
|
}
|
|
117
126
|
/**
|
|
118
127
|
* The RFD form: the work state that the client holds for the announced child
|
|
@@ -587,7 +596,11 @@ export class NativeSubagentRuntime {
|
|
|
587
596
|
for (const pending of this.takePending(child.parentToolUseId))
|
|
588
597
|
await deliver(pending);
|
|
589
598
|
}
|
|
590
|
-
if (this.form === "rfd") {
|
|
599
|
+
if (this.form === "rfd" && end?.unobservable) {
|
|
600
|
+
// The child's `cancel` goes with it: a forgotten child cannot be stopped.
|
|
601
|
+
await this.reportState(child, { state: "unknown" }, { capabilities: null });
|
|
602
|
+
}
|
|
603
|
+
else if (this.form === "rfd") {
|
|
591
604
|
await this.reportState(child, rfdEndState(state, end));
|
|
592
605
|
child.missingError = state === "failed" && !end?.error && !end?.unexplained;
|
|
593
606
|
if (child.parentToolUseId)
|
|
@@ -616,14 +629,28 @@ export class NativeSubagentRuntime {
|
|
|
616
629
|
}
|
|
617
630
|
/**
|
|
618
631
|
* Ends every child that still runs, because the stream ended or the
|
|
619
|
-
* conversation was reset. AIR's draft reports `state` for each.
|
|
620
|
-
*
|
|
621
|
-
*
|
|
622
|
-
*
|
|
632
|
+
* conversation was reset. AIR's draft reports `state` for each.
|
|
633
|
+
*
|
|
634
|
+
* The RFD form, at the end of the stream: Claude Code's process ran the
|
|
635
|
+
* children and is gone, or the caller closes the query next, which
|
|
636
|
+
* terminates it, so their work ended. Its cause is unknown, so each is idle with no stop reason: a
|
|
637
|
+
* child that a cancel stopped already reported it from the SDK's events,
|
|
638
|
+
* and a background child that outlived the cancel was not cancelled.
|
|
639
|
+
*
|
|
640
|
+
* The RFD form, at a conversation reset (`mayStillRun`): Claude Code can
|
|
641
|
+
* keep the old conversation's subagents running, and the caller forgets
|
|
642
|
+
* them next (`clear`), so no later event of theirs is reported. Their work
|
|
643
|
+
* did not end as far as the adapter knows, so each is `unknown`, as the
|
|
644
|
+
* RFD requires when a child can no longer be observed, and loses its
|
|
645
|
+
* `cancel` capability. A child that is idle keeps its state.
|
|
623
646
|
*/
|
|
624
|
-
async finishAll(state, deliver) {
|
|
647
|
+
async finishAll(state, deliver, { mayStillRun = false } = {}) {
|
|
625
648
|
const errors = [];
|
|
626
|
-
const end = this.form
|
|
649
|
+
const end = this.form !== "rfd"
|
|
650
|
+
? undefined
|
|
651
|
+
: mayStillRun
|
|
652
|
+
? { unobservable: true }
|
|
653
|
+
: { unexplained: true };
|
|
627
654
|
try {
|
|
628
655
|
for (const taskId of [...this.children.keys()].reverse()) {
|
|
629
656
|
try {
|
|
@@ -966,13 +993,21 @@ export class NativeSubagentRuntime {
|
|
|
966
993
|
await this.publishCwd(child);
|
|
967
994
|
await this.publishConfiguration(child);
|
|
968
995
|
}
|
|
969
|
-
/**
|
|
970
|
-
|
|
996
|
+
/**
|
|
997
|
+
* The RFD form: publishes the work state of `child` on its parent, with
|
|
998
|
+
* `capabilities` when the child's change with it.
|
|
999
|
+
*/
|
|
1000
|
+
async reportState(child, state, capabilities) {
|
|
971
1001
|
child.workState = state.state;
|
|
972
1002
|
child.missingError = false;
|
|
973
1003
|
await this.publish({
|
|
974
1004
|
sessionId: child.parentSessionId,
|
|
975
|
-
update: {
|
|
1005
|
+
update: {
|
|
1006
|
+
sessionUpdate: "subagent_update",
|
|
1007
|
+
sessionId: child.sessionId,
|
|
1008
|
+
...capabilities,
|
|
1009
|
+
state,
|
|
1010
|
+
},
|
|
976
1011
|
});
|
|
977
1012
|
}
|
|
978
1013
|
/**
|
|
@@ -1147,6 +1182,43 @@ export class NativeSubagentRuntime {
|
|
|
1147
1182
|
return null;
|
|
1148
1183
|
return unexposedControlFallback(sendMessage.initial, notification, sendMessage.sender);
|
|
1149
1184
|
}
|
|
1185
|
+
/** The RFD form: remembers the agent that a TaskStop or SendMessage call names. */
|
|
1186
|
+
rememberTarget({ update }) {
|
|
1187
|
+
if (update.sessionUpdate !== "tool_call" && update.sessionUpdate !== "tool_call_update")
|
|
1188
|
+
return;
|
|
1189
|
+
const claudeMeta = update._meta?.claudeCode;
|
|
1190
|
+
const agentId = targetAgentId(claudeMeta?.toolName, update.rawInput);
|
|
1191
|
+
if (agentId !== undefined)
|
|
1192
|
+
this.targetByToolCall.set(update.toolCallId, agentId);
|
|
1193
|
+
}
|
|
1194
|
+
/**
|
|
1195
|
+
* The RFD form: `notification`, an update that the client is shown, with
|
|
1196
|
+
* the RFD's `session` reference when it is of a tool call that operates on
|
|
1197
|
+
* an announced child of another session (see {@link withSessionReference}):
|
|
1198
|
+
*
|
|
1199
|
+
* - a TaskStop or SendMessage call that names the child by its agent id;
|
|
1200
|
+
* - a SendMessage call that resumed the child, and stays shown because a
|
|
1201
|
+
* permission request showed it;
|
|
1202
|
+
* - an Agent/Task call that launched the child, and stays shown for the
|
|
1203
|
+
* same reason.
|
|
1204
|
+
*
|
|
1205
|
+
* The RFD requires the announcement before the reference, so a call whose
|
|
1206
|
+
* child is not announced yet gets none.
|
|
1207
|
+
*/
|
|
1208
|
+
withTarget(notification) {
|
|
1209
|
+
const { update } = notification;
|
|
1210
|
+
if (update.sessionUpdate !== "tool_call" && update.sessionUpdate !== "tool_call_update") {
|
|
1211
|
+
return notification;
|
|
1212
|
+
}
|
|
1213
|
+
const agentId = this.targetByToolCall.get(update.toolCallId);
|
|
1214
|
+
if (isFinalToolCallStatus(update.status))
|
|
1215
|
+
this.targetByToolCall.delete(update.toolCallId);
|
|
1216
|
+
const child = this.childByParentToolUse.get(update.toolCallId) ??
|
|
1217
|
+
(agentId !== undefined ? this.children.get(agentId) : undefined);
|
|
1218
|
+
if (!child?.announced || child.sessionId === notification.sessionId)
|
|
1219
|
+
return notification;
|
|
1220
|
+
return withSessionReference(notification, child.sessionId);
|
|
1221
|
+
}
|
|
1150
1222
|
/** Whether `update` is of an Agent/Task call, by its tool name or, in the
|
|
1151
1223
|
* RFD form, by the id of a call the client is not shown. */
|
|
1152
1224
|
isControlUpdate(update) {
|
|
@@ -1206,6 +1278,7 @@ export class NativeSubagentRuntime {
|
|
|
1206
1278
|
this.hiddenLaunches.clear();
|
|
1207
1279
|
this.hiddenSendMessages.clear();
|
|
1208
1280
|
this.handbacks.clear();
|
|
1281
|
+
this.targetByToolCall.clear();
|
|
1209
1282
|
this.generationByTaskId.clear();
|
|
1210
1283
|
this.pending.clear();
|
|
1211
1284
|
this.pendingCount = 0;
|
|
@@ -1486,7 +1559,7 @@ async function publishPrompt(child, prompt, toolUseId, sender, publish, { replac
|
|
|
1486
1559
|
* prompt goes from the parent to the child, a SendMessage call, whose message
|
|
1487
1560
|
* goes from its sender to a child, or a child's SubagentHandback call, whose
|
|
1488
1561
|
* report goes from the child to the parent. Both views use the
|
|
1489
|
-
* call's tool use id, and each names the other with the
|
|
1562
|
+
* call's tool use id, and each names the other with the RFD's
|
|
1490
1563
|
* `recipientMessageId` and `senderMessageId`.
|
|
1491
1564
|
*/
|
|
1492
1565
|
export function linkedSessionMessages(toolUseId, senderSessionId, recipientSessionId, text) {
|
|
@@ -1508,6 +1581,48 @@ export function linkedSessionMessages(toolUseId, senderSessionId, recipientSessi
|
|
|
1508
1581
|
},
|
|
1509
1582
|
];
|
|
1510
1583
|
}
|
|
1584
|
+
/**
|
|
1585
|
+
* The RFD form: the agent that a tool call names as the one it operates on:
|
|
1586
|
+
* the `task_id` of a TaskStop call, or the `to` of a SendMessage call. It is
|
|
1587
|
+
* an agent only if it is the id of one: an agent's id is its child session's
|
|
1588
|
+
* id. Both tools also take a name, which is not resolved here: Claude Code
|
|
1589
|
+
* resolves it, and the adapter cannot tell which agent it picked. `undefined`
|
|
1590
|
+
* for any other call.
|
|
1591
|
+
*/
|
|
1592
|
+
export function targetAgentId(toolName, rawInput) {
|
|
1593
|
+
if (typeof rawInput !== "object" || rawInput === null)
|
|
1594
|
+
return undefined;
|
|
1595
|
+
const input = rawInput;
|
|
1596
|
+
if (toolName === "TaskStop")
|
|
1597
|
+
return nonBlankString(input.task_id);
|
|
1598
|
+
if (toolName === "SendMessage")
|
|
1599
|
+
return nonBlankString(input.to);
|
|
1600
|
+
return undefined;
|
|
1601
|
+
}
|
|
1602
|
+
/**
|
|
1603
|
+
* The RFD form: `notification`, a tool call's report, with a `session`
|
|
1604
|
+
* reference to `sessionId` after its content: `{ "type": "session",
|
|
1605
|
+
* "sessionId": "..." }`, which links the call to the session it operates on.
|
|
1606
|
+
* A `tool_call_update` replaces the content that the client holds, so the
|
|
1607
|
+
* reference goes on every report that carries content, and a
|
|
1608
|
+
* `tool_call_update` without content is returned as it is.
|
|
1609
|
+
*/
|
|
1610
|
+
export function withSessionReference(notification, sessionId) {
|
|
1611
|
+
const { update } = notification;
|
|
1612
|
+
if (update.sessionUpdate !== "tool_call" && update.sessionUpdate !== "tool_call_update") {
|
|
1613
|
+
return notification;
|
|
1614
|
+
}
|
|
1615
|
+
if (update.sessionUpdate === "tool_call_update" && update.content == null)
|
|
1616
|
+
return notification;
|
|
1617
|
+
const content = update.content ?? [];
|
|
1618
|
+
if (content.some((item) => item.type === "session" && item.sessionId === sessionId)) {
|
|
1619
|
+
return notification;
|
|
1620
|
+
}
|
|
1621
|
+
return {
|
|
1622
|
+
...notification,
|
|
1623
|
+
update: { ...update, content: [...content, { type: "session", sessionId }] },
|
|
1624
|
+
};
|
|
1625
|
+
}
|
|
1511
1626
|
/**
|
|
1512
1627
|
* The tool with which a child hands its report to its parent, when Claude
|
|
1513
1628
|
* Code runs in hand-back mode. The Agent/Task result then only says that the
|
|
@@ -1576,6 +1691,9 @@ function isWorking(child) {
|
|
|
1576
1691
|
* A task that a worker restart orphaned, or that was still running when the
|
|
1577
1692
|
* stream ended, is idle with no stop reason: its work ended, but the adapter
|
|
1578
1693
|
* did not see a cancellation or a failure, which the RFD forbids claiming.
|
|
1694
|
+
*
|
|
1695
|
+
* A child that the adapter can no longer observe and that may still run is
|
|
1696
|
+
* not idle but `unknown` (see `NativeSubagentRuntime.finishAll`).
|
|
1579
1697
|
*/
|
|
1580
1698
|
export function rfdEndState(state, end) {
|
|
1581
1699
|
if (end?.unexplained || end?.reason === "worker_restart")
|
|
@@ -20,7 +20,10 @@
|
|
|
20
20
|
* reached the call is that message too: the sender's outgoing view, at the
|
|
21
21
|
* call, and the child's incoming one, in the child's history. A child's
|
|
22
22
|
* history follows its launch, so a call to a child from its parent is always
|
|
23
|
-
* delivered first. Any other SendMessage call stays a tool call.
|
|
23
|
+
* delivered first. Any other SendMessage call stays a tool call. As live, a
|
|
24
|
+
* TaskStop or SendMessage call that the client is shown and that names a
|
|
25
|
+
* replayed child by its agent id carries the RFD's `session` reference to it
|
|
26
|
+
* (`ReplayTranscript.withTarget`).
|
|
24
27
|
*
|
|
25
28
|
* Right after its announcement, each child gets its `model` option: the model
|
|
26
29
|
* of its first response, in its transcript. A later response with another
|
|
@@ -99,7 +102,17 @@ export declare class ReplayTranscript<Child extends ReplayChild = ReplayChild> {
|
|
|
99
102
|
readonly omitted: Set<string>;
|
|
100
103
|
/** The SubagentHandback calls, by tool use id. */
|
|
101
104
|
readonly handbacks: Map<string, ReplayHandback>;
|
|
105
|
+
/** The agent that each TaskStop or SendMessage call names (see `targetAgentId`), by tool use id. */
|
|
106
|
+
private readonly targets;
|
|
102
107
|
constructor(history: SubagentHistory);
|
|
108
|
+
/**
|
|
109
|
+
* `notification`, a replayed tool call update that the client is shown on
|
|
110
|
+
* the session `shownOn`, with the RFD's `session` reference when the call
|
|
111
|
+
* names a child of another session by its agent id, as live
|
|
112
|
+
* (`NativeSubagentRuntime.withTarget`). Only a child that the replay
|
|
113
|
+
* announced before the update is referenced.
|
|
114
|
+
*/
|
|
115
|
+
withTarget(notification: AcpSessionNotification, shownOn: string): AcpSessionNotification;
|
|
103
116
|
/**
|
|
104
117
|
* Registers the launches, the launch results, and the SendMessage calls in
|
|
105
118
|
* `messages`, the transcript of the session `ownerSessionId`.
|
|
@@ -137,6 +150,8 @@ export declare class RfdSubagentReplay {
|
|
|
137
150
|
*/
|
|
138
151
|
scan(messages: readonly SessionMessage[], ownerSessionId: string): void;
|
|
139
152
|
/** The child that the tool use `toolUseId` launched, when the replay shows it. */
|
|
153
|
+
/** See {@link ReplayTranscript.withTarget}. */
|
|
154
|
+
withTarget(notification: AcpSessionNotification, shownOn: string): AcpSessionNotification;
|
|
140
155
|
childOfLaunch(toolUseId: string): ReplayChild | undefined;
|
|
141
156
|
/**
|
|
142
157
|
* Announces `child` on its parent, as live: running, with the parent's
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subagent-replay.d.ts","sourceRoot":"","sources":["../src/subagent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;AACH,wBAAgB,aAAa,CAC3B,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAAE,EACtE,KAAK,EAAE,SAAS,CAAC,EAAE,EAAE,KAAK,EAAE,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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { statSync } from "node:fs";
|
|
2
|
-
import { childModelOption, HANDBACK_TOOL, handbackMessage, isNativeSubagentControlTool, launchReply, linkedSessionMessages, nativeSubagentState, responseModelEntry, rfdEndState, rfdLabels, sameDirectory, } from "./native-subagents.js";
|
|
2
|
+
import { childModelOption, HANDBACK_TOOL, handbackMessage, isNativeSubagentControlTool, launchReply, linkedSessionMessages, nativeSubagentState, responseModelEntry, rfdEndState, rfdLabels, sameDirectory, targetAgentId, withSessionReference, } from "./native-subagents.js";
|
|
3
3
|
import { noticeUpdate } from "./session-notices.js";
|
|
4
4
|
/**
|
|
5
5
|
* What both replays read from the transcripts before they send anything: the
|
|
@@ -18,9 +18,29 @@ export class ReplayTranscript {
|
|
|
18
18
|
omitted = new Set();
|
|
19
19
|
/** The SubagentHandback calls, by tool use id. */
|
|
20
20
|
handbacks = new Map();
|
|
21
|
+
/** The agent that each TaskStop or SendMessage call names (see `targetAgentId`), by tool use id. */
|
|
22
|
+
targets = new Map();
|
|
21
23
|
constructor(history) {
|
|
22
24
|
this.history = history;
|
|
23
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* `notification`, a replayed tool call update that the client is shown on
|
|
28
|
+
* the session `shownOn`, with the RFD's `session` reference when the call
|
|
29
|
+
* names a child of another session by its agent id, as live
|
|
30
|
+
* (`NativeSubagentRuntime.withTarget`). Only a child that the replay
|
|
31
|
+
* announced before the update is referenced.
|
|
32
|
+
*/
|
|
33
|
+
withTarget(notification, shownOn) {
|
|
34
|
+
const { update } = notification;
|
|
35
|
+
if (update.sessionUpdate !== "tool_call" && update.sessionUpdate !== "tool_call_update") {
|
|
36
|
+
return notification;
|
|
37
|
+
}
|
|
38
|
+
const agentId = this.targets.get(update.toolCallId);
|
|
39
|
+
const child = agentId !== undefined ? this.byAgentId.get(agentId) : undefined;
|
|
40
|
+
if (!child?.announced || child.sessionId === shownOn)
|
|
41
|
+
return notification;
|
|
42
|
+
return withSessionReference(notification, child.sessionId);
|
|
43
|
+
}
|
|
24
44
|
/**
|
|
25
45
|
* Registers the launches, the launch results, and the SendMessage calls in
|
|
26
46
|
* `messages`, the transcript of the session `ownerSessionId`.
|
|
@@ -29,6 +49,9 @@ export class ReplayTranscript {
|
|
|
29
49
|
for (const message of messages) {
|
|
30
50
|
for (const block of contentBlocks(message)) {
|
|
31
51
|
if (block.type === "tool_use" && typeof block.id === "string") {
|
|
52
|
+
const agentId = targetAgentId(block.name, block.input);
|
|
53
|
+
if (agentId !== undefined)
|
|
54
|
+
this.targets.set(block.id, agentId);
|
|
32
55
|
if (isNativeSubagentControlTool(block.name)) {
|
|
33
56
|
this.registerLaunch(block.id, inputOf(block), ownerSessionId);
|
|
34
57
|
}
|
|
@@ -119,6 +142,10 @@ export class RfdSubagentReplay {
|
|
|
119
142
|
this.transcript.scan(messages, ownerSessionId);
|
|
120
143
|
}
|
|
121
144
|
/** The child that the tool use `toolUseId` launched, when the replay shows it. */
|
|
145
|
+
/** See {@link ReplayTranscript.withTarget}. */
|
|
146
|
+
withTarget(notification, shownOn) {
|
|
147
|
+
return this.transcript.withTarget(notification, shownOn);
|
|
148
|
+
}
|
|
122
149
|
childOfLaunch(toolUseId) {
|
|
123
150
|
return this.transcript.children.get(toolUseId);
|
|
124
151
|
}
|
package/dist/v1/acp-agent.d.ts
CHANGED
|
@@ -1464,6 +1464,17 @@ export declare class ClaudeAcpAgent {
|
|
|
1464
1464
|
* The work that follows a session setup response: the session's commands,
|
|
1465
1465
|
* the current states of the subagents a load replayed, and MCP server
|
|
1466
1466
|
* authentication.
|
|
1467
|
+
*
|
|
1468
|
+
* Call it in the same synchronous step as the handler's `return`: an
|
|
1469
|
+
* `await` between them would let the timer run before the response. The ACP
|
|
1470
|
+
* SDK (2.6.0) gives a request handler no responder and no after-response
|
|
1471
|
+
* hook, so the order rests on two things that its source shows and its API
|
|
1472
|
+
* does not promise. `registerAppRequest` queues the response in the
|
|
1473
|
+
* microtask that follows the handler's return, with no macrotask in
|
|
1474
|
+
* between, so the timer runs after it. And `Connection.sendMessage` writes
|
|
1475
|
+
* in call order, so what the timer sends is written after the response. A
|
|
1476
|
+
* caller that does not serve the agent through the SDK's `AgentApp` (see
|
|
1477
|
+
* `v1AgentApp`) has no such order.
|
|
1467
1478
|
*/
|
|
1468
1479
|
private afterSetupResponse;
|
|
1469
1480
|
/**
|
|
@@ -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,mB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/acp-agent.js
CHANGED
|
@@ -1838,11 +1838,13 @@ export class ClaudeAcpAgent {
|
|
|
1838
1838
|
// routing path as the immediate notifications.
|
|
1839
1839
|
const routedNotificationClient = { sessionUpdate: sendUpdate };
|
|
1840
1840
|
session.nativeSubagentDeliver = sendUpdate;
|
|
1841
|
-
const finishLifecycle = async (nativeState, asyncState, context
|
|
1841
|
+
const finishLifecycle = async (nativeState, asyncState, context,
|
|
1842
|
+
// Whether Claude Code can keep the subagents running (see `finishAll`).
|
|
1843
|
+
{ mayStillRun = false } = {}) => {
|
|
1842
1844
|
await compaction.interrupt();
|
|
1843
1845
|
await Promise.all([
|
|
1844
1846
|
subagents
|
|
1845
|
-
.finishAll(nativeState, sendUpdate)
|
|
1847
|
+
.finishAll(nativeState, sendUpdate, { mayStillRun })
|
|
1846
1848
|
.catch((error) => this.logger.error(`Session ${params.sessionId}: failed to publish terminal subagent state ${context}`, error)),
|
|
1847
1849
|
asyncTasks
|
|
1848
1850
|
.finishAll(asyncState)
|
|
@@ -5021,7 +5023,9 @@ export class ClaudeAcpAgent {
|
|
|
5021
5023
|
// and task store are independent of the previous transcript.
|
|
5022
5024
|
// Clear both the in-memory snapshot and the client's visible plan
|
|
5023
5025
|
// before any follow-up prompt can republish stale tasks.
|
|
5024
|
-
await finishLifecycle("failed", "failed", "during conversation reset"
|
|
5026
|
+
await finishLifecycle("failed", "failed", "during conversation reset", {
|
|
5027
|
+
mayStillRun: true,
|
|
5028
|
+
});
|
|
5025
5029
|
subagents.clear();
|
|
5026
5030
|
asyncTasks.clear();
|
|
5027
5031
|
session.resolvedToolNames?.clear();
|
|
@@ -5784,7 +5788,8 @@ export class ClaudeAcpAgent {
|
|
|
5784
5788
|
// A subagent's text replays onto the root only for a client that gets it
|
|
5785
5789
|
// there live: one without native subagent sessions that asked for the
|
|
5786
5790
|
// flattened transcript. With native sessions the text goes to the child
|
|
5787
|
-
// session, which
|
|
5791
|
+
// session, which the replay restores in both forms: AIR's draft under a
|
|
5792
|
+
// replay id, the RFD form under the session id the child had live.
|
|
5788
5793
|
const forwardSubagentText = !clientSupportsSubagents(this.clientCapabilities) &&
|
|
5789
5794
|
(session?.forwardSubagentText ?? supportsSubagentTranscript(this.clientCapabilities));
|
|
5790
5795
|
const supportsTypedFailures = supportsAirSessionFailures(this.clientCapabilities);
|
|
@@ -6124,7 +6129,10 @@ export class ClaudeAcpAgent {
|
|
|
6124
6129
|
}
|
|
6125
6130
|
if (rfdReplay && (await rfdReplay.toolCallUpdate(notification.update, child)))
|
|
6126
6131
|
continue;
|
|
6127
|
-
|
|
6132
|
+
const replayed = { ...notification, sessionId: replayTargetSessionId };
|
|
6133
|
+
await this.client.sessionUpdate(rfdReplay
|
|
6134
|
+
? asSdkSessionNotification(rfdReplay.withTarget(replayed, replayTargetSessionId))
|
|
6135
|
+
: replayed);
|
|
6128
6136
|
}
|
|
6129
6137
|
// The history of each subagent is in its own transcript. The replay
|
|
6130
6138
|
// sends it to the child session right after the launch, one message at
|
|
@@ -6869,6 +6877,17 @@ export class ClaudeAcpAgent {
|
|
|
6869
6877
|
* The work that follows a session setup response: the session's commands,
|
|
6870
6878
|
* the current states of the subagents a load replayed, and MCP server
|
|
6871
6879
|
* authentication.
|
|
6880
|
+
*
|
|
6881
|
+
* Call it in the same synchronous step as the handler's `return`: an
|
|
6882
|
+
* `await` between them would let the timer run before the response. The ACP
|
|
6883
|
+
* SDK (2.6.0) gives a request handler no responder and no after-response
|
|
6884
|
+
* hook, so the order rests on two things that its source shows and its API
|
|
6885
|
+
* does not promise. `registerAppRequest` queues the response in the
|
|
6886
|
+
* microtask that follows the handler's return, with no macrotask in
|
|
6887
|
+
* between, so the timer runs after it. And `Connection.sendMessage` writes
|
|
6888
|
+
* in call order, so what the timer sends is written after the response. A
|
|
6889
|
+
* caller that does not serve the agent through the SDK's `AgentApp` (see
|
|
6890
|
+
* `v1AgentApp`) has no such order.
|
|
6872
6891
|
*/
|
|
6873
6892
|
afterSetupResponse(sessionId, mcpServers) {
|
|
6874
6893
|
setTimeout(() => {
|
package/dist/v2/agent.js
CHANGED
|
@@ -356,10 +356,16 @@ class V2Agent {
|
|
|
356
356
|
const response = await this.setupFields(session);
|
|
357
357
|
this.afterSetup(session, params);
|
|
358
358
|
// The response ends the replay, and the replayed children's states before
|
|
359
|
-
// it are history: their current states follow it.
|
|
360
|
-
//
|
|
361
|
-
//
|
|
362
|
-
// `
|
|
359
|
+
// it are history: their current states follow it. The ACP SDK (2.6.0)
|
|
360
|
+
// gives a request handler no responder and no after-response hook, so the
|
|
361
|
+
// order rests on two things that its source shows and its API does not
|
|
362
|
+
// promise. `registerAppRequest` queues the response in the microtask that
|
|
363
|
+
// follows this handler's return, with no macrotask in between, so the
|
|
364
|
+
// timer runs after it. And `Connection.sendMessage` writes in call order,
|
|
365
|
+
// so what the timer sends is written after the response. The timer is
|
|
366
|
+
// set in the same synchronous step as the `return`: an `await` between
|
|
367
|
+
// them would let it run first. The v1 core's `afterSetupResponse` relies
|
|
368
|
+
// on the same.
|
|
363
369
|
if (subagents)
|
|
364
370
|
setTimeout(() => subagents.afterResponse(), 0);
|
|
365
371
|
return response;
|
|
@@ -156,7 +156,7 @@ export class SubagentReplay {
|
|
|
156
156
|
if (sendMessage) {
|
|
157
157
|
if (sendMessage.recipientSessionId === undefined) {
|
|
158
158
|
sendMessage.shownAsToolCall = true;
|
|
159
|
-
return [notification];
|
|
159
|
+
return [this.transcript.withTarget(notification, output.sessionId)];
|
|
160
160
|
}
|
|
161
161
|
if (sendMessage.outgoingSent)
|
|
162
162
|
return [];
|
|
@@ -178,7 +178,7 @@ export class SubagentReplay {
|
|
|
178
178
|
}
|
|
179
179
|
const child = this.transcript.children.get(update.toolCallId);
|
|
180
180
|
if (!child)
|
|
181
|
-
return [notification];
|
|
181
|
+
return [this.transcript.withTarget(notification, output.sessionId)];
|
|
182
182
|
if (update.status === "completed" &&
|
|
183
183
|
child.announced &&
|
|
184
184
|
!child.record.background &&
|
package/dist/v2/tasks.d.ts
CHANGED
|
@@ -116,6 +116,11 @@ export declare class SessionTasks {
|
|
|
116
116
|
* their input, and the call that delegated the run.
|
|
117
117
|
*/
|
|
118
118
|
private readonly handbacks;
|
|
119
|
+
/**
|
|
120
|
+
* The agent that each TaskStop or SendMessage call names (`targetAgentId`),
|
|
121
|
+
* until the call's final update.
|
|
122
|
+
*/
|
|
123
|
+
private readonly targetByToolCall;
|
|
119
124
|
/** The restore of a subagent from the session's history, while it reads it (see {@link restore}). */
|
|
120
125
|
private restoring;
|
|
121
126
|
constructor(host: TaskHost,
|
|
@@ -265,14 +270,17 @@ export declare class SessionTasks {
|
|
|
265
270
|
message: string;
|
|
266
271
|
} | undefined): void;
|
|
267
272
|
/**
|
|
268
|
-
* Claude Code mounted a fresh conversation (`conversation_reset`).
|
|
269
|
-
*
|
|
270
|
-
*
|
|
271
|
-
*
|
|
272
|
-
* child
|
|
273
|
-
*
|
|
274
|
-
*
|
|
275
|
-
*
|
|
273
|
+
* Claude Code mounted a fresh conversation (`conversation_reset`). Every
|
|
274
|
+
* child is forgotten: a later event of one changes nothing, and a child not
|
|
275
|
+
* announced yet stays unexposed. Claude Code's tasks (the live subagents,
|
|
276
|
+
* background commands and other tasks) stay as its task events report them,
|
|
277
|
+
* so a child that works may go on working, unobserved. As on v1
|
|
278
|
+
* (`finishAll`), each such child, deeper ones first, goes `unknown`, as the
|
|
279
|
+
* RFD requires when a child can no longer be observed, on its stream and in
|
|
280
|
+
* its parent's mirror, and loses its `cancel` capability: a forgotten child
|
|
281
|
+
* cannot be stopped. Nothing says that its run or its tool calls ended, so
|
|
282
|
+
* its unfinished tool calls keep their status. A child that is idle keeps
|
|
283
|
+
* its state.
|
|
276
284
|
*/
|
|
277
285
|
conversationReset(): void;
|
|
278
286
|
/**
|
|
@@ -349,9 +357,20 @@ export declare class SessionTasks {
|
|
|
349
357
|
* Rewrites an update of `output`, the output of the root or of `child`: an
|
|
350
358
|
* update of an Agent or Task call goes out as {@link launchUpdate} says,
|
|
351
359
|
* and Claude Code's late result of a call that the child's stop ended
|
|
352
|
-
* goes nowhere.
|
|
360
|
+
* goes nowhere. A tool call that the client is shown and that operates on
|
|
361
|
+
* an announced child of another session gets the RFD's `session` reference
|
|
362
|
+
* (see {@link withTarget}).
|
|
353
363
|
*/
|
|
354
364
|
private route;
|
|
365
|
+
/**
|
|
366
|
+
* `notification`, an update that the client is shown on the session
|
|
367
|
+
* `shownOn`, with a `session` reference when it is of a TaskStop or
|
|
368
|
+
* SendMessage call that names an announced child by its agent id, or of a
|
|
369
|
+
* SendMessage call that resumed one and stays shown (see
|
|
370
|
+
* {@link requestShows}), as on v1 (`NativeSubagentRuntime.withTarget`).
|
|
371
|
+
*/
|
|
372
|
+
private withTarget;
|
|
373
|
+
private routed;
|
|
355
374
|
/**
|
|
356
375
|
* An update of an Agent or Task call. Its child, if it started, is
|
|
357
376
|
* announced at the call's first update. The call goes out only once it
|
|
@@ -391,8 +410,7 @@ export declare class SessionTasks {
|
|
|
391
410
|
/**
|
|
392
411
|
* A run of `child` ended: its unfinished tool calls get their final status,
|
|
393
412
|
* except its background work, then its idle goes out, as v2 asks. A stopped
|
|
394
|
-
* run's end `cancelled`, and a failed run's
|
|
395
|
-
* (`undefined`, an idle with no stop reason) `failed`. At a completed end, a
|
|
413
|
+
* run's end `cancelled`, and a failed run's `failed`. At a completed end, a
|
|
396
414
|
* tool call that Claude dropped before it ran ends `cancelled`, as on the
|
|
397
415
|
* root (see `SessionOutput.closeUnfinished`).
|
|
398
416
|
*/
|
package/dist/v2/tasks.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tasks.d.ts","sourceRoot":"","sources":["../../src/v2/tasks.ts"],"names":[],"mappings":"AA+CA,OAAO,EAAE,YAAY,EAAE,KAAK,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACxF,OAAO,KAAK,KAAK,EAAE,MAAM,mDAAmD,CAAC;AAC7E,OAAO,KAAK,EACV,SAAS,EACT,UAAU,EACV,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ACH,OAAO,CAAC,KAAK;IA4Cb;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,UAAU;IAmBlB,6EAA6E;IAC7E,OAAO,CAAC,UAAU;IAelB,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;AAqCD,oFAAoF;AACpF,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,YAAY,CAK/E"}
|
package/dist/v2/tasks.js
CHANGED
|
@@ -48,7 +48,7 @@ import * as path from "node:path";
|
|
|
48
48
|
import { RequestError } from "@agentclientprotocol/sdk/unstable";
|
|
49
49
|
import { backgroundBashTaskFromToolResult, taskProgressFields } from "../async-tasks.js";
|
|
50
50
|
import { BackgroundOutputTail } from "../background-output.js";
|
|
51
|
-
import { childModelOption, HANDBACK_TOOL, handbackMessage, isNativeSubagentControlTool, launchReply, linkedSessionMessages, mergeSubagentIdentity, responseModelEntry, resumedNativeSubagentId, rfdLabels, sendMessageResume, subagentIdentity, unexposedControlFallback, } from "../native-subagents.js";
|
|
51
|
+
import { childModelOption, HANDBACK_TOOL, handbackMessage, isNativeSubagentControlTool, launchReply, linkedSessionMessages, mergeSubagentIdentity, responseModelEntry, resumedNativeSubagentId, rfdLabels, sendMessageResume, subagentIdentity, targetAgentId, unexposedControlFallback, withSessionReference, } from "../native-subagents.js";
|
|
52
52
|
import { subagentLineage } from "../subagent-history.js";
|
|
53
53
|
import { withRunningTerminal, withRunningToolCall } from "../tool-calls/background.js";
|
|
54
54
|
import { ClientCapabilities } from "../tool-calls/client-capabilities.js";
|
|
@@ -129,6 +129,11 @@ export class SessionTasks {
|
|
|
129
129
|
* their input, and the call that delegated the run.
|
|
130
130
|
*/
|
|
131
131
|
handbacks = new Map();
|
|
132
|
+
/**
|
|
133
|
+
* The agent that each TaskStop or SendMessage call names (`targetAgentId`),
|
|
134
|
+
* until the call's final update.
|
|
135
|
+
*/
|
|
136
|
+
targetByToolCall = new Map();
|
|
132
137
|
/** The restore of a subagent from the session's history, while it reads it (see {@link restore}). */
|
|
133
138
|
restoring;
|
|
134
139
|
constructor(host,
|
|
@@ -596,19 +601,25 @@ export class SessionTasks {
|
|
|
596
601
|
this.publish();
|
|
597
602
|
}
|
|
598
603
|
/**
|
|
599
|
-
* Claude Code mounted a fresh conversation (`conversation_reset`).
|
|
600
|
-
*
|
|
601
|
-
*
|
|
602
|
-
*
|
|
603
|
-
* child
|
|
604
|
-
*
|
|
605
|
-
*
|
|
606
|
-
*
|
|
604
|
+
* Claude Code mounted a fresh conversation (`conversation_reset`). Every
|
|
605
|
+
* child is forgotten: a later event of one changes nothing, and a child not
|
|
606
|
+
* announced yet stays unexposed. Claude Code's tasks (the live subagents,
|
|
607
|
+
* background commands and other tasks) stay as its task events report them,
|
|
608
|
+
* so a child that works may go on working, unobserved. As on v1
|
|
609
|
+
* (`finishAll`), each such child, deeper ones first, goes `unknown`, as the
|
|
610
|
+
* RFD requires when a child can no longer be observed, on its stream and in
|
|
611
|
+
* its parent's mirror, and loses its `cancel` capability: a forgotten child
|
|
612
|
+
* cannot be stopped. Nothing says that its run or its tool calls ended, so
|
|
613
|
+
* its unfinished tool calls keep their status. A child that is idle keeps
|
|
614
|
+
* its state.
|
|
607
615
|
*/
|
|
608
616
|
conversationReset() {
|
|
609
617
|
for (const child of [...this.parentsFirst()].reverse()) {
|
|
610
|
-
if (child.working)
|
|
611
|
-
|
|
618
|
+
if (!child.working)
|
|
619
|
+
continue;
|
|
620
|
+
child.working = false;
|
|
621
|
+
child.unobservable = true;
|
|
622
|
+
this.sendChildState(child, "unknown", { capabilities: null });
|
|
612
623
|
}
|
|
613
624
|
this.publish();
|
|
614
625
|
for (const child of this.children.values())
|
|
@@ -624,6 +635,7 @@ export class SessionTasks {
|
|
|
624
635
|
this.hiddenSendMessages.clear();
|
|
625
636
|
this.shownSendMessages.clear();
|
|
626
637
|
this.handbacks.clear();
|
|
638
|
+
this.targetByToolCall.clear();
|
|
627
639
|
}
|
|
628
640
|
/**
|
|
629
641
|
* Publishes the `background` list of each session that changed, deeper
|
|
@@ -877,6 +889,7 @@ export class SessionTasks {
|
|
|
877
889
|
title: undefined,
|
|
878
890
|
description: undefined,
|
|
879
891
|
working: true,
|
|
892
|
+
unobservable: false,
|
|
880
893
|
reportedState: undefined,
|
|
881
894
|
outcome: undefined,
|
|
882
895
|
openRequests: 0,
|
|
@@ -1092,9 +1105,35 @@ export class SessionTasks {
|
|
|
1092
1105
|
* Rewrites an update of `output`, the output of the root or of `child`: an
|
|
1093
1106
|
* update of an Agent or Task call goes out as {@link launchUpdate} says,
|
|
1094
1107
|
* and Claude Code's late result of a call that the child's stop ended
|
|
1095
|
-
* goes nowhere.
|
|
1108
|
+
* goes nowhere. A tool call that the client is shown and that operates on
|
|
1109
|
+
* an announced child of another session gets the RFD's `session` reference
|
|
1110
|
+
* (see {@link withTarget}).
|
|
1096
1111
|
*/
|
|
1097
1112
|
route(output, notification, child) {
|
|
1113
|
+
return this.routed(output, notification, child).map((shown) => this.withTarget(shown, output.sessionId));
|
|
1114
|
+
}
|
|
1115
|
+
/**
|
|
1116
|
+
* `notification`, an update that the client is shown on the session
|
|
1117
|
+
* `shownOn`, with a `session` reference when it is of a TaskStop or
|
|
1118
|
+
* SendMessage call that names an announced child by its agent id, or of a
|
|
1119
|
+
* SendMessage call that resumed one and stays shown (see
|
|
1120
|
+
* {@link requestShows}), as on v1 (`NativeSubagentRuntime.withTarget`).
|
|
1121
|
+
*/
|
|
1122
|
+
withTarget(notification, shownOn) {
|
|
1123
|
+
const { update } = notification;
|
|
1124
|
+
if (update.sessionUpdate !== "tool_call" && update.sessionUpdate !== "tool_call_update") {
|
|
1125
|
+
return notification;
|
|
1126
|
+
}
|
|
1127
|
+
const agentId = this.targetByToolCall.get(update.toolCallId);
|
|
1128
|
+
if (FINAL_STATUSES.has(update.status))
|
|
1129
|
+
this.targetByToolCall.delete(update.toolCallId);
|
|
1130
|
+
const child = this.childByToolUse.get(update.toolCallId) ??
|
|
1131
|
+
(agentId !== undefined ? this.children.get(agentId) : undefined);
|
|
1132
|
+
if (!child?.announced || child.sessionId === shownOn)
|
|
1133
|
+
return notification;
|
|
1134
|
+
return withSessionReference(notification, child.sessionId);
|
|
1135
|
+
}
|
|
1136
|
+
routed(output, notification, child) {
|
|
1098
1137
|
const { update } = notification;
|
|
1099
1138
|
if (update.sessionUpdate !== "tool_call" && update.sessionUpdate !== "tool_call_update") {
|
|
1100
1139
|
return [notification];
|
|
@@ -1102,6 +1141,9 @@ export class SessionTasks {
|
|
|
1102
1141
|
if (child?.stopped.has(update.toolCallId))
|
|
1103
1142
|
return [];
|
|
1104
1143
|
const toolName = update._meta?.claudeCode?.toolName;
|
|
1144
|
+
const agentId = targetAgentId(toolName, update.rawInput);
|
|
1145
|
+
if (agentId !== undefined)
|
|
1146
|
+
this.targetByToolCall.set(update.toolCallId, agentId);
|
|
1105
1147
|
if (toolName === "SendMessage")
|
|
1106
1148
|
this.senderByToolUse.set(update.toolCallId, output.sessionId);
|
|
1107
1149
|
const message = this.sendMessageUpdate(output, notification, toolName) ??
|
|
@@ -1285,15 +1327,14 @@ export class SessionTasks {
|
|
|
1285
1327
|
/**
|
|
1286
1328
|
* A run of `child` ended: its unfinished tool calls get their final status,
|
|
1287
1329
|
* except its background work, then its idle goes out, as v2 asks. A stopped
|
|
1288
|
-
* run's end `cancelled`, and a failed run's
|
|
1289
|
-
* (`undefined`, an idle with no stop reason) `failed`. At a completed end, a
|
|
1330
|
+
* run's end `cancelled`, and a failed run's `failed`. At a completed end, a
|
|
1290
1331
|
* tool call that Claude dropped before it ran ends `cancelled`, as on the
|
|
1291
1332
|
* root (see `SessionOutput.closeUnfinished`).
|
|
1292
1333
|
*/
|
|
1293
1334
|
endRun(child, outcome) {
|
|
1294
1335
|
if (!child.working) {
|
|
1295
1336
|
// A later report of the same failure can give its error text.
|
|
1296
|
-
if (outcome
|
|
1337
|
+
if (outcome.stopReason === "error" &&
|
|
1297
1338
|
outcome.error &&
|
|
1298
1339
|
child.outcome?.stopReason === "error" &&
|
|
1299
1340
|
!child.outcome.error) {
|
|
@@ -1303,11 +1344,11 @@ export class SessionTasks {
|
|
|
1303
1344
|
return;
|
|
1304
1345
|
}
|
|
1305
1346
|
const keep = this.backgroundWork(child.sessionId);
|
|
1306
|
-
if (outcome
|
|
1347
|
+
if (outcome.stopReason === "end_turn") {
|
|
1307
1348
|
child.output.closeUnfinished(false, keep);
|
|
1308
1349
|
}
|
|
1309
1350
|
else {
|
|
1310
|
-
const status = outcome
|
|
1351
|
+
const status = outcome.stopReason === "cancelled" ? "cancelled" : "failed";
|
|
1311
1352
|
const ended = child.output.finishUnfinished(status, keep, { exitTerminals: true });
|
|
1312
1353
|
for (const toolCallId of ended)
|
|
1313
1354
|
child.stopped.add(toolCallId);
|
|
@@ -1342,6 +1383,8 @@ export class SessionTasks {
|
|
|
1342
1383
|
return (notification) => withRunningToolCall(terminals.reduce(withRunningTerminal, notification), toolCalls);
|
|
1343
1384
|
}
|
|
1344
1385
|
childState(child) {
|
|
1386
|
+
if (child.unobservable)
|
|
1387
|
+
return "unknown";
|
|
1345
1388
|
if (!child.working)
|
|
1346
1389
|
return "idle";
|
|
1347
1390
|
return child.openRequests > 0 ? "requires_action" : "running";
|
|
@@ -1361,12 +1404,17 @@ export class SessionTasks {
|
|
|
1361
1404
|
}
|
|
1362
1405
|
this.sendChildState(child, state);
|
|
1363
1406
|
}
|
|
1364
|
-
sendChildState(child, state) {
|
|
1407
|
+
sendChildState(child, state, capabilities) {
|
|
1365
1408
|
child.reportedState = state;
|
|
1366
1409
|
const snapshot = stateObject(state, state === "idle" ? child.outcome : undefined);
|
|
1367
1410
|
this.host.send({
|
|
1368
1411
|
sessionId: child.parentSessionId,
|
|
1369
|
-
update: {
|
|
1412
|
+
update: {
|
|
1413
|
+
sessionUpdate: "subagent_update",
|
|
1414
|
+
sessionId: child.sessionId,
|
|
1415
|
+
...capabilities,
|
|
1416
|
+
state: snapshot,
|
|
1417
|
+
},
|
|
1370
1418
|
});
|
|
1371
1419
|
this.host.send({
|
|
1372
1420
|
sessionId: child.sessionId,
|
|
@@ -1703,6 +1751,8 @@ function stateObject(state, outcome) {
|
|
|
1703
1751
|
return { state: "running" };
|
|
1704
1752
|
case "requires_action":
|
|
1705
1753
|
return { state: "requires_action" };
|
|
1754
|
+
case "unknown":
|
|
1755
|
+
return { state: "unknown" };
|
|
1706
1756
|
default:
|
|
1707
1757
|
return { state: "idle", ...(outcome ?? {}) };
|
|
1708
1758
|
}
|
package/dist/v2/tool-call.js
CHANGED
package/package.json
CHANGED