replicas-engine 0.1.1424 → 0.1.1426

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.
@@ -8,12 +8,12 @@ import {
8
8
  listCodexModelsForDetails,
9
9
  restartCodexAspHost,
10
10
  restartCodexAspHostIfRunning
11
- } from "./chunk-LYNDD24N.js";
12
- import "./chunk-6ZFY5RXG.js";
13
- import "./chunk-FFAQMCOD.js";
14
- import "./chunk-X3HYTO5I.js";
11
+ } from "./chunk-FDZBQL7G.js";
12
+ import "./chunk-QJ5DP5BI.js";
13
+ import "./chunk-5T3TGWH4.js";
14
+ import "./chunk-FEYJDKNU.js";
15
15
  import "./chunk-UZSNFLDQ.js";
16
- import "./chunk-WU5FQL77.js";
16
+ import "./chunk-AGADZY7X.js";
17
17
  import "./chunk-VEQXQN22.js";
18
18
  export {
19
19
  CODEX_ULTRAFAST_SERVICE_TIER,
@@ -3,10 +3,10 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  execFileAsync
6
- } from "./chunk-X3HYTO5I.js";
6
+ } from "./chunk-FEYJDKNU.js";
7
7
  import {
8
8
  isVersionBelow
9
- } from "./chunk-WU5FQL77.js";
9
+ } from "./chunk-AGADZY7X.js";
10
10
 
11
11
  // src/utils/codex-agent-env.ts
