replicas-engine 0.1.915 → 0.1.917
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-4MNI76AN.js → asp-host-WSSNMBWI.js} +4 -4
- package/dist/src/{chunk-KFYMURNS.js → chunk-2VE2S7EE.js} +3 -3
- package/dist/src/{chunk-FY4FRB2S.js → chunk-HPGV4A6R.js} +2 -2
- package/dist/src/{chunk-TJXPELYE.js → chunk-JKZGFMCA.js} +1 -1
- package/dist/src/{chunk-VQ4PVUQ3.js → chunk-KFONTLVN.js} +1 -1
- package/dist/src/{chunk-ET2HEMD2.js → chunk-PKX25EPI.js} +5 -5
- package/dist/src/{chunk-E5334GU4.js → chunk-V3XMREIJ.js} +2 -2
- package/dist/src/command-protection-hook.js +3 -3
- package/dist/src/headless-agent.js +2 -2
- package/dist/src/index.js +47 -17
- package/dist/src/post-tool-pr-hook.js +2 -2
- package/dist/src/relay-mcp.js +1 -1
- package/package.json +1 -1
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
getCodexAspHost,
|
|
6
6
|
restartCodexAspHost,
|
|
7
7
|
restartCodexAspHostIfRunning
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-PKX25EPI.js";
|
|
9
|
+
import "./chunk-KFONTLVN.js";
|
|
10
|
+
import "./chunk-V3XMREIJ.js";
|
|
11
11
|
import "./chunk-UZSNFLDQ.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-2VE2S7EE.js";
|
|
13
13
|
import "./chunk-VEQXQN22.js";
|
|
14
14
|
export {
|
|
15
15
|
getCodexAspHost,
|
|
@@ -212,14 +212,14 @@ var CLAUDE_OPUS_5_BEDROCK_MODEL = "anthropic.claude-opus-5";
|
|
|
212
212
|
var CLAUDE_OPUS_4_8_BEDROCK_MODEL = "us.anthropic.claude-opus-4-8";
|
|
213
213
|
var CLAUDE_SONNET_5_BEDROCK_MODEL = "anthropic.claude-sonnet-5";
|
|
214
214
|
var CLAUDE_HAIKU_4_5_BEDROCK_MODEL = "us.anthropic.claude-haiku-4-5-20251001-v1:0";
|
|
215
|
-
var DEFAULT_CLAUDE_MODEL =
|
|
215
|
+
var DEFAULT_CLAUDE_MODEL = CLAUDE_OPUS_5_5_MODEL;
|
|
216
216
|
var GPT_6_ASTRA_MODEL = "gpt-6-astra";
|
|
217
217
|
var GPT_6_SOL_MODEL = "gpt-6-sol";
|
|
218
218
|
var GPT_6_LUNA_MODEL = "gpt-6-luna";
|
|
219
219
|
var GPT_5_6_SOL_MODEL = "gpt-5.6-sol";
|
|
220
220
|
var GPT_5_6_TERRA_MODEL = "gpt-5.6-terra";
|
|
221
221
|
var GPT_5_6_LUNA_MODEL = "gpt-5.6-luna";
|
|
222
|
-
var DEFAULT_CODEX_MODEL =
|
|
222
|
+
var DEFAULT_CODEX_MODEL = GPT_6_SOL_MODEL;
|
|
223
223
|
var DEFAULT_CURSOR_MODEL = "composer-2.5";
|
|
224
224
|
var DEFAULT_OPENCODE_MODEL = "z-ai/glm-5.3";
|
|
225
225
|
var GLM_5_3_FLASH_MODEL = "z-ai/glm-5.3-flash";
|
|
@@ -321,7 +321,7 @@ var AGENT_MODELS = {
|
|
|
321
321
|
CLAUDE_SONNET_5_MODEL,
|
|
322
322
|
CLAUDE_HAIKU_4_5_MODEL
|
|
323
323
|
],
|
|
324
|
-
codex: [DEFAULT_CODEX_MODEL, GPT_6_ASTRA_MODEL,
|
|
324
|
+
codex: [DEFAULT_CODEX_MODEL, GPT_6_ASTRA_MODEL, GPT_6_LUNA_MODEL, GPT_5_6_SOL_MODEL, GPT_5_6_TERRA_MODEL, GPT_5_6_LUNA_MODEL, "gpt-5.5", "gpt-5.4", "gpt-5.4-mini", "gpt-5.2"],
|
|
325
325
|
cursor: [
|
|
326
326
|
CLAUDE_FABLE_5_1_MODEL,
|
|
327
327
|
CLAUDE_FABLE_5_MODEL,
|
|
@@ -3,12 +3,12 @@ import { createRequire as __createRequire } from 'node:module';
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
monolithRequest
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KFONTLVN.js";
|
|
7
7
|
import {
|
|
8
8
|
extractCommandProtectionCommandText,
|
|
9
9
|
findGitCommitSignals,
|
|
10
10
|
findPrMergeSignals
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-2VE2S7EE.js";
|
|
12
12
|
|
|
13
13
|
// src/services/command-protection-service.ts
|
|
14
14
|
var DEFAULT_COMMAND_PROTECTION_BLOCK_MESSAGE = "Blocked by Replicas command protection.";
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
ENGINE_ENV,
|
|
6
6
|
monolithRequest,
|
|
7
7
|
setAgentCredentialSnapshot
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-KFONTLVN.js";
|
|
9
9
|
import {
|
|
10
10
|
AppServerProcess,
|
|
11
11
|
SUBPROCESS_MAX_BUFFER,
|
|
12
12
|
buildCodexAgentEnv,
|
|
13
13
|
execFileAsync
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-V3XMREIJ.js";
|
|
15
15
|
import {
|
|
16
16
|
isRecord
|
|
17
17
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
listOpenAICompatibleModels,
|
|
26
26
|
readOllamaAuthEnv,
|
|
27
27
|
resolveOpenAICompatibleModelsUrl
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-2VE2S7EE.js";
|
|
29
29
|
|
|
30
30
|
// src/managers/codex-token-manager.ts
|
|
31
31
|
import { promises as fs } from "fs";
|
|
@@ -255,7 +255,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
|
|
|
255
255
|
await this.applyCredentialUpdate(++this.credentialGeneration, async () => {
|
|
256
256
|
await this.applyCredentialsResponse(data);
|
|
257
257
|
setAgentCredentialSnapshot("codex", data);
|
|
258
|
-
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-
|
|
258
|
+
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-WSSNMBWI.js");
|
|
259
259
|
await restartCodexAspHostIfRunning2();
|
|
260
260
|
});
|
|
261
261
|
await this.start(true);
|
|
@@ -275,7 +275,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
|
|
|
275
275
|
await this.applyCredentialUpdate(generation, async () => {
|
|
276
276
|
await this.applyCredentialsResponse(data);
|
|
277
277
|
if (restartOnChange && CODEX_AUTH_ENV_KEYS.some((key, index) => process.env[key] !== previousEnv[index])) {
|
|
278
|
-
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-
|
|
278
|
+
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-WSSNMBWI.js");
|
|
279
279
|
await restartCodexAspHostIfRunning2();
|
|
280
280
|
}
|
|
281
281
|
setAgentCredentialSnapshot("codex", data);
|
|
@@ -4,7 +4,7 @@ const require = __createRequire(import.meta.url);
|
|
|
4
4
|
import {
|
|
5
5
|
HOOK_EXEC_MAX_BUFFER_BYTES,
|
|
6
6
|
isVersionBelow
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2VE2S7EE.js";
|
|
8
8
|
|
|
9
9
|
// src/utils/codex-agent-env.ts
|
|
10
10
|
function buildCodexAgentEnv(source = process.env) {
|
|
@@ -245,7 +245,7 @@ function getCodexModelProvider(method) {
|
|
|
245
245
|
if (method === "foundry") return "azure";
|
|
246
246
|
return method === "ollama" || method === "openai-compatible" ? "replicas_openai_compatible" : "openai";
|
|
247
247
|
}
|
|
248
|
-
var ENGINE_PACKAGE_VERSION = "0.1.
|
|
248
|
+
var ENGINE_PACKAGE_VERSION = "0.1.917";
|
|
249
249
|
var INITIALIZE_METHOD = "initialize";
|
|
250
250
|
var INITIALIZED_NOTIFICATION = "initialized";
|
|
251
251
|
var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
|
|
@@ -3,12 +3,12 @@ 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-HPGV4A6R.js";
|
|
7
|
+
import "./chunk-KFONTLVN.js";
|
|
8
8
|
import {
|
|
9
9
|
isRecord
|
|
10
10
|
} from "./chunk-UZSNFLDQ.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-2VE2S7EE.js";
|
|
12
12
|
import "./chunk-VEQXQN22.js";
|
|
13
13
|
|
|
14
14
|
// src/command-protection-hook.ts
|
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
AppServerProcess,
|
|
10
10
|
buildCodexAgentEnv
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-V3XMREIJ.js";
|
|
12
12
|
import {
|
|
13
13
|
AGENT,
|
|
14
14
|
getMemoryOutputSafetyViolation,
|
|
15
15
|
headlessAgentRequestSchema
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-2VE2S7EE.js";
|
|
17
17
|
import "./chunk-VEQXQN22.js";
|
|
18
18
|
|
|
19
19
|
// 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-HPGV4A6R.js";
|
|
31
31
|
import {
|
|
32
32
|
ACCOUNT_RATE_LIMITS_UPDATED_METHOD,
|
|
33
33
|
AGENT_MESSAGE_DELTA_METHOD,
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
} from "./chunk-FLDA7BX3.js";
|
|
53
53
|
import {
|
|
54
54
|
publishedPullRequestUrls
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-JKZGFMCA.js";
|
|
56
56
|
import {
|
|
57
57
|
RELAY_MCP_TOOLS,
|
|
58
58
|
RELAY_MCP_TOOL_NAMES,
|
|
@@ -73,21 +73,21 @@ import {
|
|
|
73
73
|
refreshDelayMs,
|
|
74
74
|
restartCodexAspHost,
|
|
75
75
|
routineRefreshExclusions
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-PKX25EPI.js";
|
|
77
77
|
import {
|
|
78
78
|
ENGINE_ENV,
|
|
79
79
|
IS_WARMING_MODE,
|
|
80
80
|
monolithRequest,
|
|
81
81
|
monolithService,
|
|
82
82
|
setAgentCredentialSnapshot
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-KFONTLVN.js";
|
|
84
84
|
import {
|
|
85
85
|
AspClient,
|
|
86
86
|
SUBPROCESS_MAX_BUFFER,
|
|
87
87
|
execAsync,
|
|
88
88
|
execFileAsync,
|
|
89
89
|
getCodexModelProvider
|
|
90
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-V3XMREIJ.js";
|
|
91
91
|
import {
|
|
92
92
|
isRecord as isRecord2
|
|
93
93
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -313,7 +313,7 @@ import {
|
|
|
313
313
|
workspaceCredentialProviderSchema,
|
|
314
314
|
workspaceTokenRequestSchema,
|
|
315
315
|
workspaceTokenResponseSchema
|
|
316
|
-
} from "./chunk-
|
|
316
|
+
} from "./chunk-2VE2S7EE.js";
|
|
317
317
|
import {
|
|
318
318
|
cloneMcpConfig,
|
|
319
319
|
ensureCompatibilityImports,
|
|
@@ -8814,6 +8814,10 @@ async function resolveDiffBase(repoPath, defaultBranch) {
|
|
|
8814
8814
|
|
|
8815
8815
|
// src/git/service.ts
|
|
8816
8816
|
var FULL_DIFF_MAX_BUFFER = 50 * 1024 * 1024;
|
|
8817
|
+
var MAX_DIFF_FILE_BYTES = 1024 * 1024;
|
|
8818
|
+
var MAX_UNTRACKED_DIFF_BYTES = 10 * 1024 * 1024;
|
|
8819
|
+
var UNTRACKED_STAT_CONCURRENCY = 64;
|
|
8820
|
+
var BIG_FILE_THRESHOLD_CONFIG = ["-c", `core.bigFileThreshold=${MAX_DIFF_FILE_BYTES}`];
|
|
8817
8821
|
function appendUniqueUrl(urls, url3) {
|
|
8818
8822
|
return urls.includes(url3) ? urls : [...urls, url3];
|
|
8819
8823
|
}
|
|
@@ -8969,7 +8973,7 @@ var GitService = class {
|
|
|
8969
8973
|
return this.diffStatsInFlight.run(repoPath, async () => {
|
|
8970
8974
|
try {
|
|
8971
8975
|
const diffBase = await resolveDiffBase(repoPath, defaultBranch);
|
|
8972
|
-
const shortstat = await runGitCommand(["diff", diffBase, "--shortstat", "-M"], repoPath);
|
|
8976
|
+
const shortstat = await runGitCommand([...BIG_FILE_THRESHOLD_CONFIG, "diff", diffBase, "--shortstat", "-M"], repoPath);
|
|
8973
8977
|
let added = 0;
|
|
8974
8978
|
let removed = 0;
|
|
8975
8979
|
const addedMatch = shortstat.match(/(\d+) insertion/);
|
|
@@ -8991,23 +8995,48 @@ var GitService = class {
|
|
|
8991
8995
|
}
|
|
8992
8996
|
});
|
|
8993
8997
|
}
|
|
8994
|
-
async
|
|
8998
|
+
async listUntrackedFiles(repoPath) {
|
|
8995
8999
|
const { stdout } = await execFileAsync("git", ["ls-files", "--others", "--exclude-standard", "-z"], {
|
|
8996
9000
|
cwd: repoPath,
|
|
8997
9001
|
encoding: "utf-8",
|
|
8998
9002
|
maxBuffer: SUBPROCESS_MAX_BUFFER
|
|
8999
9003
|
});
|
|
9000
|
-
|
|
9004
|
+
const paths = stdout.split("\0").filter(Boolean);
|
|
9005
|
+
const files = [];
|
|
9006
|
+
for (let i = 0; i < paths.length; i += UNTRACKED_STAT_CONCURRENCY) {
|
|
9007
|
+
const batch = await Promise.all(paths.slice(i, i + UNTRACKED_STAT_CONCURRENCY).map(async (path7) => {
|
|
9008
|
+
try {
|
|
9009
|
+
return { path: path7, size: (await stat(join4(repoPath, path7))).size };
|
|
9010
|
+
} catch {
|
|
9011
|
+
return null;
|
|
9012
|
+
}
|
|
9013
|
+
}));
|
|
9014
|
+
files.push(...batch.filter((file) => file !== null));
|
|
9015
|
+
}
|
|
9016
|
+
let remainingBytes = MAX_UNTRACKED_DIFF_BYTES;
|
|
9017
|
+
return files.map(({ path: path7, size }) => {
|
|
9018
|
+
const tooLarge = size > MAX_DIFF_FILE_BYTES || size > remainingBytes;
|
|
9019
|
+
if (!tooLarge) remainingBytes -= size;
|
|
9020
|
+
return { path: path7, tooLarge };
|
|
9021
|
+
});
|
|
9001
9022
|
}
|
|
9002
9023
|
async getUntrackedDiff(repoPath) {
|
|
9003
|
-
const
|
|
9004
|
-
|
|
9024
|
+
const files = await this.listUntrackedFiles(repoPath);
|
|
9025
|
+
const largeFilesDiff = files.filter((file) => file.tooLarge).map(({ path: path7 }) => {
|
|
9026
|
+
const quote = (prefixed) => /[\x00-\x1f"\\]/.test(prefixed) ? JSON.stringify(prefixed) : prefixed;
|
|
9027
|
+
return `diff --git ${quote(`a/${path7}`)} ${quote(`b/${path7}`)}
|
|
9028
|
+
new file mode 100644
|
|
9029
|
+
Binary files /dev/null and ${quote(`b/${path7}`)} differ
|
|
9030
|
+
`;
|
|
9031
|
+
}).join("");
|
|
9032
|
+
const paths = files.filter((file) => !file.tooLarge).map((file) => file.path);
|
|
9033
|
+
if (paths.length === 0) return largeFilesDiff;
|
|
9005
9034
|
try {
|
|
9006
9035
|
await execFileAsync("git", ["add", "--intent-to-add", "--", ...paths], {
|
|
9007
9036
|
cwd: repoPath,
|
|
9008
9037
|
maxBuffer: SUBPROCESS_MAX_BUFFER
|
|
9009
9038
|
});
|
|
9010
|
-
return await this.readUntrackedDiff(repoPath, paths);
|
|
9039
|
+
return await this.readUntrackedDiff(repoPath, paths) + largeFilesDiff;
|
|
9011
9040
|
} finally {
|
|
9012
9041
|
try {
|
|
9013
9042
|
await execFileAsync("git", ["reset", "--", ...paths], {
|
|
@@ -9052,17 +9081,18 @@ var GitService = class {
|
|
|
9052
9081
|
}
|
|
9053
9082
|
async countUntrackedAddedLines(repoPath) {
|
|
9054
9083
|
try {
|
|
9055
|
-
const
|
|
9084
|
+
const files = await this.listUntrackedFiles(repoPath);
|
|
9056
9085
|
let total = 0;
|
|
9057
|
-
for (const path7 of
|
|
9086
|
+
for (const { path: path7, tooLarge } of files) {
|
|
9087
|
+
if (tooLarge) continue;
|
|
9058
9088
|
try {
|
|
9059
9089
|
const contents = await readFile3(join4(repoPath, path7));
|
|
9060
9090
|
if (contents.length === 0 || contents.includes(0)) {
|
|
9061
9091
|
continue;
|
|
9062
9092
|
}
|
|
9063
9093
|
let lines = 0;
|
|
9064
|
-
for (
|
|
9065
|
-
|
|
9094
|
+
for (let index = contents.indexOf(10); index !== -1; index = contents.indexOf(10, index + 1)) {
|
|
9095
|
+
lines += 1;
|
|
9066
9096
|
}
|
|
9067
9097
|
total += lines + (contents[contents.length - 1] === 10 ? 0 : 1);
|
|
9068
9098
|
} catch {
|
|
@@ -9078,7 +9108,7 @@ var GitService = class {
|
|
|
9078
9108
|
return this.fullDiffInFlight.run(repoPath, async () => {
|
|
9079
9109
|
try {
|
|
9080
9110
|
const diffBase = await resolveDiffBase(repoPath, defaultBranch);
|
|
9081
|
-
const { stdout: trackedDiff } = await execFileAsync("git", ["diff", diffBase, "-M", "-C"], {
|
|
9111
|
+
const { stdout: trackedDiff } = await execFileAsync("git", [...BIG_FILE_THRESHOLD_CONFIG, "diff", diffBase, "-M", "-C"], {
|
|
9082
9112
|
cwd: repoPath,
|
|
9083
9113
|
encoding: "utf-8",
|
|
9084
9114
|
maxBuffer: FULL_DIFF_MAX_BUFFER
|
|
@@ -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-JKZGFMCA.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-2VE2S7EE.js";
|
|
13
13
|
import "./chunk-VEQXQN22.js";
|
|
14
14
|
|
|
15
15
|
// src/services/post-tool-pr-notifier.ts
|
package/dist/src/relay-mcp.js
CHANGED