replicas-cli 0.3.331 → 0.3.332

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 +12 -2
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -21616,6 +21616,15 @@ var init_mcp = __esm({
21616
21616
  });
21617
21617
 
21618
21618
  // ../shared/src/display-message/subagent-tools.ts
21619
+ function subagentReport(output2) {
21620
+ if (output2.startsWith("Async agent launched successfully.")) return "";
21621
+ const trailer = output2.lastIndexOf("\nagentId: ");
21622
+ const lines = (trailer === -1 ? output2 : output2.slice(0, trailer)).replace(/<usage>[\s\S]*?<\/usage>/g, "").split("\n");
21623
+ const header = lines.findIndex((line) => line.startsWith("[Subagent hand-back] "));
21624
+ if (header === -1) return lines.join("\n").trim();
21625
+ const dedent = (part) => part.map((line) => line.replace(/^ {2}/, "")).join("\n").trim();
21626
+ return [dedent(lines.slice(0, header)), dedent(lines.slice(header + 1))].filter(Boolean).join("\n\n");
21627
+ }
21619
21628
  var init_subagent_tools = __esm({
21620
21629
  "../shared/src/display-message/subagent-tools.ts"() {
21621
21630
  "use strict";
@@ -31264,7 +31273,7 @@ function parseClaudeEvents(events, parentToolUseId) {
31264
31273
  } else if (message2.type === "skill") {
31265
31274
  message2.status = status;
31266
31275
  } else if (message2.type === "subagent") {
31267
- message2.output = resultContent;
31276
+ message2.output = subagentReport(resultContent);
31268
31277
  message2.outputOmitted = outputOmitted;
31269
31278
  message2.status = status;
31270
31279
  }
@@ -31303,6 +31312,7 @@ var init_claude_parser = __esm({
31303
31312
  init_format2();
31304
31313
  init_constants();
31305
31314
  init_type_guards();
31315
+ init_subagent_tools();
31306
31316
  ABORTED_TERMINAL_REASONS = /* @__PURE__ */ new Set(["aborted_streaming", "aborted_tools"]);
31307
31317
  COMMAND_TOOL_NAMES = /* @__PURE__ */ new Set(["Bash", "bash", "shell"]);
31308
31318
  FILE_TOOL_NAMES = /* @__PURE__ */ new Set(["Write", "Edit"]);
@@ -32112,7 +32122,7 @@ var CLI_VERSION;
32112
32122
  var init_cli_version = __esm({
32113
32123
  "../shared/src/cli-version.ts"() {
32114
32124
  "use strict";
32115
- CLI_VERSION = "0.3.331";
32125
+ CLI_VERSION = "0.3.332";
32116
32126
  }
32117
32127
  });
32118
32128
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.3.331",
3
+ "version": "0.3.332",
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": {