replicas-cli 0.2.315 → 0.2.316
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 +18 -17
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -9507,7 +9507,7 @@ var HOOK_EXEC_MAX_BUFFER_BYTES = 10 * 1024 * 1024;
|
|
|
9507
9507
|
var REPLICAS_CONFIG_FILENAMES = ["replicas.json", "replicas.yaml", "replicas.yml"];
|
|
9508
9508
|
|
|
9509
9509
|
// ../shared/src/cli-version.ts
|
|
9510
|
-
var CLI_VERSION = "0.2.
|
|
9510
|
+
var CLI_VERSION = "0.2.316";
|
|
9511
9511
|
|
|
9512
9512
|
// ../shared/src/engine/environment.ts
|
|
9513
9513
|
var DESKTOP_NOVNC_PORT = 6080;
|
|
@@ -10438,6 +10438,14 @@ function parseMcpToolName(name) {
|
|
|
10438
10438
|
}
|
|
10439
10439
|
|
|
10440
10440
|
// ../shared/src/display-message/parsers/claude-parser.ts
|
|
10441
|
+
function upsertDisplayMessage(messages, message) {
|
|
10442
|
+
const index = messages.findIndex((existing) => existing.id === message.id);
|
|
10443
|
+
if (index === -1) {
|
|
10444
|
+
messages.push(message);
|
|
10445
|
+
} else {
|
|
10446
|
+
messages[index] = message;
|
|
10447
|
+
}
|
|
10448
|
+
}
|
|
10441
10449
|
var LOCAL_COMMAND_ECHO_REGEX = /^<(?:command-name|command-message|local-command-stdout|local-command-stderr)>/;
|
|
10442
10450
|
function parseClaudeEvents(events, parentToolUseId) {
|
|
10443
10451
|
const messages = [];
|
|
@@ -10449,7 +10457,6 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
10449
10457
|
const toolCallMap = /* @__PURE__ */ new Map();
|
|
10450
10458
|
const taskMessageMap = /* @__PURE__ */ new Map();
|
|
10451
10459
|
const partialIndexes = /* @__PURE__ */ new Map();
|
|
10452
|
-
const completedPartialStreamIds = /* @__PURE__ */ new Set();
|
|
10453
10460
|
const taskAccumulator = new TaskAccumulator();
|
|
10454
10461
|
const taskSnapshot = () => taskAccumulator.getTasks().map((task) => ({
|
|
10455
10462
|
text: task.subject,
|
|
@@ -10463,7 +10470,7 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
10463
10470
|
const existing = partialIndexes.get(payload.streamId) ?? {};
|
|
10464
10471
|
if (payload.thinking) {
|
|
10465
10472
|
const reasoningMessage = {
|
|
10466
|
-
id: `reasoning
|
|
10473
|
+
id: `reasoning-${payload.streamId}-thinking`,
|
|
10467
10474
|
type: "reasoning",
|
|
10468
10475
|
content: payload.thinking,
|
|
10469
10476
|
status: payload.status,
|
|
@@ -10474,7 +10481,7 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
10474
10481
|
}
|
|
10475
10482
|
if (payload.text) {
|
|
10476
10483
|
const agentMessage = {
|
|
10477
|
-
id: `agent
|
|
10484
|
+
id: `agent-${payload.streamId}-0`,
|
|
10478
10485
|
type: "agent",
|
|
10479
10486
|
content: payload.text,
|
|
10480
10487
|
timestamp: event.timestamp
|
|
@@ -10521,22 +10528,19 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
10521
10528
|
}
|
|
10522
10529
|
if (event.type === "claude-assistant") {
|
|
10523
10530
|
const messageId = event.payload.message?.id;
|
|
10524
|
-
if (typeof messageId === "string" && messageId) {
|
|
10525
|
-
completedPartialStreamIds.add(messageId);
|
|
10526
|
-
}
|
|
10527
10531
|
const contentBlocks = normalizeContentBlocks(event.payload.message?.content);
|
|
10528
|
-
contentBlocks.forEach((block) => {
|
|
10532
|
+
contentBlocks.forEach((block, blockIndex) => {
|
|
10529
10533
|
if (block.type === "text" && block.text) {
|
|
10530
|
-
messages
|
|
10531
|
-
id: `agent-${event.timestamp}-${
|
|
10534
|
+
upsertDisplayMessage(messages, {
|
|
10535
|
+
id: `agent-${messageId || event.timestamp}-${blockIndex}`,
|
|
10532
10536
|
type: "agent",
|
|
10533
10537
|
content: block.text,
|
|
10534
10538
|
timestamp: event.timestamp
|
|
10535
10539
|
});
|
|
10536
10540
|
}
|
|
10537
10541
|
if (block.type === "thinking" && block.thinking) {
|
|
10538
|
-
messages
|
|
10539
|
-
id: `reasoning-${event.timestamp}
|
|
10542
|
+
upsertDisplayMessage(messages, {
|
|
10543
|
+
id: `reasoning-${messageId || event.timestamp}-thinking`,
|
|
10540
10544
|
type: "reasoning",
|
|
10541
10545
|
content: block.thinking,
|
|
10542
10546
|
status: "completed",
|
|
@@ -10813,11 +10817,7 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
10813
10817
|
}
|
|
10814
10818
|
}
|
|
10815
10819
|
});
|
|
10816
|
-
|
|
10817
|
-
return messages.filter((message) => {
|
|
10818
|
-
const prefix = ["reasoning-partial:", "agent-partial:"].find((p) => message.id.startsWith(p));
|
|
10819
|
-
return !prefix || !completedPartialStreamIds.has(message.id.slice(prefix.length));
|
|
10820
|
-
});
|
|
10820
|
+
return messages;
|
|
10821
10821
|
}
|
|
10822
10822
|
|
|
10823
10823
|
// ../shared/src/agent-event-utils.ts
|
|
@@ -10876,6 +10876,7 @@ function messageForItem(item) {
|
|
|
10876
10876
|
id: `command-${item.id}`,
|
|
10877
10877
|
type: "command",
|
|
10878
10878
|
command: item.command,
|
|
10879
|
+
commandActions: item.commandActions,
|
|
10879
10880
|
output: item.output,
|
|
10880
10881
|
exitCode: item.exitCode ?? void 0,
|
|
10881
10882
|
status: normalizeCodexAspTranscriptStatus(item.status),
|