@anhlp/alp-protocol 0.0.0-beta.1 → 0.0.0-beta.2

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.
@@ -537,6 +537,29 @@
537
537
  }
538
538
  }
539
539
  },
540
+ {
541
+ "name": "event usage",
542
+ "check": "envelope",
543
+ "valid": true,
544
+ "value": {
545
+ "sessionId": "ses_fixture",
546
+ "epoch": "epoch-1",
547
+ "seq": 3,
548
+ "cursor": 12,
549
+ "ts": "2026-10-15T00:00:00.000Z",
550
+ "event": {
551
+ "type": "usage",
552
+ "usage": {
553
+ "contextWindowUsedTokens": 42000,
554
+ "contextWindowMaxTokens": 200000,
555
+ "inputTokens": 40000,
556
+ "cachedInputTokens": 36000,
557
+ "outputTokens": 2000,
558
+ "totalCostUsd": 0.1234
559
+ }
560
+ }
561
+ }
562
+ },
540
563
  {
541
564
  "name": "item user_message",
542
565
  "check": "envelope",
@@ -707,6 +730,290 @@
707
730
  }
708
731
  }
709
732
  },
733
+ {
734
+ "name": "item tool_call read",
735
+ "check": "envelope",
736
+ "valid": true,
737
+ "value": {
738
+ "sessionId": "ses_fixture",
739
+ "epoch": "epoch-1",
740
+ "seq": 3,
741
+ "cursor": 12,
742
+ "ts": "2026-10-15T00:00:00.000Z",
743
+ "event": {
744
+ "type": "item",
745
+ "item": {
746
+ "kind": "tool_call",
747
+ "id": "tc-3",
748
+ "callId": "tc-3",
749
+ "name": "Read",
750
+ "status": "completed",
751
+ "detail": {
752
+ "type": "read",
753
+ "filePath": "/work/project/src/a.ts",
754
+ "content": "export const a = 1;\n",
755
+ "offset": 1,
756
+ "limit": 200
757
+ }
758
+ }
759
+ }
760
+ }
761
+ },
762
+ {
763
+ "name": "item tool_call edit",
764
+ "check": "envelope",
765
+ "valid": true,
766
+ "value": {
767
+ "sessionId": "ses_fixture",
768
+ "epoch": "epoch-1",
769
+ "seq": 3,
770
+ "cursor": 12,
771
+ "ts": "2026-10-15T00:00:00.000Z",
772
+ "event": {
773
+ "type": "item",
774
+ "item": {
775
+ "kind": "tool_call",
776
+ "id": "tc-4",
777
+ "callId": "tc-4",
778
+ "name": "Edit",
779
+ "status": "completed",
780
+ "detail": {
781
+ "type": "edit",
782
+ "filePath": "/work/project/src/a.ts",
783
+ "oldString": "a = 1",
784
+ "newString": "a = 2",
785
+ "unifiedDiff": "@@ -1 +1 @@\n-export const a = 1;\n+export const a = 2;\n"
786
+ }
787
+ }
788
+ }
789
+ }
790
+ },
791
+ {
792
+ "name": "item tool_call write",
793
+ "check": "envelope",
794
+ "valid": true,
795
+ "value": {
796
+ "sessionId": "ses_fixture",
797
+ "epoch": "epoch-1",
798
+ "seq": 3,
799
+ "cursor": 12,
800
+ "ts": "2026-10-15T00:00:00.000Z",
801
+ "event": {
802
+ "type": "item",
803
+ "item": {
804
+ "kind": "tool_call",
805
+ "id": "tc-5",
806
+ "callId": "tc-5",
807
+ "name": "Write",
808
+ "status": "running",
809
+ "detail": {
810
+ "type": "write",
811
+ "filePath": "docs/ghi-chú.md",
812
+ "content": "# Ghi chú\n"
813
+ }
814
+ }
815
+ }
816
+ }
817
+ },
818
+ {
819
+ "name": "item tool_call search grep",
820
+ "check": "envelope",
821
+ "valid": true,
822
+ "value": {
823
+ "sessionId": "ses_fixture",
824
+ "epoch": "epoch-1",
825
+ "seq": 3,
826
+ "cursor": 12,
827
+ "ts": "2026-10-15T00:00:00.000Z",
828
+ "event": {
829
+ "type": "item",
830
+ "item": {
831
+ "kind": "tool_call",
832
+ "id": "tc-6",
833
+ "callId": "tc-6",
834
+ "name": "Grep",
835
+ "status": "completed",
836
+ "detail": {
837
+ "type": "search",
838
+ "query": "TODO",
839
+ "toolName": "grep",
840
+ "content": "src/a.ts:3: // TODO",
841
+ "filePaths": [
842
+ "src/a.ts"
843
+ ],
844
+ "numFiles": 1,
845
+ "numMatches": 1,
846
+ "truncated": false
847
+ }
848
+ }
849
+ }
850
+ }
851
+ },
852
+ {
853
+ "name": "item tool_call search web_search",
854
+ "check": "envelope",
855
+ "valid": true,
856
+ "value": {
857
+ "sessionId": "ses_fixture",
858
+ "epoch": "epoch-1",
859
+ "seq": 3,
860
+ "cursor": 12,
861
+ "ts": "2026-10-15T00:00:00.000Z",
862
+ "event": {
863
+ "type": "item",
864
+ "item": {
865
+ "kind": "tool_call",
866
+ "id": "tc-7",
867
+ "callId": "tc-7",
868
+ "name": "web_search",
869
+ "status": "completed",
870
+ "detail": {
871
+ "type": "search",
872
+ "query": "json-rpc 2.0",
873
+ "toolName": "web_search",
874
+ "webResults": [
875
+ {
876
+ "title": "JSON-RPC 2.0 Specification",
877
+ "url": "https://www.jsonrpc.org/specification"
878
+ }
879
+ ]
880
+ }
881
+ }
882
+ }
883
+ }
884
+ },
885
+ {
886
+ "name": "item tool_call fetch",
887
+ "check": "envelope",
888
+ "valid": true,
889
+ "value": {
890
+ "sessionId": "ses_fixture",
891
+ "epoch": "epoch-1",
892
+ "seq": 3,
893
+ "cursor": 12,
894
+ "ts": "2026-10-15T00:00:00.000Z",
895
+ "event": {
896
+ "type": "item",
897
+ "item": {
898
+ "kind": "tool_call",
899
+ "id": "tc-8",
900
+ "callId": "tc-8",
901
+ "name": "WebFetch",
902
+ "status": "failed",
903
+ "error": "Request failed with status code 404",
904
+ "detail": {
905
+ "type": "fetch",
906
+ "url": "https://example.com/missing",
907
+ "prompt": "Summarize",
908
+ "code": 404
909
+ }
910
+ }
911
+ }
912
+ }
913
+ },
914
+ {
915
+ "name": "item tool_call sub_agent",
916
+ "check": "envelope",
917
+ "valid": true,
918
+ "value": {
919
+ "sessionId": "ses_fixture",
920
+ "epoch": "epoch-1",
921
+ "seq": 3,
922
+ "cursor": 12,
923
+ "ts": "2026-10-15T00:00:00.000Z",
924
+ "event": {
925
+ "type": "item",
926
+ "item": {
927
+ "kind": "tool_call",
928
+ "id": "tc-9",
929
+ "callId": "tc-9",
930
+ "name": "Task",
931
+ "status": "running",
932
+ "detail": {
933
+ "type": "sub_agent",
934
+ "subAgentType": "Explore",
935
+ "description": "Find the parser",
936
+ "log": ""
937
+ }
938
+ }
939
+ }
940
+ }
941
+ },
942
+ {
943
+ "name": "item tool_call plan",
944
+ "check": "envelope",
945
+ "valid": true,
946
+ "value": {
947
+ "sessionId": "ses_fixture",
948
+ "epoch": "epoch-1",
949
+ "seq": 3,
950
+ "cursor": 12,
951
+ "ts": "2026-10-15T00:00:00.000Z",
952
+ "event": {
953
+ "type": "item",
954
+ "item": {
955
+ "kind": "tool_call",
956
+ "id": "tc-10",
957
+ "callId": "tc-10",
958
+ "name": "ExitPlanMode",
959
+ "status": "completed",
960
+ "detail": {
961
+ "type": "plan",
962
+ "text": "1. Đọc\n2. Sửa"
963
+ }
964
+ }
965
+ }
966
+ }
967
+ },
968
+ {
969
+ "name": "item tool_call plain_text",
970
+ "check": "envelope",
971
+ "valid": true,
972
+ "value": {
973
+ "sessionId": "ses_fixture",
974
+ "epoch": "epoch-1",
975
+ "seq": 3,
976
+ "cursor": 12,
977
+ "ts": "2026-10-15T00:00:00.000Z",
978
+ "event": {
979
+ "type": "item",
980
+ "item": {
981
+ "kind": "tool_call",
982
+ "id": "tc-11",
983
+ "callId": "tc-11",
984
+ "name": "Skill",
985
+ "status": "completed",
986
+ "detail": {
987
+ "type": "plain_text",
988
+ "label": "smart-commits",
989
+ "text": "Launching skill: smart-commits"
990
+ }
991
+ }
992
+ }
993
+ }
994
+ },
995
+ {
996
+ "name": "item user_message with images",
997
+ "check": "envelope",
998
+ "valid": true,
999
+ "value": {
1000
+ "sessionId": "ses_fixture",
1001
+ "epoch": "epoch-1",
1002
+ "seq": 3,
1003
+ "cursor": 12,
1004
+ "ts": "2026-10-15T00:00:00.000Z",
1005
+ "event": {
1006
+ "type": "item",
1007
+ "item": {
1008
+ "kind": "user_message",
1009
+ "id": "user:m-2",
1010
+ "text": "Xem ảnh",
1011
+ "clientMessageId": "m-2",
1012
+ "images": 2
1013
+ }
1014
+ }
1015
+ }
1016
+ },
710
1017
  {
711
1018
  "name": "announcement without a cursor",
712
1019
  "check": "envelope",
@@ -771,6 +1078,33 @@
771
1078
  },
