@roll-agent/relay-protocol 0.3.2 → 0.4.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.
Files changed (32) hide show
  1. package/dist/control.d.ts +73 -0
  2. package/dist/control.js +18 -0
  3. package/dist/index.d.ts +2088 -120
  4. package/dist/index.js +184 -4
  5. package/dist/schema/roll-relay-protocol-v1.2.schema.json +4436 -0
  6. package/fixtures/v1.2/invalid-approval-projection-raw-input-leak.json +19 -0
  7. package/fixtures/v1.2/invalid-authentication-local-only.json +12 -0
  8. package/fixtures/v1.2/invalid-file-picker-local-only.json +12 -0
  9. package/fixtures/v1.2/invalid-interaction-cancelled-reason-leak.json +10 -0
  10. package/fixtures/v1.2/invalid-interaction-resolved-result-leak.json +18 -0
  11. package/fixtures/v1.2/invalid-legacy-approval-candidate.json +7 -0
  12. package/fixtures/v1.2/invalid-legacy-approval-respond.json +7 -0
  13. package/fixtures/v1.2/invalid-n-minus-one-device-connect.json +6 -0
  14. package/fixtures/v1.2/invalid-non-normal-sensitivity.json +21 -0
  15. package/fixtures/v1.2/invalid-runtime-event-tool-input-leak.json +22 -0
  16. package/fixtures/v1.2/invalid-runtime-event-tool-output-leak.json +21 -0
  17. package/fixtures/v1.2/invalid-user-input-projection-secret-leak.json +22 -0
  18. package/fixtures/v1.2/manifest.json +479 -0
  19. package/fixtures/v1.2/valid-device-connect.json +6 -0
  20. package/fixtures/v1.2/valid-interaction-cancelled.json +9 -0
  21. package/fixtures/v1.2/valid-interaction-candidate-user-input.json +25 -0
  22. package/fixtures/v1.2/valid-interaction-request-approval.json +17 -0
  23. package/fixtures/v1.2/valid-interaction-request-user-input.json +40 -0
  24. package/fixtures/v1.2/valid-interaction-resolved.json +9 -0
  25. package/fixtures/v1.2/valid-runtime-ack.json +5 -0
  26. package/fixtures/v1.2/valid-runtime-encrypted-interaction.json +10 -0
  27. package/fixtures/v1.2/valid-runtime-event-runtime-n-minus-one.json +16 -0
  28. package/fixtures/v1.2/valid-runtime-event.json +16 -0
  29. package/fixtures/v1.2/valid-runtime-gap.json +7 -0
  30. package/fixtures/v1.2/valid-runtime-request.json +10 -0
  31. package/fixtures/v1.2/valid-runtime-response.json +8 -0
  32. package/package.json +5 -4
