replicas-engine 0.1.1670 → 0.1.1672
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-TTMTMJ5X.js → asp-host-EHKAM7UD.js} +5 -5
- package/dist/src/{chunk-BQ7OQ3NH.js → chunk-CZH5RDHJ.js} +1 -1
- package/dist/src/{chunk-PN373SZW.js → chunk-DAXRVWFO.js} +2 -2
- package/dist/src/{chunk-LVKOCASF.js → chunk-JQZPT27P.js} +2 -2
- package/dist/src/{chunk-XDT43IRI.js → chunk-OBZIIP3J.js} +6 -6
- package/dist/src/{chunk-SC2LXVT5.js → chunk-Q7J6PWZY.js} +4 -2
- package/dist/src/{chunk-H6QURQLP.js → chunk-W5CNUHSZ.js} +8 -5
- package/dist/src/{chunk-36ULVTKF.js → chunk-XSG2LJUV.js} +1 -1
- package/dist/src/{chunk-F74LU6MQ.js → chunk-ZZCQ57DY.js} +2 -2
- package/dist/src/command-protection-hook.js +4 -4
- package/dist/src/headless-agent.js +4 -4
- package/dist/src/index.js +527 -167
- package/dist/src/post-tool-pr-hook.js +2 -2
- package/dist/src/subagent-mcp.js +1 -1
- package/package.json +1 -1
- package/scripts/opencode +5 -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-OBZIIP3J.js";
|
|
12
|
+
import "./chunk-ZZCQ57DY.js";
|
|
13
|
+
import "./chunk-W5CNUHSZ.js";
|
|
14
|
+
import "./chunk-CZH5RDHJ.js";
|
|
15
15
|
import "./chunk-UZSNFLDQ.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-Q7J6PWZY.js";
|
|
17
17
|
import "./chunk-VEQXQN22.js";
|
|
18
18
|
export {
|
|
19
19
|
CODEX_ULTRAFAST_SERVICE_TIER,
|
|
@@ -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-Q7J6PWZY.js";
|
|
7
7
|
|
|
8
8
|
// src/utils/exec.ts
|
|
9
9
|
import { exec, execFile } from "child_process";
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
ENGINE_ENV,
|
|
6
6
|
monolithRequest,
|
|
7
7
|
runGitCommand
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZZCQ57DY.js";
|
|
9
9
|
import {
|
|
10
10
|
COMMAND_PROTECTION_MAX_MESSAGE_FILE_BYTES,
|
|
11
11
|
COMMAND_PROTECTION_REPO_GIT_ARGS,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
parseCommandProtectionRequest,
|
|
19
19
|
toCommandProtectionRepoState,
|
|
20
20
|
withRetry
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-Q7J6PWZY.js";
|
|
22
22
|
|
|
23
23
|
// src/services/command-protection-service.ts
|
|
24
24
|
import { readFile, stat } from "fs/promises";
|
|
@@ -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-W5CNUHSZ.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-Q7J6PWZY.js";
|
|
19
19
|
|
|
20
20
|
// src/managers/codex-asp/notification-dispatch.ts
|
|
21
21
|
var TURN_STARTED_METHOD = "turn/started";
|
|
@@ -12,15 +12,15 @@ import {
|
|
|
12
12
|
resolveDiffBase,
|
|
13
13
|
runGitCommand,
|
|
14
14
|
setAgentCredentialSnapshot
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ZZCQ57DY.js";
|
|
16
16
|
import {
|
|
17
17
|
AppServerProcess,
|
|
18
18
|
buildCodexAgentEnv
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-W5CNUHSZ.js";
|
|
20
20
|
import {
|
|
21
21
|
SUBPROCESS_MAX_BUFFER,
|
|
22
22
|
execFileAsync
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-CZH5RDHJ.js";
|
|
24
24
|
import {
|
|
25
25
|
isRecord
|
|
26
26
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
shrunkImageSize,
|
|
62
62
|
splitManagerInstructions,
|
|
63
63
|
withTimeout
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-Q7J6PWZY.js";
|
|
65
65
|
|
|
66
66
|
// src/managers/codex-token-manager.ts
|
|
67
67
|
import { promises as fs } from "fs";
|
|
@@ -461,7 +461,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
|
|
|
461
461
|
await this.applyCredentialUpdate(++this.credentialGeneration, async () => {
|
|
462
462
|
await this.applyCredentialsResponse(data);
|
|
463
463
|
setAgentCredentialSnapshot("codex", data);
|
|
464
|
-
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-
|
|
464
|
+
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-EHKAM7UD.js");
|
|
465
465
|
await restartCodexAspHostIfRunning2();
|
|
466
466
|
});
|
|
467
467
|
await this.start(true);
|
|
@@ -483,7 +483,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
|
|
|
483
483
|
const accountChanged = ENGINE_ENV.REPLICAS_AGENT_CREDENTIALS.codex?.credentialId !== data.credentialId;
|
|
484
484
|
await this.applyCredentialsResponse(data);
|
|
485
485
|
if (restartOnChange && (accountChanged || CODEX_AUTH_ENV_KEYS.some((key, index) => process.env[key] !== previousEnv[index]))) {
|
|
486
|
-
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-
|
|
486
|
+
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-EHKAM7UD.js");
|
|
487
487
|
await restartCodexAspHostIfRunning2();
|
|
488
488
|
}
|
|
489
489
|
setAgentCredentialSnapshot("codex", data);
|
|
@@ -12621,6 +12621,7 @@ import { z as z22 } from "zod";
|
|
|
12621
12621
|
// ../shared/src/workspace-attention.ts
|
|
12622
12622
|
var WORKSPACE_ATTENTION_REASONS = ["question", "plan", "variables", "blocked", "setup", "deploy_failed"];
|
|
12623
12623
|
var CHAT_ATTENTION_REASONS = ["question", "blocked"];
|
|
12624
|
+
var INPUT_REQUEST_REASONS = ["question", "plan"];
|
|
12624
12625
|
|
|
12625
12626
|
// ../shared/src/routes/push.ts
|
|
12626
12627
|
var registerPushDeviceRequestSchema = z22.discriminatedUnion("platform", [
|
|
@@ -21562,7 +21563,7 @@ async function withRetry(label, fn, options) {
|
|
|
21562
21563
|
}
|
|
21563
21564
|
|
|
21564
21565
|
// ../shared/src/tensorlake.ts
|
|
21565
|
-
var TENSORLAKE_IMAGE_NAME = "replicas-sandbox-2026-11-20-
|
|
21566
|
+
var TENSORLAKE_IMAGE_NAME = "replicas-sandbox-2026-11-20-v20";
|
|
21566
21567
|
var TENSORLAKE_DISK_MB = 100 * 1024;
|
|
21567
21568
|
|
|
21568
21569
|
// ../shared/src/egress.ts
|
|
@@ -23020,6 +23021,7 @@ var workspaceTurnCompletionSchema = z43.object({
|
|
|
23020
23021
|
pullRequestFeedback: z43.boolean().optional(),
|
|
23021
23022
|
attention: z43.object({ reason: z43.enum(CHAT_ATTENTION_REASONS), userId: z43.string() }).optional()
|
|
23022
23023
|
});
|
|
23024
|
+
var inputRequestRaisedSchema = z43.object({ reason: z43.enum(INPUT_REQUEST_REASONS), userId: z43.string(), chatId: z43.string(), since: z43.string() });
|
|
23023
23025
|
var workspaceEventSchemaByType = z43.discriminatedUnion("type", [
|
|
23024
23026
|
z43.object({
|
|
23025
23027
|
type: z43.literal("workspace.changed"),
|
|
@@ -23073,7 +23075,7 @@ var workspaceEventSchemaByType = z43.discriminatedUnion("type", [
|
|
|
23073
23075
|
}),
|
|
23074
23076
|
z43.object({ type: z43.enum(["manager.board.changed", "mothership.board.changed"]), workspaceId: z43.string(), ts: z43.string() }),
|
|
23075
23077
|
z43.object({ type: z43.literal("issues.synced"), syncId: z43.number(), ts: z43.string() }),
|
|
23076
|
-
z43.object({ type: z43.literal("needs-you.changed"), workspaceId: z43.string().nullable(), userId: z43.string().optional(), ts: z43.string() }),
|
|
23078
|
+
z43.object({ type: z43.literal("needs-you.changed"), workspaceId: z43.string().nullable(), userId: z43.string().optional(), request: inputRequestRaisedSchema.optional(), ts: z43.string() }),
|
|
23077
23079
|
z43.object({
|
|
23078
23080
|
type: z43.literal("workspace.shared"),
|
|
23079
23081
|
workspaceId: z43.string(),
|
|
@@ -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-CZH5RDHJ.js";
|
|
7
7
|
import {
|
|
8
8
|
isVersionBelow
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-Q7J6PWZY.js";
|
|
10
10
|
|
|
11
11
|
// src/utils/codex-agent-env.ts
|
|
12
12
|
function buildCodexAgentEnv(source = process.env) {
|
|
@@ -32,6 +32,8 @@ var DEFAULT_REQUEST_TIMEOUT_MS = 12e4;
|
|
|
32
32
|
function hasOwn(record, key) {
|
|
33
33
|
return Object.prototype.hasOwnProperty.call(record, key);
|
|
34
34
|
}
|
|
35
|
+
var AspRequestTimeoutError = class extends Error {
|
|
36
|
+
};
|
|
35
37
|
var AspClient = class {
|
|
36
38
|
stdin;
|
|
37
39
|
stdout;
|
|
@@ -71,7 +73,7 @@ var AspClient = class {
|
|
|
71
73
|
const timeoutMs = opts?.timeoutMs ?? DEFAULT_REQUEST_TIMEOUT_MS;
|
|
72
74
|
const timer = timeoutMs > 0 ? setTimeout(() => {
|
|
73
75
|
this.pending.delete(id);
|
|
74
|
-
reject(new
|
|
76
|
+
reject(new AspRequestTimeoutError(`ASP request timed out for ${method}`));
|
|
75
77
|
}, timeoutMs) : null;
|
|
76
78
|
this.pending.set(id, { resolve, reject, method, timer });
|
|
77
79
|
});
|
|
@@ -240,7 +242,7 @@ function getCodexModelProvider(method) {
|
|
|
240
242
|
if (method === "foundry") return "azure";
|
|
241
243
|
return method === "ollama" || method === "openai-compatible" ? "replicas_openai_compatible" : "openai";
|
|
242
244
|
}
|
|
243
|
-
var ENGINE_PACKAGE_VERSION = "0.1.
|
|
245
|
+
var ENGINE_PACKAGE_VERSION = "0.1.1672";
|
|
244
246
|
var INITIALIZE_METHOD = "initialize";
|
|
245
247
|
var INITIALIZED_NOTIFICATION = "initialized";
|
|
246
248
|
var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
|
|
@@ -324,7 +326,7 @@ var AppServerProcess = class {
|
|
|
324
326
|
}
|
|
325
327
|
});
|
|
326
328
|
child.on("exit", (code, signal) => {
|
|
327
|
-
this.client?.dispose();
|
|
329
|
+
this.client?.dispose(new Error(`the Codex app-server process exited (${signal ?? `code ${code}`})`));
|
|
328
330
|
this.client = null;
|
|
329
331
|
this.child = null;
|
|
330
332
|
if (!this.shuttingDown) {
|
|
@@ -479,6 +481,7 @@ var AppServerProcess = class {
|
|
|
479
481
|
|
|
480
482
|
export {
|
|
481
483
|
buildCodexAgentEnv,
|
|
484
|
+
AspRequestTimeoutError,
|
|
482
485
|
AspClient,
|
|
483
486
|
getCodexModelProvider,
|
|
484
487
|
AppServerProcess
|
|
@@ -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-CZH5RDHJ.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-Q7J6PWZY.js";
|
|
25
25
|
|
|
26
26
|
// src/runtime-env-loader.ts
|
|
27
27
|
import { readFileSync } from "fs";
|
|
@@ -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-DAXRVWFO.js";
|
|
7
|
+
import "./chunk-ZZCQ57DY.js";
|
|
8
|
+
import "./chunk-CZH5RDHJ.js";
|
|
9
9
|
import {
|
|
10
10
|
isRecord
|
|
11
11
|
} from "./chunk-UZSNFLDQ.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-Q7J6PWZY.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-JQZPT27P.js";
|
|
18
18
|
import {
|
|
19
19
|
AppServerProcess,
|
|
20
20
|
buildCodexAgentEnv
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-W5CNUHSZ.js";
|
|
22
|
+
import "./chunk-CZH5RDHJ.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-Q7J6PWZY.js";
|
|
33
33
|
import "./chunk-VEQXQN22.js";
|
|
34
34
|
|
|
35
35
|
// src/headless-agent.ts
|