@roll-agent/protocol 0.1.0 → 0.2.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.
@@ -1,15 +1,21 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://roll-agent.dev/schemas/runtime-protocol/1.0",
4
- "title": "Roll Runtime Protocol v1",
5
- "description": "JSON-RPC requests, responses, and runtime.event notifications for Roll Runtime Protocol v1.",
3
+ "$id": "https://roll-agent.dev/schemas/runtime-protocol/1.1",
4
+ "title": "Roll Runtime Protocol v1.1",
5
+ "description": "Bidirectional JSON-RPC requests, responses, and notifications for Roll Runtime Protocol.",
6
6
  "oneOf": [
7
7
  {
8
8
  "$ref": "#/$defs/clientRequest"
9
9
  },
10
+ {
11
+ "$ref": "#/$defs/serverRequest"
12
+ },
10
13
  {
11
14
  "$ref": "#/$defs/runtimeEventNotification"
12
15
  },
16
+ {
17
+ "$ref": "#/$defs/runtimeServerRequestCancelNotification"
18
+ },
13
19
  {
14
20
  "$ref": "#/$defs/successResponse"
15
21
  },
@@ -19,7 +25,7 @@
19
25
  ],
20
26
  "$defs": {
21
27
  "jsonRpcId": {
22
- "oneOf": [
28
+ "anyOf": [
23
29
  {
24
30
  "type": "string"
25
31
  },
@@ -34,7 +40,10 @@
34
40
  "properties": {
35
41
  "protocolVersion": {
36
42
  "type": "string",
37
- "const": "1.0"
43
+ "enum": [
44
+ "1.1",
45
+ "1.0"
46
+ ]
38
47
  },
39
48
  "runtimeInstanceId": {
40
49
  "type": "string",
@@ -189,7 +198,7 @@
189
198
  "minLength": 1
190
199
  },
191
200
  "input": {
192
- "$ref": "#/$defs/__schema0"
201
+ "$ref": "#/$defs/sharedSchema0"
193
202
  }
194
203
  },
195
204
  "required": [
@@ -292,7 +301,7 @@
292
301
  "additionalProperties": false
293
302
  },
294
303
  "display": {
295
- "$ref": "#/$defs/__schema0"
304
+ "$ref": "#/$defs/sharedSchema0"
296
305
  }
297
306
  },
298
307
  "required": [
@@ -335,7 +344,7 @@
335
344
  "minLength": 1
336
345
  },
337
346
  "preview": {
338
- "$ref": "#/$defs/__schema0"
347
+ "$ref": "#/$defs/sharedSchema0"
339
348
  },
340
349
  "reason": {
341
350
  "type": "string"
@@ -357,6 +366,110 @@
357
366
  ],
358
367
  "additionalProperties": false
359
368
  },
369
+ {
370
+ "readOnly": true,
371
+ "type": "object",
372
+ "properties": {
373
+ "type": {
374
+ "type": "string",
375
+ "const": "approval.resolved"
376
+ },
377
+ "approvalId": {
378
+ "type": "string",
379
+ "format": "uuid",
380
+ "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)$"
381
+ },
382
+ "resolution": {
383
+ "anyOf": [
384
+ {
385
+ "readOnly": true,
386
+ "type": "object",
387
+ "properties": {
388
+ "status": {
389
+ "type": "string",
390
+ "const": "resolved"
391
+ },
392
+ "decision": {
393
+ "type": "string",
394
+ "const": "approve"
395
+ }
396
+ },
397
+ "required": [
398
+ "status",
399
+ "decision"
400
+ ],
401
+ "additionalProperties": false
402
+ },
403
+ {
404
+ "readOnly": true,
405
+ "type": "object",
406
+ "properties": {
407
+ "status": {
408
+ "type": "string",
409
+ "const": "resolved"
410
+ },
411
+ "decision": {
412
+ "type": "string",
413
+ "const": "reject"
414
+ },
415
+ "reason": {
416
+ "type": "string",
417
+ "minLength": 1
418
+ }
419
+ },
420
+ "required": [
421
+ "status",
422
+ "decision"
423
+ ],
424
+ "additionalProperties": false
425
+ },
426
+ {
427
+ "readOnly": true,
428
+ "type": "object",
429
+ "properties": {
430
+ "status": {
431
+ "type": "string",
432
+ "const": "cancelled"
433
+ },
434
+ "reason": {
435
+ "type": "string",
436
+ "minLength": 1
437
+ }
438
+ },
439
+ "required": [
440
+ "status",
441
+ "reason"
442
+ ],
443
+ "additionalProperties": false
444
+ },
445
+ {
446
+ "readOnly": true,
447
+ "type": "object",
448
+ "properties": {
449
+ "status": {
450
+ "type": "string",
451
+ "const": "expired"
452
+ },
453
+ "reason": {
454
+ "type": "string",
455
+ "minLength": 1
456
+ }
457
+ },
458
+ "required": [
459
+ "status"
460
+ ],
461
+ "additionalProperties": false
462
+ }
463
+ ]
464
+ }
465
+ },
466
+ "required": [
467
+ "type",
468
+ "approvalId",
469
+ "resolution"
470
+ ],
471
+ "additionalProperties": false
472
+ },
360
473
  {
361
474
  "readOnly": true,
362
475
  "type": "object",
@@ -446,39 +559,33 @@
446
559
  "event"
447
560
  ],
448
561
  "additionalProperties": false,
449
- "$defs": {
450
- "__schema0": {
451
- "anyOf": [
452
- {
453
- "type": "string"
454
- },
455
- {
456
- "type": "number"
457
- },
458
- {
459
- "type": "boolean"
460
- },
461
- {
462
- "type": "null"
463
- },
464
- {
465
- "type": "array",
466
- "items": {
467
- "$ref": "#/$defs/__schema0"
468
- }
469
- },
470
- {
471
- "type": "object",
472
- "propertyNames": {
473
- "type": "string"
562
+ "allOf": [
563
+ {
564
+ "not": {
565
+ "type": "object",
566
+ "properties": {
567
+ "protocolVersion": {
568
+ "const": "1.0"
474
569
  },
475
- "additionalProperties": {
476
- "$ref": "#/$defs/__schema0"
570
+ "event": {
571
+ "type": "object",
572
+ "properties": {
573
+ "type": {
574
+ "const": "approval.resolved"
575
+ }
576
+ },
577
+ "required": [
578
+ "type"
579
+ ]
477
580
  }
478
- }
479
- ]
581
+ },
582
+ "required": [
583
+ "protocolVersion",
584
+ "event"
585
+ ]
586
+ }
480
587
  }
481
- }
588
+ ]
482
589
  },
483
590
  "runtimeProtocolErrorData": {
484
591
  "readOnly": true,
@@ -505,47 +612,37 @@
505
612
  "type": "boolean"
506
613
  },
507
614
  "details": {
508
- "$ref": "#/$defs/__schema0"
615
+ "$ref": "#/$defs/sharedSchema0"
509
616
  }
510
617
  },
511
618
  "required": [
512
619
  "rollCode",
513
620
  "retryable"
514
621
  ],
515
- "additionalProperties": false,
516
- "$defs": {
517
- "__schema0": {
518
- "anyOf": [
519
- {
520
- "type": "string"
521
- },
522
- {
523
- "type": "number"
524
- },
525
- {
526
- "type": "boolean"
527
- },
528
- {
529
- "type": "null"
530
- },
531
- {
532
- "type": "array",
533
- "items": {
534
- "$ref": "#/$defs/__schema0"
535
- }
536
- },
537
- {
538
- "type": "object",
539
- "propertyNames": {
540
- "type": "string"
541
- },
542
- "additionalProperties": {
543
- "$ref": "#/$defs/__schema0"
544
- }
545
- }
546
- ]
622
+ "additionalProperties": false
623
+ },
624
+ "runtimeServerRequestCancelParams": {
625
+ "readOnly": true,
626
+ "type": "object",
627
+ "properties": {
628
+ "serverRequestId": {
629
+ "$ref": "#/$defs/jsonRpcId"
630
+ },
631
+ "approvalId": {
632
+ "type": "string",
633
+ "format": "uuid",
634
+ "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)$"
635
+ },
636
+ "reason": {
637
+ "type": "string",
638
+ "minLength": 1
547
639
  }
548
- }
640
+ },
641
+ "required": [
642
+ "serverRequestId",
643
+ "reason"
644
+ ],
645
+ "additionalProperties": false
549
646
  },
550
647
  "initializeParams": {
551
648
  "readOnly": true,
@@ -593,7 +690,10 @@
593
690
  "properties": {
594
691
  "protocolVersion": {
595
692
  "type": "string",
596
- "const": "1.0"
693
+ "enum": [
694
+ "1.1",
695
+ "1.0"
696
+ ]
597
697
  },
598
698
  "runtimeInstanceId": {
599
699
  "type": "string",
@@ -685,30 +785,6 @@
685
785
  ],
686
786
  "additionalProperties": false
687
787
  },
688
- "initializeRequest": {
689
- "type": "object",
690
- "properties": {
691
- "jsonrpc": {
692
- "const": "2.0"
693
- },
694
- "id": {
695
- "$ref": "#/$defs/jsonRpcId"
696
- },
697
- "method": {
698
- "const": "initialize"
699
- },
700
- "params": {
701
- "$ref": "#/$defs/initializeParams"
702
- }
703
- },
704
- "required": [
705
- "jsonrpc",
706
- "id",
707
- "method",
708
- "params"
709
- ],
710
- "additionalProperties": false
711
- },
712
788
  "threadListParams": {
713
789
  "readOnly": true,
714
790
  "type": "object",
@@ -793,30 +869,6 @@
793
869
  ],
794
870
  "additionalProperties": false
795
871
  },
796
- "threadListRequest": {
797
- "type": "object",
798
- "properties": {
799
- "jsonrpc": {
800
- "const": "2.0"
801
- },
802
- "id": {
803
- "$ref": "#/$defs/jsonRpcId"
804
- },
805
- "method": {
806
- "const": "thread.list"
807
- },
808
- "params": {
809
- "$ref": "#/$defs/threadListParams"
810
- }
811
- },
812
- "required": [
813
- "jsonrpc",
814
- "id",
815
- "method",
816
- "params"
817
- ],
818
- "additionalProperties": false
819
- },
820
872
  "threadCreateParams": {
821
873
  "readOnly": true,
822
874
  "type": "object",
@@ -886,30 +938,6 @@
886
938
  ],
887
939
  "additionalProperties": false
888
940
  },
889
- "threadCreateRequest": {
890
- "type": "object",
891
- "properties": {
892
- "jsonrpc": {
893
- "const": "2.0"
894
- },
895
- "id": {
896
- "$ref": "#/$defs/jsonRpcId"
897
- },
898
- "method": {
899
- "const": "thread.create"
900
- },
901
- "params": {
902
- "$ref": "#/$defs/threadCreateParams"
903
- }
904
- },
905
- "required": [
906
- "jsonrpc",
907
- "id",
908
- "method",
909
- "params"
910
- ],
911
- "additionalProperties": false
912
- },
913
941
  "threadOpenParams": {
914
942
  "readOnly": true,
915
943
  "type": "object",
@@ -1107,7 +1135,7 @@
1107
1135
  "additionalProperties": false
1108
1136
  },
1109
1137
  "display": {
1110
- "$ref": "#/$defs/__schema0"
1138
+ "$ref": "#/$defs/sharedSchema0"
1111
1139
  }
1112
1140
  },
1113
1141
  "required": [
@@ -1196,7 +1224,7 @@
1196
1224
  "minLength": 1
1197
1225
  },
1198
1226
  "preview": {
1199
- "$ref": "#/$defs/__schema0"
1227
+ "$ref": "#/$defs/sharedSchema0"
1200
1228
  },
1201
1229
  "reason": {
1202
1230
  "type": "string"
@@ -1227,64 +1255,7 @@
1227
1255
  "pendingApprovals",
1228
1256
  "transcriptCompleteness"
1229
1257
  ],
1230
- "additionalProperties": false,
1231
- "$defs": {
1232
- "__schema0": {
1233
- "anyOf": [
1234
- {
1235
- "type": "string"
1236
- },
1237
- {
1238
- "type": "number"
1239
- },
1240
- {
1241
- "type": "boolean"
1242
- },
1243
- {
1244
- "type": "null"
1245
- },
1246
- {
1247
- "type": "array",
1248
- "items": {
1249
- "$ref": "#/$defs/__schema0"
1250
- }
1251
- },
1252
- {
1253
- "type": "object",
1254
- "propertyNames": {
1255
- "type": "string"
1256
- },
1257
- "additionalProperties": {
1258
- "$ref": "#/$defs/__schema0"
1259
- }
1260
- }
1261
- ]
1262
- }
1263
- }
1264
- },
1265
- "threadOpenRequest": {
1266
- "type": "object",
1267
- "properties": {
1268
- "jsonrpc": {
1269
- "const": "2.0"
1270
- },
1271
- "id": {
1272
- "$ref": "#/$defs/jsonRpcId"
1273
- },
1274
- "method": {
1275
- "const": "thread.open"
1276
- },
1277
- "params": {
1278
- "$ref": "#/$defs/threadOpenParams"
1279
- }
1280
- },
1281
- "required": [
1282
- "jsonrpc",
1283
- "id",
1284
- "method",
1285
- "params"
1286
- ],
1287
- "additionalProperties": false
1258
+ "additionalProperties": false
1288
1259
  },