772
1079
  "projection": false
773
1080
  },
1081
+ {
1082
+ "name": "a future tool-call detail type (receivers show it as unknown)",
1083
+ "check": "envelope",
1084
+ "valid": true,
1085
+ "value": {
1086
+ "sessionId": "ses_fixture",
1087
+ "epoch": "epoch-1",
1088
+ "seq": 3,
1089
+ "cursor": 12,
1090
+ "ts": "2026-10-15T00:00:00.000Z",
1091
+ "event": {
1092
+ "type": "item",
1093
+ "item": {
1094
+ "kind": "tool_call",
1095
+ "id": "tc-12",
1096
+ "callId": "tc-12",
1097
+ "name": "Screenshot",
1098
+ "status": "completed",
1099
+ "detail": {
1100
+ "type": "image",
1101
+ "path": "/tmp/s.png"
1102
+ }
1103
+ }
1104
+ }
1105
+ },
1106
+ "projection": false
1107
+ },
774
1108
  {
775
1109
  "name": "unknown envelope properties",
776
1110
  "check": "envelope",
@@ -855,7 +1189,7 @@
855
1189
  }
856
1190
  },
857
1191
  {
858
- "name": "known event with a wrong enum",
1192
+ "name": "edit detail without its filePath",
859
1193
  "check": "envelope",
860
1194
  "valid": false,
861
1195
  "value": {
@@ -865,29 +1199,233 @@
865
1199
  "cursor": 12,
866
1200
  "ts": "2026-10-15T00:00:00.000Z",
867
1201
  "event": {
868
- "type": "turn.ended",
869
- "turnId": "t",
870
- "state": "stopped"
1202
+ "type": "item",
1203
+ "item": {
1204
+ "kind": "tool_call",
1205
+ "id": "tc-x",
1206
+ "callId": "tc-x",
1207
+ "name": "Edit",
1208
+ "status": "completed",
1209
+ "detail": {
1210
+ "type": "edit",
1211
+ "newString": "x"
1212
+ }
1213
+ }
871
1214
  }
872
1215
  }
873
1216
  },
