replicas-cli 0.2.391 → 0.2.393
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.mjs +42 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -24379,7 +24379,7 @@ var HOOK_EXEC_MAX_BUFFER_BYTES = 10 * 1024 * 1024;
|
|
|
24379
24379
|
var REPLICAS_CONFIG_FILENAMES = ["replicas.json", "replicas.yaml", "replicas.yml"];
|
|
24380
24380
|
|
|
24381
24381
|
// ../shared/src/cli-version.ts
|
|
24382
|
-
var CLI_VERSION = "0.2.
|
|
24382
|
+
var CLI_VERSION = "0.2.393";
|
|
24383
24383
|
|
|
24384
24384
|
// ../shared/src/version.ts
|
|
24385
24385
|
function compareVersions(v1, v2) {
|
|
@@ -25795,6 +25795,19 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
25795
25795
|
isChatBased: true,
|
|
25796
25796
|
timestamp: event.timestamp
|
|
25797
25797
|
});
|
|
25798
|
+
} else if (toolName === "mcp__relay-subagent-tools__message_agent") {
|
|
25799
|
+
const inputObj = typeof toolInput === "string" ? safeJsonParse(toolInput, {}) : toolInput;
|
|
25800
|
+
messages.push({
|
|
25801
|
+
id: `subagent-followup-${event.timestamp}-${messages.length}`,
|
|
25802
|
+
type: "subagent_followup",
|
|
25803
|
+
toolUseId,
|
|
25804
|
+
chatId: typeof inputObj.chatId === "string" ? inputObj.chatId : "",
|
|
25805
|
+
message: typeof inputObj.message === "string" ? inputObj.message : "",
|
|
25806
|
+
model: typeof inputObj.model === "string" ? inputObj.model : void 0,
|
|
25807
|
+
thinkingLevel: isValidThinkingLevel(inputObj.thinking_level) ? inputObj.thinking_level : void 0,
|
|
25808
|
+
status: "in_progress",
|
|
25809
|
+
timestamp: event.timestamp
|
|
25810
|
+
});
|
|
25798
25811
|
} else if (toolName === "mcp__relay-subagent-tools__delete_agent") {
|
|
25799
25812
|
const inputObj = typeof toolInput === "string" ? safeJsonParse(toolInput, {}) : toolInput;
|
|
25800
25813
|
const mcp = parseMcpToolName(toolName);
|
|
@@ -25938,10 +25951,21 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
25938
25951
|
message.chatId = parsed.chatId;
|
|
25939
25952
|
}
|
|
25940
25953
|
}
|
|
25954
|
+
} else if (message.type === "subagent_followup") {
|
|
25955
|
+
message.output = resultContent;
|
|
25956
|
+
message.status = status;
|
|
25941
25957
|
}
|
|
25942
25958
|
}
|
|
25943
25959
|
}
|
|
25944
25960
|
});
|
|
25961
|
+
for (const message of messages) {
|
|
25962
|
+
if (message.type !== "subagent_followup") continue;
|
|
25963
|
+
const target = messages.find((candidate) => candidate.type === "subagent" && candidate.chatId === message.chatId);
|
|
25964
|
+
if (target?.type === "subagent") {
|
|
25965
|
+
message.targetTitle = target.description;
|
|
25966
|
+
message.targetProvider = target.subagentType;
|
|
25967
|
+
}
|
|
25968
|
+
}
|
|
25945
25969
|
const staleIndexes = /* @__PURE__ */ new Set();
|
|
25946
25970
|
for (const streamId of [...completedStreamIds, ...supersededStreamIds]) {
|
|
25947
25971
|
const refs = partialIndexes.get(streamId);
|
|
@@ -28179,6 +28203,14 @@ function formatDisplayMessage(message) {
|
|
|
28179
28203
|
console.log(chalk15.gray(` ${truncate(message.output, 200)}`));
|
|
28180
28204
|
}
|
|
28181
28205
|
break;
|
|
28206
|
+
case "subagent_followup":
|
|
28207
|
+
console.log(chalk15.magenta(`
|
|
28208
|
+
[${time3}] MESSAGE SUBAGENT: ${message.targetTitle ?? message.chatId}`));
|
|
28209
|
+
console.log(chalk15.white(` ${truncate(message.message, 500)}`));
|
|
28210
|
+
if (message.output) {
|
|
28211
|
+
console.log(chalk15.gray(` ${truncate(message.output, 200)}`));
|
|
28212
|
+
}
|
|
28213
|
+
break;
|
|
28182
28214
|
case "error":
|
|
28183
28215
|
console.log(chalk15.red(`
|
|
28184
28216
|
[${time3}] ERROR:`));
|
|
@@ -34593,6 +34625,15 @@ function ChatMessage({ message, provider }) {
|
|
|
34593
34625
|
}
|
|
34594
34626
|
case "subagent":
|
|
34595
34627
|
return /* @__PURE__ */ jsx6(ActionLine, { label: "Agent", arg: truncate4(message.description, 50), status: message.status });
|
|
34628
|
+
case "subagent_followup":
|
|
34629
|
+
return /* @__PURE__ */ jsx6(
|
|
34630
|
+
ActionLine,
|
|
34631
|
+
{
|
|
34632
|
+
label: "Message agent",
|
|
34633
|
+
arg: truncate4(message.targetTitle ?? message.chatId, 50),
|
|
34634
|
+
status: message.status
|
|
34635
|
+
}
|
|
34636
|
+
);
|
|
34596
34637
|
case "error":
|
|
34597
34638
|
return /* @__PURE__ */ jsx6("box", { paddingX: 1, children: /* @__PURE__ */ jsx6("text", { fg: "#ff4444", selectable: true, children: message.message }) });
|
|
34598
34639
|
case "skill":
|