replicas-engine 0.1.1428 → 0.1.1430
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-43WBD65V.js → asp-host-CVQJKJWJ.js} +5 -5
- package/dist/src/{chunk-7XTQFKDP.js → chunk-6Y6LCLDA.js} +3 -2
- package/dist/src/{chunk-LLECDWGY.js → chunk-CGB2TKIK.js} +6 -5
- package/dist/src/{chunk-FRGUDRLW.js → chunk-JUAWHYTB.js} +58 -5
- package/dist/src/{chunk-RQVK6PHP.js → chunk-KO4T2ZEK.js} +3 -3
- package/dist/src/{chunk-S7VE6UFX.js → chunk-MVOJQ672.js} +1 -1
- package/dist/src/{chunk-3UO6XBXJ.js → chunk-PP3JCIGY.js} +1 -1
- package/dist/src/{chunk-BRLOP2YE.js → chunk-R5H6BAZ7.js} +2 -2
- package/dist/src/{chunk-CBGBDCKT.js → chunk-SIXG753K.js} +6 -6
- package/dist/src/command-protection-hook.js +4 -4
- package/dist/src/headless-agent.js +4 -4
- package/dist/src/index.js +13 -12
- 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-SIXG753K.js";
|
|
12
|
+
import "./chunk-6Y6LCLDA.js";
|
|
13
|
+
import "./chunk-KO4T2ZEK.js";
|
|
14
|
+
import "./chunk-MVOJQ672.js";
|
|
15
15
|
import "./chunk-UZSNFLDQ.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-JUAWHYTB.js";
|
|
17
17
|
import "./chunk-VEQXQN22.js";
|
|
18
18
|
export {
|
|
19
19
|
CODEX_ULTRAFAST_SERVICE_TIER,
|
|
@@ -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-MVOJQ672.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-JUAWHYTB.js";
|
|
25
25
|
|
|
26
26
|
// src/runtime-env-loader.ts
|
|
27
27
|
import { readFileSync } from "fs";
|
|
@@ -172,6 +172,7 @@ function loadEngineEnv(runtimeEnvFile) {
|
|
|
172
172
|
TS_AUTHKEY: readEnv("TS_AUTHKEY"),
|
|
173
173
|
REPLICAS_DISABLE_AUTO_START_HOOKS: readEnv("REPLICAS_DISABLE_AUTO_START_HOOKS")?.toLowerCase() === "true",
|
|
174
174
|
REPLICAS_SCOUT: readEnv("REPLICAS_SCOUT") === "true",
|
|
175
|
+
REPLICAS_MOTHERSHIP: readEnv("REPLICAS_MOTHERSHIP") === "true",
|
|
175
176
|
REPLICAS_MAX_LIVE_AGENT_PROCESSES: Number(readEnv("REPLICAS_MAX_LIVE_AGENT_PROCESSES")) || void 0
|
|
176
177
|
};
|
|
177
178
|
delete process.env.REPLICAS_ENV_DEVICES;
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getOriginDefaultBranch,
|
|
7
7
|
monolithRequest,
|
|
8
8
|
runGitCommand
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6Y6LCLDA.js";
|
|
10
10
|
import {
|
|
11
11
|
extractCommandProtectionCommandText,
|
|
12
12
|
findCommandProtectionGitLookups,
|
|
@@ -14,13 +14,14 @@ import {
|
|
|
14
14
|
findPrMergeSignals,
|
|
15
15
|
findScoutRepoWriteSignals,
|
|
16
16
|
parseCommandProtectionRequest
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-JUAWHYTB.js";
|
|
18
18
|
|
|
19
19
|
// src/services/command-protection-service.ts
|
|
20
20
|
import { readFile, stat } from "fs/promises";
|
|
21
21
|
var DEFAULT_COMMAND_PROTECTION_BLOCK_MESSAGE = "Blocked by Replicas command protection.";
|
|
22
22
|
var MAX_COMMIT_MESSAGE_FILE_BYTES = 64 * 1024;
|
|
23
23
|
var SCOUT_REPO_WRITE_BLOCK_MESSAGE = "Scout never clones, commits, pushes, or opens pull requests. Spawn a workspace on an environment that has the repository, or relay this to the thread's workspace.";
|
|
24
|
+
var MOTHERSHIP_REPO_WRITE_BLOCK_MESSAGE = "A Mothership never clones, commits, pushes, or opens pull requests. Hand this to a ship with spawn_subagent or message_subagent.";
|
|
24
25
|
async function resolveGitContext({ repoDirs, messageFiles }) {
|
|
25
26
|
if (repoDirs.length === 0 && messageFiles.length === 0) return void 0;
|
|
26
27
|
const git = (dir, args) => runGitCommand(args, dir).then((output) => output || null, () => null);
|
|
@@ -59,9 +60,9 @@ function failClosed(reason, matchedSignals) {
|
|
|
59
60
|
}
|
|
60
61
|
async function evaluateCommandProtection(request, signal) {
|
|
61
62
|
const parsed = parseCommandProtectionRequest(request);
|
|
62
|
-
const
|
|
63
|
-
if (
|
|
64
|
-
return { allowed: false, enabled: true, reason: SCOUT_REPO_WRITE_BLOCK_MESSAGE, matchedSignals:
|
|
63
|
+
const repoWriteSignals = ENGINE_ENV.REPLICAS_SCOUT || ENGINE_ENV.REPLICAS_MOTHERSHIP ? findScoutRepoWriteSignals(parsed) : [];
|
|
64
|
+
if (repoWriteSignals.length > 0) {
|
|
65
|
+
return { allowed: false, enabled: true, reason: ENGINE_ENV.REPLICAS_SCOUT ? SCOUT_REPO_WRITE_BLOCK_MESSAGE : MOTHERSHIP_REPO_WRITE_BLOCK_MESSAGE, matchedSignals: repoWriteSignals };
|
|
65
66
|
}
|
|
66
67
|
const gitContext = await resolveGitContext(findCommandProtectionGitLookups(parsed));
|
|
67
68
|
const matchedSignals = [...findGitCommitSignals(parsed), ...findPrMergeSignals(parsed, gitContext).signals];
|
|
@@ -9470,6 +9470,15 @@ var LEGACY_WEB_APP_PATHS = {
|
|
|
9470
9470
|
home: "/home",
|
|
9471
9471
|
dashboardWorkspaces: `${DASHBOARD_PATH}/workspaces`
|
|
9472
9472
|
};
|
|
9473
|
+
function getWorkspaceDashboardUrl(workspaceId, options = {}) {
|
|
9474
|
+
const { encodeWorkspaceId = true, mode, mediaId, webAppUrl = DEFAULT_WEB_APP_URL } = options;
|
|
9475
|
+
const workspaceIdValue = encodeWorkspaceId ? encodeURIComponent(workspaceId) : workspaceId;
|
|
9476
|
+
const params = [];
|
|
9477
|
+
if (mode) params.push(`mode=${encodeURIComponent(mode)}`);
|
|
9478
|
+
if (mediaId) params.push(`media=${encodeURIComponent(mediaId)}`);
|
|
9479
|
+
const query = params.length > 0 ? `?${params.join("&")}` : "";
|
|
9480
|
+
return `${webAppUrl}${WEB_APP_PATHS.fullscreenWorkspaces}/${workspaceIdValue}${query}`;
|
|
9481
|
+
}
|
|
9473
9482
|
var PR_URL_REGEX = /github\.com\/([^/]+)\/([^/]+)\/pull\/(\d+)/;
|
|
9474
9483
|
function parsePrUrl(url) {
|
|
9475
9484
|
const match = url.match(PR_URL_REGEX);
|
|
@@ -11795,8 +11804,14 @@ var dark = {
|
|
|
11795
11804
|
destructive: "#ef4444",
|
|
11796
11805
|
destructiveText: "#ff6f63",
|
|
11797
11806
|
destructiveForeground: "#ffffff",
|
|
11807
|
+
destructiveSoft: "#dc262636",
|
|
11798
11808
|
warning: "#f59e0b",
|
|
11799
11809
|
warningText: "#facc15",
|
|
11810
|
+
warningSoft: "#facc151a",
|
|
11811
|
+
working: "#0ea5e9",
|
|
11812
|
+
workingText: "#7dd3fc",
|
|
11813
|
+
workingForeground: "#111111",
|
|
11814
|
+
workingSoft: "#7dd3fc1a",
|
|
11800
11815
|
...plain
|
|
11801
11816
|
};
|
|
11802
11817
|
var DESIGN_COLORS = {
|
|
@@ -11819,8 +11834,14 @@ var DESIGN_COLORS = {
|
|
|
11819
11834
|
destructive: "#dc2626",
|
|
11820
11835
|
destructiveText: "#b2000f",
|
|
11821
11836
|
destructiveForeground: "#ffffff",
|
|
11837
|
+
destructiveSoft: "#dc262614",
|
|
11822
11838
|
warning: "#92400e",
|
|
11823
11839
|
warningText: "#825100",
|
|
11840
|
+
warningSoft: "#facc1540",
|
|
11841
|
+
working: "#0369a1",
|
|
11842
|
+
workingText: "#075985",
|
|
11843
|
+
workingForeground: "#ffffff",
|
|
11844
|
+
workingSoft: "#0284c71a",
|
|
11824
11845
|
...plain
|
|
11825
11846
|
}
|
|
11826
11847
|
};
|
|
@@ -14811,9 +14832,10 @@ function removeTag(text4, tag) {
|
|
|
14811
14832
|
function stripReplicasInstructionBlock(text4) {
|
|
14812
14833
|
return removeTag(text4, REPLICAS_INSTRUCTIONS_TAG);
|
|
14813
14834
|
}
|
|
14835
|
+
var BOARD_ANSWER_NOTE = "The user answered on the board.";
|
|
14814
14836
|
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.
|
|
14815
14837
|
- 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.
|
|
14816
|
-
- On every ship event
|
|
14838
|
+
- 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.
|
|
14817
14839
|
- 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.
|
|
14818
14840
|
- 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.
|
|
14819
14841
|
`;
|
|
@@ -14839,6 +14861,7 @@ var SCOUT_REACTION_RULES = `\`event=reaction:\u2026\`: someone reacted to a mess
|
|
|
14839
14861
|
// ../shared/src/message-origin.ts
|
|
14840
14862
|
var UUID = UUID_RE.source.slice(1, -1);
|
|
14841
14863
|
var WORKSPACE_SENDER = new RegExp(String.raw`^\s*<${REPLICAS_INSTRUCTIONS_TAG}>\nFrom the workspace ("(?:[^"\\\n]|\\.)*") \((${UUID})\)\.\n</${REPLICAS_INSTRUCTIONS_TAG}>`);
|
|
14864
|
+
var 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}>`);
|
|
14842
14865
|
var SCHEDULED_NOTE = "This is a message you or a teammate scheduled earlier, delivered into this workspace.";
|
|
14843
14866
|
var SCHEDULED_FOLLOW_UP = new RegExp(String.raw`^\s*\*\*Scheduled follow-up: ([^\n]+)\*\*\n\nThe automation "[^\n]*" \((${UUID})\) fired at \S+\. ${SCHEDULED_NOTE.replace(/\./g, "\\.")}`);
|
|
14844
14867
|
function parseMessageOrigin(raw) {
|
|
@@ -14852,6 +14875,8 @@ function parseMessageOrigin(raw) {
|
|
|
14852
14875
|
}
|
|
14853
14876
|
if (typeof name === "string") return { kind: "workspace", id: workspace[2], name, body: stripReplicasInstructionBlock(raw.slice(workspace[0].length)) };
|
|
14854
14877
|
}
|
|
14878
|
+
const board = raw.match(BOARD_ANSWER);
|
|
14879
|
+
if (board) return { kind: "board", body: stripReplicasInstructionBlock(raw.slice(board[0].length)) };
|
|
14855
14880
|
const automation = raw.match(SCHEDULED_FOLLOW_UP);
|
|
14856
14881
|
return automation ? { kind: "automation", id: automation[2], name: automation[1].trim(), body: stripReplicasInstructionBlock(raw.slice(automation[0].length)) } : null;
|
|
14857
14882
|
}
|
|
@@ -15934,6 +15959,33 @@ var DREAM_VERDICT_CHECKS = dreamVerdictChecksSchema.keyof().options;
|
|
|
15934
15959
|
var dreamVerdictSchema = dreamVerdictChecksSchema.extend({ approve: z25.boolean(), reason: z25.string() });
|
|
15935
15960
|
var learnedSkillFormatInstruction = (speaker) => `Write a SKILL.md whose frontmatter has a kebab-case \`name\` and a short \`description\` that starts with "Use when" and names the situations it applies to; the body records only what ${speaker} actually said, restated as a direct instruction, usually one to three lines. Every line of a learning is loaded into future sessions, so leave out anything an agent could infer on its own: no headings, explanations, rules, or examples unless ${speaker} stated those specifics themselves. For "from now on, use Conventional Commits", the body is just "Use Conventional Commits for every commit message and PR title."`;
|
|
15936
15961
|
|
|
15962
|
+
// ../shared/src/terminal.ts
|
|
15963
|
+
var CONTROL_CHARACTERS = /[\u0000-\u001F\u007F-\u009F]/g;
|
|
15964
|
+
function sanitizeTerminalLine(value) {
|
|
15965
|
+
return value.replace(CONTROL_CHARACTERS, " ").trim();
|
|
15966
|
+
}
|
|
15967
|
+
|
|
15968
|
+
// ../shared/src/workspace-target.ts
|
|
15969
|
+
function workspaceTargetFromToolOutput(output) {
|
|
15970
|
+
const value = output?.split(/\r?\n/).find((line) => line.startsWith("Workspace: "))?.slice("Workspace: ".length);
|
|
15971
|
+
if (!value) return null;
|
|
15972
|
+
const nameEnd = value.endsWith(")") ? value.lastIndexOf(" (") : -1;
|
|
15973
|
+
const label2 = nameEnd > 0 ? value.slice(0, nameEnd) : "";
|
|
15974
|
+
const href = nameEnd > 0 ? value.slice(nameEnd + 2, -1) : value;
|
|
15975
|
+
try {
|
|
15976
|
+
const segments = new URL(href, DEFAULT_WEB_APP_URL).pathname.split("/").filter(Boolean);
|
|
15977
|
+
const id = segments.length === 2 && segments[0] === "workspaces" ? segments[1] : null;
|
|
15978
|
+
if (!id || !UUID_RE.test(id)) return null;
|
|
15979
|
+
return {
|
|
15980
|
+
id,
|
|
15981
|
+
label: sanitizeTerminalLine(label2) || "Workspace",
|
|
15982
|
+
href: getWorkspaceDashboardUrl(id, { webAppUrl: "" })
|
|
15983
|
+
};
|
|
15984
|
+
} catch {
|
|
15985
|
+
return null;
|
|
15986
|
+
}
|
|
15987
|
+
}
|
|
15988
|
+
|
|
15937
15989
|
// ../shared/src/user-message-matching.ts
|
|
15938
15990
|
var parsedTimestamps = /* @__PURE__ */ new Map();
|
|
15939
15991
|
function parseTimestampMs(timestamp) {
|
|
@@ -16167,11 +16219,12 @@ function describeToolCall(message2, base) {
|
|
|
16167
16219
|
const replicasTool = replicasToolName(message2);
|
|
16168
16220
|
const mothershipAction = replicasTool ? MOTHERSHIP_TOOL_ACTIONS[replicasTool] : void 0;
|
|
16169
16221
|
if (mothershipAction) {
|
|
16222
|
+
const target = workspaceTargetFromToolOutput(message2.output);
|
|
16170
16223
|
const step = {
|
|
16171
16224
|
...base,
|
|
16172
16225
|
key,
|
|
16173
16226
|
failed: base.failed || Boolean(message2.output?.startsWith("Error:")),
|
|
16174
|
-
mothership: { action: mothershipAction, name: inputString(input, "name"), agentId: inputString(input, "agent_id"), chatId: inputString(input, "chat_id"), text: inputString(input, "prompt", "message") }
|
|
16227
|
+
mothership: { action: mothershipAction, name: inputString(input, "name") ?? target?.label, agentId: inputString(input, "agent_id") ?? target?.id, chatId: inputString(input, "chat_id"), text: inputString(input, "prompt", "message") }
|
|
16175
16228
|
};
|
|
16176
16229
|
if (mothershipAction === "spawn") return { ...step, category: "agent", icon: "network", live: "Spawning", done: "Spawned", detail: "mothership" };
|
|
16177
16230
|
if (mothershipAction === "send") return { ...step, category: "agent", icon: "message", live: "Messaging", done: "Messaged", detail: "mothership" };
|
|
@@ -18470,8 +18523,8 @@ function attachSendersToMessages(messages, senders) {
|
|
|
18470
18523
|
const userIndices = [];
|
|
18471
18524
|
const attachSender = (message2, sender) => message2.type === "user" ? {
|
|
18472
18525
|
...message2,
|
|
18473
|
-
// Markers are plain text a person can copy, so a recorded person always wins over a ship or check-in marker.
|
|
18474
|
-
origin: void 0,
|
|
18526
|
+
// Markers are plain text a person can copy, so a recorded person always wins over a ship or check-in marker. A board answer is that person's own.
|
|
18527
|
+
origin: message2.origin?.kind === "board" ? message2.origin : void 0,
|
|
18475
18528
|
senderUserId: sender.senderUserId,
|
|
18476
18529
|
senderEmail: sender.senderEmail,
|
|
18477
18530
|
...sender.senderDisplayName ? { senderDisplayName: sender.senderDisplayName } : {},
|
|
@@ -20924,7 +20977,7 @@ var respondVariableRequestSchema = z34.discriminatedUnion("action", [
|
|
|
20924
20977
|
|
|
20925
20978
|
// ../shared/src/mothership-board.ts
|
|
20926
20979
|
import { z as z35 } from "zod";
|
|
20927
|
-
var MOTHERSHIP_BOARD_TONES = ["neutral", "needs_you", "warning", "success", "danger"];
|
|
20980
|
+
var MOTHERSHIP_BOARD_TONES = ["neutral", "needs_you", "warning", "success", "danger", "working"];
|
|
20928
20981
|
var label = (max) => z35.string().trim().min(1).max(max);
|
|
20929
20982
|
var tone = z35.enum(MOTHERSHIP_BOARD_TONES);
|
|
20930
20983
|
var blockId = z35.string().regex(/^[\w.:-]{1,64}$/, "Use 1-64 letters, digits, _, -, . or :");
|
|
@@ -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-MVOJQ672.js";
|
|
7
7
|
import {
|
|
8
8
|
isVersionBelow
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JUAWHYTB.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.1430";
|
|
244
244
|
var INITIALIZE_METHOD = "initialize";
|
|
245
245
|
var INITIALIZED_NOTIFICATION = "initialized";
|
|
246
246
|
var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
|
|
@@ -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-JUAWHYTB.js";
|
|
7
7
|
|
|
8
8
|
// src/utils/exec.ts
|
|
9
9
|
import { exec, execFile } from "child_process";
|
|
@@ -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-KO4T2ZEK.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-JUAWHYTB.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-6Y6LCLDA.js";
|
|
14
14
|
import {
|
|
15
15
|
AppServerProcess,
|
|
16
16
|
buildCodexAgentEnv
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-KO4T2ZEK.js";
|
|
18
18
|
import {
|
|
19
19
|
SUBPROCESS_MAX_BUFFER,
|
|
20
20
|
execFileAsync
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-MVOJQ672.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-JUAWHYTB.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-CVQJKJWJ.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-CVQJKJWJ.js");
|
|
345
345
|
await restartCodexAspHostIfRunning2();
|
|
346
346
|
}
|
|
347
347
|
setAgentCredentialSnapshot("codex", data);
|
|
@@ -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-CGB2TKIK.js";
|
|
7
|
+
import "./chunk-6Y6LCLDA.js";
|
|
8
|
+
import "./chunk-MVOJQ672.js";
|
|
9
9
|
import {
|
|
10
10
|
isRecord
|
|
11
11
|
} from "./chunk-UZSNFLDQ.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-JUAWHYTB.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-R5H6BAZ7.js";
|
|
18
18
|
import {
|
|
19
19
|
AppServerProcess,
|
|
20
20
|
buildCodexAgentEnv
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-KO4T2ZEK.js";
|
|
22
|
+
import "./chunk-MVOJQ672.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-JUAWHYTB.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-CGB2TKIK.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-R5H6BAZ7.js";
|
|
69
69
|
import {
|
|
70
70
|
publishedPullRequestUrls
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-PP3JCIGY.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-SIXG753K.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-6Y6LCLDA.js";
|
|
157
157
|
import {
|
|
158
158
|
getCodexModelProvider
|
|
159
|
-
} from "./chunk-
|
|
159
|
+
} from "./chunk-KO4T2ZEK.js";
|
|
160
160
|
import {
|
|
161
161
|
SUBPROCESS_MAX_BUFFER,
|
|
162
162
|
execAsync,
|
|
163
163
|
execFileAsync
|
|
164
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-MVOJQ672.js";
|
|
165
165
|
import {
|
|
166
166
|
isRecord as isRecord2
|
|
167
167
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -432,7 +432,7 @@ import {
|
|
|
432
432
|
workspaceTokenRequestSchema,
|
|
433
433
|
workspaceTokenResponseSchema,
|
|
434
434
|
wrapInTag
|
|
435
|
-
} from "./chunk-
|
|
435
|
+
} from "./chunk-JUAWHYTB.js";
|
|
436
436
|
import {
|
|
437
437
|
cloneMcpConfig,
|
|
438
438
|
ensureCompatibilityImports,
|
|
@@ -9941,7 +9941,8 @@ var ReplicasConfigService = class {
|
|
|
9941
9941
|
*/
|
|
9942
9942
|
async initialize(beforeHooks = Promise.resolve()) {
|
|
9943
9943
|
await this.loadConfigs();
|
|
9944
|
-
if (ENGINE_ENV.
|
|
9944
|
+
if (ENGINE_ENV.REPLICAS_MOTHERSHIP) await Promise.all([...this.hookProcessGroups.keys()].map((owner) => this.stopStartHookProcesses(owner)));
|
|
9945
|
+
if (ENGINE_ENV.REPLICAS_DISABLE_AUTO_START_HOOKS || ENGINE_ENV.REPLICAS_MOTHERSHIP) {
|
|
9945
9946
|
this.hooksRunning = false;
|
|
9946
9947
|
this.hooksCompleted = false;
|
|
9947
9948
|
this.hooksFailed = false;
|
|
@@ -10558,7 +10559,7 @@ async function attemptRegistration(signal) {
|
|
|
10558
10559
|
}
|
|
10559
10560
|
}
|
|
10560
10561
|
async function registerDesktopPreview(signal) {
|
|
10561
|
-
if (!ENGINE_ENV.REPLICAS_WORKSPACE_ID) {
|
|
10562
|
+
if (!ENGINE_ENV.REPLICAS_WORKSPACE_ID || ENGINE_ENV.REPLICAS_MOTHERSHIP) {
|
|
10562
10563
|
return;
|
|
10563
10564
|
}
|
|
10564
10565
|
const deadline = Date.now() + REGISTRATION_TIMEOUT_MS;
|
|
@@ -14046,8 +14047,8 @@ var ClaudeManager = class _ClaudeManager extends CodingAgentManager {
|
|
|
14046
14047
|
/** Query inputs shared by real sessions and slash-command discovery. */
|
|
14047
14048
|
async buildSharedQueryOptions() {
|
|
14048
14049
|
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
|
|
14050
|
-
CLAUDE_CODE_TERMINAL_MCP_TOOLS: `mcp__${REPLICAS_MCP_SERVER_NAME}__${
|
|
14050
|
+
// Claude Code nudges a turn that ends without text to write some, unless it called one of these tools; a Mothership handles ship events and board answers with only these.
|
|
14051
|
+
CLAUDE_CODE_TERMINAL_MCP_TOOLS: [REPLICAS_MCP_TOOLS.updateBoard, REPLICAS_MCP_TOOLS.spawnSubagent, REPLICAS_MCP_TOOLS.messageSubagent].map((tool) => `mcp__${REPLICAS_MCP_SERVER_NAME}__${tool}`).join(","),
|
|
14051
14052
|
...this.subagentMcpParentChatId() && { CLAUDE_CODE_STREAM_CLOSE_TIMEOUT: "900000" },
|
|
14052
14053
|
...this.originChatId && { REPLICAS_CHAT_ID: this.originChatId }
|
|
14053
14054
|
});
|
|
@@ -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-PP3JCIGY.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-JUAWHYTB.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