replicas-cli 0.3.684 → 0.3.685

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.
Files changed (2) hide show
  1. package/dist/index.cjs +21 -5
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -41062,15 +41062,30 @@ function toolCallMessage(id, name, args, timestamp2, result) {
41062
41062
  if (name === "web_search" && typeof args.query === "string") {
41063
41063
  return { id, type: "web_search", query: args.query, status, timestamp: timestamp2 };
41064
41064
  }
41065
- if (name === "spawn_agent") {
41066
- const spawned = result?.output ? (() => {
41065
+ if (name === "spawn_agent" || name === "delegate" || name === "look") {
41066
+ const fusion = name !== "spawn_agent";
41067
+ const reply = fusion ? result?.details : result?.output ? (() => {
41067
41068
  try {
41068
41069
  return JSON.parse(result.output);
41069
41070
  } catch {
41070
41071
  return null;
41071
41072
  }
41072
41073
  })() : null;
41073
- return { id, type: "subagent", toolUseId: id, description: typeof args.title === "string" ? args.title : "Replicas subagent", prompt: typeof args.prompt === "string" ? args.prompt : "", subagentType: "replicas", model: isRecord(spawned) && typeof spawned.model === "string" ? spawned.model : typeof args.model === "string" ? args.model : void 0, receiverThreadIds: isRecord(spawned) && typeof spawned.agentId === "string" ? [spawned.agentId] : void 0, status: result?.isError ? "failed" : "in_progress", nestedEvents: [], timestamp: timestamp2 };
41074
+ const worker = isRecord(reply) ? reply : void 0;
41075
+ return {
41076
+ id,
41077
+ type: "subagent",
41078
+ toolUseId: id,
41079
+ description: typeof args.title === "string" ? args.title : typeof args.question === "string" ? args.question : fusion ? "Replicas worker" : "Replicas subagent",
41080
+ prompt: typeof args.prompt === "string" ? args.prompt : typeof args.brief === "string" ? args.brief : typeof args.question === "string" ? args.question : "",
41081
+ subagentType: "replicas",
41082
+ model: typeof worker?.model === "string" ? worker.model : typeof args.model === "string" ? args.model : void 0,
41083
+ receiverThreadIds: typeof worker?.agentId === "string" ? [worker.agentId] : void 0,
41084
+ status: !fusion ? result?.isError ? "failed" : "in_progress" : !result ? "in_progress" : result.isError ? "failed" : "completed",
41085
+ ...fusion && result?.output ? { output: result.output } : {},
41086
+ nestedEvents: [],
41087
+ timestamp: timestamp2
41088
+ };
41074
41089
  }
41075
41090
  return createCallDisplayMessage({ id, server: "replicas", tool: name, input: args, output: result?.output, status, timestamp: timestamp2 });
41076
41091
  }
@@ -41162,7 +41177,8 @@ function parseReplicasEvents(events) {
41162
41177
  upsertDisplayMessage(messages, toolCallMessage(`replicas-tool-${message2.toolCallId}`, call.name, call.args, call.timestamp, {
41163
41178
  output: extractToolResultText(message2.content) || void 0,
41164
41179
  isError: message2.isError === true,
41165
- exitCode
41180
+ exitCode,
41181
+ ...isRecord(message2.details) ? { details: message2.details } : {}
41166
41182
  }));
41167
41183
  return;
41168
41184
  }
@@ -43561,7 +43577,7 @@ var CLI_VERSION;
43561
43577
  var init_cli_version = __esm({
43562
43578
  "../shared/src/cli-version.ts"() {
43563
43579
  "use strict";
43564
- CLI_VERSION = "0.3.684";
43580
+ CLI_VERSION = "0.3.685";
43565
43581
  }
43566
43582
  });
43567
43583
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.3.684",
3
+ "version": "0.3.685",
4
4
  "description": "CLI for managing Replicas workspaces - SSH into cloud dev environments with automatic port forwarding",
5
5
  "main": "dist/index.cjs",
6
6
  "bin": {