@runtypelabs/cli 2.42.4 → 2.43.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.
Files changed (2) hide show
  1. package/dist/index.js +60 -9
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -11312,7 +11312,7 @@ function isDataConnectionToolId(toolId) {
11312
11312
  return toolId.startsWith("dc:");
11313
11313
  }
11314
11314
  //#endregion
11315
- //#region ../shared/dist/chunk-DTCym20H.mjs
11315
+ //#region ../shared/dist/chunk-CN8mv6N6.mjs
11316
11316
  /**
11317
11317
  * Maps model families to provider-specific model IDs.
11318
11318
  * Use for routing: family + provider → exact model ID
@@ -11745,6 +11745,11 @@ const MODEL_FAMILY_PROVIDER_IDS = {
11745
11745
  "vercel": "openai/gpt-5.6-terra"
11746
11746
  },
11747
11747
  "gpt-5.6-terra-fast": { "vercel": "openai/gpt-5.6-terra-fast" },
11748
+ "gpt-6-1-sol": {
11749
+ "openai": "gpt-6.1-sol",
11750
+ "vercel": "openai/gpt-6.1-sol"
11751
+ },
11752
+ "gpt-6-1-sol-fast": { "vercel": "openai/gpt-6.1-sol-fast" },
11748
11753
  "gpt-6-astra": {
11749
11754
  "openai": "gpt-6-astra",
11750
11755
  "vercel": "openai/gpt-6-astra"
@@ -11760,6 +11765,11 @@ const MODEL_FAMILY_PROVIDER_IDS = {
11760
11765
  "vercel": "openai/gpt-6-sol"
11761
11766
  },
11762
11767
  "gpt-6-sol-fast": { "vercel": "openai/gpt-6-sol-fast" },
11768
+ "gpt-6.1-sol": {
11769
+ "openai": "gpt-6.1-sol",
11770
+ "vercel": "openai/gpt-6.1-sol"
11771
+ },
11772
+ "gpt-6.1-sol-fast": { "vercel": "openai/gpt-6.1-sol-fast" },
11763
11773
  "gpt-image-1-5": { "openai": "gpt-image-1.5" },
11764
11774
  "gpt-image-1-mini": { "openai": "gpt-image-1-mini" },
11765
11775
  "gpt-image-1.5": { "openai": "gpt-image-1.5" },
@@ -11848,10 +11858,14 @@ const MODEL_FAMILY_PROVIDER_IDS = {
11848
11858
  "ling-3-0-flash-sante": { "vercel": "inclusionai/ling-3.0-flash-sante" },
11849
11859
  "ling-3-0-flash-sante-free": { "vercel": "inclusionai/ling-3.0-flash-sante-free" },
11850
11860
  "ling-3-0-flash-vl": { "vercel": "inclusionai/ling-3.0-flash-vl" },
11861
+ "ling-3-1-flash": { "vercel": "inclusionai/ling-3.1-flash" },
11862
+ "ling-3-1-flash-free": { "vercel": "inclusionai/ling-3.1-flash-free" },
11851
11863
  "ling-3.0-flash": { "vercel": "inclusionai/ling-3.0-flash" },
11852
11864
  "ling-3.0-flash-sante": { "vercel": "inclusionai/ling-3.0-flash-sante" },
11853
11865
  "ling-3.0-flash-sante-free": { "vercel": "inclusionai/ling-3.0-flash-sante-free" },
11854
11866
  "ling-3.0-flash-vl": { "vercel": "inclusionai/ling-3.0-flash-vl" },
11867
+ "ling-3.1-flash": { "vercel": "inclusionai/ling-3.1-flash" },
11868
+ "ling-3.1-flash-free": { "vercel": "inclusionai/ling-3.1-flash-free" },
11855
11869
  "llama-3.1-70b": { "vercel": "meta/llama-3.1-70b" },
11856
11870
  "llama-3.1-8b": { "vercel": "meta/llama-3.1-8b" },
11857
11871
  "llama-3.3-70b": { "vercel": "meta/llama-3.3-70b" },
@@ -12265,7 +12279,7 @@ const CREATOR_TO_PROVIDER = {
12265
12279
  "unknown": "openai"
12266
12280
  };
12267
12281
  //#endregion
12268
- //#region ../shared/dist/chunk-CZWIfVCf.mjs
12282
+ //#region ../shared/dist/chunk-AzlYBwl7.mjs
12269
12283
  /**
12270
12284
  * The reserved model-facing name of the agent state write tool
12271
12285
  * (`packages/runtime/src/engine/state-write-tool.ts`). The model is told to call
@@ -12464,7 +12478,7 @@ const GEN_AI_ATTRIBUTES = {
12464
12478
  toolCallId: "gen_ai.tool.call.id"
12465
12479
  };
12466
12480
  //#endregion
12467
- //#region ../shared/dist/chunk-DEoSlEa_.mjs
12481
+ //#region ../shared/dist/chunk-B1SxgkWd.mjs
12468
12482
  /**
12469
12483
  * GenAI semconv content attributes, set by a customer's own instrumentation when it opts into content export.
12470
12484
  * Two first-party producers write them: @runtypelabs/runtime's OTLP tracer for exported agents (content on by default), and @runtypelabs/flue-otel (opt-in).
@@ -25099,7 +25113,11 @@ object({
25099
25113
  externalAgent: object({
25100
25114
  contextId: string().optional(),
25101
25115
  taskId: string().optional()
25102
- }).optional()
25116
+ }).optional(),
25117
+ /** The published agent version the run executed; absent when no stored version ran. */
25118
+ agentVersionId: string().optional(),
25119
+ /** The release alias the version was resolved through (`live`, `staging`, ...), when one was. */
25120
+ alias: string().optional()
25103
25121
  });