1289
1260
  "threadSnapshotParams": {
1290
1261
  "readOnly": true,
@@ -1500,7 +1471,7 @@
1500
1471
  "additionalProperties": false
1501
1472
  },
1502
1473
  "display": {
1503
- "$ref": "#/$defs/__schema0"
1474
+ "$ref": "#/$defs/sharedSchema0"
1504
1475
  }
1505
1476
  },
1506
1477
  "required": [
@@ -1589,7 +1560,7 @@
1589
1560
  "minLength": 1
1590
1561
  },
1591
1562
  "preview": {
1592
- "$ref": "#/$defs/__schema0"
1563
+ "$ref": "#/$defs/sharedSchema0"
1593
1564
  },
1594
1565
  "reason": {
1595
1566
  "type": "string"
@@ -1620,63 +1591,6 @@
1620
1591
  "pendingApprovals",
1621
1592
  "transcriptCompleteness"
1622
1593
  ],
1623
- "additionalProperties": false,
1624
- "$defs": {
1625
- "__schema0": {
1626
- "anyOf": [
1627
- {
1628
- "type": "string"
1629
- },
1630
- {
1631
- "type": "number"
1632
- },
1633
- {
1634
- "type": "boolean"
1635
- },
1636
- {
1637
- "type": "null"
1638
- },
1639
- {
1640
- "type": "array",
1641
- "items": {
1642
- "$ref": "#/$defs/__schema0"
1643
- }
1644
- },
1645
- {
1646
- "type": "object",
1647
- "propertyNames": {
1648
- "type": "string"
1649
- },
1650
- "additionalProperties": {
1651
- "$ref": "#/$defs/__schema0"
1652
- }
1653
- }
1654
- ]
1655
- }
1656
- }
1657
- },
1658
- "threadSnapshotRequest": {
1659
- "type": "object",
1660
- "properties": {
1661
- "jsonrpc": {
1662
- "const": "2.0"
1663
- },
1664
- "id": {
1665
- "$ref": "#/$defs/jsonRpcId"
1666
- },
1667
- "method": {
1668
- "const": "thread.snapshot"
1669
- },
1670
- "params": {
1671
- "$ref": "#/$defs/threadSnapshotParams"
1672
- }
1673
- },
1674
- "required": [
1675
- "jsonrpc",
1676
- "id",
1677
- "method",
1678
- "params"
1679
- ],
1680
1594
  "additionalProperties": false
1681
1595
  },