12
12
  function buildCodexAgentEnv(source = process.env) {
@@ -240,7 +240,7 @@ function getCodexModelProvider(method) {
240
240
  if (method === "foundry") return "azure";
241
241
  return method === "ollama" || method === "openai-compatible" ? "replicas_openai_compatible" : "openai";
242
242
  }
243
- var ENGINE_PACKAGE_VERSION = "0.1.1424";
243
+ var ENGINE_PACKAGE_VERSION = "0.1.1425";
244
244
  var INITIALIZE_METHOD = "initialize";
245
245
  var INITIALIZED_NOTIFICATION = "initialized";
246
246
  var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
@@ -12116,6 +12116,42 @@ var SCOUT_PRESET_ICONS = [
12116
12116
  "tag"
12117
12117
  ];
12118
12118
 
12119
+ // ../shared/src/default-skills/scout-settings.ts
12120
+ var SCOUT_SETTINGS_SKILL_NAME = "scout-settings";
12121
+ var CONTENT = `---
12122
+ name: ${SCOUT_SETTINGS_SKILL_NAME}
12123
+ description: Use when someone asks Scout to change or explain how Replicas behaves in Slack or Linear (channel levels, "be quieter", "only reply when tagged", channel or team instructions, presets, monitored Linear teams, Slack Connect defaults, Slack agent defaults, "what can I change?"), when someone is annoyed that Scout replied unasked ("not you", "nobody asked", a thumbs-down), when making or answering a settings or automation offer, or when setting up an automation. Not for routing ordinary requests.
12124
+ ---
12125
+
12126
+ # Scout settings
12127
+
12128
+ You own every Scout setting: each Slack channel's level, each channel's and Linear team's preset and instructions, the presets themselves, which Linear teams are monitored, Slack Connect defaults, the organization's level, and agent defaults for Slack tasks. Handle requests here, never by spawning a workspace.
12129
+
12130
+ ## Tools
12131
+ Read presets, channel instructions, and levels with \`${REPLICAS_MCP_TOOLS.listChannelSettings}\`. Change them with \`${REPLICAS_MCP_TOOLS.updateChannelSettings}\`, \`${REPLICAS_MCP_TOOLS.saveChannelPreset}\`, \`${REPLICAS_MCP_TOOLS.deleteChannelPreset}\`, \`${REPLICAS_MCP_TOOLS.setOrganizationProactivity}\`, \`${REPLICAS_MCP_TOOLS.setSlackConnectDefaults}\`, or \`${REPLICAS_MCP_TOOLS.setSlackAgentDefaults}\`. Every change takes \`confirmation_*\` arguments: fill them with the requesting message's envelope \`channel_id\`, \`thread_ts\`, \`message_ts\`, and \`user_id\`. The server checks that exact Slack author is an organization member (and an admin where noted). If it refuses, say why briefly and change nothing.
12132
+
12133
+ ## Changing settings
12134
+ - Settings also change outside your chat, often on purpose: read the current settings first, never trust earlier messages, and never re-apply an earlier request the current message doesn't ask for. Save only what the current message asks.
12135
+ - **Levels**, lowest to highest: \`tagged\` (only @Replicas pings reach you, not even messages naming Replicas), \`conservative\` (also messages naming Replicas or Scout, and follow-ups in threads with a workspace), \`balanced\` (the normal triage rules), \`proactive\` (also clear untagged questions and requests). People see these as Mentions only, Low, Balanced and High: use those names, never the setting values.
12136
+ - The organization has one level for its whole Slack workspace, which only an admin can set with \`${REPLICAS_MCP_TOOLS.setOrganizationProactivity}\`. A channel or group DM can override it with \`${REPLICAS_MCP_TOOLS.updateChannelSettings}\` and \`proactivity\`. 1:1 DMs are always addressed to you. Any member can lower a channel; raising one above \`tagged\` needs an admin.
12137
+ - A request that points at a channel ("here", "in #eng", "stop replying in #random") changes that channel only. One that doesn't ("only respond when I @ you", "don't auto-reply to Slack messages") means the organization level. When it names a channel, even without "#" ("make support-inbound quieter"), find it with \`conversations.list\` and change that one, not the one you were asked in; ask if none or several match. If a non-admin asks for an organization change, say an organization admin has to ask, and offer the channel-only change when they asked from a channel. Instructions don't substitute for a level.
12138
+ - **Instructions and presets:** prefer changing the channel's own instructions; edit a shared preset only when asked, since every channel using it changes. To set up a channel without being told how, read enough of it to propose short instructions or a fitting preset (customer, vendor, internal team), and save nothing until they confirm. Never infer a channel's purpose only because Slack marks it externally shared.
12139
+ - **Linear teams:** set \`monitored: true\` to start triaging a team (admin only) and \`monitored: false\` to stop. Teams take a preset or instructions like channels.
12140
+ - **Slack Connect** channels shared with another company follow the organization's shared-channel defaults (\`tagged\` with no preset unless an admin set them with \`${REPLICAS_MCP_TOOLS.setSlackConnectDefaults}\`) until they get their own settings, unless a Mothership is linked to one. A request about all shared or customer channels changes only those defaults: leave channels with their own settings as they are, list them, and offer to switch them too. Asked why you stay quiet in one, say it's external and an admin can raise its level here.
12141
+ - **Slack agent defaults:** to change the agent, model, thinking level, goal mode, or fast mode for tasks started from Slack ("use Codex for Slack tasks"), call \`${REPLICAS_MCP_TOOLS.setSlackAgentDefaults}\` (admin only).
12142
+ - **"What can I change?"** Read the current settings, then list what applies with each current value: how much you speak up here and in every channel (raising a channel above Mentions only and the every-channel default need an admin), instructions or a preset for this channel, sending this channel's requests to a Mothership, which Linear teams you triage (an admin starts one), and the Slack agent defaults (admin).
12143
+ - After any change, say what changed and its scope ("every channel", or "#eng only"). Confirm only after the tool succeeded and only what it changed; say so when it failed or did less than asked.
12144
+
12145
+ ## Offers
12146
+ When the envelope has \`offers\`, it lists the offers you may still make in this channel (${SCOUT_CHANNEL_SETTINGS_OFFERS.map((offer) => `\`${offer}\``).join(", ")}); \`offers=none\` means none. Offer only what it lists, at most one per message. Claim the offer with \`${REPLICAS_MCP_TOOLS.claimSettingsOffer}\` right before posting it, and post only when the claim succeeds. When someone declines ("no", "it's fine", "leave it"), record it with \`declined: true\`; never repeat an ignored offer. When they accept, apply it with the tools above using the accepting message as confirmation, then confirm in one short line.
12147
+ - **Frustration.** When someone is clearly annoyed that you replied or acted unasked ("wtf why did replicas respond", "not you", "nobody asked", or a thumbs-down on a reply you posted unasked), claim \`proactivity\` and post one short apology offering to lower this channel exactly one step. From Balanced or High: "Sorry for jumping in. Want me to only reply here when someone mentions me by name?" From Low: "Sorry for jumping in. Want me to only reply here when someone @mentions me?" On a yes, set that level, nothing lower. Do nothing else in that thread. When the claim answers \`offer: organization\`, offer to set every channel's default to \`organization_target\` instead; when \`requester_is_admin\` is false, say an admin can change it for every channel and offer this channel. An explicit "stop replying in this thread" is still a thread mute.
12148
+ - **Having to tag you.** After doing what an earlier untagged message asked, claim \`raise_proactivity\` and end your reply with one line offering one step up. From Mentions only: "Want me to pick up messages here that name me, without an @mention? @mention me with your answer." From Low: "Want me to pick up requests like that here without a tag next time? I can raise this channel to Balanced." From Balanced: "Want me to jump in on requests like that here without being asked? I can raise this channel to High." When the claim answers \`offer: organization\`, offer to raise every channel's default to \`organization_target\` instead, and say channels with their own level keep it. Mention an admin only when the claim answers \`needs_admin: true\`, then offer this channel instead. On a yes, raise to that level only.
12149
+ - **Channel instructions.** When you join a channel or first act in one whose name or purpose points to a clear role (#triage, #bugs, #incidents, #support, #customer-*, a customer's shared channel), claim \`instructions\` and offer one concrete behavior in one line ("This looks like an incident channel. Want me to triage new reports here, check for duplicates, and post findings in the thread?"). Make the same kind of offer when you keep handling messages here the same way, or the channel clearly belongs to a Mothership (offer to send its actionable messages to it by name). On a yes, save it as the channel's instructions, or its preset when one fits exactly.
12150
+
12151
+ ## Automations
12152
+ When someone accepts an offer to automate a repeated request, set it up here instead of spawning. Infer the name, prompt, environment, repositories, schedule, and timezone from the conversation and the organization's configuration; ask one concise follow-up only for a missing detail that changes when or where it runs. Create it with \`${REPLICAS_MCP_TOOLS.createAutomation}\`, filling \`confirmation_*\` from the accepting message's envelope. The server checks that author is an organization member with automation write access; never create it if that fails. Post the result in the same thread.
12153
+ `;
12154
+
12119
12155
  // ../shared/src/routes/push.ts
