replicas-engine 0.1.1430 → 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-CVQJKJWJ.js → asp-host-L5NIBNSH.js} +3 -3
- package/dist/src/{chunk-CGB2TKIK.js → chunk-HIOGMGBF.js} +4 -5
- package/dist/src/{chunk-6Y6LCLDA.js → chunk-IB3GCTDW.js} +0 -1
- package/dist/src/{chunk-R5H6BAZ7.js → chunk-NW5ZLF7J.js} +1 -1
- package/dist/src/{chunk-SIXG753K.js → chunk-ZXPNBVYD.js} +4 -4
- package/dist/src/{chunk-KO4T2ZEK.js → chunk-ZY4PWQF2.js} +1 -1
- package/dist/src/command-protection-hook.js +2 -2
- package/dist/src/headless-agent.js +2 -2
- package/dist/src/index.js +7 -8
- package/package.json +1 -1
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
listCodexModelsForDetails,
|
|
9
9
|
restartCodexAspHost,
|
|
10
10
|
restartCodexAspHostIfRunning
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-ZXPNBVYD.js";
|
|
12
|
+
import "./chunk-IB3GCTDW.js";
|
|
13
|
+
import "./chunk-ZY4PWQF2.js";
|
|
14
14
|
import "./chunk-MVOJQ672.js";
|
|
15
15
|
import "./chunk-UZSNFLDQ.js";
|
|
16
16
|
import "./chunk-JUAWHYTB.js";
|
|
@@ -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,
|
|
@@ -21,7 +21,6 @@ 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];
|
|
@@ -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;
|
|
@@ -10,11 +10,11 @@ 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
|
|
@@ -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);
|
|
@@ -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,8 +3,8 @@ 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-
|
|
6
|
+
} from "./chunk-HIOGMGBF.js";
|
|
7
|
+
import "./chunk-IB3GCTDW.js";
|
|
8
8
|
import "./chunk-MVOJQ672.js";
|
|
9
9
|
import {
|
|
10
10
|
isRecord
|
|
@@ -14,11 +14,11 @@ 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-
|
|
21
|
+
} from "./chunk-ZY4PWQF2.js";
|
|
22
22
|
import "./chunk-MVOJQ672.js";
|
|
23
23
|
import {
|
|
24
24
|
AGENT,
|
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,7 +65,7 @@ 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
71
|
} from "./chunk-PP3JCIGY.js";
|
|
@@ -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,10 +153,10 @@ 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,
|
|
@@ -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;
|