replicas-cli 0.3.164 → 0.3.167
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 +36 -19
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -27007,6 +27007,7 @@ function messageForItem(item) {
|
|
|
27007
27007
|
command: item.command,
|
|
27008
27008
|
...skillNames.length > 0 ? { skillNames } : {},
|
|
27009
27009
|
output: item.output,
|
|
27010
|
+
...item.replicasOmitted ? { outputOmitted: item.replicasOmitted } : {},
|
|
27010
27011
|
exitCode: item.exitCode ?? void 0,
|
|
27011
27012
|
status: normalizeCodexAspTranscriptStatus(item.status),
|
|
27012
27013
|
timestamp: item.timestamp
|
|
@@ -27030,6 +27031,7 @@ function messageForItem(item) {
|
|
|
27030
27031
|
tool: item.tool,
|
|
27031
27032
|
input: inputForDisplay(item.input),
|
|
27032
27033
|
output: item.output,
|
|
27034
|
+
...item.replicasOmitted ? { outputOmitted: item.replicasOmitted } : {},
|
|
27033
27035
|
status: normalizeCodexAspTranscriptStatus(item.status),
|
|
27034
27036
|
timestamp: item.timestamp
|
|
27035
27037
|
});
|
|
@@ -27046,6 +27048,7 @@ function messageForItem(item) {
|
|
|
27046
27048
|
...item.model ? { model: item.model } : {},
|
|
27047
27049
|
status: normalizeCodexAspTranscriptStatus(item.status),
|
|
27048
27050
|
...item.output ? { output: item.output } : {},
|
|
27051
|
+
...item.replicasOmitted ? { outputOmitted: item.replicasOmitted } : {},
|
|
27049
27052
|
nestedEvents: [],
|
|
27050
27053
|
timestamp: item.timestamp
|
|
27051
27054
|
};
|
|
@@ -28179,6 +28182,7 @@ function extractToolResult(event) {
|
|
|
28179
28182
|
toolResult,
|
|
28180
28183
|
toolUseId: toolResult.tool_use_id,
|
|
28181
28184
|
output: output2,
|
|
28185
|
+
outputOmitted: toolResult.replicasOmitted,
|
|
28182
28186
|
exitCode: exitCode === void 0 ? void 0 : parseInt(exitCode, 10),
|
|
28183
28187
|
status: toolResult.is_error ? "failed" : "completed"
|
|
28184
28188
|
};
|
|
@@ -28205,6 +28209,21 @@ function isClaudeResultError(payload) {
|
|
|
28205
28209
|
return Boolean(payload.is_error) || payload.subtype !== "success";
|
|
28206
28210
|
}
|
|
28207
28211
|
var LOCAL_COMMAND_ECHO_REGEX = /^<(?:command-name|command-message|local-command-stdout|local-command-stderr)>/;
|
|
28212
|
+
function readClaudeUserPrompt(payload, content) {
|
|
28213
|
+
if (payload.isSynthetic || content.some((c) => c.type === "tool_result" && c.tool_use_id)) return void 0;
|
|
28214
|
+
const text3 = content.filter((c) => c.type === "text").map((c) => c.text || "").join("\n");
|
|
28215
|
+
if (LOCAL_COMMAND_ECHO_REGEX.test(text3.trim())) return void 0;
|
|
28216
|
+
const images = content.filter((c) => c.type === "image" && c.source).map((c) => {
|
|
28217
|
+
const source = c.source;
|
|
28218
|
+
return {
|
|
28219
|
+
type: "image",
|
|
28220
|
+
mediaType: source.media_type || "image/png",
|
|
28221
|
+
data: source.data || "",
|
|
28222
|
+
...c.replicasOmitted ? { replicasOmitted: c.replicasOmitted } : {}
|
|
28223
|
+
};
|
|
28224
|
+
}).filter((img) => img.data || img.replicasOmitted);
|
|
28225
|
+
return text3 || images.length > 0 ? { text: text3, images } : void 0;
|
|
28226
|
+
}
|
|
28208
28227
|
function parseClaudeEvents(events, parentToolUseId) {
|
|
28209
28228
|
const messages = [];
|
|
28210
28229
|
const filterValue = parentToolUseId !== void 0 ? parentToolUseId : null;
|
|
@@ -28320,22 +28339,9 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
28320
28339
|
}
|
|
28321
28340
|
return;
|
|
28322
28341
|
}
|
|
28323
|
-
|
|
28324
|
-
|
|
28325
|
-
|
|
28326
|
-
const textContent = content.filter((c) => c.type === "text").map((c) => c.text || "").join("\n");
|
|
28327
|
-
if (LOCAL_COMMAND_ECHO_REGEX.test(textContent.trim())) {
|
|
28328
|
-
return;
|
|
28329
|
-
}
|
|
28330
|
-
const images = content.filter((c) => c.type === "image" && c.source).map((c) => {
|
|
28331
|
-
const source = c.source;
|
|
28332
|
-
return {
|
|
28333
|
-
type: "image",
|
|
28334
|
-
mediaType: source.media_type || "image/png",
|
|
28335
|
-
data: source.data || ""
|
|
28336
|
-
};
|
|
28337
|
-
}).filter((img) => img.data);
|
|
28338
|
-
if (textContent || images.length > 0) {
|
|
28342
|
+
const prompt = readClaudeUserPrompt(event.payload, content);
|
|
28343
|
+
if (prompt) {
|
|
28344
|
+
const { text: textContent, images } = prompt;
|
|
28339
28345
|
const stampedId = event.payload[USER_MESSAGE_ID_PAYLOAD_KEY];
|
|
28340
28346
|
const acceptedIndex = findMatchingUserMessageIndex(
|
|
28341
28347
|
acceptedUserMessageIndexes,
|
|
@@ -28616,7 +28622,7 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
28616
28622
|
filteredEvents.forEach((event) => {
|
|
28617
28623
|
const result = readToolResult(event);
|
|
28618
28624
|
if (!result) return;
|
|
28619
|
-
const { toolResult, output: resultContent, status } = result;
|
|
28625
|
+
const { toolResult, output: resultContent, outputOmitted, status } = result;
|
|
28620
28626
|
const toolInfo = toolCallMap.get(result.toolUseId);
|
|
28621
28627
|
if (!toolInfo) return;
|
|
28622
28628
|
const isError = status === "failed";
|
|
@@ -28627,6 +28633,7 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
28627
28633
|
if (!message2) return;
|
|
28628
28634
|
if (message2.type === "command") {
|
|
28629
28635
|
message2.output = resultContent;
|
|
28636
|
+
message2.outputOmitted = outputOmitted;
|
|
28630
28637
|
message2.status = status;
|
|
28631
28638
|
message2.exitCode = result.exitCode ?? (isError ? 1 : 0);
|
|
28632
28639
|
} else if (message2.type === "patch") {
|
|
@@ -28635,13 +28642,15 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
28635
28642
|
message2.status = status;
|
|
28636
28643
|
} else if (message2.type === "tool_call") {
|
|
28637
28644
|
message2.output = resultContent;
|
|
28645
|
+
message2.outputOmitted = outputOmitted;
|
|
28638
28646
|
message2.status = status;
|
|
28639
28647
|
} else if (message2.type === "skill" && isError && message2.path) {
|
|
28640
|
-
messages[toolInfo.messageIndex] = { id: message2.id, type: "tool_call", server: "claude", tool: toolInfo.toolName, input: toolInfo.input, output: resultContent, status, timestamp: message2.timestamp };
|
|
28648
|
+
messages[toolInfo.messageIndex] = { id: message2.id, type: "tool_call", server: "claude", tool: toolInfo.toolName, input: toolInfo.input, output: resultContent, outputOmitted, status, timestamp: message2.timestamp };
|
|
28641
28649
|
} else if (message2.type === "skill") {
|
|
28642
28650
|
message2.status = status;
|
|
28643
28651
|
} else if (message2.type === "subagent") {
|
|
28644
28652
|
message2.output = resultContent;
|
|
28653
|
+
message2.outputOmitted = outputOmitted;
|
|
28645
28654
|
message2.status = status;
|
|
28646
28655
|
}
|
|
28647
28656
|
});
|
|
@@ -29085,7 +29094,7 @@ var headlessAgentRequestSchema = external_exports.object({
|
|
|
29085
29094
|
});
|
|
29086
29095
|
|
|
29087
29096
|
// ../shared/src/cli-version.ts
|
|
29088
|
-
var CLI_VERSION = "0.3.
|
|
29097
|
+
var CLI_VERSION = "0.3.167";
|
|
29089
29098
|
|
|
29090
29099
|
// ../shared/src/version.ts
|
|
29091
29100
|
function compareVersions(v1, v2) {
|
|
@@ -29630,6 +29639,14 @@ var workspaceChangedEventSchema = external_exports.discriminatedUnion("type", [
|
|
|
29630
29639
|
chatId: external_exports.string(),
|
|
29631
29640
|
ts: external_exports.string()
|
|
29632
29641
|
}),
|
|
29642
|
+
external_exports.object({
|
|
29643
|
+
type: external_exports.literal("workspace.chat.advanced"),
|
|
29644
|
+
workspaceId: external_exports.string(),
|
|
29645
|
+
chatId: external_exports.string(),
|
|
29646
|
+
afterCursor: external_exports.string().optional(),
|
|
29647
|
+
processing: external_exports.boolean(),
|
|
29648
|
+
ts: external_exports.string()
|
|
29649
|
+
}),
|
|
29633
29650
|
external_exports.object({ type: external_exports.literal("presence.changed"), ts: external_exports.string() }),
|
|
29634
29651
|
external_exports.object({
|
|
29635
29652
|
type: external_exports.literal("mobile-testing.changed"),
|