25104
25122
  object({
25105
25123
  recordId: string().optional(),
@@ -37150,7 +37168,7 @@ function createSandboxInstructions(provider) {
37150
37168
  "{ \"code\": \"...\", \"parameters\": { ... }, \"language\": \"javascript|typescript|python\", \"timeoutMs\": 30000 }",
37151
37169
  "Runtype Sandbox rules:",
37152
37170
  "1. Choose one language: javascript, typescript, or python.",
37153
- "2. Each session is a full Linux container (Node 22, Python 3.12, pnpm, tsx, uv, git).",
37171
+ "2. Each session is a full Linux container (Node 24, Python 3.13 with numpy/pandas/matplotlib, pnpm, tsx, uv, git).",
37154
37172
  "3. Inputs are available as the `parameters` object (JS/TS) or `parameters` dict (Python).",
37155
37173
  "4. async/await, Promises, and long-running processes are fully supported.",
37156
37174
  "5. Write the final result to stdout (JSON string is preferred for structured output).",
@@ -54426,6 +54444,9 @@ function collectExportedExecutionInventory(definition) {
54426
54444
  walkTools(agent.config.tools);
54427
54445
  }
54428
54446
  if (isObject(agent.claudeManagedConfig)) addModel(agent.claudeManagedConfig.model);
54447
+ if (Array.isArray(agent.skills)) {
54448
+ for (const skill of agent.skills) if (isObject(skill)) walkRuntimeTools(skill.resolvedTools);
54449
+ }
54429
54450
  if (Array.isArray(agent.capabilities)) for (const capability of agent.capabilities) {
54430
54451
  if (!isObject(capability)) continue;
54431
54452
  if (isObject(capability.flow)) walkFlow(capability.flow);
@@ -54485,16 +54506,41 @@ function describeAgentExportFailure(err) {
54485
54506
  if ((err.data && typeof err.data === "object" && "code" in err.data ? err.data.code : void 0) === "BYOC_PLAN_REQUIRED") return ["Self-hosting (BYOC) requires an Enterprise plan. Contact support to enable it for your account.", "The API key also needs the RUNTIME:EXPORT scope."];
54486
54507
  return ["The API key needs the RUNTIME:EXPORT scope, and self-hosting (BYOC) requires an Enterprise plan."];
54487
54508
  }
54488
- if (err.statusCode === 404) return ["Agent not found, or not owned by this account."];
54509
+ if (err.statusCode === 404) {
54510
+ const code = err.data && typeof err.data === "object" && "code" in err.data ? err.data.code : void 0;
54511
+ if (typeof code === "string" && RELEASE_SELECTOR_NOT_FOUND_CODES.has(code)) return ["The requested --alias or --version-id does not exist on this agent, or the alias is archived or expired."];
54512
+ return ["Agent not found, or not owned by this account."];
54513
+ }
54489
54514
  return [];
54490
54515
  }
54516
+ const RELEASE_SELECTOR_NOT_FOUND_CODES = /* @__PURE__ */ new Set([
54517
+ "alias_not_found",
54518
+ "alias_archived",
54519
+ "alias_expired",
54520
+ "version_not_found"
54521
+ ]);
54522
+ /** The export-runtime query for a release selector; errors when both selectors are given. */
54523
+ function agentReleaseSelectorParams(options, agentCount) {
54524
+ if (options.alias !== void 0 && options.versionId !== void 0) return { error: "Pass either --alias or --version-id, not both." };
54525
+ if (options.versionId !== void 0 && agentCount !== 1) return { error: "--version-id names one agent version, so pass exactly one --agent with it." };
54526
+ return { params: {
54527
+ ...options.alias !== void 0 ? { alias: options.alias } : {},
54528
+ ...options.versionId !== void 0 ? { versionId: options.versionId } : {}
54529
+ } };
54530
+ }
54531
+ function describeExportedRelease(def) {
54532
+ const release = def.release;
54533
+ if (!release?.versionId) return "";
54534
+ const via = release.alias ? ` via ${release.alias}${release.aliasRevision !== void 0 ? ` r${release.aliasRevision}` : ""}` : "";
54535
+ return chalk.dim(` (${release.versionId}${via})`);
54536
+ }
54491
54537
  const deployCommand = new Command("deploy").description("Export an agent and scaffold a deployment (cloud-run, cloudflare, or vercel)").option("--agent <id>", "Agent ID to export (may be repeated)", (v, acc) => {
54492
54538
  acc.push(v);
54493
54539
  return acc;
54494
54540
  }, []).option("--flow <id>", "Removed (ADR 0024): export the agent that runs the flow instead", (v, acc) => {
54495
54541
  acc.push(v);
54496
54542
  return acc;
54497
- }, []).option("--output <dir>", "Output directory for the scaffold (default: ./runtype-deploy)", "./runtype-deploy").option("--name <name>", "Project name used in package.json (default: derived from output dir)").option("--target <target>", "Deployment target: cloud-run, cloudflare, or vercel (default: cloud-run)", "cloud-run").action(async (options) => {
54543
+ }, []).option("--output <dir>", "Output directory for the scaffold (default: ./runtype-deploy)", "./runtype-deploy").option("--name <name>", "Project name used in package.json (default: derived from output dir)").option("--target <target>", "Deployment target: cloud-run, cloudflare, or vercel (default: cloud-run)", "cloud-run").option("--alias <name>", "Export the version each agent's release alias points at (e.g. staging, live, pr-42)").option("--version-id <id>", "Export this published agent version (requires exactly one --agent)").action(async (options) => {
54498
54544
  const agentIds = options.agent;
54499
54545
  if (options.flow.length > 0) {
54500
54546
  for (const line of RETIRED_DEPLOY_FLOW_MESSAGE) console.error(chalk.yellow(line));
@@ -54504,6 +54550,11 @@ const deployCommand = new Command("deploy").description("Export an agent and sca
54504
54550
  console.error(chalk.red("Error: provide at least one --agent <id>"));
54505
54551
  process.exit(1);
54506
54552
  }
54553
+ const selector = agentReleaseSelectorParams(options, agentIds.length);
54554
+ if ("error" in selector) {
54555
+ console.error(chalk.red(`Error: ${selector.error}`));
54556
+ process.exit(1);
54557
+ }
54507
54558
  const target = options.target;
54508
54559
  if (target !== "cloud-run" && target !== "cloudflare" && target !== "vercel") {
54509
54560
  console.error(chalk.red(`Error: unknown --target "${target}". Must be one of: cloud-run, cloudflare, vercel`));
@@ -54519,13 +54570,13 @@ const deployCommand = new Command("deploy").description("Export an agent and sca
54519
54570
  for (const id of agentIds) {
54520
54571
  process.stdout.write(` Exporting agent ${chalk.green(id)}... `);
54521
54572
  try {
54522
- const def = await client.get(`/agents/${id}/export-runtime`);
54573
+ const def = await client.get(`/agents/${id}/export-runtime`, selector.params);
54523
54574
  agentDefs.push({
54524
54575
  id,
54525
54576
  name: String(def.name ?? id),
54526
54577
  def
54527
54578
  });
54528
- process.stdout.write(chalk.green("✓\n"));
54579
+ process.stdout.write(chalk.green("✓") + describeExportedRelease(def) + "\n");
54529
54580
  } catch (err) {
54530
54581
  const msg = err instanceof RuntypeApiError ? err.message : String(err);
54531
54582
  process.stdout.write(chalk.red(`✗\n`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runtypelabs/cli",
3
- "version": "2.42.4",
3
+ "version": "2.43.0",
4
4
  "description": "Command-line interface for Runtype AI platform",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -11,7 +11,7 @@
11
11
  "@modelcontextprotocol/client": "2.0.0",
12
12
  "@modelcontextprotocol/core": "2.0.0",
13
13
  "@runtypelabs/ink-components": "0.3.9",
14
- "@runtypelabs/sdk": "10.6.0",
14
+ "@runtypelabs/sdk": "10.7.0",
15
15
  "@runtypelabs/terminal-animations": "0.2.4",
16
16
  "add-mcp": "2.0.0",
17
17
  "chalk": "^5.3.0",
@@ -33,7 +33,7 @@
33
33
  "devDependencies": {
34
34
  "@modelcontextprotocol/server": "2.0.0",
35
35
  "@runtypelabs/persona": "4.24.0",
36
- "@runtypelabs/shared": "3.67.0",
36
+ "@runtypelabs/shared": "3.68.0",
37
37
  "@types/express": "^5.0.6",
38
38
  "@types/micromatch": "^4.0.9",
39
39
  "@types/node": "^25.3.3",