@runtypelabs/cli 2.40.11 → 2.40.14

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 +271 -250
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -610,106 +610,6 @@ var OAuthManager = class {
610
610
  // src/auth/api-key-manager.ts
611
611
  import { RuntypeApiError } from "@runtypelabs/sdk";
612
612
 
613
- // ../shared/dist/chunk-P5NYF5TN.mjs
614
- var REPLAY_FROM_START = Object.freeze({
615
- row: 0,
616
- sub: Number.POSITIVE_INFINITY
617
- });
618
-
619
- // ../shared/dist/chunk-2NMGSD35.mjs
620
- var GEN_AI_OPERATION_NAME = "gen_ai.operation.name";
621
- var GEN_AI_AGENT_ID = "gen_ai.agent.id";
622
- var GEN_AI_AGENT_NAME = "gen_ai.agent.name";
623
- var GEN_AI_CONVERSATION_ID = "gen_ai.conversation.id";
624
- var GEN_AI_REQUEST_MODEL = "gen_ai.request.model";
625
- var GEN_AI_RESPONSE_MODEL_NAME = "gen_ai.response.model";
626
- var GEN_AI_USAGE_INPUT_TOKENS = "gen_ai.usage.input_tokens";
627
- var GEN_AI_USAGE_OUTPUT_TOKENS = "gen_ai.usage.output_tokens";
628
- var GEN_AI_USAGE_CACHE_READ_TOKENS = "gen_ai.usage.cache_read.input_tokens";
629
- var GEN_AI_USAGE_CACHE_CREATION_TOKENS = "gen_ai.usage.cache_creation.input_tokens";
630
- var GEN_AI_TOOL_NAME = "gen_ai.tool.name";
631
- var GEN_AI_TOOL_TYPE = "gen_ai.tool.type";
632
- var GEN_AI_TOOL_CALL_ID = "gen_ai.tool.call.id";
633
- var GEN_AI_ATTRIBUTES = {
634
- operationName: GEN_AI_OPERATION_NAME,
635
- agentId: GEN_AI_AGENT_ID,
636
- agentName: GEN_AI_AGENT_NAME,
637
- conversationId: GEN_AI_CONVERSATION_ID,
638
- requestModel: GEN_AI_REQUEST_MODEL,
639
- usageInputTokens: GEN_AI_USAGE_INPUT_TOKENS,
640
- usageOutputTokens: GEN_AI_USAGE_OUTPUT_TOKENS,
641
- /** Input tokens served from the provider's prompt cache, when the provider reports them. */
642
- usageCacheReadTokens: GEN_AI_USAGE_CACHE_READ_TOKENS,
643
- /** Input tokens written INTO the provider's prompt cache, when the provider reports them. */
644
- usageCacheCreationTokens: GEN_AI_USAGE_CACHE_CREATION_TOKENS,
645
- /** The model the provider reported having SERVED; the more accurate one to price. */
646
- responseModel: GEN_AI_RESPONSE_MODEL_NAME,
647
- toolName: GEN_AI_TOOL_NAME,
648
- toolType: GEN_AI_TOOL_TYPE,
649
- toolCallId: GEN_AI_TOOL_CALL_ID
650
- };
651
-
652
- // ../shared/dist/chunk-GYGZIK4G.mjs
653
- var RUNTYPE_ITERATION = "runtype.iteration";
654
- var RUNTYPE_TOTAL_COST = "runtype.total_cost";
655
- var RUNTYPE_TURN_INDEX = "runtype.turn.index";
656
- var RUNTYPE_LEGACY_ATTRIBUTE_ALIASES = {
657
- [RUNTYPE_ITERATION]: ["runtype.agent.iteration"],
658
- [RUNTYPE_TOTAL_COST]: ["runtype.agent.totalCost"],
659
- [RUNTYPE_TURN_INDEX]: ["runtype.agent.turnIndex"]
660
- };
661
- var GEN_AI_TOOL_CALL_ARGUMENTS = "gen_ai.tool.call.arguments";
662
- var GEN_AI_TOOL_CALL_RESULT = "gen_ai.tool.call.result";
663
- var GEN_AI_INPUT_MESSAGES = "gen_ai.input.messages";
664
- var GEN_AI_OUTPUT_MESSAGES = "gen_ai.output.messages";
665
- var GEN_AI_CONTENT_ATTRIBUTES = {
666
- /** Chat history sent to the model, as semconv structured messages. */
667
- inputMessages: GEN_AI_INPUT_MESSAGES,
668
- /** Messages the model produced (includes reasoning content parts). */
669
- outputMessages: GEN_AI_OUTPUT_MESSAGES,
670
- /** System instructions, when separate from the input messages. */
671
- systemInstructions: "gen_ai.system_instructions",
672
- /** `execute_tool` span: the arguments the tool was called with. */
673
- toolCallArguments: GEN_AI_TOOL_CALL_ARGUMENTS,
674
- /** `execute_tool` span: the result the tool returned. */
675
- toolCallResult: GEN_AI_TOOL_CALL_RESULT
676
- };
677
- var GEN_AI_CONTENT_ATTRIBUTE_ALIASES = {
678
- [GEN_AI_INPUT_MESSAGES]: ["ai.prompt.messages", "ai.prompt"],
679
- [GEN_AI_OUTPUT_MESSAGES]: ["ai.response.text", "ai.response.object"],
680
- [GEN_AI_TOOL_CALL_ARGUMENTS]: ["flue.tool.call.arguments", "ai.toolCall.args"],
681
- [GEN_AI_TOOL_CALL_RESULT]: ["flue.tool.call.result", "ai.toolCall.result"]
682
- };
683
- var OPENINFERENCE_CONTENT_PREFIXES = [
684
- "llm.input_messages.",
685
- "llm.output_messages.",
686
- "llm.prompts",
687
- "llm.prompt_template.",
688
- "llm.choices",
689
- "llm.function_call",
690
- "retrieval.documents.",
691
- "embedding.embeddings.",
692
- "input.value",
693
- "output.value"
694
- ];
695
- var AI_SDK_CONTENT_PREFIXES = ["ai.response.toolCalls"];
696
- var MASTRA_CONTENT_PREFIXES = ["mastra.metadata.body"];
697
- var CLOUDFLARE_AGENTS_CONTENT_PREFIXES = [
698
- "cloudflare.agents.metadata.",
699
- "cloudflare.agents.runtime_context."
700
- ];
701
- var GEN_AI_CONTENT_ATTRIBUTE_PREFIXES = [
702
- ...OPENINFERENCE_CONTENT_PREFIXES,
703
- ...AI_SDK_CONTENT_PREFIXES,
704
- ...MASTRA_CONTENT_PREFIXES,
705
- ...CLOUDFLARE_AGENTS_CONTENT_PREFIXES
706
- ];
707
- var GEN_AI_CONTENT_ATTRIBUTE_NAMES = /* @__PURE__ */ new Set([
708
- ...Object.values(GEN_AI_CONTENT_ATTRIBUTES),
709
- ...Object.values(GEN_AI_CONTENT_ATTRIBUTE_ALIASES).flat()
710
- ]);
711
- var GEN_AI_RESPONSE_MODEL = GEN_AI_ATTRIBUTES.responseModel;
712
-
713
613
  // ../../node_modules/.pnpm/zod@4.6.4/node_modules/zod/v4/classic/external.js
714
614
  var external_exports = {};
715
615
  __export(external_exports, {
@@ -20378,6 +20278,249 @@ function date4(params) {
20378
20278
  return _coercedDate(ZodDate, params);
20379
20279
  }
20380
20280
 
20281
+ // ../shared/dist/chunk-XB5DZHOV.mjs
20282
+ var REPLAY_FROM_START = Object.freeze({
20283
+ row: 0,
20284
+ sub: Number.POSITIVE_INFINITY
20285
+ });
20286
+ var RUN_STATUSES = [
20287
+ "queued",
20288
+ "running",
20289
+ "awaiting",
20290
+ "completed",
20291
+ "failed",
20292
+ "cancelled"
20293
+ ];
20294
+ var runStatusSchema = external_exports.enum(RUN_STATUSES);
20295
+ var RUN_COMPLETENESS_VALUES = [
20296
+ "partial",
20297
+ "complete",
20298
+ "conflicted",
20299
+ "expired",
20300
+ "deleted"
20301
+ ];
20302
+ var RUN_SOURCES = ["hosted", "ingested"];
20303
+ var RUN_KINDS = ["agent", "flow"];
20304
+ var RUN_STALE_AFTER_MS = 25 * 60 * 60 * 1e3;
20305
+ var RUN_INPUT_PREVIEW_MAX_CHARS = 160;
20306
+ var ABSENT = "Absent means the overlay did not answer, which is not false and not null.";
20307
+ var str = (d2) => external_exports.string().nullable().describe(d2);
20308
+ var num = (d2) => external_exports.number().nullable().describe(d2);
20309
+ var ovStr = (d2) => external_exports.string().nullish().describe(`${d2} ${ABSENT}`);
20310
+ var ovNum = (d2) => external_exports.number().nullish().describe(`${d2} ${ABSENT}`);
20311
+ var ovAny = (d2) => external_exports.unknown().optional().describe(`${d2} ${ABSENT}`);
20312
+ var runListRowSchema = external_exports.object({
20313
+ executionId: external_exports.string().describe("Runtime execution id; the key for /v1/logs and /v1/runs/{id}."),
20314
+ traceId: str("Trace id in the span store; null on a row the control-plane arm served."),
20315
+ startedAt: external_exports.string().describe("ISO instant the run started."),
20316
+ endedAt: str("ISO instant the run ended; null while it is still running."),
20317
+ durationMs: num("Wall-clock duration in milliseconds."),
20318
+ status: runStatusSchema.describe("Customer-facing status, derived by runStatusFrom."),
20319
+ kind: external_exports.enum(RUN_KINDS).describe("Whether an agent or a flow ran."),
20320
+ agentId: str("Agent that ran."),
20321
+ flowId: str("Flow that ran."),
20322
+ conversationId: str("Conversation this run belongs to."),
20323
+ surfaceId: str("Product surface that entered this run."),
20324
+ surfaceType: str("Surface family (api, chat, webhook, schedule, ...)."),
20325
+ recordId: str("Record this run processed."),
20326
+ batchExecutionId: str("Batch this run belongs to."),
20327
+ parentExecutionId: str("Run that spawned this one."),
20328
+ parentToolCallId: str("Parent's tool call that spawned this run."),
20329
+ rootExecutionId: str("Outermost run of the tree."),
20330
+ source: external_exports.enum(RUN_SOURCES).describe("hosted, or ingested for an OTLP export. An ingested run is never reported running."),
20331
+ fidelityTier: str("Fidelity of the projection behind this row."),
20332
+ completeness: external_exports.enum(RUN_COMPLETENESS_VALUES).nullable().describe("Storage completeness; null on a row the control-plane arm served."),
20333
+ retentionElided: external_exports.boolean().optional().describe("Retention removed the spans; the run still lists and reads as completed."),
20334
+ spanCount: num("Spans the projection wrote."),
20335
+ inputTokens: num("Input tokens reported."),
20336
+ outputTokens: num("Output tokens reported."),
20337
+ totalCost: str("Metered cost as a decimal string."),
20338
+ selfReportedCost: str("Cost the producer reported."),
20339
+ test: external_exports.boolean().nullable().describe(
20340
+ "True when the run was dispatched with storeResults: false, so it has no control-plane row and no overlay. NULL means the header states nothing about it, which is not false: headers written before this field shipped, and lanes that take no such flag, carry no dispatch stamp and are never backfilled."
20341
+ ),
20342
+ stopReason: external_exports.string().nullish().describe("Stop reason from the terminal frame."),
20343
+ iterations: external_exports.number().nullish().describe("Loop iterations from the terminal frame."),
20344
+ inputPreview: external_exports.string().nullish().describe(
20345
+ `The run's first user message, secret-scrubbed and cut to ${RUN_INPUT_PREVIEW_MAX_CHARS} characters, so a list can say what a run was asked to do without reading content. Absent means no input text is recorded for this run, which is not an empty message: the span store holds no run-level input at all, so a run with no control-plane row (a flow leg, a storeResults:false test run) has none.`
20346
+ ),
20347
+ agentVersionId: ovStr("Agent version that ran."),
20348
+ agentVersionLabel: ovStr("Version label."),
20349
+ agentVersionNumber: ovNum("Version number, for a version chip and version grouping."),
20350
+ agentTargetResolution: ovStr("How the run chose its version: alias, version or legacy-live-row."),
20351
+ otelProducer: ovAny("Framework identity the producer reported, for a versionless run group."),
20352
+ lastHeartbeatAt: ovStr("Last heartbeat."),
20353
+ expiresAt: ovStr("Budget expiry."),
20354
+ cancelRequestedAt: ovStr("Cancel request."),
20355
+ progress: ovAny("Live progress document."),
20356
+ pendingApproval: ovAny("Approval awaiting a human."),
20357
+ budgetExhausted: external_exports.boolean().nullish().describe(`Budget exhausted. ${ABSENT}`),
20358
+ inputMessages: ovAny("Messages the run started from.")
20359
+ });
20360
+ var RUN_LIST_FULL_ONLY_FIELDS = [
20361
+ "stopReason",
20362
+ "iterations",
20363
+ "inputPreview",
20364
+ "agentVersionId",
20365
+ "agentVersionLabel",
20366
+ "agentVersionNumber",
20367
+ "agentTargetResolution",
20368
+ "otelProducer",
20369
+ "lastHeartbeatAt",
20370
+ "expiresAt",
20371
+ "cancelRequestedAt",
20372
+ "progress",
20373
+ "pendingApproval",
20374
+ "budgetExhausted",
20375
+ "inputMessages"
20376
+ ];
20377
+ function runListCompactOmitSentence() {
20378
+ const fields = [...RUN_LIST_FULL_ONLY_FIELDS];
20379
+ const last = fields.pop();
20380
+ return `full (the default) returns every field. compact omits exactly these ${fields.length + 1}: ${fields.join(", ")} and ${last}. The status is still overlay-corrected on a compact page; only the fields differ.`;
20381
+ }
20382
+ var RUN_LIST_VIEWS = ["compact", "full"];
20383
+ var RUN_LIST_OVERLAY_MODES = ["live", "none"];
20384
+ var MAX_RUN_LIST_IDS = 100;
20385
+ var MAX_RUN_LIST_LIMIT = 100;
20386
+ var DEFAULT_RUN_LIST_WINDOW_MS = 24 * 60 * 60 * 1e3;
20387
+ var MAX_RUN_LIST_WINDOW_MS = 400 * 24 * 60 * 60 * 1e3;
20388
+ var RUN_STATUS_FILTERS = ["running", "completed", "failed"];
20389
+ var RUN_STATUS_FILTER_MESSAGE = "status accepts only running, completed or failed. queued, awaiting and cancelled exist only in the live overlay, which may never change which rows a page holds, so the server cannot filter on them.";
20390
+ var runStatusFilterSchema = external_exports.enum(RUN_STATUS_FILTERS, {
20391
+ error: () => RUN_STATUS_FILTER_MESSAGE
20392
+ });
20393
+ var repeatable = () => external_exports.union([external_exports.string(), external_exports.array(external_exports.string())]);
20394
+ var runListQuerySchema = external_exports.object({
20395
+ agentId: repeatable().optional().describe("Filter by agent id; repeat for a set."),
20396
+ flowId: repeatable().optional().describe("Filter by flow id; repeat for a set."),
20397
+ conversationId: external_exports.string().optional().describe("Filter by conversation id."),
20398
+ surfaceId: external_exports.string().optional().describe("Filter by surface id."),
20399
+ surfaceType: external_exports.string().optional().describe("Filter by surface family."),
20400
+ recordId: external_exports.string().optional().describe("Filter by record id."),
20401
+ batchExecutionId: repeatable().optional().describe("Filter by batch id; repeat for a set."),
20402
+ parentExecutionId: external_exports.string().optional().describe("Runs spawned by this execution."),
20403
+ rootExecutionId: external_exports.string().optional().describe("Runs in this execution tree."),
20404
+ executionId: repeatable().optional().describe(`Read specific runs by id; at most ${MAX_RUN_LIST_IDS} per request.`),
20405
+ source: external_exports.enum(RUN_SOURCES).optional().describe("Filter by producing lane."),
20406
+ status: runStatusFilterSchema.optional().describe(RUN_STATUS_FILTER_MESSAGE),
20407
+ from: external_exports.string().optional().describe("Window start (ISO 8601). Defaults to 24 hours ago."),
20408
+ to: external_exports.string().optional().describe("Window end (ISO 8601). Defaults to now."),
20409
+ view: external_exports.enum(RUN_LIST_VIEWS).optional().describe(
20410
+ runListCompactOmitSentence()
20411
+ ),
20412
+ overlay: external_exports.enum(RUN_LIST_OVERLAY_MODES).optional().describe("live adds control-plane fields; defaults to live for a session, none for an API key."),
20413
+ limit: external_exports.string().optional().describe(`Page size, at most ${MAX_RUN_LIST_LIMIT}.`),
20414
+ cursor: external_exports.string().optional().describe("Keyset cursor from a previous page.")
20415
+ });
20416
+ var SCHEDULE_RUN_LINK_KINDS = ["run", "records", "none"];
20417
+ var scheduleRunLinkSchema = external_exports.object({
20418
+ kind: external_exports.enum(SCHEDULE_RUN_LINK_KINDS).describe(
20419
+ "run: one execution, readable at GET /v1/runs/{executionId}. records: a batch, whose per-record runs are GET /v1/runs?batchExecutionId=. none: no readable run was recorded for this scheduled run."
20420
+ ),
20421
+ executionId: external_exports.string().nullable().describe(
20422
+ "The RUNTIME execution id, which is what GET /v1/runs/{executionId} keys on. Null unless kind is run."
20423
+ ),
20424
+ agentExecutionRowId: external_exports.string().nullable().describe(
20425
+ "The agent_executions ROW id the scheduled run stored. Provenance only: a different id space from executionId, and never a /v1/runs key."
20426
+ ),
20427
+ batchExecutionId: external_exports.string().nullable().describe("The batch whose per-record runs are GET /v1/runs?batchExecutionId=.")
20428
+ });
20429
+
20430
+ // ../shared/dist/chunk-2NMGSD35.mjs
20431
+ var GEN_AI_OPERATION_NAME = "gen_ai.operation.name";
20432
+ var GEN_AI_AGENT_ID = "gen_ai.agent.id";
20433
+ var GEN_AI_AGENT_NAME = "gen_ai.agent.name";
20434
+ var GEN_AI_CONVERSATION_ID = "gen_ai.conversation.id";
20435
+ var GEN_AI_REQUEST_MODEL = "gen_ai.request.model";
20436
+ var GEN_AI_RESPONSE_MODEL_NAME = "gen_ai.response.model";
20437
+ var GEN_AI_USAGE_INPUT_TOKENS = "gen_ai.usage.input_tokens";
20438
+ var GEN_AI_USAGE_OUTPUT_TOKENS = "gen_ai.usage.output_tokens";
20439
+ var GEN_AI_USAGE_CACHE_READ_TOKENS = "gen_ai.usage.cache_read.input_tokens";
20440
+ var GEN_AI_USAGE_CACHE_CREATION_TOKENS = "gen_ai.usage.cache_creation.input_tokens";
20441
+ var GEN_AI_TOOL_NAME = "gen_ai.tool.name";
20442
+ var GEN_AI_TOOL_TYPE = "gen_ai.tool.type";
20443
+ var GEN_AI_TOOL_CALL_ID = "gen_ai.tool.call.id";
20444
+ var GEN_AI_ATTRIBUTES = {
20445
+ operationName: GEN_AI_OPERATION_NAME,
20446
+ agentId: GEN_AI_AGENT_ID,
20447
+ agentName: GEN_AI_AGENT_NAME,
20448
+ conversationId: GEN_AI_CONVERSATION_ID,
20449
+ requestModel: GEN_AI_REQUEST_MODEL,
20450
+ usageInputTokens: GEN_AI_USAGE_INPUT_TOKENS,
20451
+ usageOutputTokens: GEN_AI_USAGE_OUTPUT_TOKENS,
20452
+ /** Input tokens served from the provider's prompt cache, when the provider reports them. */
20453
+ usageCacheReadTokens: GEN_AI_USAGE_CACHE_READ_TOKENS,
20454
+ /** Input tokens written INTO the provider's prompt cache, when the provider reports them. */
20455
+ usageCacheCreationTokens: GEN_AI_USAGE_CACHE_CREATION_TOKENS,
20456
+ /** The model the provider reported having SERVED; the more accurate one to price. */
20457
+ responseModel: GEN_AI_RESPONSE_MODEL_NAME,
20458
+ toolName: GEN_AI_TOOL_NAME,
20459
+ toolType: GEN_AI_TOOL_TYPE,
20460
+ toolCallId: GEN_AI_TOOL_CALL_ID
20461
+ };
20462
+
20463
+ // ../shared/dist/chunk-GYGZIK4G.mjs
20464
+ var RUNTYPE_ITERATION = "runtype.iteration";
20465
+ var RUNTYPE_TOTAL_COST = "runtype.total_cost";
20466
+ var RUNTYPE_TURN_INDEX = "runtype.turn.index";
20467
+ var RUNTYPE_LEGACY_ATTRIBUTE_ALIASES = {
20468
+ [RUNTYPE_ITERATION]: ["runtype.agent.iteration"],
20469
+ [RUNTYPE_TOTAL_COST]: ["runtype.agent.totalCost"],
20470
+ [RUNTYPE_TURN_INDEX]: ["runtype.agent.turnIndex"]
20471
+ };
20472
+ var GEN_AI_TOOL_CALL_ARGUMENTS = "gen_ai.tool.call.arguments";
20473
+ var GEN_AI_TOOL_CALL_RESULT = "gen_ai.tool.call.result";
20474
+ var GEN_AI_INPUT_MESSAGES = "gen_ai.input.messages";
20475
+ var GEN_AI_OUTPUT_MESSAGES = "gen_ai.output.messages";
20476
+ var GEN_AI_CONTENT_ATTRIBUTES = {
20477
+ /** Chat history sent to the model, as semconv structured messages. */
20478
+ inputMessages: GEN_AI_INPUT_MESSAGES,
20479
+ /** Messages the model produced (includes reasoning content parts). */
20480
+ outputMessages: GEN_AI_OUTPUT_MESSAGES,
20481
+ /** System instructions, when separate from the input messages. */
20482
+ systemInstructions: "gen_ai.system_instructions",
20483
+ /** `execute_tool` span: the arguments the tool was called with. */
20484
+ toolCallArguments: GEN_AI_TOOL_CALL_ARGUMENTS,
20485
+ /** `execute_tool` span: the result the tool returned. */
20486
+ toolCallResult: GEN_AI_TOOL_CALL_RESULT
20487
+ };
20488
+ var GEN_AI_CONTENT_ATTRIBUTE_ALIASES = {
20489
+ [GEN_AI_INPUT_MESSAGES]: ["ai.prompt.messages", "ai.prompt"],
20490
+ [GEN_AI_OUTPUT_MESSAGES]: ["ai.response.text", "ai.response.object"],
20491
+ [GEN_AI_TOOL_CALL_ARGUMENTS]: ["flue.tool.call.arguments", "ai.toolCall.args"],
20492
+ [GEN_AI_TOOL_CALL_RESULT]: ["flue.tool.call.result", "ai.toolCall.result"]
20493
+ };
20494
+ var OPENINFERENCE_CONTENT_PREFIXES = [
20495
+ "llm.input_messages.",
20496
+ "llm.output_messages.",
20497
+ "llm.prompts",
20498
+ "llm.prompt_template.",
20499
+ "llm.choices",
20500
+ "llm.function_call",
20501
+ "retrieval.documents.",
20502
+ "embedding.embeddings.",
20503
+ "input.value",
20504
+ "output.value"
20505
+ ];
20506
+ var AI_SDK_CONTENT_PREFIXES = ["ai.response.toolCalls"];
20507
+ var MASTRA_CONTENT_PREFIXES = ["mastra.metadata.body"];
20508
+ var CLOUDFLARE_AGENTS_CONTENT_PREFIXES = [
20509
+ "cloudflare.agents.metadata.",
20510
+ "cloudflare.agents.runtime_context."
20511
+ ];
20512
+ var GEN_AI_CONTENT_ATTRIBUTE_PREFIXES = [
20513
+ ...OPENINFERENCE_CONTENT_PREFIXES,
20514
+ ...AI_SDK_CONTENT_PREFIXES,
20515
+ ...MASTRA_CONTENT_PREFIXES,
20516
+ ...CLOUDFLARE_AGENTS_CONTENT_PREFIXES
20517
+ ];
20518
+ var GEN_AI_CONTENT_ATTRIBUTE_NAMES = /* @__PURE__ */ new Set([
20519
+ ...Object.values(GEN_AI_CONTENT_ATTRIBUTES),
20520
+ ...Object.values(GEN_AI_CONTENT_ATTRIBUTE_ALIASES).flat()
20521
+ ]);
20522
+ var GEN_AI_RESPONSE_MODEL = GEN_AI_ATTRIBUTES.responseModel;
20523
+
20381
20524
  // ../shared/dist/chunk-7LZATPNB.mjs
20382
20525
  var AGENT_EXECUTION_STATUSES = [
20383
20526
  "queued",
@@ -20400,7 +20543,7 @@ var UNSUCCESSFUL_STATUS_SET = new Set(
20400
20543
  UNSUCCESSFUL_AGENT_EXECUTION_STATUSES
20401
20544
  );
20402
20545
 
20403
- // ../shared/dist/chunk-EKFO52SZ.mjs
20546
+ // ../shared/dist/chunk-O334JSPV.mjs
20404
20547
  var CANONICAL_LOG_COLUMN_SET = {
20405
20548
  // @snake-case-ok-start: R2 SQL / Iceberg column naming convention
20406
20549
  event_id: true,
@@ -20413,7 +20556,7 @@ var CANONICAL_LOG_COLUMN_SET = {
20413
20556
  };
20414
20557
  var CANONICAL_LOG_COLUMNS = Object.keys(CANONICAL_LOG_COLUMN_SET);
20415
20558
 
20416
- // ../shared/dist/chunk-AH3ONIQB.mjs
20559
+ // ../shared/dist/chunk-CTJEYKNH.mjs
20417
20560
  var BUILTIN_TOOLS_LEAN = [
20418
20561
  { "id": "gpt-image-2-5", "name": "GPT Image 2.5", "category": "image_generation", "providers": ["multi"], "defaultConfig": { "size": "1024x1024", "quality": "low", "outputFormat": "png", "background": "auto" }, "requiresApiKey": true, "executionHint": "platform", "platformKeySupport": true },
20419
20562
  { "id": "gpt-image-2", "name": "GPT Image 2", "category": "image_generation", "providers": ["multi"], "defaultConfig": { "size": "1024x1024", "quality": "low", "outputFormat": "png", "background": "auto" }, "requiresApiKey": true, "executionHint": "platform", "platformKeySupport": true, "hidden": true, "deprecated": true },
@@ -20424,6 +20567,7 @@ var BUILTIN_TOOLS_LEAN = [
20424
20567
  { "id": "xai_live_search", "name": "xAI Live Search (deprecated)", "category": "web_search", "providers": ["xai"], "defaultConfig": { "mode": "auto", "returnCitations": true, "maxSearchResults": 20 }, "modelCompatibility": [{ "provider": "xai", "models": ["grok-4", "grok-4-fast", "grok-4.1-fast"] }], "requiresApiKey": true, "executionHint": "provider", "platformKeySupport": true, "hidden": true, "deprecated": true },
20425
20568
  { "id": "xai_x_search", "name": "xAI X Search", "category": "web_search", "providers": ["xai"], "defaultConfig": {}, "modelCompatibility": [{ "provider": "xai", "models": ["grok-4", "grok-4-fast"] }], "requiresApiKey": true, "executionHint": "provider", "platformKeySupport": true },
20426
20569
  { "id": "xai_web_search", "name": "xAI Web Search", "category": "web_search", "providers": ["xai"], "defaultConfig": {}, "modelCompatibility": [{ "provider": "xai", "models": ["grok-4", "grok-4-fast"] }], "requiresApiKey": true, "executionHint": "provider", "platformKeySupport": true },
20570
+ { "id": "google_search", "name": "Google Search", "category": "web_search", "providers": ["google"], "defaultConfig": { "includeImageSearch": false }, "modelCompatibility": [{ "provider": "google", "models": ["gemini-2.5-pro", "gemini-2.5-flash", "gemini-3-flash", "gemini-3-pro-preview", "gemini-3.1-pro", "gemini-3-1-flash-lite", "gemini-3.1-flash-lite"] }], "requiresApiKey": true, "executionHint": "provider", "platformKeySupport": true },
20427
20571
  { "id": "exa", "name": "Exa", "category": "web_search", "providers": ["multi"], "defaultConfig": { "searchType": "auto", "numResults": 5, "text": false, "summary": true, "highlights": true }, "requiresApiKey": true, "executionHint": "platform" },
20428
20572
  { "id": "firecrawl", "name": "Firecrawl", "category": "web_scraping", "providers": ["multi"], "defaultConfig": { "formats": ["markdown"], "onlyMainContent": true }, "requiresApiKey": true, "executionHint": "platform" },
20429
20573
  { "id": "massive", "name": "Massive Web Render", "category": "web_scraping", "providers": ["multi"], "defaultConfig": { "format": "markdown" }, "requiresApiKey": true, "executionHint": "platform" },
@@ -20677,7 +20821,7 @@ var BuiltInToolGroup = {
20677
20821
  TEMPORAL: "temporal"
20678
20822
  };
20679
20823
 
20680
- // ../shared/dist/chunk-OYPPCGMC.mjs
20824
+ // ../shared/dist/chunk-EAURMPCP.mjs
20681
20825
  var BUILTIN_TOOLS_REGISTRY = BUILTIN_TOOLS_LEAN;
20682
20826
  function formatSystemToolId(tool) {
20683
20827
  const prefix = tool.idPrefix ?? BuiltInToolIdPrefix.BUILTIN;
@@ -22863,7 +23007,7 @@ function isDataConnectionToolId(toolId) {
22863
23007
  return toolId.startsWith("dc:");
22864
23008
  }
22865
23009
 
22866
- // ../shared/dist/chunk-WY6VMAWI.mjs
23010
+ // ../shared/dist/chunk-HQXZXXZZ.mjs
22867
23011
  function sanitizeToolNameForAiSdk(name) {
22868
23012
  return name.replace(/[^a-zA-Z0-9_]/g, "_").toLowerCase().replace(/_+/g, "_").replace(/^_|_$/g, "");
22869
23013
  }
@@ -22882,10 +23026,22 @@ var DIRECT_PROVIDER_TOOL_OWNERS = /* @__PURE__ */ new Set([
22882
23026
  "openai",
22883
23027
  "xai"
22884
23028
  ]);
22885
- function resolveDirectProviderToolOwner(toolId) {
23029
+ var GATEWAY_CARRIED_PROVIDER_TOOL_OWNERS = /* @__PURE__ */ new Set(["google"]);
23030
+ var PROVIDER_TOOL_OWNERS = /* @__PURE__ */ new Set([
23031
+ ...DIRECT_PROVIDER_TOOL_OWNERS,
23032
+ ...GATEWAY_CARRIED_PROVIDER_TOOL_OWNERS
23033
+ ]);
23034
+ function ownerOf(toolId) {
22886
23035
  const entry = getBuiltInToolById(parseToolInstanceId(toolId).baseId);
22887
23036
  if (entry?.executionHint !== "provider") return void 0;
22888
- const owner = entry.providers?.[0];
23037
+ return entry.providers?.[0];
23038
+ }
23039
+ function resolveProviderToolOwner(toolId) {
23040
+ const owner = ownerOf(toolId);
23041
+ return owner && PROVIDER_TOOL_OWNERS.has(owner) ? owner : void 0;
23042
+ }
23043
+ function resolveDirectProviderToolOwner(toolId) {
23044
+ const owner = ownerOf(toolId);
22889
23045
  return owner && DIRECT_PROVIDER_TOOL_OWNERS.has(owner) ? owner : void 0;
22890
23046
  }
22891
23047
  var DEFAULT_BEDROCK_REGION = "us-east-1";
@@ -23064,7 +23220,7 @@ var conversationSourceSchema = external_exports.object({
23064
23220
  importedAt: external_exports.string().datetime({ offset: true }).optional()
23065
23221
  });
23066
23222
 
23067
- // ../shared/dist/chunk-HD3SKN3O.mjs
23223
+ // ../shared/dist/chunk-QOMOTJ3F.mjs
23068
23224
  var edgeAuthSnapshotSchema = external_exports.object({
23069
23225
  /**
23070
23226
  * Schema version. A plain positive int (not a literal) so a consumer pinned
@@ -33699,16 +33855,19 @@ function validateToolCallStrategyNoneWithTools(flowSteps, buckets) {
33699
33855
  var PROVIDER_TOOLS_MIXED_OWNERS_CODE = "PROVIDER_TOOLS_MIXED_OWNERS";
33700
33856
  function collectProviderToolOwners(toolIds) {
33701
33857
  const toolIdsByOwner = {};
33702
- let winner;
33858
+ let firstOwner;
33859
+ let firstDirectOwner;
33703
33860
  if (Array.isArray(toolIds)) {
33704
33861
  for (const toolId of toolIds) {
33705
33862
  if (typeof toolId !== "string") continue;
33706
- const owner = resolveDirectProviderToolOwner(toolId);
33863
+ const owner = resolveProviderToolOwner(toolId);
33707
33864
  if (!owner) continue;
33708
- winner ?? (winner = owner);
33865
+ firstOwner ?? (firstOwner = owner);
33866
+ firstDirectOwner ?? (firstDirectOwner = resolveDirectProviderToolOwner(toolId));
33709
33867
  (toolIdsByOwner[owner] ?? (toolIdsByOwner[owner] = [])).push(toolId);
33710
33868
  }
33711
33869
  }
33870
+ const winner = firstDirectOwner ?? firstOwner;
33712
33871
  const owners = Object.keys(toolIdsByOwner).sort();
33713
33872
  return {
33714
33873
  owners,
@@ -33720,7 +33879,7 @@ function providerToolsMixedOwnersMessage(grouping) {
33720
33879
  const winner = grouping.winner ?? grouping.owners[0];
33721
33880
  const attached = grouping.owners.map((owner) => `${owner}: ${grouping.toolIdsByOwner[owner].join(", ")}`).join("; ");
33722
33881
  const losers = grouping.owners.filter((owner) => owner !== winner).flatMap((owner) => grouping.toolIdsByOwner[owner]).join(", ");
33723
- return `Provider-native tools from more than one provider are attached (${attached}), but one request reaches one provider, so only the ${winner} tools will run: the request is routed to ${winner} because its tool is listed first, and ${losers} will be sent as an inert function tool or dropped without a signal. Keep the tools of a single provider on this step, or move the other provider's tools to a separate prompt step whose model that provider serves.`;
33882
+ return `Provider-native tools from more than one provider are attached (${attached}), but one request reaches one provider, so only the ${winner} tools will run: the request is routed to ${winner}, and ${losers} will be sent as an inert function tool or dropped without a signal. Keep the tools of a single provider on this step, or move the other provider's tools to a separate prompt step whose model that provider serves.`;
33724
33883
  }
33725
33884
  function validateProviderToolMixedOwners(flowSteps, buckets) {
33726
33885
  for (const [stepIndex, step] of flowSteps.entries()) {
@@ -40232,144 +40391,6 @@ var mcpConnectionFailureSchema = external_exports.object({
40232
40391
  retryable: external_exports.boolean(),
40233
40392
  diagnosticId: external_exports.string().max(64)
40234
40393
  });
40235
- var RUN_STATUSES = [
40236
- "queued",
40237
- "running",
40238
- "awaiting",
40239
- "completed",
40240
- "failed",
40241
- "cancelled"
40242
- ];
40243
- var runStatusSchema = external_exports.enum(RUN_STATUSES);
40244
- var RUN_COMPLETENESS_VALUES = [
40245
- "partial",
40246
- "complete",
40247
- "conflicted",
40248
- "expired",
40249
- "deleted"
40250
- ];
40251
- var RUN_SOURCES = ["hosted", "ingested"];
40252
- var RUN_KINDS = ["agent", "flow"];
40253
- var RUN_STALE_AFTER_MS = 25 * 60 * 60 * 1e3;
40254
- var ABSENT = "Absent means the overlay did not answer, which is not false and not null.";
40255
- var str = (d2) => external_exports.string().nullable().describe(d2);
40256
- var num = (d2) => external_exports.number().nullable().describe(d2);
40257
- var ovStr = (d2) => external_exports.string().nullish().describe(`${d2} ${ABSENT}`);
40258
- var ovNum = (d2) => external_exports.number().nullish().describe(`${d2} ${ABSENT}`);
40259
- var ovAny = (d2) => external_exports.unknown().optional().describe(`${d2} ${ABSENT}`);
40260
- var runListRowSchema = external_exports.object({
40261
- executionId: external_exports.string().describe("Runtime execution id; the key for /v1/logs and /v1/runs/{id}."),
40262
- traceId: str("Trace id in the span store; null on a row the control-plane arm served."),
40263
- startedAt: external_exports.string().describe("ISO instant the run started."),
40264
- endedAt: str("ISO instant the run ended; null while it is still running."),
40265
- durationMs: num("Wall-clock duration in milliseconds."),
40266
- status: runStatusSchema.describe("Customer-facing status, derived by runStatusFrom."),
40267
- kind: external_exports.enum(RUN_KINDS).describe("Whether an agent or a flow ran."),
40268
- agentId: str("Agent that ran."),
40269
- flowId: str("Flow that ran."),
40270
- conversationId: str("Conversation this run belongs to."),
40271
- surfaceId: str("Product surface that entered this run."),
40272
- surfaceType: str("Surface family (api, chat, webhook, schedule, ...)."),
40273
- recordId: str("Record this run processed."),
40274
- batchExecutionId: str("Batch this run belongs to."),
40275
- parentExecutionId: str("Run that spawned this one."),
40276
- parentToolCallId: str("Parent's tool call that spawned this run."),
40277
- rootExecutionId: str("Outermost run of the tree."),
40278
- source: external_exports.enum(RUN_SOURCES).describe("hosted, or ingested for an OTLP export. An ingested run is never reported running."),
40279
- fidelityTier: str("Fidelity of the projection behind this row."),
40280
- completeness: external_exports.enum(RUN_COMPLETENESS_VALUES).nullable().describe("Storage completeness; null on a row the control-plane arm served."),
40281
- retentionElided: external_exports.boolean().optional().describe("Retention removed the spans; the run still lists and reads as completed."),
40282
- spanCount: num("Spans the projection wrote."),
40283
- inputTokens: num("Input tokens reported."),
40284
- outputTokens: num("Output tokens reported."),
40285
- totalCost: str("Metered cost as a decimal string."),
40286
- selfReportedCost: str("Cost the producer reported."),
40287
- test: external_exports.boolean().nullable().describe(
40288
- "True when the run was dispatched with storeResults: false, so it has no control-plane row and no overlay. NULL means the header states nothing about it, which is not false: headers written before this field shipped, and lanes that take no such flag, carry no dispatch stamp and are never backfilled."
40289
- ),
40290
- stopReason: external_exports.string().nullish().describe("Stop reason from the terminal frame."),
40291
- iterations: external_exports.number().nullish().describe("Loop iterations from the terminal frame."),
40292
- agentVersionId: ovStr("Agent version that ran."),
40293
- agentVersionLabel: ovStr("Version label."),
40294
- agentVersionNumber: ovNum("Version number, for a version chip and version grouping."),
40295
- agentTargetResolution: ovStr("How the run chose its version: alias, version or legacy-live-row."),
40296
- otelProducer: ovAny("Framework identity the producer reported, for a versionless run group."),
40297
- lastHeartbeatAt: ovStr("Last heartbeat."),
40298
- expiresAt: ovStr("Budget expiry."),
40299
- cancelRequestedAt: ovStr("Cancel request."),
40300
- progress: ovAny("Live progress document."),
40301
- pendingApproval: ovAny("Approval awaiting a human."),
40302
- budgetExhausted: external_exports.boolean().nullish().describe(`Budget exhausted. ${ABSENT}`),
40303
- inputMessages: ovAny("Messages the run started from.")
40304
- });
40305
- var RUN_LIST_FULL_ONLY_FIELDS = [
40306
- "stopReason",
40307
- "iterations",
40308
- "agentVersionId",
40309
- "agentVersionLabel",
40310
- "agentVersionNumber",
40311
- "agentTargetResolution",
40312
- "otelProducer",
40313
- "lastHeartbeatAt",
40314
- "expiresAt",
40315
- "cancelRequestedAt",
40316
- "progress",
40317
- "pendingApproval",
40318
- "budgetExhausted",
40319
- "inputMessages"
40320
- ];
40321
- function runListCompactOmitSentence() {
40322
- const fields = [...RUN_LIST_FULL_ONLY_FIELDS];
40323
- const last = fields.pop();
40324
- return `full (the default) returns every field. compact omits exactly these ${fields.length + 1}: ${fields.join(", ")} and ${last}. The status is still overlay-corrected on a compact page; only the fields differ.`;
40325
- }
40326
- var RUN_LIST_VIEWS = ["compact", "full"];
40327
- var RUN_LIST_OVERLAY_MODES = ["live", "none"];
40328
- var MAX_RUN_LIST_IDS = 100;
40329
- var MAX_RUN_LIST_LIMIT = 100;
40330
- var DEFAULT_RUN_LIST_WINDOW_MS = 24 * 60 * 60 * 1e3;
40331
- var MAX_RUN_LIST_WINDOW_MS = 400 * 24 * 60 * 60 * 1e3;
40332
- var RUN_STATUS_FILTERS = ["running", "completed", "failed"];
40333
- var RUN_STATUS_FILTER_MESSAGE = "status accepts only running, completed or failed. queued, awaiting and cancelled exist only in the live overlay, which may never change which rows a page holds, so the server cannot filter on them.";
40334
- var runStatusFilterSchema = external_exports.enum(RUN_STATUS_FILTERS, {
40335
- error: () => RUN_STATUS_FILTER_MESSAGE
40336
- });
40337
- var repeatable = () => external_exports.union([external_exports.string(), external_exports.array(external_exports.string())]);
40338
- var runListQuerySchema = external_exports.object({
40339
- agentId: repeatable().optional().describe("Filter by agent id; repeat for a set."),
40340
- flowId: repeatable().optional().describe("Filter by flow id; repeat for a set."),
40341
- conversationId: external_exports.string().optional().describe("Filter by conversation id."),
40342
- surfaceId: external_exports.string().optional().describe("Filter by surface id."),
40343
- surfaceType: external_exports.string().optional().describe("Filter by surface family."),
40344
- recordId: external_exports.string().optional().describe("Filter by record id."),
40345
- batchExecutionId: repeatable().optional().describe("Filter by batch id; repeat for a set."),
40346
- parentExecutionId: external_exports.string().optional().describe("Runs spawned by this execution."),
40347
- rootExecutionId: external_exports.string().optional().describe("Runs in this execution tree."),
40348
- executionId: repeatable().optional().describe(`Read specific runs by id; at most ${MAX_RUN_LIST_IDS} per request.`),
40349
- source: external_exports.enum(RUN_SOURCES).optional().describe("Filter by producing lane."),
40350
- status: runStatusFilterSchema.optional().describe(RUN_STATUS_FILTER_MESSAGE),
40351
- from: external_exports.string().optional().describe("Window start (ISO 8601). Defaults to 24 hours ago."),
40352
- to: external_exports.string().optional().describe("Window end (ISO 8601). Defaults to now."),
40353
- view: external_exports.enum(RUN_LIST_VIEWS).optional().describe(
40354
- runListCompactOmitSentence()
40355
- ),
40356
- overlay: external_exports.enum(RUN_LIST_OVERLAY_MODES).optional().describe("live adds control-plane fields; defaults to live for a session, none for an API key."),
40357
- limit: external_exports.string().optional().describe(`Page size, at most ${MAX_RUN_LIST_LIMIT}.`),
40358
- cursor: external_exports.string().optional().describe("Keyset cursor from a previous page.")
40359
- });
40360
- var SCHEDULE_RUN_LINK_KINDS = ["run", "records", "none"];
40361
- var scheduleRunLinkSchema = external_exports.object({
40362
- kind: external_exports.enum(SCHEDULE_RUN_LINK_KINDS).describe(
40363
- "run: one execution, readable at GET /v1/runs/{executionId}. records: a batch, whose per-record runs are GET /v1/runs?batchExecutionId=. none: no readable run was recorded for this scheduled run."
40364
- ),
40365
- executionId: external_exports.string().nullable().describe(
40366
- "The RUNTIME execution id, which is what GET /v1/runs/{executionId} keys on. Null unless kind is run."
40367
- ),
40368
- agentExecutionRowId: external_exports.string().nullable().describe(
40369
- "The agent_executions ROW id the scheduled run stored. Provenance only: a different id space from executionId, and never a /v1/runs key."
40370
- ),
40371
- batchExecutionId: external_exports.string().nullable().describe("The batch whose per-record runs are GET /v1/runs?batchExecutionId=.")
40372
- });
40373
40394
 
40374
40395
  // src/config/effective-context.ts
40375
40396
  init_credential_store();
@@ -60656,7 +60677,7 @@ function applyTaskOptions(cmd) {
60656
60677
  "Disable session context indexing and search_session_history tool"
60657
60678
  ).option(
60658
60679
  "-t, --tools <tools...>",
60659
- "Enable built-in tools (e.g., exa, firecrawl, dalle, openai_web_search, anthropic_web_search)"
60680
+ "Enable built-in tools (e.g., exa, firecrawl, dalle, openai_web_search, anthropic_web_search, google_search)"
60660
60681
  ).option("--plain-text", "Disable markdown rendering in output").option(
60661
60682
  "--no-reasoning",
60662
60683
  "Disable model reasoning/thinking (enabled by default for supported models)"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runtypelabs/cli",
3
- "version": "2.40.11",
3
+ "version": "2.40.14",
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.7",
14
- "@runtypelabs/sdk": "10.1.0",
14
+ "@runtypelabs/sdk": "10.1.2",
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.22.0",
36
- "@runtypelabs/shared": "3.56.0",
36
+ "@runtypelabs/shared": "3.57.4",
37
37
  "@types/express": "^5.0.6",
38
38
  "@types/micromatch": "^4.0.9",
39
39
  "@types/node": "^25.3.3",