@runtypelabs/cli 2.11.8 → 2.12.0
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/index.js +27 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -16977,6 +16977,22 @@ var CORE_BUILTIN_TOOLS_REGISTRY = [
|
|
|
16977
16977
|
userAgent: {
|
|
16978
16978
|
type: "string",
|
|
16979
16979
|
description: "Custom User-Agent string (only used when starting a fresh browser)."
|
|
16980
|
+
},
|
|
16981
|
+
captureScreenshots: {
|
|
16982
|
+
type: "string",
|
|
16983
|
+
enum: ["none", "eachStep", "finalOnly"],
|
|
16984
|
+
description: 'Screenshot capture mode. "none" (default) skips screenshots. "finalOnly" captures one screenshot after the task completes. "eachStep" captures a screenshot after each browser action (capped at 10). Screenshots are stored and returned as signed URLs.',
|
|
16985
|
+
default: "none"
|
|
16986
|
+
},
|
|
16987
|
+
returnScreenshot: {
|
|
16988
|
+
type: "boolean",
|
|
16989
|
+
description: "When true and screenshots are enabled, the final screenshot is returned inline as an image so vision-capable models can see the end state directly. Default false.",
|
|
16990
|
+
default: false
|
|
16991
|
+
},
|
|
16992
|
+
recordSession: {
|
|
16993
|
+
type: "boolean",
|
|
16994
|
+
description: "When true, enables browser session recording. After the task completes, the recording is stored and a recordingUrl is returned in the result. Useful for debugging or audit trails.",
|
|
16995
|
+
default: false
|
|
16980
16996
|
}
|
|
16981
16997
|
},
|
|
16982
16998
|
required: ["goal"]
|
|
@@ -30419,8 +30435,9 @@ function isRecord(value) {
|
|
|
30419
30435
|
function parseSandboxProvider(value) {
|
|
30420
30436
|
if (!value) return void 0;
|
|
30421
30437
|
const normalized = value.trim().toLowerCase();
|
|
30422
|
-
if (normalized === "quickjs" || normalized === "daytona" || normalized === "cloudflare-worker" || normalized === "
|
|
30438
|
+
if (normalized === "quickjs" || normalized === "daytona" || normalized === "cloudflare-worker" || normalized === "runtype-sandbox")
|
|
30423
30439
|
return normalized;
|
|
30440
|
+
if (normalized === "cloudflare-sandbox") return "runtype-sandbox";
|
|
30424
30441
|
return void 0;
|
|
30425
30442
|
}
|
|
30426
30443
|
function parseSandboxLanguage(provider, value) {
|
|
@@ -30504,13 +30521,13 @@ function createSandboxInstructions(provider) {
|
|
|
30504
30521
|
"return { sum, count: nums.length }"
|
|
30505
30522
|
].join("\n");
|
|
30506
30523
|
}
|
|
30507
|
-
if (provider === "
|
|
30524
|
+
if (provider === "runtype-sandbox") {
|
|
30508
30525
|
return [
|
|
30509
|
-
"--- Sandbox Tooling (
|
|
30526
|
+
"--- Sandbox Tooling (Runtype Sandbox) ---",
|
|
30510
30527
|
"You can execute JavaScript/TypeScript/Python code with the local tool `run_sandbox_code`.",
|
|
30511
30528
|
"Call shape:",
|
|
30512
30529
|
'{ "code": "...", "parameters": { ... }, "language": "javascript|typescript|python", "timeoutMs": 30000 }',
|
|
30513
|
-
"
|
|
30530
|
+
"Runtype Sandbox rules:",
|
|
30514
30531
|
"1. Choose one language: javascript, typescript, or python.",
|
|
30515
30532
|
"2. Each session is a full Linux container (Node 22, Python 3.12, pnpm, tsx, uv, git).",
|
|
30516
30533
|
"3. Inputs are available as the `parameters` object (JS/TS) or `parameters` dict (Python).",
|
|
@@ -30523,7 +30540,7 @@ function createSandboxInstructions(provider) {
|
|
|
30523
30540
|
"const sum = nums.reduce((acc: number, n: number) => acc + n, 0)",
|
|
30524
30541
|
"process.stdout.write(JSON.stringify({ sum, count: nums.length }))",
|
|
30525
30542
|
"",
|
|
30526
|
-
"--- Deploy with Preview (
|
|
30543
|
+
"--- Deploy with Preview (Runtype Sandbox) ---",
|
|
30527
30544
|
"You also have `deploy_sandbox` to deploy a persistent web server and get a live preview URL.",
|
|
30528
30545
|
"Call shape:",
|
|
30529
30546
|
'{ "code": "...", "files": { "public/index.html": "..." }, "packageJson": "{\\"dependencies\\": {\\"hono\\": \\"^4.0.0\\"}}", "language": "typescript", "port": 8080 }',
|
|
@@ -30568,7 +30585,7 @@ function createSandboxInstructions(provider) {
|
|
|
30568
30585
|
}
|
|
30569
30586
|
function createSandboxLocalTool(client, provider, debugMode) {
|
|
30570
30587
|
return {
|
|
30571
|
-
description: provider === "cloudflare-worker" ? "Execute JavaScript code in Cloudflare Worker sandbox. Async/await supported. Inputs are passed via parameters object." : provider === "quickjs" ? "Execute JavaScript code in QuickJS sandbox (legacy). Inputs are passed via parameters object." : provider === "
|
|
30588
|
+
description: provider === "cloudflare-worker" ? "Execute JavaScript code in Cloudflare Worker sandbox. Async/await supported. Inputs are passed via parameters object." : provider === "quickjs" ? "Execute JavaScript code in QuickJS sandbox (legacy). Inputs are passed via parameters object." : provider === "runtype-sandbox" ? "Execute JavaScript/TypeScript/Python code in Runtype Sandbox (container-backed Linux computer). npm/pip dependencies, persistent filesystem, and long-running processes supported. Inputs are passed via parameters object." : "Execute JavaScript/TypeScript/Python code in Daytona sandbox. Inputs are injected as top-level variables.",
|
|
30572
30589
|
parametersSchema: {
|
|
30573
30590
|
type: "object",
|
|
30574
30591
|
properties: {
|
|
@@ -30580,7 +30597,7 @@ function createSandboxLocalTool(client, provider, debugMode) {
|
|
|
30580
30597
|
language: {
|
|
30581
30598
|
type: "string",
|
|
30582
30599
|
enum: provider === "quickjs" || provider === "cloudflare-worker" ? ["javascript"] : ["javascript", "typescript", "python"],
|
|
30583
|
-
description: provider === "quickjs" ? "QuickJS only accepts javascript" : provider === "cloudflare-worker" ? "Cloudflare Worker only accepts javascript" : provider === "
|
|
30600
|
+
description: provider === "quickjs" ? "QuickJS only accepts javascript" : provider === "cloudflare-worker" ? "Cloudflare Worker only accepts javascript" : provider === "runtype-sandbox" ? "Runtype Sandbox accepts javascript, typescript, or python" : "Daytona code language"
|
|
30584
30601
|
},
|
|
30585
30602
|
timeoutMs: { type: "number", description: "Execution timeout in ms (max 30000)" }
|
|
30586
30603
|
},
|
|
@@ -30776,7 +30793,7 @@ function createDeploySandboxLocalTool(client, debugMode) {
|
|
|
30776
30793
|
var activeCfSandboxId;
|
|
30777
30794
|
function createDeployCfSandboxLocalTool(client, debugMode) {
|
|
30778
30795
|
return {
|
|
30779
|
-
description: "Deploy code to a persistent
|
|
30796
|
+
description: "Deploy code to a persistent Runtype Sandbox container and get a live preview URL. Use this to run web servers, APIs, or UIs that the user can visit in their browser. Supports JavaScript, TypeScript, and Python with npm/pip dependencies.",
|
|
30780
30797
|
parametersSchema: {
|
|
30781
30798
|
type: "object",
|
|
30782
30799
|
properties: {
|
|
@@ -36582,7 +36599,7 @@ function buildLocalTools(client, sandboxProvider, options, context) {
|
|
|
36582
36599
|
enabledTools.run_sandbox_code = createSandboxLocalTool(client, sandboxProvider, options.debug);
|
|
36583
36600
|
if (sandboxProvider === "daytona") {
|
|
36584
36601
|
enabledTools.deploy_sandbox = createDeploySandboxLocalTool(client, options.debug);
|
|
36585
|
-
} else if (sandboxProvider === "
|
|
36602
|
+
} else if (sandboxProvider === "runtype-sandbox") {
|
|
36586
36603
|
enabledTools.deploy_sandbox = createDeployCfSandboxLocalTool(client, options.debug);
|
|
36587
36604
|
}
|
|
36588
36605
|
}
|
|
@@ -37457,7 +37474,7 @@ async function taskAction(agent, options) {
|
|
|
37457
37474
|
});
|
|
37458
37475
|
let parsedSandbox = parseSandboxProvider(options.sandbox);
|
|
37459
37476
|
if (options.sandbox && !parsedSandbox) {
|
|
37460
|
-
console.error(chalk16.red(`Invalid --sandbox value "${options.sandbox}". Use: cloudflare-worker,
|
|
37477
|
+
console.error(chalk16.red(`Invalid --sandbox value "${options.sandbox}". Use: cloudflare-worker, runtype-sandbox, quickjs, or daytona`));
|
|
37461
37478
|
process.exit(1);
|
|
37462
37479
|
}
|
|
37463
37480
|
let requestedCompactStrategy;
|