@anhlp/alp-protocol 0.0.0-beta.1

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.
@@ -0,0 +1,2007 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://alp.dev/schemas/ipc-v1.json",
4
+ "title": "ALP JSON-RPC v1 IPC",
5
+ "description": "Messages of ALP JSON-RPC protocol v1 (docs/protocol/alp-json-rpc-v1.md). One JSON value per frame; unknown properties, event types and item kinds are accepted for forward compatibility.",
6
+ "oneOf": [
7
+ {
8
+ "$ref": "#/$defs/request"
9
+ },
10
+ {
11
+ "$ref": "#/$defs/response"
12
+ },
13
+ {
14
+ "$ref": "#/$defs/notification"
15
+ }
16
+ ],
17
+ "$defs": {
18
+ "error": {
19
+ "type": "object",
20
+ "properties": {
21
+ "code": {
22
+ "type": "integer"
23
+ },
24
+ "message": {
25
+ "type": "string"
26
+ },
27
+ "data": {}
28
+ },
29
+ "required": [
30
+ "code",
31
+ "message"
32
+ ],
33
+ "additionalProperties": true
34
+ },
35
+ "session": {
36
+ "type": "object",
37
+ "properties": {
38
+ "id": {
39
+ "type": "string"
40
+ },
41
+ "projectRoot": {
42
+ "type": "string"
43
+ },
44
+ "agent": {
45
+ "type": "string"
46
+ },
47
+ "runtime": {
48
+ "enum": [
49
+ "claude",
50
+ "codex",
51
+ "acp",
52
+ "antigravity"
53
+ ]
54
+ },
55
+ "model": {
56
+ "type": "string"
57
+ },
58
+ "mode": {
59
+ "type": "string"
60
+ },
61
+ "thinking": {
62
+ "type": "string"
63
+ },
64
+ "workflow": {
65
+ "type": "object",
66
+ "properties": {
67
+ "mode": {
68
+ "type": "string"
69
+ },
70
+ "maxPeers": {
71
+ "type": "integer"
72
+ },
73
+ "supervisor": {
74
+ "type": "boolean"
75
+ }
76
+ },
77
+ "required": [
78
+ "mode",
79
+ "maxPeers",
80
+ "supervisor"
81
+ ],
82
+ "additionalProperties": true
83
+ },
84
+ "threadId": {
85
+ "type": "string"
86
+ },
87
+ "persistent": {
88
+ "type": "boolean"
89
+ },
90
+ "busy": {
91
+ "type": "boolean"
92
+ },
93
+ "parentId": {
94
+ "type": "string"
95
+ },
96
+ "toolCallId": {
97
+ "type": "string"
98
+ },
99
+ "activeTurnId": {
100
+ "type": "string"
101
+ },
102
+ "parked": {
103
+ "type": "string"
104
+ },
105
+ "instructionsSha": {
106
+ "type": "string"
107
+ },
108
+ "teamLabel": {
109
+ "type": "string"
110
+ }
111
+ },
112
+ "required": [
113
+ "id",
114
+ "projectRoot",
115
+ "agent",
116
+ "runtime",
117
+ "model",
118
+ "mode",
119
+ "thinking",
120
+ "workflow",
121
+ "threadId",
122
+ "persistent",
123
+ "busy"
124
+ ],
125
+ "additionalProperties": true
126
+ },
127
+ "assignment": {
128
+ "type": "object",
129
+ "properties": {
130
+ "id": {
131
+ "type": "string"
132
+ },
133
+ "agent": {
134
+ "type": "string"
135
+ },
136
+ "mode": {
137
+ "type": "string"
138
+ },
139
+ "status": {
140
+ "type": "string"
141
+ },
142
+ "startedAt": {
143
+ "type": "string"
144
+ },
145
+ "worktree": {
146
+ "type": "object",
147
+ "properties": {
148
+ "branch": {
149
+ "type": "string"
150
+ },
151
+ "path": {
152
+ "type": "string"
153
+ }
154
+ },
155
+ "required": [
156
+ "branch",
157
+ "path"
158
+ ],
159
+ "additionalProperties": true
160
+ }
161
+ },
162
+ "required": [
163
+ "id",
164
+ "agent",
165
+ "mode",
166
+ "status",
167
+ "startedAt"
168
+ ],
169
+ "additionalProperties": true
170
+ },
171
+ "mail": {
172
+ "type": "object",
173
+ "properties": {
174
+ "id": {
175
+ "type": "string"
176
+ },
177
+ "kind": {
178
+ "enum": [
179
+ "question",
180
+ "answer",
181
+ "note",
182
+ "steer",
183
+ "result",
184
+ "stalled",
185
+ "board",
186
+ "checkin"
187
+ ]
188
+ },
189
+ "from": {
190
+ "type": "string"
191
+ },
192
+ "assignment": {
193
+ "type": "string"
194
+ },
195
+ "body": {
196
+ "type": "string"
197
+ },
198
+ "replyTo": {
199
+ "type": "string"
200
+ },
201
+ "result": {
202
+ "type": "object"
203
+ },
204
+ "redelivered": {
205
+ "type": "boolean"
206
+ }
207
+ },
208
+ "required": [
209
+ "id",
210
+ "kind",
211
+ "from",
212
+ "assignment"
213
+ ],
214
+ "additionalProperties": true
215
+ },
216
+ "pin": {
217
+ "type": "object",
218
+ "properties": {
219
+ "id": {
220
+ "type": "string"
221
+ },
222
+ "project": {
223
+ "type": "string"
224
+ },
225
+ "kind": {
226
+ "enum": [
227
+ "claim",
228
+ "decision",
229
+ "finding"
230
+ ]
231
+ },
232
+ "body": {
233
+ "type": "string"
234
+ },
235
+ "paths": {
236
+ "type": "array",
237
+ "items": {
238
+ "type": "string"
239
+ }
240
+ },
241
+ "agent": {
242
+ "type": "string"
243
+ },
244
+ "sessionId": {
245
+ "type": "string"
246
+ },
247
+ "rootId": {
248
+ "type": "string"
249
+ },
250
+ "at": {
251
+ "type": "string"
252
+ },
253
+ "released": {
254
+ "type": "string"
255
+ },
256
+ "task": {
257
+ "type": "string"
258
+ }
259
+ },
260
+ "required": [
261
+ "id",
262
+ "project",
263
+ "kind",
264
+ "body",
265
+ "agent",
266
+ "sessionId",
267
+ "rootId",
268
+ "at"
269
+ ],
270
+ "additionalProperties": true
271
+ },
272
+ "question": {
273
+ "type": "object",
274
+ "properties": {
275
+ "id": {
276
+ "type": "string"
277
+ },
278
+ "sessionId": {
279
+ "type": "string"
280
+ },
281
+ "rootId": {
282
+ "type": "string"
283
+ },
284
+ "agent": {
285
+ "type": "string"
286
+ },
287
+ "body": {
288
+ "type": "string"
289
+ },
290
+ "options": {
291
+ "type": "array",
292
+ "items": {
293
+ "type": "string"
294
+ }
295
+ },
296
+ "askedAt": {
297
+ "type": "string"
298
+ }
299
+ },
300
+ "required": [
301
+ "id",
302
+ "sessionId",
303
+ "rootId",
304
+ "agent",
305
+ "body",
306
+ "askedAt"
307
+ ],
308
+ "additionalProperties": true
309
+ },
310
+ "spec": {
311
+ "type": "object",
312
+ "properties": {
313
+ "cwd": {
314
+ "type": "string"
315
+ },
316
+ "agent": {
317
+ "type": "string"
318
+ },
319
+ "model": {
320
+ "type": "string"
321
+ },
322
+ "mode": {
323
+ "type": "string"
324
+ },
325
+ "thinking": {
326
+ "type": "string"
327
+ },
328
+ "persist": {
329
+ "type": "boolean"
330
+ },
331
+ "restore": {
332
+ "type": "object"
333
+ }
334
+ },
335
+ "required": [
336
+ "cwd"
337
+ ],
338
+ "additionalProperties": true
339
+ },
340
+ "item": {
341
+ "anyOf": [
342
+ {
343
+ "$ref": "#/$defs/knownItem"
344
+ },
345
+ {
346
+ "$ref": "#/$defs/unknownItem"
347
+ }
348
+ ]
349
+ },
350
+ "event": {
351
+ "anyOf": [
352
+ {
353
+ "$ref": "#/$defs/knownEvent"
354
+ },
355
+ {
356
+ "$ref": "#/$defs/unknownEvent"
357
+ }
358
+ ]
359
+ },
360
+ "envelope": {
361
+ "type": "object",
362
+ "properties": {
363
+ "sessionId": {
364
+ "type": "string"
365
+ },
366
+ "epoch": {
367
+ "type": "string"
368
+ },
369
+ "seq": {
370
+ "type": "integer",
371
+ "minimum": 0,
372
+ "maximum": 9007199254740991
373
+ },
374
+ "ts": {
375
+ "type": "string"
376
+ },
377
+ "event": {
378
+ "$ref": "#/$defs/event"
379
+ },
380
+ "cursor": {
381
+ "type": "integer",
382
+ "minimum": 1,
383
+ "maximum": 9007199254740991
384
+ }
385
+ },
386
+ "required": [
387
+ "sessionId",
388
+ "epoch",
389
+ "seq",
390
+ "ts",
391
+ "event"
392
+ ],
393
+ "additionalProperties": true
394
+ },
395
+ "request": {
396
+ "type": "object",
397
+ "properties": {
398
+ "jsonrpc": {
399
+ "const": "2.0"
400
+ },
401
+ "id": {
402
+ "anyOf": [
403
+ {
404
+ "type": "string",
405
+ "maxLength": 128
406
+ },
407
+ {
408
+ "type": "integer",
409
+ "minimum": -9007199254740991,
410
+ "maximum": 9007199254740991
411
+ }
412
+ ]
413
+ },
414
+ "method": {
415
+ "type": "string"
416
+ },
417
+ "params": {
418
+ "type": "object"
419
+ }
420
+ },
421
+ "required": [
422
+ "jsonrpc",
423
+ "method",
424
+ "id"
425
+ ],
426
+ "additionalProperties": true
427
+ },
428
+ "response": {
429
+ "oneOf": [
430
+ {
431
+ "type": "object",
432
+ "properties": {
433
+ "jsonrpc": {
434
+ "const": "2.0"
435
+ },
436
+ "id": {
437
+ "anyOf": [
438
+ {
439
+ "type": "string",
440
+ "maxLength": 128
441
+ },
442
+ {
443
+ "type": "integer",
444
+ "minimum": -9007199254740991,
445
+ "maximum": 9007199254740991
446
+ },
447
+ {
448
+ "type": "null"
449
+ }
450
+ ]
451
+ },
452
+ "result": {}
453
+ },
454
+ "required": [
455
+ "jsonrpc",
456
+ "id",
457
+ "result"
458
+ ],
459
+ "additionalProperties": true
460
+ },
461
+ {
462
+ "type": "object",
463
+ "properties": {
464
+ "jsonrpc": {
465
+ "const": "2.0"
466
+ },
467
+ "id": {
468
+ "anyOf": [
469
+ {
470
+ "type": "string",
471
+ "maxLength": 128
472
+ },
473
+ {
474
+ "type": "integer",
475
+ "minimum": -9007199254740991,
476
+ "maximum": 9007199254740991
477
+ },
478
+ {
479
+ "type": "null"
480
+ }
481
+ ]
482
+ },
483
+ "error": {
484
+ "$ref": "#/$defs/error"
485
+ }
486
+ },
487
+ "required": [
488
+ "jsonrpc",
489
+ "id",
490
+ "error"
491
+ ],
492
+ "additionalProperties": true
493
+ }
494
+ ]
495
+ },
496
+ "notification": {
497
+ "type": "object",
498
+ "properties": {
499
+ "jsonrpc": {
500
+ "const": "2.0"
501
+ },
502
+ "method": {
503
+ "const": "event"
504
+ },
505
+ "params": {
506
+ "$ref": "#/$defs/envelope"
507
+ }
508
+ },
509
+ "required": [
510
+ "jsonrpc",
511
+ "method",
512
+ "params"
513
+ ],
514
+ "additionalProperties": true
515
+ },
516
+ "knownEvent": {
517
+ "oneOf": [
518
+ {
519
+ "type": "object",
520
+ "properties": {
521
+ "type": {
522
+ "const": "session.opened"
523
+ },
524
+ "session": {
525
+ "$ref": "#/$defs/session"
526
+ },
527
+ "cwd": {
528
+ "type": "string"
529
+ },
530
+ "effective": {
531
+ "type": "object",
532
+ "properties": {
533
+ "model": {
534
+ "type": "string"
535
+ },
536
+ "thinking": {
537
+ "type": "string"
538
+ }
539
+ },
540
+ "required": [
541
+ "model",
542
+ "thinking"
543
+ ],
544
+ "additionalProperties": true
545
+ }
546
+ },
547
+ "required": [
548
+ "type",
549
+ "session",
550
+ "cwd",
551
+ "effective"
552
+ ],
553
+ "additionalProperties": true
554
+ },
555
+ {
556
+ "type": "object",
557
+ "properties": {
558
+ "type": {
559
+ "const": "session.ready"
560
+ }
561
+ },
562
+ "required": [
563
+ "type"
564
+ ],
565
+ "additionalProperties": true
566
+ },
567
+ {
568
+ "type": "object",
569
+ "properties": {
570
+ "type": {
571
+ "const": "session.updated"
572
+ },
573
+ "session": {
574
+ "$ref": "#/$defs/session"
575
+ }
576
+ },
577
+ "required": [
578
+ "type",
579
+ "session"
580
+ ],
581
+ "additionalProperties": true
582
+ },
583
+ {
584
+ "type": "object",
585
+ "properties": {
586
+ "type": {
587
+ "const": "session.closed"
588
+ }
589
+ },
590
+ "required": [
591
+ "type"
592
+ ],
593
+ "additionalProperties": true
594
+ },
595
+ {
596
+ "type": "object",
597
+ "properties": {
598
+ "type": {
599
+ "const": "session.failed"
600
+ },
601
+ "error": {
602
+ "$ref": "#/$defs/alpError"
603
+ }
604
+ },
605
+ "required": [
606
+ "type",
607
+ "error"
608
+ ],
609
+ "additionalProperties": true
610
+ },
611
+ {
612
+ "type": "object",
613
+ "properties": {
614
+ "type": {
615
+ "const": "prompt.accepted"
616
+ },
617
+ "clientMessageId": {
618
+ "type": "string"
619
+ },
620
+ "result": {
621
+ "enum": [
622
+ "turn",
623
+ "steer"
624
+ ]
625
+ },
626
+ "turnId": {
627
+ "type": "string"
628
+ }
629
+ },
630
+ "required": [
631
+ "type",
632
+ "clientMessageId",
633
+ "result",
634
+ "turnId"
635
+ ],
636
+ "additionalProperties": true
637
+ },
638
+ {
639
+ "type": "object",
640
+ "properties": {
641
+ "type": {
642
+ "const": "prompt.failed"
643
+ },
644
+ "clientMessageId": {
645
+ "type": "string"
646
+ },
647
+ "error": {
648
+ "$ref": "#/$defs/alpError"
649
+ }
650
+ },
651
+ "required": [
652
+ "type",
653
+ "clientMessageId",
654
+ "error"
655
+ ],
656
+ "additionalProperties": true
657
+ },
658
+ {
659
+ "type": "object",
660
+ "properties": {
661
+ "type": {
662
+ "const": "turn.started"
663
+ },
664
+ "turnId": {
665
+ "type": "string"
666
+ },
667
+ "origin": {
668
+ "enum": [
669
+ "user",
670
+ "wake",
671
+ "assignment",
672
+ "runtime"
673
+ ]
674
+ }
675
+ },
676
+ "required": [
677
+ "type",
678
+ "turnId",
679
+ "origin"
680
+ ],
681
+ "additionalProperties": true
682
+ },
683
+ {
684
+ "type": "object",
685
+ "properties": {
686
+ "type": {
687
+ "const": "turn.ended"
688
+ },
689
+ "turnId": {
690
+ "type": "string"
691
+ },
692
+ "state": {
693
+ "enum": [
694
+ "completed",
695
+ "failed",
696
+ "canceled"
697
+ ]
698
+ },
699
+ "error": {
700
+ "$ref": "#/$defs/alpError"
701
+ }
702
+ },
703
+ "required": [
704
+ "type",
705
+ "turnId",
706
+ "state"
707
+ ],
708
+ "additionalProperties": true
709
+ },
710
+ {
711
+ "type": "object",
712
+ "properties": {
713
+ "type": {
714
+ "const": "item"
715
+ },
716
+ "item": {
717
+ "$ref": "#/$defs/item"
718
+ }
719
+ },
720
+ "required": [
721
+ "type",
722
+ "item"
723
+ ],
724
+ "additionalProperties": true
725
+ },
726
+ {
727
+ "type": "object",
728
+ "properties": {
729
+ "type": {
730
+ "const": "mail"
731
+ },
732
+ "mail": {
733
+ "$ref": "#/$defs/mail"
734
+ }
735
+ },
736
+ "required": [
737
+ "type",
738
+ "mail"
739
+ ],
740
+ "additionalProperties": true
741
+ },
742
+ {
743
+ "type": "object",
744
+ "properties": {
745
+ "type": {
746
+ "const": "assignment"
747
+ },
748
+ "assignment": {
749
+ "$ref": "#/$defs/assignment"
750
+ }
751
+ },
752
+ "required": [
753
+ "type",
754
+ "assignment"
755
+ ],
756
+ "additionalProperties": true
757
+ },
758
+ {
759
+ "type": "object",
760
+ "properties": {
761
+ "type": {
762
+ "const": "question"
763
+ },
764
+ "question": {
765
+ "$ref": "#/$defs/question"
766
+ }
767
+ },
768
+ "required": [
769
+ "type",
770
+ "question"
771
+ ],
772
+ "additionalProperties": true
773
+ },
774
+ {
775
+ "type": "object",
776
+ "properties": {
777
+ "type": {
778
+ "const": "question.resolved"
779
+ },
780
+ "questionId": {
781
+ "type": "string"
782
+ },
783
+ "outcome": {
784
+ "enum": [
785
+ "answered",
786
+ "dismissed",
787
+ "timeout",
788
+ "canceled"
789
+ ]
790
+ },
791
+ "answer": {
792
+ "type": "string"
793
+ }
794
+ },
795
+ "required": [
796
+ "type",
797
+ "questionId",
798
+ "outcome"
799
+ ],
800
+ "additionalProperties": true
801
+ },
802
+ {
803
+ "type": "object",
804
+ "properties": {
805
+ "type": {
806
+ "const": "pin"
807
+ },
808
+ "pin": {
809
+ "$ref": "#/$defs/pin"
810
+ }
811
+ },
812
+ "required": [
813
+ "type",
814
+ "pin"
815
+ ],
816
+ "additionalProperties": true
817
+ },
818
+ {
819
+ "type": "object",
820
+ "properties": {
821
+ "type": {
822
+ "const": "unpin"
823
+ },
824
+ "pinId": {
825
+ "type": "string"
826
+ },
827
+ "reason": {
828
+ "enum": [
829
+ "unpinned",
830
+ "session_ended"
831
+ ]
832
+ }
833
+ },
834
+ "required": [
835
+ "type",
836
+ "pinId",
837
+ "reason"
838
+ ],
839
+ "additionalProperties": true
840
+ }
841
+ ]
842
+ },
843
+ "unknownEvent": {
844
+ "type": "object",
845
+ "properties": {
846
+ "type": {
847
+ "type": "string",
848
+ "not": {
849
+ "enum": [
850
+ "session.opened",
851
+ "session.ready",
852
+ "session.updated",
853
+ "session.closed",
854
+ "session.failed",
855
+ "prompt.accepted",
856
+ "prompt.failed",
857
+ "turn.started",
858
+ "turn.ended",
859
+ "item",
860
+ "mail",
861
+ "assignment",
862
+ "question",
863
+ "question.resolved",
864
+ "pin",
865
+ "unpin"
866
+ ]
867
+ }
868
+ }
869
+ },
870
+ "required": [
871
+ "type"
872
+ ],
873
+ "additionalProperties": true
874
+ },
875
+ "knownItem": {
876
+ "oneOf": [
877
+ {
878
+ "type": "object",
879
+ "properties": {
880
+ "kind": {
881
+ "const": "user_message"
882
+ },
883
+ "id": {
884
+ "type": "string"
885
+ },
886
+ "text": {
887
+ "type": "string"
888
+ },
889
+ "clientMessageId": {
890
+ "type": "string"
891
+ }
892
+ },
893
+ "required": [
894
+ "kind",
895
+ "id",
896
+ "text"
897
+ ],
898
+ "additionalProperties": true
899
+ },
900
+ {
901
+ "type": "object",
902
+ "properties": {
903
+ "kind": {
904
+ "const": "assistant_message"
905
+ },
906
+ "id": {
907
+ "type": "string"
908
+ },
909
+ "text": {
910
+ "type": "string"
911
+ }
912
+ },
913
+ "required": [
914
+ "kind",
915
+ "id",
916
+ "text"
917
+ ],
918
+ "additionalProperties": true
919
+ },
920
+ {
921
+ "type": "object",
922
+ "properties": {
923
+ "kind": {
924
+ "const": "notice"
925
+ },
926
+ "id": {
927
+ "type": "string"
928
+ },
929
+ "level": {
930
+ "enum": [
931
+ "info",
932
+ "warning",
933
+ "error"
934
+ ]
935
+ },
936
+ "text": {
937
+ "type": "string"
938
+ }
939
+ },
940
+ "required": [
941
+ "kind",
942
+ "id",
943
+ "level",
944
+ "text"
945
+ ],
946
+ "additionalProperties": true
947
+ },
948
+ {
949
+ "type": "object",
950
+ "properties": {
951
+ "kind": {
952
+ "const": "compaction"
953
+ },
954
+ "id": {
955
+ "type": "string"
956
+ },
957
+ "status": {
958
+ "enum": [
959
+ "running",
960
+ "completed",
961
+ "failed"
962
+ ]
963
+ },
964
+ "trigger": {
965
+ "type": "string"
966
+ },
967
+ "preTokens": {
968
+ "type": "integer"
969
+ },
970
+ "postTokens": {
971
+ "type": "integer"
972
+ }
973
+ },
974
+ "required": [
975
+ "kind",
976
+ "id",
977
+ "status"
978
+ ],
979
+ "additionalProperties": true
980
+ },
981
+ {
982
+ "type": "object",
983
+ "properties": {
984
+ "kind": {
985
+ "const": "todo"
986
+ },
987
+ "id": {
988
+ "type": "string"
989
+ },
990
+ "items": {
991
+ "type": "array",
992
+ "items": {
993
+ "type": "object",
994
+ "properties": {
995
+ "id": {
996
+ "type": "string"
997
+ },
998
+ "text": {
999
+ "type": "string"
1000
+ },
1001
+ "status": {
1002
+ "enum": [
1003
+ "pending",
1004
+ "in_progress",
1005
+ "completed"
1006
+ ]
1007
+ }
1008
+ },
1009
+ "required": [
1010
+ "id",
1011
+ "text",
1012
+ "status"
1013
+ ],
1014
+ "additionalProperties": true
1015
+ }
1016
+ }
1017
+ },
1018
+ "required": [
1019
+ "kind",
1020
+ "id",
1021
+ "items"
1022
+ ],
1023
+ "additionalProperties": true
1024
+ },
1025
+ {
1026
+ "type": "object",
1027
+ "properties": {
1028
+ "kind": {
1029
+ "const": "tool_call"
1030
+ },
1031
+ "id": {
1032
+ "type": "string"
1033
+ },
1034
+ "callId": {
1035
+ "type": "string"
1036
+ },
1037
+ "name": {
1038
+ "type": "string"
1039
+ },
1040
+ "status": {
1041
+ "enum": [
1042
+ "running",
1043
+ "completed",
1044
+ "failed"
1045
+ ]
1046
+ },
1047
+ "error": {
1048
+ "type": "string"
1049
+ },
1050
+ "detail": {
1051
+ "oneOf": [
1052
+ {
1053
+ "type": "object",
1054
+ "properties": {
1055
+ "type": {
1056
+ "const": "shell"
1057
+ },
1058
+ "command": {
1059
+ "type": "string"
1060
+ },
1061
+ "cwd": {
1062
+ "type": "string"
1063
+ },
1064
+ "output": {
1065
+ "type": "string"
1066
+ },
1067
+ "exitCode": {
1068
+ "type": [
1069
+ "integer",
1070
+ "null"
1071
+ ]
1072
+ }
1073
+ },
1074
+ "required": [
1075
+ "type",
1076
+ "command",
1077
+ "output"
1078
+ ],
1079
+ "additionalProperties": true
1080
+ },
1081
+ {
1082
+ "type": "object",
1083
+ "properties": {
1084
+ "type": {
1085
+ "const": "unknown"
1086
+ },
1087
+ "input": {},
1088
+ "output": {}
1089
+ },
1090
+ "required": [
1091
+ "type",
1092
+ "input",
1093
+ "output"
1094
+ ],
1095
+ "additionalProperties": true
1096
+ }
1097
+ ]
1098
+ }
1099
+ },
1100
+ "required": [
1101
+ "kind",
1102
+ "id",
1103
+ "callId",
1104
+ "name",
1105
+ "status",
1106
+ "detail"
1107
+ ],
1108
+ "additionalProperties": true
1109
+ }
1110
+ ]
1111
+ },
1112
+ "unknownItem": {
1113
+ "type": "object",
1114
+ "properties": {
1115
+ "kind": {
1116
+ "type": "string",
1117
+ "not": {
1118
+ "enum": [
1119
+ "user_message",
1120
+ "assistant_message",
1121
+ "notice",
1122
+ "compaction",
1123
+ "todo",
1124
+ "tool_call"
1125
+ ]
1126
+ }
1127
+ },
1128
+ "id": {
1129
+ "type": "string"
1130
+ }
1131
+ },
1132
+ "required": [
1133
+ "kind",
1134
+ "id"
1135
+ ],
1136
+ "additionalProperties": true
1137
+ },
1138
+ "alpError": {
1139
+ "type": "object",
1140
+ "properties": {
1141
+ "message": {
1142
+ "type": "string"
1143
+ },
1144
+ "code": {
1145
+ "type": "string"
1146
+ }
1147
+ },
1148
+ "required": [
1149
+ "message"
1150
+ ],
1151
+ "additionalProperties": true
1152
+ },
1153
+ "sessionSummary": {
1154
+ "type": "object",
1155
+ "properties": {
1156
+ "id": {
1157
+ "type": "string"
1158
+ },
1159
+ "projectRoot": {
1160
+ "type": "string"
1161
+ },
1162
+ "agent": {
1163
+ "type": "string"
1164
+ },
1165
+ "runtime": {
1166
+ "enum": [
1167
+ "claude",
1168
+ "codex",
1169
+ "acp",
1170
+ "antigravity"
1171
+ ]
1172
+ },
1173
+ "model": {
1174
+ "type": "string"
1175
+ },
1176
+ "mode": {
1177
+ "type": "string"
1178
+ },
1179
+ "thinking": {
1180
+ "type": "string"
1181
+ },
1182
+ "workflow": {
1183
+ "type": "object",
1184
+ "properties": {
1185
+ "mode": {
1186
+ "type": "string"
1187
+ },
1188
+ "maxPeers": {
1189
+ "type": "integer"
1190
+ },
1191
+ "supervisor": {
1192
+ "type": "boolean"
1193
+ }
1194
+ },
1195
+ "required": [
1196
+ "mode",
1197
+ "maxPeers",
1198
+ "supervisor"
1199
+ ],
1200
+ "additionalProperties": true
1201
+ },
1202
+ "threadId": {
1203
+ "type": "string"
1204
+ },
1205
+ "persistent": {
1206
+ "type": "boolean"
1207
+ },
1208
+ "busy": {
1209
+ "type": "boolean"
1210
+ },
1211
+ "parentId": {
1212
+ "type": "string"
1213
+ },
1214
+ "toolCallId": {
1215
+ "type": "string"
1216
+ },
1217
+ "activeTurnId": {
1218
+ "type": "string"
1219
+ },
1220
+ "parked": {
1221
+ "type": "string"
1222
+ },
1223
+ "instructionsSha": {
1224
+ "type": "string"
1225
+ },
1226
+ "teamLabel": {
1227
+ "type": "string"
1228
+ },
1229
+ "status": {
1230
+ "enum": [
1231
+ "initializing",
1232
+ "idle",
1233
+ "running",
1234
+ "error",
1235
+ "closed"
1236
+ ]
1237
+ },
1238
+ "title": {
1239
+ "type": "string"
1240
+ },
1241
+ "archived": {
1242
+ "type": "boolean"
1243
+ },
1244
+ "lastError": {
1245
+ "type": "object",
1246
+ "properties": {
1247
+ "code": {
1248
+ "type": "string"
1249
+ },
1250
+ "message": {
1251
+ "type": "string"
1252
+ }
1253
+ },
1254
+ "required": [
1255
+ "message"
1256
+ ],
1257
+ "additionalProperties": true
1258
+ },
1259
+ "createdAt": {
1260
+ "type": "string"
1261
+ },
1262
+ "updatedAt": {
1263
+ "type": "string"
1264
+ }
1265
+ },
1266
+ "required": [
1267
+ "id",
1268
+ "projectRoot",
1269
+ "agent",
1270
+ "runtime",
1271
+ "model",
1272
+ "mode",
1273
+ "thinking",
1274
+ "workflow",
1275
+ "threadId",
1276
+ "persistent",
1277
+ "busy",
1278
+ "status"
1279
+ ],
1280
+ "additionalProperties": true
1281
+ },
1282
+ "pause": {
1283
+ "type": "object",
1284
+ "properties": {
1285
+ "since": {
1286
+ "type": "string"
1287
+ },
1288
+ "by": {
1289
+ "type": "string"
1290
+ },
1291
+ "reason": {
1292
+ "type": "string"
1293
+ },
1294
+ "resetsAt": {
1295
+ "type": "string"
1296
+ },
1297
+ "checkedAt": {
1298
+ "type": "string"
1299
+ }
1300
+ },
1301
+ "required": [
1302
+ "since",
1303
+ "by",
1304
+ "reason"
1305
+ ],
1306
+ "additionalProperties": true
1307
+ },
1308
+ "pauseState": {
1309
+ "type": "object",
1310
+ "properties": {
1311
+ "all": {
1312
+ "$ref": "#/$defs/pause"
1313
+ },
1314
+ "runtimes": {
1315
+ "type": "object",
1316
+ "additionalProperties": {
1317
+ "$ref": "#/$defs/pause"
1318
+ }
1319
+ },
1320
+ "parked": {
1321
+ "type": "array",
1322
+ "items": {
1323
+ "type": "object",
1324
+ "properties": {
1325
+ "assignmentId": {
1326
+ "type": "string"
1327
+ },
1328
+ "agent": {
1329
+ "type": "string"
1330
+ },
1331
+ "runtime": {
1332
+ "type": "string"
1333
+ },
1334
+ "rootId": {
1335
+ "type": "string"
1336
+ },
1337
+ "reason": {
1338
+ "type": "string"
1339
+ },
1340
+ "since": {
1341
+ "type": "string"
1342
+ }
1343
+ },
1344
+ "required": [
1345
+ "assignmentId",
1346
+ "agent",
1347
+ "runtime",
1348
+ "rootId",
1349
+ "reason",
1350
+ "since"
1351
+ ],
1352
+ "additionalProperties": true
1353
+ }
1354
+ }
1355
+ },
1356
+ "required": [
1357
+ "runtimes",
1358
+ "parked"
1359
+ ],
1360
+ "additionalProperties": true
1361
+ },
1362
+ "preview": {
1363
+ "type": "object",
1364
+ "properties": {
1365
+ "teams": {
1366
+ "type": "array",
1367
+ "items": {
1368
+ "type": "object",
1369
+ "properties": {
1370
+ "id": {
1371
+ "type": "string"
1372
+ },
1373
+ "label": {
1374
+ "type": "string"
1375
+ },
1376
+ "description": {
1377
+ "type": "string"
1378
+ }
1379
+ },
1380
+ "required": [
1381
+ "id",
1382
+ "label"
1383
+ ],
1384
+ "additionalProperties": true
1385
+ }
1386
+ },
1387
+ "team": {
1388
+ "type": "string"
1389
+ },
1390
+ "teamLabel": {
1391
+ "type": "string"
1392
+ },
1393
+ "agent": {
1394
+ "type": "string"
1395
+ },
1396
+ "runtime": {
1397
+ "enum": [
1398
+ "claude",
1399
+ "codex",
1400
+ "acp",
1401
+ "antigravity"
1402
+ ]
1403
+ },
1404
+ "model": {
1405
+ "type": "string"
1406
+ },
1407
+ "mode": {
1408
+ "type": "string"
1409
+ },
1410
+ "thinking": {
1411
+ "type": "string"
1412
+ }
1413
+ },
1414
+ "required": [
1415
+ "teams",
1416
+ "team",
1417
+ "agent",
1418
+ "runtime",
1419
+ "model",
1420
+ "mode",
1421
+ "thinking"
1422
+ ],
1423
+ "additionalProperties": true
1424
+ },
1425
+ "treeStatus": {
1426
+ "type": "object",
1427
+ "properties": {
1428
+ "rootId": {
1429
+ "type": "string"
1430
+ },
1431
+ "sessions": {
1432
+ "type": "array",
1433
+ "items": {
1434
+ "type": "object",
1435
+ "properties": {
1436
+ "id": {
1437
+ "type": "string"
1438
+ },
1439
+ "projectRoot": {
1440
+ "type": "string"
1441
+ },
1442
+ "agent": {
1443
+ "type": "string"
1444
+ },
1445
+ "runtime": {
1446
+ "enum": [
1447
+ "claude",
1448
+ "codex",
1449
+ "acp",
1450
+ "antigravity"
1451
+ ]
1452
+ },
1453
+ "model": {
1454
+ "type": "string"
1455
+ },
1456
+ "mode": {
1457
+ "type": "string"
1458
+ },
1459
+ "thinking": {
1460
+ "type": "string"
1461
+ },
1462
+ "workflow": {
1463
+ "type": "object",
1464
+ "properties": {
1465
+ "mode": {
1466
+ "type": "string"
1467
+ },
1468
+ "maxPeers": {
1469
+ "type": "integer"
1470
+ },
1471
+ "supervisor": {
1472
+ "type": "boolean"
1473
+ }
1474
+ },
1475
+ "required": [
1476
+ "mode",
1477
+ "maxPeers",
1478
+ "supervisor"
1479
+ ],
1480
+ "additionalProperties": true
1481
+ },
1482
+ "threadId": {
1483
+ "type": "string"
1484
+ },
1485
+ "persistent": {
1486
+ "type": "boolean"
1487
+ },
1488
+ "busy": {
1489
+ "type": "boolean"
1490
+ },
1491
+ "parentId": {
1492
+ "type": "string"
1493
+ },
1494
+ "toolCallId": {
1495
+ "type": "string"
1496
+ },
1497
+ "activeTurnId": {
1498
+ "type": "string"
1499
+ },
1500
+ "parked": {
1501
+ "type": "string"
1502
+ },
1503
+ "instructionsSha": {
1504
+ "type": "string"
1505
+ },
1506
+ "teamLabel": {
1507
+ "type": "string"
1508
+ },
1509
+ "state": {
1510
+ "enum": [
1511
+ "running",
1512
+ "waiting",
1513
+ "waiting_parent",
1514
+ "waiting_user",
1515
+ "idle"
1516
+ ]
1517
+ },
1518
+ "idleMs": {
1519
+ "type": "number"
1520
+ },
1521
+ "workdir": {
1522
+ "type": "string"
1523
+ },
1524
+ "unreadMail": {
1525
+ "type": "integer",
1526
+ "minimum": 0
1527
+ }
1528
+ },
1529
+ "required": [
1530
+ "id",
1531
+ "projectRoot",
1532
+ "agent",
1533
+ "runtime",
1534
+ "model",
1535
+ "mode",
1536
+ "thinking",
1537
+ "workflow",
1538
+ "threadId",
1539
+ "persistent",
1540
+ "busy",
1541
+ "state",
1542
+ "idleMs",
1543
+ "workdir",
1544
+ "unreadMail"
1545
+ ],
1546
+ "additionalProperties": true
1547
+ }
1548
+ },
1549
+ "assignments": {
1550
+ "type": "array",
1551
+ "items": {
1552
+ "type": "object",
1553
+ "properties": {
1554
+ "id": {
1555
+ "type": "string"
1556
+ },
1557
+ "requester": {
1558
+ "type": "string"
1559
+ },
1560
+ "isolation": {
1561
+ "enum": [
1562
+ "shared",
1563
+ "worktree"
1564
+ ]
1565
+ },
1566
+ "idleMs": {
1567
+ "type": "number"
1568
+ }
1569
+ },
1570
+ "required": [
1571
+ "id",
1572
+ "requester",
1573
+ "isolation",
1574
+ "idleMs"
1575
+ ],
1576
+ "additionalProperties": true
1577
+ }
1578
+ },
1579
+ "questions": {
1580
+ "type": "array",
1581
+ "items": {
1582
+ "$ref": "#/$defs/question"
1583
+ }
1584
+ },
1585
+ "worktrees": {
1586
+ "type": "array",
1587
+ "items": {
1588
+ "type": "object",
1589
+ "properties": {
1590
+ "assignmentId": {
1591
+ "type": "string"
1592
+ },
1593
+ "requester": {
1594
+ "type": "string"
1595
+ },
1596
+ "agent": {
1597
+ "type": "string"
1598
+ },
1599
+ "branch": {
1600
+ "type": "string"
1601
+ },
1602
+ "files": {
1603
+ "type": "array",
1604
+ "items": {
1605
+ "type": "string"
1606
+ }
1607
+ },
1608
+ "stat": {
1609
+ "type": "string"
1610
+ }
1611
+ },
1612
+ "required": [
1613
+ "assignmentId",
1614
+ "requester",
1615
+ "agent",
1616
+ "branch",
1617
+ "files",
1618
+ "stat"
1619
+ ],
1620
+ "additionalProperties": true
1621
+ }
1622
+ },
1623
+ "leases": {
1624
+ "type": "array",
1625
+ "items": {
1626
+ "type": "object",
1627
+ "properties": {
1628
+ "checkout": {
1629
+ "type": "string"
1630
+ },
1631
+ "assignmentId": {
1632
+ "type": "string"
1633
+ },
1634
+ "agent": {
1635
+ "type": "string"
1636
+ }
1637
+ },
1638
+ "required": [
1639
+ "checkout",
1640
+ "assignmentId",
1641
+ "agent"
1642
+ ],
1643
+ "additionalProperties": true
1644
+ }
1645
+ },
1646
+ "claims": {
1647
+ "type": "array",
1648
+ "items": {
1649
+ "$ref": "#/$defs/pin"
1650
+ }
1651
+ }
1652
+ },
1653
+ "required": [
1654
+ "rootId",
1655
+ "sessions",
1656
+ "assignments",
1657
+ "questions",
1658
+ "worktrees",
1659
+ "leases",
1660
+ "claims"
1661
+ ],
1662
+ "additionalProperties": true
1663
+ },
1664
+ "health": {
1665
+ "type": "object",
1666
+ "properties": {
1667
+ "live": {
1668
+ "type": "boolean"
1669
+ },
1670
+ "ready": {
1671
+ "type": "boolean"
1672
+ },
1673
+ "checks": {
1674
+ "type": "array",
1675
+ "items": {
1676
+ "type": "object",
1677
+ "properties": {
1678
+ "id": {
1679
+ "type": "string"
1680
+ },
1681
+ "ok": {
1682
+ "type": "boolean"
1683
+ },
1684
+ "code": {
1685
+ "type": "string"
1686
+ },
1687
+ "message": {
1688
+ "type": "string"
1689
+ }
1690
+ },
1691
+ "required": [
1692
+ "id",
1693
+ "ok"
1694
+ ],
1695
+ "additionalProperties": true
1696
+ }
1697
+ }
1698
+ },
1699
+ "required": [
1700
+ "live",
1701
+ "ready",
1702
+ "checks"
1703
+ ],
1704
+ "additionalProperties": true
1705
+ },
1706
+ "projectRoot": {
1707
+ "type": "string",
1708
+ "minLength": 1,
1709
+ "maxLength": 4096,
1710
+ "description": "An absolute, normalized path on the daemon host to a directory holding .alp/. Compared as is: the daemon never walks up to a parent."
1711
+ },
1712
+ "taskId": {
1713
+ "type": "string",
1714
+ "pattern": "^t-[0-9a-f]{4,12}(?:\\.\\d+)*$"
1715
+ },
1716
+ "taskRow": {
1717
+ "type": "object",
1718
+ "properties": {
1719
+ "id": {
1720
+ "$ref": "#/$defs/taskId"
1721
+ },
1722
+ "title": {
1723
+ "type": "string"
1724
+ },
1725
+ "type": {
1726
+ "type": "string"
1727
+ },
1728
+ "priority": {
1729
+ "type": "integer"
1730
+ },
1731
+ "status": {
1732
+ "enum": [
1733
+ "open",
1734
+ "in_progress",
1735
+ "review",
1736
+ "closed"
1737
+ ]
1738
+ },
1739
+ "rev": {
1740
+ "type": "integer",
1741
+ "minimum": 0
1742
+ },
1743
+ "parent": {
1744
+ "type": "string"
1745
+ },
1746
+ "assignee": {
1747
+ "type": "string"
1748
+ },
1749
+ "ready": {
1750
+ "type": "boolean"
1751
+ },
1752
+ "blockedBy": {
1753
+ "type": "array",
1754
+ "items": {
1755
+ "type": "string"
1756
+ }
1757
+ },
1758
+ "waits": {
1759
+ "type": "array",
1760
+ "items": {
1761
+ "type": "string"
1762
+ }
1763
+ },
1764
+ "approvals": {
1765
+ "type": "array",
1766
+ "items": {
1767
+ "type": "object",
1768
+ "properties": {
1769
+ "gate": {
1770
+ "type": "string"
1771
+ },
1772
+ "note": {
1773
+ "type": "string"
1774
+ }
1775
+ },
1776
+ "required": [
1777
+ "gate",
1778
+ "note"
1779
+ ],
1780
+ "additionalProperties": true
1781
+ }
1782
+ },
1783
+ "handoff": {
1784
+ "type": "object",
1785
+ "properties": {
1786
+ "outcome": {
1787
+ "type": "string"
1788
+ },
1789
+ "summary": {
1790
+ "type": "string"
1791
+ },
1792
+ "agent": {
1793
+ "type": "string"
1794
+ }
1795
+ },
1796
+ "required": [
1797
+ "outcome",
1798
+ "summary"
1799
+ ],
1800
+ "additionalProperties": true
1801
+ },
1802
+ "closed": {
1803
+ "type": "object",
1804
+ "properties": {
1805
+ "reason": {
1806
+ "type": "string"
1807
+ },
1808
+ "summary": {
1809
+ "type": "string"
1810
+ },
1811
+ "at": {
1812
+ "type": "string"
1813
+ }
1814
+ },
1815
+ "required": [
1816
+ "reason",
1817
+ "at"
1818
+ ],
1819
+ "additionalProperties": true
1820
+ },
1821
+ "description": {
1822
+ "type": "string"
1823
+ },
1824
+ "labels": {
1825
+ "type": "array",
1826
+ "items": {
1827
+ "type": "string"
1828
+ }
1829
+ },
1830
+ "paths": {
1831
+ "type": "array",
1832
+ "items": {
1833
+ "type": "string"
1834
+ }
1835
+ },
1836
+ "progress": {
1837
+ "type": "object",
1838
+ "properties": {
1839
+ "done": {
1840
+ "type": "integer",
1841
+ "minimum": 0
1842
+ },
1843
+ "total": {
1844
+ "type": "integer",
1845
+ "minimum": 0
1846
+ }
1847
+ },
1848
+ "required": [
1849
+ "done",
1850
+ "total"
1851
+ ],
1852
+ "additionalProperties": true
1853
+ },
1854
+ "createdAt": {
1855
+ "type": "string"
1856
+ },
1857
+ "updatedAt": {
1858
+ "type": "string"
1859
+ }
1860
+ },
1861
+ "required": [
1862
+ "id",
1863
+ "title",
1864
+ "type",
1865
+ "priority",
1866
+ "status",
1867
+ "rev",
1868
+ "ready",
1869
+ "updatedAt"
1870
+ ],
1871
+ "additionalProperties": true
1872
+ },
1873
+ "libraryKind": {
1874
+ "enum": [
1875
+ "agents",
1876
+ "skills",
1877
+ "mcp",
1878
+ "hooks",
1879
+ "teams",
1880
+ "providers"
1881
+ ]
1882
+ },
1883
+ "libraryScope": {
1884
+ "enum": [
1885
+ "library",
1886
+ "project"
1887
+ ]
1888
+ },
1889
+ "librarySource": {
1890
+ "enum": [
1891
+ "builtin",
1892
+ "library",
1893
+ "project"
1894
+ ]
1895
+ },
1896
+ "entryName": {
1897
+ "type": "string",
1898
+ "minLength": 1,
1899
+ "maxLength": 128,
1900
+ "pattern": "^[A-Za-z0-9_.-]+$",
1901
+ "not": {
1902
+ "enum": [
1903
+ ".",
1904
+ ".."
1905
+ ]
1906
+ }
1907
+ },
1908
+ "libraryRevision": {
1909
+ "type": [
1910
+ "string",
1911
+ "null"
1912
+ ]
1913
+ },
1914
+ "libraryEntryRow": {
1915
+ "type": "object",
1916
+ "properties": {
1917
+ "name": {
1918
+ "type": "string"
1919
+ },
1920
+ "source": {
1921
+ "$ref": "#/$defs/librarySource"
1922
+ },
1923
+ "overrides": {
1924
+ "$ref": "#/$defs/librarySource"
1925
+ },
1926
+ "description": {
1927
+ "type": "string"
1928
+ },
1929
+ "usedBy": {
1930
+ "type": "array",
1931
+ "items": {
1932
+ "type": "string"
1933
+ }
1934
+ }
1935
+ },
1936
+ "required": [
1937
+ "name",
1938
+ "source"
1939
+ ],
1940
+ "additionalProperties": true
1941
+ },
1942
+ "secretMarker": {
1943
+ "type": "object",
1944
+ "properties": {
1945
+ "$secret": {
1946
+ "const": "keep"
1947
+ }
1948
+ },
1949
+ "required": [
1950
+ "$secret"
1951
+ ],
1952
+ "additionalProperties": false,
1953
+ "description": "Stands for a stored secret value: read results carry it in place of the value; a save that sends it back keeps the stored value."
1954
+ },
1955
+ "languageSetting": {
1956
+ "type": "object",
1957
+ "properties": {
1958
+ "language": {
1959
+ "type": [
1960
+ "string",
1961
+ "null"
1962
+ ]
1963
+ },
1964
+ "applies": {
1965
+ "type": "string"
1966
+ },
1967
+ "default": {
1968
+ "type": "string"
1969
+ }
1970
+ },
1971
+ "required": [
1972
+ "language",
1973
+ "applies",
1974
+ "default"
1975
+ ],
1976
+ "additionalProperties": true
1977
+ },
1978
+ "teamRow": {
1979
+ "type": "object",
1980
+ "properties": {
1981
+ "id": {
1982
+ "type": "string"
1983
+ },
1984
+ "label": {
1985
+ "type": "string"
1986
+ },
1987
+ "description": {
1988
+ "type": "string"
1989
+ },
1990
+ "source": {
1991
+ "$ref": "#/$defs/librarySource"
1992
+ },
1993
+ "overrides": {
1994
+ "$ref": "#/$defs/librarySource"
1995
+ },
1996
+ "error": {
1997
+ "type": "string"
1998
+ }
1999
+ },
2000
+ "required": [
2001
+ "id",
2002
+ "source"
2003
+ ],
2004
+ "additionalProperties": true
2005
+ }
2006
+ }
2007
+ }