@anhlp/alp-protocol 0.0.0-beta.2 → 0.0.1-beta.10
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/conformance/cases.json +1 -1
- package/dist/connection.d.ts +13 -0
- package/dist/contract-v1.d.ts +5783 -1296
- package/dist/contract-v1.js +1 -1
- package/dist/dto.d.ts +6 -1
- package/dist/events.d.ts +47 -0
- package/dist/index.d.ts +1 -0
- package/dist/rpc.d.ts +854 -13
- package/dist/schedule.d.ts +48 -0
- package/dist/schedule.js +0 -0
- package/dist/session.d.ts +144 -3
- package/dist/wire.d.ts +132 -1
- package/dist/wire.js +81 -4
- package/fixtures/v1/cases.json +5324 -1112
- package/package.json +1 -1
- package/schema/ipc-v1.json +1047 -16
- package/schema/methods-v1.json +6936 -2024
- package/src/connection.ts +10 -0
- package/src/contract-v1.js +1 -1
- package/src/dto.ts +1 -1
- package/src/events.ts +30 -2
- package/src/index.ts +1 -0
- package/src/rpc.ts +226 -21
- package/src/schedule.ts +48 -0
- package/src/session.ts +121 -5
- package/src/wire.js +138 -4
package/schema/ipc-v1.json
CHANGED
|
@@ -111,6 +111,18 @@
|
|
|
111
111
|
"promptImages": {
|
|
112
112
|
"type": "boolean"
|
|
113
113
|
},
|
|
114
|
+
"promptAttachments": {
|
|
115
|
+
"type": "array",
|
|
116
|
+
"minItems": 1,
|
|
117
|
+
"uniqueItems": true,
|
|
118
|
+
"items": {
|
|
119
|
+
"enum": [
|
|
120
|
+
"file.path",
|
|
121
|
+
"document.native",
|
|
122
|
+
"text.extract"
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
},
|
|
114
126
|
"usage": {
|
|
115
127
|
"$ref": "#/$defs/usage"
|
|
116
128
|
}
|
|
@@ -331,6 +343,26 @@
|
|
|
331
343
|
},
|
|
332
344
|
"askedAt": {
|
|
333
345
|
"type": "string"
|
|
346
|
+
},
|
|
347
|
+
"gate": {
|
|
348
|
+
"type": "object",
|
|
349
|
+
"properties": {
|
|
350
|
+
"projectRoot": {
|
|
351
|
+
"type": "string"
|
|
352
|
+
},
|
|
353
|
+
"taskId": {
|
|
354
|
+
"type": "string"
|
|
355
|
+
},
|
|
356
|
+
"gateId": {
|
|
357
|
+
"type": "string"
|
|
358
|
+
}
|
|
359
|
+
},
|
|
360
|
+
"required": [
|
|
361
|
+
"projectRoot",
|
|
362
|
+
"taskId",
|
|
363
|
+
"gateId"
|
|
364
|
+
],
|
|
365
|
+
"additionalProperties": true
|
|
334
366
|
}
|
|
335
367
|
},
|
|
336
368
|
"required": [
|
|
@@ -343,6 +375,31 @@
|
|
|
343
375
|
],
|
|
344
376
|
"additionalProperties": true
|
|
345
377
|
},
|
|
378
|
+
"attention": {
|
|
379
|
+
"type": "object",
|
|
380
|
+
"properties": {
|
|
381
|
+
"reason": {
|
|
382
|
+
"enum": [
|
|
383
|
+
"finished",
|
|
384
|
+
"error"
|
|
385
|
+
]
|
|
386
|
+
},
|
|
387
|
+
"at": {
|
|
388
|
+
"type": "string"
|
|
389
|
+
},
|
|
390
|
+
"turnId": {
|
|
391
|
+
"type": "string"
|
|
392
|
+
},
|
|
393
|
+
"message": {
|
|
394
|
+
"type": "string"
|
|
395
|
+
}
|
|
396
|
+
},
|
|
397
|
+
"required": [
|
|
398
|
+
"reason",
|
|
399
|
+
"at"
|
|
400
|
+
],
|
|
401
|
+
"additionalProperties": true
|
|
402
|
+
},
|
|
346
403
|
"spec": {
|
|
347
404
|
"type": "object",
|
|
348
405
|
"properties": {
|
|
@@ -530,24 +587,96 @@
|
|
|
530
587
|
]
|
|
531
588
|
},
|
|
532
589
|
"notification": {
|
|
533
|
-
"
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
"
|
|
590
|
+
"oneOf": [
|
|
591
|
+
{
|
|
592
|
+
"type": "object",
|
|
593
|
+
"properties": {
|
|
594
|
+
"jsonrpc": {
|
|
595
|
+
"const": "2.0"
|
|
596
|
+
},
|
|
597
|
+
"method": {
|
|
598
|
+
"const": "event"
|
|
599
|
+
},
|
|
600
|
+
"params": {
|
|
601
|
+
"$ref": "#/$defs/envelope"
|
|
602
|
+
}
|
|
603
|
+
},
|
|
604
|
+
"required": [
|
|
605
|
+
"jsonrpc",
|
|
606
|
+
"method",
|
|
607
|
+
"params"
|
|
608
|
+
],
|
|
609
|
+
"additionalProperties": true
|
|
537
610
|
},
|
|
538
|
-
|
|
539
|
-
"
|
|
611
|
+
{
|
|
612
|
+
"type": "object",
|
|
613
|
+
"description": "A terminal's output, exit or detach (capability terminal, §12.10).",
|
|
614
|
+
"properties": {
|
|
615
|
+
"jsonrpc": {
|
|
616
|
+
"const": "2.0"
|
|
617
|
+
},
|
|
618
|
+
"method": {
|
|
619
|
+
"const": "terminal.event"
|
|
620
|
+
},
|
|
621
|
+
"params": {
|
|
622
|
+
"$ref": "#/$defs/terminalEvent"
|
|
623
|
+
}
|
|
624
|
+
},
|
|
625
|
+
"required": [
|
|
626
|
+
"jsonrpc",
|
|
627
|
+
"method",
|
|
628
|
+
"params"
|
|
629
|
+
],
|
|
630
|
+
"additionalProperties": true
|
|
540
631
|
},
|
|
541
|
-
|
|
542
|
-
"
|
|
632
|
+
{
|
|
633
|
+
"type": "object",
|
|
634
|
+
"properties": {
|
|
635
|
+
"jsonrpc": {
|
|
636
|
+
"const": "2.0"
|
|
637
|
+
},
|
|
638
|
+
"method": {
|
|
639
|
+
"const": "terminal.changed"
|
|
640
|
+
},
|
|
641
|
+
"params": {
|
|
642
|
+
"$ref": "#/$defs/terminalChanged"
|
|
643
|
+
}
|
|
644
|
+
},
|
|
645
|
+
"required": [
|
|
646
|
+
"jsonrpc",
|
|
647
|
+
"method",
|
|
648
|
+
"params"
|
|
649
|
+
],
|
|
650
|
+
"additionalProperties": true
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
"type": "object",
|
|
654
|
+
"description": "The live model catalog changed (capability catalog.live): re-read catalog.get.",
|
|
655
|
+
"properties": {
|
|
656
|
+
"jsonrpc": {
|
|
657
|
+
"const": "2.0"
|
|
658
|
+
},
|
|
659
|
+
"method": {
|
|
660
|
+
"const": "catalog.updated"
|
|
661
|
+
},
|
|
662
|
+
"params": {
|
|
663
|
+
"type": "object",
|
|
664
|
+
"properties": {
|
|
665
|
+
"fetchedAt": {
|
|
666
|
+
"type": "string"
|
|
667
|
+
}
|
|
668
|
+
},
|
|
669
|
+
"additionalProperties": true
|
|
670
|
+
}
|
|
671
|
+
},
|
|
672
|
+
"required": [
|
|
673
|
+
"jsonrpc",
|
|
674
|
+
"method",
|
|
675
|
+
"params"
|
|
676
|
+
],
|
|
677
|
+
"additionalProperties": true
|
|
543
678
|
}
|
|
544
|
-
|
|
545
|
-
"required": [
|
|
546
|
-
"jsonrpc",
|
|
547
|
-
"method",
|
|
548
|
-
"params"
|
|
549
|
-
],
|
|
550
|
-
"additionalProperties": true
|
|
679
|
+
]
|
|
551
680
|
},
|
|
552
681
|
"knownEvent": {
|
|
553
682
|
"oneOf": [
|
|
@@ -889,6 +1018,47 @@
|
|
|
889
1018
|
"reason"
|
|
890
1019
|
],
|
|
891
1020
|
"additionalProperties": true
|
|
1021
|
+
},
|
|
1022
|
+
{
|
|
1023
|
+
"type": "object",
|
|
1024
|
+
"properties": {
|
|
1025
|
+
"type": {
|
|
1026
|
+
"const": "attention"
|
|
1027
|
+
},
|
|
1028
|
+
"attention": {
|
|
1029
|
+
"$ref": "#/$defs/attention"
|
|
1030
|
+
}
|
|
1031
|
+
},
|
|
1032
|
+
"required": [
|
|
1033
|
+
"type"
|
|
1034
|
+
],
|
|
1035
|
+
"additionalProperties": true
|
|
1036
|
+
},
|
|
1037
|
+
{
|
|
1038
|
+
"type": "object",
|
|
1039
|
+
"properties": {
|
|
1040
|
+
"type": {
|
|
1041
|
+
"const": "history.reset"
|
|
1042
|
+
},
|
|
1043
|
+
"generation": {
|
|
1044
|
+
"type": "string",
|
|
1045
|
+
"pattern": "^[0-9a-f]{32}$"
|
|
1046
|
+
},
|
|
1047
|
+
"reason": {
|
|
1048
|
+
"const": "rewind"
|
|
1049
|
+
},
|
|
1050
|
+
"branchId": {
|
|
1051
|
+
"type": "string",
|
|
1052
|
+
"pattern": "^br_[0-9a-f]{16}$"
|
|
1053
|
+
}
|
|
1054
|
+
},
|
|
1055
|
+
"required": [
|
|
1056
|
+
"type",
|
|
1057
|
+
"generation",
|
|
1058
|
+
"reason",
|
|
1059
|
+
"branchId"
|
|
1060
|
+
],
|
|
1061
|
+
"additionalProperties": true
|
|
892
1062
|
}
|
|
893
1063
|
]
|
|
894
1064
|
},
|
|
@@ -915,7 +1085,9 @@
|
|
|
915
1085
|
"question",
|
|
916
1086
|
"question.resolved",
|
|
917
1087
|
"pin",
|
|
918
|
-
"unpin"
|
|
1088
|
+
"unpin",
|
|
1089
|
+
"attention",
|
|
1090
|
+
"history.reset"
|
|
919
1091
|
]
|
|
920
1092
|
}
|
|
921
1093
|
}
|
|
@@ -945,6 +1117,43 @@
|
|
|
945
1117
|
"images": {
|
|
946
1118
|
"type": "integer",
|
|
947
1119
|
"minimum": 1
|
|
1120
|
+
},
|
|
1121
|
+
"attachments": {
|
|
1122
|
+
"type": "array",
|
|
1123
|
+
"items": {
|
|
1124
|
+
"type": "object",
|
|
1125
|
+
"properties": {
|
|
1126
|
+
"attachmentId": {
|
|
1127
|
+
"type": "string",
|
|
1128
|
+
"pattern": "^att_[0-9a-f]{32}$"
|
|
1129
|
+
},
|
|
1130
|
+
"name": {
|
|
1131
|
+
"type": "string"
|
|
1132
|
+
},
|
|
1133
|
+
"mimeType": {
|
|
1134
|
+
"type": "string"
|
|
1135
|
+
},
|
|
1136
|
+
"size": {
|
|
1137
|
+
"type": "integer",
|
|
1138
|
+
"minimum": 0
|
|
1139
|
+
}
|
|
1140
|
+
},
|
|
1141
|
+
"required": [
|
|
1142
|
+
"attachmentId",
|
|
1143
|
+
"name",
|
|
1144
|
+
"mimeType",
|
|
1145
|
+
"size"
|
|
1146
|
+
],
|
|
1147
|
+
"additionalProperties": false
|
|
1148
|
+
}
|
|
1149
|
+
},
|
|
1150
|
+
"origin": {
|
|
1151
|
+
"enum": [
|
|
1152
|
+
"user",
|
|
1153
|
+
"wake",
|
|
1154
|
+
"assignment",
|
|
1155
|
+
"runtime"
|
|
1156
|
+
]
|
|
948
1157
|
}
|
|
949
1158
|
},
|
|
950
1159
|
"required": [
|
|
@@ -1537,6 +1746,9 @@
|
|
|
1537
1746
|
"archived": {
|
|
1538
1747
|
"type": "boolean"
|
|
1539
1748
|
},
|
|
1749
|
+
"attention": {
|
|
1750
|
+
"$ref": "#/$defs/attention"
|
|
1751
|
+
},
|
|
1540
1752
|
"lastError": {
|
|
1541
1753
|
"type": "object",
|
|
1542
1754
|
"properties": {
|
|
@@ -1557,6 +1769,59 @@
|
|
|
1557
1769
|
},
|
|
1558
1770
|
"updatedAt": {
|
|
1559
1771
|
"type": "string"
|
|
1772
|
+
},
|
|
1773
|
+
"conversation": {
|
|
1774
|
+
"type": "object",
|
|
1775
|
+
"properties": {
|
|
1776
|
+
"fork": {
|
|
1777
|
+
"type": "boolean"
|
|
1778
|
+
},
|
|
1779
|
+
"rewind": {
|
|
1780
|
+
"type": "boolean"
|
|
1781
|
+
},
|
|
1782
|
+
"reload": {
|
|
1783
|
+
"type": "boolean",
|
|
1784
|
+
"description": "Whether session.reload can restart this root's native process (§12.8); the root must also be open and idle."
|
|
1785
|
+
},
|
|
1786
|
+
"configure": {
|
|
1787
|
+
"type": "boolean",
|
|
1788
|
+
"description": "Whether session.configure can change this root's model, effort or team (§12.9); the root must also be open and idle."
|
|
1789
|
+
},
|
|
1790
|
+
"reason": {
|
|
1791
|
+
"enum": [
|
|
1792
|
+
"runtime_unsupported",
|
|
1793
|
+
"not_persistent",
|
|
1794
|
+
"not_root"
|
|
1795
|
+
]
|
|
1796
|
+
}
|
|
1797
|
+
},
|
|
1798
|
+
"required": [
|
|
1799
|
+
"fork",
|
|
1800
|
+
"rewind"
|
|
1801
|
+
],
|
|
1802
|
+
"additionalProperties": true
|
|
1803
|
+
},
|
|
1804
|
+
"forkedFrom": {
|
|
1805
|
+
"$ref": "#/$defs/forkProvenance"
|
|
1806
|
+
},
|
|
1807
|
+
"branches": {
|
|
1808
|
+
"type": "array",
|
|
1809
|
+
"maxItems": 100,
|
|
1810
|
+
"items": {
|
|
1811
|
+
"$ref": "#/$defs/conversationBranch"
|
|
1812
|
+
}
|
|
1813
|
+
},
|
|
1814
|
+
"promptAttachments": {
|
|
1815
|
+
"type": "array",
|
|
1816
|
+
"minItems": 1,
|
|
1817
|
+
"uniqueItems": true,
|
|
1818
|
+
"items": {
|
|
1819
|
+
"enum": [
|
|
1820
|
+
"file.path",
|
|
1821
|
+
"document.native",
|
|
1822
|
+
"text.extract"
|
|
1823
|
+
]
|
|
1824
|
+
}
|
|
1560
1825
|
}
|
|
1561
1826
|
},
|
|
1562
1827
|
"required": [
|
|
@@ -2330,6 +2595,772 @@
|
|
|
2330
2595
|
"data"
|
|
2331
2596
|
],
|
|
2332
2597
|
"additionalProperties": false
|
|
2598
|
+
},
|
|
2599
|
+
"scheduleId": {
|
|
2600
|
+
"type": "string",
|
|
2601
|
+
"pattern": "^sch_[0-9a-f]{16}$"
|
|
2602
|
+
},
|
|
2603
|
+
"scheduleError": {
|
|
2604
|
+
"type": "object",
|
|
2605
|
+
"properties": {
|
|
2606
|
+
"message": {
|
|
2607
|
+
"type": "string"
|
|
2608
|
+
},
|
|
2609
|
+
"code": {
|
|
2610
|
+
"type": "string"
|
|
2611
|
+
}
|
|
2612
|
+
},
|
|
2613
|
+
"required": [
|
|
2614
|
+
"message"
|
|
2615
|
+
],
|
|
2616
|
+
"additionalProperties": true
|
|
2617
|
+
},
|
|
2618
|
+
"scheduleJob": {
|
|
2619
|
+
"type": "object",
|
|
2620
|
+
"properties": {
|
|
2621
|
+
"id": {
|
|
2622
|
+
"$ref": "#/$defs/scheduleId"
|
|
2623
|
+
},
|
|
2624
|
+
"projectRoot": {
|
|
2625
|
+
"$ref": "#/$defs/projectRoot"
|
|
2626
|
+
},
|
|
2627
|
+
"sessionId": {
|
|
2628
|
+
"type": "string"
|
|
2629
|
+
},
|
|
2630
|
+
"prompt": {
|
|
2631
|
+
"type": "string"
|
|
2632
|
+
},
|
|
2633
|
+
"dueAt": {
|
|
2634
|
+
"type": "string",
|
|
2635
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,3})?(Z|[+-]\\d{2}:\\d{2})$"
|
|
2636
|
+
},
|
|
2637
|
+
"status": {
|
|
2638
|
+
"enum": [
|
|
2639
|
+
"pending",
|
|
2640
|
+
"delivered",
|
|
2641
|
+
"failed",
|
|
2642
|
+
"cancelled"
|
|
2643
|
+
]
|
|
2644
|
+
},
|
|
2645
|
+
"attempts": {
|
|
2646
|
+
"type": "integer",
|
|
2647
|
+
"minimum": 0
|
|
2648
|
+
},
|
|
2649
|
+
"createdAt": {
|
|
2650
|
+
"type": "string"
|
|
2651
|
+
},
|
|
2652
|
+
"updatedAt": {
|
|
2653
|
+
"type": "string"
|
|
2654
|
+
},
|
|
2655
|
+
"deliveredAt": {
|
|
2656
|
+
"type": "string"
|
|
2657
|
+
},
|
|
2658
|
+
"failedAt": {
|
|
2659
|
+
"type": "string"
|
|
2660
|
+
},
|
|
2661
|
+
"cancelledAt": {
|
|
2662
|
+
"type": "string"
|
|
2663
|
+
},
|
|
2664
|
+
"attemptedAt": {
|
|
2665
|
+
"type": "string"
|
|
2666
|
+
},
|
|
2667
|
+
"lateByMs": {
|
|
2668
|
+
"type": "integer",
|
|
2669
|
+
"minimum": 0
|
|
2670
|
+
},
|
|
2671
|
+
"lastError": {
|
|
2672
|
+
"$ref": "#/$defs/scheduleError"
|
|
2673
|
+
},
|
|
2674
|
+
"keepsSession": {
|
|
2675
|
+
"const": false
|
|
2676
|
+
}
|
|
2677
|
+
},
|
|
2678
|
+
"required": [
|
|
2679
|
+
"id",
|
|
2680
|
+
"projectRoot",
|
|
2681
|
+
"sessionId",
|
|
2682
|
+
"prompt",
|
|
2683
|
+
"dueAt",
|
|
2684
|
+
"status",
|
|
2685
|
+
"attempts",
|
|
2686
|
+
"createdAt",
|
|
2687
|
+
"updatedAt"
|
|
2688
|
+
],
|
|
2689
|
+
"additionalProperties": true
|
|
2690
|
+
},
|
|
2691
|
+
"registryProject": {
|
|
2692
|
+
"type": "object",
|
|
2693
|
+
"properties": {
|
|
2694
|
+
"id": {
|
|
2695
|
+
"type": "string"
|
|
2696
|
+
},
|
|
2697
|
+
"root": {
|
|
2698
|
+
"type": "string"
|
|
2699
|
+
},
|
|
2700
|
+
"customName": {
|
|
2701
|
+
"type": [
|
|
2702
|
+
"string",
|
|
2703
|
+
"null"
|
|
2704
|
+
]
|
|
2705
|
+
},
|
|
2706
|
+
"addedAt": {
|
|
2707
|
+
"type": "string"
|
|
2708
|
+
},
|
|
2709
|
+
"removedAt": {
|
|
2710
|
+
"type": [
|
|
2711
|
+
"string",
|
|
2712
|
+
"null"
|
|
2713
|
+
]
|
|
2714
|
+
},
|
|
2715
|
+
"revision": {
|
|
2716
|
+
"type": "integer",
|
|
2717
|
+
"minimum": 0
|
|
2718
|
+
},
|
|
2719
|
+
"canonical": {
|
|
2720
|
+
"type": "string"
|
|
2721
|
+
}
|
|
2722
|
+
},
|
|
2723
|
+
"required": [
|
|
2724
|
+
"id",
|
|
2725
|
+
"root",
|
|
2726
|
+
"addedAt"
|
|
2727
|
+
],
|
|
2728
|
+
"additionalProperties": false
|
|
2729
|
+
},
|
|
2730
|
+
"registryWorkspace": {
|
|
2731
|
+
"type": "object",
|
|
2732
|
+
"properties": {
|
|
2733
|
+
"id": {
|
|
2734
|
+
"type": "string"
|
|
2735
|
+
},
|
|
2736
|
+
"projectId": {
|
|
2737
|
+
"type": "string"
|
|
2738
|
+
},
|
|
2739
|
+
"directory": {
|
|
2740
|
+
"type": "string"
|
|
2741
|
+
},
|
|
2742
|
+
"title": {
|
|
2743
|
+
"type": [
|
|
2744
|
+
"string",
|
|
2745
|
+
"null"
|
|
2746
|
+
]
|
|
2747
|
+
},
|
|
2748
|
+
"pinnedAt": {
|
|
2749
|
+
"type": [
|
|
2750
|
+
"string",
|
|
2751
|
+
"null"
|
|
2752
|
+
]
|
|
2753
|
+
},
|
|
2754
|
+
"archivedAt": {
|
|
2755
|
+
"type": [
|
|
2756
|
+
"string",
|
|
2757
|
+
"null"
|
|
2758
|
+
]
|
|
2759
|
+
},
|
|
2760
|
+
"labels": {
|
|
2761
|
+
"type": "array",
|
|
2762
|
+
"items": {
|
|
2763
|
+
"type": "string"
|
|
2764
|
+
}
|
|
2765
|
+
},
|
|
2766
|
+
"createdAt": {
|
|
2767
|
+
"type": "string"
|
|
2768
|
+
},
|
|
2769
|
+
"revision": {
|
|
2770
|
+
"type": "integer",
|
|
2771
|
+
"minimum": 0
|
|
2772
|
+
},
|
|
2773
|
+
"canonical": {
|
|
2774
|
+
"type": "string"
|
|
2775
|
+
},
|
|
2776
|
+
"idempotencyKey": {
|
|
2777
|
+
"type": "string"
|
|
2778
|
+
},
|
|
2779
|
+
"branch": {
|
|
2780
|
+
"type": [
|
|
2781
|
+
"string",
|
|
2782
|
+
"null"
|
|
2783
|
+
]
|
|
2784
|
+
},
|
|
2785
|
+
"managedWorktree": {
|
|
2786
|
+
"type": "boolean"
|
|
2787
|
+
}
|
|
2788
|
+
},
|
|
2789
|
+
"required": [
|
|
2790
|
+
"id",
|
|
2791
|
+
"projectId",
|
|
2792
|
+
"directory",
|
|
2793
|
+
"labels",
|
|
2794
|
+
"createdAt"
|
|
2795
|
+
],
|
|
2796
|
+
"additionalProperties": false
|
|
2797
|
+
},
|
|
2798
|
+
"attachment": {
|
|
2799
|
+
"type": "object",
|
|
2800
|
+
"description": "A committed attachment as clients see it: ids, display metadata and its digest, never a host path or URL.",
|
|
2801
|
+
"properties": {
|
|
2802
|
+
"attachmentId": {
|
|
2803
|
+
"type": "string",
|
|
2804
|
+
"pattern": "^att_[0-9a-f]{32}$"
|
|
2805
|
+
},
|
|
2806
|
+
"sessionId": {
|
|
2807
|
+
"type": "string",
|
|
2808
|
+
"minLength": 1,
|
|
2809
|
+
"maxLength": 128
|
|
2810
|
+
},
|
|
2811
|
+
"name": {
|
|
2812
|
+
"type": "string",
|
|
2813
|
+
"minLength": 1,
|
|
2814
|
+
"maxLength": 255
|
|
2815
|
+
},
|
|
2816
|
+
"mimeType": {
|
|
2817
|
+
"type": "string",
|
|
2818
|
+
"minLength": 3,
|
|
2819
|
+
"maxLength": 255
|
|
2820
|
+
},
|
|
2821
|
+
"detectedMimeType": {
|
|
2822
|
+
"type": "string",
|
|
2823
|
+
"minLength": 3,
|
|
2824
|
+
"maxLength": 255
|
|
2825
|
+
},
|
|
2826
|
+
"size": {
|
|
2827
|
+
"type": "integer",
|
|
2828
|
+
"minimum": 0
|
|
2829
|
+
},
|
|
2830
|
+
"sha256": {
|
|
2831
|
+
"type": "string",
|
|
2832
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
2833
|
+
},
|
|
2834
|
+
"createdAt": {
|
|
2835
|
+
"type": "string"
|
|
2836
|
+
},
|
|
2837
|
+
"committedAt": {
|
|
2838
|
+
"type": "string"
|
|
2839
|
+
},
|
|
2840
|
+
"referenced": {
|
|
2841
|
+
"type": "boolean"
|
|
2842
|
+
}
|
|
2843
|
+
},
|
|
2844
|
+
"required": [
|
|
2845
|
+
"attachmentId",
|
|
2846
|
+
"sessionId",
|
|
2847
|
+
"name",
|
|
2848
|
+
"mimeType",
|
|
2849
|
+
"detectedMimeType",
|
|
2850
|
+
"size",
|
|
2851
|
+
"sha256",
|
|
2852
|
+
"createdAt",
|
|
2853
|
+
"committedAt",
|
|
2854
|
+
"referenced"
|
|
2855
|
+
],
|
|
2856
|
+
"additionalProperties": false
|
|
2857
|
+
},
|
|
2858
|
+
"forkProvenance": {
|
|
2859
|
+
"type": "object",
|
|
2860
|
+
"description": "Where a fork came from (§12.7): the source root, and the turn its conversation was cut at.",
|
|
2861
|
+
"properties": {
|
|
2862
|
+
"sessionId": {
|
|
2863
|
+
"type": "string",
|
|
2864
|
+
"minLength": 1,
|
|
2865
|
+
"maxLength": 128
|
|
2866
|
+
},
|
|
2867
|
+
"turnId": {
|
|
2868
|
+
"type": "string",
|
|
2869
|
+
"minLength": 1,
|
|
2870
|
+
"maxLength": 200
|
|
2871
|
+
},
|
|
2872
|
+
"boundary": {
|
|
2873
|
+
"enum": [
|
|
2874
|
+
"through",
|
|
2875
|
+
"before",
|
|
2876
|
+
"whole"
|
|
2877
|
+
]
|
|
2878
|
+
},
|
|
2879
|
+
"branchId": {
|
|
2880
|
+
"type": "string",
|
|
2881
|
+
"pattern": "^br_[0-9a-f]{16}$"
|
|
2882
|
+
},
|
|
2883
|
+
"at": {
|
|
2884
|
+
"type": "string",
|
|
2885
|
+
"minLength": 1,
|
|
2886
|
+
"maxLength": 64
|
|
2887
|
+
}
|
|
2888
|
+
},
|
|
2889
|
+
"required": [
|
|
2890
|
+
"sessionId",
|
|
2891
|
+
"boundary",
|
|
2892
|
+
"at"
|
|
2893
|
+
],
|
|
2894
|
+
"additionalProperties": true
|
|
2895
|
+
},
|
|
2896
|
+
"conversationBranch": {
|
|
2897
|
+
"type": "object",
|
|
2898
|
+
"description": "Later turns a rewind set aside (§12.7): kept, never deleted, recoverable as a new session with session.fork { branchId }.",
|
|
2899
|
+
"properties": {
|
|
2900
|
+
"branchId": {
|
|
2901
|
+
"type": "string",
|
|
2902
|
+
"pattern": "^br_[0-9a-f]{16}$"
|
|
2903
|
+
},
|
|
2904
|
+
"beforeTurnId": {
|
|
2905
|
+
"type": "string",
|
|
2906
|
+
"minLength": 1,
|
|
2907
|
+
"maxLength": 200
|
|
2908
|
+
},
|
|
2909
|
+
"turns": {
|
|
2910
|
+
"type": "integer",
|
|
2911
|
+
"minimum": 0
|
|
2912
|
+
},
|
|
2913
|
+
"at": {
|
|
2914
|
+
"type": "string",
|
|
2915
|
+
"minLength": 1,
|
|
2916
|
+
"maxLength": 64
|
|
2917
|
+
}
|
|
2918
|
+
},
|
|
2919
|
+
"required": [
|
|
2920
|
+
"branchId",
|
|
2921
|
+
"beforeTurnId",
|
|
2922
|
+
"turns",
|
|
2923
|
+
"at"
|
|
2924
|
+
],
|
|
2925
|
+
"additionalProperties": true
|
|
2926
|
+
},
|
|
2927
|
+
"effectiveConfig": {
|
|
2928
|
+
"type": "object",
|
|
2929
|
+
"description": "The configuration a root runs with, or would after a change, as alpd resolved it (§12.9).",
|
|
2930
|
+
"properties": {
|
|
2931
|
+
"team": {
|
|
2932
|
+
"type": "string"
|
|
2933
|
+
},
|
|
2934
|
+
"teamLabel": {
|
|
2935
|
+
"type": "string"
|
|
2936
|
+
},
|
|
2937
|
+
"agent": {
|
|
2938
|
+
"type": "string"
|
|
2939
|
+
},
|
|
2940
|
+
"runtime": {
|
|
2941
|
+
"enum": [
|
|
2942
|
+
"claude",
|
|
2943
|
+
"codex",
|
|
2944
|
+
"acp",
|
|
2945
|
+
"antigravity"
|
|
2946
|
+
]
|
|
2947
|
+
},
|
|
2948
|
+
"model": {
|
|
2949
|
+
"type": "string"
|
|
2950
|
+
},
|
|
2951
|
+
"thinking": {
|
|
2952
|
+
"type": "string"
|
|
2953
|
+
},
|
|
2954
|
+
"mode": {
|
|
2955
|
+
"type": "string"
|
|
2956
|
+
},
|
|
2957
|
+
"permissionProfile": {
|
|
2958
|
+
"type": "string",
|
|
2959
|
+
"description": "The permission profile capping the agent's mode, when one does."
|
|
2960
|
+
},
|
|
2961
|
+
"supervisor": {
|
|
2962
|
+
"type": "boolean"
|
|
2963
|
+
},
|
|
2964
|
+
"maxPeers": {
|
|
2965
|
+
"type": "integer"
|
|
2966
|
+
},
|
|
2967
|
+
"delegates": {
|
|
2968
|
+
"type": "array",
|
|
2969
|
+
"items": {
|
|
2970
|
+
"type": "string"
|
|
2971
|
+
},
|
|
2972
|
+
"description": "Agents the root may delegate to."
|
|
2973
|
+
},
|
|
2974
|
+
"tools": {
|
|
2975
|
+
"type": "array",
|
|
2976
|
+
"items": {
|
|
2977
|
+
"type": "string"
|
|
2978
|
+
},
|
|
2979
|
+
"description": "ALP tools the root's agent is given."
|
|
2980
|
+
},
|
|
2981
|
+
"mcpServers": {
|
|
2982
|
+
"type": "array",
|
|
2983
|
+
"items": {
|
|
2984
|
+
"type": "object",
|
|
2985
|
+
"properties": {
|
|
2986
|
+
"name": {
|
|
2987
|
+
"type": "string"
|
|
2988
|
+
},
|
|
2989
|
+
"kind": {
|
|
2990
|
+
"enum": [
|
|
2991
|
+
"stdio",
|
|
2992
|
+
"http"
|
|
2993
|
+
]
|
|
2994
|
+
}
|
|
2995
|
+
},
|
|
2996
|
+
"required": [
|
|
2997
|
+
"name",
|
|
2998
|
+
"kind"
|
|
2999
|
+
],
|
|
3000
|
+
"additionalProperties": true
|
|
3001
|
+
}
|
|
3002
|
+
},
|
|
3003
|
+
"hooks": {
|
|
3004
|
+
"type": "integer",
|
|
3005
|
+
"minimum": 0,
|
|
3006
|
+
"description": "How many hook commands the agent runs."
|
|
3007
|
+
},
|
|
3008
|
+
"instructionsSha": {
|
|
3009
|
+
"type": "string"
|
|
3010
|
+
}
|
|
3011
|
+
},
|
|
3012
|
+
"required": [
|
|
3013
|
+
"team",
|
|
3014
|
+
"agent",
|
|
3015
|
+
"runtime",
|
|
3016
|
+
"model",
|
|
3017
|
+
"thinking",
|
|
3018
|
+
"mode",
|
|
3019
|
+
"supervisor",
|
|
3020
|
+
"delegates",
|
|
3021
|
+
"tools",
|
|
3022
|
+
"mcpServers",
|
|
3023
|
+
"hooks"
|
|
3024
|
+
],
|
|
3025
|
+
"additionalProperties": true
|
|
3026
|
+
},
|
|
3027
|
+
"configurePreview": {
|
|
3028
|
+
"type": "object",
|
|
3029
|
+
"properties": {
|
|
3030
|
+
"current": {
|
|
3031
|
+
"$ref": "#/$defs/effectiveConfig"
|
|
3032
|
+
},
|
|
3033
|
+
"proposed": {
|
|
3034
|
+
"$ref": "#/$defs/effectiveConfig"
|
|
3035
|
+
},
|
|
3036
|
+
"changes": {
|
|
3037
|
+
"type": "array",
|
|
3038
|
+
"items": {
|
|
3039
|
+
"enum": [
|
|
3040
|
+
"model",
|
|
3041
|
+
"thinking",
|
|
3042
|
+
"team",
|
|
3043
|
+
"mode"
|
|
3044
|
+
]
|
|
3045
|
+
}
|
|
3046
|
+
},
|
|
3047
|
+
"restart": {
|
|
3048
|
+
"type": "boolean",
|
|
3049
|
+
"description": "Whether applying it restarts the root's native process (on its own conversation)."
|
|
3050
|
+
},
|
|
3051
|
+
"allowed": {
|
|
3052
|
+
"type": "boolean",
|
|
3053
|
+
"description": "Whether session.configure would take it now; a busy tree may still refuse it later."
|
|
3054
|
+
},
|
|
3055
|
+
"reason": {
|
|
3056
|
+
"enum": [
|
|
3057
|
+
"session_busy",
|
|
3058
|
+
"session_closed",
|
|
3059
|
+
"not_root",
|
|
3060
|
+
"runtime_unsupported",
|
|
3061
|
+
"runtime_mismatch",
|
|
3062
|
+
"agent_mismatch",
|
|
3063
|
+
"permission_escalation",
|
|
3064
|
+
"team_not_found",
|
|
3065
|
+
"invalid_params",
|
|
3066
|
+
"not_persistent"
|
|
3067
|
+
]
|
|
3068
|
+
},
|
|
3069
|
+
"message": {
|
|
3070
|
+
"type": "string"
|
|
3071
|
+
},
|
|
3072
|
+
"teams": {
|
|
3073
|
+
"type": "array",
|
|
3074
|
+
"items": {
|
|
3075
|
+
"type": "object",
|
|
3076
|
+
"properties": {
|
|
3077
|
+
"id": {
|
|
3078
|
+
"type": "string"
|
|
3079
|
+
},
|
|
3080
|
+
"label": {
|
|
3081
|
+
"type": "string"
|
|
3082
|
+
},
|
|
3083
|
+
"description": {
|
|
3084
|
+
"type": "string"
|
|
3085
|
+
}
|
|
3086
|
+
},
|
|
3087
|
+
"required": [
|
|
3088
|
+
"id",
|
|
3089
|
+
"label"
|
|
3090
|
+
],
|
|
3091
|
+
"additionalProperties": true
|
|
3092
|
+
}
|
|
3093
|
+
}
|
|
3094
|
+
},
|
|
3095
|
+
"required": [
|
|
3096
|
+
"current",
|
|
3097
|
+
"proposed",
|
|
3098
|
+
"changes",
|
|
3099
|
+
"restart",
|
|
3100
|
+
"allowed",
|
|
3101
|
+
"teams"
|
|
3102
|
+
],
|
|
3103
|
+
"additionalProperties": true
|
|
3104
|
+
},
|
|
3105
|
+
"configureOutcome": {
|
|
3106
|
+
"type": "object",
|
|
3107
|
+
"properties": {
|
|
3108
|
+
"status": {
|
|
3109
|
+
"enum": [
|
|
3110
|
+
"applied",
|
|
3111
|
+
"unchanged"
|
|
3112
|
+
]
|
|
3113
|
+
},
|
|
3114
|
+
"requested": {
|
|
3115
|
+
"type": "object",
|
|
3116
|
+
"properties": {
|
|
3117
|
+
"model": {
|
|
3118
|
+
"type": "string"
|
|
3119
|
+
},
|
|
3120
|
+
"thinking": {
|
|
3121
|
+
"type": "string"
|
|
3122
|
+
},
|
|
3123
|
+
"team": {
|
|
3124
|
+
"type": "string"
|
|
3125
|
+
},
|
|
3126
|
+
"mode": {
|
|
3127
|
+
"type": "string"
|
|
3128
|
+
}
|
|
3129
|
+
},
|
|
3130
|
+
"additionalProperties": false
|
|
3131
|
+
},
|
|
3132
|
+
"effective": {
|
|
3133
|
+
"$ref": "#/$defs/effectiveConfig"
|
|
3134
|
+
},
|
|
3135
|
+
"restarted": {
|
|
3136
|
+
"type": "boolean"
|
|
3137
|
+
}
|
|
3138
|
+
},
|
|
3139
|
+
"required": [
|
|
3140
|
+
"status",
|
|
3141
|
+
"requested",
|
|
3142
|
+
"effective",
|
|
3143
|
+
"restarted"
|
|
3144
|
+
],
|
|
3145
|
+
"additionalProperties": true
|
|
3146
|
+
},
|
|
3147
|
+
"terminal": {
|
|
3148
|
+
"type": "object",
|
|
3149
|
+
"description": "A terminal as clients see it: ids, size and state, never a process id, shell path or host path.",
|
|
3150
|
+
"properties": {
|
|
3151
|
+
"terminalId": {
|
|
3152
|
+
"type": "string",
|
|
3153
|
+
"pattern": "^term_[0-9a-f]{32}$"
|
|
3154
|
+
},
|
|
3155
|
+
"workspaceId": {
|
|
3156
|
+
"type": "string",
|
|
3157
|
+
"minLength": 1,
|
|
3158
|
+
"maxLength": 200
|
|
3159
|
+
},
|
|
3160
|
+
"title": {
|
|
3161
|
+
"type": "string",
|
|
3162
|
+
"maxLength": 64
|
|
3163
|
+
},
|
|
3164
|
+
"cols": {
|
|
3165
|
+
"type": "integer",
|
|
3166
|
+
"minimum": 2,
|
|
3167
|
+
"maximum": 500
|
|
3168
|
+
},
|
|
3169
|
+
"rows": {
|
|
3170
|
+
"type": "integer",
|
|
3171
|
+
"minimum": 1,
|
|
3172
|
+
"maximum": 200
|
|
3173
|
+
},
|
|
3174
|
+
"state": {
|
|
3175
|
+
"enum": [
|
|
3176
|
+
"running",
|
|
3177
|
+
"exited"
|
|
3178
|
+
]
|
|
3179
|
+
},
|
|
3180
|
+
"attached": {
|
|
3181
|
+
"type": "boolean"
|
|
3182
|
+
},
|
|
3183
|
+
"createdAt": {
|
|
3184
|
+
"type": "string",
|
|
3185
|
+
"format": "date-time"
|
|
3186
|
+
},
|
|
3187
|
+
"lastActivityAt": {
|
|
3188
|
+
"type": "string",
|
|
3189
|
+
"format": "date-time"
|
|
3190
|
+
},
|
|
3191
|
+
"expiresAt": {
|
|
3192
|
+
"type": "string",
|
|
3193
|
+
"format": "date-time"
|
|
3194
|
+
},
|
|
3195
|
+
"exitCode": {
|
|
3196
|
+
"type": [
|
|
3197
|
+
"integer",
|
|
3198
|
+
"null"
|
|
3199
|
+
]
|
|
3200
|
+
},
|
|
3201
|
+
"signal": {
|
|
3202
|
+
"type": [
|
|
3203
|
+
"integer",
|
|
3204
|
+
"null"
|
|
3205
|
+
]
|
|
3206
|
+
},
|
|
3207
|
+
"endReason": {
|
|
3208
|
+
"enum": [
|
|
3209
|
+
"exited",
|
|
3210
|
+
"closed",
|
|
3211
|
+
"idle",
|
|
3212
|
+
"lifetime",
|
|
3213
|
+
"detached",
|
|
3214
|
+
"revoked",
|
|
3215
|
+
"disabled",
|
|
3216
|
+
"shutdown"
|
|
3217
|
+
]
|
|
3218
|
+
},
|
|
3219
|
+
"protection": {
|
|
3220
|
+
"enum": [
|
|
3221
|
+
"root-only",
|
|
3222
|
+
"none"
|
|
3223
|
+
],
|
|
3224
|
+
"description": "Absent: full native process protection (macOS, supported Linux). root-only: best-effort Linux; closing ends the shell, but processes it started may keep running. none: Windows platform PTY (ConPTY); cleanup is best-effort and not guaranteed. Clients show a non-blocking notice."
|
|
3225
|
+
}
|
|
3226
|
+
},
|
|
3227
|
+
"required": [
|
|
3228
|
+
"terminalId",
|
|
3229
|
+
"workspaceId",
|
|
3230
|
+
"title",
|
|
3231
|
+
"cols",
|
|
3232
|
+
"rows",
|
|
3233
|
+
"state",
|
|
3234
|
+
"attached",
|
|
3235
|
+
"createdAt",
|
|
3236
|
+
"lastActivityAt",
|
|
3237
|
+
"expiresAt"
|
|
3238
|
+
],
|
|
3239
|
+
"additionalProperties": false
|
|
3240
|
+
},
|
|
3241
|
+
"terminalEvent": {
|
|
3242
|
+
"description": "params of a terminal.event notification (§12.10): sent only to the connection attached to the terminal.",
|
|
3243
|
+
"oneOf": [
|
|
3244
|
+
{
|
|
3245
|
+
"type": "object",
|
|
3246
|
+
"properties": {
|
|
3247
|
+
"terminalId": {
|
|
3248
|
+
"type": "string",
|
|
3249
|
+
"pattern": "^term_[0-9a-f]{32}$"
|
|
3250
|
+
},
|
|
3251
|
+
"type": {
|
|
3252
|
+
"const": "output"
|
|
3253
|
+
},
|
|
3254
|
+
"seq": {
|
|
3255
|
+
"type": "integer",
|
|
3256
|
+
"minimum": 1
|
|
3257
|
+
},
|
|
3258
|
+
"data": {
|
|
3259
|
+
"type": "string",
|
|
3260
|
+
"minLength": 1,
|
|
3261
|
+
"maxLength": 65536
|
|
3262
|
+
}
|
|
3263
|
+
},
|
|
3264
|
+
"required": [
|
|
3265
|
+
"terminalId",
|
|
3266
|
+
"type",
|
|
3267
|
+
"seq",
|
|
3268
|
+
"data"
|
|
3269
|
+
],
|
|
3270
|
+
"additionalProperties": false
|
|
3271
|
+
},
|
|
3272
|
+
{
|
|
3273
|
+
"type": "object",
|
|
3274
|
+
"properties": {
|
|
3275
|
+
"terminalId": {
|
|
3276
|
+
"type": "string",
|
|
3277
|
+
"pattern": "^term_[0-9a-f]{32}$"
|
|
3278
|
+
},
|
|
3279
|
+
"type": {
|
|
3280
|
+
"const": "exit"
|
|
3281
|
+
},
|
|
3282
|
+
"seq": {
|
|
3283
|
+
"type": "integer",
|
|
3284
|
+
"minimum": 1
|
|
3285
|
+
},
|
|
3286
|
+
"exitCode": {
|
|
3287
|
+
"type": [
|
|
3288
|
+
"integer",
|
|
3289
|
+
"null"
|
|
3290
|
+
]
|
|
3291
|
+
},
|
|
3292
|
+
"signal": {
|
|
3293
|
+
"type": [
|
|
3294
|
+
"integer",
|
|
3295
|
+
"null"
|
|
3296
|
+
]
|
|
3297
|
+
},
|
|
3298
|
+
"reason": {
|
|
3299
|
+
"enum": [
|
|
3300
|
+
"exited",
|
|
3301
|
+
"closed",
|
|
3302
|
+
"idle",
|
|
3303
|
+
"lifetime",
|
|
3304
|
+
"detached",
|
|
3305
|
+
"revoked",
|
|
3306
|
+
"disabled",
|
|
3307
|
+
"shutdown"
|
|
3308
|
+
]
|
|
3309
|
+
}
|
|
3310
|
+
},
|
|
3311
|
+
"required": [
|
|
3312
|
+
"terminalId",
|
|
3313
|
+
"type",
|
|
3314
|
+
"seq",
|
|
3315
|
+
"exitCode",
|
|
3316
|
+
"signal",
|
|
3317
|
+
"reason"
|
|
3318
|
+
],
|
|
3319
|
+
"additionalProperties": false
|
|
3320
|
+
},
|
|
3321
|
+
{
|
|
3322
|
+
"type": "object",
|
|
3323
|
+
"properties": {
|
|
3324
|
+
"terminalId": {
|
|
3325
|
+
"type": "string",
|
|
3326
|
+
"pattern": "^term_[0-9a-f]{32}$"
|
|
3327
|
+
},
|
|
3328
|
+
"type": {
|
|
3329
|
+
"const": "detached"
|
|
3330
|
+
},
|
|
3331
|
+
"reason": {
|
|
3332
|
+
"enum": [
|
|
3333
|
+
"replaced",
|
|
3334
|
+
"slow_consumer"
|
|
3335
|
+
]
|
|
3336
|
+
}
|
|
3337
|
+
},
|
|
3338
|
+
"required": [
|
|
3339
|
+
"terminalId",
|
|
3340
|
+
"type",
|
|
3341
|
+
"reason"
|
|
3342
|
+
],
|
|
3343
|
+
"additionalProperties": false
|
|
3344
|
+
}
|
|
3345
|
+
]
|
|
3346
|
+
},
|
|
3347
|
+
"terminalChanged": {
|
|
3348
|
+
"type": "object",
|
|
3349
|
+
"properties": {
|
|
3350
|
+
"watchId": {
|
|
3351
|
+
"type": "string",
|
|
3352
|
+
"pattern": "^[0-9a-f]{32}$"
|
|
3353
|
+
},
|
|
3354
|
+
"cursor": {
|
|
3355
|
+
"type": "string",
|
|
3356
|
+
"pattern": "^[0-9a-f]{32}$"
|
|
3357
|
+
}
|
|
3358
|
+
},
|
|
3359
|
+
"required": [
|
|
3360
|
+
"watchId",
|
|
3361
|
+
"cursor"
|
|
3362
|
+
],
|
|
3363
|
+
"additionalProperties": false
|
|
2333
3364
|
}
|
|
2334
3365
|
}
|
|
2335
3366
|
}
|