replicas-engine 0.1.1425 → 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.
- package/dist/src/{asp-host-NINEKPGD.js → asp-host-R5TXZLU4.js} +5 -5
- package/dist/src/{chunk-USRYFPJ7.js → chunk-5T3TGWH4.js} +3 -3
- package/dist/src/{chunk-PTIF7EWA.js → chunk-AGADZY7X.js} +54 -10
- package/dist/src/{chunk-5EC4EOYK.js → chunk-C5WXCDPR.js} +2 -2
- package/dist/src/{chunk-OURU44LQ.js → chunk-FDZBQL7G.js} +6 -6
- package/dist/src/{chunk-VQ4IFAYB.js → chunk-FEYJDKNU.js} +1 -1
- package/dist/src/{chunk-NPGTI2O5.js → chunk-QJ5DP5BI.js} +2 -2
- package/dist/src/{chunk-IJQGFVRW.js → chunk-S3GFXX3C.js} +2 -2
- package/dist/src/{chunk-BW5SMIW2.js → chunk-WO7DLKJO.js} +1 -1
- package/dist/src/command-protection-hook.js +4 -4
- package/dist/src/headless-agent.js +4 -4
- package/dist/src/index.js +12 -8
- package/dist/src/post-tool-pr-hook.js +2 -2
- package/dist/src/subagent-mcp.js +1 -1
- package/package.json +1 -1
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
listCodexModelsForDetails,
|
|
9
9
|
restartCodexAspHost,
|
|
10
10
|
restartCodexAspHostIfRunning
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
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-
|
|
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-
|
|
6
|
+
} from "./chunk-FEYJDKNU.js";
|
|
7
7
|
import {
|
|
8
8
|
isVersionBelow
|
|
9
|
-
} from "./chunk-
|
|
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.
|
|
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
|
|
|
@@ -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
|
-
-
|
|
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
|
|
14761
|
-
|
|
14762
|
-
|
|
14763
|
-
|
|
14764
|
-
|
|
14765
|
-
|
|
14766
|
-
|
|
14767
|
-
|
|
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 = (
|
|
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-
|
|
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-
|
|
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-
|
|
13
|
+
} from "./chunk-QJ5DP5BI.js";
|
|
14
14
|
import {
|
|
15
15
|
AppServerProcess,
|
|
16
16
|
buildCodexAgentEnv
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-5T3TGWH4.js";
|
|
18
18
|
import {
|
|
19
19
|
SUBPROCESS_MAX_BUFFER,
|
|
20
20
|
execFileAsync
|
|
21
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
17
|
+
} from "./chunk-AGADZY7X.js";
|
|
18
18
|
|
|
19
19
|
// src/services/command-protection-service.ts
|
|
20
20
|
import { readFile, stat } from "fs/promises";
|
|
@@ -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-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
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-
|
|
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-
|
|
17
|
+
} from "./chunk-C5WXCDPR.js";
|
|
18
18
|
import {
|
|
19
19
|
AppServerProcess,
|
|
20
20
|
buildCodexAgentEnv
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
68
|
+
} from "./chunk-C5WXCDPR.js";
|
|
69
69
|
import {
|
|
70
70
|
publishedPullRequestUrls
|
|
71
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
156
|
+
} from "./chunk-QJ5DP5BI.js";
|
|
157
157
|
import {
|
|
158
158
|
getCodexModelProvider
|
|
159
|
-
} from "./chunk-
|
|
159
|
+
} from "./chunk-5T3TGWH4.js";
|
|
160
160
|
import {
|
|
161
161
|
SUBPROCESS_MAX_BUFFER,
|
|
162
162
|
execAsync,
|
|
163
163
|
execFileAsync
|
|
164
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
12
|
+
} from "./chunk-AGADZY7X.js";
|
|
13
13
|
import "./chunk-VEQXQN22.js";
|
|
14
14
|
|
|
15
15
|
// src/services/post-tool-pr-notifier.ts
|
package/dist/src/subagent-mcp.js
CHANGED