replicas-engine 0.1.1247 → 0.1.1248
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-VTR4W3G7.js → asp-host-DFIT2PB7.js} +5 -5
- package/dist/src/{chunk-X3CD2PFH.js → chunk-3C2WTKME.js} +1 -1
- package/dist/src/{chunk-RHMWOSGI.js → chunk-3V6VDRU5.js} +6 -6
- package/dist/src/{chunk-EDUOGWVY.js → chunk-4AIHQBEA.js} +2 -2
- package/dist/src/{chunk-BADAP2HN.js → chunk-6PVW5AKP.js} +4 -3
- package/dist/src/{chunk-UUGSRQQJ.js → chunk-7QJWP5ZL.js} +9 -5
- package/dist/src/{chunk-XHPJ47AY.js → chunk-EVNSRGKX.js} +2 -2
- package/dist/src/{chunk-G4UVARZK.js → chunk-FQZ6YTN2.js} +1 -1
- package/dist/src/{chunk-CIWBIJZN.js → chunk-P3G4OERE.js} +3 -3
- package/dist/src/command-protection-hook.js +4 -4
- package/dist/src/headless-agent.js +4 -4
- package/dist/src/index.js +10 -9
- 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
|
listRunningCodexModels,
|
|
9
9
|
restartCodexAspHost,
|
|
10
10
|
restartCodexAspHostIfRunning
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-3V6VDRU5.js";
|
|
12
|
+
import "./chunk-6PVW5AKP.js";
|
|
13
|
+
import "./chunk-P3G4OERE.js";
|
|
14
|
+
import "./chunk-3C2WTKME.js";
|
|
15
15
|
import "./chunk-UZSNFLDQ.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-7QJWP5ZL.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-7QJWP5ZL.js";
|
|
7
7
|
|
|
8
8
|
// src/utils/exec.ts
|
|
9
9
|
import { exec, execFile } from "child_process";
|
|
@@ -10,15 +10,15 @@ import {
|
|
|
10
10
|
resolveDiffBase,
|
|
11
11
|
runGitCommand,
|
|
12
12
|
setAgentCredentialSnapshot
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-6PVW5AKP.js";
|
|
14
14
|
import {
|
|
15
15
|
AppServerProcess,
|
|
16
16
|
buildCodexAgentEnv
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-P3G4OERE.js";
|
|
18
18
|
import {
|
|
19
19
|
SUBPROCESS_MAX_BUFFER,
|
|
20
20
|
execFileAsync
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-3C2WTKME.js";
|
|
22
22
|
import {
|
|
23
23
|
isRecord
|
|
24
24
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
resolveOpenAICompatibleModelsUrl,
|
|
56
56
|
splitMothershipInstructions,
|
|
57
57
|
withTimeout
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-7QJWP5ZL.js";
|
|
59
59
|
|
|
60
60
|
// src/managers/codex-token-manager.ts
|
|
61
61
|
import { promises as fs } from "fs";
|
|
@@ -291,7 +291,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
|
|
|
291
291
|
await this.applyCredentialUpdate(++this.credentialGeneration, async () => {
|
|
292
292
|
await this.applyCredentialsResponse(data);
|
|
293
293
|
setAgentCredentialSnapshot("codex", data);
|
|
294
|
-
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-
|
|
294
|
+
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-DFIT2PB7.js");
|
|
295
295
|
await restartCodexAspHostIfRunning2();
|
|
296
296
|
});
|
|
297
297
|
await this.start(true);
|
|
@@ -313,7 +313,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
|
|
|
313
313
|
const accountChanged = ENGINE_ENV.REPLICAS_AGENT_CREDENTIALS.codex?.credentialId !== data.credentialId;
|
|
314
314
|
await this.applyCredentialsResponse(data);
|
|
315
315
|
if (restartOnChange && (accountChanged || CODEX_AUTH_ENV_KEYS.some((key, index) => process.env[key] !== previousEnv[index]))) {
|
|
316
|
-
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-
|
|
316
|
+
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-DFIT2PB7.js");
|
|
317
317
|
await restartCodexAspHostIfRunning2();
|
|
318
318
|
}
|
|
319
319
|
setAgentCredentialSnapshot("codex", data);
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
getOriginDefaultBranch,
|
|
6
6
|
monolithRequest,
|
|
7
7
|
runGitCommand
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-6PVW5AKP.js";
|
|
9
9
|
import {
|
|
10
10
|
extractCommandProtectionCommandText,
|
|
11
11
|
findCommandProtectionGitLookups,
|
|
12
12
|
findGitCommitSignals,
|
|
13
13
|
findPrMergeSignals,
|
|
14
14
|
parseCommandProtectionRequest
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-7QJWP5ZL.js";
|
|
16
16
|
|
|
17
17
|
// src/services/command-protection-service.ts
|
|
18
18
|
import { readFile, stat } from "fs/promises";
|
|
@@ -4,11 +4,12 @@ const require = __createRequire(import.meta.url);
|
|
|
4
4
|
import {
|
|
5
5
|
SUBPROCESS_MAX_BUFFER,
|
|
6
6
|
execFileAsync
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-3C2WTKME.js";
|
|
8
8
|
import {
|
|
9
9
|
isRecord as isRecord2
|
|
10
10
|
} from "./chunk-UZSNFLDQ.js";
|
|
11
11
|
import {
|
|
12
|
+
ENGINE_PORT,
|
|
12
13
|
REPLICAS_RUNTIME_ENV_ALIASES,
|
|
13
14
|
agentCredentialSnapshotSchema,
|
|
14
15
|
createErrorResult,
|
|
@@ -18,7 +19,7 @@ import {
|
|
|
18
19
|
isValidAgentProvider,
|
|
19
20
|
parsePosixEnvFile,
|
|
20
21
|
readReplicasRuntimeEnv
|
|
21
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-7QJWP5ZL.js";
|
|
22
23
|
|
|
23
24
|
// src/runtime-env-loader.ts
|
|
24
25
|
import { readFileSync } from "fs";
|
|
@@ -63,7 +64,7 @@ function readSandboxImageVersion() {
|
|
|
63
64
|
}
|
|
64
65
|
function parsePort(value) {
|
|
65
66
|
if (!value) {
|
|
66
|
-
return
|
|
67
|
+
return ENGINE_PORT;
|
|
67
68
|
}
|
|
68
69
|
const parsed = Number(value);
|
|
69
70
|
if (!Number.isInteger(parsed) || parsed <= 0) {
|
|
@@ -1510,6 +1510,7 @@ var ENGINE_STREAM_LAST_EVENT_ID_HEADER = "Last-Event-ID";
|
|
|
1510
1510
|
var ENGINE_HEALTH_WAIT_HEADER = "X-Replicas-Health-Wait";
|
|
1511
1511
|
var ENGINE_HEALTH_WAIT_QUERY_PARAM = "wait_ms";
|
|
1512
1512
|
var ENGINE_HEALTH_MAX_WAIT_MS = 2e3;
|
|
1513
|
+
var ENGINE_PROXY_SAFE_HEALTH_PATH = "/engine-health";
|
|
1513
1514
|
var ENGINE_ACTIVATE_PATH = "/lifecycle/activate";
|
|
1514
1515
|
var ENGINE_SLEEP_PATH = "/lifecycle/sleep";
|
|
1515
1516
|
var updateChatDisplayNameRequestSchema = z4.object({
|
|
@@ -2002,6 +2003,10 @@ function parsePosixEnvFile(content) {
|
|
|
2002
2003
|
return result;
|
|
2003
2004
|
}
|
|
2004
2005
|
|
|
2006
|
+
// ../shared/src/engine/environment.ts
|
|
2007
|
+
var ENGINE_PORT = 3737;
|
|
2008
|
+
var DESKTOP_STREAM_PORT = 6080;
|
|
2009
|
+
|
|
2005
2010
|
// ../shared/src/git.ts
|
|
2006
2011
|
var GIT_CREDENTIAL_HELPER_FILENAME = ".git-credential-replicas";
|
|
2007
2012
|
var GITHUB_CREDENTIAL_REFRESH_PATH = "/git-credentials/github/refresh";
|
|
@@ -2066,7 +2071,7 @@ refresh_credential() {
|
|
|
2066
2071
|
esac
|
|
2067
2072
|
[ -n "\${REPLICAS_ENGINE_SECRET:-}" ] || return 1
|
|
2068
2073
|
command -v curl >/dev/null 2>&1 || return 1
|
|
2069
|
-
curl --silent --fail --connect-timeout 1 --max-time 5 -X POST -H "X-Replicas-Engine-Secret: $REPLICAS_ENGINE_SECRET" "http://127.0.0.1:\${REPLICAS_ENGINE_PORT
|
|
2074
|
+
curl --silent --fail --connect-timeout 1 --max-time 5 -X POST -H "X-Replicas-Engine-Secret: $REPLICAS_ENGINE_SECRET" "http://127.0.0.1:\${REPLICAS_ENGINE_PORT:-${ENGINE_PORT}}$refresh_path" >/dev/null 2>&1
|
|
2070
2075
|
}
|
|
2071
2076
|
|
|
2072
2077
|
if [ "$1" = "get" ]; then
|
|
@@ -2136,9 +2141,6 @@ var headlessAgentRequestSchema = z7.object({
|
|
|
2136
2141
|
});
|
|
2137
2142
|
var headlessAgentUsagePath = (outputPath) => `${outputPath}.usage`;
|
|
2138
2143
|
|
|
2139
|
-
// ../shared/src/engine/environment.ts
|
|
2140
|
-
var DESKTOP_STREAM_PORT = 6080;
|
|
2141
|
-
|
|
2142
2144
|
// ../shared/src/sse.ts
|
|
2143
2145
|
function parseSseChunk(chunk) {
|
|
2144
2146
|
let data = "";
|
|
@@ -10385,6 +10387,7 @@ export {
|
|
|
10385
10387
|
ENGINE_HEALTH_WAIT_HEADER,
|
|
10386
10388
|
ENGINE_HEALTH_WAIT_QUERY_PARAM,
|
|
10387
10389
|
ENGINE_HEALTH_MAX_WAIT_MS,
|
|
10390
|
+
ENGINE_PROXY_SAFE_HEALTH_PATH,
|
|
10388
10391
|
ENGINE_ACTIVATE_PATH,
|
|
10389
10392
|
ENGINE_SLEEP_PATH,
|
|
10390
10393
|
updateChatDisplayNameRequestSchema,
|
|
@@ -10479,6 +10482,8 @@ export {
|
|
|
10479
10482
|
readReplicasRuntimeEnv,
|
|
10480
10483
|
shellQuotePosix,
|
|
10481
10484
|
parsePosixEnvFile,
|
|
10485
|
+
ENGINE_PORT,
|
|
10486
|
+
DESKTOP_STREAM_PORT,
|
|
10482
10487
|
GIT_CREDENTIAL_HELPER_FILENAME,
|
|
10483
10488
|
GITHUB_CREDENTIAL_REFRESH_PATH,
|
|
10484
10489
|
GITLAB_CREDENTIAL_REFRESH_PATH,
|
|
@@ -10510,7 +10515,6 @@ export {
|
|
|
10510
10515
|
serializeMuseAuthFile,
|
|
10511
10516
|
isVersionBelow,
|
|
10512
10517
|
hasChatStarted,
|
|
10513
|
-
DESKTOP_STREAM_PORT,
|
|
10514
10518
|
CODEX_AUTH_ENV_KEYS,
|
|
10515
10519
|
codexAuthEnvFromResponse,
|
|
10516
10520
|
CODEX_AUTH_ENV_KEYS_BY_METHOD,
|
|
@@ -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-P3G4OERE.js";
|
|
7
7
|
import {
|
|
8
8
|
ASTER_BASE_URL,
|
|
9
9
|
ASTER_PROVIDER,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
isRecord,
|
|
14
14
|
readOllamaAuthEnv,
|
|
15
15
|
readOpenAICompatibleAuthEnv
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-7QJWP5ZL.js";
|
|
17
17
|
|
|
18
18
|
// src/managers/codex-asp/notification-dispatch.ts
|
|
19
19
|
var TURN_STARTED_METHOD = "turn/started";
|
|
@@ -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-3C2WTKME.js";
|
|
7
7
|
import {
|
|
8
8
|
isVersionBelow
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7QJWP5ZL.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.1248";
|
|
244
244
|
var INITIALIZE_METHOD = "initialize";
|
|
245
245
|
var INITIALIZED_NOTIFICATION = "initialized";
|
|
246
246
|
var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
|
|
@@ -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-4AIHQBEA.js";
|
|
7
|
+
import "./chunk-6PVW5AKP.js";
|
|
8
|
+
import "./chunk-3C2WTKME.js";
|
|
9
9
|
import {
|
|
10
10
|
isRecord
|
|
11
11
|
} from "./chunk-UZSNFLDQ.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-7QJWP5ZL.js";
|
|
13
13
|
import "./chunk-VEQXQN22.js";
|
|
14
14
|
|
|
15
15
|
// src/command-protection-hook.ts
|
|
@@ -13,12 +13,12 @@ import {
|
|
|
13
13
|
recoverCompletedTurn,
|
|
14
14
|
spawnMuseMsp,
|
|
15
15
|
startMuseSession
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-EVNSRGKX.js";
|
|
17
17
|
import {
|
|
18
18
|
AppServerProcess,
|
|
19
19
|
buildCodexAgentEnv
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-P3G4OERE.js";
|
|
21
|
+
import "./chunk-3C2WTKME.js";
|
|
22
22
|
import {
|
|
23
23
|
AGENT,
|
|
24
24
|
OPENCODE_GO_PROVIDER,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
headlessAgentUsagePath,
|
|
29
29
|
isRecord,
|
|
30
30
|
withTimeout
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-7QJWP5ZL.js";
|
|
32
32
|
import "./chunk-VEQXQN22.js";
|
|
33
33
|
|
|
34
34
|
// 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-4AIHQBEA.js";
|
|
31
31
|
import {
|
|
32
32
|
ACCOUNT_RATE_LIMITS_UPDATED_METHOD,
|
|
33
33
|
AGENT_MESSAGE_DELTA_METHOD,
|
|
@@ -64,10 +64,10 @@ import {
|
|
|
64
64
|
spawnMuseMsp,
|
|
65
65
|
startMuseSession,
|
|
66
66
|
uuidV7
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-EVNSRGKX.js";
|
|
68
68
|
import {
|
|
69
69
|
publishedPullRequestUrls
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-FQZ6YTN2.js";
|
|
71
71
|
import {
|
|
72
72
|
ACCOUNT_RATE_LIMITS_READ_METHOD,
|
|
73
73
|
AsyncLock,
|
|
@@ -140,7 +140,7 @@ import {
|
|
|
140
140
|
timestampFromSeconds,
|
|
141
141
|
upsertCredentialFileLines,
|
|
142
142
|
writeSecureCredentialFile
|
|
143
|
-
} from "./chunk-
|
|
143
|
+
} from "./chunk-3V6VDRU5.js";
|
|
144
144
|
import {
|
|
145
145
|
ENGINE_ENV,
|
|
146
146
|
monolithRequest,
|
|
@@ -149,15 +149,15 @@ import {
|
|
|
149
149
|
reloadEngineEnv,
|
|
150
150
|
resolveDiffBase,
|
|
151
151
|
setAgentCredentialSnapshot
|
|
152
|
-
} from "./chunk-
|
|
152
|
+
} from "./chunk-6PVW5AKP.js";
|
|
153
153
|
import {
|
|
154
154
|
getCodexModelProvider
|
|
155
|
-
} from "./chunk-
|
|
155
|
+
} from "./chunk-P3G4OERE.js";
|
|
156
156
|
import {
|
|
157
157
|
SUBPROCESS_MAX_BUFFER,
|
|
158
158
|
execAsync,
|
|
159
159
|
execFileAsync
|
|
160
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-3C2WTKME.js";
|
|
161
161
|
import {
|
|
162
162
|
isRecord as isRecord2
|
|
163
163
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -211,6 +211,7 @@ import {
|
|
|
211
211
|
ENGINE_HEALTH_MAX_WAIT_MS,
|
|
212
212
|
ENGINE_HEALTH_WAIT_HEADER,
|
|
213
213
|
ENGINE_HEALTH_WAIT_QUERY_PARAM,
|
|
214
|
+
ENGINE_PROXY_SAFE_HEALTH_PATH,
|
|
214
215
|
ENGINE_SEND_MESSAGE_FAILED_ERROR,
|
|
215
216
|
ENGINE_SLEEP_PATH,
|
|
216
217
|
ENGINE_STREAM_LAST_EVENT_ID_HEADER,
|
|
@@ -395,7 +396,7 @@ import {
|
|
|
395
396
|
workspaceTokenRequestSchema,
|
|
396
397
|
workspaceTokenResponseSchema,
|
|
397
398
|
wrapInTag
|
|
398
|
-
} from "./chunk-
|
|
399
|
+
} from "./chunk-7QJWP5ZL.js";
|
|
399
400
|
import {
|
|
400
401
|
cloneMcpConfig,
|
|
401
402
|
ensureCompatibilityImports,
|
|
@@ -63789,7 +63790,7 @@ var chatService = new ChatService(
|
|
|
63789
63790
|
agentChatActivityTrackerService,
|
|
63790
63791
|
agentTokenUsageTracker
|
|
63791
63792
|
);
|
|
63792
|
-
app.
|
|
63793
|
+
app.on("GET", ["/health", ENGINE_PROXY_SAFE_HEALTH_PATH], async (c) => {
|
|
63793
63794
|
const requestedWaitMs = Number(c.req.query(ENGINE_HEALTH_WAIT_QUERY_PARAM));
|
|
63794
63795
|
const waitMs = Number.isFinite(requestedWaitMs) ? Math.min(Math.max(requestedWaitMs, 0), ENGINE_HEALTH_MAX_WAIT_MS) : 0;
|
|
63795
63796
|
if (!lifecycle.active && waitMs > 0) {
|
|
@@ -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-FQZ6YTN2.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-7QJWP5ZL.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