replicas-engine 0.1.1638 → 0.1.1640
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/README.md +1 -1
- package/dist/src/{asp-host-RE7FGKMW.js → asp-host-L3MJO7Y6.js} +5 -5
- package/dist/src/{chunk-CRG24MFW.js → chunk-3MAUKP2F.js} +6 -6
- package/dist/src/{chunk-Q6GRMXA7.js → chunk-BLXNA6EB.js} +1 -1
- package/dist/src/{chunk-CXV65WNT.js → chunk-DX57A5KG.js} +2 -2
- package/dist/src/{chunk-WXSHLHZE.js → chunk-DXIIUL4D.js} +4 -4
- package/dist/src/{chunk-IXRP6457.js → chunk-GCWT5G3B.js} +3 -3
- package/dist/src/{chunk-GKEXLIXE.js → chunk-J4HN3F2Y.js} +2 -2
- package/dist/src/{chunk-FTTLGKRF.js → chunk-ORGSNGXH.js} +14 -59
- package/dist/src/{chunk-522KN7AC.js → chunk-PHAHSB67.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 +11 -11
- package/dist/src/post-tool-pr-hook.js +2 -2
- package/dist/src/subagent-mcp.js +1 -1
- package/package.json +2 -2
- package/workspace-sdk/index.js +1 -10
- package/workspace-sdk/index.test.ts +0 -23
- package/workspace-sdk/shared/routes/plugin-catalog.d.ts +0 -9
- package/workspace-sdk/shared/routes/plugins.d.ts +0 -24
- package/workspace-sdk/shared/workspace-sdk.d.ts +0 -5
package/README.md
CHANGED
|
@@ -153,4 +153,4 @@ The previous `chat-turn-usage`, `skill-usage`, and `mcp-usage` paths remain acce
|
|
|
153
153
|
|
|
154
154
|
## Upgrading existing workspaces
|
|
155
155
|
|
|
156
|
-
Existing workspaces install new engine releases in place (`monolith/assets/runtime-upgrade.sh`). `oldestUpgradableImage` in `package.json` is the oldest sandbox image a release may be installed on. When a change breaks workspaces created from older images (it needs something only a newer image has, or can't read what older engines saved), set it to the new `
|
|
156
|
+
Existing workspaces install new engine releases in place (`monolith/assets/runtime-upgrade.sh`). `oldestUpgradableImage` in `package.json` is the oldest sandbox image a release may be installed on. When a change breaks workspaces created from older images (it needs something only a newer image has, or can't read what older engines saved), set it to the new `TENSORLAKE_IMAGE_NAME` in the same PR: older workspaces keep their engine and only new workspaces get the release. The Engine upgrade check in CI upgrades a workspace created from that image and fails when the release breaks it.
|
|
@@ -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-3MAUKP2F.js";
|
|
12
|
+
import "./chunk-DX57A5KG.js";
|
|
13
|
+
import "./chunk-GCWT5G3B.js";
|
|
14
|
+
import "./chunk-BLXNA6EB.js";
|
|
15
15
|
import "./chunk-UZSNFLDQ.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-ORGSNGXH.js";
|
|
17
17
|
import "./chunk-VEQXQN22.js";
|
|
18
18
|
export {
|
|
19
19
|
CODEX_ULTRAFAST_SERVICE_TIER,
|
|
@@ -12,15 +12,15 @@ import {
|
|
|
12
12
|
resolveDiffBase,
|
|
13
13
|
runGitCommand,
|
|
14
14
|
setAgentCredentialSnapshot
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-DX57A5KG.js";
|
|
16
16
|
import {
|
|
17
17
|
AppServerProcess,
|
|
18
18
|
buildCodexAgentEnv
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-GCWT5G3B.js";
|
|
20
20
|
import {
|
|
21
21
|
SUBPROCESS_MAX_BUFFER,
|
|
22
22
|
execFileAsync
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-BLXNA6EB.js";
|
|
24
24
|
import {
|
|
25
25
|
isRecord
|
|
26
26
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
shrunkImageSize,
|
|
62
62
|
splitMothershipInstructions,
|
|
63
63
|
withTimeout
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-ORGSNGXH.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-L3MJO7Y6.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-L3MJO7Y6.js");
|
|
487
487
|
await restartCodexAspHostIfRunning2();
|
|
488
488
|
}
|
|
489
489
|
setAgentCredentialSnapshot("codex", data);
|
|
@@ -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-ORGSNGXH.js";
|
|
7
7
|
|
|
8
8
|
// src/utils/exec.ts
|
|
9
9
|
import { exec, execFile } from "child_process";
|
|
@@ -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-BLXNA6EB.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-ORGSNGXH.js";
|
|
25
25
|
|
|
26
26
|
// src/runtime-env-loader.ts
|
|
27
27
|
import { readFileSync } from "fs";
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
ENGINE_ENV,
|
|
6
6
|
monolithRequest,
|
|
7
7
|
runGitCommand
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-DX57A5KG.js";
|
|
9
9
|
import {
|
|
10
10
|
COMMAND_PROTECTION_MAX_MESSAGE_FILE_BYTES,
|
|
11
11
|
COMMAND_PROTECTION_REPO_GIT_ARGS,
|
|
@@ -17,8 +17,8 @@ import {
|
|
|
17
17
|
findScoutRepoWriteSignals,
|
|
18
18
|
parseCommandProtectionRequest,
|
|
19
19
|
toCommandProtectionRepoState,
|
|
20
|
-
|
|
21
|
-
} from "./chunk-
|
|
20
|
+
withRetry
|
|
21
|
+
} from "./chunk-ORGSNGXH.js";
|
|
22
22
|
|
|
23
23
|
// src/services/command-protection-service.ts
|
|
24
24
|
import { readFile, stat } from "fs/promises";
|
|
@@ -62,7 +62,7 @@ async function evaluateCommandProtection(request, signal) {
|
|
|
62
62
|
}
|
|
63
63
|
let response;
|
|
64
64
|
try {
|
|
65
|
-
response = await
|
|
65
|
+
response = await withRetry("evaluate", async () => {
|
|
66
66
|
const attempt = await monolithRequest("/v1/engine/command-protection/evaluate", {
|
|
67
67
|
body: { ...request, gitContext },
|
|
68
68
|
signal
|
|
@@ -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-BLXNA6EB.js";
|
|
7
7
|
import {
|
|
8
8
|
isVersionBelow
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ORGSNGXH.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.1640";
|
|
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
|
AspClient
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GCWT5G3B.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-ORGSNGXH.js";
|
|
19
19
|
|
|
20
20
|
// src/managers/codex-asp/notification-dispatch.ts
|
|
21
21
|
var TURN_STARTED_METHOD = "turn/started";
|
|
@@ -9629,7 +9629,7 @@ var DESIGN_COLORS = {
|
|
|
9629
9629
|
destructiveForeground: "#ffffff",
|
|
9630
9630
|
destructiveSoft: "#dc262614",
|
|
9631
9631
|
warning: "#92400e",
|
|
9632
|
-
warningText: "#
|
|
9632
|
+
warningText: "#aa4d00",
|
|
9633
9633
|
warningSoft: "#92400e1f",
|
|
9634
9634
|
warningForeground: "#ffffff",
|
|
9635
9635
|
highlight: "#facc1580",
|
|
@@ -14140,7 +14140,7 @@ Use this when:
|
|
|
14140
14140
|
- You need to start a service that a human should view or interact with
|
|
14141
14141
|
- The task involves UI work that benefits from human review
|
|
14142
14142
|
- You are verifying frontend/backend integrations visually
|
|
14143
|
-
- You need a URL for OAuth redirects, GitHub App callbacks, or webhooks (never the sandbox's \`*.
|
|
14143
|
+
- You need a URL for OAuth redirects, GitHub App callbacks, or webhooks (never the sandbox's \`*.sandbox.tensorlake.ai\` address)`;
|
|
14144
14144
|
var REFERENCE11 = `# Preview URLs
|
|
14145
14145
|
|
|
14146
14146
|
When you run services on ports \u2014 such as a web app, API server, or database \u2014 humans may want to interact with them directly. You can expose your locally running services as public preview URLs.
|
|
@@ -14189,7 +14189,7 @@ Previews can optionally require cookie-based authentication. When \`--authentica
|
|
|
14189
14189
|
|
|
14190
14190
|
## OAuth Redirects, App Callbacks, and Webhooks
|
|
14191
14191
|
|
|
14192
|
-
Never use the sandbox's raw \`https://<port>-<sandbox-id>.
|
|
14192
|
+
Never use the sandbox's raw \`https://<port>-<sandbox-id>.sandbox.tensorlake.ai\` address anywhere a browser or third party will load it. It only accepts requests carrying a key that the Replicas preview proxy adds, so browsers, OAuth providers, and webhook senders are rejected.
|
|
14193
14193
|
|
|
14194
14194
|
Use the port's preview URL instead:
|
|
14195
14195
|
- As the app's public base URL (\`APP_URL\`, \`NEXTAUTH_URL\`, and similar)
|
|
@@ -14229,7 +14229,7 @@ It is your responsibility to make previews work for outsiders as well as they wo
|
|
|
14229
14229
|
var PREVIEWS_ABILITY = {
|
|
14230
14230
|
label: "Previews",
|
|
14231
14231
|
description: "Expose locally running services on public preview URLs for humans.",
|
|
14232
|
-
bullet: "- Creating preview URLs for locally running services, including OAuth redirect, app callback, and webhook URLs (never a raw `*.
|
|
14232
|
+
bullet: "- Creating preview URLs for locally running services, including OAuth redirect, app callback, and webhook URLs (never a raw `*.sandbox.tensorlake.ai` address)",
|
|
14233
14233
|
section: SECTION11,
|
|
14234
14234
|
referenceFile: { name: "PREVIEWS.md", content: REFERENCE11 }
|
|
14235
14235
|
};
|
|
@@ -14243,7 +14243,6 @@ Discover and execute installed marketplace tools through the workspace-scoped Ty
|
|
|
14243
14243
|
Use this when:
|
|
14244
14244
|
- The user asks to work with an installed productivity, data, engineering, or business plugin
|
|
14245
14245
|
- The user asks to discover which external services are connected
|
|
14246
|
-
- The user asks to create or control an E2B sandbox
|
|
14247
14246
|
- The user asks to invoke a connected Modal function
|
|
14248
14247
|
- The user asks to access Vercel projects, deployments, domains, logs, or infrastructure
|
|
14249
14248
|
- The user asks to read or update Lightfield CRM accounts, contacts, opportunities, meetings, notes, or tasks
|
|
@@ -14443,18 +14442,6 @@ const plagiarism = await replicas.pangram.plagiarism(text);
|
|
|
14443
14442
|
\`\`\`
|
|
14444
14443
|
|
|
14445
14444
|
Do not send private or sensitive text without the user's authorization.
|
|
14446
|
-
|
|
14447
|
-
## E2B
|
|
14448
|
-
|
|
14449
|
-
E2B is a native integration backed by its official JavaScript SDK. Create a sandbox, run commands, and remove it when finished:
|
|
14450
|
-
|
|
14451
|
-
\`\`\`ts
|
|
14452
|
-
const { sandboxId } = await replicas.e2b.create({ timeoutMs: 300_000 });
|
|
14453
|
-
const result = await replicas.e2b.run(sandboxId, 'python analysis.py', { cwd: '/home/user' });
|
|
14454
|
-
await replicas.e2b.kill(sandboxId);
|
|
14455
|
-
\`\`\`
|
|
14456
|
-
|
|
14457
|
-
Sandbox operations consume the connected account's E2B credits. Kill sandboxes after use unless the user asked to keep one running.
|
|
14458
14445
|
`;
|
|
14459
14446
|
var PLUGINS_ABILITY = {
|
|
14460
14447
|
label: "Plugins",
|
|
@@ -15316,15 +15303,6 @@ var EXPLICIT_PLUGIN_CATALOG = [
|
|
|
15316
15303
|
name: "Cloudflare",
|
|
15317
15304
|
description: "Manage zones, DNS records, analytics, and security settings."
|
|
15318
15305
|
},
|
|
15319
|
-
{
|
|
15320
|
-
id: "e2b",
|
|
15321
|
-
toolkit: "e2b",
|
|
15322
|
-
backend: "native",
|
|
15323
|
-
authType: "api_key",
|
|
15324
|
-
category: "data",
|
|
15325
|
-
name: "E2B",
|
|
15326
|
-
description: "Create secure cloud sandboxes and run commands in them."
|
|
15327
|
-
},
|
|
15328
15306
|
{
|
|
15329
15307
|
id: "gmail",
|
|
15330
15308
|
backend: "composio",
|
|
@@ -21156,53 +21134,30 @@ var VOICE_WAVEFORM = {
|
|
|
21156
21134
|
barHeights: BAR_HEIGHTS
|
|
21157
21135
|
};
|
|
21158
21136
|
|
|
21159
|
-
// ../shared/src/
|
|
21160
|
-
|
|
21161
|
-
|
|
21162
|
-
// ../shared/src/e2b-retry.ts
|
|
21163
|
-
var DEFAULT_BACKOFFS_MS = [2e3, 5e3];
|
|
21164
|
-
var TRANSIENT_E2B_MESSAGE_PATTERNS = [
|
|
21165
|
-
/failed to place sandbox/i,
|
|
21166
|
-
/error creating snapshot template/i,
|
|
21167
|
-
/no healthy upstream/i,
|
|
21168
|
-
/error when setting sandbox timeout/i
|
|
21169
|
-
];
|
|
21170
|
-
function isTransientE2BError(error) {
|
|
21171
|
-
const message2 = error instanceof Error ? error.message : String(error);
|
|
21172
|
-
if (!/(^|[^0-9])5\d{2}(\s|:)/.test(message2)) return false;
|
|
21173
|
-
return TRANSIENT_E2B_MESSAGE_PATTERNS.some((pattern) => pattern.test(message2));
|
|
21174
|
-
}
|
|
21175
|
-
async function withE2BRetry(label, fn, options = {}) {
|
|
21176
|
-
const backoffs = options.backoffsMs ?? DEFAULT_BACKOFFS_MS;
|
|
21177
|
-
const retryable = options.retryable ?? isTransientE2BError;
|
|
21178
|
-
const logPrefix = options.logPrefix ?? "e2b";
|
|
21179
|
-
const attempts = backoffs.length + 1;
|
|
21137
|
+
// ../shared/src/retry.ts
|
|
21138
|
+
async function withRetry(label, fn, options) {
|
|
21139
|
+
const attempts = options.backoffsMs.length + 1;
|
|
21180
21140
|
let lastError;
|
|
21181
21141
|
for (let attempt = 1; attempt <= attempts; attempt += 1) {
|
|
21182
21142
|
try {
|
|
21183
21143
|
return await fn();
|
|
21184
21144
|
} catch (error) {
|
|
21185
21145
|
lastError = error;
|
|
21186
|
-
if (attempt >= attempts || !retryable(error)) {
|
|
21146
|
+
if (attempt >= attempts || !options.retryable(error)) {
|
|
21187
21147
|
throw error;
|
|
21188
21148
|
}
|
|
21189
|
-
const delayMs =
|
|
21149
|
+
const delayMs = options.backoffsMs[attempt - 1] ?? 5e3;
|
|
21190
21150
|
console.warn(
|
|
21191
|
-
`[${logPrefix}] ${label}: retryable failure (attempt ${attempt}/${attempts}), retrying in ${delayMs}ms: ${error instanceof Error ? error.message : String(error)}`
|
|
21151
|
+
`[${options.logPrefix}] ${label}: retryable failure (attempt ${attempt}/${attempts}), retrying in ${delayMs}ms: ${error instanceof Error ? error.message : String(error)}`
|
|
21192
21152
|
);
|
|
21193
|
-
const waitStartedAt = performance.now();
|
|
21194
21153
|
await new Promise((resolve) => setTimeout(resolve, delayMs));
|
|
21195
|
-
if (options.metrics) {
|
|
21196
|
-
options.metrics.retry_count += 1;
|
|
21197
|
-
options.metrics.retry_wait_ms += Math.round(performance.now() - waitStartedAt);
|
|
21198
|
-
options.metrics.last_retry_error = error instanceof Error ? error.message : String(error);
|
|
21199
|
-
}
|
|
21200
21154
|
}
|
|
21201
21155
|
}
|
|
21202
21156
|
throw lastError;
|
|
21203
21157
|
}
|
|
21204
21158
|
|
|
21205
21159
|
// ../shared/src/tensorlake.ts
|
|
21160
|
+
var TENSORLAKE_IMAGE_NAME = "replicas-sandbox-2026-11-18-v14";
|
|
21206
21161
|
var TENSORLAKE_DISK_MB = 100 * 1024;
|
|
21207
21162
|
|
|
21208
21163
|
// ../shared/src/egress.ts
|
|
@@ -23224,7 +23179,7 @@ function scoreRepoFileMatch(query, filePath) {
|
|
|
23224
23179
|
}
|
|
23225
23180
|
|
|
23226
23181
|
// ../shared/src/routes/admin.ts
|
|
23227
|
-
var WEBHOOK_PROVIDERS = ["linear", "github", "gitlab", "slack", "
|
|
23182
|
+
var WEBHOOK_PROVIDERS = ["linear", "github", "gitlab", "slack", "stripe", "sentry"];
|
|
23228
23183
|
var WEBHOOK_PROVIDER_SET = new Set(WEBHOOK_PROVIDERS);
|
|
23229
23184
|
|
|
23230
23185
|
// ../shared/src/routes/environment-hook-runs.ts
|
|
@@ -23748,8 +23703,8 @@ export {
|
|
|
23748
23703
|
clampTokensToWindow,
|
|
23749
23704
|
buildCodexTokenUsageContextUsagePayload,
|
|
23750
23705
|
extractLatestContextUsage,
|
|
23751
|
-
|
|
23752
|
-
|
|
23706
|
+
withRetry,
|
|
23707
|
+
TENSORLAKE_IMAGE_NAME,
|
|
23753
23708
|
InFlightMap,
|
|
23754
23709
|
createProviderSlashCommand,
|
|
23755
23710
|
mergeSlashCommands,
|
|
@@ -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-DXIIUL4D.js";
|
|
7
|
+
import "./chunk-DX57A5KG.js";
|
|
8
|
+
import "./chunk-BLXNA6EB.js";
|
|
9
9
|
import {
|
|
10
10
|
isRecord
|
|
11
11
|
} from "./chunk-UZSNFLDQ.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-ORGSNGXH.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-J4HN3F2Y.js";
|
|
18
18
|
import {
|
|
19
19
|
AppServerProcess,
|
|
20
20
|
buildCodexAgentEnv
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-GCWT5G3B.js";
|
|
22
|
+
import "./chunk-BLXNA6EB.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-ORGSNGXH.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-DXIIUL4D.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-J4HN3F2Y.js";
|
|
133
133
|
import {
|
|
134
134
|
publishedPullRequestUrls
|
|
135
|
-
} from "./chunk-
|
|
135
|
+
} from "./chunk-PHAHSB67.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-3MAUKP2F.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-DX57A5KG.js";
|
|
227
227
|
import {
|
|
228
228
|
buildCodexAgentEnv,
|
|
229
229
|
getCodexModelProvider
|
|
230
|
-
} from "./chunk-
|
|
230
|
+
} from "./chunk-GCWT5G3B.js";
|
|
231
231
|
import {
|
|
232
232
|
SUBPROCESS_MAX_BUFFER,
|
|
233
233
|
execAsync,
|
|
234
234
|
execFileAsync
|
|
235
|
-
} from "./chunk-
|
|
235
|
+
} from "./chunk-BLXNA6EB.js";
|
|
236
236
|
import {
|
|
237
237
|
isRecord as isRecord2
|
|
238
238
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -285,7 +285,6 @@ import {
|
|
|
285
285
|
DEVICES_DIR,
|
|
286
286
|
DEVICE_HOST_KEYS_HEADER,
|
|
287
287
|
DEVICE_SCREEN_FILE_SUFFIX,
|
|
288
|
-
E2B_TEMPLATE_NAME,
|
|
289
288
|
ENGINE_ACTIVATE_PATH,
|
|
290
289
|
ENGINE_HEALTH_MAX_WAIT_MS,
|
|
291
290
|
ENGINE_HEALTH_WAIT_HEADER,
|
|
@@ -343,6 +342,7 @@ import {
|
|
|
343
342
|
SUBAGENT_MCP_SERVER_NAME,
|
|
344
343
|
SUBAGENT_MCP_TOOLS,
|
|
345
344
|
SUBAGENT_MCP_TOOL_NAMES,
|
|
345
|
+
TENSORLAKE_IMAGE_NAME,
|
|
346
346
|
TERMINAL_RTC_ICE_SERVER,
|
|
347
347
|
TIMEOUT,
|
|
348
348
|
TOKEN_USAGE_PATH,
|
|
@@ -529,7 +529,7 @@ import {
|
|
|
529
529
|
workspaceTokenRequestSchema,
|
|
530
530
|
workspaceTokenResponseSchema,
|
|
531
531
|
wrapInTag
|
|
532
|
-
} from "./chunk-
|
|
532
|
+
} from "./chunk-ORGSNGXH.js";
|
|
533
533
|
import {
|
|
534
534
|
__commonJS,
|
|
535
535
|
__export,
|
|
@@ -10084,7 +10084,7 @@ var EnvironmentDetailsService = class {
|
|
|
10084
10084
|
listCodexModelsForDetails()
|
|
10085
10085
|
]);
|
|
10086
10086
|
details.engineVersion = ENGINE_ENV.REPLICAS_SANDBOX_IMAGE_VERSION;
|
|
10087
|
-
details.engineImage =
|
|
10087
|
+
details.engineImage = TENSORLAKE_IMAGE_NAME;
|
|
10088
10088
|
details.supportsMidTurnSteering = true;
|
|
10089
10089
|
details.supportsClaudeMidTurnSteering = true;
|
|
10090
10090
|
details.supportsCursorMidTurnSteering = true;
|
|
@@ -66285,7 +66285,7 @@ var HeartbeatService = class _HeartbeatService {
|
|
|
66285
66285
|
bootTimeMs: this.bootTimeMs,
|
|
66286
66286
|
uptimeSeconds: Math.floor((Date.now() - this.bootTimeMs) / 1e3),
|
|
66287
66287
|
status: "active",
|
|
66288
|
-
engineImage:
|
|
66288
|
+
engineImage: TENSORLAKE_IMAGE_NAME,
|
|
66289
66289
|
...resources.length ? { resources } : {},
|
|
66290
66290
|
...memorySpike ? { memorySpike } : {}
|
|
66291
66291
|
};
|
|
@@ -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-PHAHSB67.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-ORGSNGXH.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
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "replicas-engine",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1640",
|
|
4
4
|
"description": "Lightweight API server for Replicas workspaces",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
7
|
-
"oldestUpgradableImage": "replicas-sandbox-2026-10-
|
|
7
|
+
"oldestUpgradableImage": "replicas-sandbox-2026-10-25-v4",
|
|
8
8
|
"bin": {
|
|
9
9
|
"replicas-engine": "./dist/src/index.js",
|
|
10
10
|
"replicas-subagent-mcp": "./dist/src/subagent-mcp.js",
|
package/workspace-sdk/index.js
CHANGED
|
@@ -160,14 +160,5 @@ const pangram = {
|
|
|
160
160
|
plagiarism: (text) => pangramRequest('plagiarism', { text }),
|
|
161
161
|
};
|
|
162
162
|
|
|
163
|
-
const
|
|
164
|
-
create: (input = {}) => request('/v1/engine/e2b', { method: 'POST', body: { ...input, operation: 'create' } }),
|
|
165
|
-
run: (sandboxId, command, options = {}) => request('/v1/engine/e2b', {
|
|
166
|
-
method: 'POST',
|
|
167
|
-
body: { ...options, operation: 'run', sandboxId, command },
|
|
168
|
-
}),
|
|
169
|
-
kill: (sandboxId) => request('/v1/engine/e2b', { method: 'POST', body: { operation: 'kill', sandboxId } }),
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
export const replicas = { integrations, plugins, linear, slack, github, gitlab, sentry, modal, greptile, sazabi, kondo, pangram, planetscale, vercel, lightfield, vanta, turbopuffer, e2b };
|
|
163
|
+
export const replicas = { integrations, plugins, linear, slack, github, gitlab, sentry, modal, greptile, sazabi, kondo, pangram, planetscale, vercel, lightfield, vanta, turbopuffer };
|
|
173
164
|
export default replicas;
|
|
@@ -274,29 +274,6 @@ describe('@replicas/sdk', () => {
|
|
|
274
274
|
server.stop(true);
|
|
275
275
|
}
|
|
276
276
|
});
|
|
277
|
-
|
|
278
|
-
test('runs E2B commands through the workspace gateway', async () => {
|
|
279
|
-
let observed: { path: string; body: unknown } | null = null;
|
|
280
|
-
const server = Bun.serve({
|
|
281
|
-
port: 0,
|
|
282
|
-
async fetch(request) {
|
|
283
|
-
observed = { path: new URL(request.url).pathname, body: await request.json() };
|
|
284
|
-
return Response.json({ exitCode: 0, stdout: 'ok\n', stderr: '' });
|
|
285
|
-
},
|
|
286
|
-
});
|
|
287
|
-
process.env.REPLICAS_MONOLITH_URL = server.url.toString().replace(/\/$/, '');
|
|
288
|
-
process.env.REPLICAS_ENGINE_SECRET = 'engine-secret';
|
|
289
|
-
process.env.REPLICAS_WORKSPACE_ID = 'workspace-1';
|
|
290
|
-
try {
|
|
291
|
-
await replicas.e2b.run('sandbox-1', 'echo ok', { cwd: '/home/user' });
|
|
292
|
-
expect(observed).toEqual({
|
|
293
|
-
path: '/v1/engine/e2b',
|
|
294
|
-
body: { operation: 'run', sandboxId: 'sandbox-1', command: 'echo ok', cwd: '/home/user' },
|
|
295
|
-
});
|
|
296
|
-
} finally {
|
|
297
|
-
server.stop(true);
|
|
298
|
-
}
|
|
299
|
-
});
|
|
300
277
|
});
|
|
301
278
|
|
|
302
279
|
test('analyzes text with Pangram through the workspace gateway', async () => {
|
|
@@ -38,15 +38,6 @@ export declare const PLUGIN_CATALOG: ({
|
|
|
38
38
|
category: "data";
|
|
39
39
|
name: "Cloudflare";
|
|
40
40
|
description: "Manage zones, DNS records, analytics, and security settings.";
|
|
41
|
-
} | {
|
|
42
|
-
readOnlyScopes: readonly string[] | undefined;
|
|
43
|
-
id: "e2b";
|
|
44
|
-
toolkit: "e2b";
|
|
45
|
-
backend: "native";
|
|
46
|
-
authType: "api_key";
|
|
47
|
-
category: "data";
|
|
48
|
-
name: "E2B";
|
|
49
|
-
description: "Create secure cloud sandboxes and run commands in them.";
|
|
50
41
|
} | {
|
|
51
42
|
readOnlyScopes: readonly string[] | undefined;
|
|
52
43
|
id: "gmail";
|
|
@@ -100,30 +100,6 @@ export interface TurbopufferOperationRequest {
|
|
|
100
100
|
namespace?: string;
|
|
101
101
|
params?: Record<string, unknown>;
|
|
102
102
|
}
|
|
103
|
-
export interface E2BCreateSandboxRequest {
|
|
104
|
-
template?: string;
|
|
105
|
-
timeoutMs?: number;
|
|
106
|
-
metadata?: Record<string, string>;
|
|
107
|
-
envs?: Record<string, string>;
|
|
108
|
-
}
|
|
109
|
-
export interface E2BRunCommandOptions {
|
|
110
|
-
cwd?: string;
|
|
111
|
-
envs?: Record<string, string>;
|
|
112
|
-
user?: string;
|
|
113
|
-
timeoutMs?: number;
|
|
114
|
-
}
|
|
115
|
-
export interface E2BCreateSandboxResponse {
|
|
116
|
-
sandboxId: string;
|
|
117
|
-
}
|
|
118
|
-
export interface E2BCommandResult {
|
|
119
|
-
exitCode: number;
|
|
120
|
-
error?: string;
|
|
121
|
-
stdout: string;
|
|
122
|
-
stderr: string;
|
|
123
|
-
}
|
|
124
|
-
export interface E2BKillSandboxResponse {
|
|
125
|
-
killed: boolean;
|
|
126
|
-
}
|
|
127
103
|
export interface PluginConnectResponse {
|
|
128
104
|
success: true;
|
|
129
105
|
}
|
|
@@ -104,9 +104,4 @@ export interface ReplicasSdk {
|
|
|
104
104
|
detect<T = unknown>(input: import('./routes/plugins').PangramAnalyzeRequest): Promise<T>;
|
|
105
105
|
plagiarism<T = unknown>(text: string): Promise<T>;
|
|
106
106
|
};
|
|
107
|
-
e2b: {
|
|
108
|
-
create(input?: import('./routes/plugins').E2BCreateSandboxRequest): Promise<import('./routes/plugins').E2BCreateSandboxResponse>;
|
|
109
|
-
run(sandboxId: string, command: string, options?: import('./routes/plugins').E2BRunCommandOptions): Promise<import('./routes/plugins').E2BCommandResult>;
|
|
110
|
-
kill(sandboxId: string): Promise<import('./routes/plugins').E2BKillSandboxResponse>;
|
|
111
|
-
};
|
|
112
107
|
}
|