@b3os/mcp 0.0.1 → 0.1.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.
Files changed (73) hide show
  1. package/README.md +129 -43
  2. package/bin/b3os-mcp.js +14 -3
  3. package/dist/compact.d.ts +27 -0
  4. package/dist/compact.js +138 -0
  5. package/dist/compact.js.map +1 -0
  6. package/dist/handlers/_common.d.ts +150 -0
  7. package/dist/handlers/_common.js +329 -0
  8. package/dist/handlers/_common.js.map +1 -0
  9. package/dist/handlers/actions.d.ts +19 -0
  10. package/dist/handlers/actions.js +110 -0
  11. package/dist/handlers/actions.js.map +1 -0
  12. package/dist/handlers/render.d.ts +7 -0
  13. package/dist/handlers/render.js +72 -0
  14. package/dist/handlers/render.js.map +1 -0
  15. package/dist/handlers/routines.d.ts +20 -0
  16. package/dist/handlers/routines.js +128 -0
  17. package/dist/handlers/routines.js.map +1 -0
  18. package/dist/handlers/sandboxes.d.ts +2 -0
  19. package/dist/handlers/sandboxes.js +100 -0
  20. package/dist/handlers/sandboxes.js.map +1 -0
  21. package/dist/handlers/vision.d.ts +7 -0
  22. package/dist/handlers/vision.js +186 -0
  23. package/dist/handlers/vision.js.map +1 -0
  24. package/dist/index.d.ts +3 -2
  25. package/dist/index.js +3 -2
  26. package/dist/index.js.map +1 -1
  27. package/dist/main.js +88 -7
  28. package/dist/main.js.map +1 -1
  29. package/dist/server.d.ts +68 -1
  30. package/dist/server.js +175 -18
  31. package/dist/server.js.map +1 -1
  32. package/dist/stdio.d.ts +24 -1
  33. package/dist/stdio.js +89 -12
  34. package/dist/stdio.js.map +1 -1
  35. package/dist/table-types.d.ts +84 -0
  36. package/dist/table-types.js +4 -0
  37. package/dist/table-types.js.map +1 -0
  38. package/dist/table.d.ts +54 -0
  39. package/dist/table.gen.d.ts +7 -0
  40. package/dist/table.gen.js +3755 -0
  41. package/dist/table.gen.js.map +1 -0
  42. package/dist/table.js +240 -0
  43. package/dist/table.js.map +1 -0
  44. package/dist/tools.d.ts +61 -47
  45. package/dist/tools.js +231 -705
  46. package/dist/tools.js.map +1 -1
  47. package/package.json +20 -10
  48. package/src/compact.ts +127 -0
  49. package/src/handlers/_common.ts +433 -0
  50. package/src/handlers/actions.ts +144 -0
  51. package/src/handlers/render.ts +90 -0
  52. package/src/handlers/routines.ts +152 -0
  53. package/src/handlers/sandboxes.ts +110 -0
  54. package/src/handlers/vision.ts +213 -0
  55. package/src/index.ts +36 -0
  56. package/src/main.ts +79 -7
  57. package/src/server.ts +225 -19
  58. package/src/stdio.ts +107 -10
  59. package/src/table-types.ts +88 -0
  60. package/src/table.gen.ts +3812 -0
  61. package/src/table.ts +304 -0
  62. package/src/tools.ts +310 -785
  63. package/table/core.mjs +73 -0
  64. package/table/requests.json +1151 -0
  65. package/table/table.json +3764 -0
  66. package/table/tools/actions.mjs +55 -0
  67. package/table/tools/infer.mjs +52 -0
  68. package/table/tools/platform.mjs +76 -0
  69. package/table/tools/render.mjs +126 -0
  70. package/table/tools/routines.mjs +70 -0
  71. package/table/tools/sandboxes.mjs +269 -0
  72. package/table/tools/vision.mjs +316 -0
  73. package/table/tools.mjs +92 -0