12120
12156
  import { z as z20 } from "zod";
12121
12157
 
@@ -12608,7 +12644,7 @@ Use this workflow to make a repository fully usable by Replicas background agent
12608
12644
 
12609
12645
  ## Mental model
12610
12646
 
12611
- Every Replicas workspace is a remote Linux VM. Repositories are cloned under \`~/workspaces/<repo-name>\`. An **environment** is the org-scoped template a workspace is built from. It lists the repositories to clone, in checkout order (one, several for multi-repo stacks, or none), and carries:
12647
+ Every Replicas workspace is a remote Linux VM. Repositories are cloned under \`~/workspaces/<repo-name>\`, or \`~/workspaces/<full-path-with-dashes>\` (like \`groupA-app\`) when two share a name. An **environment** is the org-scoped template a workspace is built from. It lists the repositories to clone, in checkout order (one, several for multi-repo stacks, or none), and carries:
12612
12648
 
12613
12649
  | Piece | When it runs | Put here |
12614
12650
  | --- | --- | --- |
@@ -14746,7 +14782,7 @@ function stripReplicasInstructionBlock(text4) {
14746
14782
  var 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.
14747
14783
  - 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.
14748
14784
  - 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.
14749
- - Write in chat only to answer the user, or to ask a decision in a line or two. 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; link the pull request you mean and leave status to the board.
14785
+ - 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.
14750
14786
  - 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.
14751
14787
  `;
14752
14788
  var MOTHERSHIP_INSTRUCTIONS_BLOCK = new RegExp(`\\s*<${MOTHERSHIP_INSTRUCTIONS_TAG}>\\n([\\s\\S]*?)\\n</${MOTHERSHIP_INSTRUCTIONS_TAG}>`);
@@ -14757,14 +14793,16 @@ function splitMothershipInstructions(customInstructions) {
14757
14793
  mothershipInstructions: match?.[1]
14758
14794
  };
14759
14795
  }
