@kurvball/rehearse 1.8.0 → 1.10.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 (74) hide show
  1. package/README.md +3 -2
  2. package/dist/commands/init.js +52 -7
  3. package/dist/commands/stage.js +19 -3
  4. package/dist/detect/detect.d.ts +6 -0
  5. package/dist/detect/detect.js +48 -0
  6. package/dist/detect/finding.d.ts +18 -0
  7. package/dist/detect/finding.js +4 -0
  8. package/dist/detect/globs.d.ts +10 -0
  9. package/dist/detect/globs.js +43 -0
  10. package/dist/detect/index.d.ts +2 -0
  11. package/dist/detect/index.js +2 -0
  12. package/dist/detect/lockfiles.d.ts +15 -0
  13. package/dist/detect/lockfiles.js +64 -0
  14. package/dist/detect/paths.d.ts +5 -0
  15. package/dist/detect/paths.js +39 -0
  16. package/dist/detect/pieces.d.ts +14 -0
  17. package/dist/detect/pieces.js +119 -0
  18. package/dist/detect/prepare.d.ts +14 -0
  19. package/dist/detect/prepare.js +78 -0
  20. package/dist/detect/repository.d.ts +33 -0
  21. package/dist/detect/repository.js +166 -0
  22. package/dist/detect/scenarios.d.ts +26 -0
  23. package/dist/detect/scenarios.js +170 -0
  24. package/dist/detect/scripts.d.ts +46 -0
  25. package/dist/detect/scripts.js +233 -0
  26. package/dist/detect/services.d.ts +16 -0
  27. package/dist/detect/services.js +171 -0
  28. package/dist/detect/write.d.ts +18 -0
  29. package/dist/detect/write.js +115 -0
  30. package/dist/manifest/index.d.ts +1 -1
  31. package/dist/manifest/index.js +1 -1
  32. package/dist/manifest/init.d.ts +47 -1
  33. package/dist/manifest/init.js +19 -16
  34. package/dist/scenarios/glob.d.ts +1 -0
  35. package/dist/scenarios/glob.js +10 -3
  36. package/dist/scenarios/index.d.ts +1 -1
  37. package/dist/scenarios/index.js +1 -1
  38. package/dist/schema.d.ts +1 -1
  39. package/dist/schema.js +1 -0
  40. package/dist/stage/client/client/api.js +4 -1
  41. package/dist/stage/client/client/index.js +1 -0
  42. package/dist/stage/client/client/static.js +28 -0
  43. package/dist/stage/client/features/canvas/call.js +12 -3
  44. package/dist/stage/client/features/canvas/file.js +4 -2
  45. package/dist/stage/client/features/canvas/piece.js +12 -2
  46. package/dist/stage/client/features/list/list.js +6 -1
  47. package/dist/stage/client/features/scenario/heading.js +3 -2
  48. package/dist/stage/client/features/scenario/scenario.js +8 -4
  49. package/dist/stage/client/main.js +7 -3
  50. package/dist/stage/client/stage.css +11 -0
  51. package/dist/stage/compared.d.ts +7 -1
  52. package/dist/stage/compared.js +16 -4
  53. package/dist/stage/files.d.ts +1 -0
  54. package/dist/stage/files.js +6 -4
  55. package/dist/stage/index.d.ts +1 -0
  56. package/dist/stage/index.js +1 -0
  57. package/dist/stage/public.d.ts +9 -0
  58. package/dist/stage/public.js +107 -0
  59. package/dist/stage/server.js +2 -2
  60. package/dist/stage/static.d.ts +22 -0
  61. package/dist/stage/static.js +241 -0
  62. package/llms.txt +3 -2
  63. package/package.json +1 -1
  64. package/schema/v1/init.schema.json +69 -1
  65. package/schema/v1/samples/init.json +46 -1
  66. package/schema/v1/samples/static.json +21 -0
  67. package/schema/v1/static.schema.json +34 -0
  68. package/schema/vendor/acta/LICENSE +21 -0
  69. package/schema/vendor/acta/README.md +12 -0
  70. package/schema/vendor/acta/v1/canonical.schema.json +818 -0
  71. package/schema/vendor/acta/v1/check.schema.json +35 -0
  72. package/schema/vendor/acta/v1/record.schema.json +1443 -0
  73. package/schema/vendor/acta/v1/run-model.schema.json +1074 -0
  74. package/skill/rehearse/SKILL.md +6 -0
