@runtypelabs/cli 2.11.2 → 2.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1037 -17
- 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,220 @@ 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"
|
|
11089
11107
|
};
|
|
11090
11108
|
exports.BuiltInToolIdPrefix = {
|
|
11091
11109
|
BUILTIN: "builtin",
|
|
11092
11110
|
PLATFORM: "platform"
|
|
11093
11111
|
};
|
|
11112
|
+
exports.BuiltInToolGroup = {
|
|
11113
|
+
BROWSER_FETCH: "browser_fetch",
|
|
11114
|
+
BROWSER_USE: "browser_use",
|
|
11115
|
+
FILE_OUTPUTS: "file_outputs",
|
|
11116
|
+
VOICE: "voice",
|
|
11117
|
+
RECORD_MANAGEMENT: "record_management",
|
|
11118
|
+
UCP_COMMERCE: "ucp_commerce"
|
|
11119
|
+
};
|
|
11120
|
+
var BROWSER_RUN_DOCUMENTATION_URL = "https://developers.cloudflare.com/browser-run/quick-actions/";
|
|
11121
|
+
var BROWSER_SESSION_DOCUMENTATION_URL = "https://developers.cloudflare.com/browser-run/cdp/";
|
|
11122
|
+
var BROWSER_RUN_RESOURCE_TYPES = [
|
|
11123
|
+
"document",
|
|
11124
|
+
"stylesheet",
|
|
11125
|
+
"image",
|
|
11126
|
+
"media",
|
|
11127
|
+
"font",
|
|
11128
|
+
"script",
|
|
11129
|
+
"texttrack",
|
|
11130
|
+
"xhr",
|
|
11131
|
+
"fetch",
|
|
11132
|
+
"prefetch",
|
|
11133
|
+
"eventsource",
|
|
11134
|
+
"websocket",
|
|
11135
|
+
"manifest",
|
|
11136
|
+
"signedexchange",
|
|
11137
|
+
"ping",
|
|
11138
|
+
"cspviolationreport",
|
|
11139
|
+
"preflight",
|
|
11140
|
+
"other"
|
|
11141
|
+
];
|
|
11142
|
+
var browserRunViewportSchema = {
|
|
11143
|
+
type: "object",
|
|
11144
|
+
description: "Browser viewport options. Defaults to Cloudflare Browser Run defaults when omitted.",
|
|
11145
|
+
properties: {
|
|
11146
|
+
width: {
|
|
11147
|
+
type: "number",
|
|
11148
|
+
description: "Viewport width in pixels",
|
|
11149
|
+
minimum: 1
|
|
11150
|
+
},
|
|
11151
|
+
height: {
|
|
11152
|
+
type: "number",
|
|
11153
|
+
description: "Viewport height in pixels",
|
|
11154
|
+
minimum: 1
|
|
11155
|
+
},
|
|
11156
|
+
deviceScaleFactor: {
|
|
11157
|
+
type: "number",
|
|
11158
|
+
description: "Device scale factor for higher-density screenshots",
|
|
11159
|
+
minimum: 0
|
|
11160
|
+
},
|
|
11161
|
+
isMobile: {
|
|
11162
|
+
type: "boolean",
|
|
11163
|
+
description: "Whether the viewport should emulate a mobile device"
|
|
11164
|
+
},
|
|
11165
|
+
isLandscape: {
|
|
11166
|
+
type: "boolean",
|
|
11167
|
+
description: "Whether the viewport should emulate landscape orientation"
|
|
11168
|
+
},
|
|
11169
|
+
hasTouch: {
|
|
11170
|
+
type: "boolean",
|
|
11171
|
+
description: "Whether the viewport should emulate touch support"
|
|
11172
|
+
}
|
|
11173
|
+
}
|
|
11174
|
+
};
|
|
11175
|
+
var browserRunGotoOptionsSchema = {
|
|
11176
|
+
type: "object",
|
|
11177
|
+
description: "Page navigation options forwarded to Cloudflare Browser Run",
|
|
11178
|
+
properties: {
|
|
11179
|
+
waitUntil: {
|
|
11180
|
+
type: "string",
|
|
11181
|
+
description: "Navigation lifecycle event to wait for",
|
|
11182
|
+
enum: ["load", "domcontentloaded", "networkidle0", "networkidle2"]
|
|
11183
|
+
},
|
|
11184
|
+
timeout: {
|
|
11185
|
+
type: "number",
|
|
11186
|
+
description: "Navigation timeout in milliseconds",
|
|
11187
|
+
minimum: 0,
|
|
11188
|
+
maximum: 6e4
|
|
11189
|
+
},
|
|
11190
|
+
referer: {
|
|
11191
|
+
type: "string",
|
|
11192
|
+
description: "Optional referer URL"
|
|
11193
|
+
},
|
|
11194
|
+
referrerPolicy: {
|
|
11195
|
+
type: "string",
|
|
11196
|
+
description: "Optional browser referrer policy"
|
|
11197
|
+
}
|
|
11198
|
+
}
|
|
11199
|
+
};
|
|
11200
|
+
var browserRunWaitForSelectorSchema = {
|
|
11201
|
+
type: "object",
|
|
11202
|
+
description: "Wait for a CSS selector before extracting the page",
|
|
11203
|
+
properties: {
|
|
11204
|
+
selector: {
|
|
11205
|
+
type: "string",
|
|
11206
|
+
description: "CSS selector to wait for",
|
|
11207
|
+
minLength: 1
|
|
11208
|
+
},
|
|
11209
|
+
visible: {
|
|
11210
|
+
type: "boolean",
|
|
11211
|
+
description: "Wait until the selector is visible"
|
|
11212
|
+
},
|
|
11213
|
+
hidden: {
|
|
11214
|
+
type: "boolean",
|
|
11215
|
+
description: "Wait until the selector is hidden"
|
|
11216
|
+
},
|
|
11217
|
+
timeout: {
|
|
11218
|
+
type: "number",
|
|
11219
|
+
description: "Selector wait timeout in milliseconds",
|
|
11220
|
+
minimum: 0,
|
|
11221
|
+
maximum: 6e4
|
|
11222
|
+
}
|
|
11223
|
+
},
|
|
11224
|
+
required: ["selector"]
|
|
11225
|
+
};
|
|
11226
|
+
var browserRunCommonProperties = {
|
|
11227
|
+
url: {
|
|
11228
|
+
type: "string",
|
|
11229
|
+
description: 'The full URL to render (e.g. "https://example.com/page")',
|
|
11230
|
+
minLength: 1
|
|
11231
|
+
},
|
|
11232
|
+
viewport: browserRunViewportSchema,
|
|
11233
|
+
gotoOptions: browserRunGotoOptionsSchema,
|
|
11234
|
+
waitForSelector: browserRunWaitForSelectorSchema,
|
|
11235
|
+
waitForTimeout: {
|
|
11236
|
+
type: "number",
|
|
11237
|
+
description: "Milliseconds to wait before extracting after page navigation",
|
|
11238
|
+
minimum: 0,
|
|
11239
|
+
maximum: 6e4
|
|
11240
|
+
},
|
|
11241
|
+
rejectResourceTypes: {
|
|
11242
|
+
type: "array",
|
|
11243
|
+
description: "Resource types to block while loading the page",
|
|
11244
|
+
items: {
|
|
11245
|
+
type: "string",
|
|
11246
|
+
enum: [...BROWSER_RUN_RESOURCE_TYPES]
|
|
11247
|
+
}
|
|
11248
|
+
},
|
|
11249
|
+
rejectRequestPattern: {
|
|
11250
|
+
type: "array",
|
|
11251
|
+
description: "Regular expression patterns for requests to block while loading the page",
|
|
11252
|
+
items: { type: "string" }
|
|
11253
|
+
},
|
|
11254
|
+
userAgent: {
|
|
11255
|
+
type: "string",
|
|
11256
|
+
description: "Custom browser user agent string"
|
|
11257
|
+
},
|
|
11258
|
+
cacheTTL: {
|
|
11259
|
+
type: "number",
|
|
11260
|
+
description: "Cloudflare Browser Run cache TTL in seconds. Set to 0 to disable cache.",
|
|
11261
|
+
minimum: 0,
|
|
11262
|
+
maximum: 86400
|
|
11263
|
+
}
|
|
11264
|
+
};
|
|
11265
|
+
var browserRunScreenshotOptionsSchema = {
|
|
11266
|
+
type: "object",
|
|
11267
|
+
description: "Screenshot capture options forwarded to Cloudflare Browser Run",
|
|
11268
|
+
properties: {
|
|
11269
|
+
fullPage: {
|
|
11270
|
+
type: "boolean",
|
|
11271
|
+
description: "Capture the full page instead of only the viewport"
|
|
11272
|
+
},
|
|
11273
|
+
type: {
|
|
11274
|
+
type: "string",
|
|
11275
|
+
description: "Screenshot image format",
|
|
11276
|
+
enum: ["png", "jpeg", "webp"],
|
|
11277
|
+
default: "png"
|
|
11278
|
+
},
|
|
11279
|
+
quality: {
|
|
11280
|
+
type: "number",
|
|
11281
|
+
description: "Image quality for jpeg or webp screenshots",
|
|
11282
|
+
minimum: 0,
|
|
11283
|
+
maximum: 100
|
|
11284
|
+
},
|
|
11285
|
+
omitBackground: {
|
|
11286
|
+
type: "boolean",
|
|
11287
|
+
description: "Hide the default white background to allow transparency"
|
|
11288
|
+
},
|
|
11289
|
+
captureBeyondViewport: {
|
|
11290
|
+
type: "boolean",
|
|
11291
|
+
description: "Capture beyond the viewport when clipping"
|
|
11292
|
+
},
|
|
11293
|
+
clip: {
|
|
11294
|
+
type: "object",
|
|
11295
|
+
description: "Optional screenshot clipping rectangle",
|
|
11296
|
+
properties: {
|
|
11297
|
+
x: { type: "number", description: "Clip x coordinate" },
|
|
11298
|
+
y: { type: "number", description: "Clip y coordinate" },
|
|
11299
|
+
width: {
|
|
11300
|
+
type: "number",
|
|
11301
|
+
description: "Clip width in pixels",
|
|
11302
|
+
minimum: 1
|
|
11303
|
+
},
|
|
11304
|
+
height: {
|
|
11305
|
+
type: "number",
|
|
11306
|
+
description: "Clip height in pixels",
|
|
11307
|
+
minimum: 1
|
|
11308
|
+
},
|
|
11309
|
+
scale: {
|
|
11310
|
+
type: "number",
|
|
11311
|
+
description: "Clip scale",
|
|
11312
|
+
minimum: 0
|
|
11313
|
+
}
|
|
11314
|
+
},
|
|
11315
|
+
required: ["x", "y", "width", "height"]
|
|
11316
|
+
}
|
|
11317
|
+
}
|
|
11318
|
+
};
|
|
11094
11319
|
var CORE_BUILTIN_TOOLS_REGISTRY = [
|
|
11095
11320
|
// OpenAI DALL-E Image Generation
|
|
11096
11321
|
{
|
|
@@ -11594,6 +11819,544 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
11594
11819
|
requiresApiKey: true,
|
|
11595
11820
|
executionHint: "platform"
|
|
11596
11821
|
},
|
|
11822
|
+
// Cloudflare Browser Run Quick Action: Screenshot
|
|
11823
|
+
{
|
|
11824
|
+
id: "browser:screenshot",
|
|
11825
|
+
aliases: ["browser-screenshot"],
|
|
11826
|
+
name: "Browser Screenshot",
|
|
11827
|
+
description: "Capture a screenshot of a rendered web page using Cloudflare Browser Run. Returns a base64-encoded image.",
|
|
11828
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
11829
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_FETCH,
|
|
11830
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
11831
|
+
parametersSchema: {
|
|
11832
|
+
type: "object",
|
|
11833
|
+
properties: {
|
|
11834
|
+
...browserRunCommonProperties,
|
|
11835
|
+
screenshotOptions: browserRunScreenshotOptionsSchema
|
|
11836
|
+
},
|
|
11837
|
+
required: ["url"]
|
|
11838
|
+
},
|
|
11839
|
+
defaultConfig: {
|
|
11840
|
+
screenshotOptions: {
|
|
11841
|
+
type: "png",
|
|
11842
|
+
fullPage: false
|
|
11843
|
+
}
|
|
11844
|
+
},
|
|
11845
|
+
documentationUrl: BROWSER_RUN_DOCUMENTATION_URL,
|
|
11846
|
+
requiresApiKey: false,
|
|
11847
|
+
executionHint: "platform",
|
|
11848
|
+
platformKeySupport: true
|
|
11849
|
+
},
|
|
11850
|
+
// Cloudflare Browser Run Quick Action: Content
|
|
11851
|
+
{
|
|
11852
|
+
id: "browser:content",
|
|
11853
|
+
aliases: ["browser-content"],
|
|
11854
|
+
name: "Browser Content",
|
|
11855
|
+
description: "Fetch the fully rendered HTML of a web page after JavaScript execution using Cloudflare Browser Run.",
|
|
11856
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
11857
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_FETCH,
|
|
11858
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
11859
|
+
parametersSchema: {
|
|
11860
|
+
type: "object",
|
|
11861
|
+
properties: browserRunCommonProperties,
|
|
11862
|
+
required: ["url"]
|
|
11863
|
+
},
|
|
11864
|
+
documentationUrl: BROWSER_RUN_DOCUMENTATION_URL,
|
|
11865
|
+
requiresApiKey: false,
|
|
11866
|
+
executionHint: "platform",
|
|
11867
|
+
platformKeySupport: true
|
|
11868
|
+
},
|
|
11869
|
+
// Cloudflare Browser Run Quick Action: Scrape
|
|
11870
|
+
{
|
|
11871
|
+
id: "browser:scrape",
|
|
11872
|
+
aliases: ["browser-scrape"],
|
|
11873
|
+
name: "Browser Scrape",
|
|
11874
|
+
description: "Extract structured data from specific CSS selectors on a rendered web page using Cloudflare Browser Run.",
|
|
11875
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
11876
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_FETCH,
|
|
11877
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
11878
|
+
parametersSchema: {
|
|
11879
|
+
type: "object",
|
|
11880
|
+
properties: {
|
|
11881
|
+
...browserRunCommonProperties,
|
|
11882
|
+
elements: {
|
|
11883
|
+
type: "array",
|
|
11884
|
+
description: "Elements to scrape from the rendered page",
|
|
11885
|
+
minItems: 1,
|
|
11886
|
+
items: {
|
|
11887
|
+
type: "object",
|
|
11888
|
+
properties: {
|
|
11889
|
+
selector: {
|
|
11890
|
+
type: "string",
|
|
11891
|
+
description: "CSS selector to extract",
|
|
11892
|
+
minLength: 1
|
|
11893
|
+
}
|
|
11894
|
+
},
|
|
11895
|
+
required: ["selector"]
|
|
11896
|
+
}
|
|
11897
|
+
}
|
|
11898
|
+
},
|
|
11899
|
+
required: ["url", "elements"]
|
|
11900
|
+
},
|
|
11901
|
+
documentationUrl: BROWSER_RUN_DOCUMENTATION_URL,
|
|
11902
|
+
requiresApiKey: false,
|
|
11903
|
+
executionHint: "platform",
|
|
11904
|
+
platformKeySupport: true
|
|
11905
|
+
},
|
|
11906
|
+
// Cloudflare Browser Run Quick Action: JSON
|
|
11907
|
+
{
|
|
11908
|
+
id: "browser:json",
|
|
11909
|
+
aliases: ["browser-json"],
|
|
11910
|
+
name: "Browser JSON",
|
|
11911
|
+
description: "Extract structured JSON from a rendered web page using Cloudflare Browser Run and Workers AI. Provide a prompt, a JSON schema, or both.",
|
|
11912
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
11913
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_FETCH,
|
|
11914
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
11915
|
+
parametersSchema: {
|
|
11916
|
+
type: "object",
|
|
11917
|
+
properties: {
|
|
11918
|
+
...browserRunCommonProperties,
|
|
11919
|
+
prompt: {
|
|
11920
|
+
type: "string",
|
|
11921
|
+
description: "Natural-language extraction instructions",
|
|
11922
|
+
minLength: 1
|
|
11923
|
+
},
|
|
11924
|
+
schema: {
|
|
11925
|
+
type: "object",
|
|
11926
|
+
description: "JSON Schema describing the desired extracted result"
|
|
11927
|
+
}
|
|
11928
|
+
},
|
|
11929
|
+
required: ["url"]
|
|
11930
|
+
},
|
|
11931
|
+
documentationUrl: BROWSER_RUN_DOCUMENTATION_URL,
|
|
11932
|
+
requiresApiKey: false,
|
|
11933
|
+
executionHint: "platform",
|
|
11934
|
+
platformKeySupport: true
|
|
11935
|
+
},
|
|
11936
|
+
// Cloudflare Browser Run Quick Action: Markdown
|
|
11937
|
+
{
|
|
11938
|
+
id: "browser:markdown",
|
|
11939
|
+
aliases: ["browser-markdown"],
|
|
11940
|
+
name: "Browser Markdown",
|
|
11941
|
+
description: "Convert a rendered web page into clean Markdown using Cloudflare Browser Run.",
|
|
11942
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
11943
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_FETCH,
|
|
11944
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
11945
|
+
parametersSchema: {
|
|
11946
|
+
type: "object",
|
|
11947
|
+
properties: browserRunCommonProperties,
|
|
11948
|
+
required: ["url"]
|
|
11949
|
+
},
|
|
11950
|
+
documentationUrl: BROWSER_RUN_DOCUMENTATION_URL,
|
|
11951
|
+
requiresApiKey: false,
|
|
11952
|
+
executionHint: "platform",
|
|
11953
|
+
platformKeySupport: true
|
|
11954
|
+
},
|
|
11955
|
+
// Cloudflare Browser Run Quick Action: Snapshot
|
|
11956
|
+
{
|
|
11957
|
+
id: "browser:snapshot",
|
|
11958
|
+
aliases: ["browser-snapshot"],
|
|
11959
|
+
name: "Browser Snapshot",
|
|
11960
|
+
description: "Capture rendered HTML and a base64 screenshot of a web page in one Cloudflare Browser Run request.",
|
|
11961
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
11962
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_FETCH,
|
|
11963
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
11964
|
+
parametersSchema: {
|
|
11965
|
+
type: "object",
|
|
11966
|
+
properties: {
|
|
11967
|
+
...browserRunCommonProperties,
|
|
11968
|
+
screenshotOptions: browserRunScreenshotOptionsSchema
|
|
11969
|
+
},
|
|
11970
|
+
required: ["url"]
|
|
11971
|
+
},
|
|
11972
|
+
defaultConfig: {
|
|
11973
|
+
screenshotOptions: {
|
|
11974
|
+
type: "png",
|
|
11975
|
+
fullPage: false
|
|
11976
|
+
}
|
|
11977
|
+
},
|
|
11978
|
+
documentationUrl: BROWSER_RUN_DOCUMENTATION_URL,
|
|
11979
|
+
requiresApiKey: false,
|
|
11980
|
+
executionHint: "platform",
|
|
11981
|
+
platformKeySupport: true
|
|
11982
|
+
},
|
|
11983
|
+
// Cloudflare Browser Run Quick Action: Links
|
|
11984
|
+
{
|
|
11985
|
+
id: "browser:links",
|
|
11986
|
+
aliases: ["browser-links"],
|
|
11987
|
+
name: "Browser Links",
|
|
11988
|
+
description: "Retrieve links from a rendered web page using Cloudflare Browser Run. Can limit results to visible links.",
|
|
11989
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
11990
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_FETCH,
|
|
11991
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
11992
|
+
parametersSchema: {
|
|
11993
|
+
type: "object",
|
|
11994
|
+
properties: {
|
|
11995
|
+
...browserRunCommonProperties,
|
|
11996
|
+
visibleLinksOnly: {
|
|
11997
|
+
type: "boolean",
|
|
11998
|
+
description: "Only return links visible on the rendered page",
|
|
11999
|
+
default: false
|
|
12000
|
+
}
|
|
12001
|
+
},
|
|
12002
|
+
required: ["url"]
|
|
12003
|
+
},
|
|
12004
|
+
defaultConfig: {
|
|
12005
|
+
visibleLinksOnly: false
|
|
12006
|
+
},
|
|
12007
|
+
documentationUrl: BROWSER_RUN_DOCUMENTATION_URL,
|
|
12008
|
+
requiresApiKey: false,
|
|
12009
|
+
executionHint: "platform",
|
|
12010
|
+
platformKeySupport: true
|
|
12011
|
+
},
|
|
12012
|
+
// -----------------------------------------------------------------------
|
|
12013
|
+
// Cloudflare Browser Run Session Tools (Phase 2)
|
|
12014
|
+
// Persistent browser sessions for interactive agent browsing.
|
|
12015
|
+
// -----------------------------------------------------------------------
|
|
12016
|
+
{
|
|
12017
|
+
id: "browser:open",
|
|
12018
|
+
aliases: ["browser-open"],
|
|
12019
|
+
name: "Browser Open",
|
|
12020
|
+
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.",
|
|
12021
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
12022
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_USE,
|
|
12023
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12024
|
+
parametersSchema: {
|
|
12025
|
+
type: "object",
|
|
12026
|
+
properties: {
|
|
12027
|
+
url: {
|
|
12028
|
+
type: "string",
|
|
12029
|
+
description: "The URL to navigate to"
|
|
12030
|
+
},
|
|
12031
|
+
viewport: browserRunViewportSchema,
|
|
12032
|
+
userAgent: {
|
|
12033
|
+
type: "string",
|
|
12034
|
+
description: "Custom User-Agent string"
|
|
12035
|
+
}
|
|
12036
|
+
},
|
|
12037
|
+
required: ["url"]
|
|
12038
|
+
},
|
|
12039
|
+
documentationUrl: BROWSER_SESSION_DOCUMENTATION_URL,
|
|
12040
|
+
requiresApiKey: false,
|
|
12041
|
+
executionHint: "platform",
|
|
12042
|
+
platformKeySupport: true
|
|
12043
|
+
},
|
|
12044
|
+
{
|
|
12045
|
+
id: "browser:navigate",
|
|
12046
|
+
aliases: ["browser-navigate"],
|
|
12047
|
+
name: "Browser Navigate",
|
|
12048
|
+
description: "Navigate to a new URL in an existing browser session.",
|
|
12049
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
12050
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_USE,
|
|
12051
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12052
|
+
parametersSchema: {
|
|
12053
|
+
type: "object",
|
|
12054
|
+
properties: {
|
|
12055
|
+
sessionId: {
|
|
12056
|
+
type: "string",
|
|
12057
|
+
description: "The session ID returned by browser:open"
|
|
12058
|
+
},
|
|
12059
|
+
url: {
|
|
12060
|
+
type: "string",
|
|
12061
|
+
description: "The URL to navigate to"
|
|
12062
|
+
},
|
|
12063
|
+
waitUntil: {
|
|
12064
|
+
type: "string",
|
|
12065
|
+
description: "When to consider navigation finished",
|
|
12066
|
+
enum: ["load", "domcontentloaded", "networkidle0", "networkidle2"],
|
|
12067
|
+
default: "networkidle0"
|
|
12068
|
+
}
|
|
12069
|
+
},
|
|
12070
|
+
required: ["sessionId", "url"]
|
|
12071
|
+
},
|
|
12072
|
+
documentationUrl: BROWSER_SESSION_DOCUMENTATION_URL,
|
|
12073
|
+
requiresApiKey: false,
|
|
12074
|
+
executionHint: "platform",
|
|
12075
|
+
platformKeySupport: true
|
|
12076
|
+
},
|
|
12077
|
+
{
|
|
12078
|
+
id: "browser:click",
|
|
12079
|
+
aliases: ["browser-click"],
|
|
12080
|
+
name: "Browser Click",
|
|
12081
|
+
description: "Click an element by CSS selector in an existing browser session.",
|
|
12082
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
12083
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_USE,
|
|
12084
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12085
|
+
parametersSchema: {
|
|
12086
|
+
type: "object",
|
|
12087
|
+
properties: {
|
|
12088
|
+
sessionId: {
|
|
12089
|
+
type: "string",
|
|
12090
|
+
description: "The session ID returned by browser:open"
|
|
12091
|
+
},
|
|
12092
|
+
selector: {
|
|
12093
|
+
type: "string",
|
|
12094
|
+
description: "CSS selector of the element to click"
|
|
12095
|
+
},
|
|
12096
|
+
button: {
|
|
12097
|
+
type: "string",
|
|
12098
|
+
description: "Mouse button to click",
|
|
12099
|
+
enum: ["left", "right", "middle"],
|
|
12100
|
+
default: "left"
|
|
12101
|
+
},
|
|
12102
|
+
clickCount: {
|
|
12103
|
+
type: "number",
|
|
12104
|
+
description: "Number of clicks (e.g. 2 for double-click)",
|
|
12105
|
+
minimum: 1,
|
|
12106
|
+
default: 1
|
|
12107
|
+
},
|
|
12108
|
+
delay: {
|
|
12109
|
+
type: "number",
|
|
12110
|
+
description: "Delay between mousedown and mouseup in milliseconds",
|
|
12111
|
+
minimum: 0
|
|
12112
|
+
}
|
|
12113
|
+
},
|
|
12114
|
+
required: ["sessionId", "selector"]
|
|
12115
|
+
},
|
|
12116
|
+
documentationUrl: BROWSER_SESSION_DOCUMENTATION_URL,
|
|
12117
|
+
requiresApiKey: false,
|
|
12118
|
+
executionHint: "platform",
|
|
12119
|
+
platformKeySupport: true
|
|
12120
|
+
},
|
|
12121
|
+
{
|
|
12122
|
+
id: "browser:type",
|
|
12123
|
+
aliases: ["browser-type"],
|
|
12124
|
+
name: "Browser Type",
|
|
12125
|
+
description: "Type text into an input element or the currently focused element in a browser session.",
|
|
12126
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
12127
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_USE,
|
|
12128
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12129
|
+
parametersSchema: {
|
|
12130
|
+
type: "object",
|
|
12131
|
+
properties: {
|
|
12132
|
+
sessionId: {
|
|
12133
|
+
type: "string",
|
|
12134
|
+
description: "The session ID returned by browser:open"
|
|
12135
|
+
},
|
|
12136
|
+
text: {
|
|
12137
|
+
type: "string",
|
|
12138
|
+
description: "The text to type"
|
|
12139
|
+
},
|
|
12140
|
+
selector: {
|
|
12141
|
+
type: "string",
|
|
12142
|
+
description: "CSS selector of the input element. If omitted, types into the focused element."
|
|
12143
|
+
},
|
|
12144
|
+
delay: {
|
|
12145
|
+
type: "number",
|
|
12146
|
+
description: "Delay between keystrokes in milliseconds",
|
|
12147
|
+
minimum: 0
|
|
12148
|
+
},
|
|
12149
|
+
pressEnter: {
|
|
12150
|
+
type: "boolean",
|
|
12151
|
+
description: "Press Enter after typing",
|
|
12152
|
+
default: false
|
|
12153
|
+
}
|
|
12154
|
+
},
|
|
12155
|
+
required: ["sessionId", "text"]
|
|
12156
|
+
},
|
|
12157
|
+
documentationUrl: BROWSER_SESSION_DOCUMENTATION_URL,
|
|
12158
|
+
requiresApiKey: false,
|
|
12159
|
+
executionHint: "platform",
|
|
12160
|
+
platformKeySupport: true
|
|
12161
|
+
},
|
|
12162
|
+
{
|
|
12163
|
+
id: "browser:scroll",
|
|
12164
|
+
aliases: ["browser-scroll"],
|
|
12165
|
+
name: "Browser Scroll",
|
|
12166
|
+
description: "Scroll the page or a specific element in a browser session.",
|
|
12167
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
12168
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_USE,
|
|
12169
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12170
|
+
parametersSchema: {
|
|
12171
|
+
type: "object",
|
|
12172
|
+
properties: {
|
|
12173
|
+
sessionId: {
|
|
12174
|
+
type: "string",
|
|
12175
|
+
description: "The session ID returned by browser:open"
|
|
12176
|
+
},
|
|
12177
|
+
direction: {
|
|
12178
|
+
type: "string",
|
|
12179
|
+
description: "Scroll direction",
|
|
12180
|
+
enum: ["up", "down", "left", "right"],
|
|
12181
|
+
default: "down"
|
|
12182
|
+
},
|
|
12183
|
+
amount: {
|
|
12184
|
+
type: "number",
|
|
12185
|
+
description: "Scroll amount in pixels",
|
|
12186
|
+
minimum: 1,
|
|
12187
|
+
default: 500
|
|
12188
|
+
},
|
|
12189
|
+
selector: {
|
|
12190
|
+
type: "string",
|
|
12191
|
+
description: "CSS selector of the element to scroll within. If omitted, scrolls the page."
|
|
12192
|
+
}
|
|
12193
|
+
},
|
|
12194
|
+
required: ["sessionId"]
|
|
12195
|
+
},
|
|
12196
|
+
documentationUrl: BROWSER_SESSION_DOCUMENTATION_URL,
|
|
12197
|
+
requiresApiKey: false,
|
|
12198
|
+
executionHint: "platform",
|
|
12199
|
+
platformKeySupport: true
|
|
12200
|
+
},
|
|
12201
|
+
{
|
|
12202
|
+
id: "browser:session-screenshot",
|
|
12203
|
+
aliases: ["browser-session-screenshot"],
|
|
12204
|
+
name: "Browser Session Screenshot",
|
|
12205
|
+
description: "Capture a screenshot of the current page in a browser session. Returns a base64-encoded image.",
|
|
12206
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
12207
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_USE,
|
|
12208
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12209
|
+
parametersSchema: {
|
|
12210
|
+
type: "object",
|
|
12211
|
+
properties: {
|
|
12212
|
+
sessionId: {
|
|
12213
|
+
type: "string",
|
|
12214
|
+
description: "The session ID returned by browser:open"
|
|
12215
|
+
},
|
|
12216
|
+
fullPage: {
|
|
12217
|
+
type: "boolean",
|
|
12218
|
+
description: "Capture the full scrollable page instead of just the viewport",
|
|
12219
|
+
default: false
|
|
12220
|
+
},
|
|
12221
|
+
selector: {
|
|
12222
|
+
type: "string",
|
|
12223
|
+
description: "CSS selector of an element to capture instead of the full page"
|
|
12224
|
+
},
|
|
12225
|
+
format: {
|
|
12226
|
+
type: "string",
|
|
12227
|
+
description: "Image format",
|
|
12228
|
+
enum: ["png", "jpeg", "webp"],
|
|
12229
|
+
default: "png"
|
|
12230
|
+
}
|
|
12231
|
+
},
|
|
12232
|
+
required: ["sessionId"]
|
|
12233
|
+
},
|
|
12234
|
+
documentationUrl: BROWSER_SESSION_DOCUMENTATION_URL,
|
|
12235
|
+
requiresApiKey: false,
|
|
12236
|
+
executionHint: "platform",
|
|
12237
|
+
platformKeySupport: true
|
|
12238
|
+
},
|
|
12239
|
+
{
|
|
12240
|
+
id: "browser:evaluate",
|
|
12241
|
+
aliases: ["browser-evaluate"],
|
|
12242
|
+
name: "Browser Evaluate",
|
|
12243
|
+
description: "Execute JavaScript in the browser page context of an existing session. Returns the result of the script.",
|
|
12244
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
12245
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_USE,
|
|
12246
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12247
|
+
parametersSchema: {
|
|
12248
|
+
type: "object",
|
|
12249
|
+
properties: {
|
|
12250
|
+
sessionId: {
|
|
12251
|
+
type: "string",
|
|
12252
|
+
description: "The session ID returned by browser:open"
|
|
12253
|
+
},
|
|
12254
|
+
script: {
|
|
12255
|
+
type: "string",
|
|
12256
|
+
description: "JavaScript code to evaluate in the page context"
|
|
12257
|
+
}
|
|
12258
|
+
},
|
|
12259
|
+
required: ["sessionId", "script"]
|
|
12260
|
+
},
|
|
12261
|
+
documentationUrl: BROWSER_SESSION_DOCUMENTATION_URL,
|
|
12262
|
+
requiresApiKey: false,
|
|
12263
|
+
executionHint: "platform",
|
|
12264
|
+
platformKeySupport: true
|
|
12265
|
+
},
|
|
12266
|
+
{
|
|
12267
|
+
id: "browser:session-info",
|
|
12268
|
+
aliases: ["browser-session-info"],
|
|
12269
|
+
name: "Browser Session Info",
|
|
12270
|
+
description: "Get the current state of a browser session including URL, title, and session age.",
|
|
12271
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
12272
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_USE,
|
|
12273
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12274
|
+
parametersSchema: {
|
|
12275
|
+
type: "object",
|
|
12276
|
+
properties: {
|
|
12277
|
+
sessionId: {
|
|
12278
|
+
type: "string",
|
|
12279
|
+
description: "The session ID returned by browser:open"
|
|
12280
|
+
}
|
|
12281
|
+
},
|
|
12282
|
+
required: ["sessionId"]
|
|
12283
|
+
},
|
|
12284
|
+
documentationUrl: BROWSER_SESSION_DOCUMENTATION_URL,
|
|
12285
|
+
requiresApiKey: false,
|
|
12286
|
+
executionHint: "platform",
|
|
12287
|
+
platformKeySupport: true
|
|
12288
|
+
},
|
|
12289
|
+
{
|
|
12290
|
+
id: "browser:close",
|
|
12291
|
+
aliases: ["browser-close"],
|
|
12292
|
+
name: "Browser Close",
|
|
12293
|
+
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).",
|
|
12294
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
12295
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_USE,
|
|
12296
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12297
|
+
parametersSchema: {
|
|
12298
|
+
type: "object",
|
|
12299
|
+
properties: {
|
|
12300
|
+
sessionId: {
|
|
12301
|
+
type: "string",
|
|
12302
|
+
description: "The session ID returned by browser:open"
|
|
12303
|
+
}
|
|
12304
|
+
},
|
|
12305
|
+
required: ["sessionId"]
|
|
12306
|
+
},
|
|
12307
|
+
documentationUrl: BROWSER_SESSION_DOCUMENTATION_URL,
|
|
12308
|
+
requiresApiKey: false,
|
|
12309
|
+
executionHint: "platform",
|
|
12310
|
+
platformKeySupport: true
|
|
12311
|
+
},
|
|
12312
|
+
{
|
|
12313
|
+
id: "browser:task",
|
|
12314
|
+
aliases: ["browser-task"],
|
|
12315
|
+
name: "Browser Task",
|
|
12316
|
+
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.",
|
|
12317
|
+
category: exports.BuiltInToolCategory.BROWSER,
|
|
12318
|
+
toolGroup: exports.BuiltInToolGroup.BROWSER_USE,
|
|
12319
|
+
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12320
|
+
parametersSchema: {
|
|
12321
|
+
type: "object",
|
|
12322
|
+
properties: {
|
|
12323
|
+
goal: {
|
|
12324
|
+
type: "string",
|
|
12325
|
+
description: "Natural-language description of what to accomplish on the page."
|
|
12326
|
+
},
|
|
12327
|
+
startUrl: {
|
|
12328
|
+
type: "string",
|
|
12329
|
+
description: "URL to begin browsing from. Required when sessionId is not provided."
|
|
12330
|
+
},
|
|
12331
|
+
sessionId: {
|
|
12332
|
+
type: "string",
|
|
12333
|
+
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."
|
|
12334
|
+
},
|
|
12335
|
+
outputSchema: {
|
|
12336
|
+
type: "object",
|
|
12337
|
+
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."
|
|
12338
|
+
},
|
|
12339
|
+
maxSteps: {
|
|
12340
|
+
type: "number",
|
|
12341
|
+
description: "Maximum number of browser actions to take (default 15, max 30).",
|
|
12342
|
+
minimum: 1,
|
|
12343
|
+
maximum: 30,
|
|
12344
|
+
default: 15
|
|
12345
|
+
},
|
|
12346
|
+
viewport: browserRunViewportSchema,
|
|
12347
|
+
userAgent: {
|
|
12348
|
+
type: "string",
|
|
12349
|
+
description: "Custom User-Agent string (only used when starting a fresh browser)."
|
|
12350
|
+
}
|
|
12351
|
+
},
|
|
12352
|
+
required: ["goal"]
|
|
12353
|
+
},
|
|
12354
|
+
documentationUrl: BROWSER_SESSION_DOCUMENTATION_URL,
|
|
12355
|
+
requiresApiKey: false,
|
|
12356
|
+
executionHint: "platform",
|
|
12357
|
+
platformKeySupport: true,
|
|
12358
|
+
experimental: true
|
|
12359
|
+
},
|
|
11597
12360
|
// Vector Search - Semantic search across knowledge bases
|
|
11598
12361
|
// Supports multi-instance format: builtin:vector-search#<instance-id>
|
|
11599
12362
|
{
|
|
@@ -11684,6 +12447,7 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
11684
12447
|
name: "ElevenLabs Text-to-Speech",
|
|
11685
12448
|
description: "Convert text to natural-sounding speech using ElevenLabs AI voices",
|
|
11686
12449
|
category: exports.BuiltInToolCategory.TEXT_TO_SPEECH,
|
|
12450
|
+
toolGroup: exports.BuiltInToolGroup.VOICE,
|
|
11687
12451
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
11688
12452
|
parametersSchema: {
|
|
11689
12453
|
type: "object",
|
|
@@ -11742,6 +12506,7 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
11742
12506
|
name: "ElevenLabs Speech-to-Text",
|
|
11743
12507
|
description: "Transcribe audio to text using ElevenLabs Scribe models",
|
|
11744
12508
|
category: exports.BuiltInToolCategory.TEXT_TO_SPEECH,
|
|
12509
|
+
toolGroup: exports.BuiltInToolGroup.VOICE,
|
|
11745
12510
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
11746
12511
|
parametersSchema: {
|
|
11747
12512
|
type: "object",
|
|
@@ -11836,6 +12601,7 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
11836
12601
|
name: "Store Asset",
|
|
11837
12602
|
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.",
|
|
11838
12603
|
category: exports.BuiltInToolCategory.FILE_OPERATIONS,
|
|
12604
|
+
toolGroup: exports.BuiltInToolGroup.FILE_OUTPUTS,
|
|
11839
12605
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
11840
12606
|
parametersSchema: {
|
|
11841
12607
|
type: "object",
|
|
@@ -11874,6 +12640,7 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
11874
12640
|
name: "Publish Page",
|
|
11875
12641
|
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.",
|
|
11876
12642
|
category: exports.BuiltInToolCategory.FILE_OPERATIONS,
|
|
12643
|
+
toolGroup: exports.BuiltInToolGroup.FILE_OUTPUTS,
|
|
11877
12644
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
11878
12645
|
parametersSchema: {
|
|
11879
12646
|
type: "object",
|
|
@@ -11907,6 +12674,7 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
11907
12674
|
name: "Generate PDF",
|
|
11908
12675
|
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.",
|
|
11909
12676
|
category: exports.BuiltInToolCategory.FILE_OPERATIONS,
|
|
12677
|
+
toolGroup: exports.BuiltInToolGroup.FILE_OUTPUTS,
|
|
11910
12678
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
11911
12679
|
parametersSchema: {
|
|
11912
12680
|
type: "object",
|
|
@@ -11978,6 +12746,7 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
11978
12746
|
name: "Upsert Record",
|
|
11979
12747
|
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.",
|
|
11980
12748
|
category: exports.BuiltInToolCategory.DATA_MANAGEMENT,
|
|
12749
|
+
toolGroup: exports.BuiltInToolGroup.RECORD_MANAGEMENT,
|
|
11981
12750
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
11982
12751
|
parametersSchema: {
|
|
11983
12752
|
type: "object",
|
|
@@ -12012,6 +12781,7 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
12012
12781
|
name: "Batch Upsert Records",
|
|
12013
12782
|
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.",
|
|
12014
12783
|
category: exports.BuiltInToolCategory.DATA_MANAGEMENT,
|
|
12784
|
+
toolGroup: exports.BuiltInToolGroup.RECORD_MANAGEMENT,
|
|
12015
12785
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12016
12786
|
parametersSchema: {
|
|
12017
12787
|
type: "object",
|
|
@@ -12056,6 +12826,7 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
12056
12826
|
name: "Get Record",
|
|
12057
12827
|
description: "Retrieve a single Runtype record by its type and name. Returns the full record including metadata, or null if not found.",
|
|
12058
12828
|
category: exports.BuiltInToolCategory.DATA_MANAGEMENT,
|
|
12829
|
+
toolGroup: exports.BuiltInToolGroup.RECORD_MANAGEMENT,
|
|
12059
12830
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12060
12831
|
parametersSchema: {
|
|
12061
12832
|
type: "object",
|
|
@@ -12080,6 +12851,7 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
12080
12851
|
name: "List Records",
|
|
12081
12852
|
description: "List and search Runtype records with optional filtering by type and text search. Returns paginated results.",
|
|
12082
12853
|
category: exports.BuiltInToolCategory.DATA_MANAGEMENT,
|
|
12854
|
+
toolGroup: exports.BuiltInToolGroup.RECORD_MANAGEMENT,
|
|
12083
12855
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12084
12856
|
parametersSchema: {
|
|
12085
12857
|
type: "object",
|
|
@@ -12117,6 +12889,7 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
12117
12889
|
name: "Delete Record",
|
|
12118
12890
|
description: "Delete a Runtype record by its type and name. Returns whether the record was found and deleted.",
|
|
12119
12891
|
category: exports.BuiltInToolCategory.DATA_MANAGEMENT,
|
|
12892
|
+
toolGroup: exports.BuiltInToolGroup.RECORD_MANAGEMENT,
|
|
12120
12893
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12121
12894
|
parametersSchema: {
|
|
12122
12895
|
type: "object",
|
|
@@ -12142,6 +12915,7 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
12142
12915
|
name: "UCP Discover",
|
|
12143
12916
|
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.",
|
|
12144
12917
|
category: exports.BuiltInToolCategory.COMMERCE,
|
|
12918
|
+
toolGroup: exports.BuiltInToolGroup.UCP_COMMERCE,
|
|
12145
12919
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12146
12920
|
parametersSchema: {
|
|
12147
12921
|
type: "object",
|
|
@@ -12162,6 +12936,7 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
12162
12936
|
name: "UCP Create Checkout",
|
|
12163
12937
|
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.",
|
|
12164
12938
|
category: exports.BuiltInToolCategory.COMMERCE,
|
|
12939
|
+
toolGroup: exports.BuiltInToolGroup.UCP_COMMERCE,
|
|
12165
12940
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12166
12941
|
parametersSchema: {
|
|
12167
12942
|
type: "object",
|
|
@@ -12287,6 +13062,7 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
12287
13062
|
name: "UCP Update Checkout",
|
|
12288
13063
|
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.",
|
|
12289
13064
|
category: exports.BuiltInToolCategory.COMMERCE,
|
|
13065
|
+
toolGroup: exports.BuiltInToolGroup.UCP_COMMERCE,
|
|
12290
13066
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12291
13067
|
parametersSchema: {
|
|
12292
13068
|
type: "object",
|
|
@@ -12421,6 +13197,7 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
12421
13197
|
name: "UCP Get Checkout",
|
|
12422
13198
|
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.",
|
|
12423
13199
|
category: exports.BuiltInToolCategory.COMMERCE,
|
|
13200
|
+
toolGroup: exports.BuiltInToolGroup.UCP_COMMERCE,
|
|
12424
13201
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12425
13202
|
parametersSchema: {
|
|
12426
13203
|
type: "object",
|
|
@@ -12449,6 +13226,7 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
12449
13226
|
name: "UCP Complete Checkout",
|
|
12450
13227
|
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.',
|
|
12451
13228
|
category: exports.BuiltInToolCategory.COMMERCE,
|
|
13229
|
+
toolGroup: exports.BuiltInToolGroup.UCP_COMMERCE,
|
|
12452
13230
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12453
13231
|
parametersSchema: {
|
|
12454
13232
|
type: "object",
|
|
@@ -12489,6 +13267,7 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
12489
13267
|
name: "UCP Cancel Checkout",
|
|
12490
13268
|
description: "Cancel an active UCP checkout session. Can be called on any session that is not already completed or cancelled.",
|
|
12491
13269
|
category: exports.BuiltInToolCategory.COMMERCE,
|
|
13270
|
+
toolGroup: exports.BuiltInToolGroup.UCP_COMMERCE,
|
|
12492
13271
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12493
13272
|
parametersSchema: {
|
|
12494
13273
|
type: "object",
|
|
@@ -12517,6 +13296,7 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
12517
13296
|
name: "UCP Create Cart",
|
|
12518
13297
|
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.",
|
|
12519
13298
|
category: exports.BuiltInToolCategory.COMMERCE,
|
|
13299
|
+
toolGroup: exports.BuiltInToolGroup.UCP_COMMERCE,
|
|
12520
13300
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12521
13301
|
parametersSchema: {
|
|
12522
13302
|
type: "object",
|
|
@@ -12567,6 +13347,7 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
12567
13347
|
name: "UCP Get Cart",
|
|
12568
13348
|
description: "Retrieve the current state of a UCP cart session including estimated pricing, line items, and any messages.",
|
|
12569
13349
|
category: exports.BuiltInToolCategory.COMMERCE,
|
|
13350
|
+
toolGroup: exports.BuiltInToolGroup.UCP_COMMERCE,
|
|
12570
13351
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12571
13352
|
parametersSchema: {
|
|
12572
13353
|
type: "object",
|
|
@@ -12586,6 +13367,7 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
12586
13367
|
name: "UCP Update Cart",
|
|
12587
13368
|
description: "Update a UCP cart session. Line items are full-replacement \u2014 send the complete list of items you want in the cart.",
|
|
12588
13369
|
category: exports.BuiltInToolCategory.COMMERCE,
|
|
13370
|
+
toolGroup: exports.BuiltInToolGroup.UCP_COMMERCE,
|
|
12589
13371
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12590
13372
|
parametersSchema: {
|
|
12591
13373
|
type: "object",
|
|
@@ -12637,6 +13419,7 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
12637
13419
|
name: "UCP Cancel Cart",
|
|
12638
13420
|
description: "Cancel a UCP cart session.",
|
|
12639
13421
|
category: exports.BuiltInToolCategory.COMMERCE,
|
|
13422
|
+
toolGroup: exports.BuiltInToolGroup.UCP_COMMERCE,
|
|
12640
13423
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12641
13424
|
parametersSchema: {
|
|
12642
13425
|
type: "object",
|
|
@@ -12656,6 +13439,7 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
12656
13439
|
name: "UCP Search Catalog",
|
|
12657
13440
|
description: "Search a UCP merchant's product catalog by text query. Returns matching items with id, name, description, and price.",
|
|
12658
13441
|
category: exports.BuiltInToolCategory.COMMERCE,
|
|
13442
|
+
toolGroup: exports.BuiltInToolGroup.UCP_COMMERCE,
|
|
12659
13443
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12660
13444
|
parametersSchema: {
|
|
12661
13445
|
type: "object",
|
|
@@ -12696,6 +13480,7 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
12696
13480
|
name: "UCP Lookup Catalog",
|
|
12697
13481
|
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.",
|
|
12698
13482
|
category: exports.BuiltInToolCategory.COMMERCE,
|
|
13483
|
+
toolGroup: exports.BuiltInToolGroup.UCP_COMMERCE,
|
|
12699
13484
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12700
13485
|
parametersSchema: {
|
|
12701
13486
|
type: "object",
|
|
@@ -12737,6 +13522,7 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
12737
13522
|
name: "UCP Get Product",
|
|
12738
13523
|
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).",
|
|
12739
13524
|
category: exports.BuiltInToolCategory.COMMERCE,
|
|
13525
|
+
toolGroup: exports.BuiltInToolGroup.UCP_COMMERCE,
|
|
12740
13526
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12741
13527
|
parametersSchema: {
|
|
12742
13528
|
type: "object",
|
|
@@ -12791,6 +13577,7 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
12791
13577
|
name: "UCP Get Order",
|
|
12792
13578
|
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).",
|
|
12793
13579
|
category: exports.BuiltInToolCategory.COMMERCE,
|
|
13580
|
+
toolGroup: exports.BuiltInToolGroup.UCP_COMMERCE,
|
|
12794
13581
|
providers: [exports.BuiltInToolProvider.MULTI],
|
|
12795
13582
|
parametersSchema: {
|
|
12796
13583
|
type: "object",
|
|
@@ -12815,12 +13602,19 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
12815
13602
|
const prefix = (_a = tool.idPrefix) !== null && _a !== void 0 ? _a : exports.BuiltInToolIdPrefix.BUILTIN;
|
|
12816
13603
|
return `${prefix}:${tool.id}`;
|
|
12817
13604
|
}
|
|
12818
|
-
function getAllBuiltInTools2() {
|
|
12819
|
-
return exports.BUILTIN_TOOLS_REGISTRY.filter((tool) => !tool.hidden);
|
|
13605
|
+
function getAllBuiltInTools2(opts) {
|
|
13606
|
+
return exports.BUILTIN_TOOLS_REGISTRY.filter((tool) => !tool.hidden && !((opts === null || opts === void 0 ? void 0 : opts.hideExperimental) && tool.experimental));
|
|
12820
13607
|
}
|
|
12821
13608
|
function getBuiltInToolById2(toolId) {
|
|
12822
13609
|
const cleanId = toolId.replace(/^(builtin|platform):/, "");
|
|
12823
|
-
return exports.BUILTIN_TOOLS_REGISTRY.find((tool) =>
|
|
13610
|
+
return exports.BUILTIN_TOOLS_REGISTRY.find((tool) => {
|
|
13611
|
+
var _a;
|
|
13612
|
+
return tool.id === cleanId || ((_a = tool.aliases) === null || _a === void 0 ? void 0 : _a.includes(cleanId));
|
|
13613
|
+
});
|
|
13614
|
+
}
|
|
13615
|
+
function getBuiltInToolGroupById(toolId) {
|
|
13616
|
+
var _a;
|
|
13617
|
+
return (_a = getBuiltInToolById2(toolId)) === null || _a === void 0 ? void 0 : _a.toolGroup;
|
|
12824
13618
|
}
|
|
12825
13619
|
function getBuiltInToolsByProvider(provider) {
|
|
12826
13620
|
return exports.BUILTIN_TOOLS_REGISTRY.filter((tool) => tool.providers.includes(provider) || tool.providers.includes(exports.BuiltInToolProvider.MULTI));
|
|
@@ -12846,8 +13640,8 @@ var require_builtin_tools_registry = __commonJS({
|
|
|
12846
13640
|
return true;
|
|
12847
13641
|
return compatibility.models.some((m) => modelId.includes(m));
|
|
12848
13642
|
}
|
|
12849
|
-
function getCompatibleBuiltInTools(modelId, provider) {
|
|
12850
|
-
return exports.BUILTIN_TOOLS_REGISTRY.filter((tool) => !tool.hidden && isToolCompatibleWithModel2(tool.id, modelId, provider));
|
|
13643
|
+
function getCompatibleBuiltInTools(modelId, provider, opts) {
|
|
13644
|
+
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
13645
|
}
|
|
12852
13646
|
function validateConfigAgainstSchema(schema, config2) {
|
|
12853
13647
|
const errors = [];
|
|
@@ -12954,6 +13748,8 @@ var require_generated_model_routing = __commonJS({
|
|
|
12954
13748
|
"deepseek-v3.1-terminus": ["vercel"],
|
|
12955
13749
|
"deepseek-v3.2": ["vercel"],
|
|
12956
13750
|
"deepseek-v3.2-thinking": ["vercel"],
|
|
13751
|
+
"deepseek-v4-flash": ["vercel"],
|
|
13752
|
+
"deepseek-v4-pro": ["vercel"],
|
|
12957
13753
|
"devstral-2": ["vercel"],
|
|
12958
13754
|
"devstral-small": ["vercel"],
|
|
12959
13755
|
"devstral-small-2": ["vercel"],
|
|
@@ -13040,6 +13836,8 @@ var require_generated_model_routing = __commonJS({
|
|
|
13040
13836
|
"gpt-5.4-mini": ["vercel"],
|
|
13041
13837
|
"gpt-5.4-nano": ["vercel"],
|
|
13042
13838
|
"gpt-5.4-pro": ["vercel"],
|
|
13839
|
+
"gpt-5.5": ["vercel"],
|
|
13840
|
+
"gpt-5.5-pro": ["vercel"],
|
|
13043
13841
|
"gpt-oss-120b": ["vercel"],
|
|
13044
13842
|
"gpt-oss-20b": ["vercel"],
|
|
13045
13843
|
"gpt-oss-safeguard-20b": ["vercel"],
|
|
@@ -13214,6 +14012,8 @@ var require_generated_model_routing = __commonJS({
|
|
|
13214
14012
|
"deepseek-v3-1": ["vercel"],
|
|
13215
14013
|
"deepseek-v3-1-terminus": ["vercel"],
|
|
13216
14014
|
"deepseek-v3-2": ["vercel"],
|
|
14015
|
+
"deepseek-v4-flash": ["vercel"],
|
|
14016
|
+
"deepseek-v4-pro": ["vercel"],
|
|
13217
14017
|
"devstral-2": ["vercel"],
|
|
13218
14018
|
"devstral-small": ["vercel"],
|
|
13219
14019
|
"devstral-small-2": ["vercel"],
|
|
@@ -13283,6 +14083,8 @@ var require_generated_model_routing = __commonJS({
|
|
|
13283
14083
|
"gpt-5-4-mini": ["vercel"],
|
|
13284
14084
|
"gpt-5-4-nano": ["vercel"],
|
|
13285
14085
|
"gpt-5-4-pro": ["vercel"],
|
|
14086
|
+
"gpt-5-5": ["vercel"],
|
|
14087
|
+
"gpt-5-5-pro": ["vercel"],
|
|
13286
14088
|
"gpt-5-batch": ["openai"],
|
|
13287
14089
|
"gpt-5-chat": ["vercel"],
|
|
13288
14090
|
"gpt-5-codex": ["vercel"],
|
|
@@ -13567,6 +14369,12 @@ var require_generated_model_routing = __commonJS({
|
|
|
13567
14369
|
"deepseek-v3.2-thinking": {
|
|
13568
14370
|
"vercel": "deepseek/deepseek-v3.2-thinking"
|
|
13569
14371
|
},
|
|
14372
|
+
"deepseek-v4-flash": {
|
|
14373
|
+
"vercel": "deepseek/deepseek-v4-flash"
|
|
14374
|
+
},
|
|
14375
|
+
"deepseek-v4-pro": {
|
|
14376
|
+
"vercel": "deepseek/deepseek-v4-pro"
|
|
14377
|
+
},
|
|
13570
14378
|
"devstral-2": {
|
|
13571
14379
|
"vercel": "mistral/devstral-2"
|
|
13572
14380
|
},
|
|
@@ -13882,6 +14690,12 @@ var require_generated_model_routing = __commonJS({
|
|
|
13882
14690
|
"gpt-5-4-pro": {
|
|
13883
14691
|
"vercel": "openai/gpt-5.4-pro"
|
|
13884
14692
|
},
|
|
14693
|
+
"gpt-5-5": {
|
|
14694
|
+
"vercel": "openai/gpt-5.5"
|
|
14695
|
+
},
|
|
14696
|
+
"gpt-5-5-pro": {
|
|
14697
|
+
"vercel": "openai/gpt-5.5-pro"
|
|
14698
|
+
},
|
|
13885
14699
|
"gpt-5-batch": {
|
|
13886
14700
|
"openai": "gpt-5-batch"
|
|
13887
14701
|
},
|
|
@@ -13975,6 +14789,12 @@ var require_generated_model_routing = __commonJS({
|
|
|
13975
14789
|
"gpt-5.4-pro": {
|
|
13976
14790
|
"vercel": "openai/gpt-5.4-pro"
|
|
13977
14791
|
},
|
|
14792
|
+
"gpt-5.5": {
|
|
14793
|
+
"vercel": "openai/gpt-5.5"
|
|
14794
|
+
},
|
|
14795
|
+
"gpt-5.5-pro": {
|
|
14796
|
+
"vercel": "openai/gpt-5.5-pro"
|
|
14797
|
+
},
|
|
13978
14798
|
"gpt-oss-120b": {
|
|
13979
14799
|
"vercel": "openai/gpt-oss-120b"
|
|
13980
14800
|
},
|
|
@@ -19681,6 +20501,7 @@ var require_flow_step_types = __commonJS({
|
|
|
19681
20501
|
"fetch-github",
|
|
19682
20502
|
"api-call",
|
|
19683
20503
|
"transform-data",
|
|
20504
|
+
"template",
|
|
19684
20505
|
"conditional",
|
|
19685
20506
|
"set-variable",
|
|
19686
20507
|
"upsert-record",
|
|
@@ -19739,10 +20560,12 @@ var require_fpo_schema = __commonJS({
|
|
|
19739
20560
|
"../shared/dist/product-generation/fpo-schema.js"(exports) {
|
|
19740
20561
|
"use strict";
|
|
19741
20562
|
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;
|
|
20563
|
+
exports.fullProductObjectSchema = 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
20564
|
var zod_1 = require_zod();
|
|
19744
20565
|
var flow_step_types_1 = require_flow_step_types();
|
|
19745
|
-
exports.
|
|
20566
|
+
exports.FULL_PRODUCT_OBJECT_VERSION_1_0 = "1.0";
|
|
20567
|
+
exports.FULL_PRODUCT_OBJECT_VERSION_1_1 = "1.1";
|
|
20568
|
+
exports.FULL_PRODUCT_OBJECT_VERSION = exports.FULL_PRODUCT_OBJECT_VERSION_1_1;
|
|
19746
20569
|
var createPolicySchema = zod_1.z.enum(["create", "skip", "manual"]).optional();
|
|
19747
20570
|
var flowStepSchema = zod_1.z.object({
|
|
19748
20571
|
type: zod_1.z.string().refine((t) => flow_step_types_1.FLOW_STEP_TYPES.includes(t), { message: "Invalid flow step type" }),
|
|
@@ -19766,6 +20589,18 @@ var require_fpo_schema = __commonJS({
|
|
|
19766
20589
|
description: zod_1.z.string().optional(),
|
|
19767
20590
|
config: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional()
|
|
19768
20591
|
});
|
|
20592
|
+
var agentSubagentConfigSchema = zod_1.z.object({
|
|
20593
|
+
toolPool: zod_1.z.array(zod_1.z.string()).optional(),
|
|
20594
|
+
defaultMaxTurns: zod_1.z.number().int().positive().optional(),
|
|
20595
|
+
maxSpawnsPerRun: zod_1.z.number().int().positive().optional(),
|
|
20596
|
+
allowNesting: zod_1.z.boolean().optional()
|
|
20597
|
+
});
|
|
20598
|
+
var capabilityToolRefSchema = zod_1.z.object({
|
|
20599
|
+
capabilityId: zod_1.z.string().min(1),
|
|
20600
|
+
toolName: zod_1.z.string().min(1),
|
|
20601
|
+
description: zod_1.z.string().optional(),
|
|
20602
|
+
parametersSchema: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional()
|
|
20603
|
+
});
|
|
19769
20604
|
exports.agentDefinitionSchema = zod_1.z.object({
|
|
19770
20605
|
name: zod_1.z.string().min(1),
|
|
19771
20606
|
description: zod_1.z.string().min(1),
|
|
@@ -19776,6 +20611,8 @@ var require_fpo_schema = __commonJS({
|
|
|
19776
20611
|
model: zod_1.z.string(),
|
|
19777
20612
|
systemPrompt: zod_1.z.string().optional()
|
|
19778
20613
|
}).optional(),
|
|
20614
|
+
subagentConfig: agentSubagentConfigSchema.optional(),
|
|
20615
|
+
capabilityToolRefs: zod_1.z.array(capabilityToolRefSchema).optional(),
|
|
19779
20616
|
createPolicy: createPolicySchema
|
|
19780
20617
|
});
|
|
19781
20618
|
exports.capabilitySchema = zod_1.z.object({
|
|
@@ -19874,9 +20711,7 @@ var require_fpo_schema = __commonJS({
|
|
|
19874
20711
|
planHash: zod_1.z.string().min(1)
|
|
19875
20712
|
});
|
|
19876
20713
|
exports.fullProductObjectSchema = zod_1.z.object({
|
|
19877
|
-
|
|
19878
|
-
// generator metadata like _meta.schemaVersion.
|
|
19879
|
-
version: zod_1.z.literal(exports.FULL_PRODUCT_OBJECT_VERSION),
|
|
20714
|
+
version: zod_1.z.enum([exports.FULL_PRODUCT_OBJECT_VERSION_1_0, exports.FULL_PRODUCT_OBJECT_VERSION_1_1]),
|
|
19880
20715
|
product: zod_1.z.object({
|
|
19881
20716
|
name: zod_1.z.string().min(1),
|
|
19882
20717
|
description: zod_1.z.string().min(1),
|
|
@@ -20038,6 +20873,16 @@ var require_agent_validator = __commonJS({
|
|
|
20038
20873
|
result.errors.push((0, types_1.createIssue)("error", "AGENT_ADVISOR_NO_MODEL", "Advisor model is required when advisor is configured", `${base}.advisor.model`));
|
|
20039
20874
|
}
|
|
20040
20875
|
}
|
|
20876
|
+
if (agent.capabilityToolRefs) {
|
|
20877
|
+
for (const [i, ref] of agent.capabilityToolRefs.entries()) {
|
|
20878
|
+
if (!ref.toolName || ref.toolName.trim() === "") {
|
|
20879
|
+
result.errors.push((0, types_1.createIssue)("error", "CAPABILITY_TOOL_REF_NAME_EMPTY", "capabilityToolRefs toolName is required", `${base}.capabilityToolRefs[${i}].toolName`));
|
|
20880
|
+
}
|
|
20881
|
+
if (!ref.capabilityId || ref.capabilityId.trim() === "") {
|
|
20882
|
+
result.errors.push((0, types_1.createIssue)("error", "CAPABILITY_TOOL_REF_ID_EMPTY", "capabilityToolRefs capabilityId is required", `${base}.capabilityToolRefs[${i}].capabilityId`));
|
|
20883
|
+
}
|
|
20884
|
+
}
|
|
20885
|
+
}
|
|
20041
20886
|
result.valid = result.errors.length === 0;
|
|
20042
20887
|
return result;
|
|
20043
20888
|
}
|
|
@@ -20233,7 +21078,7 @@ var require_connectivity_validator = __commonJS({
|
|
|
20233
21078
|
exports.validateConnectivity = validateConnectivity;
|
|
20234
21079
|
var types_1 = require_types2();
|
|
20235
21080
|
function validateConnectivity(fpo) {
|
|
20236
|
-
var _a;
|
|
21081
|
+
var _a, _b;
|
|
20237
21082
|
const result = (0, types_1.emptyResult)();
|
|
20238
21083
|
const capabilityIds = new Set(fpo.capabilities.map((c) => c.id));
|
|
20239
21084
|
for (const [si, surface] of fpo.surfaces.entries()) {
|
|
@@ -20258,10 +21103,26 @@ var require_connectivity_validator = __commonJS({
|
|
|
20258
21103
|
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
21104
|
}
|
|
20260
21105
|
}
|
|
21106
|
+
const capabilityMap = new Map(fpo.capabilities.map((c) => [c.id, c]));
|
|
21107
|
+
for (const [ci, cap] of fpo.capabilities.entries()) {
|
|
21108
|
+
if (!((_a = cap.agent) === null || _a === void 0 ? void 0 : _a.capabilityToolRefs))
|
|
21109
|
+
continue;
|
|
21110
|
+
for (const [ri, ref] of cap.agent.capabilityToolRefs.entries()) {
|
|
21111
|
+
const target = capabilityMap.get(ref.capabilityId);
|
|
21112
|
+
if (!target) {
|
|
21113
|
+
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"));
|
|
21114
|
+
} else if (!target.flow && !target.existingFlowId) {
|
|
21115
|
+
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"));
|
|
21116
|
+
}
|
|
21117
|
+
if (ref.capabilityId === cap.id) {
|
|
21118
|
+
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`));
|
|
21119
|
+
}
|
|
21120
|
+
}
|
|
21121
|
+
}
|
|
20261
21122
|
if (fpo.tools.length > 0) {
|
|
20262
21123
|
const referencedToolIds = /* @__PURE__ */ new Set();
|
|
20263
21124
|
for (const cap of fpo.capabilities) {
|
|
20264
|
-
if ((
|
|
21125
|
+
if ((_b = cap.flow) === null || _b === void 0 ? void 0 : _b.steps) {
|
|
20265
21126
|
for (const step of cap.flow.steps) {
|
|
20266
21127
|
const config2 = step.config;
|
|
20267
21128
|
if ((config2 === null || config2 === void 0 ? void 0 : config2.toolId) && typeof config2.toolId === "string") {
|
|
@@ -20331,15 +21192,19 @@ var require_fpo_template = __commonJS({
|
|
|
20331
21192
|
"../shared/dist/product-generation/fpo-template.js"(exports) {
|
|
20332
21193
|
"use strict";
|
|
20333
21194
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20334
|
-
exports.fullProductObjectTemplateSchema = exports.fpoTemplateVariableSchema = exports.fpoTemplateVariableInputTypeSchema = exports.FULL_PRODUCT_OBJECT_TEMPLATE_VERSION = void 0;
|
|
21195
|
+
exports.fullProductObjectTemplateSchema = exports.fpoTemplateVariableSchema = exports.fpoTemplateVariableInputTypeSchema = exports.FULL_PRODUCT_OBJECT_TEMPLATE_VERSION_1_1 = exports.FULL_PRODUCT_OBJECT_TEMPLATE_VERSION = void 0;
|
|
21196
|
+
exports.stripFlowVariablePrefix = stripFlowVariablePrefix;
|
|
20335
21197
|
exports.coerceFPOTemplateVariableValue = coerceFPOTemplateVariableValue;
|
|
20336
21198
|
exports.resolveFPOTemplate = resolveFPOTemplate;
|
|
20337
21199
|
exports.validateFPOTemplate = validateFPOTemplate2;
|
|
21200
|
+
exports.migrateFPOv1ToV1_1 = migrateFPOv1ToV1_1;
|
|
21201
|
+
exports.migrateFPOTemplatev1ToV1_1 = migrateFPOTemplatev1ToV1_1;
|
|
20338
21202
|
var zod_1 = require_zod();
|
|
20339
21203
|
var fpo_schema_1 = require_fpo_schema();
|
|
20340
21204
|
var types_1 = require_types2();
|
|
20341
21205
|
var fpo_validator_1 = require_fpo_validator();
|
|
20342
21206
|
exports.FULL_PRODUCT_OBJECT_TEMPLATE_VERSION = "1.0";
|
|
21207
|
+
exports.FULL_PRODUCT_OBJECT_TEMPLATE_VERSION_1_1 = "1.1";
|
|
20343
21208
|
exports.fpoTemplateVariableInputTypeSchema = zod_1.z.enum([
|
|
20344
21209
|
"text",
|
|
20345
21210
|
"textarea",
|
|
@@ -20386,7 +21251,7 @@ var require_fpo_template = __commonJS({
|
|
|
20386
21251
|
}
|
|
20387
21252
|
});
|
|
20388
21253
|
exports.fullProductObjectTemplateSchema = zod_1.z.object({
|
|
20389
|
-
version: zod_1.z.
|
|
21254
|
+
version: zod_1.z.enum([exports.FULL_PRODUCT_OBJECT_TEMPLATE_VERSION, exports.FULL_PRODUCT_OBJECT_TEMPLATE_VERSION_1_1]),
|
|
20390
21255
|
productObject: fpo_schema_1.fullProductObjectSchema,
|
|
20391
21256
|
template: zod_1.z.object({
|
|
20392
21257
|
variables: zod_1.z.array(exports.fpoTemplateVariableSchema).max(50)
|
|
@@ -20405,6 +21270,45 @@ var require_fpo_template = __commonJS({
|
|
|
20405
21270
|
});
|
|
20406
21271
|
}
|
|
20407
21272
|
});
|
|
21273
|
+
var FLOW_PREFIX = "flow:";
|
|
21274
|
+
var SECRET_PREFIX = "secret:";
|
|
21275
|
+
function replaceTemplateTokens(value, replaceToken) {
|
|
21276
|
+
let cursor = 0;
|
|
21277
|
+
let result = "";
|
|
21278
|
+
while (cursor < value.length) {
|
|
21279
|
+
const start = value.indexOf("{{", cursor);
|
|
21280
|
+
if (start === -1) {
|
|
21281
|
+
result += value.slice(cursor);
|
|
21282
|
+
break;
|
|
21283
|
+
}
|
|
21284
|
+
const end = value.indexOf("}}", start + 2);
|
|
21285
|
+
if (end === -1) {
|
|
21286
|
+
result += value.slice(cursor);
|
|
21287
|
+
break;
|
|
21288
|
+
}
|
|
21289
|
+
result += value.slice(cursor, start);
|
|
21290
|
+
const raw = value.slice(start, end + 2);
|
|
21291
|
+
const inner = value.slice(start + 2, end);
|
|
21292
|
+
result += replaceToken(inner, raw);
|
|
21293
|
+
cursor = end + 2;
|
|
21294
|
+
}
|
|
21295
|
+
return result;
|
|
21296
|
+
}
|
|
21297
|
+
function stripFlowVariablePrefix(value) {
|
|
21298
|
+
if (typeof value === "string") {
|
|
21299
|
+
return replaceTemplateTokens(value, (inner, raw) => {
|
|
21300
|
+
const trimmed = inner.trim();
|
|
21301
|
+
return trimmed.startsWith(FLOW_PREFIX) && trimmed.length > FLOW_PREFIX.length ? `{{${trimmed.slice(FLOW_PREFIX.length)}}}` : raw;
|
|
21302
|
+
});
|
|
21303
|
+
}
|
|
21304
|
+
if (Array.isArray(value)) {
|
|
21305
|
+
return value.map(stripFlowVariablePrefix);
|
|
21306
|
+
}
|
|
21307
|
+
if (value && typeof value === "object") {
|
|
21308
|
+
return Object.fromEntries(Object.entries(value).map(([key, nested]) => [key, stripFlowVariablePrefix(nested)]));
|
|
21309
|
+
}
|
|
21310
|
+
return value;
|
|
21311
|
+
}
|
|
20408
21312
|
function collectStringLeafPaths(value, path14 = []) {
|
|
20409
21313
|
if (typeof value === "string") {
|
|
20410
21314
|
return [{ path: path14, value }];
|
|
@@ -20433,7 +21337,7 @@ var require_fpo_template = __commonJS({
|
|
|
20433
21337
|
const inner = value.slice(start + 2, end);
|
|
20434
21338
|
const separatorIndex = inner.indexOf("|");
|
|
20435
21339
|
const key = (separatorIndex === -1 ? inner : inner.slice(0, separatorIndex)).trim();
|
|
20436
|
-
if (key.length > 0 && !key.startsWith(
|
|
21340
|
+
if (key.length > 0 && !key.startsWith(SECRET_PREFIX) && !key.startsWith(FLOW_PREFIX)) {
|
|
20437
21341
|
references.push({
|
|
20438
21342
|
key,
|
|
20439
21343
|
defaultValue: separatorIndex === -1 ? void 0 : inner.slice(separatorIndex + 1).trim(),
|
|
@@ -20635,6 +21539,122 @@ var require_fpo_template = __commonJS({
|
|
|
20635
21539
|
defaultsValidation
|
|
20636
21540
|
};
|
|
20637
21541
|
}
|
|
21542
|
+
function addFlowPrefixToString(value, skipKeys) {
|
|
21543
|
+
return replaceTemplateTokens(value, (inner, raw) => {
|
|
21544
|
+
if (inner.includes("|"))
|
|
21545
|
+
return raw;
|
|
21546
|
+
const key = inner.trim();
|
|
21547
|
+
if (key.length === 0 || key.startsWith(SECRET_PREFIX) || key.startsWith(FLOW_PREFIX) || (skipKeys === null || skipKeys === void 0 ? void 0 : skipKeys.has(key))) {
|
|
21548
|
+
return raw;
|
|
21549
|
+
}
|
|
21550
|
+
return `{{${FLOW_PREFIX}${key}}}`;
|
|
21551
|
+
});
|
|
21552
|
+
}
|
|
21553
|
+
function addFlowPrefixToValue(value, skipKeys) {
|
|
21554
|
+
if (typeof value === "string")
|
|
21555
|
+
return addFlowPrefixToString(value, skipKeys);
|
|
21556
|
+
if (Array.isArray(value))
|
|
21557
|
+
return value.map((item) => addFlowPrefixToValue(item, skipKeys));
|
|
21558
|
+
if (value && typeof value === "object") {
|
|
21559
|
+
return Object.fromEntries(Object.entries(value).map(([k, v]) => [k, addFlowPrefixToValue(v, skipKeys)]));
|
|
21560
|
+
}
|
|
21561
|
+
return value;
|
|
21562
|
+
}
|
|
21563
|
+
function migrateFPOv1ToV1_1(fpo) {
|
|
21564
|
+
var _a, _b, _c, _d;
|
|
21565
|
+
if (fpo.version === fpo_schema_1.FULL_PRODUCT_OBJECT_VERSION_1_1) {
|
|
21566
|
+
return { migrated: fpo, changes: [] };
|
|
21567
|
+
}
|
|
21568
|
+
const changes = [];
|
|
21569
|
+
const migrated = structuredClone(fpo);
|
|
21570
|
+
migrated.version = fpo_schema_1.FULL_PRODUCT_OBJECT_VERSION_1_1;
|
|
21571
|
+
for (const [ci, cap] of migrated.capabilities.entries()) {
|
|
21572
|
+
if (cap.flow) {
|
|
21573
|
+
for (const [si, step] of cap.flow.steps.entries()) {
|
|
21574
|
+
const before = JSON.stringify(step.config);
|
|
21575
|
+
step.config = addFlowPrefixToValue(step.config);
|
|
21576
|
+
if (JSON.stringify(step.config) !== before) {
|
|
21577
|
+
changes.push(`capabilities[${ci}].flow.steps[${si}].config: added flow: prefix to runtime variables`);
|
|
21578
|
+
}
|
|
21579
|
+
}
|
|
21580
|
+
}
|
|
21581
|
+
if ((_a = cap.agent) === null || _a === void 0 ? void 0 : _a.systemPrompt) {
|
|
21582
|
+
const before = cap.agent.systemPrompt;
|
|
21583
|
+
cap.agent.systemPrompt = addFlowPrefixToString(cap.agent.systemPrompt);
|
|
21584
|
+
if (cap.agent.systemPrompt !== before) {
|
|
21585
|
+
changes.push(`capabilities[${ci}].agent.systemPrompt: added flow: prefix to runtime variables`);
|
|
21586
|
+
}
|
|
21587
|
+
}
|
|
21588
|
+
if ((_b = cap.agent) === null || _b === void 0 ? void 0 : _b.tools) {
|
|
21589
|
+
for (const [ti, tool] of cap.agent.tools.entries()) {
|
|
21590
|
+
if (tool.config) {
|
|
21591
|
+
const before = JSON.stringify(tool.config);
|
|
21592
|
+
tool.config = addFlowPrefixToValue(tool.config);
|
|
21593
|
+
if (JSON.stringify(tool.config) !== before) {
|
|
21594
|
+
changes.push(`capabilities[${ci}].agent.tools[${ti}].config: added flow: prefix to runtime variables`);
|
|
21595
|
+
}
|
|
21596
|
+
}
|
|
21597
|
+
}
|
|
21598
|
+
}
|
|
21599
|
+
if ((_d = (_c = cap.agent) === null || _c === void 0 ? void 0 : _c.advisor) === null || _d === void 0 ? void 0 : _d.systemPrompt) {
|
|
21600
|
+
const before = cap.agent.advisor.systemPrompt;
|
|
21601
|
+
cap.agent.advisor.systemPrompt = addFlowPrefixToString(cap.agent.advisor.systemPrompt);
|
|
21602
|
+
if (cap.agent.advisor.systemPrompt !== before) {
|
|
21603
|
+
changes.push(`capabilities[${ci}].agent.advisor.systemPrompt: added flow: prefix to runtime variables`);
|
|
21604
|
+
}
|
|
21605
|
+
}
|
|
21606
|
+
}
|
|
21607
|
+
return { migrated, changes };
|
|
21608
|
+
}
|
|
21609
|
+
function migrateFPOTemplatev1ToV1_1(template) {
|
|
21610
|
+
var _a, _b, _c, _d;
|
|
21611
|
+
if (template.version === exports.FULL_PRODUCT_OBJECT_TEMPLATE_VERSION_1_1) {
|
|
21612
|
+
return { migrated: template, changes: [] };
|
|
21613
|
+
}
|
|
21614
|
+
const declaredKeys = new Set(template.template.variables.map((v) => v.key));
|
|
21615
|
+
const changes = [];
|
|
21616
|
+
const migrated = structuredClone(template);
|
|
21617
|
+
migrated.version = exports.FULL_PRODUCT_OBJECT_TEMPLATE_VERSION_1_1;
|
|
21618
|
+
const fpo = migrated.productObject;
|
|
21619
|
+
fpo.version = fpo_schema_1.FULL_PRODUCT_OBJECT_VERSION_1_1;
|
|
21620
|
+
for (const [ci, cap] of fpo.capabilities.entries()) {
|
|
21621
|
+
if (cap.flow) {
|
|
21622
|
+
for (const [si, step] of cap.flow.steps.entries()) {
|
|
21623
|
+
const before = JSON.stringify(step.config);
|
|
21624
|
+
step.config = addFlowPrefixToValue(step.config, declaredKeys);
|
|
21625
|
+
if (JSON.stringify(step.config) !== before) {
|
|
21626
|
+
changes.push(`productObject.capabilities[${ci}].flow.steps[${si}].config: added flow: prefix to runtime variables`);
|
|
21627
|
+
}
|
|
21628
|
+
}
|
|
21629
|
+
}
|
|
21630
|
+
if ((_a = cap.agent) === null || _a === void 0 ? void 0 : _a.systemPrompt) {
|
|
21631
|
+
const before = cap.agent.systemPrompt;
|
|
21632
|
+
cap.agent.systemPrompt = addFlowPrefixToString(cap.agent.systemPrompt, declaredKeys);
|
|
21633
|
+
if (cap.agent.systemPrompt !== before) {
|
|
21634
|
+
changes.push(`productObject.capabilities[${ci}].agent.systemPrompt: added flow: prefix to runtime variables`);
|
|
21635
|
+
}
|
|
21636
|
+
}
|
|
21637
|
+
if ((_b = cap.agent) === null || _b === void 0 ? void 0 : _b.tools) {
|
|
21638
|
+
for (const [ti, tool] of cap.agent.tools.entries()) {
|
|
21639
|
+
if (tool.config) {
|
|
21640
|
+
const before = JSON.stringify(tool.config);
|
|
21641
|
+
tool.config = addFlowPrefixToValue(tool.config, declaredKeys);
|
|
21642
|
+
if (JSON.stringify(tool.config) !== before) {
|
|
21643
|
+
changes.push(`productObject.capabilities[${ci}].agent.tools[${ti}].config: added flow: prefix to runtime variables`);
|
|
21644
|
+
}
|
|
21645
|
+
}
|
|
21646
|
+
}
|
|
21647
|
+
}
|
|
21648
|
+
if ((_d = (_c = cap.agent) === null || _c === void 0 ? void 0 : _c.advisor) === null || _d === void 0 ? void 0 : _d.systemPrompt) {
|
|
21649
|
+
const before = cap.agent.advisor.systemPrompt;
|
|
21650
|
+
cap.agent.advisor.systemPrompt = addFlowPrefixToString(cap.agent.advisor.systemPrompt, declaredKeys);
|
|
21651
|
+
if (cap.agent.advisor.systemPrompt !== before) {
|
|
21652
|
+
changes.push(`productObject.capabilities[${ci}].agent.advisor.systemPrompt: added flow: prefix to runtime variables`);
|
|
21653
|
+
}
|
|
21654
|
+
}
|
|
21655
|
+
}
|
|
21656
|
+
return { migrated, changes };
|
|
21657
|
+
}
|
|
20638
21658
|
}
|
|
20639
21659
|
});
|
|
20640
21660
|
|