@@ -0,0 +1,1151 @@
1
+ [
2
+ {
3
+ "tool": "vision_scrape",
4
+ "args": {
5
+ "url": "https://example.com",
6
+ "formats": ["markdown", "links"],
7
+ "max_chars": 2000
8
+ },
9
+ "requests": [
10
+ {
11
+ "operationId": "visionScrape",
12
+ "method": "POST",
13
+ "path": "/v1/vision/scrape",
14
+ "query": {},
15
+ "body": {
16
+ "url": "https://example.com",
17
+ "formats": ["markdown", "links"]
18
+ },
19
+ "accept": "json"
20
+ }
21
+ ]
22
+ },
23
+ {
24
+ "tool": "vision_map",
25
+ "args": {
26
+ "url": "https://example.com",
27
+ "search": "pricing"
28
+ },
29
+ "requests": [
30
+ {
31
+ "operationId": "visionMap",
32
+ "method": "POST",
33
+ "path": "/v1/vision/map",
34
+ "query": {},
35
+ "body": {
36
+ "url": "https://example.com",
37
+ "search": "pricing",
38
+ "limit": 200
39
+ },
40
+ "accept": "json"
41
+ }
42
+ ]
43
+ },
44
+ {
45
+ "tool": "vision_crawl",
46
+ "args": {
47
+ "url": "https://docs.example.com",
48
+ "limit": 5,
49
+ "include_paths": ["^/guides/"],
50
+ "wait_s": 30
51
+ },
52
+ "requests": [
53
+ {
54
+ "operationId": "visionCreateCrawl",
55
+ "method": "POST",
56
+ "path": "/v1/vision/crawls",
57
+ "query": {
58
+ "wait": "30"
59
+ },
60
+ "body": {
61
+ "url": "https://docs.example.com",
62
+ "limit": 5,
63
+ "include_paths": ["^/guides/"],
64
+ "scrape": {
65
+ "formats": ["markdown"]
66
+ }
67
+ },
68
+ "accept": "json"
69
+ },
70
+ {
71
+ "operationId": "visionListCrawlPages",
72
+ "method": "GET",
73
+ "path": "/v1/vision/crawls/crawl_01m5t4gh4qhgs70zwajezbe5p0/pages",
74
+ "query": {
75
+ "limit": "100"
76
+ },
77
+ "accept": "json"
78
+ }
79
+ ]
80
+ },
81
+ {
82
+ "tool": "vision_act",
83
+ "args": {
84
+ "url": "https://example.com",
85
+ "actions": [
86
+ {
87
+ "kind": "click",
88
+ "target": {
89
+ "selector": "#buy"
90
+ }
91
+ }
92
+ ]
93
+ },
94
+ "requests": [
95
+ {
96
+ "operationId": "visionCreateSession",
97
+ "method": "POST",
98
+ "path": "/v1/vision/sessions",
99
+ "query": {},
100
+ "body": {
101
+ "timeout_s": 600
102
+ },
103
+ "accept": "json"
104
+ },
105
+ {
106
+ "operationId": "visionAct",
107
+ "method": "POST",
108
+ "path": "/v1/vision/sessions/brs_01m5t68q1b590rj801nbzsqzkk/act",
109
+ "query": {},
110
+ "body": {
111
+ "actions": [
112
+ {
113
+ "kind": "navigate",
114
+ "url": "https://example.com"
115
+ },
116
+ {
117
+ "kind": "click",
118
+ "target": {
119
+ "selector": "#buy"
120
+ }
121
+ },
122
+ {
123
+ "kind": "markdown"
124
+ }
125
+ ],
126
+ "continue_on_error": false
127
+ },
128
+ "accept": "json"
129
+ },
130
+ {
131
+ "operationId": "visionCloseSession",
132
+ "method": "DELETE",
133
+ "path": "/v1/vision/sessions/brs_01m5t68q1b590rj801nbzsqzkk",
134
+ "query": {},
135
+ "accept": "json"
136
+ }
137
+ ]
138
+ },
139
+ {
140
+ "tool": "render_screenshot",
141
+ "args": {
142
+ "url": "https://example.com",
143
+ "viewport": {
144
+ "width": 1280,
145
+ "height": 800
146
+ },
147
+ "include_image": false
148
+ },
149
+ "requests": [
150
+ {
151
+ "operationId": "renderCreateScreenshot",
152
+ "method": "POST",
153
+ "path": "/v1/render/screenshots",
154
+ "query": {},
155
+ "body": {
156
+ "url": "https://example.com",
157
+ "viewport": {
158
+ "width": 1280,
159
+ "height": 800
160
+ }
161
+ },
162
+ "accept": "json"
163
+ }
164
+ ]
165
+ },
166
+ {
167
+ "tool": "render_video",
168
+ "args": {
169
+ "source": {
170
+ "url": "https://app.example.com"
171
+ },
172
+ "beats": [
173
+ {
174
+ "say": "Hi",
175
+ "do": [
176
+ {
177
+ "kind": "click",
178
+ "target": {
179
+ "text": "Start"
180
+ }
181
+ }
182
+ ]
183
+ }
184
+ ],
185
+ "wait_s": 10
186
+ },
187
+ "requests": [
188
+ {
189
+ "operationId": "renderCreateVideo",
190
+ "method": "POST",
191
+ "path": "/v1/render/videos",
192
+ "query": {
193
+ "wait": "10"
194
+ },
195
+ "body": {
196
+ "source": {
197
+ "url": "https://app.example.com"
198
+ },
199
+ "beats": [
200
+ {
201
+ "say": "Hi",
202
+ "do": [
203
+ {
204
+ "kind": "click",
205
+ "target": {
206
+ "text": "Start"
207
+ }
208
+ }
209
+ ]
210
+ }
211
+ ]
212
+ },
213
+ "accept": "json"
214
+ }
215
+ ]
216
+ },
217
+ {
218
+ "tool": "sandbox_create",
219
+ "args": {
220
+ "template": "base",
221
+ "env": {
222
+ "A": "1"
223
+ }
224
+ },
225
+ "requests": [
226
+ {
227
+ "operationId": "sandboxesCreateSandbox",
228
+ "method": "POST",
229
+ "path": "/v1/sandboxes",
230
+ "query": {},
231
+ "body": {
232
+ "template": "base",
233
+ "env": {
234
+ "A": "1"
235
+ }
236
+ },
237
+ "accept": "json"
238
+ }
239
+ ]
240
+ },
241
+ {
242
+ "tool": "sandbox_exec",
243
+ "args": {
244
+ "sandbox_id": "sbx_01m5t68q1b590rj801nbzsqzkk",
245
+ "cmd": ["python3", "-c", "print(1)"]
246
+ },
247
+ "requests": [
248
+ {
249
+ "operationId": "sandboxesExec",
250
+ "method": "POST",
251
+ "path": "/v1/sandboxes/sbx_01m5t68q1b590rj801nbzsqzkk/exec",
252
+ "query": {},
253
+ "body": {
254
+ "cmd": ["python3", "-c", "print(1)"]
255
+ },
256
+ "accept": "json"
257
+ }
258
+ ]
259
+ },
260
+ {
261
+ "tool": "sandbox_read_file",
262
+ "args": {
263
+ "sandbox_id": "sbx_01m5t68q1b590rj801nbzsqzkk",
264
+ "path": "/workspace/dir",
265
+ "list": true
266
+ },
267
+ "requests": [
268
+ {
269
+ "operationId": "sandboxesReadFile",
270
+ "method": "GET",
271
+ "path": "/v1/sandboxes/sbx_01m5t68q1b590rj801nbzsqzkk/files",
272
+ "query": {
273
+ "path": "/workspace/dir",
274
+ "list": "1"
275
+ },
276
+ "accept": "json"
277
+ }
278
+ ]
279
+ },
280
+ {
281
+ "tool": "sandbox_write_file",
282
+ "args": {
283
+ "sandbox_id": "sbx_01m5t68q1b590rj801nbzsqzkk",
284
+ "path": "/workspace/a.txt",
285
+ "content": "aGk=",
286
+ "encoding": "base64"
287
+ },
288
+ "requests": [
289
+ {
290
+ "operationId": "sandboxesWriteFile",
291
+ "method": "PUT",
292
+ "path": "/v1/sandboxes/sbx_01m5t68q1b590rj801nbzsqzkk/files",
293
+ "query": {
294
+ "mkdir": "1",
295
+ "path": "/workspace/a.txt"
296
+ },
297
+ "raw_base64": "aGk=",
298
+ "accept": "json"
299
+ }
300
+ ]
301
+ },
302
+ {
303
+ "tool": "sandbox_delete",
304
+ "args": {
305
+ "sandbox_id": "sbx_01m5t68q1b590rj801nbzsqzkk"
306
+ },
307
+ "requests": [
308
+ {
309
+ "operationId": "sandboxesDeleteSandbox",
310
+ "method": "DELETE",
311
+ "path": "/v1/sandboxes/sbx_01m5t68q1b590rj801nbzsqzkk",
312
+ "query": {},
313
+ "accept": "json"
314
+ }
315
+ ]
316
+ },
317
+ {
318
+ "tool": "routine_run",
319
+ "args": {
320
+ "routine": "nightly-digest",
321
+ "input": {
322
+ "day": "mon"
323
+ },
324
+ "wait_s": 5
325
+ },
326
+ "requests": [
327
+ {
328
+ "operationId": "routinesCreateRun",
329
+ "method": "POST",
330
+ "path": "/v1/routines/nightly-digest/runs",
331
+ "query": {
332
+ "wait": "5"
333
+ },
334
+ "body": {
335
+ "input": {
336
+ "day": "mon"
337
+ }
338
+ },
339
+ "accept": "json"
340
+ }
341
+ ]
342
+ },
343
+ {
344
+ "tool": "actions_search",
345
+ "args": {
346
+ "q": "create a github issue",
347
+ "limit": 5
348
+ },
349
+ "requests": [
350
+ {
351
+ "operationId": "actionsSearch",
352
+ "method": "GET",
353
+ "path": "/v1/actions/search",
354
+ "query": {
355
+ "q": "create a github issue",
356
+ "limit": "5"
357
+ },
358
+ "accept": "json"
359
+ }
360
+ ]
361
+ },
362
+ {
363
+ "tool": "actions_describe",
364
+ "args": {
365
+ "ref": "io.b3os/github/create-issue@1.2.0"
366
+ },
367
+ "requests": [
368
+ {
369
+ "operationId": "actionsDescribe",
370
+ "method": "GET",
371
+ "path": "/v1/actions/describe",
372
+ "query": {
373
+ "ref": "io.b3os/github/create-issue@1.2.0"
374
+ },
375
+ "accept": "json"
376
+ }
377
+ ]
378
+ },
379
+ {
380
+ "tool": "actions_call",
381
+ "args": {
382
+ "ref": "io.b3os/github/create-issue@1.2.0"
383
+ },
384
+ "requests": [
385
+ {
386
+ "operationId": "actionsCall",
387
+ "method": "POST",
388
+ "path": "/v1/actions/call",
389
+ "query": {},
390
+ "body": {
391
+ "ref": "io.b3os/github/create-issue@1.2.0",
392
+ "input": {}
393
+ },
394
+ "accept": "json"
395
+ }
396
+ ]
397
+ },
398
+ {
399
+ "tool": "sandbox_run_code",
400
+ "args": {
401
+ "sandbox_id": "sbx_01m5t68q1b590rj801nbzsqzkk",
402
+ "code": "1 + 1"
403
+ },
404
+ "requests": [
405
+ {
406
+ "operationId": "sandboxesRunCode",
407
+ "method": "POST",
408
+ "path": "/v1/sandboxes/sbx_01m5t68q1b590rj801nbzsqzkk/run_code",
409
+ "query": {},
410
+ "body": {
411
+ "code": "1 + 1"
412
+ },
413
+ "accept": "json"
414
+ }
415
+ ]
416
+ },
417
+ {
418
+ "tool": "sandbox_pause",
419
+ "args": {
420
+ "sandbox_id": "sbx_01m5t68q1b590rj801nbzsqzkk"
421
+ },
422
+ "requests": [
423
+ {
424
+ "operationId": "sandboxesPauseSandbox",
425
+ "method": "POST",
426
+ "path": "/v1/sandboxes/sbx_01m5t68q1b590rj801nbzsqzkk/pause",
427
+ "query": {},
428
+ "accept": "json"
429
+ }
430
+ ]
431
+ },
432
+ {
433
+ "tool": "sandbox_resume",
434
+ "args": {
435
+ "sandbox_id": "sbx_01m5t68q1b590rj801nbzsqzkk"
436
+ },
437
+ "requests": [
438
+ {
439
+ "operationId": "sandboxesResumeSandbox",
440
+ "method": "POST",
441
+ "path": "/v1/sandboxes/sbx_01m5t68q1b590rj801nbzsqzkk/resume",
442
+ "query": {},
443
+ "accept": "json"
444
+ }
445
+ ]
446
+ },
447
+ {
448
+ "tool": "sandbox_list",
449
+ "args": {
450
+ "status": "running",
451
+ "limit": 10
452
+ },
453
+ "requests": [
454
+ {
455
+ "operationId": "sandboxesListSandboxes",
456
+ "method": "GET",
457
+ "path": "/v1/sandboxes",
458
+ "query": {
459
+ "status": "running",
460
+ "limit": "10"
461
+ },
462
+ "accept": "json"
463
+ }
464
+ ]
465
+ },
466
+ {
467
+ "tool": "sandbox_get",
468
+ "args": {
469
+ "sandbox_id": "sbx_01m5t68q1b590rj801nbzsqzkk"
470
+ },
471
+ "requests": [
472
+ {
473
+ "operationId": "sandboxesGetSandbox",
474
+ "method": "GET",
475
+ "path": "/v1/sandboxes/sbx_01m5t68q1b590rj801nbzsqzkk",
476
+ "query": {},
477
+ "accept": "json"
478
+ }
479
+ ]
480
+ },
481
+ {
482
+ "tool": "sandbox_fork",
483
+ "args": {
484
+ "sandbox_id": "sbx_01m5t68q1b590rj801nbzsqzkk",
485
+ "count": 2
486
+ },
487
+ "requests": [
488
+ {
489
+ "operationId": "sandboxesForkSandbox",
490
+ "method": "POST",
491
+ "path": "/v1/sandboxes/sbx_01m5t68q1b590rj801nbzsqzkk/fork",
492
+ "query": {},
493
+ "body": {
494
+ "count": 2
495
+ },
496
+ "accept": "json"
497
+ }
498
+ ]
499
+ },
500
+ {
501
+ "tool": "sandbox_snapshot",
502
+ "args": {
503
+ "sandbox_id": "sbx_01m5t68q1b590rj801nbzsqzkk",
504
+ "name": "after-install"
505
+ },
506
+ "requests": [
507
+ {
508
+ "operationId": "sandboxesCreateSnapshot",
509
+ "method": "POST",
510
+ "path": "/v1/sandboxes/sbx_01m5t68q1b590rj801nbzsqzkk/snapshot",
511
+ "query": {},
512
+ "body": {
513
+ "name": "after-install"
514
+ },
515
+ "accept": "json"
516
+ }
517
+ ]
518
+ },
519
+ {
520
+ "tool": "sandbox_list_snapshots",
521
+ "args": {
522
+ "limit": 5
523
+ },
524
+ "requests": [
525
+ {
526
+ "operationId": "sandboxesListSnapshots",
527
+ "method": "GET",
528
+ "path": "/v1/sandboxes/snapshots",
529
+ "query": {
530
+ "limit": "5"
531
+ },
532
+ "accept": "json"
533
+ }
534
+ ]
535
+ },
536
+ {
537
+ "tool": "sandbox_get_snapshot",
538
+ "args": {
539
+ "snapshot_id": "snap_01m5t68q1b590rj801nbzsqzkk"
540
+ },
541
+ "requests": [
542
+ {
543
+ "operationId": "sandboxesGetSnapshot",
544
+ "method": "GET",
545
+ "path": "/v1/sandboxes/snapshots/snap_01m5t68q1b590rj801nbzsqzkk",
546
+ "query": {},
547
+ "accept": "json"
548
+ }
549
+ ]
550
+ },
551
+ {
552
+ "tool": "sandbox_delete_snapshot",
553
+ "args": {
554
+ "snapshot_id": "snap_01m5t68q1b590rj801nbzsqzkk"
555
+ },
556
+ "requests": [
557
+ {
558
+ "operationId": "sandboxesDeleteSnapshot",
559
+ "method": "DELETE",
560
+ "path": "/v1/sandboxes/snapshots/snap_01m5t68q1b590rj801nbzsqzkk",
561
+ "query": {},
562
+ "accept": "json"
563
+ }
564
+ ]
565
+ },
566
+ {
567
+ "tool": "sandbox_list_templates",
568
+ "args": {},
569
+ "requests": [
570
+ {
571
+ "operationId": "sandboxesListTemplates",
572
+ "method": "GET",
573
+ "path": "/v1/sandboxes/templates",
574
+ "query": {},
575
+ "accept": "json"
576
+ }
577
+ ]
578
+ },
579
+ {
580
+ "tool": "sandbox_get_template",
581
+ "args": {
582
+ "template": "code-interpreter"
583
+ },
584
+ "requests": [
585
+ {
586
+ "operationId": "sandboxesGetTemplate",
587
+ "method": "GET",
588
+ "path": "/v1/sandboxes/templates/code-interpreter",
589
+ "query": {},
590
+ "accept": "json"
591
+ }
592
+ ]
593
+ },
594
+ {
595
+ "tool": "sandbox_set_timeout",
596
+ "args": {
597
+ "sandbox_id": "sbx_01m5t68q1b590rj801nbzsqzkk",
598
+ "timeout_s": 1800
599
+ },
600
+ "requests": [
601
+ {
602
+ "operationId": "sandboxesSetTimeout",
603
+ "method": "POST",
604
+ "path": "/v1/sandboxes/sbx_01m5t68q1b590rj801nbzsqzkk/timeout",
605
+ "query": {},
606
+ "body": {
607
+ "timeout_s": 1800
608
+ },
609
+ "accept": "json"
610
+ }
611
+ ]
612
+ },
613
+ {
614
+ "tool": "sandbox_port_url",
615
+ "args": {
616
+ "sandbox_id": "sbx_01m5t68q1b590rj801nbzsqzkk",
617
+ "port": 3000,
618
+ "ttl_s": 600
619
+ },
620
+ "requests": [
621
+ {
622
+ "operationId": "sandboxesCreatePortUrl",
623
+ "method": "POST",
624
+ "path": "/v1/sandboxes/sbx_01m5t68q1b590rj801nbzsqzkk/ports/3000/url",
625
+ "query": {},
626
+ "body": {
627
+ "ttl_s": 600
628
+ },
629
+ "accept": "json"
630
+ }
631
+ ]
632
+ },
633
+ {
634
+ "tool": "sandbox_logs",
635
+ "args": {
636
+ "sandbox_id": "sbx_01m5t68q1b590rj801nbzsqzkk",
637
+ "pid": 7
638
+ },
639
+ "requests": [
640
+ {
641
+ "operationId": "sandboxesStreamLogs",
642
+ "method": "GET",
643
+ "path": "/v1/sandboxes/sbx_01m5t68q1b590rj801nbzsqzkk/logs",
644
+ "query": {
645
+ "follow": "false",
646
+ "pid": "7"
647
+ },
648
+ "accept": "events"
649
+ }
650
+ ]
651
+ },
652
+ {
653
+ "tool": "sandbox_list_processes",
654
+ "args": {
655
+ "sandbox_id": "sbx_01m5t68q1b590rj801nbzsqzkk"
656
+ },
657
+ "requests": [
658
+ {
659
+ "operationId": "sandboxesListProcesses",
660
+ "method": "GET",
661
+ "path": "/v1/sandboxes/sbx_01m5t68q1b590rj801nbzsqzkk/processes",
662
+ "query": {},
663
+ "accept": "json"
664
+ }
665
+ ]
666
+ },
667
+ {
668
+ "tool": "sandbox_kill_process",
669
+ "args": {
670
+ "sandbox_id": "sbx_01m5t68q1b590rj801nbzsqzkk",
671
+ "pid": 7,
672
+ "signal": "KILL"
673
+ },
674
+ "requests": [
675
+ {
676
+ "operationId": "sandboxesKillProcess",
677
+ "method": "POST",
678
+ "path": "/v1/sandboxes/sbx_01m5t68q1b590rj801nbzsqzkk/processes/7/kill",
679
+ "query": {},
680
+ "body": {
681
+ "signal": "KILL"
682
+ },
683
+ "accept": "json"
684
+ }
685
+ ]
686
+ },
687
+ {
688
+ "tool": "vision_search",
689
+ "args": {
690
+ "query": "rust async runtime",
691
+ "limit": 3
692
+ },
693
+ "requests": [
694
+ {
695
+ "operationId": "visionSearch",
696
+ "method": "POST",
697
+ "path": "/v1/vision/search",
698
+ "query": {},
699
+ "body": {
700
+ "query": "rust async runtime",
701
+ "limit": 3
702
+ },
703
+ "accept": "json"
704
+ }
705
+ ]
706
+ },
707
+ {
708
+ "tool": "vision_batch",
709
+ "args": {
710
+ "urls": ["https://example.com/a", "https://example.com/b"],
711
+ "wait_s": 20
712
+ },
713
+ "requests": [
714
+ {
715
+ "operationId": "visionCreateBatch",
716
+ "method": "POST",
717
+ "path": "/v1/vision/batches",
718
+ "query": {
719
+ "wait": "20"
720
+ },
721
+ "body": {
722
+ "urls": ["https://example.com/a", "https://example.com/b"],
723
+ "scrape": {
724
+ "formats": ["markdown"]
725
+ }
726
+ },
727
+ "accept": "json"
728
+ },
729
+ {
730
+ "operationId": "visionListBatchPages",
731
+ "method": "GET",
732
+ "path": "/v1/vision/batches/batch_01m5t4gh4qhgs70zwajezbe5p0/pages",
733
+ "query": {
734
+ "limit": "100"
735
+ },
736
+ "accept": "json"
737
+ }
738
+ ]
739
+ },
740
+ {
741
+ "tool": "vision_cancel_batch",
742
+ "args": {
743
+ "batch_id": "batch_01m5t4gh4qhgs70zwajezbe5p0"
744
+ },
745
+ "requests": [
746
+ {
747
+ "operationId": "visionCancelBatch",
748
+ "method": "POST",
749
+ "path": "/v1/vision/batches/batch_01m5t4gh4qhgs70zwajezbe5p0/cancel",
750
+ "query": {},
751
+ "accept": "json"
752
+ }
753
+ ]
754
+ },
755
+ {
756
+ "tool": "vision_cancel_crawl",
757
+ "args": {
758
+ "crawl_id": "crawl_01m5t4gh4qhgs70zwajezbe5p0"
759
+ },
760
+ "requests": [
761
+ {
762
+ "operationId": "visionCancelCrawl",
763
+ "method": "POST",
764
+ "path": "/v1/vision/crawls/crawl_01m5t4gh4qhgs70zwajezbe5p0/cancel",
765
+ "query": {},
766
+ "accept": "json"
767
+ }
768
+ ]
769
+ },
770
+ {
771
+ "tool": "vision_create_session",
772
+ "args": {
773
+ "profile": "work",
774
+ "timeout_s": 300
775
+ },
776
+ "requests": [
777
+ {
778
+ "operationId": "visionCreateSession",
779
+ "method": "POST",
780
+ "path": "/v1/vision/sessions",
781
+ "query": {},
782
+ "body": {
783
+ "profile": "work",
784
+ "timeout_s": 300
785
+ },
786
+ "accept": "json"
787
+ }
788
+ ]
789
+ },
790
+ {
791
+ "tool": "vision_list_sessions",
792
+ "args": {
793
+ "status": "active"
794
+ },
795
+ "requests": [
796
+ {
797
+ "operationId": "visionListSessions",
798
+ "method": "GET",
799
+ "path": "/v1/vision/sessions",
800
+ "query": {
801
+ "status": "active"
802
+ },
803
+ "accept": "json"
804
+ }
805
+ ]
806
+ },
807
+ {
808
+ "tool": "vision_get_session",
809
+ "args": {
810
+ "session_id": "brs_01m5t68q1b590rj801nbzsqzkk"
811
+ },
812
+ "requests": [
813
+ {
814
+ "operationId": "visionGetSession",
815
+ "method": "GET",
816
+ "path": "/v1/vision/sessions/brs_01m5t68q1b590rj801nbzsqzkk",
817
+ "query": {},
818
+ "accept": "json"
819
+ }
820
+ ]
821
+ },
822
+ {
823
+ "tool": "vision_close_session",
824
+ "args": {
825
+ "session_id": "brs_01m5t68q1b590rj801nbzsqzkk"
826
+ },
827
+ "requests": [
828
+ {
829
+ "operationId": "visionCloseSession",
830
+ "method": "DELETE",
831
+ "path": "/v1/vision/sessions/brs_01m5t68q1b590rj801nbzsqzkk",
832
+ "query": {},
833
+ "accept": "json"
834
+ }
835
+ ]
836
+ },
837
+ {
838
+ "tool": "vision_save_profile",
839
+ "args": {
840
+ "session_id": "brs_01m5t68q1b590rj801nbzsqzkk",
841
+ "name": "work"
842
+ },
843
+ "requests": [
844
+ {
845
+ "operationId": "visionSaveSessionProfile",
846
+ "method": "POST",
847
+ "path": "/v1/vision/sessions/brs_01m5t68q1b590rj801nbzsqzkk/profile",
848
+ "query": {},
849
+ "body": {
850
+ "name": "work"
851
+ },
852
+ "accept": "json"
853
+ }
854
+ ]
855
+ },
856
+ {
857
+ "tool": "vision_list_profiles",
858
+ "args": {},
859
+ "requests": [
860
+ {
861
+ "operationId": "visionListProfiles",
862
+ "method": "GET",
863
+ "path": "/v1/vision/profiles",
864
+ "query": {},
865
+ "accept": "json"
866
+ }
867
+ ]
868
+ },
869
+ {
870
+ "tool": "vision_get_profile",
871
+ "args": {
872
+ "profile_id": "prof_01m5t68q1b590rj801nbzsqzkk"
873
+ },
874
+ "requests": [
875
+ {
876
+ "operationId": "visionGetProfile",
877
+ "method": "GET",
878
+ "path": "/v1/vision/profiles/prof_01m5t68q1b590rj801nbzsqzkk",
879
+ "query": {},
880
+ "accept": "json"
881
+ }
882
+ ]
883
+ },
884
+ {
885
+ "tool": "vision_update_profile",
886
+ "args": {
887
+ "profile_id": "prof_01m5t68q1b590rj801nbzsqzkk",
888
+ "name": "work-2"
889
+ },
890
+ "requests": [
891
+ {
892
+ "operationId": "visionUpdateProfile",
893
+ "method": "PATCH",
894
+ "path": "/v1/vision/profiles/prof_01m5t68q1b590rj801nbzsqzkk",
895
+ "query": {},
896
+ "body": {
897
+ "name": "work-2"
898
+ },
899
+ "accept": "json"
900
+ }
901
+ ]
902
+ },
903
+ {
904
+ "tool": "vision_delete_profile",
905
+ "args": {
906
+ "profile_id": "prof_01m5t68q1b590rj801nbzsqzkk"
907
+ },
908
+ "requests": [
909
+ {
910
+ "operationId": "visionDeleteProfile",
911
+ "method": "DELETE",
912
+ "path": "/v1/vision/profiles/prof_01m5t68q1b590rj801nbzsqzkk",
913
+ "query": {},
914
+ "accept": "json"
915
+ }
916
+ ]
917
+ },
918
+ {
919
+ "tool": "routine_get_run",
920
+ "args": {
921
+ "run_id": "run_01m5t68q1b590rj801nbzsqzkk"
922
+ },
923
+ "requests": [
924
+ {
925
+ "operationId": "routinesGetRun",
926
+ "method": "GET",
927
+ "path": "/v1/routines/runs/run_01m5t68q1b590rj801nbzsqzkk",
928
+ "query": {},
929
+ "accept": "json"
930
+ }
931
+ ]
932
+ },
933
+ {
934
+ "tool": "routine_validate",
935
+ "args": {
936
+ "definition": {
937
+ "name": "hello",
938
+ "steps": [
939
+ {
940
+ "id": "say",
941
+ "uses": "core/log@1",
942
+ "with": {
943
+ "message": "hi"
944
+ }
945
+ }
946
+ ]
947
+ }
948
+ },
949
+ "requests": [
950
+ {
951
+ "operationId": "routinesValidateRoutine",
952
+ "method": "POST",
953
+ "path": "/v1/routines/validate",
954
+ "query": {},
955
+ "body": {
956
+ "name": "hello",
957
+ "steps": [
958
+ {
959
+ "id": "say",
960
+ "uses": "core/log@1",
961
+ "with": {
962
+ "message": "hi"
963
+ }
964
+ }
965
+ ]
966
+ },
967
+ "accept": "json"
968
+ }
969
+ ]
970
+ },
971
+ {
972
+ "tool": "routine_signal",
973
+ "args": {
974
+ "run_id": "run_01m5t68q1b590rj801nbzsqzkk",
975
+ "name": "approved"
976
+ },
977
+ "requests": [
978
+ {
979
+ "operationId": "routinesSignalRun",
980
+ "method": "POST",
981
+ "path": "/v1/routines/runs/run_01m5t68q1b590rj801nbzsqzkk/signal",
982
+ "query": {},
983
+ "body": {
984
+ "name": "approved"
985
+ },
986
+ "accept": "json"
987
+ }
988
+ ]
989
+ },
990
+ {
991
+ "tool": "infer_chat",
992
+ "args": {
993
+ "model": "b3os/qwen3.5-9b",
994
+ "messages": [
995
+ {
996
+ "role": "user",
997
+ "content": "hi"
998
+ }
999
+ ]
1000
+ },
1001
+ "requests": [
1002
+ {
1003
+ "operationId": "inferCreateChatCompletion",
1004
+ "method": "POST",
1005
+ "path": "/v1/infer/chat/completions",
1006
+ "query": {},
1007
+ "body": {
1008
+ "model": "b3os/qwen3.5-9b",
1009
+ "messages": [
1010
+ {
1011
+ "role": "user",
1012
+ "content": "hi"
1013
+ }
1014
+ ]
1015
+ },
1016
+ "accept": "json"
1017
+ }
1018
+ ]
1019
+ },
1020
+ {
1021
+ "tool": "infer_models",
1022
+ "args": {},
1023
+ "requests": [
1024
+ {
1025
+ "operationId": "inferListModels",
1026
+ "method": "GET",
1027
+ "path": "/v1/infer/models",
1028
+ "query": {},
1029
+ "accept": "json"
1030
+ }
1031
+ ]
1032
+ },
1033
+ {
1034
+ "tool": "infer_voices",
1035
+ "args": {
1036
+ "model": "kokoro-82m"
1037
+ },
1038
+ "requests": [
1039
+ {
1040
+ "operationId": "inferListVoices",
1041
+ "method": "GET",
1042
+ "path": "/v1/infer/audio/voices",
1043
+ "query": {
1044
+ "model": "kokoro-82m"
1045
+ },
1046
+ "accept": "json"
1047
+ }
1048
+ ]
1049
+ },
1050
+ {
1051
+ "tool": "usage_get",
1052
+ "args": {
1053
+ "group_by": "unit"
1054
+ },
1055
+ "requests": [
1056
+ {
1057
+ "operationId": "platformGetUsage",
1058
+ "method": "GET",
1059
+ "path": "/v1/usage",
1060
+ "query": {
1061
+ "group_by": "unit"
1062
+ },
1063
+ "accept": "json"
1064
+ }
1065
+ ]
1066
+ },
1067
+ {
1068
+ "tool": "limits_get",
1069
+ "args": {},
1070
+ "requests": [
1071
+ {
1072
+ "operationId": "platformGetLimits",
1073
+ "method": "GET",
1074
+ "path": "/v1/limits",
1075
+ "query": {},
1076
+ "accept": "json"
1077
+ }
1078
+ ]
1079
+ },
1080
+ {
1081
+ "tool": "requests_list",
1082
+ "args": {
1083
+ "product": "sandboxes",
1084
+ "status": "5xx",
1085
+ "limit": 20
1086
+ },
1087
+ "requests": [
1088
+ {
1089
+ "operationId": "platformListRequests",
1090
+ "method": "GET",
1091
+ "path": "/v1/requests",
1092
+ "query": {
1093
+ "product": "sandboxes",
1094
+ "status": "5xx",
1095
+ "limit": "20"
1096
+ },
1097
+ "accept": "json"
1098
+ }
1099
+ ]
1100
+ },
1101
+ {
1102
+ "tool": "requests_get",
1103
+ "args": {
1104
+ "request_id": "req_01m5t68q1b590rj801nbzsqzkk"
1105
+ },
1106
+ "requests": [
1107
+ {
1108
+ "operationId": "platformGetRequest",
1109
+ "method": "GET",
1110
+ "path": "/v1/requests/req_01m5t68q1b590rj801nbzsqzkk",
1111
+ "query": {},
1112
+ "accept": "json"
1113
+ }
1114
+ ]
1115
+ },
1116
+ {
1117
+ "tool": "webhooks_list_deliveries",
1118
+ "args": {
1119
+ "status": "failed"
1120
+ },
1121
+ "requests": [
1122
+ {
1123
+ "operationId": "webhooksListDeliveries",
1124
+ "method": "GET",
1125
+ "path": "/v1/webhooks/deliveries",
1126
+ "query": {
1127
+ "status": "failed"
1128
+ },
1129
+ "accept": "json"
1130
+ }
1131
+ ]
1132
+ },
1133
+ {
1134
+ "tool": "webhooks_send_test",
1135
+ "args": {
1136
+ "url": "https://hooks.example.com/b3os"
1137
+ },
1138
+ "requests": [
1139
+ {
1140
+ "operationId": "webhooksSendTest",
1141
+ "method": "POST",
1142
+ "path": "/v1/webhooks/test",
1143
+ "query": {},
1144
+ "body": {
1145
+ "url": "https://hooks.example.com/b3os"
1146
+ },
1147
+ "accept": "json"
1148
+ }
1149
+ ]
1150
+ }
1151
+ ]