@@ -0,0 +1,4436 @@
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.2"
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
+ "operation.get",
61
+ "interaction.candidate",
62
+ "operation.result.get"
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
+ "anyOf": [
170
+ {
171
+ "readOnly": true,
172
+ "type": "object",
173
+ "properties": {
174
+ "type": {
175
+ "type": "string",
176
+ "const": "turn.started"
177
+ }
178
+ },
179
+ "required": ["type"],
180
+ "additionalProperties": false
181
+ },
182
+ {
183
+ "readOnly": true,
184
+ "type": "object",
185
+ "properties": {
186
+ "type": {
187
+ "type": "string",
188
+ "const": "message.started"
189
+ },
190
+ "streamId": {
191
+ "type": "string",
192
+ "format": "uuid",
193
+ "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)$"
194
+ }
195
+ },
196
+ "required": ["type", "streamId"],
197
+ "additionalProperties": false
198
+ },
199
+ {
200
+ "readOnly": true,
201
+ "type": "object",
202
+ "properties": {
203
+ "type": {
204
+ "type": "string",
205
+ "const": "message.delta"
206
+ },
207
+ "streamId": {
208
+ "type": "string",
209
+ "format": "uuid",
210
+ "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)$"
211
+ },
212
+ "delta": {
213
+ "type": "string"
214
+ }
215
+ },
216
+ "required": ["type", "streamId", "delta"],
217
+ "additionalProperties": false
218
+ },
219
+ {
220
+ "readOnly": true,
221
+ "type": "object",
222
+ "properties": {
223
+ "type": {
224
+ "type": "string",
225
+ "const": "message.completed"
226
+ },
227
+ "streamId": {
228
+ "type": "string",
229
+ "format": "uuid",
230
+ "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)$"
231
+ },
232
+ "text": {
233
+ "type": "string"
234
+ }
235
+ },
236
+ "required": ["type", "streamId", "text"],
237
+ "additionalProperties": false
238
+ },
239
+ {
240
+ "readOnly": true,
241
+ "type": "object",
242
+ "properties": {
243
+ "type": {
244
+ "type": "string",
245
+ "const": "reasoning.summary.delta"
246
+ },
247
+ "reasoningId": {
248
+ "type": "string",
249
+ "minLength": 1
250
+ },
251
+ "delta": {
252
+ "type": "string"
253
+ }
254
+ },
255
+ "required": ["type", "reasoningId", "delta"],
256
+ "additionalProperties": false
257
+ },
258
+ {
259
+ "readOnly": true,
260
+ "type": "object",
261
+ "properties": {
262
+ "type": {
263
+ "type": "string",
264
+ "const": "tool.started"
265
+ },
266
+ "toolCallId": {
267
+ "type": "string",
268
+ "minLength": 1
269
+ },
270
+ "agentName": {
271
+ "type": "string",
272
+ "minLength": 1
273
+ },
274
+ "toolName": {
275
+ "type": "string",
276
+ "minLength": 1
277
+ }
278
+ },
279
+ "required": [
280
+ "type",
281
+ "toolCallId",
282
+ "agentName",
283
+ "toolName"
284
+ ],
285
+ "additionalProperties": false
286
+ },
287
+ {
288
+ "readOnly": true,
289
+ "type": "object",
290
+ "properties": {
291
+ "type": {
292
+ "type": "string",
293
+ "const": "tool.completed"
294
+ },
295
+ "toolCallId": {
296
+ "type": "string",
297
+ "minLength": 1
298
+ },
299
+ "agentName": {
300
+ "type": "string",
301
+ "minLength": 1
302
+ },
303
+ "toolName": {
304
+ "type": "string",
305
+ "minLength": 1
306
+ },
307
+ "outcome": {
308
+ "readOnly": true,
309
+ "type": "object",
310
+ "properties": {
311
+ "kind": {
312
+ "type": "string",
313
+ "enum": [
314
+ "success",
315
+ "user_rejected",
316
+ "policy_denied",
317
+ "invalid_input",
318
+ "cancelled",
319
+ "tool_failed"
320
+ ]
321
+ }
322
+ },
323
+ "required": ["kind"],
324
+ "additionalProperties": false
325
+ }
326
+ },
327
+ "required": [
328
+ "type",
329
+ "toolCallId",
330
+ "agentName",
331
+ "toolName"
332
+ ],
333
+ "additionalProperties": false
334
+ },
335
+ {
336
+ "readOnly": true,
337
+ "type": "object",
338
+ "properties": {
339
+ "type": {
340
+ "type": "string",
341
+ "const": "approval.required"
342
+ },
343
+ "approval": {
344
+ "readOnly": true,
345
+ "type": "object",
346
+ "properties": {
347
+ "approvalId": {
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
+ "agentName": {
353
+ "type": "string",
354
+ "minLength": 1
355
+ },
356
+ "toolName": {
357
+ "type": "string",
358
+ "minLength": 1
359
+ },
360
+ "explanation": {
361
+ "type": "string",
362
+ "minLength": 1,
363
+ "maxLength": 100
364
+ }
365
+ },
366
+ "required": ["approvalId", "agentName", "toolName"],
367
+ "additionalProperties": false
368
+ }
369
+ },
370
+ "required": ["type", "approval"],
371
+ "additionalProperties": false
372
+ },
373
+ {
374
+ "readOnly": true,
375
+ "type": "object",
376
+ "properties": {
377
+ "type": {
378
+ "type": "string",
379
+ "const": "approval.resolved"
380
+ },
381
+ "approvalId": {
382
+ "type": "string",
383
+ "format": "uuid",
384
+ "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)$"
385
+ },
386
+ "resolution": {
387
+ "anyOf": [
388
+ {
389
+ "readOnly": true,
390
+ "type": "object",
391
+ "properties": {
392
+ "status": {
393
+ "type": "string",
394
+ "const": "resolved"
395
+ },
396
+ "decision": {
397
+ "type": "string",
398
+ "enum": ["approve", "reject"]
399
+ }
400
+ },
401
+ "required": ["status", "decision"],
402
+ "additionalProperties": false
403
+ },
404
+ {
405
+ "readOnly": true,
406
+ "type": "object",
407
+ "properties": {
408
+ "status": {
409
+ "type": "string",
410
+ "const": "cancelled"
411
+ }
412
+ },
413
+ "required": ["status"],
414
+ "additionalProperties": false
415
+ },
416
+ {
417
+ "readOnly": true,
418
+ "type": "object",
419
+ "properties": {
420
+ "status": {
421
+ "type": "string",
422
+ "const": "expired"
423
+ }
424
+ },
425
+ "required": ["status"],
426
+ "additionalProperties": false
427
+ }
428
+ ]
429
+ }
430
+ },
431
+ "required": ["type", "approvalId", "resolution"],
432
+ "additionalProperties": false
433
+ },
434
+ {
435
+ "readOnly": true,
436
+ "type": "object",
437
+ "properties": {
438
+ "type": {
439
+ "type": "string",
440
+ "const": "turn.completed"
441
+ }
442
+ },
443
+ "required": ["type"],
444
+ "additionalProperties": false
445
+ },
446
+ {
447
+ "readOnly": true,
448
+ "type": "object",
449
+ "properties": {
450
+ "type": {
451
+ "type": "string",
452
+ "const": "turn.cancelled"
453
+ }
454
+ },
455
+ "required": ["type"],
456
+ "additionalProperties": false
457
+ },
458
+ {
459
+ "readOnly": true,
460
+ "type": "object",
461
+ "properties": {
462
+ "type": {
463
+ "type": "string",
464
+ "const": "turn.failed"
465
+ },
466
+ "stage": {
467
+ "type": "string",
468
+ "enum": ["bootstrap", "plan", "execute"]
469
+ }
470
+ },
471
+ "required": ["type", "stage"],
472
+ "additionalProperties": false
473
+ },
474
+ {
475
+ "readOnly": true,
476
+ "type": "object",
477
+ "properties": {
478
+ "type": {
479
+ "type": "string",
480
+ "const": "capabilities.changed"
481
+ }
482
+ },
483
+ "required": ["type"],
484
+ "additionalProperties": false
485
+ }
486
+ ]
487
+ },
488
+ {
489
+ "readOnly": true,
490
+ "type": "object",
491
+ "properties": {
492
+ "type": {
493
+ "type": "string",
494
+ "const": "tool.completed"
495
+ },
496
+ "toolCallId": {
497
+ "type": "string",
498
+ "minLength": 1
499
+ },
500
+ "agentName": {
501
+ "type": "string",
502
+ "minLength": 1
503
+ },
504
+ "toolName": {
505
+ "type": "string",
506
+ "minLength": 1
507
+ },
508
+ "outcome": {
509
+ "readOnly": true,
510
+ "type": "object",
511
+ "properties": {
512
+ "kind": {
513
+ "type": "string",
514
+ "enum": [
515
+ "success",
516
+ "user_rejected",
517
+ "policy_denied",
518
+ "invalid_input",
519
+ "cancelled",
520
+ "tool_failed"
521
+ ]
522
+ }
523
+ },
524
+ "required": ["kind"],
525
+ "additionalProperties": false
526
+ },
527
+ "appOutput": {
528
+ "readOnly": true,
529
+ "anyOf": [
530
+ {
531
+ "readOnly": true,
532
+ "type": "object",
533
+ "properties": {
534
+ "status": {
535
+ "type": "string",
536
+ "const": "rejected"
537
+ },
538
+ "reason": {
539
+ "type": "string",
540
+ "enum": ["credential_field", "credential_value"]
541
+ },
542
+ "field": {
543
+ "type": "string",
544
+ "maxLength": 64
545
+ }
546
+ },
547
+ "required": ["status", "reason"],
548
+ "additionalProperties": false
549
+ },
550
+ {
551
+ "type": "object",
552
+ "properties": {
553
+ "status": {
554
+ "type": "string",
555
+ "const": "available"
556
+ },
557
+ "schemaId": {
558
+ "type": "string",
559
+ "minLength": 1,
560
+ "maxLength": 256
561
+ },
562
+ "schemaVersion": {
563
+ "type": "integer",
564
+ "exclusiveMinimum": 0,
565
+ "maximum": 9007199254740991
566
+ }
567
+ },
568
+ "required": ["status", "schemaId", "schemaVersion"],
569
+ "additionalProperties": false
570
+ },
571
+ {
572
+ "type": "object",
573
+ "properties": {
574
+ "status": {
575
+ "type": "string",
576
+ "enum": [
577
+ "not_provided",
578
+ "invalid",
579
+ "too_large",
580
+ "expired",
581
+ "denied"
582
+ ]
583
+ }
584
+ },
585
+ "required": ["status"],
586
+ "additionalProperties": false
587
+ }
588
+ ]
589
+ },
590
+ "operationId": {
591
+ "type": "string",
592
+ "format": "uuid",
593
+ "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)$"
594
+ }
595
+ },
596
+ "required": ["type", "toolCallId", "agentName", "toolName"],
597
+ "additionalProperties": false
598
+ }
599
+ ]
600
+ }
601
+ },
602
+ "required": [
603
+ "protocolVersion",
604
+ "runtimeInstanceId",
605
+ "sequence",
606
+ "timestamp",
607
+ "threadId",
608
+ "event"
609
+ ],
610
+ "additionalProperties": false
611
+ }
612
+ },
613
+ "required": ["type", "workspaceId", "relaySequence", "event"],
614
+ "additionalProperties": false
615
+ },
616
+ {
617
+ "readOnly": true,
618
+ "type": "object",
619
+ "properties": {
620
+ "type": {
621
+ "type": "string",
622
+ "const": "runtime.ack"
623
+ },
624
+ "workspaceId": {
625
+ "type": "string",
626
+ "format": "uuid",
627
+ "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)$"
628
+ },
629
+ "throughRelaySequence": {
630
+ "type": "integer",
631
+ "minimum": -1,
632
+ "maximum": 9007199254740991
633
+ }
634
+ },
635
+ "required": ["type", "workspaceId", "throughRelaySequence"],
636
+ "additionalProperties": false
637
+ },
638
+ {
639
+ "readOnly": true,
640
+ "type": "object",
641
+ "properties": {
642
+ "type": {
643
+ "type": "string",
644
+ "const": "runtime.gap"
645
+ },
646
+ "workspaceId": {
647
+ "type": "string",
648
+ "format": "uuid",
649
+ "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)$"
650
+ },
651
+ "fromRelaySequence": {
652
+ "type": "integer",
653
+ "minimum": 0,
654
+ "maximum": 9007199254740991
655
+ },
656
+ "throughRelaySequence": {
657
+ "type": "integer",
658
+ "minimum": 0,
659
+ "maximum": 9007199254740991
660
+ },
661
+ "recovery": {
662
+ "type": "string",
663
+ "const": "thread.snapshot"
664
+ }
665
+ },
666
+ "required": [
667
+ "type",
668
+ "workspaceId",
669
+ "fromRelaySequence",
670
+ "throughRelaySequence",
671
+ "recovery"
672
+ ],
673
+ "additionalProperties": false
674
+ },
675
+ {
676
+ "readOnly": true,
677
+ "type": "object",
678
+ "properties": {
679
+ "type": {
680
+ "type": "string",
681
+ "const": "runtime.encrypted"
682
+ },
683
+ "workspaceId": {
684
+ "type": "string",
685
+ "format": "uuid",
686
+ "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)$"
687
+ },
688
+ "envelopeId": {
689
+ "type": "string",
690
+ "format": "uuid",
691
+ "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)$"
692
+ },
693
+ "payloadKind": {
694
+ "type": "string",
695
+ "enum": ["request", "response", "event", "interaction"]
696
+ },
697
+ "requestId": {
698
+ "type": "string",
699
+ "format": "uuid",
700
+ "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)$"
701
+ },
702
+ "relaySequence": {
703
+ "type": "integer",
704
+ "minimum": 0,
705
+ "maximum": 9007199254740991
706
+ },
707
+ "algorithm": {
708
+ "type": "string",
709
+ "minLength": 1
710
+ },
711
+ "nonce": {
712
+ "type": "string",
713
+ "minLength": 1
714
+ },
715
+ "ciphertext": {
716
+ "type": "string",
717
+ "minLength": 1
718
+ }
719
+ },
720
+ "required": [
721
+ "type",
722
+ "workspaceId",
723
+ "envelopeId",
724
+ "payloadKind",
725
+ "algorithm",
726
+ "nonce",
727
+ "ciphertext"
728
+ ],
729
+ "additionalProperties": false
730
+ },
731
+ {
732
+ "anyOf": [
733
+ {
734
+ "readOnly": true,
735
+ "type": "object",
736
+ "properties": {
737
+ "type": {
738
+ "type": "string",
739
+ "const": "interaction.request"
740
+ },
741
+ "workspaceId": {
742
+ "type": "string",
743
+ "format": "uuid",
744
+ "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)$"
745
+ },
746
+ "relaySequence": {
747
+ "type": "integer",
748
+ "minimum": 0,
749
+ "maximum": 9007199254740991
750
+ },
751
+ "interactionId": {
752
+ "type": "string",
753
+ "format": "uuid",
754
+ "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)$"
755
+ },
756
+ "threadId": {
757
+ "type": "string",
758
+ "format": "uuid",
759
+ "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)$"
760
+ },
761
+ "turnId": {
762
+ "type": "string",
763
+ "format": "uuid",
764
+ "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)$"
765
+ },
766
+ "expiresAt": {
767
+ "type": "string",
768
+ "format": "date-time",
769
+ "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})))$"
770
+ },
771
+ "sensitivity": {
772
+ "type": "string",
773
+ "const": "normal"
774
+ },
775
+ "method": {
776
+ "type": "string",
777
+ "const": "approval.request"
778
+ },
779
+ "projection": {
780
+ "readOnly": true,
781
+ "type": "object",
782
+ "properties": {
783
+ "approvalId": {
784
+ "type": "string",
785
+ "format": "uuid",
786
+ "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)$"
787
+ },
788
+ "agentName": {
789
+ "type": "string",
790
+ "minLength": 1
791
+ },
792
+ "toolName": {
793
+ "type": "string",
794
+ "minLength": 1
795
+ },
796
+ "explanation": {
797
+ "type": "string",
798
+ "minLength": 1,
799
+ "maxLength": 100
800
+ }
801
+ },
802
+ "required": ["approvalId", "agentName", "toolName"],
803
+ "additionalProperties": false
804
+ }
805
+ },
806
+ "required": [
807
+ "type",
808
+ "workspaceId",
809
+ "relaySequence",
810
+ "interactionId",
811
+ "threadId",
812
+ "turnId",
813
+ "expiresAt",
814
+ "sensitivity",
815
+ "method",
816
+ "projection"
817
+ ],
818
+ "additionalProperties": false
819
+ },
820
+ {
821
+ "readOnly": true,
822
+ "type": "object",
823
+ "properties": {
824
+ "type": {
825
+ "type": "string",
826
+ "const": "interaction.request"
827
+ },
828
+ "workspaceId": {
829
+ "type": "string",
830
+ "format": "uuid",
831
+ "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)$"
832
+ },
833
+ "relaySequence": {
834
+ "type": "integer",
835
+ "minimum": 0,
836
+ "maximum": 9007199254740991
837
+ },
838
+ "interactionId": {
839
+ "type": "string",
840
+ "format": "uuid",
841
+ "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)$"
842
+ },
843
+ "threadId": {
844
+ "type": "string",
845
+ "format": "uuid",
846
+ "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)$"
847
+ },
848
+ "turnId": {
849
+ "type": "string",
850
+ "format": "uuid",
851
+ "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)$"
852
+ },
853
+ "expiresAt": {
854
+ "type": "string",
855
+ "format": "date-time",
856
+ "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})))$"
857
+ },
858
+ "sensitivity": {
859
+ "type": "string",
860
+ "const": "normal"
861
+ },
862
+ "method": {
863
+ "type": "string",
864
+ "const": "userInput.request"
865
+ },
866
+ "projection": {
867
+ "readOnly": true,
868
+ "type": "object",
869
+ "properties": {
870
+ "title": {
871
+ "type": "string",
872
+ "minLength": 1,
873
+ "maxLength": 200
874
+ },
875
+ "description": {
876
+ "type": "string",
877
+ "minLength": 1,
878
+ "maxLength": 500
879
+ },
880
+ "controls": {
881
+ "minItems": 1,
882
+ "maxItems": 16,
883
+ "type": "array",
884
+ "items": {
885
+ "anyOf": [
886
+ {
887
+ "readOnly": true,
888
+ "type": "object",
889
+ "properties": {
890
+ "type": {
891
+ "type": "string",
892
+ "const": "text"
893
+ },
894
+ "id": {
895
+ "type": "string",
896
+ "minLength": 1,
897
+ "maxLength": 64
898
+ },
899
+ "label": {
900
+ "type": "string",
901
+ "minLength": 1,
902
+ "maxLength": 200
903
+ },
904
+ "description": {
905
+ "type": "string",
906
+ "minLength": 1,
907
+ "maxLength": 500
908
+ },
909
+ "required": {
910
+ "type": "boolean"
911
+ },
912
+ "minLength": {
913
+ "type": "integer",
914
+ "minimum": 0,
915
+ "maximum": 10000
916
+ },
917
+ "maxLength": {
918
+ "type": "integer",
919
+ "minimum": 0,
920
+ "maximum": 10000
921
+ }
922
+ },
923
+ "required": ["type", "id", "label", "required"],
924
+ "additionalProperties": false
925
+ },
926
+ {
927
+ "readOnly": true,
928
+ "type": "object",
929
+ "properties": {
930
+ "type": {
931
+ "type": "string",
932
+ "const": "multiline"
933
+ },
934
+ "id": {
935
+ "type": "string",
936
+ "minLength": 1,
937
+ "maxLength": 64
938
+ },
939
+ "label": {
940
+ "type": "string",
941
+ "minLength": 1,
942
+ "maxLength": 200
943
+ },
944
+ "description": {
945
+ "type": "string",
946
+ "minLength": 1,
947
+ "maxLength": 500
948
+ },
949
+ "required": {
950
+ "type": "boolean"
951
+ },
952
+ "minLength": {
953
+ "type": "integer",
954
+ "minimum": 0,
955
+ "maximum": 10000
956
+ },
957
+ "maxLength": {
958
+ "type": "integer",
959
+ "minimum": 0,
960
+ "maximum": 10000
961
+ }
962
+ },
963
+ "required": ["type", "id", "label", "required"],
964
+ "additionalProperties": false
965
+ },
966
+ {
967
+ "readOnly": true,
968
+ "type": "object",
969
+ "properties": {
970
+ "type": {
971
+ "type": "string",
972
+ "const": "number"
973
+ },
974
+ "id": {
975
+ "type": "string",
976
+ "minLength": 1,
977
+ "maxLength": 64
978
+ },
979
+ "label": {
980
+ "type": "string",
981
+ "minLength": 1,
982
+ "maxLength": 200
983
+ },
984
+ "description": {
985
+ "type": "string",
986
+ "minLength": 1,
987
+ "maxLength": 500
988
+ },
989
+ "required": {
990
+ "type": "boolean"
991
+ },
992
+ "min": {
993
+ "type": "number"
994
+ },
995
+ "max": {
996
+ "type": "number"
997
+ },
998
+ "integer": {
999
+ "type": "boolean"
1000
+ }
1001
+ },
1002
+ "required": ["type", "id", "label", "required"],
1003
+ "additionalProperties": false
1004
+ },
1005
+ {
1006
+ "readOnly": true,
1007
+ "type": "object",
1008
+ "properties": {
1009
+ "type": {
1010
+ "type": "string",
1011
+ "const": "boolean"
1012
+ },
1013
+ "id": {
1014
+ "type": "string",
1015
+ "minLength": 1,
1016
+ "maxLength": 64
1017
+ },
1018
+ "label": {
1019
+ "type": "string",
1020
+ "minLength": 1,
1021
+ "maxLength": 200
1022
+ },
1023
+ "description": {
1024
+ "type": "string",
1025
+ "minLength": 1,
1026
+ "maxLength": 500
1027
+ },
1028
+ "required": {
1029
+ "type": "boolean"
1030
+ }
1031
+ },
1032
+ "required": ["type", "id", "label", "required"],
1033
+ "additionalProperties": false
1034
+ },
1035
+ {
1036
+ "readOnly": true,
1037
+ "type": "object",
1038
+ "properties": {
1039
+ "type": {
1040
+ "type": "string",
1041
+ "const": "choice"
1042
+ },
1043
+ "id": {
1044
+ "type": "string",
1045
+ "minLength": 1,
1046
+ "maxLength": 64
1047
+ },
1048
+ "label": {
1049
+ "type": "string",
1050
+ "minLength": 1,
1051
+ "maxLength": 200
1052
+ },
1053
+ "description": {
1054
+ "type": "string",
1055
+ "minLength": 1,
1056
+ "maxLength": 500
1057
+ },
1058
+ "required": {
1059
+ "type": "boolean"
1060
+ },
1061
+ "multiple": {
1062
+ "type": "boolean"
1063
+ },
1064
+ "options": {
1065
+ "minItems": 1,
1066
+ "maxItems": 50,
1067
+ "type": "array",
1068
+ "items": {
1069
+ "readOnly": true,
1070
+ "type": "object",
1071
+ "properties": {
1072
+ "id": {
1073
+ "type": "string",
1074
+ "minLength": 1,
1075
+ "maxLength": 64
1076
+ },
1077
+ "label": {
1078
+ "type": "string",
1079
+ "minLength": 1,
1080
+ "maxLength": 200
1081
+ },
1082
+ "description": {
1083
+ "type": "string",
1084
+ "minLength": 1,
1085
+ "maxLength": 500
1086
+ }
1087
+ },
1088
+ "required": ["id", "label"],
1089
+ "additionalProperties": false
1090
+ }
1091
+ },
1092
+ "minSelections": {
1093
+ "type": "integer",
1094
+ "minimum": 0,
1095
+ "maximum": 50
1096
+ },
1097
+ "maxSelections": {
1098
+ "type": "integer",
1099
+ "minimum": 1,
1100
+ "maximum": 50
1101
+ }
1102
+ },
1103
+ "required": [
1104
+ "type",
1105
+ "id",
1106
+ "label",
1107
+ "required",
1108
+ "multiple",
1109
+ "options"
1110
+ ],
1111
+ "additionalProperties": false
1112
+ }
1113
+ ]
1114
+ }
1115
+ }
1116
+ },
1117
+ "required": ["controls"],
1118
+ "additionalProperties": false
1119
+ }
1120
+ },
1121
+ "required": [
1122
+ "type",
1123
+ "workspaceId",
1124
+ "relaySequence",
1125
+ "interactionId",
1126
+ "threadId",
1127
+ "turnId",
1128
+ "expiresAt",
1129
+ "sensitivity",
1130
+ "method",
1131
+ "projection"
1132
+ ],
1133
+ "additionalProperties": false
1134
+ }
1135
+ ]
1136
+ },
1137
+ {
1138
+ "readOnly": true,
1139
+ "type": "object",
1140
+ "properties": {
1141
+ "type": {
1142
+ "type": "string",
1143
+ "const": "interaction.resolved"
1144
+ },
1145
+ "workspaceId": {
1146
+ "type": "string",
1147
+ "format": "uuid",
1148
+ "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)$"
1149
+ },
1150
+ "relaySequence": {
1151
+ "type": "integer",
1152
+ "minimum": 0,
1153
+ "maximum": 9007199254740991
1154
+ },
1155
+ "interactionId": {
1156
+ "type": "string",
1157
+ "format": "uuid",
1158
+ "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)$"
1159
+ },
1160
+ "threadId": {
1161
+ "type": "string",
1162
+ "format": "uuid",
1163
+ "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)$"
1164
+ },
1165
+ "turnId": {
1166
+ "type": "string",
1167
+ "format": "uuid",
1168
+ "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)$"
1169
+ },
1170
+ "method": {
1171
+ "type": "string",
1172
+ "enum": ["approval.request", "userInput.request"]
1173
+ }
1174
+ },
1175
+ "required": [
1176
+ "type",
1177
+ "workspaceId",
1178
+ "relaySequence",
1179
+ "interactionId",
1180
+ "threadId",
1181
+ "turnId",
1182
+ "method"
1183
+ ],
1184
+ "additionalProperties": false
1185
+ },
1186
+ {
1187
+ "readOnly": true,
1188
+ "type": "object",
1189
+ "properties": {
1190
+ "type": {
1191
+ "type": "string",
1192
+ "const": "interaction.cancelled"
1193
+ },
1194
+ "workspaceId": {
1195
+ "type": "string",
1196
+ "format": "uuid",
1197
+ "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)$"
1198
+ },
1199
+ "relaySequence": {
1200
+ "type": "integer",
1201
+ "minimum": 0,
1202
+ "maximum": 9007199254740991
1203
+ },
1204
+ "interactionId": {
1205
+ "type": "string",
1206
+ "format": "uuid",
1207
+ "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)$"
1208
+ },
1209
+ "threadId": {
1210
+ "type": "string",
1211
+ "format": "uuid",
1212
+ "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)$"
1213
+ },
1214
+ "turnId": {
1215
+ "type": "string",
1216
+ "format": "uuid",
1217
+ "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)$"
1218
+ },
1219
+ "method": {
1220
+ "type": "string",
1221
+ "enum": ["approval.request", "userInput.request"]
1222
+ }
1223
+ },
1224
+ "required": [
1225
+ "type",
1226
+ "workspaceId",
1227
+ "relaySequence",
1228
+ "interactionId",
1229
+ "threadId",
1230
+ "turnId",
1231
+ "method"
1232
+ ],
1233
+ "additionalProperties": false
1234
+ }
1235
+ ],
1236
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1237
+ "$id": "urn:roll-agent:schema:relay-protocol:1.2",
1238
+ "title": "Roll Relay Protocol v1.2",
1239
+ "description": "Versioned Companion Relay frames shared by Browser, Cloud Relay and Companion.",
1240
+ "$defs": {
1241
+ "relayMessage": {
1242
+ "anyOf": [
1243
+ {
1244
+ "readOnly": true,
1245
+ "type": "object",
1246
+ "properties": {
1247
+ "type": {
1248
+ "type": "string",
1249
+ "const": "device.connect"
1250
+ },
1251
+ "protocolVersion": {
1252
+ "type": "string",
1253
+ "const": "1.2"
1254
+ },
1255
+ "deviceId": {
1256
+ "type": "string",
1257
+ "format": "uuid",
1258
+ "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)$"
1259
+ },
1260
+ "pairingToken": {
1261
+ "type": "string",
1262
+ "minLength": 16
1263
+ }
1264
+ },
1265
+ "required": ["type", "protocolVersion", "deviceId", "pairingToken"],
1266
+ "additionalProperties": false
1267
+ },
1268
+ {
1269
+ "readOnly": true,
1270
+ "type": "object",
1271
+ "properties": {
1272
+ "type": {
1273
+ "type": "string",
1274
+ "const": "runtime.request"
1275
+ },
1276
+ "requestId": {
1277
+ "type": "string",
1278
+ "format": "uuid",
1279
+ "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)$"
1280
+ },
1281
+ "workspaceId": {
1282
+ "type": "string",
1283
+ "format": "uuid",
1284
+ "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)$"
1285
+ },
1286
+ "method": {
1287
+ "type": "string",
1288
+ "enum": [
1289
+ "initialize",
1290
+ "thread.list",
1291
+ "thread.create",
1292
+ "thread.open",
1293
+ "thread.snapshot",
1294
+ "thread.rename",
1295
+ "thread.delete",
1296
+ "thread.detach",
1297
+ "thread.capabilities",
1298
+ "turn.start",
1299
+ "turn.cancel",
1300
+ "operation.get",
1301
+ "interaction.candidate",
1302
+ "operation.result.get"
1303
+ ]
1304
+ },
1305
+ "params": {
1306
+ "$ref": "#/$defs/sharedSchema0"
1307
+ }
1308
+ },
1309
+ "required": ["type", "requestId", "workspaceId", "method", "params"],
1310
+ "additionalProperties": false
1311
+ },
1312
+ {
1313
+ "readOnly": true,
1314
+ "type": "object",
1315
+ "properties": {
1316
+ "type": {
1317
+ "type": "string",
1318
+ "const": "runtime.response"
1319
+ },
1320
+ "requestId": {
1321
+ "type": "string",
1322
+ "format": "uuid",
1323
+ "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)$"
1324
+ },
1325
+ "workspaceId": {
1326
+ "type": "string",
1327
+ "format": "uuid",
1328
+ "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)$"
1329
+ },
1330
+ "result": {
1331
+ "$ref": "#/$defs/sharedSchema0"
1332
+ },
1333
+ "error": {
1334
+ "readOnly": true,
1335
+ "type": "object",
1336
+ "properties": {
1337
+ "code": {
1338
+ "type": "string",
1339
+ "minLength": 1
1340
+ },
1341
+ "message": {
1342
+ "type": "string"
1343
+ },
1344
+ "retryable": {
1345
+ "type": "boolean"
1346
+ }
1347
+ },
1348
+ "required": ["code", "message", "retryable"],
1349
+ "additionalProperties": false
1350
+ }
1351
+ },
1352
+ "required": ["type", "requestId", "workspaceId"],
1353
+ "additionalProperties": false
1354
+ },
1355
+ {
1356
+ "readOnly": true,
1357
+ "type": "object",
1358
+ "properties": {
1359
+ "type": {
1360
+ "type": "string",
1361
+ "const": "runtime.event"
1362
+ },
1363
+ "workspaceId": {
1364
+ "type": "string",
1365
+ "format": "uuid",
1366
+ "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)$"
1367
+ },
1368
+ "relaySequence": {
1369
+ "type": "integer",
1370
+ "minimum": 0,
1371
+ "maximum": 9007199254740991
1372
+ },
1373
+ "event": {
1374
+ "readOnly": true,
1375
+ "type": "object",
1376
+ "properties": {
1377
+ "protocolVersion": {
1378
+ "type": "string",
1379
+ "enum": ["1.1", "1.0"]
1380
+ },
1381
+ "runtimeInstanceId": {
1382
+ "type": "string",
1383
+ "format": "uuid",
1384
+ "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)$"
1385
+ },
1386
+ "sequence": {
1387
+ "type": "integer",
1388
+ "minimum": 0,
1389
+ "maximum": 9007199254740991
1390
+ },
1391
+ "timestamp": {
1392
+ "type": "string",
1393
+ "format": "date-time",
1394
+ "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})))$"
1395
+ },
1396
+ "threadId": {
1397
+ "type": "string",
1398
+ "format": "uuid",
1399
+ "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)$"
1400
+ },
1401
+ "turnId": {
1402
+ "type": "string",
1403
+ "format": "uuid",
1404
+ "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)$"
1405
+ },
1406
+ "event": {
1407
+ "anyOf": [
1408
+ {
1409
+ "anyOf": [
1410
+ {
1411
+ "readOnly": true,
1412
+ "type": "object",
1413
+ "properties": {
1414
+ "type": {
1415
+ "type": "string",
1416
+ "const": "turn.started"
1417
+ }
1418
+ },
1419
+ "required": ["type"],
1420
+ "additionalProperties": false
1421
+ },
1422
+ {
1423
+ "readOnly": true,
1424
+ "type": "object",
1425
+ "properties": {
1426
+ "type": {
1427
+ "type": "string",
1428
+ "const": "message.started"
1429
+ },
1430
+ "streamId": {
1431
+ "type": "string",
1432
+ "format": "uuid",
1433
+ "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)$"
1434
+ }
1435
+ },
1436
+ "required": ["type", "streamId"],
1437
+ "additionalProperties": false
1438
+ },
1439
+ {
1440
+ "readOnly": true,
1441
+ "type": "object",
1442
+ "properties": {
1443
+ "type": {
1444
+ "type": "string",
1445
+ "const": "message.delta"
1446
+ },
1447
+ "streamId": {
1448
+ "type": "string",
1449
+ "format": "uuid",
1450
+ "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)$"
1451
+ },
1452
+ "delta": {
1453
+ "type": "string"
1454
+ }
1455
+ },
1456
+ "required": ["type", "streamId", "delta"],
1457
+ "additionalProperties": false
1458
+ },
1459
+ {
1460
+ "readOnly": true,
1461
+ "type": "object",
1462
+ "properties": {
1463
+ "type": {
1464
+ "type": "string",
1465
+ "const": "message.completed"
1466
+ },
1467
+ "streamId": {
1468
+ "type": "string",
1469
+ "format": "uuid",
1470
+ "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)$"
1471
+ },
1472
+ "text": {
1473
+ "type": "string"
1474
+ }
1475
+ },
1476
+ "required": ["type", "streamId", "text"],
1477
+ "additionalProperties": false
1478
+ },
1479
+ {
1480
+ "readOnly": true,
1481
+ "type": "object",
1482
+ "properties": {
1483
+ "type": {
1484
+ "type": "string",
1485
+ "const": "reasoning.summary.delta"
1486
+ },
1487
+ "reasoningId": {
1488
+ "type": "string",
1489
+ "minLength": 1
1490
+ },
1491
+ "delta": {
1492
+ "type": "string"
1493
+ }
1494
+ },
1495
+ "required": ["type", "reasoningId", "delta"],
1496
+ "additionalProperties": false
1497
+ },
1498
+ {
1499
+ "readOnly": true,
1500
+ "type": "object",
1501
+ "properties": {
1502
+ "type": {
1503
+ "type": "string",
1504
+ "const": "tool.started"
1505
+ },
1506
+ "toolCallId": {
1507
+ "type": "string",
1508
+ "minLength": 1
1509
+ },
1510
+ "agentName": {
1511
+ "type": "string",
1512
+ "minLength": 1
1513
+ },
1514
+ "toolName": {
1515
+ "type": "string",
1516
+ "minLength": 1
1517
+ }
1518
+ },
1519
+ "required": [
1520
+ "type",
1521
+ "toolCallId",
1522
+ "agentName",
1523
+ "toolName"
1524
+ ],
1525
+ "additionalProperties": false
1526
+ },
1527
+ {
1528
+ "readOnly": true,
1529
+ "type": "object",
1530
+ "properties": {
1531
+ "type": {
1532
+ "type": "string",
1533
+ "const": "tool.completed"
1534
+ },
1535
+ "toolCallId": {
1536
+ "type": "string",
1537
+ "minLength": 1
1538
+ },
1539
+ "agentName": {
1540
+ "type": "string",
1541
+ "minLength": 1
1542
+ },
1543
+ "toolName": {
1544
+ "type": "string",
1545
+ "minLength": 1
1546
+ },
1547
+ "outcome": {
1548
+ "readOnly": true,
1549
+ "type": "object",
1550
+ "properties": {
1551
+ "kind": {
1552
+ "type": "string",
1553
+ "enum": [
1554
+ "success",
1555
+ "user_rejected",
1556
+ "policy_denied",
1557
+ "invalid_input",
1558
+ "cancelled",
1559
+ "tool_failed"
1560
+ ]
1561
+ }
1562
+ },
1563
+ "required": ["kind"],
1564
+ "additionalProperties": false
1565
+ }
1566
+ },
1567
+ "required": [
1568
+ "type",
1569
+ "toolCallId",
1570
+ "agentName",
1571
+ "toolName"
1572
+ ],
1573
+ "additionalProperties": false
1574
+ },
1575
+ {
1576
+ "readOnly": true,
1577
+ "type": "object",
1578
+ "properties": {
1579
+ "type": {
1580
+ "type": "string",
1581
+ "const": "approval.required"
1582
+ },
1583
+ "approval": {
1584
+ "readOnly": true,
1585
+ "type": "object",
1586
+ "properties": {
1587
+ "approvalId": {
1588
+ "type": "string",
1589
+ "format": "uuid",
1590
+ "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)$"
1591
+ },
1592
+ "agentName": {
1593
+ "type": "string",
1594
+ "minLength": 1
1595
+ },
1596
+ "toolName": {
1597
+ "type": "string",
1598
+ "minLength": 1
1599
+ },
1600
+ "explanation": {
1601
+ "type": "string",
1602
+ "minLength": 1,
1603
+ "maxLength": 100
1604
+ }
1605
+ },
1606
+ "required": [
1607
+ "approvalId",
1608
+ "agentName",
1609
+ "toolName"
1610
+ ],
1611
+ "additionalProperties": false
1612
+ }
1613
+ },
1614
+ "required": ["type", "approval"],
1615
+ "additionalProperties": false
1616
+ },
1617
+ {
1618
+ "readOnly": true,
1619
+ "type": "object",
1620
+ "properties": {
1621
+ "type": {
1622
+ "type": "string",
1623
+ "const": "approval.resolved"
1624
+ },
1625
+ "approvalId": {
1626
+ "type": "string",
1627
+ "format": "uuid",
1628
+ "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)$"
1629
+ },
1630
+ "resolution": {
1631
+ "anyOf": [
1632
+ {
1633
+ "readOnly": true,
1634
+ "type": "object",
1635
+ "properties": {
1636
+ "status": {
1637
+ "type": "string",
1638
+ "const": "resolved"
1639
+ },
1640
+ "decision": {
1641
+ "type": "string",
1642
+ "enum": ["approve", "reject"]
1643
+ }
1644
+ },
1645
+ "required": ["status", "decision"],
1646
+ "additionalProperties": false
1647
+ },
1648
+ {
1649
+ "readOnly": true,
1650
+ "type": "object",
1651
+ "properties": {
1652
+ "status": {
1653
+ "type": "string",
1654
+ "const": "cancelled"
1655
+ }
1656
+ },
1657
+ "required": ["status"],
1658
+ "additionalProperties": false
1659
+ },
1660
+ {
1661
+ "readOnly": true,
1662
+ "type": "object",
1663
+ "properties": {
1664
+ "status": {
1665
+ "type": "string",
1666
+ "const": "expired"
1667
+ }
1668
+ },
1669
+ "required": ["status"],
1670
+ "additionalProperties": false
1671
+ }
1672
+ ]
1673
+ }
1674
+ },
1675
+ "required": ["type", "approvalId", "resolution"],
1676
+ "additionalProperties": false
1677
+ },
1678
+ {
1679
+ "readOnly": true,
1680
+ "type": "object",
1681
+ "properties": {
1682
+ "type": {
1683
+ "type": "string",
1684
+ "const": "turn.completed"
1685
+ }
1686
+ },
1687
+ "required": ["type"],
1688
+ "additionalProperties": false
1689
+ },
1690
+ {
1691
+ "readOnly": true,
1692
+ "type": "object",
1693
+ "properties": {
1694
+ "type": {
1695
+ "type": "string",
1696
+ "const": "turn.cancelled"
1697
+ }
1698
+ },
1699
+ "required": ["type"],
1700
+ "additionalProperties": false
1701
+ },
1702
+ {
1703
+ "readOnly": true,
1704
+ "type": "object",
1705
+ "properties": {
1706
+ "type": {
1707
+ "type": "string",
1708
+ "const": "turn.failed"
1709
+ },
1710
+ "stage": {
1711
+ "type": "string",
1712
+ "enum": ["bootstrap", "plan", "execute"]
1713
+ }
1714
+ },
1715
+ "required": ["type", "stage"],
1716
+ "additionalProperties": false
1717
+ },
1718
+ {
1719
+ "readOnly": true,
1720
+ "type": "object",
1721
+ "properties": {
1722
+ "type": {
1723
+ "type": "string",
1724
+ "const": "capabilities.changed"
1725
+ }
1726
+ },
1727
+ "required": ["type"],
1728
+ "additionalProperties": false
1729
+ }
1730
+ ]
1731
+ },
1732
+ {
1733
+ "readOnly": true,
1734
+ "type": "object",
1735
+ "properties": {
1736
+ "type": {
1737
+ "type": "string",
1738
+ "const": "tool.completed"
1739
+ },
1740
+ "toolCallId": {
1741
+ "type": "string",
1742
+ "minLength": 1
1743
+ },
1744
+ "agentName": {
1745
+ "type": "string",
1746
+ "minLength": 1
1747
+ },
1748
+ "toolName": {
1749
+ "type": "string",
1750
+ "minLength": 1
1751
+ },
1752
+ "outcome": {
1753
+ "readOnly": true,
1754
+ "type": "object",
1755
+ "properties": {
1756
+ "kind": {
1757
+ "type": "string",
1758
+ "enum": [
1759
+ "success",
1760
+ "user_rejected",
1761
+ "policy_denied",
1762
+ "invalid_input",
1763
+ "cancelled",
1764
+ "tool_failed"
1765
+ ]
1766
+ }
1767
+ },
1768
+ "required": ["kind"],
1769
+ "additionalProperties": false
1770
+ },
1771
+ "appOutput": {
1772
+ "readOnly": true,
1773
+ "anyOf": [
1774
+ {
1775
+ "readOnly": true,
1776
+ "type": "object",
1777
+ "properties": {
1778
+ "status": {
1779
+ "type": "string",
1780
+ "const": "rejected"
1781
+ },
1782
+ "reason": {
1783
+ "type": "string",
1784
+ "enum": [
1785
+ "credential_field",
1786
+ "credential_value"
1787
+ ]
1788
+ },
1789
+ "field": {
1790
+ "type": "string",
1791
+ "maxLength": 64
1792
+ }
1793
+ },
1794
+ "required": ["status", "reason"],
1795
+ "additionalProperties": false
1796
+ },
1797
+ {
1798
+ "type": "object",
1799
+ "properties": {
1800
+ "status": {
1801
+ "type": "string",
1802
+ "const": "available"
1803
+ },
1804
+ "schemaId": {
1805
+ "type": "string",
1806
+ "minLength": 1,
1807
+ "maxLength": 256
1808
+ },
1809
+ "schemaVersion": {
1810
+ "type": "integer",
1811
+ "exclusiveMinimum": 0,
1812
+ "maximum": 9007199254740991
1813
+ }
1814
+ },
1815
+ "required": [
1816
+ "status",
1817
+ "schemaId",
1818
+ "schemaVersion"
1819
+ ],
1820
+ "additionalProperties": false
1821
+ },
1822
+ {
1823
+ "type": "object",
1824
+ "properties": {
1825
+ "status": {
1826
+ "type": "string",
1827
+ "enum": [
1828
+ "not_provided",
1829
+ "invalid",
1830
+ "too_large",
1831
+ "expired",
1832
+ "denied"
1833
+ ]
1834
+ }
1835
+ },
1836
+ "required": ["status"],
1837
+ "additionalProperties": false
1838
+ }
1839
+ ]
1840
+ },
1841
+ "operationId": {
1842
+ "type": "string",
1843
+ "format": "uuid",
1844
+ "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)$"
1845
+ }
1846
+ },
1847
+ "required": [
1848
+ "type",
1849
+ "toolCallId",
1850
+ "agentName",
1851
+ "toolName"
1852
+ ],
1853
+ "additionalProperties": false
1854
+ }
1855
+ ]
1856
+ }
1857
+ },
1858
+ "required": [
1859
+ "protocolVersion",
1860
+ "runtimeInstanceId",
1861
+ "sequence",
1862
+ "timestamp",
1863
+ "threadId",
1864
+ "event"
1865
+ ],
1866
+ "additionalProperties": false
1867
+ }
1868
+ },
1869
+ "required": ["type", "workspaceId", "relaySequence", "event"],
1870
+ "additionalProperties": false
1871
+ },
1872
+ {
1873
+ "readOnly": true,
1874
+ "type": "object",
1875
+ "properties": {
1876
+ "type": {
1877
+ "type": "string",
1878
+ "const": "runtime.ack"
1879
+ },
1880
+ "workspaceId": {
1881
+ "type": "string",
1882
+ "format": "uuid",
1883
+ "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)$"
1884
+ },
1885
+ "throughRelaySequence": {
1886
+ "type": "integer",
1887
+ "minimum": -1,
1888
+ "maximum": 9007199254740991
1889
+ }
1890
+ },
1891
+ "required": ["type", "workspaceId", "throughRelaySequence"],
1892
+ "additionalProperties": false
1893
+ },
1894
+ {
1895
+ "readOnly": true,
1896
+ "type": "object",
1897
+ "properties": {
1898
+ "type": {
1899
+ "type": "string",
1900
+ "const": "runtime.gap"
1901
+ },
1902
+ "workspaceId": {
1903
+ "type": "string",
1904
+ "format": "uuid",
1905
+ "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)$"
1906
+ },
1907
+ "fromRelaySequence": {
1908
+ "type": "integer",
1909
+ "minimum": 0,
1910
+ "maximum": 9007199254740991
1911
+ },
1912
+ "throughRelaySequence": {
1913
+ "type": "integer",
1914
+ "minimum": 0,
1915
+ "maximum": 9007199254740991
1916
+ },
1917
+ "recovery": {
1918
+ "type": "string",
1919
+ "const": "thread.snapshot"
1920
+ }
1921
+ },
1922
+ "required": [
1923
+ "type",
1924
+ "workspaceId",
1925
+ "fromRelaySequence",
1926
+ "throughRelaySequence",
1927
+ "recovery"
1928
+ ],
1929
+ "additionalProperties": false
1930
+ },
1931
+ {
1932
+ "readOnly": true,
1933
+ "type": "object",
1934
+ "properties": {
1935
+ "type": {
1936
+ "type": "string",
1937
+ "const": "runtime.encrypted"
1938
+ },
1939
+ "workspaceId": {
1940
+ "type": "string",
1941
+ "format": "uuid",
1942
+ "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)$"
1943
+ },
1944
+ "envelopeId": {
1945
+ "type": "string",
1946
+ "format": "uuid",
1947
+ "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)$"
1948
+ },
1949
+ "payloadKind": {
1950
+ "type": "string",
1951
+ "enum": ["request", "response", "event", "interaction"]
1952
+ },
1953
+ "requestId": {
1954
+ "type": "string",
1955
+ "format": "uuid",
1956
+ "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)$"
1957
+ },
1958
+ "relaySequence": {
1959
+ "type": "integer",
1960
+ "minimum": 0,
1961
+ "maximum": 9007199254740991
1962
+ },
1963
+ "algorithm": {
1964
+ "type": "string",
1965
+ "minLength": 1
1966
+ },
1967
+ "nonce": {
1968
+ "type": "string",
1969
+ "minLength": 1
1970
+ },
1971
+ "ciphertext": {
1972
+ "type": "string",
1973
+ "minLength": 1
1974
+ }
1975
+ },
1976
+ "required": [
1977
+ "type",
1978
+ "workspaceId",
1979
+ "envelopeId",
1980
+ "payloadKind",
1981
+ "algorithm",
1982
+ "nonce",
1983
+ "ciphertext"
1984
+ ],
1985
+ "additionalProperties": false
1986
+ },
1987
+ {
1988
+ "anyOf": [
1989
+ {
1990
+ "readOnly": true,
1991
+ "type": "object",
1992
+ "properties": {
1993
+ "type": {
1994
+ "type": "string",
1995
+ "const": "interaction.request"
1996
+ },
1997
+ "workspaceId": {
1998
+ "type": "string",
1999
+ "format": "uuid",
2000
+ "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)$"
2001
+ },
2002
+ "relaySequence": {
2003
+ "type": "integer",
2004
+ "minimum": 0,
2005
+ "maximum": 9007199254740991
2006
+ },
2007
+ "interactionId": {
2008
+ "type": "string",
2009
+ "format": "uuid",
2010
+ "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)$"
2011
+ },
2012
+ "threadId": {
2013
+ "type": "string",
2014
+ "format": "uuid",
2015
+ "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)$"
2016
+ },
2017
+ "turnId": {
2018
+ "type": "string",
2019
+ "format": "uuid",
2020
+ "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)$"
2021
+ },
2022
+ "expiresAt": {
2023
+ "type": "string",
2024
+ "format": "date-time",
2025
+ "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})))$"
2026
+ },
2027
+ "sensitivity": {
2028
+ "type": "string",
2029
+ "const": "normal"
2030
+ },
2031
+ "method": {
2032
+ "type": "string",
2033
+ "const": "approval.request"
2034
+ },
2035
+ "projection": {
2036
+ "readOnly": true,
2037
+ "type": "object",
2038
+ "properties": {
2039
+ "approvalId": {
2040
+ "type": "string",
2041
+ "format": "uuid",
2042
+ "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)$"
2043
+ },
2044
+ "agentName": {
2045
+ "type": "string",
2046
+ "minLength": 1
2047
+ },
2048
+ "toolName": {
2049
+ "type": "string",
2050
+ "minLength": 1
2051
+ },
2052
+ "explanation": {
2053
+ "type": "string",
2054
+ "minLength": 1,
2055
+ "maxLength": 100
2056
+ }
2057
+ },
2058
+ "required": ["approvalId", "agentName", "toolName"],
2059
+ "additionalProperties": false
2060
+ }
2061
+ },
2062
+ "required": [
2063
+ "type",
2064
+ "workspaceId",
2065
+ "relaySequence",
2066
+ "interactionId",
2067
+ "threadId",
2068
+ "turnId",
2069
+ "expiresAt",
2070
+ "sensitivity",
2071
+ "method",
2072
+ "projection"
2073
+ ],
2074
+ "additionalProperties": false
2075
+ },
2076
+ {
2077
+ "readOnly": true,
2078
+ "type": "object",
2079
+ "properties": {
2080
+ "type": {
2081
+ "type": "string",
2082
+ "const": "interaction.request"
2083
+ },
2084
+ "workspaceId": {
2085
+ "type": "string",
2086
+ "format": "uuid",
2087
+ "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)$"
2088
+ },
2089
+ "relaySequence": {
2090
+ "type": "integer",
2091
+ "minimum": 0,
2092
+ "maximum": 9007199254740991
2093
+ },
2094
+ "interactionId": {
2095
+ "type": "string",
2096
+ "format": "uuid",
2097
+ "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)$"
2098
+ },
2099
+ "threadId": {
2100
+ "type": "string",
2101
+ "format": "uuid",
2102
+ "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)$"
2103
+ },
2104
+ "turnId": {
2105
+ "type": "string",
2106
+ "format": "uuid",
2107
+ "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)$"
2108
+ },
2109
+ "expiresAt": {
2110
+ "type": "string",
2111
+ "format": "date-time",
2112
+ "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})))$"
2113
+ },
2114
+ "sensitivity": {
2115
+ "type": "string",
2116
+ "const": "normal"
2117
+ },
2118
+ "method": {
2119
+ "type": "string",
2120
+ "const": "userInput.request"
2121
+ },
2122
+ "projection": {
2123
+ "readOnly": true,
2124
+ "type": "object",
2125
+ "properties": {
2126
+ "title": {
2127
+ "type": "string",
2128
+ "minLength": 1,
2129
+ "maxLength": 200
2130
+ },
2131
+ "description": {
2132
+ "type": "string",
2133
+ "minLength": 1,
2134
+ "maxLength": 500
2135
+ },
2136
+ "controls": {
2137
+ "minItems": 1,
2138
+ "maxItems": 16,
2139
+ "type": "array",
2140
+ "items": {
2141
+ "anyOf": [
2142
+ {
2143
+ "readOnly": true,
2144
+ "type": "object",
2145
+ "properties": {
2146
+ "type": {
2147
+ "type": "string",
2148
+ "const": "text"
2149
+ },
2150
+ "id": {
2151
+ "type": "string",
2152
+ "minLength": 1,
2153
+ "maxLength": 64
2154
+ },
2155
+ "label": {
2156
+ "type": "string",
2157
+ "minLength": 1,
2158
+ "maxLength": 200
2159
+ },
2160
+ "description": {
2161
+ "type": "string",
2162
+ "minLength": 1,
2163
+ "maxLength": 500
2164
+ },
2165
+ "required": {
2166
+ "type": "boolean"
2167
+ },
2168
+ "minLength": {
2169
+ "type": "integer",
2170
+ "minimum": 0,
2171
+ "maximum": 10000
2172
+ },
2173
+ "maxLength": {
2174
+ "type": "integer",
2175
+ "minimum": 0,
2176
+ "maximum": 10000
2177
+ }
2178
+ },
2179
+ "required": ["type", "id", "label", "required"],
2180
+ "additionalProperties": false
2181
+ },
2182
+ {
2183
+ "readOnly": true,
2184
+ "type": "object",
2185
+ "properties": {
2186
+ "type": {
2187
+ "type": "string",
2188
+ "const": "multiline"
2189
+ },
2190
+ "id": {
2191
+ "type": "string",
2192
+ "minLength": 1,
2193
+ "maxLength": 64
2194
+ },
2195
+ "label": {
2196
+ "type": "string",
2197
+ "minLength": 1,
2198
+ "maxLength": 200
2199
+ },
2200
+ "description": {
2201
+ "type": "string",
2202
+ "minLength": 1,
2203
+ "maxLength": 500
2204
+ },
2205
+ "required": {
2206
+ "type": "boolean"
2207
+ },
2208
+ "minLength": {
2209
+ "type": "integer",
2210
+ "minimum": 0,
2211
+ "maximum": 10000
2212
+ },
2213
+ "maxLength": {
2214
+ "type": "integer",
2215
+ "minimum": 0,
2216
+ "maximum": 10000
2217
+ }
2218
+ },
2219
+ "required": ["type", "id", "label", "required"],
2220
+ "additionalProperties": false
2221
+ },
2222
+ {
2223
+ "readOnly": true,
2224
+ "type": "object",
2225
+ "properties": {
2226
+ "type": {
2227
+ "type": "string",
2228
+ "const": "number"
2229
+ },
2230
+ "id": {
2231
+ "type": "string",
2232
+ "minLength": 1,
2233
+ "maxLength": 64
2234
+ },
2235
+ "label": {
2236
+ "type": "string",
2237
+ "minLength": 1,
2238
+ "maxLength": 200
2239
+ },
2240
+ "description": {
2241
+ "type": "string",
2242
+ "minLength": 1,
2243
+ "maxLength": 500
2244
+ },
2245
+ "required": {
2246
+ "type": "boolean"
2247
+ },
2248
+ "min": {
2249
+ "type": "number"
2250
+ },
2251
+ "max": {
2252
+ "type": "number"
2253
+ },
2254
+ "integer": {
2255
+ "type": "boolean"
2256
+ }
2257
+ },
2258
+ "required": ["type", "id", "label", "required"],
2259
+ "additionalProperties": false
2260
+ },
2261
+ {
2262
+ "readOnly": true,
2263
+ "type": "object",
2264
+ "properties": {
2265
+ "type": {
2266
+ "type": "string",
2267
+ "const": "boolean"
2268
+ },
2269
+ "id": {
2270
+ "type": "string",
2271
+ "minLength": 1,
2272
+ "maxLength": 64
2273
+ },
2274
+ "label": {
2275
+ "type": "string",
2276
+ "minLength": 1,
2277
+ "maxLength": 200
2278
+ },
2279
+ "description": {
2280
+ "type": "string",
2281
+ "minLength": 1,
2282
+ "maxLength": 500
2283
+ },
2284
+ "required": {
2285
+ "type": "boolean"
2286
+ }
2287
+ },
2288
+ "required": ["type", "id", "label", "required"],
2289
+ "additionalProperties": false
2290
+ },
2291
+ {
2292
+ "readOnly": true,
2293
+ "type": "object",
2294
+ "properties": {
2295
+ "type": {
2296
+ "type": "string",
2297
+ "const": "choice"
2298
+ },
2299
+ "id": {
2300
+ "type": "string",
2301
+ "minLength": 1,
2302
+ "maxLength": 64
2303
+ },
2304
+ "label": {
2305
+ "type": "string",
2306
+ "minLength": 1,
2307
+ "maxLength": 200
2308
+ },
2309
+ "description": {
2310
+ "type": "string",
2311
+ "minLength": 1,
2312
+ "maxLength": 500
2313
+ },
2314
+ "required": {
2315
+ "type": "boolean"
2316
+ },
2317
+ "multiple": {
2318
+ "type": "boolean"
2319
+ },
2320
+ "options": {
2321
+ "minItems": 1,
2322
+ "maxItems": 50,
2323
+ "type": "array",
2324
+ "items": {
2325
+ "readOnly": true,
2326
+ "type": "object",
2327
+ "properties": {
2328
+ "id": {
2329
+ "type": "string",
2330
+ "minLength": 1,
2331
+ "maxLength": 64
2332
+ },
2333
+ "label": {
2334
+ "type": "string",
2335
+ "minLength": 1,
2336
+ "maxLength": 200
2337
+ },
2338
+ "description": {
2339
+ "type": "string",
2340
+ "minLength": 1,
2341
+ "maxLength": 500
2342
+ }
2343
+ },
2344
+ "required": ["id", "label"],
2345
+ "additionalProperties": false
2346
+ }
2347
+ },
2348
+ "minSelections": {
2349
+ "type": "integer",
2350
+ "minimum": 0,
2351
+ "maximum": 50
2352
+ },
2353
+ "maxSelections": {
2354
+ "type": "integer",
2355
+ "minimum": 1,
2356
+ "maximum": 50
2357
+ }
2358
+ },
2359
+ "required": [
2360
+ "type",
2361
+ "id",
2362
+ "label",
2363
+ "required",
2364
+ "multiple",
2365
+ "options"
2366
+ ],
2367
+ "additionalProperties": false
2368
+ }
2369
+ ]
2370
+ }
2371
+ }
2372
+ },
2373
+ "required": ["controls"],
2374
+ "additionalProperties": false
2375
+ }
2376
+ },
2377
+ "required": [
2378
+ "type",
2379
+ "workspaceId",
2380
+ "relaySequence",
2381
+ "interactionId",
2382
+ "threadId",
2383
+ "turnId",
2384
+ "expiresAt",
2385
+ "sensitivity",
2386
+ "method",
2387
+ "projection"
2388
+ ],
2389
+ "additionalProperties": false
2390
+ }
2391
+ ]
2392
+ },
2393
+ {
2394
+ "readOnly": true,
2395
+ "type": "object",
2396
+ "properties": {
2397
+ "type": {
2398
+ "type": "string",
2399
+ "const": "interaction.resolved"
2400
+ },
2401
+ "workspaceId": {
2402
+ "type": "string",
2403
+ "format": "uuid",
2404
+ "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)$"
2405
+ },
2406
+ "relaySequence": {
2407
+ "type": "integer",
2408
+ "minimum": 0,
2409
+ "maximum": 9007199254740991
2410
+ },
2411
+ "interactionId": {
2412
+ "type": "string",
2413
+ "format": "uuid",
2414
+ "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)$"
2415
+ },
2416
+ "threadId": {
2417
+ "type": "string",
2418
+ "format": "uuid",
2419
+ "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)$"
2420
+ },
2421
+ "turnId": {
2422
+ "type": "string",
2423
+ "format": "uuid",
2424
+ "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)$"
2425
+ },
2426
+ "method": {
2427
+ "type": "string",
2428
+ "enum": ["approval.request", "userInput.request"]
2429
+ }
2430
+ },
2431
+ "required": [
2432
+ "type",
2433
+ "workspaceId",
2434
+ "relaySequence",
2435
+ "interactionId",
2436
+ "threadId",
2437
+ "turnId",
2438
+ "method"
2439
+ ],
2440
+ "additionalProperties": false
2441
+ },
2442
+ {
2443
+ "readOnly": true,
2444
+ "type": "object",
2445
+ "properties": {
2446
+ "type": {
2447
+ "type": "string",
2448
+ "const": "interaction.cancelled"
2449
+ },
2450
+ "workspaceId": {
2451
+ "type": "string",
2452
+ "format": "uuid",
2453
+ "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)$"
2454
+ },
2455
+ "relaySequence": {
2456
+ "type": "integer",
2457
+ "minimum": 0,
2458
+ "maximum": 9007199254740991
2459
+ },
2460
+ "interactionId": {
2461
+ "type": "string",
2462
+ "format": "uuid",
2463
+ "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)$"
2464
+ },
2465
+ "threadId": {
2466
+ "type": "string",
2467
+ "format": "uuid",
2468
+ "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)$"
2469
+ },
2470
+ "turnId": {
2471
+ "type": "string",
2472
+ "format": "uuid",
2473
+ "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)$"
2474
+ },
2475
+ "method": {
2476
+ "type": "string",
2477
+ "enum": ["approval.request", "userInput.request"]
2478
+ }
2479
+ },
2480
+ "required": [
2481
+ "type",
2482
+ "workspaceId",
2483
+ "relaySequence",
2484
+ "interactionId",
2485
+ "threadId",
2486
+ "turnId",
2487
+ "method"
2488
+ ],
2489
+ "additionalProperties": false
2490
+ }
2491
+ ]
2492
+ },
2493
+ "initializeParams": {
2494
+ "readOnly": true,
2495
+ "type": "object",
2496
+ "properties": {
2497
+ "protocolVersions": {
2498
+ "minItems": 1,
2499
+ "type": "array",
2500
+ "items": {
2501
+ "type": "string",
2502
+ "minLength": 1
2503
+ }
2504
+ },
2505
+ "client": {
2506
+ "readOnly": true,
2507
+ "type": "object",
2508
+ "properties": {
2509
+ "name": {
2510
+ "type": "string",
2511
+ "minLength": 1,
2512
+ "maxLength": 100
2513
+ },
2514
+ "version": {
2515
+ "type": "string",
2516
+ "minLength": 1,
2517
+ "maxLength": 100
2518
+ }
2519
+ },
2520
+ "required": ["name", "version"],
2521
+ "additionalProperties": false
2522
+ }
2523
+ },
2524
+ "required": ["protocolVersions", "client"],
2525
+ "additionalProperties": false
2526
+ },
2527
+ "initializeResult": {
2528
+ "readOnly": true,
2529
+ "type": "object",
2530
+ "properties": {
2531
+ "protocolVersion": {
2532
+ "type": "string",
2533
+ "enum": ["1.1", "1.0"]
2534
+ },
2535
+ "runtimeInstanceId": {
2536
+ "type": "string",
2537
+ "format": "uuid",
2538
+ "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)$"
2539
+ },
2540
+ "server": {
2541
+ "readOnly": true,
2542
+ "type": "object",
2543
+ "properties": {
2544
+ "name": {
2545
+ "type": "string",
2546
+ "minLength": 1,
2547
+ "maxLength": 100
2548
+ },
2549
+ "version": {
2550
+ "type": "string",
2551
+ "minLength": 1,
2552
+ "maxLength": 100
2553
+ },
2554
+ "runtimeVersion": {
2555
+ "type": "string",
2556
+ "minLength": 1,
2557
+ "maxLength": 100
2558
+ }
2559
+ },
2560
+ "required": ["name", "version", "runtimeVersion"],
2561
+ "additionalProperties": false
2562
+ },
2563
+ "features": {
2564
+ "type": "array",
2565
+ "items": {
2566
+ "type": "string",
2567
+ "enum": [
2568
+ "thread-management",
2569
+ "snapshots",
2570
+ "turns",
2571
+ "approvals",
2572
+ "tool-streaming",
2573
+ "reasoning-summary",
2574
+ "operation-projection",
2575
+ "process-local-sequence"
2576
+ ]
2577
+ }
2578
+ },
2579
+ "limits": {
2580
+ "readOnly": true,
2581
+ "type": "object",
2582
+ "properties": {
2583
+ "maxFrameBytes": {
2584
+ "type": "integer",
2585
+ "exclusiveMinimum": 0,
2586
+ "maximum": 9007199254740991
2587
+ },
2588
+ "maxPageSize": {
2589
+ "type": "integer",
2590
+ "exclusiveMinimum": 0,
2591
+ "maximum": 9007199254740991
2592
+ },
2593
+ "eventReplay": {
2594
+ "type": "boolean",
2595
+ "const": false
2596
+ },
2597
+ "idempotencyCacheEntries": {
2598
+ "type": "integer",
2599
+ "exclusiveMinimum": 0,
2600
+ "maximum": 9007199254740991
2601
+ }
2602
+ },
2603
+ "required": [
2604
+ "maxFrameBytes",
2605
+ "maxPageSize",
2606
+ "eventReplay",
2607
+ "idempotencyCacheEntries"
2608
+ ],
2609
+ "additionalProperties": false
2610
+ }
2611
+ },
2612
+ "required": [
2613
+ "protocolVersion",
2614
+ "runtimeInstanceId",
2615
+ "server",
2616
+ "features",
2617
+ "limits"
2618
+ ],
2619
+ "additionalProperties": false
2620
+ },
2621
+ "threadListParams": {
2622
+ "readOnly": true,
2623
+ "type": "object",
2624
+ "properties": {
2625
+ "cursor": {
2626
+ "type": "string",
2627
+ "pattern": "^\\d+$"
2628
+ },
2629
+ "limit": {
2630
+ "default": 100,
2631
+ "type": "integer",
2632
+ "minimum": 1,
2633
+ "maximum": 500
2634
+ }
2635
+ },
2636
+ "required": ["limit"],
2637
+ "additionalProperties": false
2638
+ },
2639
+ "threadListResult": {
2640
+ "readOnly": true,
2641
+ "type": "object",
2642
+ "properties": {
2643
+ "items": {
2644
+ "type": "array",
2645
+ "items": {
2646
+ "readOnly": true,
2647
+ "type": "object",
2648
+ "properties": {
2649
+ "id": {
2650
+ "type": "string",
2651
+ "format": "uuid",
2652
+ "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)$"
2653
+ },
2654
+ "title": {
2655
+ "type": "string"
2656
+ },
2657
+ "model": {
2658
+ "type": "string"
2659
+ },
2660
+ "createdAt": {
2661
+ "type": "string",
2662
+ "format": "date-time",
2663
+ "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})))$"
2664
+ },
2665
+ "updatedAt": {
2666
+ "type": "string",
2667
+ "format": "date-time",
2668
+ "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})))$"
2669
+ },
2670
+ "messageCount": {
2671
+ "type": "integer",
2672
+ "minimum": 0,
2673
+ "maximum": 9007199254740991
2674
+ }
2675
+ },
2676
+ "required": ["id", "createdAt", "updatedAt", "messageCount"],
2677
+ "additionalProperties": false
2678
+ }
2679
+ },
2680
+ "nextCursor": {
2681
+ "anyOf": [
2682
+ {
2683
+ "type": "string",
2684
+ "pattern": "^\\d+$"
2685
+ },
2686
+ {
2687
+ "type": "null"
2688
+ }
2689
+ ]
2690
+ }
2691
+ },
2692
+ "required": ["items", "nextCursor"],
2693
+ "additionalProperties": false
2694
+ },
2695
+ "threadCreateParams": {
2696
+ "readOnly": true,
2697
+ "type": "object",
2698
+ "properties": {
2699
+ "requestId": {
2700
+ "type": "string",
2701
+ "format": "uuid",
2702
+ "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)$"
2703
+ },
2704
+ "title": {
2705
+ "type": "string",
2706
+ "minLength": 1,
2707
+ "maxLength": 200
2708
+ }
2709
+ },
2710
+ "required": ["requestId"],
2711
+ "additionalProperties": false
2712
+ },
2713
+ "threadCreateResult": {
2714
+ "readOnly": true,
2715
+ "type": "object",
2716
+ "properties": {
2717
+ "thread": {
2718
+ "readOnly": true,
2719
+ "type": "object",
2720
+ "properties": {
2721
+ "id": {
2722
+ "type": "string",
2723
+ "format": "uuid",
2724
+ "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)$"
2725
+ },
2726
+ "title": {
2727
+ "type": "string"
2728
+ },
2729
+ "model": {
2730
+ "type": "string"
2731
+ },
2732
+ "createdAt": {
2733
+ "type": "string",
2734
+ "format": "date-time",
2735
+ "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})))$"
2736
+ },
2737
+ "updatedAt": {
2738
+ "type": "string",
2739
+ "format": "date-time",
2740
+ "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})))$"
2741
+ },
2742
+ "messageCount": {
2743
+ "type": "integer",
2744
+ "minimum": 0,
2745
+ "maximum": 9007199254740991
2746
+ }
2747
+ },
2748
+ "required": ["id", "createdAt", "updatedAt", "messageCount"],
2749
+ "additionalProperties": false
2750
+ }
2751
+ },
2752
+ "required": ["thread"],
2753
+ "additionalProperties": false
2754
+ },
2755
+ "threadOpenParams": {
2756
+ "readOnly": true,
2757
+ "type": "object",
2758
+ "properties": {
2759
+ "threadId": {
2760
+ "type": "string",
2761
+ "format": "uuid",
2762
+ "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)$"
2763
+ }
2764
+ },
2765
+ "required": ["threadId"],
2766
+ "additionalProperties": false
2767
+ },
2768
+ "threadOpenResult": {
2769
+ "readOnly": true,
2770
+ "type": "object",
2771
+ "properties": {
2772
+ "thread": {
2773
+ "readOnly": true,
2774
+ "type": "object",
2775
+ "properties": {
2776
+ "id": {
2777
+ "type": "string",
2778
+ "format": "uuid",
2779
+ "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)$"
2780
+ },
2781
+ "title": {
2782
+ "type": "string"
2783
+ },
2784
+ "model": {
2785
+ "type": "string"
2786
+ },
2787
+ "createdAt": {
2788
+ "type": "string",
2789
+ "format": "date-time",
2790
+ "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})))$"
2791
+ },
2792
+ "updatedAt": {
2793
+ "type": "string",
2794
+ "format": "date-time",
2795
+ "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})))$"
2796
+ },
2797
+ "messageCount": {
2798
+ "type": "integer",
2799
+ "minimum": 0,
2800
+ "maximum": 9007199254740991
2801
+ }
2802
+ },
2803
+ "required": ["id", "createdAt", "updatedAt", "messageCount"],
2804
+ "additionalProperties": false
2805
+ },
2806
+ "messages": {
2807
+ "readOnly": true,
2808
+ "type": "object",
2809
+ "properties": {
2810
+ "items": {
2811
+ "type": "array",
2812
+ "items": {
2813
+ "readOnly": true,
2814
+ "type": "object",
2815
+ "properties": {
2816
+ "sequence": {
2817
+ "type": "integer",
2818
+ "minimum": 0,
2819
+ "maximum": 9007199254740991
2820
+ },
2821
+ "role": {
2822
+ "type": "string",
2823
+ "enum": ["user", "assistant"]
2824
+ },
2825
+ "createdAt": {
2826
+ "type": "string",
2827
+ "format": "date-time",
2828
+ "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})))$"
2829
+ },
2830
+ "parts": {
2831
+ "type": "array",
2832
+ "items": {
2833
+ "readOnly": true,
2834
+ "type": "object",
2835
+ "properties": {
2836
+ "type": {
2837
+ "type": "string",
2838
+ "const": "text"
2839
+ },
2840
+ "text": {
2841
+ "type": "string"
2842
+ }
2843
+ },
2844
+ "required": ["type", "text"],
2845
+ "additionalProperties": false
2846
+ }
2847
+ }
2848
+ },
2849
+ "required": ["sequence", "role", "createdAt", "parts"],
2850
+ "additionalProperties": false
2851
+ }
2852
+ },
2853
+ "nextBeforeSequence": {
2854
+ "anyOf": [
2855
+ {
2856
+ "type": "integer",
2857
+ "minimum": 0,
2858
+ "maximum": 9007199254740991
2859
+ },
2860
+ {
2861
+ "type": "null"
2862
+ }
2863
+ ]
2864
+ }
2865
+ },
2866
+ "required": ["items", "nextBeforeSequence"],
2867
+ "additionalProperties": false
2868
+ },
2869
+ "operations": {
2870
+ "readOnly": true,
2871
+ "type": "object",
2872
+ "properties": {
2873
+ "items": {
2874
+ "type": "array",
2875
+ "items": {
2876
+ "readOnly": true,
2877
+ "type": "object",
2878
+ "properties": {
2879
+ "id": {
2880
+ "type": "string",
2881
+ "format": "uuid",
2882
+ "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)$"
2883
+ },
2884
+ "sequence": {
2885
+ "type": "integer",
2886
+ "minimum": 0,
2887
+ "maximum": 9007199254740991
2888
+ },
2889
+ "toolCallId": {
2890
+ "type": "string",
2891
+ "minLength": 1
2892
+ },
2893
+ "agentName": {
2894
+ "type": "string",
2895
+ "minLength": 1
2896
+ },
2897
+ "toolName": {
2898
+ "type": "string",
2899
+ "minLength": 1
2900
+ },
2901
+ "createdAt": {
2902
+ "type": "string",
2903
+ "format": "date-time",
2904
+ "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})))$"
2905
+ },
2906
+ "outcome": {
2907
+ "readOnly": true,
2908
+ "type": "object",
2909
+ "properties": {
2910
+ "kind": {
2911
+ "type": "string",
2912
+ "enum": [
2913
+ "success",
2914
+ "user_rejected",
2915
+ "policy_denied",
2916
+ "invalid_input",
2917
+ "cancelled",
2918
+ "tool_failed"
2919
+ ]
2920
+ },
2921
+ "reason": {
2922
+ "type": "string"
2923
+ }
2924
+ },
2925
+ "required": ["kind"],
2926
+ "additionalProperties": false
2927
+ },
2928
+ "display": {
2929
+ "$ref": "#/$defs/sharedSchema0"
2930
+ },
2931
+ "appOutput": {
2932
+ "readOnly": true,
2933
+ "anyOf": [
2934
+ {
2935
+ "readOnly": true,
2936
+ "type": "object",
2937
+ "properties": {
2938
+ "status": {
2939
+ "type": "string",
2940
+ "const": "rejected"
2941
+ },
2942
+ "reason": {
2943
+ "type": "string",
2944
+ "enum": ["credential_field", "credential_value"]
2945
+ },
2946
+ "field": {
2947
+ "type": "string",
2948
+ "maxLength": 64
2949
+ }
2950
+ },
2951
+ "required": ["status", "reason"],
2952
+ "additionalProperties": false
2953
+ },
2954
+ {
2955
+ "type": "object",
2956
+ "properties": {
2957
+ "status": {
2958
+ "type": "string",
2959
+ "const": "available"
2960
+ },
2961
+ "schemaId": {
2962
+ "type": "string",
2963
+ "minLength": 1,
2964
+ "maxLength": 256
2965
+ },
2966
+ "schemaVersion": {
2967
+ "type": "integer",
2968
+ "exclusiveMinimum": 0,
2969
+ "maximum": 9007199254740991
2970
+ }
2971
+ },
2972
+ "required": ["status", "schemaId", "schemaVersion"],
2973
+ "additionalProperties": false
2974
+ },
2975
+ {
2976
+ "type": "object",
2977
+ "properties": {
2978
+ "status": {
2979
+ "type": "string",
2980
+ "enum": [
2981
+ "not_provided",
2982
+ "invalid",
2983
+ "too_large",
2984
+ "expired",
2985
+ "denied"
2986
+ ]
2987
+ }
2988
+ },
2989
+ "required": ["status"],
2990
+ "additionalProperties": false
2991
+ }
2992
+ ]
2993
+ }
2994
+ },
2995
+ "required": [
2996
+ "id",
2997
+ "sequence",
2998
+ "toolCallId",
2999
+ "agentName",
3000
+ "toolName",
3001
+ "createdAt",
3002
+ "outcome",
3003
+ "display"
3004
+ ],
3005
+ "additionalProperties": false
3006
+ }
3007
+ },
3008
+ "nextBeforeSequence": {
3009
+ "anyOf": [
3010
+ {
3011
+ "type": "integer",
3012
+ "minimum": 0,
3013
+ "maximum": 9007199254740991
3014
+ },
3015
+ {
3016
+ "type": "null"
3017
+ }
3018
+ ]
3019
+ }
3020
+ },
3021
+ "required": ["items", "nextBeforeSequence"],
3022
+ "additionalProperties": false
3023
+ },
3024
+ "activeTurn": {
3025
+ "readOnly": true,
3026
+ "type": "object",
3027
+ "properties": {
3028
+ "id": {
3029
+ "type": "string",
3030
+ "format": "uuid",
3031
+ "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)$"
3032
+ },
3033
+ "status": {
3034
+ "type": "string",
3035
+ "enum": ["running", "cancelling"]
3036
+ },
3037
+ "startedAt": {
3038
+ "type": "string",
3039
+ "format": "date-time",
3040
+ "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})))$"
3041
+ }
3042
+ },
3043
+ "required": ["id", "status", "startedAt"],
3044
+ "additionalProperties": false
3045
+ },
3046
+ "pendingApprovals": {
3047
+ "type": "array",
3048
+ "items": {
3049
+ "readOnly": true,
3050
+ "type": "object",
3051
+ "properties": {
3052
+ "id": {
3053
+ "type": "string",
3054
+ "format": "uuid",
3055
+ "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)$"
3056
+ },
3057
+ "turnId": {
3058
+ "type": "string",
3059
+ "format": "uuid",
3060
+ "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)$"
3061
+ },
3062
+ "agentName": {
3063
+ "type": "string",
3064
+ "minLength": 1
3065
+ },
3066
+ "toolName": {
3067
+ "type": "string",
3068
+ "minLength": 1
3069
+ },
3070
+ "preview": {
3071
+ "$ref": "#/$defs/sharedSchema0"
3072
+ },
3073
+ "reason": {
3074
+ "type": "string"
3075
+ }
3076
+ },
3077
+ "required": ["id", "turnId", "agentName", "toolName", "preview"],
3078
+ "additionalProperties": false
3079
+ }
3080
+ },
3081
+ "transcriptCompleteness": {
3082
+ "type": "string",
3083
+ "enum": ["complete", "legacy_snapshot"]
3084
+ }
3085
+ },
3086
+ "required": [
3087
+ "thread",
3088
+ "messages",
3089
+ "operations",
3090
+ "pendingApprovals",
3091
+ "transcriptCompleteness"
3092
+ ],
3093
+ "additionalProperties": false
3094
+ },
3095
+ "threadSnapshotParams": {
3096
+ "readOnly": true,
3097
+ "type": "object",
3098
+ "properties": {
3099
+ "threadId": {
3100
+ "type": "string",
3101
+ "format": "uuid",
3102
+ "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)$"
3103
+ },
3104
+ "messageBeforeSequence": {
3105
+ "type": "integer",
3106
+ "minimum": 0,
3107
+ "maximum": 9007199254740991
3108
+ },
3109
+ "operationBeforeSequence": {
3110
+ "type": "integer",
3111
+ "minimum": 0,
3112
+ "maximum": 9007199254740991
3113
+ },
3114
+ "limit": {
3115
+ "default": 100,
3116
+ "type": "integer",
3117
+ "minimum": 1,
3118
+ "maximum": 500
3119
+ }
3120
+ },
3121
+ "required": ["threadId", "limit"],
3122
+ "additionalProperties": false
3123
+ },
3124
+ "threadSnapshotResult": {
3125
+ "readOnly": true,
3126
+ "type": "object",
3127
+ "properties": {
3128
+ "thread": {
3129
+ "readOnly": true,
3130
+ "type": "object",
3131
+ "properties": {
3132
+ "id": {
3133
+ "type": "string",
3134
+ "format": "uuid",
3135
+ "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)$"
3136
+ },
3137
+ "title": {
3138
+ "type": "string"
3139
+ },
3140
+ "model": {
3141
+ "type": "string"
3142
+ },
3143
+ "createdAt": {
3144
+ "type": "string",
3145
+ "format": "date-time",
3146
+ "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})))$"
3147
+ },
3148
+ "updatedAt": {
3149
+ "type": "string",
3150
+ "format": "date-time",
3151
+ "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})))$"
3152
+ },
3153
+ "messageCount": {
3154
+ "type": "integer",
3155
+ "minimum": 0,
3156
+ "maximum": 9007199254740991
3157
+ }
3158
+ },
3159
+ "required": ["id", "createdAt", "updatedAt", "messageCount"],
3160
+ "additionalProperties": false
3161
+ },
3162
+ "messages": {
3163
+ "readOnly": true,
3164
+ "type": "object",
3165
+ "properties": {
3166
+ "items": {
3167
+ "type": "array",
3168
+ "items": {
3169
+ "readOnly": true,
3170
+ "type": "object",
3171
+ "properties": {
3172
+ "sequence": {
3173
+ "type": "integer",
3174
+ "minimum": 0,
3175
+ "maximum": 9007199254740991
3176
+ },
3177
+ "role": {
3178
+ "type": "string",
3179
+ "enum": ["user", "assistant"]
3180
+ },
3181
+ "createdAt": {
3182
+ "type": "string",
3183
+ "format": "date-time",
3184
+ "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})))$"
3185
+ },
3186
+ "parts": {
3187
+ "type": "array",
3188
+ "items": {
3189
+ "readOnly": true,
3190
+ "type": "object",
3191
+ "properties": {
3192
+ "type": {
3193
+ "type": "string",
3194
+ "const": "text"
3195
+ },
3196
+ "text": {
3197
+ "type": "string"
3198
+ }
3199
+ },
3200
+ "required": ["type", "text"],
3201
+ "additionalProperties": false
3202
+ }
3203
+ }
3204
+ },
3205
+ "required": ["sequence", "role", "createdAt", "parts"],
3206
+ "additionalProperties": false
3207
+ }
3208
+ },
3209
+ "nextBeforeSequence": {
3210
+ "anyOf": [
3211
+ {
3212
+ "type": "integer",
3213
+ "minimum": 0,
3214
+ "maximum": 9007199254740991
3215
+ },
3216
+ {
3217
+ "type": "null"
3218
+ }
3219
+ ]
3220
+ }
3221
+ },
3222
+ "required": ["items", "nextBeforeSequence"],
3223
+ "additionalProperties": false
3224
+ },
3225
+ "operations": {
3226
+ "readOnly": true,
3227
+ "type": "object",
3228
+ "properties": {
3229
+ "items": {
3230
+ "type": "array",
3231
+ "items": {
3232
+ "readOnly": true,
3233
+ "type": "object",
3234
+ "properties": {
3235
+ "id": {
3236
+ "type": "string",
3237
+ "format": "uuid",
3238
+ "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)$"
3239
+ },
3240
+ "sequence": {
3241
+ "type": "integer",
3242
+ "minimum": 0,
3243
+ "maximum": 9007199254740991
3244
+ },
3245
+ "toolCallId": {
3246
+ "type": "string",
3247
+ "minLength": 1
3248
+ },
3249
+ "agentName": {
3250
+ "type": "string",
3251
+ "minLength": 1
3252
+ },
3253
+ "toolName": {
3254
+ "type": "string",
3255
+ "minLength": 1
3256
+ },
3257
+ "createdAt": {
3258
+ "type": "string",
3259
+ "format": "date-time",
3260
+ "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})))$"
3261
+ },
3262
+ "outcome": {
3263
+ "readOnly": true,
3264
+ "type": "object",
3265
+ "properties": {
3266
+ "kind": {
3267
+ "type": "string",
3268
+ "enum": [
3269
+ "success",
3270
+ "user_rejected",
3271
+ "policy_denied",
3272
+ "invalid_input",
3273
+ "cancelled",
3274
+ "tool_failed"
3275
+ ]
3276
+ },
3277
+ "reason": {
3278
+ "type": "string"
3279
+ }
3280
+ },
3281
+ "required": ["kind"],
3282
+ "additionalProperties": false
3283
+ },
3284
+ "display": {
3285
+ "$ref": "#/$defs/sharedSchema0"
3286
+ },
3287
+ "appOutput": {
3288
+ "readOnly": true,
3289
+ "anyOf": [
3290
+ {
3291
+ "readOnly": true,
3292
+ "type": "object",
3293
+ "properties": {
3294
+ "status": {
3295
+ "type": "string",
3296
+ "const": "rejected"
3297
+ },
3298
+ "reason": {
3299
+ "type": "string",
3300
+ "enum": ["credential_field", "credential_value"]
3301
+ },
3302
+ "field": {
3303
+ "type": "string",
3304
+ "maxLength": 64
3305
+ }
3306
+ },
3307
+ "required": ["status", "reason"],
3308
+ "additionalProperties": false
3309
+ },
3310
+ {
3311
+ "type": "object",
3312
+ "properties": {
3313
+ "status": {
3314
+ "type": "string",
3315
+ "const": "available"
3316
+ },
3317
+ "schemaId": {
3318
+ "type": "string",
3319
+ "minLength": 1,
3320
+ "maxLength": 256
3321
+ },
3322
+ "schemaVersion": {
3323
+ "type": "integer",
3324
+ "exclusiveMinimum": 0,
3325
+ "maximum": 9007199254740991
3326
+ }
3327
+ },
3328
+ "required": ["status", "schemaId", "schemaVersion"],
3329
+ "additionalProperties": false
3330
+ },
3331
+ {
3332
+ "type": "object",
3333
+ "properties": {
3334
+ "status": {
3335
+ "type": "string",
3336
+ "enum": [
3337
+ "not_provided",
3338
+ "invalid",
3339
+ "too_large",
3340
+ "expired",
3341
+ "denied"
3342
+ ]
3343
+ }
3344
+ },
3345
+ "required": ["status"],
3346
+ "additionalProperties": false
3347
+ }
3348
+ ]
3349
+ }
3350
+ },
3351
+ "required": [
3352
+ "id",
3353
+ "sequence",
3354
+ "toolCallId",
3355
+ "agentName",
3356
+ "toolName",
3357
+ "createdAt",
3358
+ "outcome",
3359
+ "display"
3360
+ ],
3361
+ "additionalProperties": false
3362
+ }
3363
+ },
3364
+ "nextBeforeSequence": {
3365
+ "anyOf": [
3366
+ {
3367
+ "type": "integer",
3368
+ "minimum": 0,
3369
+ "maximum": 9007199254740991
3370
+ },
3371
+ {
3372
+ "type": "null"
3373
+ }
3374
+ ]
3375
+ }
3376
+ },
3377
+ "required": ["items", "nextBeforeSequence"],
3378
+ "additionalProperties": false
3379
+ },
3380
+ "activeTurn": {
3381
+ "readOnly": true,
3382
+ "type": "object",
3383
+ "properties": {
3384
+ "id": {
3385
+ "type": "string",
3386
+ "format": "uuid",
3387
+ "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)$"
3388
+ },
3389
+ "status": {
3390
+ "type": "string",
3391
+ "enum": ["running", "cancelling"]
3392
+ },
3393
+ "startedAt": {
3394
+ "type": "string",
3395
+ "format": "date-time",
3396
+ "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})))$"
3397
+ }
3398
+ },
3399
+ "required": ["id", "status", "startedAt"],
3400
+ "additionalProperties": false
3401
+ },
3402
+ "pendingApprovals": {
3403
+ "type": "array",
3404
+ "items": {
3405
+ "readOnly": true,
3406
+ "type": "object",
3407
+ "properties": {
3408
+ "id": {
3409
+ "type": "string",
3410
+ "format": "uuid",
3411
+ "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)$"
3412
+ },
3413
+ "turnId": {
3414
+ "type": "string",
3415
+ "format": "uuid",
3416
+ "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)$"
3417
+ },
3418
+ "agentName": {
3419
+ "type": "string",
3420
+ "minLength": 1
3421
+ },
3422
+ "toolName": {
3423
+ "type": "string",
3424
+ "minLength": 1
3425
+ },
3426
+ "preview": {
3427
+ "$ref": "#/$defs/sharedSchema0"
3428
+ },
3429
+ "reason": {
3430
+ "type": "string"
3431
+ }
3432
+ },
3433
+ "required": ["id", "turnId", "agentName", "toolName", "preview"],
3434
+ "additionalProperties": false
3435
+ }
3436
+ },
3437
+ "transcriptCompleteness": {
3438
+ "type": "string",
3439
+ "enum": ["complete", "legacy_snapshot"]
3440
+ }
3441
+ },
3442
+ "required": [
3443
+ "thread",
3444
+ "messages",
3445
+ "operations",
3446
+ "pendingApprovals",
3447
+ "transcriptCompleteness"
3448
+ ],
3449
+ "additionalProperties": false
3450
+ },
3451
+ "threadRenameParams": {
3452
+ "readOnly": true,
3453
+ "type": "object",
3454
+ "properties": {
3455
+ "requestId": {
3456
+ "type": "string",
3457
+ "format": "uuid",
3458
+ "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)$"
3459
+ },
3460
+ "threadId": {
3461
+ "type": "string",
3462
+ "format": "uuid",
3463
+ "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)$"
3464
+ },
3465
+ "title": {
3466
+ "type": "string",
3467
+ "minLength": 1,
3468
+ "maxLength": 200
3469
+ }
3470
+ },
3471
+ "required": ["requestId", "threadId", "title"],
3472
+ "additionalProperties": false
3473
+ },
3474
+ "threadRenameResult": {
3475
+ "readOnly": true,
3476
+ "type": "object",
3477
+ "properties": {
3478
+ "thread": {
3479
+ "readOnly": true,
3480
+ "type": "object",
3481
+ "properties": {
3482
+ "id": {
3483
+ "type": "string",
3484
+ "format": "uuid",
3485
+ "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)$"
3486
+ },
3487
+ "title": {
3488
+ "type": "string"
3489
+ },
3490
+ "model": {
3491
+ "type": "string"
3492
+ },
3493
+ "createdAt": {
3494
+ "type": "string",
3495
+ "format": "date-time",
3496
+ "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})))$"
3497
+ },
3498
+ "updatedAt": {
3499
+ "type": "string",
3500
+ "format": "date-time",
3501
+ "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})))$"
3502
+ },
3503
+ "messageCount": {
3504
+ "type": "integer",
3505
+ "minimum": 0,
3506
+ "maximum": 9007199254740991
3507
+ }
3508
+ },
3509
+ "required": ["id", "createdAt", "updatedAt", "messageCount"],
3510
+ "additionalProperties": false
3511
+ }
3512
+ },
3513
+ "required": ["thread"],
3514
+ "additionalProperties": false
3515
+ },
3516
+ "threadDeleteParams": {
3517
+ "readOnly": true,
3518
+ "type": "object",
3519
+ "properties": {
3520
+ "requestId": {
3521
+ "type": "string",
3522
+ "format": "uuid",
3523
+ "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)$"
3524
+ },
3525
+ "threadId": {
3526
+ "type": "string",
3527
+ "format": "uuid",
3528
+ "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)$"
3529
+ }
3530
+ },
3531
+ "required": ["requestId", "threadId"],
3532
+ "additionalProperties": false
3533
+ },
3534
+ "threadDeleteResult": {
3535
+ "readOnly": true,
3536
+ "type": "object",
3537
+ "properties": {
3538
+ "deleted": {
3539
+ "type": "boolean",
3540
+ "const": true
3541
+ }
3542
+ },
3543
+ "required": ["deleted"],
3544
+ "additionalProperties": false
3545
+ },
3546
+ "threadDetachParams": {
3547
+ "readOnly": true,
3548
+ "type": "object",
3549
+ "properties": {
3550
+ "requestId": {
3551
+ "type": "string",
3552
+ "format": "uuid",
3553
+ "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)$"
3554
+ },
3555
+ "threadId": {
3556
+ "type": "string",
3557
+ "format": "uuid",
3558
+ "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)$"
3559
+ }
3560
+ },
3561
+ "required": ["requestId", "threadId"],
3562
+ "additionalProperties": false
3563
+ },
3564
+ "threadDetachResult": {
3565
+ "readOnly": true,
3566
+ "type": "object",
3567
+ "properties": {
3568
+ "detached": {
3569
+ "type": "boolean"
3570
+ }
3571
+ },
3572
+ "required": ["detached"],
3573
+ "additionalProperties": false
3574
+ },
3575
+ "threadCapabilitiesParams": {
3576
+ "readOnly": true,
3577
+ "type": "object",
3578
+ "properties": {
3579
+ "threadId": {
3580
+ "type": "string",
3581
+ "format": "uuid",
3582
+ "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)$"
3583
+ }
3584
+ },
3585
+ "required": ["threadId"],
3586
+ "additionalProperties": false
3587
+ },
3588
+ "threadCapabilitiesResult": {
3589
+ "readOnly": true,
3590
+ "type": "object",
3591
+ "properties": {
3592
+ "manifest": {
3593
+ "$ref": "#/$defs/sharedSchema0"
3594
+ }
3595
+ },
3596
+ "required": ["manifest"],
3597
+ "additionalProperties": false
3598
+ },
3599
+ "turnStartParams": {
3600
+ "readOnly": true,
3601
+ "type": "object",
3602
+ "properties": {
3603
+ "requestId": {
3604
+ "type": "string",
3605
+ "format": "uuid",
3606
+ "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)$"
3607
+ },
3608
+ "threadId": {
3609
+ "type": "string",
3610
+ "format": "uuid",
3611
+ "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)$"
3612
+ },
3613
+ "turnId": {
3614
+ "type": "string",
3615
+ "format": "uuid",
3616
+ "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)$"
3617
+ },
3618
+ "input": {
3619
+ "readOnly": true,
3620
+ "type": "object",
3621
+ "properties": {
3622
+ "text": {
3623
+ "type": "string",
3624
+ "minLength": 1
3625
+ }
3626
+ },
3627
+ "required": ["text"],
3628
+ "additionalProperties": false
3629
+ }
3630
+ },
3631
+ "required": ["requestId", "threadId", "turnId", "input"],
3632
+ "additionalProperties": false
3633
+ },
3634
+ "turnStartResult": {
3635
+ "readOnly": true,
3636
+ "type": "object",
3637
+ "properties": {
3638
+ "accepted": {
3639
+ "type": "boolean",
3640
+ "const": true
3641
+ },
3642
+ "turnId": {
3643
+ "type": "string",
3644
+ "format": "uuid",
3645
+ "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)$"
3646
+ }
3647
+ },
3648
+ "required": ["accepted", "turnId"],
3649
+ "additionalProperties": false
3650
+ },
3651
+ "turnCancelParams": {
3652
+ "readOnly": true,
3653
+ "type": "object",
3654
+ "properties": {
3655
+ "requestId": {
3656
+ "type": "string",
3657
+ "format": "uuid",
3658
+ "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)$"
3659
+ },
3660
+ "threadId": {
3661
+ "type": "string",
3662
+ "format": "uuid",
3663
+ "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)$"
3664
+ },
3665
+ "turnId": {
3666
+ "type": "string",
3667
+ "format": "uuid",
3668
+ "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)$"
3669
+ }
3670
+ },
3671
+ "required": ["requestId", "threadId", "turnId"],
3672
+ "additionalProperties": false
3673
+ },
3674
+ "turnCancelResult": {
3675
+ "readOnly": true,
3676
+ "type": "object",
3677
+ "properties": {
3678
+ "cancelling": {
3679
+ "type": "boolean"
3680
+ }
3681
+ },
3682
+ "required": ["cancelling"],
3683
+ "additionalProperties": false
3684
+ },
3685
+ "operationGetParams": {
3686
+ "readOnly": true,
3687
+ "type": "object",
3688
+ "properties": {
3689
+ "threadId": {
3690
+ "type": "string",
3691
+ "format": "uuid",
3692
+ "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)$"
3693
+ },
3694
+ "operationId": {
3695
+ "type": "string",
3696
+ "format": "uuid",
3697
+ "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)$"
3698
+ }
3699
+ },
3700
+ "required": ["threadId", "operationId"],
3701
+ "additionalProperties": false
3702
+ },
3703
+ "operationGetResult": {
3704
+ "readOnly": true,
3705
+ "type": "object",
3706
+ "properties": {
3707
+ "operation": {
3708
+ "anyOf": [
3709
+ {
3710
+ "readOnly": true,
3711
+ "type": "object",
3712
+ "properties": {
3713
+ "id": {
3714
+ "type": "string",
3715
+ "format": "uuid",
3716
+ "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)$"
3717
+ },
3718
+ "sequence": {
3719
+ "type": "integer",
3720
+ "minimum": 0,
3721
+ "maximum": 9007199254740991
3722
+ },
3723
+ "toolCallId": {
3724
+ "type": "string",
3725
+ "minLength": 1
3726
+ },
3727
+ "agentName": {
3728
+ "type": "string",
3729
+ "minLength": 1
3730
+ },
3731
+ "toolName": {
3732
+ "type": "string",
3733
+ "minLength": 1
3734
+ },
3735
+ "createdAt": {
3736
+ "type": "string",
3737
+ "format": "date-time",
3738
+ "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})))$"
3739
+ },
3740
+ "outcome": {
3741
+ "readOnly": true,
3742
+ "type": "object",
3743
+ "properties": {
3744
+ "kind": {
3745
+ "type": "string",
3746
+ "enum": [
3747
+ "success",
3748
+ "user_rejected",
3749
+ "policy_denied",
3750
+ "invalid_input",
3751
+ "cancelled",
3752
+ "tool_failed"
3753
+ ]
3754
+ },
3755
+ "reason": {
3756
+ "type": "string"
3757
+ }
3758
+ },
3759
+ "required": ["kind"],
3760
+ "additionalProperties": false
3761
+ },
3762
+ "display": {
3763
+ "$ref": "#/$defs/sharedSchema0"
3764
+ },
3765
+ "appOutput": {
3766
+ "readOnly": true,
3767
+ "anyOf": [
3768
+ {
3769
+ "readOnly": true,
3770
+ "type": "object",
3771
+ "properties": {
3772
+ "status": {
3773
+ "type": "string",
3774
+ "const": "rejected"
3775
+ },
3776
+ "reason": {
3777
+ "type": "string",
3778
+ "enum": ["credential_field", "credential_value"]
3779
+ },
3780
+ "field": {
3781
+ "type": "string",
3782
+ "maxLength": 64
3783
+ }
3784
+ },
3785
+ "required": ["status", "reason"],
3786
+ "additionalProperties": false
3787
+ },
3788
+ {
3789
+ "type": "object",
3790
+ "properties": {
3791
+ "status": {
3792
+ "type": "string",
3793
+ "const": "available"
3794
+ },
3795
+ "schemaId": {
3796
+ "type": "string",
3797
+ "minLength": 1,
3798
+ "maxLength": 256
3799
+ },
3800
+ "schemaVersion": {
3801
+ "type": "integer",
3802
+ "exclusiveMinimum": 0,
3803
+ "maximum": 9007199254740991
3804
+ }
3805
+ },
3806
+ "required": ["status", "schemaId", "schemaVersion"],
3807
+ "additionalProperties": false
3808
+ },
3809
+ {
3810
+ "type": "object",
3811
+ "properties": {
3812
+ "status": {
3813
+ "type": "string",
3814
+ "enum": [
3815
+ "not_provided",
3816
+ "invalid",
3817
+ "too_large",
3818
+ "expired",
3819
+ "denied"
3820
+ ]
3821
+ }
3822
+ },
3823
+ "required": ["status"],
3824
+ "additionalProperties": false
3825
+ }
3826
+ ]
3827
+ }
3828
+ },
3829
+ "required": [
3830
+ "id",
3831
+ "sequence",
3832
+ "toolCallId",
3833
+ "agentName",
3834
+ "toolName",
3835
+ "createdAt",
3836
+ "outcome",
3837
+ "display"
3838
+ ],
3839
+ "additionalProperties": false
3840
+ },
3841
+ {
3842
+ "type": "null"
3843
+ }
3844
+ ]
3845
+ }
3846
+ },
3847
+ "required": ["operation"],
3848
+ "additionalProperties": false
3849
+ },
3850
+ "interactionCandidateParams": {
3851
+ "anyOf": [
3852
+ {
3853
+ "readOnly": true,
3854
+ "type": "object",
3855
+ "properties": {
3856
+ "interactionId": {
3857
+ "type": "string",
3858
+ "format": "uuid",
3859
+ "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)$"
3860
+ },
3861
+ "threadId": {
3862
+ "type": "string",
3863
+ "format": "uuid",
3864
+ "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)$"
3865
+ },
3866
+ "turnId": {
3867
+ "type": "string",
3868
+ "format": "uuid",
3869
+ "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)$"
3870
+ },
3871
+ "method": {
3872
+ "type": "string",
3873
+ "const": "approval.request"
3874
+ },
3875
+ "candidate": {
3876
+ "anyOf": [
3877
+ {
3878
+ "readOnly": true,
3879
+ "type": "object",
3880
+ "properties": {
3881
+ "decision": {
3882
+ "type": "string",
3883
+ "const": "approve"
3884
+ }
3885
+ },
3886
+ "required": ["decision"],
3887
+ "additionalProperties": false
3888
+ },
3889
+ {
3890
+ "readOnly": true,
3891
+ "type": "object",
3892
+ "properties": {
3893
+ "decision": {
3894
+ "type": "string",
3895
+ "const": "reject"
3896
+ },
3897
+ "reason": {
3898
+ "type": "string",
3899
+ "minLength": 1
3900
+ }
3901
+ },
3902
+ "required": ["decision"],
3903
+ "additionalProperties": false
3904
+ }
3905
+ ]
3906
+ }
3907
+ },
3908
+ "required": [
3909
+ "interactionId",
3910
+ "threadId",
3911
+ "turnId",
3912
+ "method",
3913
+ "candidate"
3914
+ ],
3915
+ "additionalProperties": false
3916
+ },
3917
+ {
3918
+ "readOnly": true,
3919
+ "type": "object",
3920
+ "properties": {
3921
+ "interactionId": {
3922
+ "type": "string",
3923
+ "format": "uuid",
3924
+ "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)$"
3925
+ },
3926
+ "threadId": {
3927
+ "type": "string",
3928
+ "format": "uuid",
3929
+ "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)$"
3930
+ },
3931
+ "turnId": {
3932
+ "type": "string",
3933
+ "format": "uuid",
3934
+ "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)$"
3935
+ },
3936
+ "method": {
3937
+ "type": "string",
3938
+ "const": "userInput.request"
3939
+ },
3940
+ "candidate": {
3941
+ "anyOf": [
3942
+ {
3943
+ "readOnly": true,
3944
+ "type": "object",
3945
+ "properties": {
3946
+ "status": {
3947
+ "type": "string",
3948
+ "const": "submitted"
3949
+ },
3950
+ "values": {
3951
+ "maxItems": 16,
3952
+ "type": "array",
3953
+ "items": {
3954
+ "readOnly": true,
3955
+ "type": "object",
3956
+ "properties": {
3957
+ "id": {
3958
+ "type": "string",
3959
+ "minLength": 1,
3960
+ "maxLength": 64
3961
+ },
3962
+ "value": {
3963
+ "anyOf": [
3964
+ {
3965
+ "type": "string",
3966
+ "maxLength": 10000
3967
+ },
3968
+ {
3969
+ "type": "number"
3970
+ },
3971
+ {
3972
+ "type": "boolean"
3973
+ },
3974
+ {
3975
+ "maxItems": 50,
3976
+ "type": "array",
3977
+ "items": {
3978
+ "type": "string",
3979
+ "maxLength": 64
3980
+ }
3981
+ }
3982
+ ]
3983
+ }
3984
+ },
3985
+ "required": ["id", "value"],
3986
+ "additionalProperties": false
3987
+ }
3988
+ }
3989
+ },
3990
+ "required": ["status", "values"],
3991
+ "additionalProperties": false
3992
+ },
3993
+ {
3994
+ "readOnly": true,
3995
+ "type": "object",
3996
+ "properties": {
3997
+ "status": {
3998
+ "type": "string",
3999
+ "const": "cancelled"
4000
+ },
4001
+ "reason": {
4002
+ "type": "string",
4003
+ "minLength": 1,
4004
+ "maxLength": 500
4005
+ }
4006
+ },
4007
+ "required": ["status"],
4008
+ "additionalProperties": false
4009
+ }
4010
+ ]
4011
+ }
4012
+ },
4013
+ "required": [
4014
+ "interactionId",
4015
+ "threadId",
4016
+ "turnId",
4017
+ "method",
4018
+ "candidate"
4019
+ ],
4020
+ "additionalProperties": false
4021
+ }
4022
+ ]
4023
+ },
4024
+ "interactionCandidateResult": {
4025
+ "readOnly": true,
4026
+ "type": "object",
4027
+ "properties": {
4028
+ "accepted": {
4029
+ "type": "boolean",
4030
+ "const": true
4031
+ }
4032
+ },
4033
+ "required": ["accepted"],
4034
+ "additionalProperties": false
4035
+ },
4036
+ "operationResultGetParams": {
4037
+ "readOnly": true,
4038
+ "type": "object",
4039
+ "properties": {
4040
+ "threadId": {
4041
+ "type": "string",
4042
+ "format": "uuid",
4043
+ "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)$"
4044
+ },
4045
+ "operationId": {
4046
+ "type": "string",
4047
+ "format": "uuid",
4048
+ "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)$"
4049
+ }
4050
+ },
4051
+ "required": ["threadId", "operationId"],
4052
+ "additionalProperties": false
4053
+ },
4054
+ "operationResultGetResult": {
4055
+ "readOnly": true,
4056
+ "type": "object",
4057
+ "properties": {
4058
+ "result": {
4059
+ "anyOf": [
4060
+ {
4061
+ "readOnly": true,
4062
+ "type": "object",
4063
+ "properties": {
4064
+ "threadId": {
4065
+ "type": "string",
4066
+ "format": "uuid",
4067
+ "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)$"
4068
+ },
4069
+ "operationId": {
4070
+ "type": "string",
4071
+ "format": "uuid",
4072
+ "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)$"
4073
+ },
4074
+ "agentName": {
4075
+ "type": "string",
4076
+ "minLength": 1
4077
+ },
4078
+ "toolName": {
4079
+ "type": "string",
4080
+ "minLength": 1
4081
+ },
4082
+ "createdAt": {
4083
+ "type": "string",
4084
+ "format": "date-time",
4085
+ "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})))$"
4086
+ },
4087
+ "output": {
4088
+ "readOnly": true,
4089
+ "anyOf": [
4090
+ {
4091
+ "readOnly": true,
4092
+ "type": "object",
4093
+ "properties": {
4094
+ "status": {
4095
+ "type": "string",
4096
+ "const": "rejected"
4097
+ },
4098
+ "reason": {
4099
+ "type": "string",
4100
+ "enum": ["credential_field", "credential_value"]
4101
+ },
4102
+ "field": {
4103
+ "type": "string",
4104
+ "maxLength": 64
4105
+ }
4106
+ },
4107
+ "required": ["status", "reason"],
4108
+ "additionalProperties": false
4109
+ },
4110
+ {
4111
+ "type": "object",
4112
+ "properties": {
4113
+ "status": {
4114
+ "type": "string",
4115
+ "const": "available"
4116
+ },
4117
+ "schemaId": {
4118
+ "type": "string",
4119
+ "minLength": 1,
4120
+ "maxLength": 256
4121
+ },
4122
+ "schemaVersion": {
4123
+ "type": "integer",
4124
+ "exclusiveMinimum": 0,
4125
+ "maximum": 9007199254740991
4126
+ },
4127
+ "remoteReadable": {
4128
+ "type": "boolean"
4129
+ },
4130
+ "data": {
4131
+ "type": "object",
4132
+ "propertyNames": {
4133
+ "type": "string"
4134
+ },
4135
+ "additionalProperties": {
4136
+ "$ref": "#/$defs/sharedSchema1"
4137
+ }
4138
+ },
4139
+ "fallbackText": {
4140
+ "type": "string",
4141
+ "maxLength": 4096
4142
+ }
4143
+ },
4144
+ "required": [
4145
+ "status",
4146
+ "schemaId",
4147
+ "schemaVersion",
4148
+ "remoteReadable",
4149
+ "data",
4150
+ "fallbackText"
4151
+ ],
4152
+ "additionalProperties": false
4153
+ },
4154
+ {
4155
+ "type": "object",
4156
+ "properties": {
4157
+ "status": {
4158
+ "type": "string",
4159
+ "enum": [
4160
+ "not_provided",
4161
+ "invalid",
4162
+ "too_large",
4163
+ "expired",
4164
+ "denied"
4165
+ ]
4166
+ }
4167
+ },
4168
+ "required": ["status"],
4169
+ "additionalProperties": false
4170
+ }
4171
+ ]
4172
+ }
4173
+ },
4174
+ "required": [
4175
+ "threadId",
4176
+ "operationId",
4177
+ "agentName",
4178
+ "toolName",
4179
+ "createdAt",
4180
+ "output"
4181
+ ],
4182
+ "additionalProperties": false
4183
+ },
4184
+ {
4185
+ "type": "null"
4186
+ }
4187
+ ]
4188
+ }
4189
+ },
4190
+ "required": ["result"],
4191
+ "additionalProperties": false
4192
+ },
4193
+ "sharedSchema0": {
4194
+ "anyOf": [
4195
+ {
4196
+ "type": "string"
4197
+ },
4198
+ {
4199
+ "type": "number"
4200
+ },
4201
+ {
4202
+ "type": "boolean"
4203
+ },
4204
+ {
4205
+ "type": "null"
4206
+ },
4207
+ {
4208
+ "type": "array",
4209
+ "items": {
4210
+ "$ref": "#/$defs/sharedSchema0"
4211
+ }
4212
+ },
4213
+ {
4214
+ "type": "object",
4215
+ "propertyNames": {
4216
+ "type": "string"
4217
+ },
4218
+ "additionalProperties": {
4219
+ "$ref": "#/$defs/sharedSchema0"
4220
+ }
4221
+ }
4222
+ ]
4223
+ },
4224
+ "sharedSchema1": {
4225
+ "anyOf": [
4226
+ {
4227
+ "type": "string"
4228
+ },
4229
+ {
4230
+ "type": "number"
4231
+ },
4232
+ {
4233
+ "type": "boolean"
4234
+ },
4235
+ {
4236
+ "type": "null"
4237
+ },
4238
+ {
4239
+ "type": "array",
4240
+ "items": {
4241
+ "$ref": "#/$defs/sharedSchema1"
4242
+ }
4243
+ },
4244
+ {
4245
+ "type": "object",
4246
+ "propertyNames": {
4247
+ "type": "string"
4248
+ },
4249
+ "additionalProperties": {
4250
+ "$ref": "#/$defs/sharedSchema1"
4251
+ }
4252
+ }
4253
+ ]
4254
+ }
4255
+ },
4256
+ "x-roll-relay-protocol-version": "1.2",
4257
+ "x-roll-message-types": [
4258
+ "device.connect",
4259
+ "runtime.request",
4260
+ "runtime.response",
4261
+ "runtime.event",
4262
+ "runtime.ack",
4263
+ "runtime.gap",
4264
+ "runtime.encrypted",
4265
+ "interaction.request",
4266
+ "interaction.resolved",
4267
+ "interaction.cancelled"
4268
+ ],
4269
+ "x-roll-request-methods": [
4270
+ "initialize",
4271
+ "thread.list",
4272
+ "thread.create",
4273
+ "thread.open",
4274
+ "thread.snapshot",
4275
+ "thread.rename",
4276
+ "thread.delete",
4277
+ "thread.detach",
4278
+ "thread.capabilities",
4279
+ "turn.start",
4280
+ "turn.cancel",
4281
+ "operation.get",
4282
+ "interaction.candidate",
4283
+ "operation.result.get"
4284
+ ],
4285
+ "x-roll-request-method-dispositions": {
4286
+ "initialize": "local-only",
4287
+ "thread.list": "query",
4288
+ "thread.create": "mutation",
4289
+ "thread.open": "query",
4290
+ "thread.snapshot": "query",
4291
+ "thread.rename": "mutation",
4292
+ "thread.delete": "mutation",
4293
+ "thread.detach": "mutation",
4294
+ "thread.capabilities": "query",
4295
+ "turn.start": "mutation",
4296
+ "turn.cancel": "mutation",
4297
+ "operation.get": "query",
4298
+ "interaction.candidate": "mutation",
4299
+ "operation.result.get": "query"
4300
+ },
4301
+ "x-roll-mutation-methods": [
4302
+ "thread.create",
4303
+ "thread.rename",
4304
+ "thread.delete",
4305
+ "thread.detach",
4306
+ "turn.start",
4307
+ "turn.cancel",
4308
+ "interaction.candidate"
4309
+ ],
4310
+ "x-roll-relay-error-retryability": {
4311
+ "RELAY_PROTOCOL_VERSION_UNSUPPORTED": false,
4312
+ "RELAY_INVALID_FRAME": false,
4313
+ "INVALID_PARAMS": false,
4314
+ "RELAY_REQUEST_ID_CONFLICT": false,
4315
+ "WORKSPACE_NOT_FOUND": false,
4316
+ "RELAY_ENCRYPTION_REQUIRED": false,
4317
+ "ENCRYPTED_PAYLOAD_INVALID": false,
4318
+ "LocalApprovalDeniedError": false,
4319
+ "LocalConfirmationRequiredError": false,
4320
+ "COMPANION_ERROR": false
4321
+ },
4322
+ "x-roll-request-method-schemas": {
4323
+ "initialize": {
4324
+ "params": {
4325
+ "$ref": "#/$defs/initializeParams"
4326
+ },
4327
+ "result": {
4328
+ "$ref": "#/$defs/initializeResult"
4329
+ }
4330
+ },
4331
+ "thread.list": {
4332
+ "params": {
4333
+ "$ref": "#/$defs/threadListParams"
4334
+ },
4335
+ "result": {
4336
+ "$ref": "#/$defs/threadListResult"
4337
+ }
4338
+ },
4339
+ "thread.create": {
4340
+ "params": {
4341
+ "$ref": "#/$defs/threadCreateParams"
4342
+ },
4343
+ "result": {
4344
+ "$ref": "#/$defs/threadCreateResult"
4345
+ }
4346
+ },
4347
+ "thread.open": {
4348
+ "params": {
4349
+ "$ref": "#/$defs/threadOpenParams"
4350
+ },
4351
+ "result": {
4352
+ "$ref": "#/$defs/threadOpenResult"
4353
+ }
4354
+ },
4355
+ "thread.snapshot": {
4356
+ "params": {
4357
+ "$ref": "#/$defs/threadSnapshotParams"
4358
+ },
4359
+ "result": {
4360
+ "$ref": "#/$defs/threadSnapshotResult"
4361
+ }
4362
+ },
4363
+ "thread.rename": {
4364
+ "params": {
4365
+ "$ref": "#/$defs/threadRenameParams"
4366
+ },
4367
+ "result": {
4368
+ "$ref": "#/$defs/threadRenameResult"
4369
+ }
4370
+ },
4371
+ "thread.delete": {
4372
+ "params": {
4373
+ "$ref": "#/$defs/threadDeleteParams"
4374
+ },
4375
+ "result": {
4376
+ "$ref": "#/$defs/threadDeleteResult"
4377
+ }
4378
+ },
4379
+ "thread.detach": {
4380
+ "params": {
4381
+ "$ref": "#/$defs/threadDetachParams"
4382
+ },
4383
+ "result": {
4384
+ "$ref": "#/$defs/threadDetachResult"
4385
+ }
4386
+ },
4387
+ "thread.capabilities": {
4388
+ "params": {
4389
+ "$ref": "#/$defs/threadCapabilitiesParams"
4390
+ },
4391
+ "result": {
4392
+ "$ref": "#/$defs/threadCapabilitiesResult"
4393
+ }
4394
+ },
4395
+ "turn.start": {
4396
+ "params": {
4397
+ "$ref": "#/$defs/turnStartParams"
4398
+ },
4399
+ "result": {
4400
+ "$ref": "#/$defs/turnStartResult"
4401
+ }
4402
+ },
4403
+ "turn.cancel": {
4404
+ "params": {
4405
+ "$ref": "#/$defs/turnCancelParams"
4406
+ },
4407
+ "result": {
4408
+ "$ref": "#/$defs/turnCancelResult"
4409
+ }
4410
+ },
4411
+ "operation.get": {
4412
+ "params": {
4413
+ "$ref": "#/$defs/operationGetParams"
4414
+ },
4415
+ "result": {
4416
+ "$ref": "#/$defs/operationGetResult"
4417
+ }
4418
+ },
4419
+ "interaction.candidate": {
4420
+ "params": {
4421
+ "$ref": "#/$defs/interactionCandidateParams"
4422
+ },
4423
+ "result": {
4424
+ "$ref": "#/$defs/interactionCandidateResult"
4425
+ }
4426
+ },
4427
+ "operation.result.get": {
4428
+ "params": {
4429
+ "$ref": "#/$defs/operationResultGetParams"
4430
+ },
4431
+ "result": {
4432
+ "$ref": "#/$defs/operationResultGetResult"
4433
+ }
4434
+ }
4435
+ }
4436
+ }