@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/requests.json
CHANGED
|
@@ -754,6 +754,176 @@
|
|
|
754
754
|
}
|
|
755
755
|
]
|
|
756
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
|
+
},
|
|
757
927
|
{
|
|
758
928
|
"tool": "vision_search",
|
|
759
929
|
"args": {
|
|
@@ -1043,6 +1213,44 @@
|
|
|
1043
1213
|
}
|
|
1044
1214
|
]
|
|
1045
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
|
+
},
|
|
1046
1254
|
{
|
|
1047
1255
|
"tool": "routine_validate",
|
|
1048
1256
|
"args": {
|
|
@@ -1473,6 +1681,25 @@
|
|
|
1473
1681
|
}
|
|
1474
1682
|
]
|
|
1475
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
|
+
},
|
|
1476
1703
|
{
|
|
1477
1704
|
"tool": "listener_create",
|
|
1478
1705
|
"args": {
|