replicas-engine 0.1.1429 → 0.1.1431
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-UX6RKQSJ.js → asp-host-L5NIBNSH.js} +5 -5
- package/dist/src/{chunk-M7YDLVFS.js → chunk-HIOGMGBF.js} +5 -6
- package/dist/src/{chunk-OAT2LGA4.js → chunk-IB3GCTDW.js} +2 -3
- package/dist/src/{chunk-VDABSPMH.js → chunk-JUAWHYTB.js} +45 -4
- package/dist/src/{chunk-Q3WOHMQ5.js → chunk-MVOJQ672.js} +1 -1
- package/dist/src/{chunk-OCOTWHFK.js → chunk-NW5ZLF7J.js} +2 -2
- package/dist/src/{chunk-KKZV5OJE.js → chunk-PP3JCIGY.js} +1 -1
- package/dist/src/{chunk-SBVZFS6C.js → chunk-ZXPNBVYD.js} +6 -6
- package/dist/src/{chunk-MXAMSUXP.js → chunk-ZY4PWQF2.js} +3 -3
- package/dist/src/command-protection-hook.js +4 -4
- package/dist/src/headless-agent.js +4 -4
- package/dist/src/index.js +12 -13
- 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-ZXPNBVYD.js";
|
|
12
|
+
import "./chunk-IB3GCTDW.js";
|
|
13
|
+
import "./chunk-ZY4PWQF2.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,
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getOriginDefaultBranch,
|
|
7
7
|
monolithRequest,
|
|
8
8
|
runGitCommand
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-IB3GCTDW.js";
|
|
10
10
|
import {
|
|
11
11
|
extractCommandProtectionCommandText,
|
|
12
12
|
findCommandProtectionGitLookups,
|
|
@@ -14,14 +14,13 @@ 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.";
|
|
25
24
|
async function resolveGitContext({ repoDirs, messageFiles }) {
|
|
26
25
|
if (repoDirs.length === 0 && messageFiles.length === 0) return void 0;
|
|
27
26
|
const git = (dir, args) => runGitCommand(args, dir).then((output) => output || null, () => null);
|
|
@@ -60,9 +59,9 @@ function failClosed(reason, matchedSignals) {
|
|
|
60
59
|
}
|
|
61
60
|
async function evaluateCommandProtection(request, signal) {
|
|
62
61
|
const parsed = parseCommandProtectionRequest(request);
|
|
63
|
-
const
|
|
64
|
-
if (
|
|
65
|
-
return { allowed: false, enabled: true, reason:
|
|
62
|
+
const scoutSignals = ENGINE_ENV.REPLICAS_SCOUT ? findScoutRepoWriteSignals(parsed) : [];
|
|
63
|
+
if (scoutSignals.length > 0) {
|
|
64
|
+
return { allowed: false, enabled: true, reason: SCOUT_REPO_WRITE_BLOCK_MESSAGE, matchedSignals: scoutSignals };
|
|
66
65
|
}
|
|
67
66
|
const gitContext = await resolveGitContext(findCommandProtectionGitLookups(parsed));
|
|
68
67
|
const matchedSignals = [...findGitCommitSignals(parsed), ...findPrMergeSignals(parsed, gitContext).signals];
|
|
@@ -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,7 +172,6 @@ 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",
|
|
176
175
|
REPLICAS_MAX_LIVE_AGENT_PROCESSES: Number(readEnv("REPLICAS_MAX_LIVE_AGENT_PROCESSES")) || void 0
|
|
177
176
|
};
|
|
178
177
|
delete process.env.REPLICAS_ENV_DEVICES;
|
|
@@ -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);
|
|
@@ -14823,9 +14832,10 @@ function removeTag(text4, tag) {
|
|
|
14823
14832
|
function stripReplicasInstructionBlock(text4) {
|
|
14824
14833
|
return removeTag(text4, REPLICAS_INSTRUCTIONS_TAG);
|
|
14825
14834
|
}
|
|
14835
|
+
var BOARD_ANSWER_NOTE = "The user answered on the board.";
|
|
14826
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.
|
|
14827
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.
|
|
14828
|
-
- 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.
|
|
14829
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.
|
|
14830
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.
|
|
14831
14841
|
`;
|
|
@@ -14851,6 +14861,7 @@ var SCOUT_REACTION_RULES = `\`event=reaction:\u2026\`: someone reacted to a mess
|
|
|
14851
14861
|
// ../shared/src/message-origin.ts
|
|
14852
14862
|
var UUID = UUID_RE.source.slice(1, -1);
|
|
14853
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}>`);
|
|
14854
14865
|
var SCHEDULED_NOTE = "This is a message you or a teammate scheduled earlier, delivered into this workspace.";
|
|
14855
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, "\\.")}`);
|
|
14856
14867
|
function parseMessageOrigin(raw) {
|
|
@@ -14864,6 +14875,8 @@ function parseMessageOrigin(raw) {
|
|
|
14864
14875
|
}
|
|
14865
14876
|
if (typeof name === "string") return { kind: "workspace", id: workspace[2], name, body: stripReplicasInstructionBlock(raw.slice(workspace[0].length)) };
|
|
14866
14877
|
}
|
|
14878
|
+
const board = raw.match(BOARD_ANSWER);
|
|
14879
|
+
if (board) return { kind: "board", body: stripReplicasInstructionBlock(raw.slice(board[0].length)) };
|
|
14867
14880
|
const automation = raw.match(SCHEDULED_FOLLOW_UP);
|
|
14868
14881
|
return automation ? { kind: "automation", id: automation[2], name: automation[1].trim(), body: stripReplicasInstructionBlock(raw.slice(automation[0].length)) } : null;
|
|
14869
14882
|
}
|
|
@@ -15946,6 +15959,33 @@ var DREAM_VERDICT_CHECKS = dreamVerdictChecksSchema.keyof().options;
|
|
|
15946
15959
|
var dreamVerdictSchema = dreamVerdictChecksSchema.extend({ approve: z25.boolean(), reason: z25.string() });
|
|
15947
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."`;
|
|
15948
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
|
+
|
|
15949
15989
|
// ../shared/src/user-message-matching.ts
|
|
15950
15990
|
var parsedTimestamps = /* @__PURE__ */ new Map();
|
|
15951
15991
|
function parseTimestampMs(timestamp) {
|
|
@@ -16179,11 +16219,12 @@ function describeToolCall(message2, base) {
|
|
|
16179
16219
|
const replicasTool = replicasToolName(message2);
|
|
16180
16220
|
const mothershipAction = replicasTool ? MOTHERSHIP_TOOL_ACTIONS[replicasTool] : void 0;
|
|
16181
16221
|
if (mothershipAction) {
|
|
16222
|
+
const target = workspaceTargetFromToolOutput(message2.output);
|
|
16182
16223
|
const step = {
|
|
16183
16224
|
...base,
|
|
16184
16225
|
key,
|
|
16185
16226
|
failed: base.failed || Boolean(message2.output?.startsWith("Error:")),
|
|
16186
|
-
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") }
|
|
16187
16228
|
};
|
|
16188
16229
|
if (mothershipAction === "spawn") return { ...step, category: "agent", icon: "network", live: "Spawning", done: "Spawned", detail: "mothership" };
|
|
16189
16230
|
if (mothershipAction === "send") return { ...step, category: "agent", icon: "message", live: "Messaging", done: "Messaged", detail: "mothership" };
|
|
@@ -18482,8 +18523,8 @@ function attachSendersToMessages(messages, senders) {
|
|
|
18482
18523
|
const userIndices = [];
|
|
18483
18524
|
const attachSender = (message2, sender) => message2.type === "user" ? {
|
|
18484
18525
|
...message2,
|
|
18485
|
-
// Markers are plain text a person can copy, so a recorded person always wins over a ship or check-in marker.
|
|
18486
|
-
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,
|
|
18487
18528
|
senderUserId: sender.senderUserId,
|
|
18488
18529
|
senderEmail: sender.senderEmail,
|
|
18489
18530
|
...sender.senderDisplayName ? { senderDisplayName: sender.senderDisplayName } : {},
|
|
@@ -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-ZY4PWQF2.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-IB3GCTDW.js";
|
|
14
14
|
import {
|
|
15
15
|
AppServerProcess,
|
|
16
16
|
buildCodexAgentEnv
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-ZY4PWQF2.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-L5NIBNSH.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-L5NIBNSH.js");
|
|
345
345
|
await restartCodexAspHostIfRunning2();
|
|
346
346
|
}
|
|
347
347
|
setAgentCredentialSnapshot("codex", data);
|
|
@@ -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.1431";
|
|
244
244
|
var INITIALIZE_METHOD = "initialize";
|
|
245
245
|
var INITIALIZED_NOTIFICATION = "initialized";
|
|
246
246
|
var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
|
|
@@ -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-HIOGMGBF.js";
|
|
7
|
+
import "./chunk-IB3GCTDW.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-NW5ZLF7J.js";
|
|
18
18
|
import {
|
|
19
19
|
AppServerProcess,
|
|
20
20
|
buildCodexAgentEnv
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-ZY4PWQF2.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-HIOGMGBF.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-NW5ZLF7J.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-ZXPNBVYD.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-IB3GCTDW.js";
|
|
157
157
|
import {
|
|
158
158
|
getCodexModelProvider
|
|
159
|
-
} from "./chunk-
|
|
159
|
+
} from "./chunk-ZY4PWQF2.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,8 +9941,7 @@ var ReplicasConfigService = class {
|
|
|
9941
9941
|
*/
|
|
9942
9942
|
async initialize(beforeHooks = Promise.resolve()) {
|
|
9943
9943
|
await this.loadConfigs();
|
|
9944
|
-
if (ENGINE_ENV.
|
|
9945
|
-
if (ENGINE_ENV.REPLICAS_DISABLE_AUTO_START_HOOKS || ENGINE_ENV.REPLICAS_MOTHERSHIP) {
|
|
9944
|
+
if (ENGINE_ENV.REPLICAS_DISABLE_AUTO_START_HOOKS) {
|
|
9946
9945
|
this.hooksRunning = false;
|
|
9947
9946
|
this.hooksCompleted = false;
|
|
9948
9947
|
this.hooksFailed = false;
|
|
@@ -10559,7 +10558,7 @@ async function attemptRegistration(signal) {
|
|
|
10559
10558
|
}
|
|
10560
10559
|
}
|
|
10561
10560
|
async function registerDesktopPreview(signal) {
|
|
10562
|
-
if (!ENGINE_ENV.REPLICAS_WORKSPACE_ID
|
|
10561
|
+
if (!ENGINE_ENV.REPLICAS_WORKSPACE_ID) {
|
|
10563
10562
|
return;
|
|
10564
10563
|
}
|
|
10565
10564
|
const deadline = Date.now() + REGISTRATION_TIMEOUT_MS;
|
|
@@ -14047,8 +14046,8 @@ var ClaudeManager = class _ClaudeManager extends CodingAgentManager {
|
|
|
14047
14046
|
/** Query inputs shared by real sessions and slash-command discovery. */
|
|
14048
14047
|
async buildSharedQueryOptions() {
|
|
14049
14048
|
const env = buildClaudeAgentEnv({
|
|
14050
|
-
// Claude Code nudges a turn that ends without text to write some, unless it called one of these tools; a Mothership handles
|
|
14051
|
-
CLAUDE_CODE_TERMINAL_MCP_TOOLS: `mcp__${REPLICAS_MCP_SERVER_NAME}__${
|
|
14049
|
+
// 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.
|
|
14050
|
+
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(","),
|
|
14052
14051
|
...this.subagentMcpParentChatId() && { CLAUDE_CODE_STREAM_CLOSE_TIMEOUT: "900000" },
|
|
14053
14052
|
...this.originChatId && { REPLICAS_CHAT_ID: this.originChatId }
|
|
14054
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-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