874
1217
  {
875
- "name": "missing epoch",
1218
+ "name": "search detail with a non-string file path",
876
1219
  "check": "envelope",
877
1220
  "valid": false,
878
1221
  "value": {
879
1222
  "sessionId": "ses_fixture",
1223
+ "epoch": "epoch-1",
880
1224
  "seq": 3,
881
1225
  "cursor": 12,
882
1226
  "ts": "2026-10-15T00:00:00.000Z",
883
1227
  "event": {
884
- "type": "session.ready"
1228
+ "type": "item",
1229
+ "item": {
1230
+ "kind": "tool_call",
1231
+ "id": "tc-x",
1232
+ "callId": "tc-x",
1233
+ "name": "Glob",
1234
+ "status": "completed",
1235
+ "detail": {
1236
+ "type": "search",
1237
+ "query": "*.ts",
1238
+ "filePaths": [
1239
+ 1
1240
+ ]
1241
+ }
1242
+ }
885
1243
  }
886
1244
  }
887
1245
  },
888
1246
  {
889
- "name": "daemon.hello params",
890
- "check": "params",
1247
+ "name": "tool-call detail without a type",
1248
+ "check": "envelope",
1249
+ "valid": false,
1250
+ "value": {
1251
+ "sessionId": "ses_fixture",
1252
+ "epoch": "epoch-1",
1253
+ "seq": 3,
1254
+ "cursor": 12,
1255
+ "ts": "2026-10-15T00:00:00.000Z",
1256
+ "event": {
1257
+ "type": "item",
1258
+ "item": {
1259
+ "kind": "tool_call",
1260
+ "id": "tc-x",
1261
+ "callId": "tc-x",
1262
+ "name": "Read",
1263
+ "status": "completed",
1264
+ "detail": {
1265
+ "filePath": "a"
1266
+ }
1267
+ }
1268
+ }
1269
+ }
1270
+ },
1271
+ {
1272
+ "name": "known event with a wrong enum",
1273
+ "check": "envelope",
1274
+ "valid": false,
1275
+ "value": {
1276
+ "sessionId": "ses_fixture",
1277
+ "epoch": "epoch-1",
1278
+ "seq": 3,
1279
+ "cursor": 12,
1280
+ "ts": "2026-10-15T00:00:00.000Z",
1281
+ "event": {
1282
+ "type": "turn.ended",
1283
+ "turnId": "t",
1284
+ "state": "stopped"
1285
+ }
1286
+ }
1287
+ },
1288
+ {
1289
+ "name": "usage before the runtime said its window",
1290
+ "check": "envelope",
1291
+ "valid": true,
1292
+ "value": {
1293
+ "sessionId": "ses_fixture",
1294
+ "epoch": "epoch-1",
1295
+ "seq": 3,
1296
+ "cursor": 12,
1297
+ "ts": "2026-10-15T00:00:00.000Z",
1298
+ "event": {
1299
+ "type": "usage",
1300
+ "usage": {
1301
+ "contextWindowUsedTokens": 1200
1302
+ }
1303
+ }
1304
+ }
1305
+ },
1306
+ {
1307
+ "name": "session.updated with usage",
1308
+ "check": "envelope",
1309
+ "valid": true,
1310
+ "value": {
1311
+ "sessionId": "ses_fixture",
1312
+ "epoch": "epoch-1",
1313
+ "seq": 3,
1314
+ "cursor": 12,
1315
+ "ts": "2026-10-15T00:00:00.000Z",
1316
+ "event": {
1317
+ "type": "session.updated",
1318
+ "session": {
1319
+ "id": "ses_fixture",
1320
+ "projectRoot": "/work/project",
1321
+ "agent": "main",
1322
+ "runtime": "codex",
1323
+ "model": "gpt-6.1-sol",
1324
+ "mode": "workspace-write",
1325
+ "thinking": "low",
1326
+ "workflow": {
1327
+ "mode": "pho",
1328
+ "maxPeers": 2,
1329
+ "supervisor": false
1330
+ },
1331
+ "teamLabel": "Phở",
1332
+ "threadId": "thread-1",
1333
+ "persistent": true,
1334
+ "busy": false,
1335
+ "usage": {
1336
+ "contextWindowUsedTokens": 42000,
1337
+ "contextWindowMaxTokens": 200000
1338
+ }
1339
+ }
1340
+ }
1341
+ }
1342
+ },
1343
+ {
1344
+ "name": "usage event without its usage",
1345
+ "check": "envelope",
1346
+ "valid": false,
1347
+ "value": {
1348
+ "sessionId": "ses_fixture",
1349
+ "epoch": "epoch-1",
1350
+ "seq": 3,
1351
+ "cursor": 12,
1352
+ "ts": "2026-10-15T00:00:00.000Z",
1353
+ "event": {
1354
+ "type": "usage"
1355
+ }
1356
+ }
1357
+ },
1358
+ {
1359
+ "name": "usage with negative tokens",
1360
+ "check": "envelope",
1361
+ "valid": false,
1362
+ "value": {
1363
+ "sessionId": "ses_fixture",
1364
+ "epoch": "epoch-1",
1365
+ "seq": 3,
1366
+ "cursor": 12,
1367
+ "ts": "2026-10-15T00:00:00.000Z",
1368
+ "event": {
1369
+ "type": "usage",
1370
+ "usage": {
1371
+ "contextWindowUsedTokens": -1
1372
+ }
1373
+ }
1374
+ }
1375
+ },
1376
+ {
1377
+ "name": "usage with a zero window",
1378
+ "check": "envelope",
1379
+ "valid": false,
1380
+ "value": {
1381
+ "sessionId": "ses_fixture",
1382
+ "epoch": "epoch-1",
1383
+ "seq": 3,
1384
+ "cursor": 12,
1385
+ "ts": "2026-10-15T00:00:00.000Z",
1386
+ "event": {
1387
+ "type": "usage",
1388
+ "usage": {
1389
+ "contextWindowMaxTokens": 0
1390
+ }
1391
+ }
1392
+ }
1393
+ },
1394
+ {
1395
+ "name": "usage with fractional tokens",
1396
+ "check": "envelope",
1397
+ "valid": false,
1398
+ "value": {
1399
+ "sessionId": "ses_fixture",
1400
+ "epoch": "epoch-1",
1401
+ "seq": 3,
1402
+ "cursor": 12,
1403
+ "ts": "2026-10-15T00:00:00.000Z",
1404
+ "event": {
1405
+ "type": "usage",
1406
+ "usage": {
1407
+ "outputTokens": 1.5
1408
+ }
1409
+ }
1410
+ }
1411
+ },
1412
+ {
1413
+ "name": "missing epoch",
1414
+ "check": "envelope",
1415
+ "valid": false,
1416
+ "value": {
1417
+ "sessionId": "ses_fixture",
1418
+ "seq": 3,
1419
+ "cursor": 12,
1420
+ "ts": "2026-10-15T00:00:00.000Z",
1421
+ "event": {
1422
+ "type": "session.ready"
1423
+ }
1424
+ }
1425
+ },
1426
+ {
1427
+ "name": "daemon.hello params",
1428
+ "check": "params",
891
1429
  "method": "daemon.hello",
892
1430
  "valid": true,
893
1431
  "value": {
@@ -944,6 +1482,29 @@
944
1482
  "pid": 42
945
1483
  }
946
1484
  },
