@b3os/mcp 0.2.1 → 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.
Files changed (61) hide show
  1. package/README.md +31 -6
  2. package/dist/handlers/_common.d.ts +27 -0
  3. package/dist/handlers/_common.js +39 -0
  4. package/dist/handlers/_common.js.map +1 -1
  5. package/dist/handlers/actions.d.ts +12 -1
  6. package/dist/handlers/actions.js +51 -2
  7. package/dist/handlers/actions.js.map +1 -1
  8. package/dist/handlers/agents.d.ts +2 -0
  9. package/dist/handlers/agents.js +41 -0
  10. package/dist/handlers/agents.js.map +1 -0
  11. package/dist/handlers/platform.d.ts +32 -0
  12. package/dist/handlers/platform.js +675 -0
  13. package/dist/handlers/platform.js.map +1 -0
  14. package/dist/handlers/render.d.ts +13 -0
  15. package/dist/handlers/render.js +170 -18
  16. package/dist/handlers/render.js.map +1 -1
  17. package/dist/handlers/routines.d.ts +8 -2
  18. package/dist/handlers/routines.js +175 -15
  19. package/dist/handlers/routines.js.map +1 -1
  20. package/dist/handlers/sandboxes.js +232 -15
  21. package/dist/handlers/sandboxes.js.map +1 -1
  22. package/dist/handlers/vision.d.ts +1 -6
  23. package/dist/handlers/vision.js +1 -13
  24. package/dist/handlers/vision.js.map +1 -1
  25. package/dist/server.d.ts +4 -0
  26. package/dist/server.js +4 -1
  27. package/dist/server.js.map +1 -1
  28. package/dist/stdio.d.ts +8 -0
  29. package/dist/stdio.js +18 -1
  30. package/dist/stdio.js.map +1 -1
  31. package/dist/table.gen.js +4868 -701
  32. package/dist/table.gen.js.map +1 -1
  33. package/dist/table.js +4 -0
  34. package/dist/table.js.map +1 -1
  35. package/dist/tools.js +3 -0
  36. package/dist/tools.js.map +1 -1
  37. package/package.json +2 -2
  38. package/src/handlers/_common.ts +53 -0
  39. package/src/handlers/actions.ts +50 -2
  40. package/src/handlers/agents.ts +50 -0
  41. package/src/handlers/platform.ts +728 -0
  42. package/src/handlers/render.ts +173 -16
  43. package/src/handlers/routines.ts +186 -14
  44. package/src/handlers/sandboxes.ts +259 -11
  45. package/src/handlers/vision.ts +1 -11
  46. package/src/server.ts +7 -1
  47. package/src/stdio.ts +21 -1
  48. package/src/table.gen.ts +4952 -707
  49. package/src/table.ts +4 -0
  50. package/src/tools.ts +3 -0
  51. package/table/core.mjs +13 -2
  52. package/table/node-toolsets.json +668 -0
  53. package/table/requests.json +1008 -10
  54. package/table/table.json +4869 -680
  55. package/table/tools/agents.mjs +232 -0
  56. package/table/tools/listeners.mjs +124 -0
  57. package/table/tools/platform.mjs +136 -3
  58. package/table/tools/render.mjs +196 -3
  59. package/table/tools/routines.mjs +55 -0
  60. package/table/tools/sandboxes.mjs +236 -1
  61. package/table/tools.mjs +3 -1
@@ -497,6 +497,54 @@
497
497
  }
498
498
  ]
499
499
  },
500
+ {
501
+ "tool": "sandbox_swarm",
502
+ "args": {
503
+ "from": {
504
+ "sandbox": "sbx_01m5t68q1b590rj801nbzsqzkk"
505
+ },
506
+ "count": 3,
507
+ "defaults": {
508
+ "cmd": "pytest -k shard_$B3OS_SWARM_INDEX"
509
+ },
510
+ "stop_when": "all",
511
+ "wait_s": 30
512
+ },
513
+ "requests": [
514
+ {
515
+ "operationId": "sandboxesCreateSwarm",
516
+ "method": "POST",
517
+ "path": "/v1/sandboxes/swarms",
518
+ "query": {},
519
+ "body": {
520
+ "from": {
521
+ "sandbox": "sbx_01m5t68q1b590rj801nbzsqzkk"
522
+ },
523
+ "count": 3,
524
+ "defaults": {
525
+ "cmd": "pytest -k shard_$B3OS_SWARM_INDEX"
526
+ },
527
+ "stop_when": "all"
528
+ },
529
+ "accept": "json"
530
+ }
531
+ ]
532
+ },
533
+ {
534
+ "tool": "sandbox_cancel_swarm",
535
+ "args": {
536
+ "swarm_id": "swm_01m5t9k2hz4qv8e3c7rn0d6xja"
537
+ },
538
+ "requests": [
539
+ {
540
+ "operationId": "sandboxesCancelSwarm",
541
+ "method": "POST",
542
+ "path": "/v1/sandboxes/swarms/swm_01m5t9k2hz4qv8e3c7rn0d6xja/cancel",
543
+ "query": {},
544
+ "accept": "json"
545
+ }
546
+ ]
547
+ },
500
548
  {
501
549
  "tool": "sandbox_snapshot",
502
550
  "args": {
@@ -630,6 +678,28 @@
630
678
  }
631
679
  ]
