replicas-cli 0.3.348 → 0.3.349

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 +19 -8
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -23002,6 +23002,7 @@ var init_replicas_mcp = __esm({
23002
23002
  waitForSubagents: "wait_for_subagents",
23003
23003
  getBoard: "get_board",
23004
23004
  updateBoard: "update_board",
23005
+ sendToChat: "send_to_chat",
23005
23006
  getLinearRouting: "get_linear_routing",
23006
23007
  setLinearRouting: "set_linear_routing",
23007
23008
  clearLinearRouting: "clear_linear_routing",
@@ -26185,7 +26186,7 @@ function removeTag(text4, tag) {
26185
26186
  function stripReplicasInstructionBlock(text4) {
26186
26187
  return removeTag(text4, REPLICAS_INSTRUCTIONS_TAG);
26187
26188
  }
26188
- 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;
26189
+ var REPLICAS_INSTRUCTIONS_TAG, MOTHERSHIP_INSTRUCTIONS_TAG, MOTHERSHIP_EVENT_CHAT_NOTE, 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;
26189
26190
  var init_prompts = __esm({
26190
26191
  "../shared/src/prompts.ts"() {
26191
26192
  "use strict";
@@ -26202,6 +26203,7 @@ var init_prompts = __esm({
26202
26203
  init_slack_response_style();
26203
26204
  REPLICAS_INSTRUCTIONS_TAG = "replicas_instructions";
26204
26205
  MOTHERSHIP_INSTRUCTIONS_TAG = "multitask_instructions";
26206
+ MOTHERSHIP_EVENT_CHAT_NOTE = `The user doesn't see text you write in this turn. If it brings something they asked for, or a blocker that needs them, send it with ${REPLICAS_MCP_TOOLS.sendToChat}; otherwise update the board and end with a one-line note.`;
26205
26207
  BOARD_ANSWER_NOTE = "The user answered on the board.";
26206
26208
  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 and blocker. Show ships, pull requests and Linear tickets as ship, pr and linear blocks, which stay current on their own, instead of describing their status. Keep exactly these sections, always in this order, leaving out any that are empty; when you add one, give it the position that keeps this order:
26207
26209
  - Questions (needs_you): only decisions you truly can't make, and blocked ships. Give each your recommendation and a choice. Make routine calls yourself, such as retries, small scope choices or test cleanup, and note them on the ship's row instead of asking.
@@ -26211,8 +26213,8 @@ var init_prompts = __esm({
26211
26213
  - On every \`finished\` and \`archived\` event, move that ship's rows out of Working, or remove them, so Working only lists ships that are working.
26212
26214
  - 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 add it to Questions only if you can't decide.
26213
26215
  - When a pull request should merge once it's approved and CI passes, call \`${REPLICAS_MCP_TOOLS.mergeWhenReady}\`: Replicas merges it and sends \`merged\`, or \`needs_attention\` saying why it can't. Never watch CI or pull requests with \`gh\`, sleep loops or wait scripts, and merge one yourself only when the user wants it merged right away.
26214
- - 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, and update the board. Then write in chat only if the turn delivers something the user asked for, such as the answer, result, media or links, or needs their attention; otherwise end your turn with no text at all. Saying what you put on the board, or that you archived or messaged a ship, delivers nothing. Never write an acknowledgement such as "Noted.", even if earlier turns did.
26215
- - The chat is like texting an assistant: the user sees only your final reply of each turn, never your tool calls or earlier text, so put everything they should see in it. Write in a line or two with links, and include any media inline. Anything that needs the user later goes on the board. Never restate the board in chat: no status tables, per-ship lists or summaries of what ships did.
26216
+ - 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, and update the board. The user sees nothing you write in these turns: the only way to reach them is \`${REPLICAS_MCP_TOOLS.sendToChat}\`. Call it only for what they would want right now: a deliverable they asked for, with its media, links or answer (the finished video, the requested numbers); a failure or blocker that needs them, also on the board; or a request of theirs being done. Never for status, such as "PR #12 merged", "deploying", "it's on the board" or "I asked the ship to\u2026": the board and the chat's own rows show those. End the turn with a one-line note of what you did; only the activity log shows it.
26217
+ - The chat is like texting an assistant: the user sees only your final reply to each message they type, plus what you send with \`${REPLICAS_MCP_TOOLS.sendToChat}\`, never your tool calls or earlier text. Write in a line or two with links, and include any media inline. Anything that needs the user later goes on the board. Never restate the board in chat: no status tables, per-ship lists or summaries of what ships did.
26216
26218
  - 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.
26217
26219
  `;
26218
26220
  MOTHERSHIP_INSTRUCTIONS_BLOCK = new RegExp(`\\s*<${MOTHERSHIP_INSTRUCTIONS_TAG}>\\n([\\s\\S]*?)\\n</${MOTHERSHIP_INSTRUCTIONS_TAG}>`);
@@ -34631,6 +34633,7 @@ var init_steps = __esm({
34631
34633
  [REPLICAS_MCP_TOOLS.clearLinearRouting]: { icon: "trash", live: "Clearing Linear routing", done: "Cleared Linear routing" },
34632
34634
  [REPLICAS_MCP_TOOLS.getBoard]: { icon: "book", live: "Reading board", done: "Read board" },
34633
34635
  [REPLICAS_MCP_TOOLS.updateBoard]: { icon: "file-pen", live: "Updating board", done: "Updated board" },
34636
+ [REPLICAS_MCP_TOOLS.sendToChat]: { icon: "message", live: "Sending to chat", done: "Sent to chat" },
34634
34637
  [REPLICAS_MCP_TOOLS.mergeWhenReady]: { icon: "target", live: "Setting merge when ready", done: "Set merge when ready" }
34635
34638
  };
34636
34639
  }
@@ -37526,7 +37529,7 @@ var CLI_VERSION;
37526
37529
  var init_cli_version = __esm({
37527
37530
  "../shared/src/cli-version.ts"() {
37528
37531
  "use strict";
37529
- CLI_VERSION = "0.3.347";
37532
+ CLI_VERSION = "0.3.349";
37530
37533
  }
37531
37534
  });
37532
37535
 
@@ -50748,7 +50751,7 @@ async function resolveEnvironmentId(input2) {
50748
50751
  }
50749
50752
  return resolved.id;
50750
50753
  }
50751
- function printEnvironment(env) {
50754
+ function printEnvironment(env, repoSkillCount) {
50752
50755
  console.log(import_chalk20.default.white(` ${env.name}${env.user_id ? import_chalk20.default.gray(" (personal)") : ""}`));
50753
50756
  console.log(import_chalk20.default.gray(` ID: ${env.id}`));
50754
50757
  if (env.description) {
@@ -50759,7 +50762,10 @@ function printEnvironment(env) {
50759
50762
  console.log(import_chalk20.default.gray(` Repositories: ${repositoryIds.join(", ")}`));
50760
50763
  }
50761
50764
  if (env.variable_count !== void 0) {
50762
- console.log(import_chalk20.default.gray(` Variables: ${env.variable_count}, Files: ${env.file_count ?? 0}, Skills: ${env.skill_count ?? 0}, MCPs: ${env.mcp_count ?? 0}`));
50765
+ console.log(import_chalk20.default.gray(` Variables: ${env.variable_count}, Files: ${env.file_count ?? 0}, Added skills: ${env.skill_count ?? 0}, MCPs: ${env.mcp_count ?? 0}`));
50766
+ }
50767
+ if (repoSkillCount !== void 0) {
50768
+ console.log(import_chalk20.default.gray(` Repository skills: ${repoSkillCount}`));
50763
50769
  }
50764
50770
  console.log(import_chalk20.default.gray(` Updated: ${formatDate(env.updated_at)}`));
50765
50771
  console.log();
@@ -50782,11 +50788,16 @@ async function environmentGetCommand(idOrName) {
50782
50788
  ensureOrgApiAuthenticated();
50783
50789
  const id = await resolveEnvironmentId(idOrName);
50784
50790
  const response = await orgAuthenticatedFetch(`/v1/environments/${id}`);
50785
- output2(response, ({ environment: environment2 }) => {
50791
+ const repoSkills = await orgAuthenticatedFetch(`/v1/environments/${response.environment.id}/repo-skills`);
50792
+ output2({ ...response, ...repoSkills }, ({ environment: environment2 }) => {
50786
50793
  console.log(import_chalk20.default.green(`
50787
50794
  Environment: ${environment2.name}
50788
50795
  `));
50789
- printEnvironment(environment2);
50796
+ const linkedSkills = repoSkills.repo_skills.filter((skill) => skill.path.startsWith(`.${skill.framework}/skills/`));
50797
+ printEnvironment(environment2, new Set(linkedSkills.map((skill) => `${skill.repository_id}:${skill.path.split("/")[2]}`)).size);
50798
+ for (const message2 of [repoSkills.error, ...repoSkills.repo_errors.map((repo) => `${repo.repository_full_name}: ${repo.error}`)]) {
50799
+ if (message2) console.log(import_chalk20.default.yellow(` Could not read repository skills: ${message2}`));
50800
+ }
50790
50801
  });
50791
50802
  }
50792
50803
  async function environmentCreateCommand(name, options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.3.348",
3
+ "version": "0.3.349",
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": {