1485
+ {
1486
+ "name": "daemon.hello with the host name",
1487
+ "check": "result",
1488
+ "method": "daemon.hello",
1489
+ "valid": true,
1490
+ "value": {
1491
+ "protocolVersion": 1,
1492
+ "daemonVersion": "0.10.0",
1493
+ "pid": 42,
1494
+ "hostname": "build-host",
1495
+ "capabilities": []
1496
+ }
1497
+ },
1498
+ {
1499
+ "name": "daemon.hello with a numeric hostname",
1500
+ "check": "result",
1501
+ "method": "daemon.hello",
1502
+ "valid": false,
1503
+ "value": {
1504
+ "protocolVersion": 1,
1505
+ "hostname": 42
1506
+ }
1507
+ },
947
1508
  {
948
1509
  "name": "daemon.status params",
949
1510
  "check": "params",
@@ -1165,95 +1726,391 @@
1165
1726
  }
1166
1727
  },
1167
1728
  {
1168
- "name": "assignment.recall without a question",
1169
- "check": "params",
1170
- "method": "assignment.recall",
1729
+ "name": "assignment.recall without a question",
1730
+ "check": "params",
1731
+ "method": "assignment.recall",
1732
+ "valid": false,
1733
+ "value": {
1734
+ "assignmentId": "a_1"
1735
+ }
1736
+ },
1737
+ {
1738
+ "name": "assignment.recall result",
1739
+ "check": "result",
1740
+ "method": "assignment.recall",
1741
+ "valid": true,
1742
+ "value": {
1743
+ "assignmentId": "a_1",
1744
+ "agent": "peer",
1745
+ "taskId": "bd-1",
1746
+ "finishedAt": "2026-10-15T00:00:00.000Z",
1747
+ "answer": "Đã sửa server.ts"
1748
+ }
1749
+ },
1750
+ {
1751
+ "name": "board.list params",
1752
+ "check": "params",
1753
+ "method": "board.list",
1754
+ "valid": true,
1755
+ "value": {
1756
+ "projectRoot": "/work/project"
1757
+ }
1758
+ },
1759
+ {
1760
+ "name": "board.list without projectRoot",
1761
+ "check": "params",
1762
+ "method": "board.list",
1763
+ "valid": false,
1764
+ "value": {}
1765
+ },
1766
+ {
1767
+ "name": "board.list result",
1768
+ "check": "result",
1769
+ "method": "board.list",
1770
+ "valid": true,
1771
+ "value": {
1772
+ "pins": [
1773
+ {
1774
+ "id": "pin_1",
1775
+ "project": "/work/project",
1776
+ "kind": "claim",
1777
+ "body": "Đang sửa server",
1778
+ "paths": [
1779
+ "src/server.ts"
1780
+ ],
1781
+ "agent": "peer",
1782
+ "sessionId": "ses_child",
1783
+ "rootId": "ses_fixture",
1784
+ "at": "2026-10-15T00:00:00.000Z"
1785
+ }
1786
+ ]
1787
+ }
1788
+ },
1789
+ {
1790
+ "name": "question.list params",
1791
+ "check": "params",
1792
+ "method": "question.list",
1793
+ "valid": true,
1794
+ "value": {
1795
+ "projectRoot": "/work/project"
1796
+ }
1797
+ },
1798
+ {
1799
+ "name": "question.list result",
1800
+ "check": "result",
1801
+ "method": "question.list",
1802
+ "valid": true,
1803
+ "value": {
1804
+ "questions": [
1805
+ {
1806
+ "id": "q_1",
1807
+ "sessionId": "ses_fixture",
1808
+ "rootId": "ses_fixture",
1809
+ "agent": "main",
1810
+ "body": "Tiếp tục?",
1811
+ "options": [
1812
+ "có",
1813
+ "không"
1814
+ ],
1815
+ "askedAt": "2026-10-15T00:00:00.000Z"
1816
+ }
1817
+ ]
1818
+ }
1819
+ },
1820
+ {
1821
+ "name": "question.watch params",
1822
+ "check": "params",
1823
+ "method": "question.watch",
1824
+ "valid": true,
1825
+ "value": {
1826
+ "projectRoot": "/work/project"
1827
+ }
1828
+ },
1829
+ {
1830
+ "name": "question.watch every tree",
1831
+ "check": "params",
1832
+ "method": "question.watch",
1833
+ "valid": true,
1834
+ "value": {}
1835
+ },
1836
+ {
1837
+ "name": "question.watch result",
1838
+ "check": "result",
1839
+ "method": "question.watch",
1840
+ "valid": true,
1841
+ "value": {
1842
+ "questions": [
1843
+ {
1844
+ "id": "q_1",
1845
+ "sessionId": "ses_fixture",
1846
+ "rootId": "ses_fixture",
1847
+ "agent": "main",
1848
+ "body": "Tiếp tục?",
1849
+ "options": [
1850
+ "có",
1851
+ "không"
1852
+ ],
1853
+ "askedAt": "2026-10-15T00:00:00.000Z"
1854
+ }
1855
+ ]
1856
+ }
1857
+ },
1858
+ {
1859
+ "name": "question.watch with a numeric projectRoot",
1860
+ "check": "params",
1861
+ "method": "question.watch",
1862
+ "valid": false,
1863
+ "value": {
1864
+ "projectRoot": 7
1865
+ }
1866
+ },
1867
+ {
1868
+ "name": "question.watch with turns",
1869
+ "check": "params",
1870
+ "method": "question.watch",
1871
+ "valid": true,
1872
+ "value": {
1873
+ "projectRoot": "/work/project",
1874
+ "turns": true
1875
+ }
1876
+ },
1877
+ {
1878
+ "name": "question.watch with a string turns",
1879
+ "check": "params",
1880
+ "method": "question.watch",
1881
+ "valid": false,
1882
+ "value": {
1883
+ "turns": "yes"
1884
+ }
1885
+ },
1886
+ {
1887
+ "name": "workspace.files.search params",
1888
+ "check": "params",
1889
+ "method": "workspace.files.search",
1890
+ "valid": true,
1891
+ "value": {
1892
+ "projectRoot": "/work/project",
1893
+ "query": "server ts",
1894
+ "limit": 30
1895
+ }
1896
+ },
1897
+ {
1898
+ "name": "workspace.files.search without a query",
1899
+ "check": "params",
1900
+ "method": "workspace.files.search",
1901
+ "valid": true,
1902
+ "value": {
1903
+ "projectRoot": "/work/project"
1904
+ }
1905
+ },
1906
+ {
1907
+ "name": "workspace.files.search without projectRoot",
1908
+ "check": "params",
1909
+ "method": "workspace.files.search",
1910
+ "valid": false,
1911
+ "value": {
1912
+ "query": "server"
1913
+ }
1914
+ },
1915
+ {
1916
+ "name": "workspace.files.search with a limit over 100",
1917
+ "check": "params",
1918
+ "method": "workspace.files.search",
1919
+ "valid": false,
1920
+ "value": {
1921
+ "projectRoot": "/work/project",
1922
+ "limit": 101
1923
+ }
1924
+ },
1925
+ {
1926
+ "name": "workspace.files.search with a query over 200 characters",
1927
+ "check": "params",
1928
+ "method": "workspace.files.search",
1929
+ "valid": false,
1930
+ "value": {
1931
+ "projectRoot": "/work/project",
1932
+ "query": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
1933
+ }
1934
+ },
1935
+ {
1936
+ "name": "workspace.files.search result",
1937
+ "check": "result",
1938
+ "method": "workspace.files.search",
1939
+ "valid": true,
1940
+ "value": {
1941
+ "files": [
1942
+ {
1943
+ "path": "src/server.ts"
1944
+ },
1945
+ {
1946
+ "path": "docs/sửa lỗi.md"
1947
+ }
1948
+ ],
1949
+ "truncated": true
1950
+ }
1951
+ },
1952
+ {
1953
+ "name": "workspace.files.search result with an empty path",
1954
+ "check": "result",
1955
+ "method": "workspace.files.search",
1956
+ "valid": false,
1957
+ "value": {
1958
+ "files": [
1959
+ {
1960
+ "path": ""
1961
+ }
1962
+ ]
1963
+ }
1964
+ },
1965
+ {
1966
+ "name": "workspace.files.list the root",
1967
+ "check": "params",
1968
+ "method": "workspace.files.list",
1969
+ "valid": true,
1970
+ "value": {
1971
+ "projectRoot": "/work/project"
1972
+ }
1973
+ },
1974
+ {
1975
+ "name": "workspace.files.list params",
1976
+ "check": "params",
1977
+ "method": "workspace.files.list",
1978
+ "valid": true,
1979
+ "value": {
1980
+ "projectRoot": "/work/project",
1981
+ "path": "src",
1982
+ "includeIgnored": true
1983
+ }
1984
+ },
1985
+ {
1986
+ "name": "workspace.files.list without projectRoot",
1987
+ "check": "params",
1988
+ "method": "workspace.files.list",
1989
+ "valid": false,
1990
+ "value": {
1991
+ "path": "src"
1992
+ }
1993
+ },
1994
+ {
1995
+ "name": "workspace.files.list with an empty path",
1996
+ "check": "params",
1997
+ "method": "workspace.files.list",
1998
+ "valid": false,
1999
+ "value": {
2000
+ "projectRoot": "/work/project",
2001
+ "path": ""
2002
+ }
2003
+ },
2004
+ {
2005
+ "name": "workspace.files.list with a string includeIgnored",
2006
+ "check": "params",
2007
+ "method": "workspace.files.list",
2008
+ "valid": false,
2009
+ "value": {
2010
+ "projectRoot": "/work/project",
2011
+ "includeIgnored": "yes"
2012
+ }
2013
+ },
2014
+ {
2015
+ "name": "workspace.files.list result",
2016
+ "check": "result",
2017
+ "method": "workspace.files.list",
2018
+ "valid": true,
2019
+ "value": {
2020
+ "entries": [
2021
+ {
2022
+ "name": "src",
2023
+ "path": "src",
2024
+ "kind": "directory",
2025
+ "modifiedAt": "2026-10-15T00:00:00.000Z"
2026
+ },
2027
+ {
2028
+ "name": "sửa lỗi.md",
2029
+ "path": "sửa lỗi.md",
2030
+ "kind": "file",
2031
+ "size": 12,
2032
+ "modifiedAt": "2026-10-15T00:00:00.000Z"
2033
+ }
2034
+ ],
2035
+ "truncated": true
2036
+ }
2037
+ },
2038
+ {
2039
+ "name": "workspace.files.list result with a link entry",
2040
+ "check": "result",
2041
+ "method": "workspace.files.list",
1171
2042
  "valid": false,
1172
2043
  "value": {
1173
- "assignmentId": "a_1"
2044
+ "entries": [
2045
+ {
2046
+ "name": "x",
2047
+ "path": "x",
2048
+ "kind": "link"
2049
+ }
2050
+ ]
1174
2051
  }
1175
2052
  },
