@runtypelabs/cli 2.53.1 → 2.53.3
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 +144 -199
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -10675,6 +10675,26 @@ function parseRecordCollectionSchema(input) {
|
|
|
10675
10675
|
}))
|
|
10676
10676
|
};
|
|
10677
10677
|
}
|
|
10678
|
+
//#endregion
|
|
10679
|
+
//#region ../shared/dist/browser-domain-policy.mjs
|
|
10680
|
+
function canonicalHostname(hostname) {
|
|
10681
|
+
let end = hostname.length;
|
|
10682
|
+
while (end > 0 && hostname.charCodeAt(end - 1) === 46) end--;
|
|
10683
|
+
return hostname.slice(0, end).toLowerCase();
|
|
10684
|
+
}
|
|
10685
|
+
const DOMAIN_LABEL = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/;
|
|
10686
|
+
const MAX_HOSTNAME_LENGTH = 253;
|
|
10687
|
+
/** Trim, lowercase and strip trailing dots, as Stagehand canonicalizes both patterns and hostnames. */
|
|
10688
|
+
function canonicalBrowserDomainPattern(pattern) {
|
|
10689
|
+
return canonicalHostname(pattern.trim());
|
|
10690
|
+
}
|
|
10691
|
+
/** Exactly what Stagehand's `normalizeDomainPattern` accepts, for an already-canonical pattern. */
|
|
10692
|
+
function isValidBrowserDomainPattern(pattern) {
|
|
10693
|
+
const hostname = pattern.startsWith("*.") ? pattern.slice(2) : pattern;
|
|
10694
|
+
if (!hostname || hostname.length > MAX_HOSTNAME_LENGTH) return false;
|
|
10695
|
+
const labels = hostname.split(".");
|
|
10696
|
+
return labels.length >= 2 && labels.every((label) => DOMAIN_LABEL.test(label));
|
|
10697
|
+
}
|
|
10678
10698
|
/** Compaction strategies; the config schema's zod enum derives from this tuple so the two cannot drift. */
|
|
10679
10699
|
const COMPACTION_STRATEGIES = [
|
|
10680
10700
|
"auto",
|
|
@@ -10796,7 +10816,9 @@ object({
|
|
|
10796
10816
|
schemaTokens: number$1().int().min(0).optional(),
|
|
10797
10817
|
passes: number$1().int().min(0).optional()
|
|
10798
10818
|
});
|
|
10799
|
-
|
|
10819
|
+
//#endregion
|
|
10820
|
+
//#region ../shared/dist/chunk-BQYclXzM.mjs
|
|
10821
|
+
const CONTEXT_STEP_TYPES = [
|
|
10800
10822
|
"crawl",
|
|
10801
10823
|
"fetch-url",
|
|
10802
10824
|
"retrieve-record",
|
|
@@ -10827,7 +10849,8 @@ const FLOW_STEP_TYPES = ["prompt", ...[
|
|
|
10827
10849
|
"recall-memory",
|
|
10828
10850
|
"memory-summary",
|
|
10829
10851
|
"extract"
|
|
10830
|
-
]
|
|
10852
|
+
];
|
|
10853
|
+
const FLOW_STEP_TYPES = ["prompt", ...CONTEXT_STEP_TYPES];
|
|
10831
10854
|
//#endregion
|
|
10832
10855
|
//#region ../shared/dist/durable-poll-limits.mjs
|
|
10833
10856
|
/**
|
|
@@ -11520,7 +11543,7 @@ object({
|
|
|
11520
11543
|
importedAt: string().datetime({ offset: true }).optional()
|
|
11521
11544
|
});
|
|
11522
11545
|
//#endregion
|
|
11523
|
-
//#region ../shared/dist/chunk-
|
|
11546
|
+
//#region ../shared/dist/chunk-DPqK6XE9.mjs
|
|
11524
11547
|
const voiceInterruptionModeSchema = _enum([
|
|
11525
11548
|
"none",
|
|
11526
11549
|
"cancel",
|
|
@@ -12520,6 +12543,53 @@ function validateBrowserToolConfigsAuth(toolConfigs, ctx) {
|
|
|
12520
12543
|
});
|
|
12521
12544
|
});
|
|
12522
12545
|
}
|
|
12546
|
+
const BROWSER_DOMAIN_POLICY_MESSAGES = {
|
|
12547
|
+
notObject: "\"domainPolicy\" must be an object with \"allowedDomains\" and/or \"blockedDomains\" arrays.",
|
|
12548
|
+
empty: "\"domainPolicy\" must list at least one domain in \"allowedDomains\" or \"blockedDomains\".",
|
|
12549
|
+
listEmpty: "\"domainPolicy\" lists must not be empty; omit the key instead (an empty list does not mean \"allow nothing\").",
|
|
12550
|
+
patternShape: "\"domainPolicy\" entries must be bare hostnames such as \"example.com\" or \"*.example.com\" (no scheme, port, path or inner wildcard).",
|
|
12551
|
+
patternIp: "\"domainPolicy\" entries must be DNS hostnames, not IP addresses.",
|
|
12552
|
+
allowedTooMany: "\"domainPolicy.allowedDomains\" accepts at most 50 entries (the Browser Run guardrails limit).",
|
|
12553
|
+
noBrowsing: (toolId) => `"domainPolicy" has no effect on ${toolId}, which takes no browsing action; set it on browser:open, and the session keeps it.`
|
|
12554
|
+
};
|
|
12555
|
+
/** Session tools that never load a URL; a policy on them would be accepted and silently do nothing. */
|
|
12556
|
+
const BROWSER_TOOLS_WITHOUT_DOMAIN_POLICY = /* @__PURE__ */ new Set([
|
|
12557
|
+
"browser:session-info",
|
|
12558
|
+
"browser:close",
|
|
12559
|
+
"browser:get_live_view",
|
|
12560
|
+
"browser:request_handoff",
|
|
12561
|
+
"browser:get_handoff_state"
|
|
12562
|
+
]);
|
|
12563
|
+
const domainListSchema = array(string({ error: BROWSER_DOMAIN_POLICY_MESSAGES.patternShape }).transform(canonicalBrowserDomainPattern).refine(isValidBrowserDomainPattern, {
|
|
12564
|
+
message: BROWSER_DOMAIN_POLICY_MESSAGES.patternShape,
|
|
12565
|
+
abort: true
|
|
12566
|
+
}).refine((pattern) => !isIpLiteralHost(pattern.replace(/^\*\./, "")), { message: BROWSER_DOMAIN_POLICY_MESSAGES.patternIp }), { error: BROWSER_DOMAIN_POLICY_MESSAGES.notObject }).min(1, { message: BROWSER_DOMAIN_POLICY_MESSAGES.listEmpty }).transform((patterns) => [...new Set(patterns)]);
|
|
12567
|
+
/** The `domainPolicy` block of a browser tool's config; operator-owned, never set from call arguments. */
|
|
12568
|
+
const browserDomainPolicySchema = strictObject({
|
|
12569
|
+
allowedDomains: domainListSchema.refine((patterns) => patterns.length <= 50, { message: BROWSER_DOMAIN_POLICY_MESSAGES.allowedTooMany }).optional(),
|
|
12570
|
+
blockedDomains: domainListSchema.optional()
|
|
12571
|
+
}, { error: BROWSER_DOMAIN_POLICY_MESSAGES.notObject }).refine((policy) => policy.allowedDomains !== void 0 || policy.blockedDomains !== void 0, { message: BROWSER_DOMAIN_POLICY_MESSAGES.empty });
|
|
12572
|
+
/** Save-time check for every browser tool config that carries a `domainPolicy` block. */
|
|
12573
|
+
function validateBrowserToolConfigsDomainPolicy(toolConfigs, ctx) {
|
|
12574
|
+
Object.entries(toolConfigs).filter(([key]) => isBrowserToolConfigKey(key)).filter(([, config]) => "domainPolicy" in config).forEach(([key, config]) => {
|
|
12575
|
+
const toolId = getBuiltInToolById(parseToolInstanceId(key).baseId)?.id ?? key;
|
|
12576
|
+
if (BROWSER_TOOLS_WITHOUT_DOMAIN_POLICY.has(toolId)) {
|
|
12577
|
+
ctx.addIssue({
|
|
12578
|
+
code: "custom",
|
|
12579
|
+
path: [key, "domainPolicy"],
|
|
12580
|
+
message: BROWSER_DOMAIN_POLICY_MESSAGES.noBrowsing(toolId)
|
|
12581
|
+
});
|
|
12582
|
+
return;
|
|
12583
|
+
}
|
|
12584
|
+
browserDomainPolicySchema.safeParse(config.domainPolicy).error?.issues.slice(0, 1).forEach((issue) => {
|
|
12585
|
+
ctx.addIssue({
|
|
12586
|
+
code: "custom",
|
|
12587
|
+
path: [key, "domainPolicy"],
|
|
12588
|
+
message: issue.message
|
|
12589
|
+
});
|
|
12590
|
+
});
|
|
12591
|
+
});
|
|
12592
|
+
}
|
|
12523
12593
|
/** How a conversation is reduced when it approaches the model's context window. */
|
|
12524
12594
|
const compactionStrategySchema = _enum(COMPACTION_STRATEGIES);
|
|
12525
12595
|
/**
|
|
@@ -12857,7 +12927,7 @@ const agentRuntimeConfigSchema = object({
|
|
|
12857
12927
|
...samplingConfigSchema,
|
|
12858
12928
|
tools: object({
|
|
12859
12929
|
toolIds: array(string()).optional(),
|
|
12860
|
-
toolConfigs: record(string(), record(string(), unknown())).superRefine(validateBrowserToolConfigsAuth).optional(),
|
|
12930
|
+
toolConfigs: record(string(), record(string(), unknown())).superRefine(validateBrowserToolConfigsAuth).superRefine(validateBrowserToolConfigsDomainPolicy).optional(),
|
|
12861
12931
|
runtimeTools: array(object({
|
|
12862
12932
|
name: string(),
|
|
12863
12933
|
description: string(),
|
|
@@ -14586,13 +14656,39 @@ function validateAndNormalizeErrorHandling(value, fieldName, stepType) {
|
|
|
14586
14656
|
}
|
|
14587
14657
|
return normalizeErrorHandling(value);
|
|
14588
14658
|
}
|
|
14589
|
-
/**
|
|
14590
|
-
|
|
14591
|
-
|
|
14592
|
-
|
|
14593
|
-
|
|
14594
|
-
|
|
14595
|
-
|
|
14659
|
+
/** The config normalizer for every step type whose normalized step is just the envelope plus its config. */
|
|
14660
|
+
const CONTEXT_STEP_CONFIG_NORMALIZERS = {
|
|
14661
|
+
"crawl": normalizeCrawlConfig,
|
|
14662
|
+
"fetch-url": normalizeFetchUrlConfig,
|
|
14663
|
+
"get-record": normalizeGetRecordConfig,
|
|
14664
|
+
"list-records": normalizeListRecordsConfig,
|
|
14665
|
+
"api-call": normalizeApiCallConfig,
|
|
14666
|
+
"transform-data": normalizeTransformDataConfig,
|
|
14667
|
+
"template": normalizeTemplateConfig,
|
|
14668
|
+
"conditional": normalizeConditionalConfig,
|
|
14669
|
+
"set-variable": normalizeSetVariableConfig,
|
|
14670
|
+
"upsert-record": normalizeUpsertRecordConfig,
|
|
14671
|
+
"send-email": normalizeSendEmailConfig,
|
|
14672
|
+
"send-event": normalizeSendEventConfig,
|
|
14673
|
+
"send-stream": normalizeSendStreamConfig,
|
|
14674
|
+
"update-record": normalizeUpdateRecordConfig,
|
|
14675
|
+
"search": normalizeSearchConfig,
|
|
14676
|
+
"generate-embedding": normalizeGenerateEmbeddingConfig,
|
|
14677
|
+
"vector-search": normalizeVectorSearchConfig,
|
|
14678
|
+
"paginate-api": normalizePaginateApiConfig,
|
|
14679
|
+
"store-vector": normalizeStoreVectorConfig,
|
|
14680
|
+
"tool-call": normalizeToolCallConfig,
|
|
14681
|
+
"wait-until": normalizeWaitUntilConfig,
|
|
14682
|
+
"execute-agent": normalizeExecuteAgentConfig,
|
|
14683
|
+
"store-asset": normalizeStoreAssetConfig,
|
|
14684
|
+
"generate-pdf": normalizeGeneratePdfConfig,
|
|
14685
|
+
"save-memory": normalizeSaveMemoryConfig,
|
|
14686
|
+
"recall-memory": normalizeRecallMemoryConfig,
|
|
14687
|
+
"memory-summary": normalizeMemorySummaryConfig,
|
|
14688
|
+
"extract": normalizeExtractConfig
|
|
14689
|
+
};
|
|
14690
|
+
/** Envelope validation: a usable id, type, name and order, and a known step type. */
|
|
14691
|
+
function validateContextStepEnvelope(apiStep) {
|
|
14596
14692
|
validateRequired(apiStep.id, "id", apiStep.type || "unknown");
|
|
14597
14693
|
validateRequired(apiStep.type, "type", "step");
|
|
14598
14694
|
validateRequired(apiStep.name, "name", apiStep.type || "unknown");
|
|
@@ -14601,39 +14697,38 @@ function normalizeContextStep(apiStep, options = {}) {
|
|
|
14601
14697
|
validateString(apiStep.type, "type", "step", true);
|
|
14602
14698
|
validateString(apiStep.name, "name", apiStep.type, true);
|
|
14603
14699
|
validateNumber(apiStep.order, "order", apiStep.type, true);
|
|
14604
|
-
|
|
14605
|
-
|
|
14606
|
-
|
|
14607
|
-
|
|
14608
|
-
"
|
|
14609
|
-
|
|
14610
|
-
|
|
14611
|
-
|
|
14612
|
-
|
|
14613
|
-
|
|
14614
|
-
|
|
14615
|
-
|
|
14616
|
-
"
|
|
14617
|
-
|
|
14618
|
-
|
|
14619
|
-
|
|
14620
|
-
|
|
14621
|
-
|
|
14622
|
-
|
|
14623
|
-
|
|
14624
|
-
|
|
14625
|
-
|
|
14626
|
-
|
|
14627
|
-
|
|
14628
|
-
|
|
14629
|
-
|
|
14630
|
-
|
|
14631
|
-
|
|
14632
|
-
|
|
14633
|
-
|
|
14634
|
-
|
|
14635
|
-
|
|
14636
|
-
if (!validStepTypes.includes(apiStep.type)) throw new NormalizationError(`Unknown context step type: ${apiStep.type}. Must be one of: ${validStepTypes.join(", ")}`, apiStep.type, "type", `one of [${validStepTypes.join(", ")}]`, apiStep.type);
|
|
14700
|
+
if (!CONTEXT_STEP_TYPES.includes(apiStep.type)) throw new NormalizationError(`Unknown context step type: ${apiStep.type}. Must be one of: ${CONTEXT_STEP_TYPES.join(", ")}`, apiStep.type, "type", `one of [${CONTEXT_STEP_TYPES.join(", ")}]`, apiStep.type);
|
|
14701
|
+
}
|
|
14702
|
+
function normalizeContextStepByType(apiStep, baseStep, options) {
|
|
14703
|
+
switch (apiStep.type) {
|
|
14704
|
+
case "retrieve-record": {
|
|
14705
|
+
const aliased = resolveRetrieveRecordAlias(normalizeRetrieveRecordConfig(apiStep.config));
|
|
14706
|
+
return {
|
|
14707
|
+
...baseStep,
|
|
14708
|
+
type: aliased.type,
|
|
14709
|
+
config: aliased.config
|
|
14710
|
+
};
|
|
14711
|
+
}
|
|
14712
|
+
case "loop": return lowerLoopToConditional(baseStep, apiStep.config);
|
|
14713
|
+
default: {
|
|
14714
|
+
const normalizeConfig = CONTEXT_STEP_CONFIG_NORMALIZERS[apiStep.type];
|
|
14715
|
+
if (!normalizeConfig) throw new NormalizationError(`Unknown context step type: ${apiStep.type}`, apiStep.type, "type", "valid step type", apiStep.type);
|
|
14716
|
+
return {
|
|
14717
|
+
...baseStep,
|
|
14718
|
+
type: apiStep.type,
|
|
14719
|
+
config: normalizeConfig(apiStep.config, options)
|
|
14720
|
+
};
|
|
14721
|
+
}
|
|
14722
|
+
}
|
|
14723
|
+
}
|
|
14724
|
+
/**
|
|
14725
|
+
* Normalize a context step from API format (snake_case) to internal format (camelCase)
|
|
14726
|
+
* Only normalizes known API structure fields, preserves all user data
|
|
14727
|
+
* @throws {NormalizationError} If validation fails
|
|
14728
|
+
*/
|
|
14729
|
+
function normalizeContextStep(apiStep, options = {}) {
|
|
14730
|
+
if (!apiStep || typeof apiStep !== "object") throw new NormalizationError("Step must be a valid object", "unknown", "apiStep", "object", typeof apiStep);
|
|
14731
|
+
validateContextStepEnvelope(apiStep);
|
|
14637
14732
|
const baseStep = {
|
|
14638
14733
|
id: apiStep.id,
|
|
14639
14734
|
type: apiStep.type,
|
|
@@ -14643,158 +14738,7 @@ function normalizeContextStep(apiStep, options = {}) {
|
|
|
14643
14738
|
...typeof apiStep.when === "string" ? { when: apiStep.when } : {}
|
|
14644
14739
|
};
|
|
14645
14740
|
try {
|
|
14646
|
-
|
|
14647
|
-
case "crawl": return {
|
|
14648
|
-
...baseStep,
|
|
14649
|
-
type: "crawl",
|
|
14650
|
-
config: normalizeCrawlConfig(apiStep.config)
|
|
14651
|
-
};
|
|
14652
|
-
case "fetch-url": return {
|
|
14653
|
-
...baseStep,
|
|
14654
|
-
type: "fetch-url",
|
|
14655
|
-
config: normalizeFetchUrlConfig(apiStep.config)
|
|
14656
|
-
};
|
|
14657
|
-
case "retrieve-record": {
|
|
14658
|
-
const aliased = resolveRetrieveRecordAlias(normalizeRetrieveRecordConfig(apiStep.config));
|
|
14659
|
-
return {
|
|
14660
|
-
...baseStep,
|
|
14661
|
-
type: aliased.type,
|
|
14662
|
-
config: aliased.config
|
|
14663
|
-
};
|
|
14664
|
-
}
|
|
14665
|
-
case "get-record": return {
|
|
14666
|
-
...baseStep,
|
|
14667
|
-
type: "get-record",
|
|
14668
|
-
config: normalizeGetRecordConfig(apiStep.config)
|
|
14669
|
-
};
|
|
14670
|
-
case "list-records": return {
|
|
14671
|
-
...baseStep,
|
|
14672
|
-
type: "list-records",
|
|
14673
|
-
config: normalizeListRecordsConfig(apiStep.config)
|
|
14674
|
-
};
|
|
14675
|
-
case "api-call": return {
|
|
14676
|
-
...baseStep,
|
|
14677
|
-
type: "api-call",
|
|
14678
|
-
config: normalizeApiCallConfig(apiStep.config)
|
|
14679
|
-
};
|
|
14680
|
-
case "transform-data": return {
|
|
14681
|
-
...baseStep,
|
|
14682
|
-
type: "transform-data",
|
|
14683
|
-
config: normalizeTransformDataConfig(apiStep.config)
|
|
14684
|
-
};
|
|
14685
|
-
case "template": return {
|
|
14686
|
-
...baseStep,
|
|
14687
|
-
type: "template",
|
|
14688
|
-
config: normalizeTemplateConfig(apiStep.config)
|
|
14689
|
-
};
|
|
14690
|
-
case "conditional": return {
|
|
14691
|
-
...baseStep,
|
|
14692
|
-
type: "conditional",
|
|
14693
|
-
config: normalizeConditionalConfig(apiStep.config)
|
|
14694
|
-
};
|
|
14695
|
-
case "loop": return lowerLoopToConditional(baseStep, apiStep.config);
|
|
14696
|
-
case "set-variable": return {
|
|
14697
|
-
...baseStep,
|
|
14698
|
-
type: "set-variable",
|
|
14699
|
-
config: normalizeSetVariableConfig(apiStep.config)
|
|
14700
|
-
};
|
|
14701
|
-
case "upsert-record": return {
|
|
14702
|
-
...baseStep,
|
|
14703
|
-
type: "upsert-record",
|
|
14704
|
-
config: normalizeUpsertRecordConfig(apiStep.config)
|
|
14705
|
-
};
|
|
14706
|
-
case "send-email": return {
|
|
14707
|
-
...baseStep,
|
|
14708
|
-
type: "send-email",
|
|
14709
|
-
config: normalizeSendEmailConfig(apiStep.config, options)
|
|
14710
|
-
};
|
|
14711
|
-
case "send-event": return {
|
|
14712
|
-
...baseStep,
|
|
14713
|
-
type: "send-event",
|
|
14714
|
-
config: normalizeSendEventConfig(apiStep.config)
|
|
14715
|
-
};
|
|
14716
|
-
case "send-stream": return {
|
|
14717
|
-
...baseStep,
|
|
14718
|
-
type: "send-stream",
|
|
14719
|
-
config: normalizeSendStreamConfig(apiStep.config)
|
|
14720
|
-
};
|
|
14721
|
-
case "update-record": return {
|
|
14722
|
-
...baseStep,
|
|
14723
|
-
type: "update-record",
|
|
14724
|
-
config: normalizeUpdateRecordConfig(apiStep.config)
|
|
14725
|
-
};
|
|
14726
|
-
case "search": return {
|
|
14727
|
-
...baseStep,
|
|
14728
|
-
type: "search",
|
|
14729
|
-
config: normalizeSearchConfig(apiStep.config)
|
|
14730
|
-
};
|
|
14731
|
-
case "generate-embedding": return {
|
|
14732
|
-
...baseStep,
|
|
14733
|
-
type: "generate-embedding",
|
|
14734
|
-
config: normalizeGenerateEmbeddingConfig(apiStep.config)
|
|
14735
|
-
};
|
|
14736
|
-
case "vector-search": return {
|
|
14737
|
-
...baseStep,
|
|
14738
|
-
type: "vector-search",
|
|
14739
|
-
config: normalizeVectorSearchConfig(apiStep.config)
|
|
14740
|
-
};
|
|
14741
|
-
case "paginate-api": return {
|
|
14742
|
-
...baseStep,
|
|
14743
|
-
type: "paginate-api",
|
|
14744
|
-
config: normalizePaginateApiConfig(apiStep.config)
|
|
14745
|
-
};
|
|
14746
|
-
case "store-vector": return {
|
|
14747
|
-
...baseStep,
|
|
14748
|
-
type: "store-vector",
|
|
14749
|
-
config: normalizeStoreVectorConfig(apiStep.config)
|
|
14750
|
-
};
|
|
14751
|
-
case "tool-call": return {
|
|
14752
|
-
...baseStep,
|
|
14753
|
-
type: "tool-call",
|
|
14754
|
-
config: normalizeToolCallConfig(apiStep.config)
|
|
14755
|
-
};
|
|
14756
|
-
case "wait-until": return {
|
|
14757
|
-
...baseStep,
|
|
14758
|
-
type: "wait-until",
|
|
14759
|
-
config: normalizeWaitUntilConfig(apiStep.config)
|
|
14760
|
-
};
|
|
14761
|
-
case "execute-agent": return {
|
|
14762
|
-
...baseStep,
|
|
14763
|
-
type: "execute-agent",
|
|
14764
|
-
config: normalizeExecuteAgentConfig(apiStep.config)
|
|
14765
|
-
};
|
|
14766
|
-
case "store-asset": return {
|
|
14767
|
-
...baseStep,
|
|
14768
|
-
type: "store-asset",
|
|
14769
|
-
config: normalizeStoreAssetConfig(apiStep.config)
|
|
14770
|
-
};
|
|
14771
|
-
case "generate-pdf": return {
|
|
14772
|
-
...baseStep,
|
|
14773
|
-
type: "generate-pdf",
|
|
14774
|
-
config: normalizeGeneratePdfConfig(apiStep.config)
|
|
14775
|
-
};
|
|
14776
|
-
case "save-memory": return {
|
|
14777
|
-
...baseStep,
|
|
14778
|
-
type: "save-memory",
|
|
14779
|
-
config: normalizeSaveMemoryConfig(apiStep.config)
|
|
14780
|
-
};
|
|
14781
|
-
case "recall-memory": return {
|
|
14782
|
-
...baseStep,
|
|
14783
|
-
type: "recall-memory",
|
|
14784
|
-
config: normalizeRecallMemoryConfig(apiStep.config)
|
|
14785
|
-
};
|
|
14786
|
-
case "memory-summary": return {
|
|
14787
|
-
...baseStep,
|
|
14788
|
-
type: "memory-summary",
|
|
14789
|
-
config: normalizeMemorySummaryConfig(apiStep.config)
|
|
14790
|
-
};
|
|
14791
|
-
case "extract": return {
|
|
14792
|
-
...baseStep,
|
|
14793
|
-
type: "extract",
|
|
14794
|
-
config: normalizeExtractConfig(apiStep.config)
|
|
14795
|
-
};
|
|
14796
|
-
default: throw new NormalizationError(`Unknown context step type: ${apiStep.type}`, apiStep.type, "type", "valid step type", apiStep.type);
|
|
14797
|
-
}
|
|
14741
|
+
return normalizeContextStepByType(apiStep, baseStep, options);
|
|
14798
14742
|
} catch (error) {
|
|
14799
14743
|
if (error instanceof NormalizationError) throw error;
|
|
14800
14744
|
throw new NormalizationError(`Failed to normalize ${apiStep.type} step: ${error instanceof Error ? error.message : String(error)}`, apiStep.type, void 0, void 0, error);
|
|
@@ -25974,7 +25918,7 @@ function loadBrandConfig(env) {
|
|
|
25974
25918
|
loadBrandConfig();
|
|
25975
25919
|
BRAND_CONFIGS[DEFAULT_BRAND_NAME];
|
|
25976
25920
|
//#endregion
|
|
25977
|
-
//#region ../shared/dist/chunk-
|
|
25921
|
+
//#region ../shared/dist/chunk-CNTixTjk.mjs
|
|
25978
25922
|
const ARCHITECTURE_PREVIEW_SURFACE_TYPES = [
|
|
25979
25923
|
"chat",
|
|
25980
25924
|
"api",
|
|
@@ -41496,7 +41440,7 @@ function createSandboxInstructions(provider) {
|
|
|
41496
41440
|
"{ \"code\": \"...\", \"parameters\": { ... }, \"language\": \"javascript|typescript|python\", \"timeoutMs\": 30000 }",
|
|
41497
41441
|
"Runtype Sandbox rules:",
|
|
41498
41442
|
"1. Choose one language: javascript, typescript, or python.",
|
|
41499
|
-
"2. Each session is a full Linux container (Node
|
|
41443
|
+
"2. Each session is a full Linux container (Node 26, Python 3.15 with numpy/pandas/matplotlib, pnpm, tsx, uv, git).",
|
|
41500
41444
|
"3. Inputs are available as the `parameters` object (JS/TS) or `parameters` dict (Python).",
|
|
41501
41445
|
"4. async/await, Promises, and long-running processes are fully supported.",
|
|
41502
41446
|
"5. Write the final result to stdout (JSON string is preferred for structured output).",
|
|
@@ -63826,7 +63770,7 @@ const productKindSchema = _enum([
|
|
|
63826
63770
|
"spec_only"
|
|
63827
63771
|
]);
|
|
63828
63772
|
//#endregion
|
|
63829
|
-
//#region ../shared/dist/chunk-
|
|
63773
|
+
//#region ../shared/dist/chunk-D0CW0BS7.mjs
|
|
63830
63774
|
/** The manifest file at the root of a candidate's source bundle. */
|
|
63831
63775
|
const CANDIDATE_MANIFEST_FILENAME = "runtype-candidate.json";
|
|
63832
63776
|
const candidateRuntimeSchema = _enum([
|
|
@@ -65106,6 +65050,7 @@ const servedBySchema = _enum([
|
|
|
65106
65050
|
"composite",
|
|
65107
65051
|
"synthesized",
|
|
65108
65052
|
"stub",
|
|
65053
|
+
"rejected",
|
|
65109
65054
|
"fault"
|
|
65110
65055
|
]);
|
|
65111
65056
|
/** Calls per ladder rung; a rung with no calls is absent. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@runtypelabs/cli",
|
|
3
|
-
"version": "2.53.
|
|
3
|
+
"version": "2.53.3",
|
|
4
4
|
"description": "Command-line interface for Runtype AI platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"@modelcontextprotocol/core": "2.3.1",
|
|
13
13
|
"@napi-rs/keyring": "2.1.0",
|
|
14
14
|
"@runtypelabs/ink-components": "0.3.12",
|
|
15
|
-
"@runtypelabs/sdk": "11.
|
|
15
|
+
"@runtypelabs/sdk": "11.7.0",
|
|
16
16
|
"@runtypelabs/terminal-animations": "0.2.4",
|
|
17
17
|
"add-mcp": "2.0.0",
|
|
18
18
|
"chalk": "^5.3.0",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@modelcontextprotocol/server": "2.3.1",
|
|
37
37
|
"@runtypelabs/device-bridge": "0.2.4",
|
|
38
38
|
"@runtypelabs/persona": "4.29.2",
|
|
39
|
-
"@runtypelabs/shared": "3.
|
|
39
|
+
"@runtypelabs/shared": "3.95.1",
|
|
40
40
|
"@types/express": "^5.0.6",
|
|
41
41
|
"@types/micromatch": "^4.0.9",
|
|
42
42
|
"@types/node": "^25.3.3",
|