14760
- var SCOUT_ADAPTIVE_SETTINGS_PROMPT = `### Adapting to each channel
14761
- There is no settings page: people change how you behave by telling you, and you suggest a change when it would clearly help. The envelope carries the channel's \`proactivity\` and \`offers\`, the offers you may still make in this channel (${SCOUT_CHANNEL_SETTINGS_OFFERS.map((offer) => `\`${offer}\``).join(", ")}); \`offers=none\` means make none. Offer only what \`offers\` lists, at most one per message. Claim an offer with \`${REPLICAS_MCP_TOOLS.claimSettingsOffer}\` right before posting it, and post it only when the claim succeeds. When someone declines ("no", "it's fine", "leave it"), record it with \`declined: true\` and drop it; never repeat an ignored offer. When they accept, apply it with the settings tools using the accepting message as confirmation, then confirm what changed in one short line.
14762
- - **Frustration.** When someone is clearly annoyed that you replied or acted unasked ("wtf why did replicas respond", "stop", "not you", "nobody asked", or \`event=reaction:\u2026\`, a thumbs-down or similar on a reply you posted unasked), claim \`proactivity\` and post one short apology that offers to lower this channel exactly one step. From Balanced or High, offer Low: "Sorry for jumping in. Want me to only reply here when someone mentions me by name?" From Low, offer Mentions only: "Sorry for jumping in. Want me to only reply here when someone @mentions me?" On a yes, set the level you offered, nothing lower. Do nothing else in that thread. When the claim answers \`offer: organization\`, people were frustrated in several channels, so offer to set every channel's default to \`organization_target\` instead; when \`requester_is_admin\` is false, say an organization admin can change it for every channel and offer this channel. A thumbs-down on a reply someone asked for is about the answer, not about speaking up, so leave it. An explicit "stop replying in this thread" is still a thread mute.
14763
- - **Having to tag you.** \`prior_untagged_ignored=<ts>\` means the untagged message with that \`ts\`, just before this ping in this thread or channel, never reached you: the channel's level or the untagged check held it back. When this ping points back at it ("do the above", "^", "can you do this", "see above", a quote of it, "why didn't you pick this up") and it was a question or request for you, it was really meant for you: do what it asked, then claim \`raise_proactivity\` and end your reply with one line offering to pick up messages like that without a tag next time. Read the message first (\`conversations.replies\` in a thread, \`conversations.history\` at the top level). Make no offer when this ping is its own fresh request, or when that message was chatter or meant for someone else. Offer exactly one step up: from Mentions only, "Want me to pick up messages here that name me, without an @mention? @mention me with your answer."; from Low, "Want me to pick up requests like that here without a tag next time? I can raise this channel to Balanced."; from Balanced, "Want me to jump in on requests like that here without being asked? I can raise this channel to High." When the claim answers \`offer: organization\`, people had to tag you in several channels, so offer to raise every channel's default to \`organization_target\` instead, and say channels with their own level keep it. Mention an admin only when the claim answers \`needs_admin: true\`: then say an organization admin can make that change, and for \`offer: organization\` offer this channel instead. On a yes, raise to that level only.
14764
- - **Channel instructions.** On \`event=joined\` (you were just added to the channel; reply in that envelope's thread), or when you act in a channel for the first time, and the channel's name or purpose points to a clear role (#triage, #bugs, #incidents, #support, #customer-*, a customer's shared channel), claim \`instructions\` and offer one concrete behavior in one line, such as "This looks like an incident channel. Want me to triage new reports here, check for duplicates, and post findings in the thread?" On \`event=joined\` without a clear role, do nothing at all. Make the same kind of offer when you notice you keep handling messages here the same way, or that the channel clearly belongs to a Mothership (offer to send its actionable messages to that Mothership by name). On a yes, save it as the channel's instructions, or as its preset when one fits exactly.
14765
- - **Tip.** When the envelope has \`tip=true\`, this is the first time someone pinged you in this channel, so end the reply you post with one more line: "_Tip: tell me how you want me to act in this channel._" It is shown once per channel, so never add it otherwise.
14766
- - **Slack agent defaults.** To change the agent, model, thinking level, goal mode or fast mode used for tasks started from Slack ("use Codex for Slack tasks"), call \`${REPLICAS_MCP_TOOLS.setSlackAgentDefaults}\`; only an organization admin can.
14767
- - **What can I change?** Read the current settings, then answer with a short list of what applies: how much you speak up here or in every channel (Mentions only, Low, Balanced, High; raising a channel above Mentions only and the every-channel default need an admin), instructions or a preset for this channel, sending this channel's requests to a Mothership, which Linear teams you triage (an admin starts one), and the agent defaults for Slack tasks (admin). Say each one's current value.`;
14796
+ var T = REPLICAS_MCP_TOOLS;
14797
+ var SCOUT_LINEAR_RULES = `Linear issue triage: team instructions define what is actionable. Use \`replicas.linear.graphql\` from \`@replicas/sdk\` for every Linear read and mutation, never a Replicas CLI command. Choose exactly one:
14798
+ 1. **Ignore** issues the team instructions leave to humans or that should not start work: do nothing and write nothing to Linear. If \`agent_session_id\` is set because you asked a question earlier, create a \`response\` Agent Activity on it with one short closing response.
14799
+ 2. **Ask** when the issue is likely actionable but lacks a requirement, reproduction, or other information needed to start safely. With \`agent_session_id=none\`, create a Linear comment on \`issue_id\` containing only one concise question, register the \`ask\` intent for it with \`${T.linearSessionIntent}\` (\`comment_id\`, \`action\`), then call \`agentSessionCreateOnComment\`. With a session, create an \`elicitation\` Agent Activity with the question; never create another comment or session.
14800
+ 3. **Start** when the issue is clear and the team instructions permit work. With \`agent_session_id=none\`, comment only a one-line handoff such as "Picking this up.", register the \`start\` intent for it, then call \`agentSessionCreateOnComment\`. With a session, call \`${T.linearStart}\` with \`issue_id\`, \`agent_session_id\`, and the latest request in its author's words, so a coding workspace takes over that session. Never create a second session or do the work yourself.
14801
+ Check every mutation and tool call succeeded. Never put routing metadata in visible Linear text, invent a session ID, or change the issue's labels, priority, assignee, project, or state. Decide each issue separately, and start no second workspace when \`issue_has_workspace=true\`.`;
14802
+ var SCOUT_MUTED_RULES = `This thread is muted (\`muted=true\`). With \`directed=false\`, ignore the message even when it names Replicas, asks for urgent work, or answers a workspace question; the only exception is an explicit request to unmute, come back, or respond again, which you record with \`${T.setThreadMuted}\` and \`muted: false\` and then triage normally. Never infer an unmute from ordinary conversation. A \`directed=true\` ping may be handled normally, but it does not end the mute. Your own latest \`${T.setThreadMuted}\` call for this thread overrides this flag.`;
14803
+ var SCOUT_PRIOR_UNTAGGED_RULES = `\`prior_untagged_ignored=<ts>\`: the untagged message with that \`ts\`, just before this ping, never reached you. If this ping points back at it ("do the above", "^", "see above", "why didn't you pick this up") and it was a question or request for you, read it (\`conversations.replies\` in a thread, \`conversations.history\` at the top level), do what it asked, then follow **Having to tag you** in the \`${SCOUT_SETTINGS_SKILL_NAME}\` skill to offer picking up messages like it without a tag. Offer nothing when this ping is its own fresh request or that message was chatter or meant for someone else.`;
14804
+ var SCOUT_JOINED_RULES = `\`event=joined\`: you were just added to this channel; reply in this envelope's thread. If the channel's name or purpose points to a clear role (#triage, #bugs, #incidents, #support, #customer-*, a customer's shared channel), follow **Channel instructions** in the \`${SCOUT_SETTINGS_SKILL_NAME}\` skill to offer one concrete behavior. Otherwise do nothing at all.`;
14805
+ var SCOUT_REACTION_RULES = `\`event=reaction:\u2026\`: someone reacted to a message you posted. A thumbs-down or similar on a reply you posted unasked is frustration: follow **Frustration** in the \`${SCOUT_SETTINGS_SKILL_NAME}\` skill. On a reply someone asked for, it is about the answer: leave it. Otherwise do nothing.`;
14768
14806
 
