@anhlp/alp-protocol 0.0.0-stage → 0.0.1-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4757 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://alp.dev/schemas/methods-v1.json",
4
+ "protocolVersion": 1,
5
+ "errors": {
6
+ "parseError": -32700,
7
+ "invalidRequest": -32600,
8
+ "methodNotFound": -32601,
9
+ "invalidParams": -32602,
10
+ "failed": 1000,
11
+ "notFound": 1001,
12
+ "forbidden": 1003,
13
+ "conflict": 1004,
14
+ "unavailable": 1005,
15
+ "protocol": 1006
16
+ },
17
+ "capabilities": {
18
+ "attach.after": "session.attach accepts `after` and answers `cursor`/`reset`; envelopes kept in a tree timeline carry `cursor`.",
19
+ "prompt.receipts": "session.prompt is answered at most once per (sessionId, clientMessageId) from a durable receipt; repeats answer the first outcome or outcome_unknown.",
20
+ "extension.methods": "extension.register/unregister, and the daemon sends extension.invoke requests to the owning connection.",
21
+ "team": "team.list: the teams a project can use, from the daemon host's built-ins, library and project.",
22
+ "task": "task.list, task.create, task.update and task.gate.resolve on a project's .alp/tasks, written by the daemon under the task lock.",
23
+ "library": "library.list/get/save/delete/duplicate/rename, library.skills.set and library.models on the daemon user's library and a project's .alp overrides; secrets are redacted on read.",
24
+ "settings.language": "settings.language.get/set: the language the daemon user reads, in the daemon's ALP_HOME/settings.json.",
25
+ "session.list.page": "session.list accepts `limit`, `cursor` and `query` and answers `nextCursor` while more sessions follow; without them it answers every session as before.",
26
+ "question.watch": "question.watch: the connection is told of `question` and `question.resolved` in every tree (of a projectRoot when given), attached or not.",
27
+ "question.watch.turns": "question.watch accepts `turns`: the connection is also told of `turn.ended` of every root in the trees it watches.",
28
+ "workspace.files": "workspace.files.search: files under a directory whose relative path matches a query; read-only, names only, links never followed.",
29
+ "workspace.files.read": "workspace.files.list and workspace.files.read: the entries of a directory and the content of a UTF-8 text file (at most 1 MiB) under a directory; read-only, links never followed, .git, .env* and key or credential files refused, .gitignore'd paths hidden unless asked.",
30
+ "prompt.images": "session.prompt takes inline image parts { type: \"image\", mimeType, data } (base64, no paths or URLs) within the image limits; a session snapshot says whether its runtime takes them in promptImages.",
31
+ "library.project.write": "library save/delete/duplicate/rename accept policy project-data: only project-only pure-data agents and skills, no executable configuration, sidecars or library/built-in collisions."
32
+ },
33
+ "methods": {
34
+ "assignment.recall": {
35
+ "x-alp": {
36
+ "effect": "mutation",
37
+ "scope": {
38
+ "kind": "project",
39
+ "param": "projectRoot",
40
+ "required": false,
41
+ "alternatives": [
42
+ "assignmentId",
43
+ "taskId"
44
+ ]
45
+ },
46
+ "idempotent": false,
47
+ "risks": [
48
+ "model call"
49
+ ]
50
+ },
51
+ "params": {
52
+ "type": "object",
53
+ "properties": {
54
+ "assignmentId": {
55
+ "type": "string"
56
+ },
57
+ "taskId": {
58
+ "type": "string"
59
+ },
60
+ "projectRoot": {
61
+ "type": "string"
62
+ },
63
+ "question": {
64
+ "type": "string"
65
+ }
66
+ },
67
+ "required": [
68
+ "question"
69
+ ],
70
+ "additionalProperties": true
71
+ },
72
+ "result": {
73
+ "type": "object",
74
+ "properties": {
75
+ "assignmentId": {
76
+ "type": "string"
77
+ },
78
+ "agent": {
79
+ "type": "string"
80
+ },
81
+ "taskId": {
82
+ "type": "string"
83
+ },
84
+ "finishedAt": {
85
+ "type": "string"
86
+ },
87
+ "answer": {
88
+ "type": "string"
89
+ }
90
+ },
91
+ "required": [
92
+ "assignmentId",
93
+ "agent",
94
+ "finishedAt",
95
+ "answer"
96
+ ],
97
+ "additionalProperties": true
98
+ }
99
+ },
100
+ "board.list": {
101
+ "x-alp": {
102
+ "effect": "query",
103
+ "scope": {
104
+ "kind": "project",
105
+ "param": "projectRoot",
106
+ "required": true
107
+ },
108
+ "idempotent": true
109
+ },
110
+ "params": {
111
+ "type": "object",
112
+ "properties": {
113
+ "projectRoot": {
114
+ "type": "string"
115
+ }
116
+ },
117
+ "required": [
118
+ "projectRoot"
119
+ ],
120
+ "additionalProperties": true
121
+ },
122
+ "result": {
123
+ "type": "object",
124
+ "properties": {
125
+ "pins": {
126
+ "type": "array",
127
+ "items": {
128
+ "$ref": "#/$defs/pin"
129
+ }
130
+ }
131
+ },
132
+ "required": [
133
+ "pins"
134
+ ],
135
+ "additionalProperties": true
136
+ }
137
+ },
138
+ "catalog.get": {
139
+ "x-alp": {
140
+ "effect": "query",
141
+ "scope": {
142
+ "kind": "host"
143
+ },
144
+ "idempotent": true
145
+ },
146
+ "params": {
147
+ "type": "object",
148
+ "properties": {},
149
+ "required": [],
150
+ "additionalProperties": true
151
+ },
152
+ "result": {
153
+ "type": "object",
154
+ "properties": {
155
+ "models": {
156
+ "type": "array",
157
+ "items": {
158
+ "type": "object"
159
+ }
160
+ },
161
+ "modes": {
162
+ "type": "array",
163
+ "items": {
164
+ "type": "object"
165
+ }
166
+ },
167
+ "thinkingOptions": {},
168
+ "defaultModel": {
169
+ "type": "string"
170
+ }
171
+ },
172
+ "required": [
173
+ "models",
174
+ "modes",
175
+ "defaultModel"
176
+ ],
177
+ "additionalProperties": true
178
+ }
179
+ },
180
+ "daemon.hello": {
181
+ "x-alp": {
182
+ "effect": "query",
183
+ "scope": {
184
+ "kind": "connection"
185
+ },
186
+ "idempotent": true
187
+ },
188
+ "params": {
189
+ "type": "object",
190
+ "properties": {
191
+ "protocolVersion": {
192
+ "const": 1
193
+ },
194
+ "client": {
195
+ "type": "object",
196
+ "properties": {
197
+ "name": {
198
+ "type": "string"
199
+ },
200
+ "version": {
201
+ "type": "string"
202
+ }
203
+ },
204
+ "required": [
205
+ "name",
206
+ "version"
207
+ ],
208
+ "additionalProperties": true
209
+ },
210
+ "capabilities": {
211
+ "type": "array",
212
+ "items": {
213
+ "type": "string"
214
+ }
215
+ }
216
+ },
217
+ "required": [
218
+ "protocolVersion"
219
+ ],
220
+ "additionalProperties": true
221
+ },
222
+ "result": {
223
+ "type": "object",
224
+ "properties": {
225
+ "protocolVersion": {
226
+ "const": 1
227
+ },
228
+ "daemonVersion": {
229
+ "type": "string"
230
+ },
231
+ "pid": {
232
+ "type": "integer"
233
+ },
234
+ "hostname": {
235
+ "type": "string"
236
+ },
237
+ "capabilities": {
238
+ "type": "array",
239
+ "items": {
240
+ "type": "string"
241
+ }
242
+ },
243
+ "promptImageLimits": {
244
+ "type": "object",
245
+ "description": "Optional effective inline image limits for this connection, when prompt.images is advertised. Missing on older peers. Byte limits count decoded bytes.",
246
+ "properties": {
247
+ "maxCount": {
248
+ "type": "integer",
249
+ "minimum": 0
250
+ },
251
+ "maxBytes": {
252
+ "type": "integer",
253
+ "minimum": 0
254
+ },
255
+ "maxTotalBytes": {
256
+ "type": "integer",
257
+ "minimum": 0
258
+ }
259
+ },
260
+ "required": [
261
+ "maxCount",
262
+ "maxBytes",
263
+ "maxTotalBytes"
264
+ ],
265
+ "additionalProperties": false
266
+ }
267
+ },
268
+ "required": [
269
+ "protocolVersion"
270
+ ],
271
+ "additionalProperties": true
272
+ }
273
+ },
274
+ "daemon.pause": {
275
+ "x-alp": {
276
+ "effect": "mutation",
277
+ "scope": {
278
+ "kind": "host"
279
+ },
280
+ "idempotent": true,
281
+ "risks": [
282
+ "admin"
283
+ ]
284
+ },
285
+ "params": {
286
+ "type": "object",
287
+ "properties": {
288
+ "runtime": {
289
+ "enum": [
290
+ "codex",
291
+ "claude",
292
+ "acp",
293
+ "antigravity"
294
+ ]
295
+ },
296
+ "now": {
297
+ "type": "boolean"
298
+ },
299
+ "reason": {
300
+ "type": "string"
301
+ }
302
+ },
303
+ "required": [],
304
+ "additionalProperties": true
305
+ },
306
+ "result": {
307
+ "$ref": "#/$defs/pauseState"
308
+ }
309
+ },
310
+ "daemon.pauses": {
311
+ "x-alp": {
312
+ "effect": "query",
313
+ "scope": {
314
+ "kind": "host"
315
+ },
316
+ "idempotent": true
317
+ },
318
+ "params": {
319
+ "type": "object",
320
+ "properties": {},
321
+ "required": [],
322
+ "additionalProperties": true
323
+ },
324
+ "result": {
325
+ "$ref": "#/$defs/pauseState"
326
+ }
327
+ },
328
+ "daemon.resume": {
329
+ "x-alp": {
330
+ "effect": "mutation",
331
+ "scope": {
332
+ "kind": "host"
333
+ },
334
+ "idempotent": true,
335
+ "risks": [
336
+ "admin"
337
+ ]
338
+ },
339
+ "params": {
340
+ "type": "object",
341
+ "properties": {
342
+ "runtime": {
343
+ "enum": [
344
+ "codex",
345
+ "claude",
346
+ "acp",
347
+ "antigravity"
348
+ ]
349
+ }
350
+ },
351
+ "required": [],
352
+ "additionalProperties": true
353
+ },
354
+ "result": {
355
+ "$ref": "#/$defs/pauseState"
356
+ }
357
+ },
358
+ "daemon.shutdown": {
359
+ "x-alp": {
360
+ "effect": "mutation",
361
+ "scope": {
362
+ "kind": "host"
363
+ },
364
+ "idempotent": true,
365
+ "risks": [
366
+ "admin"
367
+ ]
368
+ },
369
+ "params": {
370
+ "type": "object",
371
+ "properties": {},
372
+ "required": [],
373
+ "additionalProperties": true
374
+ },
375
+ "result": {
376
+ "type": "object",
377
+ "properties": {},
378
+ "required": [],
379
+ "additionalProperties": true
380
+ }
381
+ },
382
+ "daemon.status": {
383
+ "x-alp": {
384
+ "effect": "query",
385
+ "scope": {
386
+ "kind": "host"
387
+ },
388
+ "idempotent": true
389
+ },
390
+ "params": {
391
+ "type": "object",
392
+ "properties": {},
393
+ "required": [],
394
+ "additionalProperties": true
395
+ },
396
+ "result": {
397
+ "type": "object",
398
+ "properties": {
399
+ "pid": {
400
+ "type": "integer"
401
+ },
402
+ "startedAt": {
403
+ "type": "string"
404
+ },
405
+ "version": {
406
+ "type": "string"
407
+ },
408
+ "protocolVersion": {
409
+ "type": "integer"
410
+ },
411
+ "sessions": {
412
+ "type": "integer"
413
+ },
414
+ "questions": {
415
+ "type": "integer"
416
+ },
417
+ "previousExit": {
418
+ "type": "object",
419
+ "properties": {
420
+ "kind": {
421
+ "enum": [
422
+ "clean",
423
+ "crash"
424
+ ]
425
+ },
426
+ "at": {
427
+ "type": "string"
428
+ }
429
+ },
430
+ "required": [
431
+ "kind"
432
+ ],
433
+ "additionalProperties": true
434
+ },
435
+ "persistence": {
436
+ "type": "object"
437
+ },
438
+ "health": {
439
+ "$ref": "#/$defs/health"
440
+ }
441
+ },
442
+ "required": [
443
+ "pid",
444
+ "startedAt",
445
+ "version",
446
+ "protocolVersion",
447
+ "sessions",
448
+ "questions",
449
+ "health"
450
+ ],
451
+ "additionalProperties": true
452
+ }
453
+ },
454
+ "daemon.usage": {
455
+ "x-alp": {
456
+ "effect": "query",
457
+ "scope": {
458
+ "kind": "host"
459
+ },
460
+ "idempotent": true,
461
+ "risks": [
462
+ "refresh asks every provider (spawns on the daemon host)"
463
+ ]
464
+ },
465
+ "params": {
466
+ "type": "object",
467
+ "properties": {
468
+ "refresh": {
469
+ "type": "boolean"
470
+ }
471
+ },
472
+ "required": [],
473
+ "additionalProperties": true
474
+ },
475
+ "result": {
476
+ "type": "object",
477
+ "properties": {
478
+ "providers": {
479
+ "type": "array",
480
+ "items": {
481
+ "type": "object"
482
+ }
483
+ }
484
+ },
485
+ "required": [
486
+ "providers"
487
+ ],
488
+ "additionalProperties": true
489
+ }
490
+ },
491
+ "extension.register": {
492
+ "x-alp": {
493
+ "effect": "mutation",
494
+ "scope": {
495
+ "kind": "connection"
496
+ },
497
+ "idempotent": false,
498
+ "risks": [
499
+ "admin"
500
+ ]
501
+ },
502
+ "params": {
503
+ "type": "object",
504
+ "properties": {
505
+ "method": {
506
+ "type": "string"
507
+ }
508
+ },
509
+ "required": [
510
+ "method"
511
+ ],
512
+ "additionalProperties": true
513
+ },
514
+ "result": {
515
+ "type": "object",
516
+ "properties": {
517
+ "registered": {
518
+ "type": "string"
519
+ }
520
+ },
521
+ "required": [
522
+ "registered"
523
+ ],
524
+ "additionalProperties": true
525
+ }
526
+ },
527
+ "extension.unregister": {
528
+ "x-alp": {
529
+ "effect": "mutation",
530
+ "scope": {
531
+ "kind": "connection"
532
+ },
533
+ "idempotent": false,
534
+ "risks": [
535
+ "admin"
536
+ ]
537
+ },
538
+ "params": {
539
+ "type": "object",
540
+ "properties": {
541
+ "method": {
542
+ "type": "string"
543
+ }
544
+ },
545
+ "required": [
546
+ "method"
547
+ ],
548
+ "additionalProperties": true
549
+ },
550
+ "result": {
551
+ "type": "object",
552
+ "properties": {
553
+ "unregistered": {
554
+ "type": "string"
555
+ }
556
+ },
557
+ "required": [
558
+ "unregistered"
559
+ ],
560
+ "additionalProperties": true
561
+ }
562
+ },
563
+ "library.delete": {
564
+ "x-alp": {
565
+ "effect": "mutation",
566
+ "capability": "library",
567
+ "scope": {
568
+ "kind": "library-or-project",
569
+ "param": "projectRoot",
570
+ "selector": "scope"
571
+ },
572
+ "idempotent": false
573
+ },
574
+ "params": {
575
+ "type": "object",
576
+ "properties": {
577
+ "kind": {
578
+ "$ref": "#/$defs/libraryKind"
579
+ },
580
+ "name": {
581
+ "$ref": "#/$defs/entryName"
582
+ },
583
+ "scope": {
584
+ "$ref": "#/$defs/libraryScope"
585
+ },
586
+ "projectRoot": {
587
+ "$ref": "#/$defs/projectRoot"
588
+ },
589
+ "revision": {
590
+ "type": "string"
591
+ },
592
+ "policy": {
593
+ "enum": [
594
+ "project-data"
595
+ ],
596
+ "description": "Opt-in strict project-only non-executable mutation policy; requires library.project.write capability."
597
+ }
598
+ },
599
+ "required": [
600
+ "kind",
601
+ "name",
602
+ "scope"
603
+ ],
604
+ "additionalProperties": true
605
+ },
606
+ "result": {
607
+ "type": "object",
608
+ "properties": {
609
+ "removed": {
610
+ "const": true
611
+ },
612
+ "now": {
613
+ "enum": [
614
+ "builtin",
615
+ "library"
616
+ ]
617
+ }
618
+ },
619
+ "required": [
620
+ "removed"
621
+ ],
622
+ "additionalProperties": true
623
+ }
624
+ },
625
+ "library.duplicate": {
626
+ "x-alp": {
627
+ "effect": "mutation",
628
+ "capability": "library",
629
+ "scope": {
630
+ "kind": "library-or-project",
631
+ "param": "projectRoot",
632
+ "selector": "scope",
633
+ "reads": [
634
+ "builtin",
635
+ "library"
636
+ ]
637
+ },
638
+ "idempotent": false,
639
+ "risks": [
640
+ "exec-config when kind is mcp, hooks or providers"
641
+ ]
642
+ },
643
+ "params": {
644
+ "type": "object",
645
+ "properties": {
646
+ "kind": {
647
+ "$ref": "#/$defs/libraryKind"
648
+ },
649
+ "from": {
650
+ "$ref": "#/$defs/entryName"
651
+ },
652
+ "to": {
653
+ "$ref": "#/$defs/entryName"
654
+ },
655
+ "scope": {
656
+ "$ref": "#/$defs/libraryScope"
657
+ },
658
+ "projectRoot": {
659
+ "$ref": "#/$defs/projectRoot"
660
+ },
661
+ "policy": {
662
+ "enum": [
663
+ "project-data"
664
+ ],
665
+ "description": "Opt-in strict project-only non-executable mutation policy; requires library.project.write capability."
666
+ }
667
+ },
668
+ "required": [
669
+ "kind",
670
+ "from",
671
+ "to",
672
+ "scope"
673
+ ],
674
+ "additionalProperties": true
675
+ },
676
+ "result": {
677
+ "type": "object",
678
+ "properties": {
679
+ "revision": {
680
+ "$ref": "#/$defs/libraryRevision"
681
+ }
682
+ },
683
+ "required": [
684
+ "revision"
685
+ ],
686
+ "additionalProperties": true
687
+ }
688
+ },
689
+ "library.get": {
690
+ "x-alp": {
691
+ "effect": "query",
692
+ "capability": "library",
693
+ "scope": {
694
+ "kind": "project",
695
+ "param": "projectRoot",
696
+ "required": false,
697
+ "reads": [
698
+ "builtin",
699
+ "library"
700
+ ]
701
+ },
702
+ "idempotent": true,
703
+ "redacts": [
704
+ "mcp /server/env/*",
705
+ "mcp /server/headers/*",
706
+ "providers /provider/env/*"
707
+ ]
708
+ },
709
+ "params": {
710
+ "type": "object",
711
+ "properties": {
712
+ "kind": {
713
+ "$ref": "#/$defs/libraryKind"
714
+ },
715
+ "name": {
716
+ "$ref": "#/$defs/entryName"
717
+ },
718
+ "projectRoot": {
719
+ "$ref": "#/$defs/projectRoot"
720
+ },
721
+ "scope": {
722
+ "$ref": "#/$defs/libraryScope"
723
+ }
724
+ },
725
+ "required": [
726
+ "kind",
727
+ "name"
728
+ ],
729
+ "additionalProperties": true
730
+ },
731
+ "result": {
732
+ "type": "object",
733
+ "properties": {
734
+ "kind": {
735
+ "$ref": "#/$defs/libraryKind"
736
+ },
737
+ "name": {
738
+ "type": "string"
739
+ },
740
+ "source": {
741
+ "$ref": "#/$defs/librarySource"
742
+ },
743
+ "overrides": {
744
+ "$ref": "#/$defs/librarySource"
745
+ },
746
+ "content": {
747
+ "type": "object"
748
+ },
749
+ "revision": {
750
+ "$ref": "#/$defs/libraryRevision"
751
+ },
752
+ "usedBy": {
753
+ "type": "array",
754
+ "items": {
755
+ "type": "string"
756
+ }
757
+ },
758
+ "librarySkills": {
759
+ "type": "array",
760
+ "items": {
761
+ "type": "string"
762
+ }
763
+ },
764
+ "secrets": {
765
+ "type": "array",
766
+ "items": {
767
+ "type": "string"
768
+ }
769
+ }
770
+ },
771
+ "required": [
772
+ "kind",
773
+ "name",
774
+ "source",
775
+ "content",
776
+ "revision",
777
+ "usedBy"
778
+ ],
779
+ "additionalProperties": true
780
+ }
781
+ },
782
+ "library.list": {
783
+ "x-alp": {
784
+ "effect": "query",
785
+ "capability": "library",
786
+ "scope": {
787
+ "kind": "project",
788
+ "param": "projectRoot",
789
+ "required": false,
790
+ "reads": [
791
+ "builtin",
792
+ "library"
793
+ ]
794
+ },
795
+ "idempotent": true
796
+ },
797
+ "params": {
798
+ "type": "object",
799
+ "properties": {
800
+ "kind": {
801
+ "$ref": "#/$defs/libraryKind"
802
+ },
803
+ "projectRoot": {
804
+ "$ref": "#/$defs/projectRoot"
805
+ }
806
+ },
807
+ "required": [
808
+ "kind"
809
+ ],
810
+ "additionalProperties": true
811
+ },
812
+ "result": {
813
+ "type": "object",
814
+ "properties": {
815
+ "projectRoot": {
816
+ "type": [
817
+ "string",
818
+ "null"
819
+ ]
820
+ },
821
+ "entries": {
822
+ "type": "array",
823
+ "items": {
824
+ "$ref": "#/$defs/libraryEntryRow"
825
+ }
826
+ }
827
+ },
828
+ "required": [
829
+ "projectRoot",
830
+ "entries"
831
+ ],
832
+ "additionalProperties": true
833
+ }
834
+ },
835
+ "library.models": {
836
+ "x-alp": {
837
+ "effect": "query",
838
+ "capability": "library",
839
+ "scope": {
840
+ "kind": "host"
841
+ },
842
+ "idempotent": true
843
+ },
844
+ "params": {
845
+ "type": "object",
846
+ "properties": {},
847
+ "required": [],
848
+ "additionalProperties": true
849
+ },
850
+ "result": {
851
+ "type": "object",
852
+ "properties": {
853
+ "models": {
854
+ "type": "array",
855
+ "items": {
856
+ "type": "object",
857
+ "properties": {
858
+ "id": {
859
+ "type": "string"
860
+ },
861
+ "label": {
862
+ "type": "string"
863
+ },
864
+ "efforts": {
865
+ "type": "array",
866
+ "items": {
867
+ "type": "string"
868
+ }
869
+ },
870
+ "effort": {
871
+ "type": "string"
872
+ }
873
+ },
874
+ "required": [
875
+ "id",
876
+ "label",
877
+ "efforts"
878
+ ],
879
+ "additionalProperties": true
880
+ }
881
+ }
882
+ },
883
+ "required": [
884
+ "models"
885
+ ],
886
+ "additionalProperties": true
887
+ }
888
+ },
889
+ "library.rename": {
890
+ "x-alp": {
891
+ "effect": "mutation",
892
+ "capability": "library",
893
+ "scope": {
894
+ "kind": "library-or-project",
895
+ "param": "projectRoot",
896
+ "selector": "scope"
897
+ },
898
+ "idempotent": false,
899
+ "risks": [
900
+ "exec-config when kind is mcp, hooks or providers"
901
+ ]
902
+ },
903
+ "params": {
904
+ "type": "object",
905
+ "properties": {
906
+ "kind": {
907
+ "$ref": "#/$defs/libraryKind"
908
+ },
909
+ "from": {
910
+ "$ref": "#/$defs/entryName"
911
+ },
912
+ "to": {
913
+ "$ref": "#/$defs/entryName"
914
+ },
915
+ "scope": {
916
+ "$ref": "#/$defs/libraryScope"
917
+ },
918
+ "projectRoot": {
919
+ "$ref": "#/$defs/projectRoot"
920
+ },
921
+ "policy": {
922
+ "enum": [
923
+ "project-data"
924
+ ],
925
+ "description": "Opt-in strict project-only non-executable mutation policy; requires library.project.write capability."
926
+ }
927
+ },
928
+ "required": [
929
+ "kind",
930
+ "from",
931
+ "to",
932
+ "scope"
933
+ ],
934
+ "additionalProperties": true
935
+ },
936
+ "result": {
937
+ "type": "object",
938
+ "properties": {
939
+ "revision": {
940
+ "$ref": "#/$defs/libraryRevision"
941
+ }
942
+ },
943
+ "required": [
944
+ "revision"
945
+ ],
946
+ "additionalProperties": true
947
+ }
948
+ },
949
+ "library.save": {
950
+ "x-alp": {
951
+ "effect": "mutation",
952
+ "capability": "library",
953
+ "scope": {
954
+ "kind": "library-or-project",
955
+ "param": "projectRoot",
956
+ "selector": "scope"
957
+ },
958
+ "idempotent": "with revision (a repeat fails revision_conflict)",
959
+ "risks": [
960
+ "exec-config when kind is mcp, hooks or providers, or agents naming mcp/hooks/provider",
961
+ "writes every known project's .alp/settings.json when kind is teams and sync is known-projects"
962
+ ]
963
+ },
964
+ "params": {
965
+ "type": "object",
966
+ "properties": {
967
+ "kind": {
968
+ "$ref": "#/$defs/libraryKind"
969
+ },
970
+ "name": {
971
+ "$ref": "#/$defs/entryName"
972
+ },
973
+ "scope": {
974
+ "$ref": "#/$defs/libraryScope"
975
+ },
976
+ "projectRoot": {
977
+ "$ref": "#/$defs/projectRoot"
978
+ },
979
+ "content": {
980
+ "type": "object"
981
+ },
982
+ "revision": {
983
+ "$ref": "#/$defs/libraryRevision"
984
+ },
985
+ "sync": {
986
+ "enum": [
987
+ "none",
988
+ "known-projects"
989
+ ]
990
+ },
991
+ "policy": {
992
+ "enum": [
993
+ "project-data"
994
+ ],
995
+ "description": "Opt-in strict project-only non-executable mutation policy; requires library.project.write capability."
996
+ }
997
+ },
998
+ "required": [
999
+ "kind",
1000
+ "name",
1001
+ "scope",
1002
+ "content"
1003
+ ],
1004
+ "additionalProperties": true
1005
+ },
1006
+ "result": {
1007
+ "type": "object",
1008
+ "properties": {
1009
+ "revision": {
1010
+ "$ref": "#/$defs/libraryRevision"
1011
+ },
1012
+ "syncedProjects": {
1013
+ "type": "integer",
1014
+ "minimum": 0
1015
+ },
1016
+ "syncErrors": {
1017
+ "type": "array",
1018
+ "items": {
1019
+ "type": "string"
1020
+ }
1021
+ }
1022
+ },
1023
+ "required": [
1024
+ "revision"
1025
+ ],
1026
+ "additionalProperties": true
1027
+ }
1028
+ },
1029
+ "library.skills.set": {
1030
+ "x-alp": {
1031
+ "effect": "mutation",
1032
+ "capability": "library",
1033
+ "scope": {
1034
+ "kind": "host"
1035
+ },
1036
+ "writes": [
1037
+ "ALP_HOME/role-skills.json"
1038
+ ],
1039
+ "idempotent": true
1040
+ },
1041
+ "params": {
1042
+ "type": "object",
1043
+ "properties": {
1044
+ "agent": {
1045
+ "$ref": "#/$defs/entryName"
1046
+ },
1047
+ "skills": {
1048
+ "type": "array",
1049
+ "items": {
1050
+ "$ref": "#/$defs/entryName"
1051
+ },
1052
+ "maxItems": 100
1053
+ }
1054
+ },
1055
+ "required": [
1056
+ "agent",
1057
+ "skills"
1058
+ ],
1059
+ "additionalProperties": true
1060
+ },
1061
+ "result": {
1062
+ "type": "object",
1063
+ "properties": {
1064
+ "skills": {
1065
+ "type": "array",
1066
+ "items": {
1067
+ "type": "string"
1068
+ }
1069
+ }
1070
+ },
1071
+ "required": [
1072
+ "skills"
1073
+ ],
1074
+ "additionalProperties": true
1075
+ }
1076
+ },
1077
+ "question.answer": {
1078
+ "x-alp": {
1079
+ "effect": "mutation",
1080
+ "scope": {
1081
+ "kind": "question",
1082
+ "param": "questionId",
1083
+ "prefix": true
1084
+ },
1085
+ "idempotent": false
1086
+ },
1087
+ "params": {
1088
+ "type": "object",
1089
+ "properties": {
1090
+ "questionId": {
1091
+ "type": "string"
1092
+ },
1093
+ "text": {
1094
+ "type": "string"
1095
+ },
1096
+ "dismiss": {
1097
+ "type": "boolean"
1098
+ },
1099
+ "reason": {
1100
+ "type": "string"
1101
+ }
1102
+ },
1103
+ "required": [
1104
+ "questionId"
1105
+ ],
1106
+ "additionalProperties": true
1107
+ },
1108
+ "result": {
1109
+ "type": "object",
1110
+ "properties": {
1111
+ "questionId": {
1112
+ "type": "string"
1113
+ }
1114
+ },
1115
+ "required": [
1116
+ "questionId"
1117
+ ],
1118
+ "additionalProperties": true
1119
+ }
1120
+ },
1121
+ "question.list": {
1122
+ "x-alp": {
1123
+ "effect": "query",
1124
+ "scope": {
1125
+ "kind": "project",
1126
+ "param": "projectRoot",
1127
+ "required": false
1128
+ },
1129
+ "idempotent": true
1130
+ },
1131
+ "params": {
1132
+ "type": "object",
1133
+ "properties": {
1134
+ "projectRoot": {
1135
+ "type": "string"
1136
+ }
1137
+ },
1138
+ "required": [],
1139
+ "additionalProperties": true
1140
+ },
1141
+ "result": {
1142
+ "type": "object",
1143
+ "properties": {
1144
+ "questions": {
1145
+ "type": "array",
1146
+ "items": {
1147
+ "$ref": "#/$defs/question"
1148
+ }
1149
+ }
1150
+ },
1151
+ "required": [
1152
+ "questions"
1153
+ ],
1154
+ "additionalProperties": true
1155
+ }
1156
+ },
1157
+ "question.watch": {
1158
+ "x-alp": {
1159
+ "effect": "query",
1160
+ "scope": {
1161
+ "kind": "project",
1162
+ "param": "projectRoot",
1163
+ "required": false
1164
+ },
1165
+ "idempotent": true,
1166
+ "capability": "question.watch"
1167
+ },
1168
+ "params": {
1169
+ "type": "object",
1170
+ "properties": {
1171
+ "projectRoot": {
1172
+ "type": "string"
1173
+ },
1174
+ "turns": {
1175
+ "type": "boolean"
1176
+ }
1177
+ },
1178
+ "required": [],
1179
+ "additionalProperties": true
1180
+ },
1181
+ "result": {
1182
+ "type": "object",
1183
+ "properties": {
1184
+ "questions": {
1185
+ "type": "array",
1186
+ "items": {
1187
+ "$ref": "#/$defs/question"
1188
+ }
1189
+ }
1190
+ },
1191
+ "required": [
1192
+ "questions"
1193
+ ],
1194
+ "additionalProperties": true
1195
+ }
1196
+ },
1197
+ "session.archive": {
1198
+ "x-alp": {
1199
+ "effect": "mutation",
1200
+ "scope": {
1201
+ "kind": "session",
1202
+ "param": "sessionId"
1203
+ },
1204
+ "idempotent": true
1205
+ },
1206
+ "params": {
1207
+ "type": "object",
1208
+ "properties": {
1209
+ "sessionId": {
1210
+ "type": "string"
1211
+ },
1212
+ "archived": {
1213
+ "type": "boolean"
1214
+ }
1215
+ },
1216
+ "required": [
1217
+ "sessionId"
1218
+ ],
1219
+ "additionalProperties": true
1220
+ },
1221
+ "result": {
1222
+ "type": "object",
1223
+ "properties": {
1224
+ "session": {
1225
+ "$ref": "#/$defs/sessionSummary"
1226
+ }
1227
+ },
1228
+ "required": [
1229
+ "session"
1230
+ ],
1231
+ "additionalProperties": true
1232
+ }
1233
+ },
1234
+ "session.attach": {
1235
+ "x-alp": {
1236
+ "effect": "query",
1237
+ "scope": {
1238
+ "kind": "session",
1239
+ "param": "sessionId"
1240
+ },
1241
+ "idempotent": true
1242
+ },
1243
+ "params": {
1244
+ "type": "object",
1245
+ "properties": {
1246
+ "sessionId": {
1247
+ "type": "string"
1248
+ },
1249
+ "replay": {
1250
+ "type": "boolean"
1251
+ },
1252
+ "after": {
1253
+ "type": "integer",
1254
+ "minimum": 0,
1255
+ "maximum": 9007199254740991
1256
+ }
1257
+ },
1258
+ "required": [
1259
+ "sessionId"
1260
+ ],
1261
+ "additionalProperties": true
1262
+ },
1263
+ "result": {
1264
+ "type": "object",
1265
+ "properties": {
1266
+ "session": {
1267
+ "$ref": "#/$defs/sessionSummary"
1268
+ },
1269
+ "cursor": {
1270
+ "type": "integer",
1271
+ "minimum": 0,
1272
+ "maximum": 9007199254740991
1273
+ },
1274
+ "reset": {
1275
+ "const": true
1276
+ }
1277
+ },
1278
+ "required": [
1279
+ "session",
1280
+ "cursor"
1281
+ ],
1282
+ "additionalProperties": true
1283
+ }
1284
+ },
1285
+ "session.close": {
1286
+ "x-alp": {
1287
+ "effect": "mutation",
1288
+ "scope": {
1289
+ "kind": "session",
1290
+ "param": "sessionId"
1291
+ },
1292
+ "idempotent": false
1293
+ },
1294
+ "params": {
1295
+ "type": "object",
1296
+ "properties": {
1297
+ "sessionId": {
1298
+ "type": "string"
1299
+ }
1300
+ },
1301
+ "required": [
1302
+ "sessionId"
1303
+ ],
1304
+ "additionalProperties": true
1305
+ },
1306
+ "result": {
1307
+ "type": "object",
1308
+ "properties": {},
1309
+ "required": [],
1310
+ "additionalProperties": true
1311
+ }
1312
+ },
1313
+ "session.configure": {
1314
+ "x-alp": {
1315
+ "effect": "mutation",
1316
+ "scope": {
1317
+ "kind": "session",
1318
+ "param": "sessionId"
1319
+ },
1320
+ "idempotent": true
1321
+ },
1322
+ "params": {
1323
+ "type": "object",
1324
+ "properties": {
1325
+ "sessionId": {
1326
+ "type": "string"
1327
+ },
1328
+ "mode": {
1329
+ "type": "string"
1330
+ }
1331
+ },
1332
+ "required": [
1333
+ "sessionId"
1334
+ ],
1335
+ "additionalProperties": true
1336
+ },
1337
+ "result": {
1338
+ "type": "object",
1339
+ "properties": {
1340
+ "session": {
1341
+ "$ref": "#/$defs/session"
1342
+ }
1343
+ },
1344
+ "required": [
1345
+ "session"
1346
+ ],
1347
+ "additionalProperties": true
1348
+ }
1349
+ },
1350
+ "session.create": {
1351
+ "x-alp": {
1352
+ "effect": "mutation",
1353
+ "scope": {
1354
+ "kind": "project",
1355
+ "param": "spec.cwd"
1356
+ },
1357
+ "idempotent": false,
1358
+ "risks": [
1359
+ "exec: spec.env and stdio spec.mcpServers run on the daemon host",
1360
+ "spec.workdir/writeRoot/copy*/restore/keepThread are internal"
1361
+ ]
1362
+ },
1363
+ "params": {
1364
+ "type": "object",
1365
+ "properties": {
1366
+ "sessionId": {
1367
+ "type": "string",
1368
+ "pattern": "^[A-Za-z0-9_.:-]{1,128}$"
1369
+ },
1370
+ "spec": {
1371
+ "$ref": "#/$defs/spec"
1372
+ },
1373
+ "history": {
1374
+ "enum": [
1375
+ "skip",
1376
+ "replay"
1377
+ ]
1378
+ },
1379
+ "delegation": {
1380
+ "type": "boolean"
1381
+ },
1382
+ "resume": {
1383
+ "type": "boolean"
1384
+ }
1385
+ },
1386
+ "required": [
1387
+ "spec"
1388
+ ],
1389
+ "additionalProperties": true
1390
+ },
1391
+ "result": {
1392
+ "type": "object",
1393
+ "properties": {
1394
+ "session": {
1395
+ "$ref": "#/$defs/session"
1396
+ },
1397
+ "attached": {
1398
+ "type": "boolean"
1399
+ },
1400
+ "resumed": {
1401
+ "const": true
1402
+ },
1403
+ "durable": {
1404
+ "type": "boolean"
1405
+ }
1406
+ },
1407
+ "required": [
1408
+ "session",
1409
+ "attached"
1410
+ ],
1411
+ "additionalProperties": true
1412
+ }
1413
+ },
1414
+ "session.get": {
1415
+ "x-alp": {
1416
+ "effect": "query",
1417
+ "scope": {
1418
+ "kind": "session",
1419
+ "param": "sessionId"
1420
+ },
1421
+ "idempotent": true
1422
+ },
1423
+ "params": {
1424
+ "type": "object",
1425
+ "properties": {
1426
+ "sessionId": {
1427
+ "type": "string"
1428
+ }
1429
+ },
1430
+ "required": [
1431
+ "sessionId"
1432
+ ],
1433
+ "additionalProperties": true
1434
+ },
1435
+ "result": {
1436
+ "type": "object",
1437
+ "properties": {
1438
+ "session": {
1439
+ "$ref": "#/$defs/sessionSummary"
1440
+ }
1441
+ },
1442
+ "required": [
1443
+ "session"
1444
+ ],
1445
+ "additionalProperties": true
1446
+ }
1447
+ },
1448
+ "session.interrupt": {
1449
+ "x-alp": {
1450
+ "effect": "mutation",
1451
+ "scope": {
1452
+ "kind": "session",
1453
+ "param": "sessionId"
1454
+ },
1455
+ "idempotent": true
1456
+ },
1457
+ "params": {
1458
+ "type": "object",
1459
+ "properties": {
1460
+ "sessionId": {
1461
+ "type": "string"
1462
+ }
1463
+ },
1464
+ "required": [
1465
+ "sessionId"
1466
+ ],
1467
+ "additionalProperties": true
1468
+ },
1469
+ "result": {
1470
+ "type": "object",
1471
+ "properties": {},
1472
+ "required": [],
1473
+ "additionalProperties": true
1474
+ }
1475
+ },
1476
+ "session.list": {
1477
+ "x-alp": {
1478
+ "effect": "query",
1479
+ "scope": {
1480
+ "kind": "project",
1481
+ "param": "projectRoot",
1482
+ "required": false
1483
+ },
1484
+ "idempotent": true
1485
+ },
1486
+ "params": {
1487
+ "type": "object",
1488
+ "properties": {
1489
+ "projectRoot": {
1490
+ "type": "string"
1491
+ },
1492
+ "rootsOnly": {
1493
+ "type": "boolean"
1494
+ },
1495
+ "includeClosed": {
1496
+ "type": "boolean"
1497
+ },
1498
+ "includeArchived": {
1499
+ "type": "boolean"
1500
+ },
1501
+ "limit": {
1502
+ "type": "integer",
1503
+ "minimum": 1,
1504
+ "maximum": 1000
1505
+ },
1506
+ "cursor": {
1507
+ "type": "string",
1508
+ "minLength": 1,
1509
+ "maxLength": 1024
1510
+ },
1511
+ "query": {
1512
+ "type": "string",
1513
+ "maxLength": 200
1514
+ },
1515
+ "projectRoots": {
1516
+ "type": "array",
1517
+ "items": {
1518
+ "type": "string"
1519
+ },
1520
+ "minItems": 1,
1521
+ "maxItems": 1024
1522
+ }
1523
+ },
1524
+ "required": [],
1525
+ "additionalProperties": true
1526
+ },
1527
+ "result": {
1528
+ "type": "object",
1529
+ "properties": {
1530
+ "sessions": {
1531
+ "type": "array",
1532
+ "items": {
1533
+ "$ref": "#/$defs/sessionSummary"
1534
+ }
1535
+ },
1536
+ "nextCursor": {
1537
+ "type": "string",
1538
+ "minLength": 1
1539
+ }
1540
+ },
1541
+ "required": [
1542
+ "sessions"
1543
+ ],
1544
+ "additionalProperties": true
1545
+ }
1546
+ },
1547
+ "session.log": {
1548
+ "x-alp": {
1549
+ "effect": "query",
1550
+ "scope": {
1551
+ "kind": "session",
1552
+ "param": "sessionId"
1553
+ },
1554
+ "idempotent": true
1555
+ },
1556
+ "params": {
1557
+ "type": "object",
1558
+ "properties": {
1559
+ "sessionId": {
1560
+ "type": "string"
1561
+ }
1562
+ },
1563
+ "required": [
1564
+ "sessionId"
1565
+ ],
1566
+ "additionalProperties": true
1567
+ },
1568
+ "result": {
1569
+ "type": "object",
1570
+ "properties": {
1571
+ "rootId": {
1572
+ "type": "string"
1573
+ },
1574
+ "entries": {
1575
+ "type": "array",
1576
+ "items": {
1577
+ "type": "object"
1578
+ }
1579
+ }
1580
+ },
1581
+ "required": [
1582
+ "rootId",
1583
+ "entries"
1584
+ ],
1585
+ "additionalProperties": true
1586
+ }
1587
+ },
1588
+ "session.message": {
1589
+ "x-alp": {
1590
+ "effect": "mutation",
1591
+ "scope": {
1592
+ "kind": "session",
1593
+ "param": "sessionId"
1594
+ },
1595
+ "idempotent": false
1596
+ },
1597
+ "params": {
1598
+ "type": "object",
1599
+ "properties": {
1600
+ "sessionId": {
1601
+ "type": "string"
1602
+ },
1603
+ "text": {
1604
+ "type": "string"
1605
+ }
1606
+ },
1607
+ "required": [
1608
+ "sessionId",
1609
+ "text"
1610
+ ],
1611
+ "additionalProperties": true
1612
+ },
1613
+ "result": {
1614
+ "type": "object",
1615
+ "properties": {},
1616
+ "required": [],
1617
+ "additionalProperties": true
1618
+ }
1619
+ },
1620
+ "session.preview": {
1621
+ "x-alp": {
1622
+ "effect": "query",
1623
+ "scope": {
1624
+ "kind": "project",
1625
+ "param": "spec.cwd"
1626
+ },
1627
+ "idempotent": true
1628
+ },
1629
+ "params": {
1630
+ "type": "object",
1631
+ "properties": {
1632
+ "spec": {
1633
+ "$ref": "#/$defs/spec"
1634
+ }
1635
+ },
1636
+ "required": [
1637
+ "spec"
1638
+ ],
1639
+ "additionalProperties": true
1640
+ },
1641
+ "result": {
1642
+ "type": "object",
1643
+ "properties": {
1644
+ "preview": {
1645
+ "$ref": "#/$defs/preview"
1646
+ }
1647
+ },
1648
+ "required": [
1649
+ "preview"
1650
+ ],
1651
+ "additionalProperties": true
1652
+ }
1653
+ },
1654
+ "session.prompt": {
1655
+ "x-alp": {
1656
+ "effect": "mutation",
1657
+ "scope": {
1658
+ "kind": "session",
1659
+ "param": "sessionId"
1660
+ },
1661
+ "idempotent": "with prompt.receipts"
1662
+ },
1663
+ "params": {
1664
+ "type": "object",
1665
+ "properties": {
1666
+ "sessionId": {
1667
+ "type": "string"
1668
+ },
1669
+ "clientMessageId": {
1670
+ "type": "string"
1671
+ },
1672
+ "delivery": {
1673
+ "enum": [
1674
+ "auto",
1675
+ "steer"
1676
+ ]
1677
+ },
1678
+ "content": {
1679
+ "type": "array",
1680
+ "items": {
1681
+ "anyOf": [
1682
+ {
1683
+ "type": "object",
1684
+ "properties": {
1685
+ "type": {
1686
+ "const": "text"
1687
+ },
1688
+ "text": {
1689
+ "type": "string"
1690
+ }
1691
+ },
1692
+ "required": [
1693
+ "type"
1694
+ ],
1695
+ "additionalProperties": true
1696
+ },
1697
+ {
1698
+ "$ref": "#/$defs/promptImage"
1699
+ },
1700
+ {
1701
+ "type": "object",
1702
+ "properties": {
1703
+ "type": {
1704
+ "type": "string",
1705
+ "not": {
1706
+ "enum": [
1707
+ "text",
1708
+ "image"
1709
+ ]
1710
+ }
1711
+ }
1712
+ },
1713
+ "required": [
1714
+ "type"
1715
+ ],
1716
+ "additionalProperties": true
1717
+ }
1718
+ ]
1719
+ }
1720
+ }
1721
+ },
1722
+ "required": [
1723
+ "sessionId",
1724
+ "clientMessageId",
1725
+ "content"
1726
+ ],
1727
+ "additionalProperties": true
1728
+ },
1729
+ "result": {
1730
+ "type": "object",
1731
+ "properties": {
1732
+ "outcome": {
1733
+ "enum": [
1734
+ "accepted",
1735
+ "failed"
1736
+ ]
1737
+ },
1738
+ "error": {
1739
+ "$ref": "#/$defs/alpError"
1740
+ },
1741
+ "duplicate": {
1742
+ "type": "boolean"
1743
+ },
1744
+ "durable": {
1745
+ "type": "boolean"
1746
+ }
1747
+ },
1748
+ "required": [],
1749
+ "additionalProperties": true
1750
+ }
1751
+ },
1752
+ "session.release": {
1753
+ "x-alp": {
1754
+ "effect": "mutation",
1755
+ "scope": {
1756
+ "kind": "session",
1757
+ "param": "sessionId"
1758
+ },
1759
+ "idempotent": true
1760
+ },
1761
+ "params": {
1762
+ "type": "object",
1763
+ "properties": {
1764
+ "sessionId": {
1765
+ "type": "string"
1766
+ }
1767
+ },
1768
+ "required": [
1769
+ "sessionId"
1770
+ ],
1771
+ "additionalProperties": true
1772
+ },
1773
+ "result": {
1774
+ "type": "object",
1775
+ "properties": {
1776
+ "closed": {
1777
+ "type": "boolean"
1778
+ }
1779
+ },
1780
+ "required": [
1781
+ "closed"
1782
+ ],
1783
+ "additionalProperties": true
1784
+ }
1785
+ },
1786
+ "session.rename": {
1787
+ "x-alp": {
1788
+ "effect": "mutation",
1789
+ "scope": {
1790
+ "kind": "session",
1791
+ "param": "sessionId"
1792
+ },
1793
+ "idempotent": true
1794
+ },
1795
+ "params": {
1796
+ "type": "object",
1797
+ "properties": {
1798
+ "sessionId": {
1799
+ "type": "string"
1800
+ },
1801
+ "title": {
1802
+ "type": "string",
1803
+ "minLength": 1,
1804
+ "maxLength": 200,
1805
+ "pattern": "\\S"
1806
+ }
1807
+ },
1808
+ "required": [
1809
+ "sessionId",
1810
+ "title"
1811
+ ],
1812
+ "additionalProperties": true
1813
+ },
1814
+ "result": {
1815
+ "type": "object",
1816
+ "properties": {
1817
+ "session": {
1818
+ "$ref": "#/$defs/sessionSummary"
1819
+ }
1820
+ },
1821
+ "required": [
1822
+ "session"
1823
+ ],
1824
+ "additionalProperties": true
1825
+ }
1826
+ },
1827
+ "session.status": {
1828
+ "x-alp": {
1829
+ "effect": "query",
1830
+ "scope": {
1831
+ "kind": "session",
1832
+ "param": "sessionId"
1833
+ },
1834
+ "idempotent": true
1835
+ },
1836
+ "params": {
1837
+ "type": "object",
1838
+ "properties": {
1839
+ "sessionId": {
1840
+ "type": "string"
1841
+ }
1842
+ },
1843
+ "required": [
1844
+ "sessionId"
1845
+ ],
1846
+ "additionalProperties": true
1847
+ },
1848
+ "result": {
1849
+ "type": "object",
1850
+ "properties": {
1851
+ "status": {
1852
+ "$ref": "#/$defs/treeStatus"
1853
+ }
1854
+ },
1855
+ "required": [
1856
+ "status"
1857
+ ],
1858
+ "additionalProperties": true
1859
+ }
1860
+ },
1861
+ "settings.language.get": {
1862
+ "x-alp": {
1863
+ "effect": "query",
1864
+ "capability": "settings.language",
1865
+ "scope": {
1866
+ "kind": "host"
1867
+ },
1868
+ "idempotent": true
1869
+ },
1870
+ "params": {
1871
+ "type": "object",
1872
+ "properties": {},
1873
+ "required": [],
1874
+ "additionalProperties": true
1875
+ },
1876
+ "result": {
1877
+ "$ref": "#/$defs/languageSetting"
1878
+ }
1879
+ },
1880
+ "settings.language.set": {
1881
+ "x-alp": {
1882
+ "effect": "mutation",
1883
+ "capability": "settings.language",
1884
+ "scope": {
1885
+ "kind": "host"
1886
+ },
1887
+ "writes": [
1888
+ "ALP_HOME/settings.json"
1889
+ ],
1890
+ "idempotent": true
1891
+ },
1892
+ "params": {
1893
+ "type": "object",
1894
+ "properties": {
1895
+ "language": {
1896
+ "anyOf": [
1897
+ {
1898
+ "type": "string",
1899
+ "minLength": 1,
1900
+ "maxLength": 40,
1901
+ "pattern": "\\S"
1902
+ },
1903
+ {
1904
+ "type": "null"
1905
+ }
1906
+ ]
1907
+ }
1908
+ },
1909
+ "required": [
1910
+ "language"
1911
+ ],
1912
+ "additionalProperties": true
1913
+ },
1914
+ "result": {
1915
+ "$ref": "#/$defs/languageSetting"
1916
+ }
1917
+ },
1918
+ "task.create": {
1919
+ "x-alp": {
1920
+ "effect": "mutation",
1921
+ "capability": "task",
1922
+ "scope": {
1923
+ "kind": "project",
1924
+ "param": "projectRoot",
1925
+ "required": true
1926
+ },
1927
+ "writes": [
1928
+ "<projectRoot>/.alp/tasks"
1929
+ ],
1930
+ "idempotent": "per requestId within one alpd process (10 minutes)"
1931
+ },
1932
+ "params": {
1933
+ "type": "object",
1934
+ "properties": {
1935
+ "projectRoot": {
1936
+ "$ref": "#/$defs/projectRoot"
1937
+ },
1938
+ "title": {
1939
+ "type": "string",
1940
+ "minLength": 1,
1941
+ "maxLength": 200,
1942
+ "pattern": "\\S"
1943
+ },
1944
+ "priority": {
1945
+ "type": "integer",
1946
+ "minimum": 0,
1947
+ "maximum": 4
1948
+ },
1949
+ "requestId": {
1950
+ "type": "string",
1951
+ "minLength": 1,
1952
+ "maxLength": 128
1953
+ }
1954
+ },
1955
+ "required": [
1956
+ "projectRoot",
1957
+ "title"
1958
+ ],
1959
+ "additionalProperties": true
1960
+ },
1961
+ "result": {
1962
+ "type": "object",
1963
+ "properties": {
1964
+ "id": {
1965
+ "$ref": "#/$defs/taskId"
1966
+ },
1967
+ "duplicate": {
1968
+ "const": true
1969
+ }
1970
+ },
1971
+ "required": [
1972
+ "id"
1973
+ ],
1974
+ "additionalProperties": true
1975
+ }
1976
+ },
1977
+ "task.gate.resolve": {
1978
+ "x-alp": {
1979
+ "effect": "mutation",
1980
+ "capability": "task",
1981
+ "scope": {
1982
+ "kind": "project",
1983
+ "param": "projectRoot",
1984
+ "required": true
1985
+ },
1986
+ "writes": [
1987
+ "<projectRoot>/.alp/tasks"
1988
+ ],
1989
+ "idempotent": false
1990
+ },
1991
+ "params": {
1992
+ "type": "object",
1993
+ "properties": {
1994
+ "projectRoot": {
1995
+ "$ref": "#/$defs/projectRoot"
1996
+ },
1997
+ "id": {
1998
+ "$ref": "#/$defs/taskId"
1999
+ },
2000
+ "gate": {
2001
+ "type": "string",
2002
+ "minLength": 1,
2003
+ "maxLength": 128
2004
+ },
2005
+ "note": {
2006
+ "type": "string",
2007
+ "maxLength": 2000
2008
+ },
2009
+ "ifRev": {
2010
+ "type": "integer",
2011
+ "minimum": 0
2012
+ }
2013
+ },
2014
+ "required": [
2015
+ "projectRoot",
2016
+ "id",
2017
+ "gate"
2018
+ ],
2019
+ "additionalProperties": true
2020
+ },
2021
+ "result": {
2022
+ "type": "object",
2023
+ "properties": {
2024
+ "id": {
2025
+ "$ref": "#/$defs/taskId"
2026
+ },
2027
+ "status": {
2028
+ "type": "string"
2029
+ },
2030
+ "rev": {
2031
+ "type": "integer",
2032
+ "minimum": 0
2033
+ }
2034
+ },
2035
+ "required": [
2036
+ "id",
2037
+ "status",
2038
+ "rev"
2039
+ ],
2040
+ "additionalProperties": true
2041
+ }
2042
+ },
2043
+ "task.list": {
2044
+ "x-alp": {
2045
+ "effect": "query",
2046
+ "capability": "task",
2047
+ "scope": {
2048
+ "kind": "project",
2049
+ "param": "projectRoot",
2050
+ "required": true
2051
+ },
2052
+ "idempotent": true
2053
+ },
2054
+ "params": {
2055
+ "type": "object",
2056
+ "properties": {
2057
+ "projectRoot": {
2058
+ "$ref": "#/$defs/projectRoot"
2059
+ }
2060
+ },
2061
+ "required": [
2062
+ "projectRoot"
2063
+ ],
2064
+ "additionalProperties": true
2065
+ },
2066
+ "result": {
2067
+ "type": "object",
2068
+ "properties": {
2069
+ "projectRoot": {
2070
+ "type": "string"
2071
+ },
2072
+ "tasks": {
2073
+ "type": "array",
2074
+ "items": {
2075
+ "$ref": "#/$defs/taskRow"
2076
+ }
2077
+ },
2078
+ "unreadable": {
2079
+ "type": "array",
2080
+ "items": {
2081
+ "type": "object",
2082
+ "properties": {
2083
+ "file": {
2084
+ "type": "string"
2085
+ },
2086
+ "error": {
2087
+ "type": "string"
2088
+ }
2089
+ },
2090
+ "required": [
2091
+ "file",
2092
+ "error"
2093
+ ],
2094
+ "additionalProperties": true
2095
+ }
2096
+ },
2097
+ "revision": {
2098
+ "type": "string"
2099
+ }
2100
+ },
2101
+ "required": [
2102
+ "projectRoot",
2103
+ "tasks",
2104
+ "unreadable",
2105
+ "revision"
2106
+ ],
2107
+ "additionalProperties": true
2108
+ }
2109
+ },
2110
+ "task.update": {
2111
+ "x-alp": {
2112
+ "effect": "mutation",
2113
+ "capability": "task",
2114
+ "scope": {
2115
+ "kind": "project",
2116
+ "param": "projectRoot",
2117
+ "required": true
2118
+ },
2119
+ "writes": [
2120
+ "<projectRoot>/.alp/tasks"
2121
+ ],
2122
+ "idempotent": false
2123
+ },
2124
+ "params": {
2125
+ "type": "object",
2126
+ "properties": {
2127
+ "projectRoot": {
2128
+ "$ref": "#/$defs/projectRoot"
2129
+ },
2130
+ "id": {
2131
+ "$ref": "#/$defs/taskId"
2132
+ },
2133
+ "action": {
2134
+ "enum": [
2135
+ "close",
2136
+ "reopen"
2137
+ ]
2138
+ },
2139
+ "note": {
2140
+ "type": "string",
2141
+ "maxLength": 2000
2142
+ },
2143
+ "ifRev": {
2144
+ "type": "integer",
2145
+ "minimum": 0
2146
+ }
2147
+ },
2148
+ "required": [
2149
+ "projectRoot",
2150
+ "id",
2151
+ "action"
2152
+ ],
2153
+ "additionalProperties": true
2154
+ },
2155
+ "result": {
2156
+ "type": "object",
2157
+ "properties": {
2158
+ "id": {
2159
+ "$ref": "#/$defs/taskId"
2160
+ },
2161
+ "status": {
2162
+ "type": "string"
2163
+ },
2164
+ "rev": {
2165
+ "type": "integer",
2166
+ "minimum": 0
2167
+ },
2168
+ "landed": {
2169
+ "type": "string"
2170
+ }
2171
+ },
2172
+ "required": [
2173
+ "id",
2174
+ "status",
2175
+ "rev"
2176
+ ],
2177
+ "additionalProperties": true
2178
+ }
2179
+ },
2180
+ "team.list": {
2181
+ "x-alp": {
2182
+ "effect": "query",
2183
+ "capability": "team",
2184
+ "scope": {
2185
+ "kind": "project",
2186
+ "param": "projectRoot",
2187
+ "required": false,
2188
+ "reads": [
2189
+ "builtin",
2190
+ "library"
2191
+ ]
2192
+ },
2193
+ "idempotent": true
2194
+ },
2195
+ "params": {
2196
+ "type": "object",
2197
+ "properties": {
2198
+ "projectRoot": {
2199
+ "$ref": "#/$defs/projectRoot"
2200
+ }
2201
+ },
2202
+ "required": [],
2203
+ "additionalProperties": true
2204
+ },
2205
+ "result": {
2206
+ "type": "object",
2207
+ "properties": {
2208
+ "projectRoot": {
2209
+ "type": [
2210
+ "string",
2211
+ "null"
2212
+ ]
2213
+ },
2214
+ "teams": {
2215
+ "type": "array",
2216
+ "items": {
2217
+ "$ref": "#/$defs/teamRow"
2218
+ }
2219
+ }
2220
+ },
2221
+ "required": [
2222
+ "projectRoot",
2223
+ "teams"
2224
+ ],
2225
+ "additionalProperties": true
2226
+ }
2227
+ },
2228
+ "workspace.files.search": {
2229
+ "x-alp": {
2230
+ "effect": "query",
2231
+ "scope": {
2232
+ "kind": "project",
2233
+ "param": "projectRoot",
2234
+ "required": true
2235
+ },
2236
+ "idempotent": true,
2237
+ "capability": "workspace.files",
2238
+ "risks": [
2239
+ "lists file names of the directory (not contents)"
2240
+ ]
2241
+ },
2242
+ "params": {
2243
+ "type": "object",
2244
+ "properties": {
2245
+ "projectRoot": {
2246
+ "type": "string"
2247
+ },
2248
+ "query": {
2249
+ "type": "string",
2250
+ "maxLength": 200
2251
+ },
2252
+ "limit": {
2253
+ "type": "integer",
2254
+ "minimum": 1,
2255
+ "maximum": 100
2256
+ }
2257
+ },
2258
+ "required": [
2259
+ "projectRoot"
2260
+ ],
2261
+ "additionalProperties": true
2262
+ },
2263
+ "result": {
2264
+ "type": "object",
2265
+ "properties": {
2266
+ "files": {
2267
+ "type": "array",
2268
+ "maxItems": 100,
2269
+ "items": {
2270
+ "type": "object",
2271
+ "properties": {
2272
+ "path": {
2273
+ "type": "string",
2274
+ "minLength": 1
2275
+ }
2276
+ },
2277
+ "required": [
2278
+ "path"
2279
+ ],
2280
+ "additionalProperties": true
2281
+ }
2282
+ },
2283
+ "truncated": {
2284
+ "type": "boolean"
2285
+ }
2286
+ },
2287
+ "required": [
2288
+ "files"
2289
+ ],
2290
+ "additionalProperties": true
2291
+ }
2292
+ },
2293
+ "workspace.files.list": {
2294
+ "x-alp": {
2295
+ "effect": "query",
2296
+ "scope": {
2297
+ "kind": "project",
2298
+ "param": "projectRoot",
2299
+ "required": true
2300
+ },
2301
+ "idempotent": true,
2302
+ "capability": "workspace.files.read",
2303
+ "risks": [
2304
+ "lists names, kinds, sizes and times of a directory's entries (not contents)"
2305
+ ]
2306
+ },
2307
+ "params": {
2308
+ "type": "object",
2309
+ "properties": {
2310
+ "projectRoot": {
2311
+ "type": "string"
2312
+ },
2313
+ "path": {
2314
+ "type": "string",
2315
+ "minLength": 1,
2316
+ "maxLength": 4096
2317
+ },
2318
+ "includeIgnored": {
2319
+ "type": "boolean"
2320
+ }
2321
+ },
2322
+ "required": [
2323
+ "projectRoot"
2324
+ ],
2325
+ "additionalProperties": true
2326
+ },
2327
+ "result": {
2328
+ "type": "object",
2329
+ "properties": {
2330
+ "entries": {
2331
+ "type": "array",
2332
+ "maxItems": 1000,
2333
+ "items": {
2334
+ "type": "object",
2335
+ "properties": {
2336
+ "name": {
2337
+ "type": "string",
2338
+ "minLength": 1
2339
+ },
2340
+ "path": {
2341
+ "type": "string",
2342
+ "minLength": 1
2343
+ },
2344
+ "kind": {
2345
+ "enum": [
2346
+ "file",
2347
+ "directory"
2348
+ ]
2349
+ },
2350
+ "size": {
2351
+ "type": "integer",
2352
+ "minimum": 0
2353
+ },
2354
+ "modifiedAt": {
2355
+ "type": "string"
2356
+ }
2357
+ },
2358
+ "required": [
2359
+ "name",
2360
+ "path",
2361
+ "kind"
2362
+ ],
2363
+ "additionalProperties": true
2364
+ }
2365
+ },
2366
+ "truncated": {
2367
+ "type": "boolean"
2368
+ }
2369
+ },
2370
+ "required": [
2371
+ "entries"
2372
+ ],
2373
+ "additionalProperties": true
2374
+ }
2375
+ },
2376
+ "workspace.files.read": {
2377
+ "x-alp": {
2378
+ "effect": "query",
2379
+ "scope": {
2380
+ "kind": "project",
2381
+ "param": "projectRoot",
2382
+ "required": true
2383
+ },
2384
+ "idempotent": true,
2385
+ "capability": "workspace.files.read",
2386
+ "risks": [
2387
+ "returns the content of a text file under the directory"
2388
+ ]
2389
+ },
2390
+ "params": {
2391
+ "type": "object",
2392
+ "properties": {
2393
+ "projectRoot": {
2394
+ "type": "string"
2395
+ },
2396
+ "path": {
2397
+ "type": "string",
2398
+ "minLength": 1,
2399
+ "maxLength": 4096
2400
+ },
2401
+ "includeIgnored": {
2402
+ "type": "boolean"
2403
+ }
2404
+ },
2405
+ "required": [
2406
+ "projectRoot",
2407
+ "path"
2408
+ ],
2409
+ "additionalProperties": true
2410
+ },
2411
+ "result": {
2412
+ "type": "object",
2413
+ "properties": {
2414
+ "path": {
2415
+ "type": "string",
2416
+ "minLength": 1
2417
+ },
2418
+ "content": {
2419
+ "type": "string"
2420
+ },
2421
+ "size": {
2422
+ "type": "integer",
2423
+ "minimum": 0,
2424
+ "maximum": 1048576
2425
+ },
2426
+ "modifiedAt": {
2427
+ "type": "string"
2428
+ }
2429
+ },
2430
+ "required": [
2431
+ "path",
2432
+ "content",
2433
+ "size"
2434
+ ],
2435
+ "additionalProperties": true
2436
+ }
2437
+ }
2438
+ },
2439
+ "$defs": {
2440
+ "error": {
2441
+ "type": "object",
2442
+ "properties": {
2443
+ "code": {
2444
+ "type": "integer"
2445
+ },
2446
+ "message": {
2447
+ "type": "string"
2448
+ },
2449
+ "data": {}
2450
+ },
2451
+ "required": [
2452
+ "code",
2453
+ "message"
2454
+ ],
2455
+ "additionalProperties": true
2456
+ },
2457
+ "session": {
2458
+ "type": "object",
2459
+ "properties": {
2460
+ "id": {
2461
+ "type": "string"
2462
+ },
2463
+ "projectRoot": {
2464
+ "type": "string"
2465
+ },
2466
+ "agent": {
2467
+ "type": "string"
2468
+ },
2469
+ "runtime": {
2470
+ "enum": [
2471
+ "claude",
2472
+ "codex",
2473
+ "acp",
2474
+ "antigravity"
2475
+ ]
2476
+ },
2477
+ "model": {
2478
+ "type": "string"
2479
+ },
2480
+ "mode": {
2481
+ "type": "string"
2482
+ },
2483
+ "thinking": {
2484
+ "type": "string"
2485
+ },
2486
+ "workflow": {
2487
+ "type": "object",
2488
+ "properties": {
2489
+ "mode": {
2490
+ "type": "string"
2491
+ },
2492
+ "maxPeers": {
2493
+ "type": "integer"
2494
+ },
2495
+ "supervisor": {
2496
+ "type": "boolean"
2497
+ }
2498
+ },
2499
+ "required": [
2500
+ "mode",
2501
+ "maxPeers",
2502
+ "supervisor"
2503
+ ],
2504
+ "additionalProperties": true
2505
+ },
2506
+ "threadId": {
2507
+ "type": "string"
2508
+ },
2509
+ "persistent": {
2510
+ "type": "boolean"
2511
+ },
2512
+ "busy": {
2513
+ "type": "boolean"
2514
+ },
2515
+ "parentId": {
2516
+ "type": "string"
2517
+ },
2518
+ "toolCallId": {
2519
+ "type": "string"
2520
+ },
2521
+ "activeTurnId": {
2522
+ "type": "string"
2523
+ },
2524
+ "parked": {
2525
+ "type": "string"
2526
+ },
2527
+ "instructionsSha": {
2528
+ "type": "string"
2529
+ },
2530
+ "teamLabel": {
2531
+ "type": "string"
2532
+ },
2533
+ "promptImages": {
2534
+ "type": "boolean"
2535
+ },
2536
+ "usage": {
2537
+ "$ref": "#/$defs/usage"
2538
+ }
2539
+ },
2540
+ "required": [
2541
+ "id",
2542
+ "projectRoot",
2543
+ "agent",
2544
+ "runtime",
2545
+ "model",
2546
+ "mode",
2547
+ "thinking",
2548
+ "workflow",
2549
+ "threadId",
2550
+ "persistent",
2551
+ "busy"
2552
+ ],
2553
+ "additionalProperties": true
2554
+ },
2555
+ "usage": {
2556
+ "type": "object",
2557
+ "properties": {
2558
+ "contextWindowUsedTokens": {
2559
+ "type": "integer",
2560
+ "minimum": 0
2561
+ },
2562
+ "contextWindowMaxTokens": {
2563
+ "type": "integer",
2564
+ "minimum": 1
2565
+ },
2566
+ "inputTokens": {
2567
+ "type": "integer",
2568
+ "minimum": 0
2569
+ },
2570
+ "cachedInputTokens": {
2571
+ "type": "integer",
2572
+ "minimum": 0
2573
+ },
2574
+ "outputTokens": {
2575
+ "type": "integer",
2576
+ "minimum": 0
2577
+ },
2578
+ "totalCostUsd": {
2579
+ "type": "number",
2580
+ "minimum": 0
2581
+ }
2582
+ },
2583
+ "additionalProperties": true
2584
+ },
2585
+ "assignment": {
2586
+ "type": "object",
2587
+ "properties": {
2588
+ "id": {
2589
+ "type": "string"
2590
+ },
2591
+ "agent": {
2592
+ "type": "string"
2593
+ },
2594
+ "mode": {
2595
+ "type": "string"
2596
+ },
2597
+ "status": {
2598
+ "type": "string"
2599
+ },
2600
+ "startedAt": {
2601
+ "type": "string"
2602
+ },
2603
+ "worktree": {
2604
+ "type": "object",
2605
+ "properties": {
2606
+ "branch": {
2607
+ "type": "string"
2608
+ },
2609
+ "path": {
2610
+ "type": "string"
2611
+ }
2612
+ },
2613
+ "required": [
2614
+ "branch",
2615
+ "path"
2616
+ ],
2617
+ "additionalProperties": true
2618
+ }
2619
+ },
2620
+ "required": [
2621
+ "id",
2622
+ "agent",
2623
+ "mode",
2624
+ "status",
2625
+ "startedAt"
2626
+ ],
2627
+ "additionalProperties": true
2628
+ },
2629
+ "mail": {
2630
+ "type": "object",
2631
+ "properties": {
2632
+ "id": {
2633
+ "type": "string"
2634
+ },
2635
+ "kind": {
2636
+ "enum": [
2637
+ "question",
2638
+ "answer",
2639
+ "note",
2640
+ "steer",
2641
+ "result",
2642
+ "stalled",
2643
+ "board",
2644
+ "checkin"
2645
+ ]
2646
+ },
2647
+ "from": {
2648
+ "type": "string"
2649
+ },
2650
+ "assignment": {
2651
+ "type": "string"
2652
+ },
2653
+ "body": {
2654
+ "type": "string"
2655
+ },
2656
+ "replyTo": {
2657
+ "type": "string"
2658
+ },
2659
+ "result": {
2660
+ "type": "object"
2661
+ },
2662
+ "redelivered": {
2663
+ "type": "boolean"
2664
+ }
2665
+ },
2666
+ "required": [
2667
+ "id",
2668
+ "kind",
2669
+ "from",
2670
+ "assignment"
2671
+ ],
2672
+ "additionalProperties": true
2673
+ },
2674
+ "pin": {
2675
+ "type": "object",
2676
+ "properties": {
2677
+ "id": {
2678
+ "type": "string"
2679
+ },
2680
+ "project": {
2681
+ "type": "string"
2682
+ },
2683
+ "kind": {
2684
+ "enum": [
2685
+ "claim",
2686
+ "decision",
2687
+ "finding"
2688
+ ]
2689
+ },
2690
+ "body": {
2691
+ "type": "string"
2692
+ },
2693
+ "paths": {
2694
+ "type": "array",
2695
+ "items": {
2696
+ "type": "string"
2697
+ }
2698
+ },
2699
+ "agent": {
2700
+ "type": "string"
2701
+ },
2702
+ "sessionId": {
2703
+ "type": "string"
2704
+ },
2705
+ "rootId": {
2706
+ "type": "string"
2707
+ },
2708
+ "at": {
2709
+ "type": "string"
2710
+ },
2711
+ "released": {
2712
+ "type": "string"
2713
+ },
2714
+ "task": {
2715
+ "type": "string"
2716
+ }
2717
+ },
2718
+ "required": [
2719
+ "id",
2720
+ "project",
2721
+ "kind",
2722
+ "body",
2723
+ "agent",
2724
+ "sessionId",
2725
+ "rootId",
2726
+ "at"
2727
+ ],
2728
+ "additionalProperties": true
2729
+ },
2730
+ "question": {
2731
+ "type": "object",
2732
+ "properties": {
2733
+ "id": {
2734
+ "type": "string"
2735
+ },
2736
+ "sessionId": {
2737
+ "type": "string"
2738
+ },
2739
+ "rootId": {
2740
+ "type": "string"
2741
+ },
2742
+ "agent": {
2743
+ "type": "string"
2744
+ },
2745
+ "body": {
2746
+ "type": "string"
2747
+ },
2748
+ "options": {
2749
+ "type": "array",
2750
+ "items": {
2751
+ "type": "string"
2752
+ }
2753
+ },
2754
+ "askedAt": {
2755
+ "type": "string"
2756
+ }
2757
+ },
2758
+ "required": [
2759
+ "id",
2760
+ "sessionId",
2761
+ "rootId",
2762
+ "agent",
2763
+ "body",
2764
+ "askedAt"
2765
+ ],
2766
+ "additionalProperties": true
2767
+ },
2768
+ "spec": {
2769
+ "type": "object",
2770
+ "properties": {
2771
+ "cwd": {
2772
+ "type": "string"
2773
+ },
2774
+ "agent": {
2775
+ "type": "string"
2776
+ },
2777
+ "model": {
2778
+ "type": "string"
2779
+ },
2780
+ "mode": {
2781
+ "type": "string"
2782
+ },
2783
+ "thinking": {
2784
+ "type": "string"
2785
+ },
2786
+ "persist": {
2787
+ "type": "boolean"
2788
+ },
2789
+ "restore": {
2790
+ "type": "object"
2791
+ }
2792
+ },
2793
+ "required": [
2794
+ "cwd"
2795
+ ],
2796
+ "additionalProperties": true
2797
+ },
2798
+ "item": {
2799
+ "anyOf": [
2800
+ {
2801
+ "$ref": "#/$defs/knownItem"
2802
+ },
2803
+ {
2804
+ "$ref": "#/$defs/unknownItem"
2805
+ }
2806
+ ]
2807
+ },
2808
+ "event": {
2809
+ "anyOf": [
2810
+ {
2811
+ "$ref": "#/$defs/knownEvent"
2812
+ },
2813
+ {
2814
+ "$ref": "#/$defs/unknownEvent"
2815
+ }
2816
+ ]
2817
+ },
2818
+ "envelope": {
2819
+ "type": "object",
2820
+ "properties": {
2821
+ "sessionId": {
2822
+ "type": "string"
2823
+ },
2824
+ "epoch": {
2825
+ "type": "string"
2826
+ },
2827
+ "seq": {
2828
+ "type": "integer",
2829
+ "minimum": 0,
2830
+ "maximum": 9007199254740991
2831
+ },
2832
+ "ts": {
2833
+ "type": "string"
2834
+ },
2835
+ "event": {
2836
+ "$ref": "#/$defs/event"
2837
+ },
2838
+ "cursor": {
2839
+ "type": "integer",
2840
+ "minimum": 1,
2841
+ "maximum": 9007199254740991
2842
+ }
2843
+ },
2844
+ "required": [
2845
+ "sessionId",
2846
+ "epoch",
2847
+ "seq",
2848
+ "ts",
2849
+ "event"
2850
+ ],
2851
+ "additionalProperties": true
2852
+ },
2853
+ "request": {
2854
+ "type": "object",
2855
+ "properties": {
2856
+ "jsonrpc": {
2857
+ "const": "2.0"
2858
+ },
2859
+ "id": {
2860
+ "anyOf": [
2861
+ {
2862
+ "type": "string",
2863
+ "maxLength": 128
2864
+ },
2865
+ {
2866
+ "type": "integer",
2867
+ "minimum": -9007199254740991,
2868
+ "maximum": 9007199254740991
2869
+ }
2870
+ ]
2871
+ },
2872
+ "method": {
2873
+ "type": "string"
2874
+ },
2875
+ "params": {
2876
+ "type": "object"
2877
+ }
2878
+ },
2879
+ "required": [
2880
+ "jsonrpc",
2881
+ "method",
2882
+ "id"
2883
+ ],
2884
+ "additionalProperties": true
2885
+ },
2886
+ "response": {
2887
+ "oneOf": [
2888
+ {
2889
+ "type": "object",
2890
+ "properties": {
2891
+ "jsonrpc": {
2892
+ "const": "2.0"
2893
+ },
2894
+ "id": {
2895
+ "anyOf": [
2896
+ {
2897
+ "type": "string",
2898
+ "maxLength": 128
2899
+ },
2900
+ {
2901
+ "type": "integer",
2902
+ "minimum": -9007199254740991,
2903
+ "maximum": 9007199254740991
2904
+ },
2905
+ {
2906
+ "type": "null"
2907
+ }
2908
+ ]
2909
+ },
2910
+ "result": {}
2911
+ },
2912
+ "required": [
2913
+ "jsonrpc",
2914
+ "id",
2915
+ "result"
2916
+ ],
2917
+ "additionalProperties": true
2918
+ },
2919
+ {
2920
+ "type": "object",
2921
+ "properties": {
2922
+ "jsonrpc": {
2923
+ "const": "2.0"
2924
+ },
2925
+ "id": {
2926
+ "anyOf": [
2927
+ {
2928
+ "type": "string",
2929
+ "maxLength": 128
2930
+ },
2931
+ {
2932
+ "type": "integer",
2933
+ "minimum": -9007199254740991,
2934
+ "maximum": 9007199254740991
2935
+ },
2936
+ {
2937
+ "type": "null"
2938
+ }
2939
+ ]
2940
+ },
2941
+ "error": {
2942
+ "$ref": "#/$defs/error"
2943
+ }
2944
+ },
2945
+ "required": [
2946
+ "jsonrpc",
2947
+ "id",
2948
+ "error"
2949
+ ],
2950
+ "additionalProperties": true
2951
+ }
2952
+ ]
2953
+ },
2954
+ "notification": {
2955
+ "type": "object",
2956
+ "properties": {
2957
+ "jsonrpc": {
2958
+ "const": "2.0"
2959
+ },
2960
+ "method": {
2961
+ "const": "event"
2962
+ },
2963
+ "params": {
2964
+ "$ref": "#/$defs/envelope"
2965
+ }
2966
+ },
2967
+ "required": [
2968
+ "jsonrpc",
2969
+ "method",
2970
+ "params"
2971
+ ],
2972
+ "additionalProperties": true
2973
+ },
2974
+ "knownEvent": {
2975
+ "oneOf": [
2976
+ {
2977
+ "type": "object",
2978
+ "properties": {
2979
+ "type": {
2980
+ "const": "session.opened"
2981
+ },
2982
+ "session": {
2983
+ "$ref": "#/$defs/session"
2984
+ },
2985
+ "cwd": {
2986
+ "type": "string"
2987
+ },
2988
+ "effective": {
2989
+ "type": "object",
2990
+ "properties": {
2991
+ "model": {
2992
+ "type": "string"
2993
+ },
2994
+ "thinking": {
2995
+ "type": "string"
2996
+ }
2997
+ },
2998
+ "required": [
2999
+ "model",
3000
+ "thinking"
3001
+ ],
3002
+ "additionalProperties": true
3003
+ }
3004
+ },
3005
+ "required": [
3006
+ "type",
3007
+ "session",
3008
+ "cwd",
3009
+ "effective"
3010
+ ],
3011
+ "additionalProperties": true
3012
+ },
3013
+ {
3014
+ "type": "object",
3015
+ "properties": {
3016
+ "type": {
3017
+ "const": "session.ready"
3018
+ }
3019
+ },
3020
+ "required": [
3021
+ "type"
3022
+ ],
3023
+ "additionalProperties": true
3024
+ },
3025
+ {
3026
+ "type": "object",
3027
+ "properties": {
3028
+ "type": {
3029
+ "const": "session.updated"
3030
+ },
3031
+ "session": {
3032
+ "$ref": "#/$defs/session"
3033
+ }
3034
+ },
3035
+ "required": [
3036
+ "type",
3037
+ "session"
3038
+ ],
3039
+ "additionalProperties": true
3040
+ },
3041
+ {
3042
+ "type": "object",
3043
+ "properties": {
3044
+ "type": {
3045
+ "const": "session.closed"
3046
+ }
3047
+ },
3048
+ "required": [
3049
+ "type"
3050
+ ],
3051
+ "additionalProperties": true
3052
+ },
3053
+ {
3054
+ "type": "object",
3055
+ "properties": {
3056
+ "type": {
3057
+ "const": "session.failed"
3058
+ },
3059
+ "error": {
3060
+ "$ref": "#/$defs/alpError"
3061
+ }
3062
+ },
3063
+ "required": [
3064
+ "type",
3065
+ "error"
3066
+ ],
3067
+ "additionalProperties": true
3068
+ },
3069
+ {
3070
+ "type": "object",
3071
+ "properties": {
3072
+ "type": {
3073
+ "const": "prompt.accepted"
3074
+ },
3075
+ "clientMessageId": {
3076
+ "type": "string"
3077
+ },
3078
+ "result": {
3079
+ "enum": [
3080
+ "turn",
3081
+ "steer"
3082
+ ]
3083
+ },
3084
+ "turnId": {
3085
+ "type": "string"
3086
+ }
3087
+ },
3088
+ "required": [
3089
+ "type",
3090
+ "clientMessageId",
3091
+ "result",
3092
+ "turnId"
3093
+ ],
3094
+ "additionalProperties": true
3095
+ },
3096
+ {
3097
+ "type": "object",
3098
+ "properties": {
3099
+ "type": {
3100
+ "const": "prompt.failed"
3101
+ },
3102
+ "clientMessageId": {
3103
+ "type": "string"
3104
+ },
3105
+ "error": {
3106
+ "$ref": "#/$defs/alpError"
3107
+ }
3108
+ },
3109
+ "required": [
3110
+ "type",
3111
+ "clientMessageId",
3112
+ "error"
3113
+ ],
3114
+ "additionalProperties": true
3115
+ },
3116
+ {
3117
+ "type": "object",
3118
+ "properties": {
3119
+ "type": {
3120
+ "const": "turn.started"
3121
+ },
3122
+ "turnId": {
3123
+ "type": "string"
3124
+ },
3125
+ "origin": {
3126
+ "enum": [
3127
+ "user",
3128
+ "wake",
3129
+ "assignment",
3130
+ "runtime"
3131
+ ]
3132
+ }
3133
+ },
3134
+ "required": [
3135
+ "type",
3136
+ "turnId",
3137
+ "origin"
3138
+ ],
3139
+ "additionalProperties": true
3140
+ },
3141
+ {
3142
+ "type": "object",
3143
+ "properties": {
3144
+ "type": {
3145
+ "const": "turn.ended"
3146
+ },
3147
+ "turnId": {
3148
+ "type": "string"
3149
+ },
3150
+ "state": {
3151
+ "enum": [
3152
+ "completed",
3153
+ "failed",
3154
+ "canceled"
3155
+ ]
3156
+ },
3157
+ "error": {
3158
+ "$ref": "#/$defs/alpError"
3159
+ }
3160
+ },
3161
+ "required": [
3162
+ "type",
3163
+ "turnId",
3164
+ "state"
3165
+ ],
3166
+ "additionalProperties": true
3167
+ },
3168
+ {
3169
+ "type": "object",
3170
+ "properties": {
3171
+ "type": {
3172
+ "const": "item"
3173
+ },
3174
+ "item": {
3175
+ "$ref": "#/$defs/item"
3176
+ }
3177
+ },
3178
+ "required": [
3179
+ "type",
3180
+ "item"
3181
+ ],
3182
+ "additionalProperties": true
3183
+ },
3184
+ {
3185
+ "type": "object",
3186
+ "properties": {
3187
+ "type": {
3188
+ "const": "usage"
3189
+ },
3190
+ "usage": {
3191
+ "$ref": "#/$defs/usage"
3192
+ }
3193
+ },
3194
+ "required": [
3195
+ "type",
3196
+ "usage"
3197
+ ],
3198
+ "additionalProperties": true
3199
+ },
3200
+ {
3201
+ "type": "object",
3202
+ "properties": {
3203
+ "type": {
3204
+ "const": "mail"
3205
+ },
3206
+ "mail": {
3207
+ "$ref": "#/$defs/mail"
3208
+ }
3209
+ },
3210
+ "required": [
3211
+ "type",
3212
+ "mail"
3213
+ ],
3214
+ "additionalProperties": true
3215
+ },
3216
+ {
3217
+ "type": "object",
3218
+ "properties": {
3219
+ "type": {
3220
+ "const": "assignment"
3221
+ },
3222
+ "assignment": {
3223
+ "$ref": "#/$defs/assignment"
3224
+ }
3225
+ },
3226
+ "required": [
3227
+ "type",
3228
+ "assignment"
3229
+ ],
3230
+ "additionalProperties": true
3231
+ },
3232
+ {
3233
+ "type": "object",
3234
+ "properties": {
3235
+ "type": {
3236
+ "const": "question"
3237
+ },
3238
+ "question": {
3239
+ "$ref": "#/$defs/question"
3240
+ }
3241
+ },
3242
+ "required": [
3243
+ "type",
3244
+ "question"
3245
+ ],
3246
+ "additionalProperties": true
3247
+ },
3248
+ {
3249
+ "type": "object",
3250
+ "properties": {
3251
+ "type": {
3252
+ "const": "question.resolved"
3253
+ },
3254
+ "questionId": {
3255
+ "type": "string"
3256
+ },
3257
+ "outcome": {
3258
+ "enum": [
3259
+ "answered",
3260
+ "dismissed",
3261
+ "timeout",
3262
+ "canceled"
3263
+ ]
3264
+ },
3265
+ "answer": {
3266
+ "type": "string"
3267
+ }
3268
+ },
3269
+ "required": [
3270
+ "type",
3271
+ "questionId",
3272
+ "outcome"
3273
+ ],
3274
+ "additionalProperties": true
3275
+ },
3276
+ {
3277
+ "type": "object",
3278
+ "properties": {
3279
+ "type": {
3280
+ "const": "pin"
3281
+ },
3282
+ "pin": {
3283
+ "$ref": "#/$defs/pin"
3284
+ }
3285
+ },
3286
+ "required": [
3287
+ "type",
3288
+ "pin"
3289
+ ],
3290
+ "additionalProperties": true
3291
+ },
3292
+ {
3293
+ "type": "object",
3294
+ "properties": {
3295
+ "type": {
3296
+ "const": "unpin"
3297
+ },
3298
+ "pinId": {
3299
+ "type": "string"
3300
+ },
3301
+ "reason": {
3302
+ "enum": [
3303
+ "unpinned",
3304
+ "session_ended"
3305
+ ]
3306
+ }
3307
+ },
3308
+ "required": [
3309
+ "type",
3310
+ "pinId",
3311
+ "reason"
3312
+ ],
3313
+ "additionalProperties": true
3314
+ }
3315
+ ]
3316
+ },
3317
+ "unknownEvent": {
3318
+ "type": "object",
3319
+ "properties": {
3320
+ "type": {
3321
+ "type": "string",
3322
+ "not": {
3323
+ "enum": [
3324
+ "session.opened",
3325
+ "session.ready",
3326
+ "session.updated",
3327
+ "session.closed",
3328
+ "session.failed",
3329
+ "prompt.accepted",
3330
+ "prompt.failed",
3331
+ "turn.started",
3332
+ "turn.ended",
3333
+ "item",
3334
+ "usage",
3335
+ "mail",
3336
+ "assignment",
3337
+ "question",
3338
+ "question.resolved",
3339
+ "pin",
3340
+ "unpin"
3341
+ ]
3342
+ }
3343
+ }
3344
+ },
3345
+ "required": [
3346
+ "type"
3347
+ ],
3348
+ "additionalProperties": true
3349
+ },
3350
+ "knownItem": {
3351
+ "oneOf": [
3352
+ {
3353
+ "type": "object",
3354
+ "properties": {
3355
+ "kind": {
3356
+ "const": "user_message"
3357
+ },
3358
+ "id": {
3359
+ "type": "string"
3360
+ },
3361
+ "text": {
3362
+ "type": "string"
3363
+ },
3364
+ "clientMessageId": {
3365
+ "type": "string"
3366
+ },
3367
+ "images": {
3368
+ "type": "integer",
3369
+ "minimum": 1
3370
+ }
3371
+ },
3372
+ "required": [
3373
+ "kind",
3374
+ "id",
3375
+ "text"
3376
+ ],
3377
+ "additionalProperties": true
3378
+ },
3379
+ {
3380
+ "type": "object",
3381
+ "properties": {
3382
+ "kind": {
3383
+ "const": "assistant_message"
3384
+ },
3385
+ "id": {
3386
+ "type": "string"
3387
+ },
3388
+ "text": {
3389
+ "type": "string"
3390
+ }
3391
+ },
3392
+ "required": [
3393
+ "kind",
3394
+ "id",
3395
+ "text"
3396
+ ],
3397
+ "additionalProperties": true
3398
+ },
3399
+ {
3400
+ "type": "object",
3401
+ "properties": {
3402
+ "kind": {
3403
+ "const": "notice"
3404
+ },
3405
+ "id": {
3406
+ "type": "string"
3407
+ },
3408
+ "level": {
3409
+ "enum": [
3410
+ "info",
3411
+ "warning",
3412
+ "error"
3413
+ ]
3414
+ },
3415
+ "text": {
3416
+ "type": "string"
3417
+ }
3418
+ },
3419
+ "required": [
3420
+ "kind",
3421
+ "id",
3422
+ "level",
3423
+ "text"
3424
+ ],
3425
+ "additionalProperties": true
3426
+ },
3427
+ {
3428
+ "type": "object",
3429
+ "properties": {
3430
+ "kind": {
3431
+ "const": "compaction"
3432
+ },
3433
+ "id": {
3434
+ "type": "string"
3435
+ },
3436
+ "status": {
3437
+ "enum": [
3438
+ "running",
3439
+ "completed",
3440
+ "failed"
3441
+ ]
3442
+ },
3443
+ "trigger": {
3444
+ "type": "string"
3445
+ },
3446
+ "preTokens": {
3447
+ "type": "integer"
3448
+ },
3449
+ "postTokens": {
3450
+ "type": "integer"
3451
+ }
3452
+ },
3453
+ "required": [
3454
+ "kind",
3455
+ "id",
3456
+ "status"
3457
+ ],
3458
+ "additionalProperties": true
3459
+ },
3460
+ {
3461
+ "type": "object",
3462
+ "properties": {
3463
+ "kind": {
3464
+ "const": "todo"
3465
+ },
3466
+ "id": {
3467
+ "type": "string"
3468
+ },
3469
+ "items": {
3470
+ "type": "array",
3471
+ "items": {
3472
+ "type": "object",
3473
+ "properties": {
3474
+ "id": {
3475
+ "type": "string"
3476
+ },
3477
+ "text": {
3478
+ "type": "string"
3479
+ },
3480
+ "status": {
3481
+ "enum": [
3482
+ "pending",
3483
+ "in_progress",
3484
+ "completed"
3485
+ ]
3486
+ }
3487
+ },
3488
+ "required": [
3489
+ "id",
3490
+ "text",
3491
+ "status"
3492
+ ],
3493
+ "additionalProperties": true
3494
+ }
3495
+ }
3496
+ },
3497
+ "required": [
3498
+ "kind",
3499
+ "id",
3500
+ "items"
3501
+ ],
3502
+ "additionalProperties": true
3503
+ },
3504
+ {
3505
+ "type": "object",
3506
+ "properties": {
3507
+ "kind": {
3508
+ "const": "tool_call"
3509
+ },
3510
+ "id": {
3511
+ "type": "string"
3512
+ },
3513
+ "callId": {
3514
+ "type": "string"
3515
+ },
3516
+ "name": {
3517
+ "type": "string"
3518
+ },
3519
+ "status": {
3520
+ "enum": [
3521
+ "running",
3522
+ "completed",
3523
+ "failed"
3524
+ ]
3525
+ },
3526
+ "error": {
3527
+ "type": "string"
3528
+ },
3529
+ "detail": {
3530
+ "$ref": "#/$defs/toolCallDetail"
3531
+ }
3532
+ },
3533
+ "required": [
3534
+ "kind",
3535
+ "id",
3536
+ "callId",
3537
+ "name",
3538
+ "status",
3539
+ "detail"
3540
+ ],
3541
+ "additionalProperties": true
3542
+ }
3543
+ ]
3544
+ },
3545
+ "unknownItem": {
3546
+ "type": "object",
3547
+ "properties": {
3548
+ "kind": {
3549
+ "type": "string",
3550
+ "not": {
3551
+ "enum": [
3552
+ "user_message",
3553
+ "assistant_message",
3554
+ "notice",
3555
+ "compaction",
3556
+ "todo",
3557
+ "tool_call"
3558
+ ]
3559
+ }
3560
+ },
3561
+ "id": {
3562
+ "type": "string"
3563
+ }
3564
+ },
3565
+ "required": [
3566
+ "kind",
3567
+ "id"
3568
+ ],
3569
+ "additionalProperties": true
3570
+ },
3571
+ "toolCallDetail": {
3572
+ "oneOf": [
3573
+ {
3574
+ "type": "object",
3575
+ "properties": {
3576
+ "type": {
3577
+ "const": "shell"
3578
+ },
3579
+ "command": {
3580
+ "type": "string"
3581
+ },
3582
+ "cwd": {
3583
+ "type": "string"
3584
+ },
3585
+ "output": {
3586
+ "type": "string"
3587
+ },
3588
+ "exitCode": {
3589
+ "type": [
3590
+ "integer",
3591
+ "null"
3592
+ ]
3593
+ }
3594
+ },
3595
+ "required": [
3596
+ "type",
3597
+ "command",
3598
+ "output"
3599
+ ],
3600
+ "additionalProperties": true
3601
+ },
3602
+ {
3603
+ "type": "object",
3604
+ "properties": {
3605
+ "type": {
3606
+ "const": "read"
3607
+ },
3608
+ "filePath": {
3609
+ "type": "string"
3610
+ },
3611
+ "content": {
3612
+ "type": "string"
3613
+ },
3614
+ "offset": {
3615
+ "type": "integer"
3616
+ },
3617
+ "limit": {
3618
+ "type": "integer"
3619
+ }
3620
+ },
3621
+ "required": [
3622
+ "type",
3623
+ "filePath"
3624
+ ],
3625
+ "additionalProperties": true
3626
+ },
3627
+ {
3628
+ "type": "object",
3629
+ "properties": {
3630
+ "type": {
3631
+ "const": "edit"
3632
+ },
3633
+ "filePath": {
3634
+ "type": "string"
3635
+ },
3636
+ "oldString": {
3637
+ "type": "string"
3638
+ },
3639
+ "newString": {
3640
+ "type": "string"
3641
+ },
3642
+ "unifiedDiff": {
3643
+ "type": "string"
3644
+ }
3645
+ },
3646
+ "required": [
3647
+ "type",
3648
+ "filePath"
3649
+ ],
3650
+ "additionalProperties": true
3651
+ },
3652
+ {
3653
+ "type": "object",
3654
+ "properties": {
3655
+ "type": {
3656
+ "const": "write"
3657
+ },
3658
+ "filePath": {
3659
+ "type": "string"
3660
+ },
3661
+ "content": {
3662
+ "type": "string"
3663
+ }
3664
+ },
3665
+ "required": [
3666
+ "type",
3667
+ "filePath"
3668
+ ],
3669
+ "additionalProperties": true
3670
+ },
3671
+ {
3672
+ "type": "object",
3673
+ "properties": {
3674
+ "type": {
3675
+ "const": "search"
3676
+ },
3677
+ "query": {
3678
+ "type": "string"
3679
+ },
3680
+ "toolName": {
3681
+ "enum": [
3682
+ "search",
3683
+ "grep",
3684
+ "glob",
3685
+ "web_search"
3686
+ ]
3687
+ },
3688
+ "content": {
3689
+ "type": "string"
3690
+ },
3691
+ "filePaths": {
3692
+ "type": "array",
3693
+ "items": {
3694
+ "type": "string"
3695
+ }
3696
+ },
3697
+ "webResults": {
3698
+ "type": "array",
3699
+ "items": {
3700
+ "type": "object",
3701
+ "properties": {
3702
+ "title": {
3703
+ "type": "string"
3704
+ },
3705
+ "url": {
3706
+ "type": "string"
3707
+ }
3708
+ },
3709
+ "required": [
3710
+ "title",
3711
+ "url"
3712
+ ],
3713
+ "additionalProperties": true
3714
+ }
3715
+ },
3716
+ "numFiles": {
3717
+ "type": "integer"
3718
+ },
3719
+ "numMatches": {
3720
+ "type": "integer"
3721
+ },
3722
+ "truncated": {
3723
+ "type": "boolean"
3724
+ }
3725
+ },
3726
+ "required": [
3727
+ "type",
3728
+ "query"
3729
+ ],
3730
+ "additionalProperties": true
3731
+ },
3732
+ {
3733
+ "type": "object",
3734
+ "properties": {
3735
+ "type": {
3736
+ "const": "fetch"
3737
+ },
3738
+ "url": {
3739
+ "type": "string"
3740
+ },
3741
+ "prompt": {
3742
+ "type": "string"
3743
+ },
3744
+ "result": {
3745
+ "type": "string"
3746
+ },
3747
+ "code": {
3748
+ "type": "integer"
3749
+ }
3750
+ },
3751
+ "required": [
3752
+ "type",
3753
+ "url"
3754
+ ],
3755
+ "additionalProperties": true
3756
+ },
3757
+ {
3758
+ "type": "object",
3759
+ "properties": {
3760
+ "type": {
3761
+ "const": "sub_agent"
3762
+ },
3763
+ "subAgentType": {
3764
+ "type": "string"
3765
+ },
3766
+ "description": {
3767
+ "type": "string"
3768
+ },
3769
+ "log": {
3770
+ "type": "string"
3771
+ }
3772
+ },
3773
+ "required": [
3774
+ "type"
3775
+ ],
3776
+ "additionalProperties": true
3777
+ },
3778
+ {
3779
+ "type": "object",
3780
+ "properties": {
3781
+ "type": {
3782
+ "const": "plan"
3783
+ },
3784
+ "text": {
3785
+ "type": "string"
3786
+ }
3787
+ },
3788
+ "required": [
3789
+ "type",
3790
+ "text"
3791
+ ],
3792
+ "additionalProperties": true
3793
+ },
3794
+ {
3795
+ "type": "object",
3796
+ "properties": {
3797
+ "type": {
3798
+ "const": "plain_text"
3799
+ },
3800
+ "label": {
3801
+ "type": "string"
3802
+ },
3803
+ "text": {
3804
+ "type": "string"
3805
+ }
3806
+ },
3807
+ "required": [
3808
+ "type"
3809
+ ],
3810
+ "additionalProperties": true
3811
+ },
3812
+ {
3813
+ "type": "object",
3814
+ "properties": {
3815
+ "type": {
3816
+ "const": "unknown"
3817
+ },
3818
+ "input": {},
3819
+ "output": {}
3820
+ },
3821
+ "required": [
3822
+ "type",
3823
+ "input",
3824
+ "output"
3825
+ ],
3826
+ "additionalProperties": true
3827
+ },
3828
+ {
3829
+ "type": "object",
3830
+ "properties": {
3831
+ "type": {
3832
+ "type": "string",
3833
+ "not": {
3834
+ "enum": [
3835
+ "shell",
3836
+ "read",
3837
+ "edit",
3838
+ "write",
3839
+ "search",
3840
+ "fetch",
3841
+ "sub_agent",
3842
+ "plan",
3843
+ "plain_text",
3844
+ "unknown"
3845
+ ]
3846
+ }
3847
+ }
3848
+ },
3849
+ "required": [
3850
+ "type"
3851
+ ],
3852
+ "additionalProperties": true
3853
+ }
3854
+ ]
3855
+ },
3856
+ "alpError": {
3857
+ "type": "object",
3858
+ "properties": {
3859
+ "message": {
3860
+ "type": "string"
3861
+ },
3862
+ "code": {
3863
+ "type": "string"
3864
+ }
3865
+ },
3866
+ "required": [
3867
+ "message"
3868
+ ],
3869
+ "additionalProperties": true
3870
+ },
3871
+ "sessionSummary": {
3872
+ "type": "object",
3873
+ "properties": {
3874
+ "id": {
3875
+ "type": "string"
3876
+ },
3877
+ "projectRoot": {
3878
+ "type": "string"
3879
+ },
3880
+ "agent": {
3881
+ "type": "string"
3882
+ },
3883
+ "runtime": {
3884
+ "enum": [
3885
+ "claude",
3886
+ "codex",
3887
+ "acp",
3888
+ "antigravity"
3889
+ ]
3890
+ },
3891
+ "model": {
3892
+ "type": "string"
3893
+ },
3894
+ "mode": {
3895
+ "type": "string"
3896
+ },
3897
+ "thinking": {
3898
+ "type": "string"
3899
+ },
3900
+ "workflow": {
3901
+ "type": "object",
3902
+ "properties": {
3903
+ "mode": {
3904
+ "type": "string"
3905
+ },
3906
+ "maxPeers": {
3907
+ "type": "integer"
3908
+ },
3909
+ "supervisor": {
3910
+ "type": "boolean"
3911
+ }
3912
+ },
3913
+ "required": [
3914
+ "mode",
3915
+ "maxPeers",
3916
+ "supervisor"
3917
+ ],
3918
+ "additionalProperties": true
3919
+ },
3920
+ "threadId": {
3921
+ "type": "string"
3922
+ },
3923
+ "persistent": {
3924
+ "type": "boolean"
3925
+ },
3926
+ "busy": {
3927
+ "type": "boolean"
3928
+ },
3929
+ "parentId": {
3930
+ "type": "string"
3931
+ },
3932
+ "toolCallId": {
3933
+ "type": "string"
3934
+ },
3935
+ "activeTurnId": {
3936
+ "type": "string"
3937
+ },
3938
+ "parked": {
3939
+ "type": "string"
3940
+ },
3941
+ "instructionsSha": {
3942
+ "type": "string"
3943
+ },
3944
+ "teamLabel": {
3945
+ "type": "string"
3946
+ },
3947
+ "status": {
3948
+ "enum": [
3949
+ "initializing",
3950
+ "idle",
3951
+ "running",
3952
+ "error",
3953
+ "closed"
3954
+ ]
3955
+ },
3956
+ "title": {
3957
+ "type": "string"
3958
+ },
3959
+ "archived": {
3960
+ "type": "boolean"
3961
+ },
3962
+ "lastError": {
3963
+ "type": "object",
3964
+ "properties": {
3965
+ "code": {
3966
+ "type": "string"
3967
+ },
3968
+ "message": {
3969
+ "type": "string"
3970
+ }
3971
+ },
3972
+ "required": [
3973
+ "message"
3974
+ ],
3975
+ "additionalProperties": true
3976
+ },
3977
+ "createdAt": {
3978
+ "type": "string"
3979
+ },
3980
+ "updatedAt": {
3981
+ "type": "string"
3982
+ }
3983
+ },
3984
+ "required": [
3985
+ "id",
3986
+ "projectRoot",
3987
+ "agent",
3988
+ "runtime",
3989
+ "model",
3990
+ "mode",
3991
+ "thinking",
3992
+ "workflow",
3993
+ "threadId",
3994
+ "persistent",
3995
+ "busy",
3996
+ "status"
3997
+ ],
3998
+ "additionalProperties": true
3999
+ },
4000
+ "pause": {
4001
+ "type": "object",
4002
+ "properties": {
4003
+ "since": {
4004
+ "type": "string"
4005
+ },
4006
+ "by": {
4007
+ "type": "string"
4008
+ },
4009
+ "reason": {
4010
+ "type": "string"
4011
+ },
4012
+ "resetsAt": {
4013
+ "type": "string"
4014
+ },
4015
+ "checkedAt": {
4016
+ "type": "string"
4017
+ }
4018
+ },
4019
+ "required": [
4020
+ "since",
4021
+ "by",
4022
+ "reason"
4023
+ ],
4024
+ "additionalProperties": true
4025
+ },
4026
+ "pauseState": {
4027
+ "type": "object",
4028
+ "properties": {
4029
+ "all": {
4030
+ "$ref": "#/$defs/pause"
4031
+ },
4032
+ "runtimes": {
4033
+ "type": "object",
4034
+ "additionalProperties": {
4035
+ "$ref": "#/$defs/pause"
4036
+ }
4037
+ },
4038
+ "parked": {
4039
+ "type": "array",
4040
+ "items": {
4041
+ "type": "object",
4042
+ "properties": {
4043
+ "assignmentId": {
4044
+ "type": "string"
4045
+ },
4046
+ "agent": {
4047
+ "type": "string"
4048
+ },
4049
+ "runtime": {
4050
+ "type": "string"
4051
+ },
4052
+ "rootId": {
4053
+ "type": "string"
4054
+ },
4055
+ "reason": {
4056
+ "type": "string"
4057
+ },
4058
+ "since": {
4059
+ "type": "string"
4060
+ }
4061
+ },
4062
+ "required": [
4063
+ "assignmentId",
4064
+ "agent",
4065
+ "runtime",
4066
+ "rootId",
4067
+ "reason",
4068
+ "since"
4069
+ ],
4070
+ "additionalProperties": true
4071
+ }
4072
+ }
4073
+ },
4074
+ "required": [
4075
+ "runtimes",
4076
+ "parked"
4077
+ ],
4078
+ "additionalProperties": true
4079
+ },
4080
+ "preview": {
4081
+ "type": "object",
4082
+ "properties": {
4083
+ "teams": {
4084
+ "type": "array",
4085
+ "items": {
4086
+ "type": "object",
4087
+ "properties": {
4088
+ "id": {
4089
+ "type": "string"
4090
+ },
4091
+ "label": {
4092
+ "type": "string"
4093
+ },
4094
+ "description": {
4095
+ "type": "string"
4096
+ }
4097
+ },
4098
+ "required": [
4099
+ "id",
4100
+ "label"
4101
+ ],
4102
+ "additionalProperties": true
4103
+ }
4104
+ },
4105
+ "team": {
4106
+ "type": "string"
4107
+ },
4108
+ "teamLabel": {
4109
+ "type": "string"
4110
+ },
4111
+ "agent": {
4112
+ "type": "string"
4113
+ },
4114
+ "runtime": {
4115
+ "enum": [
4116
+ "claude",
4117
+ "codex",
4118
+ "acp",
4119
+ "antigravity"
4120
+ ]
4121
+ },
4122
+ "model": {
4123
+ "type": "string"
4124
+ },
4125
+ "mode": {
4126
+ "type": "string"
4127
+ },
4128
+ "thinking": {
4129
+ "type": "string"
4130
+ }
4131
+ },
4132
+ "required": [
4133
+ "teams",
4134
+ "team",
4135
+ "agent",
4136
+ "runtime",
4137
+ "model",
4138
+ "mode",
4139
+ "thinking"
4140
+ ],
4141
+ "additionalProperties": true
4142
+ },
4143
+ "treeStatus": {
4144
+ "type": "object",
4145
+ "properties": {
4146
+ "rootId": {
4147
+ "type": "string"
4148
+ },
4149
+ "sessions": {
4150
+ "type": "array",
4151
+ "items": {
4152
+ "type": "object",
4153
+ "properties": {
4154
+ "id": {
4155
+ "type": "string"
4156
+ },
4157
+ "projectRoot": {
4158
+ "type": "string"
4159
+ },
4160
+ "agent": {
4161
+ "type": "string"
4162
+ },
4163
+ "runtime": {
4164
+ "enum": [
4165
+ "claude",
4166
+ "codex",
4167
+ "acp",
4168
+ "antigravity"
4169
+ ]
4170
+ },
4171
+ "model": {
4172
+ "type": "string"
4173
+ },
4174
+ "mode": {
4175
+ "type": "string"
4176
+ },
4177
+ "thinking": {
4178
+ "type": "string"
4179
+ },
4180
+ "workflow": {
4181
+ "type": "object",
4182
+ "properties": {
4183
+ "mode": {
4184
+ "type": "string"
4185
+ },
4186
+ "maxPeers": {
4187
+ "type": "integer"
4188
+ },
4189
+ "supervisor": {
4190
+ "type": "boolean"
4191
+ }
4192
+ },
4193
+ "required": [
4194
+ "mode",
4195
+ "maxPeers",
4196
+ "supervisor"
4197
+ ],
4198
+ "additionalProperties": true
4199
+ },
4200
+ "threadId": {
4201
+ "type": "string"
4202
+ },
4203
+ "persistent": {
4204
+ "type": "boolean"
4205
+ },
4206
+ "busy": {
4207
+ "type": "boolean"
4208
+ },
4209
+ "parentId": {
4210
+ "type": "string"
4211
+ },
4212
+ "toolCallId": {
4213
+ "type": "string"
4214
+ },
4215
+ "activeTurnId": {
4216
+ "type": "string"
4217
+ },
4218
+ "parked": {
4219
+ "type": "string"
4220
+ },
4221
+ "instructionsSha": {
4222
+ "type": "string"
4223
+ },
4224
+ "teamLabel": {
4225
+ "type": "string"
4226
+ },
4227
+ "state": {
4228
+ "enum": [
4229
+ "running",
4230
+ "waiting",
4231
+ "waiting_parent",
4232
+ "waiting_user",
4233
+ "idle"
4234
+ ]
4235
+ },
4236
+ "idleMs": {
4237
+ "type": "number"
4238
+ },
4239
+ "workdir": {
4240
+ "type": "string"
4241
+ },
4242
+ "unreadMail": {
4243
+ "type": "integer",
4244
+ "minimum": 0
4245
+ }
4246
+ },
4247
+ "required": [
4248
+ "id",
4249
+ "projectRoot",
4250
+ "agent",
4251
+ "runtime",
4252
+ "model",
4253
+ "mode",
4254
+ "thinking",
4255
+ "workflow",
4256
+ "threadId",
4257
+ "persistent",
4258
+ "busy",
4259
+ "state",
4260
+ "idleMs",
4261
+ "workdir",
4262
+ "unreadMail"
4263
+ ],
4264
+ "additionalProperties": true
4265
+ }
4266
+ },
4267
+ "assignments": {
4268
+ "type": "array",
4269
+ "items": {
4270
+ "type": "object",
4271
+ "properties": {
4272
+ "id": {
4273
+ "type": "string"
4274
+ },
4275
+ "requester": {
4276
+ "type": "string"
4277
+ },
4278
+ "isolation": {
4279
+ "enum": [
4280
+ "shared",
4281
+ "worktree"
4282
+ ]
4283
+ },
4284
+ "idleMs": {
4285
+ "type": "number"
4286
+ }
4287
+ },
4288
+ "required": [
4289
+ "id",
4290
+ "requester",
4291
+ "isolation",
4292
+ "idleMs"
4293
+ ],
4294
+ "additionalProperties": true
4295
+ }
4296
+ },
4297
+ "questions": {
4298
+ "type": "array",
4299
+ "items": {
4300
+ "$ref": "#/$defs/question"
4301
+ }
4302
+ },
4303
+ "worktrees": {
4304
+ "type": "array",
4305
+ "items": {
4306
+ "type": "object",
4307
+ "properties": {
4308
+ "assignmentId": {
4309
+ "type": "string"
4310
+ },
4311
+ "requester": {
4312
+ "type": "string"
4313
+ },
4314
+ "agent": {
4315
+ "type": "string"
4316
+ },
4317
+ "branch": {
4318
+ "type": "string"
4319
+ },
4320
+ "files": {
4321
+ "type": "array",
4322
+ "items": {
4323
+ "type": "string"
4324
+ }
4325
+ },
4326
+ "stat": {
4327
+ "type": "string"
4328
+ }
4329
+ },
4330
+ "required": [
4331
+ "assignmentId",
4332
+ "requester",
4333
+ "agent",
4334
+ "branch",
4335
+ "files",
4336
+ "stat"
4337
+ ],
4338
+ "additionalProperties": true
4339
+ }
4340
+ },
4341
+ "leases": {
4342
+ "type": "array",
4343
+ "items": {
4344
+ "type": "object",
4345
+ "properties": {
4346
+ "checkout": {
4347
+ "type": "string"
4348
+ },
4349
+ "assignmentId": {
4350
+ "type": "string"
4351
+ },
4352
+ "agent": {
4353
+ "type": "string"
4354
+ }
4355
+ },
4356
+ "required": [
4357
+ "checkout",
4358
+ "assignmentId",
4359
+ "agent"
4360
+ ],
4361
+ "additionalProperties": true
4362
+ }
4363
+ },
4364
+ "claims": {
4365
+ "type": "array",
4366
+ "items": {
4367
+ "$ref": "#/$defs/pin"
4368
+ }
4369
+ }
4370
+ },
4371
+ "required": [
4372
+ "rootId",
4373
+ "sessions",
4374
+ "assignments",
4375
+ "questions",
4376
+ "worktrees",
4377
+ "leases",
4378
+ "claims"
4379
+ ],
4380
+ "additionalProperties": true
4381
+ },
4382
+ "health": {
4383
+ "type": "object",
4384
+ "properties": {
4385
+ "live": {
4386
+ "type": "boolean"
4387
+ },
4388
+ "ready": {
4389
+ "type": "boolean"
4390
+ },
4391
+ "checks": {
4392
+ "type": "array",
4393
+ "items": {
4394
+ "type": "object",
4395
+ "properties": {
4396
+ "id": {
4397
+ "type": "string"
4398
+ },
4399
+ "ok": {
4400
+ "type": "boolean"
4401
+ },
4402
+ "code": {
4403
+ "type": "string"
4404
+ },
4405
+ "message": {
4406
+ "type": "string"
4407
+ }
4408
+ },
4409
+ "required": [
4410
+ "id",
4411
+ "ok"
4412
+ ],
4413
+ "additionalProperties": true
4414
+ }
4415
+ }
4416
+ },
4417
+ "required": [
4418
+ "live",
4419
+ "ready",
4420
+ "checks"
4421
+ ],
4422
+ "additionalProperties": true
4423
+ },
4424
+ "projectRoot": {
4425
+ "type": "string",
4426
+ "minLength": 1,
4427
+ "maxLength": 4096,
4428
+ "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."
4429
+ },
4430
+ "taskId": {
4431
+ "type": "string",
4432
+ "pattern": "^t-[0-9a-f]{4,12}(?:\\.\\d+)*$"
4433
+ },
4434
+ "taskRow": {
4435
+ "type": "object",
4436
+ "properties": {
4437
+ "id": {
4438
+ "$ref": "#/$defs/taskId"
4439
+ },
4440
+ "title": {
4441
+ "type": "string"
4442
+ },
4443
+ "type": {
4444
+ "type": "string"
4445
+ },
4446
+ "priority": {
4447
+ "type": "integer"
4448
+ },
4449
+ "status": {
4450
+ "enum": [
4451
+ "open",
4452
+ "in_progress",
4453
+ "review",
4454
+ "closed"
4455
+ ]
4456
+ },
4457
+ "rev": {
4458
+ "type": "integer",
4459
+ "minimum": 0
4460
+ },
4461
+ "parent": {
4462
+ "type": "string"
4463
+ },
4464
+ "assignee": {
4465
+ "type": "string"
4466
+ },
4467
+ "ready": {
4468
+ "type": "boolean"
4469
+ },
4470
+ "blockedBy": {
4471
+ "type": "array",
4472
+ "items": {
4473
+ "type": "string"
4474
+ }
4475
+ },
4476
+ "waits": {
4477
+ "type": "array",
4478
+ "items": {
4479
+ "type": "string"
4480
+ }
4481
+ },
4482
+ "approvals": {
4483
+ "type": "array",
4484
+ "items": {
4485
+ "type": "object",
4486
+ "properties": {
4487
+ "gate": {
4488
+ "type": "string"
4489
+ },
4490
+ "note": {
4491
+ "type": "string"
4492
+ }
4493
+ },
4494
+ "required": [
4495
+ "gate",
4496
+ "note"
4497
+ ],
4498
+ "additionalProperties": true
4499
+ }
4500
+ },
4501
+ "handoff": {
4502
+ "type": "object",
4503
+ "properties": {
4504
+ "outcome": {
4505
+ "type": "string"
4506
+ },
4507
+ "summary": {
4508
+ "type": "string"
4509
+ },
4510
+ "agent": {
4511
+ "type": "string"
4512
+ }
4513
+ },
4514
+ "required": [
4515
+ "outcome",
4516
+ "summary"
4517
+ ],
4518
+ "additionalProperties": true
4519
+ },
4520
+ "closed": {
4521
+ "type": "object",
4522
+ "properties": {
4523
+ "reason": {
4524
+ "type": "string"
4525
+ },
4526
+ "summary": {
4527
+ "type": "string"
4528
+ },
4529
+ "at": {
4530
+ "type": "string"
4531
+ }
4532
+ },
4533
+ "required": [
4534
+ "reason",
4535
+ "at"
4536
+ ],
4537
+ "additionalProperties": true
4538
+ },
4539
+ "description": {
4540
+ "type": "string"
4541
+ },
4542
+ "labels": {
4543
+ "type": "array",
4544
+ "items": {
4545
+ "type": "string"
4546
+ }
4547
+ },
4548
+ "paths": {
4549
+ "type": "array",
4550
+ "items": {
4551
+ "type": "string"
4552
+ }
4553
+ },
4554
+ "progress": {
4555
+ "type": "object",
4556
+ "properties": {
4557
+ "done": {
4558
+ "type": "integer",
4559
+ "minimum": 0
4560
+ },
4561
+ "total": {
4562
+ "type": "integer",
4563
+ "minimum": 0
4564
+ }
4565
+ },
4566
+ "required": [
4567
+ "done",
4568
+ "total"
4569
+ ],
4570
+ "additionalProperties": true
4571
+ },
4572
+ "createdAt": {
4573
+ "type": "string"
4574
+ },
4575
+ "updatedAt": {
4576
+ "type": "string"
4577
+ }
4578
+ },
4579
+ "required": [
4580
+ "id",
4581
+ "title",
4582
+ "type",
4583
+ "priority",
4584
+ "status",
4585
+ "rev",
4586
+ "ready",
4587
+ "updatedAt"
4588
+ ],
4589
+ "additionalProperties": true
4590
+ },
4591
+ "libraryKind": {
4592
+ "enum": [
4593
+ "agents",
4594
+ "skills",
4595
+ "mcp",
4596
+ "hooks",
4597
+ "teams",
4598
+ "providers"
4599
+ ]
4600
+ },
4601
+ "libraryScope": {
4602
+ "enum": [
4603
+ "library",
4604
+ "project"
4605
+ ]
4606
+ },
4607
+ "librarySource": {
4608
+ "enum": [
4609
+ "builtin",
4610
+ "library",
4611
+ "project"
4612
+ ]
4613
+ },
4614
+ "entryName": {
4615
+ "type": "string",
4616
+ "minLength": 1,
4617
+ "maxLength": 128,
4618
+ "pattern": "^[A-Za-z0-9_.-]+$",
4619
+ "not": {
4620
+ "enum": [
4621
+ ".",
4622
+ ".."
4623
+ ]
4624
+ }
4625
+ },
4626
+ "libraryRevision": {
4627
+ "type": [
4628
+ "string",
4629
+ "null"
4630
+ ]
4631
+ },
4632
+ "libraryEntryRow": {
4633
+ "type": "object",
4634
+ "properties": {
4635
+ "name": {
4636
+ "type": "string"
4637
+ },
4638
+ "source": {
4639
+ "$ref": "#/$defs/librarySource"
4640
+ },
4641
+ "overrides": {
4642
+ "$ref": "#/$defs/librarySource"
4643
+ },
4644
+ "description": {
4645
+ "type": "string"
4646
+ },
4647
+ "usedBy": {
4648
+ "type": "array",
4649
+ "items": {
4650
+ "type": "string"
4651
+ }
4652
+ }
4653
+ },
4654
+ "required": [
4655
+ "name",
4656
+ "source"
4657
+ ],
4658
+ "additionalProperties": true
4659
+ },
4660
+ "secretMarker": {
4661
+ "type": "object",
4662
+ "properties": {
4663
+ "$secret": {
4664
+ "const": "keep"
4665
+ }
4666
+ },
4667
+ "required": [
4668
+ "$secret"
4669
+ ],
4670
+ "additionalProperties": false,
4671
+ "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."
4672
+ },
4673
+ "languageSetting": {
4674
+ "type": "object",
4675
+ "properties": {
4676
+ "language": {
4677
+ "type": [
4678
+ "string",
4679
+ "null"
4680
+ ]
4681
+ },
4682
+ "applies": {
4683
+ "type": "string"
4684
+ },
4685
+ "default": {
4686
+ "type": "string"
4687
+ }
4688
+ },
4689
+ "required": [
4690
+ "language",
4691
+ "applies",
4692
+ "default"
4693
+ ],
4694
+ "additionalProperties": true
4695
+ },
4696
+ "teamRow": {
4697
+ "type": "object",
4698
+ "properties": {
4699
+ "id": {
4700
+ "type": "string"
4701
+ },
4702
+ "label": {
4703
+ "type": "string"
4704
+ },
4705
+ "description": {
4706
+ "type": "string"
4707
+ },
4708
+ "source": {
4709
+ "$ref": "#/$defs/librarySource"
4710
+ },
4711
+ "overrides": {
4712
+ "$ref": "#/$defs/librarySource"
4713
+ },
4714
+ "error": {
4715
+ "type": "string"
4716
+ }
4717
+ },
4718
+ "required": [
4719
+ "id",
4720
+ "source"
4721
+ ],
4722
+ "additionalProperties": true
4723
+ },
4724
+ "promptImage": {
4725
+ "type": "object",
4726
+ "properties": {
4727
+ "type": {
4728
+ "const": "image"
4729
+ },
4730
+ "mimeType": {
4731
+ "enum": [
4732
+ "image/png",
4733
+ "image/jpeg",
4734
+ "image/gif",
4735
+ "image/webp"
4736
+ ]
4737
+ },
4738
+ "data": {
4739
+ "type": "string",
4740
+ "minLength": 4,
4741
+ "maxLength": 6990508,
4742
+ "pattern": "^[A-Za-z0-9+/]+={0,2}$"
4743
+ },
4744
+ "name": {
4745
+ "type": "string",
4746
+ "maxLength": 255
4747
+ }
4748
+ },
4749
+ "required": [
4750
+ "type",
4751
+ "mimeType",
4752
+ "data"
4753
+ ],
4754
+ "additionalProperties": false
4755
+ }
4756
+ }
4757
+ }