@khanglvm/relay 0.21.0 → 0.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/docs/AGENT.md +14 -2
  2. package/package.json +6 -1
  3. package/schema/spec.v1.json +55 -3
  4. package/skills/relay/SKILL.md +2 -1
  5. package/src/a2ui/board-catalog.json +1004 -0
  6. package/src/a2ui/board-constants.js +35 -0
  7. package/src/a2ui/board.js +5 -0
  8. package/src/a2ui/from-a2ui.js +71 -0
  9. package/src/a2ui/negotiate.js +38 -0
  10. package/src/a2ui/to-a2ui.js +147 -0
  11. package/src/cli/args.js +4 -2
  12. package/src/cli/ask.js +4 -3
  13. package/src/cli/boards.js +10 -7
  14. package/src/cli/git.js +5 -3
  15. package/src/cli/help.js +3 -1
  16. package/src/cli/io.js +21 -0
  17. package/src/cli/mcp.js +31 -2
  18. package/src/file-access.js +117 -0
  19. package/src/file-preview.js +1 -1
  20. package/src/mcp/boards.js +30 -7
  21. package/src/mcp/constants.js +3 -1
  22. package/src/mcp/schemas.js +5 -2
  23. package/src/mcp/serve.js +4 -4
  24. package/src/mcp/server.js +2 -1
  25. package/src/mcp/store.js +2 -2
  26. package/src/mcp/token.js +33 -8
  27. package/src/mcp/tools.js +16 -7
  28. package/src/mcp-ui/board/normalize.js +12 -0
  29. package/src/mcp-ui/board/render.js +2 -1
  30. package/src/mcp-ui/board/state.js +3 -0
  31. package/src/server/board.js +30 -22
  32. package/src/server/files.js +10 -0
  33. package/src/server/http.js +19 -0
  34. package/src/server/page.js +4 -0
  35. package/src/spec/blocks/a2ui.js +1 -1
  36. package/src/spec/blocks/chart.js +1 -1
  37. package/src/spec/blocks/code.js +4 -4
  38. package/src/spec/blocks/diagram.js +3 -3
  39. package/src/spec/blocks/git-conflict.js +2 -2
  40. package/src/spec/blocks/image.js +6 -5
  41. package/src/spec/blocks/markdown.js +2 -2
  42. package/src/spec/blocks/pdf.js +4 -10
  43. package/src/spec/blocks/table.js +5 -4
  44. package/src/spec/blocks/video.js +4 -10
  45. package/src/spec/blocks/widgets.js +6 -6
  46. package/src/spec/constants.js +13 -1
  47. package/src/spec/index.js +1 -0
  48. package/src/spec/lookup.js +1 -0
  49. package/src/spec/normalize.js +20 -10
  50. package/src/spec/pick.js +104 -0
  51. package/src/spec/schema.js +26 -3
  52. package/src/spec/sources.js +19 -24
  53. package/src/store.js +6 -1
  54. package/src/ui/app/drafts.js +3 -0
  55. package/src/ui/app/render.js +1 -0
  56. package/src/ui/app/submit.js +1 -1
  57. package/src/ui/manifest.js +2 -1
  58. package/src/ui/pick.css +32 -0
  59. package/src/ui/pick.js +246 -0
  60. package/types/a2ui/board-constants.d.ts +24 -0
  61. package/types/a2ui/from-a2ui.d.ts +16 -0
  62. package/types/a2ui/negotiate.d.ts +17 -0
  63. package/types/a2ui/to-a2ui.d.ts +12 -0
  64. package/types/file-access.d.ts +62 -0
  65. package/types/mcp/boards.d.ts +13 -2
  66. package/types/mcp/schemas.d.ts +5 -2
  67. package/types/mcp/serve.d.ts +5 -2
  68. package/types/mcp/store.d.ts +6 -3
  69. package/types/mcp/token.d.ts +5 -1
  70. package/types/mcp/tools.d.ts +2 -0
  71. package/types/spec/blocks/a2ui.d.ts +1 -1
  72. package/types/spec/blocks/chart.d.ts +1 -1
  73. package/types/spec/blocks/code.d.ts +2 -2
  74. package/types/spec/blocks/diagram.d.ts +3 -3
  75. package/types/spec/blocks/git-conflict.d.ts +1 -1
  76. package/types/spec/blocks/image.d.ts +2 -2
  77. package/types/spec/blocks/markdown.d.ts +1 -1
  78. package/types/spec/blocks/pdf.d.ts +1 -1
  79. package/types/spec/blocks/table.d.ts +1 -1
  80. package/types/spec/blocks/video.d.ts +1 -1
  81. package/types/spec/blocks/widgets.d.ts +4 -4
  82. package/types/spec/constants.d.ts +9 -0
  83. package/types/spec/index.d.ts +1 -0
  84. package/types/spec/lookup.d.ts +2 -1
  85. package/types/spec/normalize.d.ts +7 -1
  86. package/types/spec/pick.d.ts +25 -0
  87. package/types/spec/schema.d.ts +48 -0
  88. package/types/spec/sources.d.ts +5 -4
  89. package/types/store.d.ts +8 -1
