@agentclientprotocol/claude-agent-acp 0.100.1-preview.5 → 0.101.1-preview.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -133,7 +133,11 @@ export declare class SessionBackgroundWork {
|
|
|
133
133
|
* `Monitor` or `Workflow` call, whose structured result names its task,
|
|
134
134
|
* or a call that a live task names as its tool use, such as a
|
|
135
135
|
* backgrounded MCP call. The task must be in the level: one that ended
|
|
136
|
-
* already
|
|
136
|
+
* already leaves its call as it is. Claude Code marks every live-update
|
|
137
|
+
* watcher `ambient`, including the task of a `Monitor` call; a call
|
|
138
|
+
* started it, so it is work the client can see and stop, and is
|
|
139
|
+
* registered all the same. Ambient tasks without a call of their own,
|
|
140
|
+
* such as watchers Claude Code starts by itself, are never registered.
|
|
137
141
|
*
|
|
138
142
|
* Returns the ids of the registered calls, whose result then reports
|
|
139
143
|
* `in_progress` (see `withRunningToolCall`).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"background-work.d.ts","sourceRoot":"","sources":["../src/background-work.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"background-work.d.ts","sourceRoot":"","sources":["../src/background-work.ts"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,KAAK,mBAAmB,EAA2B,MAAM,0BAA0B,CAAC;AAC7F,OAAO,EAAyB,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAErF,sCAAsC;AACtC,MAAM,MAAM,cAAc,GACtB;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GACxC;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GACzC;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC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;CActB;AAED,KAAK,IAAI,GAAG,CAAC,YAAY,EAAE,sBAAsB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAEpE,kFAAkF;AAClF,MAAM,MAAM,gBAAgB,GAAG;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/E;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACxC,QAAQ,EAAE,KAAK,CAAC,eAAe,GAAG;IAAE,UAAU,CAAC,EAAE,qBAAqB,CAAA;CAAE,CAAC,EACzE,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAAC,IAAI,CAAC,CA0Bf;AA6DD;;;;GAIG;AACH,qBAAa,sBAAsB;IAIrB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC;IAHlC,gGAAgG;IAChG,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAqD;gBAElD,IAAI,CAAC,EAAE,cAAc,YAAA;IAElD,6CAA6C;IAC7C,IAAI,OAAO,IAAI,OAAO,CAErB;IAED;;;;OAIG;IACH,IAAI,CACF,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,eAAe,GAAG;QAAE,UAAU,CAAC,EAAE,qBAAqB,CAAA;KAAE,EACjE,SAAS,EAAE,aAAa,GACvB,IAAI;IAUP,iFAAiF;IACjF,MAAM,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI;CAOpC"}
|
package/dist/background-work.js
CHANGED
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
* "Background work").
|
|
6
6
|
*
|
|
7
7
|
* The lists are built from Claude Code's live background task set
|
|
8
|
-
* (`background_tasks_changed`)
|
|
9
|
-
*
|
|
8
|
+
* (`background_tasks_changed`). Claude Code marks `ambient` its own
|
|
9
|
+
* housekeeping and every live-update watcher; those are left out, except a
|
|
10
|
+
* task that a tool call started, such as a `Monitor` call's. The root session and each
|
|
10
11
|
* announced subagent session (the subagents RFD form) has its own list. Each
|
|
11
12
|
* task is listed once, in the list of the session that runs it:
|
|
12
13
|
*
|
|
@@ -81,7 +82,11 @@ export class SessionBackgroundWork {
|
|
|
81
82
|
* `Monitor` or `Workflow` call, whose structured result names its task,
|
|
82
83
|
* or a call that a live task names as its tool use, such as a
|
|
83
84
|
* backgrounded MCP call. The task must be in the level: one that ended
|
|
84
|
-
* already
|
|
85
|
+
* already leaves its call as it is. Claude Code marks every live-update
|
|
86
|
+
* watcher `ambient`, including the task of a `Monitor` call; a call
|
|
87
|
+
* started it, so it is work the client can see and stop, and is
|
|
88
|
+
* registered all the same. Ambient tasks without a call of their own,
|
|
89
|
+
* such as watchers Claude Code starts by itself, are never registered.
|
|
85
90
|
*
|
|
86
91
|
* Returns the ids of the registered calls, whose result then reports
|
|
87
92
|
* `in_progress` (see `withRunningToolCall`).
|
|
@@ -114,10 +119,7 @@ export class SessionBackgroundWork {
|
|
|
114
119
|
const taskId = (TASK_TOOLS.has(toolUse.name) ? structuredTaskId : undefined) ??
|
|
115
120
|
[...owner.liveBackgroundTasks].find(([, task]) => task.parentToolUseId === toolCallId && !task.isSubagent)?.[0];
|
|
116
121
|
const task = taskId === undefined ? undefined : this.level.get(taskId);
|
|
117
|
-
if (!task ||
|
|
118
|
-
task.ambient ||
|
|
119
|
-
task.taskType === "local_bash" ||
|
|
120
|
-
task.taskType === "local_agent") {
|
|
122
|
+
if (!task || task.taskType === "local_bash" || task.taskType === "local_agent") {
|
|
121
123
|
continue;
|
|
122
124
|
}
|
|
123
125
|
this.toolCalls.set(taskId, {
|
|
@@ -250,6 +252,15 @@ export class SessionBackgroundWork {
|
|
|
250
252
|
// A subagent's command or tool call runs on the child's stream.
|
|
251
253
|
const ownerOf = (parentToolUseId) => parentToolUseId ? childByToolUse.get(parentToolUseId)?.sessionId : this.sessionId;
|
|
252
254
|
for (const [taskId, task] of this.level) {
|
|
255
|
+
// A registered call's task is listed even when ambient, as a `Monitor`
|
|
256
|
+
// call's is (see `toolResults`).
|
|
257
|
+
const toolCall = this.toolCalls.get(taskId);
|
|
258
|
+
if (toolCall) {
|
|
259
|
+
const session = ownerOf(toolCall.parentToolUseId);
|
|
260
|
+
if (session)
|
|
261
|
+
lists.get(session).push({ type: "tool_call", toolCallId: toolCall.toolCallId });
|
|
262
|
+
continue;
|
|
263
|
+
}
|
|
253
264
|
if (task.ambient)
|
|
254
265
|
continue;
|
|
255
266
|
const terminal = this.terminals.get(taskId);
|
|
@@ -259,13 +270,6 @@ export class SessionBackgroundWork {
|
|
|
259
270
|
lists.get(session).push({ type: "terminal", terminalId: terminal.toolCallId });
|
|
260
271
|
continue;
|
|
261
272
|
}
|
|
262
|
-
const toolCall = this.toolCalls.get(taskId);
|
|
263
|
-
if (toolCall) {
|
|
264
|
-
const session = ownerOf(toolCall.parentToolUseId);
|
|
265
|
-
if (session)
|
|
266
|
-
lists.get(session).push({ type: "tool_call", toolCallId: toolCall.toolCallId });
|
|
267
|
-
continue;
|
|
268
|
-
}
|
|
269
273
|
// A command without a terminal yet is one that foreground work waits on.
|
|
270
274
|
// A subagent is listed below, as its session.
|
|
271
275
|
if (task.taskType === "local_bash" || task.taskType === "local_agent")
|
package/package.json
CHANGED