@runtypelabs/cli 2.33.6 → 2.33.7

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 +118 -4
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -38455,6 +38455,33 @@ function sanitizeCodeToolIdentifier(name) {
38455
38455
  if (/^[0-9]/.test(safe)) safe = "_" + safe;
38456
38456
  return safe;
38457
38457
  }
38458
+ var DEFAULT_SANDBOX_PROVIDER = "cloudflare-worker";
38459
+ var SANDBOX_PROVIDER_LANGUAGES = Object.assign(
38460
+ /* @__PURE__ */ Object.create(null),
38461
+ {
38462
+ quickjs: ["javascript"],
38463
+ "cloudflare-worker": ["javascript"],
38464
+ "runtype-sandbox": ["javascript", "typescript", "python"],
38465
+ "cloudflare-sandbox": ["javascript", "typescript", "python"],
38466
+ daytona: ["javascript", "typescript", "python"]
38467
+ }
38468
+ );
38469
+ function resolveSandboxProvider(provider) {
38470
+ return typeof provider === "string" ? provider : DEFAULT_SANDBOX_PROVIDER;
38471
+ }
38472
+ function lookupLanguages(provider) {
38473
+ const resolved = resolveSandboxProvider(provider);
38474
+ if (!Object.prototype.hasOwnProperty.call(SANDBOX_PROVIDER_LANGUAGES, resolved)) return void 0;
38475
+ const languages = SANDBOX_PROVIDER_LANGUAGES[resolved];
38476
+ return Array.isArray(languages) ? languages : void 0;
38477
+ }
38478
+ function isJsOnlySandboxProvider(provider) {
38479
+ const languages = lookupLanguages(provider);
38480
+ return languages !== void 0 && languages.length === 1 && languages[0] === "javascript";
38481
+ }
38482
+ function supportsCodeModeToolPool(provider) {
38483
+ return resolveSandboxProvider(provider) === "cloudflare-worker";
38484
+ }
38458
38485
  function snakeToCamel(str) {
38459
38486
  return str.replace(/_([a-z])/g, (_2, letter) => letter.toUpperCase());
38460
38487
  }
@@ -38569,6 +38596,42 @@ function validateSandboxNetworkAccess(config3, stepIndex, stepRef, buckets) {
38569
38596
  buckets
38570
38597
  );
38571
38598
  }
