replicas-engine 0.1.1258 → 0.1.1260
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-5LNZEW2Q.js → asp-host-Q7ZKKHP5.js} +5 -5
- package/dist/src/{chunk-Z4XYSDTH.js → chunk-ARSZGGKG.js} +15 -2
- package/dist/src/{chunk-LDA3D6FQ.js → chunk-CNWOP7LH.js} +2 -2
- package/dist/src/{chunk-2FL5CZ6M.js → chunk-DEE2MIUW.js} +1 -1
- package/dist/src/{chunk-6FEQFCUO.js → chunk-IRNCCK42.js} +2 -2
- package/dist/src/{chunk-OGELY3RC.js → chunk-Q67KCHMN.js} +6 -6
- package/dist/src/{chunk-YRQOIVBF.js → chunk-WINIX7II.js} +16 -0
- package/dist/src/{chunk-J7S2NBM2.js → chunk-XCTN3EYU.js} +3 -3
- package/dist/src/{chunk-XUNIYFH5.js → chunk-XDF5QDJU.js} +1 -1
- package/dist/src/command-protection-hook.js +4 -4
- package/dist/src/headless-agent.js +4 -4
- package/dist/src/index.js +250 -175
- 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-Q67KCHMN.js";
|
|
12
|
+
import "./chunk-ARSZGGKG.js";
|
|
13
|
+
import "./chunk-XCTN3EYU.js";
|
|
14
|
+
import "./chunk-DEE2MIUW.js";
|
|
15
15
|
import "./chunk-UZSNFLDQ.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-WINIX7II.js";
|
|
17
17
|
import "./chunk-VEQXQN22.js";
|
|
18
18
|
export {
|
|
19
19
|
CODEX_ULTRAFAST_SERVICE_TIER,
|
|
@@ -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-DEE2MIUW.js";
|
|
8
8
|
import {
|
|
9
9
|
isRecord as isRecord2
|
|
10
10
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -18,8 +18,9 @@ import {
|
|
|
18
18
|
isRecord,
|
|
19
19
|
isValidAgentProvider,
|
|
20
20
|
parsePosixEnvFile,
|
|
21
|
+
provisionedDeviceSchema,
|
|
21
22
|
readReplicasRuntimeEnv
|
|
22
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-WINIX7II.js";
|
|
23
24
|
|
|
24
25
|
// src/runtime-env-loader.ts
|
|
25
26
|
import { readFileSync } from "fs";
|
|
@@ -101,6 +102,15 @@ function parseCodexAuthMethod(value) {
|
|
|
101
102
|
function parseMuseAuthMethod(value) {
|
|
102
103
|
return value === "oauth" || value === "api_key" ? value : void 0;
|
|
103
104
|
}
|
|
105
|
+
function parseDevices(value) {
|
|
106
|
+
if (!value) return [];
|
|
107
|
+
try {
|
|
108
|
+
const parsed = provisionedDeviceSchema.array().safeParse(JSON.parse(value));
|
|
109
|
+
return parsed.success ? parsed.data : [];
|
|
110
|
+
} catch {
|
|
111
|
+
return [];
|
|
112
|
+
}
|
|
113
|
+
}
|
|
104
114
|
function parseAgentCredentialSnapshots(value) {
|
|
105
115
|
if (!value) return {};
|
|
106
116
|
try {
|
|
@@ -157,9 +167,12 @@ function loadEngineEnv(runtimeEnvValues) {
|
|
|
157
167
|
REPLICAS_AGENT_CREDENTIALS: parseAgentCredentialSnapshots(readEnv("REPLICAS_AGENT_CREDENTIALS")),
|
|
158
168
|
REPLICAS_ENV_SYSTEM_PROMPT: readEnv("REPLICAS_ENV_SYSTEM_PROMPT"),
|
|
159
169
|
REPLICAS_ENV_START_HOOK: readEnv("REPLICAS_ENV_START_HOOK"),
|
|
170
|
+
REPLICAS_ENV_DEVICES: parseDevices(readEnv("REPLICAS_ENV_DEVICES")),
|
|
171
|
+
TS_AUTHKEY: readEnv("TS_AUTHKEY"),
|
|
160
172
|
REPLICAS_DISABLE_AUTO_START_HOOKS: readEnv("REPLICAS_DISABLE_AUTO_START_HOOKS")?.toLowerCase() === "true",
|
|
161
173
|
REPLICAS_MAX_LIVE_AGENT_PROCESSES: Number(readEnv("REPLICAS_MAX_LIVE_AGENT_PROCESSES")) || void 0
|
|
162
174
|
};
|
|
175
|
+
delete process.env.REPLICAS_ENV_DEVICES;
|
|
163
176
|
return env;
|
|
164
177
|
}
|
|
165
178
|
var ENGINE_ENV = loadEngineEnv();
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
getOriginDefaultBranch,
|
|
6
6
|
monolithRequest,
|
|
7
7
|
runGitCommand
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ARSZGGKG.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-WINIX7II.js";
|
|
16
16
|
|
|
17
17
|
// src/services/command-protection-service.ts
|
|
18
18
|
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
|
HOOK_EXEC_MAX_BUFFER_BYTES
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WINIX7II.js";
|
|
7
7
|
|
|
8
8
|
// src/utils/exec.ts
|
|
9
9
|
import { exec, execFile } from "child_process";
|
|
@@ -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-XCTN3EYU.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-WINIX7II.js";
|
|
17
17
|
|
|
18
18
|
// src/managers/codex-asp/notification-dispatch.ts
|
|
19
19
|
var TURN_STARTED_METHOD = "turn/started";
|
|
@@ -10,15 +10,15 @@ import {
|
|
|
10
10
|
resolveDiffBase,
|
|
11
11
|
runGitCommand,
|
|
12
12
|
setAgentCredentialSnapshot
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ARSZGGKG.js";
|
|
14
14
|
import {
|
|
15
15
|
AppServerProcess,
|
|
16
16
|
buildCodexAgentEnv
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-XCTN3EYU.js";
|
|
18
18
|
import {
|
|
19
19
|
SUBPROCESS_MAX_BUFFER,
|
|
20
20
|
execFileAsync
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-DEE2MIUW.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-WINIX7II.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-Q7ZKKHP5.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-Q7ZKKHP5.js");
|
|
317
317
|
await restartCodexAspHostIfRunning2();
|
|
318
318
|
}
|
|
319
319
|
setAgentCredentialSnapshot("codex", data);
|
|
@@ -2387,6 +2387,20 @@ var createEnvironmentMcpRequestSchema = z14.object({
|
|
|
2387
2387
|
]).describe("stdio: `{ command, args, env }`. http/sse: `{ url, headers }`.")
|
|
2388
2388
|
});
|
|
2389
2389
|
var updateEnvironmentMcpRequestSchema = createEnvironmentMcpRequestSchema.partial();
|
|
2390
|
+
var createEnvironmentDeviceRequestSchema = z14.object({
|
|
2391
|
+
name: z14.string().regex(/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/, "Use lowercase letters, numbers and dashes").describe("SSH alias in workspaces, e.g. `mac-mini` for `ssh mac-mini`."),
|
|
2392
|
+
host: z14.string().max(253).regex(/^(?:[A-Za-z0-9](?:[A-Za-z0-9.-]*[A-Za-z0-9])?|[0-9A-Fa-f:]+)$/, "Enter a hostname or IP address").describe("Hostname or IP, such as a Tailscale MagicDNS name (`mac-mini`) or a public address."),
|
|
2393
|
+
port: z14.number().int().min(1).max(65535).optional().describe("SSH port. Defaults to 22."),
|
|
2394
|
+
username: z14.string().regex(/^[A-Za-z0-9_][A-Za-z0-9._-]{0,63}$/, "Enter the account name on the device").describe("Account the agent signs in as.")
|
|
2395
|
+
});
|
|
2396
|
+
var updateEnvironmentDeviceRequestSchema = createEnvironmentDeviceRequestSchema.partial();
|
|
2397
|
+
var provisionedDeviceSchema = z14.object({
|
|
2398
|
+
name: z14.string(),
|
|
2399
|
+
host: z14.string(),
|
|
2400
|
+
port: z14.number(),
|
|
2401
|
+
username: z14.string(),
|
|
2402
|
+
private_key: z14.string()
|
|
2403
|
+
});
|
|
2390
2404
|
|
|
2391
2405
|
// ../shared/src/routes/workspaces.ts
|
|
2392
2406
|
import { z as z15 } from "zod";
|
|
@@ -2492,6 +2506,7 @@ var updateEnvironmentMcpToolInputSchema = z16.object({
|
|
|
2492
2506
|
mcp_id: z16.string().describe("MCP ID"),
|
|
2493
2507
|
...updateEnvironmentMcpRequestSchema.shape
|
|
2494
2508
|
});
|
|
2509
|
+
var createEnvironmentDeviceToolInputSchema = z16.object({ ...environmentMcpPath, ...createEnvironmentDeviceRequestSchema.shape });
|
|
2495
2510
|
|
|
2496
2511
|
// ../shared/src/scout.ts
|
|
2497
2512
|
var SCOUT_SOURCE_TYPES = ["slack", "linear"];
|
|
@@ -10465,6 +10480,7 @@ export {
|
|
|
10465
10480
|
workspaceTokenResponseSchema,
|
|
10466
10481
|
legacyWorkspaceTokenBundleSchema,
|
|
10467
10482
|
engineMcpOAuthTokenResponseSchema,
|
|
10483
|
+
provisionedDeviceSchema,
|
|
10468
10484
|
SUBAGENT_SERVICE_TIERS,
|
|
10469
10485
|
serviceTierRequestFields,
|
|
10470
10486
|
TERMINAL_RTC_ICE_SERVER,
|
|
@@ -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-DEE2MIUW.js";
|
|
7
7
|
import {
|
|
8
8
|
isVersionBelow
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WINIX7II.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.1260";
|
|
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-CNWOP7LH.js";
|
|
7
|
+
import "./chunk-ARSZGGKG.js";
|
|
8
|
+
import "./chunk-DEE2MIUW.js";
|
|
9
9
|
import {
|
|
10
10
|
isRecord
|
|
11
11
|
} from "./chunk-UZSNFLDQ.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-WINIX7II.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-IRNCCK42.js";
|
|
17
17
|
import {
|
|
18
18
|
AppServerProcess,
|
|
19
19
|
buildCodexAgentEnv
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-XCTN3EYU.js";
|
|
21
|
+
import "./chunk-DEE2MIUW.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-WINIX7II.js";
|
|
32
32
|
import "./chunk-VEQXQN22.js";
|
|
33
33
|
|
|
34
34
|
// src/headless-agent.ts
|