@runtypelabs/cli 2.36.0 → 2.36.2
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 +717 -102
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -19436,14 +19436,18 @@ var CANONICAL_LOG_COLUMN_SET = {
|
|
|
19436
19436
|
};
|
|
19437
19437
|
var CANONICAL_LOG_COLUMNS = Object.keys(CANONICAL_LOG_COLUMN_SET);
|
|
19438
19438
|
|
|
19439
|
-
// ../shared/dist/chunk-
|
|
19439
|
+
// ../shared/dist/chunk-NQDOLEMM.mjs
|
|
19440
19440
|
var MODEL_FAMILY_PROVIDER_IDS = {
|
|
19441
19441
|
"claude-fable-5": {
|
|
19442
19442
|
"anthropic": "claude-fable-5",
|
|
19443
19443
|
"vercel": "anthropic/claude-fable-5"
|
|
19444
19444
|
},
|
|
19445
19445
|
"claude-fable-5-1": {
|
|
19446
|
-
"anthropic": "claude-fable-5-1"
|
|
19446
|
+
"anthropic": "claude-fable-5-1",
|
|
19447
|
+
"vercel": "anthropic/claude-fable-5.1"
|
|
19448
|
+
},
|
|
19449
|
+
"claude-fable-5.1": {
|
|
19450
|
+
"vercel": "anthropic/claude-fable-5.1"
|
|
19447
19451
|
},
|
|
19448
19452
|
"claude-haiku-4-5": {
|
|
19449
19453
|
"anthropic": "claude-haiku-4-5-20251001",
|
|
@@ -19638,6 +19642,10 @@ var MODEL_FAMILY_PROVIDER_IDS = {
|
|
|
19638
19642
|
"google": "gemini-3.7-flash",
|
|
19639
19643
|
"vercel": "google/gemini-3.7-flash"
|
|
19640
19644
|
},
|
|
19645
|
+
"gemini-3-8-flash": {
|
|
19646
|
+
"google": "gemini-3.8-flash",
|
|
19647
|
+
"vercel": "google/gemini-3.8-flash"
|
|
19648
|
+
},
|
|
19641
19649
|
"gemini-3-flash": {
|
|
19642
19650
|
"google": "gemini-3-flash-preview"
|
|
19643
19651
|
},
|
|
@@ -19689,6 +19697,10 @@ var MODEL_FAMILY_PROVIDER_IDS = {
|
|
|
19689
19697
|
"google": "gemini-3.7-flash",
|
|
19690
19698
|
"vercel": "google/gemini-3.7-flash"
|
|
19691
19699
|
},
|
|
19700
|
+
"gemini-3.8-flash": {
|
|
19701
|
+
"google": "gemini-3.8-flash",
|
|
19702
|
+
"vercel": "google/gemini-3.8-flash"
|
|
19703
|
+
},
|
|
19692
19704
|
"gemini-embedding-001": {
|
|
19693
19705
|
"google": "gemini-embedding-001"
|
|
19694
19706
|
},
|
|
@@ -20413,7 +20425,6 @@ var MODEL_FAMILY_PROVIDER_IDS = {
|
|
|
20413
20425
|
"vercel": "alibaba/qwen3.5-plus"
|
|
20414
20426
|
},
|
|
20415
20427
|
"qwen3-6-27b": {
|
|
20416
|
-
"mixlayer": "qwen/qwen3.6-27b",
|
|
20417
20428
|
"vercel": "alibaba/qwen3.6-27b"
|
|
20418
20429
|
},
|
|
20419
20430
|
"qwen3-6-35b-a3b": {
|
|
@@ -20447,6 +20458,9 @@ var MODEL_FAMILY_PROVIDER_IDS = {
|
|
|
20447
20458
|
"qwen3-8-max": {
|
|
20448
20459
|
"vercel": "alibaba/qwen3.8-max"
|
|
20449
20460
|
},
|
|
20461
|
+
"qwen3-8-max-0902": {
|
|
20462
|
+
"vercel": "alibaba/qwen3.8-max-0902"
|
|
20463
|
+
},
|
|
20450
20464
|
"qwen3-coder": {
|
|
20451
20465
|
"vercel": "alibaba/qwen3-coder"
|
|
20452
20466
|
},
|
|
@@ -20511,7 +20525,6 @@ var MODEL_FAMILY_PROVIDER_IDS = {
|
|
|
20511
20525
|
"vercel": "alibaba/qwen3.5-plus"
|
|
20512
20526
|
},
|
|
20513
20527
|
"qwen3.6-27b": {
|
|
20514
|
-
"mixlayer": "qwen/qwen3.6-27b",
|
|
20515
20528
|
"vercel": "alibaba/qwen3.6-27b"
|
|
20516
20529
|
},
|
|
20517
20530
|
"qwen3.6-35b-a3b": {
|
|
@@ -20545,6 +20558,9 @@ var MODEL_FAMILY_PROVIDER_IDS = {
|
|
|
20545
20558
|
"qwen3.8-max": {
|
|
20546
20559
|
"vercel": "alibaba/qwen3.8-max"
|
|
20547
20560
|
},
|
|
20561
|
+
"qwen3.8-max-0902": {
|
|
20562
|
+
"vercel": "alibaba/qwen3.8-max-0902"
|
|
20563
|
+
},
|
|
20548
20564
|
"rerank-v3-5": {
|
|
20549
20565
|
"vercel": "cohere/rerank-v3.5"
|
|
20550
20566
|
},
|
|
@@ -20650,6 +20666,14 @@ var DEEPSEEK_V4_FLASH_IDS = [
|
|
|
20650
20666
|
"deepseek/deepseek-v4-flash-0731"
|
|
20651
20667
|
];
|
|
20652
20668
|
var GLM_5_3_FLASH_IDS = ["glm-5.3-flash", "glm-5-3-flash", "zai/glm-5.3-flash"];
|
|
20669
|
+
var QWEN_3_8_27B_IDS = ["qwen3.8-27b", "qwen3-8-27b"];
|
|
20670
|
+
function mixlayerPrimary(ids) {
|
|
20671
|
+
const config3 = {
|
|
20672
|
+
providers: [{ provider: "mixlayer", weight: 100 }],
|
|
20673
|
+
fallback: ["vercel"]
|
|
20674
|
+
};
|
|
20675
|
+
return Object.fromEntries(ids.map((id) => [id, config3]));
|
|
20676
|
+
}
|
|
20653
20677
|
var PROVIDER_ROUTING_CONFIG = {
|
|
20654
20678
|
"claude-sonnet-4-5": {
|
|
20655
20679
|
providers: [
|
|
@@ -20877,7 +20901,8 @@ var PROVIDER_ROUTING_CONFIG = {
|
|
|
20877
20901
|
},
|
|
20878
20902
|
// WHY(docs/why/packages/shared/src.md#deepseek-v4-flash-mirrors-v4-pro-each-slash-form): DeepSeek V4 Flash mirrors V4 Pro: each slash form needs its own explicit Vercel fallback entry to escape the
|
|
20879
20903
|
...workersAiPrimary(DEEPSEEK_V4_FLASH_IDS),
|
|
20880
|
-
// WHY(
|
|
20904
|
+
// WHY(packages/shared/src/provider-routing.ts): Qwen 3.8 27B routes through Mixlayer because its 262K context is below Vercel's 1M.
|
|
20905
|
+
...mixlayerPrimary(QWEN_3_8_27B_IDS),
|
|
20881
20906
|
// WHY(docs/why/packages/shared/src.md#vercel-renamed-its-xai-gateway-namespace-xai-to): Vercel renamed its xAI gateway namespace xai/ to spacexai/ on 2026-08-22; this hand-maintained table isn't
|
|
20882
20907
|
...workersAiPrimary(GLM_5_3_FLASH_IDS),
|
|
20883
20908
|
"minimax-m2.7": {
|
|
@@ -21304,7 +21329,7 @@ var BuiltInToolIdPrefix = {
|
|
|
21304
21329
|
PLATFORM: "platform"
|
|
21305
21330
|
};
|
|
21306
21331
|
|
|
21307
|
-
// ../shared/dist/chunk-
|
|
21332
|
+
// ../shared/dist/chunk-UPJ4KSD4.mjs
|
|
21308
21333
|
function sanitizeToolNameForAiSdk(name) {
|
|
21309
21334
|
return name.replace(/[^a-zA-Z0-9_]/g, "_").toLowerCase().replace(/_+/g, "_").replace(/^_|_$/g, "");
|
|
21310
21335
|
}
|
|
@@ -21502,6 +21527,130 @@ var DEFAULT_FLOW_TIMEOUT_MS = 15 * 60 * 1e3;
|
|
|
21502
21527
|
var ATTACHED_DISPATCH_STEP_TIMEOUT_MAX_MS = 10 * 60 * 1e3;
|
|
21503
21528
|
var ASYNC_DISPATCH_TIMEOUT_MAX_MS = 30 * 60 * 1e3;
|
|
21504
21529
|
|
|
21530
|
+
// ../shared/dist/chunk-RT5M2CMG.mjs
|
|
21531
|
+
var EMBEDDING_COST_PER_1K_TOKENS = Object.freeze({
|
|
21532
|
+
"text-embedding-3-small": 2e-5,
|
|
21533
|
+
// $0.02 per 1M tokens
|
|
21534
|
+
"text-embedding-3-large": 13e-5
|
|
21535
|
+
// $0.13 per 1M tokens
|
|
21536
|
+
});
|
|
21537
|
+
var RETIRED_EMBEDDING_MODELS = Object.freeze({
|
|
21538
|
+
"text-embedding-004": Object.freeze({
|
|
21539
|
+
id: "text-embedding-004",
|
|
21540
|
+
retiredOn: "2026-01-14",
|
|
21541
|
+
replacement: "gemini-embedding-001"
|
|
21542
|
+
}),
|
|
21543
|
+
"embedding-001": Object.freeze({
|
|
21544
|
+
id: "embedding-001",
|
|
21545
|
+
retiredOn: "2025-10-30",
|
|
21546
|
+
replacement: "gemini-embedding-001"
|
|
21547
|
+
})
|
|
21548
|
+
});
|
|
21549
|
+
var GATEWAY_EMBEDDING_MODELS = Object.freeze({
|
|
21550
|
+
"text-embedding-3-small": Object.freeze({
|
|
21551
|
+
kind: "gateway",
|
|
21552
|
+
id: "text-embedding-3-small",
|
|
21553
|
+
gatewayModelId: "openai/text-embedding-3-small",
|
|
21554
|
+
provider: "openai",
|
|
21555
|
+
name: "text-embedding-3-small (OpenAI)",
|
|
21556
|
+
description: "OpenAI's small embedding model. Good balance of quality and cost. [Recommended]",
|
|
21557
|
+
dimensions: 1536,
|
|
21558
|
+
maxTokens: 8191,
|
|
21559
|
+
supportsDimensionsParameter: true
|
|
21560
|
+
}),
|
|
21561
|
+
"text-embedding-3-large": Object.freeze({
|
|
21562
|
+
kind: "gateway",
|
|
21563
|
+
id: "text-embedding-3-large",
|
|
21564
|
+
gatewayModelId: "openai/text-embedding-3-large",
|
|
21565
|
+
provider: "openai",
|
|
21566
|
+
name: "text-embedding-3-large (OpenAI)",
|
|
21567
|
+
description: "OpenAI's large embedding model. Best quality, higher cost.",
|
|
21568
|
+
dimensions: 3072,
|
|
21569
|
+
maxTokens: 8191,
|
|
21570
|
+
supportsDimensionsParameter: true
|
|
21571
|
+
}),
|
|
21572
|
+
"text-embedding-ada-002": Object.freeze({
|
|
21573
|
+
kind: "gateway",
|
|
21574
|
+
id: "text-embedding-ada-002",
|
|
21575
|
+
gatewayModelId: "openai/text-embedding-ada-002",
|
|
21576
|
+
provider: "openai",
|
|
21577
|
+
name: "text-embedding-ada-002 (OpenAI)",
|
|
21578
|
+
description: "OpenAI's legacy embedding model, kept for existing indexes.",
|
|
21579
|
+
dimensions: 1536,
|
|
21580
|
+
maxTokens: 8191,
|
|
21581
|
+
supportsDimensionsParameter: false
|
|
21582
|
+
}),
|
|
21583
|
+
"gemini-embedding-001": Object.freeze({
|
|
21584
|
+
kind: "gateway",
|
|
21585
|
+
id: "gemini-embedding-001",
|
|
21586
|
+
gatewayModelId: "google/gemini-embedding-001",
|
|
21587
|
+
provider: "google",
|
|
21588
|
+
name: "gemini-embedding-001 (Google)",
|
|
21589
|
+
description: "Google's Gemini embedding model. Returns 3072 values by default.",
|
|
21590
|
+
dimensions: 3072,
|
|
21591
|
+
maxTokens: 2048,
|
|
21592
|
+
supportsDimensionsParameter: true
|
|
21593
|
+
})
|
|
21594
|
+
});
|
|
21595
|
+
var WEAVIATE_VECTORIZER_MODELS = Object.freeze({
|
|
21596
|
+
"text2vec-openai": Object.freeze({
|
|
21597
|
+
kind: "weaviate-vectorizer",
|
|
21598
|
+
id: "text2vec-openai",
|
|
21599
|
+
name: "text2vec-openai (Weaviate)",
|
|
21600
|
+
description: "Weaviate's OpenAI text vectorization module. Uses OpenAI embeddings via Weaviate.",
|
|
21601
|
+
dimensions: 1536,
|
|
21602
|
+
maxTokens: 8191
|
|
21603
|
+
}),
|
|
21604
|
+
"text2vec-cohere": Object.freeze({
|
|
21605
|
+
kind: "weaviate-vectorizer",
|
|
21606
|
+
id: "text2vec-cohere",
|
|
21607
|
+
name: "text2vec-cohere (Weaviate)",
|
|
21608
|
+
description: "Weaviate's Cohere text vectorization module. Uses Cohere embeddings via Weaviate.",
|
|
21609
|
+
dimensions: 1024,
|
|
21610
|
+
maxTokens: 2048
|
|
21611
|
+
}),
|
|
21612
|
+
"text2vec-huggingface": Object.freeze({
|
|
21613
|
+
kind: "weaviate-vectorizer",
|
|
21614
|
+
id: "text2vec-huggingface",
|
|
21615
|
+
name: "text2vec-huggingface (Weaviate)",
|
|
21616
|
+
description: "Weaviate's HuggingFace text vectorization module. Uses HuggingFace models via Weaviate.",
|
|
21617
|
+
dimensions: 768,
|
|
21618
|
+
maxTokens: 512
|
|
21619
|
+
}),
|
|
21620
|
+
"Snowflake/snowflake-arctic-embed-l-v2.0": Object.freeze({
|
|
21621
|
+
kind: "weaviate-vectorizer",
|
|
21622
|
+
id: "Snowflake/snowflake-arctic-embed-l-v2.0",
|
|
21623
|
+
name: "snowflake-arctic-embed-l-v2.0 (Weaviate Cloud)",
|
|
21624
|
+
description: "Snowflake Arctic embedding model. Multilingual support with high performance.",
|
|
21625
|
+
dimensions: 1024,
|
|
21626
|
+
maxTokens: 8192
|
|
21627
|
+
}),
|
|
21628
|
+
"Snowflake/snowflake-arctic-embed-m-v2.0": Object.freeze({
|
|
21629
|
+
kind: "weaviate-vectorizer",
|
|
21630
|
+
id: "Snowflake/snowflake-arctic-embed-m-v2.0",
|
|
21631
|
+
name: "snowflake-arctic-embed-m-v2.0 (Weaviate Cloud)",
|
|
21632
|
+
description: "Snowflake Arctic medium embedding model. Balanced performance and efficiency.",
|
|
21633
|
+
dimensions: 768,
|
|
21634
|
+
maxTokens: 8192
|
|
21635
|
+
}),
|
|
21636
|
+
"Snowflake/snowflake-arctic-embed-s-v2.0": Object.freeze({
|
|
21637
|
+
kind: "weaviate-vectorizer",
|
|
21638
|
+
id: "Snowflake/snowflake-arctic-embed-s-v2.0",
|
|
21639
|
+
name: "snowflake-arctic-embed-s-v2.0 (Weaviate Cloud)",
|
|
21640
|
+
description: "Snowflake Arctic small embedding model. Optimized for speed and lower resource usage.",
|
|
21641
|
+
dimensions: 384,
|
|
21642
|
+
maxTokens: 8192
|
|
21643
|
+
}),
|
|
21644
|
+
"Snowflake/snowflake-arctic-embed-xs-v2.0": Object.freeze({
|
|
21645
|
+
kind: "weaviate-vectorizer",
|
|
21646
|
+
id: "Snowflake/snowflake-arctic-embed-xs-v2.0",
|
|
21647
|
+
name: "snowflake-arctic-embed-xs-v2.0 (Weaviate Cloud)",
|
|
21648
|
+
description: "Snowflake Arctic extra-small embedding model. Ultra-fast with minimal resource requirements.",
|
|
21649
|
+
dimensions: 384,
|
|
21650
|
+
maxTokens: 8192
|
|
21651
|
+
})
|
|
21652
|
+
});
|
|
21653
|
+
|
|
21505
21654
|
// ../shared/dist/chunk-3N5ZK3YE.mjs
|
|
21506
21655
|
var travrseConfig = {
|
|
21507
21656
|
name: "Travrse",
|
|
@@ -21665,7 +21814,7 @@ var recordCollectionSchemaSchema = external_exports.strictObject({
|
|
|
21665
21814
|
additionalProperties: external_exports.boolean().optional()
|
|
21666
21815
|
}).superRefine((schema, ctx) => addSemanticIssues(schema, ctx));
|
|
21667
21816
|
|
|
21668
|
-
// ../shared/dist/chunk-
|
|
21817
|
+
// ../shared/dist/chunk-DVPH4AHH.mjs
|
|
21669
21818
|
var MCPServerCategory = {
|
|
21670
21819
|
COMMUNICATION: "communication",
|
|
21671
21820
|
PRODUCTIVITY: "productivity",
|
|
@@ -21913,6 +22062,10 @@ function separateToolIds(toolIds) {
|
|
|
21913
22062
|
function isDataConnectionToolId(toolId) {
|
|
21914
22063
|
return toolId.startsWith("dc:");
|
|
21915
22064
|
}
|
|
22065
|
+
var AGENT_TRANSIENT_SECRETS_CODE = "RUNTIME_AGENT_TRANSIENT_SECRETS_UNSUPPORTED";
|
|
22066
|
+
var FLOW_TRANSIENT_SECRETS_CODE = "RUNTIME_FLOW_TRANSIENT_SECRETS_UNSUPPORTED";
|
|
22067
|
+
var DISPATCH_TRANSIENT_SECRETS_RETIRED_NOTE = `Retired on BOTH dispatch targets. A NON-EMPTY map is rejected with 400: ${AGENT_TRANSIENT_SECRETS_CODE} on an agent dispatch, ${FLOW_TRANSIENT_SECRETS_CODE} on a flow dispatch (the flow target used to drop the map silently). An empty map is accepted and does nothing. Store credentials as managed secrets and reference them as {{secret:NAME}}. The field is kept on the wire for compatibility only.`;
|
|
22068
|
+
var DISPATCH_TRANSIENT_SECRETS_RETIRED_CLAUSE = `a non-empty dispatch secrets map is refused with 400 ${AGENT_TRANSIENT_SECRETS_CODE} on agent dispatches and 400 ${FLOW_TRANSIENT_SECRETS_CODE} on flow dispatches`;
|
|
21916
22069
|
var SURFACE_TYPE_METADATA = {
|
|
21917
22070
|
chat: {
|
|
21918
22071
|
description: "Website widget, support bots, conversational interfaces. Uses Persona and can optionally accept WebMCP page tools discovered from document.modelContext.",
|
|
@@ -21940,6 +22093,7 @@ var SURFACE_TYPE_METADATA = {
|
|
|
21940
22093
|
consumerType: "human",
|
|
21941
22094
|
// SAFETY(docs/why/packages/shared/src/product-generation.md#browser-cant-self-approve-gated-tool-calls-reach): Browser can't self-approve gated tool calls; reachable approvals are rejected before execution.
|
|
21942
22095
|
approvalCapture: "none",
|
|
22096
|
+
clientToolExecution: "caller",
|
|
21943
22097
|
reasoningVisibility: "pass_through",
|
|
21944
22098
|
markdownDialect: "mdx",
|
|
21945
22099
|
threadModel: "flat",
|
|
@@ -21972,6 +22126,7 @@ var SURFACE_TYPE_METADATA = {
|
|
|
21972
22126
|
inboundMediaSupport: true,
|
|
21973
22127
|
consumerType: "machine",
|
|
21974
22128
|
approvalCapture: "native-controls",
|
|
22129
|
+
clientToolExecution: "caller",
|
|
21975
22130
|
reasoningVisibility: "pass_through",
|
|
21976
22131
|
markdownDialect: "none",
|
|
21977
22132
|
threadModel: "flat",
|
|
@@ -22004,6 +22159,7 @@ var SURFACE_TYPE_METADATA = {
|
|
|
22004
22159
|
inboundMediaSupport: false,
|
|
22005
22160
|
consumerType: "agent",
|
|
22006
22161
|
approvalCapture: "native-controls",
|
|
22162
|
+
clientToolExecution: "none",
|
|
22007
22163
|
reasoningVisibility: "pass_through",
|
|
22008
22164
|
markdownDialect: "none",
|
|
22009
22165
|
threadModel: "flat",
|
|
@@ -22037,6 +22193,7 @@ var SURFACE_TYPE_METADATA = {
|
|
|
22037
22193
|
inboundMediaSupport: true,
|
|
22038
22194
|
consumerType: "human",
|
|
22039
22195
|
approvalCapture: "none",
|
|
22196
|
+
clientToolExecution: "none",
|
|
22040
22197
|
reasoningVisibility: "always_strip",
|
|
22041
22198
|
markdownDialect: "html",
|
|
22042
22199
|
threadModel: "reply_chain",
|
|
@@ -22074,6 +22231,7 @@ var SURFACE_TYPE_METADATA = {
|
|
|
22074
22231
|
inboundMediaSupport: false,
|
|
22075
22232
|
consumerType: "machine",
|
|
22076
22233
|
approvalCapture: "none",
|
|
22234
|
+
clientToolExecution: "none",
|
|
22077
22235
|
reasoningVisibility: "pass_through",
|
|
22078
22236
|
markdownDialect: "none",
|
|
22079
22237
|
threadModel: "flat",
|
|
@@ -22107,6 +22265,7 @@ var SURFACE_TYPE_METADATA = {
|
|
|
22107
22265
|
inboundMediaSupport: false,
|
|
22108
22266
|
consumerType: "agent",
|
|
22109
22267
|
approvalCapture: "native-controls",
|
|
22268
|
+
clientToolExecution: "none",
|
|
22110
22269
|
reasoningVisibility: "pass_through",
|
|
22111
22270
|
markdownDialect: "none",
|
|
22112
22271
|
threadModel: "flat",
|
|
@@ -22139,6 +22298,7 @@ var SURFACE_TYPE_METADATA = {
|
|
|
22139
22298
|
inboundMediaSupport: true,
|
|
22140
22299
|
consumerType: "human",
|
|
22141
22300
|
approvalCapture: "native-controls",
|
|
22301
|
+
clientToolExecution: "none",
|
|
22142
22302
|
reasoningVisibility: "always_strip",
|
|
22143
22303
|
markdownDialect: "mrkdwn",
|
|
22144
22304
|
threadModel: "threaded",
|
|
@@ -22179,6 +22339,7 @@ var SURFACE_TYPE_METADATA = {
|
|
|
22179
22339
|
inboundMediaSupport: false,
|
|
22180
22340
|
consumerType: "machine",
|
|
22181
22341
|
approvalCapture: "none",
|
|
22342
|
+
clientToolExecution: "none",
|
|
22182
22343
|
reasoningVisibility: "always_strip",
|
|
22183
22344
|
markdownDialect: "none",
|
|
22184
22345
|
threadModel: "flat",
|
|
@@ -22211,6 +22372,7 @@ var SURFACE_TYPE_METADATA = {
|
|
|
22211
22372
|
inboundMediaSupport: false,
|
|
22212
22373
|
consumerType: "human",
|
|
22213
22374
|
approvalCapture: "reply",
|
|
22375
|
+
clientToolExecution: "none",
|
|
22214
22376
|
reasoningVisibility: "always_strip",
|
|
22215
22377
|
markdownDialect: "none",
|
|
22216
22378
|
threadModel: "flat",
|
|
@@ -22242,6 +22404,7 @@ var SURFACE_TYPE_METADATA = {
|
|
|
22242
22404
|
inboundMediaSupport: true,
|
|
22243
22405
|
consumerType: "human",
|
|
22244
22406
|
approvalCapture: "reply",
|
|
22407
|
+
clientToolExecution: "none",
|
|
22245
22408
|
reasoningVisibility: "always_strip",
|
|
22246
22409
|
markdownDialect: "none",
|
|
22247
22410
|
threadModel: "flat",
|
|
@@ -22284,6 +22447,7 @@ var SURFACE_TYPE_METADATA = {
|
|
|
22284
22447
|
inboundMediaSupport: true,
|
|
22285
22448
|
consumerType: "human",
|
|
22286
22449
|
approvalCapture: "none",
|
|
22450
|
+
clientToolExecution: "none",
|
|
22287
22451
|
reasoningVisibility: "always_strip",
|
|
22288
22452
|
markdownDialect: "markdown",
|
|
22289
22453
|
threadModel: "threaded",
|
|
@@ -22315,6 +22479,7 @@ var SURFACE_TYPE_METADATA = {
|
|
|
22315
22479
|
inboundMediaSupport: true,
|
|
22316
22480
|
consumerType: "human",
|
|
22317
22481
|
approvalCapture: "none",
|
|
22482
|
+
clientToolExecution: "none",
|
|
22318
22483
|
reasoningVisibility: "always_strip",
|
|
22319
22484
|
markdownDialect: "none",
|
|
22320
22485
|
threadModel: "flat",
|
|
@@ -22347,6 +22512,7 @@ var SURFACE_TYPE_METADATA = {
|
|
|
22347
22512
|
inboundMediaSupport: true,
|
|
22348
22513
|
consumerType: "human",
|
|
22349
22514
|
approvalCapture: "native-controls",
|
|
22515
|
+
clientToolExecution: "none",
|
|
22350
22516
|
reasoningVisibility: "always_strip",
|
|
22351
22517
|
markdownDialect: "telegram_html",
|
|
22352
22518
|
threadModel: "flat",
|
|
@@ -22379,6 +22545,7 @@ var SURFACE_TYPE_METADATA = {
|
|
|
22379
22545
|
consumerType: "human",
|
|
22380
22546
|
// WHY(docs/why/packages/shared/src/product-generation.md#generic-internal-messaging-has-no-provider-inter): Generic/internal messaging has no provider interaction a human can answer; Slack/Telegram declare their own
|
|
22381
22547
|
approvalCapture: "none",
|
|
22548
|
+
clientToolExecution: "none",
|
|
22382
22549
|
reasoningVisibility: "always_strip",
|
|
22383
22550
|
markdownDialect: "none",
|
|
22384
22551
|
threadModel: "flat",
|
|
@@ -22411,6 +22578,7 @@ var SURFACE_TYPE_METADATA = {
|
|
|
22411
22578
|
inboundMediaSupport: false,
|
|
22412
22579
|
consumerType: "agent",
|
|
22413
22580
|
approvalCapture: "native-controls",
|
|
22581
|
+
clientToolExecution: "none",
|
|
22414
22582
|
reasoningVisibility: "pass_through",
|
|
22415
22583
|
markdownDialect: "none",
|
|
22416
22584
|
threadModel: "flat",
|
|
@@ -22452,6 +22620,7 @@ var SURFACE_TYPE_METADATA = {
|
|
|
22452
22620
|
inboundMediaSupport: true,
|
|
22453
22621
|
consumerType: "human",
|
|
22454
22622
|
approvalCapture: "native-controls",
|
|
22623
|
+
clientToolExecution: "caller",
|
|
22455
22624
|
reasoningVisibility: "pass_through",
|
|
22456
22625
|
markdownDialect: "mdx",
|
|
22457
22626
|
threadModel: "flat",
|
|
@@ -22486,6 +22655,7 @@ var SURFACE_TYPE_METADATA = {
|
|
|
22486
22655
|
inboundMediaSupport: false,
|
|
22487
22656
|
consumerType: "machine",
|
|
22488
22657
|
approvalCapture: "native-controls",
|
|
22658
|
+
clientToolExecution: "caller",
|
|
22489
22659
|
reasoningVisibility: "pass_through",
|
|
22490
22660
|
markdownDialect: "markdown",
|
|
22491
22661
|
threadModel: "flat",
|
|
@@ -22525,6 +22695,7 @@ var SURFACE_TYPE_METADATA = {
|
|
|
22525
22695
|
inboundMediaSupport: true,
|
|
22526
22696
|
consumerType: "human",
|
|
22527
22697
|
approvalCapture: "native-controls",
|
|
22698
|
+
clientToolExecution: "caller",
|
|
22528
22699
|
reasoningVisibility: "pass_through",
|
|
22529
22700
|
markdownDialect: "mdx",
|
|
22530
22701
|
threadModel: "flat",
|
|
@@ -24188,15 +24359,8 @@ var GRANOLA_INTEGRATION = {
|
|
|
24188
24359
|
]
|
|
24189
24360
|
};
|
|
24190
24361
|
|
|
24191
|
-
// ../shared/dist/chunk-
|
|
24362
|
+
// ../shared/dist/chunk-IMR6WLWN.mjs
|
|
24192
24363
|
var DEFAULT_MODELS_FOR_NEW_ACCOUNTS = [
|
|
24193
|
-
{
|
|
24194
|
-
provider: "runtype",
|
|
24195
|
-
modelId: "qwen/qwen3.6-27b",
|
|
24196
|
-
isDefault: false,
|
|
24197
|
-
strengths: "Fast, low-cost open-weight workhorse with reasoning, tool-use, and vision \u2014 good for high-volume extraction, classification, and simple transforms.",
|
|
24198
|
-
bestFor: ["fast-cheap", "vision"]
|
|
24199
|
-
},
|
|
24200
24364
|
// WHY(docs/why/packages/shared/src.md#openai-models-route-via-openai-direct-with-verce): OpenAI models route via OpenAI direct with Vercel fallback; routed entries benefit from automatic provider
|
|
24201
24365
|
{
|
|
24202
24366
|
provider: "runtype",
|
|
@@ -24244,7 +24408,7 @@ var DEFAULT_MODELS_FOR_NEW_ACCOUNTS = [
|
|
|
24244
24408
|
// WHY(docs/why/packages/shared/src.md#google-models-route-via-google-direct-with-verte): Google models route via Google direct, with Vertex/Vercel fallback.
|
|
24245
24409
|
{
|
|
24246
24410
|
provider: "runtype",
|
|
24247
|
-
modelId: "gemini-3.
|
|
24411
|
+
modelId: "gemini-3.8-flash",
|
|
24248
24412
|
isDefault: true,
|
|
24249
24413
|
strengths: "Fast, low-cost, and natively multimodal with good reasoning, tool-use, and a 1M context \u2014 the account default and a strong choice for vision and high-throughput steps.",
|
|
24250
24414
|
bestFor: ["default", "vision", "fast-cheap", "agentic-tools", "long-context"]
|
|
@@ -24257,14 +24421,6 @@ var DEFAULT_MODELS_FOR_NEW_ACCOUNTS = [
|
|
|
24257
24421
|
strengths: "Specialised coding workhorse with strong tool-use, low cost, and a 1M context \u2014 ideal for code generation, debugging, and multi-file editing workflows.",
|
|
24258
24422
|
bestFor: ["agentic-tools", "long-context"]
|
|
24259
24423
|
},
|
|
24260
|
-
// WHY(docs/why/packages/shared/src.md#nvidia-nemotron-ultra-reasoning-tool-use-flagshi): NVIDIA Nemotron Ultra: reasoning + tool-use flagship, routed via Vercel.
|
|
24261
|
-
{
|
|
24262
|
-
provider: "runtype",
|
|
24263
|
-
modelId: "nemotron-3-ultra-550b-a55b",
|
|
24264
|
-
isDefault: false,
|
|
24265
|
-
strengths: "Large open-weight reasoning and tool-use flagship with a 1M context at a low price \u2014 strong analytical depth where an open model is preferred.",
|
|
24266
|
-
bestFor: ["deep-reasoning", "agentic-tools", "long-context"]
|
|
24267
|
-
},
|
|
24268
24424
|
// WHY(docs/why/packages/shared/src.md#deepseek-v4-flash-routes-via-cloudflare-workers): DeepSeek V4 Flash routes via Cloudflare Workers AI (bare name resolves to
|
|
24269
24425
|
{
|
|
24270
24426
|
provider: "runtype",
|
|
@@ -24280,6 +24436,22 @@ var DEFAULT_MODELS_FOR_NEW_ACCOUNTS = [
|
|
|
24280
24436
|
isDefault: false,
|
|
24281
24437
|
strengths: "Agentic flagship \u2014 best-in-class at long, multi-round tool-call loops and coding/agent workflows, with a 1M context; well suited to tool-heavy agent steps.",
|
|
24282
24438
|
bestFor: ["agentic-tools", "default", "deep-reasoning", "long-context"]
|
|
24439
|
+
},
|
|
24440
|
+
// WHY(packages/shared/src/provider-routing.ts): Z.ai GLM-5.3 Flash routes via Workers AI, with Vercel fallback.
|
|
24441
|
+
{
|
|
24442
|
+
provider: "runtype",
|
|
24443
|
+
modelId: "glm-5.3-flash",
|
|
24444
|
+
isDefault: false,
|
|
24445
|
+
strengths: "Fast, low-cost model with strong reasoning, tool-use, and a 1M context \u2014 well suited to high-throughput agentic steps and long documents.",
|
|
24446
|
+
bestFor: ["fast-cheap", "default", "agentic-tools", "long-context"]
|
|
24447
|
+
},
|
|
24448
|
+
// WHY(packages/shared/src/provider-routing.ts): Qwen 3.8 27B routes via Mixlayer, with Vercel fallback.
|
|
24449
|
+
{
|
|
24450
|
+
provider: "runtype",
|
|
24451
|
+
modelId: "qwen3.8-27b",
|
|
24452
|
+
isDefault: false,
|
|
24453
|
+
strengths: "Fast open-weight model with strong reasoning, tool-use, and a 262K context \u2014 well suited to agentic tasks and long documents.",
|
|
24454
|
+
bestFor: ["fast-cheap", "default", "deep-reasoning", "agentic-tools", "long-context"]
|
|
24283
24455
|
}
|
|
24284
24456
|
];
|
|
24285
24457
|
var DEFAULT_MODEL_ID = DEFAULT_MODELS_FOR_NEW_ACCOUNTS.find((m2) => m2.isDefault)?.modelId ?? "kimi-k2.6";
|
|
@@ -24767,7 +24939,7 @@ function unwrapVectorSourceTemplate(source) {
|
|
|
24767
24939
|
return inner;
|
|
24768
24940
|
}
|
|
24769
24941
|
|
|
24770
|
-
// ../shared/dist/chunk-
|
|
24942
|
+
// ../shared/dist/chunk-2M6BB7GC.mjs
|
|
24771
24943
|
var jsonPatchOperationSchema = external_exports.object({
|
|
24772
24944
|
op: external_exports.enum(["add", "remove", "replace", "move", "copy", "test"]),
|
|
24773
24945
|
/** JSON Pointer (RFC 6901) into the state document. `''` addresses the root. */
|
|
@@ -24881,13 +25053,20 @@ var unifiedExecutionErrorEventSchema = external_exports.object({
|
|
|
24881
25053
|
// WHY(docs/why/packages/shared/src/utils.md#blockreason-mirrors-platformkeyblockreason-in-mo): blockReason mirrors PlatformKeyBlockReason (in model-execution, which shared can't import) as a string, for
|
|
24882
25054
|
blockReason: external_exports.string().optional()
|
|
24883
25055
|
});
|
|
25056
|
+
var unifiedSubagentAttributionSchema = external_exports.object({
|
|
25057
|
+
toolName: external_exports.string(),
|
|
25058
|
+
agentName: external_exports.string().optional(),
|
|
25059
|
+
// WHY(docs/why/packages/shared/src/utils.md#parent-stream-correlation-id-the-subagent-tool-b): Parent-stream correlation id: the subagent tool bubble the client already saw, not the muted child's tool_use
|
|
25060
|
+
parentToolCallId: external_exports.string().optional()
|
|
25061
|
+
});
|
|
24884
25062
|
var unifiedTurnStartEventSchema = external_exports.object({
|
|
24885
25063
|
...unifiedBase,
|
|
24886
25064
|
type: external_exports.literal("turn_start"),
|
|
24887
25065
|
id: external_exports.string(),
|
|
24888
25066
|
iteration: external_exports.number().optional(),
|
|
24889
25067
|
turnIndex: external_exports.number().optional(),
|
|
24890
|
-
role: external_exports.enum(["user", "assistant", "system"])
|
|
25068
|
+
role: external_exports.enum(["user", "assistant", "system"]),
|
|
25069
|
+
subagent: unifiedSubagentAttributionSchema.optional()
|
|
24891
25070
|
});
|
|
24892
25071
|
var unifiedTurnCompleteEventSchema = external_exports.object({
|
|
24893
25072
|
...unifiedBase,
|
|
@@ -24901,7 +25080,8 @@ var unifiedTurnCompleteEventSchema = external_exports.object({
|
|
|
24901
25080
|
stopReason: wireStopReasonSchema.optional(),
|
|
24902
25081
|
completedAt: external_exports.string().optional(),
|
|
24903
25082
|
fallback: fallbackInfoSchema.optional(),
|
|
24904
|
-
estimatedContextBreakdown: estimatedContextBreakdownSchema.optional()
|
|
25083
|
+
estimatedContextBreakdown: estimatedContextBreakdownSchema.optional(),
|
|
25084
|
+
subagent: unifiedSubagentAttributionSchema.optional()
|
|
24905
25085
|
});
|
|
24906
25086
|
var unifiedStepStartEventSchema = external_exports.object({
|
|
24907
25087
|
...unifiedBase,
|
|
@@ -24912,7 +25092,8 @@ var unifiedStepStartEventSchema = external_exports.object({
|
|
|
24912
25092
|
index: external_exports.number().optional(),
|
|
24913
25093
|
totalSteps: external_exports.number().optional(),
|
|
24914
25094
|
startedAt: external_exports.string().optional(),
|
|
24915
|
-
outputVariable: external_exports.string().optional()
|
|
25095
|
+
outputVariable: external_exports.string().optional(),
|
|
25096
|
+
subagent: unifiedSubagentAttributionSchema.optional()
|
|
24916
25097
|
});
|
|
24917
25098
|
var unifiedStepCompleteEventSchema = external_exports.object({
|
|
24918
25099
|
...unifiedBase,
|
|
@@ -24932,7 +25113,8 @@ var unifiedStepCompleteEventSchema = external_exports.object({
|
|
|
24932
25113
|
unresolvedVariables: external_exports.array(external_exports.string()).optional(),
|
|
24933
25114
|
// WHY(docs/why/packages/shared/src/utils.md#tokensused-is-a-per-step-scalar-forwarded-from-t): tokensUsed is a per-step scalar forwarded from the flow engine; context/non-model steps omit it.
|
|
24934
25115
|
tokensUsed: external_exports.number().optional(),
|
|
24935
|
-
fallback: fallbackInfoSchema.optional()
|
|
25116
|
+
fallback: fallbackInfoSchema.optional(),
|
|
25117
|
+
subagent: unifiedSubagentAttributionSchema.optional()
|
|
24936
25118
|
});
|
|
24937
25119
|
var unifiedStepSkipEventSchema = external_exports.object({
|
|
24938
25120
|
...unifiedBase,
|
|
@@ -24953,19 +25135,22 @@ var unifiedTextStartEventSchema = external_exports.object({
|
|
|
24953
25135
|
turnId: external_exports.string().optional(),
|
|
24954
25136
|
stepId: external_exports.string().optional(),
|
|
24955
25137
|
// WHY(docs/why/packages/shared/src/utils.md#parenttoolcallid-routes-nested-flow-as-tool-text): parentToolCallId routes nested flow-as-tool text into the parent tool's row; absent for top-level text.
|
|
24956
|
-
parentToolCallId: external_exports.string().optional()
|
|
25138
|
+
parentToolCallId: external_exports.string().optional(),
|
|
25139
|
+
subagent: unifiedSubagentAttributionSchema.optional()
|
|
24957
25140
|
});
|
|
24958
25141
|
var unifiedTextDeltaEventSchema = external_exports.object({
|
|
24959
25142
|
...unifiedBase,
|
|
24960
25143
|
type: external_exports.literal("text_delta"),
|
|
24961
25144
|
id: external_exports.string(),
|
|
24962
|
-
delta: external_exports.string()
|
|
25145
|
+
delta: external_exports.string(),
|
|
25146
|
+
subagent: unifiedSubagentAttributionSchema.optional()
|
|
24963
25147
|
});
|
|
24964
25148
|
var unifiedTextCompleteEventSchema = external_exports.object({
|
|
24965
25149
|
...unifiedBase,
|
|
24966
25150
|
type: external_exports.literal("text_complete"),
|
|
24967
25151
|
id: external_exports.string(),
|
|
24968
|
-
text: external_exports.string().optional()
|
|
25152
|
+
text: external_exports.string().optional(),
|
|
25153
|
+
subagent: unifiedSubagentAttributionSchema.optional()
|
|
24969
25154
|
});
|
|
24970
25155
|
var unifiedReasoningStartEventSchema = external_exports.object({
|
|
24971
25156
|
...unifiedBase,
|
|
@@ -24974,20 +25159,23 @@ var unifiedReasoningStartEventSchema = external_exports.object({
|
|
|
24974
25159
|
// WHY(docs/why/packages/shared/src/utils.md#scope-loop-marks-loop-level-reflection-e3-fold-d): scope:'loop' marks loop-level reflection (E3 fold); default renders as thinking.
|
|
24975
25160
|
scope: external_exports.enum(["turn", "loop"]).optional(),
|
|
24976
25161
|
// WHY(docs/why/packages/shared/src/utils.md#parenttoolcallid-mirrors-text-starts-field-routi): parentToolCallId mirrors text_start's field, routing nested reasoning into the parent tool's row.
|
|
24977
|
-
parentToolCallId: external_exports.string().optional()
|
|
25162
|
+
parentToolCallId: external_exports.string().optional(),
|
|
25163
|
+
subagent: unifiedSubagentAttributionSchema.optional()
|
|
24978
25164
|
});
|
|
24979
25165
|
var unifiedReasoningDeltaEventSchema = external_exports.object({
|
|
24980
25166
|
...unifiedBase,
|
|
24981
25167
|
type: external_exports.literal("reasoning_delta"),
|
|
24982
25168
|
id: external_exports.string(),
|
|
24983
|
-
delta: external_exports.string()
|
|
25169
|
+
delta: external_exports.string(),
|
|
25170
|
+
subagent: unifiedSubagentAttributionSchema.optional()
|
|
24984
25171
|
});
|
|
24985
25172
|
var unifiedReasoningCompleteEventSchema = external_exports.object({
|
|
24986
25173
|
...unifiedBase,
|
|
24987
25174
|
type: external_exports.literal("reasoning_complete"),
|
|
24988
25175
|
id: external_exports.string(),
|
|
24989
25176
|
text: external_exports.string().optional(),
|
|
24990
|
-
scope: external_exports.enum(["turn", "loop"]).optional()
|
|
25177
|
+
scope: external_exports.enum(["turn", "loop"]).optional(),
|
|
25178
|
+
subagent: unifiedSubagentAttributionSchema.optional()
|
|
24991
25179
|
});
|
|
24992
25180
|
var unifiedMediaStartEventSchema = external_exports.object({
|
|
24993
25181
|
...unifiedBase,
|
|
@@ -25092,13 +25280,15 @@ var unifiedToolStartEventSchema = external_exports.object({
|
|
|
25092
25280
|
hiddenParameterNames: external_exports.array(external_exports.string()).optional(),
|
|
25093
25281
|
startedAt: external_exports.string().optional(),
|
|
25094
25282
|
origin: external_exports.enum(["webmcp", "sdk"]).optional(),
|
|
25095
|
-
pageOrigin: external_exports.string().optional()
|
|
25283
|
+
pageOrigin: external_exports.string().optional(),
|
|
25284
|
+
subagent: unifiedSubagentAttributionSchema.optional()
|
|
25096
25285
|
});
|
|
25097
25286
|
var unifiedToolInputDeltaEventSchema = external_exports.object({
|
|
25098
25287
|
...unifiedBase,
|
|
25099
25288
|
type: external_exports.literal("tool_input_delta"),
|
|
25100
25289
|
toolCallId: external_exports.string(),
|
|
25101
|
-
delta: external_exports.string()
|
|
25290
|
+
delta: external_exports.string(),
|
|
25291
|
+
subagent: unifiedSubagentAttributionSchema.optional()
|
|
25102
25292
|
});
|
|
25103
25293
|
var unifiedToolInputCompleteEventSchema = external_exports.object({
|
|
25104
25294
|
...unifiedBase,
|
|
@@ -25106,7 +25296,8 @@ var unifiedToolInputCompleteEventSchema = external_exports.object({
|
|
|
25106
25296
|
toolCallId: external_exports.string(),
|
|
25107
25297
|
toolName: external_exports.string().optional(),
|
|
25108
25298
|
parameters: external_exports.record(external_exports.string(), external_exports.unknown()),
|
|
25109
|
-
hiddenParameterNames: external_exports.array(external_exports.string()).optional()
|
|
25299
|
+
hiddenParameterNames: external_exports.array(external_exports.string()).optional(),
|
|
25300
|
+
subagent: unifiedSubagentAttributionSchema.optional()
|
|
25110
25301
|
});
|
|
25111
25302
|
var unifiedToolOutputDeltaEventSchema = external_exports.object({
|
|
25112
25303
|
...unifiedBase,
|
|
@@ -25128,13 +25319,8 @@ var unifiedToolCompleteEventSchema = external_exports.object({
|
|
|
25128
25319
|
iteration: external_exports.number().optional(),
|
|
25129
25320
|
stepId: external_exports.string().optional(),
|
|
25130
25321
|
// WHY(docs/why/packages/shared/src/utils.md#toolcost-is-debug-only-forwarded-from-flow-tool): toolCost is debug-only, forwarded from flow tool_complete; FilteredStream strips it for user-facing streams.
|
|
25131
|
-
toolCost: external_exports.number().optional()
|
|
25132
|
-
|
|
25133
|
-
var unifiedSubagentAttributionSchema = external_exports.object({
|
|
25134
|
-
toolName: external_exports.string(),
|
|
25135
|
-
agentName: external_exports.string().optional(),
|
|
25136
|
-
// WHY(docs/why/packages/shared/src/utils.md#parent-stream-correlation-id-the-subagent-tool-b): Parent-stream correlation id: the subagent tool bubble the client already saw, not the muted child's tool_use
|
|
25137
|
-
parentToolCallId: external_exports.string().optional()
|
|
25322
|
+
toolCost: external_exports.number().optional(),
|
|
25323
|
+
subagent: unifiedSubagentAttributionSchema.optional()
|
|
25138
25324
|
});
|
|
25139
25325
|
var unifiedApprovalStartEventSchema = external_exports.object({
|
|
25140
25326
|
...unifiedBase,
|
|
@@ -25295,7 +25481,7 @@ var UNIFIED_SSE_EVENT_TYPES = _unifiedTuple([
|
|
|
25295
25481
|
"custom"
|
|
25296
25482
|
]);
|
|
25297
25483
|
|
|
25298
|
-
// ../shared/dist/chunk-
|
|
25484
|
+
// ../shared/dist/chunk-B4DUH7XO.mjs
|
|
25299
25485
|
var mediaAnnotationsSchema = external_exports.object({
|
|
25300
25486
|
audience: external_exports.array(external_exports.enum(["user", "assistant"])).optional()
|
|
25301
25487
|
});
|
|
@@ -26353,67 +26539,256 @@ function neutralizeCsvFormula(value) {
|
|
|
26353
26539
|
if (STRICT_NUMBER.test(value)) return value;
|
|
26354
26540
|
return `'${value}`;
|
|
26355
26541
|
}
|
|
26542
|
+
var voiceInterruptionModeSchema = external_exports.enum(["none", "cancel", "barge-in"]);
|
|
26543
|
+
var voiceEndpointingStrategySchema = external_exports.enum([
|
|
26544
|
+
"provider_vad",
|
|
26545
|
+
"server_vad",
|
|
26546
|
+
"client_commit",
|
|
26547
|
+
"manual"
|
|
26548
|
+
]);
|
|
26549
|
+
var voiceSpeechModeSchema = external_exports.enum(["pipeline", "speech_to_speech", "provider_managed"]);
|
|
26550
|
+
var speechProviderSchema = external_exports.string().trim().min(1);
|
|
26551
|
+
var voiceSpeechProfileSchema = external_exports.object({
|
|
26552
|
+
mode: voiceSpeechModeSchema,
|
|
26553
|
+
transcriber: external_exports.object({
|
|
26554
|
+
provider: speechProviderSchema,
|
|
26555
|
+
model: external_exports.string().trim().min(1).optional()
|
|
26556
|
+
}).strict(),
|
|
26557
|
+
synthesizer: external_exports.object({
|
|
26558
|
+
provider: speechProviderSchema,
|
|
26559
|
+
model: external_exports.string().trim().min(1).optional(),
|
|
26560
|
+
voiceId: external_exports.string().trim().min(1).optional(),
|
|
26561
|
+
settings: external_exports.object({
|
|
26562
|
+
stability: external_exports.number().min(0).max(1).optional(),
|
|
26563
|
+
similarity: external_exports.number().min(0).max(1).optional()
|
|
26564
|
+
}).strict().optional()
|
|
26565
|
+
}).strict()
|
|
26566
|
+
}).strict();
|
|
26567
|
+
var canonicalAgentVoiceProfileSchema = external_exports.object({
|
|
26568
|
+
enabled: external_exports.boolean().optional(),
|
|
26569
|
+
greeting: external_exports.string().max(2e3).optional(),
|
|
26570
|
+
language: external_exports.string().trim().min(1).max(64).optional(),
|
|
26571
|
+
interruptionMode: voiceInterruptionModeSchema.optional(),
|
|
26572
|
+
endpointing: external_exports.object({
|
|
26573
|
+
strategy: voiceEndpointingStrategySchema,
|
|
26574
|
+
silenceMs: external_exports.number().int().min(0).max(3e4).optional()
|
|
26575
|
+
}).strict().optional(),
|
|
26576
|
+
speech: voiceSpeechProfileSchema.optional()
|
|
26577
|
+
}).strict();
|
|
26578
|
+
var legacyElevenLabsSchema = external_exports.object({
|
|
26579
|
+
voiceId: external_exports.string().trim().min(1).optional(),
|
|
26580
|
+
modelId: external_exports.string().trim().min(1).optional(),
|
|
26581
|
+
stability: external_exports.number().min(0).max(1).optional(),
|
|
26582
|
+
similarity: external_exports.number().min(0).max(1).optional()
|
|
26583
|
+
}).strict();
|
|
26584
|
+
var dualVoiceProfileSchema = canonicalAgentVoiceProfileSchema.extend({
|
|
26585
|
+
provider: external_exports.string().trim().min(1).optional(),
|
|
26586
|
+
elevenLabs: legacyElevenLabsSchema.optional()
|
|
26587
|
+
}).superRefine((profile, context) => {
|
|
26588
|
+
const hasLegacy = profile.provider !== void 0 || profile.elevenLabs !== void 0;
|
|
26589
|
+
if (!hasLegacy) return;
|
|
26590
|
+
const provider = profile.provider ?? "elevenlabs";
|
|
26591
|
+
if (provider !== "elevenlabs" && provider !== "cloudflare") {
|
|
26592
|
+
context.addIssue({
|
|
26593
|
+
code: "custom",
|
|
26594
|
+
path: ["provider"],
|
|
26595
|
+
message: `Unsupported legacy voice provider: ${provider}`
|
|
26596
|
+
});
|
|
26597
|
+
return;
|
|
26598
|
+
}
|
|
26599
|
+
if (profile.speech) {
|
|
26600
|
+
const legacySpeech = speechProfileFromLegacy(provider, profile.elevenLabs);
|
|
26601
|
+
if (!speechProfilesSemanticallyEqual(legacySpeech, profile.speech)) {
|
|
26602
|
+
context.addIssue({
|
|
26603
|
+
code: "custom",
|
|
26604
|
+
path: ["speech"],
|
|
26605
|
+
message: "Legacy and canonical voice speech settings must be semantically identical."
|
|
26606
|
+
});
|
|
26607
|
+
}
|
|
26608
|
+
}
|
|
26609
|
+
}).transform((profile) => {
|
|
26610
|
+
const { provider, elevenLabs, ...canonical } = profile;
|
|
26611
|
+
if (canonical.speech || provider === void 0 && elevenLabs === void 0) return canonical;
|
|
26612
|
+
return {
|
|
26613
|
+
...canonical,
|
|
26614
|
+
speech: speechProfileFromLegacy(provider ?? "elevenlabs", elevenLabs)
|
|
26615
|
+
};
|
|
26616
|
+
});
|
|
26617
|
+
var agentVoiceProfileSchema = dualVoiceProfileSchema;
|
|
26618
|
+
var DEFAULT_ELEVENLABS_VOICE_SPEECH_PROFILE = Object.freeze({
|
|
26619
|
+
mode: "pipeline",
|
|
26620
|
+
transcriber: Object.freeze({ provider: "elevenlabs", model: "scribe_v2_realtime" }),
|
|
26621
|
+
synthesizer: Object.freeze({
|
|
26622
|
+
provider: "elevenlabs",
|
|
26623
|
+
model: "eleven_flash_v2_5",
|
|
26624
|
+
voiceId: "rachel",
|
|
26625
|
+
settings: Object.freeze({ stability: 0.5, similarity: 0.75 })
|
|
26626
|
+
})
|
|
26627
|
+
});
|
|
26628
|
+
var DEFAULT_CLOUDFLARE_VOICE_SPEECH_PROFILE = Object.freeze({
|
|
26629
|
+
mode: "pipeline",
|
|
26630
|
+
transcriber: Object.freeze({ provider: "cloudflare", model: "workers-ai-flux" }),
|
|
26631
|
+
synthesizer: Object.freeze({
|
|
26632
|
+
provider: "cloudflare",
|
|
26633
|
+
model: "@cf/deepgram/aura-1",
|
|
26634
|
+
voiceId: "asteria"
|
|
26635
|
+
})
|
|
26636
|
+
});
|
|
26637
|
+
function resolveVoiceSpeechProfile(profile, managedDefault = DEFAULT_ELEVENLABS_VOICE_SPEECH_PROFILE) {
|
|
26638
|
+
if (!profile.speech) return managedDefault;
|
|
26639
|
+
const defaults = profile.speech.transcriber.provider === "cloudflare" && profile.speech.synthesizer.provider === "cloudflare" ? DEFAULT_CLOUDFLARE_VOICE_SPEECH_PROFILE : profile.speech.transcriber.provider === "elevenlabs" && profile.speech.synthesizer.provider === "elevenlabs" ? DEFAULT_ELEVENLABS_VOICE_SPEECH_PROFILE : void 0;
|
|
26640
|
+
return {
|
|
26641
|
+
mode: profile.speech.mode,
|
|
26642
|
+
transcriber: {
|
|
26643
|
+
provider: profile.speech.transcriber.provider,
|
|
26644
|
+
...profile.speech.transcriber.model ?? defaults?.transcriber.model ? { model: profile.speech.transcriber.model ?? defaults?.transcriber.model } : {}
|
|
26645
|
+
},
|
|
26646
|
+
synthesizer: {
|
|
26647
|
+
provider: profile.speech.synthesizer.provider,
|
|
26648
|
+
...profile.speech.synthesizer.model ?? defaults?.synthesizer.model ? { model: profile.speech.synthesizer.model ?? defaults?.synthesizer.model } : {},
|
|
26649
|
+
...profile.speech.synthesizer.voiceId ?? defaults?.synthesizer.voiceId ? { voiceId: profile.speech.synthesizer.voiceId ?? defaults?.synthesizer.voiceId } : {},
|
|
26650
|
+
...profile.speech.synthesizer.settings ?? defaults?.synthesizer.settings ? {
|
|
26651
|
+
settings: {
|
|
26652
|
+
...defaults?.synthesizer.settings,
|
|
26653
|
+
...profile.speech.synthesizer.settings
|
|
26654
|
+
}
|
|
26655
|
+
} : {}
|
|
26656
|
+
}
|
|
26657
|
+
};
|
|
26658
|
+
}
|
|
26659
|
+
function speechProfileFromLegacy(provider, elevenLabs) {
|
|
26660
|
+
if (provider === "cloudflare") return DEFAULT_CLOUDFLARE_VOICE_SPEECH_PROFILE;
|
|
26661
|
+
return {
|
|
26662
|
+
mode: "pipeline",
|
|
26663
|
+
transcriber: { ...DEFAULT_ELEVENLABS_VOICE_SPEECH_PROFILE.transcriber },
|
|
26664
|
+
synthesizer: {
|
|
26665
|
+
...DEFAULT_ELEVENLABS_VOICE_SPEECH_PROFILE.synthesizer,
|
|
26666
|
+
...elevenLabs?.voiceId ? { voiceId: elevenLabs.voiceId } : {},
|
|
26667
|
+
...elevenLabs?.modelId ? { model: elevenLabs.modelId } : {},
|
|
26668
|
+
settings: {
|
|
26669
|
+
...DEFAULT_ELEVENLABS_VOICE_SPEECH_PROFILE.synthesizer.settings,
|
|
26670
|
+
...elevenLabs?.stability === void 0 ? {} : { stability: elevenLabs.stability },
|
|
26671
|
+
...elevenLabs?.similarity === void 0 ? {} : { similarity: elevenLabs.similarity }
|
|
26672
|
+
}
|
|
26673
|
+
}
|
|
26674
|
+
};
|
|
26675
|
+
}
|
|
26676
|
+
function speechProfilesSemanticallyEqual(legacy, canonical) {
|
|
26677
|
+
const resolved = resolveVoiceSpeechProfile({ speech: canonical });
|
|
26678
|
+
return JSON.stringify(legacy) === JSON.stringify(resolved);
|
|
26679
|
+
}
|
|
26356
26680
|
var REPLAY_FROM_START = Object.freeze({
|
|
26357
26681
|
row: 0,
|
|
26358
26682
|
sub: Number.POSITIVE_INFINITY
|
|
26359
26683
|
});
|
|
26684
|
+
var agUiEventBase = {
|
|
26685
|
+
// INVARIANT: Metadata is absent or an object; an explicit null fails the spec parse.
|
|
26686
|
+
metadata: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
|
|
26687
|
+
};
|
|
26688
|
+
var agUiInterruptSchema = external_exports.object({
|
|
26689
|
+
id: external_exports.string(),
|
|
26690
|
+
reason: external_exports.string(),
|
|
26691
|
+
message: external_exports.string().optional(),
|
|
26692
|
+
toolCallId: external_exports.string().optional(),
|
|
26693
|
+
responseSchema: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
26694
|
+
expiresAt: external_exports.string().optional(),
|
|
26695
|
+
metadata: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
26696
|
+
subagentRunId: external_exports.string().optional()
|
|
26697
|
+
});
|
|
26698
|
+
var agUiRunFinishedSuccessOutcomeSchema = external_exports.object({ type: external_exports.literal("success") });
|
|
26699
|
+
var agUiRunFinishedInterruptOutcomeSchema = external_exports.object({
|
|
26700
|
+
type: external_exports.literal("interrupt"),
|
|
26701
|
+
interrupts: external_exports.array(agUiInterruptSchema).min(1)
|
|
26702
|
+
});
|
|
26703
|
+
var agUiRunFinishedOutcomeSchema = external_exports.discriminatedUnion("type", [
|
|
26704
|
+
agUiRunFinishedSuccessOutcomeSchema,
|
|
26705
|
+
agUiRunFinishedInterruptOutcomeSchema
|
|
26706
|
+
]);
|
|
26707
|
+
var agUiTokenUsageSchema = external_exports.object({
|
|
26708
|
+
provider: external_exports.string().optional(),
|
|
26709
|
+
model: external_exports.string().optional(),
|
|
26710
|
+
inputTokens: external_exports.number().int().nonnegative().optional(),
|
|
26711
|
+
outputTokens: external_exports.number().int().nonnegative().optional(),
|
|
26712
|
+
totalTokens: external_exports.number().int().nonnegative().optional(),
|
|
26713
|
+
reasoningTokens: external_exports.number().int().nonnegative().optional(),
|
|
26714
|
+
cachedInputTokens: external_exports.number().int().nonnegative().optional()
|
|
26715
|
+
});
|
|
26360
26716
|
var agUiRoleSchema = external_exports.enum(["developer", "system", "assistant", "user", "tool"]);
|
|
26361
26717
|
var runStartedEventSchema = external_exports.object({
|
|
26718
|
+
...agUiEventBase,
|
|
26362
26719
|
type: external_exports.literal("RUN_STARTED"),
|
|
26363
26720
|
threadId: external_exports.string(),
|
|
26364
26721
|
runId: external_exports.string()
|
|
26365
26722
|
});
|
|
26366
26723
|
var runFinishedEventSchema = external_exports.object({
|
|
26724
|
+
...agUiEventBase,
|
|
26367
26725
|
type: external_exports.literal("RUN_FINISHED"),
|
|
26368
26726
|
threadId: external_exports.string(),
|
|
26369
26727
|
runId: external_exports.string(),
|
|
26370
|
-
result: external_exports.unknown().optional()
|
|
26728
|
+
result: external_exports.unknown().optional(),
|
|
26729
|
+
// WHY(docs/features/planning/2026-09-02-ag-ui-dojo-conformance-gaps.md): Absent reads as success to every spec client, so success runs stay outcome-less.
|
|
26730
|
+
outcome: agUiRunFinishedOutcomeSchema.optional(),
|
|
26731
|
+
usage: external_exports.array(agUiTokenUsageSchema).optional()
|
|
26371
26732
|
});
|
|
26372
26733
|
var runErrorEventSchema = external_exports.object({
|
|
26734
|
+
...agUiEventBase,
|
|
26373
26735
|
type: external_exports.literal("RUN_ERROR"),
|
|
26374
26736
|
message: external_exports.string(),
|
|
26375
|
-
code: external_exports.string().optional()
|
|
26737
|
+
code: external_exports.string().optional(),
|
|
26738
|
+
usage: external_exports.array(agUiTokenUsageSchema).optional()
|
|
26376
26739
|
});
|
|
26377
26740
|
var stepStartedEventSchema = external_exports.object({
|
|
26741
|
+
...agUiEventBase,
|
|
26378
26742
|
type: external_exports.literal("STEP_STARTED"),
|
|
26379
26743
|
stepName: external_exports.string()
|
|
26380
26744
|
});
|
|
26381
26745
|
var stepFinishedEventSchema = external_exports.object({
|
|
26746
|
+
...agUiEventBase,
|
|
26382
26747
|
type: external_exports.literal("STEP_FINISHED"),
|
|
26383
26748
|
stepName: external_exports.string()
|
|
26384
26749
|
});
|
|
26385
26750
|
var textMessageStartEventSchema = external_exports.object({
|
|
26751
|
+
...agUiEventBase,
|
|
26386
26752
|
type: external_exports.literal("TEXT_MESSAGE_START"),
|
|
26387
26753
|
messageId: external_exports.string(),
|
|
26388
|
-
role: agUiRoleSchema
|
|
26754
|
+
role: agUiRoleSchema,
|
|
26755
|
+
subagentRunId: external_exports.string().optional()
|
|
26389
26756
|
});
|
|
26390
26757
|
var textMessageContentEventSchema = external_exports.object({
|
|
26758
|
+
...agUiEventBase,
|
|
26391
26759
|
type: external_exports.literal("TEXT_MESSAGE_CONTENT"),
|
|
26392
26760
|
messageId: external_exports.string(),
|
|
26393
26761
|
/** Non-empty incremental text. */
|
|
26394
26762
|
delta: external_exports.string()
|
|
26395
26763
|
});
|
|
26396
26764
|
var textMessageEndEventSchema = external_exports.object({
|
|
26765
|
+
...agUiEventBase,
|
|
26397
26766
|
type: external_exports.literal("TEXT_MESSAGE_END"),
|
|
26398
|
-
messageId: external_exports.string()
|
|
26767
|
+
messageId: external_exports.string(),
|
|
26768
|
+
subagentRunId: external_exports.string().optional()
|
|
26399
26769
|
});
|
|
26400
26770
|
var toolCallStartEventSchema = external_exports.object({
|
|
26771
|
+
...agUiEventBase,
|
|
26401
26772
|
type: external_exports.literal("TOOL_CALL_START"),
|
|
26402
26773
|
toolCallId: external_exports.string(),
|
|
26403
26774
|
toolCallName: external_exports.string(),
|
|
26404
|
-
parentMessageId: external_exports.string().optional()
|
|
26775
|
+
parentMessageId: external_exports.string().optional(),
|
|
26776
|
+
subagentRunId: external_exports.string().optional()
|
|
26405
26777
|
});
|
|
26406
26778
|
var toolCallArgsEventSchema = external_exports.object({
|
|
26779
|
+
...agUiEventBase,
|
|
26407
26780
|
type: external_exports.literal("TOOL_CALL_ARGS"),
|
|
26408
26781
|
toolCallId: external_exports.string(),
|
|
26409
26782
|
/** Incremental (or, for non-streaming providers, complete) JSON-text of args. */
|
|
26410
26783
|
delta: external_exports.string()
|
|
26411
26784
|
});
|
|
26412
26785
|
var toolCallEndEventSchema = external_exports.object({
|
|
26786
|
+
...agUiEventBase,
|
|
26413
26787
|
type: external_exports.literal("TOOL_CALL_END"),
|
|
26414
26788
|
toolCallId: external_exports.string()
|
|
26415
26789
|
});
|
|
26416
26790
|
var toolCallResultEventSchema = external_exports.object({
|
|
26791
|
+
...agUiEventBase,
|
|
26417
26792
|
type: external_exports.literal("TOOL_CALL_RESULT"),
|
|
26418
26793
|
messageId: external_exports.string(),
|
|
26419
26794
|
toolCallId: external_exports.string(),
|
|
@@ -26421,37 +26796,83 @@ var toolCallResultEventSchema = external_exports.object({
|
|
|
26421
26796
|
role: external_exports.literal("tool").optional()
|
|
26422
26797
|
});
|
|
26423
26798
|
var stateSnapshotEventSchema = external_exports.object({
|
|
26799
|
+
...agUiEventBase,
|
|
26424
26800
|
type: external_exports.literal("STATE_SNAPSHOT"),
|
|
26425
26801
|
snapshot: external_exports.record(external_exports.string(), external_exports.unknown())
|
|
26426
26802
|
});
|
|
26427
26803
|
var stateDeltaEventSchema = external_exports.object({
|
|
26804
|
+
...agUiEventBase,
|
|
26428
26805
|
type: external_exports.literal("STATE_DELTA"),
|
|
26429
26806
|
delta: jsonPatchSchema
|
|
26430
26807
|
});
|
|
26431
26808
|
var reasoningStartEventSchema = external_exports.object({
|
|
26809
|
+
...agUiEventBase,
|
|
26432
26810
|
type: external_exports.literal("REASONING_START"),
|
|
26433
|
-
messageId: external_exports.string()
|
|
26811
|
+
messageId: external_exports.string(),
|
|
26812
|
+
subagentRunId: external_exports.string().optional()
|
|
26434
26813
|
});
|
|
26435
26814
|
var reasoningMessageStartEventSchema = external_exports.object({
|
|
26815
|
+
...agUiEventBase,
|
|
26436
26816
|
type: external_exports.literal("REASONING_MESSAGE_START"),
|
|
26437
26817
|
messageId: external_exports.string(),
|
|
26438
|
-
role: external_exports.literal("reasoning")
|
|
26818
|
+
role: external_exports.literal("reasoning"),
|
|
26819
|
+
subagentRunId: external_exports.string().optional()
|
|
26439
26820
|
});
|
|
26440
26821
|
var reasoningMessageContentEventSchema = external_exports.object({
|
|
26822
|
+
...agUiEventBase,
|
|
26441
26823
|
type: external_exports.literal("REASONING_MESSAGE_CONTENT"),
|
|
26442
26824
|
messageId: external_exports.string(),
|
|
26443
26825
|
/** Non-empty incremental reasoning text. */
|
|
26444
|
-
delta: external_exports.string()
|
|
26826
|
+
delta: external_exports.string(),
|
|
26827
|
+
subagentRunId: external_exports.string().optional()
|
|
26445
26828
|
});
|
|
26446
26829
|
var reasoningMessageEndEventSchema = external_exports.object({
|
|
26830
|
+
...agUiEventBase,
|
|
26447
26831
|
type: external_exports.literal("REASONING_MESSAGE_END"),
|
|
26448
|
-
messageId: external_exports.string()
|
|
26832
|
+
messageId: external_exports.string(),
|
|
26833
|
+
subagentRunId: external_exports.string().optional()
|
|
26449
26834
|
});
|
|
26450
26835
|
var reasoningEndEventSchema = external_exports.object({
|
|
26836
|
+
...agUiEventBase,
|
|
26451
26837
|
type: external_exports.literal("REASONING_END"),
|
|
26452
|
-
messageId: external_exports.string()
|
|
26838
|
+
messageId: external_exports.string(),
|
|
26839
|
+
subagentRunId: external_exports.string().optional()
|
|
26840
|
+
});
|
|
26841
|
+
var subagentStartedEventSchema = external_exports.object({
|
|
26842
|
+
...agUiEventBase,
|
|
26843
|
+
type: external_exports.literal("SUBAGENT_STARTED"),
|
|
26844
|
+
subagentRunId: external_exports.string(),
|
|
26845
|
+
name: external_exports.string(),
|
|
26846
|
+
description: external_exports.string().optional(),
|
|
26847
|
+
parentSubagentRunId: external_exports.string().optional(),
|
|
26848
|
+
parentToolCallId: external_exports.string().optional(),
|
|
26849
|
+
parentMessageId: external_exports.string().optional()
|
|
26850
|
+
});
|
|
26851
|
+
var subagentFinishedSuccessOutcomeSchema = external_exports.object({ type: external_exports.literal("success") });
|
|
26852
|
+
var subagentFinishedSuspendedOutcomeSchema = external_exports.object({
|
|
26853
|
+
type: external_exports.literal("suspended"),
|
|
26854
|
+
interruptIds: external_exports.array(external_exports.string()).optional()
|
|
26855
|
+
});
|
|
26856
|
+
var subagentFinishedOutcomeSchema = external_exports.discriminatedUnion("type", [
|
|
26857
|
+
subagentFinishedSuccessOutcomeSchema,
|
|
26858
|
+
subagentFinishedSuspendedOutcomeSchema
|
|
26859
|
+
]);
|
|
26860
|
+
var subagentFinishedEventSchema = external_exports.object({
|
|
26861
|
+
...agUiEventBase,
|
|
26862
|
+
type: external_exports.literal("SUBAGENT_FINISHED"),
|
|
26863
|
+
subagentRunId: external_exports.string(),
|
|
26864
|
+
result: external_exports.unknown().optional(),
|
|
26865
|
+
outcome: subagentFinishedOutcomeSchema.optional()
|
|
26866
|
+
});
|
|
26867
|
+
var subagentErrorEventSchema = external_exports.object({
|
|
26868
|
+
...agUiEventBase,
|
|
26869
|
+
type: external_exports.literal("SUBAGENT_ERROR"),
|
|
26870
|
+
subagentRunId: external_exports.string(),
|
|
26871
|
+
message: external_exports.string(),
|
|
26872
|
+
code: external_exports.string().optional()
|
|
26453
26873
|
});
|
|
26454
26874
|
var customEventSchema = external_exports.object({
|
|
26875
|
+
...agUiEventBase,
|
|
26455
26876
|
type: external_exports.literal("CUSTOM"),
|
|
26456
26877
|
name: external_exports.string(),
|
|
26457
26878
|
value: external_exports.unknown()
|
|
@@ -26476,6 +26897,9 @@ var agUiSSEEventSchema = external_exports.discriminatedUnion("type", [
|
|
|
26476
26897
|
reasoningMessageContentEventSchema,
|
|
26477
26898
|
reasoningMessageEndEventSchema,
|
|
26478
26899
|
reasoningEndEventSchema,
|
|
26900
|
+
subagentStartedEventSchema,
|
|
26901
|
+
subagentFinishedEventSchema,
|
|
26902
|
+
subagentErrorEventSchema,
|
|
26479
26903
|
customEventSchema
|
|
26480
26904
|
]);
|
|
26481
26905
|
function isRecord(value) {
|
|
@@ -26504,7 +26928,8 @@ var AGENT_CONTENT_CONFIG_KEYS = {
|
|
|
26504
26928
|
memory: true,
|
|
26505
26929
|
sandbox: true,
|
|
26506
26930
|
tenancyStrategy: true,
|
|
26507
|
-
durability: true
|
|
26931
|
+
durability: true,
|
|
26932
|
+
state: true
|
|
26508
26933
|
};
|
|
26509
26934
|
var AGENT_CONTENT_CONFIG_KEY_LIST = Object.keys(AGENT_CONTENT_CONFIG_KEYS).sort();
|
|
26510
26935
|
function stripTrailingChars(value, char) {
|
|
@@ -26522,6 +26947,18 @@ function isReservedRuntypeToolName(name) {
|
|
|
26522
26947
|
function reservedToolNameMessage(subject, name) {
|
|
26523
26948
|
return `${subject} "${name}" collides with the reserved tool name "${RUNTYPE_SET_STATE_TOOL_NAME}" (the agent state write tool). Tool names are lowercased and non-alphanumeric characters become "_" before the model sees them, so every spelling that normalizes to it is reserved with it. "runtype_" is a reserved tool namespace. Rename the tool.`;
|
|
26524
26949
|
}
|
|
26950
|
+
var CLIENT_EXECUTED_TOOL_TYPES = /* @__PURE__ */ new Set(["local", "webmcp"]);
|
|
26951
|
+
function isClientExecutedToolType(toolType) {
|
|
26952
|
+
return typeof toolType === "string" && CLIENT_EXECUTED_TOOL_TYPES.has(toolType);
|
|
26953
|
+
}
|
|
26954
|
+
function productSurfacePauseReasonsFromFacts(facts, includeApproval) {
|
|
26955
|
+
const reasons = [];
|
|
26956
|
+
if (facts.hasClientExecutedTools) reasons.push("client-executed tools");
|
|
26957
|
+
if (includeApproval && facts.hasApprovalSteps) reasons.push("approval gates");
|
|
26958
|
+
if (facts.stepTypes.includes("wait-until")) reasons.push("wait-until steps");
|
|
26959
|
+
if (facts.stepTypes.includes("crawl")) reasons.push("crawl steps");
|
|
26960
|
+
return reasons;
|
|
26961
|
+
}
|
|
26525
26962
|
function isCatalogToolCallStepToolId(toolId) {
|
|
26526
26963
|
return isBuiltInToolId(toolId) || isPlatformToolId(toolId);
|
|
26527
26964
|
}
|
|
@@ -26825,6 +27262,28 @@ var MAX_MESSAGE_CONTENT_BYTES = 1024 * 1024;
|
|
|
26825
27262
|
var MAX_MESSAGES_TOTAL_BYTES = 32 * 1024 * 1024;
|
|
26826
27263
|
var encoder = new TextEncoder();
|
|
26827
27264
|
var UNEVALUATED_VERDICT = Object.freeze({ status: "unevaluated" });
|
|
27265
|
+
var AGENT_STATE_DEFAULT_MERGE_STRATEGY = "merge";
|
|
27266
|
+
var agentPredictStateMappingSchema = external_exports.object({
|
|
27267
|
+
/** Top-level state key the predicted argument projects into. */
|
|
27268
|
+
stateKey: external_exports.string().min(1),
|
|
27269
|
+
// WHY(docs/why/packages/shared/src.md#the-tool-may-be-one-the-agent-never-declares-the): The tool may be one the agent never declares: the canonical demo predicts from a CLIENT-declared frontend tool.
|
|
27270
|
+
/** Name of the tool whose arguments are predicted from. */
|
|
27271
|
+
tool: external_exports.string().min(1),
|
|
27272
|
+
/** Argument of that tool carrying the predicted value. */
|
|
27273
|
+
toolArgument: external_exports.string().min(1)
|
|
27274
|
+
});
|
|
27275
|
+
var agentStateChannelSchema = external_exports.object({
|
|
27276
|
+
/** Initial state when a run starts with no client-supplied state. */
|
|
27277
|
+
initial: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
27278
|
+
/** Optional JSON Schema describing the state shape (documentation + client codegen). */
|
|
27279
|
+
schema: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
27280
|
+
// WHY(docs/why/packages/shared/src.md#how-client-supplied-state-merges-with-the-agents): How client-supplied state merges with the agent's own: `'replace'` (the client's state wins wholesale) or
|
|
27281
|
+
/** How client-supplied state merges with the agent's own: `'replace'` (the client's state wins wholesale) or `'merge'` (shallow last-writer-wins per top-level key). */
|
|
27282
|
+
mergeStrategy: external_exports.enum(["replace", "merge"]).default(AGENT_STATE_DEFAULT_MERGE_STRATEGY),
|
|
27283
|
+
// WHY(docs/why/packages/shared/src.md#the-mapping-is-server-authored-because-only-the-a): The mapping is server-authored because only the agent knows which argument feeds which state key.
|
|
27284
|
+
/** Tool arguments the client may optimistically project into state while they stream. */
|
|
27285
|
+
predictState: external_exports.array(agentPredictStateMappingSchema).optional()
|
|
27286
|
+
});
|
|
26828
27287
|
var tenancyAssuranceLevelSchema = external_exports.enum(["anonymous", "asserted", "verified"]);
|
|
26829
27288
|
var tenancyStrategyPresetSchema = external_exports.enum([
|
|
26830
27289
|
"internal",
|
|
@@ -27151,17 +27610,7 @@ var agentRuntimeConfigSchema = external_exports.object({
|
|
|
27151
27610
|
// WHY(#7794): Defaults true; false keeps the pre-#7794 verdict for a length-truncated tool call.
|
|
27152
27611
|
treatLengthCutoffAsFailure: external_exports.boolean().optional()
|
|
27153
27612
|
}).optional(),
|
|
27154
|
-
voice:
|
|
27155
|
-
enabled: external_exports.boolean().optional(),
|
|
27156
|
-
provider: external_exports.string().optional(),
|
|
27157
|
-
interruptionMode: external_exports.enum(["none", "cancel", "barge-in"]).optional(),
|
|
27158
|
-
elevenLabs: external_exports.object({
|
|
27159
|
-
voiceId: external_exports.string().optional(),
|
|
27160
|
-
modelId: external_exports.string().optional(),
|
|
27161
|
-
stability: external_exports.number().min(0).max(1).optional(),
|
|
27162
|
-
similarity: external_exports.number().min(0).max(1).optional()
|
|
27163
|
-
}).optional()
|
|
27164
|
-
}).optional(),
|
|
27613
|
+
voice: agentVoiceProfileSchema.optional(),
|
|
27165
27614
|
errorHandling: errorHandlingSchema,
|
|
27166
27615
|
loggingPolicy: external_exports.enum(["default", "on", "off"]).optional(),
|
|
27167
27616
|
// WHY(docs/why/packages/shared/src.md#default-pii-redaction-defers-to-a-lower-layer-or): 'default' PII redaction defers to a lower layer or the resolver default (off); mirrors loggingPolicy
|
|
@@ -27175,7 +27624,9 @@ var agentRuntimeConfigSchema = external_exports.object({
|
|
|
27175
27624
|
// WHY(docs/why/packages/shared/src.md#tenancystrategy-is-optional-per-resource-isolati): tenancyStrategy is optional per-resource isolation opt-in; absent means platform-global default
|
|
27176
27625
|
tenancyStrategy: tenancyStrategySchema.optional(),
|
|
27177
27626
|
// WHY(docs/why/packages/shared/src.md#durable-turn-knobs-single-sourced-from-agentdura): Durable-turn knobs single-sourced from agentDurabilityConfigSchema; durability is the platform default
|
|
27178
|
-
durability: agentDurabilityConfigSchema.optional()
|
|
27627
|
+
durability: agentDurabilityConfigSchema.optional(),
|
|
27628
|
+
// WHY(docs/why/packages/shared/src.md#the-same-schema-instance-the-export-plane-uses): The SAME instance the export plane uses, so the authoring and export planes cannot drift.
|
|
27629
|
+
state: agentStateChannelSchema.optional()
|
|
27179
27630
|
}).strict();
|
|
27180
27631
|
var contextFallbackSchema = external_exports.union([
|
|
27181
27632
|
external_exports.object({ type: external_exports.literal("retry"), delay: external_exports.number().optional() }),
|
|
@@ -30951,7 +31402,7 @@ var APPROVAL_UNATTENDED_SURFACES = [
|
|
|
30951
31402
|
"a2a"
|
|
30952
31403
|
];
|
|
30953
31404
|
var APPROVAL_PREFLIGHT_REJECTED_SURFACES = ["client-chat"];
|
|
30954
|
-
var
|
|
31405
|
+
var APPROVAL_REFUSING_SURFACES = APPROVAL_UNATTENDED_SURFACES.filter(
|
|
30955
31406
|
(surface) => surface !== "client-chat"
|
|
30956
31407
|
);
|
|
30957
31408
|
function validatePromptApprovalSurfaceEnforcement(flowSteps, buckets) {
|
|
@@ -30963,7 +31414,7 @@ function validatePromptApprovalSurfaceEnforcement(flowSteps, buckets) {
|
|
|
30963
31414
|
"warning",
|
|
30964
31415
|
{
|
|
30965
31416
|
code: APPROVAL_ENFORCED_ON_ATTENDED_SURFACES_ONLY_CODE,
|
|
30966
|
-
message: `Step "${step.name}" arms a human approval gate (config.tools.approval.require), which is enforced only on attended surfaces that can present the prompt and resume the run: interactive dispatch and agent execute. Client chat rejects approval-gated execution because it has no secure continuation channel back to the visitor.
|
|
31417
|
+
message: `Step "${step.name}" arms a human approval gate (config.tools.approval.require), which is enforced only on attended surfaces that can present the prompt and resume the run: interactive dispatch and agent execute. Client chat rejects approval-gated execution because it has no secure continuation channel back to the visitor. The other unattended surfaces (${APPROVAL_REFUSING_SURFACES.join(", ")}) refuse the run (ineligible:surface-approval-pause): no engine answers the prompt without an attended client, so the flow does not run there at all. If it must run unattended, remove the approval requirement from this step.`,
|
|
30967
31418
|
path: `flowSteps[${stepIndex}].config.tools.approval`,
|
|
30968
31419
|
step: { index: stepIndex, name: step.name, type: step.type },
|
|
30969
31420
|
details: {
|
|
@@ -32511,12 +32962,6 @@ function extractSecretReferencesFromAnyValue(value, maxDepth = 10) {
|
|
|
32511
32962
|
}
|
|
32512
32963
|
var STORE_ASSET_MAX_BYTES = 25 * 1024 * 1024;
|
|
32513
32964
|
var STORE_ASSET_MAX_BASE64_LENGTH = Math.ceil(STORE_ASSET_MAX_BYTES * (4 / 3)) + 16;
|
|
32514
|
-
var EMBEDDING_COST_PER_1K_TOKENS = Object.freeze({
|
|
32515
|
-
"text-embedding-3-small": 2e-5,
|
|
32516
|
-
// $0.02 per 1M tokens
|
|
32517
|
-
"text-embedding-3-large": 13e-5
|
|
32518
|
-
// $0.13 per 1M tokens
|
|
32519
|
-
});
|
|
32520
32965
|
var END_USER_USAGE_PERIODS = ["billing_period", "7d", "30d", "90d"];
|
|
32521
32966
|
var endUserUsageQuerySchema = external_exports.object({
|
|
32522
32967
|
productId: external_exports.string().min(1),
|
|
@@ -33556,17 +34001,7 @@ var agentReasoningConfigSchema = external_exports.object({
|
|
|
33556
34001
|
thinkingLevel: external_exports.string().min(1).max(32).optional(),
|
|
33557
34002
|
includeThoughts: external_exports.boolean().optional()
|
|
33558
34003
|
});
|
|
33559
|
-
var agentVoiceConfigSchema =
|
|
33560
|
-
enabled: external_exports.boolean().optional(),
|
|
33561
|
-
provider: external_exports.string().optional(),
|
|
33562
|
-
interruptionMode: external_exports.enum(["none", "cancel", "barge-in"]).optional(),
|
|
33563
|
-
elevenLabs: external_exports.object({
|
|
33564
|
-
voiceId: external_exports.string().optional(),
|
|
33565
|
-
modelId: external_exports.string().optional(),
|
|
33566
|
-
stability: external_exports.number().min(0).max(1).optional(),
|
|
33567
|
-
similarity: external_exports.number().min(0).max(1).optional()
|
|
33568
|
-
}).optional()
|
|
33569
|
-
});
|
|
34004
|
+
var agentVoiceConfigSchema = agentVoiceProfileSchema;
|
|
33570
34005
|
var agentErrorHandlingSchema = external_exports.object({
|
|
33571
34006
|
onError: external_exports.enum(["fail", "continue", "fallback"]).optional(),
|
|
33572
34007
|
fallbacks: external_exports.array(
|
|
@@ -34218,8 +34653,15 @@ var FLAT_ADVANCED_CONFIG_KEYS = {
|
|
|
34218
34653
|
var FLAT_ADVANCED_CONFIG_KEY_LIST = Object.keys(
|
|
34219
34654
|
FLAT_ADVANCED_CONFIG_KEYS
|
|
34220
34655
|
);
|
|
34221
|
-
function createIssue(severity, code, message, path21, suggestedFix) {
|
|
34222
|
-
return {
|
|
34656
|
+
function createIssue(severity, code, message, path21, suggestedFix, details) {
|
|
34657
|
+
return {
|
|
34658
|
+
code,
|
|
34659
|
+
message,
|
|
34660
|
+
path: path21,
|
|
34661
|
+
severity,
|
|
34662
|
+
...suggestedFix ? { suggestedFix } : {},
|
|
34663
|
+
...details ? { details } : {}
|
|
34664
|
+
};
|
|
34223
34665
|
}
|
|
34224
34666
|
function emptyResult() {
|
|
34225
34667
|
return { valid: true, errors: [], warnings: [], recommendations: [] };
|
|
@@ -34786,6 +35228,164 @@ function validateConnectivity(fpo) {
|
|
|
34786
35228
|
result.valid = result.errors.length === 0;
|
|
34787
35229
|
return result;
|
|
34788
35230
|
}
|
|
35231
|
+
var AG_UI_SERVER_AUTHORED_PAUSE_CODE = "AG_UI_SERVER_AUTHORED_PAUSE";
|
|
35232
|
+
var INCLUDE_APPROVAL_REASON = false;
|
|
35233
|
+
var CONDITIONAL_BRANCH_STEP_KEYS2 = [
|
|
35234
|
+
"trueSteps",
|
|
35235
|
+
"falseSteps",
|
|
35236
|
+
"true_steps",
|
|
35237
|
+
"false_steps",
|
|
35238
|
+
"otherwiseSteps"
|
|
35239
|
+
];
|
|
35240
|
+
function isRecord4(value) {
|
|
35241
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
35242
|
+
}
|
|
35243
|
+
function scanRuntimeTools(tools, acc, depth) {
|
|
35244
|
+
if (depth > MAX_CONDITIONAL_NESTING_DEPTH || !Array.isArray(tools)) return;
|
|
35245
|
+
for (const tool of tools) {
|
|
35246
|
+
if (!isRecord4(tool) || tool.enabled === false) continue;
|
|
35247
|
+
if (isClientExecutedToolType(tool.toolType)) acc.hasClientExecutedTools = true;
|
|
35248
|
+
const config3 = isRecord4(tool.config) ? tool.config : void 0;
|
|
35249
|
+
if (!config3) continue;
|
|
35250
|
+
if (isRecord4(config3.flow)) scanSteps(config3.flow.steps, acc, depth + 1);
|
|
35251
|
+
const inlineAgent = isRecord4(config3.agent) ? config3.agent : isRecord4(config3.subAgent) ? config3.subAgent : void 0;
|
|
35252
|
+
if (inlineAgent) scanAgentDefinition(inlineAgent, acc, depth + 1);
|
|
35253
|
+
}
|
|
35254
|
+
}
|
|
35255
|
+
function scanToolsBlock(tools, acc, depth) {
|
|
35256
|
+
if (!isRecord4(tools)) return;
|
|
35257
|
+
scanRuntimeTools(tools.runtimeTools, acc, depth);
|
|
35258
|
+
}
|
|
35259
|
+
function scanSteps(steps, acc, depth) {
|
|
35260
|
+
if (depth > MAX_CONDITIONAL_NESTING_DEPTH || !Array.isArray(steps)) return;
|
|
35261
|
+
for (const step of steps) {
|
|
35262
|
+
if (!isRecord4(step) || step.enabled === false) continue;
|
|
35263
|
+
if (typeof step.type === "string") acc.stepTypes.add(step.type);
|
|
35264
|
+
const config3 = isRecord4(step.config) ? step.config : void 0;
|
|
35265
|
+
if (!config3) continue;
|
|
35266
|
+
scanToolsBlock(config3.tools, acc, depth);
|
|
35267
|
+
scanSteps(config3.steps, acc, depth + 1);
|
|
35268
|
+
for (const key of CONDITIONAL_BRANCH_STEP_KEYS2) scanSteps(config3[key], acc, depth + 1);
|
|
35269
|
+
if (!Array.isArray(config3.branches)) continue;
|
|
35270
|
+
for (const branch of config3.branches) {
|
|
35271
|
+
if (isRecord4(branch)) scanSteps(branch.steps, acc, depth + 1);
|
|
35272
|
+
}
|
|
35273
|
+
}
|
|
35274
|
+
}
|
|
35275
|
+
function agentToolsBlock(agent) {
|
|
35276
|
+
if (isRecord4(agent.config)) return agent.config.tools;
|
|
35277
|
+
return agent.toolsConfig;
|
|
35278
|
+
}
|
|
35279
|
+
function scanAgentDefinition(agent, acc, depth) {
|
|
35280
|
+
if (depth > MAX_CONDITIONAL_NESTING_DEPTH) return;
|
|
35281
|
+
scanToolsBlock(agentToolsBlock(agent), acc, depth);
|
|
35282
|
+
if (!Array.isArray(agent.capabilities)) return;
|
|
35283
|
+
for (const capability of agent.capabilities) {
|
|
35284
|
+
if (!isRecord4(capability)) continue;
|
|
35285
|
+
if (isRecord4(capability.flow)) scanSteps(capability.flow.steps, acc, depth + 1);
|
|
35286
|
+
if (isRecord4(capability.subAgent)) scanAgentDefinition(capability.subAgent, acc, depth + 1);
|
|
35287
|
+
}
|
|
35288
|
+
}
|
|
35289
|
+
function referencedCapabilityIds(agent) {
|
|
35290
|
+
const ids = [];
|
|
35291
|
+
if (Array.isArray(agent.capabilityToolRefs)) {
|
|
35292
|
+
for (const ref of agent.capabilityToolRefs) {
|
|
35293
|
+
if (isRecord4(ref) && typeof ref.capabilityId === "string") ids.push(ref.capabilityId);
|
|
35294
|
+
}
|
|
35295
|
+
}
|
|
35296
|
+
const tools = agentToolsBlock(agent);
|
|
35297
|
+
const toolIds = isRecord4(tools) ? tools.toolIds : void 0;
|
|
35298
|
+
if (Array.isArray(toolIds)) {
|
|
35299
|
+
for (const toolId of toolIds) {
|
|
35300
|
+
if (typeof toolId === "string" && toolId.startsWith("capability:")) {
|
|
35301
|
+
ids.push(toolId.slice("capability:".length));
|
|
35302
|
+
}
|
|
35303
|
+
}
|
|
35304
|
+
}
|
|
35305
|
+
return ids;
|
|
35306
|
+
}
|
|
35307
|
+
function scanCapability(capabilityId, capabilities, acc, visited) {
|
|
35308
|
+
if (visited.has(capabilityId)) return;
|
|
35309
|
+
visited.add(capabilityId);
|
|
35310
|
+
const capability = capabilities.get(capabilityId);
|
|
35311
|
+
if (!capability) return;
|
|
35312
|
+
if (isRecord4(capability.flow)) scanSteps(capability.flow.steps, acc, 0);
|
|
35313
|
+
if (!isRecord4(capability.agent)) return;
|
|
35314
|
+
scanAgentDefinition(capability.agent, acc, 0);
|
|
35315
|
+
for (const ref of referencedCapabilityIds(capability.agent)) {
|
|
35316
|
+
scanCapability(ref, capabilities, acc, visited);
|
|
35317
|
+
}
|
|
35318
|
+
}
|
|
35319
|
+
function suggestedFixFor(reasons) {
|
|
35320
|
+
const fixes = [];
|
|
35321
|
+
if (reasons.includes("client-executed tools")) {
|
|
35322
|
+
fixes.push(
|
|
35323
|
+
"Declare client-executed tools from the AG-UI client in RunAgentInput.tools instead of on the agent"
|
|
35324
|
+
);
|
|
35325
|
+
}
|
|
35326
|
+
if (reasons.includes("wait-until steps") || reasons.includes("crawl steps")) {
|
|
35327
|
+
fixes.push(
|
|
35328
|
+
"move the waiting work into a separate capability this AG-UI surface does not route to"
|
|
35329
|
+
);
|
|
35330
|
+
}
|
|
35331
|
+
return `${fixes.join(", or ")}.`;
|
|
35332
|
+
}
|
|
35333
|
+
function pauseMessage(surfaceName, capabilityId, reasons) {
|
|
35334
|
+
return `The "${surfaceName}" AG-UI surface routes capability "${capabilityId}", whose execution pauses in a way an AG-UI client cannot resume: ${reasons.join(", ")}. Runtype refuses the run with 501 AG_UI_DEFINITION_CONTINUATION_UNSUPPORTED before the agent starts.`;
|
|
35335
|
+
}
|
|
35336
|
+
function agUiServerAuthoredPauseIssues(fpo) {
|
|
35337
|
+
const surfaces = Array.isArray(fpo.surfaces) ? fpo.surfaces : [];
|
|
35338
|
+
if (surfaces.length === 0) return [];
|
|
35339
|
+
const capabilities = /* @__PURE__ */ new Map();
|
|
35340
|
+
for (const capability of Array.isArray(fpo.capabilities) ? fpo.capabilities : []) {
|
|
35341
|
+
if (!isRecord4(capability) || typeof capability.id !== "string") continue;
|
|
35342
|
+
if (!capabilities.has(capability.id)) capabilities.set(capability.id, capability);
|
|
35343
|
+
}
|
|
35344
|
+
const reasonsByCapability = /* @__PURE__ */ new Map();
|
|
35345
|
+
const reasonsFor = (capabilityId) => {
|
|
35346
|
+
const cached2 = reasonsByCapability.get(capabilityId);
|
|
35347
|
+
if (cached2) return cached2;
|
|
35348
|
+
const acc = { hasClientExecutedTools: false, stepTypes: /* @__PURE__ */ new Set() };
|
|
35349
|
+
scanCapability(capabilityId, capabilities, acc, /* @__PURE__ */ new Set());
|
|
35350
|
+
const reasons = productSurfacePauseReasonsFromFacts(
|
|
35351
|
+
{
|
|
35352
|
+
hasClientExecutedTools: acc.hasClientExecutedTools,
|
|
35353
|
+
hasApprovalSteps: false,
|
|
35354
|
+
stepTypes: [...acc.stepTypes]
|
|
35355
|
+
},
|
|
35356
|
+
INCLUDE_APPROVAL_REASON
|
|
35357
|
+
);
|
|
35358
|
+
reasonsByCapability.set(capabilityId, reasons);
|
|
35359
|
+
return reasons;
|
|
35360
|
+
};
|
|
35361
|
+
const issues = [];
|
|
35362
|
+
for (const [si, surface] of surfaces.entries()) {
|
|
35363
|
+
if (!isRecord4(surface) || surface.type !== "ag-ui") continue;
|
|
35364
|
+
const surfaceName = typeof surface.name === "string" ? surface.name : "ag-ui";
|
|
35365
|
+
const routes = Array.isArray(surface.routes) ? surface.routes : [];
|
|
35366
|
+
for (const [ri, route] of routes.entries()) {
|
|
35367
|
+
if (!isRecord4(route) || typeof route.capabilityId !== "string") continue;
|
|
35368
|
+
const reasons = reasonsFor(route.capabilityId);
|
|
35369
|
+
if (reasons.length === 0) continue;
|
|
35370
|
+
issues.push(
|
|
35371
|
+
createIssue(
|
|
35372
|
+
"warning",
|
|
35373
|
+
AG_UI_SERVER_AUTHORED_PAUSE_CODE,
|
|
35374
|
+
pauseMessage(surfaceName, route.capabilityId, reasons),
|
|
35375
|
+
`surfaces[${si}].routes[${ri}].capabilityId`,
|
|
35376
|
+
suggestedFixFor(reasons),
|
|
35377
|
+
{ reasons }
|
|
35378
|
+
)
|
|
35379
|
+
);
|
|
35380
|
+
}
|
|
35381
|
+
}
|
|
35382
|
+
return issues;
|
|
35383
|
+
}
|
|
35384
|
+
function validateAgUiSurfacePauses(fpo) {
|
|
35385
|
+
const result = emptyResult();
|
|
35386
|
+
result.warnings.push(...agUiServerAuthoredPauseIssues(fpo));
|
|
35387
|
+
return result;
|
|
35388
|
+
}
|
|
34789
35389
|
function safeValidate(fn) {
|
|
34790
35390
|
try {
|
|
34791
35391
|
return fn();
|
|
@@ -35035,7 +35635,15 @@ function validateFPO(fpo) {
|
|
|
35035
35635
|
(surface, i) => safeValidate(() => validateSurfaceDefinition(surface, i))
|
|
35036
35636
|
);
|
|
35037
35637
|
const connectivityResult = safeValidate(() => validateConnectivity(fpo));
|
|
35038
|
-
|
|
35638
|
+
const agUiPauseResult = safeValidate(() => validateAgUiSurfacePauses(fpo));
|
|
35639
|
+
return mergeResults(
|
|
35640
|
+
result,
|
|
35641
|
+
...capResults,
|
|
35642
|
+
...toolResults,
|
|
35643
|
+
...surfaceResults,
|
|
35644
|
+
connectivityResult,
|
|
35645
|
+
agUiPauseResult
|
|
35646
|
+
);
|
|
35039
35647
|
}
|
|
35040
35648
|
function zodIssueCodeToValidationCode(code) {
|
|
35041
35649
|
return code ? `SCHEMA_${code.toUpperCase()}` : "SCHEMA_ERROR";
|
|
@@ -35923,9 +36531,7 @@ var DispatchRequestEnvelopeSchema = external_exports.object({
|
|
|
35923
36531
|
* every submitted webmcp tool. See {@link ClientToolsPolicySchema}.
|
|
35924
36532
|
*/
|
|
35925
36533
|
clientToolsPolicy: ClientToolsPolicySchema.optional(),
|
|
35926
|
-
secrets: external_exports.record(external_exports.string(), external_exports.string()).optional().describe(
|
|
35927
|
-
"Retired. A NON-EMPTY map on an agent dispatch is rejected with 400 RUNTIME_AGENT_TRANSIENT_SECRETS_UNSUPPORTED. There is no longer an exception: the legacy engine that honored it for single-turn agents behind `options.useRuntimePackage: false` has been removed, and that opt-out is itself a 400 now. An empty map is accepted and does nothing. Ignored on flow dispatches. Store credentials as managed secrets and reference them as {{secret:NAME}}. The field is kept on the wire for compatibility only."
|
|
35928
|
-
),
|
|
36534
|
+
secrets: external_exports.record(external_exports.string(), external_exports.string()).optional().describe(DISPATCH_TRANSIENT_SECRETS_RETIRED_NOTE),
|
|
35929
36535
|
credentialProxies: external_exports.array(credentialProxyConfigSchema).max(10).optional(),
|
|
35930
36536
|
inputs: external_exports.record(external_exports.string(), external_exports.any()).optional().refine(
|
|
35931
36537
|
(data) => {
|
|
@@ -36731,6 +37337,15 @@ var appRoutingDocSchema = external_exports.object({
|
|
|
36731
37337
|
});
|
|
36732
37338
|
var DEFAULT_STEP_TIMEOUT_MS = 5 * 60 * 1e3;
|
|
36733
37339
|
var DEFAULT_AGENT_WALL_CLOCK_TIMEOUT_MS = 5 * 60 * 1e3;
|
|
37340
|
+
var customModelReasoningDeclarationSchema = external_exports.object({
|
|
37341
|
+
supported: external_exports.boolean(),
|
|
37342
|
+
defaultEffort: external_exports.string().trim().min(1).max(32).optional()
|
|
37343
|
+
}).refine((value) => value.defaultEffort === void 0 || value.supported, {
|
|
37344
|
+
message: "defaultEffort requires supported: true",
|
|
37345
|
+
path: ["defaultEffort"]
|
|
37346
|
+
});
|
|
37347
|
+
var CUSTOM_MODEL_REASONING_EFFORT_LADDER = ["low", "medium", "high"];
|
|
37348
|
+
var CUSTOM_MODEL_DEFAULT_EFFORT_OPTIONS = ["none", ...CUSTOM_MODEL_REASONING_EFFORT_LADDER];
|
|
36734
37349
|
|
|
36735
37350
|
// src/config/env.ts
|
|
36736
37351
|
function getApiUrl() {
|
|
@@ -66949,11 +67564,11 @@ import path20 from "path";
|
|
|
66949
67564
|
var MAX_SIDECAR_OUTPUT_BYTES = 1048576;
|
|
66950
67565
|
var MAX_HELPER_BYTES = 100 * 1048576;
|
|
66951
67566
|
var DEFAULT_SIDECAR_TIMEOUT_MS = 3e4;
|
|
66952
|
-
function
|
|
67567
|
+
function isRecord5(value) {
|
|
66953
67568
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
66954
67569
|
}
|
|
66955
67570
|
function parseHello(value) {
|
|
66956
|
-
if (!
|
|
67571
|
+
if (!isRecord5(value) || typeof value.providerId !== "string" || typeof value.protocolVersion !== "number" || typeof value.helperVersion !== "string" || typeof value.platform !== "string" || !Array.isArray(value.capabilities) || !value.capabilities.every((capability) => typeof capability === "string")) {
|
|
66957
67572
|
throw new DeviceProviderError(
|
|
66958
67573
|
"The native helper returned an invalid hello response",
|
|
66959
67574
|
"INVALID_RESPONSE"
|
|
@@ -67092,7 +67707,7 @@ var MacOSDeviceProvider = class {
|
|
|
67092
67707
|
);
|
|
67093
67708
|
}
|
|
67094
67709
|
const result = await this.invokeAt(binaryPath, method, params);
|
|
67095
|
-
if (!
|
|
67710
|
+
if (!isRecord5(result)) {
|
|
67096
67711
|
throw new DeviceProviderError(
|
|
67097
67712
|
"The native helper returned a non-object result",
|
|
67098
67713
|
"INVALID_RESPONSE"
|
|
@@ -67322,11 +67937,11 @@ var defaultDependencies3 = {
|
|
|
67322
67937
|
process.exitCode = code;
|
|
67323
67938
|
}
|
|
67324
67939
|
};
|
|
67325
|
-
function
|
|
67940
|
+
function isRecord6(value) {
|
|
67326
67941
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
67327
67942
|
}
|
|
67328
67943
|
function unwrapData(response) {
|
|
67329
|
-
if (!
|
|
67944
|
+
if (!isRecord6(response) || !("data" in response)) {
|
|
67330
67945
|
throw new Error("Runtype API returned an invalid device response");
|
|
67331
67946
|
}
|
|
67332
67947
|
return response.data;
|
|
@@ -67335,11 +67950,11 @@ function errorMessage2(error61) {
|
|
|
67335
67950
|
return error61 instanceof Error ? error61.message : String(error61);
|
|
67336
67951
|
}
|
|
67337
67952
|
function apiStatusCode(error61) {
|
|
67338
|
-
return
|
|
67953
|
+
return isRecord6(error61) && typeof error61.statusCode === "number" ? error61.statusCode : null;
|
|
67339
67954
|
}
|
|
67340
67955
|
function isRecordedRevocationError(error61) {
|
|
67341
67956
|
if (apiStatusCode(error61) !== 503) return false;
|
|
67342
|
-
const data =
|
|
67957
|
+
const data = isRecord6(error61) && isRecord6(error61.data) ? error61.data : null;
|
|
67343
67958
|
const detail = typeof data?.error === "string" ? data.error : errorMessage2(error61);
|
|
67344
67959
|
return detail.toLowerCase().includes("revocation was recorded");
|
|
67345
67960
|
}
|
|
@@ -67692,7 +68307,7 @@ Grant Full Disk Access to ${String(local.executablePath)} to enable iMessage rea
|
|
|
67692
68307
|
return;
|
|
67693
68308
|
}
|
|
67694
68309
|
const content = await readFile2(status.logPath, "utf8").catch((error61) => {
|
|
67695
|
-
const code =
|
|
68310
|
+
const code = isRecord6(error61) ? error61.code : void 0;
|
|
67696
68311
|
if (code === "ENOENT") return "";
|
|
67697
68312
|
throw error61;
|
|
67698
68313
|
});
|