@intentius/behold 0.29.39 → 0.29.41

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 (49) hide show
  1. package/AGENTS.md +148 -10
  2. package/README.md +6 -2
  3. package/dist/cli.js +15965 -13076
  4. package/example-writes/README.md +1 -1
  5. package/example-writes/chant.config.ts +0 -6
  6. package/package.json +5 -2
  7. package/web/app.js +327 -21
  8. package/web/carve-export.js +142 -0
  9. package/web/carve-narration.js +268 -0
  10. package/web/carve-narration.test.js +18 -0
  11. package/web/change-set-overlay.js +147 -0
  12. package/web/change-set-overlay.test.js +83 -0
  13. package/web/dots-border.js +66 -0
  14. package/web/dots-border.test.js +27 -0
  15. package/web/dots-kiosk.js +279 -0
  16. package/web/dots-kiosk.test.js +60 -0
  17. package/web/dots-layout.d.ts +10 -0
  18. package/web/dots-layout.js +201 -0
  19. package/web/dots-live.js +316 -0
  20. package/web/dots-live.test.js +220 -0
  21. package/web/dots-lod.js +122 -0
  22. package/web/dots-lod.test.js +78 -0
  23. package/web/dots-recording.d.ts +7 -0
  24. package/web/dots-recording.js +247 -0
  25. package/web/dots-recording.test.js +71 -0
  26. package/web/dots-scene.js +294 -0
  27. package/web/dots-scene.test.js +118 -0
  28. package/web/dots-timeline.js +128 -0
  29. package/web/dots-timeline.test.js +83 -0
  30. package/web/dots-tour.js +153 -0
  31. package/web/dots.js +2124 -0
  32. package/web/dots.test.js +15 -0
  33. package/web/index.html +29 -0
  34. package/web/kiosk-carve.js +219 -0
  35. package/web/kiosk-carve.test.js +26 -0
  36. package/web/kiosk-event-help-ui.js +6 -0
  37. package/web/kiosk.html +2 -1
  38. package/web/kiosk.js +21 -6
  39. package/web/operator.js +1 -1
  40. package/web/run-playhead.js +102 -19
  41. package/web/run-playhead.test.js +81 -11
  42. package/web/tour-player.js +204 -0
  43. package/web/tour-player.test.js +115 -0
  44. package/web/tours/behold.tour.v1.schema.json +182 -0
  45. package/web/tours/terralith.json +330 -0
  46. package/web/trunk-lane.js +254 -0
  47. package/web/trunk-lane.test.js +117 -0
  48. package/web/workspace-gates.js +29 -4
  49. package/web/workspace-gates.test.js +23 -2
