@agentclientprotocol/claude-agent-acp 0.110.1-preview.4 → 0.110.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/air-extension.d.ts +2 -0
- package/dist/air-extension.d.ts.map +1 -1
- package/dist/air-extension.js +2 -0
- package/dist/elicitation.d.ts.map +1 -1
- package/dist/elicitation.js +6 -1
- package/dist/native-subagents.d.ts +11 -5
- package/dist/native-subagents.d.ts.map +1 -1
- package/dist/native-subagents.js +53 -11
- package/dist/steering-priority.d.ts +3 -0
- package/dist/steering-priority.d.ts.map +1 -0
- package/dist/steering-priority.js +4 -0
- package/dist/subagent-replay.d.ts +14 -12
- package/dist/subagent-replay.d.ts.map +1 -1
- package/dist/subagent-replay.js +29 -13
- package/dist/v1/acp-agent.d.ts.map +1 -1
- package/dist/v1/acp-agent.js +25 -4
- package/dist/v1/steering.d.ts +1 -8
- package/dist/v1/steering.d.ts.map +1 -1
- package/dist/v1/steering.js +0 -7
- package/dist/v2/agent.d.ts.map +1 -1
- package/dist/v2/agent.js +16 -11
- package/dist/v2/background.d.ts +3 -10
- package/dist/v2/background.d.ts.map +1 -1
- package/dist/v2/clear-context.d.ts +3 -4
- package/dist/v2/clear-context.d.ts.map +1 -1
- package/dist/v2/clear-context.js +8 -9
- package/dist/v2/elicitation.d.ts +1 -1
- package/dist/v2/elicitation.d.ts.map +1 -1
- package/dist/v2/elicitation.js +18 -15
- package/dist/v2/restarts.d.ts +3 -3
- package/dist/v2/restarts.d.ts.map +1 -1
- package/dist/v2/restarts.js +12 -12
- package/dist/v2/session.d.ts +16 -11
- package/dist/v2/session.d.ts.map +1 -1
- package/dist/v2/session.js +138 -42
- package/dist/v2/stream.d.ts +2 -0
- package/dist/v2/stream.d.ts.map +1 -1
- package/dist/v2/stream.js +11 -0
- package/dist/v2/subagent-replay.d.ts +1 -5
- package/dist/v2/subagent-replay.d.ts.map +1 -1
- package/dist/v2/subagent-replay.js +5 -10
- package/dist/v2/tasks.d.ts +20 -4
- package/dist/v2/tasks.d.ts.map +1 -1
- package/dist/v2/tasks.js +52 -8
- package/package.json +1 -1
package/dist/v2/session.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* One ACP v2 session, served straight from its Claude Code query.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* is
|
|
4
|
+
* Prompts go to Claude Code, and its updates report the session's work.
|
|
5
|
+
* A busy prompt steers with priority `now`, unless a root or child input
|
|
6
|
+
* request is open.
|
|
7
|
+
* The session keeps the foreground work open while Claude Code answers it.
|
|
7
8
|
*
|
|
8
9
|
* - A prompt is pushed to Claude Code at once, with a uuid. Its response is
|
|
9
10
|
* the prompt's insertion: the `command_lifecycle` frame `started` for that
|
|
@@ -18,9 +19,8 @@
|
|
|
18
19
|
* `session_state_changed` stays `running` while background subagents work,
|
|
19
20
|
* which v2 lists as background work instead (`background`), so its `idle`
|
|
20
21
|
* only ends a turn that ended without a result.
|
|
21
|
-
* - `requires_action`
|
|
22
|
-
*
|
|
23
|
-
* the turn waits on subagents, each of them waits on one.
|
|
22
|
+
* - `requires_action` means that the open turn cannot progress without user
|
|
23
|
+
* input. Another running foreground tool or subagent keeps it `running`.
|
|
24
24
|
* - Subagents are child sessions, and background work is listed on every
|
|
25
25
|
* state (see {@link SessionTasks}).
|
|
26
26
|
* - `session/cancel` answers the prompts that are not inserted yet with
|
|
@@ -33,8 +33,10 @@
|
|
|
33
33
|
* {@link SessionOutput}).
|
|
34
34
|
*/
|
|
35
35
|
import { randomUUID } from "node:crypto";
|
|
36
|
+
import { steeringPriority } from "../steering-priority.js";
|
|
36
37
|
import { RequestError, } from "@agentclientprotocol/sdk/unstable";
|
|
37
|
-
import
|
|
38
|
+
import * as v2 from "@agentclientprotocol/sdk/experimental/v2/unstable";
|
|
39
|
+
import { AUTONOMOUS_RESULT_ORIGINS, isAbortedResult } from "../result-end.js";
|
|
38
40
|
import { promptToClaude } from "../prompt-to-claude.js";
|
|
39
41
|
import { supportsTaskOutput } from "../background-output.js";
|
|
40
42
|
import { v1PromptRequest } from "./prompt.js";
|
|
@@ -64,6 +66,8 @@ export class V2Session {
|
|
|
64
66
|
input;
|
|
65
67
|
/** The prompts not inserted yet, by uuid. */
|
|
66
68
|
pending = new Map();
|
|
69
|
+
/** Priority prompts whose reply still belongs to the open foreground work. */
|
|
70
|
+
steeredPrompts = new Set();
|
|
67
71
|
/** Whether a turn of Claude Code is open: the session's foreground work. */
|
|
68
72
|
foreground = false;
|
|
69
73
|
/** The prompt whose `started` frame came last in the open turn. */
|
|
@@ -216,7 +220,10 @@ export class V2Session {
|
|
|
216
220
|
send: (notification) => this.sendNotification(notification),
|
|
217
221
|
rootState: () => this.foregroundState(),
|
|
218
222
|
// A cancel withdraws the requests of the subagents that the work waits on.
|
|
219
|
-
foregroundRequestsChanged: () =>
|
|
223
|
+
foregroundRequestsChanged: () => {
|
|
224
|
+
this.reportState(this.cancelledWork);
|
|
225
|
+
this.checkBoundary();
|
|
226
|
+
},
|
|
220
227
|
models: () => this.config.subagentModels(),
|
|
221
228
|
modes: () => this.config.availableModes(),
|
|
222
229
|
stopTask: async (taskId) => {
|
|
@@ -331,16 +338,18 @@ export class V2Session {
|
|
|
331
338
|
* gets that prompt's outcome, and a retry of an inserted one its
|
|
332
339
|
* `messageId`, and neither goes to Claude Code again.
|
|
333
340
|
*/
|
|
334
|
-
prompt(params, guard) {
|
|
341
|
+
prompt(params, signal, guard) {
|
|
335
342
|
if (this.closed) {
|
|
336
343
|
return Promise.reject(RequestError.sessionNotFound(this.sessionId));
|
|
337
344
|
}
|
|
345
|
+
if (signal.aborted)
|
|
346
|
+
return Promise.reject(RequestError.requestCancelled());
|
|
338
347
|
// Throws invalid params for content that Claude cannot take.
|
|
339
348
|
const request = v1PromptRequest(params);
|
|
340
349
|
const key = params.idempotencyKey;
|
|
341
350
|
if (key == null)
|
|
342
|
-
return this.submit(params, request, guard, { uuid: randomUUID() });
|
|
343
|
-
return this.keys.once(key, (attempt) => this.submit(params, request, guard, attempt));
|
|
351
|
+
return this.submit(params, request, guard, { uuid: randomUUID() }, signal);
|
|
352
|
+
return this.keys.once(key, (attempt) => this.submit(params, request, guard, attempt, signal));
|
|
344
353
|
}
|
|
345
354
|
/**
|
|
346
355
|
* Sends the prompt to Claude Code as the message `attempt.uuid` (see
|
|
@@ -354,7 +363,7 @@ export class V2Session {
|
|
|
354
363
|
* -32800 like any prompt not inserted yet, also when the message is
|
|
355
364
|
* stored: the client's next retry then gets the `messageId`.
|
|
356
365
|
*/
|
|
357
|
-
submit(params, request, guard, { uuid, stored }) {
|
|
366
|
+
submit(params, request, guard, { uuid, stored }, signal) {
|
|
358
367
|
const remoteControl = this.remoteControl.mayRun(request.prompt);
|
|
359
368
|
const guarded = guard && !remoteControl ? guard : undefined;
|
|
360
369
|
// A prompt that the guard refuses titles nothing and sends no notice.
|
|
@@ -381,8 +390,23 @@ export class V2Session {
|
|
|
381
390
|
if (!stored)
|
|
382
391
|
accept();
|
|
383
392
|
return new Promise((resolve, reject) => {
|
|
384
|
-
const
|
|
393
|
+
const withdraw = () => {
|
|
394
|
+
void this.withdrawPrompt(uuid).catch((error) => {
|
|
395
|
+
this.connection.logger.error(`Session ${this.sessionId}: could not withdraw prompt ${uuid}`, error);
|
|
396
|
+
});
|
|
397
|
+
};
|
|
398
|
+
const pending = {
|
|
399
|
+
prompt: params.prompt,
|
|
400
|
+
pushed: false,
|
|
401
|
+
signal,
|
|
402
|
+
withdraw,
|
|
403
|
+
resolve,
|
|
404
|
+
reject,
|
|
405
|
+
};
|
|
385
406
|
this.pending.set(uuid, pending);
|
|
407
|
+
signal.addEventListener("abort", withdraw, { once: true });
|
|
408
|
+
if (signal.aborted)
|
|
409
|
+
withdraw();
|
|
386
410
|
// A cancel or close answered it before it went out.
|
|
387
411
|
const answered = () => this.pending.get(uuid) !== pending || this.closed;
|
|
388
412
|
this.pushes = this.pushes
|
|
@@ -429,6 +453,12 @@ export class V2Session {
|
|
|
429
453
|
return;
|
|
430
454
|
this.fileChanges?.requested(uuid, params._meta);
|
|
431
455
|
}
|
|
456
|
+
if (this.foreground || [...this.pending.values()].some((prompt) => prompt.pushed)) {
|
|
457
|
+
// Interrupting an open input callback would withdraw the client's request.
|
|
458
|
+
message.priority = steeringPriority(this.requests.size > 0 || this.tasks.hasOpenRequests());
|
|
459
|
+
if (message.priority === "now")
|
|
460
|
+
this.steeredPrompts.add(uuid);
|
|
461
|
+
}
|
|
432
462
|
pending.pushed = true;
|
|
433
463
|
this.remoteControl.pushed(uuid);
|
|
434
464
|
this.input.push(message);
|
|
@@ -440,14 +470,19 @@ export class V2Session {
|
|
|
440
470
|
* Whether no turn is open and no prompt waits in Claude Code's queue. With
|
|
441
471
|
* `restart`, for a restart of the query (see `restarts.ts`), also no
|
|
442
472
|
* prompt of the session waits to go to Claude Code, which the restart would
|
|
443
|
-
* answer with -32800
|
|
444
|
-
*
|
|
473
|
+
* answer with -32800. No live subagent remains. Background commands and
|
|
474
|
+
* tool tasks end when the old query retires. Without it, for
|
|
475
|
+
* the adapter's `/remote-control`, whose own prompt waits for the boundary.
|
|
445
476
|
*/
|
|
446
477
|
atTurnBoundary(restart) {
|
|
447
478
|
return (!this.closed &&
|
|
448
479
|
!this.foreground &&
|
|
449
480
|
![...this.pending.values()].some((prompt) => restart || prompt.pushed) &&
|
|
450
|
-
!(restart && this.tasks.
|
|
481
|
+
!(restart && this.tasks.hasLiveAgents()));
|
|
482
|
+
}
|
|
483
|
+
/** Whether a resume can replace roots without ending work or withdrawing an input request. */
|
|
484
|
+
canReplaceRoots() {
|
|
485
|
+
return this.atTurnBoundary(true) && !this.tasks.hasLiveWork() && this.requests.size === 0;
|
|
451
486
|
}
|
|
452
487
|
/**
|
|
453
488
|
* Resolves `true` at the next turn boundary (see {@link atTurnBoundary}),
|
|
@@ -563,6 +598,7 @@ export class V2Session {
|
|
|
563
598
|
* {@link closeTurn}).
|
|
564
599
|
*/
|
|
565
600
|
stopForeground() {
|
|
601
|
+
this.steeredPrompts.clear();
|
|
566
602
|
const pushed = [];
|
|
567
603
|
for (const [uuid, prompt] of [...this.pending]) {
|
|
568
604
|
if (prompt.pushed)
|
|
@@ -672,6 +708,9 @@ export class V2Session {
|
|
|
672
708
|
return this.tasks.target(agentId, this);
|
|
673
709
|
}
|
|
674
710
|
requestPermission(request, toolSignal) {
|
|
711
|
+
const context = request.subject != null && v2.RequestPermissionSubject.isToolCall(request.subject)
|
|
712
|
+
? { type: "tool_call", toolCallId: request.subject.toolCall.toolCallId }
|
|
713
|
+
: { type: "session" };
|
|
675
714
|
return this.openRequest(toolSignal, async (signal) => {
|
|
676
715
|
try {
|
|
677
716
|
// The subject is an upsert of the tool call: the client may see the
|
|
@@ -683,11 +722,11 @@ export class V2Session {
|
|
|
683
722
|
return { outcome: { outcome: "cancelled" } };
|
|
684
723
|
throw error;
|
|
685
724
|
}
|
|
686
|
-
});
|
|
725
|
+
}, context);
|
|
687
726
|
}
|
|
688
727
|
/** Runs `send` as an open request of this session (see {@link RequestTarget.openRequest}). */
|
|
689
|
-
async openRequest(toolSignal, send) {
|
|
690
|
-
const open = { abort: new AbortController(), coveredByCancel: false };
|
|
728
|
+
async openRequest(toolSignal, send, context = { type: "session" }) {
|
|
729
|
+
const open = { abort: new AbortController(), coveredByCancel: false, context };
|
|
691
730
|
// After `session/close` nothing of the session goes out: the request is
|
|
692
731
|
// withdrawn before it is sent.
|
|
693
732
|
if (this.closed)
|
|
@@ -705,6 +744,7 @@ export class V2Session {
|
|
|
705
744
|
// `running` comes first. One that the user answers, or that Claude Code
|
|
706
745
|
// withdraws without a cancel (a hook answered it), lets the work go on.
|
|
707
746
|
this.reportState(open.coveredByCancel && signal.aborted);
|
|
747
|
+
this.checkBoundary();
|
|
708
748
|
}
|
|
709
749
|
}
|
|
710
750
|
modeChanged(mode) {
|
|
@@ -796,6 +836,7 @@ export class V2Session {
|
|
|
796
836
|
break;
|
|
797
837
|
try {
|
|
798
838
|
await this.handle(message);
|
|
839
|
+
this.reportState(this.cancelledWork);
|
|
799
840
|
}
|
|
800
841
|
catch (error) {
|
|
801
842
|
this.connection.logger.error(`Session ${this.sessionId}: failed to handle a ${message.type} message`, error);
|
|
@@ -841,8 +882,7 @@ export class V2Session {
|
|
|
841
882
|
*/
|
|
842
883
|
handle(message) {
|
|
843
884
|
if (message.type === "command_lifecycle") {
|
|
844
|
-
this.lifecycle(message);
|
|
845
|
-
return;
|
|
885
|
+
return this.lifecycle(message);
|
|
846
886
|
}
|
|
847
887
|
// Before the tasks take a subagent's messages: its file edits are the turn's.
|
|
848
888
|
this.fileChanges?.message(message);
|
|
@@ -1019,8 +1059,10 @@ export class V2Session {
|
|
|
1019
1059
|
// then ends the turn. Nothing but Claude Code's order tells the two
|
|
1020
1060
|
// apart.
|
|
1021
1061
|
this.stopped.promptEnded(uuid);
|
|
1022
|
-
if (uuid === this.cycleCommand)
|
|
1062
|
+
if (uuid === this.cycleCommand) {
|
|
1063
|
+
this.steeredPrompts.delete(uuid);
|
|
1023
1064
|
this.closeTurn();
|
|
1065
|
+
}
|
|
1024
1066
|
return;
|
|
1025
1067
|
default:
|
|
1026
1068
|
// `queued`: the prompt waits in Claude Code's queue.
|
|
@@ -1053,10 +1095,9 @@ export class V2Session {
|
|
|
1053
1095
|
* command gets none.
|
|
1054
1096
|
*/
|
|
1055
1097
|
inserted(uuid) {
|
|
1056
|
-
const prompt = this.
|
|
1098
|
+
const prompt = this.takePrompt(uuid);
|
|
1057
1099
|
if (!prompt)
|
|
1058
1100
|
return;
|
|
1059
|
-
this.pending.delete(uuid);
|
|
1060
1101
|
this.fileChanges?.promptStarted(uuid);
|
|
1061
1102
|
this.send({ sessionUpdate: "user_message", messageId: uuid, content: prompt.prompt });
|
|
1062
1103
|
if (this.hasHistory && promptGetsCursor(prompt.prompt))
|
|
@@ -1084,6 +1125,17 @@ export class V2Session {
|
|
|
1084
1125
|
if (isPlaceholderResult(message))
|
|
1085
1126
|
return;
|
|
1086
1127
|
this.idleOwed = true;
|
|
1128
|
+
const served = message.user_message_uuids ?? (message.user_message_uuid ? [message.user_message_uuid] : []);
|
|
1129
|
+
for (const uuid of served)
|
|
1130
|
+
this.steeredPrompts.delete(uuid);
|
|
1131
|
+
// Older CLIs omit the result's prompt list. An accepted priority prompt
|
|
1132
|
+
// is answered by the next result that did not abort the preceding cycle.
|
|
1133
|
+
if (served.length === 0 && !isAbortedResult(message)) {
|
|
1134
|
+
for (const uuid of this.steeredPrompts) {
|
|
1135
|
+
if (!this.pending.has(uuid))
|
|
1136
|
+
this.steeredPrompts.delete(uuid);
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1087
1139
|
const { dropped, interrupted } = this.stopped.result(message);
|
|
1088
1140
|
// Also a dropped result: the cancel's interrupt reached no further.
|
|
1089
1141
|
this.tasks.foregroundCancelEnded();
|
|
@@ -1109,10 +1161,13 @@ export class V2Session {
|
|
|
1109
1161
|
// Before the result's text below, which can repeat the failed request's.
|
|
1110
1162
|
this.reportApiError(end);
|
|
1111
1163
|
// The turn goes on in a fresh context (see `ClearContext`).
|
|
1112
|
-
|
|
1164
|
+
const disposition = this.clearContext.resultDisposition(message, end);
|
|
1165
|
+
if (disposition === "held") {
|
|
1113
1166
|
this.turnReport.reset();
|
|
1114
1167
|
return;
|
|
1115
1168
|
}
|
|
1169
|
+
if (disposition === "rejected")
|
|
1170
|
+
this.cancelledWork = true;
|
|
1116
1171
|
this.lastEnd = this.clearContext.turnEnd(end);
|
|
1117
1172
|
const local = this.turnLocalCommand;
|
|
1118
1173
|
if (message.stop_reason === "refusal") {
|
|
@@ -1151,6 +1206,10 @@ export class V2Session {
|
|
|
1151
1206
|
endTurn() {
|
|
1152
1207
|
if (!this.foreground || this.clearContext.holdsTurn())
|
|
1153
1208
|
return;
|
|
1209
|
+
if (this.steeredPrompts.size > 0) {
|
|
1210
|
+
this.turnReport.reset();
|
|
1211
|
+
return;
|
|
1212
|
+
}
|
|
1154
1213
|
const { stopReason } = idleOutcome(this.lastEnd, this.cancelledWork, this.turnReport);
|
|
1155
1214
|
const reporting = this.fileChanges?.turnEnding(stopReason, this.query);
|
|
1156
1215
|
if (!reporting)
|
|
@@ -1263,13 +1322,13 @@ export class V2Session {
|
|
|
1263
1322
|
if (!this.cycleOpen) {
|
|
1264
1323
|
this.cycleOpen = true;
|
|
1265
1324
|
this.cycleCommand = command;
|
|
1325
|
+
this.output.resetAgentText();
|
|
1326
|
+
this.reports.turnStarted();
|
|
1266
1327
|
}
|
|
1267
1328
|
if (this.foreground)
|
|
1268
1329
|
return;
|
|
1269
1330
|
this.foreground = true;
|
|
1270
1331
|
this.lastEnd = undefined;
|
|
1271
|
-
this.output.resetAgentText();
|
|
1272
|
-
this.reports.turnStarted();
|
|
1273
1332
|
this.reportState();
|
|
1274
1333
|
}
|
|
1275
1334
|
/**
|
|
@@ -1278,7 +1337,7 @@ export class V2Session {
|
|
|
1278
1337
|
* that prompt's.
|
|
1279
1338
|
*/
|
|
1280
1339
|
closeTurn() {
|
|
1281
|
-
if (!this.foreground || this.clearContext.holdsTurn())
|
|
1340
|
+
if (!this.foreground || this.clearContext.holdsTurn() || this.steeredPrompts.size > 0)
|
|
1282
1341
|
return;
|
|
1283
1342
|
// A subagent's end that still waited for its messages, before the turn's idle.
|
|
1284
1343
|
this.tasks.turnClosed();
|
|
@@ -1314,16 +1373,23 @@ export class V2Session {
|
|
|
1314
1373
|
this.turnLocalCommand = undefined;
|
|
1315
1374
|
this.checkBoundary();
|
|
1316
1375
|
}
|
|
1317
|
-
/**
|
|
1318
|
-
* While the turn waits on subagents, it is blocked when each of them is
|
|
1319
|
-
* (see `SessionTasks.foregroundBlocked`). Otherwise by the session's own
|
|
1320
|
-
* open requests.
|
|
1321
|
-
*/
|
|
1376
|
+
/** Reports waiting only when no foreground tool or subagent can progress. */
|
|
1322
1377
|
foregroundState() {
|
|
1323
1378
|
if (!this.foreground)
|
|
1324
1379
|
return "idle";
|
|
1325
|
-
const
|
|
1326
|
-
|
|
1380
|
+
const subagentsBlocked = this.tasks.foregroundBlocked();
|
|
1381
|
+
if (subagentsBlocked === false || this.foregroundToolsCanProgress())
|
|
1382
|
+
return "running";
|
|
1383
|
+
return subagentsBlocked === true || this.requests.size > 0 ? "requires_action" : "running";
|
|
1384
|
+
}
|
|
1385
|
+
foregroundToolsCanProgress() {
|
|
1386
|
+
const waiting = new Set();
|
|
1387
|
+
for (const { context } of this.requests) {
|
|
1388
|
+
if (context.type === "session")
|
|
1389
|
+
return false;
|
|
1390
|
+
waiting.add(context.toolCallId);
|
|
1391
|
+
}
|
|
1392
|
+
return this.tasks.foregroundToolsCanProgress(waiting);
|
|
1327
1393
|
}
|
|
1328
1394
|
/**
|
|
1329
1395
|
* Reports the foreground state when it changed. `withdrawnByCancel`: the
|
|
@@ -1371,19 +1437,49 @@ export class V2Session {
|
|
|
1371
1437
|
return;
|
|
1372
1438
|
this.connection.send(this.background.stamp(notification));
|
|
1373
1439
|
}
|
|
1374
|
-
/**
|
|
1375
|
-
|
|
1440
|
+
/** Withdraws one pending prompt without interrupting the running work. */
|
|
1441
|
+
async withdrawPrompt(uuid) {
|
|
1442
|
+
const prompt = this.pending.get(uuid);
|
|
1443
|
+
if (!prompt)
|
|
1444
|
+
return;
|
|
1445
|
+
if (!prompt.pushed) {
|
|
1446
|
+
this.failPrompt(uuid, RequestError.requestCancelled());
|
|
1447
|
+
return;
|
|
1448
|
+
}
|
|
1449
|
+
// The SDK exposes per-message cancellation without a Query declaration.
|
|
1450
|
+
const query = this.query;
|
|
1451
|
+
if (!query.cancelAsyncMessage) {
|
|
1452
|
+
this.connection.logger.error(`Session ${this.sessionId}: Claude Code cannot withdraw queued prompt ${uuid}`);
|
|
1453
|
+
return;
|
|
1454
|
+
}
|
|
1455
|
+
if (await query.cancelAsyncMessage(uuid))
|
|
1456
|
+
this.failPrompt(uuid, RequestError.requestCancelled());
|
|
1457
|
+
}
|
|
1458
|
+
takePrompt(uuid) {
|
|
1376
1459
|
const prompt = this.pending.get(uuid);
|
|
1377
1460
|
if (!prompt)
|
|
1378
|
-
return
|
|
1461
|
+
return undefined;
|
|
1379
1462
|
this.pending.delete(uuid);
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1463
|
+
prompt.signal.removeEventListener("abort", prompt.withdraw);
|
|
1464
|
+
return prompt;
|
|
1465
|
+
}
|
|
1466
|
+
/** Fails the prompt `uuid` if it is not answered yet. Returns whether it was pending. */
|
|
1467
|
+
failPrompt(uuid, error) {
|
|
1468
|
+
const prompt = this.takePrompt(uuid);
|
|
1469
|
+
const steered = this.steeredPrompts.delete(uuid);
|
|
1470
|
+
if (prompt) {
|
|
1471
|
+
this.localCommands.delete(uuid);
|
|
1472
|
+
this.fileChanges?.promptFailed(uuid, error);
|
|
1473
|
+
prompt.reject(error);
|
|
1474
|
+
}
|
|
1475
|
+
if (steered && !this.cycleOpen)
|
|
1476
|
+
void this.endTurn();
|
|
1383
1477
|
this.checkBoundary();
|
|
1384
|
-
return
|
|
1478
|
+
return prompt !== undefined;
|
|
1385
1479
|
}
|
|
1386
1480
|
failPending(error) {
|
|
1481
|
+
// The query's close or failure owns the turn's outcome.
|
|
1482
|
+
this.steeredPrompts.clear();
|
|
1387
1483
|
for (const uuid of [...this.pending.keys()])
|
|
1388
1484
|
this.failPrompt(uuid, error);
|
|
1389
1485
|
}
|
package/dist/v2/stream.d.ts
CHANGED
|
@@ -131,6 +131,8 @@ export declare class SessionOutput {
|
|
|
131
131
|
preview(toolCallId: string, content: ToolCallContent[]): void;
|
|
132
132
|
/** Whether the stream mapped the tool call `toolCallId`, shown or routed away. */
|
|
133
133
|
holds(toolCallId: string): boolean;
|
|
134
|
+
/** Whether a dispatched tool still runs outside the waiting and delegated work. */
|
|
135
|
+
hasProgressingTool(waiting: ReadonlySet<string>, excluded: ReadonlySet<string>): boolean;
|
|
134
136
|
/** The tool uses of the session's tool calls, by id. */
|
|
135
137
|
toolUses(): Readonly<ToolUseCache>;
|
|
136
138
|
/** Sends v1-shaped updates of the session, as the shared mapping makes them. */
|
package/dist/v2/stream.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../../src/v2/stream.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAEV,eAAe,EAChB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,KAAK,EAAE,MAAM,mDAAmD,CAAC;AAC7E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,KAAK,EACV,mBAAmB,EACnB,sBAAsB,EACtB,UAAU,EACV,0BAA0B,EAC1B,0BAA0B,EAC1B,sBAAsB,EACtB,cAAc,EACd,cAAc,EACf,MAAM,gCAAgC,CAAC;AAMxC,OAAO,EAKL,KAAK,YAAY,EAClB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAOlE,OAAO,EAAkD,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAG7F,OAAO,EAAe,KAAK,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAiB9E;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,YAAY,EAAE,sBAAsB,KAAK,sBAAsB,EAAE,CAAC;AAE7F,gFAAgF;AAChF,MAAM,WAAW,WAAW;IAC1B,uEAAuE;IACvE,KAAK,EAAE,WAAW,CAAC;IACnB,8FAA8F;IAC9F,SAAS,CAAC,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CAAC;IAC1C,kFAAkF;IAClF,QAAQ,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CAAC;IACxC;;;OAGG;IACH,WAAW,CAAC,CAAC,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CA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I;IAInD;;;;OAIG;IACH,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI;IAKtD,yEAAyE;IACzE,YAAY,IAAI,OAAO;IAIvB,cAAc,IAAI,IAAI;IAItB,OAAO,CAAC,OAAO;IAyCf;;;;;;OAMG;IACH,gBAAgB,CACd,MAAM,EAAE,QAAQ,GAAG,WAAW,EAC9B,IAAI,GAAE,WAAW,CAAC,MAAM,CAAa,EACrC,EAAE,aAAqB,EAAE,GAAE;QAAE,aAAa,CAAC,EAAE,OAAO,CAAA;KAAO,GAC1D,MAAM,EAAE;IA0BX;;;;;;;;;OASG;IACH,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,GAAE,WAAW,CAAC,MAAM,CAAa,GAAG,IAAI;IAS9E;;;;OAIG;IACH,cAAc,CAAC,OAAO,EAAE,UAAU,GAAG,IAAI;IAQzC;;;;;;OAMG;IACH,OAAO,CAAC,eAAe;IAQvB;;;;OAIG;IACH,OAAO,CAAC,KAAK;IAYb,mEAAmE;IACnE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAqB;IAEhD,uEAAuE;IACvE,WAAW,EAAE,CAAC,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAE3D,OAAO,CAAC,IAAI;IAYZ,OAAO,CAAC,OAAO;CA0BhB;AAED,KAAK,mBAAmB,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC"}
|
package/dist/v2/stream.js
CHANGED
|
@@ -194,6 +194,17 @@ export class SessionOutput {
|
|
|
194
194
|
holds(toolCallId) {
|
|
195
195
|
return this.emittedToolCalls.has(toolCallId);
|
|
196
196
|
}
|
|
197
|
+
/** Whether a dispatched tool still runs outside the waiting and delegated work. */
|
|
198
|
+
hasProgressingTool(waiting, excluded) {
|
|
199
|
+
for (const toolCallId of this.dispatched) {
|
|
200
|
+
if (this.unfinished.has(toolCallId) &&
|
|
201
|
+
!waiting.has(toolCallId) &&
|
|
202
|
+
!excluded.has(toolCallId)) {
|
|
203
|
+
return true;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
return false;
|
|
207
|
+
}
|
|
197
208
|
/** The tool uses of the session's tool calls, by id. */
|
|
198
209
|
toolUses() {
|
|
199
210
|
return this.toolUseCache;
|
|
@@ -118,15 +118,11 @@ export declare class SubagentReplay {
|
|
|
118
118
|
private sendConfiguration;
|
|
119
119
|
private sendEndState;
|
|
120
120
|
private ownerHooks;
|
|
121
|
-
/**
|
|
122
|
-
* Registers the launches, the launch results, the SendMessage calls and the
|
|
123
|
-
* SubagentHandback calls in `messages`, of the session `ownerSessionId`.
|
|
124
|
-
*/
|
|
125
121
|
/**
|
|
126
122
|
* A replayed update of a tool call of `output`, the session of `owner`
|
|
127
123
|
* when it is a child's. The client is not shown the launch of a replayed
|
|
128
124
|
* child, a SendMessage call whose message the replay delivered, or a
|
|
129
|
-
* successful SubagentHandback call: a foreground launch's completed result
|
|
125
|
+
* pending or successful SubagentHandback call: a foreground launch's completed result
|
|
130
126
|
* goes out as the child's reply, a delivered SendMessage as the sender's
|
|
131
127
|
* outgoing message, and a hand-back as the child's message to its parent.
|
|
132
128
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subagent-replay.d.ts","sourceRoot":"","sources":["../../src/v2/subagent-replay.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,OAAO,KAAK,KAAK,EAAE,MAAM,mDAAmD,CAAC;AAC7E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,wBAAwB,CAAC;AAoBhC,OAAO,KAAK,EAAE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O,CAAC,UAAU;IAYlB,OAAO,CAAC,QAAQ;IAMhB,OAAO,CAAC,KAAK;CAKd"}
|
|
@@ -149,15 +149,11 @@ export class SubagentReplay {
|
|
|
149
149
|
: {}),
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
|
-
/**
|
|
153
|
-
* Registers the launches, the launch results, the SendMessage calls and the
|
|
154
|
-
* SubagentHandback calls in `messages`, of the session `ownerSessionId`.
|
|
155
|
-
*/
|
|
156
152
|
/**
|
|
157
153
|
* A replayed update of a tool call of `output`, the session of `owner`
|
|
158
154
|
* when it is a child's. The client is not shown the launch of a replayed
|
|
159
155
|
* child, a SendMessage call whose message the replay delivered, or a
|
|
160
|
-
* successful SubagentHandback call: a foreground launch's completed result
|
|
156
|
+
* pending or successful SubagentHandback call: a foreground launch's completed result
|
|
161
157
|
* goes out as the child's reply, a delivered SendMessage as the sender's
|
|
162
158
|
* outgoing message, and a hand-back as the child's message to its parent.
|
|
163
159
|
*/
|
|
@@ -178,13 +174,12 @@ export class SubagentReplay {
|
|
|
178
174
|
const [outgoing] = linkedSessionMessages(sendMessage.toolUseId, sendMessage.senderSessionId, sendMessage.recipientSessionId, sendMessage.message);
|
|
179
175
|
return [outgoing];
|
|
180
176
|
}
|
|
181
|
-
const handback = owner ? this.transcript.
|
|
182
|
-
if (owner && handback
|
|
183
|
-
if (handback
|
|
177
|
+
const handback = owner ? this.transcript.handbackUpdate(update) : undefined;
|
|
178
|
+
if (owner && handback !== undefined) {
|
|
179
|
+
if (handback === null)
|
|
184
180
|
return [];
|
|
185
|
-
handback.sent = true;
|
|
186
181
|
owner.handedBack = true;
|
|
187
|
-
const [outgoing, incoming] = linkedSessionMessages(update.toolCallId, owner.sessionId, owner.parentSessionId, handback.
|
|
182
|
+
const [outgoing, incoming] = linkedSessionMessages(update.toolCallId, owner.sessionId, owner.parentSessionId, handback.text);
|
|
188
183
|
// Sent here, in order: an output routes each update once the ones before it went out.
|
|
189
184
|
output.emitV1([outgoing]);
|
|
190
185
|
this.outputOf(owner.parentSessionId)?.emitV1([incoming]);
|
package/dist/v2/tasks.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export interface TaskHost {
|
|
|
26
26
|
send(notification: v2.UpdateSessionNotification): void;
|
|
27
27
|
/** The root session's foreground state now. */
|
|
28
28
|
rootState(): WorkStateName;
|
|
29
|
-
/**
|
|
29
|
+
/** Task work or requests changed, which can affect foreground state and restart admission. */
|
|
30
30
|
foregroundRequestsChanged(): void;
|
|
31
31
|
/** The entries of the root session's `model` option, for a child's `model`. */
|
|
32
32
|
models(): SubagentModels;
|
|
@@ -39,6 +39,13 @@ export interface TaskHost {
|
|
|
39
39
|
*/
|
|
40
40
|
taskOutput(): ((taskId: string) => Promise<TaskOutput>) | undefined;
|
|
41
41
|
}
|
|
42
|
+
/** The work that waits for an input request. */
|
|
43
|
+
export type RequestContext = {
|
|
44
|
+
type: "session";
|
|
45
|
+
} | {
|
|
46
|
+
type: "tool_call";
|
|
47
|
+
toolCallId: string;
|
|
48
|
+
};
|
|
42
49
|
/** Where a permission request or elicitation goes: the root session or a child. */
|
|
43
50
|
export interface RequestTarget {
|
|
44
51
|
readonly sessionId: string;
|
|
@@ -55,7 +62,7 @@ export interface RequestTarget {
|
|
|
55
62
|
* settles. Its signal aborts with `signal`, or when a cancel or close
|
|
56
63
|
* withdraws the target's requests.
|
|
57
64
|
*/
|
|
58
|
-
openRequest<T>(signal: AbortSignal, send: (signal: AbortSignal) => Promise<T
|
|
65
|
+
openRequest<T>(signal: AbortSignal, send: (signal: AbortSignal) => Promise<T>, context?: RequestContext): Promise<T>;
|
|
59
66
|
}
|
|
60
67
|
export declare class SessionTasks {
|
|
61
68
|
private readonly host;
|
|
@@ -171,8 +178,14 @@ export declare class SessionTasks {
|
|
|
171
178
|
toolResults(output: SessionOutput, message: SDKUserMessage): void;
|
|
172
179
|
/** Reads the subagents that the history `messages` launched, for its replay. */
|
|
173
180
|
loadReplay(messages: SessionMessage[]): Promise<SubagentReplay | undefined>;
|
|
174
|
-
/** Whether a subagent
|
|
175
|
-
|
|
181
|
+
/** Whether a subagent still runs, including in the background. */
|
|
182
|
+
hasLiveAgents(): boolean;
|
|
183
|
+
/** Whether a child awaits permission or an elicitation response. */
|
|
184
|
+
hasOpenRequests(): boolean;
|
|
185
|
+
/** Whether a child, terminal, tool task, or child request remains. */
|
|
186
|
+
hasLiveWork(): boolean;
|
|
187
|
+
/** Whether a root tool can progress independently of the waiting requests and delegated work. */
|
|
188
|
+
foregroundToolsCanProgress(waiting: ReadonlySet<string>): boolean;
|
|
176
189
|
/**
|
|
177
190
|
* Whether `sessionId` is a child session that this root announced in its
|
|
178
191
|
* current conversation. A child that only a replay announced, or one from
|
|
@@ -457,6 +470,9 @@ export declare class SessionTasks {
|
|
|
457
470
|
* call after all. Undefined for any other update.
|
|
458
471
|
*/
|
|
459
472
|
private handbackUpdate;
|
|
473
|
+
/** A launch result carries the report when Claude Code sends no child stream. */
|
|
474
|
+
private handbackResult;
|
|
475
|
+
private publishHandback;
|
|
460
476
|
/**
|
|
461
477
|
* A SendMessage result that reports the agent it resumed (`resumedAgentId`):
|
|
462
478
|
* the call is the child's delegation, which it takes unless the run of that
|
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":"AAuDA,OAAO,EAAgB,KAAK,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACxF,OAAO,KAAK,KAAK,EAAE,MAAM,mDAAmD,CAAC;AAC7E,OAAO,KAAK,EACV,SAAS,EACT,UAAU,EACV,cAAc,EACd,cAAc,EACf,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAElE,OAAO,EAKL,KAAK,UAAU,EAEhB,MAAM,yBAAyB,CAA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