@kurvball/rehearse 1.7.0 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/commands/stage.js +19 -3
  2. package/dist/schema.d.ts +1 -1
  3. package/dist/schema.js +1 -0
  4. package/dist/stage/client/client/api.js +4 -1
  5. package/dist/stage/client/client/index.js +1 -0
  6. package/dist/stage/client/client/static.js +28 -0
  7. package/dist/stage/client/features/canvas/call.js +12 -3
  8. package/dist/stage/client/features/canvas/file.js +4 -2
  9. package/dist/stage/client/features/canvas/piece.js +12 -2
  10. package/dist/stage/client/features/list/list.js +6 -1
  11. package/dist/stage/client/features/scenario/heading.js +3 -2
  12. package/dist/stage/client/features/scenario/scenario.js +8 -4
  13. package/dist/stage/client/main.js +7 -3
  14. package/dist/stage/client/stage.css +11 -0
  15. package/dist/stage/compared.d.ts +7 -1
  16. package/dist/stage/compared.js +16 -4
  17. package/dist/stage/files.d.ts +1 -0
  18. package/dist/stage/files.js +6 -4
  19. package/dist/stage/index.d.ts +1 -0
  20. package/dist/stage/index.js +1 -0
  21. package/dist/stage/public.d.ts +9 -0
  22. package/dist/stage/public.js +107 -0
  23. package/dist/stage/server.js +2 -2
  24. package/dist/stage/static.d.ts +22 -0
  25. package/dist/stage/static.js +241 -0
  26. package/llms.txt +2 -1
  27. package/package.json +1 -1
  28. package/schema/v1/samples/static.json +21 -0
  29. package/schema/v1/static.schema.json +34 -0
  30. package/schema/vendor/acta/LICENSE +21 -0
  31. package/schema/vendor/acta/README.md +12 -0
  32. package/schema/vendor/acta/v1/canonical.schema.json +818 -0
  33. package/schema/vendor/acta/v1/check.schema.json +35 -0
  34. package/schema/vendor/acta/v1/record.schema.json +1443 -0
  35. package/schema/vendor/acta/v1/run-model.schema.json +1074 -0
  36. package/skill/rehearse/SKILL.md +1 -0
