replicas-cli 0.2.657 → 0.2.659
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/index.cjs +19 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -22922,6 +22922,9 @@ function coerceBackgroundTaskPayload(payload) {
|
|
|
22922
22922
|
return {
|
|
22923
22923
|
subtype,
|
|
22924
22924
|
taskId,
|
|
22925
|
+
toolUseId: optionalString(payload.tool_use_id),
|
|
22926
|
+
subagentType: optionalString(payload.subagent_type),
|
|
22927
|
+
isBackgrounded: optionalBoolean(payload.is_backgrounded),
|
|
22925
22928
|
description: optionalString(payload.description),
|
|
22926
22929
|
summary: optionalString(payload.summary),
|
|
22927
22930
|
outputFile: optionalString(payload.output_file),
|
|
@@ -26454,11 +26457,13 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
26454
26457
|
if (payload?.ambient) ambientTaskIds.add(payload.taskId);
|
|
26455
26458
|
if (payload && !ambientTaskIds.has(payload.taskId)) {
|
|
26456
26459
|
const existing = taskMessageMap.get(payload.taskId);
|
|
26457
|
-
const nextStatus = payload.subtype === "task_notification" ? normalizeBackgroundTaskStatus(payload.status) : payload.subtype === "task_updated" ? normalizeBackgroundTaskStatus(payload.patch?.status) : existing?.status ?? "in_progress";
|
|
26460
|
+
const nextStatus = payload.subtype === "task_notification" ? normalizeBackgroundTaskStatus(payload.status) : payload.subtype === "task_updated" && payload.patch?.status !== void 0 ? normalizeBackgroundTaskStatus(payload.patch?.status) : existing?.status ?? "in_progress";
|
|
26458
26461
|
const nextMessage = {
|
|
26459
26462
|
id: existing?.id ?? `task-${event.timestamp}-${messages.length}`,
|
|
26460
26463
|
type: "background_task",
|
|
26461
26464
|
taskId: payload.taskId,
|
|
26465
|
+
toolUseId: payload.toolUseId ?? existing?.toolUseId,
|
|
26466
|
+
subagentType: payload.subagentType ?? existing?.subagentType,
|
|
26462
26467
|
status: nextStatus,
|
|
26463
26468
|
description: payload.description ?? payload.patch?.description ?? existing?.description,
|
|
26464
26469
|
summary: payload.summary ?? existing?.summary,
|
|
@@ -26469,7 +26474,7 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
26469
26474
|
lastToolName: payload.lastToolName ?? existing?.lastToolName,
|
|
26470
26475
|
usage: payload.usage ?? existing?.usage,
|
|
26471
26476
|
error: payload.patch?.error ?? existing?.error,
|
|
26472
|
-
isBackgrounded: payload.patch?.isBackgrounded ?? existing?.isBackgrounded,
|
|
26477
|
+
isBackgrounded: payload.isBackgrounded ?? payload.patch?.isBackgrounded ?? existing?.isBackgrounded,
|
|
26473
26478
|
timestamp: existing?.timestamp ?? event.timestamp
|
|
26474
26479
|
};
|
|
26475
26480
|
if (existing) {
|
|
@@ -26562,6 +26567,15 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
26562
26567
|
}
|
|
26563
26568
|
});
|
|
26564
26569
|
for (const message of messages) {
|
|
26570
|
+
if (message.type === "background_task" && message.toolUseId) {
|
|
26571
|
+
const toolInfo = toolCallMap.get(message.toolUseId);
|
|
26572
|
+
const toolMessage = toolInfo ? messages[toolInfo.messageIndex] : void 0;
|
|
26573
|
+
if (toolMessage?.type === "command") message.command = toolMessage.command;
|
|
26574
|
+
if (toolMessage?.type === "subagent") {
|
|
26575
|
+
message.prompt ?? (message.prompt = toolMessage.prompt);
|
|
26576
|
+
message.subagentType ?? (message.subagentType = toolMessage.subagentType);
|
|
26577
|
+
}
|
|
26578
|
+
}
|
|
26565
26579
|
if (message.type !== "subagent_followup") continue;
|
|
26566
26580
|
const target = messages.find((candidate) => candidate.type === "subagent" && candidate.chatId === message.chatId);
|
|
26567
26581
|
if (target?.type === "subagent") {
|
|
@@ -26611,7 +26625,8 @@ function messageForItem(item) {
|
|
|
26611
26625
|
id: `agent-${item.id}`,
|
|
26612
26626
|
type: "agent",
|
|
26613
26627
|
content: item.text,
|
|
26614
|
-
timestamp: item.timestamp
|
|
26628
|
+
timestamp: item.timestamp,
|
|
26629
|
+
...item.type === "plan" ? { isPlan: true } : {}
|
|
26615
26630
|
};
|
|
26616
26631
|
}
|
|
26617
26632
|
if (item.type === "reasoning") {
|
|
@@ -27244,7 +27259,7 @@ var headlessFilesystemAgentResultSchema = external_exports.object({
|
|
|
27244
27259
|
});
|
|
27245
27260
|
|
|
27246
27261
|
// ../shared/src/cli-version.ts
|
|
27247
|
-
var CLI_VERSION = "0.2.
|
|
27262
|
+
var CLI_VERSION = "0.2.659";
|
|
27248
27263
|
|
|
27249
27264
|
// ../shared/src/version.ts
|
|
27250
27265
|
function compareVersions(v1, v2) {
|