@roll-agent/relay-protocol 0.0.0

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,2914 @@
1
+ {
2
+ "anyOf": [
3
+ {
4
+ "readOnly": true,
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "device.connect"
10
+ },
11
+ "protocolVersion": {
12
+ "type": "string",
13
+ "const": "1.0"
14
+ },
15
+ "deviceId": {
16
+ "type": "string",
17
+ "format": "uuid",
18
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
19
+ },
20
+ "pairingToken": {
21
+ "type": "string",
22
+ "minLength": 16
23
+ }
24
+ },
25
+ "required": ["type", "protocolVersion", "deviceId", "pairingToken"],
26
+ "additionalProperties": false
27
+ },
28
+ {
29
+ "readOnly": true,
30
+ "type": "object",
31
+ "properties": {
32
+ "type": {
33
+ "type": "string",
34
+ "const": "runtime.request"
35
+ },
36
+ "requestId": {
37
+ "type": "string",
38
+ "format": "uuid",
39
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
40
+ },
41
+ "workspaceId": {
42
+ "type": "string",
43
+ "format": "uuid",
44
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
45
+ },
46
+ "method": {
47
+ "type": "string",
48
+ "enum": [
49
+ "initialize",
50
+ "thread.list",
51
+ "thread.create",
52
+ "thread.open",
53
+ "thread.snapshot",
54
+ "thread.rename",
55
+ "thread.delete",
56
+ "thread.detach",
57
+ "thread.capabilities",
58
+ "turn.start",
59
+ "turn.cancel",
60
+ "approval.respond",
61
+ "operation.get",
62
+ "approval.candidate"
63
+ ]
64
+ },
65
+ "params": {
66
+ "$ref": "#/$defs/sharedSchema0"
67
+ }
68
+ },
69
+ "required": ["type", "requestId", "workspaceId", "method", "params"],
70
+ "additionalProperties": false
71
+ },
72
+ {
73
+ "readOnly": true,
74
+ "type": "object",
75
+ "properties": {
76
+ "type": {
77
+ "type": "string",
78
+ "const": "runtime.response"
79
+ },
80
+ "requestId": {
81
+ "type": "string",
82
+ "format": "uuid",
83
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
84
+ },
85
+ "workspaceId": {
86
+ "type": "string",
87
+ "format": "uuid",
88
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
89
+ },
90
+ "result": {
91
+ "$ref": "#/$defs/sharedSchema0"
92
+ },
93
+ "error": {
94
+ "readOnly": true,
95
+ "type": "object",
96
+ "properties": {
97
+ "code": {
98
+ "type": "string",
99
+ "minLength": 1
100
+ },
101
+ "message": {
102
+ "type": "string"
103
+ },
104
+ "retryable": {
105
+ "type": "boolean"
106
+ }
107
+ },
108
+ "required": ["code", "message", "retryable"],
109
+ "additionalProperties": false
110
+ }
111
+ },
112
+ "required": ["type", "requestId", "workspaceId"],
113
+ "additionalProperties": false
114
+ },
115
+ {
116
+ "readOnly": true,
117
+ "type": "object",
118
+ "properties": {
119
+ "type": {
120
+ "type": "string",
121
+ "const": "runtime.event"
122
+ },
123
+ "workspaceId": {
124
+ "type": "string",
125
+ "format": "uuid",
126
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
127
+ },
128
+ "relaySequence": {
129
+ "type": "integer",
130
+ "minimum": 0,
131
+ "maximum": 9007199254740991
132
+ },
133
+ "event": {
134
+ "readOnly": true,
135
+ "type": "object",
136
+ "properties": {
137
+ "protocolVersion": {
138
+ "type": "string",
139
+ "enum": ["1.1", "1.0"]
140
+ },
141
+ "runtimeInstanceId": {
142
+ "type": "string",
143
+ "format": "uuid",
144
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
145
+ },
146
+ "sequence": {
147
+ "type": "integer",
148
+ "minimum": 0,
149
+ "maximum": 9007199254740991
150
+ },
151
+ "timestamp": {
152
+ "type": "string",
153
+ "format": "date-time",
154
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"
155
+ },
156
+ "threadId": {
157
+ "type": "string",
158
+ "format": "uuid",
159
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
160
+ },
161
+ "turnId": {
162
+ "type": "string",
163
+ "format": "uuid",
164
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
165
+ },
166
+ "event": {
167
+ "anyOf": [
168
+ {
169
+ "readOnly": true,
170
+ "type": "object",
171
+ "properties": {
172
+ "type": {
173
+ "type": "string",
174
+ "const": "turn.started"
175
+ }
176
+ },
177
+ "required": ["type"],
178
+ "additionalProperties": false
179
+ },
180
+ {
181
+ "readOnly": true,
182
+ "type": "object",
183
+ "properties": {
184
+ "type": {
185
+ "type": "string",
186
+ "const": "message.started"
187
+ },
188
+ "streamId": {
189
+ "type": "string",
190
+ "format": "uuid",
191
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
192
+ }
193
+ },
194
+ "required": ["type", "streamId"],
195
+ "additionalProperties": false
196
+ },
197
+ {
198
+ "readOnly": true,
199
+ "type": "object",
200
+ "properties": {
201
+ "type": {
202
+ "type": "string",
203
+ "const": "message.delta"
204
+ },
205
+ "streamId": {
206
+ "type": "string",
207
+ "format": "uuid",
208
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
209
+ },
210
+ "delta": {
211
+ "type": "string"
212
+ }
213
+ },
214
+ "required": ["type", "streamId", "delta"],
215
+ "additionalProperties": false
216
+ },
217
+ {
218
+ "readOnly": true,
219
+ "type": "object",
220
+ "properties": {
221
+ "type": {
222
+ "type": "string",
223
+ "const": "message.completed"
224
+ },
225
+ "streamId": {
226
+ "type": "string",
227
+ "format": "uuid",
228
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
229
+ },
230
+ "text": {
231
+ "type": "string"
232
+ }
233
+ },
234
+ "required": ["type", "streamId", "text"],
235
+ "additionalProperties": false
236
+ },
237
+ {
238
+ "readOnly": true,
239
+ "type": "object",
240
+ "properties": {
241
+ "type": {
242
+ "type": "string",
243
+ "const": "reasoning.summary.delta"
244
+ },
245
+ "reasoningId": {
246
+ "type": "string",
247
+ "minLength": 1
248
+ },
249
+ "delta": {
250
+ "type": "string"
251
+ }
252
+ },
253
+ "required": ["type", "reasoningId", "delta"],
254
+ "additionalProperties": false
255
+ },
256
+ {
257
+ "readOnly": true,
258
+ "type": "object",
259
+ "properties": {
260
+ "type": {
261
+ "type": "string",
262
+ "const": "tool.started"
263
+ },
264
+ "toolCallId": {
265
+ "type": "string",
266
+ "minLength": 1
267
+ },
268
+ "agentName": {
269
+ "type": "string",
270
+ "minLength": 1
271
+ },
272
+ "toolName": {
273
+ "type": "string",
274
+ "minLength": 1
275
+ },
276
+ "input": {
277
+ "$ref": "#/$defs/sharedSchema0"
278
+ }
279
+ },
280
+ "required": [
281
+ "type",
282
+ "toolCallId",
283
+ "agentName",
284
+ "toolName",
285
+ "input"
286
+ ],
287
+ "additionalProperties": false
288
+ },
289
+ {
290
+ "readOnly": true,
291
+ "type": "object",
292
+ "properties": {
293
+ "type": {
294
+ "type": "string",
295
+ "const": "tool.output"
296
+ },
297
+ "toolCallId": {
298
+ "type": "string",
299
+ "minLength": 1
300
+ },
301
+ "agentName": {
302
+ "type": "string",
303
+ "minLength": 1
304
+ },
305
+ "toolName": {
306
+ "type": "string",
307
+ "minLength": 1
308
+ },
309
+ "stream": {
310
+ "type": "string",
311
+ "enum": ["stdout", "stderr"]
312
+ },
313
+ "delta": {
314
+ "type": "string"
315
+ }
316
+ },
317
+ "required": [
318
+ "type",
319
+ "toolCallId",
320
+ "agentName",
321
+ "toolName",
322
+ "stream",
323
+ "delta"
324
+ ],
325
+ "additionalProperties": false
326
+ },
327
+ {
328
+ "readOnly": true,
329
+ "type": "object",
330
+ "properties": {
331
+ "type": {
332
+ "type": "string",
333
+ "const": "tool.completed"
334
+ },
335
+ "toolCallId": {
336
+ "type": "string",
337
+ "minLength": 1
338
+ },
339
+ "agentName": {
340
+ "type": "string",
341
+ "minLength": 1
342
+ },
343
+ "toolName": {
344
+ "type": "string",
345
+ "minLength": 1
346
+ },
347
+ "operationId": {
348
+ "type": "string",
349
+ "format": "uuid",
350
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
351
+ },
352
+ "outcome": {
353
+ "readOnly": true,
354
+ "type": "object",
355
+ "properties": {
356
+ "kind": {
357
+ "type": "string",
358
+ "enum": [
359
+ "success",
360
+ "user_rejected",
361
+ "policy_denied",
362
+ "invalid_input",
363
+ "cancelled",
364
+ "tool_failed"
365
+ ]
366
+ },
367
+ "reason": {
368
+ "type": "string"
369
+ }
370
+ },
371
+ "required": ["kind"],
372
+ "additionalProperties": false
373
+ },
374
+ "display": {
375
+ "$ref": "#/$defs/sharedSchema0"
376
+ }
377
+ },
378
+ "required": [
379
+ "type",
380
+ "toolCallId",
381
+ "agentName",
382
+ "toolName",
383
+ "display"
384
+ ],
385
+ "additionalProperties": false
386
+ },
387
+ {
388
+ "readOnly": true,
389
+ "type": "object",
390
+ "properties": {
391
+ "type": {
392
+ "type": "string",
393
+ "const": "approval.required"
394
+ },
395
+ "approval": {
396
+ "readOnly": true,
397
+ "type": "object",
398
+ "properties": {
399
+ "id": {
400
+ "type": "string",
401
+ "format": "uuid",
402
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
403
+ },
404
+ "turnId": {
405
+ "type": "string",
406
+ "format": "uuid",
407
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
408
+ },
409
+ "agentName": {
410
+ "type": "string",
411
+ "minLength": 1
412
+ },
413
+ "toolName": {
414
+ "type": "string",
415
+ "minLength": 1
416
+ },
417
+ "preview": {
418
+ "$ref": "#/$defs/sharedSchema0"
419
+ },
420
+ "reason": {
421
+ "type": "string"
422
+ }
423
+ },
424
+ "required": [
425
+ "id",
426
+ "turnId",
427
+ "agentName",
428
+ "toolName",
429
+ "preview"
430
+ ],
431
+ "additionalProperties": false
432
+ }
433
+ },
434
+ "required": ["type", "approval"],
435
+ "additionalProperties": false
436
+ },
437
+ {
438
+ "readOnly": true,
439
+ "type": "object",
440
+ "properties": {
441
+ "type": {
442
+ "type": "string",
443
+ "const": "approval.resolved"
444
+ },
445
+ "approvalId": {
446
+ "type": "string",
447
+ "format": "uuid",
448
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
449
+ },
450
+ "resolution": {
451
+ "anyOf": [
452
+ {
453
+ "readOnly": true,
454
+ "type": "object",
455
+ "properties": {
456
+ "status": {
457
+ "type": "string",
458
+ "const": "resolved"
459
+ },
460
+ "decision": {
461
+ "type": "string",
462
+ "const": "approve"
463
+ }
464
+ },
465
+ "required": ["status", "decision"],
466
+ "additionalProperties": false
467
+ },
468
+ {
469
+ "readOnly": true,
470
+ "type": "object",
471
+ "properties": {
472
+ "status": {
473
+ "type": "string",
474
+ "const": "resolved"
475
+ },
476
+ "decision": {
477
+ "type": "string",
478
+ "const": "reject"
479
+ },
480
+ "reason": {
481
+ "type": "string",
482
+ "minLength": 1
483
+ }
484
+ },
485
+ "required": ["status", "decision"],
486
+ "additionalProperties": false
487
+ },
488
+ {
489
+ "readOnly": true,
490
+ "type": "object",
491
+ "properties": {
492
+ "status": {
493
+ "type": "string",
494
+ "const": "cancelled"
495
+ },
496
+ "reason": {
497
+ "type": "string",
498
+ "minLength": 1
499
+ }
500
+ },
501
+ "required": ["status", "reason"],
502
+ "additionalProperties": false
503
+ },
504
+ {
505
+ "readOnly": true,
506
+ "type": "object",
507
+ "properties": {
508
+ "status": {
509
+ "type": "string",
510
+ "const": "expired"
511
+ },
512
+ "reason": {
513
+ "type": "string",
514
+ "minLength": 1
515
+ }
516
+ },
517
+ "required": ["status"],
518
+ "additionalProperties": false
519
+ }
520
+ ]
521
+ }
522
+ },
523
+ "required": ["type", "approvalId", "resolution"],
524
+ "additionalProperties": false
525
+ },
526
+ {
527
+ "readOnly": true,
528
+ "type": "object",
529
+ "properties": {
530
+ "type": {
531
+ "type": "string",
532
+ "const": "turn.completed"
533
+ }
534
+ },
535
+ "required": ["type"],
536
+ "additionalProperties": false
537
+ },
538
+ {
539
+ "readOnly": true,
540
+ "type": "object",
541
+ "properties": {
542
+ "type": {
543
+ "type": "string",
544
+ "const": "turn.cancelled"
545
+ },
546
+ "reason": {
547
+ "type": "string"
548
+ },
549
+ "message": {
550
+ "type": "string"
551
+ }
552
+ },
553
+ "required": ["type", "reason", "message"],
554
+ "additionalProperties": false
555
+ },
556
+ {
557
+ "readOnly": true,
558
+ "type": "object",
559
+ "properties": {
560
+ "type": {
561
+ "type": "string",
562
+ "const": "turn.failed"
563
+ },
564
+ "stage": {
565
+ "type": "string",
566
+ "enum": ["bootstrap", "plan", "execute"]
567
+ },
568
+ "message": {
569
+ "type": "string"
570
+ }
571
+ },
572
+ "required": ["type", "stage", "message"],
573
+ "additionalProperties": false
574
+ },
575
+ {
576
+ "readOnly": true,
577
+ "type": "object",
578
+ "properties": {
579
+ "type": {
580
+ "type": "string",
581
+ "const": "capabilities.changed"
582
+ }
583
+ },
584
+ "required": ["type"],
585
+ "additionalProperties": false
586
+ }
587
+ ]
588
+ }
589
+ },
590
+ "required": [
591
+ "protocolVersion",
592
+ "runtimeInstanceId",
593
+ "sequence",
594
+ "timestamp",
595
+ "threadId",
596
+ "event"
597
+ ],
598
+ "additionalProperties": false
599
+ }
600
+ },
601
+ "required": ["type", "workspaceId", "relaySequence", "event"],
602
+ "additionalProperties": false
603
+ },
604
+ {
605
+ "readOnly": true,
606
+ "type": "object",
607
+ "properties": {
608
+ "type": {
609
+ "type": "string",
610
+ "const": "runtime.ack"
611
+ },
612
+ "workspaceId": {
613
+ "type": "string",
614
+ "format": "uuid",
615
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
616
+ },
617
+ "throughRelaySequence": {
618
+ "type": "integer",
619
+ "minimum": -1,
620
+ "maximum": 9007199254740991
621
+ }
622
+ },
623
+ "required": ["type", "workspaceId", "throughRelaySequence"],
624
+ "additionalProperties": false
625
+ },
626
+ {
627
+ "readOnly": true,
628
+ "type": "object",
629
+ "properties": {
630
+ "type": {
631
+ "type": "string",
632
+ "const": "runtime.gap"
633
+ },
634
+ "workspaceId": {
635
+ "type": "string",
636
+ "format": "uuid",
637
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
638
+ },
639
+ "fromRelaySequence": {
640
+ "type": "integer",
641
+ "minimum": 0,
642
+ "maximum": 9007199254740991
643
+ },
644
+ "throughRelaySequence": {
645
+ "type": "integer",
646
+ "minimum": 0,
647
+ "maximum": 9007199254740991
648
+ },
649
+ "recovery": {
650
+ "type": "string",
651
+ "const": "thread.snapshot"
652
+ }
653
+ },
654
+ "required": [
655
+ "type",
656
+ "workspaceId",
657
+ "fromRelaySequence",
658
+ "throughRelaySequence",
659
+ "recovery"
660
+ ],
661
+ "additionalProperties": false
662
+ },
663
+ {
664
+ "readOnly": true,
665
+ "type": "object",
666
+ "properties": {
667
+ "type": {
668
+ "type": "string",
669
+ "const": "runtime.encrypted"
670
+ },
671
+ "workspaceId": {
672
+ "type": "string",
673
+ "format": "uuid",
674
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
675
+ },
676
+ "envelopeId": {
677
+ "type": "string",
678
+ "format": "uuid",
679
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
680
+ },
681
+ "payloadKind": {
682
+ "type": "string",
683
+ "enum": ["request", "response", "event"]
684
+ },
685
+ "requestId": {
686
+ "type": "string",
687
+ "format": "uuid",
688
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
689
+ },
690
+ "relaySequence": {
691
+ "type": "integer",
692
+ "minimum": 0,
693
+ "maximum": 9007199254740991
694
+ },
695
+ "algorithm": {
696
+ "type": "string",
697
+ "minLength": 1
698
+ },
699
+ "nonce": {
700
+ "type": "string",
701
+ "minLength": 1
702
+ },
703
+ "ciphertext": {
704
+ "type": "string",
705
+ "minLength": 1
706
+ }
707
+ },
708
+ "required": [
709
+ "type",
710
+ "workspaceId",
711
+ "envelopeId",
712
+ "payloadKind",
713
+ "algorithm",
714
+ "nonce",
715
+ "ciphertext"
716
+ ],
717
+ "additionalProperties": false
718
+ }
719
+ ],
720
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
721
+ "$id": "https://roll-agent.dev/schemas/relay-protocol/1.0",
722
+ "title": "Roll Relay Protocol v1.0",
723
+ "description": "Versioned Companion Relay frames shared by Browser, Cloud Relay and Companion.",
724
+ "$defs": {
725
+ "relayMessage": {
726
+ "anyOf": [
727
+ {
728
+ "readOnly": true,
729
+ "type": "object",
730
+ "properties": {
731
+ "type": {
732
+ "type": "string",
733
+ "const": "device.connect"
734
+ },
735
+ "protocolVersion": {
736
+ "type": "string",
737
+ "const": "1.0"
738
+ },
739
+ "deviceId": {
740
+ "type": "string",
741
+ "format": "uuid",
742
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
743
+ },
744
+ "pairingToken": {
745
+ "type": "string",
746
+ "minLength": 16
747
+ }
748
+ },
749
+ "required": ["type", "protocolVersion", "deviceId", "pairingToken"],
750
+ "additionalProperties": false
751
+ },
752
+ {
753
+ "readOnly": true,
754
+ "type": "object",
755
+ "properties": {
756
+ "type": {
757
+ "type": "string",
758
+ "const": "runtime.request"
759
+ },
760
+ "requestId": {
761
+ "type": "string",
762
+ "format": "uuid",
763
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
764
+ },
765
+ "workspaceId": {
766
+ "type": "string",
767
+ "format": "uuid",
768
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
769
+ },
770
+ "method": {
771
+ "type": "string",
772
+ "enum": [
773
+ "initialize",
774
+ "thread.list",
775
+ "thread.create",
776
+ "thread.open",
777
+ "thread.snapshot",
778
+ "thread.rename",
779
+ "thread.delete",
780
+ "thread.detach",
781
+ "thread.capabilities",
782
+ "turn.start",
783
+ "turn.cancel",
784
+ "approval.respond",
785
+ "operation.get",
786
+ "approval.candidate"
787
+ ]
788
+ },
789
+ "params": {
790
+ "$ref": "#/$defs/sharedSchema0"
791
+ }
792
+ },
793
+ "required": ["type", "requestId", "workspaceId", "method", "params"],
794
+ "additionalProperties": false
795
+ },
796
+ {
797
+ "readOnly": true,
798
+ "type": "object",
799
+ "properties": {
800
+ "type": {
801
+ "type": "string",
802
+ "const": "runtime.response"
803
+ },
804
+ "requestId": {
805
+ "type": "string",
806
+ "format": "uuid",
807
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
808
+ },
809
+ "workspaceId": {
810
+ "type": "string",
811
+ "format": "uuid",
812
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
813
+ },
814
+ "result": {
815
+ "$ref": "#/$defs/sharedSchema0"
816
+ },
817
+ "error": {
818
+ "readOnly": true,
819
+ "type": "object",
820
+ "properties": {
821
+ "code": {
822
+ "type": "string",
823
+ "minLength": 1
824
+ },
825
+ "message": {
826
+ "type": "string"
827
+ },
828
+ "retryable": {
829
+ "type": "boolean"
830
+ }
831
+ },
832
+ "required": ["code", "message", "retryable"],
833
+ "additionalProperties": false
834
+ }
835
+ },
836
+ "required": ["type", "requestId", "workspaceId"],
837
+ "additionalProperties": false
838
+ },
839
+ {
840
+ "readOnly": true,
841
+ "type": "object",
842
+ "properties": {
843
+ "type": {
844
+ "type": "string",
845
+ "const": "runtime.event"
846
+ },
847
+ "workspaceId": {
848
+ "type": "string",
849
+ "format": "uuid",
850
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
851
+ },
852
+ "relaySequence": {
853
+ "type": "integer",
854
+ "minimum": 0,
855
+ "maximum": 9007199254740991
856
+ },
857
+ "event": {
858
+ "readOnly": true,
859
+ "type": "object",
860
+ "properties": {
861
+ "protocolVersion": {
862
+ "type": "string",
863
+ "enum": ["1.1", "1.0"]
864
+ },
865
+ "runtimeInstanceId": {
866
+ "type": "string",
867
+ "format": "uuid",
868
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
869
+ },
870
+ "sequence": {
871
+ "type": "integer",
872
+ "minimum": 0,
873
+ "maximum": 9007199254740991
874
+ },
875
+ "timestamp": {
876
+ "type": "string",
877
+ "format": "date-time",
878
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"
879
+ },
880
+ "threadId": {
881
+ "type": "string",
882
+ "format": "uuid",
883
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
884
+ },
885
+ "turnId": {
886
+ "type": "string",
887
+ "format": "uuid",
888
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
889
+ },
890
+ "event": {
891
+ "anyOf": [
892
+ {
893
+ "readOnly": true,
894
+ "type": "object",
895
+ "properties": {
896
+ "type": {
897
+ "type": "string",
898
+ "const": "turn.started"
899
+ }
900
+ },
901
+ "required": ["type"],
902
+ "additionalProperties": false
903
+ },
904
+ {
905
+ "readOnly": true,
906
+ "type": "object",
907
+ "properties": {
908
+ "type": {
909
+ "type": "string",
910
+ "const": "message.started"
911
+ },
912
+ "streamId": {
913
+ "type": "string",
914
+ "format": "uuid",
915
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
916
+ }
917
+ },
918
+ "required": ["type", "streamId"],
919
+ "additionalProperties": false
920
+ },
921
+ {
922
+ "readOnly": true,
923
+ "type": "object",
924
+ "properties": {
925
+ "type": {
926
+ "type": "string",
927
+ "const": "message.delta"
928
+ },
929
+ "streamId": {
930
+ "type": "string",
931
+ "format": "uuid",
932
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
933
+ },
934
+ "delta": {
935
+ "type": "string"
936
+ }
937
+ },
938
+ "required": ["type", "streamId", "delta"],
939
+ "additionalProperties": false
940
+ },
941
+ {
942
+ "readOnly": true,
943
+ "type": "object",
944
+ "properties": {
945
+ "type": {
946
+ "type": "string",
947
+ "const": "message.completed"
948
+ },
949
+ "streamId": {
950
+ "type": "string",
951
+ "format": "uuid",
952
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
953
+ },
954
+ "text": {
955
+ "type": "string"
956
+ }
957
+ },
958
+ "required": ["type", "streamId", "text"],
959
+ "additionalProperties": false
960
+ },
961
+ {
962
+ "readOnly": true,
963
+ "type": "object",
964
+ "properties": {
965
+ "type": {
966
+ "type": "string",
967
+ "const": "reasoning.summary.delta"
968
+ },
969
+ "reasoningId": {
970
+ "type": "string",
971
+ "minLength": 1
972
+ },
973
+ "delta": {
974
+ "type": "string"
975
+ }
976
+ },
977
+ "required": ["type", "reasoningId", "delta"],
978
+ "additionalProperties": false
979
+ },
980
+ {
981
+ "readOnly": true,
982
+ "type": "object",
983
+ "properties": {
984
+ "type": {
985
+ "type": "string",
986
+ "const": "tool.started"
987
+ },
988
+ "toolCallId": {
989
+ "type": "string",
990
+ "minLength": 1
991
+ },
992
+ "agentName": {
993
+ "type": "string",
994
+ "minLength": 1
995
+ },
996
+ "toolName": {
997
+ "type": "string",
998
+ "minLength": 1
999
+ },
1000
+ "input": {
1001
+ "$ref": "#/$defs/sharedSchema0"
1002
+ }
1003
+ },
1004
+ "required": [
1005
+ "type",
1006
+ "toolCallId",
1007
+ "agentName",
1008
+ "toolName",
1009
+ "input"
1010
+ ],
1011
+ "additionalProperties": false
1012
+ },
1013
+ {
1014
+ "readOnly": true,
1015
+ "type": "object",
1016
+ "properties": {
1017
+ "type": {
1018
+ "type": "string",
1019
+ "const": "tool.output"
1020
+ },
1021
+ "toolCallId": {
1022
+ "type": "string",
1023
+ "minLength": 1
1024
+ },
1025
+ "agentName": {
1026
+ "type": "string",
1027
+ "minLength": 1
1028
+ },
1029
+ "toolName": {
1030
+ "type": "string",
1031
+ "minLength": 1
1032
+ },
1033
+ "stream": {
1034
+ "type": "string",
1035
+ "enum": ["stdout", "stderr"]
1036
+ },
1037
+ "delta": {
1038
+ "type": "string"
1039
+ }
1040
+ },
1041
+ "required": [
1042
+ "type",
1043
+ "toolCallId",
1044
+ "agentName",
1045
+ "toolName",
1046
+ "stream",
1047
+ "delta"
1048
+ ],
1049
+ "additionalProperties": false
1050
+ },
1051
+ {
1052
+ "readOnly": true,
1053
+ "type": "object",
1054
+ "properties": {
1055
+ "type": {
1056
+ "type": "string",
1057
+ "const": "tool.completed"
1058
+ },
1059
+ "toolCallId": {
1060
+ "type": "string",
1061
+ "minLength": 1
1062
+ },
1063
+ "agentName": {
1064
+ "type": "string",
1065
+ "minLength": 1
1066
+ },
1067
+ "toolName": {
1068
+ "type": "string",
1069
+ "minLength": 1
1070
+ },
1071
+ "operationId": {
1072
+ "type": "string",
1073
+ "format": "uuid",
1074
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
1075
+ },
1076
+ "outcome": {
1077
+ "readOnly": true,
1078
+ "type": "object",
1079
+ "properties": {
1080
+ "kind": {
1081
+ "type": "string",
1082
+ "enum": [
1083
+ "success",
1084
+ "user_rejected",
1085
+ "policy_denied",
1086
+ "invalid_input",
1087
+ "cancelled",
1088
+ "tool_failed"
1089
+ ]
1090
+ },
1091
+ "reason": {
1092
+ "type": "string"
1093
+ }
1094
+ },
1095
+ "required": ["kind"],
1096
+ "additionalProperties": false
1097
+ },
1098
+ "display": {
1099
+ "$ref": "#/$defs/sharedSchema0"
1100
+ }
1101
+ },
1102
+ "required": [
1103
+ "type",
1104
+ "toolCallId",
1105
+ "agentName",
1106
+ "toolName",
1107
+ "display"
1108
+ ],
1109
+ "additionalProperties": false
1110
+ },
1111
+ {
1112
+ "readOnly": true,
1113
+ "type": "object",
1114
+ "properties": {
1115
+ "type": {
1116
+ "type": "string",
1117
+ "const": "approval.required"
1118
+ },
1119
+ "approval": {
1120
+ "readOnly": true,
1121
+ "type": "object",
1122
+ "properties": {
1123
+ "id": {
1124
+ "type": "string",
1125
+ "format": "uuid",
1126
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
1127
+ },
1128
+ "turnId": {
1129
+ "type": "string",
1130
+ "format": "uuid",
1131
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
1132
+ },
1133
+ "agentName": {
1134
+ "type": "string",
1135
+ "minLength": 1
1136
+ },
1137
+ "toolName": {
1138
+ "type": "string",
1139
+ "minLength": 1
1140
+ },
1141
+ "preview": {
1142
+ "$ref": "#/$defs/sharedSchema0"
1143
+ },
1144
+ "reason": {
1145
+ "type": "string"
1146
+ }
1147
+ },
1148
+ "required": [
1149
+ "id",
1150
+ "turnId",
1151
+ "agentName",
1152
+ "toolName",
1153
+ "preview"
1154
+ ],
1155
+ "additionalProperties": false
1156
+ }
1157
+ },
1158
+ "required": ["type", "approval"],
1159
+ "additionalProperties": false
1160
+ },
1161
+ {
1162
+ "readOnly": true,
1163
+ "type": "object",
1164
+ "properties": {
1165
+ "type": {
1166
+ "type": "string",
1167
+ "const": "approval.resolved"
1168
+ },
1169
+ "approvalId": {
1170
+ "type": "string",
1171
+ "format": "uuid",
1172
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
1173
+ },
1174
+ "resolution": {
1175
+ "anyOf": [
1176
+ {
1177
+ "readOnly": true,
1178
+ "type": "object",
1179
+ "properties": {
1180
+ "status": {
1181
+ "type": "string",
1182
+ "const": "resolved"
1183
+ },
1184
+ "decision": {
1185
+ "type": "string",
1186
+ "const": "approve"
1187
+ }
1188
+ },
1189
+ "required": ["status", "decision"],
1190
+ "additionalProperties": false
1191
+ },
1192
+ {
1193
+ "readOnly": true,
1194
+ "type": "object",
1195
+ "properties": {
1196
+ "status": {
1197
+ "type": "string",
1198
+ "const": "resolved"
1199
+ },
1200
+ "decision": {
1201
+ "type": "string",
1202
+ "const": "reject"
1203
+ },
1204
+ "reason": {
1205
+ "type": "string",
1206
+ "minLength": 1
1207
+ }
1208
+ },
1209
+ "required": ["status", "decision"],
1210
+ "additionalProperties": false
1211
+ },
1212
+ {
1213
+ "readOnly": true,
1214
+ "type": "object",
1215
+ "properties": {
1216
+ "status": {
1217
+ "type": "string",
1218
+ "const": "cancelled"
1219
+ },
1220
+ "reason": {
1221
+ "type": "string",
1222
+ "minLength": 1
1223
+ }
1224
+ },
1225
+ "required": ["status", "reason"],
1226
+ "additionalProperties": false
1227
+ },
1228
+ {
1229
+ "readOnly": true,
1230
+ "type": "object",
1231
+ "properties": {
1232
+ "status": {
1233
+ "type": "string",
1234
+ "const": "expired"
1235
+ },
1236
+ "reason": {
1237
+ "type": "string",
1238
+ "minLength": 1
1239
+ }
1240
+ },
1241
+ "required": ["status"],
1242
+ "additionalProperties": false
1243
+ }
1244
+ ]
1245
+ }
1246
+ },
1247
+ "required": ["type", "approvalId", "resolution"],
1248
+ "additionalProperties": false
1249
+ },
1250
+ {
1251
+ "readOnly": true,
1252
+ "type": "object",
1253
+ "properties": {
1254
+ "type": {
1255
+ "type": "string",
1256
+ "const": "turn.completed"
1257
+ }
1258
+ },
1259
+ "required": ["type"],
1260
+ "additionalProperties": false
1261
+ },
1262
+ {
1263
+ "readOnly": true,
1264
+ "type": "object",
1265
+ "properties": {
1266
+ "type": {
1267
+ "type": "string",
1268
+ "const": "turn.cancelled"
1269
+ },
1270
+ "reason": {
1271
+ "type": "string"
1272
+ },
1273
+ "message": {
1274
+ "type": "string"
1275
+ }
1276
+ },
1277
+ "required": ["type", "reason", "message"],
1278
+ "additionalProperties": false
1279
+ },
1280
+ {
1281
+ "readOnly": true,
1282
+ "type": "object",
1283
+ "properties": {
1284
+ "type": {
1285
+ "type": "string",
1286
+ "const": "turn.failed"
1287
+ },
1288
+ "stage": {
1289
+ "type": "string",
1290
+ "enum": ["bootstrap", "plan", "execute"]
1291
+ },
1292
+ "message": {
1293
+ "type": "string"
1294
+ }
1295
+ },
1296
+ "required": ["type", "stage", "message"],
1297
+ "additionalProperties": false
1298
+ },
1299
+ {
1300
+ "readOnly": true,
1301
+ "type": "object",
1302
+ "properties": {
1303
+ "type": {
1304
+ "type": "string",
1305
+ "const": "capabilities.changed"
1306
+ }
1307
+ },
1308
+ "required": ["type"],
1309
+ "additionalProperties": false
1310
+ }
1311
+ ]
1312
+ }
1313
+ },
1314
+ "required": [
1315
+ "protocolVersion",
1316
+ "runtimeInstanceId",
1317
+ "sequence",
1318
+ "timestamp",
1319
+ "threadId",
1320
+ "event"
1321
+ ],
1322
+ "additionalProperties": false
1323
+ }
1324
+ },
1325
+ "required": ["type", "workspaceId", "relaySequence", "event"],
1326
+ "additionalProperties": false
1327
+ },
1328
+ {
1329
+ "readOnly": true,
1330
+ "type": "object",
1331
+ "properties": {
1332
+ "type": {
1333
+ "type": "string",
1334
+ "const": "runtime.ack"
1335
+ },
1336
+ "workspaceId": {
1337
+ "type": "string",
1338
+ "format": "uuid",
1339
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
1340
+ },
1341
+ "throughRelaySequence": {
1342
+ "type": "integer",
1343
+ "minimum": -1,
1344
+ "maximum": 9007199254740991
1345
+ }
1346
+ },
1347
+ "required": ["type", "workspaceId", "throughRelaySequence"],
1348
+ "additionalProperties": false
1349
+ },
1350
+ {
1351
+ "readOnly": true,
1352
+ "type": "object",
1353
+ "properties": {
1354
+ "type": {
1355
+ "type": "string",
1356
+ "const": "runtime.gap"
1357
+ },
1358
+ "workspaceId": {
1359
+ "type": "string",
1360
+ "format": "uuid",
1361
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
1362
+ },
1363
+ "fromRelaySequence": {
1364
+ "type": "integer",
1365
+ "minimum": 0,
1366
+ "maximum": 9007199254740991
1367
+ },
1368
+ "throughRelaySequence": {
1369
+ "type": "integer",
1370
+ "minimum": 0,
1371
+ "maximum": 9007199254740991
1372
+ },
1373
+ "recovery": {
1374
+ "type": "string",
1375
+ "const": "thread.snapshot"
1376
+ }
1377
+ },
1378
+ "required": [
1379
+ "type",
1380
+ "workspaceId",
1381
+ "fromRelaySequence",
1382
+ "throughRelaySequence",
1383
+ "recovery"
1384
+ ],
1385
+ "additionalProperties": false
1386
+ },
1387
+ {
1388
+ "readOnly": true,
1389
+ "type": "object",
1390
+ "properties": {
1391
+ "type": {
1392
+ "type": "string",
1393
+ "const": "runtime.encrypted"
1394
+ },
1395
+ "workspaceId": {
1396
+ "type": "string",
1397
+ "format": "uuid",
1398
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
1399
+ },
1400
+ "envelopeId": {
1401
+ "type": "string",
1402
+ "format": "uuid",
1403
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
1404
+ },
1405
+ "payloadKind": {
1406
+ "type": "string",
1407
+ "enum": ["request", "response", "event"]
1408
+ },
1409
+ "requestId": {
1410
+ "type": "string",
1411
+ "format": "uuid",
1412
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
1413
+ },
1414
+ "relaySequence": {
1415
+ "type": "integer",
1416
+ "minimum": 0,
1417
+ "maximum": 9007199254740991
1418
+ },
1419
+ "algorithm": {
1420
+ "type": "string",
1421
+ "minLength": 1
1422
+ },
1423
+ "nonce": {
1424
+ "type": "string",
1425
+ "minLength": 1
1426
+ },
1427
+ "ciphertext": {
1428
+ "type": "string",
1429
+ "minLength": 1
1430
+ }
1431
+ },
1432
+ "required": [
1433
+ "type",
1434
+ "workspaceId",
1435
+ "envelopeId",
1436
+ "payloadKind",
1437
+ "algorithm",
1438
+ "nonce",
1439
+ "ciphertext"
1440
+ ],
1441
+ "additionalProperties": false
1442
+ }
1443
+ ]
1444
+ },
1445
+ "initializeParams": {
1446
+ "readOnly": true,
1447
+ "type": "object",
1448
+ "properties": {
1449
+ "protocolVersions": {
1450
+ "minItems": 1,
1451
+ "type": "array",
1452
+ "items": {
1453
+ "type": "string",
1454
+ "minLength": 1
1455
+ }
1456
+ },
1457
+ "client": {
1458
+ "readOnly": true,
1459
+ "type": "object",
1460
+ "properties": {
1461
+ "name": {
1462
+ "type": "string",
1463
+ "minLength": 1,
1464
+ "maxLength": 100
1465
+ },
1466
+ "version": {
1467
+ "type": "string",
1468
+ "minLength": 1,
1469
+ "maxLength": 100
1470
+ }
1471
+ },
1472
+ "required": ["name", "version"],
1473
+ "additionalProperties": false
1474
+ }
1475
+ },
1476
+ "required": ["protocolVersions", "client"],
1477
+ "additionalProperties": false
1478
+ },
1479
+ "initializeResult": {
1480
+ "readOnly": true,
1481
+ "type": "object",
1482
+ "properties": {
1483
+ "protocolVersion": {
1484
+ "type": "string",
1485
+ "enum": ["1.1", "1.0"]
1486
+ },
1487
+ "runtimeInstanceId": {
1488
+ "type": "string",
1489
+ "format": "uuid",
1490
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
1491
+ },
1492
+ "server": {
1493
+ "readOnly": true,
1494
+ "type": "object",
1495
+ "properties": {
1496
+ "name": {
1497
+ "type": "string",
1498
+ "minLength": 1,
1499
+ "maxLength": 100
1500
+ },
1501
+ "version": {
1502
+ "type": "string",
1503
+ "minLength": 1,
1504
+ "maxLength": 100
1505
+ },
1506
+ "runtimeVersion": {
1507
+ "type": "string",
1508
+ "minLength": 1,
1509
+ "maxLength": 100
1510
+ }
1511
+ },
1512
+ "required": ["name", "version", "runtimeVersion"],
1513
+ "additionalProperties": false
1514
+ },
1515
+ "features": {
1516
+ "type": "array",
1517
+ "items": {
1518
+ "type": "string",
1519
+ "enum": [
1520
+ "thread-management",
1521
+ "snapshots",
1522
+ "turns",
1523
+ "approvals",
1524
+ "tool-streaming",
1525
+ "reasoning-summary",
1526
+ "operation-projection",
1527
+ "process-local-sequence"
1528
+ ]
1529
+ }
1530
+ },
1531
+ "limits": {
1532
+ "readOnly": true,
1533
+ "type": "object",
1534
+ "properties": {
1535
+ "maxFrameBytes": {
1536
+ "type": "integer",
1537
+ "exclusiveMinimum": 0,
1538
+ "maximum": 9007199254740991
1539
+ },
1540
+ "maxPageSize": {
1541
+ "type": "integer",
1542
+ "exclusiveMinimum": 0,
1543
+ "maximum": 9007199254740991
1544
+ },
1545
+ "eventReplay": {
1546
+ "type": "boolean",
1547
+ "const": false
1548
+ },
1549
+ "idempotencyCacheEntries": {
1550
+ "type": "integer",
1551
+ "exclusiveMinimum": 0,
1552
+ "maximum": 9007199254740991
1553
+ }
1554
+ },
1555
+ "required": [
1556
+ "maxFrameBytes",
1557
+ "maxPageSize",
1558
+ "eventReplay",
1559
+ "idempotencyCacheEntries"
1560
+ ],
1561
+ "additionalProperties": false
1562
+ }
1563
+ },
1564
+ "required": [
1565
+ "protocolVersion",
1566
+ "runtimeInstanceId",
1567
+ "server",
1568
+ "features",
1569
+ "limits"
1570
+ ],
1571
+ "additionalProperties": false
1572
+ },
1573
+ "threadListParams": {
1574
+ "readOnly": true,
1575
+ "type": "object",
1576
+ "properties": {
1577
+ "cursor": {
1578
+ "type": "string",
1579
+ "pattern": "^\\d+$"
1580
+ },
1581
+ "limit": {
1582
+ "default": 100,
1583
+ "type": "integer",
1584
+ "minimum": 1,
1585
+ "maximum": 500
1586
+ }
1587
+ },
1588
+ "required": ["limit"],
1589
+ "additionalProperties": false
1590
+ },
1591
+ "threadListResult": {
1592
+ "readOnly": true,
1593
+ "type": "object",
1594
+ "properties": {
1595
+ "items": {
1596
+ "type": "array",
1597
+ "items": {
1598
+ "readOnly": true,
1599
+ "type": "object",
1600
+ "properties": {
1601
+ "id": {
1602
+ "type": "string",
1603
+ "format": "uuid",
1604
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
1605
+ },
1606
+ "title": {
1607
+ "type": "string"
1608
+ },
1609
+ "model": {
1610
+ "type": "string"
1611
+ },
1612
+ "createdAt": {
1613
+ "type": "string",
1614
+ "format": "date-time",
1615
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"
1616
+ },
1617
+ "updatedAt": {
1618
+ "type": "string",
1619
+ "format": "date-time",
1620
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"
1621
+ },
1622
+ "messageCount": {
1623
+ "type": "integer",
1624
+ "minimum": 0,
1625
+ "maximum": 9007199254740991
1626
+ }
1627
+ },
1628
+ "required": ["id", "createdAt", "updatedAt", "messageCount"],
1629
+ "additionalProperties": false
1630
+ }
1631
+ },
1632
+ "nextCursor": {
1633
+ "anyOf": [
1634
+ {
1635
+ "type": "string",
1636
+ "pattern": "^\\d+$"
1637
+ },
1638
+ {
1639
+ "type": "null"
1640
+ }
1641
+ ]
1642
+ }
1643
+ },
1644
+ "required": ["items", "nextCursor"],
1645
+ "additionalProperties": false
1646
+ },
1647
+ "threadCreateParams": {
1648
+ "readOnly": true,
1649
+ "type": "object",
1650
+ "properties": {
1651
+ "requestId": {
1652
+ "type": "string",
1653
+ "format": "uuid",
1654
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
1655
+ },
1656
+ "title": {
1657
+ "type": "string",
1658
+ "minLength": 1,
1659
+ "maxLength": 200
1660
+ }
1661
+ },
1662
+ "required": ["requestId"],
1663
+ "additionalProperties": false
1664
+ },
1665
+ "threadCreateResult": {
1666
+ "readOnly": true,
1667
+ "type": "object",
1668
+ "properties": {
1669
+ "thread": {
1670
+ "readOnly": true,
1671
+ "type": "object",
1672
+ "properties": {
1673
+ "id": {
1674
+ "type": "string",
1675
+ "format": "uuid",
1676
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
1677
+ },
1678
+ "title": {
1679
+ "type": "string"
1680
+ },
1681
+ "model": {
1682
+ "type": "string"
1683
+ },
1684
+ "createdAt": {
1685
+ "type": "string",
1686
+ "format": "date-time",
1687
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"
1688
+ },
1689
+ "updatedAt": {
1690
+ "type": "string",
1691
+ "format": "date-time",
1692
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"
1693
+ },
1694
+ "messageCount": {
1695
+ "type": "integer",
1696
+ "minimum": 0,
1697
+ "maximum": 9007199254740991
1698
+ }
1699
+ },
1700
+ "required": ["id", "createdAt", "updatedAt", "messageCount"],
1701
+ "additionalProperties": false
1702
+ }
1703
+ },
1704
+ "required": ["thread"],
1705
+ "additionalProperties": false
1706
+ },
1707
+ "threadOpenParams": {
1708
+ "readOnly": true,
1709
+ "type": "object",
1710
+ "properties": {
1711
+ "threadId": {
1712
+ "type": "string",
1713
+ "format": "uuid",
1714
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
1715
+ }
1716
+ },
1717
+ "required": ["threadId"],
1718
+ "additionalProperties": false
1719
+ },
1720
+ "threadOpenResult": {
1721
+ "readOnly": true,
1722
+ "type": "object",
1723
+ "properties": {
1724
+ "thread": {
1725
+ "readOnly": true,
1726
+ "type": "object",
1727
+ "properties": {
1728
+ "id": {
1729
+ "type": "string",
1730
+ "format": "uuid",
1731
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
1732
+ },
1733
+ "title": {
1734
+ "type": "string"
1735
+ },
1736
+ "model": {
1737
+ "type": "string"
1738
+ },
1739
+ "createdAt": {
1740
+ "type": "string",
1741
+ "format": "date-time",
1742
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"
1743
+ },
1744
+ "updatedAt": {
1745
+ "type": "string",
1746
+ "format": "date-time",
1747
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"
1748
+ },
1749
+ "messageCount": {
1750
+ "type": "integer",
1751
+ "minimum": 0,
1752
+ "maximum": 9007199254740991
1753
+ }
1754
+ },
1755
+ "required": ["id", "createdAt", "updatedAt", "messageCount"],
1756
+ "additionalProperties": false
1757
+ },
1758
+ "messages": {
1759
+ "readOnly": true,
1760
+ "type": "object",
1761
+ "properties": {
1762
+ "items": {
1763
+ "type": "array",
1764
+ "items": {
1765
+ "readOnly": true,
1766
+ "type": "object",
1767
+ "properties": {
1768
+ "sequence": {
1769
+ "type": "integer",
1770
+ "minimum": 0,
1771
+ "maximum": 9007199254740991
1772
+ },
1773
+ "role": {
1774
+ "type": "string",
1775
+ "enum": ["user", "assistant"]
1776
+ },
1777
+ "createdAt": {
1778
+ "type": "string",
1779
+ "format": "date-time",
1780
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"
1781
+ },
1782
+ "parts": {
1783
+ "type": "array",
1784
+ "items": {
1785
+ "readOnly": true,
1786
+ "type": "object",
1787
+ "properties": {
1788
+ "type": {
1789
+ "type": "string",
1790
+ "const": "text"
1791
+ },
1792
+ "text": {
1793
+ "type": "string"
1794
+ }
1795
+ },
1796
+ "required": ["type", "text"],
1797
+ "additionalProperties": false
1798
+ }
1799
+ }
1800
+ },
1801
+ "required": ["sequence", "role", "createdAt", "parts"],
1802
+ "additionalProperties": false
1803
+ }
1804
+ },
1805
+ "nextBeforeSequence": {
1806
+ "anyOf": [
1807
+ {
1808
+ "type": "integer",
1809
+ "minimum": 0,
1810
+ "maximum": 9007199254740991
1811
+ },
1812
+ {
1813
+ "type": "null"
1814
+ }
1815
+ ]
1816
+ }
1817
+ },
1818
+ "required": ["items", "nextBeforeSequence"],
1819
+ "additionalProperties": false
1820
+ },
1821
+ "operations": {
1822
+ "readOnly": true,
1823
+ "type": "object",
1824
+ "properties": {
1825
+ "items": {
1826
+ "type": "array",
1827
+ "items": {
1828
+ "readOnly": true,
1829
+ "type": "object",
1830
+ "properties": {
1831
+ "id": {
1832
+ "type": "string",
1833
+ "format": "uuid",
1834
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
1835
+ },
1836
+ "sequence": {
1837
+ "type": "integer",
1838
+ "minimum": 0,
1839
+ "maximum": 9007199254740991
1840
+ },
1841
+ "toolCallId": {
1842
+ "type": "string",
1843
+ "minLength": 1
1844
+ },
1845
+ "agentName": {
1846
+ "type": "string",
1847
+ "minLength": 1
1848
+ },
1849
+ "toolName": {
1850
+ "type": "string",
1851
+ "minLength": 1
1852
+ },
1853
+ "createdAt": {
1854
+ "type": "string",
1855
+ "format": "date-time",
1856
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"
1857
+ },
1858
+ "outcome": {
1859
+ "readOnly": true,
1860
+ "type": "object",
1861
+ "properties": {
1862
+ "kind": {
1863
+ "type": "string",
1864
+ "enum": [
1865
+ "success",
1866
+ "user_rejected",
1867
+ "policy_denied",
1868
+ "invalid_input",
1869
+ "cancelled",
1870
+ "tool_failed"
1871
+ ]
1872
+ },
1873
+ "reason": {
1874
+ "type": "string"
1875
+ }
1876
+ },
1877
+ "required": ["kind"],
1878
+ "additionalProperties": false
1879
+ },
1880
+ "display": {
1881
+ "$ref": "#/$defs/sharedSchema0"
1882
+ }
1883
+ },
1884
+ "required": [
1885
+ "id",
1886
+ "sequence",
1887
+ "toolCallId",
1888
+ "agentName",
1889
+ "toolName",
1890
+ "createdAt",
1891
+ "outcome",
1892
+ "display"
1893
+ ],
1894
+ "additionalProperties": false
1895
+ }
1896
+ },
1897
+ "nextBeforeSequence": {
1898
+ "anyOf": [
1899
+ {
1900
+ "type": "integer",
1901
+ "minimum": 0,
1902
+ "maximum": 9007199254740991
1903
+ },
1904
+ {
1905
+ "type": "null"
1906
+ }
1907
+ ]
1908
+ }
1909
+ },
1910
+ "required": ["items", "nextBeforeSequence"],
1911
+ "additionalProperties": false
1912
+ },
1913
+ "activeTurn": {
1914
+ "readOnly": true,
1915
+ "type": "object",
1916
+ "properties": {
1917
+ "id": {
1918
+ "type": "string",
1919
+ "format": "uuid",
1920
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
1921
+ },
1922
+ "status": {
1923
+ "type": "string",
1924
+ "enum": ["running", "cancelling"]
1925
+ },
1926
+ "startedAt": {
1927
+ "type": "string",
1928
+ "format": "date-time",
1929
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"
1930
+ }
1931
+ },
1932
+ "required": ["id", "status", "startedAt"],
1933
+ "additionalProperties": false
1934
+ },
1935
+ "pendingApprovals": {
1936
+ "type": "array",
1937
+ "items": {
1938
+ "readOnly": true,
1939
+ "type": "object",
1940
+ "properties": {
1941
+ "id": {
1942
+ "type": "string",
1943
+ "format": "uuid",
1944
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
1945
+ },
1946
+ "turnId": {
1947
+ "type": "string",
1948
+ "format": "uuid",
1949
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
1950
+ },
1951
+ "agentName": {
1952
+ "type": "string",
1953
+ "minLength": 1
1954
+ },
1955
+ "toolName": {
1956
+ "type": "string",
1957
+ "minLength": 1
1958
+ },
1959
+ "preview": {
1960
+ "$ref": "#/$defs/sharedSchema0"
1961
+ },
1962
+ "reason": {
1963
+ "type": "string"
1964
+ }
1965
+ },
1966
+ "required": ["id", "turnId", "agentName", "toolName", "preview"],
1967
+ "additionalProperties": false
1968
+ }
1969
+ },
1970
+ "transcriptCompleteness": {
1971
+ "type": "string",
1972
+ "enum": ["complete", "legacy_snapshot"]
1973
+ }
1974
+ },
1975
+ "required": [
1976
+ "thread",
1977
+ "messages",
1978
+ "operations",
1979
+ "pendingApprovals",
1980
+ "transcriptCompleteness"
1981
+ ],
1982
+ "additionalProperties": false
1983
+ },
1984
+ "threadSnapshotParams": {
1985
+ "readOnly": true,
1986
+ "type": "object",
1987
+ "properties": {
1988
+ "threadId": {
1989
+ "type": "string",
1990
+ "format": "uuid",
1991
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
1992
+ },
1993
+ "messageBeforeSequence": {
1994
+ "type": "integer",
1995
+ "minimum": 0,
1996
+ "maximum": 9007199254740991
1997
+ },
1998
+ "operationBeforeSequence": {
1999
+ "type": "integer",
2000
+ "minimum": 0,
2001
+ "maximum": 9007199254740991
2002
+ },
2003
+ "limit": {
2004
+ "default": 100,
2005
+ "type": "integer",
2006
+ "minimum": 1,
2007
+ "maximum": 500
2008
+ }
2009
+ },
2010
+ "required": ["threadId", "limit"],
2011
+ "additionalProperties": false
2012
+ },
2013
+ "threadSnapshotResult": {
2014
+ "readOnly": true,
2015
+ "type": "object",
2016
+ "properties": {
2017
+ "thread": {
2018
+ "readOnly": true,
2019
+ "type": "object",
2020
+ "properties": {
2021
+ "id": {
2022
+ "type": "string",
2023
+ "format": "uuid",
2024
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
2025
+ },
2026
+ "title": {
2027
+ "type": "string"
2028
+ },
2029
+ "model": {
2030
+ "type": "string"
2031
+ },
2032
+ "createdAt": {
2033
+ "type": "string",
2034
+ "format": "date-time",
2035
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"
2036
+ },
2037
+ "updatedAt": {
2038
+ "type": "string",
2039
+ "format": "date-time",
2040
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"
2041
+ },
2042
+ "messageCount": {
2043
+ "type": "integer",
2044
+ "minimum": 0,
2045
+ "maximum": 9007199254740991
2046
+ }
2047
+ },
2048
+ "required": ["id", "createdAt", "updatedAt", "messageCount"],
2049
+ "additionalProperties": false
2050
+ },
2051
+ "messages": {
2052
+ "readOnly": true,
2053
+ "type": "object",
2054
+ "properties": {
2055
+ "items": {
2056
+ "type": "array",
2057
+ "items": {
2058
+ "readOnly": true,
2059
+ "type": "object",
2060
+ "properties": {
2061
+ "sequence": {
2062
+ "type": "integer",
2063
+ "minimum": 0,
2064
+ "maximum": 9007199254740991
2065
+ },
2066
+ "role": {
2067
+ "type": "string",
2068
+ "enum": ["user", "assistant"]
2069
+ },
2070
+ "createdAt": {
2071
+ "type": "string",
2072
+ "format": "date-time",
2073
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"
2074
+ },
2075
+ "parts": {
2076
+ "type": "array",
2077
+ "items": {
2078
+ "readOnly": true,
2079
+ "type": "object",
2080
+ "properties": {
2081
+ "type": {
2082
+ "type": "string",
2083
+ "const": "text"
2084
+ },
2085
+ "text": {
2086
+ "type": "string"
2087
+ }
2088
+ },
2089
+ "required": ["type", "text"],
2090
+ "additionalProperties": false
2091
+ }
2092
+ }
2093
+ },
2094
+ "required": ["sequence", "role", "createdAt", "parts"],
2095
+ "additionalProperties": false
2096
+ }
2097
+ },
2098
+ "nextBeforeSequence": {
2099
+ "anyOf": [
2100
+ {
2101
+ "type": "integer",
2102
+ "minimum": 0,
2103
+ "maximum": 9007199254740991
2104
+ },
2105
+ {
2106
+ "type": "null"
2107
+ }
2108
+ ]
2109
+ }
2110
+ },
2111
+ "required": ["items", "nextBeforeSequence"],
2112
+ "additionalProperties": false
2113
+ },
2114
+ "operations": {
2115
+ "readOnly": true,
2116
+ "type": "object",
2117
+ "properties": {
2118
+ "items": {
2119
+ "type": "array",
2120
+ "items": {
2121
+ "readOnly": true,
2122
+ "type": "object",
2123
+ "properties": {
2124
+ "id": {
2125
+ "type": "string",
2126
+ "format": "uuid",
2127
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
2128
+ },
2129
+ "sequence": {
2130
+ "type": "integer",
2131
+ "minimum": 0,
2132
+ "maximum": 9007199254740991
2133
+ },
2134
+ "toolCallId": {
2135
+ "type": "string",
2136
+ "minLength": 1
2137
+ },
2138
+ "agentName": {
2139
+ "type": "string",
2140
+ "minLength": 1
2141
+ },
2142
+ "toolName": {
2143
+ "type": "string",
2144
+ "minLength": 1
2145
+ },
2146
+ "createdAt": {
2147
+ "type": "string",
2148
+ "format": "date-time",
2149
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"
2150
+ },
2151
+ "outcome": {
2152
+ "readOnly": true,
2153
+ "type": "object",
2154
+ "properties": {
2155
+ "kind": {
2156
+ "type": "string",
2157
+ "enum": [
2158
+ "success",
2159
+ "user_rejected",
2160
+ "policy_denied",
2161
+ "invalid_input",
2162
+ "cancelled",
2163
+ "tool_failed"
2164
+ ]
2165
+ },
2166
+ "reason": {
2167
+ "type": "string"
2168
+ }
2169
+ },
2170
+ "required": ["kind"],
2171
+ "additionalProperties": false
2172
+ },
2173
+ "display": {
2174
+ "$ref": "#/$defs/sharedSchema0"
2175
+ }
2176
+ },
2177
+ "required": [
2178
+ "id",
2179
+ "sequence",
2180
+ "toolCallId",
2181
+ "agentName",
2182
+ "toolName",
2183
+ "createdAt",
2184
+ "outcome",
2185
+ "display"
2186
+ ],
2187
+ "additionalProperties": false
2188
+ }
2189
+ },
2190
+ "nextBeforeSequence": {
2191
+ "anyOf": [
2192
+ {
2193
+ "type": "integer",
2194
+ "minimum": 0,
2195
+ "maximum": 9007199254740991
2196
+ },
2197
+ {
2198
+ "type": "null"
2199
+ }
2200
+ ]
2201
+ }
2202
+ },
2203
+ "required": ["items", "nextBeforeSequence"],
2204
+ "additionalProperties": false
2205
+ },
2206
+ "activeTurn": {
2207
+ "readOnly": true,
2208
+ "type": "object",
2209
+ "properties": {
2210
+ "id": {
2211
+ "type": "string",
2212
+ "format": "uuid",
2213
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
2214
+ },
2215
+ "status": {
2216
+ "type": "string",
2217
+ "enum": ["running", "cancelling"]
2218
+ },
2219
+ "startedAt": {
2220
+ "type": "string",
2221
+ "format": "date-time",
2222
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"
2223
+ }
2224
+ },
2225
+ "required": ["id", "status", "startedAt"],
2226
+ "additionalProperties": false
2227
+ },
2228
+ "pendingApprovals": {
2229
+ "type": "array",
2230
+ "items": {
2231
+ "readOnly": true,
2232
+ "type": "object",
2233
+ "properties": {
2234
+ "id": {
2235
+ "type": "string",
2236
+ "format": "uuid",
2237
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
2238
+ },
2239
+ "turnId": {
2240
+ "type": "string",
2241
+ "format": "uuid",
2242
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
2243
+ },
2244
+ "agentName": {
2245
+ "type": "string",
2246
+ "minLength": 1
2247
+ },
2248
+ "toolName": {
2249
+ "type": "string",
2250
+ "minLength": 1
2251
+ },
2252
+ "preview": {
2253
+ "$ref": "#/$defs/sharedSchema0"
2254
+ },
2255
+ "reason": {
2256
+ "type": "string"
2257
+ }
2258
+ },
2259
+ "required": ["id", "turnId", "agentName", "toolName", "preview"],
2260
+ "additionalProperties": false
2261
+ }
2262
+ },
2263
+ "transcriptCompleteness": {
2264
+ "type": "string",
2265
+ "enum": ["complete", "legacy_snapshot"]
2266
+ }
2267
+ },
2268
+ "required": [
2269
+ "thread",
2270
+ "messages",
2271
+ "operations",
2272
+ "pendingApprovals",
2273
+ "transcriptCompleteness"
2274
+ ],
2275
+ "additionalProperties": false
2276
+ },
2277
+ "threadRenameParams": {
2278
+ "readOnly": true,
2279
+ "type": "object",
2280
+ "properties": {
2281
+ "requestId": {
2282
+ "type": "string",
2283
+ "format": "uuid",
2284
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
2285
+ },
2286
+ "threadId": {
2287
+ "type": "string",
2288
+ "format": "uuid",
2289
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
2290
+ },
2291
+ "title": {
2292
+ "type": "string",
2293
+ "minLength": 1,
2294
+ "maxLength": 200
2295
+ }
2296
+ },
2297
+ "required": ["requestId", "threadId", "title"],
2298
+ "additionalProperties": false
2299
+ },
2300
+ "threadRenameResult": {
2301
+ "readOnly": true,
2302
+ "type": "object",
2303
+ "properties": {
2304
+ "thread": {
2305
+ "readOnly": true,
2306
+ "type": "object",
2307
+ "properties": {
2308
+ "id": {
2309
+ "type": "string",
2310
+ "format": "uuid",
2311
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
2312
+ },
2313
+ "title": {
2314
+ "type": "string"
2315
+ },
2316
+ "model": {
2317
+ "type": "string"
2318
+ },
2319
+ "createdAt": {
2320
+ "type": "string",
2321
+ "format": "date-time",
2322
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"
2323
+ },
2324
+ "updatedAt": {
2325
+ "type": "string",
2326
+ "format": "date-time",
2327
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"
2328
+ },
2329
+ "messageCount": {
2330
+ "type": "integer",
2331
+ "minimum": 0,
2332
+ "maximum": 9007199254740991
2333
+ }
2334
+ },
2335
+ "required": ["id", "createdAt", "updatedAt", "messageCount"],
2336
+ "additionalProperties": false
2337
+ }
2338
+ },
2339
+ "required": ["thread"],
2340
+ "additionalProperties": false
2341
+ },
2342
+ "threadDeleteParams": {
2343
+ "readOnly": true,
2344
+ "type": "object",
2345
+ "properties": {
2346
+ "requestId": {
2347
+ "type": "string",
2348
+ "format": "uuid",
2349
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
2350
+ },
2351
+ "threadId": {
2352
+ "type": "string",
2353
+ "format": "uuid",
2354
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
2355
+ }
2356
+ },
2357
+ "required": ["requestId", "threadId"],
2358
+ "additionalProperties": false
2359
+ },
2360
+ "threadDeleteResult": {
2361
+ "readOnly": true,
2362
+ "type": "object",
2363
+ "properties": {
2364
+ "deleted": {
2365
+ "type": "boolean",
2366
+ "const": true
2367
+ }
2368
+ },
2369
+ "required": ["deleted"],
2370
+ "additionalProperties": false
2371
+ },
2372
+ "threadDetachParams": {
2373
+ "readOnly": true,
2374
+ "type": "object",
2375
+ "properties": {
2376
+ "requestId": {
2377
+ "type": "string",
2378
+ "format": "uuid",
2379
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
2380
+ },
2381
+ "threadId": {
2382
+ "type": "string",
2383
+ "format": "uuid",
2384
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
2385
+ }
2386
+ },
2387
+ "required": ["requestId", "threadId"],
2388
+ "additionalProperties": false
2389
+ },
2390
+ "threadDetachResult": {
2391
+ "readOnly": true,
2392
+ "type": "object",
2393
+ "properties": {
2394
+ "detached": {
2395
+ "type": "boolean"
2396
+ }
2397
+ },
2398
+ "required": ["detached"],
2399
+ "additionalProperties": false
2400
+ },
2401
+ "threadCapabilitiesParams": {
2402
+ "readOnly": true,
2403
+ "type": "object",
2404
+ "properties": {
2405
+ "threadId": {
2406
+ "type": "string",
2407
+ "format": "uuid",
2408
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
2409
+ }
2410
+ },
2411
+ "required": ["threadId"],
2412
+ "additionalProperties": false
2413
+ },
2414
+ "threadCapabilitiesResult": {
2415
+ "readOnly": true,
2416
+ "type": "object",
2417
+ "properties": {
2418
+ "manifest": {
2419
+ "$ref": "#/$defs/sharedSchema0"
2420
+ }
2421
+ },
2422
+ "required": ["manifest"],
2423
+ "additionalProperties": false
2424
+ },
2425
+ "turnStartParams": {
2426
+ "readOnly": true,
2427
+ "type": "object",
2428
+ "properties": {
2429
+ "requestId": {
2430
+ "type": "string",
2431
+ "format": "uuid",
2432
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
2433
+ },
2434
+ "threadId": {
2435
+ "type": "string",
2436
+ "format": "uuid",
2437
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
2438
+ },
2439
+ "turnId": {
2440
+ "type": "string",
2441
+ "format": "uuid",
2442
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
2443
+ },
2444
+ "input": {
2445
+ "readOnly": true,
2446
+ "type": "object",
2447
+ "properties": {
2448
+ "text": {
2449
+ "type": "string",
2450
+ "minLength": 1
2451
+ }
2452
+ },
2453
+ "required": ["text"],
2454
+ "additionalProperties": false
2455
+ }
2456
+ },
2457
+ "required": ["requestId", "threadId", "turnId", "input"],
2458
+ "additionalProperties": false
2459
+ },
2460
+ "turnStartResult": {
2461
+ "readOnly": true,
2462
+ "type": "object",
2463
+ "properties": {
2464
+ "accepted": {
2465
+ "type": "boolean",
2466
+ "const": true
2467
+ },
2468
+ "turnId": {
2469
+ "type": "string",
2470
+ "format": "uuid",
2471
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
2472
+ }
2473
+ },
2474
+ "required": ["accepted", "turnId"],
2475
+ "additionalProperties": false
2476
+ },
2477
+ "turnCancelParams": {
2478
+ "readOnly": true,
2479
+ "type": "object",
2480
+ "properties": {
2481
+ "requestId": {
2482
+ "type": "string",
2483
+ "format": "uuid",
2484
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
2485
+ },
2486
+ "threadId": {
2487
+ "type": "string",
2488
+ "format": "uuid",
2489
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
2490
+ },
2491
+ "turnId": {
2492
+ "type": "string",
2493
+ "format": "uuid",
2494
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
2495
+ }
2496
+ },
2497
+ "required": ["requestId", "threadId", "turnId"],
2498
+ "additionalProperties": false
2499
+ },
2500
+ "turnCancelResult": {
2501
+ "readOnly": true,
2502
+ "type": "object",
2503
+ "properties": {
2504
+ "cancelling": {
2505
+ "type": "boolean"
2506
+ }
2507
+ },
2508
+ "required": ["cancelling"],
2509
+ "additionalProperties": false
2510
+ },
2511
+ "approvalRespondParams": {
2512
+ "readOnly": true,
2513
+ "type": "object",
2514
+ "properties": {
2515
+ "requestId": {
2516
+ "type": "string",
2517
+ "format": "uuid",
2518
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
2519
+ },
2520
+ "threadId": {
2521
+ "type": "string",
2522
+ "format": "uuid",
2523
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
2524
+ },
2525
+ "turnId": {
2526
+ "type": "string",
2527
+ "format": "uuid",
2528
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
2529
+ },
2530
+ "approvalId": {
2531
+ "type": "string",
2532
+ "format": "uuid",
2533
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
2534
+ },
2535
+ "decision": {
2536
+ "type": "string",
2537
+ "enum": ["approve", "reject"]
2538
+ },
2539
+ "reason": {
2540
+ "type": "string",
2541
+ "minLength": 1
2542
+ }
2543
+ },
2544
+ "required": ["requestId", "threadId", "turnId", "approvalId", "decision"],
2545
+ "additionalProperties": false
2546
+ },
2547
+ "approvalRespondResult": {
2548
+ "readOnly": true,
2549
+ "type": "object",
2550
+ "properties": {
2551
+ "resolved": {
2552
+ "type": "boolean",
2553
+ "const": true
2554
+ }
2555
+ },
2556
+ "required": ["resolved"],
2557
+ "additionalProperties": false
2558
+ },
2559
+ "operationGetParams": {
2560
+ "readOnly": true,
2561
+ "type": "object",
2562
+ "properties": {
2563
+ "threadId": {
2564
+ "type": "string",
2565
+ "format": "uuid",
2566
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
2567
+ },
2568
+ "operationId": {
2569
+ "type": "string",
2570
+ "format": "uuid",
2571
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
2572
+ }
2573
+ },
2574
+ "required": ["threadId", "operationId"],
2575
+ "additionalProperties": false
2576
+ },
2577
+ "operationGetResult": {
2578
+ "readOnly": true,
2579
+ "type": "object",
2580
+ "properties": {
2581
+ "operation": {
2582
+ "anyOf": [
2583
+ {
2584
+ "readOnly": true,
2585
+ "type": "object",
2586
+ "properties": {
2587
+ "id": {
2588
+ "type": "string",
2589
+ "format": "uuid",
2590
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
2591
+ },
2592
+ "sequence": {
2593
+ "type": "integer",
2594
+ "minimum": 0,
2595
+ "maximum": 9007199254740991
2596
+ },
2597
+ "toolCallId": {
2598
+ "type": "string",
2599
+ "minLength": 1
2600
+ },
2601
+ "agentName": {
2602
+ "type": "string",
2603
+ "minLength": 1
2604
+ },
2605
+ "toolName": {
2606
+ "type": "string",
2607
+ "minLength": 1
2608
+ },
2609
+ "createdAt": {
2610
+ "type": "string",
2611
+ "format": "date-time",
2612
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"
2613
+ },
2614
+ "outcome": {
2615
+ "readOnly": true,
2616
+ "type": "object",
2617
+ "properties": {
2618
+ "kind": {
2619
+ "type": "string",
2620
+ "enum": [
2621
+ "success",
2622
+ "user_rejected",
2623
+ "policy_denied",
2624
+ "invalid_input",
2625
+ "cancelled",
2626
+ "tool_failed"
2627
+ ]
2628
+ },
2629
+ "reason": {
2630
+ "type": "string"
2631
+ }
2632
+ },
2633
+ "required": ["kind"],
2634
+ "additionalProperties": false
2635
+ },
2636
+ "display": {
2637
+ "$ref": "#/$defs/sharedSchema0"
2638
+ }
2639
+ },
2640
+ "required": [
2641
+ "id",
2642
+ "sequence",
2643
+ "toolCallId",
2644
+ "agentName",
2645
+ "toolName",
2646
+ "createdAt",
2647
+ "outcome",
2648
+ "display"
2649
+ ],
2650
+ "additionalProperties": false
2651
+ },
2652
+ {
2653
+ "type": "null"
2654
+ }
2655
+ ]
2656
+ }
2657
+ },
2658
+ "required": ["operation"],
2659
+ "additionalProperties": false
2660
+ },
2661
+ "approvalCandidateParams": {
2662
+ "readOnly": true,
2663
+ "type": "object",
2664
+ "properties": {
2665
+ "threadId": {
2666
+ "type": "string",
2667
+ "format": "uuid",
2668
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
2669
+ },
2670
+ "turnId": {
2671
+ "type": "string",
2672
+ "format": "uuid",
2673
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
2674
+ },
2675
+ "approvalId": {
2676
+ "type": "string",
2677
+ "format": "uuid",
2678
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
2679
+ },
2680
+ "decision": {
2681
+ "type": "string",
2682
+ "enum": ["approve", "reject"]
2683
+ },
2684
+ "reason": {
2685
+ "type": "string",
2686
+ "minLength": 1
2687
+ }
2688
+ },
2689
+ "required": ["threadId", "turnId", "approvalId", "decision"],
2690
+ "additionalProperties": false
2691
+ },
2692
+ "approvalCandidateResult": {
2693
+ "readOnly": true,
2694
+ "type": "object",
2695
+ "properties": {
2696
+ "accepted": {
2697
+ "type": "boolean",
2698
+ "const": true
2699
+ }
2700
+ },
2701
+ "required": ["accepted"],
2702
+ "additionalProperties": false
2703
+ },
2704
+ "sharedSchema0": {
2705
+ "anyOf": [
2706
+ {
2707
+ "type": "string"
2708
+ },
2709
+ {
2710
+ "type": "number"
2711
+ },
2712
+ {
2713
+ "type": "boolean"
2714
+ },
2715
+ {
2716
+ "type": "null"
2717
+ },
2718
+ {
2719
+ "type": "array",
2720
+ "items": {
2721
+ "$ref": "#/$defs/sharedSchema0"
2722
+ }
2723
+ },
2724
+ {
2725
+ "type": "object",
2726
+ "propertyNames": {
2727
+ "type": "string"
2728
+ },
2729
+ "additionalProperties": {
2730
+ "$ref": "#/$defs/sharedSchema0"
2731
+ }
2732
+ }
2733
+ ]
2734
+ }
2735
+ },
2736
+ "x-roll-relay-protocol-version": "1.0",
2737
+ "x-roll-message-types": [
2738
+ "device.connect",
2739
+ "runtime.request",
2740
+ "runtime.response",
2741
+ "runtime.event",
2742
+ "runtime.ack",
2743
+ "runtime.gap",
2744
+ "runtime.encrypted"
2745
+ ],
2746
+ "x-roll-request-methods": [
2747
+ "initialize",
2748
+ "thread.list",
2749
+ "thread.create",
2750
+ "thread.open",
2751
+ "thread.snapshot",
2752
+ "thread.rename",
2753
+ "thread.delete",
2754
+ "thread.detach",
2755
+ "thread.capabilities",
2756
+ "turn.start",
2757
+ "turn.cancel",
2758
+ "approval.respond",
2759
+ "operation.get",
2760
+ "approval.candidate"
2761
+ ],
2762
+ "x-roll-request-method-dispositions": {
2763
+ "initialize": "local-only",
2764
+ "thread.list": "query",
2765
+ "thread.create": "mutation",
2766
+ "thread.open": "query",
2767
+ "thread.snapshot": "query",
2768
+ "thread.rename": "mutation",
2769
+ "thread.delete": "mutation",
2770
+ "thread.detach": "mutation",
2771
+ "thread.capabilities": "query",
2772
+ "turn.start": "mutation",
2773
+ "turn.cancel": "mutation",
2774
+ "approval.respond": "mutation",
2775
+ "operation.get": "query",
2776
+ "approval.candidate": "mutation"
2777
+ },
2778
+ "x-roll-mutation-methods": [
2779
+ "thread.create",
2780
+ "thread.rename",
2781
+ "thread.delete",
2782
+ "thread.detach",
2783
+ "turn.start",
2784
+ "turn.cancel",
2785
+ "approval.respond",
2786
+ "approval.candidate"
2787
+ ],
2788
+ "x-roll-relay-error-retryability": {
2789
+ "RELAY_PROTOCOL_VERSION_UNSUPPORTED": false,
2790
+ "RELAY_INVALID_FRAME": false,
2791
+ "INVALID_PARAMS": false,
2792
+ "RELAY_REQUEST_ID_CONFLICT": false,
2793
+ "WORKSPACE_NOT_FOUND": false,
2794
+ "RELAY_ENCRYPTION_REQUIRED": false,
2795
+ "ENCRYPTED_PAYLOAD_INVALID": false,
2796
+ "LocalApprovalDeniedError": false,
2797
+ "LocalConfirmationRequiredError": false,
2798
+ "COMPANION_ERROR": false
2799
+ },
2800
+ "x-roll-request-method-schemas": {
2801
+ "initialize": {
2802
+ "params": {
2803
+ "$ref": "#/$defs/initializeParams"
2804
+ },
2805
+ "result": {
2806
+ "$ref": "#/$defs/initializeResult"
2807
+ }
2808
+ },
2809
+ "thread.list": {
2810
+ "params": {
2811
+ "$ref": "#/$defs/threadListParams"
2812
+ },
2813
+ "result": {
2814
+ "$ref": "#/$defs/threadListResult"
2815
+ }
2816
+ },
2817
+ "thread.create": {
2818
+ "params": {
2819
+ "$ref": "#/$defs/threadCreateParams"
2820
+ },
2821
+ "result": {
2822
+ "$ref": "#/$defs/threadCreateResult"
2823
+ }
2824
+ },
2825
+ "thread.open": {
2826
+ "params": {
2827
+ "$ref": "#/$defs/threadOpenParams"
2828
+ },
2829
+ "result": {
2830
+ "$ref": "#/$defs/threadOpenResult"
2831
+ }
2832
+ },
2833
+ "thread.snapshot": {
2834
+ "params": {
2835
+ "$ref": "#/$defs/threadSnapshotParams"
2836
+ },
2837
+ "result": {
2838
+ "$ref": "#/$defs/threadSnapshotResult"
2839
+ }
2840
+ },
2841
+ "thread.rename": {
2842
+ "params": {
2843
+ "$ref": "#/$defs/threadRenameParams"
2844
+ },
2845
+ "result": {
2846
+ "$ref": "#/$defs/threadRenameResult"
2847
+ }
2848
+ },
2849
+ "thread.delete": {
2850
+ "params": {
2851
+ "$ref": "#/$defs/threadDeleteParams"
2852
+ },
2853
+ "result": {
2854
+ "$ref": "#/$defs/threadDeleteResult"
2855
+ }
2856
+ },
2857
+ "thread.detach": {
2858
+ "params": {
2859
+ "$ref": "#/$defs/threadDetachParams"
2860
+ },
2861
+ "result": {
2862
+ "$ref": "#/$defs/threadDetachResult"
2863
+ }
2864
+ },
2865
+ "thread.capabilities": {
2866
+ "params": {
2867
+ "$ref": "#/$defs/threadCapabilitiesParams"
2868
+ },
2869
+ "result": {
2870
+ "$ref": "#/$defs/threadCapabilitiesResult"
2871
+ }
2872
+ },
2873
+ "turn.start": {
2874
+ "params": {
2875
+ "$ref": "#/$defs/turnStartParams"
2876
+ },
2877
+ "result": {
2878
+ "$ref": "#/$defs/turnStartResult"
2879
+ }
2880
+ },
2881
+ "turn.cancel": {
2882
+ "params": {
2883
+ "$ref": "#/$defs/turnCancelParams"
2884
+ },
2885
+ "result": {
2886
+ "$ref": "#/$defs/turnCancelResult"
2887
+ }
2888
+ },
2889
+ "approval.respond": {
2890
+ "params": {
2891
+ "$ref": "#/$defs/approvalRespondParams"
2892
+ },
2893
+ "result": {
2894
+ "$ref": "#/$defs/approvalRespondResult"
2895
+ }
2896
+ },
2897
+ "operation.get": {
2898
+ "params": {
2899
+ "$ref": "#/$defs/operationGetParams"
2900
+ },
2901
+ "result": {
2902
+ "$ref": "#/$defs/operationGetResult"
2903
+ }
2904
+ },
2905
+ "approval.candidate": {
2906
+ "params": {
2907
+ "$ref": "#/$defs/approvalCandidateParams"
2908
+ },
2909
+ "result": {
2910
+ "$ref": "#/$defs/approvalCandidateResult"
2911
+ }
2912
+ }
2913
+ }
2914
+ }