14769
14807
  // ../shared/src/message-origin.ts
14770
14808
  var UUID = UUID_RE.source.slice(1, -1);
@@ -16068,6 +16106,10 @@ var REPLICAS_API_STEPS = {
16068
16106
  [REPLICAS_MCP_TOOLS.getBoard]: { icon: "book", live: "Reading board", done: "Read board" },
16069
16107
  [REPLICAS_MCP_TOOLS.updateBoard]: { icon: "file-pen", live: "Updating board", done: "Updated board" }
16070
16108
  };
16109
+ function replicasToolName(message2) {
16110
+ const mcp = parseMcpToolName(message2.tool);
16111
+ return (mcp?.server ?? message2.server) === REPLICAS_MCP_SERVER_NAME ? mcp?.tool ?? message2.tool : message2.tool.startsWith(`${REPLICAS_MCP_SERVER_NAME}_`) ? message2.tool.slice(REPLICAS_MCP_SERVER_NAME.length + 1) : void 0;
16112
+ }
16071
16113
  var INTERNAL_TOOLS = /* @__PURE__ */ new Set(["ToolSearch", "ListAgents", "ListMcpResourcesTool", "ReadMcpResourceTool", "TaskOutput", "BashOutput"]);
16072
16114
  function describeToolCall(message2, base) {
16073
16115
  const { inputObject: input, filePath } = parseToolCallInput(message2.input);
@@ -16090,7 +16132,7 @@ function describeToolCall(message2, base) {
16090
16132
  return { ...base, key, category: "tool", ...SUBAGENT_STEPS[subagentTool], failed, target: agent ? { text: agent, plain: true } : void 0, detail: "subagent" };
16091
16133
  }
16092
16134
  const mcp = parseMcpToolName(tool);
16093
- const replicasTool = (mcp?.server ?? message2.server) === REPLICAS_MCP_SERVER_NAME ? mcp?.tool ?? tool : tool.startsWith(`${REPLICAS_MCP_SERVER_NAME}_`) ? tool.slice(REPLICAS_MCP_SERVER_NAME.length + 1) : void 0;
16135
+ const replicasTool = replicasToolName(message2);
16094
16136
  const mothershipAction = replicasTool ? MOTHERSHIP_TOOL_ACTIONS[replicasTool] : void 0;
16095
16137
  if (mothershipAction) {
16096
16138
  const step = {
@@ -21132,6 +21174,8 @@ export {
21132
21174
  SUBAGENT_SERVICE_TIERS,
21133
21175
  serviceTierRequestFields,
21134
21176
  TERMINAL_RTC_ICE_SERVER,
21177
+ REPLICAS_MCP_SERVER_NAME,
21178
+ REPLICAS_MCP_TOOLS,
21135
21179
  REPLICAS_RUNTIME_ENV_ALIASES,
21136
21180
  readReplicasRuntimeEnv,
21137
21181
  shellQuotePosix,
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  AspClient
6
- } from "./chunk-FFAQMCOD.js";
6
+ } from "./chunk-5T3TGWH4.js";
7
7
  import {
8
8
  ASTER_BASE_URL,
9
9
  ASTER_PROVIDER,
@@ -15,7 +15,7 @@ import {
15
15
  isRecord,
16
16
  readOllamaAuthEnv,
17
17
  readOpenAICompatibleAuthEnv
18
- } from "./chunk-WU5FQL77.js";
18
+ } from "./chunk-AGADZY7X.js";
19
19
 
20
20
  // src/managers/codex-asp/notification-dispatch.ts
21
21
  var TURN_STARTED_METHOD = "turn/started";
@@ -10,15 +10,15 @@ import {
10
10
  resolveDiffBase,
11
11
  runGitCommand,
12
12
  setAgentCredentialSnapshot
13
- } from "./chunk-6ZFY5RXG.js";
13
+ } from "./chunk-QJ5DP5BI.js";
14
14
  import {
15
15
  AppServerProcess,
16
16
  buildCodexAgentEnv
17
- } from "./chunk-FFAQMCOD.js";
17
+ } from "./chunk-5T3TGWH4.js";
18
18
  import {
19
19
  SUBPROCESS_MAX_BUFFER,
20
20
  execFileAsync
21
- } from "./chunk-X3HYTO5I.js";
21
+ } from "./chunk-FEYJDKNU.js";
22
22
  import {
23
23
  isRecord
24
24
  } from "./chunk-UZSNFLDQ.js";
