@agent-harness-experimental/protocol 0.0.0 → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1741 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agent-harness-experimental.local/protocol.schema.json",
4
+ "protocolVersion": 1,
5
+ "definitions": {
6
+ "adapterKey": {
7
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
8
+ "type": "string",
9
+ "enum": [
10
+ "claude-code",
11
+ "codex",
12
+ "goose",
13
+ "mastra",
14
+ "opencode",
15
+ "deepagents",
16
+ "pi",
17
+ "openai-agents"
18
+ ]
19
+ },
20
+ "agentConfig": {
21
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
22
+ "type": "object",
23
+ "properties": {
24
+ "model": {
25
+ "type": "string"
26
+ },
27
+ "maxTurns": {
28
+ "type": "number"
29
+ },
30
+ "interceptBuiltinTools": {
31
+ "anyOf": [
32
+ {
33
+ "type": "boolean"
34
+ },
35
+ {
36
+ "type": "array",
37
+ "items": {
38
+ "type": "string"
39
+ }
40
+ }
41
+ ]
42
+ },
43
+ "builtinToolMappings": {
44
+ "type": "array",
45
+ "items": {
46
+ "type": "object",
47
+ "properties": {
48
+ "name": {
49
+ "type": "string"
50
+ },
51
+ "nativeName": {
52
+ "type": "string"
53
+ }
54
+ },
55
+ "required": [
56
+ "name"
57
+ ],
58
+ "additionalProperties": false
59
+ }
60
+ },
61
+ "toolTimeout": {
62
+ "type": "number"
63
+ },
64
+ "contextWindow": {
65
+ "type": "number"
66
+ },
67
+ "toolSearchMode": {
68
+ "type": "boolean"
69
+ },
70
+ "traceContext": {
71
+ "type": "object",
72
+ "properties": {
73
+ "traceparent": {
74
+ "type": "string"
75
+ },
76
+ "tracestate": {
77
+ "type": "string"
78
+ }
79
+ },
80
+ "additionalProperties": false
81
+ },
82
+ "instructions": {
83
+ "type": "string"
84
+ },
85
+ "responseFormat": {},
86
+ "watch": {
87
+ "type": "string"
88
+ },
89
+ "debug": {
90
+ "type": "object",
91
+ "propertyNames": {
92
+ "type": "string"
93
+ },
94
+ "additionalProperties": {}
95
+ }
96
+ },
97
+ "additionalProperties": false
98
+ },
99
+ "bridgePrepareStepConfig": {
100
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
101
+ "type": "object",
102
+ "properties": {
103
+ "activeTools": {
104
+ "type": "array",
105
+ "items": {
106
+ "type": "string"
107
+ }
108
+ },
109
+ "activeSkillNames": {
110
+ "type": "array",
111
+ "items": {
112
+ "type": "string"
113
+ }
114
+ },
115
+ "forcedSkillNames": {
116
+ "type": "array",
117
+ "items": {
118
+ "type": "string"
119
+ }
120
+ },
121
+ "instructions": {
122
+ "type": "string"
123
+ },
124
+ "responseFormat": {}
125
+ },
126
+ "additionalProperties": false
127
+ },
128
+ "bridgeReadyMessage": {
129
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
130
+ "type": "object",
131
+ "properties": {
132
+ "type": {
133
+ "type": "string",
134
+ "const": "bridge-ready"
135
+ },
136
+ "protocolVersion": {
137
+ "type": "number",
138
+ "const": 1
139
+ },
140
+ "port": {
141
+ "type": "number"
142
+ },
143
+ "state": {
144
+ "type": "string"
145
+ }
146
+ },
147
+ "required": [
148
+ "type",
149
+ "protocolVersion",
150
+ "port",
151
+ "state"
152
+ ],
153
+ "additionalProperties": false
154
+ },
155
+ "bridgeStartMessage": {
156
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
157
+ "type": "object",
158
+ "properties": {
159
+ "protocolVersion": {
160
+ "type": "number",
161
+ "const": 1
162
+ },
163
+ "prompt": {
164
+ "type": "string"
165
+ },
166
+ "tools": {
167
+ "type": "array",
168
+ "items": {
169
+ "type": "object",
170
+ "properties": {
171
+ "name": {
172
+ "type": "string"
173
+ },
174
+ "nativeName": {
175
+ "type": "string"
176
+ },
177
+ "description": {
178
+ "type": "string"
179
+ },
180
+ "inputSchema": {
181
+ "type": "object",
182
+ "propertyNames": {
183
+ "type": "string"
184
+ },
185
+ "additionalProperties": {}
186
+ }
187
+ },
188
+ "required": [
189
+ "name",
190
+ "inputSchema"
191
+ ],
192
+ "additionalProperties": false
193
+ }
194
+ },
195
+ "config": {
196
+ "type": "object",
197
+ "properties": {
198
+ "model": {
199
+ "type": "string"
200
+ },
201
+ "maxTurns": {
202
+ "type": "number"
203
+ },
204
+ "interceptBuiltinTools": {
205
+ "anyOf": [
206
+ {
207
+ "type": "boolean"
208
+ },
209
+ {
210
+ "type": "array",
211
+ "items": {
212
+ "type": "string"
213
+ }
214
+ }
215
+ ]
216
+ },
217
+ "builtinToolMappings": {
218
+ "type": "array",
219
+ "items": {
220
+ "type": "object",
221
+ "properties": {
222
+ "name": {
223
+ "type": "string"
224
+ },
225
+ "nativeName": {
226
+ "type": "string"
227
+ }
228
+ },
229
+ "required": [
230
+ "name"
231
+ ],
232
+ "additionalProperties": false
233
+ }
234
+ },
235
+ "toolTimeout": {
236
+ "type": "number"
237
+ },
238
+ "contextWindow": {
239
+ "type": "number"
240
+ },
241
+ "toolSearchMode": {
242
+ "type": "boolean"
243
+ },
244
+ "traceContext": {
245
+ "type": "object",
246
+ "properties": {
247
+ "traceparent": {
248
+ "type": "string"
249
+ },
250
+ "tracestate": {
251
+ "type": "string"
252
+ }
253
+ },
254
+ "additionalProperties": false
255
+ },
256
+ "instructions": {
257
+ "type": "string"
258
+ },
259
+ "responseFormat": {},
260
+ "watch": {
261
+ "type": "string"
262
+ },
263
+ "debug": {
264
+ "type": "object",
265
+ "propertyNames": {
266
+ "type": "string"
267
+ },
268
+ "additionalProperties": {}
269
+ }
270
+ },
271
+ "additionalProperties": {}
272
+ }
273
+ },
274
+ "required": [
275
+ "protocolVersion",
276
+ "prompt",
277
+ "tools",
278
+ "config"
279
+ ],
280
+ "additionalProperties": false
281
+ },
282
+ "toolSchema": {
283
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
284
+ "type": "object",
285
+ "properties": {
286
+ "name": {
287
+ "type": "string"
288
+ },
289
+ "nativeName": {
290
+ "type": "string"
291
+ },
292
+ "description": {
293
+ "type": "string"
294
+ },
295
+ "inputSchema": {
296
+ "type": "object",
297
+ "propertyNames": {
298
+ "type": "string"
299
+ },
300
+ "additionalProperties": {}
301
+ }
302
+ },
303
+ "required": [
304
+ "name",
305
+ "inputSchema"
306
+ ],
307
+ "additionalProperties": false
308
+ },
309
+ "harnessMessage": {
310
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
311
+ "oneOf": [
312
+ {
313
+ "type": "object",
314
+ "properties": {
315
+ "type": {
316
+ "type": "string",
317
+ "const": "start"
318
+ },
319
+ "protocolVersion": {
320
+ "type": "number",
321
+ "const": 1
322
+ },
323
+ "prompt": {
324
+ "type": "string"
325
+ },
326
+ "tools": {
327
+ "type": "array",
328
+ "items": {
329
+ "type": "object",
330
+ "properties": {
331
+ "name": {
332
+ "type": "string"
333
+ },
334
+ "nativeName": {
335
+ "type": "string"
336
+ },
337
+ "description": {
338
+ "type": "string"
339
+ },
340
+ "inputSchema": {
341
+ "type": "object",
342
+ "propertyNames": {
343
+ "type": "string"
344
+ },
345
+ "additionalProperties": {}
346
+ }
347
+ },
348
+ "required": [
349
+ "name",
350
+ "inputSchema"
351
+ ],
352
+ "additionalProperties": false
353
+ }
354
+ },
355
+ "config": {
356
+ "type": "object",
357
+ "properties": {
358
+ "model": {
359
+ "type": "string"
360
+ },
361
+ "maxTurns": {
362
+ "type": "number"
363
+ },
364
+ "interceptBuiltinTools": {
365
+ "anyOf": [
366
+ {
367
+ "type": "boolean"
368
+ },
369
+ {
370
+ "type": "array",
371
+ "items": {
372
+ "type": "string"
373
+ }
374
+ }
375
+ ]
376
+ },
377
+ "builtinToolMappings": {
378
+ "type": "array",
379
+ "items": {
380
+ "type": "object",
381
+ "properties": {
382
+ "name": {
383
+ "type": "string"
384
+ },
385
+ "nativeName": {
386
+ "type": "string"
387
+ }
388
+ },
389
+ "required": [
390
+ "name"
391
+ ],
392
+ "additionalProperties": false
393
+ }
394
+ },
395
+ "toolTimeout": {
396
+ "type": "number"
397
+ },
398
+ "contextWindow": {
399
+ "type": "number"
400
+ },
401
+ "toolSearchMode": {
402
+ "type": "boolean"
403
+ },
404
+ "traceContext": {
405
+ "type": "object",
406
+ "properties": {
407
+ "traceparent": {
408
+ "type": "string"
409
+ },
410
+ "tracestate": {
411
+ "type": "string"
412
+ }
413
+ },
414
+ "additionalProperties": false
415
+ },
416
+ "instructions": {
417
+ "type": "string"
418
+ },
419
+ "responseFormat": {},
420
+ "watch": {
421
+ "type": "string"
422
+ },
423
+ "debug": {
424
+ "type": "object",
425
+ "propertyNames": {
426
+ "type": "string"
427
+ },
428
+ "additionalProperties": {}
429
+ }
430
+ },
431
+ "additionalProperties": {}
432
+ }
433
+ },
434
+ "required": [
435
+ "type",
436
+ "protocolVersion",
437
+ "prompt",
438
+ "tools",
439
+ "config"
440
+ ],
441
+ "additionalProperties": false
442
+ },
443
+ {
444
+ "type": "object",
445
+ "properties": {
446
+ "type": {
447
+ "type": "string",
448
+ "const": "resume"
449
+ },
450
+ "lastSeenEventId": {
451
+ "type": "number"
452
+ }
453
+ },
454
+ "required": [
455
+ "type",
456
+ "lastSeenEventId"
457
+ ],
458
+ "additionalProperties": false
459
+ },
460
+ {
461
+ "type": "object",
462
+ "properties": {
463
+ "type": {
464
+ "type": "string",
465
+ "const": "prepare-step-response"
466
+ },
467
+ "stepNumber": {
468
+ "type": "number"
469
+ },
470
+ "config": {
471
+ "type": "object",
472
+ "properties": {
473
+ "activeTools": {
474
+ "type": "array",
475
+ "items": {
476
+ "type": "string"
477
+ }
478
+ },
479
+ "activeSkillNames": {
480
+ "type": "array",
481
+ "items": {
482
+ "type": "string"
483
+ }
484
+ },
485
+ "forcedSkillNames": {
486
+ "type": "array",
487
+ "items": {
488
+ "type": "string"
489
+ }
490
+ },
491
+ "instructions": {
492
+ "type": "string"
493
+ },
494
+ "responseFormat": {}
495
+ },
496
+ "additionalProperties": false
497
+ },
498
+ "error": {
499
+ "type": "string"
500
+ }
501
+ },
502
+ "required": [
503
+ "type",
504
+ "stepNumber"
505
+ ],
506
+ "additionalProperties": false
507
+ },
508
+ {
509
+ "type": "object",
510
+ "properties": {
511
+ "type": {
512
+ "type": "string",
513
+ "const": "tool-result"
514
+ },
515
+ "requestId": {
516
+ "type": "string"
517
+ },
518
+ "output": {}
519
+ },
520
+ "required": [
521
+ "type",
522
+ "requestId",
523
+ "output"
524
+ ],
525
+ "additionalProperties": false
526
+ },
527
+ {
528
+ "type": "object",
529
+ "properties": {
530
+ "type": {
531
+ "type": "string",
532
+ "const": "tool-result-response"
533
+ },
534
+ "requestId": {
535
+ "type": "string"
536
+ },
537
+ "output": {},
538
+ "config": {
539
+ "type": "object",
540
+ "properties": {
541
+ "activeTools": {
542
+ "type": "array",
543
+ "items": {
544
+ "type": "string"
545
+ }
546
+ },
547
+ "activeSkillNames": {
548
+ "type": "array",
549
+ "items": {
550
+ "type": "string"
551
+ }
552
+ },
553
+ "forcedSkillNames": {
554
+ "type": "array",
555
+ "items": {
556
+ "type": "string"
557
+ }
558
+ },
559
+ "instructions": {
560
+ "type": "string"
561
+ },
562
+ "responseFormat": {}
563
+ },
564
+ "additionalProperties": false
565
+ }
566
+ },
567
+ "required": [
568
+ "type",
569
+ "requestId",
570
+ "output"
571
+ ],
572
+ "additionalProperties": false
573
+ },
574
+ {
575
+ "type": "object",
576
+ "properties": {
577
+ "type": {
578
+ "type": "string",
579
+ "const": "tool-decision"
580
+ },
581
+ "requestId": {
582
+ "type": "string"
583
+ },
584
+ "approved": {
585
+ "type": "boolean"
586
+ },
587
+ "reason": {
588
+ "type": "string"
589
+ },
590
+ "config": {
591
+ "type": "object",
592
+ "properties": {
593
+ "activeTools": {
594
+ "type": "array",
595
+ "items": {
596
+ "type": "string"
597
+ }
598
+ },
599
+ "activeSkillNames": {
600
+ "type": "array",
601
+ "items": {
602
+ "type": "string"
603
+ }
604
+ },
605
+ "forcedSkillNames": {
606
+ "type": "array",
607
+ "items": {
608
+ "type": "string"
609
+ }
610
+ },
611
+ "instructions": {
612
+ "type": "string"
613
+ },
614
+ "responseFormat": {}
615
+ },
616
+ "additionalProperties": false
617
+ }
618
+ },
619
+ "required": [
620
+ "type",
621
+ "requestId",
622
+ "approved"
623
+ ],
624
+ "additionalProperties": false
625
+ },
626
+ {
627
+ "type": "object",
628
+ "properties": {
629
+ "type": {
630
+ "type": "string",
631
+ "const": "user-message"
632
+ },
633
+ "text": {
634
+ "type": "string"
635
+ }
636
+ },
637
+ "required": [
638
+ "type",
639
+ "text"
640
+ ],
641
+ "additionalProperties": false
642
+ },
643
+ {
644
+ "type": "object",
645
+ "properties": {
646
+ "type": {
647
+ "type": "string",
648
+ "const": "compact"
649
+ }
650
+ },
651
+ "required": [
652
+ "type"
653
+ ],
654
+ "additionalProperties": false
655
+ },
656
+ {
657
+ "type": "object",
658
+ "properties": {
659
+ "type": {
660
+ "type": "string",
661
+ "const": "update-network"
662
+ },
663
+ "allowedHosts": {
664
+ "type": "array",
665
+ "items": {
666
+ "type": "string"
667
+ }
668
+ },
669
+ "deniedHosts": {
670
+ "type": "array",
671
+ "items": {
672
+ "type": "string"
673
+ }
674
+ },
675
+ "allowedHttpPaths": {
676
+ "type": "array",
677
+ "items": {
678
+ "type": "object",
679
+ "properties": {
680
+ "origin": {
681
+ "type": "string"
682
+ },
683
+ "pathPrefix": {
684
+ "type": "string"
685
+ }
686
+ },
687
+ "required": [
688
+ "origin",
689
+ "pathPrefix"
690
+ ],
691
+ "additionalProperties": false
692
+ }
693
+ },
694
+ "deniedHttpPaths": {
695
+ "type": "array",
696
+ "items": {
697
+ "type": "object",
698
+ "properties": {
699
+ "origin": {
700
+ "type": "string"
701
+ },
702
+ "pathPrefix": {
703
+ "type": "string"
704
+ }
705
+ },
706
+ "required": [
707
+ "origin",
708
+ "pathPrefix"
709
+ ],
710
+ "additionalProperties": false
711
+ }
712
+ }
713
+ },
714
+ "required": [
715
+ "type"
716
+ ],
717
+ "additionalProperties": false
718
+ },
719
+ {
720
+ "type": "object",
721
+ "properties": {
722
+ "type": {
723
+ "type": "string",
724
+ "const": "abort"
725
+ }
726
+ },
727
+ "required": [
728
+ "type"
729
+ ],
730
+ "additionalProperties": false
731
+ },
732
+ {
733
+ "type": "object",
734
+ "properties": {
735
+ "type": {
736
+ "type": "string",
737
+ "const": "ping"
738
+ }
739
+ },
740
+ "required": [
741
+ "type"
742
+ ],
743
+ "additionalProperties": false
744
+ }
745
+ ]
746
+ },
747
+ "sandboxMessage": {
748
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
749
+ "oneOf": [
750
+ {
751
+ "type": "object",
752
+ "properties": {
753
+ "id": {
754
+ "type": "number"
755
+ },
756
+ "type": {
757
+ "type": "string",
758
+ "const": "text-delta"
759
+ },
760
+ "delta": {
761
+ "type": "string"
762
+ }
763
+ },
764
+ "required": [
765
+ "id",
766
+ "type",
767
+ "delta"
768
+ ],
769
+ "additionalProperties": false
770
+ },
771
+ {
772
+ "type": "object",
773
+ "properties": {
774
+ "id": {
775
+ "type": "number"
776
+ },
777
+ "type": {
778
+ "type": "string",
779
+ "const": "reasoning-delta"
780
+ },
781
+ "delta": {
782
+ "type": "string"
783
+ }
784
+ },
785
+ "required": [
786
+ "id",
787
+ "type",
788
+ "delta"
789
+ ],
790
+ "additionalProperties": false
791
+ },
792
+ {
793
+ "type": "object",
794
+ "properties": {
795
+ "id": {
796
+ "type": "number"
797
+ },
798
+ "type": {
799
+ "type": "string",
800
+ "const": "subagent-start"
801
+ },
802
+ "agentName": {
803
+ "type": "string"
804
+ },
805
+ "parentToolCallId": {
806
+ "type": "string"
807
+ }
808
+ },
809
+ "required": [
810
+ "id",
811
+ "type",
812
+ "agentName",
813
+ "parentToolCallId"
814
+ ],
815
+ "additionalProperties": false
816
+ },
817
+ {
818
+ "type": "object",
819
+ "properties": {
820
+ "id": {
821
+ "type": "number"
822
+ },
823
+ "type": {
824
+ "type": "string",
825
+ "const": "subagent-finish"
826
+ },
827
+ "agentName": {
828
+ "type": "string"
829
+ },
830
+ "parentToolCallId": {
831
+ "type": "string"
832
+ },
833
+ "output": {},
834
+ "usage": {
835
+ "type": "object",
836
+ "properties": {
837
+ "inputTokens": {
838
+ "type": "number"
839
+ },
840
+ "outputTokens": {
841
+ "type": "number"
842
+ },
843
+ "costUsd": {
844
+ "type": "number"
845
+ }
846
+ },
847
+ "required": [
848
+ "inputTokens",
849
+ "outputTokens"
850
+ ],
851
+ "additionalProperties": false
852
+ }
853
+ },
854
+ "required": [
855
+ "id",
856
+ "type",
857
+ "agentName",
858
+ "parentToolCallId"
859
+ ],
860
+ "additionalProperties": false
861
+ },
862
+ {
863
+ "type": "object",
864
+ "properties": {
865
+ "id": {
866
+ "type": "number"
867
+ },
868
+ "type": {
869
+ "type": "string",
870
+ "const": "tool-call"
871
+ },
872
+ "requestId": {
873
+ "type": "string"
874
+ },
875
+ "toolName": {
876
+ "type": "string"
877
+ },
878
+ "toolCallId": {
879
+ "type": "string"
880
+ },
881
+ "input": {},
882
+ "observeOnly": {
883
+ "type": "boolean"
884
+ }
885
+ },
886
+ "required": [
887
+ "id",
888
+ "type",
889
+ "requestId",
890
+ "toolName",
891
+ "toolCallId",
892
+ "input"
893
+ ],
894
+ "additionalProperties": false
895
+ },
896
+ {
897
+ "type": "object",
898
+ "properties": {
899
+ "id": {
900
+ "type": "number"
901
+ },
902
+ "type": {
903
+ "type": "string",
904
+ "const": "tool-result"
905
+ },
906
+ "toolName": {
907
+ "type": "string"
908
+ },
909
+ "toolCallId": {
910
+ "type": "string"
911
+ },
912
+ "output": {}
913
+ },
914
+ "required": [
915
+ "id",
916
+ "type",
917
+ "toolName",
918
+ "toolCallId",
919
+ "output"
920
+ ],
921
+ "additionalProperties": false
922
+ },
923
+ {
924
+ "type": "object",
925
+ "properties": {
926
+ "id": {
927
+ "type": "number"
928
+ },
929
+ "type": {
930
+ "type": "string",
931
+ "const": "host-approval-request"
932
+ },
933
+ "approvalId": {
934
+ "type": "string"
935
+ },
936
+ "requestId": {
937
+ "type": "string"
938
+ },
939
+ "toolCallId": {
940
+ "type": "string"
941
+ },
942
+ "host": {
943
+ "type": "string"
944
+ },
945
+ "access": {
946
+ "type": "string",
947
+ "enum": [
948
+ "proxy",
949
+ "direct"
950
+ ]
951
+ },
952
+ "protocol": {
953
+ "type": "string",
954
+ "enum": [
955
+ "http",
956
+ "https",
957
+ "connect"
958
+ ]
959
+ },
960
+ "port": {
961
+ "type": "number"
962
+ },
963
+ "url": {
964
+ "type": "string"
965
+ }
966
+ },
967
+ "required": [
968
+ "id",
969
+ "type",
970
+ "approvalId",
971
+ "requestId",
972
+ "toolCallId",
973
+ "host",
974
+ "access",
975
+ "protocol"
976
+ ],
977
+ "additionalProperties": false
978
+ },
979
+ {
980
+ "type": "object",
981
+ "properties": {
982
+ "id": {
983
+ "type": "number"
984
+ },
985
+ "type": {
986
+ "type": "string",
987
+ "const": "step-finish"
988
+ },
989
+ "stepIndex": {
990
+ "type": "number"
991
+ }
992
+ },
993
+ "required": [
994
+ "id",
995
+ "type",
996
+ "stepIndex"
997
+ ],
998
+ "additionalProperties": false
999
+ },
1000
+ {
1001
+ "type": "object",
1002
+ "properties": {
1003
+ "id": {
1004
+ "type": "number"
1005
+ },
1006
+ "type": {
1007
+ "type": "string",
1008
+ "const": "finish"
1009
+ },
1010
+ "finishReason": {
1011
+ "type": "string"
1012
+ },
1013
+ "usage": {
1014
+ "type": "object",
1015
+ "properties": {
1016
+ "inputTokens": {
1017
+ "type": "number"
1018
+ },
1019
+ "outputTokens": {
1020
+ "type": "number"
1021
+ },
1022
+ "costUsd": {
1023
+ "type": "number"
1024
+ }
1025
+ },
1026
+ "required": [
1027
+ "inputTokens",
1028
+ "outputTokens"
1029
+ ],
1030
+ "additionalProperties": false
1031
+ }
1032
+ },
1033
+ "required": [
1034
+ "id",
1035
+ "type",
1036
+ "finishReason",
1037
+ "usage"
1038
+ ],
1039
+ "additionalProperties": false
1040
+ },
1041
+ {
1042
+ "type": "object",
1043
+ "properties": {
1044
+ "id": {
1045
+ "type": "number"
1046
+ },
1047
+ "type": {
1048
+ "type": "string",
1049
+ "const": "error"
1050
+ },
1051
+ "message": {
1052
+ "type": "string"
1053
+ }
1054
+ },
1055
+ "required": [
1056
+ "id",
1057
+ "type",
1058
+ "message"
1059
+ ],
1060
+ "additionalProperties": false
1061
+ },
1062
+ {
1063
+ "type": "object",
1064
+ "properties": {
1065
+ "id": {
1066
+ "type": "number"
1067
+ },
1068
+ "type": {
1069
+ "type": "string",
1070
+ "const": "pong"
1071
+ }
1072
+ },
1073
+ "required": [
1074
+ "id",
1075
+ "type"
1076
+ ],
1077
+ "additionalProperties": false
1078
+ },
1079
+ {
1080
+ "type": "object",
1081
+ "properties": {
1082
+ "id": {
1083
+ "type": "number"
1084
+ },
1085
+ "type": {
1086
+ "type": "string",
1087
+ "const": "task-update"
1088
+ },
1089
+ "tasks": {
1090
+ "type": "array",
1091
+ "items": {
1092
+ "type": "object",
1093
+ "properties": {
1094
+ "id": {
1095
+ "type": "string"
1096
+ },
1097
+ "content": {
1098
+ "type": "string"
1099
+ },
1100
+ "status": {
1101
+ "type": "string",
1102
+ "enum": [
1103
+ "pending",
1104
+ "in_progress",
1105
+ "completed"
1106
+ ]
1107
+ },
1108
+ "priority": {
1109
+ "type": "string",
1110
+ "enum": [
1111
+ "low",
1112
+ "medium",
1113
+ "high"
1114
+ ]
1115
+ }
1116
+ },
1117
+ "required": [
1118
+ "id",
1119
+ "content",
1120
+ "status"
1121
+ ],
1122
+ "additionalProperties": false
1123
+ }
1124
+ }
1125
+ },
1126
+ "required": [
1127
+ "id",
1128
+ "type",
1129
+ "tasks"
1130
+ ],
1131
+ "additionalProperties": false
1132
+ },
1133
+ {
1134
+ "type": "object",
1135
+ "properties": {
1136
+ "id": {
1137
+ "type": "number"
1138
+ },
1139
+ "type": {
1140
+ "type": "string",
1141
+ "const": "file-change"
1142
+ },
1143
+ "event": {
1144
+ "type": "string",
1145
+ "enum": [
1146
+ "create",
1147
+ "modify",
1148
+ "delete"
1149
+ ]
1150
+ },
1151
+ "path": {
1152
+ "type": "string"
1153
+ },
1154
+ "content": {
1155
+ "type": "string"
1156
+ }
1157
+ },
1158
+ "required": [
1159
+ "id",
1160
+ "type",
1161
+ "event",
1162
+ "path"
1163
+ ],
1164
+ "additionalProperties": false
1165
+ }
1166
+ ]
1167
+ },
1168
+ "bridgeInboundMessage": {
1169
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1170
+ "oneOf": [
1171
+ {
1172
+ "oneOf": [
1173
+ {
1174
+ "type": "object",
1175
+ "properties": {
1176
+ "id": {
1177
+ "type": "number"
1178
+ },
1179
+ "type": {
1180
+ "type": "string",
1181
+ "const": "text-delta"
1182
+ },
1183
+ "delta": {
1184
+ "type": "string"
1185
+ }
1186
+ },
1187
+ "required": [
1188
+ "id",
1189
+ "type",
1190
+ "delta"
1191
+ ],
1192
+ "additionalProperties": false
1193
+ },
1194
+ {
1195
+ "type": "object",
1196
+ "properties": {
1197
+ "id": {
1198
+ "type": "number"
1199
+ },
1200
+ "type": {
1201
+ "type": "string",
1202
+ "const": "reasoning-delta"
1203
+ },
1204
+ "delta": {
1205
+ "type": "string"
1206
+ }
1207
+ },
1208
+ "required": [
1209
+ "id",
1210
+ "type",
1211
+ "delta"
1212
+ ],
1213
+ "additionalProperties": false
1214
+ },
1215
+ {
1216
+ "type": "object",
1217
+ "properties": {
1218
+ "id": {
1219
+ "type": "number"
1220
+ },
1221
+ "type": {
1222
+ "type": "string",
1223
+ "const": "subagent-start"
1224
+ },
1225
+ "agentName": {
1226
+ "type": "string"
1227
+ },
1228
+ "parentToolCallId": {
1229
+ "type": "string"
1230
+ }
1231
+ },
1232
+ "required": [
1233
+ "id",
1234
+ "type",
1235
+ "agentName",
1236
+ "parentToolCallId"
1237
+ ],
1238
+ "additionalProperties": false
1239
+ },
1240
+ {
1241
+ "type": "object",
1242
+ "properties": {
1243
+ "id": {
1244
+ "type": "number"
1245
+ },
1246
+ "type": {
1247
+ "type": "string",
1248
+ "const": "subagent-finish"
1249
+ },
1250
+ "agentName": {
1251
+ "type": "string"
1252
+ },
1253
+ "parentToolCallId": {
1254
+ "type": "string"
1255
+ },
1256
+ "output": {},
1257
+ "usage": {
1258
+ "type": "object",
1259
+ "properties": {
1260
+ "inputTokens": {
1261
+ "type": "number"
1262
+ },
1263
+ "outputTokens": {
1264
+ "type": "number"
1265
+ },
1266
+ "costUsd": {
1267
+ "type": "number"
1268
+ }
1269
+ },
1270
+ "required": [
1271
+ "inputTokens",
1272
+ "outputTokens"
1273
+ ],
1274
+ "additionalProperties": false
1275
+ }
1276
+ },
1277
+ "required": [
1278
+ "id",
1279
+ "type",
1280
+ "agentName",
1281
+ "parentToolCallId"
1282
+ ],
1283
+ "additionalProperties": false
1284
+ },
1285
+ {
1286
+ "type": "object",
1287
+ "properties": {
1288
+ "id": {
1289
+ "type": "number"
1290
+ },
1291
+ "type": {
1292
+ "type": "string",
1293
+ "const": "tool-call"
1294
+ },
1295
+ "requestId": {
1296
+ "type": "string"
1297
+ },
1298
+ "toolName": {
1299
+ "type": "string"
1300
+ },
1301
+ "toolCallId": {
1302
+ "type": "string"
1303
+ },
1304
+ "input": {},
1305
+ "observeOnly": {
1306
+ "type": "boolean"
1307
+ }
1308
+ },
1309
+ "required": [
1310
+ "id",
1311
+ "type",
1312
+ "requestId",
1313
+ "toolName",
1314
+ "toolCallId",
1315
+ "input"
1316
+ ],
1317
+ "additionalProperties": false
1318
+ },
1319
+ {
1320
+ "type": "object",
1321
+ "properties": {
1322
+ "id": {
1323
+ "type": "number"
1324
+ },
1325
+ "type": {
1326
+ "type": "string",
1327
+ "const": "tool-result"
1328
+ },
1329
+ "toolName": {
1330
+ "type": "string"
1331
+ },
1332
+ "toolCallId": {
1333
+ "type": "string"
1334
+ },
1335
+ "output": {}
1336
+ },
1337
+ "required": [
1338
+ "id",
1339
+ "type",
1340
+ "toolName",
1341
+ "toolCallId",
1342
+ "output"
1343
+ ],
1344
+ "additionalProperties": false
1345
+ },
1346
+ {
1347
+ "type": "object",
1348
+ "properties": {
1349
+ "id": {
1350
+ "type": "number"
1351
+ },
1352
+ "type": {
1353
+ "type": "string",
1354
+ "const": "host-approval-request"
1355
+ },
1356
+ "approvalId": {
1357
+ "type": "string"
1358
+ },
1359
+ "requestId": {
1360
+ "type": "string"
1361
+ },
1362
+ "toolCallId": {
1363
+ "type": "string"
1364
+ },
1365
+ "host": {
1366
+ "type": "string"
1367
+ },
1368
+ "access": {
1369
+ "type": "string",
1370
+ "enum": [
1371
+ "proxy",
1372
+ "direct"
1373
+ ]
1374
+ },
1375
+ "protocol": {
1376
+ "type": "string",
1377
+ "enum": [
1378
+ "http",
1379
+ "https",
1380
+ "connect"
1381
+ ]
1382
+ },
1383
+ "port": {
1384
+ "type": "number"
1385
+ },
1386
+ "url": {
1387
+ "type": "string"
1388
+ }
1389
+ },
1390
+ "required": [
1391
+ "id",
1392
+ "type",
1393
+ "approvalId",
1394
+ "requestId",
1395
+ "toolCallId",
1396
+ "host",
1397
+ "access",
1398
+ "protocol"
1399
+ ],
1400
+ "additionalProperties": false
1401
+ },
1402
+ {
1403
+ "type": "object",
1404
+ "properties": {
1405
+ "id": {
1406
+ "type": "number"
1407
+ },
1408
+ "type": {
1409
+ "type": "string",
1410
+ "const": "step-finish"
1411
+ },
1412
+ "stepIndex": {
1413
+ "type": "number"
1414
+ }
1415
+ },
1416
+ "required": [
1417
+ "id",
1418
+ "type",
1419
+ "stepIndex"
1420
+ ],
1421
+ "additionalProperties": false
1422
+ },
1423
+ {
1424
+ "type": "object",
1425
+ "properties": {
1426
+ "id": {
1427
+ "type": "number"
1428
+ },
1429
+ "type": {
1430
+ "type": "string",
1431
+ "const": "finish"
1432
+ },
1433
+ "finishReason": {
1434
+ "type": "string"
1435
+ },
1436
+ "usage": {
1437
+ "type": "object",
1438
+ "properties": {
1439
+ "inputTokens": {
1440
+ "type": "number"
1441
+ },
1442
+ "outputTokens": {
1443
+ "type": "number"
1444
+ },
1445
+ "costUsd": {
1446
+ "type": "number"
1447
+ }
1448
+ },
1449
+ "required": [
1450
+ "inputTokens",
1451
+ "outputTokens"
1452
+ ],
1453
+ "additionalProperties": false
1454
+ }
1455
+ },
1456
+ "required": [
1457
+ "id",
1458
+ "type",
1459
+ "finishReason",
1460
+ "usage"
1461
+ ],
1462
+ "additionalProperties": false
1463
+ },
1464
+ {
1465
+ "type": "object",
1466
+ "properties": {
1467
+ "id": {
1468
+ "type": "number"
1469
+ },
1470
+ "type": {
1471
+ "type": "string",
1472
+ "const": "error"
1473
+ },
1474
+ "message": {
1475
+ "type": "string"
1476
+ }
1477
+ },
1478
+ "required": [
1479
+ "id",
1480
+ "type",
1481
+ "message"
1482
+ ],
1483
+ "additionalProperties": false
1484
+ },
1485
+ {
1486
+ "type": "object",
1487
+ "properties": {
1488
+ "id": {
1489
+ "type": "number"
1490
+ },
1491
+ "type": {
1492
+ "type": "string",
1493
+ "const": "pong"
1494
+ }
1495
+ },
1496
+ "required": [
1497
+ "id",
1498
+ "type"
1499
+ ],
1500
+ "additionalProperties": false
1501
+ },
1502
+ {
1503
+ "type": "object",
1504
+ "properties": {
1505
+ "id": {
1506
+ "type": "number"
1507
+ },
1508
+ "type": {
1509
+ "type": "string",
1510
+ "const": "task-update"
1511
+ },
1512
+ "tasks": {
1513
+ "type": "array",
1514
+ "items": {
1515
+ "type": "object",
1516
+ "properties": {
1517
+ "id": {
1518
+ "type": "string"
1519
+ },
1520
+ "content": {
1521
+ "type": "string"
1522
+ },
1523
+ "status": {
1524
+ "type": "string",
1525
+ "enum": [
1526
+ "pending",
1527
+ "in_progress",
1528
+ "completed"
1529
+ ]
1530
+ },
1531
+ "priority": {
1532
+ "type": "string",
1533
+ "enum": [
1534
+ "low",
1535
+ "medium",
1536
+ "high"
1537
+ ]
1538
+ }
1539
+ },
1540
+ "required": [
1541
+ "id",
1542
+ "content",
1543
+ "status"
1544
+ ],
1545
+ "additionalProperties": false
1546
+ }
1547
+ }
1548
+ },
1549
+ "required": [
1550
+ "id",
1551
+ "type",
1552
+ "tasks"
1553
+ ],
1554
+ "additionalProperties": false
1555
+ },
1556
+ {
1557
+ "type": "object",
1558
+ "properties": {
1559
+ "id": {
1560
+ "type": "number"
1561
+ },
1562
+ "type": {
1563
+ "type": "string",
1564
+ "const": "file-change"
1565
+ },
1566
+ "event": {
1567
+ "type": "string",
1568
+ "enum": [
1569
+ "create",
1570
+ "modify",
1571
+ "delete"
1572
+ ]
1573
+ },
1574
+ "path": {
1575
+ "type": "string"
1576
+ },
1577
+ "content": {
1578
+ "type": "string"
1579
+ }
1580
+ },
1581
+ "required": [
1582
+ "id",
1583
+ "type",
1584
+ "event",
1585
+ "path"
1586
+ ],
1587
+ "additionalProperties": false
1588
+ }
1589
+ ]
1590
+ },
1591
+ {
1592
+ "type": "object",
1593
+ "properties": {
1594
+ "type": {
1595
+ "type": "string",
1596
+ "const": "debug"
1597
+ },
1598
+ "message": {
1599
+ "type": "string"
1600
+ }
1601
+ },
1602
+ "required": [
1603
+ "type",
1604
+ "message"
1605
+ ],
1606
+ "additionalProperties": false
1607
+ },
1608
+ {
1609
+ "type": "object",
1610
+ "properties": {
1611
+ "type": {
1612
+ "type": "string",
1613
+ "const": "debug-event"
1614
+ },
1615
+ "level": {
1616
+ "type": "string",
1617
+ "enum": [
1618
+ "error",
1619
+ "warn",
1620
+ "info",
1621
+ "debug",
1622
+ "trace"
1623
+ ]
1624
+ },
1625
+ "subsystem": {
1626
+ "type": "string"
1627
+ },
1628
+ "event": {
1629
+ "type": "string"
1630
+ },
1631
+ "status": {
1632
+ "type": "string",
1633
+ "enum": [
1634
+ "start",
1635
+ "ok",
1636
+ "error",
1637
+ "timeout",
1638
+ "retry",
1639
+ "blocked",
1640
+ "slow"
1641
+ ]
1642
+ },
1643
+ "durationMs": {
1644
+ "type": "number"
1645
+ },
1646
+ "traceId": {
1647
+ "type": "string"
1648
+ },
1649
+ "spanId": {
1650
+ "type": "string"
1651
+ },
1652
+ "parentSpanId": {
1653
+ "type": "string"
1654
+ },
1655
+ "attrs": {
1656
+ "type": "object",
1657
+ "propertyNames": {
1658
+ "type": "string"
1659
+ },
1660
+ "additionalProperties": {}
1661
+ },
1662
+ "error": {
1663
+ "type": "object",
1664
+ "properties": {
1665
+ "name": {
1666
+ "type": "string"
1667
+ },
1668
+ "message": {
1669
+ "type": "string"
1670
+ },
1671
+ "stack": {
1672
+ "type": "string"
1673
+ },
1674
+ "cause": {
1675
+ "type": "string"
1676
+ }
1677
+ },
1678
+ "required": [
1679
+ "message"
1680
+ ],
1681
+ "additionalProperties": false
1682
+ }
1683
+ },
1684
+ "required": [
1685
+ "type",
1686
+ "level",
1687
+ "subsystem",
1688
+ "event"
1689
+ ],
1690
+ "additionalProperties": false
1691
+ },
1692
+ {
1693
+ "type": "object",
1694
+ "properties": {
1695
+ "type": {
1696
+ "type": "string",
1697
+ "const": "sandbox-log"
1698
+ },
1699
+ "source": {
1700
+ "type": "string"
1701
+ },
1702
+ "stream": {
1703
+ "type": "string",
1704
+ "enum": [
1705
+ "stdout",
1706
+ "stderr"
1707
+ ]
1708
+ },
1709
+ "line": {
1710
+ "type": "string"
1711
+ }
1712
+ },
1713
+ "required": [
1714
+ "type",
1715
+ "source",
1716
+ "stream",
1717
+ "line"
1718
+ ],
1719
+ "additionalProperties": false
1720
+ },
1721
+ {
1722
+ "type": "object",
1723
+ "properties": {
1724
+ "type": {
1725
+ "type": "string",
1726
+ "const": "prepare-step-request"
1727
+ },
1728
+ "stepNumber": {
1729
+ "type": "number"
1730
+ }
1731
+ },
1732
+ "required": [
1733
+ "type",
1734
+ "stepNumber"
1735
+ ],
1736
+ "additionalProperties": false
1737
+ }
1738
+ ]
1739
+ }
1740
+ }
1741
+ }