@@ -0,0 +1,182 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "behold.tour/v1",
4
+ "title": "A behold tour: chapters over a cycle's real events",
5
+ "type": "object",
6
+ "required": ["schema", "name", "chapters"],
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "schema": { "const": "behold.tour/v1" },
10
+ "name": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]{0,63}$" },
11
+ "title": { "type": "string", "maxLength": 120 },
12
+ "match": {
13
+ "description": "Which demo cycles this tour narrates: demo.json's tool or scenario.",
14
+ "type": "object",
15
+ "additionalProperties": false,
16
+ "minProperties": 1,
17
+ "properties": { "tool": { "type": "string" }, "scenario": { "type": "string" } }
18
+ },
19
+ "home": {
20
+ "description": "The repo {repo} names, under demo.json's repo's owner; without it, demo.json's repo.",
21
+ "type": "string",
22
+ "pattern": "^[A-Za-z0-9._-]{1,100}$"
23
+ },
24
+ "steps": {
25
+ "description": "demo.json steps in the order a beat walks them, for how far a chapter has got.",
26
+ "type": "array",
27
+ "items": { "type": "string" },
28
+ "maxItems": 20
29
+ },
30
+ "runs": {
31
+ "description": "Named runs of the cycle, each found in the reports' index or by a migration record's commit.",
32
+ "type": "object",
33
+ "propertyNames": { "pattern": "^[A-Za-z][A-Za-z0-9]{0,31}$" },
34
+ "additionalProperties": { "$ref": "#/$defs/run" }
35
+ },
36
+ "facts": {
37
+ "description": "Named numbers and values, each taken from a record. A fact with no record behind it is left out.",
38
+ "type": "object",
39
+ "propertyNames": { "pattern": "^[A-Za-z][A-Za-z0-9]{0,31}$" },
40
+ "additionalProperties": { "$ref": "#/$defs/fact" }
41
+ },
42
+ "chapters": { "type": "array", "minItems": 1, "maxItems": 12, "items": { "$ref": "#/$defs/chapter" } }
43
+ },
44
+ "$defs": {
45
+ "name": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9]{0,31}$" },
46
+ "run": {
47
+ "oneOf": [
48
+ {
49
+ "type": "object",
50
+ "additionalProperties": false,
51
+ "required": ["migration"],
52
+ "properties": { "migration": { "type": "string", "pattern": "^[A-Za-z0-9._~@+-]{1,128}$" } }
53
+ },
54
+ {
55
+ "type": "object",
56
+ "additionalProperties": false,
57
+ "required": ["repo", "stage"],
58
+ "properties": {
59
+ "repo": { "type": "string", "description": "The forge repo; {repo} is demo.json's repo." },
60
+ "stage": { "enum": ["tf-plan", "tf-apply"] },
61
+ "wave": { "type": "integer", "minimum": 1 },
62
+ "pull": { "type": "null", "description": "null: a run with no pull request (a push)." },
63
+ "after": { "$ref": "#/$defs/name", "description": "Only runs that finished after this named run." },
64
+ "pick": { "enum": ["first", "last"] }
65
+ }
66
+ }
67
+ ]
68
+ },
69
+ "fact": {
70
+ "oneOf": [
71
+ {
72
+ "type": "object",
73
+ "additionalProperties": false,
74
+ "required": ["run", "value"],
75
+ "properties": {
76
+ "run": { "$ref": "#/$defs/name" },
77
+ "value": { "enum": ["planned", "changed", "recreated", "output", "job"] },
78
+ "output": { "type": "string" }
79
+ }
80
+ },
81
+ {
82
+ "type": "object",
83
+ "additionalProperties": false,
84
+ "required": ["migration", "value"],
85
+ "properties": {
86
+ "migration": { "type": "string" },
87
+ "value": { "enum": ["stamped", "moved", "refused", "skipped", "writes", "version_id", "approved_by", "moved_resources", "stamped_resources", "refused_resources"] }
88
+ }
89
+ },
90
+ {
91
+ "description": "The distinct resources a tag write landed on across these migrations' progress lines.",
92
+ "type": "object",
93
+ "additionalProperties": false,
94
+ "required": ["tagged"],
95
+ "properties": { "tagged": { "type": "array", "minItems": 1, "items": { "type": "string" } } }
96
+ },
97
+ { "type": "object", "additionalProperties": false, "required": ["sum"], "properties": { "sum": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/name" } } } },
98
+ { "type": "object", "additionalProperties": false, "required": ["approvals"], "properties": { "approvals": { "const": true } } },
99
+ {
100
+ "type": "object",
101
+ "additionalProperties": false,
102
+ "required": ["duration"],
103
+ "properties": {
104
+ "duration": {
105
+ "type": "object",
106
+ "additionalProperties": false,
107
+ "required": ["from", "to"],
108
+ "properties": { "from": { "const": "started_at" }, "to": { "$ref": "#/$defs/name" } }
109
+ }
110
+ }
111
+ }
112
+ ]
113
+ },
114
+ "trigger": {
115
+ "oneOf": [
116
+ {
117
+ "type": "object",
118
+ "additionalProperties": false,
119
+ "minProperties": 1,
120
+ "properties": { "beat": { "type": "string" }, "step": { "type": "string" } }
121
+ },
122
+ {
123
+ "type": "object",
124
+ "additionalProperties": false,
125
+ "required": ["migration", "line"],
126
+ "properties": { "migration": { "type": "string" }, "line": { "enum": ["first", "last"] } }
127
+ },
128
+ {
129
+ "type": "object",
130
+ "additionalProperties": false,
131
+ "required": ["wave", "edge"],
132
+ "properties": { "wave": { "type": "integer", "minimum": 1 }, "edge": { "enum": ["start", "end"] }, "after": { "$ref": "#/$defs/name" } }
133
+ },
134
+ {
135
+ "type": "object",
136
+ "additionalProperties": false,
137
+ "required": ["any"],
138
+ "properties": { "any": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/trigger" } } }
139
+ }
140
+ ]
141
+ },
142
+ "show": {
143
+ "description": "One visual, each standing on a record: a run's plan, a migration record, the read threads of a plan.",
144
+ "type": "object",
145
+ "additionalProperties": false,
146
+ "minProperties": 1,
147
+ "properties": {
148
+ "light": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/name" }, "description": "Light what the first of these runs planned (the first that planned anything)." },
149
+ "pulse": { "$ref": "#/$defs/name", "description": "Pulse the boxes of the roots this run planned." },
150
+ "travel": { "$ref": "#/$defs/name", "description": "This plan's output value, along its read threads to its readers." },
151
+ "output": { "type": "string" },
152
+ "wave": { "type": "integer", "minimum": 1 },
153
+ "state": { "type": "string", "description": "A migration's source state file, by its version id." },
154
+ "checks": { "$ref": "#/$defs/name", "description": "Each root of this run that plans no change." },
155
+ "counts": { "const": "estates" },
156
+ "card": {
157
+ "type": "array",
158
+ "maxItems": 8,
159
+ "items": { "type": "object", "additionalProperties": false, "required": ["label", "text"], "properties": { "label": { "type": "string" }, "text": { "type": "string" } } }
160
+ },
161
+ "when": { "$ref": "#/$defs/trigger" }
162
+ }
163
+ },
164
+ "chapter": {
165
+ "type": "object",
166
+ "additionalProperties": false,
167
+ "required": ["id", "trigger", "title"],
168
+ "properties": {
169
+ "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]{0,31}$" },
170
+ "trigger": { "$ref": "#/$defs/trigger" },
171
+ "title": { "type": "string", "maxLength": 80 },
172
+ "text": { "type": "array", "maxItems": 2, "items": { "type": "string", "maxLength": 120 } },
173
+ "focus": {
174
+ "type": "object",
175
+ "additionalProperties": false,
176
+ "properties": { "boxes": { "enum": ["source", "all", "lit"] } }
177
+ },
178
+ "show": { "type": "array", "maxItems": 8, "items": { "$ref": "#/$defs/show" } }
179
+ }
180
+ }
181
+ }
182
+ }
@@ -0,0 +1,330 @@
1
+ {
2
+ "schema": "behold.tour/v1",
3
+ "name": "terralith",
4
+ "title": "The terralith's story",
5
+ "match": {
6
+ "tool": "terralith"
7
+ },
8
+ "home": "demo-terralith",
9
+ "steps": [
10
+ "pull-request",
11
+ "planned",
12
+ "merged",
13
+ "applying",
14
+ "waiting",
15
+ "approved",
16
+ "resumed",
17
+ "applied"
18
+ ],
19
+ "runs": {
20
+ "stock": {
21
+ "repo": "{repo}",
22
+ "stage": "tf-apply",
23
+ "pull": null,
24
+ "pick": "first"
25
+ },
26
+ "adopt": {
27
+ "migration": "adopt"
28
+ },
29
+ "split": {
30
+ "migration": "split"
31
+ },
32
+ "team": {
33
+ "repo": "{repo}-team-b",
34
+ "stage": "tf-plan",
35
+ "pick": "first"
36
+ },
37
+ "teamApply": {
38
+ "repo": "{repo}-team-b",
39
+ "stage": "tf-apply",
40
+ "pick": "first"
41
+ },
42
+ "crossPlan": {
43
+ "repo": "{repo}",
44
+ "stage": "tf-plan",
45
+ "after": "teamApply",
46
+ "pick": "last"
47
+ },
48
+ "cross1": {
49
+ "repo": "{repo}",
50
+ "stage": "tf-apply",
51
+ "wave": 1,
52
+ "after": "crossPlan",
53
+ "pick": "last"
54
+ },
55
+ "cross2": {
56
+ "repo": "{repo}",
57
+ "stage": "tf-apply",
58
+ "wave": 2,
59
+ "after": "crossPlan",
60
+ "pick": "last"
61
+ }
62
+ },
63
+ "facts": {
64
+ "planned": {
65
+ "run": "stock",
66
+ "value": "planned"
67
+ },
68
+ "of": {
69
+ "run": "stock",
70
+ "value": "planned"
71
+ },
72
+ "stamped": {
73
+ "migration": "adopt",
74
+ "value": "stamped_resources"
75
+ },
76
+ "moved": {
77
+ "migration": "split",
78
+ "value": "moved_resources"
79
+ },
80
+ "refused": {
81
+ "migration": "split",
82
+ "value": "refused_resources"
83
+ },
84
+ "teamPlanned": {
85
+ "run": "team",
86
+ "value": "planned"
87
+ },
88
+ "teamChanged": {
89
+ "run": "team",
90
+ "value": "changed"
91
+ },
92
+ "value": {
93
+ "run": "crossPlan",
94
+ "value": "output",
95
+ "output": "log_retention_days"
96
+ },
97
+ "adoptRecreated": {
98
+ "run": "adopt",
99
+ "value": "recreated"
100
+ },
101
+ "splitRecreated": {
102
+ "run": "split",
103
+ "value": "recreated"
104
+ },
105
+ "recreated": {
106
+ "sum": [
107
+ "adoptRecreated",
108
+ "splitRecreated"
109
+ ]
110
+ },
111
+ "approvals": {
112
+ "approvals": true
113
+ },
114
+ "cycleTime": {
115
+ "duration": {
116
+ "from": "started_at",
117
+ "to": "cross2"
118
+ }
119
+ },
120
+ "tagged": {
121
+ "tagged": [
122
+ "adopt",
123
+ "split"
124
+ ]
125
+ }
126
+ },
127
+ "chapters": [
128
+ {
129
+ "id": "stock",
130
+ "trigger": {
131
+ "beat": "stock"
132
+ },
133
+ "title": "One state for everything",
134
+ "text": [
135
+ "Every resource lives in one state file.",
136
+ "Any change plans {planned} of {of} and waits on one lock."
137
+ ],
138
+ "focus": {
139
+ "boxes": "source"
140
+ },
141
+ "show": [
142
+ {
143
+ "light": [
144
+ "stock"
145
+ ]
146
+ }
147
+ ]
148
+ },
149
+ {
150
+ "id": "adopt",
151
+ "trigger": {
152
+ "beat": "adopt"
153
+ },
154
+ "title": "Adopt: claim every resource without touching it",
155
+ "text": [
156
+ "Each resource gets its owner's tags. Nothing is rebuilt.",
157
+ "{stamped} resources tagged, and the state file stays as it was."
158
+ ],
159
+ "focus": {
160
+ "boxes": "source"
161
+ },
162
+ "show": [
163
+ {
164
+ "state": "adopt"
165
+ }
166
+ ]
167
+ },
168
+ {
169
+ "id": "split",
170
+ "trigger": {
171
+ "beat": "split"
172
+ },
173
+ "title": "Split: move ownership, not resources",
174
+ "text": [
175
+ "Each team's resources move to its own estate by a tag write.",
176
+ "{moved} resources moved, {refused} refused."
177
+ ],
178
+ "focus": {
179
+ "boxes": "all"
180
+ },
181
+ "show": [
182
+ {
183
+ "counts": "estates"
184
+ },
185
+ {
186
+ "checks": "split",
187
+ "when": {
188
+ "migration": "split",
189
+ "line": "last"
190
+ }
191
+ }
192
+ ]
193
+ },
194
+ {
195
+ "id": "team",
196
+ "trigger": {
197
+ "beat": "team"
198
+ },
199
+ "title": "A small change stays small",
200
+ "text": [
201
+ "Team B changes one policy, and only team B is planned.",
202
+ "Planned {teamPlanned} of {of} · chapter 1: {planned} of {of}"
203
+ ],
204
+ "focus": {
205
+ "boxes": "lit"
206
+ },
207
+ "show": [
208
+ {
209
+ "light": [
210
+ "team"
211
+ ]
212
+ }
213
+ ]
214
+ },
215
+ {
216
+ "id": "cross",
217
+ "trigger": {
218
+ "beat": "cross"
219
+ },
220
+ "title": "A change across estates",
221
+ "text": [
222
+ "The terralith publishes a value, and each team reads it.",
223
+ "Wave 1 plans the terralith; wave 2 plans the teams on {value}."
224
+ ],
225
+ "focus": {
226
+ "boxes": "all"
227
+ },
228
+ "show": [
229
+ {
230
+ "pulse": "crossPlan",
231
+ "wave": 1,
232
+ "when": {
233
+ "wave": 1,
234
+ "edge": "start",
235
+ "after": "crossPlan"
236
+ }
237
+ },
238
+ {
239
+ "travel": "crossPlan",
240
+ "output": "log_retention_days",
241
+ "when": {
242
+ "wave": 1,
243
+ "edge": "end",
244
+ "after": "crossPlan"
245
+ }
246
+ },
247
+ {
248
+ "light": [
249
+ "cross2",
250
+ "crossPlan"
251
+ ],
252
+ "wave": 2,
253
+ "when": {
254
+ "wave": 2,
255
+ "edge": "start",
256
+ "after": "crossPlan"
257
+ }
258
+ }
259
+ ]
260
+ },
261
+ {
262
+ "id": "epilogue",
263
+ "trigger": {
264
+ "any": [
265
+ {
266
+ "beat": "cross",
267
+ "step": "applied"
268
+ },
269
+ {
270
+ "step": "reset"
271
+ }
272
+ ]
273
+ },
274
+ "title": "This cycle, in numbers",
275
+ "text": [
276
+ "Then the reset: the next cycle starts from a new terralith."
277
+ ],
278
+ "focus": {
279
+ "boxes": "all"
280
+ },
281
+ "show": [
282
+ {
283
+ "travel": "crossPlan",
284
+ "output": "log_retention_days",
285
+ "when": {
286
+ "wave": 1,
287
+ "edge": "end",
288
+ "after": "crossPlan"
289
+ }
290
+ },
291
+ {
292
+ "light": [
293
+ "cross2",
294
+ "crossPlan"
295
+ ],
296
+ "wave": 2,
297
+ "when": {
298
+ "wave": 2,
299
+ "edge": "start",
300
+ "after": "crossPlan"
301
+ }
302
+ },
303
+ {
304
+ "card": [
305
+ {
306
+ "label": "cycle time",
307
+ "text": "{cycleTime}"
308
+ },
309
+ {
310
+ "label": "resources tagged",
311
+ "text": "{tagged}"
312
+ },
313
+ {
314
+ "label": "resources recreated",
315
+ "text": "{recreated}"
316
+ },
317
+ {
318
+ "label": "approvals",
319
+ "text": "{approvals}"
320
+ },
321
+ {
322
+ "label": "planned per change",
323
+ "text": "{planned} before, {teamPlanned} after"
324
+ }
325
+ ]
326
+ }
327
+ ]
328
+ }
329
+ ]
330
+ }