@@ -56,7 +56,7 @@ import {
56
56
  resolveOpenAICompatibleModelsUrl,
57
57
  splitMothershipInstructions,
58
58
  withTimeout
59
- } from "./chunk-WU5FQL77.js";
59
+ } from "./chunk-AGADZY7X.js";
60
60
 
61
61
  // src/managers/codex-token-manager.ts
62
62
  import { promises as fs } from "fs";
@@ -319,7 +319,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
319
319
  await this.applyCredentialUpdate(++this.credentialGeneration, async () => {
320
320
  await this.applyCredentialsResponse(data);
321
321
  setAgentCredentialSnapshot("codex", data);
322
- const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-F4WAH4C7.js");
322
+ const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-R5TXZLU4.js");
323
323
  await restartCodexAspHostIfRunning2();
324
324
  });
325
325
  await this.start(true);
@@ -341,7 +341,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
341
341
  const accountChanged = ENGINE_ENV.REPLICAS_AGENT_CREDENTIALS.codex?.credentialId !== data.credentialId;
342
342
  await this.applyCredentialsResponse(data);
343
343
  if (restartOnChange && (accountChanged || CODEX_AUTH_ENV_KEYS.some((key, index) => process.env[key] !== previousEnv[index]))) {
344
- const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-F4WAH4C7.js");
344
+ const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-R5TXZLU4.js");
345
345
  await restartCodexAspHostIfRunning2();
346
346
  }
347
347
  setAgentCredentialSnapshot("codex", data);
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  HOOK_EXEC_MAX_BUFFER_BYTES
6
- } from "./chunk-WU5FQL77.js";
6
+ } from "./chunk-AGADZY7X.js";
7
7
 
8
8
  // src/utils/exec.ts
9
9
  import { exec, execFile } from "child_process";
@@ -4,7 +4,7 @@ const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  SUBPROCESS_MAX_BUFFER,
6
6
  execFileAsync