1682
1596
  "threadRenameParams": {
@@ -1755,30 +1669,6 @@
1755
1669
  ],
1756
1670
  "additionalProperties": false
1757
1671
  },
1758
- "threadRenameRequest": {
1759
- "type": "object",
1760
- "properties": {
1761
- "jsonrpc": {
1762
- "const": "2.0"
1763
- },
1764
- "id": {
1765
- "$ref": "#/$defs/jsonRpcId"
1766
- },
1767
- "method": {
1768
- "const": "thread.rename"
1769
- },
1770
- "params": {
1771
- "$ref": "#/$defs/threadRenameParams"
1772
- }
1773
- },
1774
- "required": [
1775
- "jsonrpc",
1776
- "id",
1777
- "method",
1778
- "params"
1779
- ],
1780
- "additionalProperties": false
1781
- },
1782
1672
  "threadDeleteParams": {
1783
1673
  "readOnly": true,
1784
1674
  "type": "object",
@@ -1814,30 +1704,6 @@
1814
1704
  ],
1815
1705
  "additionalProperties": false
1816
1706
  },
1817
- "threadDeleteRequest": {
1818
- "type": "object",
1819
- "properties": {
1820
- "jsonrpc": {
1821
- "const": "2.0"
1822
- },
1823
- "id": {
1824
- "$ref": "#/$defs/jsonRpcId"
1825
- },
1826
- "method": {
1827
- "const": "thread.delete"
1828
- },
1829
- "params": {
1830
- "$ref": "#/$defs/threadDeleteParams"
1831
- }
1832
- },
1833
- "required": [
1834
- "jsonrpc",
1835
- "id",
1836
- "method",
1837
- "params"
1838
- ],
1839
- "additionalProperties": false
1840
- },
1841
1707
  "threadDetachParams": {
1842
1708
  "readOnly": true,
1843
1709
  "type": "object",
@@ -1872,30 +1738,6 @@
1872
1738
  ],
