@agent-phonon/protocol 0.2.0 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/package.json +1 -1
  2. package/dist/json-schema/_index.json +0 -3794
  3. package/dist/json-schema/connect.hello.json +0 -117
  4. package/dist/json-schema/discovery.changed.json +0 -190
  5. package/dist/json-schema/discovery.get.json +0 -183
  6. package/dist/json-schema/discovery.list.json +0 -182
  7. package/dist/json-schema/document.prepare_upload.json +0 -96
  8. package/dist/json-schema/document.send.json +0 -165
  9. package/dist/json-schema/hook.fired.json +0 -100
  10. package/dist/json-schema/hook.resolve.json +0 -96
  11. package/dist/json-schema/interaction.cancel.json +0 -48
  12. package/dist/json-schema/interaction.request.json +0 -376
  13. package/dist/json-schema/interaction.response.json +0 -68
  14. package/dist/json-schema/project.create.json +0 -89
  15. package/dist/json-schema/project.get.json +0 -76
  16. package/dist/json-schema/project.git.deleteBranch.json +0 -64
  17. package/dist/json-schema/project.list.json +0 -72
  18. package/dist/json-schema/project.remove.json +0 -69
  19. package/dist/json-schema/project.worktree.create.json +0 -88
  20. package/dist/json-schema/project.worktree.list.json +0 -77
  21. package/dist/json-schema/project.worktree.remove.json +0 -61
  22. package/dist/json-schema/session.compress.json +0 -72
  23. package/dist/json-schema/session.create.json +0 -128
  24. package/dist/json-schema/session.inject.json +0 -72
  25. package/dist/json-schema/session.interrupt.json +0 -58
  26. package/dist/json-schema/session.list.json +0 -127
  27. package/dist/json-schema/session.send.json +0 -132
  28. package/dist/json-schema/session.status.json +0 -94
  29. package/dist/json-schema/session.switchModel.json +0 -73
  30. package/dist/json-schema/session.terminate.json +0 -54
  31. package/dist/json-schema/skill.install.json +0 -171
  32. package/dist/json-schema/skill.list.json +0 -101
  33. package/dist/json-schema/skill.uninstall.json +0 -76
  34. package/dist/json-schema/stream.ack.json +0 -36
  35. package/dist/json-schema/stream.event.json +0 -381