@@ -0,0 +1,1074 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://acta.kurvball.ca/schema/v1/run-model.schema.json",
4
+ "title": "Acta run model",
5
+ "description": "A record folded into its state at one moment: the runs, their turns and steps, the asks and the documents.",
6
+ "type": "object",
7
+ "properties": {
8
+ "runs": {
9
+ "type": "array",
10
+ "items": {
11
+ "$ref": "#/$defs/Run"
12
+ }
13
+ },
14
+ "turns": {
15
+ "type": "array",
16
+ "items": {
17
+ "$ref": "#/$defs/Turn"
18
+ }
19
+ },
20
+ "asks": {
21
+ "type": "array",
22
+ "items": {
23
+ "$ref": "#/$defs/Ask"
24
+ }
25
+ },
26
+ "docs": {
27
+ "type": "array",
28
+ "items": {
29
+ "$ref": "#/$defs/Doc"
30
+ }
31
+ }
32
+ },
33
+ "required": [
34
+ "runs",
35
+ "turns",
36
+ "asks",
37
+ "docs"
38
+ ],
39
+ "$defs": {
40
+ "RunState": {
41
+ "type": "string",
42
+ "enum": [
43
+ "working",
44
+ "waiting",
45
+ "done",
46
+ "failed",
47
+ "stopped"
48
+ ]
49
+ },
50
+ "Run": {
51
+ "type": "object",
52
+ "properties": {
53
+ "id": {
54
+ "type": "string",
55
+ "minLength": 1
56
+ },
57
+ "title": {
58
+ "type": "string"
59
+ },
60
+ "parent": {
61
+ "type": "string",
62
+ "minLength": 1
63
+ },
64
+ "activity": {
65
+ "type": "string"
66
+ },
67
+ "fork": {
68
+ "type": "object",
69
+ "properties": {
70
+ "reason": {
71
+ "type": "string"
72
+ },
73
+ "step": {
74
+ "type": "string",
75
+ "minLength": 1
76
+ },
77
+ "group": {
78
+ "type": "string",
79
+ "minLength": 1
80
+ }
81
+ },
82
+ "required": [
83
+ "reason"
84
+ ]
85
+ },
86
+ "join": {
87
+ "type": "object",
88
+ "properties": {
89
+ "into": {
90
+ "type": "string",
91
+ "minLength": 1
92
+ },
93
+ "quorum": {
94
+ "type": "string",
95
+ "enum": [
96
+ "all",
97
+ "each",
98
+ "none"
99
+ ]
100
+ }
101
+ },
102
+ "required": [
103
+ "into",
104
+ "quorum"
105
+ ]
106
+ },
107
+ "model": {
108
+ "type": "string"
109
+ },
110
+ "told": {
111
+ "type": "object",
112
+ "properties": {
113
+ "role": {
114
+ "type": "object",
115
+ "properties": {
116
+ "id": {
117
+ "type": "string",
118
+ "pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$"
119
+ },
120
+ "version": {
121
+ "type": "integer",
122
+ "minimum": 1
123
+ },
124
+ "hash": {
125
+ "type": "string",
126
+ "pattern": "^[0-9a-f]{64}$"
127
+ }
128
+ },
129
+ "required": [
130
+ "id",
131
+ "version",
132
+ "hash"
133
+ ]
134
+ },
135
+ "rendering": {
136
+ "type": "string",
137
+ "pattern": "^[0-9a-f]{64}$"
138
+ },
139
+ "target": {
140
+ "type": "string",
141
+ "pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$"
142
+ }
143
+ },
144
+ "required": [
145
+ "role",
146
+ "rendering",
147
+ "target"
148
+ ]
149
+ },
150
+ "cwd": {
151
+ "type": "string"
152
+ },
153
+ "state": {
154
+ "$ref": "#/$defs/RunState"
155
+ },
156
+ "reason": {
157
+ "type": "string",
158
+ "pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$"
159
+ },
160
+ "started": {
161
+ "type": "string",
162
+ "format": "date-time"
163
+ },
164
+ "ended": {
165
+ "type": "string",
166
+ "format": "date-time"
167
+ },
168
+ "todos": {
169
+ "type": "array",
170
+ "items": {
171
+ "$ref": "#/$defs/Todo"
172
+ }
173
+ },
174
+ "checkpoints": {
175
+ "type": "array",
176
+ "items": {
177
+ "$ref": "#/$defs/Checkpoint"
178
+ }
179
+ },
180
+ "compactions": {
181
+ "type": "array",
182
+ "items": {
183
+ "$ref": "#/$defs/Compaction"
184
+ }
185
+ }
186
+ },
187
+ "required": [
188
+ "id",
189
+ "title",
190
+ "state",
191
+ "started"
192
+ ]
193
+ },
194
+ "Todo": {
195
+ "type": "object",
196
+ "properties": {
197
+ "text": {
198
+ "type": "string"
199
+ },
200
+ "state": {
201
+ "type": "string",
202
+ "enum": [
203
+ "pending",
204
+ "working",
205
+ "done"
206
+ ]
207
+ },
208
+ "doing": {
209
+ "type": "string"
210
+ }
211
+ },
212
+ "required": [
213
+ "text",
214
+ "state"
215
+ ]
216
+ },
217
+ "Checkpoint": {
218
+ "type": "object",
219
+ "properties": {
220
+ "id": {
221
+ "type": "string",
222
+ "minLength": 1
223
+ },
224
+ "turn": {
225
+ "type": "string",
226
+ "minLength": 1
227
+ },
228
+ "files": {
229
+ "type": "array",
230
+ "items": {
231
+ "type": "string"
232
+ }
233
+ },
234
+ "at": {
235
+ "type": "string",
236
+ "format": "date-time"
237
+ },
238
+ "restored": {
239
+ "type": "string",
240
+ "format": "date-time"
241
+ }
242
+ },
243
+ "required": [
244
+ "id",
245
+ "at"
246
+ ]
247
+ },
248
+ "Compaction": {
249
+ "type": "object",
250
+ "properties": {
251
+ "trigger": {
252
+ "type": "string",
253
+ "pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$"
254
+ },
255
+ "before": {
256
+ "type": "integer",
257
+ "minimum": 0
258
+ },
259
+ "after": {
260
+ "type": "integer",
261
+ "minimum": 0
262
+ },
263
+ "at": {
264
+ "type": "string",
265
+ "format": "date-time"
266
+ }
267
+ },
268
+ "required": [
269
+ "trigger",
270
+ "at"
271
+ ]
272
+ },
273
+ "Speaker": {
274
+ "type": "object",
275
+ "properties": {
276
+ "kind": {
277
+ "type": "string",
278
+ "enum": [
279
+ "person",
280
+ "agent",
281
+ "teammate",
282
+ "system"
283
+ ]
284
+ },
285
+ "name": {
286
+ "type": "string"
287
+ }
288
+ },
289
+ "required": [
290
+ "kind",
291
+ "name"
292
+ ]
293
+ },
294
+ "Attachment": {
295
+ "type": "object",
296
+ "properties": {
297
+ "id": {
298
+ "type": "string",
299
+ "minLength": 1
300
+ },
301
+ "name": {
302
+ "type": "string"
303
+ },
304
+ "kind": {
305
+ "type": "string",
306
+ "enum": [
307
+ "file",
308
+ "image",
309
+ "text"
310
+ ]
311
+ },
312
+ "size": {
313
+ "type": "number",
314
+ "minimum": 0
315
+ }
316
+ },
317
+ "required": [
318
+ "id",
319
+ "name",
320
+ "kind"
321
+ ]
322
+ },
323
+ "Step": {
324
+ "type": "object",
325
+ "properties": {
326
+ "id": {
327
+ "type": "string",
328
+ "minLength": 1
329
+ },
330
+ "kind": {
331
+ "type": "string",
332
+ "enum": [
333
+ "think",
334
+ "read",
335
+ "edit",
336
+ "search",
337
+ "command",
338
+ "web",
339
+ "tool",
340
+ "note"
341
+ ]
342
+ },
343
+ "label": {
344
+ "type": "string"
345
+ },
346
+ "state": {
347
+ "type": "string",
348
+ "enum": [
349
+ "running",
350
+ "ok",
351
+ "failed",
352
+ "refused"
353
+ ]
354
+ },
355
+ "detail": {
356
+ "type": "string"
357
+ },
358
+ "started": {
359
+ "type": "string",
360
+ "format": "date-time"
361
+ },
362
+ "ended": {
363
+ "type": "string",
364
+ "format": "date-time"
365
+ },
366
+ "run": {
367
+ "type": "string",
368
+ "minLength": 1
369
+ },
370
+ "ownKind": {
371
+ "type": "string",
372
+ "pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$"
373
+ },
374
+ "tool": {
375
+ "$ref": "#/$defs/Tool"
376
+ },
377
+ "slot": {
378
+ "$ref": "#/$defs/Slot"
379
+ },
380
+ "reason": {
381
+ "type": "string",
382
+ "pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$"
383
+ },
384
+ "exit": {
385
+ "type": "integer"
386
+ },
387
+ "files": {
388
+ "type": "array",
389
+ "items": {
390
+ "$ref": "#/$defs/StepFile"
391
+ }
392
+ }
393
+ },
394
+ "required": [
395
+ "id",
396
+ "kind",
397
+ "label",
398
+ "state",
399
+ "started"
400
+ ]
401
+ },
402
+ "Tool": {
403
+ "type": "object",
404
+ "properties": {
405
+ "name": {
406
+ "type": "string"
407
+ },
408
+ "call": {
409
+ "type": "string"
410
+ },
411
+ "input": {}
412
+ },
413
+ "required": [
414
+ "name"
415
+ ]
416
+ },
417
+ "Slot": {
418
+ "type": "object",
419
+ "properties": {
420
+ "response": {
421
+ "type": "integer",
422
+ "minimum": 1
423
+ },
424
+ "call": {
425
+ "type": "integer",
426
+ "minimum": 1
427
+ }
428
+ },
429
+ "required": [
430
+ "response",
431
+ "call"
432
+ ]
433
+ },
434
+ "Usage": {
435
+ "type": "object",
436
+ "properties": {
437
+ "input": {
438
+ "type": "integer",
439
+ "minimum": 0
440
+ },
441
+ "output": {
442
+ "type": "integer",
443
+ "minimum": 0
444
+ },
445
+ "cacheRead": {
446
+ "type": "integer",
447
+ "minimum": 0
448
+ },
449
+ "cacheWrite": {
450
+ "type": "integer",
451
+ "minimum": 0
452
+ },
453
+ "reasoning": {
454
+ "type": "integer",
455
+ "minimum": 0
456
+ }
457
+ },
458
+ "required": []
459
+ },
460
+ "StepFile": {
461
+ "type": "object",
462
+ "properties": {
463
+ "path": {
464
+ "type": "string"
465
+ },
466
+ "change": {
467
+ "type": "string",
468
+ "enum": [
469
+ "added",
470
+ "changed",
471
+ "removed",
472
+ "read"
473
+ ]
474
+ },
475
+ "added": {
476
+ "type": "integer",
477
+ "minimum": 0
478
+ },
479
+ "removed": {
480
+ "type": "integer",
481
+ "minimum": 0
482
+ }
483
+ },
484
+ "required": [
485
+ "path",
486
+ "change"
487
+ ]
488
+ },
489
+ "Call": {
490
+ "type": "object",
491
+ "properties": {
492
+ "response": {
493
+ "type": "integer",
494
+ "minimum": 1
495
+ },
496
+ "id": {
497
+ "type": "string"
498
+ },
499
+ "model": {
500
+ "type": "string"
501
+ },
502
+ "provider": {
503
+ "type": "string",
504
+ "pattern": "^[a-z][a-z0-9_.-]*$"
505
+ },
506
+ "finish": {
507
+ "type": "string",
508
+ "pattern": "^[a-z][a-z0-9_.-]*$"
509
+ },
510
+ "usage": {
511
+ "$ref": "#/$defs/Usage"
512
+ }
513
+ },
514
+ "required": [
515
+ "usage"
516
+ ]
517
+ },
518
+ "Turn": {
519
+ "type": "object",
520
+ "properties": {
521
+ "id": {
522
+ "type": "string",
523
+ "minLength": 1
524
+ },
525
+ "run": {
526
+ "type": "string",
527
+ "minLength": 1
528
+ },
529
+ "speaker": {
530
+ "$ref": "#/$defs/Speaker"
531
+ },
532
+ "text": {
533
+ "type": "string"
534
+ },
535
+ "activity": {
536
+ "type": "string"
537
+ },
538
+ "state": {
539
+ "type": "string",
540
+ "enum": [
541
+ "streaming",
542
+ "done",
543
+ "stopped",
544
+ "failed"
545
+ ]
546
+ },
547
+ "steps": {
548
+ "type": "array",
549
+ "items": {
550
+ "$ref": "#/$defs/Step"
551
+ }
552
+ },
553
+ "attachments": {
554
+ "type": "array",
555
+ "items": {
556
+ "$ref": "#/$defs/Attachment"
557
+ }
558
+ },
559
+ "started": {
560
+ "type": "string",
561
+ "format": "date-time"
562
+ },
563
+ "ended": {
564
+ "type": "string",
565
+ "format": "date-time"
566
+ },
567
+ "said": {
568
+ "type": "array",
569
+ "items": {
570
+ "type": "object",
571
+ "properties": {
572
+ "response": {
573
+ "type": "integer",
574
+ "minimum": 1
575
+ },
576
+ "text": {
577
+ "type": "string"
578
+ }
579
+ },
580
+ "required": [
581
+ "text"
582
+ ]
583
+ }
584
+ },
585
+ "calls": {
586
+ "type": "array",
587
+ "items": {
588
+ "$ref": "#/$defs/Call"
589
+ }
590
+ },
591
+ "usage": {
592
+ "$ref": "#/$defs/Usage"
593
+ },
594
+ "model": {
595
+ "type": "string"
596
+ },
597
+ "provider": {
598
+ "type": "string",
599
+ "pattern": "^[a-z][a-z0-9_.-]*$"
600
+ },
601
+ "finish": {
602
+ "type": "string",
603
+ "pattern": "^[a-z][a-z0-9_.-]*$"
604
+ },
605
+ "reason": {
606
+ "type": "string",
607
+ "pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$"
608
+ },
609
+ "output": {},
610
+ "streaming": {
611
+ "type": "string"
612
+ }
613
+ },
614
+ "required": [
615
+ "id",
616
+ "run",
617
+ "speaker",
618
+ "text",
619
+ "state",
620
+ "steps",
621
+ "attachments",
622
+ "started"
623
+ ]
624
+ },
625
+ "Choice": {
626
+ "type": "object",
627
+ "properties": {
628
+ "id": {
629
+ "type": "string",
630
+ "minLength": 1
631
+ },
632
+ "label": {
633
+ "type": "string"
634
+ },
635
+ "intent": {
636
+ "type": "string",
637
+ "enum": [
638
+ "approve",
639
+ "decline"
640
+ ]
641
+ }
642
+ },
643
+ "required": [
644
+ "id",
645
+ "label"
646
+ ]
647
+ },
648
+ "Answer": {
649
+ "type": "object",
650
+ "properties": {
651
+ "choice": {
652
+ "type": "string",
653
+ "minLength": 1
654
+ },
655
+ "choices": {
656
+ "type": "array",
657
+ "items": {
658
+ "type": "string",
659
+ "minLength": 1
660
+ }
661
+ },
662
+ "text": {
663
+ "type": "string"
664
+ },
665
+ "by": {
666
+ "type": "string"
667
+ },
668
+ "input": {},
669
+ "interrupt": {
670
+ "type": "boolean"
671
+ },
672
+ "at": {
673
+ "type": "string",
674
+ "format": "date-time"
675
+ }
676
+ },
677
+ "required": [
678
+ "by",
679
+ "at"
680
+ ]
681
+ },
682
+ "Ask": {
683
+ "type": "object",
684
+ "properties": {
685
+ "id": {
686
+ "type": "string",
687
+ "minLength": 1
688
+ },
689
+ "run": {
690
+ "type": "string",
691
+ "minLength": 1
692
+ },
693
+ "step": {
694
+ "type": "string",
695
+ "minLength": 1
696
+ },
697
+ "from": {
698
+ "type": "string"
699
+ },
700
+ "says": {
701
+ "type": "string"
702
+ },
703
+ "choices": {
704
+ "type": "array",
705
+ "items": {
706
+ "$ref": "#/$defs/Choice"
707
+ }
708
+ },
709
+ "other": {
710
+ "type": "boolean"
711
+ },
712
+ "risk": {
713
+ "type": "string"
714
+ },
715
+ "command": {
716
+ "type": "string"
717
+ },
718
+ "waiting": {
719
+ "type": "string",
720
+ "enum": [
721
+ "blocked",
722
+ "going-ahead",
723
+ "your-call"
724
+ ]
725
+ },
726
+ "state": {
727
+ "type": "string",
728
+ "enum": [
729
+ "open",
730
+ "answered",
731
+ "withdrawn"
732
+ ]
733
+ },
734
+ "asked": {
735
+ "type": "string",
736
+ "format": "date-time"
737
+ },
738
+ "answer": {
739
+ "$ref": "#/$defs/Answer"
740
+ },
741
+ "kind": {
742
+ "type": "string",
743
+ "enum": [
744
+ "permission",
745
+ "question",
746
+ "plan",
747
+ "input"
748
+ ]
749
+ },
750
+ "multiple": {
751
+ "type": "boolean"
752
+ },
753
+ "tool": {
754
+ "type": "string"
755
+ },
756
+ "title": {
757
+ "type": "string"
758
+ },
759
+ "why": {
760
+ "type": "string"
761
+ },
762
+ "path": {
763
+ "type": "string"
764
+ },
765
+ "suggestions": {
766
+ "type": "array",
767
+ "items": {}
768
+ },
769
+ "confirm": {
770
+ "type": "string",
771
+ "enum": [
772
+ "explicit"
773
+ ]
774
+ },
775
+ "remember": {
776
+ "type": "boolean"
777
+ },
778
+ "input": {},
779
+ "ownKind": {
780
+ "type": "string",
781
+ "pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$"
782
+ }
783
+ },
784
+ "required": [
785
+ "id",
786
+ "run",
787
+ "from",
788
+ "says",
789
+ "choices",
790
+ "waiting",
791
+ "state",
792
+ "asked"
793
+ ]
794
+ },
795
+ "FileEntry": {
796
+ "type": "object",
797
+ "properties": {
798
+ "path": {
799
+ "type": "string"
800
+ },
801
+ "change": {
802
+ "type": "string",
803
+ "enum": [
804
+ "added",
805
+ "changed",
806
+ "removed",
807
+ "read"
808
+ ]
809
+ }
810
+ },
811
+ "required": [
812
+ "path",
813
+ "change"
814
+ ]
815
+ },
816
+ "Block": {
817
+ "type": "object",
818
+ "properties": {
819
+ "kind": {
820
+ "type": "string",
821
+ "minLength": 1
822
+ }
823
+ },
824
+ "required": [
825
+ "kind"
826
+ ],
827
+ "allOf": [
828
+ {
829
+ "if": {
830
+ "properties": {
831
+ "kind": {
832
+ "const": "text"
833
+ }
834
+ },
835
+ "required": [
836
+ "kind"
837
+ ]
838
+ },
839
+ "then": {
840
+ "type": "object",
841
+ "properties": {
842
+ "text": {
843
+ "type": "string"
844
+ }
845
+ },
846
+ "required": [
847
+ "text"
848
+ ]
849
+ }
850
+ },
851
+ {
852
+ "if": {
853
+ "properties": {
854
+ "kind": {
855
+ "const": "callout"
856
+ }
857
+ },
858
+ "required": [
859
+ "kind"
860
+ ]
861
+ },
862
+ "then": {
863
+ "type": "object",
864
+ "properties": {
865
+ "tone": {
866
+ "type": "string",
867
+ "enum": [
868
+ "note",
869
+ "tip",
870
+ "important",
871
+ "warning",
872
+ "caution"
873
+ ]
874
+ },
875
+ "text": {
876
+ "type": "string"
877
+ },
878
+ "title": {
879
+ "type": "string"
880
+ }
881
+ },
882
+ "required": [
883
+ "tone",
884
+ "text"
885
+ ]
886
+ }
887
+ },
888
+ {
889
+ "if": {
890
+ "properties": {
891
+ "kind": {
892
+ "const": "quote"
893
+ }
894
+ },
895
+ "required": [
896
+ "kind"
897
+ ]
898
+ },
899
+ "then": {
900
+ "type": "object",
901
+ "properties": {
902
+ "text": {
903
+ "type": "string"
904
+ },
905
+ "source": {
906
+ "type": "string"
907
+ },
908
+ "run": {
909
+ "type": "string",
910
+ "minLength": 1
911
+ }
912
+ },
913
+ "required": [
914
+ "text"
915
+ ]
916
+ }
917
+ },
918
+ {
919
+ "if": {
920
+ "properties": {
921
+ "kind": {
922
+ "const": "figure"
923
+ }
924
+ },
925
+ "required": [
926
+ "kind"
927
+ ]
928
+ },
929
+ "then": {
930
+ "type": "object",
931
+ "properties": {
932
+ "alt": {
933
+ "type": "string"
934
+ },
935
+ "src": {
936
+ "type": "string"
937
+ },
938
+ "caption": {
939
+ "type": "string"
940
+ }
941
+ },
942
+ "required": [
943
+ "alt"
944
+ ]
945
+ }
946
+ },
947
+ {
948
+ "if": {
949
+ "properties": {
950
+ "kind": {
951
+ "const": "files"
952
+ }
953
+ },
954
+ "required": [
955
+ "kind"
956
+ ]
957
+ },
958
+ "then": {
959
+ "type": "object",
960
+ "properties": {
961
+ "files": {
962
+ "type": "array",
963
+ "items": {
964
+ "$ref": "#/$defs/FileEntry"
965
+ }
966
+ }
967
+ },
968
+ "required": [
969
+ "files"
970
+ ]
971
+ }
972
+ },
973
+ {
974
+ "if": {
975
+ "properties": {
976
+ "kind": {
977
+ "const": "code"
978
+ }
979
+ },
980
+ "required": [
981
+ "kind"
982
+ ]
983
+ },
984
+ "then": {
985
+ "type": "object",
986
+ "properties": {
987
+ "code": {
988
+ "type": "string"
989
+ },
990
+ "language": {
991
+ "type": "string"
992
+ }
993
+ },
994
+ "required": [
995
+ "code"
996
+ ]
997
+ }
998
+ }
999
+ ]
1000
+ },
1001
+ "Section": {
1002
+ "type": "object",
1003
+ "properties": {
1004
+ "id": {
1005
+ "type": "string",
1006
+ "minLength": 1
1007
+ },
1008
+ "heading": {
1009
+ "type": "string"
1010
+ },
1011
+ "state": {
1012
+ "type": "string",
1013
+ "enum": [
1014
+ "writing",
1015
+ "ready",
1016
+ "changed"
1017
+ ]
1018
+ },
1019
+ "blocks": {
1020
+ "type": "array",
1021
+ "items": {
1022
+ "$ref": "#/$defs/Block"
1023
+ }
1024
+ },
1025
+ "before": {
1026
+ "type": "string"
1027
+ }
1028
+ },
1029
+ "required": [
1030
+ "id",
1031
+ "heading",
1032
+ "blocks"
1033
+ ]
1034
+ },
1035
+ "Doc": {
1036
+ "type": "object",
1037
+ "properties": {
1038
+ "id": {
1039
+ "type": "string",
1040
+ "minLength": 1
1041
+ },
1042
+ "run": {
1043
+ "type": "string",
1044
+ "minLength": 1
1045
+ },
1046
+ "title": {
1047
+ "type": "string"
1048
+ },
1049
+ "kind": {
1050
+ "type": "string"
1051
+ },
1052
+ "state": {
1053
+ "type": "string",
1054
+ "enum": [
1055
+ "draft",
1056
+ "writing",
1057
+ "ready"
1058
+ ]
1059
+ },
1060
+ "sections": {
1061
+ "type": "array",
1062
+ "items": {
1063
+ "$ref": "#/$defs/Section"
1064
+ }
1065
+ }
1066
+ },
1067
+ "required": [
1068
+ "id",
1069
+ "title",
1070
+ "sections"
1071
+ ]
1072
+ }
1073
+ }
1074
+ }