replicas-cli 0.2.390 → 0.2.392
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 +92 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -22399,6 +22399,7 @@ var MODEL_LABELS = {
|
|
|
22399
22399
|
"grok-4.3": "Grok 4.3",
|
|
22400
22400
|
"kimi-k2.5": "Kimi K2.5"
|
|
22401
22401
|
};
|
|
22402
|
+
var IMAGE_MEDIA_TYPES = ["image/png", "image/jpeg", "image/gif", "image/webp"];
|
|
22402
22403
|
var MAX_CANVAS_FILE_BYTES = 5 * 1024 * 1024;
|
|
22403
22404
|
var CANVAS_KIND_BY_EXTENSION = {
|
|
22404
22405
|
".md": { kind: "markdown", mimeType: "text/markdown; charset=utf-8" },
|
|
@@ -24378,7 +24379,7 @@ var HOOK_EXEC_MAX_BUFFER_BYTES = 10 * 1024 * 1024;
|
|
|
24378
24379
|
var REPLICAS_CONFIG_FILENAMES = ["replicas.json", "replicas.yaml", "replicas.yml"];
|
|
24379
24380
|
|
|
24380
24381
|
// ../shared/src/cli-version.ts
|
|
24381
|
-
var CLI_VERSION = "0.2.
|
|
24382
|
+
var CLI_VERSION = "0.2.392";
|
|
24382
24383
|
|
|
24383
24384
|
// ../shared/src/version.ts
|
|
24384
24385
|
function compareVersions(v1, v2) {
|
|
@@ -24413,6 +24414,44 @@ var createChatRequestSchema = external_exports.object({
|
|
|
24413
24414
|
parentChatId: external_exports.string().uuid().optional(),
|
|
24414
24415
|
clientRequestId: external_exports.string().min(1).max(128).optional()
|
|
24415
24416
|
});
|
|
24417
|
+
var sendChatMessageRequestSchema = external_exports.object({
|
|
24418
|
+
messageId: external_exports.string().optional(),
|
|
24419
|
+
submittedAt: external_exports.string().optional(),
|
|
24420
|
+
message: external_exports.string(),
|
|
24421
|
+
model: external_exports.string().optional(),
|
|
24422
|
+
customInstructions: external_exports.string().optional(),
|
|
24423
|
+
planMode: external_exports.boolean().optional(),
|
|
24424
|
+
images: external_exports.array(external_exports.object({
|
|
24425
|
+
type: external_exports.literal("image"),
|
|
24426
|
+
source: external_exports.discriminatedUnion("type", [
|
|
24427
|
+
external_exports.object({ type: external_exports.literal("base64"), media_type: external_exports.enum(IMAGE_MEDIA_TYPES), data: external_exports.string() }),
|
|
24428
|
+
external_exports.object({ type: external_exports.literal("url"), url: external_exports.string() })
|
|
24429
|
+
])
|
|
24430
|
+
})).optional(),
|
|
24431
|
+
thinkingLevel: external_exports.enum(VALID_THINKING_LEVELS).optional(),
|
|
24432
|
+
goalMode: external_exports.boolean().optional(),
|
|
24433
|
+
fastMode: external_exports.boolean().optional(),
|
|
24434
|
+
enableInteractiveTools: external_exports.boolean().optional(),
|
|
24435
|
+
type: external_exports.string().optional(),
|
|
24436
|
+
merge: external_exports.boolean().optional(),
|
|
24437
|
+
idempotencyKey: external_exports.string().optional(),
|
|
24438
|
+
senderUserId: external_exports.string().optional(),
|
|
24439
|
+
senderEmail: external_exports.string().optional(),
|
|
24440
|
+
senderDisplayName: external_exports.string().optional(),
|
|
24441
|
+
senderAvatarUrl: external_exports.string().optional(),
|
|
24442
|
+
errorNotificationTarget: external_exports.discriminatedUnion("type", [
|
|
24443
|
+
external_exports.object({ type: external_exports.literal("slack") }),
|
|
24444
|
+
external_exports.object({ type: external_exports.literal("linear"), sessionId: external_exports.string() }),
|
|
24445
|
+
external_exports.object({
|
|
24446
|
+
type: external_exports.literal("code_host"),
|
|
24447
|
+
provider: external_exports.enum(["github", "gitlab"]),
|
|
24448
|
+
resource: external_exports.enum(["issue", "pull_request"]),
|
|
24449
|
+
repositoryId: external_exports.string(),
|
|
24450
|
+
resourceNumber: external_exports.number()
|
|
24451
|
+
}),
|
|
24452
|
+
external_exports.object({ type: external_exports.literal("automation"), executionId: external_exports.string() })
|
|
24453
|
+
]).optional()
|
|
24454
|
+
}).passthrough();
|
|
24416
24455
|
function normalizeCodexAspTranscriptStatus(status, failed = false) {
|
|
24417
24456
|
if (failed || status === "failed" || status === "declined") return "failed";
|
|
24418
24457
|
if (status === "completed") return "completed";
|
|
@@ -24466,6 +24505,17 @@ var DEFAULT_WORKSPACE_FILTERS = {
|
|
|
24466
24505
|
};
|
|
24467
24506
|
var ONE_DAY_MS = 24 * 60 * 60 * 1e3;
|
|
24468
24507
|
|
|
24508
|
+
// ../shared/src/routes/workspace-events.ts
|
|
24509
|
+
var workspaceChangedEventSchema = external_exports.discriminatedUnion("type", [
|
|
24510
|
+
external_exports.object({ type: external_exports.literal("workspace.changed"), workspaceId: external_exports.string(), ts: external_exports.string() }),
|
|
24511
|
+
external_exports.object({
|
|
24512
|
+
type: external_exports.literal("workspace.chat.changed"),
|
|
24513
|
+
workspaceId: external_exports.string(),
|
|
24514
|
+
chatId: external_exports.string(),
|
|
24515
|
+
ts: external_exports.string()
|
|
24516
|
+
})
|
|
24517
|
+
]);
|
|
24518
|
+
|
|
24469
24519
|
// ../shared/src/audit-log.ts
|
|
24470
24520
|
var AUDIT_LOG_ACTION = {
|
|
24471
24521
|
CREATE: "create",
|
|
@@ -25745,6 +25795,19 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
25745
25795
|
isChatBased: true,
|
|
25746
25796
|
timestamp: event.timestamp
|
|
25747
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
|
+
});
|
|
25748
25811
|
} else if (toolName === "mcp__relay-subagent-tools__delete_agent") {
|
|
25749
25812
|
const inputObj = typeof toolInput === "string" ? safeJsonParse(toolInput, {}) : toolInput;
|
|
25750
25813
|
const mcp = parseMcpToolName(toolName);
|
|
@@ -25888,10 +25951,21 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
25888
25951
|
message.chatId = parsed.chatId;
|
|
25889
25952
|
}
|
|
25890
25953
|
}
|
|
25954
|
+
} else if (message.type === "subagent_followup") {
|
|
25955
|
+
message.output = resultContent;
|
|
25956
|
+
message.status = status;
|
|
25891
25957
|
}
|
|
25892
25958
|
}
|
|
25893
25959
|
}
|
|
25894
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
|
+
}
|
|
25895
25969
|
const staleIndexes = /* @__PURE__ */ new Set();
|
|
25896
25970
|
for (const streamId of [...completedStreamIds, ...supersededStreamIds]) {
|
|
25897
25971
|
const refs = partialIndexes.get(streamId);
|
|
@@ -28129,6 +28203,14 @@ function formatDisplayMessage(message) {
|
|
|
28129
28203
|
console.log(chalk15.gray(` ${truncate(message.output, 200)}`));
|
|
28130
28204
|
}
|
|
28131
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;
|
|
28132
28214
|
case "error":
|
|
28133
28215
|
console.log(chalk15.red(`
|
|
28134
28216
|
[${time3}] ERROR:`));
|
|
@@ -34543,6 +34625,15 @@ function ChatMessage({ message, provider }) {
|
|
|
34543
34625
|
}
|
|
34544
34626
|
case "subagent":
|
|
34545
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
|
+
);
|
|
34546
34637
|
case "error":
|
|
34547
34638
|
return /* @__PURE__ */ jsx6("box", { paddingX: 1, children: /* @__PURE__ */ jsx6("text", { fg: "#ff4444", selectable: true, children: message.message }) });
|
|
34548
34639
|
case "skill":
|