1873
1739
  "additionalProperties": false
1874
1740
  },
1875
- "threadDetachRequest": {
1876
- "type": "object",
1877
- "properties": {
1878
- "jsonrpc": {
1879
- "const": "2.0"
1880
- },
1881
- "id": {
1882
- "$ref": "#/$defs/jsonRpcId"
1883
- },
1884
- "method": {
1885
- "const": "thread.detach"
1886
- },
1887
- "params": {
1888
- "$ref": "#/$defs/threadDetachParams"
1889
- }
1890
- },
1891
- "required": [
1892
- "jsonrpc",
1893
- "id",
1894
- "method",
1895
- "params"
1896
- ],
1897
- "additionalProperties": false
1898
- },
1899
1741
  "threadCapabilitiesParams": {
1900
1742
  "readOnly": true,
1901
1743
  "type": "object",
@@ -1916,69 +1758,12 @@
1916
1758
  "type": "object",
1917
1759
  "properties": {
1918
1760
  "manifest": {
1919
- "$ref": "#/$defs/__schema0"
1761
+ "$ref": "#/$defs/sharedSchema0"
1920
1762
  }
1921
1763
  },
1922
1764
  "required": [
1923
1765
  "manifest"
1924
1766
  ],
1925
- "additionalProperties": false,
1926
- "$defs": {
1927
- "__schema0": {
1928
- "anyOf": [
1929
- {
1930
- "type": "string"
1931
- },
1932
- {
1933
- "type": "number"
1934
- },
1935
- {
1936
- "type": "boolean"
1937
- },
1938
- {
1939
- "type": "null"
1940
- },
1941
- {
1942
- "type": "array",
1943
- "items": {
1944
- "$ref": "#/$defs/__schema0"
1945
- }
1946
- },
1947
- {
1948
- "type": "object",
1949
- "propertyNames": {
1950
- "type": "string"
1951
- },
1952
- "additionalProperties": {
1953
- "$ref": "#/$defs/__schema0"
1954
- }
1955
- }
1956
- ]
1957
- }
1958
- }
1959
- },
1960
- "threadCapabilitiesRequest": {
1961
- "type": "object",
1962
- "properties": {
1963
- "jsonrpc": {
1964
- "const": "2.0"
1965
- },
1966
- "id": {
1967
- "$ref": "#/$defs/jsonRpcId"
1968
- },
1969
- "method": {
1970
- "const": "thread.capabilities"
1971
- },
1972
- "params": {
1973
- "$ref": "#/$defs/threadCapabilitiesParams"
1974
- }
1975
- },
1976
- "required": [
1977
- "jsonrpc",
1978
- "id",
1979
- "method",
1980
- "params"
1981
- ],
1982
1767
  "additionalProperties": false
1983
1768
  },
