replicas-cli 0.3.310 → 0.3.312

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 +63 -13
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -16172,13 +16172,35 @@ var init_chat_kind = __esm({
16172
16172
  });
16173
16173
 
16174
16174
  // ../shared/src/routes/reviews.ts
16175
- var text, optionalText, pullRequestTourSchema;
16175
+ var PULL_REQUEST_COMMENT_DESTINATIONS, diffSideSchema, createPullRequestCommentRequestSchema, PULL_REQUEST_REVIEW_EVENTS, submitPullRequestReviewRequestSchema, text, optionalText, pullRequestTourSchema;
16176
16176
  var init_reviews = __esm({
16177
16177
  "../shared/src/routes/reviews.ts"() {
16178
16178
  "use strict";
16179
16179
  init_zod();
16180
16180
  init_chat_kind();
16181
16181
  init_urls();
16182
+ PULL_REQUEST_COMMENT_DESTINATIONS = ["comment", "review", "agent"];
16183
+ diffSideSchema = external_exports.enum(["additions", "deletions"]);
16184
+ createPullRequestCommentRequestSchema = external_exports.object({
16185
+ body: external_exports.string().trim().min(1).max(65536),
16186
+ destination: external_exports.enum(PULL_REQUEST_COMMENT_DESTINATIONS),
16187
+ quote: external_exports.string().optional(),
16188
+ target: external_exports.union([
16189
+ external_exports.object({
16190
+ path: external_exports.string().min(1),
16191
+ line: external_exports.number().int().positive(),
16192
+ side: diffSideSchema,
16193
+ startLine: external_exports.number().int().positive().optional(),
16194
+ startSide: diffSideSchema.optional()
16195
+ }),
16196
+ external_exports.object({ replyTo: external_exports.string().min(1) })
16197
+ ])
16198
+ });
16199
+ PULL_REQUEST_REVIEW_EVENTS = ["comment", "approve", "request_changes"];
16200
+ submitPullRequestReviewRequestSchema = external_exports.object({
16201
+ event: external_exports.enum(PULL_REQUEST_REVIEW_EVENTS),
16202
+ body: external_exports.string().trim().max(65536).default("")
16203
+ });
16182
16204
  text = external_exports.string().trim().catch("");
16183
16205
  optionalText = external_exports.string().trim().min(1).optional().catch(void 0);
16184
16206
  pullRequestTourSchema = external_exports.object({
@@ -17022,8 +17044,14 @@ var init_design_tokens = __esm({
17022
17044
  destructive: "#ef4444",
17023
17045
  destructiveText: "#ff6f63",
17024
17046
  destructiveForeground: "#ffffff",
17047
+ destructiveSoft: "#dc262636",
17025
17048
  warning: "#f59e0b",
17026
17049
  warningText: "#facc15",
17050
+ warningSoft: "#facc151a",
17051
+ working: "#0ea5e9",
17052
+ workingText: "#7dd3fc",
17053
+ workingForeground: "#111111",
17054
+ workingSoft: "#7dd3fc1a",
17027
17055
  ...plain
17028
17056
  };
17029
17057
  DESIGN_COLORS = {
@@ -17046,8 +17074,14 @@ var init_design_tokens = __esm({
17046
17074
  destructive: "#dc2626",
17047
17075
  destructiveText: "#b2000f",
17048
17076
  destructiveForeground: "#ffffff",
17077
+ destructiveSoft: "#dc262614",
17049
17078
  warning: "#92400e",
17050
17079
  warningText: "#825100",
17080
+ warningSoft: "#facc1540",
17081
+ working: "#0369a1",
17082
+ workingText: "#075985",
17083
+ workingForeground: "#ffffff",
17084
+ workingSoft: "#0284c71a",
17051
17085
  ...plain
17052
17086
  }
17053
17087
  };
@@ -20748,7 +20782,7 @@ function removeTag(text4, tag) {
20748
20782
  function stripReplicasInstructionBlock(text4) {
20749
20783
  return removeTag(text4, REPLICAS_INSTRUCTIONS_TAG);
20750
20784
  }
20751
- var REPLICAS_INSTRUCTIONS_TAG, MOTHERSHIP_INSTRUCTIONS_TAG, BOARD_RULES, MOTHERSHIP_INSTRUCTIONS_BLOCK, T, SCOUT_LINEAR_RULES, SCOUT_MUTED_RULES, SCOUT_PRIOR_UNTAGGED_RULES, SCOUT_JOINED_RULES, SCOUT_REACTION_RULES;
20785
+ var REPLICAS_INSTRUCTIONS_TAG, MOTHERSHIP_INSTRUCTIONS_TAG, BOARD_ANSWER_NOTE, BOARD_RULES, MOTHERSHIP_INSTRUCTIONS_BLOCK, T, SCOUT_LINEAR_RULES, SCOUT_MUTED_RULES, SCOUT_PRIOR_UNTAGGED_RULES, SCOUT_JOINED_RULES, SCOUT_REACTION_RULES;
20752
20786
  var init_prompts = __esm({
20753
20787
  "../shared/src/prompts.ts"() {
20754
20788
  "use strict";
@@ -20765,9 +20799,10 @@ var init_prompts = __esm({
20765
20799
  init_slack_response_style();
20766
20800
  REPLICAS_INSTRUCTIONS_TAG = "replicas_instructions";
20767
20801
  MOTHERSHIP_INSTRUCTIONS_TAG = "multitask_instructions";
20802
+ BOARD_ANSWER_NOTE = "The user answered on the board.";
20768
20803
  BOARD_RULES = `- The board, a live status page you keep with \`${REPLICAS_MCP_TOOLS.updateBoard}\` in the Ships pane beside this chat, is the user's one view of the work: keep it covering every ship, pull request, deploy, blocker and ask. Show ships, pull requests and Linear tickets as ship, pr and linear blocks, which stay current on their own, instead of describing their status. Start with sections Needs you, Ready to review, Working, Shipping and Done, and add blocks and buttons whenever they help the user act.
20769
20804
  - A ship with open pull requests is not done when it sends \`finished\`: Replicas fixes their CI failures and review comments automatically, then sends \`ready\` or \`needs_attention\`. On \`needs_attention\`, direct the ship, or put the decision to the user if it needs one.
20770
- - On every ship event, update the board, act with tools if other work waits on it, such as starting the next task once a pull request merges, and end your turn with no text at all. Never write an acknowledgement such as "Noted.", even if earlier turns did.
20805
+ - On every ship event and every answer the user gives on the board (marked "${BOARD_ANSWER_NOTE}"), act with tools on the answer or on any work the event unblocks, such as starting the next task once a pull request merges, update the board, and end your turn with no text at all. Never write an acknowledgement such as "Noted.", even if earlier turns did.
20771
20806
  - The chat is like texting an assistant: the user sees only your last message of each turn, never your tool calls or earlier text. Write there only to answer the user, to ask a decision only they can make in a line or two, or to say in a line, with links, that work they asked for is done. Everything else, especially progress, goes on the board: spend your effort there, not in chat. Put each decision on the board too, as a choice when it has clear options, and ask it in chat once. Never restate the board in chat: no status tables, per-ship lists or summaries of what ships did.
20772
20807
  - When the user picks a choice or clicks a button that messages or merges, Replicas removes that item from the board for you. Add it back, or a new item, only if the user is still needed.
20773
20808
  `;
@@ -20797,10 +20832,12 @@ function parseMessageOrigin(raw) {
20797
20832
  }
20798
20833
  if (typeof name === "string") return { kind: "workspace", id: workspace[2], name, body: stripReplicasInstructionBlock(raw.slice(workspace[0].length)) };
20799
20834
  }
20835
+ const board = raw.match(BOARD_ANSWER);
20836
+ if (board) return { kind: "board", body: stripReplicasInstructionBlock(raw.slice(board[0].length)) };
20800
20837
  const automation2 = raw.match(SCHEDULED_FOLLOW_UP);
20801
20838
  return automation2 ? { kind: "automation", id: automation2[2], name: automation2[1].trim(), body: stripReplicasInstructionBlock(raw.slice(automation2[0].length)) } : null;
20802
20839
  }
20803
- var UUID, WORKSPACE_SENDER, SCHEDULED_NOTE, SCHEDULED_FOLLOW_UP;
20840
+ var UUID, WORKSPACE_SENDER, BOARD_ANSWER, SCHEDULED_NOTE, SCHEDULED_FOLLOW_UP;
20804
20841
  var init_message_origin = __esm({
20805
20842
  "../shared/src/message-origin.ts"() {
20806
20843
  "use strict";
@@ -20808,6 +20845,7 @@ var init_message_origin = __esm({
20808
20845
  init_uuid();
20809
20846
  UUID = UUID_RE.source.slice(1, -1);
20810
20847
  WORKSPACE_SENDER = new RegExp(String.raw`^\s*<${REPLICAS_INSTRUCTIONS_TAG}>\nFrom the workspace ("(?:[^"\\\n]|\\.)*") \((${UUID})\)\.\n</${REPLICAS_INSTRUCTIONS_TAG}>`);
20848
+ BOARD_ANSWER = new RegExp(String.raw`^\s*(?:<${REPLICAS_INSTRUCTIONS_TAG}>\nFrom [^\n]*\n</${REPLICAS_INSTRUCTIONS_TAG}>\s*)?<${REPLICAS_INSTRUCTIONS_TAG}>\n${BOARD_ANSWER_NOTE.replace(/\./g, "\\.")}\n</${REPLICAS_INSTRUCTIONS_TAG}>`);
20811
20849
  SCHEDULED_NOTE = "This is a message you or a teammate scheduled earlier, delivered into this workspace.";
20812
20850
  SCHEDULED_FOLLOW_UP = new RegExp(String.raw`^\s*\*\*Scheduled follow-up: ([^\n]+)\*\*\n\nThe automation "[^\n]*" \((${UUID})\) fired at \S+\. ${SCHEDULED_NOTE.replace(/\./g, "\\.")}`);
20813
20851
  }
@@ -28939,6 +28977,23 @@ var init_learned_skills = __esm({
28939
28977
  }
28940
28978
  });
28941
28979
 
28980
+ // ../shared/src/terminal.ts
28981
+ var init_terminal = __esm({
28982
+ "../shared/src/terminal.ts"() {
28983
+ "use strict";
28984
+ }
28985
+ });
28986
+
28987
+ // ../shared/src/workspace-target.ts
28988
+ var init_workspace_target = __esm({
28989
+ "../shared/src/workspace-target.ts"() {
28990
+ "use strict";
28991
+ init_urls();
28992
+ init_terminal();
28993
+ init_uuid();
28994
+ }
28995
+ });
28996
+
28942
28997
  // ../shared/src/user-message-matching.ts
28943
28998
  function parseTimestampMs(timestamp) {
28944
28999
  if (typeof timestamp === "number") return Number.isFinite(timestamp) ? timestamp : 0;
@@ -28986,6 +29041,7 @@ var init_steps = __esm({
28986
29041
  init_replicas_mcp();
28987
29042
  init_type_guards();
28988
29043
  init_uuid();
29044
+ init_workspace_target();
28989
29045
  init_shell_commands();
28990
29046
  init_subagent_mcp();
28991
29047
  init_format2();
@@ -31865,13 +31921,6 @@ var init_organizations = __esm({
31865
31921
  }
31866
31922
  });
31867
31923
 
31868
- // ../shared/src/terminal.ts
31869
- var init_terminal = __esm({
31870
- "../shared/src/terminal.ts"() {
31871
- "use strict";
31872
- }
31873
- });
31874
-
31875
31924
  // ../shared/src/headless-agent.ts
31876
31925
  var headlessAgentRequestSchema;
31877
31926
  var init_headless_agent = __esm({
@@ -31929,7 +31978,7 @@ var CLI_VERSION;
31929
31978
  var init_cli_version = __esm({
31930
31979
  "../shared/src/cli-version.ts"() {
31931
31980
  "use strict";
31932
- CLI_VERSION = "0.3.310";
31981
+ CLI_VERSION = "0.3.312";
31933
31982
  }
31934
31983
  });
31935
31984
 
@@ -42558,7 +42607,7 @@ var init_mothership_board = __esm({
42558
42607
  "use strict";
42559
42608
  init_zod();
42560
42609
  init_urls();
42561
- MOTHERSHIP_BOARD_TONES = ["neutral", "needs_you", "warning", "success", "danger"];
42610
+ MOTHERSHIP_BOARD_TONES = ["neutral", "needs_you", "warning", "success", "danger", "working"];
42562
42611
  label = (max) => external_exports.string().trim().min(1).max(max);
42563
42612
  tone = external_exports.enum(MOTHERSHIP_BOARD_TONES);
42564
42613
  blockId = external_exports.string().regex(/^[\w.:-]{1,64}$/, "Use 1-64 letters, digits, _, -, . or :");
@@ -42850,6 +42899,7 @@ var init_src = __esm({
42850
42899
  init_api_casing();
42851
42900
  init_websocket_liveness();
42852
42901
  init_mothership_board();
42902
+ init_workspace_target();
42853
42903
  }
42854
42904
  });
42855
42905
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.3.310",
3
+ "version": "0.3.312",
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": {