632
680
  },
681
+ {
682
+ "tool": "sandbox_port_host",
683
+ "args": {
684
+ "sandbox_id": "sbx_01m5t68q1b590rj801nbzsqzkk",
685
+ "port": 3000,
686
+ "ttl_s": 600,
687
+ "rotate": false
688
+ },
689
+ "requests": [
690
+ {
691
+ "operationId": "platformCreatePortHost",
692
+ "method": "POST",
693
+ "path": "/v1/sandboxes/sbx_01m5t68q1b590rj801nbzsqzkk/ports/3000/host",
694
+ "query": {},
695
+ "body": {
696
+ "ttl_s": 600,
697
+ "rotate": false
698
+ },
699
+ "accept": "json"
700
+ }
701
+ ]
702
+ },
633
703
  {
634
704
  "tool": "sandbox_logs",
635
705
  "args": {
@@ -684,6 +754,176 @@
684
754
  }
685
755
  ]
686
756
  },
757
+ {
758
+ "tool": "desktop_create",
759
+ "args": {
760
+ "timeout_s": 900,
761
+ "on_idle": "pause",
762
+ "metadata": {
763
+ "task": "checkout-test"
764
+ }
765
+ },
766
+ "requests": [
767
+ {
768
+ "operationId": "sandboxesCreateSandbox",
769
+ "method": "POST",
770
+ "path": "/v1/sandboxes",
771
+ "query": {},
772
+ "body": {
773
+ "timeout_s": 900,
774
+ "on_idle": "pause",
775
+ "metadata": {
776
+ "task": "checkout-test"
777
+ },
778
+ "template": "desktop"
779
+ },
780
+ "accept": "json"
781
+ }
782
+ ]
783
+ },
784
+ {
785
+ "tool": "desktop_list",
786
+ "args": {
787
+ "status": "running"
788
+ },
789
+ "requests": [
790
+ {
791
+ "operationId": "sandboxesListSandboxes",
792
+ "method": "GET",
793
+ "path": "/v1/sandboxes",
794
+ "query": {
795
+ "status": "running",
796
+ "limit": "100"
797
+ },
798
+ "accept": "json"
799
+ }
800
+ ]
801
+ },
802
+ {
803
+ "tool": "desktop_delete",
804
+ "args": {
805
+ "sandbox_id": "sbx_01m5t68q1b590rj801nbzsqzkk"
806
+ },
807
+ "requests": [
808
+ {
809
+ "operationId": "sandboxesDeleteSandbox",
810
+ "method": "DELETE",
811
+ "path": "/v1/sandboxes/sbx_01m5t68q1b590rj801nbzsqzkk",
812
+ "query": {},
813
+ "accept": "json"
814
+ }
815
+ ]
816
+ },
817
+ {
818
+ "tool": "desktop_room",
819
+ "args": {
820
+ "memory_mib": 2048
821
+ },
822
+ "requests": [
823
+ {
824
+ "operationId": "sandboxesGetCapacity",
825
+ "method": "GET",
826
+ "path": "/v1/sandboxes/capacity",
827
+ "query": {
828
+ "template": "desktop",
829
+ "memory_mib": "2048"
830
+ },
831
+ "accept": "json"
832
+ }
833
+ ]
834
+ },
835
+ {
836
+ "tool": "desktop_screenshot",
837
+ "args": {
838
+ "sandbox_id": "sbx_01m5t68q1b590rj801nbzsqzkk",
839
+ "format": "png"
840
+ },
841
+ "requests": [
842
+ {
843
+ "operationId": "sandboxesComputerScreenshot",
844
+ "method": "GET",
845
+ "path": "/v1/sandboxes/sbx_01m5t68q1b590rj801nbzsqzkk/computer/screenshot",
846
+ "query": {
847
+ "format": "png"
848
+ },
849
+ "accept": "json"
850
+ }
851
+ ]
852
+ },
853
+ {
854
+ "tool": "desktop_act",
855
+ "args": {
856
+ "sandbox_id": "sbx_01m5t68q1b590rj801nbzsqzkk",
857
+ "actions": [
858
+ {
859
+ "action": "click",
860
+ "x": 640,
861
+ "y": 60
862
+ },
863
+ {
864
+ "action": "type",
865
+ "text": "docs.beta.b3os.org"
866
+ },
867
+ {
868
+ "action": "key",
869
+ "keys": "Return"
870
+ }
871
+ ]
872
+ },
873
+ "requests": [
874
+ {
875
+ "operationId": "sandboxesComputerAct",
876
+ "method": "POST",
877
+ "path": "/v1/sandboxes/sbx_01m5t68q1b590rj801nbzsqzkk/computer/actions",
878
+ "query": {},
879
+ "body": {
880
+ "actions": [
881
+ {
882
+ "action": "click",
883
+ "x": 640,
884
+ "y": 60
885
+ },
886
+ {
887
+ "action": "type",
888
+ "text": "docs.beta.b3os.org"
889
+ },
890
+ {
891
+ "action": "key",
892
+ "keys": "Return"
893
+ }
894
+ ],
895
+ "screenshot": {
896
+ "format": "jpeg",
897
+ "quality": 80
898
+ },
899
+ "settle": {
900
+ "quiet_ms": 80,
901
+ "max_ms": 1000
902
+ }
903
+ },
904
+ "accept": "json"
905
+ }
906
+ ]
907
+ },
908
+ {
909
+ "tool": "desktop_run",
910
+ "args": {
911
+ "sandbox_id": "sbx_01m5t68q1b590rj801nbzsqzkk",
912
+ "cmd": "xdotool getmouselocation"
913
+ },
914
+ "requests": [
915
+ {
916
+ "operationId": "sandboxesExec",
917
+ "method": "POST",
918
+ "path": "/v1/sandboxes/sbx_01m5t68q1b590rj801nbzsqzkk/exec",
919
+ "query": {},
920
+ "body": {
921
+ "cmd": "xdotool getmouselocation"
922
+ },
923
+ "accept": "json"
924
+ }
925
+ ]
926
+ },
687
927
  {
688
928
  "tool": "vision_search",
689
929
  "args": {
@@ -915,6 +1155,26 @@
915
1155
  }
916
1156
  ]
