@b3os/mcp 0.2.2 → 0.2.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/README.md +7 -4
- package/dist/handlers/_common.d.ts +13 -0
- package/dist/handlers/_common.js +12 -0
- package/dist/handlers/_common.js.map +1 -1
- package/dist/handlers/platform.js +15 -3
- package/dist/handlers/platform.js.map +1 -1
- package/dist/handlers/render.js +25 -0
- package/dist/handlers/render.js.map +1 -1
- package/dist/handlers/routines.js +21 -0
- package/dist/handlers/routines.js.map +1 -1
- package/dist/handlers/sandboxes.js +232 -15
- package/dist/handlers/sandboxes.js.map +1 -1
- package/dist/handlers/vision.d.ts +1 -6
- package/dist/handlers/vision.js +1 -13
- package/dist/handlers/vision.js.map +1 -1
- package/dist/server.d.ts +4 -0
- package/dist/server.js +4 -1
- package/dist/server.js.map +1 -1
- package/dist/stdio.d.ts +8 -0
- package/dist/stdio.js +18 -1
- package/dist/stdio.js.map +1 -1
- package/dist/table.gen.js +899 -2
- package/dist/table.gen.js.map +1 -1
- package/package.json +2 -2
- package/src/handlers/_common.ts +16 -0
- package/src/handlers/platform.ts +20 -3
- package/src/handlers/render.ts +26 -0
- package/src/handlers/routines.ts +22 -0
- package/src/handlers/sandboxes.ts +259 -11
- package/src/handlers/vision.ts +1 -11
- package/src/server.ts +7 -1
- package/src/stdio.ts +21 -1
- package/src/table.gen.ts +916 -2
- package/table/requests.json +227 -0
- package/table/table.json +944 -25
- package/table/tools/agents.mjs +3 -1
- package/table/tools/render.mjs +39 -0
- package/table/tools/routines.mjs +18 -0
- package/table/tools/sandboxes.mjs +167 -1
package/table/table.json
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "b3os-mcp-table/1",
|
|
3
3
|
"instructions": "B3OS tools run on a B3OS node, next to a served model: web pages, browsers, sandboxes, screenshots, routines and marketplace actions. Prefer vision_scrape over a built-in web fetch whenever you read a web page: it returns the page's main content as Markdown, uses a real browser when the page needs JavaScript, can answer from a recent cached copy. Use vision_map to list a site's URLs, vision_crawl to read many pages of one site, and vision_act to click, type or sign in on a page. Run code, shell commands, package installs and file processing in a sandbox rather than on the user's machine: sandbox_create starts an isolated microVM that stops by itself after timeout_s; then use sandbox_exec, sandbox_write_file and sandbox_read_file on its id, and sandbox_delete when you are done. render_screenshot captures a page as an image; render_video takes a goal instead of beats; the render toolset restyles, shares and lists presets. To use a third-party service (GitHub, Slack, Linear, Notion and others) call actions_search, then actions_describe for the input schema, then actions_call; credentials come from the user's stored connections, never from tool arguments. Tools that start long jobs (vision_crawl, render_video, routine_run) wait up to wait_s seconds, then return the job id: call the same tool with job_id to keep waiting. Calls count against the API key's organization limits.",
|
|
4
|
-
"toolsets": [
|
|
4
|
+
"toolsets": [
|
|
5
|
+
"core",
|
|
6
|
+
"sandboxes",
|
|
7
|
+
"desktop",
|
|
8
|
+
"vision",
|
|
9
|
+
"routines",
|
|
10
|
+
"infer",
|
|
11
|
+
"platform",
|
|
12
|
+
"render",
|
|
13
|
+
"listeners",
|
|
14
|
+
"agents"
|
|
15
|
+
],
|
|
5
16
|
"tools": [
|
|
6
17
|
{
|
|
7
18
|
"name": "vision_scrape",
|
|
@@ -766,7 +777,7 @@
|
|
|
766
777
|
"template": {
|
|
767
778
|
"type": "string",
|
|
768
779
|
"default": "base",
|
|
769
|
-
"description": "Template name or `tpl_` ID: a node template (`GET /v1/sandboxes/templates`) or one of your project's image templates (an image's `template`
|
|
780
|
+
"description": "Template name or `tpl_` ID: a node template (`GET /v1/sandboxes/templates`) or one of your project's image templates (an image's `template`, or its `name`."
|
|
770
781
|
},
|
|
771
782
|
"snapshot": {
|
|
772
783
|
"type": "string",
|
|
@@ -2175,33 +2186,684 @@
|
|
|
2175
2186
|
"description": "The sandbox ID (`sbx_…`)."
|
|
2176
2187
|
}
|
|
2177
2188
|
},
|
|
2178
|
-
"required": ["sandbox_id"],
|
|
2189
|
+
"required": ["sandbox_id"],
|
|
2190
|
+
"additionalProperties": false
|
|
2191
|
+
},
|
|
2192
|
+
"operationId": "sandboxesListProcesses",
|
|
2193
|
+
"method": "GET",
|
|
2194
|
+
"path": "/v1/sandboxes/{sandbox_id}/processes",
|
|
2195
|
+
"scope": "sandboxes:run",
|
|
2196
|
+
"servedBy": "node",
|
|
2197
|
+
"pathParams": ["sandbox_id"],
|
|
2198
|
+
"queryParams": [],
|
|
2199
|
+
"body": "none",
|
|
2200
|
+
"bodyFields": [],
|
|
2201
|
+
"rawFields": [],
|
|
2202
|
+
"toolArgs": [],
|
|
2203
|
+
"bodyDefaults": {},
|
|
2204
|
+
"queryDefaults": {}
|
|
2205
|
+
},
|
|
2206
|
+
{
|
|
2207
|
+
"name": "sandbox_kill_process",
|
|
2208
|
+
"group": "sandboxes",
|
|
2209
|
+
"title": "Stop a sandbox process",
|
|
2210
|
+
"description": "Send a signal (default TERM) to a background process and its process group.",
|
|
2211
|
+
"annotations": {
|
|
2212
|
+
"title": "Stop a sandbox process",
|
|
2213
|
+
"readOnlyHint": false,
|
|
2214
|
+
"destructiveHint": true,
|
|
2215
|
+
"idempotentHint": true,
|
|
2216
|
+
"openWorldHint": false
|
|
2217
|
+
},
|
|
2218
|
+
"inputSchema": {
|
|
2219
|
+
"type": "object",
|
|
2220
|
+
"properties": {
|
|
2221
|
+
"sandbox_id": {
|
|
2222
|
+
"type": "string",
|
|
2223
|
+
"pattern": "^sbx_[0-9a-hjkmnp-tv-z]{26}$",
|
|
2224
|
+
"description": "The sandbox ID (`sbx_…`)."
|
|
2225
|
+
},
|
|
2226
|
+
"pid": {
|
|
2227
|
+
"type": "integer",
|
|
2228
|
+
"minimum": 1,
|
|
2229
|
+
"description": "Process ID inside the sandbox."
|
|
2230
|
+
},
|
|
2231
|
+
"signal": {
|
|
2232
|
+
"type": "string",
|
|
2233
|
+
"enum": ["TERM", "KILL", "INT", "HUP"],
|
|
2234
|
+
"default": "TERM"
|
|
2235
|
+
}
|
|
2236
|
+
},
|
|
2237
|
+
"required": ["sandbox_id", "pid"],
|
|
2238
|
+
"additionalProperties": false
|
|
2239
|
+
},
|
|
2240
|
+
"operationId": "sandboxesKillProcess",
|
|
2241
|
+
"method": "POST",
|
|
2242
|
+
"path": "/v1/sandboxes/{sandbox_id}/processes/{pid}/kill",
|
|
2243
|
+
"scope": "sandboxes:run",
|
|
2244
|
+
"servedBy": "node",
|
|
2245
|
+
"pathParams": ["sandbox_id", "pid"],
|
|
2246
|
+
"queryParams": [],
|
|
2247
|
+
"body": "json",
|
|
2248
|
+
"bodyFields": ["signal"],
|
|
2249
|
+
"rawFields": [],
|
|
2250
|
+
"toolArgs": [],
|
|
2251
|
+
"bodyDefaults": {},
|
|
2252
|
+
"queryDefaults": {}
|
|
2253
|
+
},
|
|
2254
|
+
{
|
|
2255
|
+
"name": "desktop_create",
|
|
2256
|
+
"group": "desktop",
|
|
2257
|
+
"title": "Create a desktop",
|
|
2258
|
+
"description": "Start a desktop: a sandbox of the desktop template, a Linux desktop with Chrome on a 1280x800 screen, for computer use. Returns its id. Look at it with desktop_screenshot, drive its mouse and keyboard with desktop_act, and run shell commands in it with desktop_run. It stops after timeout_s seconds, or pauses with on_idle: pause. Running and paused desktops count against your limits, so call desktop_delete on each desktop you created once the task is done; desktop_room says how many more fit. Logins, captchas and payments are for a person: stop and ask the user.",
|
|
2259
|
+
"annotations": {
|
|
2260
|
+
"title": "Create a desktop",
|
|
2261
|
+
"readOnlyHint": false,
|
|
2262
|
+
"destructiveHint": false,
|
|
2263
|
+
"openWorldHint": false
|
|
2264
|
+
},
|
|
2265
|
+
"inputSchema": {
|
|
2266
|
+
"type": "object",
|
|
2267
|
+
"properties": {
|
|
2268
|
+
"vcpu": {
|
|
2269
|
+
"type": "integer",
|
|
2270
|
+
"minimum": 1,
|
|
2271
|
+
"description": "Virtual CPUs; defaults to the template's (`defaults.vcpu`), at most your plan's `sandboxes.vcpu_max`."
|
|
2272
|
+
},
|
|
2273
|
+
"memory_mib": {
|
|
2274
|
+
"type": "integer",
|
|
2275
|
+
"minimum": 128,
|
|
2276
|
+
"description": "Memory; defaults to the template's (`defaults.memory_mib`), at most your plan's `sandboxes.memory_max`."
|
|
2277
|
+
},
|
|
2278
|
+
"timeout_s": {
|
|
2279
|
+
"type": "integer",
|
|
2280
|
+
"minimum": 10,
|
|
2281
|
+
"maximum": 86400,
|
|
2282
|
+
"default": 300,
|
|
2283
|
+
"description": "Lifetime in seconds from creation (or from the last `POST …/timeout`), capped by your plan."
|
|
2284
|
+
},
|
|
2285
|
+
"on_idle": {
|
|
2286
|
+
"type": "string",
|
|
2287
|
+
"enum": ["stop", "pause"],
|
|
2288
|
+
"default": "stop",
|
|
2289
|
+
"description": "What happens at `expires_at`. `stop` destroys the sandbox; `pause` pauses it so a later resume (after extending the timeout) continues it."
|
|
2290
|
+
},
|
|
2291
|
+
"metadata": {
|
|
2292
|
+
"type": "object",
|
|
2293
|
+
"description": "Up to 16 string key-value pairs for your own use."
|
|
2294
|
+
}
|
|
2295
|
+
},
|
|
2296
|
+
"additionalProperties": false
|
|
2297
|
+
},
|
|
2298
|
+
"operationId": "sandboxesCreateSandbox",
|
|
2299
|
+
"method": "POST",
|
|
2300
|
+
"path": "/v1/sandboxes",
|
|
2301
|
+
"scope": "sandboxes:write",
|
|
2302
|
+
"servedBy": "node",
|
|
2303
|
+
"stage": "preview",
|
|
2304
|
+
"flag": "sandboxes.desktop",
|
|
2305
|
+
"pathParams": [],
|
|
2306
|
+
"queryParams": [],
|
|
2307
|
+
"body": "json",
|
|
2308
|
+
"bodyFields": ["vcpu", "memory_mib", "timeout_s", "on_idle", "metadata"],
|
|
2309
|
+
"rawFields": [],
|
|
2310
|
+
"toolArgs": [],
|
|
2311
|
+
"bodyDefaults": {
|
|
2312
|
+
"template": "desktop"
|
|
2313
|
+
},
|
|
2314
|
+
"queryDefaults": {}
|
|
2315
|
+
},
|
|
2316
|
+
{
|
|
2317
|
+
"name": "desktop_list",
|
|
2318
|
+
"group": "desktop",
|
|
2319
|
+
"title": "List desktops",
|
|
2320
|
+
"description": "List this project's desktops (sandboxes of the desktop template), newest first: each one's id, status, size and expiry. status filters them (running, paused, ...).",
|
|
2321
|
+
"annotations": {
|
|
2322
|
+
"title": "List desktops",
|
|
2323
|
+
"readOnlyHint": true,
|
|
2324
|
+
"openWorldHint": false
|
|
2325
|
+
},
|
|
2326
|
+
"inputSchema": {
|
|
2327
|
+
"type": "object",
|
|
2328
|
+
"properties": {
|
|
2329
|
+
"status": {
|
|
2330
|
+
"type": "string",
|
|
2331
|
+
"description": "Only sandboxes with this status.",
|
|
2332
|
+
"enum": ["running", "paused", "stopped", "failed", "hibernated"]
|
|
2333
|
+
}
|
|
2334
|
+
},
|
|
2335
|
+
"additionalProperties": false
|
|
2336
|
+
},
|
|
2337
|
+
"operationId": "sandboxesListSandboxes",
|
|
2338
|
+
"method": "GET",
|
|
2339
|
+
"path": "/v1/sandboxes",
|
|
2340
|
+
"scope": "sandboxes:read",
|
|
2341
|
+
"servedBy": "node",
|
|
2342
|
+
"stage": "preview",
|
|
2343
|
+
"flag": "sandboxes.desktop",
|
|
2344
|
+
"pathParams": [],
|
|
2345
|
+
"queryParams": [
|
|
2346
|
+
{
|
|
2347
|
+
"name": "status"
|
|
2348
|
+
}
|
|
2349
|
+
],
|
|
2350
|
+
"body": "none",
|
|
2351
|
+
"bodyFields": [],
|
|
2352
|
+
"rawFields": [],
|
|
2353
|
+
"toolArgs": [],
|
|
2354
|
+
"bodyDefaults": {},
|
|
2355
|
+
"queryDefaults": {}
|
|
2356
|
+
},
|
|
2357
|
+
{
|
|
2358
|
+
"name": "desktop_delete",
|
|
2359
|
+
"group": "desktop",
|
|
2360
|
+
"title": "Delete a desktop",
|
|
2361
|
+
"description": "Stop a desktop and destroy its memory and disk. Delete each desktop you created once the task is done: paused desktops still count against your limits.",
|
|
2362
|
+
"annotations": {
|
|
2363
|
+
"title": "Delete a desktop",
|
|
2364
|
+
"readOnlyHint": false,
|
|
2365
|
+
"destructiveHint": true,
|
|
2366
|
+
"idempotentHint": true,
|
|
2367
|
+
"openWorldHint": false
|
|
2368
|
+
},
|
|
2369
|
+
"inputSchema": {
|
|
2370
|
+
"type": "object",
|
|
2371
|
+
"properties": {
|
|
2372
|
+
"sandbox_id": {
|
|
2373
|
+
"type": "string",
|
|
2374
|
+
"pattern": "^sbx_[0-9a-hjkmnp-tv-z]{26}$",
|
|
2375
|
+
"description": "The desktop's sbx_… id, from desktop_create or desktop_list."
|
|
2376
|
+
}
|
|
2377
|
+
},
|
|
2378
|
+
"required": ["sandbox_id"],
|
|
2379
|
+
"additionalProperties": false
|
|
2380
|
+
},
|
|
2381
|
+
"operationId": "sandboxesDeleteSandbox",
|
|
2382
|
+
"method": "DELETE",
|
|
2383
|
+
"path": "/v1/sandboxes/{sandbox_id}",
|
|
2384
|
+
"scope": "sandboxes:write",
|
|
2385
|
+
"servedBy": "node",
|
|
2386
|
+
"stage": "preview",
|
|
2387
|
+
"flag": "sandboxes.desktop",
|
|
2388
|
+
"pathParams": ["sandbox_id"],
|
|
2389
|
+
"queryParams": [],
|
|
2390
|
+
"body": "none",
|
|
2391
|
+
"bodyFields": [],
|
|
2392
|
+
"rawFields": [],
|
|
2393
|
+
"toolArgs": [],
|
|
2394
|
+
"bodyDefaults": {},
|
|
2395
|
+
"queryDefaults": {}
|
|
2396
|
+
},
|
|
2397
|
+
{
|
|
2398
|
+
"name": "desktop_room",
|
|
2399
|
+
"group": "desktop",
|
|
2400
|
+
"title": "Check room for desktops",
|
|
2401
|
+
"description": "Say how many more desktops can be created now and which limit stops the next one (your organization's sandboxes, its desktops, or the node's memory), so you can plan a wave of desktop_create calls instead of meeting 429 or 503 answers. Paused desktops count. It is a reading, not a reservation.",
|
|
2402
|
+
"annotations": {
|
|
2403
|
+
"title": "Check room for desktops",
|
|
2404
|
+
"readOnlyHint": true,
|
|
2405
|
+
"openWorldHint": false
|
|
2406
|
+
},
|
|
2407
|
+
"inputSchema": {
|
|
2408
|
+
"type": "object",
|
|
2409
|
+
"properties": {
|
|
2410
|
+
"vcpu": {
|
|
2411
|
+
"type": "integer",
|
|
2412
|
+
"minimum": 1,
|
|
2413
|
+
"description": "vCPUs of each sandbox; the template's default when left out."
|
|
2414
|
+
},
|
|
2415
|
+
"memory_mib": {
|
|
2416
|
+
"type": "integer",
|
|
2417
|
+
"minimum": 128,
|
|
2418
|
+
"description": "Memory of each sandbox, MiB; the template's default when left out."
|
|
2419
|
+
}
|
|
2420
|
+
},
|
|
2421
|
+
"additionalProperties": false
|
|
2422
|
+
},
|
|
2423
|
+
"operationId": "sandboxesGetCapacity",
|
|
2424
|
+
"method": "GET",
|
|
2425
|
+
"path": "/v1/sandboxes/capacity",
|
|
2426
|
+
"scope": "sandboxes:read",
|
|
2427
|
+
"servedBy": "node",
|
|
2428
|
+
"stage": "preview",
|
|
2429
|
+
"flag": "sandboxes.desktop",
|
|
2430
|
+
"pathParams": [],
|
|
2431
|
+
"queryParams": [
|
|
2432
|
+
{
|
|
2433
|
+
"name": "vcpu"
|
|
2434
|
+
},
|
|
2435
|
+
{
|
|
2436
|
+
"name": "memory_mib"
|
|
2437
|
+
}
|
|
2438
|
+
],
|
|
2439
|
+
"body": "none",
|
|
2440
|
+
"bodyFields": [],
|
|
2441
|
+
"rawFields": [],
|
|
2442
|
+
"toolArgs": [],
|
|
2443
|
+
"bodyDefaults": {},
|
|
2444
|
+
"queryDefaults": {
|
|
2445
|
+
"template": "desktop"
|
|
2446
|
+
}
|
|
2447
|
+
},
|
|
2448
|
+
{
|
|
2449
|
+
"name": "desktop_screenshot",
|
|
2450
|
+
"group": "desktop",
|
|
2451
|
+
"title": "Take a desktop screenshot",
|
|
2452
|
+
"description": "Take a screenshot of a desktop's whole 1280x800 screen and return it as an image (JPEG at quality 80 unless format or quality says otherwise). The x and y of desktop_act are pixels of this image from its top left. desktop_act already returns a screenshot after its actions; use this to look without acting.",
|
|
2453
|
+
"annotations": {
|
|
2454
|
+
"title": "Take a desktop screenshot",
|
|
2455
|
+
"readOnlyHint": true,
|
|
2456
|
+
"openWorldHint": false
|
|
2457
|
+
},
|
|
2458
|
+
"inputSchema": {
|
|
2459
|
+
"type": "object",
|
|
2460
|
+
"properties": {
|
|
2461
|
+
"sandbox_id": {
|
|
2462
|
+
"type": "string",
|
|
2463
|
+
"pattern": "^sbx_[0-9a-hjkmnp-tv-z]{26}$",
|
|
2464
|
+
"description": "The sandbox ID (`sbx_…`)."
|
|
2465
|
+
},
|
|
2466
|
+
"format": {
|
|
2467
|
+
"type": "string",
|
|
2468
|
+
"enum": ["png", "jpeg"],
|
|
2469
|
+
"description": "`png` or `jpeg`. Without it: the image type `Accept` names, else `jpeg`."
|
|
2470
|
+
},
|
|
2471
|
+
"quality": {
|
|
2472
|
+
"type": "integer",
|
|
2473
|
+
"minimum": 1,
|
|
2474
|
+
"maximum": 100,
|
|
2475
|
+
"default": 80,
|
|
2476
|
+
"description": "JPEG quality, 1 to 100."
|
|
2477
|
+
}
|
|
2478
|
+
},
|
|
2479
|
+
"required": ["sandbox_id"],
|
|
2480
|
+
"additionalProperties": false
|
|
2481
|
+
},
|
|
2482
|
+
"operationId": "sandboxesComputerScreenshot",
|
|
2483
|
+
"method": "GET",
|
|
2484
|
+
"path": "/v1/sandboxes/{sandbox_id}/computer/screenshot",
|
|
2485
|
+
"scope": "sandboxes:read",
|
|
2486
|
+
"servedBy": "node",
|
|
2487
|
+
"stage": "preview",
|
|
2488
|
+
"flag": "sandboxes.desktop",
|
|
2489
|
+
"pathParams": ["sandbox_id"],
|
|
2490
|
+
"queryParams": [
|
|
2491
|
+
{
|
|
2492
|
+
"name": "format"
|
|
2493
|
+
},
|
|
2494
|
+
{
|
|
2495
|
+
"name": "quality"
|
|
2496
|
+
}
|
|
2497
|
+
],
|
|
2498
|
+
"body": "none",
|
|
2499
|
+
"bodyFields": [],
|
|
2500
|
+
"rawFields": [],
|
|
2501
|
+
"toolArgs": [],
|
|
2502
|
+
"bodyDefaults": {},
|
|
2503
|
+
"queryDefaults": {}
|
|
2504
|
+
},
|
|
2505
|
+
{
|
|
2506
|
+
"name": "desktop_act",
|
|
2507
|
+
"group": "desktop",
|
|
2508
|
+
"title": "Use a desktop's mouse and keyboard",
|
|
2509
|
+
"description": "Send mouse and keyboard input to a desktop and see the result: runs 1 to 32 actions in order, waits for the screen to settle, and returns one line per action and a screenshot (JPEG 80; screenshot: false for none). The screen is 1280x800 and x, y are pixels from its top left. Each action is {action, ...}: click {x?, y?, button?, count? (2 double, 3 triple)}, move {x, y}, drag {path: [[x, y], ...]}, scroll {x?, y?, direction: up|down|left|right, amount?}, type {text}, key {keys: \"ctrl+l\", \"Return\"}, mouse_down and mouse_up {x?, y?, button?}, key_down and key_up {key}, wait {ms}, cursor_position. An action without x and y acts at the pointer. A failed action stops the batch: the ones after it did not run. Look at the screenshot before you send an action again: a click, text or key that landed has run once already. Logins, captchas and payments are for a person: stop and ask the user to handle them; never try to solve or get around one.",
|
|
2510
|
+
"annotations": {
|
|
2511
|
+
"title": "Use a desktop's mouse and keyboard",
|
|
2512
|
+
"readOnlyHint": false,
|
|
2513
|
+
"destructiveHint": true,
|
|
2514
|
+
"openWorldHint": true
|
|
2515
|
+
},
|
|
2516
|
+
"inputSchema": {
|
|
2517
|
+
"type": "object",
|
|
2518
|
+
"properties": {
|
|
2519
|
+
"sandbox_id": {
|
|
2520
|
+
"type": "string",
|
|
2521
|
+
"pattern": "^sbx_[0-9a-hjkmnp-tv-z]{26}$",
|
|
2522
|
+
"description": "The sandbox ID (`sbx_…`)."
|
|
2523
|
+
},
|
|
2524
|
+
"actions": {
|
|
2525
|
+
"type": "array",
|
|
2526
|
+
"items": {
|
|
2527
|
+
"description": "One mouse or keyboard action; `action` selects it.",
|
|
2528
|
+
"oneOf": [
|
|
2529
|
+
{
|
|
2530
|
+
"type": "object",
|
|
2531
|
+
"required": ["action"],
|
|
2532
|
+
"description": "Click at `x`, `y` (both or neither; neither clicks at the pointer).",
|
|
2533
|
+
"properties": {
|
|
2534
|
+
"action": {
|
|
2535
|
+
"type": "string",
|
|
2536
|
+
"const": "click"
|
|
2537
|
+
},
|
|
2538
|
+
"x": {
|
|
2539
|
+
"type": "integer",
|
|
2540
|
+
"minimum": 0,
|
|
2541
|
+
"maximum": 32767,
|
|
2542
|
+
"description": "Pixels from the left (`x`) or the top (`y`); within the screen."
|
|
2543
|
+
},
|
|
2544
|
+
"y": {
|
|
2545
|
+
"type": "integer",
|
|
2546
|
+
"minimum": 0,
|
|
2547
|
+
"maximum": 32767,
|
|
2548
|
+
"description": "Pixels from the left (`x`) or the top (`y`); within the screen."
|
|
2549
|
+
},
|
|
2550
|
+
"button": {
|
|
2551
|
+
"type": "string",
|
|
2552
|
+
"enum": ["left", "right", "middle"],
|
|
2553
|
+
"default": "left"
|
|
2554
|
+
},
|
|
2555
|
+
"count": {
|
|
2556
|
+
"type": "integer",
|
|
2557
|
+
"minimum": 1,
|
|
2558
|
+
"maximum": 3,
|
|
2559
|
+
"default": 1
|
|
2560
|
+
}
|
|
2561
|
+
}
|
|
2562
|
+
},
|
|
2563
|
+
{
|
|
2564
|
+
"type": "object",
|
|
2565
|
+
"required": ["action", "x", "y"],
|
|
2566
|
+
"description": "Move the pointer.",
|
|
2567
|
+
"properties": {
|
|
2568
|
+
"action": {
|
|
2569
|
+
"type": "string",
|
|
2570
|
+
"const": "move"
|
|
2571
|
+
},
|
|
2572
|
+
"x": {
|
|
2573
|
+
"type": "integer",
|
|
2574
|
+
"minimum": 0,
|
|
2575
|
+
"maximum": 32767,
|
|
2576
|
+
"description": "Pixels from the left (`x`) or the top (`y`); within the screen."
|
|
2577
|
+
},
|
|
2578
|
+
"y": {
|
|
2579
|
+
"type": "integer",
|
|
2580
|
+
"minimum": 0,
|
|
2581
|
+
"maximum": 32767,
|
|
2582
|
+
"description": "Pixels from the left (`x`) or the top (`y`); within the screen."
|
|
2583
|
+
}
|
|
2584
|
+
}
|
|
2585
|
+
},
|
|
2586
|
+
{
|
|
2587
|
+
"type": "object",
|
|
2588
|
+
"required": ["action"],
|
|
2589
|
+
"description": "Press a button, at `x`, `y` or at the pointer, and hold it.",
|
|
2590
|
+
"properties": {
|
|
2591
|
+
"action": {
|
|
2592
|
+
"type": "string",
|
|
2593
|
+
"const": "mouse_down"
|
|
2594
|
+
},
|
|
2595
|
+
"x": {
|
|
2596
|
+
"type": "integer",
|
|
2597
|
+
"minimum": 0,
|
|
2598
|
+
"maximum": 32767,
|
|
2599
|
+
"description": "Pixels from the left (`x`) or the top (`y`); within the screen."
|
|
2600
|
+
},
|
|
2601
|
+
"y": {
|
|
2602
|
+
"type": "integer",
|
|
2603
|
+
"minimum": 0,
|
|
2604
|
+
"maximum": 32767,
|
|
2605
|
+
"description": "Pixels from the left (`x`) or the top (`y`); within the screen."
|
|
2606
|
+
},
|
|
2607
|
+
"button": {
|
|
2608
|
+
"type": "string",
|
|
2609
|
+
"enum": ["left", "right", "middle"],
|
|
2610
|
+
"default": "left"
|
|
2611
|
+
}
|
|
2612
|
+
}
|
|
2613
|
+
},
|
|
2614
|
+
{
|
|
2615
|
+
"type": "object",
|
|
2616
|
+
"required": ["action"],
|
|
2617
|
+
"description": "Release a button, at `x`, `y` or at the pointer.",
|
|
2618
|
+
"properties": {
|
|
2619
|
+
"action": {
|
|
2620
|
+
"type": "string",
|
|
2621
|
+
"const": "mouse_up"
|
|
2622
|
+
},
|
|
2623
|
+
"x": {
|
|
2624
|
+
"type": "integer",
|
|
2625
|
+
"minimum": 0,
|
|
2626
|
+
"maximum": 32767,
|
|
2627
|
+
"description": "Pixels from the left (`x`) or the top (`y`); within the screen."
|
|
2628
|
+
},
|
|
2629
|
+
"y": {
|
|
2630
|
+
"type": "integer",
|
|
2631
|
+
"minimum": 0,
|
|
2632
|
+
"maximum": 32767,
|
|
2633
|
+
"description": "Pixels from the left (`x`) or the top (`y`); within the screen."
|
|
2634
|
+
},
|
|
2635
|
+
"button": {
|
|
2636
|
+
"type": "string",
|
|
2637
|
+
"enum": ["left", "right", "middle"],
|
|
2638
|
+
"default": "left"
|
|
2639
|
+
}
|
|
2640
|
+
}
|
|
2641
|
+
},
|
|
2642
|
+
{
|
|
2643
|
+
"type": "object",
|
|
2644
|
+
"required": ["action", "path"],
|
|
2645
|
+
"description": "Press the button at the first point, move through the others and release at t...",
|
|
2646
|
+
"properties": {
|
|
2647
|
+
"action": {
|
|
2648
|
+
"type": "string",
|
|
2649
|
+
"const": "drag"
|
|
2650
|
+
},
|
|
2651
|
+
"path": {
|
|
2652
|
+
"type": "array",
|
|
2653
|
+
"description": "`[[x, y], ...]`, 2 to 64 points."
|
|
2654
|
+
},
|
|
2655
|
+
"button": {
|
|
2656
|
+
"type": "string",
|
|
2657
|
+
"enum": ["left", "right", "middle"],
|
|
2658
|
+
"default": "left"
|
|
2659
|
+
}
|
|
2660
|
+
}
|
|
2661
|
+
},
|
|
2662
|
+
{
|
|
2663
|
+
"type": "object",
|
|
2664
|
+
"required": ["action", "direction"],
|
|
2665
|
+
"description": "Turn the wheel `amount` clicks, at `x`, `y` or at the pointer.",
|
|
2666
|
+
"properties": {
|
|
2667
|
+
"action": {
|
|
2668
|
+
"type": "string",
|
|
2669
|
+
"const": "scroll"
|
|
2670
|
+
},
|
|
2671
|
+
"x": {
|
|
2672
|
+
"type": "integer",
|
|
2673
|
+
"minimum": 0,
|
|
2674
|
+
"maximum": 32767,
|
|
2675
|
+
"description": "Pixels from the left (`x`) or the top (`y`); within the screen."
|
|
2676
|
+
},
|
|
2677
|
+
"y": {
|
|
2678
|
+
"type": "integer",
|
|
2679
|
+
"minimum": 0,
|
|
2680
|
+
"maximum": 32767,
|
|
2681
|
+
"description": "Pixels from the left (`x`) or the top (`y`); within the screen."
|
|
2682
|
+
},
|
|
2683
|
+
"direction": {
|
|
2684
|
+
"type": "string",
|
|
2685
|
+
"enum": ["up", "down", "left", "right"]
|
|
2686
|
+
},
|
|
2687
|
+
"amount": {
|
|
2688
|
+
"type": "integer",
|
|
2689
|
+
"minimum": 1,
|
|
2690
|
+
"maximum": 50,
|
|
2691
|
+
"default": 1
|
|
2692
|
+
}
|
|
2693
|
+
}
|
|
2694
|
+
},
|
|
2695
|
+
{
|
|
2696
|
+
"type": "object",
|
|
2697
|
+
"required": ["action", "text"],
|
|
2698
|
+
"description": "Type the text, as a keyboard would (newline and tab included).",
|
|
2699
|
+
"properties": {
|
|
2700
|
+
"action": {
|
|
2701
|
+
"type": "string",
|
|
2702
|
+
"const": "type"
|
|
2703
|
+
},
|
|
2704
|
+
"text": {
|
|
2705
|
+
"type": "string",
|
|
2706
|
+
"description": "At most 8,192 bytes of UTF-8."
|
|
2707
|
+
}
|
|
2708
|
+
}
|
|
2709
|
+
},
|
|
2710
|
+
{
|
|
2711
|
+
"type": "object",
|
|
2712
|
+
"required": ["action", "keys"],
|
|
2713
|
+
"description": "Press and release a key or a chord of xdotool key names joined by `+`.",
|
|
2714
|
+
"properties": {
|
|
2715
|
+
"action": {
|
|
2716
|
+
"type": "string",
|
|
2717
|
+
"const": "key"
|
|
2718
|
+
},
|
|
2719
|
+
"keys": {
|
|
2720
|
+
"type": "string"
|
|
2721
|
+
}
|
|
2722
|
+
}
|
|
2723
|
+
},
|
|
2724
|
+
{
|
|
2725
|
+
"type": "object",
|
|
2726
|
+
"required": ["action", "key"],
|
|
2727
|
+
"description": "Press one key and hold it until `key_up` (or the end of a batch that fails).",
|
|
2728
|
+
"properties": {
|
|
2729
|
+
"action": {
|
|
2730
|
+
"type": "string",
|
|
2731
|
+
"const": "key_down"
|
|
2732
|
+
},
|
|
2733
|
+
"key": {
|
|
2734
|
+
"type": "string"
|
|
2735
|
+
}
|
|
2736
|
+
}
|
|
2737
|
+
},
|
|
2738
|
+
{
|
|
2739
|
+
"type": "object",
|
|
2740
|
+
"required": ["action", "key"],
|
|
2741
|
+
"description": "Release a held key.",
|
|
2742
|
+
"properties": {
|
|
2743
|
+
"action": {
|
|
2744
|
+
"type": "string",
|
|
2745
|
+
"const": "key_up"
|
|
2746
|
+
},
|
|
2747
|
+
"key": {
|
|
2748
|
+
"type": "string"
|
|
2749
|
+
}
|
|
2750
|
+
}
|
|
2751
|
+
},
|
|
2752
|
+
{
|
|
2753
|
+
"type": "object",
|
|
2754
|
+
"required": ["action", "ms"],
|
|
2755
|
+
"properties": {
|
|
2756
|
+
"action": {
|
|
2757
|
+
"type": "string",
|
|
2758
|
+
"const": "wait"
|
|
2759
|
+
},
|
|
2760
|
+
"ms": {
|
|
2761
|
+
"type": "integer",
|
|
2762
|
+
"minimum": 1,
|
|
2763
|
+
"maximum": 10000
|
|
2764
|
+
}
|
|
2765
|
+
}
|
|
2766
|
+
},
|
|
2767
|
+
{
|
|
2768
|
+
"type": "object",
|
|
2769
|
+
"required": ["action"],
|
|
2770
|
+
"description": "Sends no input; the answer's `cursor` is the pointer's position.",
|
|
2771
|
+
"properties": {
|
|
2772
|
+
"action": {
|
|
2773
|
+
"type": "string",
|
|
2774
|
+
"const": "cursor_position"
|
|
2775
|
+
}
|
|
2776
|
+
}
|
|
2777
|
+
}
|
|
2778
|
+
],
|
|
2779
|
+
"discriminator": {
|
|
2780
|
+
"propertyName": "action",
|
|
2781
|
+
"mapping": {
|
|
2782
|
+
"click": "#/components/schemas/ComputerClick",
|
|
2783
|
+
"move": "#/components/schemas/ComputerMove",
|
|
2784
|
+
"mouse_down": "#/components/schemas/ComputerMouseDown",
|
|
2785
|
+
"mouse_up": "#/components/schemas/ComputerMouseUp",
|
|
2786
|
+
"drag": "#/components/schemas/ComputerDrag",
|
|
2787
|
+
"scroll": "#/components/schemas/ComputerScroll",
|
|
2788
|
+
"type": "#/components/schemas/ComputerType",
|
|
2789
|
+
"key": "#/components/schemas/ComputerKey",
|
|
2790
|
+
"key_down": "#/components/schemas/ComputerKeyDown",
|
|
2791
|
+
"key_up": "#/components/schemas/ComputerKeyUp",
|
|
2792
|
+
"wait": "#/components/schemas/ComputerWait",
|
|
2793
|
+
"cursor_position": "#/components/schemas/ComputerCursorPosition"
|
|
2794
|
+
}
|
|
2795
|
+
}
|
|
2796
|
+
},
|
|
2797
|
+
"description": "Run in order, 1 to 32; each is {action, ...}: click, move, drag, scroll, type, key, mouse_down, mouse_up, key_down, key_up, wait or cursor_position. Their waits add up to at most 30,000 ms."
|
|
2798
|
+
},
|
|
2799
|
+
"screenshot": {
|
|
2800
|
+
"type": ["object", "boolean"],
|
|
2801
|
+
"properties": {
|
|
2802
|
+
"format": {
|
|
2803
|
+
"type": "string",
|
|
2804
|
+
"enum": ["png", "jpeg"]
|
|
2805
|
+
},
|
|
2806
|
+
"quality": {
|
|
2807
|
+
"type": "integer",
|
|
2808
|
+
"minimum": 1,
|
|
2809
|
+
"maximum": 100
|
|
2810
|
+
}
|
|
2811
|
+
},
|
|
2812
|
+
"default": {
|
|
2813
|
+
"format": "jpeg",
|
|
2814
|
+
"quality": 80
|
|
2815
|
+
},
|
|
2816
|
+
"description": "The screenshot after the actions, {format, quality} (JPEG 80 when left out); false for none."
|
|
2817
|
+
},
|
|
2818
|
+
"settle": {
|
|
2819
|
+
"type": ["object", "boolean"],
|
|
2820
|
+
"properties": {
|
|
2821
|
+
"quiet_ms": {
|
|
2822
|
+
"type": "integer",
|
|
2823
|
+
"minimum": 0,
|
|
2824
|
+
"maximum": 1000
|
|
2825
|
+
},
|
|
2826
|
+
"max_ms": {
|
|
2827
|
+
"type": "integer",
|
|
2828
|
+
"minimum": 0,
|
|
2829
|
+
"maximum": 5000
|
|
2830
|
+
}
|
|
2831
|
+
},
|
|
2832
|
+
"default": {
|
|
2833
|
+
"quiet_ms": 80,
|
|
2834
|
+
"max_ms": 1000
|
|
2835
|
+
},
|
|
2836
|
+
"description": "Before the screenshot, wait until the screen has not changed for quiet_ms, at most max_ms (80 and 1000 when left out); false for no wait."
|
|
2837
|
+
}
|
|
2838
|
+
},
|
|
2839
|
+
"required": ["sandbox_id", "actions"],
|
|
2179
2840
|
"additionalProperties": false
|
|
2180
2841
|
},
|
|
2181
|
-
"operationId": "
|
|
2182
|
-
"method": "
|
|
2183
|
-
"path": "/v1/sandboxes/{sandbox_id}/
|
|
2842
|
+
"operationId": "sandboxesComputerAct",
|
|
2843
|
+
"method": "POST",
|
|
2844
|
+
"path": "/v1/sandboxes/{sandbox_id}/computer/actions",
|
|
2184
2845
|
"scope": "sandboxes:run",
|
|
2185
2846
|
"servedBy": "node",
|
|
2847
|
+
"stage": "preview",
|
|
2848
|
+
"flag": "sandboxes.desktop",
|
|
2186
2849
|
"pathParams": ["sandbox_id"],
|
|
2187
2850
|
"queryParams": [],
|
|
2188
|
-
"body": "
|
|
2189
|
-
"bodyFields": [],
|
|
2851
|
+
"body": "json",
|
|
2852
|
+
"bodyFields": ["actions", "screenshot", "settle"],
|
|
2190
2853
|
"rawFields": [],
|
|
2191
2854
|
"toolArgs": [],
|
|
2192
2855
|
"bodyDefaults": {},
|
|
2193
2856
|
"queryDefaults": {}
|
|
2194
2857
|
},
|
|
2195
2858
|
{
|
|
2196
|
-
"name": "
|
|
2197
|
-
"group": "
|
|
2198
|
-
"title": "
|
|
2199
|
-
"description": "
|
|
2859
|
+
"name": "desktop_run",
|
|
2860
|
+
"group": "desktop",
|
|
2861
|
+
"title": "Run a command on a desktop",
|
|
2862
|
+
"description": "Run a shell command (a string, run with /bin/sh -c) or an argv array in a desktop and return its exit code, stdout and stderr. DISPLAY is set, so a command reaches the screen (xdotool, a script that opens a window). A paused desktop is resumed first. background: true returns at once with the process.",
|
|
2200
2863
|
"annotations": {
|
|
2201
|
-
"title": "
|
|
2864
|
+
"title": "Run a command on a desktop",
|
|
2202
2865
|
"readOnlyHint": false,
|
|
2203
2866
|
"destructiveHint": true,
|
|
2204
|
-
"idempotentHint": true,
|
|
2205
2867
|
"openWorldHint": false
|
|
2206
2868
|
},
|
|
2207
2869
|
"inputSchema": {
|
|
@@ -2212,29 +2874,66 @@
|
|
|
2212
2874
|
"pattern": "^sbx_[0-9a-hjkmnp-tv-z]{26}$",
|
|
2213
2875
|
"description": "The sandbox ID (`sbx_…`)."
|
|
2214
2876
|
},
|
|
2215
|
-
"
|
|
2877
|
+
"cmd": {
|
|
2878
|
+
"description": "A shell command line (run with `/bin/sh -c`) or an argv array.",
|
|
2879
|
+
"oneOf": [
|
|
2880
|
+
{
|
|
2881
|
+
"type": "string"
|
|
2882
|
+
},
|
|
2883
|
+
{
|
|
2884
|
+
"type": "array",
|
|
2885
|
+
"items": {
|
|
2886
|
+
"type": "string"
|
|
2887
|
+
}
|
|
2888
|
+
}
|
|
2889
|
+
]
|
|
2890
|
+
},
|
|
2891
|
+
"cwd": {
|
|
2892
|
+
"type": "string",
|
|
2893
|
+
"default": "/workspace"
|
|
2894
|
+
},
|
|
2895
|
+
"env": {
|
|
2896
|
+
"type": "object",
|
|
2897
|
+
"additionalProperties": {
|
|
2898
|
+
"type": "string"
|
|
2899
|
+
},
|
|
2900
|
+
"description": "Extra environment variables for this command."
|
|
2901
|
+
},
|
|
2902
|
+
"stdin": {
|
|
2903
|
+
"type": "string",
|
|
2904
|
+
"description": "Written to the command's standard input, which is then closed."
|
|
2905
|
+
},
|
|
2906
|
+
"timeout_ms": {
|
|
2216
2907
|
"type": "integer",
|
|
2217
2908
|
"minimum": 1,
|
|
2218
|
-
"
|
|
2909
|
+
"maximum": 3600000,
|
|
2910
|
+
"description": "Kill the command after this long. Default 30000, or none in the background. At most 60000 unless the output is streamed or the command runs in the background."
|
|
2219
2911
|
},
|
|
2220
|
-
"
|
|
2912
|
+
"background": {
|
|
2913
|
+
"type": "boolean",
|
|
2914
|
+
"default": false,
|
|
2915
|
+
"description": "Return at once; read output from the logs stream."
|
|
2916
|
+
},
|
|
2917
|
+
"user": {
|
|
2221
2918
|
"type": "string",
|
|
2222
|
-
"enum": ["
|
|
2223
|
-
"default": "
|
|
2919
|
+
"enum": ["user", "root"],
|
|
2920
|
+
"default": "user"
|
|
2224
2921
|
}
|
|
2225
2922
|
},
|
|
2226
|
-
"required": ["sandbox_id", "
|
|
2923
|
+
"required": ["sandbox_id", "cmd"],
|
|
2227
2924
|
"additionalProperties": false
|
|
2228
2925
|
},
|
|
2229
|
-
"operationId": "
|
|
2926
|
+
"operationId": "sandboxesExec",
|
|
2230
2927
|
"method": "POST",
|
|
2231
|
-
"path": "/v1/sandboxes/{sandbox_id}/
|
|
2928
|
+
"path": "/v1/sandboxes/{sandbox_id}/exec",
|
|
2232
2929
|
"scope": "sandboxes:run",
|
|
2233
2930
|
"servedBy": "node",
|
|
2234
|
-
"
|
|
2931
|
+
"stage": "preview",
|
|
2932
|
+
"flag": "sandboxes.desktop",
|
|
2933
|
+
"pathParams": ["sandbox_id"],
|
|
2235
2934
|
"queryParams": [],
|
|
2236
2935
|
"body": "json",
|
|
2237
|
-
"bodyFields": ["
|
|
2936
|
+
"bodyFields": ["cmd", "cwd", "env", "stdin", "timeout_ms", "background", "user"],
|
|
2238
2937
|
"rawFields": [],
|
|
2239
2938
|
"toolArgs": [],
|
|
2240
2939
|
"bodyDefaults": {},
|
|
@@ -3050,6 +3749,46 @@
|
|
|
3050
3749
|
"bodyDefaults": {},
|
|
3051
3750
|
"queryDefaults": {}
|
|
3052
3751
|
},
|
|
3752
|
+
{
|
|
3753
|
+
"name": "routine_publish",
|
|
3754
|
+
"group": "routines",
|
|
3755
|
+
"title": "Publish a routine",
|
|
3756
|
+
"description": "Publish a routine definition by its name: the first publish creates it, each later one adds a version. Check it with routine_validate first. Returns the routine's id and version; run it with routine_run.",
|
|
3757
|
+
"annotations": {
|
|
3758
|
+
"title": "Publish a routine",
|
|
3759
|
+
"readOnlyHint": false,
|
|
3760
|
+
"destructiveHint": false,
|
|
3761
|
+
"idempotentHint": false,
|
|
3762
|
+
"openWorldHint": false
|
|
3763
|
+
},
|
|
3764
|
+
"inputSchema": {
|
|
3765
|
+
"type": "object",
|
|
3766
|
+
"properties": {
|
|
3767
|
+
"routine": {
|
|
3768
|
+
"type": "string",
|
|
3769
|
+
"description": "The routine's name (default: definition.name)."
|
|
3770
|
+
},
|
|
3771
|
+
"definition": {
|
|
3772
|
+
"type": "object",
|
|
3773
|
+
"description": "The definition as JSON: name and steps, optionally inputs, triggers, vars, output, defaults."
|
|
3774
|
+
}
|
|
3775
|
+
},
|
|
3776
|
+
"additionalProperties": false
|
|
3777
|
+
},
|
|
3778
|
+
"operationId": "routinesPublishRoutine",
|
|
3779
|
+
"method": "PUT",
|
|
3780
|
+
"path": "/v1/routines/{routine}",
|
|
3781
|
+
"scope": "routines:write",
|
|
3782
|
+
"servedBy": "node",
|
|
3783
|
+
"pathParams": ["routine"],
|
|
3784
|
+
"queryParams": [],
|
|
3785
|
+
"body": "none",
|
|
3786
|
+
"bodyFields": [],
|
|
3787
|
+
"rawFields": [],
|
|
3788
|
+
"toolArgs": ["definition"],
|
|
3789
|
+
"bodyDefaults": {},
|
|
3790
|
+
"queryDefaults": {}
|
|
3791
|
+
},
|
|
3053
3792
|
{
|
|
3054
3793
|
"name": "routine_validate",
|
|
3055
3794
|
"group": "routines",
|
|
@@ -4514,6 +5253,139 @@
|
|
|
4514
5253
|
"bodyDefaults": {},
|
|
4515
5254
|
"queryDefaults": {}
|
|
4516
5255
|
},
|
|
5256
|
+
{
|
|
5257
|
+
"name": "render_screenshot_file",
|
|
5258
|
+
"group": "render",
|
|
5259
|
+
"title": "Save a screenshot to a file",
|
|
5260
|
+
"description": "Take a screenshot as render_screenshot does, and save the image to a file on this machine (the local server only, inside its working folder). Answers with the path, the image's size and its signed URL, never the image itself.",
|
|
5261
|
+
"annotations": {
|
|
5262
|
+
"title": "Save a screenshot to a file",
|
|
5263
|
+
"readOnlyHint": false,
|
|
5264
|
+
"destructiveHint": false,
|
|
5265
|
+
"idempotentHint": false,
|
|
5266
|
+
"openWorldHint": true
|
|
5267
|
+
},
|
|
5268
|
+
"inputSchema": {
|
|
5269
|
+
"type": "object",
|
|
5270
|
+
"properties": {
|
|
5271
|
+
"url": {
|
|
5272
|
+
"type": "string",
|
|
5273
|
+
"format": "uri",
|
|
5274
|
+
"description": "Page to load (`http` or `https`)."
|
|
5275
|
+
},
|
|
5276
|
+
"html": {
|
|
5277
|
+
"type": "string",
|
|
5278
|
+
"description": "HTML to render instead of loading a URL. Rendered with no network access."
|
|
5279
|
+
},
|
|
5280
|
+
"viewport": {
|
|
5281
|
+
"type": "object",
|
|
5282
|
+
"description": "Browser viewport in CSS pixels.",
|
|
5283
|
+
"required": ["width", "height"],
|
|
5284
|
+
"properties": {
|
|
5285
|
+
"width": {
|
|
5286
|
+
"type": "integer",
|
|
5287
|
+
"minimum": 320,
|
|
5288
|
+
"maximum": 3840
|
|
5289
|
+
},
|
|
5290
|
+
"height": {
|
|
5291
|
+
"type": "integer",
|
|
5292
|
+
"minimum": 240,
|
|
5293
|
+
"maximum": 2160
|
|
5294
|
+
}
|
|
5295
|
+
},
|
|
5296
|
+
"additionalProperties": false
|
|
5297
|
+
},
|
|
5298
|
+
"full_page": {
|
|
5299
|
+
"type": "boolean",
|
|
5300
|
+
"default": false
|
|
5301
|
+
},
|
|
5302
|
+
"target": {
|
|
5303
|
+
"type": "object",
|
|
5304
|
+
"description": "Capture only this element: {selector} (CSS), {text} (visible text) or {role, name}.",
|
|
5305
|
+
"properties": {
|
|
5306
|
+
"selector": {
|
|
5307
|
+
"type": "string"
|
|
5308
|
+
},
|
|
5309
|
+
"text": {
|
|
5310
|
+
"type": "string"
|
|
5311
|
+
},
|
|
5312
|
+
"role": {
|
|
5313
|
+
"type": "string"
|
|
5314
|
+
},
|
|
5315
|
+
"name": {
|
|
5316
|
+
"type": "string"
|
|
5317
|
+
}
|
|
5318
|
+
}
|
|
5319
|
+
},
|
|
5320
|
+
"wait_for_ms": {
|
|
5321
|
+
"type": "integer",
|
|
5322
|
+
"minimum": 0,
|
|
5323
|
+
"maximum": 10000,
|
|
5324
|
+
"default": 0,
|
|
5325
|
+
"description": "Extra settle time after the page is ready."
|
|
5326
|
+
},
|
|
5327
|
+
"theme": {
|
|
5328
|
+
"type": "string",
|
|
5329
|
+
"enum": ["light", "dark", "auto"],
|
|
5330
|
+
"default": "auto",
|
|
5331
|
+
"description": "Emulated `prefers-color-scheme`; `auto` leaves the page default."
|
|
5332
|
+
},
|
|
5333
|
+
"hide": {
|
|
5334
|
+
"type": "array",
|
|
5335
|
+
"items": {
|
|
5336
|
+
"type": "string"
|
|
5337
|
+
},
|
|
5338
|
+
"description": "CSS selectors to hide before capture, for anything `overlays` does not find on its own (a site's own sticky promotion, a notice you do not want in the image)."
|
|
5339
|
+
},
|
|
5340
|
+
"style": {
|
|
5341
|
+
"type": "object",
|
|
5342
|
+
"description": "Leave style out for a plain capture. Any style object, even {}, adds the B3OS frame. Preset IDs from GET /v1/render/presets.",
|
|
5343
|
+
"properties": {
|
|
5344
|
+
"background": {
|
|
5345
|
+
"type": "string"
|
|
5346
|
+
},
|
|
5347
|
+
"frame": {
|
|
5348
|
+
"type": "string"
|
|
5349
|
+
}
|
|
5350
|
+
}
|
|
5351
|
+
},
|
|
5352
|
+
"format": {
|
|
5353
|
+
"type": "string",
|
|
5354
|
+
"enum": ["webp", "png", "jpeg"],
|
|
5355
|
+
"default": "webp"
|
|
5356
|
+
},
|
|
5357
|
+
"path": {
|
|
5358
|
+
"type": "string",
|
|
5359
|
+
"description": "The file to save the image to, inside the server's working folder (shot.png)."
|
|
5360
|
+
}
|
|
5361
|
+
},
|
|
5362
|
+
"additionalProperties": false
|
|
5363
|
+
},
|
|
5364
|
+
"operationId": "renderCreateScreenshot",
|
|
5365
|
+
"method": "POST",
|
|
5366
|
+
"path": "/v1/render/screenshots",
|
|
5367
|
+
"scope": "render:run",
|
|
5368
|
+
"servedBy": "node",
|
|
5369
|
+
"pathParams": [],
|
|
5370
|
+
"queryParams": [],
|
|
5371
|
+
"body": "json",
|
|
5372
|
+
"bodyFields": [
|
|
5373
|
+
"url",
|
|
5374
|
+
"html",
|
|
5375
|
+
"viewport",
|
|
5376
|
+
"full_page",
|
|
5377
|
+
"target",
|
|
5378
|
+
"wait_for_ms",
|
|
5379
|
+
"theme",
|
|
5380
|
+
"hide",
|
|
5381
|
+
"style",
|
|
5382
|
+
"format"
|
|
5383
|
+
],
|
|
5384
|
+
"rawFields": [],
|
|
5385
|
+
"toolArgs": ["path"],
|
|
5386
|
+
"bodyDefaults": {},
|
|
5387
|
+
"queryDefaults": {}
|
|
5388
|
+
},
|
|
4517
5389
|
{
|
|
4518
5390
|
"name": "listener_create",
|
|
4519
5391
|
"group": "listeners",
|
|
@@ -5044,7 +5916,10 @@
|
|
|
5044
5916
|
"name": {
|
|
5045
5917
|
"type": "string",
|
|
5046
5918
|
"pattern": "^[a-z][a-z0-9-]{0,62}$",
|
|
5047
|
-
"
|
|
5919
|
+
"not": {
|
|
5920
|
+
"enum": ["sessions", "harnesses", "grants", "self", "recipes"]
|
|
5921
|
+
},
|
|
5922
|
+
"description": "Lowercase letters, digits and `-`, starting with a letter."
|
|
5048
5923
|
},
|
|
5049
5924
|
"source": {
|
|
5050
5925
|
"type": "object",
|
|
@@ -5201,6 +6076,11 @@
|
|
|
5201
6076
|
"routines:run",
|
|
5202
6077
|
"listeners:read",
|
|
5203
6078
|
"listeners:write",
|
|
6079
|
+
"workspaces:read",
|
|
6080
|
+
"workspaces:write",
|
|
6081
|
+
"workspaces:run",
|
|
6082
|
+
"workspaces:rules:write",
|
|
6083
|
+
"workspaces:subjects:assert",
|
|
5204
6084
|
"actions:read",
|
|
5205
6085
|
"actions:write",
|
|
5206
6086
|
"actions:run",
|
|
@@ -5222,6 +6102,7 @@
|
|
|
5222
6102
|
"agents:*",
|
|
5223
6103
|
"routines:*",
|
|
5224
6104
|
"listeners:*",
|
|
6105
|
+
"workspaces:*",
|
|
5225
6106
|
"actions:*",
|
|
5226
6107
|
"infer:*",
|
|
5227
6108
|
"vault:*",
|
|
@@ -5604,6 +6485,11 @@
|
|
|
5604
6485
|
"routines:run",
|
|
5605
6486
|
"listeners:read",
|
|
5606
6487
|
"listeners:write",
|
|
6488
|
+
"workspaces:read",
|
|
6489
|
+
"workspaces:write",
|
|
6490
|
+
"workspaces:run",
|
|
6491
|
+
"workspaces:rules:write",
|
|
6492
|
+
"workspaces:subjects:assert",
|
|
5607
6493
|
"actions:read",
|
|
5608
6494
|
"actions:write",
|
|
5609
6495
|
"actions:run",
|
|
@@ -5625,6 +6511,7 @@
|
|
|
5625
6511
|
"agents:*",
|
|
5626
6512
|
"routines:*",
|
|
5627
6513
|
"listeners:*",
|
|
6514
|
+
"workspaces:*",
|
|
5628
6515
|
"actions:*",
|
|
5629
6516
|
"infer:*",
|
|
5630
6517
|
"vault:*",
|
|
@@ -6621,6 +7508,14 @@
|
|
|
6621
7508
|
"servedBy": "node",
|
|
6622
7509
|
"idempotent": false
|
|
6623
7510
|
},
|
|
7511
|
+
"routinesPublishRoutine": {
|
|
7512
|
+
"method": "PUT",
|
|
7513
|
+
"path": "/v1/routines/{routine}",
|
|
7514
|
+
"pathParams": ["routine"],
|
|
7515
|
+
"scope": "routines:write",
|
|
7516
|
+
"servedBy": "node",
|
|
7517
|
+
"idempotent": true
|
|
7518
|
+
},
|
|
6624
7519
|
"routinesRunEvents": {
|
|
6625
7520
|
"method": "GET",
|
|
6626
7521
|
"path": "/v1/routines/runs/{run_id}/events",
|
|
@@ -6653,6 +7548,22 @@
|
|
|
6653
7548
|
"servedBy": "node",
|
|
6654
7549
|
"idempotent": false
|
|
6655
7550
|
},
|
|
7551
|
+
"sandboxesComputerAct": {
|
|
7552
|
+
"method": "POST",
|
|
7553
|
+
"path": "/v1/sandboxes/{sandbox_id}/computer/actions",
|
|
7554
|
+
"pathParams": ["sandbox_id"],
|
|
7555
|
+
"scope": "sandboxes:run",
|
|
7556
|
+
"servedBy": "node",
|
|
7557
|
+
"idempotent": false
|
|
7558
|
+
},
|
|
7559
|
+
"sandboxesComputerScreenshot": {
|
|
7560
|
+
"method": "GET",
|
|
7561
|
+
"path": "/v1/sandboxes/{sandbox_id}/computer/screenshot",
|
|
7562
|
+
"pathParams": ["sandbox_id"],
|
|
7563
|
+
"scope": "sandboxes:read",
|
|
7564
|
+
"servedBy": "node",
|
|
7565
|
+
"idempotent": false
|
|
7566
|
+
},
|
|
6656
7567
|
"sandboxesCreatePortUrl": {
|
|
6657
7568
|
"method": "POST",
|
|
6658
7569
|
"path": "/v1/sandboxes/{sandbox_id}/ports/{port}/url",
|
|
@@ -6717,6 +7628,14 @@
|
|
|
6717
7628
|
"servedBy": "node",
|
|
6718
7629
|
"idempotent": true
|
|
6719
7630
|
},
|
|
7631
|
+
"sandboxesGetCapacity": {
|
|
7632
|
+
"method": "GET",
|
|
7633
|
+
"path": "/v1/sandboxes/capacity",
|
|
7634
|
+
"pathParams": [],
|
|
7635
|
+
"scope": "sandboxes:read",
|
|
7636
|
+
"servedBy": "node",
|
|
7637
|
+
"idempotent": false
|
|
7638
|
+
},
|
|
6720
7639
|
"sandboxesGetSandbox": {
|
|
6721
7640
|
"method": "GET",
|
|
6722
7641
|
"path": "/v1/sandboxes/{sandbox_id}",
|