replicas-engine 0.1.891 → 0.1.893
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-RKLHLTPR.js → asp-host-X5TW6XEX.js} +4 -4
- package/dist/src/{chunk-IB2SHITZ.js → chunk-2ISAUV3V.js} +2 -2
- package/dist/src/{chunk-EDLDRUYW.js → chunk-HANGEXUO.js} +2 -2
- package/dist/src/{chunk-4NFLZXZX.js → chunk-IN4SUFZ2.js} +2 -2
- package/dist/src/{chunk-TDLEF5FU.js → chunk-PAELCM3S.js} +5 -5
- package/dist/src/{chunk-U2T2QCYP.js → chunk-UVFBGY57.js} +1 -1
- package/dist/src/{chunk-DG4VIQXA.js → chunk-V7P43L3L.js} +1 -1
- package/dist/src/{chunk-OBAGPETY.js → chunk-ZZ7YYXV5.js} +22 -27
- package/dist/src/command-protection-hook.js +3 -3
- package/dist/src/deepseek-command-protection-plugin.js +5 -5
- package/dist/src/headless-agent.js +2 -2
- package/dist/src/index.js +275 -241
- package/dist/src/post-tool-pr-hook.js +3 -3
- package/dist/src/relay-mcp.js +1 -1
- package/package.json +1 -1
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
getCodexAspHost,
|
|
6
6
|
restartCodexAspHost,
|
|
7
7
|
restartCodexAspHostIfRunning
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-PAELCM3S.js";
|
|
9
|
+
import "./chunk-V7P43L3L.js";
|
|
10
|
+
import "./chunk-HANGEXUO.js";
|
|
11
11
|
import "./chunk-UZSNFLDQ.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-ZZ7YYXV5.js";
|
|
13
13
|
import "./chunk-VEQXQN22.js";
|
|
14
14
|
export {
|
|
15
15
|
getCodexAspHost,
|
|
@@ -3,10 +3,10 @@ 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-UVFBGY57.js";
|
|
7
7
|
import {
|
|
8
8
|
shouldRefreshPullRequests
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ZZ7YYXV5.js";
|
|
10
10
|
|
|
11
11
|
// src/services/post-tool-pr-notifier.ts
|
|
12
12
|
async function notifyPostToolUse(toolName, toolInput, result) {
|
|
@@ -4,7 +4,7 @@ const require = __createRequire(import.meta.url);
|
|
|
4
4
|
import {
|
|
5
5
|
HOOK_EXEC_MAX_BUFFER_BYTES,
|
|
6
6
|
isVersionBelow
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ZZ7YYXV5.js";
|
|
8
8
|
|
|
9
9
|
// src/utils/codex-agent-env.ts
|
|
10
10
|
function buildCodexAgentEnv(source = process.env) {
|
|
@@ -245,7 +245,7 @@ function getCodexModelProvider(method) {
|
|
|
245
245
|
if (method === "foundry") return "azure";
|
|
246
246
|
return method === "ollama" || method === "openai-compatible" ? "replicas_openai_compatible" : "openai";
|
|
247
247
|
}
|
|
248
|
-
var ENGINE_PACKAGE_VERSION = "0.1.
|
|
248
|
+
var ENGINE_PACKAGE_VERSION = "0.1.893";
|
|
249
249
|
var INITIALIZE_METHOD = "initialize";
|
|
250
250
|
var INITIALIZED_NOTIFICATION = "initialized";
|
|
251
251
|
var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
|
|
@@ -3,12 +3,12 @@ import { createRequire as __createRequire } from 'node:module';
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
monolithRequest
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-V7P43L3L.js";
|
|
7
7
|
import {
|
|
8
8
|
extractCommandProtectionCommandText,
|
|
9
9
|
findGitCommitSignals,
|
|
10
10
|
findPrMergeSignals
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ZZ7YYXV5.js";
|
|
12
12
|
|
|
13
13
|
// src/services/command-protection-service.ts
|
|
14
14
|
var DEFAULT_COMMAND_PROTECTION_BLOCK_MESSAGE = "Blocked by Replicas command protection.";
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
ENGINE_ENV,
|
|
6
6
|
monolithRequest,
|
|
7
7
|
setAgentCredentialSnapshot
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-V7P43L3L.js";
|
|
9
9
|
import {
|
|
10
10
|
AppServerProcess,
|
|
11
11
|
SUBPROCESS_MAX_BUFFER,
|
|
12
12
|
buildCodexAgentEnv,
|
|
13
13
|
execFileAsync
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-HANGEXUO.js";
|
|
15
15
|
import {
|
|
16
16
|
isRecord
|
|
17
17
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
listOpenAICompatibleModels,
|
|
26
26
|
readOllamaAuthEnv,
|
|
27
27
|
resolveOpenAICompatibleModelsUrl
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-ZZ7YYXV5.js";
|
|
29
29
|
|
|
30
30
|
// src/managers/codex-token-manager.ts
|
|
31
31
|
import { promises as fs } from "fs";
|
|
@@ -255,7 +255,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
|
|
|
255
255
|
await this.applyCredentialUpdate(++this.credentialGeneration, async () => {
|
|
256
256
|
await this.applyCredentialsResponse(data);
|
|
257
257
|
if (data.scope) setAgentCredentialSnapshot("codex", { method: data.type, scope: data.scope, revision: data.revision });
|
|
258
|
-
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-
|
|
258
|
+
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-X5TW6XEX.js");
|
|
259
259
|
await restartCodexAspHostIfRunning2();
|
|
260
260
|
});
|
|
261
261
|
await this.start(true);
|
|
@@ -275,7 +275,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
|
|
|
275
275
|
await this.applyCredentialUpdate(generation, async () => {
|
|
276
276
|
await this.applyCredentialsResponse(data);
|
|
277
277
|
if (restartOnChange && CODEX_AUTH_ENV_KEYS.some((key, index) => process.env[key] !== previousEnv[index])) {
|
|
278
|
-
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-
|
|
278
|
+
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-X5TW6XEX.js");
|
|
279
279
|
await restartCodexAspHostIfRunning2();
|
|
280
280
|
}
|
|
281
281
|
if (data.scope) {
|
|
@@ -1806,14 +1806,12 @@ async function readSseStream(body, onEvent, shouldContinue = () => true) {
|
|
|
1806
1806
|
import { z as z5 } from "zod";
|
|
1807
1807
|
var WORKSPACE_IDENTITY_AUDIENCE = "replicas:workspace";
|
|
1808
1808
|
var WORKSPACE_TOKEN_TTL_SECONDS = 15 * 60;
|
|
1809
|
-
var WORKSPACE_TOKEN_FILE = `${SANDBOX_PATHS.REPLICAS_DIR}/credentials/tokens.json`;
|
|
1810
1809
|
var IDENTITY_PROXY_PORT = 17323;
|
|
1811
|
-
var
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
};
|
|
1810
|
+
var IDENTITY_TOKEN_PATH = "/token";
|
|
1811
|
+
var workspaceAudienceSchema = z5.string().min(1).max(255).regex(/^[\x21-\x7e]+$/, "Audience must be a single printable token without spaces");
|
|
1812
|
+
var workspaceTokenRequestSchema = z5.object({
|
|
1813
|
+
audience: workspaceAudienceSchema.optional()
|
|
1814
|
+
});
|
|
1817
1815
|
var workspaceTokenClaimsSchema = z5.object({
|
|
1818
1816
|
iss: z5.string(),
|
|
1819
1817
|
sub: z5.string(),
|
|
@@ -1825,32 +1823,25 @@ var workspaceTokenClaimsSchema = z5.object({
|
|
|
1825
1823
|
organization_id: z5.string().uuid(),
|
|
1826
1824
|
workspace_id: z5.string().uuid(),
|
|
1827
1825
|
environment_id: z5.string().uuid(),
|
|
1828
|
-
creator_id: z5.string().uuid().nullable()
|
|
1826
|
+
creator_id: z5.string().uuid().nullable(),
|
|
1827
|
+
creator_email: z5.string().nullable().default(null)
|
|
1829
1828
|
}).passthrough();
|
|
1830
|
-
var
|
|
1829
|
+
var workspaceTokenResponseSchema = z5.object({
|
|
1830
|
+
issuer: z5.string(),
|
|
1831
|
+
audience: z5.string(),
|
|
1832
|
+
token: z5.string(),
|
|
1833
|
+
expires_at: z5.string()
|
|
1834
|
+
});
|
|
1835
|
+
var legacyWorkspaceTokenBundleSchema = z5.object({
|
|
1831
1836
|
version: z5.literal(1),
|
|
1832
1837
|
issuer: z5.string(),
|
|
1833
1838
|
default_audience: z5.string(),
|
|
1834
|
-
tokens: z5.record(
|
|
1835
|
-
z5.string(),
|
|
1836
|
-
z5.strictObject({ token: z5.string(), expires_at: z5.string() })
|
|
1837
|
-
)
|
|
1838
|
-
});
|
|
1839
|
-
var workloadAudienceInput = z5.strictObject({
|
|
1840
|
-
name: z5.string().trim().min(1).max(64),
|
|
1841
|
-
audience: z5.string().min(1).max(255).regex(/^[\x21-\x7e]+$/, "Audience must be a single printable token without spaces").refine((value) => value !== WORKSPACE_IDENTITY_AUDIENCE, "Reserved audience"),
|
|
1842
|
-
enabled: z5.boolean(),
|
|
1843
|
-
is_default: z5.boolean()
|
|
1839
|
+
tokens: z5.record(z5.string(), z5.object({ token: z5.string(), expires_at: z5.string() }))
|
|
1844
1840
|
});
|
|
1845
1841
|
var mcpWorkloadAuthSchema = z5.strictObject({
|
|
1846
1842
|
type: z5.literal("workspace_identity"),
|
|
1847
|
-
audience:
|
|
1843
|
+
audience: workspaceAudienceSchema
|
|
1848
1844
|
});
|
|
1849
|
-
function currentWorkspaceToken(bundle, audience = bundle.default_audience, now = Date.now()) {
|
|
1850
|
-
const entry = bundle.tokens[audience];
|
|
1851
|
-
if (!entry || Date.parse(entry.expires_at) <= now) return null;
|
|
1852
|
-
return entry.token;
|
|
1853
|
-
}
|
|
1854
1845
|
|
|
1855
1846
|
// ../shared/src/json.ts
|
|
1856
1847
|
function safeJsonParse(str, fallback) {
|
|
@@ -8415,7 +8406,11 @@ export {
|
|
|
8415
8406
|
readSseStream,
|
|
8416
8407
|
parseFrontmatter,
|
|
8417
8408
|
isSkillRegistryManifest,
|
|
8409
|
+
WORKSPACE_IDENTITY_AUDIENCE,
|
|
8418
8410
|
IDENTITY_PROXY_PORT,
|
|
8419
|
-
|
|
8420
|
-
|
|
8411
|
+
IDENTITY_TOKEN_PATH,
|
|
8412
|
+
workspaceAudienceSchema,
|
|
8413
|
+
workspaceTokenRequestSchema,
|
|
8414
|
+
workspaceTokenResponseSchema,
|
|
8415
|
+
legacyWorkspaceTokenBundleSchema
|
|
8421
8416
|
};
|
|
@@ -3,12 +3,12 @@ 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-IN4SUFZ2.js";
|
|
7
|
+
import "./chunk-V7P43L3L.js";
|
|
8
8
|
import {
|
|
9
9
|
isRecord
|
|
10
10
|
} from "./chunk-UZSNFLDQ.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-ZZ7YYXV5.js";
|
|
12
12
|
import "./chunk-VEQXQN22.js";
|
|
13
13
|
|
|
14
14
|
// src/command-protection-hook.ts
|
|
@@ -3,14 +3,14 @@ import { createRequire as __createRequire } from 'node:module';
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
evaluateCommandProtection
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-IN4SUFZ2.js";
|
|
7
7
|
import {
|
|
8
8
|
notifyPostToolUse
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-2ISAUV3V.js";
|
|
10
|
+
import "./chunk-UVFBGY57.js";
|
|
11
|
+
import "./chunk-V7P43L3L.js";
|
|
12
12
|
import "./chunk-UZSNFLDQ.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-ZZ7YYXV5.js";
|
|
14
14
|
import "./chunk-VEQXQN22.js";
|
|
15
15
|
|
|
16
16
|
// src/deepseek-command-protection-plugin.ts
|
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
AppServerProcess,
|
|
10
10
|
buildCodexAgentEnv
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-HANGEXUO.js";
|
|
12
12
|
import {
|
|
13
13
|
AGENT,
|
|
14
14
|
getMemoryOutputSafetyViolation,
|
|
15
15
|
headlessAgentRequestSchema
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ZZ7YYXV5.js";
|
|
17
17
|
import "./chunk-VEQXQN22.js";
|
|
18
18
|
|
|
19
19
|
// src/headless-agent.ts
|