replicas-engine 0.1.1662 → 0.1.1665
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-DPQYKOC7.js → asp-host-3ONHINJY.js} +5 -5
- package/dist/src/{chunk-HLIZQ5C7.js → chunk-AZFJHXH6.js} +2 -2
- package/dist/src/{chunk-5ZDC4WLL.js → chunk-BWFKLJHJ.js} +6 -6
- package/dist/src/{chunk-KPWR7PGK.js → chunk-JJWUCU5M.js} +2 -2
- package/dist/src/{chunk-TNJGLQDQ.js → chunk-JQ2FVHUS.js} +3 -3
- package/dist/src/{chunk-2YRC3NF5.js → chunk-KJOMLSWD.js} +1 -1
- package/dist/src/{chunk-ABRMSDLY.js → chunk-KZKJCZ76.js} +1 -1
- package/dist/src/{chunk-MFUBBFAX.js → chunk-M2KVTSZT.js} +8 -1
- package/dist/src/{chunk-PS3SH6EP.js → chunk-R4Z4ZR4N.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 +23 -15
- 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-BWFKLJHJ.js";
|
|
12
|
+
import "./chunk-JJWUCU5M.js";
|
|
13
|
+
import "./chunk-JQ2FVHUS.js";
|
|
14
|
+
import "./chunk-KJOMLSWD.js";
|
|
15
15
|
import "./chunk-UZSNFLDQ.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-M2KVTSZT.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
|
AspClient
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JQ2FVHUS.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-M2KVTSZT.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-JJWUCU5M.js";
|
|
16
16
|
import {
|
|
17
17
|
AppServerProcess,
|
|
18
18
|
buildCodexAgentEnv
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-JQ2FVHUS.js";
|
|
20
20
|
import {
|
|
21
21
|
SUBPROCESS_MAX_BUFFER,
|
|
22
22
|
execFileAsync
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-KJOMLSWD.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-M2KVTSZT.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-3ONHINJY.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-3ONHINJY.js");
|
|
487
487
|
await restartCodexAspHostIfRunning2();
|
|
488
488
|
}
|
|
489
489
|
setAgentCredentialSnapshot("codex", data);
|
|
@@ -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-KJOMLSWD.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-M2KVTSZT.js";
|
|
25
25
|
|
|
26
26
|
// src/runtime-env-loader.ts
|
|
27
27
|
import { readFileSync } from "fs";
|
|
@@ -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-KJOMLSWD.js";
|
|
7
7
|
import {
|
|
8
8
|
isVersionBelow
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-M2KVTSZT.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.1665";
|
|
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-M2KVTSZT.js";
|
|
7
7
|
|
|
8
8
|
// src/utils/exec.ts
|
|
9
9
|
import { exec, execFile } from "child_process";
|
|
@@ -21193,7 +21193,7 @@ async function withRetry(label, fn, options) {
|
|
|
21193
21193
|
}
|
|
21194
21194
|
|
|
21195
21195
|
// ../shared/src/tensorlake.ts
|
|
21196
|
-
var TENSORLAKE_IMAGE_NAME = "replicas-sandbox-2026-11-20-
|
|
21196
|
+
var TENSORLAKE_IMAGE_NAME = "replicas-sandbox-2026-11-20-v12";
|
|
21197
21197
|
var TENSORLAKE_DISK_MB = 100 * 1024;
|
|
21198
21198
|
|
|
21199
21199
|
// ../shared/src/egress.ts
|
|
@@ -21350,6 +21350,12 @@ var SLASH_COMMANDS = [
|
|
|
21350
21350
|
providers: [...ENGINE_AGENT_PROVIDERS]
|
|
21351
21351
|
}))
|
|
21352
21352
|
];
|
|
21353
|
+
function canUseSlashCommandMode(provider2, mode, commands = SLASH_COMMANDS) {
|
|
21354
|
+
return commands.some((command) => command.command === `/${mode}` && command.providers.includes(provider2));
|
|
21355
|
+
}
|
|
21356
|
+
function canUseGoalMode(provider2) {
|
|
21357
|
+
return canUseSlashCommandMode(provider2, "goal");
|
|
21358
|
+
}
|
|
21353
21359
|
function mergeSlashCommands(...commandGroups) {
|
|
21354
21360
|
const seen = /* @__PURE__ */ new Set();
|
|
21355
21361
|
const commands = [];
|
|
@@ -23959,6 +23965,7 @@ export {
|
|
|
23959
23965
|
TENSORLAKE_IMAGE_NAME,
|
|
23960
23966
|
InFlightMap,
|
|
23961
23967
|
createProviderSlashCommand,
|
|
23968
|
+
canUseGoalMode,
|
|
23962
23969
|
mergeSlashCommands,
|
|
23963
23970
|
getSlashCommandsForProvider,
|
|
23964
23971
|
MAX_CODEX_GOAL_OBJECTIVE_CHARS,
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
ENGINE_ENV,
|
|
6
6
|
monolithRequest,
|
|
7
7
|
runGitCommand
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-JJWUCU5M.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-M2KVTSZT.js";
|
|
22
22
|
|
|
23
23
|
// src/services/command-protection-service.ts
|
|
24
24
|
import { readFile, stat } from "fs/promises";
|
|
@@ -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-R4Z4ZR4N.js";
|
|
7
|
+
import "./chunk-JJWUCU5M.js";
|
|
8
|
+
import "./chunk-KJOMLSWD.js";
|
|
9
9
|
import {
|
|
10
10
|
isRecord
|
|
11
11
|
} from "./chunk-UZSNFLDQ.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-M2KVTSZT.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-AZFJHXH6.js";
|
|
18
18
|
import {
|
|
19
19
|
AppServerProcess,
|
|
20
20
|
buildCodexAgentEnv
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-JQ2FVHUS.js";
|
|
22
|
+
import "./chunk-KJOMLSWD.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-M2KVTSZT.js";
|
|
33
33
|
import "./chunk-VEQXQN22.js";
|
|
34
34
|
|
|
35
35
|
// src/headless-agent.ts
|
package/dist/src/index.js
CHANGED
|
@@ -91,7 +91,7 @@ import {
|
|
|
91
91
|
evaluateCommandProtection,
|
|
92
92
|
extractToolCommand,
|
|
93
93
|
reportCommandProtectionBlock
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-R4Z4ZR4N.js";
|
|
95
95
|
import {
|
|
96
96
|
ACCOUNT_RATE_LIMITS_UPDATED_METHOD,
|
|
97
97
|
AGENT_MESSAGE_DELTA_METHOD,
|
|
@@ -129,10 +129,10 @@ import {
|
|
|
129
129
|
spawnMuseMsp,
|
|
130
130
|
startMuseSession,
|
|
131
131
|
uuidV7
|
|
132
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-AZFJHXH6.js";
|
|
133
133
|
import {
|
|
134
134
|
publishedPullRequestUrls
|
|
135
|
-
} from "./chunk-
|
|
135
|
+
} from "./chunk-KZKJCZ76.js";
|
|
136
136
|
import {
|
|
137
137
|
ACCOUNT_RATE_LIMITS_READ_METHOD,
|
|
138
138
|
AsyncLock,
|
|
@@ -212,7 +212,7 @@ import {
|
|
|
212
212
|
transcriptSecrets,
|
|
213
213
|
upsertCredentialFileLines,
|
|
214
214
|
writeSecureCredentialFile
|
|
215
|
-
} from "./chunk-
|
|
215
|
+
} from "./chunk-BWFKLJHJ.js";
|
|
216
216
|
import {
|
|
217
217
|
ENGINE_ENV,
|
|
218
218
|
UNQUOTED_PATHS_CONFIG,
|
|
@@ -223,16 +223,16 @@ import {
|
|
|
223
223
|
resolveDiffBase,
|
|
224
224
|
setAgentCredentialSnapshot,
|
|
225
225
|
setLinearSessionId
|
|
226
|
-
} from "./chunk-
|
|
226
|
+
} from "./chunk-JJWUCU5M.js";
|
|
227
227
|
import {
|
|
228
228
|
buildCodexAgentEnv,
|
|
229
229
|
getCodexModelProvider
|
|
230
|
-
} from "./chunk-
|
|
230
|
+
} from "./chunk-JQ2FVHUS.js";
|
|
231
231
|
import {
|
|
232
232
|
SUBPROCESS_MAX_BUFFER,
|
|
233
233
|
execAsync,
|
|
234
234
|
execFileAsync
|
|
235
|
-
} from "./chunk-
|
|
235
|
+
} from "./chunk-KJOMLSWD.js";
|
|
236
236
|
import {
|
|
237
237
|
isRecord as isRecord2
|
|
238
238
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -362,6 +362,7 @@ import {
|
|
|
362
362
|
buildReplicasInstructions,
|
|
363
363
|
byteRangeResponse,
|
|
364
364
|
canUseClaudeFastMode,
|
|
365
|
+
canUseGoalMode,
|
|
365
366
|
canonicalizeChatTranscriptBlocks,
|
|
366
367
|
chatHistoryPageParamsFromQuery,
|
|
367
368
|
clampTokensToWindow,
|
|
@@ -531,7 +532,7 @@ import {
|
|
|
531
532
|
workspaceTokenRequestSchema,
|
|
532
533
|
workspaceTokenResponseSchema,
|
|
533
534
|
wrapInTag
|
|
534
|
-
} from "./chunk-
|
|
535
|
+
} from "./chunk-M2KVTSZT.js";
|
|
535
536
|
import {
|
|
536
537
|
__commonJS,
|
|
537
538
|
__export,
|
|
@@ -62009,13 +62010,17 @@ var ChatService = class {
|
|
|
62009
62010
|
const accepting = (async () => {
|
|
62010
62011
|
chat.acceptingMessages += 1;
|
|
62011
62012
|
let seenBeforeSend;
|
|
62013
|
+
let unsaidBeforeSend;
|
|
62012
62014
|
try {
|
|
62013
62015
|
await previousAcceptance?.catch(() => {
|
|
62014
62016
|
});
|
|
62015
62017
|
await chat.release;
|
|
62016
62018
|
this.requireChat(chatId);
|
|
62017
62019
|
seenBeforeSend = this.forkSourceSeenBlocks.get(chatId);
|
|
62020
|
+
unsaidBeforeSend = [...chat.unsaidNotes];
|
|
62018
62021
|
const fork = chat.persisted.fork;
|
|
62022
|
+
const goalCommand = canUseGoalMode(chat.persisted.provider) ? getGoalCommand(request.message, request.goalMode) : null;
|
|
62023
|
+
const command = isCompactCommand(request.message) || goalCommand !== null && goalCommand.type !== "set";
|
|
62019
62024
|
if (request.replacesMessageId) {
|
|
62020
62025
|
request = { ...request, message: await this.rewindBefore(chat, request.replacesMessageId, request.message) };
|
|
62021
62026
|
} else if (fork && (chat.persisted.pendingForkHandoff || fork.trigger === "side")) {
|
|
@@ -62030,17 +62035,18 @@ var ChatService = class {
|
|
|
62030
62035
|
if (request.images?.some((image) => image.source.type === "url")) {
|
|
62031
62036
|
const results = await Promise.all(request.images.map((image) => normalizeImages([image]).then(([normalized]) => normalized, (error) => error instanceof Error ? error.message : String(error))));
|
|
62032
62037
|
const failed = results.filter((result) => typeof result === "string");
|
|
62033
|
-
const
|
|
62038
|
+
const images = `image${failed.length === 1 ? "" : "s"}`;
|
|
62039
|
+
if (failed.length) chat.unsaidNotes.push(`${failed.length} ${command ? `${images} attached to an earlier command` : `attached ${images}`} couldn't be loaded: ${failed.join("; ")}`);
|
|
62040
|
+
request = { ...request, images: results.filter((result) => typeof result !== "string") };
|
|
62041
|
+
}
|
|
62042
|
+
if (chat.unsaidNotes.length > 0 && !command) {
|
|
62043
|
+
const note = wrapInTag(chat.unsaidNotes.splice(0).join("\n"), REPLICAS_INSTRUCTIONS_TAG);
|
|
62034
62044
|
const at = request.message.search(/\n\n<replicas_attachments>\n/);
|
|
62035
|
-
request = {
|
|
62036
|
-
...request,
|
|
62037
|
-
images: results.filter((result) => typeof result !== "string"),
|
|
62038
|
-
...failed.length ? { message: at === -1 ? `${request.message}
|
|
62045
|
+
request = { ...request, message: at === -1 ? `${request.message}
|
|
62039
62046
|
|
|
62040
62047
|
${note}` : `${request.message.slice(0, at)}
|
|
62041
62048
|
|
|
62042
|
-
${note}${request.message.slice(at)}` }
|
|
62043
|
-
};
|
|
62049
|
+
${note}${request.message.slice(at)}` };
|
|
62044
62050
|
}
|
|
62045
62051
|
if (chat.persisted.pullRequestNotesPath) {
|
|
62046
62052
|
const decisions = await readPullRequestDecisions(chat.persisted.pullRequestNotesPath);
|
|
@@ -62080,6 +62086,7 @@ ${decisions}` };
|
|
|
62080
62086
|
} catch (error) {
|
|
62081
62087
|
if (seenBeforeSend) this.forkSourceSeenBlocks.set(chatId, seenBeforeSend);
|
|
62082
62088
|
else this.forkSourceSeenBlocks.delete(chatId);
|
|
62089
|
+
if (unsaidBeforeSend) chat.unsaidNotes = unsaidBeforeSend;
|
|
62083
62090
|
throw error;
|
|
62084
62091
|
} finally {
|
|
62085
62092
|
chat.acceptingMessages -= 1;
|
|
@@ -63106,6 +63113,7 @@ ${note}`;
|
|
|
63106
63113
|
observedBranchesByRepo: /* @__PURE__ */ new Map(),
|
|
63107
63114
|
lastTurnErrors: null,
|
|
63108
63115
|
turnNotices: [],
|
|
63116
|
+
unsaidNotes: [],
|
|
63109
63117
|
turnRequest: null,
|
|
63110
63118
|
turnAnswer: /* @__PURE__ */ new Map(),
|
|
63111
63119
|
turnCompletion: null,
|
|
@@ -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-KZKJCZ76.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-M2KVTSZT.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