1176
2053
  {
1177
- "name": "assignment.recall result",
1178
- "check": "result",
1179
- "method": "assignment.recall",
2054
+ "name": "workspace.files.read params",
2055
+ "check": "params",
2056
+ "method": "workspace.files.read",
1180
2057
  "valid": true,
1181
2058
  "value": {
1182
- "assignmentId": "a_1",
1183
- "agent": "peer",
1184
- "taskId": "bd-1",
1185
- "finishedAt": "2026-10-15T00:00:00.000Z",
1186
- "answer": "Đã sửa server.ts"
2059
+ "projectRoot": "/work/project",
2060
+ "path": "src/server.ts"
1187
2061
  }
1188
2062
  },
1189
2063
  {
1190
- "name": "board.list params",
2064
+ "name": "workspace.files.read an ignored file",
1191
2065
  "check": "params",
1192
- "method": "board.list",
2066
+ "method": "workspace.files.read",
1193
2067
  "valid": true,
1194
2068
  "value": {
1195
- "projectRoot": "/work/project"
2069
+ "projectRoot": "/work/project",
2070
+ "path": "dist/out.js",
2071
+ "includeIgnored": true
1196
2072
  }
1197
2073
  },
1198
2074
  {
1199
- "name": "board.list without projectRoot",
2075
+ "name": "workspace.files.read without path",
1200
2076
  "check": "params",
1201
- "method": "board.list",
2077
+ "method": "workspace.files.read",
1202
2078
  "valid": false,
1203
- "value": {}
2079
+ "value": {
2080
+ "projectRoot": "/work/project"
2081
+ }
1204
2082
  },
