@khanglvm/relay 0.18.0 → 0.19.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.
- package/package.json +39 -4
- package/schema/spec.v1.json +1368 -0
- package/src/a2ui/compile.js +2 -0
- package/src/cli.js +1 -0
- package/src/index.js +104 -0
- package/src/link.js +1 -0
- package/src/mcp.js +3 -3
- package/src/server.js +3 -4
- package/src/spec.js +2 -0
- package/types/a2ui/compile.d.ts +40 -0
- package/types/index.d.ts +181 -0
- package/types/mcp.d.ts +31 -0
- package/types/spec.d.ts +1191 -0
- package/types/store.d.ts +29 -0
- package/types/util.d.ts +6 -0
|
@@ -0,0 +1,1368 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "relay board spec",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"description": "A relay board. Renders an optional intro, board-level blocks, then questions (each with optional per-question blocks), then a submit button. The result JSON contains \"answers\", \"comment\", per-question \"notes\", \"annotations\" (element-level comments the user attached to any block — see the annotation shape below), and \"blockEdits\" (a map blockId→edited source for any editable mermaid block the user changed, null when none).",
|
|
6
|
+
"properties": {
|
|
7
|
+
"version": {
|
|
8
|
+
"const": 1,
|
|
9
|
+
"description": "Spec version. Optional: a spec without it is read as version 1."
|
|
10
|
+
},
|
|
11
|
+
"$schema": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "Optional URL of this schema, for editor completion. Relay ignores it."
|
|
14
|
+
},
|
|
15
|
+
"title": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Board title (default \"Relay\")"
|
|
18
|
+
},
|
|
19
|
+
"intro": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "Intro text shown under the title. Newlines preserved."
|
|
22
|
+
},
|
|
23
|
+
"blocks": {
|
|
24
|
+
"type": "array",
|
|
25
|
+
"description": "Rich content blocks rendered in order. Board-level blocks show above the questions; per-question blocks show above the control. Each is annotatable (element-level comments returned in result.annotations).",
|
|
26
|
+
"items": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"required": [
|
|
29
|
+
"type"
|
|
30
|
+
],
|
|
31
|
+
"properties": {
|
|
32
|
+
"type": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"enum": [
|
|
35
|
+
"markdown",
|
|
36
|
+
"mermaid",
|
|
37
|
+
"graphviz",
|
|
38
|
+
"plantuml",
|
|
39
|
+
"chart",
|
|
40
|
+
"table",
|
|
41
|
+
"code",
|
|
42
|
+
"diff",
|
|
43
|
+
"git-conflict",
|
|
44
|
+
"video",
|
|
45
|
+
"pdf",
|
|
46
|
+
"html",
|
|
47
|
+
"image",
|
|
48
|
+
"palette",
|
|
49
|
+
"kpi",
|
|
50
|
+
"typography",
|
|
51
|
+
"compare",
|
|
52
|
+
"a2ui"
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
"md": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"description": "markdown: built-in mini renderer (no external library) — headings, lists, code, quotes, links, images, and GFM pipe tables. Text selections are commentable. For real tabular data prefer a \"table\" block (sortable + per-cell comments)."
|
|
58
|
+
},
|
|
59
|
+
"mdFile": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"description": "markdown: path to a local .md file to load + render instead of inline \"md\" (e.g. view a README/plan/report). Resolved against the CWD. Quick view of one or more files: `rly view a.md b.md`."
|
|
62
|
+
},
|
|
63
|
+
"code": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"description": "mermaid: diagram source (e.g. \"graph TD; A-->B\"); plantuml: the @startuml…@enduml source; code: the source to display (syntax-highlighted with line numbers)."
|
|
66
|
+
},
|
|
67
|
+
"codeFile": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"description": "code: path to a local source file to load + display instead of inline \"code\". Resolved against the CWD; lang defaults from the file extension."
|
|
70
|
+
},
|
|
71
|
+
"filename": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"description": "code/diff/git-conflict: optional file name/path shown as a header label above the block."
|
|
74
|
+
},
|
|
75
|
+
"editable": {
|
|
76
|
+
"type": "boolean",
|
|
77
|
+
"description": "mermaid: when true, render an \"Edit diagram\" toggle so the user can edit the diagram source live. The edited source is returned in result.blockEdits[<blockId>]."
|
|
78
|
+
},
|
|
79
|
+
"dot": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"description": "graphviz: DOT source (e.g. \"digraph { a -> b }\"). Rendered offline via vendored Viz.js; nodes and edges are individually commentable."
|
|
82
|
+
},
|
|
83
|
+
"server": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"description": "plantuml: PlantUML server base URL (http(s)). Defaults to https://www.plantuml.com/plantuml. Diagrams render via this server (needs network)."
|
|
86
|
+
},
|
|
87
|
+
"lang": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"description": "code/diff/git-conflict block: language hint for syntax highlighting (js, ts, py, go, rust, java, c, cpp, csharp, ruby, php, swift, kotlin, sql, yaml, json, sh, css, html, …)."
|
|
90
|
+
},
|
|
91
|
+
"diff": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"description": "diff: a unified diff (git diff / diff -u output) — rendered as a colored, line-numbered comparison with +added / −removed / context rows and file/hunk headers. No git needed; just write/paste the diff text."
|
|
94
|
+
},
|
|
95
|
+
"diffFile": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"description": "diff: path to a local file containing a unified diff (alternative to \"diff\"). Resolved against the CWD."
|
|
98
|
+
},
|
|
99
|
+
"view": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"enum": [
|
|
102
|
+
"unified",
|
|
103
|
+
"split"
|
|
104
|
+
],
|
|
105
|
+
"description": "diff: initial layout — \"unified\" (default, one column) or \"split\" (side-by-side old vs new). The viewer also has a live toggle either way."
|
|
106
|
+
},
|
|
107
|
+
"review": {
|
|
108
|
+
"type": "boolean",
|
|
109
|
+
"description": "diff: when true, render per-hunk Apply / Skip / Hold controls and return choices in result.blockEdits[blockId] as {type:\"diff-review\", hunks:{...}}. Used by `rly git cherry-pick --code`."
|
|
110
|
+
},
|
|
111
|
+
"reviewKind": {
|
|
112
|
+
"type": "string",
|
|
113
|
+
"description": "diff review: optional label for the review workflow, such as \"cherry-pick\" or \"pick\"."
|
|
114
|
+
},
|
|
115
|
+
"commit": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"description": "diff review: optional commit SHA associated with this diff."
|
|
118
|
+
},
|
|
119
|
+
"express": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"description": "a2ui: a live widget in A2UI Express, e.g. `$/jobs = [{title:\"Build\",tone:\"ok\"}]` then `root = Card(\"CI\", [List($/jobs), Button(\"Retry\", action=Event(\"retry\"))])`. Compiled by the A2UI SDK against Relay's catalog (run `rly a2ui` for the grammar and every component). Button events, input values come back in result.blockEdits[blockId] as {type:\"a2ui\", data, events}."
|
|
122
|
+
},
|
|
123
|
+
"components": {
|
|
124
|
+
"type": "array",
|
|
125
|
+
"description": "a2ui: the same widget as flat A2UI v1.0 JSON components (root id \"root\", a Card) instead of \"express\".",
|
|
126
|
+
"items": {
|
|
127
|
+
"type": "object"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"dataModel": {
|
|
131
|
+
"type": "object",
|
|
132
|
+
"description": "a2ui: the data model for \"components\" (use `$/path = value` lines with \"express\" instead)."
|
|
133
|
+
},
|
|
134
|
+
"content": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"description": "git-conflict: inline file content containing conflict markers (<<<<<<< / ======= / >>>>>>>). The board auto-detects each hunk and returns resolutions in result.blockEdits[blockId]."
|
|
137
|
+
},
|
|
138
|
+
"text": {
|
|
139
|
+
"type": "string",
|
|
140
|
+
"description": "git-conflict: alias for inline \"content\"."
|
|
141
|
+
},
|
|
142
|
+
"file": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"description": "git-conflict: local conflicted file path to load, parse, and resolve. Resolved against the CWD."
|
|
145
|
+
},
|
|
146
|
+
"path": {
|
|
147
|
+
"type": "string",
|
|
148
|
+
"description": "git-conflict: alias for local conflicted file path."
|
|
149
|
+
},
|
|
150
|
+
"config": {
|
|
151
|
+
"type": "object",
|
|
152
|
+
"description": "chart: a full Chart.js config object."
|
|
153
|
+
},
|
|
154
|
+
"kind": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"enum": [
|
|
157
|
+
"bar",
|
|
158
|
+
"line",
|
|
159
|
+
"pie",
|
|
160
|
+
"doughnut",
|
|
161
|
+
"radar",
|
|
162
|
+
"scatter"
|
|
163
|
+
],
|
|
164
|
+
"description": "chart shorthand: chart kind (alternative to \"config\")."
|
|
165
|
+
},
|
|
166
|
+
"labels": {
|
|
167
|
+
"type": "array",
|
|
168
|
+
"description": "chart shorthand: x-axis / category labels."
|
|
169
|
+
},
|
|
170
|
+
"series": {
|
|
171
|
+
"type": "array",
|
|
172
|
+
"description": "chart shorthand: [{label, data:[...], color?}]. Chart data points are individually commentable.",
|
|
173
|
+
"items": {
|
|
174
|
+
"type": "object",
|
|
175
|
+
"properties": {
|
|
176
|
+
"label": {
|
|
177
|
+
"type": "string"
|
|
178
|
+
},
|
|
179
|
+
"data": {
|
|
180
|
+
"type": "array"
|
|
181
|
+
},
|
|
182
|
+
"color": {
|
|
183
|
+
"type": "string"
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
"title": {
|
|
189
|
+
"type": "string",
|
|
190
|
+
"description": "chart shorthand: chart title. video: title/caption shown under the player."
|
|
191
|
+
},
|
|
192
|
+
"columns": {
|
|
193
|
+
"type": "array",
|
|
194
|
+
"description": "table: strings, or {key, label, align?}. Cells are commentable.",
|
|
195
|
+
"items": {
|
|
196
|
+
"anyOf": [
|
|
197
|
+
{
|
|
198
|
+
"type": "string"
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"type": "object"
|
|
202
|
+
}
|
|
203
|
+
]
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"rows": {
|
|
207
|
+
"type": "array",
|
|
208
|
+
"description": "table: array of arrays (positional) or array of objects (keyed by column key)."
|
|
209
|
+
},
|
|
210
|
+
"rowsFile": {
|
|
211
|
+
"type": "string",
|
|
212
|
+
"description": "table: load rows from a local .csv/.tsv/.json file instead of inline \"rows\". CSV/TSV first row is the header (becomes \"columns\" if omitted); JSON is an array of objects. Resolved against the CWD. Quick view: `rly view data.csv`."
|
|
213
|
+
},
|
|
214
|
+
"sortable": {
|
|
215
|
+
"type": "boolean",
|
|
216
|
+
"description": "table: enable click-to-sort headers."
|
|
217
|
+
},
|
|
218
|
+
"filterable": {
|
|
219
|
+
"type": "boolean",
|
|
220
|
+
"description": "table: show a filter box that live-filters rows by substring across all cells. Good for large tables."
|
|
221
|
+
},
|
|
222
|
+
"exportable": {
|
|
223
|
+
"type": "boolean",
|
|
224
|
+
"description": "table: show a \"CSV\" button that downloads the (filtered) rows as a CSV file."
|
|
225
|
+
},
|
|
226
|
+
"html": {
|
|
227
|
+
"type": "string",
|
|
228
|
+
"description": "html: custom markup rendered in a sandboxed iframe."
|
|
229
|
+
},
|
|
230
|
+
"htmlFile": {
|
|
231
|
+
"type": "string",
|
|
232
|
+
"description": "html: path to an HTML file (alternative to \"html\")."
|
|
233
|
+
},
|
|
234
|
+
"src": {
|
|
235
|
+
"type": "string",
|
|
236
|
+
"description": "image: http(s)/data URL, or a local file path (png/jpg/gif/webp/svg/avif/bmp — embedded at spec time, served offline). video: a YouTube/Vimeo URL (embeds an iframe player), an http(s) media URL, or a local video file (mp4/webm/ogv/mov/mkv/m4v — streamed from the server, never embedded)."
|
|
237
|
+
},
|
|
238
|
+
"alt": {
|
|
239
|
+
"type": "string",
|
|
240
|
+
"description": "image: alt text / annotation label. video: accessible title for the player."
|
|
241
|
+
},
|
|
242
|
+
"palettes": {
|
|
243
|
+
"type": "array",
|
|
244
|
+
"description": "palette: one or more color palettes to display as swatch cards. Each swatch reveals its hex on hover and copies it on click; mark one {featured:true} to show it as a larger spotlight. Each item: {name?, sub? (or mood?), tag? (or badge?), tagTone? (warm|cool|neutral|nature|bold|digital), featured?, colors:[…]}.",
|
|
245
|
+
"items": {
|
|
246
|
+
"type": "object",
|
|
247
|
+
"properties": {
|
|
248
|
+
"name": {
|
|
249
|
+
"type": "string"
|
|
250
|
+
},
|
|
251
|
+
"sub": {
|
|
252
|
+
"type": "string"
|
|
253
|
+
},
|
|
254
|
+
"mood": {
|
|
255
|
+
"type": "string"
|
|
256
|
+
},
|
|
257
|
+
"tag": {
|
|
258
|
+
"type": "string"
|
|
259
|
+
},
|
|
260
|
+
"badge": {
|
|
261
|
+
"type": "string"
|
|
262
|
+
},
|
|
263
|
+
"tagTone": {
|
|
264
|
+
"type": "string",
|
|
265
|
+
"enum": [
|
|
266
|
+
"warm",
|
|
267
|
+
"cool",
|
|
268
|
+
"neutral",
|
|
269
|
+
"nature",
|
|
270
|
+
"bold",
|
|
271
|
+
"digital"
|
|
272
|
+
]
|
|
273
|
+
},
|
|
274
|
+
"featured": {
|
|
275
|
+
"type": "boolean"
|
|
276
|
+
},
|
|
277
|
+
"colors": {
|
|
278
|
+
"type": "array",
|
|
279
|
+
"items": {
|
|
280
|
+
"type": "string"
|
|
281
|
+
},
|
|
282
|
+
"description": "CSS colors — #rrggbb, rgb()/hsl(), or named."
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
"required": [
|
|
286
|
+
"colors"
|
|
287
|
+
]
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
"colors": {
|
|
291
|
+
"type": "array",
|
|
292
|
+
"items": {
|
|
293
|
+
"type": "string"
|
|
294
|
+
},
|
|
295
|
+
"description": "palette shorthand: colors for a single palette (use \"palettes\" for several named ones). Pairs with block-level \"name\"."
|
|
296
|
+
},
|
|
297
|
+
"name": {
|
|
298
|
+
"type": "string",
|
|
299
|
+
"description": "palette shorthand: name for the single \"colors\" palette."
|
|
300
|
+
},
|
|
301
|
+
"items": {
|
|
302
|
+
"type": "array",
|
|
303
|
+
"description": "kpi: stat cards. Each {label, value, delta?, dir? (up|down|flat — tints the delta), sub?}. Big-number metrics at a glance (\"Revenue $1.2M ↑12%\") with no chart.",
|
|
304
|
+
"items": {
|
|
305
|
+
"type": "object",
|
|
306
|
+
"properties": {
|
|
307
|
+
"label": {
|
|
308
|
+
"type": "string"
|
|
309
|
+
},
|
|
310
|
+
"value": {
|
|
311
|
+
"type": "string"
|
|
312
|
+
},
|
|
313
|
+
"delta": {
|
|
314
|
+
"type": "string"
|
|
315
|
+
},
|
|
316
|
+
"dir": {
|
|
317
|
+
"type": "string",
|
|
318
|
+
"enum": [
|
|
319
|
+
"up",
|
|
320
|
+
"down",
|
|
321
|
+
"flat"
|
|
322
|
+
]
|
|
323
|
+
},
|
|
324
|
+
"sub": {
|
|
325
|
+
"type": "string"
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
"required": [
|
|
329
|
+
"value"
|
|
330
|
+
]
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
"specimens": {
|
|
334
|
+
"type": "array",
|
|
335
|
+
"description": "typography: type specimens rendered at the given style. Each {label?, size? (e.g. \"32px\"/\"2rem\"), weight? (e.g. \"600\"), font?, lineHeight?, letterSpacing?, text?}. Block-level \"font\" sets a default family.",
|
|
336
|
+
"items": {
|
|
337
|
+
"type": "object",
|
|
338
|
+
"properties": {
|
|
339
|
+
"label": {
|
|
340
|
+
"type": "string"
|
|
341
|
+
},
|
|
342
|
+
"size": {
|
|
343
|
+
"type": "string"
|
|
344
|
+
},
|
|
345
|
+
"weight": {
|
|
346
|
+
"type": "string"
|
|
347
|
+
},
|
|
348
|
+
"font": {
|
|
349
|
+
"type": "string"
|
|
350
|
+
},
|
|
351
|
+
"lineHeight": {
|
|
352
|
+
"type": "string"
|
|
353
|
+
},
|
|
354
|
+
"letterSpacing": {
|
|
355
|
+
"type": "string"
|
|
356
|
+
},
|
|
357
|
+
"text": {
|
|
358
|
+
"type": "string"
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
"ref": {
|
|
364
|
+
"type": "string",
|
|
365
|
+
"description": "Any block: a stable name (e.g. \"velocity\") that a markdown reference link [see chart](#ref:velocity) can open in a full-screen modal — so a question can point back to a visual shown earlier instead of making the user scroll up."
|
|
366
|
+
},
|
|
367
|
+
"pins": {
|
|
368
|
+
"type": "boolean",
|
|
369
|
+
"description": "image: enable coordinate pin-comments — the user clicks any point on the image to drop a comment anchored to that spot (Figma-style), returned as a {kind:\"image-point\", x, y} annotation."
|
|
370
|
+
},
|
|
371
|
+
"before": {
|
|
372
|
+
"description": "compare: the \"before\" image — an http(s)/data URL, a local file path, or {src, label}."
|
|
373
|
+
},
|
|
374
|
+
"after": {
|
|
375
|
+
"description": "compare: the \"after\" image — an http(s)/data URL, a local file path, or {src, label}."
|
|
376
|
+
},
|
|
377
|
+
"beforeLabel": {
|
|
378
|
+
"type": "string",
|
|
379
|
+
"description": "compare: caption for the before side (default \"Before\")."
|
|
380
|
+
},
|
|
381
|
+
"afterLabel": {
|
|
382
|
+
"type": "string",
|
|
383
|
+
"description": "compare: caption for the after side (default \"After\")."
|
|
384
|
+
},
|
|
385
|
+
"height": {
|
|
386
|
+
"type": "integer",
|
|
387
|
+
"minimum": 100,
|
|
388
|
+
"maximum": 2400,
|
|
389
|
+
"description": "Block height in px. Defaults: chart 320, html 360; markdown/table/code flow naturally; mermaid/graphviz/plantuml natural (max 800, scrolls; set a larger height to override); image/compare natural."
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
"html": {
|
|
395
|
+
"type": "string",
|
|
396
|
+
"description": "Legacy: board-level custom HTML. Normalized into a single html block PREPENDED to \"blocks\"."
|
|
397
|
+
},
|
|
398
|
+
"htmlFile": {
|
|
399
|
+
"type": "string",
|
|
400
|
+
"description": "Legacy: path to an HTML file (alternative to \"html\"). Resolved against the CWD. Normalized into a prepended html block."
|
|
401
|
+
},
|
|
402
|
+
"htmlHeight": {
|
|
403
|
+
"type": "integer",
|
|
404
|
+
"minimum": 100,
|
|
405
|
+
"maximum": 2400,
|
|
406
|
+
"default": 400,
|
|
407
|
+
"description": "Legacy: iframe height for the html/htmlFile block."
|
|
408
|
+
},
|
|
409
|
+
"allowPartial": {
|
|
410
|
+
"type": "boolean",
|
|
411
|
+
"default": true,
|
|
412
|
+
"description": "When true, users may submit with unanswered questions (returned in \"skipped\")."
|
|
413
|
+
},
|
|
414
|
+
"note": {
|
|
415
|
+
"type": "boolean",
|
|
416
|
+
"default": true,
|
|
417
|
+
"description": "Show an optional free-text note box (\"Anything else?\") returned as \"comment\"."
|
|
418
|
+
},
|
|
419
|
+
"autoClose": {
|
|
420
|
+
"type": "boolean",
|
|
421
|
+
"default": true,
|
|
422
|
+
"description": "Try to close the browser tab automatically after submit."
|
|
423
|
+
},
|
|
424
|
+
"responseRequired": {
|
|
425
|
+
"type": "boolean",
|
|
426
|
+
"default": true,
|
|
427
|
+
"description": "Set false for a display-only board: no questions, note box, comments, or Submit/Acknowledge action are shown, and the presenting agent should continue immediately."
|
|
428
|
+
},
|
|
429
|
+
"submitLabel": {
|
|
430
|
+
"type": "string",
|
|
431
|
+
"description": "Submit button label. Defaults: \"Submit\", or \"Acknowledge\" when there are no questions."
|
|
432
|
+
},
|
|
433
|
+
"questions": {
|
|
434
|
+
"type": "array",
|
|
435
|
+
"items": {
|
|
436
|
+
"type": "object",
|
|
437
|
+
"required": [
|
|
438
|
+
"label"
|
|
439
|
+
],
|
|
440
|
+
"properties": {
|
|
441
|
+
"id": {
|
|
442
|
+
"type": "string",
|
|
443
|
+
"description": "Answer key in the result JSON. Defaults to q1, q2, …"
|
|
444
|
+
},
|
|
445
|
+
"type": {
|
|
446
|
+
"type": "string",
|
|
447
|
+
"enum": [
|
|
448
|
+
"single",
|
|
449
|
+
"multi",
|
|
450
|
+
"yesno",
|
|
451
|
+
"text",
|
|
452
|
+
"textarea",
|
|
453
|
+
"scale",
|
|
454
|
+
"color",
|
|
455
|
+
"rank",
|
|
456
|
+
"checklist",
|
|
457
|
+
"allocate"
|
|
458
|
+
],
|
|
459
|
+
"default": "text"
|
|
460
|
+
},
|
|
461
|
+
"label": {
|
|
462
|
+
"type": "string"
|
|
463
|
+
},
|
|
464
|
+
"description": {
|
|
465
|
+
"type": "string"
|
|
466
|
+
},
|
|
467
|
+
"required": {
|
|
468
|
+
"type": "boolean",
|
|
469
|
+
"default": false
|
|
470
|
+
},
|
|
471
|
+
"options": {
|
|
472
|
+
"type": "array",
|
|
473
|
+
"description": "For single/multi/rank/checklist/allocate. Strings, or {value, label, description, blocks?}. An option's \"blocks\" render INSIDE that option card — use them to show each choice (image/chart/mermaid/html…) instead of describing it in words. \"rank\": user reorders (drag/↑↓), answer is the ordered values, ≥2 options. \"checklist\": each option gets a status (see \"statuses\"), answer is {value: status}. \"allocate\": user distributes \"total\" across options, answer is {value: number}.",
|
|
474
|
+
"items": {
|
|
475
|
+
"anyOf": [
|
|
476
|
+
{
|
|
477
|
+
"type": "string"
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
"type": "object",
|
|
481
|
+
"properties": {
|
|
482
|
+
"value": {
|
|
483
|
+
"type": "string"
|
|
484
|
+
},
|
|
485
|
+
"label": {
|
|
486
|
+
"type": "string"
|
|
487
|
+
},
|
|
488
|
+
"description": {
|
|
489
|
+
"type": "string"
|
|
490
|
+
},
|
|
491
|
+
"blocks": {
|
|
492
|
+
"type": "array",
|
|
493
|
+
"description": "Visuals for THIS option, rendered inside its card. Same block types as everywhere else. Keep them compact (height ~140–260).",
|
|
494
|
+
"items": {
|
|
495
|
+
"type": "object",
|
|
496
|
+
"required": [
|
|
497
|
+
"type"
|
|
498
|
+
],
|
|
499
|
+
"properties": {
|
|
500
|
+
"type": {
|
|
501
|
+
"type": "string",
|
|
502
|
+
"enum": [
|
|
503
|
+
"markdown",
|
|
504
|
+
"mermaid",
|
|
505
|
+
"graphviz",
|
|
506
|
+
"plantuml",
|
|
507
|
+
"chart",
|
|
508
|
+
"table",
|
|
509
|
+
"code",
|
|
510
|
+
"diff",
|
|
511
|
+
"git-conflict",
|
|
512
|
+
"video",
|
|
513
|
+
"pdf",
|
|
514
|
+
"html",
|
|
515
|
+
"image",
|
|
516
|
+
"palette",
|
|
517
|
+
"kpi",
|
|
518
|
+
"typography",
|
|
519
|
+
"compare",
|
|
520
|
+
"a2ui"
|
|
521
|
+
]
|
|
522
|
+
},
|
|
523
|
+
"md": {
|
|
524
|
+
"type": "string",
|
|
525
|
+
"description": "markdown: built-in mini renderer (no external library) — headings, lists, code, quotes, links, images, and GFM pipe tables. Text selections are commentable. For real tabular data prefer a \"table\" block (sortable + per-cell comments)."
|
|
526
|
+
},
|
|
527
|
+
"mdFile": {
|
|
528
|
+
"type": "string",
|
|
529
|
+
"description": "markdown: path to a local .md file to load + render instead of inline \"md\" (e.g. view a README/plan/report). Resolved against the CWD. Quick view of one or more files: `rly view a.md b.md`."
|
|
530
|
+
},
|
|
531
|
+
"code": {
|
|
532
|
+
"type": "string",
|
|
533
|
+
"description": "mermaid: diagram source (e.g. \"graph TD; A-->B\"); plantuml: the @startuml…@enduml source; code: the source to display (syntax-highlighted with line numbers)."
|
|
534
|
+
},
|
|
535
|
+
"codeFile": {
|
|
536
|
+
"type": "string",
|
|
537
|
+
"description": "code: path to a local source file to load + display instead of inline \"code\". Resolved against the CWD; lang defaults from the file extension."
|
|
538
|
+
},
|
|
539
|
+
"filename": {
|
|
540
|
+
"type": "string",
|
|
541
|
+
"description": "code/diff/git-conflict: optional file name/path shown as a header label above the block."
|
|
542
|
+
},
|
|
543
|
+
"editable": {
|
|
544
|
+
"type": "boolean",
|
|
545
|
+
"description": "mermaid: when true, render an \"Edit diagram\" toggle so the user can edit the diagram source live. The edited source is returned in result.blockEdits[<blockId>]."
|
|
546
|
+
},
|
|
547
|
+
"dot": {
|
|
548
|
+
"type": "string",
|
|
549
|
+
"description": "graphviz: DOT source (e.g. \"digraph { a -> b }\"). Rendered offline via vendored Viz.js; nodes and edges are individually commentable."
|
|
550
|
+
},
|
|
551
|
+
"server": {
|
|
552
|
+
"type": "string",
|
|
553
|
+
"description": "plantuml: PlantUML server base URL (http(s)). Defaults to https://www.plantuml.com/plantuml. Diagrams render via this server (needs network)."
|
|
554
|
+
},
|
|
555
|
+
"lang": {
|
|
556
|
+
"type": "string",
|
|
557
|
+
"description": "code/diff/git-conflict block: language hint for syntax highlighting (js, ts, py, go, rust, java, c, cpp, csharp, ruby, php, swift, kotlin, sql, yaml, json, sh, css, html, …)."
|
|
558
|
+
},
|
|
559
|
+
"diff": {
|
|
560
|
+
"type": "string",
|
|
561
|
+
"description": "diff: a unified diff (git diff / diff -u output) — rendered as a colored, line-numbered comparison with +added / −removed / context rows and file/hunk headers. No git needed; just write/paste the diff text."
|
|
562
|
+
},
|
|
563
|
+
"diffFile": {
|
|
564
|
+
"type": "string",
|
|
565
|
+
"description": "diff: path to a local file containing a unified diff (alternative to \"diff\"). Resolved against the CWD."
|
|
566
|
+
},
|
|
567
|
+
"view": {
|
|
568
|
+
"type": "string",
|
|
569
|
+
"enum": [
|
|
570
|
+
"unified",
|
|
571
|
+
"split"
|
|
572
|
+
],
|
|
573
|
+
"description": "diff: initial layout — \"unified\" (default, one column) or \"split\" (side-by-side old vs new). The viewer also has a live toggle either way."
|
|
574
|
+
},
|
|
575
|
+
"review": {
|
|
576
|
+
"type": "boolean",
|
|
577
|
+
"description": "diff: when true, render per-hunk Apply / Skip / Hold controls and return choices in result.blockEdits[blockId] as {type:\"diff-review\", hunks:{...}}. Used by `rly git cherry-pick --code`."
|
|
578
|
+
},
|
|
579
|
+
"reviewKind": {
|
|
580
|
+
"type": "string",
|
|
581
|
+
"description": "diff review: optional label for the review workflow, such as \"cherry-pick\" or \"pick\"."
|
|
582
|
+
},
|
|
583
|
+
"commit": {
|
|
584
|
+
"type": "string",
|
|
585
|
+
"description": "diff review: optional commit SHA associated with this diff."
|
|
586
|
+
},
|
|
587
|
+
"express": {
|
|
588
|
+
"type": "string",
|
|
589
|
+
"description": "a2ui: a live widget in A2UI Express, e.g. `$/jobs = [{title:\"Build\",tone:\"ok\"}]` then `root = Card(\"CI\", [List($/jobs), Button(\"Retry\", action=Event(\"retry\"))])`. Compiled by the A2UI SDK against Relay's catalog (run `rly a2ui` for the grammar and every component). Button events, input values come back in result.blockEdits[blockId] as {type:\"a2ui\", data, events}."
|
|
590
|
+
},
|
|
591
|
+
"components": {
|
|
592
|
+
"type": "array",
|
|
593
|
+
"description": "a2ui: the same widget as flat A2UI v1.0 JSON components (root id \"root\", a Card) instead of \"express\".",
|
|
594
|
+
"items": {
|
|
595
|
+
"type": "object"
|
|
596
|
+
}
|
|
597
|
+
},
|
|
598
|
+
"dataModel": {
|
|
599
|
+
"type": "object",
|
|
600
|
+
"description": "a2ui: the data model for \"components\" (use `$/path = value` lines with \"express\" instead)."
|
|
601
|
+
},
|
|
602
|
+
"content": {
|
|
603
|
+
"type": "string",
|
|
604
|
+
"description": "git-conflict: inline file content containing conflict markers (<<<<<<< / ======= / >>>>>>>). The board auto-detects each hunk and returns resolutions in result.blockEdits[blockId]."
|
|
605
|
+
},
|
|
606
|
+
"text": {
|
|
607
|
+
"type": "string",
|
|
608
|
+
"description": "git-conflict: alias for inline \"content\"."
|
|
609
|
+
},
|
|
610
|
+
"file": {
|
|
611
|
+
"type": "string",
|
|
612
|
+
"description": "git-conflict: local conflicted file path to load, parse, and resolve. Resolved against the CWD."
|
|
613
|
+
},
|
|
614
|
+
"path": {
|
|
615
|
+
"type": "string",
|
|
616
|
+
"description": "git-conflict: alias for local conflicted file path."
|
|
617
|
+
},
|
|
618
|
+
"config": {
|
|
619
|
+
"type": "object",
|
|
620
|
+
"description": "chart: a full Chart.js config object."
|
|
621
|
+
},
|
|
622
|
+
"kind": {
|
|
623
|
+
"type": "string",
|
|
624
|
+
"enum": [
|
|
625
|
+
"bar",
|
|
626
|
+
"line",
|
|
627
|
+
"pie",
|
|
628
|
+
"doughnut",
|
|
629
|
+
"radar",
|
|
630
|
+
"scatter"
|
|
631
|
+
],
|
|
632
|
+
"description": "chart shorthand: chart kind (alternative to \"config\")."
|
|
633
|
+
},
|
|
634
|
+
"labels": {
|
|
635
|
+
"type": "array",
|
|
636
|
+
"description": "chart shorthand: x-axis / category labels."
|
|
637
|
+
},
|
|
638
|
+
"series": {
|
|
639
|
+
"type": "array",
|
|
640
|
+
"description": "chart shorthand: [{label, data:[...], color?}]. Chart data points are individually commentable.",
|
|
641
|
+
"items": {
|
|
642
|
+
"type": "object",
|
|
643
|
+
"properties": {
|
|
644
|
+
"label": {
|
|
645
|
+
"type": "string"
|
|
646
|
+
},
|
|
647
|
+
"data": {
|
|
648
|
+
"type": "array"
|
|
649
|
+
},
|
|
650
|
+
"color": {
|
|
651
|
+
"type": "string"
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
},
|
|
656
|
+
"title": {
|
|
657
|
+
"type": "string",
|
|
658
|
+
"description": "chart shorthand: chart title. video: title/caption shown under the player."
|
|
659
|
+
},
|
|
660
|
+
"columns": {
|
|
661
|
+
"type": "array",
|
|
662
|
+
"description": "table: strings, or {key, label, align?}. Cells are commentable.",
|
|
663
|
+
"items": {
|
|
664
|
+
"anyOf": [
|
|
665
|
+
{
|
|
666
|
+
"type": "string"
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
"type": "object"
|
|
670
|
+
}
|
|
671
|
+
]
|
|
672
|
+
}
|
|
673
|
+
},
|
|
674
|
+
"rows": {
|
|
675
|
+
"type": "array",
|
|
676
|
+
"description": "table: array of arrays (positional) or array of objects (keyed by column key)."
|
|
677
|
+
},
|
|
678
|
+
"rowsFile": {
|
|
679
|
+
"type": "string",
|
|
680
|
+
"description": "table: load rows from a local .csv/.tsv/.json file instead of inline \"rows\". CSV/TSV first row is the header (becomes \"columns\" if omitted); JSON is an array of objects. Resolved against the CWD. Quick view: `rly view data.csv`."
|
|
681
|
+
},
|
|
682
|
+
"sortable": {
|
|
683
|
+
"type": "boolean",
|
|
684
|
+
"description": "table: enable click-to-sort headers."
|
|
685
|
+
},
|
|
686
|
+
"filterable": {
|
|
687
|
+
"type": "boolean",
|
|
688
|
+
"description": "table: show a filter box that live-filters rows by substring across all cells. Good for large tables."
|
|
689
|
+
},
|
|
690
|
+
"exportable": {
|
|
691
|
+
"type": "boolean",
|
|
692
|
+
"description": "table: show a \"CSV\" button that downloads the (filtered) rows as a CSV file."
|
|
693
|
+
},
|
|
694
|
+
"html": {
|
|
695
|
+
"type": "string",
|
|
696
|
+
"description": "html: custom markup rendered in a sandboxed iframe."
|
|
697
|
+
},
|
|
698
|
+
"htmlFile": {
|
|
699
|
+
"type": "string",
|
|
700
|
+
"description": "html: path to an HTML file (alternative to \"html\")."
|
|
701
|
+
},
|
|
702
|
+
"src": {
|
|
703
|
+
"type": "string",
|
|
704
|
+
"description": "image: http(s)/data URL, or a local file path (png/jpg/gif/webp/svg/avif/bmp — embedded at spec time, served offline). video: a YouTube/Vimeo URL (embeds an iframe player), an http(s) media URL, or a local video file (mp4/webm/ogv/mov/mkv/m4v — streamed from the server, never embedded)."
|
|
705
|
+
},
|
|
706
|
+
"alt": {
|
|
707
|
+
"type": "string",
|
|
708
|
+
"description": "image: alt text / annotation label. video: accessible title for the player."
|
|
709
|
+
},
|
|
710
|
+
"palettes": {
|
|
711
|
+
"type": "array",
|
|
712
|
+
"description": "palette: one or more color palettes to display as swatch cards. Each swatch reveals its hex on hover and copies it on click; mark one {featured:true} to show it as a larger spotlight. Each item: {name?, sub? (or mood?), tag? (or badge?), tagTone? (warm|cool|neutral|nature|bold|digital), featured?, colors:[…]}.",
|
|
713
|
+
"items": {
|
|
714
|
+
"type": "object",
|
|
715
|
+
"properties": {
|
|
716
|
+
"name": {
|
|
717
|
+
"type": "string"
|
|
718
|
+
},
|
|
719
|
+
"sub": {
|
|
720
|
+
"type": "string"
|
|
721
|
+
},
|
|
722
|
+
"mood": {
|
|
723
|
+
"type": "string"
|
|
724
|
+
},
|
|
725
|
+
"tag": {
|
|
726
|
+
"type": "string"
|
|
727
|
+
},
|
|
728
|
+
"badge": {
|
|
729
|
+
"type": "string"
|
|
730
|
+
},
|
|
731
|
+
"tagTone": {
|
|
732
|
+
"type": "string",
|
|
733
|
+
"enum": [
|
|
734
|
+
"warm",
|
|
735
|
+
"cool",
|
|
736
|
+
"neutral",
|
|
737
|
+
"nature",
|
|
738
|
+
"bold",
|
|
739
|
+
"digital"
|
|
740
|
+
]
|
|
741
|
+
},
|
|
742
|
+
"featured": {
|
|
743
|
+
"type": "boolean"
|
|
744
|
+
},
|
|
745
|
+
"colors": {
|
|
746
|
+
"type": "array",
|
|
747
|
+
"items": {
|
|
748
|
+
"type": "string"
|
|
749
|
+
},
|
|
750
|
+
"description": "CSS colors — #rrggbb, rgb()/hsl(), or named."
|
|
751
|
+
}
|
|
752
|
+
},
|
|
753
|
+
"required": [
|
|
754
|
+
"colors"
|
|
755
|
+
]
|
|
756
|
+
}
|
|
757
|
+
},
|
|
758
|
+
"colors": {
|
|
759
|
+
"type": "array",
|
|
760
|
+
"items": {
|
|
761
|
+
"type": "string"
|
|
762
|
+
},
|
|
763
|
+
"description": "palette shorthand: colors for a single palette (use \"palettes\" for several named ones). Pairs with block-level \"name\"."
|
|
764
|
+
},
|
|
765
|
+
"name": {
|
|
766
|
+
"type": "string",
|
|
767
|
+
"description": "palette shorthand: name for the single \"colors\" palette."
|
|
768
|
+
},
|
|
769
|
+
"items": {
|
|
770
|
+
"type": "array",
|
|
771
|
+
"description": "kpi: stat cards. Each {label, value, delta?, dir? (up|down|flat — tints the delta), sub?}. Big-number metrics at a glance (\"Revenue $1.2M ↑12%\") with no chart.",
|
|
772
|
+
"items": {
|
|
773
|
+
"type": "object",
|
|
774
|
+
"properties": {
|
|
775
|
+
"label": {
|
|
776
|
+
"type": "string"
|
|
777
|
+
},
|
|
778
|
+
"value": {
|
|
779
|
+
"type": "string"
|
|
780
|
+
},
|
|
781
|
+
"delta": {
|
|
782
|
+
"type": "string"
|
|
783
|
+
},
|
|
784
|
+
"dir": {
|
|
785
|
+
"type": "string",
|
|
786
|
+
"enum": [
|
|
787
|
+
"up",
|
|
788
|
+
"down",
|
|
789
|
+
"flat"
|
|
790
|
+
]
|
|
791
|
+
},
|
|
792
|
+
"sub": {
|
|
793
|
+
"type": "string"
|
|
794
|
+
}
|
|
795
|
+
},
|
|
796
|
+
"required": [
|
|
797
|
+
"value"
|
|
798
|
+
]
|
|
799
|
+
}
|
|
800
|
+
},
|
|
801
|
+
"specimens": {
|
|
802
|
+
"type": "array",
|
|
803
|
+
"description": "typography: type specimens rendered at the given style. Each {label?, size? (e.g. \"32px\"/\"2rem\"), weight? (e.g. \"600\"), font?, lineHeight?, letterSpacing?, text?}. Block-level \"font\" sets a default family.",
|
|
804
|
+
"items": {
|
|
805
|
+
"type": "object",
|
|
806
|
+
"properties": {
|
|
807
|
+
"label": {
|
|
808
|
+
"type": "string"
|
|
809
|
+
},
|
|
810
|
+
"size": {
|
|
811
|
+
"type": "string"
|
|
812
|
+
},
|
|
813
|
+
"weight": {
|
|
814
|
+
"type": "string"
|
|
815
|
+
},
|
|
816
|
+
"font": {
|
|
817
|
+
"type": "string"
|
|
818
|
+
},
|
|
819
|
+
"lineHeight": {
|
|
820
|
+
"type": "string"
|
|
821
|
+
},
|
|
822
|
+
"letterSpacing": {
|
|
823
|
+
"type": "string"
|
|
824
|
+
},
|
|
825
|
+
"text": {
|
|
826
|
+
"type": "string"
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
},
|
|
831
|
+
"ref": {
|
|
832
|
+
"type": "string",
|
|
833
|
+
"description": "Any block: a stable name (e.g. \"velocity\") that a markdown reference link [see chart](#ref:velocity) can open in a full-screen modal — so a question can point back to a visual shown earlier instead of making the user scroll up."
|
|
834
|
+
},
|
|
835
|
+
"pins": {
|
|
836
|
+
"type": "boolean",
|
|
837
|
+
"description": "image: enable coordinate pin-comments — the user clicks any point on the image to drop a comment anchored to that spot (Figma-style), returned as a {kind:\"image-point\", x, y} annotation."
|
|
838
|
+
},
|
|
839
|
+
"before": {
|
|
840
|
+
"description": "compare: the \"before\" image — an http(s)/data URL, a local file path, or {src, label}."
|
|
841
|
+
},
|
|
842
|
+
"after": {
|
|
843
|
+
"description": "compare: the \"after\" image — an http(s)/data URL, a local file path, or {src, label}."
|
|
844
|
+
},
|
|
845
|
+
"beforeLabel": {
|
|
846
|
+
"type": "string",
|
|
847
|
+
"description": "compare: caption for the before side (default \"Before\")."
|
|
848
|
+
},
|
|
849
|
+
"afterLabel": {
|
|
850
|
+
"type": "string",
|
|
851
|
+
"description": "compare: caption for the after side (default \"After\")."
|
|
852
|
+
},
|
|
853
|
+
"height": {
|
|
854
|
+
"type": "integer",
|
|
855
|
+
"minimum": 100,
|
|
856
|
+
"maximum": 2400,
|
|
857
|
+
"description": "Block height in px. Defaults: chart 320, html 360; markdown/table/code flow naturally; mermaid/graphviz/plantuml natural (max 800, scrolls; set a larger height to override); image/compare natural."
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
]
|
|
865
|
+
}
|
|
866
|
+
},
|
|
867
|
+
"other": {
|
|
868
|
+
"type": "boolean",
|
|
869
|
+
"description": "Add a free-text \"Other\" option (a multi-line textarea); its text is returned verbatim as the value. Defaults ON for \"single\" (radio) questions so the user is never boxed in — set other:false to remove it; \"multi\" stays opt-in (other:true)."
|
|
870
|
+
},
|
|
871
|
+
"note": {
|
|
872
|
+
"type": "boolean",
|
|
873
|
+
"description": "Small optional free-text field under the question (to qualify an answer). Returned separately as result.notes[questionId]. Defaults to true for the decision types — single, rank, checklist, allocate — so users can qualify their pick; false for other types. Set note:false to hide it, note:true to add it."
|
|
874
|
+
},
|
|
875
|
+
"placeholder": {
|
|
876
|
+
"type": "string",
|
|
877
|
+
"description": "For text/textarea."
|
|
878
|
+
},
|
|
879
|
+
"default": {
|
|
880
|
+
"description": "Pre-selected value. Shape matches the answer shape for the type."
|
|
881
|
+
},
|
|
882
|
+
"min": {
|
|
883
|
+
"type": "integer",
|
|
884
|
+
"default": 1,
|
|
885
|
+
"description": "scale only"
|
|
886
|
+
},
|
|
887
|
+
"max": {
|
|
888
|
+
"type": "integer",
|
|
889
|
+
"default": 5,
|
|
890
|
+
"maximum": 10,
|
|
891
|
+
"description": "scale only"
|
|
892
|
+
},
|
|
893
|
+
"minLabel": {
|
|
894
|
+
"type": "string",
|
|
895
|
+
"description": "scale only"
|
|
896
|
+
},
|
|
897
|
+
"maxLabel": {
|
|
898
|
+
"type": "string",
|
|
899
|
+
"description": "scale only"
|
|
900
|
+
},
|
|
901
|
+
"presets": {
|
|
902
|
+
"type": "array",
|
|
903
|
+
"items": {
|
|
904
|
+
"type": "string"
|
|
905
|
+
},
|
|
906
|
+
"description": "color only: optional small preset swatches (CSS colors) shown beside the native picker for one-click selection. The answer is returned as a color string."
|
|
907
|
+
},
|
|
908
|
+
"palette": {
|
|
909
|
+
"type": "array",
|
|
910
|
+
"description": "color only: a \"pick from a palette\" of labeled swatch CARDS — each click selects that color as the answer, and each card is individually commentable (per-color feedback). Items: a CSS color string (hex/rgb/hsl/named — multiple color systems supported via the browser, no library), or {value (or color), label?}. The native picker stays available for a custom color.",
|
|
911
|
+
"items": {
|
|
912
|
+
"anyOf": [
|
|
913
|
+
{
|
|
914
|
+
"type": "string"
|
|
915
|
+
},
|
|
916
|
+
{
|
|
917
|
+
"type": "object"
|
|
918
|
+
}
|
|
919
|
+
]
|
|
920
|
+
}
|
|
921
|
+
},
|
|
922
|
+
"statuses": {
|
|
923
|
+
"type": "array",
|
|
924
|
+
"description": "checklist only: the per-item statuses (default Pass / Fail / N/A). Strings, or {value, label, tone?} where tone ∈ ok|bad|muted|warn tints the chip. Answer is a map {optionValue: statusValue} for the items the user set.",
|
|
925
|
+
"items": {
|
|
926
|
+
"anyOf": [
|
|
927
|
+
{
|
|
928
|
+
"type": "string"
|
|
929
|
+
},
|
|
930
|
+
{
|
|
931
|
+
"type": "object"
|
|
932
|
+
}
|
|
933
|
+
]
|
|
934
|
+
}
|
|
935
|
+
},
|
|
936
|
+
"total": {
|
|
937
|
+
"type": "integer",
|
|
938
|
+
"minimum": 1,
|
|
939
|
+
"default": 100,
|
|
940
|
+
"description": "allocate only: the budget to distribute across options (default 100). Answer is a map {optionValue: number}."
|
|
941
|
+
},
|
|
942
|
+
"unit": {
|
|
943
|
+
"type": "string",
|
|
944
|
+
"description": "allocate only: optional unit label shown next to the total (e.g. \"%\", \"pts\", \"hrs\")."
|
|
945
|
+
},
|
|
946
|
+
"blocks": {
|
|
947
|
+
"type": "array",
|
|
948
|
+
"description": "Rich content blocks rendered in order. Board-level blocks show above the questions; per-question blocks show above the control. Each is annotatable (element-level comments returned in result.annotations).",
|
|
949
|
+
"items": {
|
|
950
|
+
"type": "object",
|
|
951
|
+
"required": [
|
|
952
|
+
"type"
|
|
953
|
+
],
|
|
954
|
+
"properties": {
|
|
955
|
+
"type": {
|
|
956
|
+
"type": "string",
|
|
957
|
+
"enum": [
|
|
958
|
+
"markdown",
|
|
959
|
+
"mermaid",
|
|
960
|
+
"graphviz",
|
|
961
|
+
"plantuml",
|
|
962
|
+
"chart",
|
|
963
|
+
"table",
|
|
964
|
+
"code",
|
|
965
|
+
"diff",
|
|
966
|
+
"git-conflict",
|
|
967
|
+
"video",
|
|
968
|
+
"pdf",
|
|
969
|
+
"html",
|
|
970
|
+
"image",
|
|
971
|
+
"palette",
|
|
972
|
+
"kpi",
|
|
973
|
+
"typography",
|
|
974
|
+
"compare",
|
|
975
|
+
"a2ui"
|
|
976
|
+
]
|
|
977
|
+
},
|
|
978
|
+
"md": {
|
|
979
|
+
"type": "string",
|
|
980
|
+
"description": "markdown: built-in mini renderer (no external library) — headings, lists, code, quotes, links, images, and GFM pipe tables. Text selections are commentable. For real tabular data prefer a \"table\" block (sortable + per-cell comments)."
|
|
981
|
+
},
|
|
982
|
+
"mdFile": {
|
|
983
|
+
"type": "string",
|
|
984
|
+
"description": "markdown: path to a local .md file to load + render instead of inline \"md\" (e.g. view a README/plan/report). Resolved against the CWD. Quick view of one or more files: `rly view a.md b.md`."
|
|
985
|
+
},
|
|
986
|
+
"code": {
|
|
987
|
+
"type": "string",
|
|
988
|
+
"description": "mermaid: diagram source (e.g. \"graph TD; A-->B\"); plantuml: the @startuml…@enduml source; code: the source to display (syntax-highlighted with line numbers)."
|
|
989
|
+
},
|
|
990
|
+
"codeFile": {
|
|
991
|
+
"type": "string",
|
|
992
|
+
"description": "code: path to a local source file to load + display instead of inline \"code\". Resolved against the CWD; lang defaults from the file extension."
|
|
993
|
+
},
|
|
994
|
+
"filename": {
|
|
995
|
+
"type": "string",
|
|
996
|
+
"description": "code/diff/git-conflict: optional file name/path shown as a header label above the block."
|
|
997
|
+
},
|
|
998
|
+
"editable": {
|
|
999
|
+
"type": "boolean",
|
|
1000
|
+
"description": "mermaid: when true, render an \"Edit diagram\" toggle so the user can edit the diagram source live. The edited source is returned in result.blockEdits[<blockId>]."
|
|
1001
|
+
},
|
|
1002
|
+
"dot": {
|
|
1003
|
+
"type": "string",
|
|
1004
|
+
"description": "graphviz: DOT source (e.g. \"digraph { a -> b }\"). Rendered offline via vendored Viz.js; nodes and edges are individually commentable."
|
|
1005
|
+
},
|
|
1006
|
+
"server": {
|
|
1007
|
+
"type": "string",
|
|
1008
|
+
"description": "plantuml: PlantUML server base URL (http(s)). Defaults to https://www.plantuml.com/plantuml. Diagrams render via this server (needs network)."
|
|
1009
|
+
},
|
|
1010
|
+
"lang": {
|
|
1011
|
+
"type": "string",
|
|
1012
|
+
"description": "code/diff/git-conflict block: language hint for syntax highlighting (js, ts, py, go, rust, java, c, cpp, csharp, ruby, php, swift, kotlin, sql, yaml, json, sh, css, html, …)."
|
|
1013
|
+
},
|
|
1014
|
+
"diff": {
|
|
1015
|
+
"type": "string",
|
|
1016
|
+
"description": "diff: a unified diff (git diff / diff -u output) — rendered as a colored, line-numbered comparison with +added / −removed / context rows and file/hunk headers. No git needed; just write/paste the diff text."
|
|
1017
|
+
},
|
|
1018
|
+
"diffFile": {
|
|
1019
|
+
"type": "string",
|
|
1020
|
+
"description": "diff: path to a local file containing a unified diff (alternative to \"diff\"). Resolved against the CWD."
|
|
1021
|
+
},
|
|
1022
|
+
"view": {
|
|
1023
|
+
"type": "string",
|
|
1024
|
+
"enum": [
|
|
1025
|
+
"unified",
|
|
1026
|
+
"split"
|
|
1027
|
+
],
|
|
1028
|
+
"description": "diff: initial layout — \"unified\" (default, one column) or \"split\" (side-by-side old vs new). The viewer also has a live toggle either way."
|
|
1029
|
+
},
|
|
1030
|
+
"review": {
|
|
1031
|
+
"type": "boolean",
|
|
1032
|
+
"description": "diff: when true, render per-hunk Apply / Skip / Hold controls and return choices in result.blockEdits[blockId] as {type:\"diff-review\", hunks:{...}}. Used by `rly git cherry-pick --code`."
|
|
1033
|
+
},
|
|
1034
|
+
"reviewKind": {
|
|
1035
|
+
"type": "string",
|
|
1036
|
+
"description": "diff review: optional label for the review workflow, such as \"cherry-pick\" or \"pick\"."
|
|
1037
|
+
},
|
|
1038
|
+
"commit": {
|
|
1039
|
+
"type": "string",
|
|
1040
|
+
"description": "diff review: optional commit SHA associated with this diff."
|
|
1041
|
+
},
|
|
1042
|
+
"express": {
|
|
1043
|
+
"type": "string",
|
|
1044
|
+
"description": "a2ui: a live widget in A2UI Express, e.g. `$/jobs = [{title:\"Build\",tone:\"ok\"}]` then `root = Card(\"CI\", [List($/jobs), Button(\"Retry\", action=Event(\"retry\"))])`. Compiled by the A2UI SDK against Relay's catalog (run `rly a2ui` for the grammar and every component). Button events, input values come back in result.blockEdits[blockId] as {type:\"a2ui\", data, events}."
|
|
1045
|
+
},
|
|
1046
|
+
"components": {
|
|
1047
|
+
"type": "array",
|
|
1048
|
+
"description": "a2ui: the same widget as flat A2UI v1.0 JSON components (root id \"root\", a Card) instead of \"express\".",
|
|
1049
|
+
"items": {
|
|
1050
|
+
"type": "object"
|
|
1051
|
+
}
|
|
1052
|
+
},
|
|
1053
|
+
"dataModel": {
|
|
1054
|
+
"type": "object",
|
|
1055
|
+
"description": "a2ui: the data model for \"components\" (use `$/path = value` lines with \"express\" instead)."
|
|
1056
|
+
},
|
|
1057
|
+
"content": {
|
|
1058
|
+
"type": "string",
|
|
1059
|
+
"description": "git-conflict: inline file content containing conflict markers (<<<<<<< / ======= / >>>>>>>). The board auto-detects each hunk and returns resolutions in result.blockEdits[blockId]."
|
|
1060
|
+
},
|
|
1061
|
+
"text": {
|
|
1062
|
+
"type": "string",
|
|
1063
|
+
"description": "git-conflict: alias for inline \"content\"."
|
|
1064
|
+
},
|
|
1065
|
+
"file": {
|
|
1066
|
+
"type": "string",
|
|
1067
|
+
"description": "git-conflict: local conflicted file path to load, parse, and resolve. Resolved against the CWD."
|
|
1068
|
+
},
|
|
1069
|
+
"path": {
|
|
1070
|
+
"type": "string",
|
|
1071
|
+
"description": "git-conflict: alias for local conflicted file path."
|
|
1072
|
+
},
|
|
1073
|
+
"config": {
|
|
1074
|
+
"type": "object",
|
|
1075
|
+
"description": "chart: a full Chart.js config object."
|
|
1076
|
+
},
|
|
1077
|
+
"kind": {
|
|
1078
|
+
"type": "string",
|
|
1079
|
+
"enum": [
|
|
1080
|
+
"bar",
|
|
1081
|
+
"line",
|
|
1082
|
+
"pie",
|
|
1083
|
+
"doughnut",
|
|
1084
|
+
"radar",
|
|
1085
|
+
"scatter"
|
|
1086
|
+
],
|
|
1087
|
+
"description": "chart shorthand: chart kind (alternative to \"config\")."
|
|
1088
|
+
},
|
|
1089
|
+
"labels": {
|
|
1090
|
+
"type": "array",
|
|
1091
|
+
"description": "chart shorthand: x-axis / category labels."
|
|
1092
|
+
},
|
|
1093
|
+
"series": {
|
|
1094
|
+
"type": "array",
|
|
1095
|
+
"description": "chart shorthand: [{label, data:[...], color?}]. Chart data points are individually commentable.",
|
|
1096
|
+
"items": {
|
|
1097
|
+
"type": "object",
|
|
1098
|
+
"properties": {
|
|
1099
|
+
"label": {
|
|
1100
|
+
"type": "string"
|
|
1101
|
+
},
|
|
1102
|
+
"data": {
|
|
1103
|
+
"type": "array"
|
|
1104
|
+
},
|
|
1105
|
+
"color": {
|
|
1106
|
+
"type": "string"
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
},
|
|
1111
|
+
"title": {
|
|
1112
|
+
"type": "string",
|
|
1113
|
+
"description": "chart shorthand: chart title. video: title/caption shown under the player."
|
|
1114
|
+
},
|
|
1115
|
+
"columns": {
|
|
1116
|
+
"type": "array",
|
|
1117
|
+
"description": "table: strings, or {key, label, align?}. Cells are commentable.",
|
|
1118
|
+
"items": {
|
|
1119
|
+
"anyOf": [
|
|
1120
|
+
{
|
|
1121
|
+
"type": "string"
|
|
1122
|
+
},
|
|
1123
|
+
{
|
|
1124
|
+
"type": "object"
|
|
1125
|
+
}
|
|
1126
|
+
]
|
|
1127
|
+
}
|
|
1128
|
+
},
|
|
1129
|
+
"rows": {
|
|
1130
|
+
"type": "array",
|
|
1131
|
+
"description": "table: array of arrays (positional) or array of objects (keyed by column key)."
|
|
1132
|
+
},
|
|
1133
|
+
"rowsFile": {
|
|
1134
|
+
"type": "string",
|
|
1135
|
+
"description": "table: load rows from a local .csv/.tsv/.json file instead of inline \"rows\". CSV/TSV first row is the header (becomes \"columns\" if omitted); JSON is an array of objects. Resolved against the CWD. Quick view: `rly view data.csv`."
|
|
1136
|
+
},
|
|
1137
|
+
"sortable": {
|
|
1138
|
+
"type": "boolean",
|
|
1139
|
+
"description": "table: enable click-to-sort headers."
|
|
1140
|
+
},
|
|
1141
|
+
"filterable": {
|
|
1142
|
+
"type": "boolean",
|
|
1143
|
+
"description": "table: show a filter box that live-filters rows by substring across all cells. Good for large tables."
|
|
1144
|
+
},
|
|
1145
|
+
"exportable": {
|
|
1146
|
+
"type": "boolean",
|
|
1147
|
+
"description": "table: show a \"CSV\" button that downloads the (filtered) rows as a CSV file."
|
|
1148
|
+
},
|
|
1149
|
+
"html": {
|
|
1150
|
+
"type": "string",
|
|
1151
|
+
"description": "html: custom markup rendered in a sandboxed iframe."
|
|
1152
|
+
},
|
|
1153
|
+
"htmlFile": {
|
|
1154
|
+
"type": "string",
|
|
1155
|
+
"description": "html: path to an HTML file (alternative to \"html\")."
|
|
1156
|
+
},
|
|
1157
|
+
"src": {
|
|
1158
|
+
"type": "string",
|
|
1159
|
+
"description": "image: http(s)/data URL, or a local file path (png/jpg/gif/webp/svg/avif/bmp — embedded at spec time, served offline). video: a YouTube/Vimeo URL (embeds an iframe player), an http(s) media URL, or a local video file (mp4/webm/ogv/mov/mkv/m4v — streamed from the server, never embedded)."
|
|
1160
|
+
},
|
|
1161
|
+
"alt": {
|
|
1162
|
+
"type": "string",
|
|
1163
|
+
"description": "image: alt text / annotation label. video: accessible title for the player."
|
|
1164
|
+
},
|
|
1165
|
+
"palettes": {
|
|
1166
|
+
"type": "array",
|
|
1167
|
+
"description": "palette: one or more color palettes to display as swatch cards. Each swatch reveals its hex on hover and copies it on click; mark one {featured:true} to show it as a larger spotlight. Each item: {name?, sub? (or mood?), tag? (or badge?), tagTone? (warm|cool|neutral|nature|bold|digital), featured?, colors:[…]}.",
|
|
1168
|
+
"items": {
|
|
1169
|
+
"type": "object",
|
|
1170
|
+
"properties": {
|
|
1171
|
+
"name": {
|
|
1172
|
+
"type": "string"
|
|
1173
|
+
},
|
|
1174
|
+
"sub": {
|
|
1175
|
+
"type": "string"
|
|
1176
|
+
},
|
|
1177
|
+
"mood": {
|
|
1178
|
+
"type": "string"
|
|
1179
|
+
},
|
|
1180
|
+
"tag": {
|
|
1181
|
+
"type": "string"
|
|
1182
|
+
},
|
|
1183
|
+
"badge": {
|
|
1184
|
+
"type": "string"
|
|
1185
|
+
},
|
|
1186
|
+
"tagTone": {
|
|
1187
|
+
"type": "string",
|
|
1188
|
+
"enum": [
|
|
1189
|
+
"warm",
|
|
1190
|
+
"cool",
|
|
1191
|
+
"neutral",
|
|
1192
|
+
"nature",
|
|
1193
|
+
"bold",
|
|
1194
|
+
"digital"
|
|
1195
|
+
]
|
|
1196
|
+
},
|
|
1197
|
+
"featured": {
|
|
1198
|
+
"type": "boolean"
|
|
1199
|
+
},
|
|
1200
|
+
"colors": {
|
|
1201
|
+
"type": "array",
|
|
1202
|
+
"items": {
|
|
1203
|
+
"type": "string"
|
|
1204
|
+
},
|
|
1205
|
+
"description": "CSS colors — #rrggbb, rgb()/hsl(), or named."
|
|
1206
|
+
}
|
|
1207
|
+
},
|
|
1208
|
+
"required": [
|
|
1209
|
+
"colors"
|
|
1210
|
+
]
|
|
1211
|
+
}
|
|
1212
|
+
},
|
|
1213
|
+
"colors": {
|
|
1214
|
+
"type": "array",
|
|
1215
|
+
"items": {
|
|
1216
|
+
"type": "string"
|
|
1217
|
+
},
|
|
1218
|
+
"description": "palette shorthand: colors for a single palette (use \"palettes\" for several named ones). Pairs with block-level \"name\"."
|
|
1219
|
+
},
|
|
1220
|
+
"name": {
|
|
1221
|
+
"type": "string",
|
|
1222
|
+
"description": "palette shorthand: name for the single \"colors\" palette."
|
|
1223
|
+
},
|
|
1224
|
+
"items": {
|
|
1225
|
+
"type": "array",
|
|
1226
|
+
"description": "kpi: stat cards. Each {label, value, delta?, dir? (up|down|flat — tints the delta), sub?}. Big-number metrics at a glance (\"Revenue $1.2M ↑12%\") with no chart.",
|
|
1227
|
+
"items": {
|
|
1228
|
+
"type": "object",
|
|
1229
|
+
"properties": {
|
|
1230
|
+
"label": {
|
|
1231
|
+
"type": "string"
|
|
1232
|
+
},
|
|
1233
|
+
"value": {
|
|
1234
|
+
"type": "string"
|
|
1235
|
+
},
|
|
1236
|
+
"delta": {
|
|
1237
|
+
"type": "string"
|
|
1238
|
+
},
|
|
1239
|
+
"dir": {
|
|
1240
|
+
"type": "string",
|
|
1241
|
+
"enum": [
|
|
1242
|
+
"up",
|
|
1243
|
+
"down",
|
|
1244
|
+
"flat"
|
|
1245
|
+
]
|
|
1246
|
+
},
|
|
1247
|
+
"sub": {
|
|
1248
|
+
"type": "string"
|
|
1249
|
+
}
|
|
1250
|
+
},
|
|
1251
|
+
"required": [
|
|
1252
|
+
"value"
|
|
1253
|
+
]
|
|
1254
|
+
}
|
|
1255
|
+
},
|
|
1256
|
+
"specimens": {
|
|
1257
|
+
"type": "array",
|
|
1258
|
+
"description": "typography: type specimens rendered at the given style. Each {label?, size? (e.g. \"32px\"/\"2rem\"), weight? (e.g. \"600\"), font?, lineHeight?, letterSpacing?, text?}. Block-level \"font\" sets a default family.",
|
|
1259
|
+
"items": {
|
|
1260
|
+
"type": "object",
|
|
1261
|
+
"properties": {
|
|
1262
|
+
"label": {
|
|
1263
|
+
"type": "string"
|
|
1264
|
+
},
|
|
1265
|
+
"size": {
|
|
1266
|
+
"type": "string"
|
|
1267
|
+
},
|
|
1268
|
+
"weight": {
|
|
1269
|
+
"type": "string"
|
|
1270
|
+
},
|
|
1271
|
+
"font": {
|
|
1272
|
+
"type": "string"
|
|
1273
|
+
},
|
|
1274
|
+
"lineHeight": {
|
|
1275
|
+
"type": "string"
|
|
1276
|
+
},
|
|
1277
|
+
"letterSpacing": {
|
|
1278
|
+
"type": "string"
|
|
1279
|
+
},
|
|
1280
|
+
"text": {
|
|
1281
|
+
"type": "string"
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
},
|
|
1286
|
+
"ref": {
|
|
1287
|
+
"type": "string",
|
|
1288
|
+
"description": "Any block: a stable name (e.g. \"velocity\") that a markdown reference link [see chart](#ref:velocity) can open in a full-screen modal — so a question can point back to a visual shown earlier instead of making the user scroll up."
|
|
1289
|
+
},
|
|
1290
|
+
"pins": {
|
|
1291
|
+
"type": "boolean",
|
|
1292
|
+
"description": "image: enable coordinate pin-comments — the user clicks any point on the image to drop a comment anchored to that spot (Figma-style), returned as a {kind:\"image-point\", x, y} annotation."
|
|
1293
|
+
},
|
|
1294
|
+
"before": {
|
|
1295
|
+
"description": "compare: the \"before\" image — an http(s)/data URL, a local file path, or {src, label}."
|
|
1296
|
+
},
|
|
1297
|
+
"after": {
|
|
1298
|
+
"description": "compare: the \"after\" image — an http(s)/data URL, a local file path, or {src, label}."
|
|
1299
|
+
},
|
|
1300
|
+
"beforeLabel": {
|
|
1301
|
+
"type": "string",
|
|
1302
|
+
"description": "compare: caption for the before side (default \"Before\")."
|
|
1303
|
+
},
|
|
1304
|
+
"afterLabel": {
|
|
1305
|
+
"type": "string",
|
|
1306
|
+
"description": "compare: caption for the after side (default \"After\")."
|
|
1307
|
+
},
|
|
1308
|
+
"height": {
|
|
1309
|
+
"type": "integer",
|
|
1310
|
+
"minimum": 100,
|
|
1311
|
+
"maximum": 2400,
|
|
1312
|
+
"description": "Block height in px. Defaults: chart 320, html 360; markdown/table/code flow naturally; mermaid/graphviz/plantuml natural (max 800, scrolls; set a larger height to override); image/compare natural."
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
}
|
|
1316
|
+
},
|
|
1317
|
+
"html": {
|
|
1318
|
+
"type": "string",
|
|
1319
|
+
"description": "Legacy: per-question custom HTML. Normalized into an html block prepended to this question's \"blocks\"."
|
|
1320
|
+
},
|
|
1321
|
+
"htmlFile": {
|
|
1322
|
+
"type": "string",
|
|
1323
|
+
"description": "Legacy: path to an HTML file (alternative to \"html\")."
|
|
1324
|
+
},
|
|
1325
|
+
"htmlHeight": {
|
|
1326
|
+
"type": "integer",
|
|
1327
|
+
"minimum": 100,
|
|
1328
|
+
"maximum": 2400,
|
|
1329
|
+
"default": 360,
|
|
1330
|
+
"description": "Legacy: iframe height for the html/htmlFile block."
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1334
|
+
},
|
|
1335
|
+
"annotations": {
|
|
1336
|
+
"type": "array",
|
|
1337
|
+
"readOnly": true,
|
|
1338
|
+
"description": "Returned in the result (not part of the input spec). Element-level comments the user attached to blocks. Each: {id, questionId|null, blockId|null, target:{kind:\"chart-element\"|\"mermaid-node\"|\"graphviz-node\"|\"table-cell\"|\"text\"|\"html-element\"|\"image\", …}, text, createdAt}. For html-element, target carries a stable ref + label; users can hover any element of a custom-HTML block (automatic) or ones the author marked with data-relay-annotate."
|
|
1339
|
+
},
|
|
1340
|
+
"blockEdits": {
|
|
1341
|
+
"type": "object",
|
|
1342
|
+
"readOnly": true,
|
|
1343
|
+
"description": "Returned in the result (not part of the input spec). A map blockId→edited block payload. Editable mermaid blocks return edited source strings. git-conflict blocks return {type:\"git-conflict-resolution\", resolutions, content, resolved, filename, file}. diff review blocks return {type:\"diff-review\", hunks, resolved, commit}. a2ui blocks return {type:\"a2ui\", data (the widget data model with the user input values), events:[{name, context, at}] (each button click, in order)}. null when the user made no edits."
|
|
1344
|
+
}
|
|
1345
|
+
},
|
|
1346
|
+
"anyOf": [
|
|
1347
|
+
{
|
|
1348
|
+
"required": [
|
|
1349
|
+
"questions"
|
|
1350
|
+
]
|
|
1351
|
+
},
|
|
1352
|
+
{
|
|
1353
|
+
"required": [
|
|
1354
|
+
"blocks"
|
|
1355
|
+
]
|
|
1356
|
+
},
|
|
1357
|
+
{
|
|
1358
|
+
"required": [
|
|
1359
|
+
"html"
|
|
1360
|
+
]
|
|
1361
|
+
},
|
|
1362
|
+
{
|
|
1363
|
+
"required": [
|
|
1364
|
+
"htmlFile"
|
|
1365
|
+
]
|
|
1366
|
+
}
|
|
1367
|
+
]
|
|
1368
|
+
}
|