@@ -1,3794 +0,0 @@
1
- {
2
- "connect.hello": {
3
- "direction": "p2s",
4
- "kind": "request",
5
- "params": {
6
- "$ref": "#/definitions/connect.hello.params",
7
- "definitions": {
8
- "connect.hello.params": {
9
- "type": "object",
10
- "properties": {
11
- "protocolVersion": {
12
- "type": "string"
13
- },
14
- "deviceId": {
15
- "type": "string",
16
- "minLength": 1
17
- },
18
- "phononVersion": {
19
- "type": "string"
20
- },
21
- "features": {
22
- "type": "array",
23
- "items": {
24
- "type": "string"
25
- },
26
- "default": []
27
- },
28
- "resumeFrom": {
29
- "type": "array",
30
- "items": {
31
- "type": "object",
32
- "properties": {
33
- "sessionId": {
34
- "type": "string"
35
- },
36
- "fromSeq": {
37
- "type": "integer",
38
- "minimum": 0
39
- }
40
- },
41
- "required": [
42
- "sessionId",
43
- "fromSeq"
44
- ],
45
- "additionalProperties": false
46
- }
47
- },
48
- "at": {
49
- "type": "string",
50
- "format": "date-time"
51
- }
52
- },
53
- "required": [
54
- "protocolVersion",
55
- "deviceId",
56
- "at"
57
- ],
58
- "additionalProperties": false
59
- }
60
- },
61
- "$schema": "http://json-schema.org/draft-07/schema#"
62
- },
63
- "result": {
64
- "$ref": "#/definitions/connect.hello.result",
65
- "definitions": {
66
- "connect.hello.result": {
67
- "type": "object",
68
- "properties": {
69
- "protocolVersion": {
70
- "type": "string"
71
- },
72
- "tenantId": {
73
- "type": "string",
74
- "minLength": 1
75
- },
76
- "features": {
77
- "type": "array",
78
- "items": {
79
- "type": "string"
80
- },
81
- "default": []
82
- },
83
- "ackedSeqs": {
84
- "type": "array",
85
- "items": {
86
- "type": "object",
87
- "properties": {
88
- "sessionId": {
89
- "type": "string"
90
- },
91
- "lastSeq": {
92
- "type": "integer",
93
- "minimum": 0
94
- }
95
- },
96
- "required": [
97
- "sessionId",
98
- "lastSeq"
99
- ],
100
- "additionalProperties": false
101
- }
102
- },
103
- "at": {
104
- "type": "string",
105
- "format": "date-time"
106
- }
107
- },
108
- "required": [
109
- "protocolVersion",
110
- "tenantId",
111
- "at"
112
- ],
113
- "additionalProperties": false
114
- }
115
- },
116
- "$schema": "http://json-schema.org/draft-07/schema#"
117
- }
118
- },
119
- "discovery.list": {
120
- "direction": "s2p",
121
- "kind": "request",
122
- "params": {
123
- "$ref": "#/definitions/discovery.list.params",
124
- "definitions": {
125
- "discovery.list.params": {
126
- "type": "object",
127
- "properties": {
128
- "availableOnly": {
129
- "type": "boolean"
130
- }
131
- },
132
- "additionalProperties": false
133
- }
134
- },
135
- "$schema": "http://json-schema.org/draft-07/schema#"
136
- },
137
- "result": {
138
- "$ref": "#/definitions/discovery.list.result",
139
- "definitions": {
140
- "discovery.list.result": {
141
- "type": "object",
142
- "properties": {
143
- "agents": {
144
- "type": "array",
145
- "items": {
146
- "type": "object",
147
- "properties": {
148
- "agentId": {
149
- "type": "string",
150
- "minLength": 1
151
- },
152
- "displayName": {
153
- "type": "string",
154
- "minLength": 1
155
- },
156
- "adapter": {
157
- "type": "string",
158
- "minLength": 1
159
- },
160
- "available": {
161
- "type": "boolean"
162
- },
163
- "unavailableReason": {
164
- "type": "string"
165
- },
166
- "version": {
167
- "type": "string"
168
- },
169
- "models": {
170
- "type": "array",
171
- "items": {
172
- "type": "object",
173
- "properties": {
174
- "id": {
175
- "type": "string",
176
- "minLength": 1
177
- },
178
- "displayName": {
179
- "type": "string"
180
- },
181
- "contextWindow": {
182
- "type": "integer",
183
- "exclusiveMinimum": 0
184
- },
185
- "available": {
186
- "type": "boolean",
187
- "default": true
188
- }
189
- },
190
- "required": [
191
- "id"
192
- ],
193
- "additionalProperties": false
194
- }
195
- },
196
- "capabilities": {
197
- "type": "object",
198
- "properties": {
199
- "nativeSession": {
200
- "type": "boolean"
201
- },
202
- "nativeCompression": {
203
- "type": "boolean"
204
- },
205
- "contextInjection": {
206
- "type": "boolean"
207
- },
208
- "proactiveOutput": {
209
- "type": "boolean"
210
- },
211
- "modelSwitch": {
212
- "type": "boolean"
213
- },
214
- "interrupt": {
215
- "type": "boolean"
216
- },
217
- "injectMidTurn": {
218
- "type": "boolean"
219
- },
220
- "skillManagement": {
221
- "type": "boolean"
222
- },
223
- "hooks": {
224
- "type": "array",
225
- "items": {
226
- "type": "string",
227
- "enum": [
228
- "pre_tool",
229
- "post_tool",
230
- "pre_command",
231
- "pre_file_write",
232
- "pre_network",
233
- "session_start",
234
- "session_end",
235
- "notification"
236
- ]
237
- }
238
- },
239
- "streaming": {
240
- "type": "boolean"
241
- },
242
- "limits": {
243
- "type": "object",
244
- "properties": {
245
- "maxConcurrentSessions": {
246
- "type": "integer",
247
- "exclusiveMinimum": 0
248
- },
249
- "maxContextTokens": {
250
- "type": "integer",
251
- "exclusiveMinimum": 0
252
- },
253
- "maxMessageBytes": {
254
- "type": "integer",
255
- "exclusiveMinimum": 0
256
- }
257
- },
258
- "additionalProperties": false
259
- }
260
- },
261
- "required": [
262
- "nativeSession",
263
- "nativeCompression",
264
- "contextInjection",
265
- "proactiveOutput",
266
- "modelSwitch",
267
- "interrupt",
268
- "injectMidTurn",
269
- "skillManagement",
270
- "hooks",
271
- "streaming"
272
- ],
273
- "additionalProperties": false
274
- },
275
- "scannedAt": {
276
- "type": "string",
277
- "format": "date-time"
278
- }
279
- },
280
- "required": [
281
- "agentId",
282
- "displayName",
283
- "adapter",
284
- "available",
285
- "models",
286
- "capabilities"
287
- ],
288
- "additionalProperties": false
289
- }
290
- }
291
- },
292
- "required": [
293
- "agents"
294
- ],
295
- "additionalProperties": false
296
- }
297
- },
298
- "$schema": "http://json-schema.org/draft-07/schema#"
299
- }
300
- },
301
- "discovery.get": {
302
- "direction": "s2p",
303
- "kind": "request",
304
- "params": {
305
- "$ref": "#/definitions/discovery.get.params",
306
- "definitions": {
307
- "discovery.get.params": {
308
- "type": "object",
309
- "properties": {
310
- "agentId": {
311
- "type": "string",
312
- "minLength": 1
313
- }
314
- },
315
- "required": [
316
- "agentId"
317
- ],
318
- "additionalProperties": false
319
- }
320
- },
321
- "$schema": "http://json-schema.org/draft-07/schema#"
322
- },
323
- "result": {
324
- "$ref": "#/definitions/discovery.get.result",
325
- "definitions": {
326
- "discovery.get.result": {
327
- "type": "object",
328
- "properties": {
329
- "agent": {
330
- "type": "object",
331
- "properties": {
332
- "agentId": {
333
- "type": "string",
334
- "minLength": 1
335
- },
336
- "displayName": {
337
- "type": "string",
338
- "minLength": 1
339
- },
340
- "adapter": {
341
- "type": "string",
342
- "minLength": 1
343
- },
344
- "available": {
345
- "type": "boolean"
346
- },
347
- "unavailableReason": {
348
- "type": "string"
349
- },
350
- "version": {
351
- "type": "string"
352
- },
353
- "models": {
354
- "type": "array",
355
- "items": {
356
- "type": "object",
357
- "properties": {
358
- "id": {
359
- "type": "string",
360
- "minLength": 1
361
- },
362
- "displayName": {
363
- "type": "string"
364
- },
365
- "contextWindow": {
366
- "type": "integer",
367
- "exclusiveMinimum": 0
368
- },
369
- "available": {
370
- "type": "boolean",
371
- "default": true
372
- }
373
- },
374
- "required": [
375
- "id"
376
- ],
377
- "additionalProperties": false
378
- }
379
- },
380
- "capabilities": {
381
- "type": "object",
382
- "properties": {
383
- "nativeSession": {
384
- "type": "boolean"
385
- },
386
- "nativeCompression": {
387
- "type": "boolean"
388
- },
389
- "contextInjection": {
390
- "type": "boolean"
391
- },
392
- "proactiveOutput": {
393
- "type": "boolean"
394
- },
395
- "modelSwitch": {
396
- "type": "boolean"
397
- },
398
- "interrupt": {
399
- "type": "boolean"
400
- },
401
- "injectMidTurn": {
402
- "type": "boolean"
403
- },
404
- "skillManagement": {
405
- "type": "boolean"
406
- },
407
- "hooks": {
408
- "type": "array",
409
- "items": {
410
- "type": "string",
411
- "enum": [
412
- "pre_tool",
413
- "post_tool",
414
- "pre_command",
415
- "pre_file_write",
416
- "pre_network",
417
- "session_start",
418
- "session_end",
419
- "notification"
420
- ]
421
- }
422
- },
423
- "streaming": {
424
- "type": "boolean"
425
- },
426
- "limits": {
427
- "type": "object",
428
- "properties": {
429
- "maxConcurrentSessions": {
430
- "type": "integer",
431
- "exclusiveMinimum": 0
432
- },
433
- "maxContextTokens": {
434
- "type": "integer",
435
- "exclusiveMinimum": 0
436
- },
437
- "maxMessageBytes": {
438
- "type": "integer",
439
- "exclusiveMinimum": 0
440
- }
441
- },
442
- "additionalProperties": false
443
- }
444
- },
445
- "required": [
446
- "nativeSession",
447
- "nativeCompression",
448
- "contextInjection",
449
- "proactiveOutput",
450
- "modelSwitch",
451
- "interrupt",
452
- "injectMidTurn",
453
- "skillManagement",
454
- "hooks",
455
- "streaming"
456
- ],
457
- "additionalProperties": false
458
- },
459
- "scannedAt": {
460
- "type": "string",
461
- "format": "date-time"
462
- }
463
- },
464
- "required": [
465
- "agentId",
466
- "displayName",
467
- "adapter",
468
- "available",
469
- "models",
470
- "capabilities"
471
- ],
472
- "additionalProperties": false
473
- }
474
- },
475
- "required": [
476
- "agent"
477
- ],
478
- "additionalProperties": false
479
- }
480
- },
481
- "$schema": "http://json-schema.org/draft-07/schema#"
482
- }
483
- },
484
- "discovery.changed": {
485
- "direction": "p2s",
486
- "kind": "notification",
487
- "params": {
488
- "$ref": "#/definitions/discovery.changed.params",
489
- "definitions": {
490
- "discovery.changed.params": {
491
- "type": "object",
492
- "properties": {
493
- "kind": {
494
- "type": "string",
495
- "enum": [
496
- "agent_added",
497
- "agent_removed",
498
- "agent_updated",
499
- "models_changed"
500
- ]
501
- },
502
- "agentId": {
503
- "type": "string",
504
- "minLength": 1
505
- },
506
- "snapshot": {
507
- "type": "object",
508
- "properties": {
509
- "agentId": {
510
- "$ref": "#/definitions/discovery.changed.params/properties/agentId"
511
- },
512
- "displayName": {
513
- "type": "string",
514
- "minLength": 1
515
- },
516
- "adapter": {
517
- "type": "string",
518
- "minLength": 1
519
- },
520
- "available": {
521
- "type": "boolean"
522
- },
523
- "unavailableReason": {
524
- "type": "string"
525
- },
526
- "version": {
527
- "type": "string"
528
- },
529
- "models": {
530
- "type": "array",
531
- "items": {
532
- "type": "object",
533
- "properties": {
534
- "id": {
535
- "type": "string",
536
- "minLength": 1
537
- },
538
- "displayName": {
539
- "type": "string"
540
- },
541
- "contextWindow": {
542
- "type": "integer",
543
- "exclusiveMinimum": 0
544
- },
545
- "available": {
546
- "type": "boolean",
547
- "default": true
548
- }
549
- },
550
- "required": [
551
- "id"
552
- ],
553
- "additionalProperties": false
554
- }
555
- },
556
- "capabilities": {
557
- "type": "object",
558
- "properties": {
559
- "nativeSession": {
560
- "type": "boolean"
561
- },
562
- "nativeCompression": {
563
- "type": "boolean"
564
- },
565
- "contextInjection": {
566
- "type": "boolean"
567
- },
568
- "proactiveOutput": {
569
- "type": "boolean"
570
- },
571
- "modelSwitch": {
572
- "type": "boolean"
573
- },
574
- "interrupt": {
575
- "type": "boolean"
576
- },
577
- "injectMidTurn": {
578
- "type": "boolean"
579
- },
580
- "skillManagement": {
581
- "type": "boolean"
582
- },
583
- "hooks": {
584
- "type": "array",
585
- "items": {
586
- "type": "string",
587
- "enum": [
588
- "pre_tool",
589
- "post_tool",
590
- "pre_command",
591
- "pre_file_write",
592
- "pre_network",
593
- "session_start",
594
- "session_end",
595
- "notification"
596
- ]
597
- }
598
- },
599
- "streaming": {
600
- "type": "boolean"
601
- },
602
- "limits": {
603
- "type": "object",
604
- "properties": {
605
- "maxConcurrentSessions": {
606
- "type": "integer",
607
- "exclusiveMinimum": 0
608
- },
609
- "maxContextTokens": {
610
- "type": "integer",
611
- "exclusiveMinimum": 0
612
- },
613
- "maxMessageBytes": {
614
- "type": "integer",
615
- "exclusiveMinimum": 0
616
- }
617
- },
618
- "additionalProperties": false
619
- }
620
- },
621
- "required": [
622
- "nativeSession",
623
- "nativeCompression",
624
- "contextInjection",
625
- "proactiveOutput",
626
- "modelSwitch",
627
- "interrupt",
628
- "injectMidTurn",
629
- "skillManagement",
630
- "hooks",
631
- "streaming"
632
- ],
633
- "additionalProperties": false
634
- },
635
- "scannedAt": {
636
- "type": "string",
637
- "format": "date-time"
638
- }
639
- },
640
- "required": [
641
- "agentId",
642
- "displayName",
643
- "adapter",
644
- "available",
645
- "models",
646
- "capabilities"
647
- ],
648
- "additionalProperties": false
649
- },
650
- "at": {
651
- "$ref": "#/definitions/discovery.changed.params/properties/snapshot/properties/scannedAt"
652
- }
653
- },
654
- "required": [
655
- "kind",
656
- "agentId",
657
- "at"
658
- ],
659
- "additionalProperties": false
660
- }
661
- },
662
- "$schema": "http://json-schema.org/draft-07/schema#"
663
- },
664
- "result": {
665
- "$ref": "#/definitions/discovery.changed.result",
666
- "definitions": {
667
- "discovery.changed.result": {
668
- "not": {}
669
- }
670
- },
671
- "$schema": "http://json-schema.org/draft-07/schema#"
672
- }
673
- },
674
- "session.create": {
675
- "direction": "s2p",
676
- "kind": "request",
677
- "params": {
678
- "$ref": "#/definitions/session.create.params",
679
- "definitions": {
680
- "session.create.params": {
681
- "type": "object",
682
- "properties": {
683
- "clientRequestId": {
684
- "type": "string"
685
- },
686
- "project": {
687
- "type": "string",
688
- "minLength": 1
689
- },
690
- "worktreeId": {
691
- "type": "string"
692
- },
693
- "agent": {
694
- "type": "string",
695
- "minLength": 1
696
- },
697
- "model": {
698
- "type": "string",
699
- "minLength": 1
700
- },
701
- "agentConfig": {
702
- "type": "object",
703
- "additionalProperties": {}
704
- },
705
- "initialContext": {
706
- "type": "array",
707
- "items": {
708
- "type": "object",
709
- "properties": {
710
- "role": {
711
- "type": "string",
712
- "enum": [
713
- "system",
714
- "user",
715
- "assistant"
716
- ]
717
- },
718
- "content": {
719
- "type": "string"
720
- }
721
- },
722
- "required": [
723
- "role",
724
- "content"
725
- ],
726
- "additionalProperties": false
727
- }
728
- },
729
- "verbosity": {
730
- "type": "string",
731
- "enum": [
732
- "final",
733
- "messages",
734
- "tools",
735
- "trace"
736
- ],
737
- "default": "messages"
738
- },
739
- "clientTag": {
740
- "type": "string"
741
- }
742
- },
743
- "required": [
744
- "project",
745
- "agent",
746
- "model"
747
- ],
748
- "additionalProperties": false
749
- }
750
- },
751
- "$schema": "http://json-schema.org/draft-07/schema#"
752
- },
753
- "result": {
754
- "$ref": "#/definitions/session.create.result",
755
- "definitions": {
756
- "session.create.result": {
757
- "type": "object",
758
- "properties": {
759
- "sessionId": {
760
- "type": "string",
761
- "minLength": 1
762
- },
763
- "project": {
764
- "type": "string",
765
- "minLength": 1
766
- },
767
- "agent": {
768
- "type": "string",
769
- "minLength": 1
770
- },
771
- "model": {
772
- "type": "string"
773
- },
774
- "status": {
775
- "type": "string",
776
- "enum": [
777
- "idle",
778
- "running",
779
- "paused",
780
- "terminated"
781
- ]
782
- },
783
- "createdAt": {
784
- "type": "string",
785
- "format": "date-time"
786
- }
787
- },
788
- "required": [
789
- "sessionId",
790
- "project",
791
- "agent",
792
- "model",
793
- "status",
794
- "createdAt"
795
- ],
796
- "additionalProperties": false
797
- }
798
- },
799
- "$schema": "http://json-schema.org/draft-07/schema#"
800
- }
801
- },
802
- "session.send": {
803
- "direction": "s2p",
804
- "kind": "request",
805
- "params": {
806
- "$ref": "#/definitions/session.send.params",
807
- "definitions": {
808
- "session.send.params": {
809
- "type": "object",
810
- "properties": {
811
- "sessionId": {
812
- "type": "string",
813
- "minLength": 1
814
- },
815
- "input": {
816
- "type": "string"
817
- },
818
- "clientRequestId": {
819
- "type": "string"
820
- },
821
- "skills": {
822
- "type": "array",
823
- "items": {
824
- "anyOf": [
825
- {
826
- "type": "string"
827
- },
828
- {
829
- "type": "object",
830
- "properties": {
831
- "name": {
832
- "type": "string",
833
- "minLength": 1
834
- },
835
- "version": {
836
- "type": "string"
837
- },
838
- "scope": {
839
- "type": "string",
840
- "enum": [
841
- "global",
842
- "project"
843
- ]
844
- },
845
- "force": {
846
- "type": "boolean"
847
- }
848
- },
849
- "required": [
850
- "name"
851
- ],
852
- "additionalProperties": false
853
- }
854
- ]
855
- }
856
- },
857
- "verbosity": {
858
- "type": "string",
859
- "enum": [
860
- "final",
861
- "messages",
862
- "tools",
863
- "trace"
864
- ]
865
- },
866
- "whenBusy": {
867
- "type": "string",
868
- "enum": [
869
- "queue",
870
- "interrupt",
871
- "inject"
872
- ],
873
- "default": "queue"
874
- },
875
- "fallback": {
876
- "$ref": "#/definitions/session.send.params/properties/whenBusy"
877
- },
878
- "turnId": {
879
- "type": "string"
880
- }
881
- },
882
- "required": [
883
- "sessionId",
884
- "input"
885
- ],
886
- "additionalProperties": false
887
- }
888
- },
889
- "$schema": "http://json-schema.org/draft-07/schema#"
890
- },
891
- "result": {
892
- "$ref": "#/definitions/session.send.result",
893
- "definitions": {
894
- "session.send.result": {
895
- "type": "object",
896
- "properties": {
897
- "sessionId": {
898
- "type": "string",
899
- "minLength": 1
900
- },
901
- "turnId": {
902
- "type": "string"
903
- },
904
- "accepted": {
905
- "type": "boolean",
906
- "const": true
907
- },
908
- "disposition": {
909
- "type": "string",
910
- "enum": [
911
- "started",
912
- "queued",
913
- "interrupted",
914
- "injected"
915
- ]
916
- },
917
- "queuePosition": {
918
- "type": "integer",
919
- "exclusiveMinimum": 0
920
- }
921
- },
922
- "required": [
923
- "sessionId",
924
- "turnId",
925
- "accepted",
926
- "disposition"
927
- ],
928
- "additionalProperties": false
929
- }
930
- },
931
- "$schema": "http://json-schema.org/draft-07/schema#"
932
- }
933
- },
934
- "session.inject": {
935
- "direction": "s2p",
936
- "kind": "request",
937
- "params": {
938
- "$ref": "#/definitions/session.inject.params",
939
- "definitions": {
940
- "session.inject.params": {
941
- "type": "object",
942
- "properties": {
943
- "sessionId": {
944
- "type": "string",
945
- "minLength": 1
946
- },
947
- "context": {
948
- "type": "array",
949
- "items": {
950
- "type": "object",
951
- "properties": {
952
- "role": {
953
- "type": "string",
954
- "enum": [
955
- "system",
956
- "user",
957
- "assistant"
958
- ]
959
- },
960
- "content": {
961
- "type": "string"
962
- }
963
- },
964
- "required": [
965
- "role",
966
- "content"
967
- ],
968
- "additionalProperties": false
969
- }
970
- }
971
- },
972
- "required": [
973
- "sessionId",
974
- "context"
975
- ],
976
- "additionalProperties": false
977
- }
978
- },
979
- "$schema": "http://json-schema.org/draft-07/schema#"
980
- },
981
- "result": {
982
- "$ref": "#/definitions/session.inject.result",
983
- "definitions": {
984
- "session.inject.result": {
985
- "type": "object",
986
- "properties": {
987
- "sessionId": {
988
- "type": "string",
989
- "minLength": 1
990
- },
991
- "injected": {
992
- "type": "integer",
993
- "minimum": 0
994
- }
995
- },
996
- "required": [
997
- "sessionId",
998
- "injected"
999
- ],
1000
- "additionalProperties": false
1001
- }
1002
- },
1003
- "$schema": "http://json-schema.org/draft-07/schema#"
1004
- }
1005
- },
1006
- "session.compress": {
1007
- "direction": "s2p",
1008
- "kind": "request",
1009
- "params": {
1010
- "$ref": "#/definitions/session.compress.params",
1011
- "definitions": {
1012
- "session.compress.params": {
1013
- "type": "object",
1014
- "properties": {
1015
- "sessionId": {
1016
- "type": "string",
1017
- "minLength": 1
1018
- },
1019
- "mode": {
1020
- "type": "string",
1021
- "enum": [
1022
- "native",
1023
- "custom"
1024
- ]
1025
- },
1026
- "strategy": {
1027
- "type": "string"
1028
- }
1029
- },
1030
- "required": [
1031
- "sessionId",
1032
- "mode"
1033
- ],
1034
- "additionalProperties": false
1035
- }
1036
- },
1037
- "$schema": "http://json-schema.org/draft-07/schema#"
1038
- },
1039
- "result": {
1040
- "$ref": "#/definitions/session.compress.result",
1041
- "definitions": {
1042
- "session.compress.result": {
1043
- "type": "object",
1044
- "properties": {
1045
- "sessionId": {
1046
- "type": "string",
1047
- "minLength": 1
1048
- },
1049
- "mode": {
1050
- "type": "string",
1051
- "enum": [
1052
- "native",
1053
- "custom"
1054
- ]
1055
- },
1056
- "tokensBefore": {
1057
- "type": "integer",
1058
- "minimum": 0
1059
- },
1060
- "tokensAfter": {
1061
- "type": "integer",
1062
- "minimum": 0
1063
- },
1064
- "summary": {
1065
- "type": "string"
1066
- }
1067
- },
1068
- "required": [
1069
- "sessionId",
1070
- "mode"
1071
- ],
1072
- "additionalProperties": false
1073
- }
1074
- },
1075
- "$schema": "http://json-schema.org/draft-07/schema#"
1076
- }
1077
- },
1078
- "session.switchModel": {
1079
- "direction": "s2p",
1080
- "kind": "request",
1081
- "params": {
1082
- "$ref": "#/definitions/session.switchModel.params",
1083
- "definitions": {
1084
- "session.switchModel.params": {
1085
- "type": "object",
1086
- "properties": {
1087
- "sessionId": {
1088
- "type": "string",
1089
- "minLength": 1
1090
- },
1091
- "model": {
1092
- "type": "string",
1093
- "minLength": 1
1094
- },
1095
- "whenRunning": {
1096
- "type": "string",
1097
- "enum": [
1098
- "reject",
1099
- "afterCurrentTurn",
1100
- "interrupt"
1101
- ],
1102
- "default": "reject"
1103
- }
1104
- },
1105
- "required": [
1106
- "sessionId",
1107
- "model"
1108
- ],
1109
- "additionalProperties": false
1110
- }
1111
- },
1112
- "$schema": "http://json-schema.org/draft-07/schema#"
1113
- },
1114
- "result": {
1115
- "$ref": "#/definitions/session.switchModel.result",
1116
- "definitions": {
1117
- "session.switchModel.result": {
1118
- "type": "object",
1119
- "properties": {
1120
- "sessionId": {
1121
- "type": "string",
1122
- "minLength": 1
1123
- },
1124
- "previousModel": {
1125
- "type": "string"
1126
- },
1127
- "model": {
1128
- "type": "string"
1129
- },
1130
- "warnings": {
1131
- "type": "array",
1132
- "items": {
1133
- "type": "string"
1134
- }
1135
- },
1136
- "deferred": {
1137
- "type": "boolean"
1138
- }
1139
- },
1140
- "required": [
1141
- "sessionId",
1142
- "previousModel",
1143
- "model"
1144
- ],
1145
- "additionalProperties": false
1146
- }
1147
- },
1148
- "$schema": "http://json-schema.org/draft-07/schema#"
1149
- }
1150
- },
1151
- "session.interrupt": {
1152
- "direction": "s2p",
1153
- "kind": "request",
1154
- "params": {
1155
- "$ref": "#/definitions/session.interrupt.params",
1156
- "definitions": {
1157
- "session.interrupt.params": {
1158
- "type": "object",
1159
- "properties": {
1160
- "sessionId": {
1161
- "type": "string",
1162
- "minLength": 1
1163
- },
1164
- "reason": {
1165
- "type": "string"
1166
- }
1167
- },
1168
- "required": [
1169
- "sessionId"
1170
- ],
1171
- "additionalProperties": false
1172
- }
1173
- },
1174
- "$schema": "http://json-schema.org/draft-07/schema#"
1175
- },
1176
- "result": {
1177
- "$ref": "#/definitions/session.interrupt.result",
1178
- "definitions": {
1179
- "session.interrupt.result": {
1180
- "type": "object",
1181
- "properties": {
1182
- "sessionId": {
1183
- "type": "string",
1184
- "minLength": 1
1185
- },
1186
- "interruptedTurnId": {
1187
- "type": "string"
1188
- },
1189
- "status": {
1190
- "type": "string",
1191
- "enum": [
1192
- "idle",
1193
- "running",
1194
- "paused",
1195
- "terminated"
1196
- ]
1197
- }
1198
- },
1199
- "required": [
1200
- "sessionId",
1201
- "status"
1202
- ],
1203
- "additionalProperties": false
1204
- }
1205
- },
1206
- "$schema": "http://json-schema.org/draft-07/schema#"
1207
- }
1208
- },
1209
- "session.terminate": {
1210
- "direction": "s2p",
1211
- "kind": "request",
1212
- "params": {
1213
- "$ref": "#/definitions/session.terminate.params",
1214
- "definitions": {
1215
- "session.terminate.params": {
1216
- "type": "object",
1217
- "properties": {
1218
- "sessionId": {
1219
- "type": "string",
1220
- "minLength": 1
1221
- },
1222
- "cleanWorktree": {
1223
- "type": "boolean",
1224
- "default": false
1225
- }
1226
- },
1227
- "required": [
1228
- "sessionId"
1229
- ],
1230
- "additionalProperties": false
1231
- }
1232
- },
1233
- "$schema": "http://json-schema.org/draft-07/schema#"
1234
- },
1235
- "result": {
1236
- "$ref": "#/definitions/session.terminate.result",
1237
- "definitions": {
1238
- "session.terminate.result": {
1239
- "type": "object",
1240
- "properties": {
1241
- "sessionId": {
1242
- "type": "string",
1243
- "minLength": 1
1244
- },
1245
- "status": {
1246
- "type": "string",
1247
- "const": "terminated"
1248
- },
1249
- "cleanedWorktreeId": {
1250
- "type": "string"
1251
- }
1252
- },
1253
- "required": [
1254
- "sessionId",
1255
- "status"
1256
- ],
1257
- "additionalProperties": false
1258
- }
1259
- },
1260
- "$schema": "http://json-schema.org/draft-07/schema#"
1261
- }
1262
- },
1263
- "session.status": {
1264
- "direction": "s2p",
1265
- "kind": "request",
1266
- "params": {
1267
- "$ref": "#/definitions/session.status.params",
1268
- "definitions": {
1269
- "session.status.params": {
1270
- "type": "object",
1271
- "properties": {
1272
- "sessionId": {
1273
- "type": "string",
1274
- "minLength": 1
1275
- }
1276
- },
1277
- "required": [
1278
- "sessionId"
1279
- ],
1280
- "additionalProperties": false
1281
- }
1282
- },
1283
- "$schema": "http://json-schema.org/draft-07/schema#"
1284
- },
1285
- "result": {
1286
- "$ref": "#/definitions/session.status.result",
1287
- "definitions": {
1288
- "session.status.result": {
1289
- "type": "object",
1290
- "properties": {
1291
- "sessionId": {
1292
- "type": "string",
1293
- "minLength": 1
1294
- },
1295
- "project": {
1296
- "type": "string",
1297
- "minLength": 1
1298
- },
1299
- "agent": {
1300
- "type": "string",
1301
- "minLength": 1
1302
- },
1303
- "model": {
1304
- "type": "string"
1305
- },
1306
- "status": {
1307
- "type": "string",
1308
- "enum": [
1309
- "idle",
1310
- "running",
1311
- "paused",
1312
- "terminated"
1313
- ]
1314
- },
1315
- "currentTurnId": {
1316
- "type": "string"
1317
- },
1318
- "queuedCount": {
1319
- "type": "integer",
1320
- "minimum": 0
1321
- },
1322
- "verbosity": {
1323
- "type": "string",
1324
- "enum": [
1325
- "final",
1326
- "messages",
1327
- "tools",
1328
- "trace"
1329
- ]
1330
- },
1331
- "clientTag": {
1332
- "type": "string"
1333
- },
1334
- "createdAt": {
1335
- "type": "string",
1336
- "format": "date-time"
1337
- },
1338
- "lastActiveAt": {
1339
- "$ref": "#/definitions/session.status.result/properties/createdAt"
1340
- }
1341
- },
1342
- "required": [
1343
- "sessionId",
1344
- "project",
1345
- "agent",
1346
- "model",
1347
- "status",
1348
- "verbosity",
1349
- "createdAt"
1350
- ],
1351
- "additionalProperties": false
1352
- }
1353
- },
1354
- "$schema": "http://json-schema.org/draft-07/schema#"
1355
- }
1356
- },
1357
- "session.list": {
1358
- "direction": "s2p",
1359
- "kind": "request",
1360
- "params": {
1361
- "$ref": "#/definitions/session.list.params",
1362
- "definitions": {
1363
- "session.list.params": {
1364
- "type": "object",
1365
- "properties": {
1366
- "project": {
1367
- "type": "string",
1368
- "minLength": 1
1369
- },
1370
- "agent": {
1371
- "type": "string",
1372
- "minLength": 1
1373
- },
1374
- "status": {
1375
- "type": "string",
1376
- "enum": [
1377
- "idle",
1378
- "running",
1379
- "paused",
1380
- "terminated"
1381
- ]
1382
- },
1383
- "limit": {
1384
- "type": "integer",
1385
- "exclusiveMinimum": 0,
1386
- "maximum": 500
1387
- },
1388
- "cursor": {
1389
- "type": "string"
1390
- }
1391
- },
1392
- "additionalProperties": false
1393
- }
1394
- },
1395
- "$schema": "http://json-schema.org/draft-07/schema#"
1396
- },
1397
- "result": {
1398
- "$ref": "#/definitions/session.list.result",
1399
- "definitions": {
1400
- "session.list.result": {
1401
- "type": "object",
1402
- "properties": {
1403
- "sessions": {
1404
- "type": "array",
1405
- "items": {
1406
- "type": "object",
1407
- "properties": {
1408
- "sessionId": {
1409
- "type": "string",
1410
- "minLength": 1
1411
- },
1412
- "project": {
1413
- "type": "string",
1414
- "minLength": 1
1415
- },
1416
- "agent": {
1417
- "type": "string",
1418
- "minLength": 1
1419
- },
1420
- "model": {
1421
- "type": "string"
1422
- },
1423
- "status": {
1424
- "type": "string",
1425
- "enum": [
1426
- "idle",
1427
- "running",
1428
- "paused",
1429
- "terminated"
1430
- ]
1431
- },
1432
- "currentTurnId": {
1433
- "type": "string"
1434
- },
1435
- "queuedCount": {
1436
- "type": "integer",
1437
- "minimum": 0
1438
- },
1439
- "verbosity": {
1440
- "type": "string",
1441
- "enum": [
1442
- "final",
1443
- "messages",
1444
- "tools",
1445
- "trace"
1446
- ]
1447
- },
1448
- "clientTag": {
1449
- "type": "string"
1450
- },
1451
- "createdAt": {
1452
- "type": "string",
1453
- "format": "date-time"
1454
- },
1455
- "lastActiveAt": {
1456
- "$ref": "#/definitions/session.list.result/properties/sessions/items/properties/createdAt"
1457
- }
1458
- },
1459
- "required": [
1460
- "sessionId",
1461
- "project",
1462
- "agent",
1463
- "model",
1464
- "status",
1465
- "verbosity",
1466
- "createdAt"
1467
- ],
1468
- "additionalProperties": false
1469
- }
1470
- },
1471
- "nextCursor": {
1472
- "type": "string"
1473
- }
1474
- },
1475
- "required": [
1476
- "sessions"
1477
- ],
1478
- "additionalProperties": false
1479
- }
1480
- },
1481
- "$schema": "http://json-schema.org/draft-07/schema#"
1482
- }
1483
- },
1484
- "stream.event": {
1485
- "direction": "p2s",
1486
- "kind": "notification",
1487
- "params": {
1488
- "$ref": "#/definitions/stream.event.params",
1489
- "definitions": {
1490
- "stream.event.params": {
1491
- "anyOf": [
1492
- {
1493
- "type": "object",
1494
- "properties": {
1495
- "sessionId": {
1496
- "type": "string",
1497
- "minLength": 1
1498
- },
1499
- "turnId": {
1500
- "type": "string"
1501
- },
1502
- "origin": {
1503
- "type": "string",
1504
- "enum": [
1505
- "solicited",
1506
- "unsolicited"
1507
- ],
1508
- "default": "solicited"
1509
- },
1510
- "source": {
1511
- "type": "string"
1512
- },
1513
- "seq": {
1514
- "type": "integer",
1515
- "minimum": 0
1516
- },
1517
- "at": {
1518
- "type": "string",
1519
- "format": "date-time"
1520
- },
1521
- "type": {
1522
- "type": "string",
1523
- "const": "message"
1524
- },
1525
- "role": {
1526
- "type": "string",
1527
- "enum": [
1528
- "assistant",
1529
- "user",
1530
- "system"
1531
- ],
1532
- "default": "assistant"
1533
- },
1534
- "text": {
1535
- "type": "string"
1536
- },
1537
- "delta": {
1538
- "type": "boolean",
1539
- "default": false
1540
- }
1541
- },
1542
- "required": [
1543
- "sessionId",
1544
- "turnId",
1545
- "seq",
1546
- "at",
1547
- "type",
1548
- "text"
1549
- ],
1550
- "additionalProperties": false
1551
- },
1552
- {
1553
- "type": "object",
1554
- "properties": {
1555
- "sessionId": {
1556
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/sessionId"
1557
- },
1558
- "turnId": {
1559
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/turnId"
1560
- },
1561
- "origin": {
1562
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/origin"
1563
- },
1564
- "source": {
1565
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/source"
1566
- },
1567
- "seq": {
1568
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/seq"
1569
- },
1570
- "at": {
1571
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/at"
1572
- },
1573
- "type": {
1574
- "type": "string",
1575
- "const": "thinking"
1576
- },
1577
- "text": {
1578
- "type": "string"
1579
- },
1580
- "delta": {
1581
- "type": "boolean",
1582
- "default": false
1583
- }
1584
- },
1585
- "required": [
1586
- "sessionId",
1587
- "turnId",
1588
- "seq",
1589
- "at",
1590
- "type",
1591
- "text"
1592
- ],
1593
- "additionalProperties": false
1594
- },
1595
- {
1596
- "type": "object",
1597
- "properties": {
1598
- "sessionId": {
1599
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/sessionId"
1600
- },
1601
- "turnId": {
1602
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/turnId"
1603
- },
1604
- "origin": {
1605
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/origin"
1606
- },
1607
- "source": {
1608
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/source"
1609
- },
1610
- "seq": {
1611
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/seq"
1612
- },
1613
- "at": {
1614
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/at"
1615
- },
1616
- "type": {
1617
- "type": "string",
1618
- "const": "tool_call"
1619
- },
1620
- "toolName": {
1621
- "type": "string"
1622
- },
1623
- "args": {},
1624
- "toolCallId": {
1625
- "type": "string"
1626
- }
1627
- },
1628
- "required": [
1629
- "sessionId",
1630
- "turnId",
1631
- "seq",
1632
- "at",
1633
- "type",
1634
- "toolName"
1635
- ],
1636
- "additionalProperties": false
1637
- },
1638
- {
1639
- "type": "object",
1640
- "properties": {
1641
- "sessionId": {
1642
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/sessionId"
1643
- },
1644
- "turnId": {
1645
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/turnId"
1646
- },
1647
- "origin": {
1648
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/origin"
1649
- },
1650
- "source": {
1651
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/source"
1652
- },
1653
- "seq": {
1654
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/seq"
1655
- },
1656
- "at": {
1657
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/at"
1658
- },
1659
- "type": {
1660
- "type": "string",
1661
- "const": "tool_result"
1662
- },
1663
- "toolName": {
1664
- "type": "string"
1665
- },
1666
- "toolCallId": {
1667
- "type": "string"
1668
- },
1669
- "ok": {
1670
- "type": "boolean"
1671
- },
1672
- "output": {}
1673
- },
1674
- "required": [
1675
- "sessionId",
1676
- "turnId",
1677
- "seq",
1678
- "at",
1679
- "type",
1680
- "toolName",
1681
- "ok"
1682
- ],
1683
- "additionalProperties": false
1684
- },
1685
- {
1686
- "type": "object",
1687
- "properties": {
1688
- "sessionId": {
1689
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/sessionId"
1690
- },
1691
- "turnId": {
1692
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/turnId"
1693
- },
1694
- "origin": {
1695
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/origin"
1696
- },
1697
- "source": {
1698
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/source"
1699
- },
1700
- "seq": {
1701
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/seq"
1702
- },
1703
- "at": {
1704
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/at"
1705
- },
1706
- "type": {
1707
- "type": "string",
1708
- "const": "token"
1709
- },
1710
- "text": {
1711
- "type": "string"
1712
- }
1713
- },
1714
- "required": [
1715
- "sessionId",
1716
- "turnId",
1717
- "seq",
1718
- "at",
1719
- "type",
1720
- "text"
1721
- ],
1722
- "additionalProperties": false
1723
- },
1724
- {
1725
- "type": "object",
1726
- "properties": {
1727
- "sessionId": {
1728
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/sessionId"
1729
- },
1730
- "turnId": {
1731
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/turnId"
1732
- },
1733
- "origin": {
1734
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/origin"
1735
- },
1736
- "source": {
1737
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/source"
1738
- },
1739
- "seq": {
1740
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/seq"
1741
- },
1742
- "at": {
1743
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/at"
1744
- },
1745
- "type": {
1746
- "type": "string",
1747
- "const": "result"
1748
- },
1749
- "text": {
1750
- "type": "string"
1751
- },
1752
- "usage": {
1753
- "type": "object",
1754
- "properties": {
1755
- "inputTokens": {
1756
- "type": "integer",
1757
- "minimum": 0
1758
- },
1759
- "outputTokens": {
1760
- "type": "integer",
1761
- "minimum": 0
1762
- }
1763
- },
1764
- "additionalProperties": false
1765
- },
1766
- "status": {
1767
- "type": "string",
1768
- "enum": [
1769
- "completed",
1770
- "interrupted",
1771
- "aborted",
1772
- "failed",
1773
- "timeout"
1774
- ],
1775
- "default": "completed"
1776
- },
1777
- "final": {
1778
- "type": "boolean",
1779
- "const": true
1780
- }
1781
- },
1782
- "required": [
1783
- "sessionId",
1784
- "turnId",
1785
- "seq",
1786
- "at",
1787
- "type",
1788
- "text",
1789
- "final"
1790
- ],
1791
- "additionalProperties": false
1792
- },
1793
- {
1794
- "type": "object",
1795
- "properties": {
1796
- "sessionId": {
1797
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/sessionId"
1798
- },
1799
- "turnId": {
1800
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/turnId"
1801
- },
1802
- "origin": {
1803
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/origin"
1804
- },
1805
- "source": {
1806
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/source"
1807
- },
1808
- "seq": {
1809
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/seq"
1810
- },
1811
- "at": {
1812
- "$ref": "#/definitions/stream.event.params/anyOf/0/properties/at"
1813
- },
1814
- "type": {
1815
- "type": "string",
1816
- "const": "error"
1817
- },
1818
- "message": {
1819
- "type": "string"
1820
- },
1821
- "appCode": {
1822
- "type": "string"
1823
- },
1824
- "status": {
1825
- "type": "string",
1826
- "enum": [
1827
- "failed",
1828
- "aborted",
1829
- "timeout",
1830
- "interrupted"
1831
- ],
1832
- "default": "failed"
1833
- },
1834
- "final": {
1835
- "type": "boolean",
1836
- "const": true
1837
- }
1838
- },
1839
- "required": [
1840
- "sessionId",
1841
- "turnId",
1842
- "seq",
1843
- "at",
1844
- "type",
1845
- "message",
1846
- "final"
1847
- ],
1848
- "additionalProperties": false
1849
- }
1850
- ]
1851
- }
1852
- },
1853
- "$schema": "http://json-schema.org/draft-07/schema#"
1854
- },
1855
- "result": {
1856
- "$ref": "#/definitions/stream.event.result",
1857
- "definitions": {
1858
- "stream.event.result": {
1859
- "not": {}
1860
- }
1861
- },
1862
- "$schema": "http://json-schema.org/draft-07/schema#"
1863
- }
1864
- },
1865
- "stream.ack": {
1866
- "direction": "s2p",
1867
- "kind": "notification",
1868
- "params": {
1869
- "$ref": "#/definitions/stream.ack.params",
1870
- "definitions": {
1871
- "stream.ack.params": {
1872
- "type": "object",
1873
- "properties": {
1874
- "sessionId": {
1875
- "type": "string",
1876
- "minLength": 1
1877
- },
1878
- "lastSeq": {
1879
- "type": "integer",
1880
- "minimum": 0
1881
- }
1882
- },
1883
- "required": [
1884
- "lastSeq"
1885
- ],
1886
- "additionalProperties": false
1887
- }
1888
- },
1889
- "$schema": "http://json-schema.org/draft-07/schema#"
1890
- },
1891
- "result": {
1892
- "$ref": "#/definitions/stream.ack.result",
1893
- "definitions": {
1894
- "stream.ack.result": {
1895
- "not": {}
1896
- }
1897
- },
1898
- "$schema": "http://json-schema.org/draft-07/schema#"
1899
- }
1900
- },
1901
- "hook.fired": {
1902
- "direction": "p2s",
1903
- "kind": "request",
1904
- "params": {
1905
- "$ref": "#/definitions/hook.fired.params",
1906
- "definitions": {
1907
- "hook.fired.params": {
1908
- "type": "object",
1909
- "properties": {
1910
- "sessionId": {
1911
- "type": "string",
1912
- "minLength": 1
1913
- },
1914
- "hookId": {
1915
- "type": "string",
1916
- "minLength": 1
1917
- },
1918
- "hookType": {
1919
- "type": "string",
1920
- "enum": [
1921
- "pre_tool",
1922
- "post_tool",
1923
- "pre_command",
1924
- "pre_file_write",
1925
- "pre_network",
1926
- "session_start",
1927
- "session_end",
1928
- "notification"
1929
- ]
1930
- },
1931
- "payload": {
1932
- "type": "object",
1933
- "properties": {
1934
- "toolName": {
1935
- "type": "string"
1936
- },
1937
- "command": {
1938
- "type": "string"
1939
- },
1940
- "filePath": {
1941
- "type": "string"
1942
- },
1943
- "url": {
1944
- "type": "string"
1945
- },
1946
- "extra": {
1947
- "type": "object",
1948
- "additionalProperties": {}
1949
- }
1950
- },
1951
- "additionalProperties": false,
1952
- "default": {}
1953
- },
1954
- "turnId": {
1955
- "type": "string"
1956
- },
1957
- "at": {
1958
- "type": "string",
1959
- "format": "date-time"
1960
- }
1961
- },
1962
- "required": [
1963
- "sessionId",
1964
- "hookId",
1965
- "hookType",
1966
- "at"
1967
- ],
1968
- "additionalProperties": false
1969
- }
1970
- },
1971
- "$schema": "http://json-schema.org/draft-07/schema#"
1972
- },
1973
- "result": {
1974
- "$ref": "#/definitions/hook.fired.result",
1975
- "definitions": {
1976
- "hook.fired.result": {
1977
- "type": "object",
1978
- "properties": {
1979
- "sessionId": {
1980
- "type": "string",
1981
- "minLength": 1
1982
- },
1983
- "hookId": {
1984
- "type": "string"
1985
- },
1986
- "applied": {
1987
- "type": "boolean"
1988
- }
1989
- },
1990
- "required": [
1991
- "sessionId",
1992
- "hookId",
1993
- "applied"
1994
- ],
1995
- "additionalProperties": false
1996
- }
1997
- },
1998
- "$schema": "http://json-schema.org/draft-07/schema#"
1999
- }
2000
- },
2001
- "hook.resolve": {
2002
- "direction": "s2p",
2003
- "kind": "request",
2004
- "params": {
2005
- "$ref": "#/definitions/hook.resolve.params",
2006
- "definitions": {
2007
- "hook.resolve.params": {
2008
- "type": "object",
2009
- "properties": {
2010
- "sessionId": {
2011
- "type": "string",
2012
- "minLength": 1
2013
- },
2014
- "hookId": {
2015
- "type": "string",
2016
- "minLength": 1
2017
- },
2018
- "action": {
2019
- "type": "string",
2020
- "enum": [
2021
- "continue",
2022
- "inject",
2023
- "modify",
2024
- "abort"
2025
- ]
2026
- },
2027
- "context": {
2028
- "type": "array",
2029
- "items": {
2030
- "type": "object",
2031
- "properties": {
2032
- "role": {
2033
- "type": "string",
2034
- "enum": [
2035
- "system",
2036
- "user",
2037
- "assistant"
2038
- ]
2039
- },
2040
- "content": {
2041
- "type": "string"
2042
- }
2043
- },
2044
- "required": [
2045
- "role",
2046
- "content"
2047
- ],
2048
- "additionalProperties": false
2049
- }
2050
- },
2051
- "patch": {
2052
- "type": "object",
2053
- "additionalProperties": {}
2054
- },
2055
- "reason": {
2056
- "type": "string"
2057
- }
2058
- },
2059
- "required": [
2060
- "sessionId",
2061
- "hookId",
2062
- "action"
2063
- ],
2064
- "additionalProperties": false
2065
- }
2066
- },
2067
- "$schema": "http://json-schema.org/draft-07/schema#"
2068
- },
2069
- "result": {
2070
- "$ref": "#/definitions/hook.resolve.result",
2071
- "definitions": {
2072
- "hook.resolve.result": {
2073
- "type": "object",
2074
- "properties": {
2075
- "sessionId": {
2076
- "type": "string",
2077
- "minLength": 1
2078
- },
2079
- "hookId": {
2080
- "type": "string"
2081
- },
2082
- "applied": {
2083
- "type": "boolean"
2084
- }
2085
- },
2086
- "required": [
2087
- "sessionId",
2088
- "hookId",
2089
- "applied"
2090
- ],
2091
- "additionalProperties": false
2092
- }
2093
- },
2094
- "$schema": "http://json-schema.org/draft-07/schema#"
2095
- }
2096
- },
2097
- "document.send": {
2098
- "direction": "p2s",
2099
- "kind": "request",
2100
- "params": {
2101
- "$ref": "#/definitions/document.send.params",
2102
- "definitions": {
2103
- "document.send.params": {
2104
- "type": "object",
2105
- "properties": {
2106
- "sessionId": {
2107
- "type": "string",
2108
- "minLength": 1
2109
- },
2110
- "turnId": {
2111
- "type": "string"
2112
- },
2113
- "documents": {
2114
- "type": "array",
2115
- "items": {
2116
- "type": "object",
2117
- "properties": {
2118
- "name": {
2119
- "type": "string",
2120
- "minLength": 1
2121
- },
2122
- "relativePath": {
2123
- "type": "string"
2124
- },
2125
- "mimeType": {
2126
- "type": "string"
2127
- },
2128
- "kind": {
2129
- "type": "string",
2130
- "enum": [
2131
- "attachment",
2132
- "document",
2133
- "image",
2134
- "file"
2135
- ],
2136
- "default": "file"
2137
- },
2138
- "caption": {
2139
- "type": "string"
2140
- },
2141
- "sizeBytes": {
2142
- "type": "integer",
2143
- "minimum": 0
2144
- },
2145
- "sha256": {
2146
- "type": "string"
2147
- },
2148
- "content": {
2149
- "anyOf": [
2150
- {
2151
- "type": "object",
2152
- "properties": {
2153
- "encoding": {
2154
- "type": "string",
2155
- "const": "base64"
2156
- },
2157
- "data": {
2158
- "type": "string"
2159
- }
2160
- },
2161
- "required": [
2162
- "encoding",
2163
- "data"
2164
- ],
2165
- "additionalProperties": false
2166
- },
2167
- {
2168
- "type": "object",
2169
- "properties": {
2170
- "encoding": {
2171
- "type": "string",
2172
- "const": "utf8"
2173
- },
2174
- "data": {
2175
- "type": "string"
2176
- }
2177
- },
2178
- "required": [
2179
- "encoding",
2180
- "data"
2181
- ],
2182
- "additionalProperties": false
2183
- },
2184
- {
2185
- "type": "object",
2186
- "properties": {
2187
- "ref": {
2188
- "type": "string"
2189
- }
2190
- },
2191
- "required": [
2192
- "ref"
2193
- ],
2194
- "additionalProperties": false
2195
- }
2196
- ]
2197
- }
2198
- },
2199
- "required": [
2200
- "name",
2201
- "content"
2202
- ],
2203
- "additionalProperties": false
2204
- },
2205
- "minItems": 1
2206
- },
2207
- "at": {
2208
- "type": "string",
2209
- "format": "date-time"
2210
- }
2211
- },
2212
- "required": [
2213
- "documents",
2214
- "at"
2215
- ],
2216
- "additionalProperties": false
2217
- }
2218
- },
2219
- "$schema": "http://json-schema.org/draft-07/schema#"
2220
- },
2221
- "result": {
2222
- "$ref": "#/definitions/document.send.result",
2223
- "definitions": {
2224
- "document.send.result": {
2225
- "type": "object",
2226
- "properties": {
2227
- "delivered": {
2228
- "type": "array",
2229
- "items": {
2230
- "type": "object",
2231
- "properties": {
2232
- "name": {
2233
- "type": "string"
2234
- },
2235
- "ok": {
2236
- "type": "boolean"
2237
- },
2238
- "serverRef": {
2239
- "type": "string"
2240
- },
2241
- "error": {
2242
- "type": "string"
2243
- }
2244
- },
2245
- "required": [
2246
- "name",
2247
- "ok"
2248
- ],
2249
- "additionalProperties": false
2250
- }
2251
- }
2252
- },
2253
- "required": [
2254
- "delivered"
2255
- ],
2256
- "additionalProperties": false
2257
- }
2258
- },
2259
- "$schema": "http://json-schema.org/draft-07/schema#"
2260
- }
2261
- },
2262
- "document.prepare_upload": {
2263
- "direction": "p2s",
2264
- "kind": "request",
2265
- "params": {
2266
- "$ref": "#/definitions/document.prepare_upload.params",
2267
- "definitions": {
2268
- "document.prepare_upload.params": {
2269
- "type": "object",
2270
- "properties": {
2271
- "sessionId": {
2272
- "type": "string",
2273
- "minLength": 1
2274
- },
2275
- "turnId": {
2276
- "type": "string"
2277
- },
2278
- "filename": {
2279
- "type": "string",
2280
- "minLength": 1
2281
- },
2282
- "sizeBytes": {
2283
- "type": "integer",
2284
- "minimum": 0
2285
- },
2286
- "mimeType": {
2287
- "type": "string"
2288
- },
2289
- "sha256": {
2290
- "type": "string"
2291
- },
2292
- "kind": {
2293
- "type": "string",
2294
- "enum": [
2295
- "attachment",
2296
- "document",
2297
- "image",
2298
- "file"
2299
- ],
2300
- "default": "file"
2301
- },
2302
- "at": {
2303
- "type": "string",
2304
- "format": "date-time"
2305
- }
2306
- },
2307
- "required": [
2308
- "filename",
2309
- "sizeBytes",
2310
- "at"
2311
- ],
2312
- "additionalProperties": false
2313
- }
2314
- },
2315
- "$schema": "http://json-schema.org/draft-07/schema#"
2316
- },
2317
- "result": {
2318
- "$ref": "#/definitions/document.prepare_upload.result",
2319
- "definitions": {
2320
- "document.prepare_upload.result": {
2321
- "type": "object",
2322
- "properties": {
2323
- "uploadRef": {
2324
- "type": "string"
2325
- },
2326
- "uploadUrl": {
2327
- "type": "string"
2328
- },
2329
- "method": {
2330
- "type": "string",
2331
- "enum": [
2332
- "PUT",
2333
- "POST"
2334
- ],
2335
- "default": "PUT"
2336
- },
2337
- "headers": {
2338
- "type": "object",
2339
- "additionalProperties": {
2340
- "type": "string"
2341
- }
2342
- },
2343
- "expiresAt": {
2344
- "type": "string",
2345
- "format": "date-time"
2346
- }
2347
- },
2348
- "required": [
2349
- "uploadRef",
2350
- "uploadUrl"
2351
- ],
2352
- "additionalProperties": false
2353
- }
2354
- },
2355
- "$schema": "http://json-schema.org/draft-07/schema#"
2356
- }
2357
- },
2358
- "interaction.request": {
2359
- "direction": "p2s",
2360
- "kind": "request",
2361
- "params": {
2362
- "$ref": "#/definitions/interaction.request.params",
2363
- "definitions": {
2364
- "interaction.request.params": {
2365
- "type": "object",
2366
- "properties": {
2367
- "requestId": {
2368
- "type": "string",
2369
- "minLength": 1
2370
- },
2371
- "sessionId": {
2372
- "type": "string",
2373
- "minLength": 1
2374
- },
2375
- "turnId": {
2376
- "type": "string"
2377
- },
2378
- "form": {
2379
- "type": "object",
2380
- "properties": {
2381
- "title": {
2382
- "type": "string",
2383
- "minLength": 1
2384
- },
2385
- "description": {
2386
- "type": "string"
2387
- },
2388
- "fields": {
2389
- "type": "array",
2390
- "items": {
2391
- "anyOf": [
2392
- {
2393
- "type": "object",
2394
- "properties": {
2395
- "key": {
2396
- "type": "string",
2397
- "minLength": 1
2398
- },
2399
- "label": {
2400
- "type": "string",
2401
- "minLength": 1
2402
- },
2403
- "required": {
2404
- "type": "boolean",
2405
- "default": false
2406
- },
2407
- "help": {
2408
- "type": "string"
2409
- },
2410
- "type": {
2411
- "type": "string",
2412
- "const": "text"
2413
- },
2414
- "placeholder": {
2415
- "type": "string"
2416
- },
2417
- "defaultValue": {
2418
- "type": "string"
2419
- }
2420
- },
2421
- "required": [
2422
- "key",
2423
- "label",
2424
- "type"
2425
- ],
2426
- "additionalProperties": false
2427
- },
2428
- {
2429
- "type": "object",
2430
- "properties": {
2431
- "key": {
2432
- "$ref": "#/definitions/interaction.request.params/properties/form/properties/fields/items/anyOf/0/properties/key"
2433
- },
2434
- "label": {
2435
- "$ref": "#/definitions/interaction.request.params/properties/form/properties/fields/items/anyOf/0/properties/label"
2436
- },
2437
- "required": {
2438
- "$ref": "#/definitions/interaction.request.params/properties/form/properties/fields/items/anyOf/0/properties/required"
2439
- },
2440
- "help": {
2441
- "$ref": "#/definitions/interaction.request.params/properties/form/properties/fields/items/anyOf/0/properties/help"
2442
- },
2443
- "type": {
2444
- "type": "string",
2445
- "const": "textarea"
2446
- },
2447
- "placeholder": {
2448
- "type": "string"
2449
- },
2450
- "defaultValue": {
2451
- "type": "string"
2452
- }
2453
- },
2454
- "required": [
2455
- "key",
2456
- "label",
2457
- "type"
2458
- ],
2459
- "additionalProperties": false
2460
- },
2461
- {
2462
- "type": "object",
2463
- "properties": {
2464
- "key": {
2465
- "$ref": "#/definitions/interaction.request.params/properties/form/properties/fields/items/anyOf/0/properties/key"
2466
- },
2467
- "label": {
2468
- "$ref": "#/definitions/interaction.request.params/properties/form/properties/fields/items/anyOf/0/properties/label"
2469
- },
2470
- "required": {
2471
- "$ref": "#/definitions/interaction.request.params/properties/form/properties/fields/items/anyOf/0/properties/required"
2472
- },
2473
- "help": {
2474
- "$ref": "#/definitions/interaction.request.params/properties/form/properties/fields/items/anyOf/0/properties/help"
2475
- },
2476
- "type": {
2477
- "type": "string",
2478
- "const": "number"
2479
- },
2480
- "defaultValue": {
2481
- "type": "number"
2482
- }
2483
- },
2484
- "required": [
2485
- "key",
2486
- "label",
2487
- "type"
2488
- ],
2489
- "additionalProperties": false
2490
- },
2491
- {
2492
- "type": "object",
2493
- "properties": {
2494
- "key": {
2495
- "$ref": "#/definitions/interaction.request.params/properties/form/properties/fields/items/anyOf/0/properties/key"
2496
- },
2497
- "label": {
2498
- "$ref": "#/definitions/interaction.request.params/properties/form/properties/fields/items/anyOf/0/properties/label"
2499
- },
2500
- "required": {
2501
- "$ref": "#/definitions/interaction.request.params/properties/form/properties/fields/items/anyOf/0/properties/required"
2502
- },
2503
- "help": {
2504
- "$ref": "#/definitions/interaction.request.params/properties/form/properties/fields/items/anyOf/0/properties/help"
2505
- },
2506
- "type": {
2507
- "type": "string",
2508
- "const": "boolean"
2509
- },
2510
- "defaultValue": {
2511
- "type": "boolean"
2512
- }
2513
- },
2514
- "required": [
2515
- "key",
2516
- "label",
2517
- "type"
2518
- ],
2519
- "additionalProperties": false
2520
- },
2521
- {
2522
- "type": "object",
2523
- "properties": {
2524
- "key": {
2525
- "$ref": "#/definitions/interaction.request.params/properties/form/properties/fields/items/anyOf/0/properties/key"
2526
- },
2527
- "label": {
2528
- "$ref": "#/definitions/interaction.request.params/properties/form/properties/fields/items/anyOf/0/properties/label"
2529
- },
2530
- "required": {
2531
- "$ref": "#/definitions/interaction.request.params/properties/form/properties/fields/items/anyOf/0/properties/required"
2532
- },
2533
- "help": {
2534
- "$ref": "#/definitions/interaction.request.params/properties/form/properties/fields/items/anyOf/0/properties/help"
2535
- },
2536
- "type": {
2537
- "type": "string",
2538
- "const": "select"
2539
- },
2540
- "options": {
2541
- "type": "array",
2542
- "items": {
2543
- "type": "object",
2544
- "properties": {
2545
- "label": {
2546
- "type": "string"
2547
- },
2548
- "value": {
2549
- "type": "string"
2550
- }
2551
- },
2552
- "required": [
2553
- "label",
2554
- "value"
2555
- ],
2556
- "additionalProperties": false
2557
- }
2558
- },
2559
- "defaultValue": {
2560
- "type": "string"
2561
- }
2562
- },
2563
- "required": [
2564
- "key",
2565
- "label",
2566
- "type",
2567
- "options"
2568
- ],
2569
- "additionalProperties": false
2570
- },
2571
- {
2572
- "type": "object",
2573
- "properties": {
2574
- "key": {
2575
- "$ref": "#/definitions/interaction.request.params/properties/form/properties/fields/items/anyOf/0/properties/key"
2576
- },
2577
- "label": {
2578
- "$ref": "#/definitions/interaction.request.params/properties/form/properties/fields/items/anyOf/0/properties/label"
2579
- },
2580
- "required": {
2581
- "$ref": "#/definitions/interaction.request.params/properties/form/properties/fields/items/anyOf/0/properties/required"
2582
- },
2583
- "help": {
2584
- "$ref": "#/definitions/interaction.request.params/properties/form/properties/fields/items/anyOf/0/properties/help"
2585
- },
2586
- "type": {
2587
- "type": "string",
2588
- "const": "multiselect"
2589
- },
2590
- "options": {
2591
- "type": "array",
2592
- "items": {
2593
- "$ref": "#/definitions/interaction.request.params/properties/form/properties/fields/items/anyOf/4/properties/options/items"
2594
- }
2595
- },
2596
- "defaultValue": {
2597
- "type": "array",
2598
- "items": {
2599
- "type": "string"
2600
- }
2601
- }
2602
- },
2603
- "required": [
2604
- "key",
2605
- "label",
2606
- "type",
2607
- "options"
2608
- ],
2609
- "additionalProperties": false
2610
- },
2611
- {
2612
- "type": "object",
2613
- "properties": {
2614
- "key": {
2615
- "$ref": "#/definitions/interaction.request.params/properties/form/properties/fields/items/anyOf/0/properties/key"
2616
- },
2617
- "label": {
2618
- "$ref": "#/definitions/interaction.request.params/properties/form/properties/fields/items/anyOf/0/properties/label"
2619
- },
2620
- "required": {
2621
- "$ref": "#/definitions/interaction.request.params/properties/form/properties/fields/items/anyOf/0/properties/required"
2622
- },
2623
- "help": {
2624
- "$ref": "#/definitions/interaction.request.params/properties/form/properties/fields/items/anyOf/0/properties/help"
2625
- },
2626
- "type": {
2627
- "type": "string",
2628
- "const": "date"
2629
- },
2630
- "defaultValue": {
2631
- "type": "string"
2632
- }
2633
- },
2634
- "required": [
2635
- "key",
2636
- "label",
2637
- "type"
2638
- ],
2639
- "additionalProperties": false
2640
- }
2641
- ]
2642
- },
2643
- "default": []
2644
- },
2645
- "submitLabel": {
2646
- "type": "string",
2647
- "default": "提交"
2648
- },
2649
- "cancelLabel": {
2650
- "type": "string"
2651
- }
2652
- },
2653
- "required": [
2654
- "title"
2655
- ],
2656
- "additionalProperties": false
2657
- },
2658
- "blocking": {
2659
- "type": "boolean",
2660
- "default": true
2661
- },
2662
- "hookId": {
2663
- "type": "string"
2664
- },
2665
- "timeoutSeconds": {
2666
- "type": "integer",
2667
- "minimum": 0
2668
- },
2669
- "at": {
2670
- "type": "string",
2671
- "format": "date-time"
2672
- }
2673
- },
2674
- "required": [
2675
- "requestId",
2676
- "form",
2677
- "at"
2678
- ],
2679
- "additionalProperties": false
2680
- }
2681
- },
2682
- "$schema": "http://json-schema.org/draft-07/schema#"
2683
- },
2684
- "result": {
2685
- "$ref": "#/definitions/interaction.request.result",
2686
- "definitions": {
2687
- "interaction.request.result": {
2688
- "type": "object",
2689
- "properties": {
2690
- "requestId": {
2691
- "type": "string"
2692
- },
2693
- "action": {
2694
- "type": "string",
2695
- "enum": [
2696
- "submit",
2697
- "cancel",
2698
- "timeout"
2699
- ]
2700
- },
2701
- "values": {
2702
- "type": "object",
2703
- "additionalProperties": {
2704
- "anyOf": [
2705
- {
2706
- "type": "string"
2707
- },
2708
- {
2709
- "type": "array",
2710
- "items": {
2711
- "type": "string"
2712
- }
2713
- },
2714
- {
2715
- "type": "boolean"
2716
- },
2717
- {
2718
- "type": "number"
2719
- }
2720
- ]
2721
- }
2722
- }
2723
- },
2724
- "required": [
2725
- "requestId",
2726
- "action"
2727
- ],
2728
- "additionalProperties": false
2729
- }
2730
- },
2731
- "$schema": "http://json-schema.org/draft-07/schema#"
2732
- }
2733
- },
2734
- "interaction.response": {
2735
- "direction": "s2p",
2736
- "kind": "notification",
2737
- "params": {
2738
- "$ref": "#/definitions/interaction.response.params",
2739
- "definitions": {
2740
- "interaction.response.params": {
2741
- "type": "object",
2742
- "properties": {
2743
- "requestId": {
2744
- "type": "string",
2745
- "minLength": 1
2746
- },
2747
- "action": {
2748
- "type": "string",
2749
- "enum": [
2750
- "submit",
2751
- "cancel",
2752
- "timeout"
2753
- ]
2754
- },
2755
- "values": {
2756
- "type": "object",
2757
- "additionalProperties": {
2758
- "anyOf": [
2759
- {
2760
- "type": "string"
2761
- },
2762
- {
2763
- "type": "array",
2764
- "items": {
2765
- "type": "string"
2766
- }
2767
- },
2768
- {
2769
- "type": "boolean"
2770
- },
2771
- {
2772
- "type": "number"
2773
- }
2774
- ]
2775
- }
2776
- },
2777
- "at": {
2778
- "type": "string",
2779
- "format": "date-time"
2780
- }
2781
- },
2782
- "required": [
2783
- "requestId",
2784
- "action",
2785
- "at"
2786
- ],
2787
- "additionalProperties": false
2788
- }
2789
- },
2790
- "$schema": "http://json-schema.org/draft-07/schema#"
2791
- },
2792
- "result": {
2793
- "$ref": "#/definitions/interaction.response.result",
2794
- "definitions": {
2795
- "interaction.response.result": {
2796
- "not": {}
2797
- }
2798
- },
2799
- "$schema": "http://json-schema.org/draft-07/schema#"
2800
- }
2801
- },
2802
- "interaction.cancel": {
2803
- "direction": "s2p",
2804
- "kind": "request",
2805
- "params": {
2806
- "$ref": "#/definitions/interaction.cancel.params",
2807
- "definitions": {
2808
- "interaction.cancel.params": {
2809
- "type": "object",
2810
- "properties": {
2811
- "requestId": {
2812
- "type": "string",
2813
- "minLength": 1
2814
- },
2815
- "reason": {
2816
- "type": "string"
2817
- }
2818
- },
2819
- "required": [
2820
- "requestId"
2821
- ],
2822
- "additionalProperties": false
2823
- }
2824
- },
2825
- "$schema": "http://json-schema.org/draft-07/schema#"
2826
- },
2827
- "result": {
2828
- "$ref": "#/definitions/interaction.cancel.result",
2829
- "definitions": {
2830
- "interaction.cancel.result": {
2831
- "type": "object",
2832
- "properties": {
2833
- "requestId": {
2834
- "type": "string"
2835
- },
2836
- "cancelled": {
2837
- "type": "boolean"
2838
- }
2839
- },
2840
- "required": [
2841
- "requestId",
2842
- "cancelled"
2843
- ],
2844
- "additionalProperties": false
2845
- }
2846
- },
2847
- "$schema": "http://json-schema.org/draft-07/schema#"
2848
- }
2849
- },
2850
- "project.create": {
2851
- "direction": "s2p",
2852
- "kind": "request",
2853
- "params": {
2854
- "$ref": "#/definitions/project.create.params",
2855
- "definitions": {
2856
- "project.create.params": {
2857
- "type": "object",
2858
- "properties": {
2859
- "clientRequestId": {
2860
- "type": "string"
2861
- },
2862
- "name": {
2863
- "type": "string",
2864
- "minLength": 1
2865
- },
2866
- "path": {
2867
- "type": "string"
2868
- },
2869
- "git": {
2870
- "type": "boolean",
2871
- "default": true
2872
- },
2873
- "remote": {
2874
- "type": "string"
2875
- }
2876
- },
2877
- "required": [
2878
- "name"
2879
- ],
2880
- "additionalProperties": false
2881
- }
2882
- },
2883
- "$schema": "http://json-schema.org/draft-07/schema#"
2884
- },
2885
- "result": {
2886
- "$ref": "#/definitions/project.create.result",
2887
- "definitions": {
2888
- "project.create.result": {
2889
- "type": "object",
2890
- "properties": {
2891
- "project": {
2892
- "type": "object",
2893
- "properties": {
2894
- "projectId": {
2895
- "type": "string",
2896
- "minLength": 1
2897
- },
2898
- "name": {
2899
- "type": "string",
2900
- "minLength": 1
2901
- },
2902
- "path": {
2903
- "type": "string",
2904
- "minLength": 1
2905
- },
2906
- "git": {
2907
- "type": "boolean",
2908
- "default": true
2909
- },
2910
- "branch": {
2911
- "type": "string"
2912
- },
2913
- "remote": {
2914
- "type": "string"
2915
- },
2916
- "createdAt": {
2917
- "type": "string",
2918
- "format": "date-time"
2919
- }
2920
- },
2921
- "required": [
2922
- "projectId",
2923
- "name",
2924
- "path",
2925
- "createdAt"
2926
- ],
2927
- "additionalProperties": false
2928
- }
2929
- },
2930
- "required": [
2931
- "project"
2932
- ],
2933
- "additionalProperties": false
2934
- }
2935
- },
2936
- "$schema": "http://json-schema.org/draft-07/schema#"
2937
- }
2938
- },
2939
- "project.list": {
2940
- "direction": "s2p",
2941
- "kind": "request",
2942
- "params": {
2943
- "$ref": "#/definitions/project.list.params",
2944
- "definitions": {
2945
- "project.list.params": {
2946
- "type": "object",
2947
- "properties": {},
2948
- "additionalProperties": false,
2949
- "default": {}
2950
- }
2951
- },
2952
- "$schema": "http://json-schema.org/draft-07/schema#"
2953
- },
2954
- "result": {
2955
- "$ref": "#/definitions/project.list.result",
2956
- "definitions": {
2957
- "project.list.result": {
2958
- "type": "object",
2959
- "properties": {
2960
- "projects": {
2961
- "type": "array",
2962
- "items": {
2963
- "type": "object",
2964
- "properties": {
2965
- "projectId": {
2966
- "type": "string",
2967
- "minLength": 1
2968
- },
2969
- "name": {
2970
- "type": "string",
2971
- "minLength": 1
2972
- },
2973
- "path": {
2974
- "type": "string",
2975
- "minLength": 1
2976
- },
2977
- "git": {
2978
- "type": "boolean",
2979
- "default": true
2980
- },
2981
- "branch": {
2982
- "type": "string"
2983
- },
2984
- "remote": {
2985
- "type": "string"
2986
- },
2987
- "createdAt": {
2988
- "type": "string",
2989
- "format": "date-time"
2990
- }
2991
- },
2992
- "required": [
2993
- "projectId",
2994
- "name",
2995
- "path",
2996
- "createdAt"
2997
- ],
2998
- "additionalProperties": false
2999
- }
3000
- }
3001
- },
3002
- "required": [
3003
- "projects"
3004
- ],
3005
- "additionalProperties": false
3006
- }
3007
- },
3008
- "$schema": "http://json-schema.org/draft-07/schema#"
3009
- }
3010
- },
3011
- "project.get": {
3012
- "direction": "s2p",
3013
- "kind": "request",
3014
- "params": {
3015
- "$ref": "#/definitions/project.get.params",
3016
- "definitions": {
3017
- "project.get.params": {
3018
- "type": "object",
3019
- "properties": {
3020
- "projectId": {
3021
- "type": "string",
3022
- "minLength": 1
3023
- }
3024
- },
3025
- "required": [
3026
- "projectId"
3027
- ],
3028
- "additionalProperties": false
3029
- }
3030
- },
3031
- "$schema": "http://json-schema.org/draft-07/schema#"
3032
- },
3033
- "result": {
3034
- "$ref": "#/definitions/project.get.result",
3035
- "definitions": {
3036
- "project.get.result": {
3037
- "type": "object",
3038
- "properties": {
3039
- "project": {
3040
- "type": "object",
3041
- "properties": {
3042
- "projectId": {
3043
- "type": "string",
3044
- "minLength": 1
3045
- },
3046
- "name": {
3047
- "type": "string",
3048
- "minLength": 1
3049
- },
3050
- "path": {
3051
- "type": "string",
3052
- "minLength": 1
3053
- },
3054
- "git": {
3055
- "type": "boolean",
3056
- "default": true
3057
- },
3058
- "branch": {
3059
- "type": "string"
3060
- },
3061
- "remote": {
3062
- "type": "string"
3063
- },
3064
- "createdAt": {
3065
- "type": "string",
3066
- "format": "date-time"
3067
- }
3068
- },
3069
- "required": [
3070
- "projectId",
3071
- "name",
3072
- "path",
3073
- "createdAt"
3074
- ],
3075
- "additionalProperties": false
3076
- }
3077
- },
3078
- "required": [
3079
- "project"
3080
- ],
3081
- "additionalProperties": false
3082
- }
3083
- },
3084
- "$schema": "http://json-schema.org/draft-07/schema#"
3085
- }
3086
- },
3087
- "project.remove": {
3088
- "direction": "s2p",
3089
- "kind": "request",
3090
- "params": {
3091
- "$ref": "#/definitions/project.remove.params",
3092
- "definitions": {
3093
- "project.remove.params": {
3094
- "type": "object",
3095
- "properties": {
3096
- "projectId": {
3097
- "type": "string",
3098
- "minLength": 1
3099
- },
3100
- "deleteFiles": {
3101
- "type": "boolean",
3102
- "default": false
3103
- },
3104
- "whenActiveSessions": {
3105
- "type": "string",
3106
- "enum": [
3107
- "reject",
3108
- "cascade"
3109
- ],
3110
- "default": "reject"
3111
- }
3112
- },
3113
- "required": [
3114
- "projectId"
3115
- ],
3116
- "additionalProperties": false
3117
- }
3118
- },
3119
- "$schema": "http://json-schema.org/draft-07/schema#"
3120
- },
3121
- "result": {
3122
- "$ref": "#/definitions/project.remove.result",
3123
- "definitions": {
3124
- "project.remove.result": {
3125
- "type": "object",
3126
- "properties": {
3127
- "projectId": {
3128
- "type": "string",
3129
- "minLength": 1
3130
- },
3131
- "removed": {
3132
- "type": "boolean",
3133
- "const": true
3134
- },
3135
- "filesDeleted": {
3136
- "type": "boolean"
3137
- },
3138
- "terminatedSessions": {
3139
- "type": "array",
3140
- "items": {
3141
- "type": "string"
3142
- }
3143
- }
3144
- },
3145
- "required": [
3146
- "projectId",
3147
- "removed",
3148
- "filesDeleted"
3149
- ],
3150
- "additionalProperties": false
3151
- }
3152
- },
3153
- "$schema": "http://json-schema.org/draft-07/schema#"
3154
- }
3155
- },
3156
- "project.worktree.create": {
3157
- "direction": "s2p",
3158
- "kind": "request",
3159
- "params": {
3160
- "$ref": "#/definitions/project.worktree.create.params",
3161
- "definitions": {
3162
- "project.worktree.create.params": {
3163
- "type": "object",
3164
- "properties": {
3165
- "clientRequestId": {
3166
- "type": "string"
3167
- },
3168
- "projectId": {
3169
- "type": "string",
3170
- "minLength": 1
3171
- },
3172
- "baseBranch": {
3173
- "type": "string",
3174
- "minLength": 1
3175
- },
3176
- "newBranch": {
3177
- "type": "string"
3178
- },
3179
- "path": {
3180
- "type": "string"
3181
- }
3182
- },
3183
- "required": [
3184
- "projectId",
3185
- "baseBranch"
3186
- ],
3187
- "additionalProperties": false
3188
- }
3189
- },
3190
- "$schema": "http://json-schema.org/draft-07/schema#"
3191
- },
3192
- "result": {
3193
- "$ref": "#/definitions/project.worktree.create.result",
3194
- "definitions": {
3195
- "project.worktree.create.result": {
3196
- "type": "object",
3197
- "properties": {
3198
- "worktree": {
3199
- "type": "object",
3200
- "properties": {
3201
- "worktreeId": {
3202
- "type": "string",
3203
- "minLength": 1
3204
- },
3205
- "projectId": {
3206
- "type": "string",
3207
- "minLength": 1
3208
- },
3209
- "path": {
3210
- "type": "string",
3211
- "minLength": 1
3212
- },
3213
- "branch": {
3214
- "type": "string",
3215
- "minLength": 1
3216
- },
3217
- "isPrimary": {
3218
- "type": "boolean",
3219
- "default": false
3220
- },
3221
- "createdAt": {
3222
- "type": "string",
3223
- "format": "date-time"
3224
- }
3225
- },
3226
- "required": [
3227
- "worktreeId",
3228
- "projectId",
3229
- "path",
3230
- "branch"
3231
- ],
3232
- "additionalProperties": false
3233
- }
3234
- },
3235
- "required": [
3236
- "worktree"
3237
- ],
3238
- "additionalProperties": false
3239
- }
3240
- },
3241
- "$schema": "http://json-schema.org/draft-07/schema#"
3242
- }
3243
- },
3244
- "project.worktree.list": {
3245
- "direction": "s2p",
3246
- "kind": "request",
3247
- "params": {
3248
- "$ref": "#/definitions/project.worktree.list.params",
3249
- "definitions": {
3250
- "project.worktree.list.params": {
3251
- "type": "object",
3252
- "properties": {
3253
- "projectId": {
3254
- "type": "string",
3255
- "minLength": 1
3256
- }
3257
- },
3258
- "required": [
3259
- "projectId"
3260
- ],
3261
- "additionalProperties": false
3262
- }
3263
- },
3264
- "$schema": "http://json-schema.org/draft-07/schema#"
3265
- },
3266
- "result": {
3267
- "$ref": "#/definitions/project.worktree.list.result",
3268
- "definitions": {
3269
- "project.worktree.list.result": {
3270
- "type": "object",
3271
- "properties": {
3272
- "worktrees": {
3273
- "type": "array",
3274
- "items": {
3275
- "type": "object",
3276
- "properties": {
3277
- "worktreeId": {
3278
- "type": "string",
3279
- "minLength": 1
3280
- },
3281
- "projectId": {
3282
- "type": "string",
3283
- "minLength": 1
3284
- },
3285
- "path": {
3286
- "type": "string",
3287
- "minLength": 1
3288
- },
3289
- "branch": {
3290
- "type": "string",
3291
- "minLength": 1
3292
- },
3293
- "isPrimary": {
3294
- "type": "boolean",
3295
- "default": false
3296
- },
3297
- "createdAt": {
3298
- "type": "string",
3299
- "format": "date-time"
3300
- }
3301
- },
3302
- "required": [
3303
- "worktreeId",
3304
- "projectId",
3305
- "path",
3306
- "branch"
3307
- ],
3308
- "additionalProperties": false
3309
- }
3310
- }
3311
- },
3312
- "required": [
3313
- "worktrees"
3314
- ],
3315
- "additionalProperties": false
3316
- }
3317
- },
3318
- "$schema": "http://json-schema.org/draft-07/schema#"
3319
- }
3320
- },
3321
- "project.worktree.remove": {
3322
- "direction": "s2p",
3323
- "kind": "request",
3324
- "params": {
3325
- "$ref": "#/definitions/project.worktree.remove.params",
3326
- "definitions": {
3327
- "project.worktree.remove.params": {
3328
- "type": "object",
3329
- "properties": {
3330
- "projectId": {
3331
- "type": "string",
3332
- "minLength": 1
3333
- },
3334
- "worktreeId": {
3335
- "type": "string",
3336
- "minLength": 1
3337
- },
3338
- "force": {
3339
- "type": "boolean",
3340
- "default": false
3341
- }
3342
- },
3343
- "required": [
3344
- "projectId",
3345
- "worktreeId"
3346
- ],
3347
- "additionalProperties": false
3348
- }
3349
- },
3350
- "$schema": "http://json-schema.org/draft-07/schema#"
3351
- },
3352
- "result": {
3353
- "$ref": "#/definitions/project.worktree.remove.result",
3354
- "definitions": {
3355
- "project.worktree.remove.result": {
3356
- "type": "object",
3357
- "properties": {
3358
- "worktreeId": {
3359
- "type": "string"
3360
- },
3361
- "removed": {
3362
- "type": "boolean",
3363
- "const": true
3364
- },
3365
- "affectedSessions": {
3366
- "type": "array",
3367
- "items": {
3368
- "type": "string"
3369
- }
3370
- }
3371
- },
3372
- "required": [
3373
- "worktreeId",
3374
- "removed"
3375
- ],
3376
- "additionalProperties": false
3377
- }
3378
- },
3379
- "$schema": "http://json-schema.org/draft-07/schema#"
3380
- }
3381
- },
3382
- "project.git.deleteBranch": {
3383
- "direction": "s2p",
3384
- "kind": "request",
3385
- "params": {
3386
- "$ref": "#/definitions/project.git.deleteBranch.params",
3387
- "definitions": {
3388
- "project.git.deleteBranch.params": {
3389
- "type": "object",
3390
- "properties": {
3391
- "projectId": {
3392
- "type": "string",
3393
- "minLength": 1
3394
- },
3395
- "branch": {
3396
- "type": "string",
3397
- "minLength": 1
3398
- },
3399
- "force": {
3400
- "type": "boolean",
3401
- "default": false
3402
- }
3403
- },
3404
- "required": [
3405
- "projectId",
3406
- "branch"
3407
- ],
3408
- "additionalProperties": false
3409
- }
3410
- },
3411
- "$schema": "http://json-schema.org/draft-07/schema#"
3412
- },
3413
- "result": {
3414
- "$ref": "#/definitions/project.git.deleteBranch.result",
3415
- "definitions": {
3416
- "project.git.deleteBranch.result": {
3417
- "type": "object",
3418
- "properties": {
3419
- "branch": {
3420
- "type": "string"
3421
- },
3422
- "deleted": {
3423
- "type": "boolean",
3424
- "const": true
3425
- },
3426
- "wasMerged": {
3427
- "type": "boolean"
3428
- },
3429
- "affectedWorktrees": {
3430
- "type": "array",
3431
- "items": {
3432
- "type": "string"
3433
- }
3434
- }
3435
- },
3436
- "required": [
3437
- "branch",
3438
- "deleted"
3439
- ],
3440
- "additionalProperties": false
3441
- }
3442
- },
3443
- "$schema": "http://json-schema.org/draft-07/schema#"
3444
- }
3445
- },
3446
- "skill.install": {
3447
- "direction": "s2p",
3448
- "kind": "request",
3449
- "params": {
3450
- "$ref": "#/definitions/skill.install.params",
3451
- "definitions": {
3452
- "skill.install.params": {
3453
- "type": "object",
3454
- "properties": {
3455
- "agent": {
3456
- "type": "string",
3457
- "minLength": 1
3458
- },
3459
- "name": {
3460
- "type": "string",
3461
- "minLength": 1
3462
- },
3463
- "scope": {
3464
- "type": "string",
3465
- "enum": [
3466
- "global",
3467
- "project"
3468
- ]
3469
- },
3470
- "projectId": {
3471
- "type": "string",
3472
- "minLength": 1
3473
- },
3474
- "source": {
3475
- "anyOf": [
3476
- {
3477
- "type": "object",
3478
- "properties": {
3479
- "kind": {
3480
- "type": "string",
3481
- "const": "inline"
3482
- },
3483
- "files": {
3484
- "type": "object",
3485
- "additionalProperties": {
3486
- "type": "string"
3487
- }
3488
- }
3489
- },
3490
- "required": [
3491
- "kind",
3492
- "files"
3493
- ],
3494
- "additionalProperties": false
3495
- },
3496
- {
3497
- "type": "object",
3498
- "properties": {
3499
- "kind": {
3500
- "type": "string",
3501
- "const": "localPath"
3502
- },
3503
- "path": {
3504
- "type": "string",
3505
- "minLength": 1
3506
- }
3507
- },
3508
- "required": [
3509
- "kind",
3510
- "path"
3511
- ],
3512
- "additionalProperties": false
3513
- },
3514
- {
3515
- "type": "object",
3516
- "properties": {
3517
- "kind": {
3518
- "type": "string",
3519
- "const": "url"
3520
- },
3521
- "url": {
3522
- "type": "string",
3523
- "minLength": 1
3524
- },
3525
- "sha256": {
3526
- "type": "string"
3527
- }
3528
- },
3529
- "required": [
3530
- "kind",
3531
- "url"
3532
- ],
3533
- "additionalProperties": false
3534
- }
3535
- ]
3536
- }
3537
- },
3538
- "required": [
3539
- "agent",
3540
- "name",
3541
- "scope",
3542
- "source"
3543
- ],
3544
- "additionalProperties": false
3545
- }
3546
- },
3547
- "$schema": "http://json-schema.org/draft-07/schema#"
3548
- },
3549
- "result": {
3550
- "$ref": "#/definitions/skill.install.result",
3551
- "definitions": {
3552
- "skill.install.result": {
3553
- "type": "object",
3554
- "properties": {
3555
- "skill": {
3556
- "type": "object",
3557
- "properties": {
3558
- "name": {
3559
- "type": "string",
3560
- "minLength": 1
3561
- },
3562
- "agent": {
3563
- "type": "string",
3564
- "minLength": 1
3565
- },
3566
- "scope": {
3567
- "type": "string",
3568
- "enum": [
3569
- "global",
3570
- "project"
3571
- ]
3572
- },
3573
- "projectId": {
3574
- "type": "string",
3575
- "minLength": 1
3576
- },
3577
- "version": {
3578
- "type": "string"
3579
- },
3580
- "hash": {
3581
- "type": "string"
3582
- },
3583
- "compatibleAgents": {
3584
- "type": "array",
3585
- "items": {
3586
- "$ref": "#/definitions/skill.install.result/properties/skill/properties/agent"
3587
- }
3588
- },
3589
- "sourceTrusted": {
3590
- "type": "boolean"
3591
- },
3592
- "installedPath": {
3593
- "type": "string"
3594
- },
3595
- "installedAt": {
3596
- "type": "string",
3597
- "format": "date-time"
3598
- }
3599
- },
3600
- "required": [
3601
- "name",
3602
- "agent",
3603
- "scope"
3604
- ],
3605
- "additionalProperties": false
3606
- }
3607
- },
3608
- "required": [
3609
- "skill"
3610
- ],
3611
- "additionalProperties": false
3612
- }
3613
- },
3614
- "$schema": "http://json-schema.org/draft-07/schema#"
3615
- }
3616
- },
3617
- "skill.uninstall": {
3618
- "direction": "s2p",
3619
- "kind": "request",
3620
- "params": {
3621
- "$ref": "#/definitions/skill.uninstall.params",
3622
- "definitions": {
3623
- "skill.uninstall.params": {
3624
- "type": "object",
3625
- "properties": {
3626
- "agent": {
3627
- "type": "string",
3628
- "minLength": 1
3629
- },
3630
- "name": {
3631
- "type": "string",
3632
- "minLength": 1
3633
- },
3634
- "scope": {
3635
- "type": "string",
3636
- "enum": [
3637
- "global",
3638
- "project"
3639
- ]
3640
- },
3641
- "projectId": {
3642
- "type": "string",
3643
- "minLength": 1
3644
- }
3645
- },
3646
- "required": [
3647
- "agent",
3648
- "name",
3649
- "scope"
3650
- ],
3651
- "additionalProperties": false
3652
- }
3653
- },
3654
- "$schema": "http://json-schema.org/draft-07/schema#"
3655
- },
3656
- "result": {
3657
- "$ref": "#/definitions/skill.uninstall.result",
3658
- "definitions": {
3659
- "skill.uninstall.result": {
3660
- "type": "object",
3661
- "properties": {
3662
- "agent": {
3663
- "type": "string",
3664
- "minLength": 1
3665
- },
3666
- "name": {
3667
- "type": "string"
3668
- },
3669
- "scope": {
3670
- "type": "string",
3671
- "enum": [
3672
- "global",
3673
- "project"
3674
- ]
3675
- },
3676
- "uninstalled": {
3677
- "type": "boolean",
3678
- "const": true
3679
- }
3680
- },
3681
- "required": [
3682
- "agent",
3683
- "name",
3684
- "scope",
3685
- "uninstalled"
3686
- ],
3687
- "additionalProperties": false
3688
- }
3689
- },
3690
- "$schema": "http://json-schema.org/draft-07/schema#"
3691
- }
3692
- },
3693
- "skill.list": {
3694
- "direction": "s2p",
3695
- "kind": "request",
3696
- "params": {
3697
- "$ref": "#/definitions/skill.list.params",
3698
- "definitions": {
3699
- "skill.list.params": {
3700
- "type": "object",
3701
- "properties": {
3702
- "agent": {
3703
- "type": "string",
3704
- "minLength": 1
3705
- },
3706
- "scope": {
3707
- "type": "string",
3708
- "enum": [
3709
- "global",
3710
- "project"
3711
- ]
3712
- },
3713
- "projectId": {
3714
- "type": "string",
3715
- "minLength": 1
3716
- }
3717
- },
3718
- "additionalProperties": false
3719
- }
3720
- },
3721
- "$schema": "http://json-schema.org/draft-07/schema#"
3722
- },
3723
- "result": {
3724
- "$ref": "#/definitions/skill.list.result",
3725
- "definitions": {
3726
- "skill.list.result": {
3727
- "type": "object",
3728
- "properties": {
3729
- "skills": {
3730
- "type": "array",
3731
- "items": {
3732
- "type": "object",
3733
- "properties": {
3734
- "name": {
3735
- "type": "string",
3736
- "minLength": 1
3737
- },
3738
- "agent": {
3739
- "type": "string",
3740
- "minLength": 1
3741
- },
3742
- "scope": {
3743
- "type": "string",
3744
- "enum": [
3745
- "global",
3746
- "project"
3747
- ]
3748
- },
3749
- "projectId": {
3750
- "type": "string",
3751
- "minLength": 1
3752
- },
3753
- "version": {
3754
- "type": "string"
3755
- },
3756
- "hash": {
3757
- "type": "string"
3758
- },
3759
- "compatibleAgents": {
3760
- "type": "array",
3761
- "items": {
3762
- "$ref": "#/definitions/skill.list.result/properties/skills/items/properties/agent"
3763
- }
3764
- },
3765
- "sourceTrusted": {
3766
- "type": "boolean"
3767
- },
3768
- "installedPath": {
3769
- "type": "string"
3770
- },
3771
- "installedAt": {
3772
- "type": "string",
3773
- "format": "date-time"
3774
- }
3775
- },
3776
- "required": [
3777
- "name",
3778
- "agent",
3779
- "scope"
3780
- ],
3781
- "additionalProperties": false
3782
- }
3783
- }
3784
- },
3785
- "required": [
3786
- "skills"
3787
- ],
3788
- "additionalProperties": false
3789
- }
3790
- },
3791
- "$schema": "http://json-schema.org/draft-07/schema#"
3792
- }
3793
- }
3794
- }