1205
2083
  {
1206
- "name": "board.list result",
1207
- "check": "result",
1208
- "method": "board.list",
1209
- "valid": true,
2084
+ "name": "workspace.files.read with a path over 4096 characters",
2085
+ "check": "params",
2086
+ "method": "workspace.files.read",
2087
+ "valid": false,
1210
2088
  "value": {
1211
- "pins": [
1212
- {
1213
- "id": "pin_1",
1214
- "project": "/work/project",
1215
- "kind": "claim",
1216
- "body": "Đang sửa server",
1217
- "paths": [
1218
- "src/server.ts"
1219
- ],
1220
- "agent": "peer",
1221
- "sessionId": "ses_child",
1222
- "rootId": "ses_fixture",
1223
- "at": "2026-10-15T00:00:00.000Z"
1224
- }
1225
- ]
2089
+ "projectRoot": "/work/project",
2090
+ "path": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
1226
2091
  }
1227
2092
  },
1228
2093
  {
1229
- "name": "question.list params",
1230
- "check": "params",
1231
- "method": "question.list",
2094
+ "name": "workspace.files.read result",
2095
+ "check": "result",
2096
+ "method": "workspace.files.read",
1232
2097
  "valid": true,
1233
2098
  "value": {
1234
- "projectRoot": "/work/project"
2099
+ "path": "src/server.ts",
2100
+ "content": "export {};\n",
2101
+ "size": 11,
2102
+ "modifiedAt": "2026-10-15T00:00:00.000Z"
1235
2103
  }
1236
2104
  },