1984
1769
  "turnStartParams": {
@@ -2043,30 +1828,6 @@
2043
1828
  ],
2044
1829
  "additionalProperties": false
2045
1830
  },
2046
- "turnStartRequest": {
2047
- "type": "object",
2048
- "properties": {
2049
- "jsonrpc": {
2050
- "const": "2.0"
2051
- },
2052
- "id": {
2053
- "$ref": "#/$defs/jsonRpcId"
2054
- },
2055
- "method": {
2056
- "const": "turn.start"
2057
- },
2058
- "params": {
2059
- "$ref": "#/$defs/turnStartParams"
2060
- }
2061
- },
2062
- "required": [
2063
- "jsonrpc",
2064
- "id",
2065
- "method",
2066
- "params"
2067
- ],
2068
- "additionalProperties": false
2069
- },
2070
1831
  "turnCancelParams": {
2071
1832
  "readOnly": true,
2072
1833
  "type": "object",
@@ -2107,30 +1868,6 @@
2107
1868
  ],
2108
1869
  "additionalProperties": false
2109
1870
  },
2110
- "turnCancelRequest": {
2111
- "type": "object",
2112
- "properties": {
2113
- "jsonrpc": {
2114
- "const": "2.0"
2115
- },
2116
- "id": {
2117
- "$ref": "#/$defs/jsonRpcId"
2118
- },
2119
- "method": {
2120
- "const": "turn.cancel"
2121
- },
2122
- "params": {
2123
- "$ref": "#/$defs/turnCancelParams"
2124
- }
2125
- },
2126
- "required": [
2127
- "jsonrpc",
2128
- "id",
2129
- "method",
2130
- "params"
2131
- ],
2132
- "additionalProperties": false
2133
- },
2134
1871
  "approvalRespondParams": {
2135
1872
  "readOnly": true,
2136
1873
  "type": "object",
@@ -2163,7 +1900,8 @@
2163
1900
  ]
2164
1901
  },
2165
1902
  "reason": {
2166
- "type": "string"
1903
+ "type": "string",
1904
+ "minLength": 1
2167
1905
  }
2168
1906
  },
2169
1907
  "required": [
@@ -2189,38 +1927,14 @@
2189
1927
  ],
2190
1928
  "additionalProperties": false
2191
1929
  },