7
- } from "./chunk-X3HYTO5I.js";
7
+ } from "./chunk-FEYJDKNU.js";
8
8
  import {
9
9
  isRecord as isRecord2
10
10
  } from "./chunk-UZSNFLDQ.js";
@@ -21,7 +21,7 @@ import {
21
21
  provisionedDeviceSchema,
22
22
  readReplicasRuntimeEnv,
23
23
  serializePosixEnvFile
24
- } from "./chunk-WU5FQL77.js";
24
+ } from "./chunk-AGADZY7X.js";
25
25
 
26
26
  // src/runtime-env-loader.ts
27
27
  import { readFileSync } from "fs";
@@ -6,7 +6,7 @@ import {
6
6
  getOriginDefaultBranch,
7
7
  monolithRequest,
8
8
  runGitCommand
9
- } from "./chunk-6ZFY5RXG.js";
9
+ } from "./chunk-QJ5DP5BI.js";
10
10
  import {
11
11
  extractCommandProtectionCommandText,
12
12
  findCommandProtectionGitLookups,
@@ -14,7 +14,7 @@ import {
14
14
  findPrMergeSignals,
15
15
  findScoutRepoWriteSignals,
16
16
  parseCommandProtectionRequest
17
- } from "./chunk-WU5FQL77.js";
17
+ } from "./chunk-AGADZY7X.js";
18
18
 
19
19
  // src/services/command-protection-service.ts
20
20
  import { readFile, stat } from "fs/promises";
@@ -5,7 +5,7 @@ import {
5
5
  extractCommandProtectionCommandText,
6
6
  isRecord,
7
7
  parseCodeHostPrUrl
8
- } from "./chunk-WU5FQL77.js";
8
+ } from "./chunk-AGADZY7X.js";
9
9
 
10
10
  // src/services/published-pull-request-urls.ts
11
11
  function publishedPullRequestUrls(result) {
@@ -3,13 +3,13 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  evaluateCommandProtection
6
- } from "./chunk-WRNR76LM.js";
7
- import "./chunk-6ZFY5RXG.js";
8
- import "./chunk-X3HYTO5I.js";
6
+ } from "./chunk-S3GFXX3C.js";
7
+ import "./chunk-QJ5DP5BI.js";
8
+ import "./chunk-FEYJDKNU.js";
9
9
  import {
10
10
  isRecord
11
11
  } from "./chunk-UZSNFLDQ.js";
12
- import "./chunk-WU5FQL77.js";
12
+ import "./chunk-AGADZY7X.js";
13
13
  import "./chunk-VEQXQN22.js";
14
14
 
15
15
  // src/command-protection-hook.ts
@@ -14,12 +14,12 @@ import {
14
14
  recoverCompletedTurn,
15
15
  spawnMuseMsp,
16
16
  startMuseSession
17
- } from "./chunk-4JWO4CFF.js";
17
+ } from "./chunk-C5WXCDPR.js";
18
18
  import {
19
19
  AppServerProcess,
20
20
  buildCodexAgentEnv
21
- } from "./chunk-FFAQMCOD.js";
22
- import "./chunk-X3HYTO5I.js";
21
+ } from "./chunk-5T3TGWH4.js";
22
+ import "./chunk-FEYJDKNU.js";
23
23
  import {
24
24
  AGENT,
25
25
  OPENCODE_GO_PROVIDER,
@@ -29,7 +29,7 @@ import {
29
29
  headlessAgentUsagePath,
30
30
  isRecord,
31
31
  withTimeout
32
- } from "./chunk-WU5FQL77.js";
32
+ } from "./chunk-AGADZY7X.js";
33
33
  import "./chunk-VEQXQN22.js";
34
34
 
35
35
  // src/headless-agent.ts