1237
2105
  {
1238
- "name": "question.list result",
2106
+ "name": "workspace.files.read result over 1 MiB",
1239
2107
  "check": "result",
1240
- "method": "question.list",
1241
- "valid": true,
2108
+ "method": "workspace.files.read",
2109
+ "valid": false,
1242
2110
  "value": {
1243
- "questions": [
1244
- {
1245
- "id": "q_1",
1246
- "sessionId": "ses_fixture",
1247
- "rootId": "ses_fixture",
1248
- "agent": "main",
1249
- "body": "Tiếp tục?",
1250
- "options": [
1251
- "có",
1252
- "không"
1253
- ],
1254
- "askedAt": "2026-10-15T00:00:00.000Z"
1255
- }
1256
- ]
2111
+ "path": "big.txt",
2112
+ "content": "",
2113
+ "size": 1048577
1257
2114
  }
1258
2115
  },
1259
2116
  {
@@ -1587,6 +2444,114 @@
1587
2444
  "content": "text"
1588
2445
  }
1589
2446
  },
2447
+ {
2448
+ "name": "session.prompt with an inline image",
2449
+ "check": "params",
2450
+ "method": "session.prompt",
2451
+ "valid": true,
2452
+ "value": {
2453
+ "sessionId": "ses_fixture",
2454
+ "clientMessageId": "m-2",
2455
+ "content": [
2456
+ {
2457
+ "type": "text",
2458
+ "text": "Xem ảnh"
2459
+ },
2460
+ {
2461
+ "type": "image",
2462
+ "mimeType": "image/png",
2463
+ "data": "iVBORw0KGgo=",
2464
+ "name": "ảnh.png"
2465
+ }
2466
+ ]
2467
+ }
2468
+ },
2469
+ {
2470
+ "name": "session.prompt with an image path",
2471
+ "check": "params",
2472
+ "method": "session.prompt",
2473
+ "valid": false,
2474
+ "value": {
2475
+ "sessionId": "ses_fixture",
2476
+ "clientMessageId": "m-2",
2477
+ "content": [
2478
+ {
2479
+ "type": "image",
2480
+ "mimeType": "image/png",
2481
+ "data": "iVBORw0KGgo=",
2482
+ "path": "/etc/passwd"
2483
+ }
2484
+ ]
2485
+ }
2486
+ },
2487
+ {
2488
+ "name": "session.prompt with an image url",
2489
+ "check": "params",
2490
+ "method": "session.prompt",
2491
+ "valid": false,
2492
+ "value": {
2493
+ "sessionId": "ses_fixture",
2494
+ "clientMessageId": "m-2",
2495
+ "content": [
2496
+ {
2497
+ "type": "image",
2498
+ "mimeType": "image/png",
2499
+ "data": "iVBORw0KGgo=",
2500
+ "url": "file:///etc/passwd"
2501
+ }
2502
+ ]
2503
+ }
2504
+ },
2505
+ {
2506
+ "name": "session.prompt with an svg image",
2507
+ "check": "params",
2508
+ "method": "session.prompt",
2509
+ "valid": false,
2510
+ "value": {
2511
+ "sessionId": "ses_fixture",
2512
+ "clientMessageId": "m-2",
2513
+ "content": [
2514
+ {
2515
+ "type": "image",
2516
+ "mimeType": "image/svg+xml",
2517
+ "data": "PHN2Zz4="
2518
+ }
2519
+ ]
2520
+ }
2521
+ },
2522
+ {
2523
+ "name": "session.prompt with image data that is not base64",
2524
+ "check": "params",
2525
+ "method": "session.prompt",
2526
+ "valid": false,
2527
+ "value": {
2528
+ "sessionId": "ses_fixture",
2529
+ "clientMessageId": "m-2",
2530
+ "content": [
2531
+ {
2532
+ "type": "image",
2533
+ "mimeType": "image/png",
2534
+ "data": "not base64!"
2535
+ }
2536
+ ]
2537
+ }
2538
+ },
2539
+ {
2540
+ "name": "session.prompt with an image without data",
2541
+ "check": "params",
2542
+ "method": "session.prompt",
2543
+ "valid": false,
2544
+ "value": {
2545
+ "sessionId": "ses_fixture",
2546
+ "clientMessageId": "m-2",
2547
+ "content": [
2548
+ {
2549
+ "type": "image",
2550
+ "mimeType": "image/png"
2551
+ }
2552
+ ]
2553
+ }
2554
+ },
1590
2555
  {
1591
2556
  "name": "session.prompt with an unknown delivery",
1592
2557
  "check": "params",
@@ -1900,6 +2865,37 @@
1900
2865
  }
