@runtypelabs/cli 2.12.3 → 2.12.5

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.
Files changed (2) hide show
  1. package/dist/index.js +45 -15
  2. package/package.json +5 -4
package/dist/index.js CHANGED
@@ -31559,6 +31559,28 @@ var MODEL_FAMILY_PROVIDER_IDS = {
31559
31559
  "vercel": "voyage/voyage-law-2"
31560
31560
  }
31561
31561
  };
31562
+ var PLATFORM_KEY_PROVIDER_MAP = {
31563
+ "mixlayer": true,
31564
+ "openai": true,
31565
+ "anthropic": true,
31566
+ "google": true,
31567
+ "xai": true,
31568
+ "vercel": true,
31569
+ "cloudflare": true,
31570
+ "azure": false,
31571
+ "openrouter": false,
31572
+ "togetherai": false,
31573
+ "bedrock": false,
31574
+ "vertex": false,
31575
+ "vertex-anthropic": false,
31576
+ "tinfoil": false,
31577
+ "generic-openai": false,
31578
+ "workers-ai": false,
31579
+ "mock": false
31580
+ };
31581
+ var PLATFORM_KEY_PROVIDERS = new Set(
31582
+ Object.entries(PLATFORM_KEY_PROVIDER_MAP).filter(([, v]) => v).map(([k]) => k)
31583
+ );
31562
31584
  var MANUAL_PROVIDER_MAP_OVERRIDES = {
31563
31585
  // Bedrock uses different model ID format
31564
31586
  "claude-sonnet-4-5": {
@@ -35186,7 +35208,12 @@ var DispatchRequestSchema = external_exports.object({
35186
35208
  allowOverwriteExternalChanges: external_exports.boolean().optional().default(false)
35187
35209
  }).optional(),
35188
35210
  flowTimeoutMs: external_exports.number().int().min(1e3).max(9e5).optional(),
35189
- stepTimeoutMs: external_exports.number().int().min(1e3).max(3e5).optional()
35211
+ stepTimeoutMs: external_exports.number().int().min(1e3).max(3e5).optional(),
35212
+ // Internal: opt-in Braintrust tracing for the execution. Undocumented;
35213
+ // intended for first-party flows (e.g. the dashboard's product
35214
+ // generator) where deeper observability is wanted without affecting
35215
+ // every other dispatch on the platform.
35216
+ _braintrustTracing: external_exports.boolean().optional()
35190
35217
  }).optional().default({
35191
35218
  streamResponse: true,
35192
35219
  recordMode: "existing",
@@ -35213,6 +35240,15 @@ var RunPromptOptionsSchema = external_exports.object({
35213
35240
  variables: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
35214
35241
  responseFormat: external_exports.enum(["text", "json", "markdown"]).optional()
35215
35242
  });
35243
+ var SANDBOX_TTL_DEFAULT_SECONDS = 10 * 60;
35244
+ var SANDBOX_TTL_MAX_SECONDS = 2 * 60 * 60;
35245
+ var SANDBOX_TTL_OPTIONS = [
35246
+ { label: "10 min", value: 10 * 60 },
35247
+ { label: "30 min", value: 30 * 60 },
35248
+ { label: "1 hour", value: 60 * 60 },
35249
+ { label: "2 hours", value: 2 * 60 * 60 },
35250
+ { label: "Unlimited", value: null }
35251
+ ];
35216
35252
 
35217
35253
  // src/config/env.ts
35218
35254
  function getApiUrl() {
@@ -41279,7 +41315,7 @@ function createSandboxLocalTool(client, provider, debugMode) {
41279
41315
  },
41280
41316
  {
41281
41317
  allowedToolTypes: ["custom"],
41282
- allowedSandboxProviders: [provider],
41318
+ allowedSandboxProviders: [provider === "runtype-sandbox" ? "cloudflare-sandbox" : provider],
41283
41319
  allowedLanguages: provider === "quickjs" || provider === "cloudflare-worker" ? ["javascript"] : ["javascript", "typescript", "python"],
41284
41320
  maxTimeoutMs: 3e4,
41285
41321
  maxCodeLength: 12e3
@@ -50075,24 +50111,23 @@ schedulesCommand.command("get <id>").description("Get schedule details").option(
50075
50111
  const { waitUntilExit } = render12(React12.createElement(App));
50076
50112
  await waitUntilExit();
50077
50113
  });
50078
- schedulesCommand.command("create").description("Create a new schedule").requiredOption("-f, --flow <id>", "Flow ID to schedule").requiredOption("-c, --cron <expression>", 'Cron expression (e.g. "0 9 * * *")').option("-n, --name <name>", "Schedule name").option("--json", "Output as JSON").option("--tty", "Force TTY mode").option("--no-tty", "Force non-TTY mode").action(async (options) => {
50114
+ schedulesCommand.command("create").description("Create a new recurring schedule for a flow").requiredOption("-f, --flow <id>", "Flow ID to schedule").requiredOption("-c, --cron <expression>", 'Cron expression (e.g. "0 9 * * *")').requiredOption("-z, --timezone <tz>", 'IANA timezone for the cron schedule (e.g. "America/Los_Angeles")').option("--json", "Output as JSON").option("--tty", "Force TTY mode").option("--no-tty", "Force non-TTY mode").action(async (options) => {
50079
50115
  const apiKey = await ensureAuth();
50080
50116
  if (!apiKey) return;
50081
50117
  const client = new ApiClient(apiKey);
50118
+ const payload = {
50119
+ target: { flowId: options.flow },
50120
+ trigger: { type: "recurring", cron: options.cron, timezone: options.timezone }
50121
+ };
50082
50122
  if (!isTTY(options) || options.json) {
50083
50123
  try {
50084
- const data = await client.post("/schedules", {
50085
- flowId: options.flow,
50086
- cronExpression: options.cron,
50087
- name: options.name
50088
- });
50124
+ const data = await client.post("/schedules", payload);
50089
50125
  if (options.json) {
50090
50126
  printJson(data);
50091
50127
  return;
50092
50128
  }
50093
50129
  console.log(` ID: ${data.id}`);
50094
50130
  if (data.name) console.log(` Name: ${data.name}`);
50095
- console.log(` Cron: ${data.cronExpression}`);
50096
50131
  if (data.nextRunAt) console.log(` Next run: ${data.nextRunAt}`);
50097
50132
  } catch (error51) {
50098
50133
  const message = error51 instanceof Error ? error51.message : "Unknown error";
@@ -50107,11 +50142,7 @@ schedulesCommand.command("create").description("Create a new schedule").required
50107
50142
  const [error51, setError] = useState26(null);
50108
50143
  const [result, setResult] = useState26(null);
50109
50144
  useEffect23(() => {
50110
- client.post("/schedules", {
50111
- flowId: options.flow,
50112
- cronExpression: options.cron,
50113
- name: options.name
50114
- }).then((data) => {
50145
+ client.post("/schedules", payload).then((data) => {
50115
50146
  setResult(data);
50116
50147
  setSuccess(true);
50117
50148
  setLoading(false);
@@ -50131,7 +50162,6 @@ schedulesCommand.command("create").description("Create a new schedule").required
50131
50162
  fields: [
50132
50163
  { label: "ID", value: result.id, color: "green" },
50133
50164
  { label: "Name", value: result.name },
50134
- { label: "Cron", value: result.cronExpression },
50135
50165
  { label: "Next run", value: result.nextRunAt }
50136
50166
  ]
50137
50167
  }) : void 0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runtypelabs/cli",
3
- "version": "2.12.3",
3
+ "version": "2.12.5",
4
4
  "description": "Command-line interface for Runtype AI platform",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -21,8 +21,8 @@
21
21
  "micromatch": "^4.0.8",
22
22
  "yaml": "^2.8.3",
23
23
  "@runtypelabs/ink-components": "0.3.1",
24
- "@runtypelabs/terminal-animations": "0.2.0",
25
- "@runtypelabs/sdk": "1.21.0"
24
+ "@runtypelabs/sdk": "1.21.2",
25
+ "@runtypelabs/terminal-animations": "0.2.0"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/micromatch": "^4.0.9",
@@ -35,7 +35,7 @@
35
35
  "tsx": "^4.7.1",
36
36
  "typescript": "^5.3.3",
37
37
  "vitest": "^4.0.18",
38
- "@runtypelabs/shared": "1.6.0"
38
+ "@runtypelabs/shared": "1.6.1"
39
39
  },
40
40
  "engines": {
41
41
  "node": ">=18.0.0"
@@ -70,6 +70,7 @@
70
70
  "dev": "tsx watch src/index.ts",
71
71
  "dev:run": "tsx src/index.ts",
72
72
  "build": "tsup",
73
+ "typecheck": "tsc --noEmit",
73
74
  "start": "node dist/index.js",
74
75
  "type-check": "pnpm --filter @runtypelabs/sdk build && pnpm --filter @runtypelabs/ink-components build && tsc --noEmit",
75
76
  "test": "vitest",