@@ -0,0 +1,1004 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/khanglvm/relay/a2ui/catalog/board/v1",
4
+ "catalogId": "https://github.com/khanglvm/relay/a2ui/catalog/board/v1",
5
+ "protocolVersion": "1.0",
6
+ "title": "Relay board catalog",
7
+ "description": "A whole Relay board as one A2UI surface: the heading, content blocks, questions, a comment box and a submit button. Every component also carries `title` and `text` as plain text, so a renderer that does not know a component can draw those instead.",
8
+ "instructions": "The surface is built by Relay from a board spec; an agent never writes it. The data model holds /answers/<questionId>, /notes/<questionId>, /comment, /annotations/<blockId> and /blockEdits/<blockId>. Draw the components you know, show `title` and `text` for the rest, bind each Question `value` and `note` to the data model, and send the data model back with the `relay.submit` action.",
9
+ "components": {
10
+ "Board": {
11
+ "type": "object",
12
+ "description": "The root (id `root`): the board heading, its intro, then the blocks, questions, comment box and submit button in order.",
13
+ "properties": {
14
+ "component": {
15
+ "const": "Board"
16
+ },
17
+ "title": {
18
+ "$ref": "common_types.json#/$defs/DynamicString"
19
+ },
20
+ "text": {
21
+ "$ref": "common_types.json#/$defs/DynamicString"
22
+ },
23
+ "intro": {
24
+ "$ref": "common_types.json#/$defs/DynamicString"
25
+ },
26
+ "children": {
27
+ "$ref": "common_types.json#/$defs/ChildList"
28
+ },
29
+ "responseRequired": {
30
+ "type": "boolean"
31
+ },
32
+ "allowPartial": {
33
+ "type": "boolean"
34
+ }
35
+ },
36
+ "required": [
37
+ "component",
38
+ "title",
39
+ "children"
40
+ ]
41
+ },
42
+ "Question": {
43
+ "type": "object",
44
+ "description": "One question. `questionType` says how to draw it; `value` binds to the answer at /answers/<id> and `note` to /notes/<id>. Blocks that belong to the question are its children; a block with `optionValue` belongs to that option.",
45
+ "properties": {
46
+ "component": {
47
+ "const": "Question"
48
+ },
49
+ "title": {
50
+ "$ref": "common_types.json#/$defs/DynamicString"
51
+ },
52
+ "text": {
53
+ "$ref": "common_types.json#/$defs/DynamicString"
54
+ },
55
+ "ref": {
56
+ "type": "string"
57
+ },
58
+ "height": {
59
+ "type": "integer"
60
+ },
61
+ "optionValue": {
62
+ "type": "string"
63
+ },
64
+ "questionId": {
65
+ "type": "string"
66
+ },
67
+ "questionType": {
68
+ "type": "string",
69
+ "enum": [
70
+ "single",
71
+ "multi",
72
+ "yesno",
73
+ "text",
74
+ "textarea",
75
+ "scale",
76
+ "color",
77
+ "rank",
78
+ "checklist",
79
+ "allocate",
80
+ "pick"
81
+ ]
82
+ },
83
+ "label": {
84
+ "$ref": "common_types.json#/$defs/DynamicString"
85
+ },
86
+ "description": {
87
+ "$ref": "common_types.json#/$defs/DynamicString"
88
+ },
89
+ "required": {
90
+ "type": "boolean"
91
+ },
92
+ "options": {
93
+ "type": "array",
94
+ "items": {
95
+ "type": "object"
96
+ }
97
+ },
98
+ "statuses": {
99
+ "type": "array",
100
+ "items": {
101
+ "type": "object"
102
+ }
103
+ },
104
+ "items": {
105
+ "type": "array",
106
+ "items": {
107
+ "type": "object"
108
+ }
109
+ },
110
+ "min": {
111
+ "type": "integer"
112
+ },
113
+ "max": {
114
+ "type": "integer"
115
+ },
116
+ "itemNote": {
117
+ "type": "boolean"
118
+ },
119
+ "overall": {
120
+ "type": "boolean"
121
+ },
122
+ "other": {
123
+ "type": "boolean"
124
+ },
125
+ "total": {
126
+ "type": "integer"
127
+ },
128
+ "unit": {
129
+ "type": "string"
130
+ },
131
+ "minLabel": {
132
+ "type": "string"
133
+ },
134
+ "maxLabel": {
135
+ "type": "string"
136
+ },
137
+ "presets": {
138
+ "type": "array",
139
+ "items": {
140
+ "type": "string"
141
+ }
142
+ },
143
+ "palette": {
144
+ "type": "array",
145
+ "items": {
146
+ "type": "object"
147
+ }
148
+ },
149
+ "placeholder": {
150
+ "$ref": "common_types.json#/$defs/DynamicString"
151
+ },
152
+ "default": {
153
+ "$ref": "common_types.json#/$defs/DynamicValue"
154
+ },
155
+ "hasNote": {
156
+ "type": "boolean"
157
+ },
158
+ "value": {
159
+ "$ref": "common_types.json#/$defs/DynamicValue"
160
+ },
161
+ "note": {
162
+ "$ref": "common_types.json#/$defs/DynamicValue"
163
+ },
164
+ "children": {
165
+ "$ref": "common_types.json#/$defs/ChildList"
166
+ }
167
+ },
168
+ "required": [
169
+ "component",
170
+ "questionId",
171
+ "questionType",
172
+ "label",
173
+ "value"
174
+ ]
175
+ },
176
+ "Markdown": {
177
+ "type": "object",
178
+ "description": "Markdown text.",
179
+ "properties": {
180
+ "component": {
181
+ "const": "Markdown"
182
+ },
183
+ "title": {
184
+ "$ref": "common_types.json#/$defs/DynamicString"
185
+ },
186
+ "text": {
187
+ "$ref": "common_types.json#/$defs/DynamicString"
188
+ },
189
+ "ref": {
190
+ "type": "string"
191
+ },
192
+ "height": {
193
+ "type": "integer"
194
+ },
195
+ "optionValue": {
196
+ "type": "string"
197
+ },
198
+ "md": {
199
+ "$ref": "common_types.json#/$defs/DynamicString"
200
+ }
201
+ },
202
+ "required": [
203
+ "component",
204
+ "md"
205
+ ]
206
+ },
207
+ "Chart": {
208
+ "type": "object",
209
+ "description": "A chart: a kind with labels and series, or a full Chart.js config.",
210
+ "properties": {
211
+ "component": {
212
+ "const": "Chart"
213
+ },
214
+ "title": {
215
+ "$ref": "common_types.json#/$defs/DynamicString"
216
+ },
217
+ "text": {
218
+ "$ref": "common_types.json#/$defs/DynamicString"
219
+ },
220
+ "ref": {
221
+ "type": "string"
222
+ },
223
+ "height": {
224
+ "type": "integer"
225
+ },
226
+ "optionValue": {
227
+ "type": "string"
228
+ },
229
+ "kind": {
230
+ "type": "string"
231
+ },
232
+ "labels": {
233
+ "type": "array",
234
+ "items": {
235
+ "type": "string"
236
+ }
237
+ },
238
+ "series": {
239
+ "type": "array",
240
+ "items": {
241
+ "type": "object"
242
+ }
243
+ },
244
+ "config": {
245
+ "type": "object"
246
+ }
247
+ },
248
+ "required": [
249
+ "component"
250
+ ]
251
+ },
252
+ "Table": {
253
+ "type": "object",
254
+ "description": "Rows under columns.",
255
+ "properties": {
256
+ "component": {
257
+ "const": "Table"
258
+ },
259
+ "title": {
260
+ "$ref": "common_types.json#/$defs/DynamicString"
261
+ },
262
+ "text": {
263
+ "$ref": "common_types.json#/$defs/DynamicString"
264
+ },
265
+ "ref": {
266
+ "type": "string"
267
+ },
268
+ "height": {
269
+ "type": "integer"
270
+ },
271
+ "optionValue": {
272
+ "type": "string"
273
+ },
274
+ "columns": {
275
+ "type": "array"
276
+ },
277
+ "rows": {
278
+ "$ref": "common_types.json#/$defs/DynamicValue"
279
+ },
280
+ "sortable": {
281
+ "type": "boolean"
282
+ },
283
+ "filterable": {
284
+ "type": "boolean"
285
+ },
286
+ "exportable": {
287
+ "type": "boolean"
288
+ }
289
+ },
290
+ "required": [
291
+ "component",
292
+ "columns",
293
+ "rows"
294
+ ]
295
+ },
296
+ "Code": {
297
+ "type": "object",
298
+ "description": "Source code.",
299
+ "properties": {
300
+ "component": {
301
+ "const": "Code"
302
+ },
303
+ "title": {
304
+ "$ref": "common_types.json#/$defs/DynamicString"
305
+ },
306
+ "text": {
307
+ "$ref": "common_types.json#/$defs/DynamicString"
308
+ },
309
+ "ref": {
310
+ "type": "string"
311
+ },
312
+ "height": {
313
+ "type": "integer"
314
+ },
315
+ "optionValue": {
316
+ "type": "string"
317
+ },
318
+ "code": {
319
+ "$ref": "common_types.json#/$defs/DynamicString"
320
+ },
321
+ "lang": {
322
+ "type": "string"
323
+ },
324
+ "filename": {
325
+ "type": "string"
326
+ }
327
+ },
328
+ "required": [
329
+ "component",
330
+ "code"
331
+ ]
332
+ },
333
+ "Diff": {
334
+ "type": "object",
335
+ "description": "A unified diff.",
336
+ "properties": {
337
+ "component": {
338
+ "const": "Diff"
339
+ },
340
+ "title": {
341
+ "$ref": "common_types.json#/$defs/DynamicString"
342
+ },
343
+ "text": {
344
+ "$ref": "common_types.json#/$defs/DynamicString"
345
+ },
346
+ "ref": {
347
+ "type": "string"
348
+ },
349
+ "height": {
350
+ "type": "integer"
351
+ },
352
+ "optionValue": {
353
+ "type": "string"
354
+ },
355
+ "diff": {
356
+ "$ref": "common_types.json#/$defs/DynamicString"
357
+ },
358
+ "filename": {
359
+ "type": "string"
360
+ },
361
+ "lang": {
362
+ "type": "string"
363
+ },
364
+ "view": {
365
+ "type": "string"
366
+ },
367
+ "review": {
368
+ "type": "boolean"
369
+ },
370
+ "reviewKind": {
371
+ "type": "string"
372
+ },
373
+ "commit": {
374
+ "type": "string"
375
+ }
376
+ },
377
+ "required": [
378
+ "component",
379
+ "diff"
380
+ ]
381
+ },
382
+ "Mermaid": {
383
+ "type": "object",
384
+ "description": "A Mermaid diagram.",
385
+ "properties": {
386
+ "component": {
387
+ "const": "Mermaid"
388
+ },
389
+ "title": {
390
+ "$ref": "common_types.json#/$defs/DynamicString"
391
+ },
392
+ "text": {
393
+ "$ref": "common_types.json#/$defs/DynamicString"
394
+ },
395
+ "ref": {
396
+ "type": "string"
397
+ },
398
+ "height": {
399
+ "type": "integer"
400
+ },
401
+ "optionValue": {
402
+ "type": "string"
403
+ },
404
+ "code": {
405
+ "$ref": "common_types.json#/$defs/DynamicString"
406
+ },
407
+ "editable": {
408
+ "type": "boolean"
409
+ }
410
+ },
411
+ "required": [
412
+ "component",
413
+ "code"
414
+ ]
415
+ },
416
+ "Graphviz": {
417
+ "type": "object",
418
+ "description": "A Graphviz (DOT) diagram.",
419
+ "properties": {
420
+ "component": {
421
+ "const": "Graphviz"
422
+ },
423
+ "title": {
424
+ "$ref": "common_types.json#/$defs/DynamicString"
425
+ },
426
+ "text": {
427
+ "$ref": "common_types.json#/$defs/DynamicString"
428
+ },
429
+ "ref": {
430
+ "type": "string"
431
+ },
432
+ "height": {
433
+ "type": "integer"
434
+ },
435
+ "optionValue": {
436
+ "type": "string"
437
+ },
438
+ "dot": {
439
+ "$ref": "common_types.json#/$defs/DynamicString"
440
+ }
441
+ },
442
+ "required": [
443
+ "component",
444
+ "dot"
445
+ ]
446
+ },
447
+ "Plantuml": {
448
+ "type": "object",
449
+ "description": "A PlantUML diagram.",
450
+ "properties": {
451
+ "component": {
452
+ "const": "Plantuml"
453
+ },
454
+ "title": {
455
+ "$ref": "common_types.json#/$defs/DynamicString"
456
+ },
457
+ "text": {
458
+ "$ref": "common_types.json#/$defs/DynamicString"
459
+ },
460
+ "ref": {
461
+ "type": "string"
462
+ },
463
+ "height": {
464
+ "type": "integer"
465
+ },
466
+ "optionValue": {
467
+ "type": "string"
468
+ },
469
+ "code": {
470
+ "$ref": "common_types.json#/$defs/DynamicString"
471
+ },
472
+ "server": {
473
+ "type": "string"
474
+ }
475
+ },
476
+ "required": [
477
+ "component",
478
+ "code"
479
+ ]
480
+ },
481
+ "Image": {
482
+ "type": "object",
483
+ "description": "A picture: an http(s) or data URL.",
484
+ "properties": {
485
+ "component": {
486
+ "const": "Image"
487
+ },
488
+ "title": {
489
+ "$ref": "common_types.json#/$defs/DynamicString"
490
+ },
491
+ "text": {
492
+ "$ref": "common_types.json#/$defs/DynamicString"
493
+ },
494
+ "ref": {
495
+ "type": "string"
496
+ },
497
+ "height": {
498
+ "type": "integer"
499
+ },
500
+ "optionValue": {
501
+ "type": "string"
502
+ },
503
+ "src": {
504
+ "type": "string"
505
+ },
506
+ "alt": {
507
+ "$ref": "common_types.json#/$defs/DynamicString"
508
+ },
509
+ "pins": {
510
+ "type": "boolean"
511
+ }
512
+ },
513
+ "required": [
514
+ "component",
515
+ "src"
516
+ ]
517
+ },
518
+ "Compare": {
519
+ "type": "object",
520
+ "description": "Two pictures side by side with a slider.",
521
+ "properties": {
522
+ "component": {
523
+ "const": "Compare"
524
+ },
525
+ "title": {
526
+ "$ref": "common_types.json#/$defs/DynamicString"
527
+ },
528
+ "text": {
529
+ "$ref": "common_types.json#/$defs/DynamicString"
530
+ },
531
+ "ref": {
532
+ "type": "string"
533
+ },
534
+ "height": {
535
+ "type": "integer"
536
+ },
537
+ "optionValue": {
538
+ "type": "string"
539
+ },
540
+ "before": {
541
+ "type": "string"
542
+ },
543
+ "after": {
544
+ "type": "string"
545
+ },
546
+ "beforeLabel": {
547
+ "$ref": "common_types.json#/$defs/DynamicString"
548
+ },
549
+ "afterLabel": {
550
+ "$ref": "common_types.json#/$defs/DynamicString"
551
+ }
552
+ },
553
+ "required": [
554
+ "component",
555
+ "before",
556
+ "after"
557
+ ]
558
+ },
559
+ "Html": {
560
+ "type": "object",
561
+ "description": "Custom markup. A host draws it in a sandboxed frame or shows the text fallback.",
562
+ "properties": {
563
+ "component": {
564
+ "const": "Html"
565
+ },
566
+ "title": {
567
+ "$ref": "common_types.json#/$defs/DynamicString"
568
+ },
569
+ "text": {
570
+ "$ref": "common_types.json#/$defs/DynamicString"
571
+ },
572
+ "ref": {
573
+ "type": "string"
574
+ },
575
+ "height": {
576
+ "type": "integer"
577
+ },
578
+ "optionValue": {
579
+ "type": "string"
580
+ },
581
+ "html": {
582
+ "$ref": "common_types.json#/$defs/DynamicString"
583
+ }
584
+ },
585
+ "required": [
586
+ "component",
587
+ "html"
588
+ ]
589
+ },
590
+ "Palette": {
591
+ "type": "object",
592
+ "description": "Colour swatch palettes.",
593
+ "properties": {
594
+ "component": {
595
+ "const": "Palette"
596
+ },
597
+ "title": {
598
+ "$ref": "common_types.json#/$defs/DynamicString"
599
+ },
600
+ "text": {
601
+ "$ref": "common_types.json#/$defs/DynamicString"
602
+ },
603
+ "ref": {
604
+ "type": "string"
605
+ },
606
+ "height": {
607
+ "type": "integer"
608
+ },
609
+ "optionValue": {
610
+ "type": "string"
611
+ },
612
+ "palettes": {
613
+ "type": "array",
614
+ "items": {
615
+ "type": "object"
616
+ }
617
+ }
618
+ },
619
+ "required": [
620
+ "component",
621
+ "palettes"
622
+ ]
623
+ },
624
+ "Kpi": {
625
+ "type": "object",
626
+ "description": "Stat cards.",
627
+ "properties": {
628
+ "component": {
629
+ "const": "Kpi"
630
+ },
631
+ "title": {
632
+ "$ref": "common_types.json#/$defs/DynamicString"
633
+ },
634
+ "text": {
635
+ "$ref": "common_types.json#/$defs/DynamicString"
636
+ },
637
+ "ref": {
638
+ "type": "string"
639
+ },
640
+ "height": {
641
+ "type": "integer"
642
+ },
643
+ "optionValue": {
644
+ "type": "string"
645
+ },
646
+ "items": {
647
+ "type": "array",
648
+ "items": {
649
+ "type": "object"
650
+ }
651
+ }
652
+ },
653
+ "required": [
654
+ "component",
655
+ "items"
656
+ ]
657
+ },
658
+ "Typography": {
659
+ "type": "object",
660
+ "description": "Type specimens.",
661
+ "properties": {
662
+ "component": {
663
+ "const": "Typography"
664
+ },
665
+ "title": {
666
+ "$ref": "common_types.json#/$defs/DynamicString"
667
+ },
668
+ "text": {
669
+ "$ref": "common_types.json#/$defs/DynamicString"
670
+ },
671
+ "ref": {
672
+ "type": "string"
673
+ },
674
+ "height": {
675
+ "type": "integer"
676
+ },
677
+ "optionValue": {
678
+ "type": "string"
679
+ },
680
+ "specimens": {
681
+ "type": "array",
682
+ "items": {
683
+ "type": "object"
684
+ }
685
+ }
686
+ },
687
+ "required": [
688
+ "component",
689
+ "specimens"
690
+ ]
691
+ },
692
+ "Video": {
693
+ "type": "object",
694
+ "description": "A YouTube or Vimeo video.",
695
+ "properties": {
696
+ "component": {
697
+ "const": "Video"
698
+ },
699
+ "title": {
700
+ "$ref": "common_types.json#/$defs/DynamicString"
701
+ },
702
+ "text": {
703
+ "$ref": "common_types.json#/$defs/DynamicString"
704
+ },
705
+ "ref": {
706
+ "type": "string"
707
+ },
708
+ "height": {
709
+ "type": "integer"
710
+ },
711
+ "optionValue": {
712
+ "type": "string"
713
+ },
714
+ "provider": {
715
+ "type": "string"
716
+ },
717
+ "videoId": {
718
+ "type": "string"
719
+ },
720
+ "start": {
721
+ "type": "integer"
722
+ },
723
+ "src": {
724
+ "type": "string"
725
+ }
726
+ },
727
+ "required": [
728
+ "component"
729
+ ]
730
+ },
731
+ "Pdf": {
732
+ "type": "object",
733
+ "description": "A PDF at a URL.",
734
+ "properties": {
735
+ "component": {
736
+ "const": "Pdf"
737
+ },
738
+ "title": {
739
+ "$ref": "common_types.json#/$defs/DynamicString"
740
+ },
741
+ "text": {
742
+ "$ref": "common_types.json#/$defs/DynamicString"
743
+ },
744
+ "ref": {
745
+ "type": "string"
746
+ },
747
+ "height": {
748
+ "type": "integer"
749
+ },
750
+ "optionValue": {
751
+ "type": "string"
752
+ },
753
+ "src": {
754
+ "type": "string"
755
+ },
756
+ "mime": {
757
+ "type": "string"
758
+ }
759
+ },
760
+ "required": [
761
+ "component",
762
+ "src"
763
+ ]
764
+ },
765
+ "GitConflict": {
766
+ "type": "object",
767
+ "description": "A file with git conflict markers.",
768
+ "properties": {
769
+ "component": {
770
+ "const": "GitConflict"
771
+ },
772
+ "title": {
773
+ "$ref": "common_types.json#/$defs/DynamicString"
774
+ },
775
+ "text": {
776
+ "$ref": "common_types.json#/$defs/DynamicString"
777
+ },
778
+ "ref": {
779
+ "type": "string"
780
+ },
781
+ "height": {
782
+ "type": "integer"
783
+ },
784
+ "optionValue": {
785
+ "type": "string"
786
+ },
787
+ "filename": {
788
+ "type": "string"
789
+ },
790
+ "conflicts": {
791
+ "type": "array"
792
+ },
793
+ "parts": {
794
+ "type": "array"
795
+ }
796
+ },
797
+ "required": [
798
+ "component"
799
+ ]
800
+ },
801
+ "Widget": {
802
+ "type": "object",
803
+ "description": "A small live widget in Relay's widget catalog (https://github.com/khanglvm/relay/a2ui/catalog/v1): flat `widgetComponents` and their `widgetData`.",
804
+ "properties": {
805
+ "component": {
806
+ "const": "Widget"
807
+ },
808
+ "title": {
809
+ "$ref": "common_types.json#/$defs/DynamicString"
810
+ },
811
+ "text": {
812
+ "$ref": "common_types.json#/$defs/DynamicString"
813
+ },
814
+ "ref": {
815
+ "type": "string"
816
+ },
817
+ "height": {
818
+ "type": "integer"
819
+ },
820
+ "optionValue": {
821
+ "type": "string"
822
+ },
823
+ "widgetComponents": {
824
+ "type": "array",
825
+ "items": {
826
+ "type": "object"
827
+ }
828
+ },
829
+ "widgetData": {
830
+ "type": "object"
831
+ }
832
+ },
833
+ "required": [
834
+ "component",
835
+ "widgetComponents"
836
+ ]
837
+ },
838
+ "Comment": {
839
+ "type": "object",
840
+ "description": "The \"anything else\" box, bound to /comment.",
841
+ "properties": {
842
+ "component": {
843
+ "const": "Comment"
844
+ },
845
+ "title": {
846
+ "$ref": "common_types.json#/$defs/DynamicString"
847
+ },
848
+ "text": {
849
+ "$ref": "common_types.json#/$defs/DynamicString"
850
+ },
851
+ "label": {
852
+ "$ref": "common_types.json#/$defs/DynamicString"
853
+ },
854
+ "value": {
855
+ "$ref": "common_types.json#/$defs/DynamicValue"
856
+ }
857
+ },
858
+ "required": [
859
+ "component",
860
+ "label",
861
+ "value"
862
+ ]
863
+ },
864
+ "Submit": {
865
+ "type": "object",
866
+ "description": "The submit button. Its action `relay.submit` sends the answers; the host passes the data model along.",
867
+ "properties": {
868
+ "component": {
869
+ "const": "Submit"
870
+ },
871
+ "title": {
872
+ "$ref": "common_types.json#/$defs/DynamicString"
873
+ },
874
+ "text": {
875
+ "$ref": "common_types.json#/$defs/DynamicString"
876
+ },
877
+ "label": {
878
+ "$ref": "common_types.json#/$defs/DynamicString"
879
+ },
880
+ "action": {
881
+ "$ref": "common_types.json#/$defs/Action"
882
+ }
883
+ },
884
+ "required": [
885
+ "component",
886
+ "label",
887
+ "action"
888
+ ]
889
+ }
890
+ },
891
+ "functions": {
892
+ "openUrl": {
893
+ "type": "object",
894
+ "description": "Opens an https link in a new tab.",
895
+ "returnType": "void",
896
+ "allowedCallers": "rendererOnly",
897
+ "requiresUserActivation": true,
898
+ "properties": {
899
+ "@call": {
900
+ "const": "openUrl"
901
+ },
902
+ "args": {
903
+ "type": "object",
904
+ "properties": {
905
+ "url": {
906
+ "type": "string",
907
+ "pattern": "^https://"
908
+ }
909
+ },
910
+ "required": [
911
+ "url"
912
+ ],
913
+ "additionalProperties": false
914
+ }
915
+ },
916
+ "required": [
917
+ "@call",
918
+ "args"
919
+ ]
920
+ }
921
+ },
922
+ "$defs": {
923
+ "anyComponent": {
924
+ "oneOf": [
925
+ {
926
+ "$ref": "#/components/Board"
927
+ },
928
+ {
929
+ "$ref": "#/components/Question"
930
+ },
931
+ {
932
+ "$ref": "#/components/Markdown"
933
+ },
934
+ {
935
+ "$ref": "#/components/Chart"
936
+ },
937
+ {
938
+ "$ref": "#/components/Table"
939
+ },
940
+ {
941
+ "$ref": "#/components/Code"
942
+ },
943
+ {
944
+ "$ref": "#/components/Diff"
945
+ },
946
+ {
947
+ "$ref": "#/components/Mermaid"
948
+ },
949
+ {
950
+ "$ref": "#/components/Graphviz"
951
+ },
952
+ {
953
+ "$ref": "#/components/Plantuml"
954
+ },
955
+ {
956
+ "$ref": "#/components/Image"
957
+ },
958
+ {
959
+ "$ref": "#/components/Compare"
960
+ },
961
+ {
962
+ "$ref": "#/components/Html"
963
+ },
964
+ {
965
+ "$ref": "#/components/Palette"
966
+ },
967
+ {
968
+ "$ref": "#/components/Kpi"
969
+ },
970
+ {
971
+ "$ref": "#/components/Typography"
972
+ },
973
+ {
974
+ "$ref": "#/components/Video"
975
+ },
976
+ {
977
+ "$ref": "#/components/Pdf"
978
+ },
979
+ {
980
+ "$ref": "#/components/GitConflict"
981
+ },
982
+ {
983
+ "$ref": "#/components/Widget"
984
+ },
985
+ {
986
+ "$ref": "#/components/Comment"
987
+ },
988
+ {
989
+ "$ref": "#/components/Submit"
990
+ }
991
+ ],
992
+ "discriminator": {
993
+ "propertyName": "component"
994
+ }
995
+ },
996
+ "anyFunction": {
997
+ "oneOf": [
998
+ {
999
+ "$ref": "#/functions/openUrl"
1000
+ }
1001
+ ]
1002
+ }
1003
+ }
1004
+ }