@runtypelabs/cli 2.47.8 → 2.47.9
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 +132 -31
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -20,6 +20,7 @@ import { fileURLToPath, pathToFileURL } from "node:url";
|
|
|
20
20
|
import readline from "readline";
|
|
21
21
|
import { ErrorDisplay, Spinner, StatusBar, StreamOutput, renderMarkdownToTerminal, theme } from "@runtypelabs/ink-components";
|
|
22
22
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
23
|
+
import { access, chmod, copyFile, mkdir, open as open$1, readFile, realpath, rename, rm, stat, writeFile } from "node:fs/promises";
|
|
23
24
|
import TextInput from "ink-text-input";
|
|
24
25
|
import SelectInput from "ink-select-input";
|
|
25
26
|
import { execSync, spawn, spawnSync } from "node:child_process";
|
|
@@ -31,7 +32,6 @@ import { AnimatedVariant, LoadingAnimation, StartupGridIconCompactLightInverted
|
|
|
31
32
|
import { createJiti } from "jiti";
|
|
32
33
|
import micromatch from "micromatch";
|
|
33
34
|
import { parse } from "yaml";
|
|
34
|
-
import { access, chmod, copyFile, mkdir, open as open$1, readFile, realpath, rename, rm, stat, writeFile } from "node:fs/promises";
|
|
35
35
|
import { execFileSync, spawn as spawn$1 } from "child_process";
|
|
36
36
|
import { createServer } from "node:http";
|
|
37
37
|
import { createServer as createServer$1 } from "node:net";
|
|
@@ -11528,7 +11528,7 @@ function isDataConnectionToolId(toolId) {
|
|
|
11528
11528
|
return toolId.startsWith("dc:");
|
|
11529
11529
|
}
|
|
11530
11530
|
//#endregion
|
|
11531
|
-
//#region ../shared/dist/chunk-
|
|
11531
|
+
//#region ../shared/dist/chunk-InaIcoUA.mjs
|
|
11532
11532
|
/**
|
|
11533
11533
|
* Maps model families to provider-specific model IDs.
|
|
11534
11534
|
* Use for routing: family + provider → exact model ID
|
|
@@ -11551,6 +11551,11 @@ const MODEL_FAMILY_PROVIDER_IDS = {
|
|
|
11551
11551
|
},
|
|
11552
11552
|
"claude-haiku-4-5-20251001": { "anthropic": "claude-haiku-4-5-20251001" },
|
|
11553
11553
|
"claude-haiku-4.5": { "vercel": "anthropic/claude-haiku-4.5" },
|
|
11554
|
+
"claude-haiku-5-5": {
|
|
11555
|
+
"anthropic": "claude-haiku-5-5",
|
|
11556
|
+
"vercel": "anthropic/claude-haiku-5.5"
|
|
11557
|
+
},
|
|
11558
|
+
"claude-haiku-5.5": { "vercel": "anthropic/claude-haiku-5.5" },
|
|
11554
11559
|
"claude-opus-4": { "vercel": "anthropic/claude-opus-4" },
|
|
11555
11560
|
"claude-opus-4-5": {
|
|
11556
11561
|
"anthropic": "claude-opus-4-5-20251101",
|
|
@@ -11613,12 +11618,14 @@ const MODEL_FAMILY_PROVIDER_IDS = {
|
|
|
11613
11618
|
"deep-research-max-preview-04-2026": { "google": "deep-research-max-preview-04-2026" },
|
|
11614
11619
|
"deep-research-preview-04-2026": { "google": "deep-research-preview-04-2026" },
|
|
11615
11620
|
"deepseek-v4-1-flash": { "vercel": "deepseek/deepseek-v4.1-flash" },
|
|
11621
|
+
"deepseek-v4-1-flash-fast": { "vercel": "deepseek/deepseek-v4.1-flash-fast" },
|
|
11616
11622
|
"deepseek-v4-flash": { "vercel": "deepseek/deepseek-v4-flash" },
|
|
11617
11623
|
"deepseek-v4-flash-0731": { "vercel": "deepseek/deepseek-v4-flash-0731" },
|
|
11618
11624
|
"deepseek-v4-flash-vision-exp": { "vercel": "deepseek/deepseek-v4-flash-vision-exp" },
|
|
11619
11625
|
"deepseek-v4-pro": { "vercel": "deepseek/deepseek-v4-pro" },
|
|
11620
11626
|
"deepseek-v4-pro-0813": { "vercel": "deepseek/deepseek-v4-pro-0813" },
|
|
11621
11627
|
"deepseek-v4.1-flash": { "vercel": "deepseek/deepseek-v4.1-flash" },
|
|
11628
|
+
"deepseek-v4.1-flash-fast": { "vercel": "deepseek/deepseek-v4.1-flash-fast" },
|
|
11622
11629
|
"ember-1": { "vercel": "fireworks/ember-1" },
|
|
11623
11630
|
"fugu-max": { "vercel": "sakana/fugu-max" },
|
|
11624
11631
|
"fugu-ultra": { "vercel": "sakana/fugu-ultra-v2" },
|
|
@@ -11746,6 +11753,8 @@ const MODEL_FAMILY_PROVIDER_IDS = {
|
|
|
11746
11753
|
"gemini-3.8-live-extended-thinking": { "vercel": "google/gemini-3.8-live-extended-thinking" },
|
|
11747
11754
|
"gemini-embedding-001": { "google": "gemini-embedding-001" },
|
|
11748
11755
|
"gemini-embedding-2": { "google": "gemini-embedding-2" },
|
|
11756
|
+
"gemini-nano-banana-2-1": { "vercel": "google/gemini-nano-banana-2.1" },
|
|
11757
|
+
"gemini-nano-banana-2.1": { "vercel": "google/gemini-nano-banana-2.1" },
|
|
11749
11758
|
"gemini-omni-flash": { "vercel": "google/gemini-omni-flash-preview" },
|
|
11750
11759
|
"gemini-omni-flash-preview": { "vercel": "google/gemini-omni-flash-preview" },
|
|
11751
11760
|
"gemma-4-26b-a4b-it": {
|
|
@@ -12056,11 +12065,10 @@ const MODEL_FAMILY_PROVIDER_IDS = {
|
|
|
12056
12065
|
"inkling": { "vercel": "thinkingmachines/inkling" },
|
|
12057
12066
|
"inkling-small": { "vercel": "thinkingmachines/inkling-small" },
|
|
12058
12067
|
"interfaze-beta": { "vercel": "interfaze/interfaze-beta" },
|
|
12059
|
-
"kimi-k2": { "vercel": "moonshotai/kimi-k2
|
|
12068
|
+
"kimi-k2": { "vercel": "moonshotai/kimi-k2" },
|
|
12060
12069
|
"kimi-k2-6": { "vercel": "moonshotai/kimi-k2.6" },
|
|
12061
12070
|
"kimi-k2-7-code": { "vercel": "moonshotai/kimi-k2.7-code" },
|
|
12062
12071
|
"kimi-k2-7-code-highspeed": { "vercel": "moonshotai/kimi-k2.7-code-highspeed" },
|
|
12063
|
-
"kimi-k2-thinking": { "vercel": "moonshotai/kimi-k2-thinking" },
|
|
12064
12072
|
"kimi-k2.6": { "vercel": "moonshotai/kimi-k2.6" },
|
|
12065
12073
|
"kimi-k2.7-code": { "vercel": "moonshotai/kimi-k2.7-code" },
|
|
12066
12074
|
"kimi-k2.7-code-highspeed": { "vercel": "moonshotai/kimi-k2.7-code-highspeed" },
|
|
@@ -12072,13 +12080,11 @@ const MODEL_FAMILY_PROVIDER_IDS = {
|
|
|
12072
12080
|
"laguna-s-2.1-free": { "vercel": "poolside/laguna-s-2.1-free" },
|
|
12073
12081
|
"ling-3-0-flash": { "vercel": "inclusionai/ling-3.0-flash" },
|
|
12074
12082
|
"ling-3-0-flash-sante": { "vercel": "inclusionai/ling-3.0-flash-sante" },
|
|
12075
|
-
"ling-3-0-flash-sante-free": { "vercel": "inclusionai/ling-3.0-flash-sante-free" },
|
|
12076
12083
|
"ling-3-0-flash-vl": { "vercel": "inclusionai/ling-3.0-flash-vl" },
|
|
12077
12084
|
"ling-3-1-flash": { "vercel": "inclusionai/ling-3.1-flash" },
|
|
12078
12085
|
"ling-3-1-flash-free": { "vercel": "inclusionai/ling-3.1-flash-free" },
|
|
12079
12086
|
"ling-3.0-flash": { "vercel": "inclusionai/ling-3.0-flash" },
|
|
12080
12087
|
"ling-3.0-flash-sante": { "vercel": "inclusionai/ling-3.0-flash-sante" },
|
|
12081
|
-
"ling-3.0-flash-sante-free": { "vercel": "inclusionai/ling-3.0-flash-sante-free" },
|
|
12082
12088
|
"ling-3.0-flash-vl": { "vercel": "inclusionai/ling-3.0-flash-vl" },
|
|
12083
12089
|
"ling-3.1-flash": { "vercel": "inclusionai/ling-3.1-flash" },
|
|
12084
12090
|
"ling-3.1-flash-free": { "vercel": "inclusionai/ling-3.1-flash-free" },
|
|
@@ -12117,6 +12123,7 @@ const MODEL_FAMILY_PROVIDER_IDS = {
|
|
|
12117
12123
|
"ministral-3b": { "vercel": "mistral/ministral-3b" },
|
|
12118
12124
|
"ministral-8b": { "vercel": "mistral/ministral-8b" },
|
|
12119
12125
|
"mistral-large-3": { "vercel": "mistral/mistral-large-3" },
|
|
12126
|
+
"mistral-large-4": { "vercel": "mistral/mistral-large-4" },
|
|
12120
12127
|
"mistral-medium-3-5": { "vercel": "mistral/mistral-medium-3.5" },
|
|
12121
12128
|
"mistral-medium-3.5": { "vercel": "mistral/mistral-medium-3.5" },
|
|
12122
12129
|
"mistral-small": { "vercel": "mistral/mistral-small" },
|
|
@@ -12228,9 +12235,7 @@ const MODEL_FAMILY_PROVIDER_IDS = {
|
|
|
12228
12235
|
"seed-2-1-turbo": { "vercel": "bytedance/seed-2.1-turbo" },
|
|
12229
12236
|
"seed-2.1-turbo": { "vercel": "bytedance/seed-2.1-turbo" },
|
|
12230
12237
|
"sonar": { "vercel": "perplexity/sonar" },
|
|
12231
|
-
"step-3-5-flash": { "vercel": "stepfun/step-3.5-flash" },
|
|
12232
12238
|
"step-3-7-flash": { "vercel": "stepfun/step-3.7-flash" },
|
|
12233
|
-
"step-3.5-flash": { "vercel": "stepfun/step-3.5-flash" },
|
|
12234
12239
|
"step-3.7-flash": { "vercel": "stepfun/step-3.7-flash" },
|
|
12235
12240
|
"step-5": { "vercel": "stepfun/step-5-preview" },
|
|
12236
12241
|
"step-5-preview": { "vercel": "stepfun/step-5-preview" },
|
|
@@ -12322,7 +12327,10 @@ const QWEN_3_8_27B_IDS = [
|
|
|
12322
12327
|
"claude-sonnet-5",
|
|
12323
12328
|
"anthropic/claude-sonnet-5",
|
|
12324
12329
|
"claude-haiku-4.5",
|
|
12325
|
-
"anthropic/claude-haiku-4.5"
|
|
12330
|
+
"anthropic/claude-haiku-4.5",
|
|
12331
|
+
"claude-haiku-5-5",
|
|
12332
|
+
"claude-haiku-5.5",
|
|
12333
|
+
"anthropic/claude-haiku-5.5"
|
|
12326
12334
|
]) }), {
|
|
12327
12335
|
...workersAiPrimary(DEEPSEEK_V4_FLASH_IDS),
|
|
12328
12336
|
...vercelPrimary(QWEN_3_8_27B_IDS, ["mixlayer"]),
|
|
@@ -12385,6 +12393,14 @@ const MANUAL_PROVIDER_MAP_OVERRIDES = {
|
|
|
12385
12393
|
"vercel": "anthropic/claude-haiku-4.5",
|
|
12386
12394
|
"anthropic": "claude-haiku-4-5-20251001"
|
|
12387
12395
|
},
|
|
12396
|
+
"claude-haiku-5.5": {
|
|
12397
|
+
"vercel": "anthropic/claude-haiku-5.5",
|
|
12398
|
+
"anthropic": "claude-haiku-5-5"
|
|
12399
|
+
},
|
|
12400
|
+
"anthropic/claude-haiku-5.5": {
|
|
12401
|
+
"vercel": "anthropic/claude-haiku-5.5",
|
|
12402
|
+
"anthropic": "claude-haiku-5-5"
|
|
12403
|
+
},
|
|
12388
12404
|
...workersAiAliases("@cf/zai-org/glm-5.3-flash", GLM_5_3_FLASH_IDS),
|
|
12389
12405
|
"qwen/qwen3.8-27b": {
|
|
12390
12406
|
"mixlayer": "qwen/qwen3.8-27b",
|
|
@@ -12495,7 +12511,7 @@ const CREATOR_TO_PROVIDER = {
|
|
|
12495
12511
|
"unknown": "openai"
|
|
12496
12512
|
};
|
|
12497
12513
|
//#endregion
|
|
12498
|
-
//#region ../shared/dist/chunk-
|
|
12514
|
+
//#region ../shared/dist/chunk-DVTXa1NO.mjs
|
|
12499
12515
|
/**
|
|
12500
12516
|
* The reserved model-facing name of the agent state write tool
|
|
12501
12517
|
* (`packages/runtime/src/engine/state-write-tool.ts`). The model is told to call
|
|
@@ -13005,6 +13021,14 @@ strictObject({
|
|
|
13005
13021
|
required: array(fieldNameSchema).optional(),
|
|
13006
13022
|
additionalProperties: boolean().optional()
|
|
13007
13023
|
}).superRefine((schema, ctx) => addSemanticIssues(schema, ctx));
|
|
13024
|
+
//#endregion
|
|
13025
|
+
//#region ../shared/dist/chunk-DLCjOb1c.mjs
|
|
13026
|
+
/** The Tenancy Assurance Levels, in the order `tenancyAssuranceLevelSchema` is built from. */
|
|
13027
|
+
const TENANCY_ASSURANCE_LEVELS = [
|
|
13028
|
+
"anonymous",
|
|
13029
|
+
"asserted",
|
|
13030
|
+
"verified"
|
|
13031
|
+
];
|
|
13008
13032
|
const FLOW_STEP_TYPES = ["prompt", ...[
|
|
13009
13033
|
"crawl",
|
|
13010
13034
|
"fetch-url",
|
|
@@ -13737,19 +13761,68 @@ object({
|
|
|
13737
13761
|
model: string().min(1).optional(),
|
|
13738
13762
|
calibration: judgmentCalibrationSchema.optional()
|
|
13739
13763
|
});
|
|
13740
|
-
Object.freeze({
|
|
13741
|
-
|
|
13742
|
-
|
|
13743
|
-
|
|
13744
|
-
|
|
13745
|
-
|
|
13746
|
-
|
|
13747
|
-
|
|
13748
|
-
|
|
13749
|
-
|
|
13750
|
-
|
|
13764
|
+
Object.freeze({
|
|
13765
|
+
"convaiinnovations/laya": Object.freeze({
|
|
13766
|
+
id: "convaiinnovations/laya",
|
|
13767
|
+
name: "Laya",
|
|
13768
|
+
description: "Laya is Convai Innovations’ System One evaluation model for fast, structured decisions. It evaluates shared state against choice, score, and yes/no questions and returns typed answers with probabilities in a single forward pass. It supports classification, routing, guardrail checks, and rubric-based assessment without generating free-form text.",
|
|
13769
|
+
contextWindow: 8192,
|
|
13770
|
+
supportedSpecifications: Object.freeze(["v4"]),
|
|
13771
|
+
pricing: Object.freeze({
|
|
13772
|
+
inputPerToken: "0",
|
|
13773
|
+
outputPerToken: "0",
|
|
13774
|
+
inputPer1MTokens: 0,
|
|
13775
|
+
outputPer1MTokens: 0
|
|
13776
|
+
})
|
|
13777
|
+
}),
|
|
13778
|
+
"convaiinnovations/laya-free": Object.freeze({
|
|
13779
|
+
id: "convaiinnovations/laya-free",
|
|
13780
|
+
name: "Laya (Free)",
|
|
13781
|
+
description: "Laya is Convai Innovations’ System One evaluation model for fast, structured decisions. It evaluates shared state against choice, score, and yes/no questions and returns typed answers with probabilities in a single forward pass. It supports classification, routing, guardrail checks, and rubric-based assessment without generating free-form text.",
|
|
13782
|
+
contextWindow: 8192,
|
|
13783
|
+
supportedSpecifications: Object.freeze(["v4"]),
|
|
13784
|
+
pricing: Object.freeze({
|
|
13785
|
+
inputPerToken: "0",
|
|
13786
|
+
outputPerToken: "0",
|
|
13787
|
+
inputPer1MTokens: 0,
|
|
13788
|
+
outputPer1MTokens: 0
|
|
13789
|
+
})
|
|
13790
|
+
}),
|
|
13791
|
+
"liquid/d1": Object.freeze({
|
|
13792
|
+
id: "liquid/d1",
|
|
13793
|
+
name: "Liquid d1",
|
|
13794
|
+
description: "Liquid d1 is a decision model for classification, routing, and scoring. It evaluates shared state against typed Choice, Score, and yes/no questions and returns structured answers with calibrated probabilities through the TypeSafe-compatible System One API.",
|
|
13795
|
+
contextWindow: 65536,
|
|
13796
|
+
supportedSpecifications: Object.freeze(["v4"]),
|
|
13797
|
+
pricing: Object.freeze({
|
|
13798
|
+
inputPerToken: "0.00000004",
|
|
13799
|
+
outputPerToken: "0",
|
|
13800
|
+
inputPer1MTokens: .04,
|
|
13801
|
+
outputPer1MTokens: 0
|
|
13802
|
+
})
|
|
13803
|
+
}),
|
|
13804
|
+
"openai/gpt-6-luna-decisions": Object.freeze({
|
|
13805
|
+
id: "openai/gpt-6-luna-decisions",
|
|
13806
|
+
name: "GPT-6 Luna Decisions",
|
|
13807
|
+
description: "GPT-6 Luna Decisions evaluates classification and scoring questions against shared text and image input using OpenAI's Decisions API. It supports predicate, choice, and score questions with probabilities and confidence values.",
|
|
13808
|
+
contextWindow: 105e4,
|
|
13809
|
+
supportedSpecifications: Object.freeze(["v4"]),
|
|
13810
|
+
pricing: null
|
|
13811
|
+
}),
|
|
13812
|
+
"typesafe-ai/jev": Object.freeze({
|
|
13813
|
+
id: "typesafe-ai/jev",
|
|
13814
|
+
name: "Jev",
|
|
13815
|
+
description: "TypeSafe AI System One decision model. Accepts shared state and typed questions, returning choices, scores, and boolean probabilities. Limits: 64,000 tokens total per request; 32,000 tokens for the state plus the longest question. No streaming or output-token limit.",
|
|
13816
|
+
contextWindow: 32e3,
|
|
13817
|
+
supportedSpecifications: Object.freeze(["v4"]),
|
|
13818
|
+
pricing: Object.freeze({
|
|
13819
|
+
inputPerToken: "0.000000042",
|
|
13820
|
+
outputPerToken: "0",
|
|
13821
|
+
inputPer1MTokens: .042,
|
|
13822
|
+
outputPer1MTokens: 0
|
|
13823
|
+
})
|
|
13751
13824
|
})
|
|
13752
|
-
})
|
|
13825
|
+
});
|
|
13753
13826
|
//#endregion
|
|
13754
13827
|
//#region ../shared/dist/chunk-CIi5jW2t.mjs
|
|
13755
13828
|
/**
|
|
@@ -15266,11 +15339,7 @@ const agentStateChannelSchema = object({
|
|
|
15266
15339
|
* Tenant vs End User). The vocabulary the trust boundary grades into and a
|
|
15267
15340
|
* strategy's assurance floor is expressed in. `CONTEXT.md` → "Assurance level".
|
|
15268
15341
|
*/
|
|
15269
|
-
const tenancyAssuranceLevelSchema = _enum(
|
|
15270
|
-
"anonymous",
|
|
15271
|
-
"asserted",
|
|
15272
|
-
"verified"
|
|
15273
|
-
]);
|
|
15342
|
+
const tenancyAssuranceLevelSchema = _enum(TENANCY_ASSURANCE_LEVELS);
|
|
15274
15343
|
/**
|
|
15275
15344
|
* Named archetype preset for a Tenancy Strategy (ADR 0012): the elicitable, auditable unit.
|
|
15276
15345
|
* internal: Builder-Org internal tooling, product-scoped data, no tenant/end-user required.
|
|
@@ -23079,6 +23148,7 @@ const agentExternalConfigSchema = object({
|
|
|
23079
23148
|
auth: record(string(), any()).optional(),
|
|
23080
23149
|
timeout: number$1().positive().optional(),
|
|
23081
23150
|
retryCount: number$1().int().nonnegative().optional(),
|
|
23151
|
+
identityAssertion: boolean().optional(),
|
|
23082
23152
|
skillOrchestration: union([_enum(["delegate", "managed"]), boolean()]).optional()
|
|
23083
23153
|
});
|
|
23084
23154
|
/**
|
|
@@ -32832,6 +32902,32 @@ integrationsCommand.command("get <id>").description("Get integration details, in
|
|
|
32832
32902
|
});
|
|
32833
32903
|
//#endregion
|
|
32834
32904
|
//#region src/commands/surfaces.ts
|
|
32905
|
+
const DELIVERY_ID_PATTERN = /^[A-Za-z0-9._:-]{1,128}$/;
|
|
32906
|
+
async function readStdin$1() {
|
|
32907
|
+
let value = "";
|
|
32908
|
+
process.stdin.setEncoding("utf8");
|
|
32909
|
+
for await (const chunk of process.stdin) value += chunk;
|
|
32910
|
+
return value;
|
|
32911
|
+
}
|
|
32912
|
+
/** The `--payload` object, read from a file or from stdin when the source is `-`. */
|
|
32913
|
+
async function readPayloadObject(source) {
|
|
32914
|
+
const label = source === "-" ? "stdin" : source;
|
|
32915
|
+
const raw = source === "-" ? await readStdin$1() : await readFile(source, "utf8");
|
|
32916
|
+
let parsed;
|
|
32917
|
+
try {
|
|
32918
|
+
parsed = JSON.parse(raw);
|
|
32919
|
+
} catch {
|
|
32920
|
+
throw new Error(`--payload: invalid JSON in ${label}`);
|
|
32921
|
+
}
|
|
32922
|
+
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) throw new Error(`--payload: ${label} must contain a JSON object`);
|
|
32923
|
+
return parsed;
|
|
32924
|
+
}
|
|
32925
|
+
/** `Attempt 1: HTTP 202, run exec_1 (route: event_route opened)` */
|
|
32926
|
+
function formatDeliveryAttempt(attempt) {
|
|
32927
|
+
const outcome = attempt.deduplicated ? ", deduplicated" : attempt.executionId ? `, run ${attempt.executionId}` : "";
|
|
32928
|
+
const route = attempt.route ? ` (route: ${[attempt.route.matchedBy, attempt.route.pattern].filter(Boolean).join(" ")})` : "";
|
|
32929
|
+
return `Attempt ${attempt.attempt}: HTTP ${attempt.status}${outcome}${route}`;
|
|
32930
|
+
}
|
|
32835
32931
|
function parsePositiveInteger$1(value, option) {
|
|
32836
32932
|
const parsed = Number(value);
|
|
32837
32933
|
if (!Number.isInteger(parsed) || parsed < 1) throw new Error(`${option} must be a positive integer`);
|
|
@@ -33076,19 +33172,23 @@ surfacesCommand.command("get <id>").description("Get surface details including i
|
|
|
33076
33172
|
const { waitUntilExit } = render(React.createElement(App));
|
|
33077
33173
|
await waitUntilExit();
|
|
33078
33174
|
});
|
|
33079
|
-
surfacesCommand.command("test <id>").description("Send a provider fixture through a surface’s real ingress").addOption(new Option("--product <productId>", "Deprecated; surface IDs resolve their product").hideHelp()).requiredOption("--fixture <fixture>", "Fixture name, such as github.pull_request.opened or github.pull_request.merged_plan").requiredOption("--repo <owner/repository>", "GitHub repository in owner/repository format").requiredOption("--pr <number>", "Pull request number").option("--repeat <number>", "Deliver the same provider event more than once", "1").option("--planning-path <path>", "Planning-document directory for merged-plan fixtures").option("--json", "Output as JSON").action(async (id, options) => {
|
|
33175
|
+
surfacesCommand.command("test <id>").description("Send a provider fixture through a surface’s real ingress").addOption(new Option("--product <productId>", "Deprecated; surface IDs resolve their product").hideHelp()).requiredOption("--fixture <fixture>", "Fixture name, such as github.pull_request.opened or github.pull_request.merged_plan").requiredOption("--repo <owner/repository>", "GitHub repository in owner/repository format").requiredOption("--pr <number>", "Pull request number").option("--repeat <number>", "Deliver the same provider event more than once", "1").option("--planning-path <path>", "Planning-document directory for merged-plan fixtures").option("--delivery-id <id>", "Reuse a previous delivery ID (X-GitHub-Delivery), to check the surface handles a repeat once").option("--payload <file>", "Send and sign this JSON object instead of the built fixture; - reads it from stdin").option("--json", "Output as JSON").action(async (id, options) => {
|
|
33080
33176
|
const apiKey = await ensureAuth();
|
|
33081
33177
|
if (!apiKey) return;
|
|
33082
33178
|
try {
|
|
33083
33179
|
const pullRequest = parsePositiveInteger$1(options.pr, "--pr");
|
|
33084
33180
|
const repeat = parsePositiveInteger$1(options.repeat, "--repeat");
|
|
33085
33181
|
if (repeat > 3) throw new Error("--repeat must not exceed 3");
|
|
33182
|
+
if (options.deliveryId !== void 0 && !DELIVERY_ID_PATTERN.test(options.deliveryId)) throw new Error("--delivery-id must be 1-128 letters, digits, dots, underscores, colons or hyphens");
|
|
33183
|
+
const payload = options.payload !== void 0 ? await readPayloadObject(options.payload) : void 0;
|
|
33086
33184
|
const result = await createCliClient(apiKey).post(`/surfaces/${encodeURIComponent(id)}/test-deliveries`, {
|
|
33087
33185
|
fixture: options.fixture,
|
|
33088
33186
|
repository: options.repo,
|
|
33089
33187
|
pullRequest,
|
|
33090
33188
|
repeat,
|
|
33091
|
-
...options.planningPath ? { planningPath: options.planningPath } : {}
|
|
33189
|
+
...options.planningPath ? { planningPath: options.planningPath } : {},
|
|
33190
|
+
...options.deliveryId ? { deliveryId: options.deliveryId } : {},
|
|
33191
|
+
...payload ? { payload } : {}
|
|
33092
33192
|
});
|
|
33093
33193
|
if (options.json) {
|
|
33094
33194
|
printJson(result);
|
|
@@ -33099,7 +33199,7 @@ surfacesCommand.command("test <id>").description("Send a provider fixture throug
|
|
|
33099
33199
|
console.log(` Fixture: ${result.fixture}`);
|
|
33100
33200
|
console.log(` Source: ${result.repository}#${result.pullRequest}`);
|
|
33101
33201
|
console.log(` Delivery: ${result.deliveryId}`);
|
|
33102
|
-
for (const attempt of result.attempts) console.log(`
|
|
33202
|
+
for (const attempt of result.attempts) console.log(` ${formatDeliveryAttempt(attempt)}`);
|
|
33103
33203
|
} catch (error) {
|
|
33104
33204
|
const message = error instanceof Error ? error.message : "Unknown error";
|
|
33105
33205
|
console.error(chalk.red(`Failed to test surface: ${message}`));
|
|
@@ -58293,7 +58393,8 @@ const FORWARDED_REQUEST_HEADERS = /* @__PURE__ */ new Set([
|
|
|
58293
58393
|
"authorization",
|
|
58294
58394
|
"a2a-version",
|
|
58295
58395
|
"content-type",
|
|
58296
|
-
"x-api-key"
|
|
58396
|
+
"x-api-key",
|
|
58397
|
+
"x-runtype-identity"
|
|
58297
58398
|
]);
|
|
58298
58399
|
const BLOCKED_AUTH_HEADERS = /* @__PURE__ */ new Set([
|
|
58299
58400
|
"host",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@runtypelabs/cli",
|
|
3
|
-
"version": "2.47.
|
|
3
|
+
"version": "2.47.9",
|
|
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.10",
|
|
14
|
-
"@runtypelabs/sdk": "10.13.
|
|
14
|
+
"@runtypelabs/sdk": "10.13.7",
|
|
15
15
|
"@runtypelabs/terminal-animations": "0.2.4",
|
|
16
16
|
"add-mcp": "2.0.0",
|
|
17
17
|
"chalk": "^5.3.0",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@modelcontextprotocol/server": "2.0.0",
|
|
36
|
-
"@runtypelabs/device-bridge": "0.2.
|
|
36
|
+
"@runtypelabs/device-bridge": "0.2.2",
|
|
37
37
|
"@runtypelabs/persona": "4.26.0",
|
|
38
|
-
"@runtypelabs/shared": "3.
|
|
38
|
+
"@runtypelabs/shared": "3.78.0",
|
|
39
39
|
"@types/express": "^5.0.6",
|
|
40
40
|
"@types/micromatch": "^4.0.9",
|
|
41
41
|
"@types/node": "^25.3.3",
|
|
@@ -88,6 +88,6 @@
|
|
|
88
88
|
"test:watch": "vitest watch",
|
|
89
89
|
"test:coverage": "vitest run --coverage",
|
|
90
90
|
"test:ui": "vitest --ui",
|
|
91
|
-
"lint": "
|
|
91
|
+
"lint": "oxlint ."
|
|
92
92
|
}
|
|
93
93
|
}
|