@runtypelabs/cli 2.11.2 → 2.11.4
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 +2528 -858
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -253,6 +253,7 @@ var require_dashboard_url = __commonJS({
|
|
|
253
253
|
exports.parseAccountId = parseAccountId;
|
|
254
254
|
exports.isValidAccountId = isValidAccountId;
|
|
255
255
|
exports.selectAccountId = selectAccountId3;
|
|
256
|
+
exports.buildEntityDashboardUrl = buildEntityDashboardUrl;
|
|
256
257
|
exports.ACCOUNT_QUERY_PARAM = "account";
|
|
257
258
|
function buildDashboardUrl5(opts) {
|
|
258
259
|
let base = opts.baseUrl;
|
|
@@ -311,6 +312,21 @@ var require_dashboard_url = __commonJS({
|
|
|
311
312
|
return params.userId;
|
|
312
313
|
return void 0;
|
|
313
314
|
}
|
|
315
|
+
var ENTITY_DASHBOARD_PATHS = {
|
|
316
|
+
product: "/products",
|
|
317
|
+
agent: "/agents",
|
|
318
|
+
flow: "/flows"
|
|
319
|
+
};
|
|
320
|
+
function buildEntityDashboardUrl(opts) {
|
|
321
|
+
const path14 = ENTITY_DASHBOARD_PATHS[opts.entityType];
|
|
322
|
+
if (!path14)
|
|
323
|
+
return null;
|
|
324
|
+
return buildDashboardUrl5({
|
|
325
|
+
baseUrl: opts.baseUrl,
|
|
326
|
+
path: `${path14}/${opts.entityId}`,
|
|
327
|
+
account: opts.account
|
|
328
|
+
});
|
|
329
|
+
}
|
|
314
330
|
}
|
|
315
331
|
});
|
|
316
332
|
|
|
@@ -11053,10 +11069,11 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
11053
11069
|
"../shared/dist/builtin-tools-registry.js"(exports) {
|
|
11054
11070
|
"use strict";
|
|
11055
11071
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11056
|
-
exports.BUILTIN_TOOLS_REGISTRY = exports.BuiltInToolIdPrefix = exports.BuiltInToolCategory = exports.BuiltInToolProvider = void 0;
|
|
11072
|
+
exports.BUILTIN_TOOLS_REGISTRY = exports.BuiltInToolGroup = exports.BuiltInToolIdPrefix = exports.BuiltInToolCategory = exports.BuiltInToolProvider = void 0;
|
|
11057
11073
|
exports.formatSystemToolId = formatSystemToolId2;
|
|
11058
11074
|
exports.getAllBuiltInTools = getAllBuiltInTools2;
|
|
11059
11075
|
exports.getBuiltInToolById = getBuiltInToolById2;
|
|
11076
|
+
exports.getBuiltInToolGroupById = getBuiltInToolGroupById;
|
|
11060
11077
|
exports.getBuiltInToolsByProvider = getBuiltInToolsByProvider;
|
|
11061
11078
|
exports.getBuiltInToolsByCategory = getBuiltInToolsByCategory;
|
|
11062
11079
|
exports.isToolCompatibleWithModel = isToolCompatibleWithModel2;
|
|
@@ -11085,12 +11102,223 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
11085
11102
|
THIRD_PARTY_API: "third_party_api",
|
|
11086
11103
|
ARTIFACT: "artifact",
|
|
11087
11104
|
DATA_MANAGEMENT: "data_management",
|
|
11088
|
-
COMMERCE: "commerce"
|
|
11105
|
+
COMMERCE: "commerce",
|
|
11106
|
+
BROWSER: "browser",
|
|
11107
|
+
SANDBOX: "sandbox"
|
|
11089
11108
|
};
|
|
11090
11109
|
exports.BuiltInToolIdPrefix = {
|
|
11091
11110
|
BUILTIN: "builtin",
|
|
11092
11111
|
PLATFORM: "platform"
|
|
11093
11112
|
};
|
|
11113
|
+
exports.BuiltInToolGroup = {
|
|
11114
|
+
BROWSER_FETCH: "browser_fetch",
|
|
11115
|
+
BROWSER_USE: "browser_use",
|
|
11116
|
+
FILE_OUTPUTS: "file_outputs",
|
|
11117
|
+
VOICE: "voice",
|
|
11118
|
+
RECORD_MANAGEMENT: "record_management",
|
|
11119
|
+
UCP_COMMERCE: "ucp_commerce",
|
|
11120
|
+
SANDBOX_USE: "sandbox_use",
|
|
11121
|
+
SANDBOX_SESSION: "sandbox_session"
|
|
11122
|
+
};
|
|
11123
|
+
var BROWSER_RUN_DOCUMENTATION_URL = "https://developers.cloudflare.com/browser-run/quick-actions/";
|
|
11124
|
+
var BROWSER_SESSION_DOCUMENTATION_URL = "https://developers.cloudflare.com/browser-run/cdp/";
|
|
11125
|
+
var BROWSER_RUN_RESOURCE_TYPES = [
|
|
11126
|
+
"document",
|
|
11127
|
+
"stylesheet",
|
|
11128
|
+
"image",
|
|
11129
|
+
"media",
|
|
11130
|
+
"font",
|
|
11131
|
+
"script",
|
|
11132
|
+
"texttrack",
|
|
11133
|
+
"xhr",
|
|
11134
|
+
"fetch",
|
|
11135
|
+
"prefetch",
|
|
11136
|
+
"eventsource",
|
|
11137
|
+
"websocket",
|
|
11138
|
+
"manifest",
|
|
11139
|
+
"signedexchange",
|
|
11140
|
+
"ping",
|
|
11141
|
+
"cspviolationreport",
|
|
11142
|
+
"preflight",
|
|
11143
|
+
"other"
|
|
11144
|
+
];
|
|
11145
|
+
var browserRunViewportSchema = {
|
|
11146
|
+
type: "object",
|
|
11147
|
+
description: "Browser viewport options. Defaults to Cloudflare Browser Run defaults when omitted.",
|
|
11148
|
+
properties: {
|
|
11149
|
+
width: {
|
|
11150
|
+
type: "number",
|
|
11151
|
+
description: "Viewport width in pixels",
|
|
11152
|
+
minimum: 1
|
|
11153
|
+
},
|
|
11154
|
+
height: {
|
|
11155
|
+
type: "number",
|
|
11156
|
+
description: "Viewport height in pixels",
|
|
11157
|
+
minimum: 1
|
|
11158
|
+
},
|
|
11159
|
+
deviceScaleFactor: {
|
|
11160
|
+
type: "number",
|
|
11161
|
+
description: "Device scale factor for higher-density screenshots",
|
|
11162
|
+
minimum: 0
|
|
11163
|
+
},
|
|
11164
|
+
isMobile: {
|
|
11165
|
+
type: "boolean",
|
|
11166
|
+
description: "Whether the viewport should emulate a mobile device"
|
|
11167
|
+
},
|
|
11168
|
+
isLandscape: {
|
|
11169
|
+
type: "boolean",
|
|
11170
|
+
description: "Whether the viewport should emulate landscape orientation"
|
|
11171
|
+
},
|
|
11172
|
+
hasTouch: {
|
|
11173
|
+
type: "boolean",
|
|
11174
|
+
description: "Whether the viewport should emulate touch support"
|
|
11175
|
+
}
|
|
11176
|
+
}
|
|
11177
|
+
};
|
|
11178
|
+
var browserRunGotoOptionsSchema = {
|
|
11179
|
+
type: "object",
|
|
11180
|
+
description: "Page navigation options forwarded to Cloudflare Browser Run",
|
|
11181
|
+
properties: {
|
|
11182
|
+
waitUntil: {
|
|
11183
|
+
type: "string",
|
|
11184
|
+
description: "Navigation lifecycle event to wait for",
|
|
11185
|
+
enum: ["load", "domcontentloaded", "networkidle0", "networkidle2"]
|
|
11186
|
+
},
|
|
11187
|
+
timeout: {
|
|
11188
|
+
type: "number",
|
|
11189
|
+
description: "Navigation timeout in milliseconds",
|
|
11190
|
+
minimum: 0,
|
|
11191
|
+
maximum: 6e4
|
|
11192
|
+
},
|
|
11193
|
+
referer: {
|
|
11194
|
+
type: "string",
|
|
11195
|
+
description: "Optional referer URL"
|
|
11196
|
+
},
|
|
11197
|
+
referrerPolicy: {
|
|
11198
|
+
type: "string",
|
|
11199
|
+
description: "Optional browser referrer policy"
|
|
11200
|
+
}
|
|
11201
|
+
}
|
|
11202
|
+
};
|
|
11203
|
+
var browserRunWaitForSelectorSchema = {
|
|
11204
|
+
type: "object",
|
|
11205
|
+
description: "Wait for a CSS selector before extracting the page",
|
|
11206
|
+
properties: {
|
|
11207
|
+
selector: {
|
|
11208
|
+
type: "string",
|
|
11209
|
+
description: "CSS selector to wait for",
|
|
11210
|
+
minLength: 1
|
|
11211
|
+
},
|
|
11212
|
+
visible: {
|
|
11213
|
+
type: "boolean",
|
|
11214
|
+
description: "Wait until the selector is visible"
|
|
11215
|
+
},
|
|
11216
|
+
hidden: {
|
|
11217
|
+
type: "boolean",
|
|
11218
|
+
description: "Wait until the selector is hidden"
|
|
11219
|
+
},
|
|
11220
|
+
timeout: {
|
|
11221
|
+
type: "number",
|
|
11222
|
+
description: "Selector wait timeout in milliseconds",
|
|
11223
|
+
minimum: 0,
|
|
11224
|
+
maximum: 6e4
|
|
11225
|
+
}
|
|
11226
|
+
},
|
|
11227
|
+
required: ["selector"]
|
|
11228
|
+
};
|
|
11229
|
+
var browserRunCommonProperties = {
|
|
11230
|
+
url: {
|
|
11231
|
+
type: "string",
|
|
11232
|
+
description: 'The full URL to render (e.g. "https://example.com/page")',
|
|
11233
|
+
minLength: 1
|
|
11234
|
+
},
|
|
11235
|
+
viewport: browserRunViewportSchema,
|
|
11236
|
+
gotoOptions: browserRunGotoOptionsSchema,
|
|
11237
|
+
waitForSelector: browserRunWaitForSelectorSchema,
|
|
11238
|
+
waitForTimeout: {
|
|
11239
|
+
type: "number",
|
|
11240
|
+
description: "Milliseconds to wait before extracting after page navigation",
|
|
11241
|
+
minimum: 0,
|
|
11242
|
+
maximum: 6e4
|
|
11243
|
+
},
|
|
11244
|
+
rejectResourceTypes: {
|
|
11245
|
+
type: "array",
|
|
11246
|
+
description: "Resource types to block while loading the page",
|
|
11247
|
+
items: {
|
|
11248
|
+
type: "string",
|
|
11249
|
+
enum: [...BROWSER_RUN_RESOURCE_TYPES]
|
|
11250
|
+
}
|
|
11251
|
+
},
|
|
11252
|
+
rejectRequestPattern: {
|
|
11253
|
+
type: "array",
|
|
11254
|
+
description: "Regular expression patterns for requests to block while loading the page",
|
|
11255
|
+
items: { type: "string" }
|
|
11256
|
+
},
|
|
11257
|
+
userAgent: {
|
|
11258
|
+
type: "string",
|
|
11259
|
+
description: "Custom browser user agent string"
|
|
11260
|
+
},
|
|
11261
|
+
cacheTTL: {
|
|
11262
|
+
type: "number",
|
|
11263
|
+
description: "Cloudflare Browser Run cache TTL in seconds. Set to 0 to disable cache.",
|
|
11264
|
+
minimum: 0,
|
|
11265
|
+
maximum: 86400
|
|
11266
|
+
}
|
|
11267
|
+
};
|
|
11268
|
+
var browserRunScreenshotOptionsSchema = {
|
|
11269
|
+
type: "object",
|
|
11270
|
+
description: "Screenshot capture options forwarded to Cloudflare Browser Run",
|
|
11271
|
+
properties: {
|
|
11272
|
+
fullPage: {
|
|
11273
|
+
type: "boolean",
|
|
11274
|
+
description: "Capture the full page instead of only the viewport"
|
|
11275
|
+
},
|
|
11276
|
+
type: {
|
|
11277
|
+
type: "string",
|
|
11278
|
+
description: "Screenshot image format",
|
|
11279
|
+
enum: ["png", "jpeg", "webp"],
|
|
11280
|
+
default: "png"
|
|
11281
|
+
},
|
|
11282
|
+
quality: {
|
|
11283
|
+
type: "number",
|
|
11284
|
+
description: "Image quality for jpeg or webp screenshots",
|
|
11285
|
+
minimum: 0,
|
|
11286
|
+
maximum: 100
|
|
11287
|
+
},
|
|
11288
|
+
omitBackground: {
|
|
11289
|
+
type: "boolean",
|
|
11290
|
+
description: "Hide the default white background to allow transparency"
|
|
11291
|
+
},
|
|
11292
|
+
captureBeyondViewport: {
|
|
11293
|
+
type: "boolean",
|
|
11294
|
+
description: "Capture beyond the viewport when clipping"
|
|
11295
|
+
},
|
|
11296
|
+
clip: {
|
|
11297
|
+
type: "object",
|
|
11298
|
+
description: "Optional screenshot clipping rectangle",
|
|
11299
|
+
properties: {
|
|
11300
|
+
x: { type: "number", description: "Clip x coordinate" },
|
|
11301
|
+
y: { type: "number", description: "Clip y coordinate" },
|
|
11302
|
+
width: {
|
|
11303
|
+
type: "number",
|
|
11304
|
+
description: "Clip width in pixels",
|
|
11305
|
+
minimum: 1
|
|
11306
|
+
},
|
|
11307
|
+
height: {
|
|
11308
|
+
type: "number",
|
|
11309
|
+
description: "Clip height in pixels",
|
|
11310
|
+
minimum: 1
|
|
11311
|
+
},
|
|
11312
|
+
scale: {
|
|
11313
|
+
type: "number",
|
|
11314
|
+
description: "Clip scale",
|
|
11315
|
+
minimum: 0
|
|
11316
|
+
}
|
|
11317
|
+
},
|
|
11318
|
+
required: ["x", "y", "width", "height"]
|
|
11319
|
+
}
|
|
11320
|
+
}
|
|
11321
|
+
};
|
|
11094
11322
|
var CORE_BUILTIN_TOOLS_REGISTRY = [
|
|
11095
11323
|
// OpenAI DALL-E Image Generation
|
|
11096
11324
|
{
|
|
@@ -11594,699 +11822,1385 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
11594
11822
|
requiresApiKey: true,
|
|
11595
11823
|
executionHint: "platform"
|
|
11596
11824
|
},
|
|
11597
|
-
//
|
|
11598
|
-
// Supports multi-instance format: builtin:vector-search#<instance-id>
|
|
11825
|
+
// Cloudflare Browser Run Quick Action: Screenshot
|
|
11599
11826
|
{
|
|
11600
|
-
id: "
|
|
11601
|
-
|
|
11602
|
-
|
|
11603
|
-
|
|
11827
|
+
id: "browser:screenshot",
|
|
11828
|
+
aliases: ["browser-screenshot"],
|
|
11829
|
+
name: "Browser Screenshot",
|
|
11830
|
+
description: "Capture a screenshot of a rendered web page using Cloudflare Browser Run. Returns a base64-encoded image.",
|
|
11831
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
11832
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_FETCH,
|
|
11604
11833
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
11605
|
-
// Works with any model, uses OpenAI for embeddings
|
|
11606
11834
|
parametersSchema: {
|
|
11607
11835
|
type: "object",
|
|
11608
11836
|
properties: {
|
|
11609
|
-
|
|
11610
|
-
|
|
11611
|
-
description: "The search query to find semantically similar documents"
|
|
11612
|
-
},
|
|
11613
|
-
limit: {
|
|
11614
|
-
type: "number",
|
|
11615
|
-
description: "Maximum number of results to return (1-20)",
|
|
11616
|
-
minimum: 1,
|
|
11617
|
-
maximum: 20,
|
|
11618
|
-
default: 5
|
|
11619
|
-
}
|
|
11837
|
+
...browserRunCommonProperties,
|
|
11838
|
+
screenshotOptions: browserRunScreenshotOptionsSchema
|
|
11620
11839
|
},
|
|
11621
|
-
required: ["
|
|
11840
|
+
required: ["url"]
|
|
11622
11841
|
},
|
|
11623
11842
|
defaultConfig: {
|
|
11624
|
-
|
|
11625
|
-
|
|
11626
|
-
|
|
11627
|
-
configSchema: {
|
|
11628
|
-
supportsInstances: true,
|
|
11629
|
-
instanceLabel: "Add Knowledge Base",
|
|
11630
|
-
properties: {
|
|
11631
|
-
threshold: {
|
|
11632
|
-
type: "number",
|
|
11633
|
-
label: "Similarity Threshold",
|
|
11634
|
-
description: "Minimum similarity score (0-1). Lower values return more results.",
|
|
11635
|
-
default: 0.3
|
|
11636
|
-
},
|
|
11637
|
-
displayName: {
|
|
11638
|
-
type: "string",
|
|
11639
|
-
label: "Display Name",
|
|
11640
|
-
description: 'Name shown to the AI model (e.g., "Search Documentation")',
|
|
11641
|
-
required: true
|
|
11642
|
-
},
|
|
11643
|
-
provider: {
|
|
11644
|
-
type: "select",
|
|
11645
|
-
label: "Vector Provider",
|
|
11646
|
-
description: "Where the vectors are stored",
|
|
11647
|
-
required: true,
|
|
11648
|
-
default: "pgvector",
|
|
11649
|
-
options: [
|
|
11650
|
-
{ value: "pgvector", label: "Platform (pgvector)" },
|
|
11651
|
-
{ value: "weaviate", label: "Weaviate" },
|
|
11652
|
-
{ value: "vectorize", label: "Cloudflare Vectorize" }
|
|
11653
|
-
]
|
|
11654
|
-
},
|
|
11655
|
-
recordType: {
|
|
11656
|
-
type: "string",
|
|
11657
|
-
label: "Record Type",
|
|
11658
|
-
description: "Filter by record type (optional)",
|
|
11659
|
-
dependsOn: { field: "provider", value: "pgvector" }
|
|
11660
|
-
},
|
|
11661
|
-
weaviateClassName: {
|
|
11662
|
-
type: "string",
|
|
11663
|
-
label: "Collection Name",
|
|
11664
|
-
description: "Weaviate collection to search",
|
|
11665
|
-
required: true,
|
|
11666
|
-
dependsOn: { field: "provider", value: "weaviate" }
|
|
11667
|
-
},
|
|
11668
|
-
vectorizeIndexName: {
|
|
11669
|
-
type: "string",
|
|
11670
|
-
label: "Index Name",
|
|
11671
|
-
description: "Vectorize index to search",
|
|
11672
|
-
required: true,
|
|
11673
|
-
dependsOn: { field: "provider", value: "vectorize" }
|
|
11674
|
-
}
|
|
11843
|
+
screenshotOptions: {
|
|
11844
|
+
type: "png",
|
|
11845
|
+
fullPage: false
|
|
11675
11846
|
}
|
|
11676
11847
|
},
|
|
11677
|
-
|
|
11678
|
-
|
|
11679
|
-
executionHint: "platform"
|
|
11848
|
+
documentationUrl: BROWSER_RUN_DOCUMENTATION_URL,
|
|
11849
|
+
requiresApiKey: false,
|
|
11850
|
+
executionHint: "platform",
|
|
11851
|
+
platformKeySupport: true
|
|
11680
11852
|
},
|
|
11681
|
-
//
|
|
11853
|
+
// Cloudflare Browser Run Quick Action: Content
|
|
11682
11854
|
{
|
|
11683
|
-
id: "
|
|
11684
|
-
|
|
11685
|
-
|
|
11686
|
-
|
|
11855
|
+
id: "browser:content",
|
|
11856
|
+
aliases: ["browser-content"],
|
|
11857
|
+
name: "Browser Content",
|
|
11858
|
+
description: "Fetch the fully rendered HTML of a web page after JavaScript execution using Cloudflare Browser Run.",
|
|
11859
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
11860
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_FETCH,
|
|
11687
11861
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
11688
11862
|
parametersSchema: {
|
|
11689
11863
|
type: "object",
|
|
11690
|
-
properties:
|
|
11691
|
-
|
|
11692
|
-
type: "string",
|
|
11693
|
-
description: "Text to convert to speech",
|
|
11694
|
-
minLength: 1,
|
|
11695
|
-
maxLength: 5e3
|
|
11696
|
-
},
|
|
11697
|
-
voice_id: {
|
|
11698
|
-
type: "string",
|
|
11699
|
-
description: "ElevenLabs voice ID or name",
|
|
11700
|
-
default: "rachel"
|
|
11701
|
-
},
|
|
11702
|
-
model_id: {
|
|
11703
|
-
type: "string",
|
|
11704
|
-
description: "ElevenLabs model ID",
|
|
11705
|
-
default: "eleven_multilingual_v2"
|
|
11706
|
-
},
|
|
11707
|
-
stability: {
|
|
11708
|
-
type: "number",
|
|
11709
|
-
description: "Voice stability (0-1)",
|
|
11710
|
-
minimum: 0,
|
|
11711
|
-
maximum: 1,
|
|
11712
|
-
default: 0.5
|
|
11713
|
-
},
|
|
11714
|
-
similarity_boost: {
|
|
11715
|
-
type: "number",
|
|
11716
|
-
description: "Voice similarity boost (0-1)",
|
|
11717
|
-
minimum: 0,
|
|
11718
|
-
maximum: 1,
|
|
11719
|
-
default: 0.75
|
|
11720
|
-
}
|
|
11721
|
-
},
|
|
11722
|
-
required: ["text"]
|
|
11723
|
-
},
|
|
11724
|
-
defaultConfig: {
|
|
11725
|
-
voice_id: "rachel",
|
|
11726
|
-
// @snake-case-ok: ElevenLabs API
|
|
11727
|
-
model_id: "eleven_multilingual_v2",
|
|
11728
|
-
// @snake-case-ok: ElevenLabs API
|
|
11729
|
-
stability: 0.5,
|
|
11730
|
-
similarity_boost: 0.75
|
|
11731
|
-
// @snake-case-ok: ElevenLabs API
|
|
11864
|
+
properties: browserRunCommonProperties,
|
|
11865
|
+
required: ["url"]
|
|
11732
11866
|
},
|
|
11867
|
+
documentationUrl: BROWSER_RUN_DOCUMENTATION_URL,
|
|
11868
|
+
requiresApiKey: false,
|
|
11733
11869
|
executionHint: "platform",
|
|
11734
|
-
|
|
11735
|
-
platformKeySupport: true,
|
|
11736
|
-
marginPercent: 20,
|
|
11737
|
-
hidden: true
|
|
11870
|
+
platformKeySupport: true
|
|
11738
11871
|
},
|
|
11739
|
-
//
|
|
11872
|
+
// Cloudflare Browser Run Quick Action: Scrape
|
|
11740
11873
|
{
|
|
11741
|
-
id: "
|
|
11742
|
-
|
|
11743
|
-
|
|
11744
|
-
|
|
11874
|
+
id: "browser:scrape",
|
|
11875
|
+
aliases: ["browser-scrape"],
|
|
11876
|
+
name: "Browser Scrape",
|
|
11877
|
+
description: "Extract structured data from specific CSS selectors on a rendered web page using Cloudflare Browser Run.",
|
|
11878
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
11879
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_FETCH,
|
|
11745
11880
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
11746
11881
|
parametersSchema: {
|
|
11747
11882
|
type: "object",
|
|
11748
11883
|
properties: {
|
|
11749
|
-
|
|
11750
|
-
|
|
11751
|
-
|
|
11752
|
-
|
|
11753
|
-
|
|
11754
|
-
|
|
11755
|
-
|
|
11756
|
-
|
|
11757
|
-
|
|
11758
|
-
|
|
11759
|
-
|
|
11760
|
-
|
|
11761
|
-
|
|
11762
|
-
|
|
11763
|
-
|
|
11764
|
-
|
|
11765
|
-
type: "string",
|
|
11766
|
-
description: "ISO-639-1 language code (optional, auto-detected if omitted)"
|
|
11884
|
+
...browserRunCommonProperties,
|
|
11885
|
+
elements: {
|
|
11886
|
+
type: "array",
|
|
11887
|
+
description: "Elements to scrape from the rendered page",
|
|
11888
|
+
minItems: 1,
|
|
11889
|
+
items: {
|
|
11890
|
+
type: "object",
|
|
11891
|
+
properties: {
|
|
11892
|
+
selector: {
|
|
11893
|
+
type: "string",
|
|
11894
|
+
description: "CSS selector to extract",
|
|
11895
|
+
minLength: 1
|
|
11896
|
+
}
|
|
11897
|
+
},
|
|
11898
|
+
required: ["selector"]
|
|
11899
|
+
}
|
|
11767
11900
|
}
|
|
11768
11901
|
},
|
|
11769
|
-
required: ["
|
|
11770
|
-
},
|
|
11771
|
-
defaultConfig: {
|
|
11772
|
-
format: "wav",
|
|
11773
|
-
model_id: "scribe_v2"
|
|
11774
|
-
// @snake-case-ok: ElevenLabs API
|
|
11902
|
+
required: ["url", "elements"]
|
|
11775
11903
|
},
|
|
11904
|
+
documentationUrl: BROWSER_RUN_DOCUMENTATION_URL,
|
|
11905
|
+
requiresApiKey: false,
|
|
11776
11906
|
executionHint: "platform",
|
|
11777
|
-
|
|
11778
|
-
platformKeySupport: true,
|
|
11779
|
-
marginPercent: 20,
|
|
11780
|
-
hidden: true
|
|
11907
|
+
platformKeySupport: true
|
|
11781
11908
|
},
|
|
11782
|
-
//
|
|
11909
|
+
// Cloudflare Browser Run Quick Action: JSON
|
|
11783
11910
|
{
|
|
11784
|
-
id: "
|
|
11785
|
-
|
|
11786
|
-
|
|
11787
|
-
|
|
11911
|
+
id: "browser:json",
|
|
11912
|
+
aliases: ["browser-json"],
|
|
11913
|
+
name: "Browser JSON",
|
|
11914
|
+
description: "Extract structured JSON from a rendered web page using Cloudflare Browser Run and Workers AI. Provide a prompt, a JSON schema, or both.",
|
|
11915
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
11916
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_FETCH,
|
|
11788
11917
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
11789
11918
|
parametersSchema: {
|
|
11790
11919
|
type: "object",
|
|
11791
11920
|
properties: {
|
|
11792
|
-
|
|
11921
|
+
...browserRunCommonProperties,
|
|
11922
|
+
prompt: {
|
|
11793
11923
|
type: "string",
|
|
11794
|
-
description: "
|
|
11924
|
+
description: "Natural-language extraction instructions",
|
|
11925
|
+
minLength: 1
|
|
11795
11926
|
},
|
|
11796
|
-
|
|
11797
|
-
type: "
|
|
11798
|
-
description: "
|
|
11927
|
+
schema: {
|
|
11928
|
+
type: "object",
|
|
11929
|
+
description: "JSON Schema describing the desired extracted result"
|
|
11799
11930
|
}
|
|
11800
11931
|
},
|
|
11801
|
-
required: ["
|
|
11932
|
+
required: ["url"]
|
|
11802
11933
|
},
|
|
11934
|
+
documentationUrl: BROWSER_RUN_DOCUMENTATION_URL,
|
|
11935
|
+
requiresApiKey: false,
|
|
11803
11936
|
executionHint: "platform",
|
|
11804
|
-
|
|
11937
|
+
platformKeySupport: true
|
|
11805
11938
|
},
|
|
11939
|
+
// Cloudflare Browser Run Quick Action: Markdown
|
|
11806
11940
|
{
|
|
11807
|
-
id: "
|
|
11808
|
-
|
|
11809
|
-
|
|
11810
|
-
|
|
11941
|
+
id: "browser:markdown",
|
|
11942
|
+
aliases: ["browser-markdown"],
|
|
11943
|
+
name: "Browser Markdown",
|
|
11944
|
+
description: "Convert a rendered web page into clean Markdown using Cloudflare Browser Run.",
|
|
11945
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
11946
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_FETCH,
|
|
11947
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
11948
|
+
parametersSchema: {
|
|
11949
|
+
type: "object",
|
|
11950
|
+
properties: browserRunCommonProperties,
|
|
11951
|
+
required: ["url"]
|
|
11952
|
+
},
|
|
11953
|
+
documentationUrl: BROWSER_RUN_DOCUMENTATION_URL,
|
|
11954
|
+
requiresApiKey: false,
|
|
11955
|
+
executionHint: "platform",
|
|
11956
|
+
platformKeySupport: true
|
|
11957
|
+
},
|
|
11958
|
+
// Cloudflare Browser Run Quick Action: Snapshot
|
|
11959
|
+
{
|
|
11960
|
+
id: "browser:snapshot",
|
|
11961
|
+
aliases: ["browser-snapshot"],
|
|
11962
|
+
name: "Browser Snapshot",
|
|
11963
|
+
description: "Capture rendered HTML and a base64 screenshot of a web page in one Cloudflare Browser Run request.",
|
|
11964
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
11965
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_FETCH,
|
|
11811
11966
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
11812
11967
|
parametersSchema: {
|
|
11813
11968
|
type: "object",
|
|
11814
11969
|
properties: {
|
|
11815
|
-
|
|
11816
|
-
|
|
11817
|
-
|
|
11818
|
-
|
|
11819
|
-
|
|
11820
|
-
|
|
11821
|
-
|
|
11822
|
-
|
|
11823
|
-
|
|
11824
|
-
|
|
11825
|
-
|
|
11970
|
+
...browserRunCommonProperties,
|
|
11971
|
+
screenshotOptions: browserRunScreenshotOptionsSchema
|
|
11972
|
+
},
|
|
11973
|
+
required: ["url"]
|
|
11974
|
+
},
|
|
11975
|
+
defaultConfig: {
|
|
11976
|
+
screenshotOptions: {
|
|
11977
|
+
type: "png",
|
|
11978
|
+
fullPage: false
|
|
11979
|
+
}
|
|
11980
|
+
},
|
|
11981
|
+
documentationUrl: BROWSER_RUN_DOCUMENTATION_URL,
|
|
11982
|
+
requiresApiKey: false,
|
|
11983
|
+
executionHint: "platform",
|
|
11984
|
+
platformKeySupport: true
|
|
11985
|
+
},
|
|
11986
|
+
// Cloudflare Browser Run Quick Action: Links
|
|
11987
|
+
{
|
|
11988
|
+
id: "browser:links",
|
|
11989
|
+
aliases: ["browser-links"],
|
|
11990
|
+
name: "Browser Links",
|
|
11991
|
+
description: "Retrieve links from a rendered web page using Cloudflare Browser Run. Can limit results to visible links.",
|
|
11992
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
11993
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_FETCH,
|
|
11994
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
11995
|
+
parametersSchema: {
|
|
11996
|
+
type: "object",
|
|
11997
|
+
properties: {
|
|
11998
|
+
...browserRunCommonProperties,
|
|
11999
|
+
visibleLinksOnly: {
|
|
12000
|
+
type: "boolean",
|
|
12001
|
+
description: "Only return links visible on the rendered page",
|
|
12002
|
+
default: false
|
|
11826
12003
|
}
|
|
11827
12004
|
},
|
|
11828
|
-
required: ["
|
|
12005
|
+
required: ["url"]
|
|
12006
|
+
},
|
|
12007
|
+
defaultConfig: {
|
|
12008
|
+
visibleLinksOnly: false
|
|
11829
12009
|
},
|
|
12010
|
+
documentationUrl: BROWSER_RUN_DOCUMENTATION_URL,
|
|
12011
|
+
requiresApiKey: false,
|
|
11830
12012
|
executionHint: "platform",
|
|
11831
|
-
|
|
12013
|
+
platformKeySupport: true
|
|
11832
12014
|
},
|
|
11833
|
-
//
|
|
12015
|
+
// -----------------------------------------------------------------------
|
|
12016
|
+
// Cloudflare Browser Run Session Tools (Phase 2)
|
|
12017
|
+
// Persistent browser sessions for interactive agent browsing.
|
|
12018
|
+
// -----------------------------------------------------------------------
|
|
11834
12019
|
{
|
|
11835
|
-
id: "
|
|
11836
|
-
|
|
11837
|
-
|
|
11838
|
-
|
|
12020
|
+
id: "browser:open",
|
|
12021
|
+
aliases: ["browser-open"],
|
|
12022
|
+
name: "Browser Open",
|
|
12023
|
+
description: "Open a persistent browser session and navigate to a URL. Returns a sessionId you can reuse across multiple turns. Sessions survive between turns \u2014 store the sessionId and pass it to subsequent browser tools. If a session expires (idle >2 min or >10 min total), you will get an error; just call browser:open again to start a fresh session. Use browser:close to explicitly end a session when done.",
|
|
12024
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
12025
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_USE,
|
|
11839
12026
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
11840
12027
|
parametersSchema: {
|
|
11841
12028
|
type: "object",
|
|
11842
12029
|
properties: {
|
|
11843
12030
|
url: {
|
|
11844
12031
|
type: "string",
|
|
11845
|
-
description: "
|
|
12032
|
+
description: "The URL to navigate to"
|
|
11846
12033
|
},
|
|
11847
|
-
|
|
12034
|
+
viewport: browserRunViewportSchema,
|
|
12035
|
+
userAgent: {
|
|
11848
12036
|
type: "string",
|
|
11849
|
-
description:
|
|
11850
|
-
}
|
|
11851
|
-
|
|
12037
|
+
description: "Custom User-Agent string"
|
|
12038
|
+
}
|
|
12039
|
+
},
|
|
12040
|
+
required: ["url"]
|
|
12041
|
+
},
|
|
12042
|
+
documentationUrl: BROWSER_SESSION_DOCUMENTATION_URL,
|
|
12043
|
+
requiresApiKey: false,
|
|
12044
|
+
executionHint: "platform",
|
|
12045
|
+
platformKeySupport: true
|
|
12046
|
+
},
|
|
12047
|
+
{
|
|
12048
|
+
id: "browser:navigate",
|
|
12049
|
+
aliases: ["browser-navigate"],
|
|
12050
|
+
name: "Browser Navigate",
|
|
12051
|
+
description: "Navigate to a new URL in an existing browser session.",
|
|
12052
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
12053
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_USE,
|
|
12054
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12055
|
+
parametersSchema: {
|
|
12056
|
+
type: "object",
|
|
12057
|
+
properties: {
|
|
12058
|
+
sessionId: {
|
|
11852
12059
|
type: "string",
|
|
11853
|
-
description:
|
|
12060
|
+
description: "The session ID returned by browser:open"
|
|
11854
12061
|
},
|
|
11855
|
-
|
|
12062
|
+
url: {
|
|
11856
12063
|
type: "string",
|
|
11857
|
-
description: "
|
|
12064
|
+
description: "The URL to navigate to"
|
|
11858
12065
|
},
|
|
11859
|
-
|
|
12066
|
+
waitUntil: {
|
|
11860
12067
|
type: "string",
|
|
11861
|
-
|
|
11862
|
-
|
|
12068
|
+
description: "When to consider navigation finished",
|
|
12069
|
+
enum: ["load", "domcontentloaded", "networkidle0", "networkidle2"],
|
|
12070
|
+
default: "networkidle0"
|
|
11863
12071
|
}
|
|
11864
12072
|
},
|
|
11865
|
-
required: []
|
|
12073
|
+
required: ["sessionId", "url"]
|
|
11866
12074
|
},
|
|
12075
|
+
documentationUrl: BROWSER_SESSION_DOCUMENTATION_URL,
|
|
12076
|
+
requiresApiKey: false,
|
|
11867
12077
|
executionHint: "platform",
|
|
11868
|
-
platformKeySupport: true
|
|
11869
|
-
requiresApiKey: false
|
|
12078
|
+
platformKeySupport: true
|
|
11870
12079
|
},
|
|
11871
|
-
// Publish Page — render HTML inline in the browser at a shareable URL
|
|
11872
12080
|
{
|
|
11873
|
-
id: "
|
|
11874
|
-
|
|
11875
|
-
|
|
11876
|
-
|
|
12081
|
+
id: "browser:click",
|
|
12082
|
+
aliases: ["browser-click"],
|
|
12083
|
+
name: "Browser Click",
|
|
12084
|
+
description: "Click an element by CSS selector in an existing browser session.",
|
|
12085
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
12086
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_USE,
|
|
11877
12087
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
11878
12088
|
parametersSchema: {
|
|
11879
12089
|
type: "object",
|
|
11880
12090
|
properties: {
|
|
11881
|
-
|
|
12091
|
+
sessionId: {
|
|
11882
12092
|
type: "string",
|
|
11883
|
-
description: "
|
|
12093
|
+
description: "The session ID returned by browser:open"
|
|
11884
12094
|
},
|
|
11885
|
-
|
|
12095
|
+
selector: {
|
|
11886
12096
|
type: "string",
|
|
11887
|
-
description:
|
|
12097
|
+
description: "CSS selector of the element to click"
|
|
11888
12098
|
},
|
|
11889
|
-
|
|
12099
|
+
button: {
|
|
11890
12100
|
type: "string",
|
|
11891
|
-
description:
|
|
12101
|
+
description: "Mouse button to click",
|
|
12102
|
+
enum: ["left", "right", "middle"],
|
|
12103
|
+
default: "left"
|
|
11892
12104
|
},
|
|
11893
|
-
|
|
11894
|
-
type: "
|
|
11895
|
-
description: "
|
|
12105
|
+
clickCount: {
|
|
12106
|
+
type: "number",
|
|
12107
|
+
description: "Number of clicks (e.g. 2 for double-click)",
|
|
12108
|
+
minimum: 1,
|
|
12109
|
+
default: 1
|
|
12110
|
+
},
|
|
12111
|
+
delay: {
|
|
12112
|
+
type: "number",
|
|
12113
|
+
description: "Delay between mousedown and mouseup in milliseconds",
|
|
12114
|
+
minimum: 0
|
|
11896
12115
|
}
|
|
11897
12116
|
},
|
|
11898
|
-
required: []
|
|
12117
|
+
required: ["sessionId", "selector"]
|
|
11899
12118
|
},
|
|
12119
|
+
documentationUrl: BROWSER_SESSION_DOCUMENTATION_URL,
|
|
12120
|
+
requiresApiKey: false,
|
|
11900
12121
|
executionHint: "platform",
|
|
11901
|
-
platformKeySupport: true
|
|
11902
|
-
requiresApiKey: false
|
|
12122
|
+
platformKeySupport: true
|
|
11903
12123
|
},
|
|
11904
|
-
// Generate PDF — render HTML or Markdown to a PDF document
|
|
11905
12124
|
{
|
|
11906
|
-
id: "
|
|
11907
|
-
|
|
11908
|
-
|
|
11909
|
-
|
|
12125
|
+
id: "browser:type",
|
|
12126
|
+
aliases: ["browser-type"],
|
|
12127
|
+
name: "Browser Type",
|
|
12128
|
+
description: "Type text into an input element or the currently focused element in a browser session.",
|
|
12129
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
12130
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_USE,
|
|
11910
12131
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
11911
12132
|
parametersSchema: {
|
|
11912
12133
|
type: "object",
|
|
11913
12134
|
properties: {
|
|
11914
|
-
|
|
12135
|
+
sessionId: {
|
|
11915
12136
|
type: "string",
|
|
11916
|
-
description: "
|
|
12137
|
+
description: "The session ID returned by browser:open"
|
|
11917
12138
|
},
|
|
11918
|
-
|
|
12139
|
+
text: {
|
|
11919
12140
|
type: "string",
|
|
11920
|
-
description: "
|
|
12141
|
+
description: "The text to type"
|
|
11921
12142
|
},
|
|
11922
|
-
|
|
12143
|
+
selector: {
|
|
11923
12144
|
type: "string",
|
|
11924
|
-
description: "
|
|
12145
|
+
description: "CSS selector of the input element. If omitted, types into the focused element."
|
|
11925
12146
|
},
|
|
11926
|
-
|
|
11927
|
-
type: "
|
|
11928
|
-
|
|
11929
|
-
|
|
12147
|
+
delay: {
|
|
12148
|
+
type: "number",
|
|
12149
|
+
description: "Delay between keystrokes in milliseconds",
|
|
12150
|
+
minimum: 0
|
|
11930
12151
|
},
|
|
11931
|
-
|
|
11932
|
-
type: "
|
|
11933
|
-
description: "
|
|
11934
|
-
|
|
11935
|
-
format: {
|
|
11936
|
-
type: "string",
|
|
11937
|
-
description: 'Paper format (e.g. "a4", "letter", "legal"). Overrides width/height.'
|
|
11938
|
-
},
|
|
11939
|
-
landscape: { type: "boolean" },
|
|
11940
|
-
printBackground: { type: "boolean" },
|
|
11941
|
-
displayHeaderFooter: { type: "boolean" },
|
|
11942
|
-
headerTemplate: {
|
|
11943
|
-
type: "string",
|
|
11944
|
-
description: "HTML template for the print header. Supports `date`, `title`, `url`, `pageNumber`, `totalPages` classes."
|
|
11945
|
-
},
|
|
11946
|
-
footerTemplate: { type: "string" },
|
|
11947
|
-
scale: {
|
|
11948
|
-
type: "number",
|
|
11949
|
-
description: "Rendering scale, between 0.1 and 2. Default 1."
|
|
11950
|
-
},
|
|
11951
|
-
preferCSSPageSize: { type: "boolean" },
|
|
11952
|
-
pageRanges: {
|
|
11953
|
-
type: "string",
|
|
11954
|
-
description: 'Page ranges to include, e.g. "1-5, 8, 11-13". Default: all pages.'
|
|
11955
|
-
},
|
|
11956
|
-
omitBackground: { type: "boolean" },
|
|
11957
|
-
margin: {
|
|
11958
|
-
type: "object",
|
|
11959
|
-
properties: {
|
|
11960
|
-
top: { type: "string" },
|
|
11961
|
-
right: { type: "string" },
|
|
11962
|
-
bottom: { type: "string" },
|
|
11963
|
-
left: { type: "string" }
|
|
11964
|
-
}
|
|
11965
|
-
}
|
|
11966
|
-
}
|
|
12152
|
+
pressEnter: {
|
|
12153
|
+
type: "boolean",
|
|
12154
|
+
description: "Press Enter after typing",
|
|
12155
|
+
default: false
|
|
11967
12156
|
}
|
|
11968
12157
|
},
|
|
11969
|
-
required: []
|
|
12158
|
+
required: ["sessionId", "text"]
|
|
11970
12159
|
},
|
|
12160
|
+
documentationUrl: BROWSER_SESSION_DOCUMENTATION_URL,
|
|
12161
|
+
requiresApiKey: false,
|
|
11971
12162
|
executionHint: "platform",
|
|
11972
|
-
platformKeySupport: true
|
|
11973
|
-
requiresApiKey: false
|
|
12163
|
+
platformKeySupport: true
|
|
11974
12164
|
},
|
|
11975
|
-
// Record Management Tools — CRUD operations on Runtype records
|
|
11976
12165
|
{
|
|
11977
|
-
id: "
|
|
11978
|
-
|
|
11979
|
-
|
|
11980
|
-
|
|
12166
|
+
id: "browser:scroll",
|
|
12167
|
+
aliases: ["browser-scroll"],
|
|
12168
|
+
name: "Browser Scroll",
|
|
12169
|
+
description: "Scroll the page or a specific element in a browser session.",
|
|
12170
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
12171
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_USE,
|
|
11981
12172
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
11982
12173
|
parametersSchema: {
|
|
11983
12174
|
type: "object",
|
|
11984
12175
|
properties: {
|
|
11985
|
-
|
|
12176
|
+
sessionId: {
|
|
11986
12177
|
type: "string",
|
|
11987
|
-
description:
|
|
12178
|
+
description: "The session ID returned by browser:open"
|
|
11988
12179
|
},
|
|
11989
|
-
|
|
12180
|
+
direction: {
|
|
11990
12181
|
type: "string",
|
|
11991
|
-
description: "
|
|
12182
|
+
description: "Scroll direction",
|
|
12183
|
+
enum: ["up", "down", "left", "right"],
|
|
12184
|
+
default: "down"
|
|
11992
12185
|
},
|
|
11993
|
-
|
|
11994
|
-
type: "
|
|
11995
|
-
description: "
|
|
12186
|
+
amount: {
|
|
12187
|
+
type: "number",
|
|
12188
|
+
description: "Scroll amount in pixels",
|
|
12189
|
+
minimum: 1,
|
|
12190
|
+
default: 500
|
|
11996
12191
|
},
|
|
11997
|
-
|
|
12192
|
+
selector: {
|
|
11998
12193
|
type: "string",
|
|
11999
|
-
description:
|
|
12000
|
-
enum: ["merge", "replace"],
|
|
12001
|
-
default: "merge"
|
|
12194
|
+
description: "CSS selector of the element to scroll within. If omitted, scrolls the page."
|
|
12002
12195
|
}
|
|
12003
12196
|
},
|
|
12004
|
-
required: ["
|
|
12197
|
+
required: ["sessionId"]
|
|
12005
12198
|
},
|
|
12006
|
-
|
|
12199
|
+
documentationUrl: BROWSER_SESSION_DOCUMENTATION_URL,
|
|
12007
12200
|
requiresApiKey: false,
|
|
12008
|
-
|
|
12201
|
+
executionHint: "platform",
|
|
12202
|
+
platformKeySupport: true
|
|
12009
12203
|
},
|
|
12010
12204
|
{
|
|
12011
|
-
id: "
|
|
12012
|
-
|
|
12013
|
-
|
|
12014
|
-
|
|
12205
|
+
id: "browser:session-screenshot",
|
|
12206
|
+
aliases: ["browser-session-screenshot"],
|
|
12207
|
+
name: "Browser Session Screenshot",
|
|
12208
|
+
description: "Capture a screenshot of the current page in a browser session. Returns a base64-encoded image.",
|
|
12209
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
12210
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_USE,
|
|
12015
12211
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12016
12212
|
parametersSchema: {
|
|
12017
12213
|
type: "object",
|
|
12018
12214
|
properties: {
|
|
12019
|
-
|
|
12020
|
-
type: "
|
|
12021
|
-
description: "
|
|
12022
|
-
items: {
|
|
12023
|
-
type: "object",
|
|
12024
|
-
properties: {
|
|
12025
|
-
type: {
|
|
12026
|
-
type: "string",
|
|
12027
|
-
description: "Record type category"
|
|
12028
|
-
},
|
|
12029
|
-
name: {
|
|
12030
|
-
type: "string",
|
|
12031
|
-
description: "Unique name within this type"
|
|
12032
|
-
},
|
|
12033
|
-
metadata: {
|
|
12034
|
-
type: "object",
|
|
12035
|
-
description: "JSON object containing the record data"
|
|
12036
|
-
}
|
|
12037
|
-
},
|
|
12038
|
-
required: ["type", "name", "metadata"]
|
|
12039
|
-
}
|
|
12215
|
+
sessionId: {
|
|
12216
|
+
type: "string",
|
|
12217
|
+
description: "The session ID returned by browser:open"
|
|
12040
12218
|
},
|
|
12041
|
-
|
|
12219
|
+
fullPage: {
|
|
12220
|
+
type: "boolean",
|
|
12221
|
+
description: "Capture the full scrollable page instead of just the viewport",
|
|
12222
|
+
default: false
|
|
12223
|
+
},
|
|
12224
|
+
selector: {
|
|
12042
12225
|
type: "string",
|
|
12043
|
-
description:
|
|
12044
|
-
|
|
12045
|
-
|
|
12226
|
+
description: "CSS selector of an element to capture instead of the full page"
|
|
12227
|
+
},
|
|
12228
|
+
format: {
|
|
12229
|
+
type: "string",
|
|
12230
|
+
description: "Image format",
|
|
12231
|
+
enum: ["png", "jpeg", "webp"],
|
|
12232
|
+
default: "png"
|
|
12046
12233
|
}
|
|
12047
12234
|
},
|
|
12048
|
-
required: ["
|
|
12235
|
+
required: ["sessionId"]
|
|
12049
12236
|
},
|
|
12050
|
-
|
|
12237
|
+
documentationUrl: BROWSER_SESSION_DOCUMENTATION_URL,
|
|
12051
12238
|
requiresApiKey: false,
|
|
12052
|
-
|
|
12239
|
+
executionHint: "platform",
|
|
12240
|
+
platformKeySupport: true
|
|
12053
12241
|
},
|
|
12054
12242
|
{
|
|
12055
|
-
id: "
|
|
12056
|
-
|
|
12057
|
-
|
|
12058
|
-
|
|
12243
|
+
id: "browser:evaluate",
|
|
12244
|
+
aliases: ["browser-evaluate"],
|
|
12245
|
+
name: "Browser Evaluate",
|
|
12246
|
+
description: "Execute JavaScript in the browser page context of an existing session. Returns the result of the script.",
|
|
12247
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
12248
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_USE,
|
|
12059
12249
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12060
12250
|
parametersSchema: {
|
|
12061
12251
|
type: "object",
|
|
12062
12252
|
properties: {
|
|
12063
|
-
|
|
12253
|
+
sessionId: {
|
|
12064
12254
|
type: "string",
|
|
12065
|
-
description: "
|
|
12255
|
+
description: "The session ID returned by browser:open"
|
|
12066
12256
|
},
|
|
12067
|
-
|
|
12257
|
+
script: {
|
|
12068
12258
|
type: "string",
|
|
12069
|
-
description: "
|
|
12259
|
+
description: "JavaScript code to evaluate in the page context"
|
|
12070
12260
|
}
|
|
12071
12261
|
},
|
|
12072
|
-
required: ["
|
|
12262
|
+
required: ["sessionId", "script"]
|
|
12073
12263
|
},
|
|
12074
|
-
|
|
12264
|
+
documentationUrl: BROWSER_SESSION_DOCUMENTATION_URL,
|
|
12075
12265
|
requiresApiKey: false,
|
|
12076
|
-
|
|
12266
|
+
executionHint: "platform",
|
|
12267
|
+
platformKeySupport: true
|
|
12077
12268
|
},
|
|
12078
12269
|
{
|
|
12079
|
-
id: "
|
|
12080
|
-
|
|
12081
|
-
|
|
12082
|
-
|
|
12270
|
+
id: "browser:session-info",
|
|
12271
|
+
aliases: ["browser-session-info"],
|
|
12272
|
+
name: "Browser Session Info",
|
|
12273
|
+
description: "Get the current state of a browser session including URL, title, and session age.",
|
|
12274
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
12275
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_USE,
|
|
12083
12276
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12084
12277
|
parametersSchema: {
|
|
12085
12278
|
type: "object",
|
|
12086
12279
|
properties: {
|
|
12087
|
-
|
|
12088
|
-
type: "string",
|
|
12089
|
-
description: "Filter by record type (optional)"
|
|
12090
|
-
},
|
|
12091
|
-
search: {
|
|
12280
|
+
sessionId: {
|
|
12092
12281
|
type: "string",
|
|
12093
|
-
description: "
|
|
12094
|
-
},
|
|
12095
|
-
limit: {
|
|
12096
|
-
type: "number",
|
|
12097
|
-
description: "Maximum number of records to return (1-50, default 20)",
|
|
12098
|
-
minimum: 1,
|
|
12099
|
-
maximum: 50,
|
|
12100
|
-
default: 20
|
|
12101
|
-
},
|
|
12102
|
-
offset: {
|
|
12103
|
-
type: "number",
|
|
12104
|
-
description: "Number of records to skip for pagination (default 0)",
|
|
12105
|
-
minimum: 0,
|
|
12106
|
-
default: 0
|
|
12282
|
+
description: "The session ID returned by browser:open"
|
|
12107
12283
|
}
|
|
12108
12284
|
},
|
|
12109
|
-
required: []
|
|
12285
|
+
required: ["sessionId"]
|
|
12110
12286
|
},
|
|
12111
|
-
|
|
12287
|
+
documentationUrl: BROWSER_SESSION_DOCUMENTATION_URL,
|
|
12112
12288
|
requiresApiKey: false,
|
|
12113
|
-
|
|
12289
|
+
executionHint: "platform",
|
|
12290
|
+
platformKeySupport: true
|
|
12114
12291
|
},
|
|
12115
12292
|
{
|
|
12116
|
-
id: "
|
|
12117
|
-
|
|
12118
|
-
|
|
12119
|
-
|
|
12293
|
+
id: "browser:close",
|
|
12294
|
+
aliases: ["browser-close"],
|
|
12295
|
+
name: "Browser Close",
|
|
12296
|
+
description: "Explicitly close a browser session and release resources. Call this when you are done with a session and want a clean slate. If you do not close the session, it will be cleaned up automatically after idle timeout (2 min) or max session lifetime (10 min).",
|
|
12297
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
12298
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_USE,
|
|
12120
12299
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12121
12300
|
parametersSchema: {
|
|
12122
12301
|
type: "object",
|
|
12123
12302
|
properties: {
|
|
12124
|
-
|
|
12125
|
-
type: "string",
|
|
12126
|
-
description: "Record type of the record to delete"
|
|
12127
|
-
},
|
|
12128
|
-
name: {
|
|
12303
|
+
sessionId: {
|
|
12129
12304
|
type: "string",
|
|
12130
|
-
description: "
|
|
12305
|
+
description: "The session ID returned by browser:open"
|
|
12131
12306
|
}
|
|
12132
12307
|
},
|
|
12133
|
-
required: ["
|
|
12308
|
+
required: ["sessionId"]
|
|
12134
12309
|
},
|
|
12135
|
-
|
|
12310
|
+
documentationUrl: BROWSER_SESSION_DOCUMENTATION_URL,
|
|
12136
12311
|
requiresApiKey: false,
|
|
12137
|
-
|
|
12312
|
+
executionHint: "platform",
|
|
12313
|
+
platformKeySupport: true
|
|
12138
12314
|
},
|
|
12139
|
-
// UCP (Universal Commerce Protocol) Tools — interact with any UCP-enabled merchant
|
|
12140
12315
|
{
|
|
12141
|
-
id: "
|
|
12142
|
-
|
|
12143
|
-
|
|
12144
|
-
|
|
12316
|
+
id: "browser:task",
|
|
12317
|
+
aliases: ["browser-task"],
|
|
12318
|
+
name: "Browser Task",
|
|
12319
|
+
description: "Run an autonomous browser task described in natural language. Provide a 'goal' plus EITHER a 'startUrl' (to open a fresh browser) OR a 'sessionId' from browser:open (to operate on an existing session). The AI will navigate, click, type, and extract information to complete the task, then return the result. When 'sessionId' is provided, the browser stays open afterward so you can continue with other browser tools (browser:click, browser:type, etc.). Provide an 'outputSchema' (JSON Schema) to get structured JSON back instead of a text summary. Use this when you want the browser to handle the 'how' and just want the outcome \u2014 for precise control over individual actions, use the lower-level browser session tools instead.",
|
|
12320
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
12321
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_USE,
|
|
12145
12322
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12146
12323
|
parametersSchema: {
|
|
12147
12324
|
type: "object",
|
|
12148
12325
|
properties: {
|
|
12149
|
-
|
|
12326
|
+
goal: {
|
|
12150
12327
|
type: "string",
|
|
12151
|
-
description:
|
|
12328
|
+
description: "Natural-language description of what to accomplish on the page."
|
|
12329
|
+
},
|
|
12330
|
+
startUrl: {
|
|
12331
|
+
type: "string",
|
|
12332
|
+
description: "URL to begin browsing from. Required when sessionId is not provided."
|
|
12333
|
+
},
|
|
12334
|
+
sessionId: {
|
|
12335
|
+
type: "string",
|
|
12336
|
+
description: "Existing browser session ID from browser:open. When provided, the task runs on that session and the browser stays open after the task completes. If both startUrl and sessionId are provided, sessionId wins."
|
|
12337
|
+
},
|
|
12338
|
+
outputSchema: {
|
|
12339
|
+
type: "object",
|
|
12340
|
+
description: "Optional JSON Schema. When provided, the result is the parsed JSON object matching the schema. Otherwise the result is a short plain-English summary of what was accomplished."
|
|
12341
|
+
},
|
|
12342
|
+
maxSteps: {
|
|
12343
|
+
type: "number",
|
|
12344
|
+
description: "Maximum number of browser actions to take (default 15, max 30).",
|
|
12345
|
+
minimum: 1,
|
|
12346
|
+
maximum: 30,
|
|
12347
|
+
default: 15
|
|
12348
|
+
},
|
|
12349
|
+
viewport: browserRunViewportSchema,
|
|
12350
|
+
userAgent: {
|
|
12351
|
+
type: "string",
|
|
12352
|
+
description: "Custom User-Agent string (only used when starting a fresh browser)."
|
|
12152
12353
|
}
|
|
12153
12354
|
},
|
|
12154
|
-
required: ["
|
|
12355
|
+
required: ["goal"]
|
|
12155
12356
|
},
|
|
12156
|
-
|
|
12357
|
+
documentationUrl: BROWSER_SESSION_DOCUMENTATION_URL,
|
|
12157
12358
|
requiresApiKey: false,
|
|
12158
|
-
|
|
12359
|
+
executionHint: "platform",
|
|
12360
|
+
platformKeySupport: true,
|
|
12361
|
+
experimental: true
|
|
12159
12362
|
},
|
|
12363
|
+
// Vector Search - Semantic search across knowledge bases
|
|
12364
|
+
// Supports multi-instance format: builtin:vector-search#<instance-id>
|
|
12160
12365
|
{
|
|
12161
|
-
id: "
|
|
12162
|
-
name: "
|
|
12163
|
-
description: "
|
|
12164
|
-
category: exports.BuiltInToolCategory.
|
|
12366
|
+
id: "vector-search",
|
|
12367
|
+
name: "Semantic Search",
|
|
12368
|
+
description: "Search through knowledge bases using semantic similarity. Finds relevant documents based on meaning rather than exact keyword matches.",
|
|
12369
|
+
category: exports.BuiltInToolCategory.KNOWLEDGE_RETRIEVAL,
|
|
12165
12370
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12371
|
+
// Works with any model, uses OpenAI for embeddings
|
|
12166
12372
|
parametersSchema: {
|
|
12167
12373
|
type: "object",
|
|
12168
12374
|
properties: {
|
|
12169
|
-
|
|
12375
|
+
query: {
|
|
12170
12376
|
type: "string",
|
|
12171
|
-
description:
|
|
12377
|
+
description: "The search query to find semantically similar documents"
|
|
12172
12378
|
},
|
|
12173
|
-
|
|
12174
|
-
type: "
|
|
12175
|
-
description: "
|
|
12176
|
-
|
|
12177
|
-
|
|
12178
|
-
|
|
12179
|
-
|
|
12180
|
-
|
|
12181
|
-
|
|
12182
|
-
|
|
12183
|
-
|
|
12379
|
+
limit: {
|
|
12380
|
+
type: "number",
|
|
12381
|
+
description: "Maximum number of results to return (1-20)",
|
|
12382
|
+
minimum: 1,
|
|
12383
|
+
maximum: 20,
|
|
12384
|
+
default: 5
|
|
12385
|
+
}
|
|
12386
|
+
},
|
|
12387
|
+
required: ["query"]
|
|
12388
|
+
},
|
|
12389
|
+
defaultConfig: {
|
|
12390
|
+
limit: 5,
|
|
12391
|
+
threshold: 0.3
|
|
12392
|
+
},
|
|
12393
|
+
configSchema: {
|
|
12394
|
+
supportsInstances: true,
|
|
12395
|
+
instanceLabel: "Add Knowledge Base",
|
|
12396
|
+
properties: {
|
|
12397
|
+
threshold: {
|
|
12398
|
+
type: "number",
|
|
12399
|
+
label: "Similarity Threshold",
|
|
12400
|
+
description: "Minimum similarity score (0-1). Lower values return more results.",
|
|
12401
|
+
default: 0.3
|
|
12184
12402
|
},
|
|
12185
|
-
|
|
12186
|
-
type: "
|
|
12187
|
-
|
|
12188
|
-
|
|
12189
|
-
|
|
12190
|
-
first_name: { type: "string", description: "Buyer first name" },
|
|
12191
|
-
last_name: { type: "string", description: "Buyer last name" },
|
|
12192
|
-
phone_number: { type: "string", description: "Buyer phone number" }
|
|
12193
|
-
}
|
|
12403
|
+
displayName: {
|
|
12404
|
+
type: "string",
|
|
12405
|
+
label: "Display Name",
|
|
12406
|
+
description: 'Name shown to the AI model (e.g., "Search Documentation")',
|
|
12407
|
+
required: true
|
|
12194
12408
|
},
|
|
12195
|
-
|
|
12196
|
-
type: "
|
|
12197
|
-
|
|
12198
|
-
|
|
12199
|
-
|
|
12200
|
-
|
|
12201
|
-
|
|
12202
|
-
|
|
12203
|
-
|
|
12409
|
+
provider: {
|
|
12410
|
+
type: "select",
|
|
12411
|
+
label: "Vector Provider",
|
|
12412
|
+
description: "Where the vectors are stored",
|
|
12413
|
+
required: true,
|
|
12414
|
+
default: "pgvector",
|
|
12415
|
+
options: [
|
|
12416
|
+
{ value: "pgvector", label: "Platform (pgvector)" },
|
|
12417
|
+
{ value: "weaviate", label: "Weaviate" },
|
|
12418
|
+
{ value: "vectorize", label: "Cloudflare Vectorize" }
|
|
12419
|
+
]
|
|
12204
12420
|
},
|
|
12205
|
-
|
|
12206
|
-
type: "
|
|
12207
|
-
|
|
12208
|
-
|
|
12209
|
-
|
|
12210
|
-
type: "array",
|
|
12211
|
-
description: "Fulfillment methods",
|
|
12212
|
-
items: {
|
|
12213
|
-
type: "object",
|
|
12214
|
-
properties: {
|
|
12215
|
-
type: {
|
|
12216
|
-
type: "string",
|
|
12217
|
-
description: "Fulfillment type",
|
|
12218
|
-
enum: ["shipping", "pickup", "digital"]
|
|
12219
|
-
},
|
|
12220
|
-
destinations: {
|
|
12221
|
-
type: "array",
|
|
12222
|
-
description: "Destinations for this fulfillment method",
|
|
12223
|
-
items: {
|
|
12224
|
-
type: "object",
|
|
12225
|
-
properties: {
|
|
12226
|
-
first_name: { type: "string", description: "Recipient first name" },
|
|
12227
|
-
last_name: { type: "string", description: "Recipient last name" },
|
|
12228
|
-
address: {
|
|
12229
|
-
type: "object",
|
|
12230
|
-
description: "Destination address",
|
|
12231
|
-
properties: {
|
|
12232
|
-
address1: { type: "string", description: "Street address line 1" },
|
|
12233
|
-
address2: { type: "string", description: "Street address line 2" },
|
|
12234
|
-
city: { type: "string", description: "City" },
|
|
12235
|
-
province_code: { type: "string", description: "State/province code" },
|
|
12236
|
-
postal_code: { type: "string", description: "Postal/ZIP code" },
|
|
12237
|
-
country_code: { type: "string", description: "ISO 3166-1 alpha-2 country code" }
|
|
12238
|
-
}
|
|
12239
|
-
},
|
|
12240
|
-
phone_number: { type: "string", description: "Recipient phone number" }
|
|
12241
|
-
}
|
|
12242
|
-
}
|
|
12243
|
-
},
|
|
12244
|
-
line_item_ids: {
|
|
12245
|
-
type: "array",
|
|
12246
|
-
items: { type: "string" },
|
|
12247
|
-
description: "Line item IDs fulfilled by this method"
|
|
12248
|
-
},
|
|
12249
|
-
selected_destination_id: {
|
|
12250
|
-
type: "string",
|
|
12251
|
-
description: "Selected destination ID for this method"
|
|
12252
|
-
},
|
|
12253
|
-
groups: {
|
|
12254
|
-
type: "array",
|
|
12255
|
-
description: "Fulfillment groups with selected options. After the server returns groups with available options, send back the group ID and the selected_option_id to choose a fulfillment option.",
|
|
12256
|
-
items: {
|
|
12257
|
-
type: "object",
|
|
12258
|
-
properties: {
|
|
12259
|
-
id: { type: "string", description: "Group ID from the checkout response" },
|
|
12260
|
-
selected_option_id: {
|
|
12261
|
-
type: "string",
|
|
12262
|
-
description: "ID of the selected fulfillment option within this group"
|
|
12263
|
-
}
|
|
12264
|
-
},
|
|
12265
|
-
required: ["id", "selected_option_id"]
|
|
12266
|
-
}
|
|
12267
|
-
}
|
|
12268
|
-
},
|
|
12269
|
-
required: ["type"]
|
|
12270
|
-
}
|
|
12271
|
-
}
|
|
12272
|
-
}
|
|
12421
|
+
recordType: {
|
|
12422
|
+
type: "string",
|
|
12423
|
+
label: "Record Type",
|
|
12424
|
+
description: "Filter by record type (optional)",
|
|
12425
|
+
dependsOn: { field: "provider", value: "pgvector" }
|
|
12273
12426
|
},
|
|
12274
|
-
|
|
12427
|
+
weaviateClassName: {
|
|
12275
12428
|
type: "string",
|
|
12276
|
-
|
|
12429
|
+
label: "Collection Name",
|
|
12430
|
+
description: "Weaviate collection to search",
|
|
12431
|
+
required: true,
|
|
12432
|
+
dependsOn: { field: "provider", value: "weaviate" }
|
|
12433
|
+
},
|
|
12434
|
+
vectorizeIndexName: {
|
|
12435
|
+
type: "string",
|
|
12436
|
+
label: "Index Name",
|
|
12437
|
+
description: "Vectorize index to search",
|
|
12438
|
+
required: true,
|
|
12439
|
+
dependsOn: { field: "provider", value: "vectorize" }
|
|
12277
12440
|
}
|
|
12278
|
-
}
|
|
12279
|
-
required: ["domain", "items"]
|
|
12441
|
+
}
|
|
12280
12442
|
},
|
|
12281
|
-
|
|
12282
|
-
|
|
12283
|
-
|
|
12443
|
+
requiresApiKey: true,
|
|
12444
|
+
// Requires OpenAI key for embeddings
|
|
12445
|
+
executionHint: "platform"
|
|
12284
12446
|
},
|
|
12447
|
+
// ElevenLabs Text-to-Speech
|
|
12285
12448
|
{
|
|
12286
|
-
id: "
|
|
12287
|
-
name: "
|
|
12288
|
-
description: "
|
|
12289
|
-
category: exports.BuiltInToolCategory.
|
|
12449
|
+
id: "elevenlabs-tts",
|
|
12450
|
+
name: "ElevenLabs Text-to-Speech",
|
|
12451
|
+
description: "Convert text to natural-sounding speech using ElevenLabs AI voices",
|
|
12452
|
+
category: exports.BuiltInToolCategory.TEXT_TO_SPEECH,
|
|
12453
|
+
toolGroup: exports.BuiltInToolGroup.VOICE,
|
|
12454
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12455
|
+
parametersSchema: {
|
|
12456
|
+
type: "object",
|
|
12457
|
+
properties: {
|
|
12458
|
+
text: {
|
|
12459
|
+
type: "string",
|
|
12460
|
+
description: "Text to convert to speech",
|
|
12461
|
+
minLength: 1,
|
|
12462
|
+
maxLength: 5e3
|
|
12463
|
+
},
|
|
12464
|
+
voice_id: {
|
|
12465
|
+
type: "string",
|
|
12466
|
+
description: "ElevenLabs voice ID or name",
|
|
12467
|
+
default: "rachel"
|
|
12468
|
+
},
|
|
12469
|
+
model_id: {
|
|
12470
|
+
type: "string",
|
|
12471
|
+
description: "ElevenLabs model ID",
|
|
12472
|
+
default: "eleven_multilingual_v2"
|
|
12473
|
+
},
|
|
12474
|
+
stability: {
|
|
12475
|
+
type: "number",
|
|
12476
|
+
description: "Voice stability (0-1)",
|
|
12477
|
+
minimum: 0,
|
|
12478
|
+
maximum: 1,
|
|
12479
|
+
default: 0.5
|
|
12480
|
+
},
|
|
12481
|
+
similarity_boost: {
|
|
12482
|
+
type: "number",
|
|
12483
|
+
description: "Voice similarity boost (0-1)",
|
|
12484
|
+
minimum: 0,
|
|
12485
|
+
maximum: 1,
|
|
12486
|
+
default: 0.75
|
|
12487
|
+
}
|
|
12488
|
+
},
|
|
12489
|
+
required: ["text"]
|
|
12490
|
+
},
|
|
12491
|
+
defaultConfig: {
|
|
12492
|
+
voice_id: "rachel",
|
|
12493
|
+
// @snake-case-ok: ElevenLabs API
|
|
12494
|
+
model_id: "eleven_multilingual_v2",
|
|
12495
|
+
// @snake-case-ok: ElevenLabs API
|
|
12496
|
+
stability: 0.5,
|
|
12497
|
+
similarity_boost: 0.75
|
|
12498
|
+
// @snake-case-ok: ElevenLabs API
|
|
12499
|
+
},
|
|
12500
|
+
executionHint: "platform",
|
|
12501
|
+
requiresApiKey: true,
|
|
12502
|
+
platformKeySupport: true,
|
|
12503
|
+
marginPercent: 20,
|
|
12504
|
+
hidden: true
|
|
12505
|
+
},
|
|
12506
|
+
// ElevenLabs Speech-to-Text
|
|
12507
|
+
{
|
|
12508
|
+
id: "elevenlabs-stt",
|
|
12509
|
+
name: "ElevenLabs Speech-to-Text",
|
|
12510
|
+
description: "Transcribe audio to text using ElevenLabs Scribe models",
|
|
12511
|
+
category: exports.BuiltInToolCategory.TEXT_TO_SPEECH,
|
|
12512
|
+
toolGroup: exports.BuiltInToolGroup.VOICE,
|
|
12513
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12514
|
+
parametersSchema: {
|
|
12515
|
+
type: "object",
|
|
12516
|
+
properties: {
|
|
12517
|
+
audio: {
|
|
12518
|
+
type: "string",
|
|
12519
|
+
description: "Base64-encoded audio data",
|
|
12520
|
+
minLength: 1
|
|
12521
|
+
},
|
|
12522
|
+
format: {
|
|
12523
|
+
type: "string",
|
|
12524
|
+
description: "Audio format (wav, mp3, webm, etc.)",
|
|
12525
|
+
default: "wav"
|
|
12526
|
+
},
|
|
12527
|
+
model_id: {
|
|
12528
|
+
type: "string",
|
|
12529
|
+
description: "ElevenLabs STT model (scribe_v1 or scribe_v2)",
|
|
12530
|
+
default: "scribe_v2"
|
|
12531
|
+
},
|
|
12532
|
+
language_code: {
|
|
12533
|
+
type: "string",
|
|
12534
|
+
description: "ISO-639-1 language code (optional, auto-detected if omitted)"
|
|
12535
|
+
}
|
|
12536
|
+
},
|
|
12537
|
+
required: ["audio"]
|
|
12538
|
+
},
|
|
12539
|
+
defaultConfig: {
|
|
12540
|
+
format: "wav",
|
|
12541
|
+
model_id: "scribe_v2"
|
|
12542
|
+
// @snake-case-ok: ElevenLabs API
|
|
12543
|
+
},
|
|
12544
|
+
executionHint: "platform",
|
|
12545
|
+
requiresApiKey: true,
|
|
12546
|
+
platformKeySupport: true,
|
|
12547
|
+
marginPercent: 20,
|
|
12548
|
+
hidden: true
|
|
12549
|
+
},
|
|
12550
|
+
// Artifact-emit tools (auto-injected at runtime when ArtifactConfig is enabled)
|
|
12551
|
+
{
|
|
12552
|
+
id: "emit_artifact_markdown",
|
|
12553
|
+
name: "Emit Artifact (Markdown)",
|
|
12554
|
+
description: "Stream markdown content to the artifact channel on supported clients.",
|
|
12555
|
+
category: exports.BuiltInToolCategory.ARTIFACT,
|
|
12556
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12557
|
+
parametersSchema: {
|
|
12558
|
+
type: "object",
|
|
12559
|
+
properties: {
|
|
12560
|
+
title: {
|
|
12561
|
+
type: "string",
|
|
12562
|
+
description: "Optional title for the artifact"
|
|
12563
|
+
},
|
|
12564
|
+
markdown: {
|
|
12565
|
+
type: "string",
|
|
12566
|
+
description: "Markdown content to render"
|
|
12567
|
+
}
|
|
12568
|
+
},
|
|
12569
|
+
required: ["markdown"]
|
|
12570
|
+
},
|
|
12571
|
+
executionHint: "platform",
|
|
12572
|
+
hidden: true
|
|
12573
|
+
},
|
|
12574
|
+
{
|
|
12575
|
+
id: "emit_artifact_component",
|
|
12576
|
+
name: "Emit Artifact (Component)",
|
|
12577
|
+
description: "Emit a named component reference with props to the artifact channel. The client renders it using its registered component library.",
|
|
12578
|
+
category: exports.BuiltInToolCategory.ARTIFACT,
|
|
12579
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12580
|
+
parametersSchema: {
|
|
12581
|
+
type: "object",
|
|
12582
|
+
properties: {
|
|
12583
|
+
title: {
|
|
12584
|
+
type: "string",
|
|
12585
|
+
description: "Optional title for the artifact"
|
|
12586
|
+
},
|
|
12587
|
+
component: {
|
|
12588
|
+
type: "string",
|
|
12589
|
+
description: "Name of a component registered in the client-side component registry"
|
|
12590
|
+
},
|
|
12591
|
+
props: {
|
|
12592
|
+
type: "object",
|
|
12593
|
+
description: "Props object passed to the component renderer"
|
|
12594
|
+
}
|
|
12595
|
+
},
|
|
12596
|
+
required: ["component"]
|
|
12597
|
+
},
|
|
12598
|
+
executionHint: "platform",
|
|
12599
|
+
hidden: true
|
|
12600
|
+
},
|
|
12601
|
+
// Asset Storage — mirror files onto Runtype's CDN from a URL or inline bytes
|
|
12602
|
+
{
|
|
12603
|
+
id: "store_asset",
|
|
12604
|
+
name: "Store Asset",
|
|
12605
|
+
description: "Store a file on Runtype's CDN and get back a permanent URL (public) or time-limited signed URL (private). Two modes: (1) pass `url` to download from an HTTP(S) URL, or (2) pass base64-encoded `content` plus `contentType` to upload inline bytes directly \u2014 useful when running inside a sandboxed code-execution environment with restricted outbound network. Exactly one of `url` or `content` must be provided. Files are served as attachments (the URL downloads rather than rendering). To publish an HTML page that renders in the browser, use `publish_page` instead. 25 MB max.",
|
|
12606
|
+
category: exports.BuiltInToolCategory.FILE_OPERATIONS,
|
|
12607
|
+
toolGroup: exports.BuiltInToolGroup.FILE_OUTPUTS,
|
|
12608
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12609
|
+
parametersSchema: {
|
|
12610
|
+
type: "object",
|
|
12611
|
+
properties: {
|
|
12612
|
+
url: {
|
|
12613
|
+
type: "string",
|
|
12614
|
+
description: "HTTP(S) URL of the file to download and store. Provide this OR `content`, not both."
|
|
12615
|
+
},
|
|
12616
|
+
content: {
|
|
12617
|
+
type: "string",
|
|
12618
|
+
description: 'Base64-encoded file bytes to store directly, without downloading. Provide this OR `url`, not both. Requires `contentType`. A leading data: URI prefix (e.g. "data:text/html;base64,") is stripped automatically if present.'
|
|
12619
|
+
},
|
|
12620
|
+
contentType: {
|
|
12621
|
+
type: "string",
|
|
12622
|
+
description: 'MIME type for inline content (required when `content` is supplied). Example: "text/html", "image/png", "application/pdf". Ignored when `url` is used.'
|
|
12623
|
+
},
|
|
12624
|
+
filename: {
|
|
12625
|
+
type: "string",
|
|
12626
|
+
description: "Optional filename for the stored file"
|
|
12627
|
+
},
|
|
12628
|
+
visibility: {
|
|
12629
|
+
type: "string",
|
|
12630
|
+
enum: ["public", "private"],
|
|
12631
|
+
description: 'Access control. "public" = anyone with the URL can access. "private" = returns a signed URL that expires (default 1 hour). Default: "public".'
|
|
12632
|
+
}
|
|
12633
|
+
},
|
|
12634
|
+
required: []
|
|
12635
|
+
},
|
|
12636
|
+
executionHint: "platform",
|
|
12637
|
+
platformKeySupport: true,
|
|
12638
|
+
requiresApiKey: false
|
|
12639
|
+
},
|
|
12640
|
+
// Publish Page — render HTML inline in the browser at a shareable URL
|
|
12641
|
+
{
|
|
12642
|
+
id: "publish_page",
|
|
12643
|
+
name: "Publish Page",
|
|
12644
|
+
description: "Publish an HTML page on Runtype's CDN and get back a shareable URL that renders the page inline in the browser. Two source modes: (1) pass `url` to download an HTML file from an HTTP(S) URL, or (2) pass base64-encoded `content` (defaults to `contentType: text/html`) to upload inline HTML directly \u2014 useful when running inside a sandboxed code-execution environment with restricted outbound network. Exactly one of `url` or `content` must be provided. Served inline from a `/preview/` path under a locked-down CSP that blocks scripts, network requests, and form submissions. Page URLs are public and expire after 7 days. Accepts only HTML content. 25 MB max. To host a non-HTML file, or HTML as a permanent downloadable file, use `store_asset` instead.",
|
|
12645
|
+
category: exports.BuiltInToolCategory.FILE_OPERATIONS,
|
|
12646
|
+
toolGroup: exports.BuiltInToolGroup.FILE_OUTPUTS,
|
|
12647
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12648
|
+
parametersSchema: {
|
|
12649
|
+
type: "object",
|
|
12650
|
+
properties: {
|
|
12651
|
+
url: {
|
|
12652
|
+
type: "string",
|
|
12653
|
+
description: "HTTP(S) URL of an HTML file to download and publish. Provide this OR `content`, not both."
|
|
12654
|
+
},
|
|
12655
|
+
content: {
|
|
12656
|
+
type: "string",
|
|
12657
|
+
description: 'Base64-encoded HTML bytes to publish directly. Provide this OR `url`, not both. A leading data: URI prefix (e.g. "data:text/html;base64,") is stripped automatically if present.'
|
|
12658
|
+
},
|
|
12659
|
+
contentType: {
|
|
12660
|
+
type: "string",
|
|
12661
|
+
description: 'MIME type for inline content. Defaults to "text/html". Must be an HTML type \u2014 anything else is rejected. Ignored when `url` is used.'
|
|
12662
|
+
},
|
|
12663
|
+
filename: {
|
|
12664
|
+
type: "string",
|
|
12665
|
+
description: "Optional filename for the stored page"
|
|
12666
|
+
}
|
|
12667
|
+
},
|
|
12668
|
+
required: []
|
|
12669
|
+
},
|
|
12670
|
+
executionHint: "platform",
|
|
12671
|
+
platformKeySupport: true,
|
|
12672
|
+
requiresApiKey: false
|
|
12673
|
+
},
|
|
12674
|
+
// Generate PDF — render HTML or Markdown to a PDF document
|
|
12675
|
+
{
|
|
12676
|
+
id: "generate_pdf",
|
|
12677
|
+
name: "Generate PDF",
|
|
12678
|
+
description: "Render HTML or Markdown to a PDF file and store it on Runtype's CDN. Returns a permanent public URL or a time-limited signed URL (default 1 hour) depending on `visibility`. Exactly one of `html` or `markdown` must be provided \u2014 markdown is rendered with GFM in an A4 print shell with sensible typography; html is passed through untouched so callers can control their own fonts and CSS. Optional `pdfOptions` (format, landscape, margin, printBackground, displayHeaderFooter, headerTemplate, footerTemplate, scale, pageRanges, preferCSSPageSize, omitBackground) are forwarded to the renderer. Source is capped at 2 MB; output is capped at 25 MB. Powered by Cloudflare Browser Rendering.",
|
|
12679
|
+
category: exports.BuiltInToolCategory.FILE_OPERATIONS,
|
|
12680
|
+
toolGroup: exports.BuiltInToolGroup.FILE_OUTPUTS,
|
|
12681
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12682
|
+
parametersSchema: {
|
|
12683
|
+
type: "object",
|
|
12684
|
+
properties: {
|
|
12685
|
+
html: {
|
|
12686
|
+
type: "string",
|
|
12687
|
+
description: "Complete HTML document (or fragment) to render. Callers supply their own styling. Provide this OR `markdown`, not both."
|
|
12688
|
+
},
|
|
12689
|
+
markdown: {
|
|
12690
|
+
type: "string",
|
|
12691
|
+
description: "Markdown source. Rendered with GFM and wrapped in an A4 print shell. Inline HTML inside the markdown is escaped. Provide this OR `html`, not both."
|
|
12692
|
+
},
|
|
12693
|
+
filename: {
|
|
12694
|
+
type: "string",
|
|
12695
|
+
description: "Optional filename for the stored PDF (defaults to `document-<timestamp>.pdf`)."
|
|
12696
|
+
},
|
|
12697
|
+
visibility: {
|
|
12698
|
+
type: "string",
|
|
12699
|
+
enum: ["public", "private"],
|
|
12700
|
+
description: 'Access control. "public" returns a permanent URL; "private" returns a signed URL that expires (default 1 hour). Default: "public".'
|
|
12701
|
+
},
|
|
12702
|
+
pdfOptions: {
|
|
12703
|
+
type: "object",
|
|
12704
|
+
description: "Optional puppeteer `page.pdf()` options (whitelisted).",
|
|
12705
|
+
properties: {
|
|
12706
|
+
format: {
|
|
12707
|
+
type: "string",
|
|
12708
|
+
description: 'Paper format (e.g. "a4", "letter", "legal"). Overrides width/height.'
|
|
12709
|
+
},
|
|
12710
|
+
landscape: { type: "boolean" },
|
|
12711
|
+
printBackground: { type: "boolean" },
|
|
12712
|
+
displayHeaderFooter: { type: "boolean" },
|
|
12713
|
+
headerTemplate: {
|
|
12714
|
+
type: "string",
|
|
12715
|
+
description: "HTML template for the print header. Supports `date`, `title`, `url`, `pageNumber`, `totalPages` classes."
|
|
12716
|
+
},
|
|
12717
|
+
footerTemplate: { type: "string" },
|
|
12718
|
+
scale: {
|
|
12719
|
+
type: "number",
|
|
12720
|
+
description: "Rendering scale, between 0.1 and 2. Default 1."
|
|
12721
|
+
},
|
|
12722
|
+
preferCSSPageSize: { type: "boolean" },
|
|
12723
|
+
pageRanges: {
|
|
12724
|
+
type: "string",
|
|
12725
|
+
description: 'Page ranges to include, e.g. "1-5, 8, 11-13". Default: all pages.'
|
|
12726
|
+
},
|
|
12727
|
+
omitBackground: { type: "boolean" },
|
|
12728
|
+
margin: {
|
|
12729
|
+
type: "object",
|
|
12730
|
+
properties: {
|
|
12731
|
+
top: { type: "string" },
|
|
12732
|
+
right: { type: "string" },
|
|
12733
|
+
bottom: { type: "string" },
|
|
12734
|
+
left: { type: "string" }
|
|
12735
|
+
}
|
|
12736
|
+
}
|
|
12737
|
+
}
|
|
12738
|
+
}
|
|
12739
|
+
},
|
|
12740
|
+
required: []
|
|
12741
|
+
},
|
|
12742
|
+
executionHint: "platform",
|
|
12743
|
+
platformKeySupport: true,
|
|
12744
|
+
requiresApiKey: false
|
|
12745
|
+
},
|
|
12746
|
+
// Record Management Tools — CRUD operations on Runtype records
|
|
12747
|
+
{
|
|
12748
|
+
id: "runtype_record_upsert",
|
|
12749
|
+
name: "Upsert Record",
|
|
12750
|
+
description: "Create or update a Runtype record with structured metadata. Records are identified by type and name. If a record with the same type and name already exists, it will be updated based on the merge strategy.",
|
|
12751
|
+
category: exports.BuiltInToolCategory.DATA_MANAGEMENT,
|
|
12752
|
+
toolGroup: exports.BuiltInToolGroup.RECORD_MANAGEMENT,
|
|
12753
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12754
|
+
parametersSchema: {
|
|
12755
|
+
type: "object",
|
|
12756
|
+
properties: {
|
|
12757
|
+
type: {
|
|
12758
|
+
type: "string",
|
|
12759
|
+
description: 'Record type category (e.g., "customer", "order", "note", "task")'
|
|
12760
|
+
},
|
|
12761
|
+
name: {
|
|
12762
|
+
type: "string",
|
|
12763
|
+
description: "Unique name for this record within its type"
|
|
12764
|
+
},
|
|
12765
|
+
metadata: {
|
|
12766
|
+
type: "object",
|
|
12767
|
+
description: "JSON object containing the record data"
|
|
12768
|
+
},
|
|
12769
|
+
mergeStrategy: {
|
|
12770
|
+
type: "string",
|
|
12771
|
+
description: 'How to handle existing data when updating: "merge" (shallow merge, new keys override) or "replace" (completely replace metadata)',
|
|
12772
|
+
enum: ["merge", "replace"],
|
|
12773
|
+
default: "merge"
|
|
12774
|
+
}
|
|
12775
|
+
},
|
|
12776
|
+
required: ["type", "name", "metadata"]
|
|
12777
|
+
},
|
|
12778
|
+
executionHint: "platform",
|
|
12779
|
+
requiresApiKey: false,
|
|
12780
|
+
platformKeySupport: false
|
|
12781
|
+
},
|
|
12782
|
+
{
|
|
12783
|
+
id: "runtype_record_batch_upsert",
|
|
12784
|
+
name: "Batch Upsert Records",
|
|
12785
|
+
description: "Create or update multiple Runtype records at once in a single transaction. Each record is identified by type and name. Maximum 100 records per call.",
|
|
12786
|
+
category: exports.BuiltInToolCategory.DATA_MANAGEMENT,
|
|
12787
|
+
toolGroup: exports.BuiltInToolGroup.RECORD_MANAGEMENT,
|
|
12788
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12789
|
+
parametersSchema: {
|
|
12790
|
+
type: "object",
|
|
12791
|
+
properties: {
|
|
12792
|
+
records: {
|
|
12793
|
+
type: "array",
|
|
12794
|
+
description: "Array of records to upsert (max 100)",
|
|
12795
|
+
items: {
|
|
12796
|
+
type: "object",
|
|
12797
|
+
properties: {
|
|
12798
|
+
type: {
|
|
12799
|
+
type: "string",
|
|
12800
|
+
description: "Record type category"
|
|
12801
|
+
},
|
|
12802
|
+
name: {
|
|
12803
|
+
type: "string",
|
|
12804
|
+
description: "Unique name within this type"
|
|
12805
|
+
},
|
|
12806
|
+
metadata: {
|
|
12807
|
+
type: "object",
|
|
12808
|
+
description: "JSON object containing the record data"
|
|
12809
|
+
}
|
|
12810
|
+
},
|
|
12811
|
+
required: ["type", "name", "metadata"]
|
|
12812
|
+
}
|
|
12813
|
+
},
|
|
12814
|
+
mergeStrategy: {
|
|
12815
|
+
type: "string",
|
|
12816
|
+
description: 'How to handle existing data: "merge" or "replace". Applies to all records.',
|
|
12817
|
+
enum: ["merge", "replace"],
|
|
12818
|
+
default: "merge"
|
|
12819
|
+
}
|
|
12820
|
+
},
|
|
12821
|
+
required: ["records"]
|
|
12822
|
+
},
|
|
12823
|
+
executionHint: "platform",
|
|
12824
|
+
requiresApiKey: false,
|
|
12825
|
+
platformKeySupport: false
|
|
12826
|
+
},
|
|
12827
|
+
{
|
|
12828
|
+
id: "runtype_record_get",
|
|
12829
|
+
name: "Get Record",
|
|
12830
|
+
description: "Retrieve a single Runtype record by its type and name. Returns the full record including metadata, or null if not found.",
|
|
12831
|
+
category: exports.BuiltInToolCategory.DATA_MANAGEMENT,
|
|
12832
|
+
toolGroup: exports.BuiltInToolGroup.RECORD_MANAGEMENT,
|
|
12833
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12834
|
+
parametersSchema: {
|
|
12835
|
+
type: "object",
|
|
12836
|
+
properties: {
|
|
12837
|
+
type: {
|
|
12838
|
+
type: "string",
|
|
12839
|
+
description: "Record type to look up"
|
|
12840
|
+
},
|
|
12841
|
+
name: {
|
|
12842
|
+
type: "string",
|
|
12843
|
+
description: "Record name to look up"
|
|
12844
|
+
}
|
|
12845
|
+
},
|
|
12846
|
+
required: ["type", "name"]
|
|
12847
|
+
},
|
|
12848
|
+
executionHint: "platform",
|
|
12849
|
+
requiresApiKey: false,
|
|
12850
|
+
platformKeySupport: false
|
|
12851
|
+
},
|
|
12852
|
+
{
|
|
12853
|
+
id: "runtype_record_list",
|
|
12854
|
+
name: "List Records",
|
|
12855
|
+
description: "List and search Runtype records with optional filtering by type and text search. Returns paginated results.",
|
|
12856
|
+
category: exports.BuiltInToolCategory.DATA_MANAGEMENT,
|
|
12857
|
+
toolGroup: exports.BuiltInToolGroup.RECORD_MANAGEMENT,
|
|
12858
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12859
|
+
parametersSchema: {
|
|
12860
|
+
type: "object",
|
|
12861
|
+
properties: {
|
|
12862
|
+
type: {
|
|
12863
|
+
type: "string",
|
|
12864
|
+
description: "Filter by record type (optional)"
|
|
12865
|
+
},
|
|
12866
|
+
search: {
|
|
12867
|
+
type: "string",
|
|
12868
|
+
description: "Text search across record names (optional, case-insensitive)"
|
|
12869
|
+
},
|
|
12870
|
+
limit: {
|
|
12871
|
+
type: "number",
|
|
12872
|
+
description: "Maximum number of records to return (1-50, default 20)",
|
|
12873
|
+
minimum: 1,
|
|
12874
|
+
maximum: 50,
|
|
12875
|
+
default: 20
|
|
12876
|
+
},
|
|
12877
|
+
offset: {
|
|
12878
|
+
type: "number",
|
|
12879
|
+
description: "Number of records to skip for pagination (default 0)",
|
|
12880
|
+
minimum: 0,
|
|
12881
|
+
default: 0
|
|
12882
|
+
}
|
|
12883
|
+
},
|
|
12884
|
+
required: []
|
|
12885
|
+
},
|
|
12886
|
+
executionHint: "platform",
|
|
12887
|
+
requiresApiKey: false,
|
|
12888
|
+
platformKeySupport: false
|
|
12889
|
+
},
|
|
12890
|
+
{
|
|
12891
|
+
id: "runtype_record_delete",
|
|
12892
|
+
name: "Delete Record",
|
|
12893
|
+
description: "Delete a Runtype record by its type and name. Returns whether the record was found and deleted.",
|
|
12894
|
+
category: exports.BuiltInToolCategory.DATA_MANAGEMENT,
|
|
12895
|
+
toolGroup: exports.BuiltInToolGroup.RECORD_MANAGEMENT,
|
|
12896
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12897
|
+
parametersSchema: {
|
|
12898
|
+
type: "object",
|
|
12899
|
+
properties: {
|
|
12900
|
+
type: {
|
|
12901
|
+
type: "string",
|
|
12902
|
+
description: "Record type of the record to delete"
|
|
12903
|
+
},
|
|
12904
|
+
name: {
|
|
12905
|
+
type: "string",
|
|
12906
|
+
description: "Name of the record to delete"
|
|
12907
|
+
}
|
|
12908
|
+
},
|
|
12909
|
+
required: ["type", "name"]
|
|
12910
|
+
},
|
|
12911
|
+
executionHint: "platform",
|
|
12912
|
+
requiresApiKey: false,
|
|
12913
|
+
platformKeySupport: false
|
|
12914
|
+
},
|
|
12915
|
+
// UCP (Universal Commerce Protocol) Tools — interact with any UCP-enabled merchant
|
|
12916
|
+
{
|
|
12917
|
+
id: "ucp_discover",
|
|
12918
|
+
name: "UCP Discover",
|
|
12919
|
+
description: "Discover the commerce capabilities of a UCP-enabled website. Fetches the merchant's /.well-known/ucp discovery profile to determine supported services, capabilities, and payment handlers. Returns the UCP version, available services (REST/MCP/A2A endpoints), capabilities (checkout, cart, catalog, fulfillment, discount, order), and payment handler namespaces. Call this first before any other UCP operation.",
|
|
12920
|
+
category: exports.BuiltInToolCategory.COMMERCE,
|
|
12921
|
+
toolGroup: exports.BuiltInToolGroup.UCP_COMMERCE,
|
|
12922
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12923
|
+
parametersSchema: {
|
|
12924
|
+
type: "object",
|
|
12925
|
+
properties: {
|
|
12926
|
+
domain: {
|
|
12927
|
+
type: "string",
|
|
12928
|
+
description: 'Domain of the UCP-enabled site (e.g., "erleia.com"). The discovery manifest will be fetched from https://{domain}/.well-known/ucp'
|
|
12929
|
+
}
|
|
12930
|
+
},
|
|
12931
|
+
required: ["domain"]
|
|
12932
|
+
},
|
|
12933
|
+
executionHint: "platform",
|
|
12934
|
+
requiresApiKey: false,
|
|
12935
|
+
platformKeySupport: false
|
|
12936
|
+
},
|
|
12937
|
+
{
|
|
12938
|
+
id: "ucp_create_checkout",
|
|
12939
|
+
name: "UCP Create Checkout",
|
|
12940
|
+
description: "Create a new checkout session with a UCP-enabled merchant. Provide the items to purchase and optional buyer/fulfillment information. Returns a checkout session with a sessionId for subsequent updates.",
|
|
12941
|
+
category: exports.BuiltInToolCategory.COMMERCE,
|
|
12942
|
+
toolGroup: exports.BuiltInToolGroup.UCP_COMMERCE,
|
|
12943
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12944
|
+
parametersSchema: {
|
|
12945
|
+
type: "object",
|
|
12946
|
+
properties: {
|
|
12947
|
+
domain: {
|
|
12948
|
+
type: "string",
|
|
12949
|
+
description: 'Domain of the UCP-enabled merchant (e.g., "erleia.com")'
|
|
12950
|
+
},
|
|
12951
|
+
items: {
|
|
12952
|
+
type: "array",
|
|
12953
|
+
description: "Line items for the checkout",
|
|
12954
|
+
items: {
|
|
12955
|
+
type: "object",
|
|
12956
|
+
properties: {
|
|
12957
|
+
id: { type: "string", description: "Product/variant identifier from the merchant" },
|
|
12958
|
+
quantity: { type: "number", description: "Quantity to purchase" }
|
|
12959
|
+
},
|
|
12960
|
+
required: ["id", "quantity"]
|
|
12961
|
+
}
|
|
12962
|
+
},
|
|
12963
|
+
buyer: {
|
|
12964
|
+
type: "object",
|
|
12965
|
+
description: "Buyer information (optional, can be added later via update)",
|
|
12966
|
+
properties: {
|
|
12967
|
+
email: { type: "string", description: "Buyer email address" },
|
|
12968
|
+
first_name: { type: "string", description: "Buyer first name" },
|
|
12969
|
+
last_name: { type: "string", description: "Buyer last name" },
|
|
12970
|
+
phone_number: { type: "string", description: "Buyer phone number" }
|
|
12971
|
+
}
|
|
12972
|
+
},
|
|
12973
|
+
context: {
|
|
12974
|
+
type: "object",
|
|
12975
|
+
description: "Buyer context for localization and intent",
|
|
12976
|
+
properties: {
|
|
12977
|
+
address_country: { type: "string", description: "ISO 3166-1 alpha-2 country code" },
|
|
12978
|
+
language: { type: "string", description: "BCP-47 language tag" },
|
|
12979
|
+
currency: { type: "string", description: "ISO 4217 currency code" },
|
|
12980
|
+
intent: { type: "string", description: "Buyer intent description" }
|
|
12981
|
+
}
|
|
12982
|
+
},
|
|
12983
|
+
fulfillment: {
|
|
12984
|
+
type: "object",
|
|
12985
|
+
description: "Fulfillment preferences",
|
|
12986
|
+
properties: {
|
|
12987
|
+
methods: {
|
|
12988
|
+
type: "array",
|
|
12989
|
+
description: "Fulfillment methods",
|
|
12990
|
+
items: {
|
|
12991
|
+
type: "object",
|
|
12992
|
+
properties: {
|
|
12993
|
+
type: {
|
|
12994
|
+
type: "string",
|
|
12995
|
+
description: "Fulfillment type",
|
|
12996
|
+
enum: ["shipping", "pickup", "digital"]
|
|
12997
|
+
},
|
|
12998
|
+
destinations: {
|
|
12999
|
+
type: "array",
|
|
13000
|
+
description: "Destinations for this fulfillment method",
|
|
13001
|
+
items: {
|
|
13002
|
+
type: "object",
|
|
13003
|
+
properties: {
|
|
13004
|
+
first_name: { type: "string", description: "Recipient first name" },
|
|
13005
|
+
last_name: { type: "string", description: "Recipient last name" },
|
|
13006
|
+
address: {
|
|
13007
|
+
type: "object",
|
|
13008
|
+
description: "Destination address",
|
|
13009
|
+
properties: {
|
|
13010
|
+
address1: { type: "string", description: "Street address line 1" },
|
|
13011
|
+
address2: { type: "string", description: "Street address line 2" },
|
|
13012
|
+
city: { type: "string", description: "City" },
|
|
13013
|
+
province_code: { type: "string", description: "State/province code" },
|
|
13014
|
+
postal_code: { type: "string", description: "Postal/ZIP code" },
|
|
13015
|
+
country_code: { type: "string", description: "ISO 3166-1 alpha-2 country code" }
|
|
13016
|
+
}
|
|
13017
|
+
},
|
|
13018
|
+
phone_number: { type: "string", description: "Recipient phone number" }
|
|
13019
|
+
}
|
|
13020
|
+
}
|
|
13021
|
+
},
|
|
13022
|
+
line_item_ids: {
|
|
13023
|
+
type: "array",
|
|
13024
|
+
items: { type: "string" },
|
|
13025
|
+
description: "Line item IDs fulfilled by this method"
|
|
13026
|
+
},
|
|
13027
|
+
selected_destination_id: {
|
|
13028
|
+
type: "string",
|
|
13029
|
+
description: "Selected destination ID for this method"
|
|
13030
|
+
},
|
|
13031
|
+
groups: {
|
|
13032
|
+
type: "array",
|
|
13033
|
+
description: "Fulfillment groups with selected options. After the server returns groups with available options, send back the group ID and the selected_option_id to choose a fulfillment option.",
|
|
13034
|
+
items: {
|
|
13035
|
+
type: "object",
|
|
13036
|
+
properties: {
|
|
13037
|
+
id: { type: "string", description: "Group ID from the checkout response" },
|
|
13038
|
+
selected_option_id: {
|
|
13039
|
+
type: "string",
|
|
13040
|
+
description: "ID of the selected fulfillment option within this group"
|
|
13041
|
+
}
|
|
13042
|
+
},
|
|
13043
|
+
required: ["id", "selected_option_id"]
|
|
13044
|
+
}
|
|
13045
|
+
}
|
|
13046
|
+
},
|
|
13047
|
+
required: ["type"]
|
|
13048
|
+
}
|
|
13049
|
+
}
|
|
13050
|
+
}
|
|
13051
|
+
},
|
|
13052
|
+
bearerToken: {
|
|
13053
|
+
type: "string",
|
|
13054
|
+
description: "Bearer token for authenticated checkout (optional)"
|
|
13055
|
+
}
|
|
13056
|
+
},
|
|
13057
|
+
required: ["domain", "items"]
|
|
13058
|
+
},
|
|
13059
|
+
executionHint: "platform",
|
|
13060
|
+
requiresApiKey: false,
|
|
13061
|
+
platformKeySupport: false
|
|
13062
|
+
},
|
|
13063
|
+
{
|
|
13064
|
+
id: "ucp_update_checkout",
|
|
13065
|
+
name: "UCP Update Checkout",
|
|
13066
|
+
description: "Update an existing UCP checkout session with buyer information, shipping details, discount codes, or fulfillment preferences. All fields are optional \u2014 include only what you want to update.",
|
|
13067
|
+
category: exports.BuiltInToolCategory.COMMERCE,
|
|
13068
|
+
toolGroup: exports.BuiltInToolGroup.UCP_COMMERCE,
|
|
13069
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
13070
|
+
parametersSchema: {
|
|
13071
|
+
type: "object",
|
|
13072
|
+
properties: {
|
|
13073
|
+
domain: {
|
|
13074
|
+
type: "string",
|
|
13075
|
+
description: "Domain of the UCP-enabled merchant"
|
|
13076
|
+
},
|
|
13077
|
+
id: {
|
|
13078
|
+
type: "string",
|
|
13079
|
+
description: "Checkout session ID from the create checkout response"
|
|
13080
|
+
},
|
|
13081
|
+
buyer: {
|
|
13082
|
+
type: "object",
|
|
13083
|
+
description: "Updated buyer information",
|
|
13084
|
+
properties: {
|
|
13085
|
+
email: { type: "string", description: "Buyer email address" },
|
|
13086
|
+
first_name: { type: "string", description: "Buyer first name" },
|
|
13087
|
+
last_name: { type: "string", description: "Buyer last name" },
|
|
13088
|
+
phone_number: { type: "string", description: "Buyer phone number" }
|
|
13089
|
+
}
|
|
13090
|
+
},
|
|
13091
|
+
context: {
|
|
13092
|
+
type: "object",
|
|
13093
|
+
description: "Buyer context for localization and intent",
|
|
13094
|
+
properties: {
|
|
13095
|
+
address_country: { type: "string", description: "ISO 3166-1 alpha-2 country code" },
|
|
13096
|
+
language: { type: "string", description: "BCP-47 language tag" },
|
|
13097
|
+
currency: { type: "string", description: "ISO 4217 currency code" },
|
|
13098
|
+
intent: { type: "string", description: "Buyer intent description" }
|
|
13099
|
+
}
|
|
13100
|
+
},
|
|
13101
|
+
fulfillment: {
|
|
13102
|
+
type: "object",
|
|
13103
|
+
description: "Updated fulfillment preferences",
|
|
13104
|
+
properties: {
|
|
13105
|
+
methods: {
|
|
13106
|
+
type: "array",
|
|
13107
|
+
description: "Fulfillment methods",
|
|
13108
|
+
items: {
|
|
13109
|
+
type: "object",
|
|
13110
|
+
properties: {
|
|
13111
|
+
type: {
|
|
13112
|
+
type: "string",
|
|
13113
|
+
description: "Fulfillment type",
|
|
13114
|
+
enum: ["shipping", "pickup", "digital"]
|
|
13115
|
+
},
|
|
13116
|
+
destinations: {
|
|
13117
|
+
type: "array",
|
|
13118
|
+
description: "Destinations for this fulfillment method",
|
|
13119
|
+
items: {
|
|
13120
|
+
type: "object",
|
|
13121
|
+
properties: {
|
|
13122
|
+
first_name: { type: "string", description: "Recipient first name" },
|
|
13123
|
+
last_name: { type: "string", description: "Recipient last name" },
|
|
13124
|
+
address: {
|
|
13125
|
+
type: "object",
|
|
13126
|
+
description: "Destination address",
|
|
13127
|
+
properties: {
|
|
13128
|
+
address1: { type: "string", description: "Street address line 1" },
|
|
13129
|
+
address2: { type: "string", description: "Street address line 2" },
|
|
13130
|
+
city: { type: "string", description: "City" },
|
|
13131
|
+
province_code: { type: "string", description: "State/province code" },
|
|
13132
|
+
postal_code: { type: "string", description: "Postal/ZIP code" },
|
|
13133
|
+
country_code: { type: "string", description: "ISO 3166-1 alpha-2 country code" }
|
|
13134
|
+
}
|
|
13135
|
+
},
|
|
13136
|
+
phone_number: { type: "string", description: "Recipient phone number" }
|
|
13137
|
+
}
|
|
13138
|
+
}
|
|
13139
|
+
},
|
|
13140
|
+
line_item_ids: {
|
|
13141
|
+
type: "array",
|
|
13142
|
+
items: { type: "string" },
|
|
13143
|
+
description: "Line item IDs fulfilled by this method"
|
|
13144
|
+
},
|
|
13145
|
+
selected_destination_id: {
|
|
13146
|
+
type: "string",
|
|
13147
|
+
description: "Selected destination ID for this method"
|
|
13148
|
+
},
|
|
13149
|
+
groups: {
|
|
13150
|
+
type: "array",
|
|
13151
|
+
description: "Fulfillment groups with selected options. After the server returns groups with available options, send back the group ID and the selected_option_id to choose a fulfillment option.",
|
|
13152
|
+
items: {
|
|
13153
|
+
type: "object",
|
|
13154
|
+
properties: {
|
|
13155
|
+
id: { type: "string", description: "Group ID from the checkout response" },
|
|
13156
|
+
selected_option_id: {
|
|
13157
|
+
type: "string",
|
|
13158
|
+
description: "ID of the selected fulfillment option within this group"
|
|
13159
|
+
}
|
|
13160
|
+
},
|
|
13161
|
+
required: ["id", "selected_option_id"]
|
|
13162
|
+
}
|
|
13163
|
+
}
|
|
13164
|
+
},
|
|
13165
|
+
required: ["type"]
|
|
13166
|
+
}
|
|
13167
|
+
}
|
|
13168
|
+
}
|
|
13169
|
+
},
|
|
13170
|
+
discount_codes: {
|
|
13171
|
+
type: "array",
|
|
13172
|
+
description: "Discount codes to apply",
|
|
13173
|
+
items: { type: "string" }
|
|
13174
|
+
},
|
|
13175
|
+
line_items: {
|
|
13176
|
+
type: "array",
|
|
13177
|
+
description: "Updated line items (full replacement)",
|
|
13178
|
+
items: {
|
|
13179
|
+
type: "object",
|
|
13180
|
+
properties: {
|
|
13181
|
+
id: { type: "string", description: "Product/variant identifier" },
|
|
13182
|
+
quantity: { type: "number", description: "Quantity" }
|
|
13183
|
+
},
|
|
13184
|
+
required: ["id", "quantity"]
|
|
13185
|
+
}
|
|
13186
|
+
},
|
|
13187
|
+
bearerToken: {
|
|
13188
|
+
type: "string",
|
|
13189
|
+
description: "Bearer token for authenticated checkout (optional)"
|
|
13190
|
+
}
|
|
13191
|
+
},
|
|
13192
|
+
required: ["domain", "id"]
|
|
13193
|
+
},
|
|
13194
|
+
executionHint: "platform",
|
|
13195
|
+
requiresApiKey: false,
|
|
13196
|
+
platformKeySupport: false
|
|
13197
|
+
},
|
|
13198
|
+
{
|
|
13199
|
+
id: "ucp_get_checkout",
|
|
13200
|
+
name: "UCP Get Checkout",
|
|
13201
|
+
description: "Retrieve the current state of a UCP checkout session. Returns the full session including status (incomplete, requires_escalation, ready_for_complete, complete_in_progress, completed, canceled), line items, buyer info, and available payment methods.",
|
|
13202
|
+
category: exports.BuiltInToolCategory.COMMERCE,
|
|
13203
|
+
toolGroup: exports.BuiltInToolGroup.UCP_COMMERCE,
|
|
12290
13204
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12291
13205
|
parametersSchema: {
|
|
12292
13206
|
type: "object",
|
|
@@ -12297,11 +13211,187 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
12297
13211
|
},
|
|
12298
13212
|
id: {
|
|
12299
13213
|
type: "string",
|
|
12300
|
-
description: "Checkout session ID
|
|
13214
|
+
description: "Checkout session ID"
|
|
13215
|
+
},
|
|
13216
|
+
bearerToken: {
|
|
13217
|
+
type: "string",
|
|
13218
|
+
description: "Bearer token for authenticated checkout (optional)"
|
|
13219
|
+
}
|
|
13220
|
+
},
|
|
13221
|
+
required: ["domain", "id"]
|
|
13222
|
+
},
|
|
13223
|
+
executionHint: "platform",
|
|
13224
|
+
requiresApiKey: false,
|
|
13225
|
+
platformKeySupport: false
|
|
13226
|
+
},
|
|
13227
|
+
{
|
|
13228
|
+
id: "ucp_complete_checkout",
|
|
13229
|
+
name: "UCP Complete Checkout",
|
|
13230
|
+
description: 'Complete a UCP checkout session by submitting payment credentials. The checkout must be in "ready_for_complete" status. Returns the order confirmation with order ID and permalink. IMPORTANT: This initiates a real purchase \u2014 use with approval.require for human-in-the-loop confirmation.',
|
|
13231
|
+
category: exports.BuiltInToolCategory.COMMERCE,
|
|
13232
|
+
toolGroup: exports.BuiltInToolGroup.UCP_COMMERCE,
|
|
13233
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
13234
|
+
parametersSchema: {
|
|
13235
|
+
type: "object",
|
|
13236
|
+
properties: {
|
|
13237
|
+
domain: {
|
|
13238
|
+
type: "string",
|
|
13239
|
+
description: "Domain of the UCP-enabled merchant"
|
|
13240
|
+
},
|
|
13241
|
+
id: {
|
|
13242
|
+
type: "string",
|
|
13243
|
+
description: "Checkout session ID"
|
|
13244
|
+
},
|
|
13245
|
+
handler_id: {
|
|
13246
|
+
type: "string",
|
|
13247
|
+
description: "Payment handler ID from the checkout session's available payment handlers"
|
|
13248
|
+
},
|
|
13249
|
+
payment_token: {
|
|
13250
|
+
type: "string",
|
|
13251
|
+
description: "Payment token from the payment provider"
|
|
13252
|
+
},
|
|
13253
|
+
payment_type: {
|
|
13254
|
+
type: "string",
|
|
13255
|
+
description: 'Credential type discriminator (e.g., "token", "card")'
|
|
13256
|
+
},
|
|
13257
|
+
bearerToken: {
|
|
13258
|
+
type: "string",
|
|
13259
|
+
description: "Bearer token for authenticated checkout (optional)"
|
|
13260
|
+
}
|
|
13261
|
+
},
|
|
13262
|
+
required: ["domain", "id", "handler_id", "payment_token"]
|
|
13263
|
+
},
|
|
13264
|
+
executionHint: "platform",
|
|
13265
|
+
requiresApiKey: false,
|
|
13266
|
+
platformKeySupport: false
|
|
13267
|
+
},
|
|
13268
|
+
{
|
|
13269
|
+
id: "ucp_cancel_checkout",
|
|
13270
|
+
name: "UCP Cancel Checkout",
|
|
13271
|
+
description: "Cancel an active UCP checkout session. Can be called on any session that is not already completed or cancelled.",
|
|
13272
|
+
category: exports.BuiltInToolCategory.COMMERCE,
|
|
13273
|
+
toolGroup: exports.BuiltInToolGroup.UCP_COMMERCE,
|
|
13274
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
13275
|
+
parametersSchema: {
|
|
13276
|
+
type: "object",
|
|
13277
|
+
properties: {
|
|
13278
|
+
domain: {
|
|
13279
|
+
type: "string",
|
|
13280
|
+
description: "Domain of the UCP-enabled merchant"
|
|
13281
|
+
},
|
|
13282
|
+
id: {
|
|
13283
|
+
type: "string",
|
|
13284
|
+
description: "Checkout session ID to cancel"
|
|
13285
|
+
},
|
|
13286
|
+
bearerToken: {
|
|
13287
|
+
type: "string",
|
|
13288
|
+
description: "Bearer token for authenticated checkout (optional)"
|
|
13289
|
+
}
|
|
13290
|
+
},
|
|
13291
|
+
required: ["domain", "id"]
|
|
13292
|
+
},
|
|
13293
|
+
executionHint: "platform",
|
|
13294
|
+
requiresApiKey: false,
|
|
13295
|
+
platformKeySupport: false
|
|
13296
|
+
},
|
|
13297
|
+
{
|
|
13298
|
+
id: "ucp_create_cart",
|
|
13299
|
+
name: "UCP Create Cart",
|
|
13300
|
+
description: "Create a shopping cart with a UCP-enabled merchant for price estimation before checkout. Carts are lightweight \u2014 no payment info needed. Convert to checkout when ready to purchase.",
|
|
13301
|
+
category: exports.BuiltInToolCategory.COMMERCE,
|
|
13302
|
+
toolGroup: exports.BuiltInToolGroup.UCP_COMMERCE,
|
|
13303
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
13304
|
+
parametersSchema: {
|
|
13305
|
+
type: "object",
|
|
13306
|
+
properties: {
|
|
13307
|
+
domain: { type: "string", description: "Domain of the UCP-enabled merchant" },
|
|
13308
|
+
items: {
|
|
13309
|
+
type: "array",
|
|
13310
|
+
description: "Line items for the cart",
|
|
13311
|
+
items: {
|
|
13312
|
+
type: "object",
|
|
13313
|
+
properties: {
|
|
13314
|
+
id: { type: "string", description: "Product or variant identifier" },
|
|
13315
|
+
quantity: { type: "number", description: "Quantity" }
|
|
13316
|
+
},
|
|
13317
|
+
required: ["id", "quantity"]
|
|
13318
|
+
}
|
|
13319
|
+
},
|
|
13320
|
+
buyer: {
|
|
13321
|
+
type: "object",
|
|
13322
|
+
description: "Buyer information (optional)",
|
|
13323
|
+
properties: {
|
|
13324
|
+
email: { type: "string", description: "Buyer email address" },
|
|
13325
|
+
first_name: { type: "string", description: "Buyer first name" },
|
|
13326
|
+
last_name: { type: "string", description: "Buyer last name" },
|
|
13327
|
+
phone_number: { type: "string", description: "Buyer phone number" }
|
|
13328
|
+
}
|
|
13329
|
+
},
|
|
13330
|
+
context: {
|
|
13331
|
+
type: "object",
|
|
13332
|
+
description: "Optional buyer context for localization",
|
|
13333
|
+
properties: {
|
|
13334
|
+
address_country: { type: "string", description: "ISO 3166-1 alpha-2 country code" },
|
|
13335
|
+
language: { type: "string", description: "BCP-47 language tag" },
|
|
13336
|
+
currency: { type: "string", description: "ISO 4217 currency code" },
|
|
13337
|
+
intent: { type: "string", description: "Buyer intent description" }
|
|
13338
|
+
}
|
|
13339
|
+
},
|
|
13340
|
+
bearerToken: { type: "string", description: "Bearer token for authenticated session (optional)" }
|
|
13341
|
+
},
|
|
13342
|
+
required: ["domain", "items"]
|
|
13343
|
+
},
|
|
13344
|
+
executionHint: "platform",
|
|
13345
|
+
requiresApiKey: false,
|
|
13346
|
+
platformKeySupport: false
|
|
13347
|
+
},
|
|
13348
|
+
{
|
|
13349
|
+
id: "ucp_get_cart",
|
|
13350
|
+
name: "UCP Get Cart",
|
|
13351
|
+
description: "Retrieve the current state of a UCP cart session including estimated pricing, line items, and any messages.",
|
|
13352
|
+
category: exports.BuiltInToolCategory.COMMERCE,
|
|
13353
|
+
toolGroup: exports.BuiltInToolGroup.UCP_COMMERCE,
|
|
13354
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
13355
|
+
parametersSchema: {
|
|
13356
|
+
type: "object",
|
|
13357
|
+
properties: {
|
|
13358
|
+
domain: { type: "string", description: "Domain of the UCP-enabled merchant" },
|
|
13359
|
+
id: { type: "string", description: "Cart session ID" },
|
|
13360
|
+
bearerToken: { type: "string", description: "Bearer token (optional)" }
|
|
13361
|
+
},
|
|
13362
|
+
required: ["domain", "id"]
|
|
13363
|
+
},
|
|
13364
|
+
executionHint: "platform",
|
|
13365
|
+
requiresApiKey: false,
|
|
13366
|
+
platformKeySupport: false
|
|
13367
|
+
},
|
|
13368
|
+
{
|
|
13369
|
+
id: "ucp_update_cart",
|
|
13370
|
+
name: "UCP Update Cart",
|
|
13371
|
+
description: "Update a UCP cart session. Line items are full-replacement \u2014 send the complete list of items you want in the cart.",
|
|
13372
|
+
category: exports.BuiltInToolCategory.COMMERCE,
|
|
13373
|
+
toolGroup: exports.BuiltInToolGroup.UCP_COMMERCE,
|
|
13374
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
13375
|
+
parametersSchema: {
|
|
13376
|
+
type: "object",
|
|
13377
|
+
properties: {
|
|
13378
|
+
domain: { type: "string", description: "Domain of the UCP-enabled merchant" },
|
|
13379
|
+
id: { type: "string", description: "Cart session ID" },
|
|
13380
|
+
items: {
|
|
13381
|
+
type: "array",
|
|
13382
|
+
description: "Updated line items (full replacement)",
|
|
13383
|
+
items: {
|
|
13384
|
+
type: "object",
|
|
13385
|
+
properties: {
|
|
13386
|
+
id: { type: "string", description: "Product or variant identifier" },
|
|
13387
|
+
quantity: { type: "number", description: "Quantity" }
|
|
13388
|
+
},
|
|
13389
|
+
required: ["id", "quantity"]
|
|
13390
|
+
}
|
|
12301
13391
|
},
|
|
12302
13392
|
buyer: {
|
|
12303
13393
|
type: "object",
|
|
12304
|
-
description: "
|
|
13394
|
+
description: "Buyer information (optional)",
|
|
12305
13395
|
properties: {
|
|
12306
13396
|
email: { type: "string", description: "Buyer email address" },
|
|
12307
13397
|
first_name: { type: "string", description: "Buyer first name" },
|
|
@@ -12311,104 +13401,173 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
12311
13401
|
},
|
|
12312
13402
|
context: {
|
|
12313
13403
|
type: "object",
|
|
12314
|
-
description: "
|
|
13404
|
+
description: "Optional buyer context for localization",
|
|
12315
13405
|
properties: {
|
|
12316
|
-
address_country: { type: "string"
|
|
12317
|
-
language: { type: "string"
|
|
12318
|
-
currency: { type: "string"
|
|
12319
|
-
intent: { type: "string"
|
|
13406
|
+
address_country: { type: "string" },
|
|
13407
|
+
language: { type: "string" },
|
|
13408
|
+
currency: { type: "string" },
|
|
13409
|
+
intent: { type: "string" }
|
|
12320
13410
|
}
|
|
12321
13411
|
},
|
|
12322
|
-
|
|
13412
|
+
bearerToken: { type: "string", description: "Bearer token (optional)" }
|
|
13413
|
+
},
|
|
13414
|
+
required: ["domain", "id"]
|
|
13415
|
+
},
|
|
13416
|
+
executionHint: "platform",
|
|
13417
|
+
requiresApiKey: false,
|
|
13418
|
+
platformKeySupport: false
|
|
13419
|
+
},
|
|
13420
|
+
{
|
|
13421
|
+
id: "ucp_cancel_cart",
|
|
13422
|
+
name: "UCP Cancel Cart",
|
|
13423
|
+
description: "Cancel a UCP cart session.",
|
|
13424
|
+
category: exports.BuiltInToolCategory.COMMERCE,
|
|
13425
|
+
toolGroup: exports.BuiltInToolGroup.UCP_COMMERCE,
|
|
13426
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
13427
|
+
parametersSchema: {
|
|
13428
|
+
type: "object",
|
|
13429
|
+
properties: {
|
|
13430
|
+
domain: { type: "string", description: "Domain of the UCP-enabled merchant" },
|
|
13431
|
+
id: { type: "string", description: "Cart session ID to cancel" },
|
|
13432
|
+
bearerToken: { type: "string", description: "Bearer token (optional)" }
|
|
13433
|
+
},
|
|
13434
|
+
required: ["domain", "id"]
|
|
13435
|
+
},
|
|
13436
|
+
executionHint: "platform",
|
|
13437
|
+
requiresApiKey: false,
|
|
13438
|
+
platformKeySupport: false
|
|
13439
|
+
},
|
|
13440
|
+
{
|
|
13441
|
+
id: "ucp_search_catalog",
|
|
13442
|
+
name: "UCP Search Catalog",
|
|
13443
|
+
description: "Search a UCP merchant's product catalog by text query. Returns matching items with id, name, description, and price.",
|
|
13444
|
+
category: exports.BuiltInToolCategory.COMMERCE,
|
|
13445
|
+
toolGroup: exports.BuiltInToolGroup.UCP_COMMERCE,
|
|
13446
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
13447
|
+
parametersSchema: {
|
|
13448
|
+
type: "object",
|
|
13449
|
+
properties: {
|
|
13450
|
+
domain: { type: "string", description: "Domain of the UCP-enabled merchant" },
|
|
13451
|
+
query: { type: "string", description: "Free-text search query" },
|
|
13452
|
+
context: {
|
|
12323
13453
|
type: "object",
|
|
12324
|
-
description: "
|
|
13454
|
+
description: "Buyer context for localization (country, language, currency)",
|
|
12325
13455
|
properties: {
|
|
12326
|
-
|
|
12327
|
-
|
|
12328
|
-
|
|
12329
|
-
|
|
12330
|
-
type: "object",
|
|
12331
|
-
properties: {
|
|
12332
|
-
type: {
|
|
12333
|
-
type: "string",
|
|
12334
|
-
description: "Fulfillment type",
|
|
12335
|
-
enum: ["shipping", "pickup", "digital"]
|
|
12336
|
-
},
|
|
12337
|
-
destinations: {
|
|
12338
|
-
type: "array",
|
|
12339
|
-
description: "Destinations for this fulfillment method",
|
|
12340
|
-
items: {
|
|
12341
|
-
type: "object",
|
|
12342
|
-
properties: {
|
|
12343
|
-
first_name: { type: "string", description: "Recipient first name" },
|
|
12344
|
-
last_name: { type: "string", description: "Recipient last name" },
|
|
12345
|
-
address: {
|
|
12346
|
-
type: "object",
|
|
12347
|
-
description: "Destination address",
|
|
12348
|
-
properties: {
|
|
12349
|
-
address1: { type: "string", description: "Street address line 1" },
|
|
12350
|
-
address2: { type: "string", description: "Street address line 2" },
|
|
12351
|
-
city: { type: "string", description: "City" },
|
|
12352
|
-
province_code: { type: "string", description: "State/province code" },
|
|
12353
|
-
postal_code: { type: "string", description: "Postal/ZIP code" },
|
|
12354
|
-
country_code: { type: "string", description: "ISO 3166-1 alpha-2 country code" }
|
|
12355
|
-
}
|
|
12356
|
-
},
|
|
12357
|
-
phone_number: { type: "string", description: "Recipient phone number" }
|
|
12358
|
-
}
|
|
12359
|
-
}
|
|
12360
|
-
},
|
|
12361
|
-
line_item_ids: {
|
|
12362
|
-
type: "array",
|
|
12363
|
-
items: { type: "string" },
|
|
12364
|
-
description: "Line item IDs fulfilled by this method"
|
|
12365
|
-
},
|
|
12366
|
-
selected_destination_id: {
|
|
12367
|
-
type: "string",
|
|
12368
|
-
description: "Selected destination ID for this method"
|
|
12369
|
-
},
|
|
12370
|
-
groups: {
|
|
12371
|
-
type: "array",
|
|
12372
|
-
description: "Fulfillment groups with selected options. After the server returns groups with available options, send back the group ID and the selected_option_id to choose a fulfillment option.",
|
|
12373
|
-
items: {
|
|
12374
|
-
type: "object",
|
|
12375
|
-
properties: {
|
|
12376
|
-
id: { type: "string", description: "Group ID from the checkout response" },
|
|
12377
|
-
selected_option_id: {
|
|
12378
|
-
type: "string",
|
|
12379
|
-
description: "ID of the selected fulfillment option within this group"
|
|
12380
|
-
}
|
|
12381
|
-
},
|
|
12382
|
-
required: ["id", "selected_option_id"]
|
|
12383
|
-
}
|
|
12384
|
-
}
|
|
12385
|
-
},
|
|
12386
|
-
required: ["type"]
|
|
12387
|
-
}
|
|
12388
|
-
}
|
|
13456
|
+
address_country: { type: "string" },
|
|
13457
|
+
language: { type: "string" },
|
|
13458
|
+
currency: { type: "string" },
|
|
13459
|
+
intent: { type: "string" }
|
|
12389
13460
|
}
|
|
12390
13461
|
},
|
|
12391
|
-
|
|
13462
|
+
filters: {
|
|
13463
|
+
type: "object",
|
|
13464
|
+
description: "Search filters",
|
|
13465
|
+
properties: {
|
|
13466
|
+
in_stock: { type: "boolean", description: "Only show in-stock items" },
|
|
13467
|
+
price_min: { type: "number", description: "Minimum price in minor units (cents)" },
|
|
13468
|
+
price_max: { type: "number", description: "Maximum price in minor units (cents)" }
|
|
13469
|
+
}
|
|
13470
|
+
},
|
|
13471
|
+
page_size: { type: "number", description: "Number of results per page" },
|
|
13472
|
+
page_token: { type: "string", description: "Pagination token from previous response" },
|
|
13473
|
+
bearerToken: { type: "string", description: "Bearer token (optional)" }
|
|
13474
|
+
},
|
|
13475
|
+
required: ["domain", "query"]
|
|
13476
|
+
},
|
|
13477
|
+
executionHint: "platform",
|
|
13478
|
+
requiresApiKey: false,
|
|
13479
|
+
platformKeySupport: false
|
|
13480
|
+
},
|
|
13481
|
+
{
|
|
13482
|
+
id: "ucp_lookup_catalog",
|
|
13483
|
+
name: "UCP Lookup Catalog",
|
|
13484
|
+
description: "Batch lookup products or variants by their identifiers. Supports product IDs, variant IDs, SKUs, and handles. Returns items with id, name, description, and price.",
|
|
13485
|
+
category: exports.BuiltInToolCategory.COMMERCE,
|
|
13486
|
+
toolGroup: exports.BuiltInToolGroup.UCP_COMMERCE,
|
|
13487
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
13488
|
+
parametersSchema: {
|
|
13489
|
+
type: "object",
|
|
13490
|
+
properties: {
|
|
13491
|
+
domain: { type: "string", description: "Domain of the UCP-enabled merchant" },
|
|
13492
|
+
ids: {
|
|
12392
13493
|
type: "array",
|
|
12393
|
-
|
|
12394
|
-
|
|
13494
|
+
items: { type: "string" },
|
|
13495
|
+
description: "Product, variant, or SKU identifiers to look up"
|
|
12395
13496
|
},
|
|
12396
|
-
|
|
13497
|
+
context: {
|
|
13498
|
+
type: "object",
|
|
13499
|
+
description: "Buyer context for localization",
|
|
13500
|
+
properties: {
|
|
13501
|
+
address_country: { type: "string" },
|
|
13502
|
+
language: { type: "string" },
|
|
13503
|
+
currency: { type: "string" }
|
|
13504
|
+
}
|
|
13505
|
+
},
|
|
13506
|
+
filters: {
|
|
13507
|
+
type: "object",
|
|
13508
|
+
description: "Optional filters (e.g., categories, price range, availability)",
|
|
13509
|
+
properties: {
|
|
13510
|
+
in_stock: { type: "boolean", description: "Only show in-stock items" },
|
|
13511
|
+
price_min: { type: "number", description: "Minimum price in minor units (cents)" },
|
|
13512
|
+
price_max: { type: "number", description: "Maximum price in minor units (cents)" }
|
|
13513
|
+
}
|
|
13514
|
+
},
|
|
13515
|
+
bearerToken: { type: "string", description: "Bearer token (optional)" }
|
|
13516
|
+
},
|
|
13517
|
+
required: ["domain", "ids"]
|
|
13518
|
+
},
|
|
13519
|
+
executionHint: "platform",
|
|
13520
|
+
requiresApiKey: false,
|
|
13521
|
+
platformKeySupport: false
|
|
13522
|
+
},
|
|
13523
|
+
{
|
|
13524
|
+
id: "ucp_get_product",
|
|
13525
|
+
name: "UCP Get Product",
|
|
13526
|
+
description: "Get detailed information about a single product. Returns product id, name, description, price, options, and selected options. Use selected_options to narrow variants (e.g., select a color to see which sizes are available).",
|
|
13527
|
+
category: exports.BuiltInToolCategory.COMMERCE,
|
|
13528
|
+
toolGroup: exports.BuiltInToolGroup.UCP_COMMERCE,
|
|
13529
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
13530
|
+
parametersSchema: {
|
|
13531
|
+
type: "object",
|
|
13532
|
+
properties: {
|
|
13533
|
+
domain: { type: "string", description: "Domain of the UCP-enabled merchant" },
|
|
13534
|
+
id: { type: "string", description: "Product or variant identifier" },
|
|
13535
|
+
selected_options: {
|
|
12397
13536
|
type: "array",
|
|
12398
|
-
description:
|
|
13537
|
+
description: 'Option selections for interactive variant narrowing (e.g., [{name: "Color", value: "Blue"}])',
|
|
12399
13538
|
items: {
|
|
12400
13539
|
type: "object",
|
|
12401
13540
|
properties: {
|
|
12402
|
-
|
|
12403
|
-
|
|
13541
|
+
name: { type: "string", description: 'Option name (e.g., "Color", "Size")' },
|
|
13542
|
+
value: { type: "string", description: 'Selected value (e.g., "Blue", "Large")' }
|
|
12404
13543
|
},
|
|
12405
|
-
required: ["
|
|
13544
|
+
required: ["name", "value"]
|
|
13545
|
+
}
|
|
13546
|
+
},
|
|
13547
|
+
preferences: {
|
|
13548
|
+
type: "array",
|
|
13549
|
+
items: { type: "string" },
|
|
13550
|
+
description: "Option names in relaxation priority order. When no exact match, drops from end first."
|
|
13551
|
+
},
|
|
13552
|
+
context: {
|
|
13553
|
+
type: "object",
|
|
13554
|
+
description: "Buyer context for localization",
|
|
13555
|
+
properties: {
|
|
13556
|
+
address_country: { type: "string" },
|
|
13557
|
+
language: { type: "string" },
|
|
13558
|
+
currency: { type: "string" }
|
|
12406
13559
|
}
|
|
12407
13560
|
},
|
|
12408
|
-
|
|
12409
|
-
type: "
|
|
12410
|
-
description: "
|
|
12411
|
-
|
|
13561
|
+
filters: {
|
|
13562
|
+
type: "object",
|
|
13563
|
+
description: "Optional filters (e.g., categories, price range, availability)",
|
|
13564
|
+
properties: {
|
|
13565
|
+
in_stock: { type: "boolean", description: "Only show in-stock items" },
|
|
13566
|
+
price_min: { type: "number", description: "Minimum price in minor units (cents)" },
|
|
13567
|
+
price_max: { type: "number", description: "Maximum price in minor units (cents)" }
|
|
13568
|
+
}
|
|
13569
|
+
},
|
|
13570
|
+
bearerToken: { type: "string", description: "Bearer token (optional)" }
|
|
12412
13571
|
},
|
|
12413
13572
|
required: ["domain", "id"]
|
|
12414
13573
|
},
|
|
@@ -12417,26 +13576,18 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
12417
13576
|
platformKeySupport: false
|
|
12418
13577
|
},
|
|
12419
13578
|
{
|
|
12420
|
-
id: "
|
|
12421
|
-
name: "UCP Get
|
|
12422
|
-
description: "Retrieve the current state of
|
|
13579
|
+
id: "ucp_get_order",
|
|
13580
|
+
name: "UCP Get Order",
|
|
13581
|
+
description: "Retrieve the current state of an order. Returns order details including line items, fulfillment status, shipping tracking, and any post-order adjustments (refunds, returns, exchanges).",
|
|
12423
13582
|
category: exports.BuiltInToolCategory.COMMERCE,
|
|
13583
|
+
toolGroup: exports.BuiltInToolGroup.UCP_COMMERCE,
|
|
12424
13584
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12425
13585
|
parametersSchema: {
|
|
12426
13586
|
type: "object",
|
|
12427
13587
|
properties: {
|
|
12428
|
-
domain: {
|
|
12429
|
-
|
|
12430
|
-
|
|
12431
|
-
},
|
|
12432
|
-
id: {
|
|
12433
|
-
type: "string",
|
|
12434
|
-
description: "Checkout session ID"
|
|
12435
|
-
},
|
|
12436
|
-
bearerToken: {
|
|
12437
|
-
type: "string",
|
|
12438
|
-
description: "Bearer token for authenticated checkout (optional)"
|
|
12439
|
-
}
|
|
13588
|
+
domain: { type: "string", description: "Domain of the UCP-enabled merchant" },
|
|
13589
|
+
id: { type: "string", description: "Order ID from the completed checkout" },
|
|
13590
|
+
bearerToken: { type: "string", description: "Bearer token (optional)" }
|
|
12440
13591
|
},
|
|
12441
13592
|
required: ["domain", "id"]
|
|
12442
13593
|
},
|
|
@@ -12444,366 +13595,372 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
12444
13595
|
requiresApiKey: false,
|
|
12445
13596
|
platformKeySupport: false
|
|
12446
13597
|
},
|
|
13598
|
+
// -----------------------------------------------------------------------
|
|
13599
|
+
// Sandbox tools — Tier 1 (anonymous): sandbox provisioned automatically,
|
|
13600
|
+
// model never sees sandboxId. Container reused across calls in one execution.
|
|
13601
|
+
// -----------------------------------------------------------------------
|
|
12447
13602
|
{
|
|
12448
|
-
id: "
|
|
12449
|
-
name: "
|
|
12450
|
-
description:
|
|
12451
|
-
category: exports.BuiltInToolCategory.
|
|
13603
|
+
id: "sandbox:exec",
|
|
13604
|
+
name: "Sandbox Exec",
|
|
13605
|
+
description: "Run a shell command in a Linux sandbox (Node 22, Python 3.12, git, pnpm). The sandbox persists across tool calls within the same execution \u2014 install packages, write files, then run them. Returns stdout, stderr, and exit code.",
|
|
13606
|
+
category: exports.BuiltInToolCategory.SANDBOX,
|
|
13607
|
+
toolGroup: exports.BuiltInToolGroup.SANDBOX_USE,
|
|
12452
13608
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12453
13609
|
parametersSchema: {
|
|
12454
13610
|
type: "object",
|
|
12455
13611
|
properties: {
|
|
12456
|
-
|
|
12457
|
-
type: "string",
|
|
12458
|
-
description: "Domain of the UCP-enabled merchant"
|
|
12459
|
-
},
|
|
12460
|
-
id: {
|
|
13612
|
+
command: {
|
|
12461
13613
|
type: "string",
|
|
12462
|
-
description: "
|
|
13614
|
+
description: "Shell command to execute (runs in bash)"
|
|
12463
13615
|
},
|
|
12464
|
-
|
|
13616
|
+
timeout: {
|
|
13617
|
+
type: "number",
|
|
13618
|
+
description: "Timeout in seconds (default 30, max 300)"
|
|
13619
|
+
}
|
|
13620
|
+
},
|
|
13621
|
+
required: ["command"]
|
|
13622
|
+
},
|
|
13623
|
+
executionHint: "platform",
|
|
13624
|
+
requiresApiKey: false,
|
|
13625
|
+
platformKeySupport: true
|
|
13626
|
+
},
|
|
13627
|
+
{
|
|
13628
|
+
id: "sandbox:run_code",
|
|
13629
|
+
name: "Sandbox Run Code",
|
|
13630
|
+
description: "Run a code snippet in the sandbox. Supports JavaScript, TypeScript, and Python. The result is the parsed JSON output (stdout) of the script. For JavaScript/TypeScript, the last expression or return value is captured.",
|
|
13631
|
+
category: exports.BuiltInToolCategory.SANDBOX,
|
|
13632
|
+
toolGroup: exports.BuiltInToolGroup.SANDBOX_USE,
|
|
13633
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
13634
|
+
parametersSchema: {
|
|
13635
|
+
type: "object",
|
|
13636
|
+
properties: {
|
|
13637
|
+
code: {
|
|
12465
13638
|
type: "string",
|
|
12466
|
-
description: "
|
|
13639
|
+
description: "Code to execute"
|
|
12467
13640
|
},
|
|
12468
|
-
|
|
13641
|
+
language: {
|
|
12469
13642
|
type: "string",
|
|
12470
|
-
|
|
12471
|
-
|
|
12472
|
-
|
|
13643
|
+
enum: ["javascript", "typescript", "python"],
|
|
13644
|
+
description: "Programming language (default: javascript)"
|
|
13645
|
+
}
|
|
13646
|
+
},
|
|
13647
|
+
required: ["code"]
|
|
13648
|
+
},
|
|
13649
|
+
executionHint: "platform",
|
|
13650
|
+
requiresApiKey: false,
|
|
13651
|
+
platformKeySupport: true
|
|
13652
|
+
},
|
|
13653
|
+
{
|
|
13654
|
+
id: "sandbox:write_file",
|
|
13655
|
+
name: "Sandbox Write File",
|
|
13656
|
+
description: "Write a file to the sandbox filesystem. Creates parent directories automatically. Use sandbox:exec to run files after writing them.",
|
|
13657
|
+
category: exports.BuiltInToolCategory.SANDBOX,
|
|
13658
|
+
toolGroup: exports.BuiltInToolGroup.SANDBOX_USE,
|
|
13659
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
13660
|
+
parametersSchema: {
|
|
13661
|
+
type: "object",
|
|
13662
|
+
properties: {
|
|
13663
|
+
path: {
|
|
12473
13664
|
type: "string",
|
|
12474
|
-
description:
|
|
13665
|
+
description: "File path in the sandbox (e.g., /home/user/app/index.js)"
|
|
12475
13666
|
},
|
|
12476
|
-
|
|
13667
|
+
content: {
|
|
12477
13668
|
type: "string",
|
|
12478
|
-
description: "
|
|
13669
|
+
description: "File content to write"
|
|
12479
13670
|
}
|
|
12480
13671
|
},
|
|
12481
|
-
required: ["
|
|
13672
|
+
required: ["path", "content"]
|
|
12482
13673
|
},
|
|
12483
13674
|
executionHint: "platform",
|
|
12484
13675
|
requiresApiKey: false,
|
|
12485
|
-
platformKeySupport:
|
|
13676
|
+
platformKeySupport: true
|
|
12486
13677
|
},
|
|
12487
13678
|
{
|
|
12488
|
-
id: "
|
|
12489
|
-
name: "
|
|
12490
|
-
description: "
|
|
12491
|
-
category: exports.BuiltInToolCategory.
|
|
13679
|
+
id: "sandbox:read_file",
|
|
13680
|
+
name: "Sandbox Read File",
|
|
13681
|
+
description: "Read a file from the sandbox filesystem. Returns the file content as a string.",
|
|
13682
|
+
category: exports.BuiltInToolCategory.SANDBOX,
|
|
13683
|
+
toolGroup: exports.BuiltInToolGroup.SANDBOX_USE,
|
|
12492
13684
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12493
13685
|
parametersSchema: {
|
|
12494
13686
|
type: "object",
|
|
12495
13687
|
properties: {
|
|
12496
|
-
|
|
12497
|
-
type: "string",
|
|
12498
|
-
description: "Domain of the UCP-enabled merchant"
|
|
12499
|
-
},
|
|
12500
|
-
id: {
|
|
13688
|
+
path: {
|
|
12501
13689
|
type: "string",
|
|
12502
|
-
description: "
|
|
13690
|
+
description: "File path to read"
|
|
13691
|
+
}
|
|
13692
|
+
},
|
|
13693
|
+
required: ["path"]
|
|
13694
|
+
},
|
|
13695
|
+
executionHint: "platform",
|
|
13696
|
+
requiresApiKey: false,
|
|
13697
|
+
platformKeySupport: true
|
|
13698
|
+
},
|
|
13699
|
+
{
|
|
13700
|
+
id: "sandbox:expose_port",
|
|
13701
|
+
name: "Sandbox Expose Port",
|
|
13702
|
+
description: "Expose a port from the sandbox and get a public preview URL. Use after starting a server process with sandbox:exec.",
|
|
13703
|
+
category: exports.BuiltInToolCategory.SANDBOX,
|
|
13704
|
+
toolGroup: exports.BuiltInToolGroup.SANDBOX_USE,
|
|
13705
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
13706
|
+
parametersSchema: {
|
|
13707
|
+
type: "object",
|
|
13708
|
+
properties: {
|
|
13709
|
+
port: {
|
|
13710
|
+
type: "number",
|
|
13711
|
+
description: "Port number to expose (must not be 3000, which is reserved)"
|
|
12503
13712
|
},
|
|
12504
|
-
|
|
13713
|
+
name: {
|
|
12505
13714
|
type: "string",
|
|
12506
|
-
description: "
|
|
13715
|
+
description: "Optional name for the preview URL"
|
|
12507
13716
|
}
|
|
12508
13717
|
},
|
|
12509
|
-
required: ["
|
|
13718
|
+
required: ["port"]
|
|
12510
13719
|
},
|
|
12511
13720
|
executionHint: "platform",
|
|
12512
13721
|
requiresApiKey: false,
|
|
12513
|
-
platformKeySupport:
|
|
13722
|
+
platformKeySupport: true
|
|
12514
13723
|
},
|
|
12515
13724
|
{
|
|
12516
|
-
id: "
|
|
12517
|
-
name: "
|
|
12518
|
-
description: "
|
|
12519
|
-
category: exports.BuiltInToolCategory.
|
|
13725
|
+
id: "sandbox:git_checkout",
|
|
13726
|
+
name: "Sandbox Git Checkout",
|
|
13727
|
+
description: "Clone a git repository into the sandbox. The repo is cloned into the current working directory.",
|
|
13728
|
+
category: exports.BuiltInToolCategory.SANDBOX,
|
|
13729
|
+
toolGroup: exports.BuiltInToolGroup.SANDBOX_USE,
|
|
12520
13730
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12521
13731
|
parametersSchema: {
|
|
12522
13732
|
type: "object",
|
|
12523
13733
|
properties: {
|
|
12524
|
-
|
|
12525
|
-
|
|
12526
|
-
|
|
12527
|
-
description: "Line items for the cart",
|
|
12528
|
-
items: {
|
|
12529
|
-
type: "object",
|
|
12530
|
-
properties: {
|
|
12531
|
-
id: { type: "string", description: "Product or variant identifier" },
|
|
12532
|
-
quantity: { type: "number", description: "Quantity" }
|
|
12533
|
-
},
|
|
12534
|
-
required: ["id", "quantity"]
|
|
12535
|
-
}
|
|
12536
|
-
},
|
|
12537
|
-
buyer: {
|
|
12538
|
-
type: "object",
|
|
12539
|
-
description: "Buyer information (optional)",
|
|
12540
|
-
properties: {
|
|
12541
|
-
email: { type: "string", description: "Buyer email address" },
|
|
12542
|
-
first_name: { type: "string", description: "Buyer first name" },
|
|
12543
|
-
last_name: { type: "string", description: "Buyer last name" },
|
|
12544
|
-
phone_number: { type: "string", description: "Buyer phone number" }
|
|
12545
|
-
}
|
|
12546
|
-
},
|
|
12547
|
-
context: {
|
|
12548
|
-
type: "object",
|
|
12549
|
-
description: "Optional buyer context for localization",
|
|
12550
|
-
properties: {
|
|
12551
|
-
address_country: { type: "string", description: "ISO 3166-1 alpha-2 country code" },
|
|
12552
|
-
language: { type: "string", description: "BCP-47 language tag" },
|
|
12553
|
-
currency: { type: "string", description: "ISO 4217 currency code" },
|
|
12554
|
-
intent: { type: "string", description: "Buyer intent description" }
|
|
12555
|
-
}
|
|
13734
|
+
repo: {
|
|
13735
|
+
type: "string",
|
|
13736
|
+
description: "Git repository URL to clone"
|
|
12556
13737
|
},
|
|
12557
|
-
|
|
13738
|
+
branch: {
|
|
13739
|
+
type: "string",
|
|
13740
|
+
description: "Branch to checkout (default: main/master)"
|
|
13741
|
+
}
|
|
12558
13742
|
},
|
|
12559
|
-
required: ["
|
|
13743
|
+
required: ["repo"]
|
|
12560
13744
|
},
|
|
12561
13745
|
executionHint: "platform",
|
|
12562
13746
|
requiresApiKey: false,
|
|
12563
|
-
platformKeySupport:
|
|
13747
|
+
platformKeySupport: true
|
|
12564
13748
|
},
|
|
13749
|
+
// -----------------------------------------------------------------------
|
|
13750
|
+
// Sandbox tools — Tier 2 (session): model manages sandboxId explicitly.
|
|
13751
|
+
// Allows multiple sandboxes, persistent instances, and cross-execution reuse.
|
|
13752
|
+
// -----------------------------------------------------------------------
|
|
12565
13753
|
{
|
|
12566
|
-
id: "
|
|
12567
|
-
name: "
|
|
12568
|
-
description: "
|
|
12569
|
-
category: exports.BuiltInToolCategory.
|
|
13754
|
+
id: "sandbox:create",
|
|
13755
|
+
name: "Sandbox Create",
|
|
13756
|
+
description: "Create a new sandbox instance. Returns a sandboxId to pass to session tools. If no sandboxId is provided, a random one is generated.",
|
|
13757
|
+
category: exports.BuiltInToolCategory.SANDBOX,
|
|
13758
|
+
toolGroup: exports.BuiltInToolGroup.SANDBOX_SESSION,
|
|
12570
13759
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12571
13760
|
parametersSchema: {
|
|
12572
13761
|
type: "object",
|
|
12573
13762
|
properties: {
|
|
12574
|
-
|
|
12575
|
-
|
|
12576
|
-
|
|
12577
|
-
|
|
12578
|
-
|
|
13763
|
+
sandboxId: {
|
|
13764
|
+
type: "string",
|
|
13765
|
+
description: "Optional custom sandbox ID. If omitted, a random ID is generated."
|
|
13766
|
+
}
|
|
13767
|
+
}
|
|
12579
13768
|
},
|
|
12580
13769
|
executionHint: "platform",
|
|
12581
13770
|
requiresApiKey: false,
|
|
12582
|
-
platformKeySupport:
|
|
13771
|
+
platformKeySupport: true
|
|
12583
13772
|
},
|
|
12584
13773
|
{
|
|
12585
|
-
id: "
|
|
12586
|
-
name: "
|
|
12587
|
-
description: "
|
|
12588
|
-
category: exports.BuiltInToolCategory.
|
|
13774
|
+
id: "sandbox:session_exec",
|
|
13775
|
+
name: "Sandbox Session Exec",
|
|
13776
|
+
description: "Run a shell command in a specific sandbox identified by sandboxId.",
|
|
13777
|
+
category: exports.BuiltInToolCategory.SANDBOX,
|
|
13778
|
+
toolGroup: exports.BuiltInToolGroup.SANDBOX_SESSION,
|
|
12589
13779
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12590
13780
|
parametersSchema: {
|
|
12591
13781
|
type: "object",
|
|
12592
13782
|
properties: {
|
|
12593
|
-
|
|
12594
|
-
|
|
12595
|
-
|
|
12596
|
-
type: "array",
|
|
12597
|
-
description: "Updated line items (full replacement)",
|
|
12598
|
-
items: {
|
|
12599
|
-
type: "object",
|
|
12600
|
-
properties: {
|
|
12601
|
-
id: { type: "string", description: "Product or variant identifier" },
|
|
12602
|
-
quantity: { type: "number", description: "Quantity" }
|
|
12603
|
-
},
|
|
12604
|
-
required: ["id", "quantity"]
|
|
12605
|
-
}
|
|
12606
|
-
},
|
|
12607
|
-
buyer: {
|
|
12608
|
-
type: "object",
|
|
12609
|
-
description: "Buyer information (optional)",
|
|
12610
|
-
properties: {
|
|
12611
|
-
email: { type: "string", description: "Buyer email address" },
|
|
12612
|
-
first_name: { type: "string", description: "Buyer first name" },
|
|
12613
|
-
last_name: { type: "string", description: "Buyer last name" },
|
|
12614
|
-
phone_number: { type: "string", description: "Buyer phone number" }
|
|
12615
|
-
}
|
|
13783
|
+
sandboxId: {
|
|
13784
|
+
type: "string",
|
|
13785
|
+
description: "The sandbox ID returned by sandbox:create"
|
|
12616
13786
|
},
|
|
12617
|
-
|
|
12618
|
-
type: "
|
|
12619
|
-
description: "
|
|
12620
|
-
properties: {
|
|
12621
|
-
address_country: { type: "string" },
|
|
12622
|
-
language: { type: "string" },
|
|
12623
|
-
currency: { type: "string" },
|
|
12624
|
-
intent: { type: "string" }
|
|
12625
|
-
}
|
|
13787
|
+
command: {
|
|
13788
|
+
type: "string",
|
|
13789
|
+
description: "Shell command to execute"
|
|
12626
13790
|
},
|
|
12627
|
-
|
|
13791
|
+
timeout: {
|
|
13792
|
+
type: "number",
|
|
13793
|
+
description: "Timeout in seconds (default 30, max 300)"
|
|
13794
|
+
}
|
|
12628
13795
|
},
|
|
12629
|
-
required: ["
|
|
13796
|
+
required: ["sandboxId", "command"]
|
|
12630
13797
|
},
|
|
12631
13798
|
executionHint: "platform",
|
|
12632
13799
|
requiresApiKey: false,
|
|
12633
|
-
platformKeySupport:
|
|
13800
|
+
platformKeySupport: true
|
|
12634
13801
|
},
|
|
12635
13802
|
{
|
|
12636
|
-
id: "
|
|
12637
|
-
name: "
|
|
12638
|
-
description: "
|
|
12639
|
-
category: exports.BuiltInToolCategory.
|
|
13803
|
+
id: "sandbox:session_run_code",
|
|
13804
|
+
name: "Sandbox Session Run Code",
|
|
13805
|
+
description: "Run a code snippet in a specific sandbox identified by sandboxId.",
|
|
13806
|
+
category: exports.BuiltInToolCategory.SANDBOX,
|
|
13807
|
+
toolGroup: exports.BuiltInToolGroup.SANDBOX_SESSION,
|
|
12640
13808
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12641
13809
|
parametersSchema: {
|
|
12642
13810
|
type: "object",
|
|
12643
13811
|
properties: {
|
|
12644
|
-
|
|
12645
|
-
|
|
12646
|
-
|
|
13812
|
+
sandboxId: {
|
|
13813
|
+
type: "string",
|
|
13814
|
+
description: "The sandbox ID returned by sandbox:create"
|
|
13815
|
+
},
|
|
13816
|
+
code: {
|
|
13817
|
+
type: "string",
|
|
13818
|
+
description: "Code to execute"
|
|
13819
|
+
},
|
|
13820
|
+
language: {
|
|
13821
|
+
type: "string",
|
|
13822
|
+
enum: ["javascript", "typescript", "python"],
|
|
13823
|
+
description: "Programming language (default: javascript)"
|
|
13824
|
+
}
|
|
12647
13825
|
},
|
|
12648
|
-
required: ["
|
|
13826
|
+
required: ["sandboxId", "code"]
|
|
12649
13827
|
},
|
|
12650
13828
|
executionHint: "platform",
|
|
12651
13829
|
requiresApiKey: false,
|
|
12652
|
-
platformKeySupport:
|
|
13830
|
+
platformKeySupport: true
|
|
12653
13831
|
},
|
|
12654
13832
|
{
|
|
12655
|
-
id: "
|
|
12656
|
-
name: "
|
|
12657
|
-
description: "
|
|
12658
|
-
category: exports.BuiltInToolCategory.
|
|
13833
|
+
id: "sandbox:session_write_file",
|
|
13834
|
+
name: "Sandbox Session Write File",
|
|
13835
|
+
description: "Write a file to a specific sandbox identified by sandboxId.",
|
|
13836
|
+
category: exports.BuiltInToolCategory.SANDBOX,
|
|
13837
|
+
toolGroup: exports.BuiltInToolGroup.SANDBOX_SESSION,
|
|
12659
13838
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12660
13839
|
parametersSchema: {
|
|
12661
13840
|
type: "object",
|
|
12662
13841
|
properties: {
|
|
12663
|
-
|
|
12664
|
-
|
|
12665
|
-
|
|
12666
|
-
type: "object",
|
|
12667
|
-
description: "Buyer context for localization (country, language, currency)",
|
|
12668
|
-
properties: {
|
|
12669
|
-
address_country: { type: "string" },
|
|
12670
|
-
language: { type: "string" },
|
|
12671
|
-
currency: { type: "string" },
|
|
12672
|
-
intent: { type: "string" }
|
|
12673
|
-
}
|
|
13842
|
+
sandboxId: {
|
|
13843
|
+
type: "string",
|
|
13844
|
+
description: "The sandbox ID returned by sandbox:create"
|
|
12674
13845
|
},
|
|
12675
|
-
|
|
12676
|
-
type: "
|
|
12677
|
-
description: "
|
|
12678
|
-
properties: {
|
|
12679
|
-
in_stock: { type: "boolean", description: "Only show in-stock items" },
|
|
12680
|
-
price_min: { type: "number", description: "Minimum price in minor units (cents)" },
|
|
12681
|
-
price_max: { type: "number", description: "Maximum price in minor units (cents)" }
|
|
12682
|
-
}
|
|
13846
|
+
path: {
|
|
13847
|
+
type: "string",
|
|
13848
|
+
description: "File path in the sandbox"
|
|
12683
13849
|
},
|
|
12684
|
-
|
|
12685
|
-
|
|
12686
|
-
|
|
13850
|
+
content: {
|
|
13851
|
+
type: "string",
|
|
13852
|
+
description: "File content to write"
|
|
13853
|
+
}
|
|
12687
13854
|
},
|
|
12688
|
-
required: ["
|
|
13855
|
+
required: ["sandboxId", "path", "content"]
|
|
12689
13856
|
},
|
|
12690
13857
|
executionHint: "platform",
|
|
12691
13858
|
requiresApiKey: false,
|
|
12692
|
-
platformKeySupport:
|
|
13859
|
+
platformKeySupport: true
|
|
12693
13860
|
},
|
|
12694
13861
|
{
|
|
12695
|
-
id: "
|
|
12696
|
-
name: "
|
|
12697
|
-
description: "
|
|
12698
|
-
category: exports.BuiltInToolCategory.
|
|
13862
|
+
id: "sandbox:session_read_file",
|
|
13863
|
+
name: "Sandbox Session Read File",
|
|
13864
|
+
description: "Read a file from a specific sandbox identified by sandboxId.",
|
|
13865
|
+
category: exports.BuiltInToolCategory.SANDBOX,
|
|
13866
|
+
toolGroup: exports.BuiltInToolGroup.SANDBOX_SESSION,
|
|
12699
13867
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12700
13868
|
parametersSchema: {
|
|
12701
13869
|
type: "object",
|
|
12702
13870
|
properties: {
|
|
12703
|
-
|
|
12704
|
-
|
|
12705
|
-
|
|
12706
|
-
items: { type: "string" },
|
|
12707
|
-
description: "Product, variant, or SKU identifiers to look up"
|
|
12708
|
-
},
|
|
12709
|
-
context: {
|
|
12710
|
-
type: "object",
|
|
12711
|
-
description: "Buyer context for localization",
|
|
12712
|
-
properties: {
|
|
12713
|
-
address_country: { type: "string" },
|
|
12714
|
-
language: { type: "string" },
|
|
12715
|
-
currency: { type: "string" }
|
|
12716
|
-
}
|
|
12717
|
-
},
|
|
12718
|
-
filters: {
|
|
12719
|
-
type: "object",
|
|
12720
|
-
description: "Optional filters (e.g., categories, price range, availability)",
|
|
12721
|
-
properties: {
|
|
12722
|
-
in_stock: { type: "boolean", description: "Only show in-stock items" },
|
|
12723
|
-
price_min: { type: "number", description: "Minimum price in minor units (cents)" },
|
|
12724
|
-
price_max: { type: "number", description: "Maximum price in minor units (cents)" }
|
|
12725
|
-
}
|
|
13871
|
+
sandboxId: {
|
|
13872
|
+
type: "string",
|
|
13873
|
+
description: "The sandbox ID returned by sandbox:create"
|
|
12726
13874
|
},
|
|
12727
|
-
|
|
13875
|
+
path: {
|
|
13876
|
+
type: "string",
|
|
13877
|
+
description: "File path to read"
|
|
13878
|
+
}
|
|
12728
13879
|
},
|
|
12729
|
-
required: ["
|
|
13880
|
+
required: ["sandboxId", "path"]
|
|
12730
13881
|
},
|
|
12731
13882
|
executionHint: "platform",
|
|
12732
13883
|
requiresApiKey: false,
|
|
12733
|
-
platformKeySupport:
|
|
13884
|
+
platformKeySupport: true
|
|
12734
13885
|
},
|
|
12735
13886
|
{
|
|
12736
|
-
id: "
|
|
12737
|
-
name: "
|
|
12738
|
-
description: "
|
|
12739
|
-
category: exports.BuiltInToolCategory.
|
|
13887
|
+
id: "sandbox:session_expose_port",
|
|
13888
|
+
name: "Sandbox Session Expose Port",
|
|
13889
|
+
description: "Expose a port from a specific sandbox and get a public preview URL.",
|
|
13890
|
+
category: exports.BuiltInToolCategory.SANDBOX,
|
|
13891
|
+
toolGroup: exports.BuiltInToolGroup.SANDBOX_SESSION,
|
|
12740
13892
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12741
13893
|
parametersSchema: {
|
|
12742
13894
|
type: "object",
|
|
12743
13895
|
properties: {
|
|
12744
|
-
|
|
12745
|
-
|
|
12746
|
-
|
|
12747
|
-
type: "array",
|
|
12748
|
-
description: 'Option selections for interactive variant narrowing (e.g., [{name: "Color", value: "Blue"}])',
|
|
12749
|
-
items: {
|
|
12750
|
-
type: "object",
|
|
12751
|
-
properties: {
|
|
12752
|
-
name: { type: "string", description: 'Option name (e.g., "Color", "Size")' },
|
|
12753
|
-
value: { type: "string", description: 'Selected value (e.g., "Blue", "Large")' }
|
|
12754
|
-
},
|
|
12755
|
-
required: ["name", "value"]
|
|
12756
|
-
}
|
|
13896
|
+
sandboxId: {
|
|
13897
|
+
type: "string",
|
|
13898
|
+
description: "The sandbox ID returned by sandbox:create"
|
|
12757
13899
|
},
|
|
12758
|
-
|
|
12759
|
-
type: "
|
|
12760
|
-
|
|
12761
|
-
description: "Option names in relaxation priority order. When no exact match, drops from end first."
|
|
13900
|
+
port: {
|
|
13901
|
+
type: "number",
|
|
13902
|
+
description: "Port number to expose"
|
|
12762
13903
|
},
|
|
12763
|
-
|
|
12764
|
-
type: "
|
|
12765
|
-
description: "
|
|
12766
|
-
|
|
12767
|
-
|
|
12768
|
-
|
|
12769
|
-
|
|
12770
|
-
|
|
13904
|
+
name: {
|
|
13905
|
+
type: "string",
|
|
13906
|
+
description: "Optional name for the preview URL"
|
|
13907
|
+
}
|
|
13908
|
+
},
|
|
13909
|
+
required: ["sandboxId", "port"]
|
|
13910
|
+
},
|
|
13911
|
+
executionHint: "platform",
|
|
13912
|
+
requiresApiKey: false,
|
|
13913
|
+
platformKeySupport: true
|
|
13914
|
+
},
|
|
13915
|
+
{
|
|
13916
|
+
id: "sandbox:session_git_checkout",
|
|
13917
|
+
name: "Sandbox Session Git Checkout",
|
|
13918
|
+
description: "Clone a git repository into a specific sandbox identified by sandboxId.",
|
|
13919
|
+
category: exports.BuiltInToolCategory.SANDBOX,
|
|
13920
|
+
toolGroup: exports.BuiltInToolGroup.SANDBOX_SESSION,
|
|
13921
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
13922
|
+
parametersSchema: {
|
|
13923
|
+
type: "object",
|
|
13924
|
+
properties: {
|
|
13925
|
+
sandboxId: {
|
|
13926
|
+
type: "string",
|
|
13927
|
+
description: "The sandbox ID returned by sandbox:create"
|
|
12771
13928
|
},
|
|
12772
|
-
|
|
12773
|
-
type: "
|
|
12774
|
-
description: "
|
|
12775
|
-
properties: {
|
|
12776
|
-
in_stock: { type: "boolean", description: "Only show in-stock items" },
|
|
12777
|
-
price_min: { type: "number", description: "Minimum price in minor units (cents)" },
|
|
12778
|
-
price_max: { type: "number", description: "Maximum price in minor units (cents)" }
|
|
12779
|
-
}
|
|
13929
|
+
repo: {
|
|
13930
|
+
type: "string",
|
|
13931
|
+
description: "Git repository URL to clone"
|
|
12780
13932
|
},
|
|
12781
|
-
|
|
13933
|
+
branch: {
|
|
13934
|
+
type: "string",
|
|
13935
|
+
description: "Branch to checkout"
|
|
13936
|
+
}
|
|
12782
13937
|
},
|
|
12783
|
-
required: ["
|
|
13938
|
+
required: ["sandboxId", "repo"]
|
|
12784
13939
|
},
|
|
12785
13940
|
executionHint: "platform",
|
|
12786
13941
|
requiresApiKey: false,
|
|
12787
|
-
platformKeySupport:
|
|
13942
|
+
platformKeySupport: true
|
|
12788
13943
|
},
|
|
12789
13944
|
{
|
|
12790
|
-
id: "
|
|
12791
|
-
name: "
|
|
12792
|
-
description: "
|
|
12793
|
-
category: exports.BuiltInToolCategory.
|
|
13945
|
+
id: "sandbox:destroy",
|
|
13946
|
+
name: "Sandbox Destroy",
|
|
13947
|
+
description: "Destroy a sandbox instance and release its resources. Only available for session-managed sandboxes.",
|
|
13948
|
+
category: exports.BuiltInToolCategory.SANDBOX,
|
|
13949
|
+
toolGroup: exports.BuiltInToolGroup.SANDBOX_SESSION,
|
|
12794
13950
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12795
13951
|
parametersSchema: {
|
|
12796
13952
|
type: "object",
|
|
12797
13953
|
properties: {
|
|
12798
|
-
|
|
12799
|
-
|
|
12800
|
-
|
|
13954
|
+
sandboxId: {
|
|
13955
|
+
type: "string",
|
|
13956
|
+
description: "The sandbox ID to destroy"
|
|
13957
|
+
}
|
|
12801
13958
|
},
|
|
12802
|
-
required: ["
|
|
13959
|
+
required: ["sandboxId"]
|
|
12803
13960
|
},
|
|
12804
13961
|
executionHint: "platform",
|
|
12805
13962
|
requiresApiKey: false,
|
|
12806
|
-
platformKeySupport:
|
|
13963
|
+
platformKeySupport: true
|
|
12807
13964
|
}
|
|
12808
13965
|
];
|
|
12809
13966
|
exports.BUILTIN_TOOLS_REGISTRY = [
|
|
@@ -12815,12 +13972,19 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
12815
13972
|
const prefix = (_a = tool.idPrefix) !== null && _a !== void 0 ? _a : exports.BuiltInToolIdPrefix.BUILTIN;
|
|
12816
13973
|
return `${prefix}:${tool.id}`;
|
|
12817
13974
|
}
|
|
12818
|
-
function getAllBuiltInTools2() {
|
|
12819
|
-
return exports.BUILTIN_TOOLS_REGISTRY.filter((tool) => !tool.hidden);
|
|
13975
|
+
function getAllBuiltInTools2(opts) {
|
|
13976
|
+
return exports.BUILTIN_TOOLS_REGISTRY.filter((tool) => !tool.hidden && !((opts === null || opts === void 0 ? void 0 : opts.hideExperimental) && tool.experimental));
|
|
12820
13977
|
}
|
|
12821
13978
|
function getBuiltInToolById2(toolId) {
|
|
12822
13979
|
const cleanId = toolId.replace(/^(builtin|platform):/, "");
|
|
12823
|
-
return exports.BUILTIN_TOOLS_REGISTRY.find((tool) =>
|
|
13980
|
+
return exports.BUILTIN_TOOLS_REGISTRY.find((tool) => {
|
|
13981
|
+
var _a;
|
|
13982
|
+
return tool.id === cleanId || ((_a = tool.aliases) === null || _a === void 0 ? void 0 : _a.includes(cleanId));
|
|
13983
|
+
});
|
|
13984
|
+
}
|
|
13985
|
+
function getBuiltInToolGroupById(toolId) {
|
|
13986
|
+
var _a;
|
|
13987
|
+
return (_a = getBuiltInToolById2(toolId)) === null || _a === void 0 ? void 0 : _a.toolGroup;
|
|
12824
13988
|
}
|
|
12825
13989
|
function getBuiltInToolsByProvider(provider) {
|
|
12826
13990
|
return exports.BUILTIN_TOOLS_REGISTRY.filter((tool) => tool.providers.includes(provider) || tool.providers.includes(exports.BuiltInToolProvider.MULTI));
|
|
@@ -12846,8 +14010,8 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
12846
14010
|
return true;
|
|
12847
14011
|
return compatibility.models.some((m) => modelId.includes(m));
|
|
12848
14012
|
}
|
|
12849
|
-
function getCompatibleBuiltInTools(modelId, provider) {
|
|
12850
|
-
return exports.BUILTIN_TOOLS_REGISTRY.filter((tool) => !tool.hidden && isToolCompatibleWithModel2(tool.id, modelId, provider));
|
|
14013
|
+
function getCompatibleBuiltInTools(modelId, provider, opts) {
|
|
14014
|
+
return exports.BUILTIN_TOOLS_REGISTRY.filter((tool) => !tool.hidden && !((opts === null || opts === void 0 ? void 0 : opts.hideExperimental) && tool.experimental) && isToolCompatibleWithModel2(tool.id, modelId, provider));
|
|
12851
14015
|
}
|
|
12852
14016
|
function validateConfigAgainstSchema(schema, config2) {
|
|
12853
14017
|
const errors = [];
|
|
@@ -12954,6 +14118,8 @@ var require_generated_model_routing = __commonJS({
|
|
|
12954
14118
|
"deepseek-v3.1-terminus": ["vercel"],
|
|
12955
14119
|
"deepseek-v3.2": ["vercel"],
|
|
12956
14120
|
"deepseek-v3.2-thinking": ["vercel"],
|
|
14121
|
+
"deepseek-v4-flash": ["vercel"],
|
|
14122
|
+
"deepseek-v4-pro": ["vercel"],
|
|
12957
14123
|
"devstral-2": ["vercel"],
|
|
12958
14124
|
"devstral-small": ["vercel"],
|
|
12959
14125
|
"devstral-small-2": ["vercel"],
|
|
@@ -13040,6 +14206,8 @@ var require_generated_model_routing = __commonJS({
|
|
|
13040
14206
|
"gpt-5.4-mini": ["vercel"],
|
|
13041
14207
|
"gpt-5.4-nano": ["vercel"],
|
|
13042
14208
|
"gpt-5.4-pro": ["vercel"],
|
|
14209
|
+
"gpt-5.5": ["vercel"],
|
|
14210
|
+
"gpt-5.5-pro": ["vercel"],
|
|
13043
14211
|
"gpt-oss-120b": ["vercel"],
|
|
13044
14212
|
"gpt-oss-20b": ["vercel"],
|
|
13045
14213
|
"gpt-oss-safeguard-20b": ["vercel"],
|
|
@@ -13057,6 +14225,7 @@ var require_generated_model_routing = __commonJS({
|
|
|
13057
14225
|
"grok-4.20-reasoning-beta": ["vercel"],
|
|
13058
14226
|
"grok-code-fast-1": ["vercel", "xai"],
|
|
13059
14227
|
"intellect-3": ["vercel"],
|
|
14228
|
+
"interfaze-beta": ["vercel"],
|
|
13060
14229
|
"kat-coder-pro-v1": ["vercel"],
|
|
13061
14230
|
"kat-coder-pro-v2": ["vercel"],
|
|
13062
14231
|
"kimi-k2": ["vercel"],
|
|
@@ -13093,6 +14262,8 @@ var require_generated_model_routing = __commonJS({
|
|
|
13093
14262
|
"Meta-Llama-3.3-70B-Instruct-Turbo": ["togetherai"],
|
|
13094
14263
|
"mimo-v2-flash": ["vercel"],
|
|
13095
14264
|
"mimo-v2-pro": ["vercel"],
|
|
14265
|
+
"mimo-v2.5": ["vercel"],
|
|
14266
|
+
"mimo-v2.5-pro": ["vercel"],
|
|
13096
14267
|
"minimax-m2": ["vercel"],
|
|
13097
14268
|
"minimax-m2.1": ["vercel"],
|
|
13098
14269
|
"minimax-m2.1-lightning": ["vercel"],
|
|
@@ -13143,6 +14314,7 @@ var require_generated_model_routing = __commonJS({
|
|
|
13143
14314
|
"qwen3-max-thinking": ["vercel"],
|
|
13144
14315
|
"qwen3-next-80b-a3b-instruct": ["vercel"],
|
|
13145
14316
|
"qwen3-next-80b-a3b-thinking": ["vercel"],
|
|
14317
|
+
"qwen3-vl-235b-a22b-instruct": ["vercel"],
|
|
13146
14318
|
"qwen3-vl-instruct": ["vercel"],
|
|
13147
14319
|
"qwen3-vl-thinking": ["vercel"],
|
|
13148
14320
|
"qwen3.5-122b-a10b": ["mixlayer"],
|
|
@@ -13153,6 +14325,7 @@ var require_generated_model_routing = __commonJS({
|
|
|
13153
14325
|
"qwen3.5-9b": ["mixlayer"],
|
|
13154
14326
|
"qwen3.5-flash": ["vercel"],
|
|
13155
14327
|
"qwen3.5-plus": ["vercel"],
|
|
14328
|
+
"qwen3.6-27b": ["vercel"],
|
|
13156
14329
|
"qwen3.6-plus": ["vercel"],
|
|
13157
14330
|
"seed-1.6": ["vercel"],
|
|
13158
14331
|
"seed-1.8": ["vercel"],
|
|
@@ -13214,6 +14387,8 @@ var require_generated_model_routing = __commonJS({
|
|
|
13214
14387
|
"deepseek-v3-1": ["vercel"],
|
|
13215
14388
|
"deepseek-v3-1-terminus": ["vercel"],
|
|
13216
14389
|
"deepseek-v3-2": ["vercel"],
|
|
14390
|
+
"deepseek-v4-flash": ["vercel"],
|
|
14391
|
+
"deepseek-v4-pro": ["vercel"],
|
|
13217
14392
|
"devstral-2": ["vercel"],
|
|
13218
14393
|
"devstral-small": ["vercel"],
|
|
13219
14394
|
"devstral-small-2": ["vercel"],
|
|
@@ -13283,6 +14458,8 @@ var require_generated_model_routing = __commonJS({
|
|
|
13283
14458
|
"gpt-5-4-mini": ["vercel"],
|
|
13284
14459
|
"gpt-5-4-nano": ["vercel"],
|
|
13285
14460
|
"gpt-5-4-pro": ["vercel"],
|
|
14461
|
+
"gpt-5-5": ["vercel"],
|
|
14462
|
+
"gpt-5-5-pro": ["vercel"],
|
|
13286
14463
|
"gpt-5-batch": ["openai"],
|
|
13287
14464
|
"gpt-5-chat": ["vercel"],
|
|
13288
14465
|
"gpt-5-codex": ["vercel"],
|
|
@@ -13308,6 +14485,7 @@ var require_generated_model_routing = __commonJS({
|
|
|
13308
14485
|
"grok-4-fast-reasoning": ["vercel"],
|
|
13309
14486
|
"grok-code-fast-1": ["vercel", "xai"],
|
|
13310
14487
|
"intellect-3": ["vercel"],
|
|
14488
|
+
"interfaze-beta": ["vercel"],
|
|
13311
14489
|
"kat-coder-pro": ["vercel"],
|
|
13312
14490
|
"kimi-k2": ["vercel"],
|
|
13313
14491
|
"kimi-k2-0905": ["vercel"],
|
|
@@ -13333,6 +14511,8 @@ var require_generated_model_routing = __commonJS({
|
|
|
13333
14511
|
"meta-llama-3-1-70b-instruct-turbo": ["togetherai"],
|
|
13334
14512
|
"meta-llama-3-1-8b-instruct-turbo": ["togetherai"],
|
|
13335
14513
|
"meta-llama-3-3-70b-instruct-turbo": ["togetherai"],
|
|
14514
|
+
"mimo-v2-5": ["vercel"],
|
|
14515
|
+
"mimo-v2-5-pro": ["vercel"],
|
|
13336
14516
|
"mimo-v2-flash": ["vercel"],
|
|
13337
14517
|
"mimo-v2-pro": ["vercel"],
|
|
13338
14518
|
"minimax-m2": ["vercel"],
|
|
@@ -13381,6 +14561,7 @@ var require_generated_model_routing = __commonJS({
|
|
|
13381
14561
|
"qwen3-5-9b": ["mixlayer"],
|
|
13382
14562
|
"qwen3-5-flash": ["vercel"],
|
|
13383
14563
|
"qwen3-5-plus": ["vercel"],
|
|
14564
|
+
"qwen3-6-27b": ["vercel"],
|
|
13384
14565
|
"qwen3-6-plus": ["vercel"],
|
|
13385
14566
|
"qwen3-coder": ["vercel"],
|
|
13386
14567
|
"qwen3-coder-30b-a3b": ["vercel"],
|
|
@@ -13393,6 +14574,7 @@ var require_generated_model_routing = __commonJS({
|
|
|
13393
14574
|
"qwen3-next-80b-a3b": ["vercel"],
|
|
13394
14575
|
"qwen3-next-80b-a3b-instruct": ["vercel"],
|
|
13395
14576
|
"qwen3-vl": ["vercel"],
|
|
14577
|
+
"qwen3-vl-235b-a22b-instruct": ["vercel"],
|
|
13396
14578
|
"qwen3-vl-instruct": ["vercel"],
|
|
13397
14579
|
"seed-1-6": ["vercel"],
|
|
13398
14580
|
"seed-1-8": ["vercel"],
|
|
@@ -13567,6 +14749,12 @@ var require_generated_model_routing = __commonJS({
|
|
|
13567
14749
|
"deepseek-v3.2-thinking": {
|
|
13568
14750
|
"vercel": "deepseek/deepseek-v3.2-thinking"
|
|
13569
14751
|
},
|
|
14752
|
+
"deepseek-v4-flash": {
|
|
14753
|
+
"vercel": "deepseek/deepseek-v4-flash"
|
|
14754
|
+
},
|
|
14755
|
+
"deepseek-v4-pro": {
|
|
14756
|
+
"vercel": "deepseek/deepseek-v4-pro"
|
|
14757
|
+
},
|
|
13570
14758
|
"devstral-2": {
|
|
13571
14759
|
"vercel": "mistral/devstral-2"
|
|
13572
14760
|
},
|
|
@@ -13882,6 +15070,12 @@ var require_generated_model_routing = __commonJS({
|
|
|
13882
15070
|
"gpt-5-4-pro": {
|
|
13883
15071
|
"vercel": "openai/gpt-5.4-pro"
|
|
13884
15072
|
},
|
|
15073
|
+
"gpt-5-5": {
|
|
15074
|
+
"vercel": "openai/gpt-5.5"
|
|
15075
|
+
},
|
|
15076
|
+
"gpt-5-5-pro": {
|
|
15077
|
+
"vercel": "openai/gpt-5.5-pro"
|
|
15078
|
+
},
|
|
13885
15079
|
"gpt-5-batch": {
|
|
13886
15080
|
"openai": "gpt-5-batch"
|
|
13887
15081
|
},
|
|
@@ -13975,6 +15169,12 @@ var require_generated_model_routing = __commonJS({
|
|
|
13975
15169
|
"gpt-5.4-pro": {
|
|
13976
15170
|
"vercel": "openai/gpt-5.4-pro"
|
|
13977
15171
|
},
|
|
15172
|
+
"gpt-5.5": {
|
|
15173
|
+
"vercel": "openai/gpt-5.5"
|
|
15174
|
+
},
|
|
15175
|
+
"gpt-5.5-pro": {
|
|
15176
|
+
"vercel": "openai/gpt-5.5-pro"
|
|
15177
|
+
},
|
|
13978
15178
|
"gpt-oss-120b": {
|
|
13979
15179
|
"vercel": "openai/gpt-oss-120b"
|
|
13980
15180
|
},
|
|
@@ -14052,6 +15252,9 @@ var require_generated_model_routing = __commonJS({
|
|
|
14052
15252
|
"intellect-3": {
|
|
14053
15253
|
"vercel": "prime-intellect/intellect-3"
|
|
14054
15254
|
},
|
|
15255
|
+
"interfaze-beta": {
|
|
15256
|
+
"vercel": "interfaze/interfaze-beta"
|
|
15257
|
+
},
|
|
14055
15258
|
"kat-coder-pro": {
|
|
14056
15259
|
"vercel": "kwaipilot/kat-coder-pro-v2"
|
|
14057
15260
|
},
|
|
@@ -14187,12 +15390,24 @@ var require_generated_model_routing = __commonJS({
|
|
|
14187
15390
|
"Meta-Llama-3.3-70B-Instruct-Turbo": {
|
|
14188
15391
|
"togetherai": "meta-llama/Meta-Llama-3.3-70B-Instruct-Turbo"
|
|
14189
15392
|
},
|
|
15393
|
+
"mimo-v2-5": {
|
|
15394
|
+
"vercel": "xiaomi/mimo-v2.5"
|
|
15395
|
+
},
|
|
15396
|
+
"mimo-v2-5-pro": {
|
|
15397
|
+
"vercel": "xiaomi/mimo-v2.5-pro"
|
|
15398
|
+
},
|
|
14190
15399
|
"mimo-v2-flash": {
|
|
14191
15400
|
"vercel": "xiaomi/mimo-v2-flash"
|
|
14192
15401
|
},
|
|
14193
15402
|
"mimo-v2-pro": {
|
|
14194
15403
|
"vercel": "xiaomi/mimo-v2-pro"
|
|
14195
15404
|
},
|
|
15405
|
+
"mimo-v2.5": {
|
|
15406
|
+
"vercel": "xiaomi/mimo-v2.5"
|
|
15407
|
+
},
|
|
15408
|
+
"mimo-v2.5-pro": {
|
|
15409
|
+
"vercel": "xiaomi/mimo-v2.5-pro"
|
|
15410
|
+
},
|
|
14196
15411
|
"minimax-m2": {
|
|
14197
15412
|
"vercel": "minimax/minimax-m2"
|
|
14198
15413
|
},
|
|
@@ -14364,6 +15579,9 @@ var require_generated_model_routing = __commonJS({
|
|
|
14364
15579
|
"qwen3-5-plus": {
|
|
14365
15580
|
"vercel": "alibaba/qwen3.5-plus"
|
|
14366
15581
|
},
|
|
15582
|
+
"qwen3-6-27b": {
|
|
15583
|
+
"vercel": "alibaba/qwen3.6-27b"
|
|
15584
|
+
},
|
|
14367
15585
|
"qwen3-6-plus": {
|
|
14368
15586
|
"vercel": "alibaba/qwen3.6-plus"
|
|
14369
15587
|
},
|
|
@@ -14412,6 +15630,9 @@ var require_generated_model_routing = __commonJS({
|
|
|
14412
15630
|
"qwen3-vl": {
|
|
14413
15631
|
"vercel": "alibaba/qwen3-vl-thinking"
|
|
14414
15632
|
},
|
|
15633
|
+
"qwen3-vl-235b-a22b-instruct": {
|
|
15634
|
+
"vercel": "alibaba/qwen3-vl-235b-a22b-instruct"
|
|
15635
|
+
},
|
|
14415
15636
|
"qwen3-vl-instruct": {
|
|
14416
15637
|
"vercel": "alibaba/qwen3-vl-instruct"
|
|
14417
15638
|
},
|
|
@@ -14442,6 +15663,9 @@ var require_generated_model_routing = __commonJS({
|
|
|
14442
15663
|
"qwen3.5-plus": {
|
|
14443
15664
|
"vercel": "alibaba/qwen3.5-plus"
|
|
14444
15665
|
},
|
|
15666
|
+
"qwen3.6-27b": {
|
|
15667
|
+
"vercel": "alibaba/qwen3.6-27b"
|
|
15668
|
+
},
|
|
14445
15669
|
"qwen3.6-plus": {
|
|
14446
15670
|
"vercel": "alibaba/qwen3.6-plus"
|
|
14447
15671
|
},
|
|
@@ -14596,6 +15820,7 @@ var require_generated_model_routing = __commonJS({
|
|
|
14596
15820
|
"qwen3-32b": { providers: [{ provider: "vercel", weight: 100 }] },
|
|
14597
15821
|
"qwen3-5-flash": { providers: [{ provider: "vercel", weight: 100 }] },
|
|
14598
15822
|
"qwen3-5-plus": { providers: [{ provider: "vercel", weight: 100 }] },
|
|
15823
|
+
"qwen3-6-27b": { providers: [{ provider: "vercel", weight: 100 }] },
|
|
14599
15824
|
"qwen3-6-plus": { providers: [{ provider: "vercel", weight: 100 }] },
|
|
14600
15825
|
"qwen3-coder": { providers: [{ provider: "vercel", weight: 100 }] },
|
|
14601
15826
|
"qwen3-coder-30b-a3b": { providers: [{ provider: "vercel", weight: 100 }] },
|
|
@@ -14608,6 +15833,7 @@ var require_generated_model_routing = __commonJS({
|
|
|
14608
15833
|
"qwen3-next-80b-a3b": { providers: [{ provider: "vercel", weight: 100 }] },
|
|
14609
15834
|
"qwen3-next-80b-a3b-instruct": { providers: [{ provider: "vercel", weight: 100 }] },
|
|
14610
15835
|
"qwen3-vl": { providers: [{ provider: "vercel", weight: 100 }] },
|
|
15836
|
+
"qwen3-vl-235b-a22b-instruct": { providers: [{ provider: "vercel", weight: 100 }] },
|
|
14611
15837
|
"qwen3-vl-instruct": { providers: [{ provider: "vercel", weight: 100 }] }
|
|
14612
15838
|
};
|
|
14613
15839
|
function getProvidersForModel(modelId) {
|
|
@@ -19681,6 +20907,7 @@ var require_flow_step_types = __commonJS({
|
|
|
19681
20907
|
"fetch-github",
|
|
19682
20908
|
"api-call",
|
|
19683
20909
|
"transform-data",
|
|
20910
|
+
"template",
|
|
19684
20911
|
"conditional",
|
|
19685
20912
|
"set-variable",
|
|
19686
20913
|
"upsert-record",
|
|
@@ -19696,7 +20923,9 @@ var require_flow_step_types = __commonJS({
|
|
|
19696
20923
|
"wait-until",
|
|
19697
20924
|
"paginate-api",
|
|
19698
20925
|
"store-vector",
|
|
19699
|
-
"execute-agent"
|
|
20926
|
+
"execute-agent",
|
|
20927
|
+
"store-asset",
|
|
20928
|
+
"generate-pdf"
|
|
19700
20929
|
];
|
|
19701
20930
|
exports.FLOW_STEP_TYPES = ["prompt", ...exports.CONTEXT_STEP_TYPES];
|
|
19702
20931
|
function isContextStepType(type) {
|
|
@@ -19739,15 +20968,19 @@ var require_fpo_schema = __commonJS({
|
|
|
19739
20968
|
"../shared/dist/product-generation/fpo-schema.js"(exports) {
|
|
19740
20969
|
"use strict";
|
|
19741
20970
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19742
|
-
exports.fullProductObjectSchema = exports.surfaceSchema = exports.deployInstructionsSchema = exports.deployInstructionsSectionSchema = exports.toolSchema = exports.capabilitySchema = exports.agentDefinitionSchema = exports.flowDefinitionSchema = exports.FULL_PRODUCT_OBJECT_VERSION = void 0;
|
|
20971
|
+
exports.fullProductObjectSchema = exports.productSecretSchema = exports.scheduleSchema = exports.recordSchema = exports.surfaceSchema = exports.deployInstructionsSchema = exports.deployInstructionsSectionSchema = exports.toolSchema = exports.capabilitySchema = exports.agentDefinitionSchema = exports.flowDefinitionSchema = exports.FULL_PRODUCT_OBJECT_VERSION = exports.FULL_PRODUCT_OBJECT_VERSION_1_1 = exports.FULL_PRODUCT_OBJECT_VERSION_1_0 = void 0;
|
|
19743
20972
|
var zod_1 = require_zod();
|
|
19744
20973
|
var flow_step_types_1 = require_flow_step_types();
|
|
19745
|
-
exports.
|
|
20974
|
+
exports.FULL_PRODUCT_OBJECT_VERSION_1_0 = "1.0";
|
|
20975
|
+
exports.FULL_PRODUCT_OBJECT_VERSION_1_1 = "1.1";
|
|
20976
|
+
exports.FULL_PRODUCT_OBJECT_VERSION = exports.FULL_PRODUCT_OBJECT_VERSION_1_1;
|
|
19746
20977
|
var createPolicySchema = zod_1.z.enum(["create", "skip", "manual"]).optional();
|
|
19747
20978
|
var flowStepSchema = zod_1.z.object({
|
|
19748
20979
|
type: zod_1.z.string().refine((t) => flow_step_types_1.FLOW_STEP_TYPES.includes(t), { message: "Invalid flow step type" }),
|
|
19749
20980
|
name: zod_1.z.string().min(1, "Step name is required"),
|
|
19750
|
-
config: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).default({})
|
|
20981
|
+
config: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).default({}),
|
|
20982
|
+
order: zod_1.z.number().int().nonnegative().optional(),
|
|
20983
|
+
enabled: zod_1.z.boolean().optional()
|
|
19751
20984
|
});
|
|
19752
20985
|
var transitionSchema = zod_1.z.object({
|
|
19753
20986
|
from: zod_1.z.number().int().nonnegative(),
|
|
@@ -19766,16 +20999,154 @@ var require_fpo_schema = __commonJS({
|
|
|
19766
20999
|
description: zod_1.z.string().optional(),
|
|
19767
21000
|
config: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional()
|
|
19768
21001
|
});
|
|
21002
|
+
var agentSubagentConfigSchema = zod_1.z.object({
|
|
21003
|
+
toolPool: zod_1.z.array(zod_1.z.string()).optional(),
|
|
21004
|
+
defaultMaxTurns: zod_1.z.number().int().positive().optional(),
|
|
21005
|
+
maxSpawnsPerRun: zod_1.z.number().int().positive().optional(),
|
|
21006
|
+
allowNesting: zod_1.z.boolean().optional(),
|
|
21007
|
+
defaultModel: zod_1.z.string().optional(),
|
|
21008
|
+
maxTurnsLimit: zod_1.z.number().int().positive().optional(),
|
|
21009
|
+
defaultTimeoutMs: zod_1.z.number().int().positive().optional()
|
|
21010
|
+
});
|
|
21011
|
+
var capabilityToolRefSchema = zod_1.z.object({
|
|
21012
|
+
capabilityId: zod_1.z.string().min(1),
|
|
21013
|
+
toolName: zod_1.z.string().min(1),
|
|
21014
|
+
description: zod_1.z.string().optional(),
|
|
21015
|
+
parametersSchema: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional()
|
|
21016
|
+
});
|
|
21017
|
+
var agentLoopConfigSchema = zod_1.z.object({
|
|
21018
|
+
maxTurns: zod_1.z.number().int().min(1).max(100).optional(),
|
|
21019
|
+
maxCost: zod_1.z.number().nonnegative().optional(),
|
|
21020
|
+
enableReflection: zod_1.z.boolean().optional(),
|
|
21021
|
+
reflectionInterval: zod_1.z.number().int().min(1).max(50).optional()
|
|
21022
|
+
});
|
|
21023
|
+
var agentReasoningConfigSchema = zod_1.z.object({
|
|
21024
|
+
enabled: zod_1.z.boolean().optional(),
|
|
21025
|
+
reasoningEffort: zod_1.z.enum(["minimal", "low", "medium", "high", "xhigh"]).optional(),
|
|
21026
|
+
reasoningSummary: zod_1.z.enum(["auto", "detailed"]).optional(),
|
|
21027
|
+
budgetTokens: zod_1.z.number().int().min(1e3).max(1e5).optional(),
|
|
21028
|
+
thinkingBudget: zod_1.z.number().int().min(1024).max(65536).optional(),
|
|
21029
|
+
includeThoughts: zod_1.z.boolean().optional()
|
|
21030
|
+
});
|
|
21031
|
+
var agentVoiceConfigSchema = zod_1.z.object({
|
|
21032
|
+
enabled: zod_1.z.boolean().optional(),
|
|
21033
|
+
provider: zod_1.z.string().optional(),
|
|
21034
|
+
interruptionMode: zod_1.z.enum(["none", "cancel", "barge-in"]).optional(),
|
|
21035
|
+
elevenLabs: zod_1.z.object({
|
|
21036
|
+
voiceId: zod_1.z.string().optional(),
|
|
21037
|
+
modelId: zod_1.z.string().optional(),
|
|
21038
|
+
stability: zod_1.z.number().min(0).max(1).optional(),
|
|
21039
|
+
similarity: zod_1.z.number().min(0).max(1).optional()
|
|
21040
|
+
}).optional()
|
|
21041
|
+
});
|
|
21042
|
+
var agentErrorHandlingSchema = zod_1.z.object({
|
|
21043
|
+
onError: zod_1.z.enum(["fail", "continue", "fallback"]).optional(),
|
|
21044
|
+
fallbacks: zod_1.z.array(zod_1.z.object({
|
|
21045
|
+
type: zod_1.z.enum(["retry", "model"]),
|
|
21046
|
+
model: zod_1.z.string().optional(),
|
|
21047
|
+
temperature: zod_1.z.number().min(0).max(2).optional(),
|
|
21048
|
+
maxTokens: zod_1.z.number().int().positive().optional(),
|
|
21049
|
+
delay: zod_1.z.number().min(0).max(6e4).optional()
|
|
21050
|
+
})).optional()
|
|
21051
|
+
});
|
|
21052
|
+
var agentArtifactsConfigSchema = zod_1.z.object({
|
|
21053
|
+
enabled: zod_1.z.literal(true),
|
|
21054
|
+
types: zod_1.z.array(zod_1.z.enum(["markdown", "component"])).min(1)
|
|
21055
|
+
});
|
|
21056
|
+
var agentMcpServerSchema = zod_1.z.object({
|
|
21057
|
+
id: zod_1.z.string().min(1),
|
|
21058
|
+
name: zod_1.z.string().optional(),
|
|
21059
|
+
url: zod_1.z.string().min(1),
|
|
21060
|
+
auth: zod_1.z.object({
|
|
21061
|
+
type: zod_1.z.enum(["api_key", "bearer", "basic", "custom_header", "none"]),
|
|
21062
|
+
headerName: zod_1.z.string().optional(),
|
|
21063
|
+
token: zod_1.z.string().optional(),
|
|
21064
|
+
username: zod_1.z.string().optional(),
|
|
21065
|
+
password: zod_1.z.string().optional()
|
|
21066
|
+
}).optional(),
|
|
21067
|
+
allowedTools: zod_1.z.array(zod_1.z.string()).optional(),
|
|
21068
|
+
timeout: zod_1.z.number().positive().optional(),
|
|
21069
|
+
transport: zod_1.z.enum(["streamable_http", "rest"]).optional(),
|
|
21070
|
+
enabled: zod_1.z.boolean().optional()
|
|
21071
|
+
});
|
|
21072
|
+
var agentToolsConfigSchema = zod_1.z.object({
|
|
21073
|
+
toolIds: zod_1.z.array(zod_1.z.string()).optional(),
|
|
21074
|
+
toolConfigs: zod_1.z.record(zod_1.z.string(), zod_1.z.record(zod_1.z.string(), zod_1.z.any())).optional(),
|
|
21075
|
+
runtimeTools: zod_1.z.array(zod_1.z.object({
|
|
21076
|
+
name: zod_1.z.string().min(1),
|
|
21077
|
+
description: zod_1.z.string().optional(),
|
|
21078
|
+
parametersSchema: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
|
|
21079
|
+
config: zod_1.z.record(zod_1.z.string(), zod_1.z.any())
|
|
21080
|
+
})).optional(),
|
|
21081
|
+
mcpServers: zod_1.z.array(agentMcpServerSchema).optional(),
|
|
21082
|
+
maxToolCalls: zod_1.z.number().int().min(1).max(100).optional(),
|
|
21083
|
+
toolCallStrategy: zod_1.z.enum(["auto", "required", "none"]).optional(),
|
|
21084
|
+
parallelCalls: zod_1.z.boolean().optional(),
|
|
21085
|
+
approval: zod_1.z.object({
|
|
21086
|
+
require: zod_1.z.union([zod_1.z.array(zod_1.z.string()), zod_1.z.boolean()]),
|
|
21087
|
+
timeout: zod_1.z.number().positive().optional()
|
|
21088
|
+
}).optional(),
|
|
21089
|
+
perToolLimits: zod_1.z.record(zod_1.z.string(), zod_1.z.object({
|
|
21090
|
+
maxCalls: zod_1.z.number().int().positive().optional(),
|
|
21091
|
+
required: zod_1.z.boolean().optional()
|
|
21092
|
+
})).optional(),
|
|
21093
|
+
subagentConfig: agentSubagentConfigSchema.optional(),
|
|
21094
|
+
codeModeConfig: zod_1.z.object({
|
|
21095
|
+
toolPool: zod_1.z.array(zod_1.z.string()).optional(),
|
|
21096
|
+
description: zod_1.z.string().optional(),
|
|
21097
|
+
timeoutMs: zod_1.z.number().int().positive().optional()
|
|
21098
|
+
}).optional()
|
|
21099
|
+
});
|
|
21100
|
+
var agentExternalConfigSchema = zod_1.z.object({
|
|
21101
|
+
endpoint: zod_1.z.string().url(),
|
|
21102
|
+
auth: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
|
|
21103
|
+
timeout: zod_1.z.number().positive().optional(),
|
|
21104
|
+
retryCount: zod_1.z.number().int().nonnegative().optional(),
|
|
21105
|
+
skillOrchestration: zod_1.z.boolean().optional()
|
|
21106
|
+
});
|
|
21107
|
+
var agentClaudeManagedConfigSchema = zod_1.z.object({
|
|
21108
|
+
anthropicAgentId: zod_1.z.string().min(1),
|
|
21109
|
+
anthropicAgentVersion: zod_1.z.string().optional(),
|
|
21110
|
+
model: zod_1.z.string().optional(),
|
|
21111
|
+
systemPrompt: zod_1.z.string().optional(),
|
|
21112
|
+
toolPermissions: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
|
|
21113
|
+
anthropicEnvironmentId: zod_1.z.string().optional(),
|
|
21114
|
+
timeoutMs: zod_1.z.number().int().positive().optional()
|
|
21115
|
+
});
|
|
19769
21116
|
exports.agentDefinitionSchema = zod_1.z.object({
|
|
19770
21117
|
name: zod_1.z.string().min(1),
|
|
19771
21118
|
description: zod_1.z.string().min(1),
|
|
19772
21119
|
model: zod_1.z.string().min(1, "Agent model is required"),
|
|
19773
21120
|
systemPrompt: zod_1.z.string().optional(),
|
|
21121
|
+
icon: zod_1.z.string().max(50).optional(),
|
|
21122
|
+
agentType: zod_1.z.enum(["runtype", "external", "claude_managed"]).optional(),
|
|
21123
|
+
status: zod_1.z.enum(["draft", "active", "paused", "archived"]).optional(),
|
|
21124
|
+
loggingPolicy: zod_1.z.enum(["default", "on", "off"]).optional(),
|
|
21125
|
+
// Sampling parameters
|
|
21126
|
+
temperature: zod_1.z.number().min(0).max(2).optional(),
|
|
21127
|
+
topP: zod_1.z.number().min(0).max(1).optional(),
|
|
21128
|
+
topK: zod_1.z.number().int().min(1).max(500).optional(),
|
|
21129
|
+
frequencyPenalty: zod_1.z.number().min(-2).max(2).optional(),
|
|
21130
|
+
presencePenalty: zod_1.z.number().min(-2).max(2).optional(),
|
|
21131
|
+
seed: zod_1.z.number().int().optional(),
|
|
21132
|
+
// Tools — legacy simple array, or the full config object
|
|
19774
21133
|
tools: zod_1.z.array(agentToolSchema).optional(),
|
|
21134
|
+
toolsConfig: agentToolsConfigSchema.optional(),
|
|
21135
|
+
// Advanced config
|
|
21136
|
+
loopConfig: agentLoopConfigSchema.optional(),
|
|
21137
|
+
reasoning: zod_1.z.union([zod_1.z.boolean(), agentReasoningConfigSchema]).optional(),
|
|
21138
|
+
voice: agentVoiceConfigSchema.optional(),
|
|
21139
|
+
errorHandling: agentErrorHandlingSchema.optional(),
|
|
21140
|
+
artifacts: agentArtifactsConfigSchema.optional(),
|
|
19775
21141
|
advisor: zod_1.z.object({
|
|
19776
21142
|
model: zod_1.z.string(),
|
|
19777
21143
|
systemPrompt: zod_1.z.string().optional()
|
|
19778
21144
|
}).optional(),
|
|
21145
|
+
subagentConfig: agentSubagentConfigSchema.optional(),
|
|
21146
|
+
capabilityToolRefs: zod_1.z.array(capabilityToolRefSchema).optional(),
|
|
21147
|
+
// External / managed agent configs
|
|
21148
|
+
externalConfig: agentExternalConfigSchema.optional(),
|
|
21149
|
+
claudeManagedConfig: agentClaudeManagedConfigSchema.optional(),
|
|
19779
21150
|
createPolicy: createPolicySchema
|
|
19780
21151
|
});
|
|
19781
21152
|
exports.capabilitySchema = zod_1.z.object({
|
|
@@ -19866,6 +21237,49 @@ var require_fpo_schema = __commonJS({
|
|
|
19866
21237
|
status: zod_1.z.enum(["draft", "active", "paused"]).optional(),
|
|
19867
21238
|
environment: zod_1.z.enum(["production", "development"]).optional()
|
|
19868
21239
|
});
|
|
21240
|
+
exports.recordSchema = zod_1.z.object({
|
|
21241
|
+
id: zod_1.z.string().min(1),
|
|
21242
|
+
type: zod_1.z.string().min(1),
|
|
21243
|
+
name: zod_1.z.string().optional(),
|
|
21244
|
+
metadata: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
|
|
21245
|
+
metadataSchema: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
|
|
21246
|
+
messages: zod_1.z.array(zod_1.z.object({
|
|
21247
|
+
role: zod_1.z.string().min(1),
|
|
21248
|
+
content: zod_1.z.string()
|
|
21249
|
+
})).optional(),
|
|
21250
|
+
createPolicy: createPolicySchema
|
|
21251
|
+
});
|
|
21252
|
+
exports.scheduleSchema = zod_1.z.object({
|
|
21253
|
+
id: zod_1.z.string().min(1),
|
|
21254
|
+
name: zod_1.z.string().optional(),
|
|
21255
|
+
capabilityId: zod_1.z.string().min(1),
|
|
21256
|
+
triggerType: zod_1.z.enum(["cron", "one_time"]),
|
|
21257
|
+
cron: zod_1.z.string().optional(),
|
|
21258
|
+
timezone: zod_1.z.string().optional(),
|
|
21259
|
+
runAt: zod_1.z.string().datetime({ offset: true }).optional(),
|
|
21260
|
+
recordType: zod_1.z.string().optional(),
|
|
21261
|
+
recordFilter: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
|
|
21262
|
+
messages: zod_1.z.array(zod_1.z.object({
|
|
21263
|
+
role: zod_1.z.string().min(1),
|
|
21264
|
+
content: zod_1.z.string()
|
|
21265
|
+
})).optional(),
|
|
21266
|
+
executionOptions: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
|
|
21267
|
+
enabled: zod_1.z.boolean().optional(),
|
|
21268
|
+
createPolicy: createPolicySchema
|
|
21269
|
+
}).refine((s) => {
|
|
21270
|
+
if (s.triggerType === "cron" && !s.cron)
|
|
21271
|
+
return false;
|
|
21272
|
+
if (s.triggerType === "one_time" && !s.runAt)
|
|
21273
|
+
return false;
|
|
21274
|
+
return true;
|
|
21275
|
+
}, { message: "Cron schedules require `cron` field; one_time schedules require `runAt` field" });
|
|
21276
|
+
exports.productSecretSchema = zod_1.z.object({
|
|
21277
|
+
id: zod_1.z.string().min(1),
|
|
21278
|
+
key: zod_1.z.string().min(1),
|
|
21279
|
+
description: zod_1.z.string().optional(),
|
|
21280
|
+
required: zod_1.z.boolean().optional(),
|
|
21281
|
+
placeholder: zod_1.z.string().optional()
|
|
21282
|
+
});
|
|
19869
21283
|
var metaSchema = zod_1.z.object({
|
|
19870
21284
|
schemaVersion: zod_1.z.string().min(1),
|
|
19871
21285
|
catalogVersion: zod_1.z.string().min(1),
|
|
@@ -19874,9 +21288,7 @@ var require_fpo_schema = __commonJS({
|
|
|
19874
21288
|
planHash: zod_1.z.string().min(1)
|
|
19875
21289
|
});
|
|
19876
21290
|
exports.fullProductObjectSchema = zod_1.z.object({
|
|
19877
|
-
|
|
19878
|
-
// generator metadata like _meta.schemaVersion.
|
|
19879
|
-
version: zod_1.z.literal(exports.FULL_PRODUCT_OBJECT_VERSION),
|
|
21291
|
+
version: zod_1.z.enum([exports.FULL_PRODUCT_OBJECT_VERSION_1_0, exports.FULL_PRODUCT_OBJECT_VERSION_1_1]),
|
|
19880
21292
|
product: zod_1.z.object({
|
|
19881
21293
|
name: zod_1.z.string().min(1),
|
|
19882
21294
|
description: zod_1.z.string().min(1),
|
|
@@ -19886,6 +21298,9 @@ var require_fpo_schema = __commonJS({
|
|
|
19886
21298
|
capabilities: zod_1.z.array(exports.capabilitySchema).max(50),
|
|
19887
21299
|
tools: zod_1.z.array(exports.toolSchema).max(100),
|
|
19888
21300
|
surfaces: zod_1.z.array(exports.surfaceSchema).max(50),
|
|
21301
|
+
records: zod_1.z.array(exports.recordSchema).max(500).optional(),
|
|
21302
|
+
schedules: zod_1.z.array(exports.scheduleSchema).max(50).optional(),
|
|
21303
|
+
secrets: zod_1.z.array(exports.productSecretSchema).max(50).optional(),
|
|
19889
21304
|
_meta: metaSchema
|
|
19890
21305
|
}).superRefine((fpo, ctx) => {
|
|
19891
21306
|
const capIds = /* @__PURE__ */ new Set();
|
|
@@ -19922,6 +21337,45 @@ var require_fpo_schema = __commonJS({
|
|
|
19922
21337
|
}
|
|
19923
21338
|
surfaceIds.add(surface.id);
|
|
19924
21339
|
}
|
|
21340
|
+
if (fpo.records) {
|
|
21341
|
+
const recordIds = /* @__PURE__ */ new Set();
|
|
21342
|
+
for (const [i, record] of fpo.records.entries()) {
|
|
21343
|
+
if (recordIds.has(record.id)) {
|
|
21344
|
+
ctx.addIssue({
|
|
21345
|
+
code: "custom",
|
|
21346
|
+
message: `Duplicate record id: ${record.id}`,
|
|
21347
|
+
path: ["records", i, "id"]
|
|
21348
|
+
});
|
|
21349
|
+
}
|
|
21350
|
+
recordIds.add(record.id);
|
|
21351
|
+
}
|
|
21352
|
+
}
|
|
21353
|
+
if (fpo.schedules) {
|
|
21354
|
+
const scheduleIds = /* @__PURE__ */ new Set();
|
|
21355
|
+
for (const [i, schedule] of fpo.schedules.entries()) {
|
|
21356
|
+
if (scheduleIds.has(schedule.id)) {
|
|
21357
|
+
ctx.addIssue({
|
|
21358
|
+
code: "custom",
|
|
21359
|
+
message: `Duplicate schedule id: ${schedule.id}`,
|
|
21360
|
+
path: ["schedules", i, "id"]
|
|
21361
|
+
});
|
|
21362
|
+
}
|
|
21363
|
+
scheduleIds.add(schedule.id);
|
|
21364
|
+
}
|
|
21365
|
+
}
|
|
21366
|
+
if (fpo.secrets) {
|
|
21367
|
+
const secretIds = /* @__PURE__ */ new Set();
|
|
21368
|
+
for (const [i, secret] of fpo.secrets.entries()) {
|
|
21369
|
+
if (secretIds.has(secret.id)) {
|
|
21370
|
+
ctx.addIssue({
|
|
21371
|
+
code: "custom",
|
|
21372
|
+
message: `Duplicate secret id: ${secret.id}`,
|
|
21373
|
+
path: ["secrets", i, "id"]
|
|
21374
|
+
});
|
|
21375
|
+
}
|
|
21376
|
+
secretIds.add(secret.id);
|
|
21377
|
+
}
|
|
21378
|
+
}
|
|
19925
21379
|
});
|
|
19926
21380
|
}
|
|
19927
21381
|
});
|
|
@@ -20038,6 +21492,16 @@ var require_agent_validator = __commonJS({
|
|
|
20038
21492
|
result.errors.push((0, types_1.createIssue)("error", "AGENT_ADVISOR_NO_MODEL", "Advisor model is required when advisor is configured", `${base}.advisor.model`));
|
|
20039
21493
|
}
|
|
20040
21494
|
}
|
|
21495
|
+
if (agent.capabilityToolRefs) {
|
|
21496
|
+
for (const [i, ref] of agent.capabilityToolRefs.entries()) {
|
|
21497
|
+
if (!ref.toolName || ref.toolName.trim() === "") {
|
|
21498
|
+
result.errors.push((0, types_1.createIssue)("error", "CAPABILITY_TOOL_REF_NAME_EMPTY", "capabilityToolRefs toolName is required", `${base}.capabilityToolRefs[${i}].toolName`));
|
|
21499
|
+
}
|
|
21500
|
+
if (!ref.capabilityId || ref.capabilityId.trim() === "") {
|
|
21501
|
+
result.errors.push((0, types_1.createIssue)("error", "CAPABILITY_TOOL_REF_ID_EMPTY", "capabilityToolRefs capabilityId is required", `${base}.capabilityToolRefs[${i}].capabilityId`));
|
|
21502
|
+
}
|
|
21503
|
+
}
|
|
21504
|
+
}
|
|
20041
21505
|
result.valid = result.errors.length === 0;
|
|
20042
21506
|
return result;
|
|
20043
21507
|
}
|
|
@@ -20233,7 +21697,7 @@ var require_connectivity_validator = __commonJS({
|
|
|
20233
21697
|
exports.validateConnectivity = validateConnectivity;
|
|
20234
21698
|
var types_1 = require_types2();
|
|
20235
21699
|
function validateConnectivity(fpo) {
|
|
20236
|
-
var _a;
|
|
21700
|
+
var _a, _b;
|
|
20237
21701
|
const result = (0, types_1.emptyResult)();
|
|
20238
21702
|
const capabilityIds = new Set(fpo.capabilities.map((c) => c.id));
|
|
20239
21703
|
for (const [si, surface] of fpo.surfaces.entries()) {
|
|
@@ -20258,10 +21722,26 @@ var require_connectivity_validator = __commonJS({
|
|
|
20258
21722
|
result.warnings.push((0, types_1.createIssue)("warning", "UNREACHABLE_CAPABILITY", `Capability "${cap.id}" is not referenced by any surface route`, `capabilities[${i}]`, "Add a surface route or remove the capability"));
|
|
20259
21723
|
}
|
|
20260
21724
|
}
|
|
21725
|
+
const capabilityMap = new Map(fpo.capabilities.map((c) => [c.id, c]));
|
|
21726
|
+
for (const [ci, cap] of fpo.capabilities.entries()) {
|
|
21727
|
+
if (!((_a = cap.agent) === null || _a === void 0 ? void 0 : _a.capabilityToolRefs))
|
|
21728
|
+
continue;
|
|
21729
|
+
for (const [ri, ref] of cap.agent.capabilityToolRefs.entries()) {
|
|
21730
|
+
const target = capabilityMap.get(ref.capabilityId);
|
|
21731
|
+
if (!target) {
|
|
21732
|
+
result.errors.push((0, types_1.createIssue)("error", "CAPABILITY_TOOL_REF_NOT_FOUND", `capabilityToolRefs references non-existent capability "${ref.capabilityId}"`, `capabilities[${ci}].agent.capabilityToolRefs[${ri}].capabilityId`, "Ensure the capabilityId matches an existing capability"));
|
|
21733
|
+
} else if (!target.flow && !target.existingFlowId) {
|
|
21734
|
+
result.errors.push((0, types_1.createIssue)("error", "CAPABILITY_TOOL_REF_NOT_FLOW", `capabilityToolRefs references capability "${ref.capabilityId}" which is not a flow capability`, `capabilities[${ci}].agent.capabilityToolRefs[${ri}].capabilityId`, "capabilityToolRefs can only reference capabilities backed by a flow or existingFlowId"));
|
|
21735
|
+
}
|
|
21736
|
+
if (ref.capabilityId === cap.id) {
|
|
21737
|
+
result.errors.push((0, types_1.createIssue)("error", "CAPABILITY_TOOL_REF_SELF", `capabilityToolRefs cannot reference the capability's own id "${cap.id}"`, `capabilities[${ci}].agent.capabilityToolRefs[${ri}].capabilityId`));
|
|
21738
|
+
}
|
|
21739
|
+
}
|
|
21740
|
+
}
|
|
20261
21741
|
if (fpo.tools.length > 0) {
|
|
20262
21742
|
const referencedToolIds = /* @__PURE__ */ new Set();
|
|
20263
21743
|
for (const cap of fpo.capabilities) {
|
|
20264
|
-
if ((
|
|
21744
|
+
if ((_b = cap.flow) === null || _b === void 0 ? void 0 : _b.steps) {
|
|
20265
21745
|
for (const step of cap.flow.steps) {
|
|
20266
21746
|
const config2 = step.config;
|
|
20267
21747
|
if ((config2 === null || config2 === void 0 ? void 0 : config2.toolId) && typeof config2.toolId === "string") {
|
|
@@ -20316,6 +21796,37 @@ var require_fpo_validator = __commonJS({
|
|
|
20316
21796
|
}
|
|
20317
21797
|
surfaceIds.add(surface.id);
|
|
20318
21798
|
}
|
|
21799
|
+
if (fpo.records) {
|
|
21800
|
+
const recordIds = /* @__PURE__ */ new Set();
|
|
21801
|
+
for (const [i, record] of fpo.records.entries()) {
|
|
21802
|
+
if (recordIds.has(record.id)) {
|
|
21803
|
+
result.errors.push((0, types_1.createIssue)("error", "DUPLICATE_RECORD_ID", `Duplicate record id: "${record.id}"`, `records[${i}].id`));
|
|
21804
|
+
}
|
|
21805
|
+
recordIds.add(record.id);
|
|
21806
|
+
}
|
|
21807
|
+
}
|
|
21808
|
+
const capIdSet = new Set(fpo.capabilities.map((c) => c.id));
|
|
21809
|
+
if (fpo.schedules) {
|
|
21810
|
+
const scheduleIds = /* @__PURE__ */ new Set();
|
|
21811
|
+
for (const [i, schedule] of fpo.schedules.entries()) {
|
|
21812
|
+
if (scheduleIds.has(schedule.id)) {
|
|
21813
|
+
result.errors.push((0, types_1.createIssue)("error", "DUPLICATE_SCHEDULE_ID", `Duplicate schedule id: "${schedule.id}"`, `schedules[${i}].id`));
|
|
21814
|
+
}
|
|
21815
|
+
scheduleIds.add(schedule.id);
|
|
21816
|
+
if (!capIdSet.has(schedule.capabilityId)) {
|
|
21817
|
+
result.errors.push((0, types_1.createIssue)("error", "SCHEDULE_CAPABILITY_NOT_FOUND", `Schedule "${schedule.id}" references capability "${schedule.capabilityId}" which does not exist`, `schedules[${i}].capabilityId`));
|
|
21818
|
+
}
|
|
21819
|
+
}
|
|
21820
|
+
}
|
|
21821
|
+
if (fpo.secrets) {
|
|
21822
|
+
const secretIds = /* @__PURE__ */ new Set();
|
|
21823
|
+
for (const [i, secret] of fpo.secrets.entries()) {
|
|
21824
|
+
if (secretIds.has(secret.id)) {
|
|
21825
|
+
result.errors.push((0, types_1.createIssue)("error", "DUPLICATE_SECRET_ID", `Duplicate secret id: "${secret.id}"`, `secrets[${i}].id`));
|
|
21826
|
+
}
|
|
21827
|
+
secretIds.add(secret.id);
|
|
21828
|
+
}
|
|
21829
|
+
}
|
|
20319
21830
|
const toolIds = new Set(fpo.tools.map((t) => t.id));
|
|
20320
21831
|
const capResults = fpo.capabilities.map((cap, i) => (0, capability_validator_1.validateCapability)(cap, i, { toolIds }));
|
|
20321
21832
|
const toolResults = fpo.tools.map((tool, i) => (0, tool_validator_1.validateToolDefinition)(tool, i));
|
|
@@ -20331,15 +21842,19 @@ var require_fpo_template = __commonJS({
|
|
|
20331
21842
|
"../shared/dist/product-generation/fpo-template.js"(exports) {
|
|
20332
21843
|
"use strict";
|
|
20333
21844
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20334
|
-
exports.fullProductObjectTemplateSchema = exports.fpoTemplateVariableSchema = exports.fpoTemplateVariableInputTypeSchema = exports.FULL_PRODUCT_OBJECT_TEMPLATE_VERSION = void 0;
|
|
21845
|
+
exports.fullProductObjectTemplateSchema = exports.fpoTemplateVariableSchema = exports.fpoTemplateVariableInputTypeSchema = exports.FULL_PRODUCT_OBJECT_TEMPLATE_VERSION_1_1 = exports.FULL_PRODUCT_OBJECT_TEMPLATE_VERSION = void 0;
|
|
21846
|
+
exports.stripFlowVariablePrefix = stripFlowVariablePrefix;
|
|
20335
21847
|
exports.coerceFPOTemplateVariableValue = coerceFPOTemplateVariableValue;
|
|
20336
21848
|
exports.resolveFPOTemplate = resolveFPOTemplate;
|
|
20337
21849
|
exports.validateFPOTemplate = validateFPOTemplate2;
|
|
21850
|
+
exports.migrateFPOv1ToV1_1 = migrateFPOv1ToV1_1;
|
|
21851
|
+
exports.migrateFPOTemplatev1ToV1_1 = migrateFPOTemplatev1ToV1_1;
|
|
20338
21852
|
var zod_1 = require_zod();
|
|
20339
21853
|
var fpo_schema_1 = require_fpo_schema();
|
|
20340
21854
|
var types_1 = require_types2();
|
|
20341
21855
|
var fpo_validator_1 = require_fpo_validator();
|
|
20342
21856
|
exports.FULL_PRODUCT_OBJECT_TEMPLATE_VERSION = "1.0";
|
|
21857
|
+
exports.FULL_PRODUCT_OBJECT_TEMPLATE_VERSION_1_1 = "1.1";
|
|
20343
21858
|
exports.fpoTemplateVariableInputTypeSchema = zod_1.z.enum([
|
|
20344
21859
|
"text",
|
|
20345
21860
|
"textarea",
|
|
@@ -20386,7 +21901,7 @@ var require_fpo_template = __commonJS({
|
|
|
20386
21901
|
}
|
|
20387
21902
|
});
|
|
20388
21903
|
exports.fullProductObjectTemplateSchema = zod_1.z.object({
|
|
20389
|
-
version: zod_1.z.
|
|
21904
|
+
version: zod_1.z.enum([exports.FULL_PRODUCT_OBJECT_TEMPLATE_VERSION, exports.FULL_PRODUCT_OBJECT_TEMPLATE_VERSION_1_1]),
|
|
20390
21905
|
productObject: fpo_schema_1.fullProductObjectSchema,
|
|
20391
21906
|
template: zod_1.z.object({
|
|
20392
21907
|
variables: zod_1.z.array(exports.fpoTemplateVariableSchema).max(50)
|
|
@@ -20405,6 +21920,45 @@ var require_fpo_template = __commonJS({
|
|
|
20405
21920
|
});
|
|
20406
21921
|
}
|
|
20407
21922
|
});
|
|
21923
|
+
var FLOW_PREFIX = "flow:";
|
|
21924
|
+
var SECRET_PREFIX = "secret:";
|
|
21925
|
+
function replaceTemplateTokens(value, replaceToken) {
|
|
21926
|
+
let cursor = 0;
|
|
21927
|
+
let result = "";
|
|
21928
|
+
while (cursor < value.length) {
|
|
21929
|
+
const start = value.indexOf("{{", cursor);
|
|
21930
|
+
if (start === -1) {
|
|
21931
|
+
result += value.slice(cursor);
|
|
21932
|
+
break;
|
|
21933
|
+
}
|
|
21934
|
+
const end = value.indexOf("}}", start + 2);
|
|
21935
|
+
if (end === -1) {
|
|
21936
|
+
result += value.slice(cursor);
|
|
21937
|
+
break;
|
|
21938
|
+
}
|
|
21939
|
+
result += value.slice(cursor, start);
|
|
21940
|
+
const raw = value.slice(start, end + 2);
|
|
21941
|
+
const inner = value.slice(start + 2, end);
|
|
21942
|
+
result += replaceToken(inner, raw);
|
|
21943
|
+
cursor = end + 2;
|
|
21944
|
+
}
|
|
21945
|
+
return result;
|
|
21946
|
+
}
|
|
21947
|
+
function stripFlowVariablePrefix(value) {
|
|
21948
|
+
if (typeof value === "string") {
|
|
21949
|
+
return replaceTemplateTokens(value, (inner, raw) => {
|
|
21950
|
+
const trimmed = inner.trim();
|
|
21951
|
+
return trimmed.startsWith(FLOW_PREFIX) && trimmed.length > FLOW_PREFIX.length ? `{{${trimmed.slice(FLOW_PREFIX.length)}}}` : raw;
|
|
21952
|
+
});
|
|
21953
|
+
}
|
|
21954
|
+
if (Array.isArray(value)) {
|
|
21955
|
+
return value.map(stripFlowVariablePrefix);
|
|
21956
|
+
}
|
|
21957
|
+
if (value && typeof value === "object") {
|
|
21958
|
+
return Object.fromEntries(Object.entries(value).map(([key, nested]) => [key, stripFlowVariablePrefix(nested)]));
|
|
21959
|
+
}
|
|
21960
|
+
return value;
|
|
21961
|
+
}
|
|
20408
21962
|
function collectStringLeafPaths(value, path14 = []) {
|
|
20409
21963
|
if (typeof value === "string") {
|
|
20410
21964
|
return [{ path: path14, value }];
|
|
@@ -20433,7 +21987,7 @@ var require_fpo_template = __commonJS({
|
|
|
20433
21987
|
const inner = value.slice(start + 2, end);
|
|
20434
21988
|
const separatorIndex = inner.indexOf("|");
|
|
20435
21989
|
const key = (separatorIndex === -1 ? inner : inner.slice(0, separatorIndex)).trim();
|
|
20436
|
-
if (key.length > 0 && !key.startsWith(
|
|
21990
|
+
if (key.length > 0 && !key.startsWith(SECRET_PREFIX) && !key.startsWith(FLOW_PREFIX)) {
|
|
20437
21991
|
references.push({
|
|
20438
21992
|
key,
|
|
20439
21993
|
defaultValue: separatorIndex === -1 ? void 0 : inner.slice(separatorIndex + 1).trim(),
|
|
@@ -20635,6 +22189,122 @@ var require_fpo_template = __commonJS({
|
|
|
20635
22189
|
defaultsValidation
|
|
20636
22190
|
};
|
|
20637
22191
|
}
|
|
22192
|
+
function addFlowPrefixToString(value, skipKeys) {
|
|
22193
|
+
return replaceTemplateTokens(value, (inner, raw) => {
|
|
22194
|
+
if (inner.includes("|"))
|
|
22195
|
+
return raw;
|
|
22196
|
+
const key = inner.trim();
|
|
22197
|
+
if (key.length === 0 || key.startsWith(SECRET_PREFIX) || key.startsWith(FLOW_PREFIX) || (skipKeys === null || skipKeys === void 0 ? void 0 : skipKeys.has(key))) {
|
|
22198
|
+
return raw;
|
|
22199
|
+
}
|
|
22200
|
+
return `{{${FLOW_PREFIX}${key}}}`;
|
|
22201
|
+
});
|
|
22202
|
+
}
|
|
22203
|
+
function addFlowPrefixToValue(value, skipKeys) {
|
|
22204
|
+
if (typeof value === "string")
|
|
22205
|
+
return addFlowPrefixToString(value, skipKeys);
|
|
22206
|
+
if (Array.isArray(value))
|
|
22207
|
+
return value.map((item) => addFlowPrefixToValue(item, skipKeys));
|
|
22208
|
+
if (value && typeof value === "object") {
|
|
22209
|
+
return Object.fromEntries(Object.entries(value).map(([k, v]) => [k, addFlowPrefixToValue(v, skipKeys)]));
|
|
22210
|
+
}
|
|
22211
|
+
return value;
|
|
22212
|
+
}
|
|
22213
|
+
function migrateFPOv1ToV1_1(fpo) {
|
|
22214
|
+
var _a, _b, _c, _d;
|
|
22215
|
+
if (fpo.version === fpo_schema_1.FULL_PRODUCT_OBJECT_VERSION_1_1) {
|
|
22216
|
+
return { migrated: fpo, changes: [] };
|
|
22217
|
+
}
|
|
22218
|
+
const changes = [];
|
|
22219
|
+
const migrated = structuredClone(fpo);
|
|
22220
|
+
migrated.version = fpo_schema_1.FULL_PRODUCT_OBJECT_VERSION_1_1;
|
|
22221
|
+
for (const [ci, cap] of migrated.capabilities.entries()) {
|
|
22222
|
+
if (cap.flow) {
|
|
22223
|
+
for (const [si, step] of cap.flow.steps.entries()) {
|
|
22224
|
+
const before = JSON.stringify(step.config);
|
|
22225
|
+
step.config = addFlowPrefixToValue(step.config);
|
|
22226
|
+
if (JSON.stringify(step.config) !== before) {
|
|
22227
|
+
changes.push(`capabilities[${ci}].flow.steps[${si}].config: added flow: prefix to runtime variables`);
|
|
22228
|
+
}
|
|
22229
|
+
}
|
|
22230
|
+
}
|
|
22231
|
+
if ((_a = cap.agent) === null || _a === void 0 ? void 0 : _a.systemPrompt) {
|
|
22232
|
+
const before = cap.agent.systemPrompt;
|
|
22233
|
+
cap.agent.systemPrompt = addFlowPrefixToString(cap.agent.systemPrompt);
|
|
22234
|
+
if (cap.agent.systemPrompt !== before) {
|
|
22235
|
+
changes.push(`capabilities[${ci}].agent.systemPrompt: added flow: prefix to runtime variables`);
|
|
22236
|
+
}
|
|
22237
|
+
}
|
|
22238
|
+
if ((_b = cap.agent) === null || _b === void 0 ? void 0 : _b.tools) {
|
|
22239
|
+
for (const [ti, tool] of cap.agent.tools.entries()) {
|
|
22240
|
+
if (tool.config) {
|
|
22241
|
+
const before = JSON.stringify(tool.config);
|
|
22242
|
+
tool.config = addFlowPrefixToValue(tool.config);
|
|
22243
|
+
if (JSON.stringify(tool.config) !== before) {
|
|
22244
|
+
changes.push(`capabilities[${ci}].agent.tools[${ti}].config: added flow: prefix to runtime variables`);
|
|
22245
|
+
}
|
|
22246
|
+
}
|
|
22247
|
+
}
|
|
22248
|
+
}
|
|
22249
|
+
if ((_d = (_c = cap.agent) === null || _c === void 0 ? void 0 : _c.advisor) === null || _d === void 0 ? void 0 : _d.systemPrompt) {
|
|
22250
|
+
const before = cap.agent.advisor.systemPrompt;
|
|
22251
|
+
cap.agent.advisor.systemPrompt = addFlowPrefixToString(cap.agent.advisor.systemPrompt);
|
|
22252
|
+
if (cap.agent.advisor.systemPrompt !== before) {
|
|
22253
|
+
changes.push(`capabilities[${ci}].agent.advisor.systemPrompt: added flow: prefix to runtime variables`);
|
|
22254
|
+
}
|
|
22255
|
+
}
|
|
22256
|
+
}
|
|
22257
|
+
return { migrated, changes };
|
|
22258
|
+
}
|
|
22259
|
+
function migrateFPOTemplatev1ToV1_1(template) {
|
|
22260
|
+
var _a, _b, _c, _d;
|
|
22261
|
+
if (template.version === exports.FULL_PRODUCT_OBJECT_TEMPLATE_VERSION_1_1) {
|
|
22262
|
+
return { migrated: template, changes: [] };
|
|
22263
|
+
}
|
|
22264
|
+
const declaredKeys = new Set(template.template.variables.map((v) => v.key));
|
|
22265
|
+
const changes = [];
|
|
22266
|
+
const migrated = structuredClone(template);
|
|
22267
|
+
migrated.version = exports.FULL_PRODUCT_OBJECT_TEMPLATE_VERSION_1_1;
|
|
22268
|
+
const fpo = migrated.productObject;
|
|
22269
|
+
fpo.version = fpo_schema_1.FULL_PRODUCT_OBJECT_VERSION_1_1;
|
|
22270
|
+
for (const [ci, cap] of fpo.capabilities.entries()) {
|
|
22271
|
+
if (cap.flow) {
|
|
22272
|
+
for (const [si, step] of cap.flow.steps.entries()) {
|
|
22273
|
+
const before = JSON.stringify(step.config);
|
|
22274
|
+
step.config = addFlowPrefixToValue(step.config, declaredKeys);
|
|
22275
|
+
if (JSON.stringify(step.config) !== before) {
|
|
22276
|
+
changes.push(`productObject.capabilities[${ci}].flow.steps[${si}].config: added flow: prefix to runtime variables`);
|
|
22277
|
+
}
|
|
22278
|
+
}
|
|
22279
|
+
}
|
|
22280
|
+
if ((_a = cap.agent) === null || _a === void 0 ? void 0 : _a.systemPrompt) {
|
|
22281
|
+
const before = cap.agent.systemPrompt;
|
|
22282
|
+
cap.agent.systemPrompt = addFlowPrefixToString(cap.agent.systemPrompt, declaredKeys);
|
|
22283
|
+
if (cap.agent.systemPrompt !== before) {
|
|
22284
|
+
changes.push(`productObject.capabilities[${ci}].agent.systemPrompt: added flow: prefix to runtime variables`);
|
|
22285
|
+
}
|
|
22286
|
+
}
|
|
22287
|
+
if ((_b = cap.agent) === null || _b === void 0 ? void 0 : _b.tools) {
|
|
22288
|
+
for (const [ti, tool] of cap.agent.tools.entries()) {
|
|
22289
|
+
if (tool.config) {
|
|
22290
|
+
const before = JSON.stringify(tool.config);
|
|
22291
|
+
tool.config = addFlowPrefixToValue(tool.config, declaredKeys);
|
|
22292
|
+
if (JSON.stringify(tool.config) !== before) {
|
|
22293
|
+
changes.push(`productObject.capabilities[${ci}].agent.tools[${ti}].config: added flow: prefix to runtime variables`);
|
|
22294
|
+
}
|
|
22295
|
+
}
|
|
22296
|
+
}
|
|
22297
|
+
}
|
|
22298
|
+
if ((_d = (_c = cap.agent) === null || _c === void 0 ? void 0 : _c.advisor) === null || _d === void 0 ? void 0 : _d.systemPrompt) {
|
|
22299
|
+
const before = cap.agent.advisor.systemPrompt;
|
|
22300
|
+
cap.agent.advisor.systemPrompt = addFlowPrefixToString(cap.agent.advisor.systemPrompt, declaredKeys);
|
|
22301
|
+
if (cap.agent.advisor.systemPrompt !== before) {
|
|
22302
|
+
changes.push(`productObject.capabilities[${ci}].agent.advisor.systemPrompt: added flow: prefix to runtime variables`);
|
|
22303
|
+
}
|
|
22304
|
+
}
|
|
22305
|
+
}
|
|
22306
|
+
return { migrated, changes };
|
|
22307
|
+
}
|
|
20638
22308
|
}
|
|
20639
22309
|
});
|
|
20640
22310
|
|