@@ -0,0 +1,818 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://acta.kurvball.ca/schema/v1/canonical.schema.json",
4
+ "title": "Acta canonical form",
5
+ "description": "A record in the form two runs of the same work share: structural ids, no times, usage or source ids, paths relative to each run’s folder. The algorithm page specifies every rule.",
6
+ "type": "object",
7
+ "properties": {
8
+ "version": {
9
+ "type": "integer",
10
+ "minimum": 1
11
+ },
12
+ "runs": {
13
+ "type": "array",
14
+ "items": {
15
+ "$ref": "#/$defs/Run"
16
+ }
17
+ },
18
+ "docs": {
19
+ "type": "array",
20
+ "items": {
21
+ "$ref": "#/$defs/Doc"
22
+ }
23
+ }
24
+ },
25
+ "required": [
26
+ "version",
27
+ "runs",
28
+ "docs"
29
+ ],
30
+ "$defs": {
31
+ "RunState": {
32
+ "type": "string",
33
+ "enum": [
34
+ "working",
35
+ "waiting",
36
+ "done",
37
+ "failed",
38
+ "stopped"
39
+ ]
40
+ },
41
+ "Run": {
42
+ "type": "object",
43
+ "properties": {
44
+ "id": {
45
+ "type": "string",
46
+ "minLength": 1
47
+ },
48
+ "parent": {
49
+ "type": "string",
50
+ "minLength": 1
51
+ },
52
+ "title": {
53
+ "type": "string"
54
+ },
55
+ "state": {
56
+ "$ref": "#/$defs/RunState"
57
+ },
58
+ "reason": {
59
+ "type": "string",
60
+ "pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$"
61
+ },
62
+ "model": {
63
+ "type": "string"
64
+ },
65
+ "told": {
66
+ "$ref": "#/$defs/Told"
67
+ },
68
+ "fork": {
69
+ "type": "object",
70
+ "properties": {
71
+ "reason": {
72
+ "type": "string"
73
+ },
74
+ "step": {
75
+ "type": "string",
76
+ "minLength": 1
77
+ },
78
+ "group": {
79
+ "type": "string",
80
+ "minLength": 1
81
+ }
82
+ },
83
+ "required": [
84
+ "reason"
85
+ ]
86
+ },
87
+ "join": {
88
+ "type": "object",
89
+ "properties": {
90
+ "into": {
91
+ "type": "string",
92
+ "minLength": 1
93
+ },
94
+ "quorum": {
95
+ "type": "string",
96
+ "enum": [
97
+ "all",
98
+ "each",
99
+ "none"
100
+ ]
101
+ }
102
+ },
103
+ "required": [
104
+ "into",
105
+ "quorum"
106
+ ]
107
+ },
108
+ "turns": {
109
+ "type": "array",
110
+ "items": {
111
+ "$ref": "#/$defs/Turn"
112
+ }
113
+ },
114
+ "asks": {
115
+ "type": "array",
116
+ "items": {
117
+ "$ref": "#/$defs/Ask"
118
+ }
119
+ },
120
+ "docs": {
121
+ "type": "array",
122
+ "items": {
123
+ "$ref": "#/$defs/Doc"
124
+ }
125
+ },
126
+ "todos": {
127
+ "type": "array",
128
+ "items": {
129
+ "type": "object",
130
+ "properties": {
131
+ "text": {
132
+ "type": "string"
133
+ },
134
+ "state": {
135
+ "type": "string",
136
+ "enum": [
137
+ "pending",
138
+ "working",
139
+ "done"
140
+ ]
141
+ }
142
+ },
143
+ "required": [
144
+ "text",
145
+ "state"
146
+ ]
147
+ }
148
+ },
149
+ "checkpoints": {
150
+ "type": "array",
151
+ "items": {
152
+ "type": "object",
153
+ "properties": {
154
+ "id": {
155
+ "type": "string",
156
+ "minLength": 1
157
+ },
158
+ "turn": {
159
+ "type": "string",
160
+ "minLength": 1
161
+ },
162
+ "files": {
163
+ "type": "array",
164
+ "items": {
165
+ "type": "string"
166
+ }
167
+ },
168
+ "restored": {
169
+ "type": "boolean"
170
+ }
171
+ },
172
+ "required": [
173
+ "id"
174
+ ]
175
+ }
176
+ }
177
+ },
178
+ "required": [
179
+ "id",
180
+ "state",
181
+ "turns",
182
+ "asks",
183
+ "docs"
184
+ ]
185
+ },
186
+ "Speaker": {
187
+ "type": "object",
188
+ "properties": {
189
+ "kind": {
190
+ "type": "string",
191
+ "enum": [
192
+ "person",
193
+ "agent",
194
+ "teammate",
195
+ "system"
196
+ ]
197
+ },
198
+ "name": {
199
+ "type": "string"
200
+ }
201
+ },
202
+ "required": [
203
+ "kind",
204
+ "name"
205
+ ]
206
+ },
207
+ "Step": {
208
+ "type": "object",
209
+ "properties": {
210
+ "id": {
211
+ "type": "string",
212
+ "minLength": 1
213
+ },
214
+ "kind": {
215
+ "type": "string",
216
+ "pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$"
217
+ },
218
+ "tool": {
219
+ "type": "object",
220
+ "properties": {
221
+ "name": {
222
+ "type": "string"
223
+ },
224
+ "input": {}
225
+ },
226
+ "required": [
227
+ "name"
228
+ ]
229
+ },
230
+ "state": {
231
+ "type": "string",
232
+ "enum": [
233
+ "running",
234
+ "ok",
235
+ "failed",
236
+ "refused"
237
+ ]
238
+ },
239
+ "reason": {
240
+ "type": "string",
241
+ "pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$"
242
+ },
243
+ "exit": {
244
+ "type": "integer"
245
+ },
246
+ "files": {
247
+ "type": "array",
248
+ "items": {
249
+ "$ref": "#/$defs/StepFile"
250
+ }
251
+ },
252
+ "detail": {
253
+ "type": "string"
254
+ },
255
+ "run": {
256
+ "type": "string",
257
+ "minLength": 1
258
+ }
259
+ },
260
+ "required": [
261
+ "id",
262
+ "kind",
263
+ "state"
264
+ ]
265
+ },
266
+ "StepFile": {
267
+ "type": "object",
268
+ "properties": {
269
+ "path": {
270
+ "type": "string"
271
+ },
272
+ "change": {
273
+ "type": "string",
274
+ "enum": [
275
+ "added",
276
+ "changed",
277
+ "removed",
278
+ "read"
279
+ ]
280
+ },
281
+ "added": {
282
+ "type": "integer",
283
+ "minimum": 0
284
+ },
285
+ "removed": {
286
+ "type": "integer",
287
+ "minimum": 0
288
+ }
289
+ },
290
+ "required": [
291
+ "path",
292
+ "change"
293
+ ]
294
+ },
295
+ "Turn": {
296
+ "type": "object",
297
+ "properties": {
298
+ "id": {
299
+ "type": "string",
300
+ "minLength": 1
301
+ },
302
+ "speaker": {
303
+ "$ref": "#/$defs/Speaker"
304
+ },
305
+ "text": {
306
+ "type": "string"
307
+ },
308
+ "said": {
309
+ "type": "array",
310
+ "items": {
311
+ "type": "object",
312
+ "properties": {
313
+ "response": {
314
+ "type": "integer",
315
+ "minimum": 1
316
+ },
317
+ "text": {
318
+ "type": "string"
319
+ }
320
+ },
321
+ "required": [
322
+ "text"
323
+ ]
324
+ }
325
+ },
326
+ "state": {
327
+ "type": "string",
328
+ "enum": [
329
+ "streaming",
330
+ "done",
331
+ "stopped",
332
+ "failed"
333
+ ]
334
+ },
335
+ "reason": {
336
+ "type": "string",
337
+ "pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$"
338
+ },
339
+ "model": {
340
+ "type": "string"
341
+ },
342
+ "finish": {
343
+ "type": "string",
344
+ "pattern": "^[a-z][a-z0-9_.-]*$"
345
+ },
346
+ "output": {},
347
+ "attachments": {
348
+ "type": "array",
349
+ "items": {
350
+ "type": "string"
351
+ }
352
+ },
353
+ "steps": {
354
+ "type": "array",
355
+ "items": {
356
+ "$ref": "#/$defs/Step"
357
+ }
358
+ }
359
+ },
360
+ "required": [
361
+ "id",
362
+ "speaker",
363
+ "text",
364
+ "state",
365
+ "steps"
366
+ ]
367
+ },
368
+ "Choice": {
369
+ "type": "object",
370
+ "properties": {
371
+ "id": {
372
+ "type": "string",
373
+ "minLength": 1
374
+ },
375
+ "label": {
376
+ "type": "string"
377
+ },
378
+ "intent": {
379
+ "type": "string",
380
+ "enum": [
381
+ "approve",
382
+ "decline"
383
+ ]
384
+ }
385
+ },
386
+ "required": [
387
+ "id",
388
+ "label"
389
+ ]
390
+ },
391
+ "Ask": {
392
+ "type": "object",
393
+ "properties": {
394
+ "id": {
395
+ "type": "string",
396
+ "minLength": 1
397
+ },
398
+ "step": {
399
+ "type": "string",
400
+ "minLength": 1
401
+ },
402
+ "from": {
403
+ "type": "string"
404
+ },
405
+ "says": {
406
+ "type": "string"
407
+ },
408
+ "choices": {
409
+ "type": "array",
410
+ "items": {
411
+ "$ref": "#/$defs/Choice"
412
+ }
413
+ },
414
+ "other": {
415
+ "type": "boolean"
416
+ },
417
+ "risk": {
418
+ "type": "string"
419
+ },
420
+ "command": {
421
+ "type": "string"
422
+ },
423
+ "waiting": {
424
+ "type": "string",
425
+ "enum": [
426
+ "blocked",
427
+ "going-ahead",
428
+ "your-call"
429
+ ]
430
+ },
431
+ "state": {
432
+ "type": "string",
433
+ "enum": [
434
+ "open",
435
+ "answered",
436
+ "withdrawn"
437
+ ]
438
+ },
439
+ "answer": {
440
+ "type": "object",
441
+ "properties": {
442
+ "choice": {
443
+ "type": "string",
444
+ "minLength": 1
445
+ },
446
+ "choices": {
447
+ "type": "array",
448
+ "items": {
449
+ "type": "string",
450
+ "minLength": 1
451
+ }
452
+ },
453
+ "text": {
454
+ "type": "string"
455
+ },
456
+ "by": {
457
+ "type": "string"
458
+ },
459
+ "input": {},
460
+ "interrupt": {
461
+ "type": "boolean"
462
+ }
463
+ },
464
+ "required": [
465
+ "by"
466
+ ]
467
+ },
468
+ "kind": {
469
+ "type": "string",
470
+ "pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$"
471
+ },
472
+ "multiple": {
473
+ "type": "boolean"
474
+ },
475
+ "tool": {
476
+ "type": "string"
477
+ },
478
+ "title": {
479
+ "type": "string"
480
+ },
481
+ "why": {
482
+ "type": "string"
483
+ },
484
+ "path": {
485
+ "type": "string"
486
+ },
487
+ "suggestions": {
488
+ "type": "array",
489
+ "items": {}
490
+ },
491
+ "confirm": {
492
+ "type": "string",
493
+ "enum": [
494
+ "explicit"
495
+ ]
496
+ },
497
+ "remember": {
498
+ "type": "boolean"
499
+ },
500
+ "input": {}
501
+ },
502
+ "required": [
503
+ "id",
504
+ "from",
505
+ "says",
506
+ "choices",
507
+ "waiting",
508
+ "state"
509
+ ]
510
+ },
511
+ "FileEntry": {
512
+ "type": "object",
513
+ "properties": {
514
+ "path": {
515
+ "type": "string"
516
+ },
517
+ "change": {
518
+ "type": "string",
519
+ "enum": [
520
+ "added",
521
+ "changed",
522
+ "removed",
523
+ "read"
524
+ ]
525
+ }
526
+ },
527
+ "required": [
528
+ "path",
529
+ "change"
530
+ ]
531
+ },
532
+ "Block": {
533
+ "type": "object",
534
+ "properties": {
535
+ "kind": {
536
+ "type": "string",
537
+ "minLength": 1
538
+ }
539
+ },
540
+ "required": [
541
+ "kind"
542
+ ],
543
+ "allOf": [
544
+ {
545
+ "if": {
546
+ "properties": {
547
+ "kind": {
548
+ "const": "text"
549
+ }
550
+ },
551
+ "required": [
552
+ "kind"
553
+ ]
554
+ },
555
+ "then": {
556
+ "type": "object",
557
+ "properties": {
558
+ "text": {
559
+ "type": "string"
560
+ }
561
+ },
562
+ "required": [
563
+ "text"
564
+ ]
565
+ }
566
+ },
567
+ {
568
+ "if": {
569
+ "properties": {
570
+ "kind": {
571
+ "const": "callout"
572
+ }
573
+ },
574
+ "required": [
575
+ "kind"
576
+ ]
577
+ },
578
+ "then": {
579
+ "type": "object",
580
+ "properties": {
581
+ "tone": {
582
+ "type": "string",
583
+ "enum": [
584
+ "note",
585
+ "tip",
586
+ "important",
587
+ "warning",
588
+ "caution"
589
+ ]
590
+ },
591
+ "text": {
592
+ "type": "string"
593
+ },
594
+ "title": {
595
+ "type": "string"
596
+ }
597
+ },
598
+ "required": [
599
+ "tone",
600
+ "text"
601
+ ]
602
+ }
603
+ },
604
+ {
605
+ "if": {
606
+ "properties": {
607
+ "kind": {
608
+ "const": "quote"
609
+ }
610
+ },
611
+ "required": [
612
+ "kind"
613
+ ]
614
+ },
615
+ "then": {
616
+ "type": "object",
617
+ "properties": {
618
+ "text": {
619
+ "type": "string"
620
+ },
621
+ "source": {
622
+ "type": "string"
623
+ },
624
+ "run": {
625
+ "type": "string",
626
+ "minLength": 1
627
+ }
628
+ },
629
+ "required": [
630
+ "text"
631
+ ]
632
+ }
633
+ },
634
+ {
635
+ "if": {
636
+ "properties": {
637
+ "kind": {
638
+ "const": "figure"
639
+ }
640
+ },
641
+ "required": [
642
+ "kind"
643
+ ]
644
+ },
645
+ "then": {
646
+ "type": "object",
647
+ "properties": {
648
+ "alt": {
649
+ "type": "string"
650
+ },
651
+ "src": {
652
+ "type": "string"
653
+ },
654
+ "caption": {
655
+ "type": "string"
656
+ }
657
+ },
658
+ "required": [
659
+ "alt"
660
+ ]
661
+ }
662
+ },
663
+ {
664
+ "if": {
665
+ "properties": {
666
+ "kind": {
667
+ "const": "files"
668
+ }
669
+ },
670
+ "required": [
671
+ "kind"
672
+ ]
673
+ },
674
+ "then": {
675
+ "type": "object",
676
+ "properties": {
677
+ "files": {
678
+ "type": "array",
679
+ "items": {
680
+ "$ref": "#/$defs/FileEntry"
681
+ }
682
+ }
683
+ },
684
+ "required": [
685
+ "files"
686
+ ]
687
+ }
688
+ },
689
+ {
690
+ "if": {
691
+ "properties": {
692
+ "kind": {
693
+ "const": "code"
694
+ }
695
+ },
696
+ "required": [
697
+ "kind"
698
+ ]
699
+ },
700
+ "then": {
701
+ "type": "object",
702
+ "properties": {
703
+ "code": {
704
+ "type": "string"
705
+ },
706
+ "language": {
707
+ "type": "string"
708
+ }
709
+ },
710
+ "required": [
711
+ "code"
712
+ ]
713
+ }
714
+ }
715
+ ]
716
+ },
717
+ "Doc": {
718
+ "type": "object",
719
+ "properties": {
720
+ "id": {
721
+ "type": "string",
722
+ "minLength": 1
723
+ },
724
+ "title": {
725
+ "type": "string"
726
+ },
727
+ "kind": {
728
+ "type": "string"
729
+ },
730
+ "state": {
731
+ "type": "string",
732
+ "enum": [
733
+ "draft",
734
+ "writing",
735
+ "ready"
736
+ ]
737
+ },
738
+ "sections": {
739
+ "type": "array",
740
+ "items": {
741
+ "type": "object",
742
+ "properties": {
743
+ "heading": {
744
+ "type": "string"
745
+ },
746
+ "state": {
747
+ "type": "string",
748
+ "enum": [
749
+ "writing",
750
+ "ready",
751
+ "changed"
752
+ ]
753
+ },
754
+ "before": {
755
+ "type": "string"
756
+ },
757
+ "blocks": {
758
+ "type": "array",
759
+ "items": {
760
+ "$ref": "#/$defs/Block"
761
+ }
762
+ }
763
+ },
764
+ "required": [
765
+ "heading",
766
+ "blocks"
767
+ ]
768
+ }
769
+ }
770
+ },
771
+ "required": [
772
+ "id",
773
+ "title",
774
+ "sections"
775
+ ]
776
+ },
777
+ "Told": {
778
+ "type": "object",
779
+ "properties": {
780
+ "role": {
781
+ "type": "object",
782
+ "properties": {
783
+ "id": {
784
+ "type": "string",
785
+ "pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$"
786
+ },
787
+ "version": {
788
+ "type": "integer",
789
+ "minimum": 1
790
+ },
791
+ "hash": {
792
+ "type": "string",
793
+ "pattern": "^[0-9a-f]{64}$"
794
+ }
795
+ },
796
+ "required": [
797
+ "id",
798
+ "version",
799
+ "hash"
800
+ ]
801
+ },
802
+ "rendering": {
803
+ "type": "string",
804
+ "pattern": "^[0-9a-f]{64}$"
805
+ },
806
+ "target": {
807
+ "type": "string",
808
+ "pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$"
809
+ }
810
+ },
811
+ "required": [
812
+ "role",
813
+ "rendering",
814
+ "target"
815
+ ]
816
+ }
817
+ }
818
+ }