38599
+ function validateTransformLanguageProviderPair(config3, stepIndex, stepRef, buckets) {
38600
+ const language = typeof config3.language === "string" ? config3.language : void 0;
38601
+ if (!language || language === "javascript") return;
38602
+ const provider = resolveSandboxProvider(config3.sandboxProvider);
38603
+ if (!isJsOnlySandboxProvider(provider)) return;
38604
+ addIssue(
38605
+ "warning",
38606
+ {
38607
+ code: "TRANSFORM_LANGUAGE_PROVIDER_MISMATCH",
38608
+ message: `Step requests language "${language}" but sandboxProvider "${provider}" only runs JavaScript. Switch to the "runtype-sandbox" or "daytona" provider to run this language, or set language to "javascript".`,
38609
+ path: `flowSteps[${stepIndex}].config.language`,
38610
+ step: stepRef,
38611
+ details: { language, sandboxProvider: provider }
38612
+ },
38613
+ buckets
38614
+ );
38615
+ }
38616
+ function validateTransformToolPoolProvider(config3, stepIndex, stepRef, buckets) {
38617
+ const tools = isObjectRecord(config3.tools) ? config3.tools : void 0;
38618
+ if (!tools) return;
38619
+ const poolSize = (Array.isArray(tools.runtimeTools) ? tools.runtimeTools.length : 0) + (Array.isArray(tools.toolIds) ? tools.toolIds.length : 0) + (Array.isArray(tools.mcpServers) ? tools.mcpServers.length : 0);
38620
+ if (poolSize === 0) return;
38621
+ const provider = resolveSandboxProvider(config3.sandboxProvider);
38622
+ if (supportsCodeModeToolPool(provider)) return;
38623
+ addIssue(
38624
+ "warning",
38625
+ {
38626
+ code: "TRANSFORM_POOL_TOOLS_ON_CONTAINER_PROVIDER",
38627
+ message: `Step configures tools but sandboxProvider "${provider}" cannot bind a code-mode tool pool, so the tools are not callable from this script and any call to one fails at runtime. Use the "cloudflare-worker" provider to call tools from a transform-data step, or remove the tools.`,
38628
+ path: `flowSteps[${stepIndex}].config.tools`,
38629
+ step: stepRef,
38630
+ details: { sandboxProvider: provider, poolSize }
38631
+ },
38632
+ buckets
38633
+ );
38634
+ }
38572
38635
  function validateCodeToolNameCollisions(toolNames, stepRef, code, preSeededCount = 0) {
38573
38636
  const seen = /* @__PURE__ */ new Map();
38574
38637
  for (const [i, tool] of toolNames.entries()) {
@@ -39997,6 +40060,8 @@ function collectFlowStructureIssues(flowData, deps, buckets) {
39997
40060
  const sandboxProvider = config3.sandboxProvider || "cloudflare-worker";
39998
40061
  const resolvedProvider = sandboxProvider === "cloudflare-sandbox" ? "runtype-sandbox" : sandboxProvider;
39999
40062
  validateSandboxNetworkAccess(config3, stepIndex, stepRef, buckets);
40063
+ validateTransformLanguageProviderPair(config3, stepIndex, stepRef, buckets);
40064
+ validateTransformToolPoolProvider(config3, stepIndex, stepRef, buckets);
40000
40065
  if (resolvedProvider === "runtype-sandbox" && !config3.language) {
40001
40066
  addIssue(
40002
40067
  "warning",
@@ -40456,7 +40521,7 @@ var API_INPROCESS_CAPABILITY_MATRIX = {
40456
40521
  // `vendored-export` (it rides the same host `CodeModeExecutor` seam as
40457
40522
  // `transformDataCodeModeTools`) — see {@link VENDORED_EXPORT_REFOLDS}.
40458
40523
  // Rollback lever: revert the bit to `true` (plus its test).
40459
- version: "2026-08-08.1",
40524
+ version: "2026-08-11.1",
40460
40525
  unsupportedStepTypes: ["wait-until", "crawl"],
40461
40526
  unsupportedFeatures: {
40462
40527
  approvalSteps: true,
@@ -40515,7 +40580,34 @@ var API_INPROCESS_CAPABILITY_MATRIX = {
40515
40580
  // decision attribution but no longer folds.
40516
40581
  // Rollback lever: revert this bit to `true` (plus its test).
40517
40582
  transformDataMcpServers: false,
40518
- unsupportedTransformExecution: true,
40583
+ // SUPPORTED as of 2026-08-11 (#6521): `TransformSandboxRouter`
40584
+ // (`apps/api/src/lib/runtime/transform-sandbox-router.ts`) selects a
40585
+ // concrete executor per `execute()` call from the step's own
40586
+ // `sandboxProvider`, so a container-backed or Daytona `transform-data` step
40587
+ // now has a faithful runtime-lane execution. The api owns the router (it
40588
+ // holds the SANDBOX binding and the Daytona credentials), which is why the
40589
+ // `vendored-export` matrix RE-FOLDS this bit rather than inheriting the
40590
+ // graduation — see {@link VENDORED_EXPORT_REFOLDS}.
40591
+ //
40592
+ // The fold does NOT disappear: `transformDataHasUnsupportedExecution`
40593
+ // (`apps/api/src/lib/runtime/flow-eligibility-facts.ts`) narrowed to the
40594
+ // shapes the router still throws on — an unroutable provider, and a non-JS
40595
+ // `language` on a JS-only provider (which legacy runs as JavaScript
40596
+ // because it never forwards `language` to those branches). Both would
40597
+ // otherwise land as `success: true` with a null output, since
40598
+ // `transform-data` default-continues.
40599
+ //
40600
+ // Rollback lever: flip this bit back to `true` (plus its test). That
40601
+ // re-folds every container/Daytona transform to legacy without touching
40602
+ // the router or the narrowed predicate.
40603
+ unsupportedTransformExecution: false,
40604
+ // NOT graduated, and not graduating with its sibling: these are the shapes
40605
+ // the router THROWS on, which `transform-data`'s default-continue turns
40606
+ // into `success: true` + null rather than a visible failure. Keeping this
40607
+ // bit `true` is what stops the graduation above from being a silent data
40608
+ // bug for `python` + `cloudflare-worker` (which legacy runs as JavaScript
40609
+ // today). See {@link FlowEligibilityFacts.hasUnroutableTransformExecution}.
40610
+ unroutableTransformExecution: true,
40519
40611
  // #6023 leg 1 (2026-08-05): a custom runtime tool requesting code_mode / a
40520
40612
  // non-JS language / a container-backed sandbox provider has no runtime-lane
40521
40613
  // port — `runCustom` ignores all three and silently misexecutes as JS. Same
@@ -40609,7 +40701,7 @@ var VENDORED_EXPORT_CAPABILITY_MATRIX = {
40609
40701
  // Bumped 2026-08-08.1: `transformDataMcpServers` graduated on the base and
40610
40702
  // becomes the fourth documented re-fold here — the discovered tools still
40611
40703
  // need the host `CodeModeExecutor` to be bound as sandbox callables.
40612
- version: "2026-08-08.1",
40704
+ version: "2026-08-11.1",
40613
40705
  unsupportedStepTypes: [
40614
40706
  // ── Carried over from api-inprocess: durable-host-only step types. A
40615
40707
  // self-contained container has no durable host (BYOC §3.3 / S0 — the
@@ -40738,8 +40830,19 @@ var VENDORED_EXPORT_CAPABILITY_MATRIX = {
40738
40830
  // `CodeModeExecutor` seam as the sibling bit above — discovery itself is
40739
40831
  // portable, the BINDING is not. Same graduation lever.
40740
40832
  transformDataMcpServers: true,
40833
+ // VENDORED RE-FOLD (as of 2026-08-11, when the base graduated on #6521):
40834
+ // api-inprocess reaches container / Daytona `transform-data` execution
40835
+ // through `TransformSandboxRouter`, which needs the api's `SANDBOX` service
40836
+ // binding and api-resolved Daytona credentials. An export bundle has
40837
+ // neither, and `.claude/rules/runtime.md` forbids in-runtime dispatch
40838
+ // across providers, so the runtime's ONE wired executor would run the
40839
+ // step's container/Python source on whatever JS-only sandbox the export
40840
+ // carries. Graduation lever: a portable provider-routing fulfillment in the
40841
+ // standard export — then flip to false and drop from
40842
+ // {@link VENDORED_EXPORT_REFOLDS}.
40741
40843
  unsupportedTransformExecution: true,
40742
- // api-inprocess fold (G5); carried over.
40844
+ // Inherited from the base, which never graduates it.
40845
+ unroutableTransformExecution: true,
40743
40846
  customToolExecution: true,
40744
40847
  // api-inprocess fold (#6023 leg 1); carried over.
40745
40848
  // `promptMcpServers` inherits the base SUPPORTED (`false`). The runtime owns
@@ -41474,6 +41577,9 @@ var MODEL_FAMILY_PROVIDER_IDS = {
41474
41577
  "togetherai": "togetherai/deepseek-ai/DeepSeek-V4-Pro",
41475
41578
  "vercel": "deepseek/deepseek-v4-pro"
41476
41579
  },
41580
+ "deepseek-v4-pro-0813": {
41581
+ "vercel": "deepseek/deepseek-v4-pro-0813"
41582
+ },
41477
41583
  "devstral-2": {
41478
41584
  "vercel": "mistral/devstral-2"
41479
41585
  },
@@ -41901,6 +42007,10 @@ var MODEL_FAMILY_PROVIDER_IDS = {
41901
42007
  "vercel": "xai/grok-4.5",
41902
42008
  "xai": "grok-4.5"
41903
42009
  },
42010
+ "grok-4-6": {
42011
+ "vercel": "xai/grok-4.6",
42012
+ "xai": "grok-4.6"
42013
+ },
41904
42014
  "grok-4.20-0309-non-reasoning": {
41905
42015
  "xai": "grok-4.20-0309-non-reasoning"
41906
42016
  },
@@ -41927,6 +42037,10 @@ var MODEL_FAMILY_PROVIDER_IDS = {
41927
42037
  "vercel": "xai/grok-4.5",
41928
42038
  "xai": "grok-4.5"
41929
42039
  },
42040
+ "grok-4.6": {
42041
+ "vercel": "xai/grok-4.6",
42042
+ "xai": "grok-4.6"
42043
+ },
41930
42044
  "grok-build-0-1": {
41931
42045
  "vercel": "xai/grok-build-0.1",
41932
42046
  "xai": "grok-build-0.1"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runtypelabs/cli",
3
- "version": "2.33.6",
3
+ "version": "2.33.7",
4
4
  "description": "Command-line interface for Runtype AI platform",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -27,8 +27,8 @@
27
27
  "rosie-skills": "0.8.1",
28
28
  "yaml": "^2.9.0",
29
29
  "@runtypelabs/ink-components": "0.3.6",
30
- "@runtypelabs/terminal-animations": "0.2.3",
31
- "@runtypelabs/sdk": "7.1.0"
30
+ "@runtypelabs/sdk": "7.2.0",
31
+ "@runtypelabs/terminal-animations": "0.2.3"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@modelcontextprotocol/server": "2.0.0",
@@ -43,7 +43,7 @@
43
43
  "tsx": "^4.7.1",
44
44
  "typescript": "^6.0.3",
45
45
  "vitest": "^4.1.0",
46
- "@runtypelabs/shared": "3.20.0"
46
+ "@runtypelabs/shared": "3.21.0"
47
47
  },
48
48
  "engines": {
49
49
  "node": ">=22.12.0"