917
1157
  },
1158
+ {
1159
+ "tool": "routine_list_runs",
1160
+ "args": {
1161
+ "routine": "nightly-digest",
1162
+ "status": "failed",
1163
+ "limit": 5
1164
+ },
1165
+ "requests": [
1166
+ {
1167
+ "operationId": "routinesListRuns",
1168
+ "method": "GET",
1169
+ "path": "/v1/routines/nightly-digest/runs",
1170
+ "query": {
1171
+ "limit": "5",
1172
+ "status": "failed"
1173
+ },
1174
+ "accept": "json"
1175
+ }
1176
+ ]
1177
+ },
918
1178
  {
919
1179
  "tool": "routine_get_run",
920
1180
  "args": {
@@ -930,6 +1190,67 @@
930
1190
  }
931
1191
  ]
932
1192
  },
1193
+ {
1194
+ "tool": "routine_run_events",
1195
+ "args": {
1196
+ "run_id": "run_01m5t68q1b590rj801nbzsqzkk",
1197
+ "max_events": 20
1198
+ },
1199
+ "requests": [
1200
+ {
1201
+ "operationId": "routinesGetRun",
1202
+ "method": "GET",
1203
+ "path": "/v1/routines/runs/run_01m5t68q1b590rj801nbzsqzkk",
1204
+ "query": {},
1205
+ "accept": "json"
1206
+ },
1207
+ {
1208
+ "operationId": "routinesRunEvents",
1209
+ "method": "GET",
1210
+ "path": "/v1/routines/runs/run_01m5t68q1b590rj801nbzsqzkk/events",
1211
+ "query": {},
1212
+ "accept": "events"
1213
+ }
1214
+ ]
1215
+ },
1216
+ {
1217
+ "tool": "routine_publish",
1218
+ "args": {
1219
+ "definition": {
1220
+ "name": "hello",
1221
+ "steps": [
1222
+ {
1223
+ "id": "say",
1224
+ "uses": "core/log@1",
1225
+ "with": {
1226
+ "message": "hi"
1227
+ }
1228
+ }
1229
+ ]
1230
+ }
1231
+ },
1232
+ "requests": [
1233
+ {
1234
+ "operationId": "routinesPublishRoutine",
1235
+ "method": "PUT",
1236
+ "path": "/v1/routines/hello",
1237
+ "query": {},
1238
+ "body": {
1239
+ "name": "hello",
1240
+ "steps": [
1241
+ {
1242
+ "id": "say",
1243
+ "uses": "core/log@1",
1244
+ "with": {
1245
+ "message": "hi"
1246
+ }
1247
+ }
1248
+ ]
1249
+ },
1250
+ "accept": "json"
1251
+ }
1252
+ ]
1253
+ },
933
1254
  {
934
1255
  "tool": "routine_validate",
935
1256
  "args": {
@@ -1110,36 +1431,129 @@
1110
1431
  "path": "/v1/requests/req_01m5t68q1b590rj801nbzsqzkk",
1111
1432
  "query": {},
1112
1433
  "accept": "json"
1434
+ },
1435
+ {
1436
+ "operationId": "platformListUsageRecords",
1437
+ "method": "GET",
1438
+ "path": "/v1/usage/records",
1439
+ "query": {
1440
+ "request_id": "req_01m5t68q1b590rj801nbzsqzkk",
1441
+ "limit": "100"
1442
+ },
1443
+ "accept": "json"
1113
1444
  }
1114
1445
  ]
