@runtypelabs/cli 2.40.12 → 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.
- package/dist/index.js +244 -239
- 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",
|
|
@@ -23077,7 +23220,7 @@ var conversationSourceSchema = external_exports.object({
|
|
|
23077
23220
|
importedAt: external_exports.string().datetime({ offset: true }).optional()
|
|
23078
23221
|
});
|
|
23079
23222
|
|
|
23080
|
-
// ../shared/dist/chunk-
|
|
23223
|
+
// ../shared/dist/chunk-QOMOTJ3F.mjs
|
|
23081
23224
|
var edgeAuthSnapshotSchema = external_exports.object({
|
|
23082
23225
|
/**
|
|
23083
23226
|
* Schema version. A plain positive int (not a literal) so a consumer pinned
|
|
@@ -40248,144 +40391,6 @@ var mcpConnectionFailureSchema = external_exports.object({
|
|
|
40248
40391
|
retryable: external_exports.boolean(),
|
|
40249
40392
|
diagnosticId: external_exports.string().max(64)
|
|
40250
40393
|
});
|
|
40251
|
-
var RUN_STATUSES = [
|
|
40252
|
-
"queued",
|
|
40253
|
-
"running",
|
|
40254
|
-
"awaiting",
|
|
40255
|
-
"completed",
|
|
40256
|
-
"failed",
|
|
40257
|
-
"cancelled"
|
|
40258
|
-
];
|
|
40259
|
-
var runStatusSchema = external_exports.enum(RUN_STATUSES);
|
|
40260
|
-
var RUN_COMPLETENESS_VALUES = [
|
|
40261
|
-
"partial",
|
|
40262
|
-
"complete",
|
|
40263
|
-
"conflicted",
|
|
40264
|
-
"expired",
|
|
40265
|
-
"deleted"
|
|
40266
|
-
];
|
|
40267
|
-
var RUN_SOURCES = ["hosted", "ingested"];
|
|
40268
|
-
var RUN_KINDS = ["agent", "flow"];
|
|
40269
|
-
var RUN_STALE_AFTER_MS = 25 * 60 * 60 * 1e3;
|
|
40270
|
-
var ABSENT = "Absent means the overlay did not answer, which is not false and not null.";
|
|
40271
|
-
var str = (d2) => external_exports.string().nullable().describe(d2);
|
|
40272
|
-
var num = (d2) => external_exports.number().nullable().describe(d2);
|
|
40273
|
-
var ovStr = (d2) => external_exports.string().nullish().describe(`${d2} ${ABSENT}`);
|
|
40274
|
-
var ovNum = (d2) => external_exports.number().nullish().describe(`${d2} ${ABSENT}`);
|
|
40275
|
-
var ovAny = (d2) => external_exports.unknown().optional().describe(`${d2} ${ABSENT}`);
|
|
40276
|
-
var runListRowSchema = external_exports.object({
|
|
40277
|
-
executionId: external_exports.string().describe("Runtime execution id; the key for /v1/logs and /v1/runs/{id}."),
|
|
40278
|
-
traceId: str("Trace id in the span store; null on a row the control-plane arm served."),
|
|
40279
|
-
startedAt: external_exports.string().describe("ISO instant the run started."),
|
|
40280
|
-
endedAt: str("ISO instant the run ended; null while it is still running."),
|
|
40281
|
-
durationMs: num("Wall-clock duration in milliseconds."),
|
|
40282
|
-
status: runStatusSchema.describe("Customer-facing status, derived by runStatusFrom."),
|
|
40283
|
-
kind: external_exports.enum(RUN_KINDS).describe("Whether an agent or a flow ran."),
|
|
40284
|
-
agentId: str("Agent that ran."),
|
|
40285
|
-
flowId: str("Flow that ran."),
|
|
40286
|
-
conversationId: str("Conversation this run belongs to."),
|
|
40287
|
-
surfaceId: str("Product surface that entered this run."),
|
|
40288
|
-
surfaceType: str("Surface family (api, chat, webhook, schedule, ...)."),
|
|
40289
|
-
recordId: str("Record this run processed."),
|
|
40290
|
-
batchExecutionId: str("Batch this run belongs to."),
|
|
40291
|
-
parentExecutionId: str("Run that spawned this one."),
|
|
40292
|
-
parentToolCallId: str("Parent's tool call that spawned this run."),
|
|
40293
|
-
rootExecutionId: str("Outermost run of the tree."),
|
|
40294
|
-
source: external_exports.enum(RUN_SOURCES).describe("hosted, or ingested for an OTLP export. An ingested run is never reported running."),
|
|
40295
|
-
fidelityTier: str("Fidelity of the projection behind this row."),
|
|
40296
|
-
completeness: external_exports.enum(RUN_COMPLETENESS_VALUES).nullable().describe("Storage completeness; null on a row the control-plane arm served."),
|
|
40297
|
-
retentionElided: external_exports.boolean().optional().describe("Retention removed the spans; the run still lists and reads as completed."),
|
|
40298
|
-
spanCount: num("Spans the projection wrote."),
|
|
40299
|
-
inputTokens: num("Input tokens reported."),
|
|
40300
|
-
outputTokens: num("Output tokens reported."),
|
|
40301
|
-
totalCost: str("Metered cost as a decimal string."),
|
|
40302
|
-
selfReportedCost: str("Cost the producer reported."),
|
|
40303
|
-
test: external_exports.boolean().nullable().describe(
|
|
40304
|
-
"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."
|
|
40305
|
-
),
|
|
40306
|
-
stopReason: external_exports.string().nullish().describe("Stop reason from the terminal frame."),
|
|
40307
|
-
iterations: external_exports.number().nullish().describe("Loop iterations from the terminal frame."),
|
|
40308
|
-
agentVersionId: ovStr("Agent version that ran."),
|
|
40309
|
-
agentVersionLabel: ovStr("Version label."),
|
|
40310
|
-
agentVersionNumber: ovNum("Version number, for a version chip and version grouping."),
|
|
40311
|
-
agentTargetResolution: ovStr("How the run chose its version: alias, version or legacy-live-row."),
|
|
40312
|
-
otelProducer: ovAny("Framework identity the producer reported, for a versionless run group."),
|
|
40313
|
-
lastHeartbeatAt: ovStr("Last heartbeat."),
|
|
40314
|
-
expiresAt: ovStr("Budget expiry."),
|
|
40315
|
-
cancelRequestedAt: ovStr("Cancel request."),
|
|
40316
|
-
progress: ovAny("Live progress document."),
|
|
40317
|
-
pendingApproval: ovAny("Approval awaiting a human."),
|
|
40318
|
-
budgetExhausted: external_exports.boolean().nullish().describe(`Budget exhausted. ${ABSENT}`),
|
|
40319
|
-
inputMessages: ovAny("Messages the run started from.")
|
|
40320
|
-
});
|
|
40321
|
-
var RUN_LIST_FULL_ONLY_FIELDS = [
|
|
40322
|
-
"stopReason",
|
|
40323
|
-
"iterations",
|
|
40324
|
-
"agentVersionId",
|
|
40325
|
-
"agentVersionLabel",
|
|
40326
|
-
"agentVersionNumber",
|
|
40327
|
-
"agentTargetResolution",
|
|
40328
|
-
"otelProducer",
|
|
40329
|
-
"lastHeartbeatAt",
|
|
40330
|
-
"expiresAt",
|
|
40331
|
-
"cancelRequestedAt",
|
|
40332
|
-
"progress",
|
|
40333
|
-
"pendingApproval",
|
|
40334
|
-
"budgetExhausted",
|
|
40335
|
-
"inputMessages"
|
|
40336
|
-
];
|
|
40337
|
-
function runListCompactOmitSentence() {
|
|
40338
|
-
const fields = [...RUN_LIST_FULL_ONLY_FIELDS];
|
|
40339
|
-
const last = fields.pop();
|
|
40340
|
-
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.`;
|
|
40341
|
-
}
|
|
40342
|
-
var RUN_LIST_VIEWS = ["compact", "full"];
|
|
40343
|
-
var RUN_LIST_OVERLAY_MODES = ["live", "none"];
|
|
40344
|
-
var MAX_RUN_LIST_IDS = 100;
|
|
40345
|
-
var MAX_RUN_LIST_LIMIT = 100;
|
|
40346
|
-
var DEFAULT_RUN_LIST_WINDOW_MS = 24 * 60 * 60 * 1e3;
|
|
40347
|
-
var MAX_RUN_LIST_WINDOW_MS = 400 * 24 * 60 * 60 * 1e3;
|
|
40348
|
-
var RUN_STATUS_FILTERS = ["running", "completed", "failed"];
|
|
40349
|
-
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.";
|
|
40350
|
-
var runStatusFilterSchema = external_exports.enum(RUN_STATUS_FILTERS, {
|
|
40351
|
-
error: () => RUN_STATUS_FILTER_MESSAGE
|
|
40352
|
-
});
|
|
40353
|
-
var repeatable = () => external_exports.union([external_exports.string(), external_exports.array(external_exports.string())]);
|
|
40354
|
-
var runListQuerySchema = external_exports.object({
|
|
40355
|
-
agentId: repeatable().optional().describe("Filter by agent id; repeat for a set."),
|
|
40356
|
-
flowId: repeatable().optional().describe("Filter by flow id; repeat for a set."),
|
|
40357
|
-
conversationId: external_exports.string().optional().describe("Filter by conversation id."),
|
|
40358
|
-
surfaceId: external_exports.string().optional().describe("Filter by surface id."),
|
|
40359
|
-
surfaceType: external_exports.string().optional().describe("Filter by surface family."),
|
|
40360
|
-
recordId: external_exports.string().optional().describe("Filter by record id."),
|
|
40361
|
-
batchExecutionId: repeatable().optional().describe("Filter by batch id; repeat for a set."),
|
|
40362
|
-
parentExecutionId: external_exports.string().optional().describe("Runs spawned by this execution."),
|
|
40363
|
-
rootExecutionId: external_exports.string().optional().describe("Runs in this execution tree."),
|
|
40364
|
-
executionId: repeatable().optional().describe(`Read specific runs by id; at most ${MAX_RUN_LIST_IDS} per request.`),
|
|
40365
|
-
source: external_exports.enum(RUN_SOURCES).optional().describe("Filter by producing lane."),
|
|
40366
|
-
status: runStatusFilterSchema.optional().describe(RUN_STATUS_FILTER_MESSAGE),
|
|
40367
|
-
from: external_exports.string().optional().describe("Window start (ISO 8601). Defaults to 24 hours ago."),
|
|
40368
|
-
to: external_exports.string().optional().describe("Window end (ISO 8601). Defaults to now."),
|
|
40369
|
-
view: external_exports.enum(RUN_LIST_VIEWS).optional().describe(
|
|
40370
|
-
runListCompactOmitSentence()
|
|
40371
|
-
),
|
|
40372
|
-
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."),
|
|
40373
|
-
limit: external_exports.string().optional().describe(`Page size, at most ${MAX_RUN_LIST_LIMIT}.`),
|
|
40374
|
-
cursor: external_exports.string().optional().describe("Keyset cursor from a previous page.")
|
|
40375
|
-
});
|
|
40376
|
-
var SCHEDULE_RUN_LINK_KINDS = ["run", "records", "none"];
|
|
40377
|
-
var scheduleRunLinkSchema = external_exports.object({
|
|
40378
|
-
kind: external_exports.enum(SCHEDULE_RUN_LINK_KINDS).describe(
|
|
40379
|
-
"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."
|
|
40380
|
-
),
|
|
40381
|
-
executionId: external_exports.string().nullable().describe(
|
|
40382
|
-
"The RUNTIME execution id, which is what GET /v1/runs/{executionId} keys on. Null unless kind is run."
|
|
40383
|
-
),
|
|
40384
|
-
agentExecutionRowId: external_exports.string().nullable().describe(
|
|
40385
|
-
"The agent_executions ROW id the scheduled run stored. Provenance only: a different id space from executionId, and never a /v1/runs key."
|
|
40386
|
-
),
|
|
40387
|
-
batchExecutionId: external_exports.string().nullable().describe("The batch whose per-record runs are GET /v1/runs?batchExecutionId=.")
|
|
40388
|
-
});
|
|
40389
40394
|
|
|
40390
40395
|
// src/config/effective-context.ts
|
|
40391
40396
|
init_credential_store();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@runtypelabs/cli",
|
|
3
|
-
"version": "2.40.
|
|
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.
|
|
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.57.
|
|
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",
|