replicas-engine 0.1.1399 → 0.1.1401
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-K6Y7KM2R.js → asp-host-NK5FWLMR.js} +3 -3
- package/dist/src/{chunk-PT2A7PFQ.js → chunk-3BSIPXBJ.js} +2 -2
- package/dist/src/{chunk-MMXN6UVW.js → chunk-CVCDTWVK.js} +1 -1
- package/dist/src/{chunk-VRC2OBLV.js → chunk-GIVVF523.js} +1 -1
- package/dist/src/{chunk-CXZYVVVW.js → chunk-MB3XWWWL.js} +4 -4
- package/dist/src/{chunk-BR53QBDK.js → chunk-R47VCZKQ.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 +14 -9
- package/package.json +1 -1
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
listRunningCodexModels,
|
|
9
9
|
restartCodexAspHost,
|
|
10
10
|
restartCodexAspHostIfRunning
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-MB3XWWWL.js";
|
|
12
|
+
import "./chunk-3BSIPXBJ.js";
|
|
13
|
+
import "./chunk-R47VCZKQ.js";
|
|
14
14
|
import "./chunk-F35HDB4V.js";
|
|
15
15
|
import "./chunk-UZSNFLDQ.js";
|
|
16
16
|
import "./chunk-FYNT73JM.js";
|
|
@@ -313,8 +313,8 @@ var MonolithService = class {
|
|
|
313
313
|
getSubagentMcpConfig() {
|
|
314
314
|
return this.getJson("/v1/engine/subagent-mcp", (body) => isRecord(body) && typeof body.enabled === "boolean" && Array.isArray(body.providers) && body.providers.every((provider) => typeof provider === "string" && isValidAgentProvider(provider)) ? { enabled: body.enabled, providers: body.providers } : null, AbortSignal.timeout(1e4));
|
|
315
315
|
}
|
|
316
|
-
getAutoCompactConfig() {
|
|
317
|
-
return this.getJson(
|
|
316
|
+
getAutoCompactConfig(provider) {
|
|
317
|
+
return this.getJson(`/v1/engine/auto-compact?provider=${provider}`, (body) => isRecord(body) && (body.tokens === null || typeof body.tokens === "number") ? { tokens: body.tokens } : null, AbortSignal.timeout(1e4));
|
|
318
318
|
}
|
|
319
319
|
getOpenRouterModels() {
|
|
320
320
|
return this.getJson("/v1/engine/openrouter-models", (body) => isRecord(body) && Array.isArray(body.models) && body.models.every((model) => typeof model === "string") ? body.models : null);
|
|
@@ -10,11 +10,11 @@ import {
|
|
|
10
10
|
resolveDiffBase,
|
|
11
11
|
runGitCommand,
|
|
12
12
|
setAgentCredentialSnapshot
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3BSIPXBJ.js";
|
|
14
14
|
import {
|
|
15
15
|
AppServerProcess,
|
|
16
16
|
buildCodexAgentEnv
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-R47VCZKQ.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-NK5FWLMR.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-NK5FWLMR.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.1401";
|
|
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-CVCDTWVK.js";
|
|
7
|
+
import "./chunk-3BSIPXBJ.js";
|
|
8
8
|
import "./chunk-F35HDB4V.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-GIVVF523.js";
|
|
18
18
|
import {
|
|
19
19
|
AppServerProcess,
|
|
20
20
|
buildCodexAgentEnv
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-R47VCZKQ.js";
|
|
22
22
|
import "./chunk-F35HDB4V.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-CVCDTWVK.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-GIVVF523.js";
|
|
69
69
|
import {
|
|
70
70
|
publishedPullRequestUrls
|
|
71
71
|
} from "./chunk-NM7LRVLC.js";
|
|
@@ -143,7 +143,7 @@ import {
|
|
|
143
143
|
timestampFromSeconds,
|
|
144
144
|
upsertCredentialFileLines,
|
|
145
145
|
writeSecureCredentialFile
|
|
146
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-MB3XWWWL.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-3BSIPXBJ.js";
|
|
157
157
|
import {
|
|
158
158
|
getCodexModelProvider
|
|
159
|
-
} from "./chunk-
|
|
159
|
+
} from "./chunk-R47VCZKQ.js";
|
|
160
160
|
import {
|
|
161
161
|
SUBPROCESS_MAX_BUFFER,
|
|
162
162
|
execAsync,
|
|
@@ -11806,7 +11806,7 @@ var CodingAgentManager = class _CodingAgentManager {
|
|
|
11806
11806
|
authFallback;
|
|
11807
11807
|
subagentMcpChatId;
|
|
11808
11808
|
subagentMcpEnabledForTurn = false;
|
|
11809
|
-
|
|
11809
|
+
autoCompactProvider;
|
|
11810
11810
|
autoCompactTokens = null;
|
|
11811
11811
|
unreadSteers = /* @__PURE__ */ new Map();
|
|
11812
11812
|
// A harness can read a steer before steerRequest returns, so a read is noted here until the steer settles.
|
|
@@ -11832,7 +11832,7 @@ var CodingAgentManager = class _CodingAgentManager {
|
|
|
11832
11832
|
this.onUsageUpdate = options.onUsageUpdate ?? (() => {
|
|
11833
11833
|
});
|
|
11834
11834
|
this.subagentMcpChatId = options.parentChatId === null && options.provider && SUBAGENT_MCP_HARNESSES.includes(options.provider) ? options.chatId : void 0;
|
|
11835
|
-
this.
|
|
11835
|
+
this.autoCompactProvider = options.provider === "claude" || options.provider === "codex" ? options.provider : null;
|
|
11836
11836
|
this.topLevel = options.parentChatId === null;
|
|
11837
11837
|
this.chatId = options.chatId;
|
|
11838
11838
|
this.originChatId = options.originChatId;
|
|
@@ -11973,8 +11973,8 @@ ${request.message}` }, senderKey };
|
|
|
11973
11973
|
if (config) this.subagentMcpEnabledForTurn = await this.subagentMcpForTurn(config.enabled);
|
|
11974
11974
|
}
|
|
11975
11975
|
async refreshAutoCompactTokens() {
|
|
11976
|
-
if (!this.
|
|
11977
|
-
const config = await monolithService.getAutoCompactConfig();
|
|
11976
|
+
if (!this.autoCompactProvider) return;
|
|
11977
|
+
const config = await monolithService.getAutoCompactConfig(this.autoCompactProvider);
|
|
11978
11978
|
if (config) this.autoCompactTokens = config.tokens;
|
|
11979
11979
|
}
|
|
11980
11980
|
/** Harnesses that fix their tool set per session override this to keep a session's original mode. */
|
|
@@ -60778,6 +60778,11 @@ var ChatService = class {
|
|
|
60778
60778
|
});
|
|
60779
60779
|
const continuation = getChatContinuation(this.listChats(), chatId);
|
|
60780
60780
|
if (continuation) {
|
|
60781
|
+
if (request.model && !request.provider && continuation.provider !== chat.persisted.provider) {
|
|
60782
|
+
const target = this.requireChat(continuation.id);
|
|
60783
|
+
if (target.persisted.model === request.model && !AGENT_MODELS[continuation.provider].includes(request.model)) delete target.persisted.model;
|
|
60784
|
+
request = { ...request, model: void 0 };
|
|
60785
|
+
}
|
|
60781
60786
|
const forwarded = await this.sendMessage(continuation.id, request);
|
|
60782
60787
|
return { ...forwarded, chatId: forwarded.chatId ?? continuation.id };
|
|
60783
60788
|
}
|