1115
1446
  },
1116
1447
  {
1117
- "tool": "webhooks_list_deliveries",
1448
+ "tool": "traces_list",
1118
1449
  "args": {
1119
- "status": "failed"
1450
+ "status": "error",
1451
+ "limit": 5
1120
1452
  },
1121
1453
  "requests": [
1122
1454
  {
1123
- "operationId": "webhooksListDeliveries",
1455
+ "operationId": "platformListRequests",
1124
1456
  "method": "GET",
1125
- "path": "/v1/webhooks/deliveries",
1457
+ "path": "/v1/requests",
1126
1458
  "query": {
1127
- "status": "failed"
1459
+ "limit": "100"
1128
1460
  },
1129
1461
  "accept": "json"
1130
1462
  }
1131
1463
  ]
1132
1464
  },
1133
1465
  {
1134
- "tool": "webhooks_send_test",
1466
+ "tool": "traces_get",
1135
1467
  "args": {
1136
- "url": "https://hooks.example.com/b3os"
1468
+ "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736"
1137
1469
  },
1138
1470
  "requests": [
1139
1471
  {
1140
- "operationId": "webhooksSendTest",
1141
- "method": "POST",
1142
- "path": "/v1/webhooks/test",
1472
+ "operationId": "platformGetTrace",
1473
+ "method": "GET",
1474
+ "path": "/v1/traces/4bf92f3577b34da6a3ce929d0e0e4736",
1475
+ "query": {},
1476
+ "accept": "json"
1477
+ }
1478
+ ]
1479
+ },
1480
+ {
1481
+ "tool": "llm_calls_list",
1482
+ "args": {
1483
+ "model": "b3os/qwen3.5-9b",
1484
+ "limit": 5
1485
+ },
1486
+ "requests": [
1487
+ {
1488
+ "operationId": "platformListLlmCalls",
1489
+ "method": "GET",
1490
+ "path": "/v1/llm-calls",
1491
+ "query": {
1492
+ "limit": "5",
1493
+ "model": "b3os/qwen3.5-9b"
1494
+ },
1495
+ "accept": "json"
1496
+ }
1497
+ ]
1498
+ },
1499
+ {
1500
+ "tool": "llm_calls_get",
1501
+ "args": {
1502
+ "request_id": "req_01m5t6d8ksbzrfxhqhzge06mqn"
1503
+ },
1504
+ "requests": [
1505
+ {
1506
+ "operationId": "platformGetLlmCall",
1507
+ "method": "GET",
1508
+ "path": "/v1/llm-calls/req_01m5t6d8ksbzrfxhqhzge06mqn",
1509
+ "query": {},
1510
+ "accept": "json"
1511
+ }
1512
+ ]
1513
+ },
1514
+ {
1515
+ "tool": "llm_calls_get_prompt_and_answer",
1516
+ "args": {
1517
+ "request_id": "req_01m5t6d8ksbzrfxhqhzge06mqn",
1518
+ "max_chars": 4000
1519
+ },
1520
+ "requests": [
1521
+ {
1522
+ "operationId": "platformGetLlmCallContent",
1523
+ "method": "GET",
1524
+ "path": "/v1/llm-calls/req_01m5t6d8ksbzrfxhqhzge06mqn/content",
1525
+ "query": {},
1526
+ "accept": "json"
1527
+ }
1528
+ ]
1529
+ },
1530
+ {
1531
+ "tool": "webhooks_list_deliveries",
1532
+ "args": {
1533
+ "status": "failed"
1534
+ },
1535
+ "requests": [
1536
+ {
1537
+ "operationId": "webhooksListDeliveries",
1538
+ "method": "GET",
1539
+ "path": "/v1/webhooks/deliveries",
1540
+ "query": {
1541
+ "status": "failed"
1542
+ },
1543
+ "accept": "json"
1544
+ }
1545
+ ]
1546
+ },
1547
+ {
1548
+ "tool": "webhooks_send_test",
1549
+ "args": {
1550
+ "url": "https://hooks.example.com/b3os"
1551
+ },
1552
+ "requests": [
1553
+ {
1554
+ "operationId": "webhooksSendTest",
1555
+ "method": "POST",
1556
+ "path": "/v1/webhooks/test",
1143
1557
  "query": {},
1144
1558
  "body": {
1145
1559
  "url": "https://hooks.example.com/b3os"
@@ -1147,5 +1561,589 @@
1147
1561
  "accept": "json"
1148
1562
  }
1149
1563
  ]
1564
+ },
1565
+ {
1566
+ "tool": "render_inspect",
1567
+ "args": {
1568
+ "url": "https://beta.b3os.org/demo/billing/",
1569
+ "steps": [
1570
+ {
1571
+ "kind": "click",
1572
+ "target": {
1573
+ "text": "Annual",
1574
+ "exact": true
1575
+ }
1576
+ }
1577
+ ],
1578
+ "duration_ms": 2000
1579
+ },
1580
+ "requests": [
1581
+ {
1582
+ "operationId": "renderCreateInspection",
1583
+ "method": "POST",
1584
+ "path": "/v1/render/inspections",
1585
+ "query": {},
1586
+ "body": {
1587
+ "url": "https://beta.b3os.org/demo/billing/",
1588
+ "steps": [
1589
+ {
1590
+ "kind": "click",
1591
+ "target": {
1592
+ "text": "Annual",
1593
+ "exact": true
1594
+ }
1595
+ }
1596
+ ],
1597
+ "duration_ms": 2000
1598
+ },
1599
+ "accept": "json"
1600
+ }
1601
+ ]
1602
+ },
1603
+ {
1604
+ "tool": "render_get",
1605
+ "args": {
1606
+ "video_id": "vid_01m5t68q1b590rj801nbzsqzkk"
1607
+ },
1608
+ "requests": [
1609
+ {
1610
+ "operationId": "renderGetVideo",
1611
+ "method": "GET",
1612
+ "path": "/v1/render/videos/vid_01m5t68q1b590rj801nbzsqzkk",
1613
+ "query": {},
1614
+ "accept": "json"
1615
+ }
1616
+ ]
1617
+ },
1618
+ {
1619
+ "tool": "render_restyle",
1620
+ "args": {
1621
+ "video_id": "vid_01m5t68q1b590rj801nbzsqzkk",
1622
+ "style": {
1623
+ "background": "midnight",
1624
+ "frame": "browser-dark"
1625
+ },
1626
+ "alias": "billing-tour",
1627
+ "wait_s": 10
1628
+ },
1629
+ "requests": [
1630
+ {
1631
+ "operationId": "renderRestyleVideo",
1632
+ "method": "POST",
1633
+ "path": "/v1/render/videos/vid_01m5t68q1b590rj801nbzsqzkk/restyle",
1634
+ "query": {
1635
+ "wait": "10"
1636
+ },
1637
+ "body": {
1638
+ "style": {
1639
+ "background": "midnight",
1640
+ "frame": "browser-dark"
1641
+ },
1642
+ "alias": "billing-tour"
1643
+ },
1644
+ "accept": "json"
1645
+ }
1646
+ ]
1647
+ },
1648
+ {
1649
+ "tool": "render_presets",
1650
+ "args": {
1651
+ "kind": "background"
1652
+ },
1653
+ "requests": [
1654
+ {
1655
+ "operationId": "renderListPresets",
1656
+ "method": "GET",
1657
+ "path": "/v1/render/presets",
1658
+ "query": {
1659
+ "kind": "background"
1660
+ },
1661
+ "accept": "json"
1662
+ }
1663
+ ]
1664
+ },
1665
+ {
1666
+ "tool": "render_share",
1667
+ "args": {
1668
+ "alias": "billing-tour",
1669
+ "title": "Billing in 30 seconds"
1670
+ },
1671
+ "requests": [
1672
+ {
1673
+ "operationId": "renderShareAlias",
1674
+ "method": "POST",
1675
+ "path": "/v1/render/aliases/billing-tour/share",
1676
+ "query": {},
1677
+ "body": {
1678
+ "title": "Billing in 30 seconds"
1679
+ },
1680
+ "accept": "json"
1681
+ }
1682
+ ]
1683
+ },
1684
+ {
1685
+ "tool": "render_screenshot_file",
1686
+ "args": {
1687
+ "url": "https://example.com",
1688
+ "path": "shot.png"
1689
+ },
1690
+ "requests": [
1691
+ {
1692
+ "operationId": "renderCreateScreenshot",
1693
+ "method": "POST",
1694
+ "path": "/v1/render/screenshots",
1695
+ "query": {},
1696
+ "body": {
1697
+ "url": "https://example.com"
1698
+ },
1699
+ "accept": "json"
1700
+ }
1701
+ ]
1702
+ },
1703
+ {
1704
+ "tool": "listener_create",
1705
+ "args": {
1706
+ "name": "big-orders",
1707
+ "source": {
1708
+ "type": "push"
1709
+ },
1710
+ "filter": {
1711
+ "cel": "event.payload.total > 1000"
1712
+ },
1713
+ "sink": {
1714
+ "type": "webhook",
1715
+ "url": "https://hooks.example.com/b3os"
1716
+ },
1717
+ "ttl_s": 86400
1718
+ },
1719
+ "requests": [
1720
+ {
1721
+ "operationId": "listenersCreateListener",
1722
+ "method": "POST",
1723
+ "path": "/v1/listeners",
1724
+ "query": {},
1725
+ "body": {
1726
+ "name": "big-orders",
1727
+ "source": {
1728
+ "type": "push"
1729
+ },
1730
+ "filter": {
1731
+ "cel": "event.payload.total > 1000"
1732
+ },
1733
+ "sink": {
1734
+ "type": "webhook",
1735
+ "url": "https://hooks.example.com/b3os"
1736
+ },
1737
+ "ttl_s": 86400
1738
+ },
1739
+ "accept": "json"
1740
+ }
1741
+ ]
1742
+ },
1743
+ {
1744
+ "tool": "listener_list",
1745
+ "args": {
1746
+ "status": "active",
1747
+ "limit": 10
1748
+ },
1749
+ "requests": [
1750
+ {
1751
+ "operationId": "listenersListListeners",
1752
+ "method": "GET",
1753
+ "path": "/v1/listeners",
1754
+ "query": {
1755
+ "status": "active",
1756
+ "limit": "10"
1757
+ },
1758
+ "accept": "json"
1759
+ }
1760
+ ]
1761
+ },
1762
+ {
1763
+ "tool": "listener_get",
1764
+ "args": {
1765
+ "listener_id": "lsn_01m5t8b2c4d6e8f0g2h4j6k8m0"
1766
+ },
1767
+ "requests": [
1768
+ {
1769
+ "operationId": "listenersGetListener",
1770
+ "method": "GET",
1771
+ "path": "/v1/listeners/lsn_01m5t8b2c4d6e8f0g2h4j6k8m0",
1772
+ "query": {},
1773
+ "accept": "json"
1774
+ }
1775
+ ]
1776
+ },
1777
+ {
1778
+ "tool": "listener_update",
1779
+ "args": {
1780
+ "listener_id": "lsn_01m5t8b2c4d6e8f0g2h4j6k8m0",
1781
+ "paused": true
1782
+ },
1783
+ "requests": [
1784
+ {
1785
+ "operationId": "listenersUpdateListener",
1786
+ "method": "PATCH",
1787
+ "path": "/v1/listeners/lsn_01m5t8b2c4d6e8f0g2h4j6k8m0",
1788
+ "query": {},
1789
+ "body": {
1790
+ "paused": true
1791
+ },
1792
+ "accept": "json"
1793
+ }
1794
+ ]
1795
+ },
1796
+ {
1797
+ "tool": "listener_delete",
1798
+ "args": {
1799
+ "listener_id": "lsn_01m5t8b2c4d6e8f0g2h4j6k8m0"
1800
+ },
1801
+ "requests": [
1802
+ {
1803
+ "operationId": "listenersDeleteListener",
1804
+ "method": "DELETE",
1805
+ "path": "/v1/listeners/lsn_01m5t8b2c4d6e8f0g2h4j6k8m0",
1806
+ "query": {},
1807
+ "accept": "json"
1808
+ }
1809
+ ]
1810
+ },
1811
+ {
1812
+ "tool": "listener_events",
1813
+ "args": {
1814
+ "listener_id": "lsn_01m5t8b2c4d6e8f0g2h4j6k8m0",
1815
+ "status": "failed"
1816
+ },
1817
+ "requests": [
1818
+ {
1819
+ "operationId": "listenersListEvents",
1820
+ "method": "GET",
1821
+ "path": "/v1/listeners/lsn_01m5t8b2c4d6e8f0g2h4j6k8m0/events",
1822
+ "query": {
1823
+ "status": "failed"
1824
+ },
1825
+ "accept": "json"
1826
+ }
1827
+ ]
1828
+ },
1829
+ {
1830
+ "tool": "listener_push",
1831
+ "args": {
1832
+ "listener_id": "lsn_01m5t8b2c4d6e8f0g2h4j6k8m0",
1833
+ "events": [
1834
+ {
1835
+ "payload": {
1836
+ "order": 7,
1837
+ "total": 1200
1838
+ }
1839
+ }
1840
+ ]
1841
+ },
1842
+ "requests": [
1843
+ {
1844
+ "operationId": "listenersIngestEvents",
1845
+ "method": "POST",
1846
+ "path": "/v1/listeners/lsn_01m5t8b2c4d6e8f0g2h4j6k8m0/events",
1847
+ "query": {},
1848
+ "body": {
1849
+ "events": [
1850
+ {
1851
+ "payload": {
1852
+ "order": 7,
1853
+ "total": 1200
1854
+ }
1855
+ }
1856
+ ]
1857
+ },
1858
+ "accept": "json"
1859
+ }
1860
+ ]
1861
+ },
1862
+ {
1863
+ "tool": "listener_test",
1864
+ "args": {
1865
+ "listener_id": "lsn_01m5t8b2c4d6e8f0g2h4j6k8m0",
1866
+ "payload": {
1867
+ "total": 50
1868
+ }
1869
+ },
1870
+ "requests": [
1871
+ {
1872
+ "operationId": "listenersTestListener",
1873
+ "method": "POST",
1874
+ "path": "/v1/listeners/lsn_01m5t8b2c4d6e8f0g2h4j6k8m0/test",
1875
+ "query": {},
1876
+ "body": {
1877
+ "payload": {
1878
+ "total": 50
1879
+ }
1880
+ },
1881
+ "accept": "json"
1882
+ }
1883
+ ]
1884
+ },
1885
+ {
1886
+ "tool": "agent_send",
1887
+ "args": {
1888
+ "agent": "support",
1889
+ "key": "user-42",
1890
+ "payload": {
1891
+ "text": "Where is my order?"
1892
+ },
1893
+ "wait_s": 30
1894
+ },
1895
+ "requests": [
1896
+ {
1897
+ "operationId": "agentsSendMessage",
1898
+ "method": "POST",
1899
+ "path": "/v1/agents/support/instances/user-42/messages",
1900
+ "query": {
1901
+ "wait": "30"
1902
+ },
1903
+ "body": {
1904
+ "text": "Where is my order?"
1905
+ },
1906
+ "accept": "json"
1907
+ }
1908
+ ]
1909
+ },
1910
+ {
1911
+ "tool": "agent_create",
1912
+ "args": {
1913
+ "name": "support",
1914
+ "entry": {
1915
+ "command": ["node", "harness.js"],
1916
+ "port": 8080,
1917
+ "path": "/messages"
1918
+ }
1919
+ },
1920
+ "requests": [
1921
+ {
1922
+ "operationId": "agentsCreateAgent",
1923
+ "method": "POST",
1924
+ "path": "/v1/agents",
1925
+ "query": {},
1926
+ "body": {
1927
+ "name": "support",
1928
+ "entry": {
1929
+ "command": ["node", "harness.js"],
1930
+ "port": 8080,
1931
+ "path": "/messages"
1932
+ }
1933
+ },
1934
+ "accept": "json"
1935
+ }
1936
+ ]
1937
+ },
1938
+ {
1939
+ "tool": "agent_list",
1940
+ "args": {
1941
+ "limit": 5
1942
+ },
1943
+ "requests": [
1944
+ {
1945
+ "operationId": "agentsListAgents",
1946
+ "method": "GET",
1947
+ "path": "/v1/agents",
1948
+ "query": {
1949
+ "limit": "5"
1950
+ },
1951
+ "accept": "json"
1952
+ }
1953
+ ]
1954
+ },
1955
+ {
1956
+ "tool": "agent_get",
1957
+ "args": {
1958
+ "agent": "support"
1959
+ },
1960
+ "requests": [
1961
+ {
1962
+ "operationId": "agentsGetAgent",
1963
+ "method": "GET",
1964
+ "path": "/v1/agents/support",
1965
+ "query": {},
1966
+ "accept": "json"
1967
+ }
1968
+ ]
1969
+ },
1970
+ {
1971
+ "tool": "agent_update",
1972
+ "args": {
1973
+ "agent": "support",
1974
+ "sleep": {
1975
+ "ram_after_s": 60
1976
+ }
1977
+ },
1978
+ "requests": [
1979
+ {
1980
+ "operationId": "agentsUpdateAgent",
1981
+ "method": "PATCH",
1982
+ "path": "/v1/agents/support",
1983
+ "query": {},
1984
+ "body": {
1985
+ "sleep": {
1986
+ "ram_after_s": 60
1987
+ }
1988
+ },
1989
+ "accept": "json"
1990
+ }
1991
+ ]
1992
+ },
1993
+ {
1994
+ "tool": "agent_delete",
1995
+ "args": {
1996
+ "agent": "support"
1997
+ },
1998
+ "requests": [
1999
+ {
2000
+ "operationId": "agentsDeleteAgent",
2001
+ "method": "DELETE",
2002
+ "path": "/v1/agents/support",
2003
+ "query": {},
2004
+ "accept": "json"
2005
+ }
2006
+ ]
2007
+ },
2008
+ {
2009
+ "tool": "agent_list_instances",
2010
+ "args": {
2011
+ "agent": "support",
2012
+ "status": "hibernated"
2013
+ },
2014
+ "requests": [
2015
+ {
2016
+ "operationId": "agentsListInstances",
2017
+ "method": "GET",
2018
+ "path": "/v1/agents/support/instances",
2019
+ "query": {
2020
+ "limit": "20",
2021
+ "status": "hibernated"
2022
+ },
2023
+ "accept": "json"
2024
+ }
2025
+ ]
2026
+ },
2027
+ {
2028
+ "tool": "agent_get_instance",
2029
+ "args": {
2030
+ "agent": "support",
2031
+ "key": "user-42"
2032
+ },
2033
+ "requests": [
2034
+ {
2035
+ "operationId": "agentsGetInstance",
2036
+ "method": "GET",
2037
+ "path": "/v1/agents/support/instances/user-42",
2038
+ "query": {},
2039
+ "accept": "json"
2040
+ }
2041
+ ]
2042
+ },
2043
+ {
2044
+ "tool": "agent_instance_events",
2045
+ "args": {
2046
+ "agent": "support",
2047
+ "key": "user-42",
2048
+ "limit": 10
2049
+ },
2050
+ "requests": [
2051
+ {
2052
+ "operationId": "agentsListInstanceEvents",
2053
+ "method": "GET",
2054
+ "path": "/v1/agents/support/instances/user-42/events",
2055
+ "query": {
2056
+ "limit": "10"
2057
+ },
2058
+ "accept": "json"
2059
+ }
2060
+ ]
2061
+ },
2062
+ {
2063
+ "tool": "agent_sleep",
2064
+ "args": {
2065
+ "agent": "support",
2066
+ "key": "user-42",
2067
+ "tier": "snapshot"
2068
+ },
2069
+ "requests": [
2070
+ {
2071
+ "operationId": "agentsSleepInstance",
2072
+ "method": "POST",
2073
+ "path": "/v1/agents/support/instances/user-42/sleep",
2074
+ "query": {},
2075
+ "body": {
2076
+ "tier": "snapshot"
2077
+ },
2078
+ "accept": "json"
2079
+ }
2080
+ ]
2081
+ },
2082
+ {
2083
+ "tool": "agent_delete_instance",
2084
+ "args": {
2085
+ "agent": "support",
2086
+ "key": "user-42"
2087
+ },
2088
+ "requests": [
2089
+ {
2090
+ "operationId": "agentsDeleteInstance",
2091
+ "method": "DELETE",
2092
+ "path": "/v1/agents/support/instances/user-42",
2093
+ "query": {},
2094
+ "accept": "json"
2095
+ }
2096
+ ]
2097
+ },
2098
+ {
2099
+ "tool": "agent_list_sessions",
2100
+ "args": {
2101
+ "agent": "support",
2102
+ "key": "user-42",
2103
+ "status": "failed"
2104
+ },
2105
+ "requests": [
2106
+ {
2107
+ "operationId": "agentsListSessions",
2108
+ "method": "GET",
2109
+ "path": "/v1/agents/support/sessions",
2110
+ "query": {
2111
+ "limit": "10",
2112
+ "key": "user-42",
2113
+ "status": "failed"
2114
+ },
2115
+ "accept": "json"
2116
+ }
2117
+ ]
2118
+ },
2119
+ {
2120
+ "tool": "agent_get_session",
2121
+ "args": {
2122
+ "session_id": "ses_01m87xh9pe1a47cey653pxk3zs"
2123
+ },
2124
+ "requests": [
2125
+ {
2126
+ "operationId": "agentsGetSession",
2127
+ "method": "GET",
2128
+ "path": "/v1/agents/sessions/ses_01m87xh9pe1a47cey653pxk3zs",
2129
+ "query": {},
2130
+ "accept": "json"
2131
+ }
2132
+ ]
2133
+ },
2134
+ {
2135
+ "tool": "agent_cancel_session",
2136
+ "args": {
2137
+ "session_id": "ses_01m87xh9pe1a47cey653pxk3zs"
2138
+ },
2139
+ "requests": [
2140
+ {
2141
+ "operationId": "agentsCancelSession",
2142
+ "method": "POST",
2143
+ "path": "/v1/agents/sessions/ses_01m87xh9pe1a47cey653pxk3zs/cancel",
2144
+ "query": {},
2145
+ "accept": "json"
2146
+ }
2147
+ ]
1150
2148
  }
1151
2149
  ]