2192
- "approvalRespondRequest": {
1930
+ "operationGetParams": {
1931
+ "readOnly": true,
2193
1932
  "type": "object",
2194
1933
  "properties": {
2195
- "jsonrpc": {
2196
- "const": "2.0"
2197
- },
2198
- "id": {
2199
- "$ref": "#/$defs/jsonRpcId"
2200
- },
2201
- "method": {
2202
- "const": "approval.respond"
2203
- },
2204
- "params": {
2205
- "$ref": "#/$defs/approvalRespondParams"
2206
- }
2207
- },
2208
- "required": [
2209
- "jsonrpc",
2210
- "id",
2211
- "method",
2212
- "params"
2213
- ],
2214
- "additionalProperties": false
2215
- },
2216
- "operationGetParams": {
2217
- "readOnly": true,
2218
- "type": "object",
2219
- "properties": {
2220
- "threadId": {
2221
- "type": "string",
2222
- "format": "uuid",
2223
- "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)$"
1934
+ "threadId": {
1935
+ "type": "string",
1936
+ "format": "uuid",
1937
+ "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)$"
2224
1938
  },
2225
1939
  "operationId": {
2226
1940
  "type": "string",
@@ -2296,7 +2010,7 @@
2296
2010
  "additionalProperties": false
2297
2011
  },
2298
2012
  "display": {
2299
- "$ref": "#/$defs/__schema0"
2013
+ "$ref": "#/$defs/sharedSchema0"
2300
2014
  }
2301
2015
  },
2302
2016
  "required": [
@@ -2320,40 +2034,421 @@
2320
2034
  "required": [
2321
2035
  "operation"
2322
2036
  ],
2323
- "additionalProperties": false,
2324
- "$defs": {
2325
- "__schema0": {
2326
- "anyOf": [
2327
- {
2328
- "type": "string"
2037
+ "additionalProperties": false
2038
+ },
2039
+ "approvalRequestParams": {
2040
+ "readOnly": true,
2041
+ "type": "object",
2042
+ "properties": {
2043
+ "threadId": {
2044
+ "type": "string",
2045
+ "format": "uuid",
2046
+ "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)$"
2047
+ },
2048
+ "approval": {
2049
+ "readOnly": true,
2050
+ "type": "object",
2051
+ "properties": {
2052
+ "id": {
2053
+ "type": "string",
2054
+ "format": "uuid",
2055
+ "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)$"
2329
2056
  },
2330
- {
2331
- "type": "number"
2057
+ "turnId": {
2058
+ "type": "string",
2059
+ "format": "uuid",
2060
+ "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)$"
2332
2061
  },
2333
- {
2334
- "type": "boolean"
2062
+ "agentName": {
2063
+ "type": "string",
2064
+ "minLength": 1
2335
2065
  },
2336
- {
2337
- "type": "null"
2066
+ "toolName": {
2067
+ "type": "string",
2068
+ "minLength": 1
2338
2069
  },
2339
- {
2340
- "type": "array",
2341
- "items": {
2342
- "$ref": "#/$defs/__schema0"
2343
- }
2070
+ "preview": {
2071
+ "$ref": "#/$defs/sharedSchema0"
2344
2072
  },
2345
- {
2346
- "type": "object",
2347
- "propertyNames": {
2348
- "type": "string"
2349
- },
2350
- "additionalProperties": {
2351
- "$ref": "#/$defs/__schema0"
2352
- }
2073
+ "reason": {
2074
+ "type": "string"
2353
2075
  }
2354
- ]
2076
+ },
2077
+ "required": [
2078
+ "id",
2079
+ "turnId",
2080
+ "agentName",
2081
+ "toolName",
2082
+ "preview"
2083
+ ],
2084
+ "additionalProperties": false
2085
+ },
2086
+ "expiresAt": {
2087
+ "type": "string",
2088
+ "format": "date-time",
2089
+ "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})))$"
2355
2090
  }
2356
- }
2091
+ },
2092
+ "required": [
2093
+ "threadId",
2094
+ "approval"
2095
+ ],
2096
+ "additionalProperties": false
2097
+ },
2098
+ "approvalRequestResult": {
2099
+ "anyOf": [
2100
+ {
2101
+ "readOnly": true,
2102
+ "type": "object",
2103
+ "properties": {
2104
+ "decision": {
2105
+ "type": "string",
2106
+ "const": "approve"
2107
+ }
2108
+ },
2109
+ "required": [
2110
+ "decision"
2111
+ ],
2112
+ "additionalProperties": false
2113
+ },
2114
+ {
2115
+ "readOnly": true,
2116
+ "type": "object",
2117
+ "properties": {
2118
+ "decision": {
2119
+ "type": "string",
2120
+ "const": "reject"
2121
+ },
2122
+ "reason": {
2123
+ "type": "string",
2124
+ "minLength": 1
2125
+ }
2126
+ },
2127
+ "required": [
2128
+ "decision"
2129
+ ],
2130
+ "additionalProperties": false
2131
+ }
2132
+ ]
2133
+ },
2134
+ "sharedSchema0": {
2135
+ "anyOf": [
2136
+ {
2137
+ "type": "string"
2138
+ },
2139
+ {
2140
+ "type": "number"
2141
+ },
2142
+ {
2143
+ "type": "boolean"
2144
+ },
2145
+ {
2146
+ "type": "null"
2147
+ },
2148
+ {
2149
+ "type": "array",
2150
+ "items": {
2151
+ "$ref": "#/$defs/sharedSchema0"
2152
+ }
2153
+ },
2154
+ {
2155
+ "type": "object",
2156
+ "propertyNames": {
2157
+ "type": "string"
2158
+ },
2159
+ "additionalProperties": {
2160
+ "$ref": "#/$defs/sharedSchema0"
2161
+ }
2162
+ }
2163
+ ]
2164
+ },
2165
+ "initializeRequest": {
2166
+ "type": "object",
2167
+ "properties": {
2168
+ "jsonrpc": {
2169
+ "const": "2.0"
2170
+ },
2171
+ "id": {
2172
+ "$ref": "#/$defs/jsonRpcId"
2173
+ },
2174
+ "method": {
2175
+ "const": "initialize"
2176
+ },
2177
+ "params": {
2178
+ "$ref": "#/$defs/initializeParams"
2179
+ }
2180
+ },
2181
+ "required": [
2182
+ "jsonrpc",
2183
+ "id",
2184
+ "method",
2185
+ "params"
2186
+ ],
2187
+ "additionalProperties": false
2188
+ },
2189
+ "threadListRequest": {
2190
+ "type": "object",
2191
+ "properties": {
2192
+ "jsonrpc": {
2193
+ "const": "2.0"
2194
+ },
2195
+ "id": {
2196
+ "$ref": "#/$defs/jsonRpcId"
2197
+ },
2198
+ "method": {
2199
+ "const": "thread.list"
2200
+ },
2201
+ "params": {
2202
+ "$ref": "#/$defs/threadListParams"
2203
+ }
2204
+ },
2205
+ "required": [
2206
+ "jsonrpc",
2207
+ "id",
2208
+ "method",
2209
+ "params"
2210
+ ],
2211
+ "additionalProperties": false
2212
+ },
2213
+ "threadCreateRequest": {
2214
+ "type": "object",
2215
+ "properties": {
2216
+ "jsonrpc": {
2217
+ "const": "2.0"
2218
+ },
2219
+ "id": {
2220
+ "$ref": "#/$defs/jsonRpcId"
2221
+ },
2222
+ "method": {
2223
+ "const": "thread.create"
2224
+ },
2225
+ "params": {
2226
+ "$ref": "#/$defs/threadCreateParams"
2227
+ }
2228
+ },
2229
+ "required": [
2230
+ "jsonrpc",
2231
+ "id",
2232
+ "method",
2233
+ "params"
2234
+ ],
2235
+ "additionalProperties": false
2236
+ },
2237
+ "threadOpenRequest": {
2238
+ "type": "object",
2239
+ "properties": {
2240
+ "jsonrpc": {
2241
+ "const": "2.0"
2242
+ },
2243
+ "id": {
2244
+ "$ref": "#/$defs/jsonRpcId"
2245
+ },
2246
+ "method": {
2247
+ "const": "thread.open"
2248
+ },
2249
+ "params": {
2250
+ "$ref": "#/$defs/threadOpenParams"
2251
+ }
2252
+ },
2253
+ "required": [
2254
+ "jsonrpc",
2255
+ "id",
2256
+ "method",
2257
+ "params"
2258
+ ],
2259
+ "additionalProperties": false
2260
+ },
2261
+ "threadSnapshotRequest": {
2262
+ "type": "object",
2263
+ "properties": {
2264
+ "jsonrpc": {
2265
+ "const": "2.0"
2266
+ },
2267
+ "id": {
2268
+ "$ref": "#/$defs/jsonRpcId"
2269
+ },
2270
+ "method": {
2271
+ "const": "thread.snapshot"
2272
+ },
2273
+ "params": {
2274
+ "$ref": "#/$defs/threadSnapshotParams"
2275
+ }
2276
+ },
2277
+ "required": [
2278
+ "jsonrpc",
2279
+ "id",
2280
+ "method",
2281
+ "params"
2282
+ ],
2283
+ "additionalProperties": false
2284
+ },
2285
+ "threadRenameRequest": {
2286
+ "type": "object",
2287
+ "properties": {
2288
+ "jsonrpc": {
2289
+ "const": "2.0"
2290
+ },
2291
+ "id": {
2292
+ "$ref": "#/$defs/jsonRpcId"
2293
+ },
2294
+ "method": {
2295
+ "const": "thread.rename"
2296
+ },
2297
+ "params": {
2298
+ "$ref": "#/$defs/threadRenameParams"
2299
+ }
2300
+ },
2301
+ "required": [
2302
+ "jsonrpc",
2303
+ "id",
2304
+ "method",
2305
+ "params"
2306
+ ],
2307
+ "additionalProperties": false
2308
+ },
2309
+ "threadDeleteRequest": {
2310
+ "type": "object",
2311
+ "properties": {
2312
+ "jsonrpc": {
2313
+ "const": "2.0"
2314
+ },
2315
+ "id": {
2316
+ "$ref": "#/$defs/jsonRpcId"
2317
+ },
2318
+ "method": {
2319
+ "const": "thread.delete"
2320
+ },
2321
+ "params": {
2322
+ "$ref": "#/$defs/threadDeleteParams"
2323
+ }
2324
+ },
2325
+ "required": [
2326
+ "jsonrpc",
2327
+ "id",
2328
+ "method",
2329
+ "params"
2330
+ ],
2331
+ "additionalProperties": false
2332
+ },
2333
+ "threadDetachRequest": {
2334
+ "type": "object",
2335
+ "properties": {
2336
+ "jsonrpc": {
2337
+ "const": "2.0"
2338
+ },
2339
+ "id": {
2340
+ "$ref": "#/$defs/jsonRpcId"
2341
+ },
2342
+ "method": {
2343
+ "const": "thread.detach"
2344
+ },
2345
+ "params": {
2346
+ "$ref": "#/$defs/threadDetachParams"
2347
+ }
2348
+ },
2349
+ "required": [
2350
+ "jsonrpc",
2351
+ "id",
2352
+ "method",
2353
+ "params"
2354
+ ],
2355
+ "additionalProperties": false
2356
+ },
2357
+ "threadCapabilitiesRequest": {
2358
+ "type": "object",
2359
+ "properties": {
2360
+ "jsonrpc": {
2361
+ "const": "2.0"
2362
+ },
2363
+ "id": {
2364
+ "$ref": "#/$defs/jsonRpcId"
2365
+ },
2366
+ "method": {
2367
+ "const": "thread.capabilities"
2368
+ },
2369
+ "params": {
2370
+ "$ref": "#/$defs/threadCapabilitiesParams"
2371
+ }
2372
+ },
2373
+ "required": [
2374
+ "jsonrpc",
2375
+ "id",
2376
+ "method",
2377
+ "params"
2378
+ ],
2379
+ "additionalProperties": false
2380
+ },
2381
+ "turnStartRequest": {
2382
+ "type": "object",
2383
+ "properties": {
2384
+ "jsonrpc": {
2385
+ "const": "2.0"
2386
+ },
2387
+ "id": {
2388
+ "$ref": "#/$defs/jsonRpcId"
2389
+ },
2390
+ "method": {
2391
+ "const": "turn.start"
2392
+ },
2393
+ "params": {
2394
+ "$ref": "#/$defs/turnStartParams"
2395
+ }
2396
+ },
2397
+ "required": [
2398
+ "jsonrpc",
2399
+ "id",
2400
+ "method",
2401
+ "params"
2402
+ ],
2403
+ "additionalProperties": false
2404
+ },
2405
+ "turnCancelRequest": {
2406
+ "type": "object",
2407
+ "properties": {
2408
+ "jsonrpc": {
2409
+ "const": "2.0"
2410
+ },
2411
+ "id": {
2412
+ "$ref": "#/$defs/jsonRpcId"
2413
+ },
2414
+ "method": {
2415
+ "const": "turn.cancel"
2416
+ },
2417
+ "params": {
2418
+ "$ref": "#/$defs/turnCancelParams"
2419
+ }
2420
+ },
2421
+ "required": [
2422
+ "jsonrpc",
2423
+ "id",
2424
+ "method",
2425
+ "params"
2426
+ ],
2427
+ "additionalProperties": false
2428
+ },
2429
+ "approvalRespondRequest": {
2430
+ "type": "object",
2431
+ "properties": {
2432
+ "jsonrpc": {
2433
+ "const": "2.0"
2434
+ },
2435
+ "id": {
2436
+ "$ref": "#/$defs/jsonRpcId"
2437
+ },
2438
+ "method": {
2439
+ "const": "approval.respond"
2440
+ },
2441
+ "params": {
2442
+ "$ref": "#/$defs/approvalRespondParams"
2443
+ }
2444
+ },
2445
+ "required": [
2446
+ "jsonrpc",
2447
+ "id",
2448
+ "method",
2449
+ "params"
2450
+ ],
2451
+ "additionalProperties": false
2357
2452
  },
2358
2453
  "operationGetRequest": {
2359
2454
  "type": "object",
@@ -2379,6 +2474,30 @@
2379
2474
  ],
2380
2475
  "additionalProperties": false
2381
2476
  },
2477
+ "approvalRequestServerRequest": {
2478
+ "type": "object",
2479
+ "properties": {
2480
+ "jsonrpc": {
2481
+ "const": "2.0"
2482
+ },
2483
+ "id": {
2484
+ "$ref": "#/$defs/jsonRpcId"
2485
+ },
2486
+ "method": {
2487
+ "const": "approval.request"
2488
+ },
2489
+ "params": {
2490
+ "$ref": "#/$defs/approvalRequestParams"
2491
+ }
2492
+ },
2493
+ "required": [
2494
+ "jsonrpc",
2495
+ "id",
2496
+ "method",
2497
+ "params"
2498
+ ],
2499
+ "additionalProperties": false
2500
+ },
2382
2501
  "clientRequest": {
2383
2502
  "oneOf": [
2384
2503
  {
@@ -2422,6 +2541,13 @@
2422
2541
  }
2423
2542
  ]
2424
2543
  },
2544
+ "serverRequest": {
2545
+ "oneOf": [
2546
+ {
2547
+ "$ref": "#/$defs/approvalRequestServerRequest"
2548
+ }
2549
+ ]
2550
+ },
2425
2551
  "runtimeEventNotification": {
2426
2552
  "type": "object",
2427
2553
  "properties": {
@@ -2442,6 +2568,26 @@
2442
2568
  ],
2443
2569
  "additionalProperties": false
2444
2570
  },
2571
+ "runtimeServerRequestCancelNotification": {
2572
+ "type": "object",
2573
+ "properties": {
2574
+ "jsonrpc": {
2575
+ "const": "2.0"
2576
+ },
2577
+ "method": {
2578
+ "const": "runtime.serverRequest.cancel"
2579
+ },
2580
+ "params": {
2581
+ "$ref": "#/$defs/runtimeServerRequestCancelParams"
2582
+ }
2583
+ },
2584
+ "required": [
2585
+ "jsonrpc",
2586
+ "method",
2587
+ "params"
2588
+ ],
2589
+ "additionalProperties": false
2590
+ },
2445
2591
  "successResponse": {
2446
2592
  "type": "object",
2447
2593
  "properties": {
@@ -2491,6 +2637,9 @@
2491
2637
  },
2492
2638
  {
2493
2639
  "$ref": "#/$defs/operationGetResult"
2640
+ },
2641
+ {
2642
+ "$ref": "#/$defs/approvalRequestResult"
2494
2643
  }
2495
2644
  ]
2496
2645
  }
@@ -2546,7 +2695,7 @@
2546
2695
  "additionalProperties": false
2547
2696
  }
2548
2697
  },
2549
- "x-roll-protocol-version": "1.0",
2698
+ "x-roll-protocol-version": "1.1",
2550
2699
  "x-roll-methods": {
2551
2700
  "initialize": {
2552
2701
  "params": {
@@ -2691,5 +2840,18 @@
2691
2840
  "$ref": "#/$defs/operationGetRequest"
2692
2841
  }
2693
2842
  }
2843
+ },
2844
+ "x-roll-server-request-methods": {
2845
+ "approval.request": {
2846
+ "params": {
2847
+ "$ref": "#/$defs/approvalRequestParams"
2848
+ },
2849
+ "result": {
2850
+ "$ref": "#/$defs/approvalRequestResult"
2851
+ },
2852
+ "request": {
2853
+ "$ref": "#/$defs/approvalRequestServerRequest"
2854
+ }
2855
+ }
2694
2856
  }
2695
2857
  }