package/dist/src/index.js CHANGED
@@ -27,7 +27,7 @@ import {
27
27
  evaluateCommandProtection,
28
28
  extractToolCommand,
29
29
  reportCommandProtectionBlock
30
- } from "./chunk-WRNR76LM.js";
30
+ } from "./chunk-S3GFXX3C.js";
31
31
  import {
32
32
  ACCOUNT_RATE_LIMITS_UPDATED_METHOD,
33
33
  AGENT_MESSAGE_DELTA_METHOD,
@@ -65,10 +65,10 @@ import {
65
65
  spawnMuseMsp,
66
66
  startMuseSession,
67
67
  uuidV7
68
- } from "./chunk-4JWO4CFF.js";
68
+ } from "./chunk-C5WXCDPR.js";
69
69
  import {
70
70
  publishedPullRequestUrls
71
- } from "./chunk-7CVPHFC6.js";
71
+ } from "./chunk-WO7DLKJO.js";
72
72
  import {
73
73
  ACCOUNT_RATE_LIMITS_READ_METHOD,
74
74
  AsyncLock,
@@ -143,7 +143,7 @@ import {
143
143
  timestampFromSeconds,
144
144
  upsertCredentialFileLines,
145
145
  writeSecureCredentialFile
146
- } from "./chunk-LYNDD24N.js";
146
+ } from "./chunk-FDZBQL7G.js";
147
147
  import {
148
148
  ENGINE_ENV,
149
149
  monolithRequest,
@@ -153,15 +153,15 @@ import {
153
153
  resolveDiffBase,
154
154
  setAgentCredentialSnapshot,
155
155
  setLinearSessionId
156
- } from "./chunk-6ZFY5RXG.js";
156
+ } from "./chunk-QJ5DP5BI.js";
157
157
  import {
158
158
  getCodexModelProvider
159
- } from "./chunk-FFAQMCOD.js";
159
+ } from "./chunk-5T3TGWH4.js";
160
160
  import {
161
161
  SUBPROCESS_MAX_BUFFER,
162
162
  execAsync,
163
163
  execFileAsync
164
- } from "./chunk-X3HYTO5I.js";
164
+ } from "./chunk-FEYJDKNU.js";
165
165
  import {
166
166
  isRecord as isRecord2
167
167
  } from "./chunk-UZSNFLDQ.js";
@@ -250,6 +250,8 @@ import {
250
250
  REPLACED_MESSAGE_ID_PAYLOAD_KEY,
251
251
  REPLICAS_CONFIG_FILENAMES,
252
252
  REPLICAS_INSTRUCTIONS_TAG,
253
+ REPLICAS_MCP_SERVER_NAME,
254
+ REPLICAS_MCP_TOOLS,
253
255
  REPLICAS_RUNTIME_ENV_ALIASES,
254
256
  SANDBOX_SKILL_DIRS,
255
257
  SUBAGENT_MCP_HARNESSES,
@@ -430,7 +432,7 @@ import {
430
432
  workspaceTokenRequestSchema,
431
433
  workspaceTokenResponseSchema,
432
434
  wrapInTag
433
- } from "./chunk-WU5FQL77.js";
435
+ } from "./chunk-AGADZY7X.js";
434
436
  import {
435
437
  cloneMcpConfig,
436
438
  ensureCompatibilityImports,
@@ -14044,6 +14046,8 @@ var ClaudeManager = class _ClaudeManager extends CodingAgentManager {
14044
14046
  /** Query inputs shared by real sessions and slash-command discovery. */
14045
14047
  async buildSharedQueryOptions() {
14046
14048
  const env = buildClaudeAgentEnv({
14049
+ // Claude Code nudges a turn that ends without text to write some, unless it called one of these tools; a Mothership handles a ship event with only a board update.
14050
+ CLAUDE_CODE_TERMINAL_MCP_TOOLS: `mcp__${REPLICAS_MCP_SERVER_NAME}__${REPLICAS_MCP_TOOLS.updateBoard}`,
14047
14051
  ...this.subagentMcpParentChatId() && { CLAUDE_CODE_STREAM_CLOSE_TIMEOUT: "900000" },
14048
14052
  ...this.originChatId && { REPLICAS_CHAT_ID: this.originChatId }
14049
14053
  });
@@ -3,13 +3,13 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  publishedPullRequestUrls
6
- } from "./chunk-7CVPHFC6.js";
6
+ } from "./chunk-WO7DLKJO.js";
7
7
  import {
8
8
  isRecord
9
9
  } from "./chunk-UZSNFLDQ.js";
10
10
  import {
11
11
  shouldRefreshPullRequests
12
- } from "./chunk-WU5FQL77.js";
12
+ } from "./chunk-AGADZY7X.js";
13
13
  import "./chunk-VEQXQN22.js";
14
14
 
15
15
  // src/services/post-tool-pr-notifier.ts
@@ -11,7 +11,7 @@ import {
11
11
  spawnSubagentRequestSchema,
12
12
  subagentResponseSchema,
13
13
  waitSubagentRequestSchema
14
- } from "./chunk-WU5FQL77.js";
14
+ } from "./chunk-AGADZY7X.js";
15
15
  import "./chunk-VEQXQN22.js";
16
16
 
17
17
  // src/subagent-mcp.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-engine",
3
- "version": "0.1.1424",
3
+ "version": "0.1.1426",
4
4
  "description": "Lightweight API server for Replicas workspaces",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",