1901
2866
  }
1902
2867
  },
2868
+ {
2869
+ "name": "session.get result of a session that takes images",
2870
+ "check": "result",
2871
+ "method": "session.get",
2872
+ "valid": true,
2873
+ "value": {
2874
+ "session": {
2875
+ "id": "ses_fixture",
2876
+ "projectRoot": "/work/project",
2877
+ "agent": "main",
2878
+ "runtime": "codex",
2879
+ "model": "gpt-6.1-sol",
2880
+ "mode": "workspace-write",
2881
+ "thinking": "low",
2882
+ "workflow": {
2883
+ "mode": "pho",
2884
+ "maxPeers": 2,
2885
+ "supervisor": false
2886
+ },
2887
+ "teamLabel": "Phở",
2888
+ "threadId": "thread-1",
2889
+ "persistent": true,
2890
+ "busy": false,
2891
+ "status": "idle",
2892
+ "title": "Sửa lỗi 😀",
2893
+ "createdAt": "2026-10-15T00:00:00.000Z",
2894
+ "updatedAt": "2026-10-15T00:00:00.000Z",
2895
+ "promptImages": true
2896
+ }
2897
+ }
2898
+ },
1903
2899
  {
1904
2900
  "name": "session.list params",
1905
2901
  "check": "params",
@@ -1953,6 +2949,102 @@
1953
2949
  ]
1954
2950
  }
1955
2951
  },
2952
+ {
2953
+ "name": "session.list a page with a query",
2954
+ "check": "params",
2955
+ "method": "session.list",
2956
+ "valid": true,
2957
+ "value": {
2958
+ "projectRoot": "/work/project",
2959
+ "rootsOnly": true,
2960
+ "includeArchived": true,
2961
+ "limit": 200,
2962
+ "cursor": "eyJrIjpbMF19",
2963
+ "query": "sửa lỗi"
2964
+ }
2965
+ },
2966
+ {
2967
+ "name": "session.list with a zero limit",
2968
+ "check": "params",
2969
+ "method": "session.list",
2970
+ "valid": false,
2971
+ "value": {
2972
+ "limit": 0
2973
+ }
2974
+ },
2975
+ {
2976
+ "name": "session.list of several projects",
2977
+ "check": "params",
2978
+ "method": "session.list",
2979
+ "valid": true,
2980
+ "value": {
2981
+ "projectRoots": [
2982
+ "/work/project",
2983
+ "/private/work/project"
2984
+ ],
2985
+ "limit": 50
2986
+ }
2987
+ },
2988
+ {
2989
+ "name": "session.list with no projects",
2990
+ "check": "params",
2991
+ "method": "session.list",
2992
+ "valid": false,
2993
+ "value": {
2994
+ "projectRoots": []
2995
+ }
2996
+ },
2997
+ {
2998
+ "name": "session.list with a fractional limit",
2999
+ "check": "params",
3000
+ "method": "session.list",
3001
+ "valid": false,
3002
+ "value": {
3003
+ "limit": 2.5
3004
+ }
3005
+ },
3006
+ {
3007
+ "name": "session.list with an empty cursor",
3008
+ "check": "params",
3009
+ "method": "session.list",
3010
+ "valid": false,
3011
+ "value": {
3012
+ "cursor": ""
3013
+ }
3014
+ },
3015
+ {
3016
+ "name": "session.list a page with more after it",
3017
+ "check": "result",
3018
+ "method": "session.list",
3019
+ "valid": true,
3020
+ "value": {
3021
+ "sessions": [
3022
+ {
3023
+ "id": "ses_fixture",
3024
+ "projectRoot": "/work/project",
3025
+ "agent": "main",
3026
+ "runtime": "codex",
3027
+ "model": "gpt-6.1-sol",
3028
+ "mode": "workspace-write",
3029
+ "thinking": "low",
3030
+ "workflow": {
3031
+ "mode": "pho",
3032
+ "maxPeers": 2,
3033
+ "supervisor": false
3034
+ },
3035
+ "teamLabel": "Phở",
3036
+ "threadId": "thread-1",
3037
+ "persistent": true,
3038
+ "busy": false,
3039
+ "status": "idle",
3040
+ "title": "Sửa lỗi 😀",
3041
+ "createdAt": "2026-10-15T00:00:00.000Z",
3042
+ "updatedAt": "2026-10-15T00:00:00.000Z"
3043
+ }
3044
+ ],
3045
+ "nextCursor": "eyJrIjpbMF19"
3046
+ }
3047
+ },
1956
3048
  {
1957
3049
  "name": "session.status params",
1958
3050
  "check": "params",