@kurvball/rehearse 0.0.0-stage → 1.3.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 (270) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +107 -2
  3. package/dist/affected/affected.d.ts +22 -0
  4. package/dist/affected/affected.js +162 -0
  5. package/dist/affected/index.d.ts +1 -0
  6. package/dist/affected/index.js +1 -0
  7. package/dist/args.d.ts +12 -0
  8. package/dist/args.js +42 -0
  9. package/dist/cli.d.ts +4 -0
  10. package/dist/cli.js +100 -0
  11. package/dist/commands/check.d.ts +2 -0
  12. package/dist/commands/check.js +42 -0
  13. package/dist/commands/clean.d.ts +2 -0
  14. package/dist/commands/clean.js +37 -0
  15. package/dist/commands/command.d.ts +30 -0
  16. package/dist/commands/command.js +38 -0
  17. package/dist/commands/compare.d.ts +4 -0
  18. package/dist/commands/compare.js +89 -0
  19. package/dist/commands/drive.d.ts +2 -0
  20. package/dist/commands/drive.js +244 -0
  21. package/dist/commands/index.d.ts +3 -0
  22. package/dist/commands/index.js +32 -0
  23. package/dist/commands/init.d.ts +2 -0
  24. package/dist/commands/init.js +19 -0
  25. package/dist/commands/list.d.ts +2 -0
  26. package/dist/commands/list.js +69 -0
  27. package/dist/commands/open.d.ts +2 -0
  28. package/dist/commands/open.js +60 -0
  29. package/dist/commands/people.d.ts +2 -0
  30. package/dist/commands/people.js +49 -0
  31. package/dist/commands/run.d.ts +4 -0
  32. package/dist/commands/run.js +84 -0
  33. package/dist/commands/services.d.ts +28 -0
  34. package/dist/commands/services.js +51 -0
  35. package/dist/commands/stage.d.ts +7 -0
  36. package/dist/commands/stage.js +53 -0
  37. package/dist/commands/up.d.ts +3 -0
  38. package/dist/commands/up.js +77 -0
  39. package/dist/commands/validate.d.ts +2 -0
  40. package/dist/commands/validate.js +35 -0
  41. package/dist/commands/worlds.d.ts +2 -0
  42. package/dist/commands/worlds.js +15 -0
  43. package/dist/compare/announce.d.ts +6 -0
  44. package/dist/compare/announce.js +27 -0
  45. package/dist/compare/compare.d.ts +83 -0
  46. package/dist/compare/compare.js +335 -0
  47. package/dist/compare/diff.d.ts +15 -0
  48. package/dist/compare/diff.js +105 -0
  49. package/dist/compare/index.d.ts +5 -0
  50. package/dist/compare/index.js +5 -0
  51. package/dist/compare/setaside.d.ts +29 -0
  52. package/dist/compare/setaside.js +121 -0
  53. package/dist/compare/verdict.d.ts +21 -0
  54. package/dist/compare/verdict.js +30 -0
  55. package/dist/drive/aria.d.ts +8 -0
  56. package/dist/drive/aria.js +12 -0
  57. package/dist/drive/browser.d.ts +34 -0
  58. package/dist/drive/browser.js +216 -0
  59. package/dist/drive/daemon.d.ts +1 -0
  60. package/dist/drive/daemon.js +171 -0
  61. package/dist/drive/grammar.d.ts +93 -0
  62. package/dist/drive/grammar.js +303 -0
  63. package/dist/drive/index.d.ts +4 -0
  64. package/dist/drive/index.js +4 -0
  65. package/dist/drive/names.d.ts +24 -0
  66. package/dist/drive/names.js +97 -0
  67. package/dist/drive/state.d.ts +13 -0
  68. package/dist/drive/state.js +28 -0
  69. package/dist/errors.d.ts +26 -0
  70. package/dist/errors.js +32 -0
  71. package/dist/exec.d.ts +16 -0
  72. package/dist/exec.js +43 -0
  73. package/dist/git/checkout.d.ts +11 -0
  74. package/dist/git/checkout.js +90 -0
  75. package/dist/git/git.d.ts +7 -0
  76. package/dist/git/git.js +27 -0
  77. package/dist/git/index.d.ts +2 -0
  78. package/dist/git/index.js +2 -0
  79. package/dist/git/seed.d.ts +3 -0
  80. package/dist/git/seed.js +115 -0
  81. package/dist/index.d.ts +18 -0
  82. package/dist/index.js +15 -0
  83. package/dist/kinds/all.d.ts +4 -0
  84. package/dist/kinds/all.js +4 -0
  85. package/dist/kinds/call/check.d.ts +29 -0
  86. package/dist/kinds/call/check.js +187 -0
  87. package/dist/kinds/call/definition.d.ts +16 -0
  88. package/dist/kinds/call/definition.js +33 -0
  89. package/dist/kinds/call/hurl.d.ts +65 -0
  90. package/dist/kinds/call/hurl.js +333 -0
  91. package/dist/kinds/call/kind.d.ts +8 -0
  92. package/dist/kinds/call/kind.js +122 -0
  93. package/dist/kinds/call/send.d.ts +32 -0
  94. package/dist/kinds/call/send.js +152 -0
  95. package/dist/kinds/call/words.d.ts +22 -0
  96. package/dist/kinds/call/words.js +24 -0
  97. package/dist/kinds/file/kind.d.ts +44 -0
  98. package/dist/kinds/file/kind.js +331 -0
  99. package/dist/kinds/file/layouts.d.ts +14 -0
  100. package/dist/kinds/file/layouts.js +103 -0
  101. package/dist/kinds/flow/kind.d.ts +21 -0
  102. package/dist/kinds/flow/kind.js +412 -0
  103. package/dist/kinds/flow/literal.d.ts +8 -0
  104. package/dist/kinds/flow/literal.js +148 -0
  105. package/dist/kinds/index.d.ts +10 -0
  106. package/dist/kinds/index.js +8 -0
  107. package/dist/kinds/kind.d.ts +63 -0
  108. package/dist/kinds/kind.js +21 -0
  109. package/dist/kinds/piece/canvas.d.ts +18 -0
  110. package/dist/kinds/piece/canvas.js +165 -0
  111. package/dist/kinds/piece/conventions.d.ts +12 -0
  112. package/dist/kinds/piece/conventions.js +101 -0
  113. package/dist/kinds/piece/csf.d.ts +10 -0
  114. package/dist/kinds/piece/csf.js +304 -0
  115. package/dist/kinds/piece/kind.d.ts +12 -0
  116. package/dist/kinds/piece/kind.js +297 -0
  117. package/dist/kinds/piece/server.d.ts +23 -0
  118. package/dist/kinds/piece/server.js +236 -0
  119. package/dist/manifest/fill.d.ts +4 -0
  120. package/dist/manifest/fill.js +7 -0
  121. package/dist/manifest/index.d.ts +5 -0
  122. package/dist/manifest/index.js +5 -0
  123. package/dist/manifest/init.d.ts +1 -0
  124. package/dist/manifest/init.js +47 -0
  125. package/dist/manifest/load.d.ts +7 -0
  126. package/dist/manifest/load.js +245 -0
  127. package/dist/manifest/types.d.ts +255 -0
  128. package/dist/manifest/types.js +7 -0
  129. package/dist/manifest/yaml.d.ts +5 -0
  130. package/dist/manifest/yaml.js +47 -0
  131. package/dist/people/index.d.ts +1 -0
  132. package/dist/people/index.js +1 -0
  133. package/dist/people/people.d.ts +39 -0
  134. package/dist/people/people.js +139 -0
  135. package/dist/run/cache.d.ts +20 -0
  136. package/dist/run/cache.js +98 -0
  137. package/dist/run/index.d.ts +5 -0
  138. package/dist/run/index.js +4 -0
  139. package/dist/run/observation.d.ts +27 -0
  140. package/dist/run/observation.js +1 -0
  141. package/dist/run/parallel.d.ts +28 -0
  142. package/dist/run/parallel.js +140 -0
  143. package/dist/run/session.d.ts +35 -0
  144. package/dist/run/session.js +399 -0
  145. package/dist/run/vars.d.ts +3 -0
  146. package/dist/run/vars.js +13 -0
  147. package/dist/scenarios/area.d.ts +6 -0
  148. package/dist/scenarios/area.js +37 -0
  149. package/dist/scenarios/files.d.ts +9 -0
  150. package/dist/scenarios/files.js +26 -0
  151. package/dist/scenarios/glob.d.ts +6 -0
  152. package/dist/scenarios/glob.js +106 -0
  153. package/dist/scenarios/index.d.ts +4 -0
  154. package/dist/scenarios/index.js +4 -0
  155. package/dist/scenarios/read.d.ts +18 -0
  156. package/dist/scenarios/read.js +54 -0
  157. package/dist/scenarios/scenario.d.ts +34 -0
  158. package/dist/scenarios/scenario.js +10 -0
  159. package/dist/schema.d.ts +14 -0
  160. package/dist/schema.js +122 -0
  161. package/dist/services/index.d.ts +2 -0
  162. package/dist/services/index.js +2 -0
  163. package/dist/services/registry.d.ts +23 -0
  164. package/dist/services/registry.js +49 -0
  165. package/dist/services/service.d.ts +23 -0
  166. package/dist/services/service.js +313 -0
  167. package/dist/stage/api.d.ts +30 -0
  168. package/dist/stage/api.js +206 -0
  169. package/dist/stage/client/client/api.js +11 -0
  170. package/dist/stage/client/client/index.js +1 -0
  171. package/dist/stage/client/features/canvas/call.js +65 -0
  172. package/dist/stage/client/features/canvas/context.js +1 -0
  173. package/dist/stage/client/features/canvas/file.js +36 -0
  174. package/dist/stage/client/features/canvas/flow.js +59 -0
  175. package/dist/stage/client/features/canvas/index.js +1 -0
  176. package/dist/stage/client/features/canvas/observed.js +8 -0
  177. package/dist/stage/client/features/canvas/parts.js +24 -0
  178. package/dist/stage/client/features/canvas/piece.js +31 -0
  179. package/dist/stage/client/features/canvas/reach.js +6 -0
  180. package/dist/stage/client/features/canvas/views.js +16 -0
  181. package/dist/stage/client/features/list/index.js +1 -0
  182. package/dist/stage/client/features/list/list.js +53 -0
  183. package/dist/stage/client/features/list/reach.js +10 -0
  184. package/dist/stage/client/features/scenario/heading.js +14 -0
  185. package/dist/stage/client/features/scenario/index.js +1 -0
  186. package/dist/stage/client/features/scenario/reach.js +9 -0
  187. package/dist/stage/client/features/scenario/scenario.js +145 -0
  188. package/dist/stage/client/features/try/index.js +1 -0
  189. package/dist/stage/client/features/try/reach.js +12 -0
  190. package/dist/stage/client/features/try/try.js +65 -0
  191. package/dist/stage/client/index.html +16 -0
  192. package/dist/stage/client/main.js +24 -0
  193. package/dist/stage/client/primitives/busy.js +6 -0
  194. package/dist/stage/client/primitives/focus.js +21 -0
  195. package/dist/stage/client/primitives/h.js +25 -0
  196. package/dist/stage/client/primitives/index.js +6 -0
  197. package/dist/stage/client/primitives/keyed.js +16 -0
  198. package/dist/stage/client/primitives/say.js +6 -0
  199. package/dist/stage/client/primitives/state.js +21 -0
  200. package/dist/stage/client/primitives/types.js +1 -0
  201. package/dist/stage/client/primitives/verdicts.js +8 -0
  202. package/dist/stage/client/stage.css +652 -0
  203. package/dist/stage/compared.d.ts +20 -0
  204. package/dist/stage/compared.js +58 -0
  205. package/dist/stage/files.d.ts +4 -0
  206. package/dist/stage/files.js +59 -0
  207. package/dist/stage/guard.d.ts +3 -0
  208. package/dist/stage/guard.js +20 -0
  209. package/dist/stage/http.d.ts +12 -0
  210. package/dist/stage/http.js +34 -0
  211. package/dist/stage/index.d.ts +1 -0
  212. package/dist/stage/index.js +1 -0
  213. package/dist/stage/sending.d.ts +18 -0
  214. package/dist/stage/sending.js +66 -0
  215. package/dist/stage/server.d.ts +33 -0
  216. package/dist/stage/server.js +253 -0
  217. package/dist/version.d.ts +2 -0
  218. package/dist/version.js +5 -0
  219. package/dist/worlds/define.d.ts +16 -0
  220. package/dist/worlds/define.js +45 -0
  221. package/dist/worlds/index.d.ts +2 -0
  222. package/dist/worlds/index.js +2 -0
  223. package/dist/worlds/worlds.d.ts +15 -0
  224. package/dist/worlds/worlds.js +46 -0
  225. package/llms.txt +46 -0
  226. package/package.json +84 -3
  227. package/schema/v1/announce.schema.json +28 -0
  228. package/schema/v1/check.schema.json +67 -0
  229. package/schema/v1/clean.schema.json +19 -0
  230. package/schema/v1/common.schema.json +210 -0
  231. package/schema/v1/comparison.schema.json +298 -0
  232. package/schema/v1/dependents.schema.json +30 -0
  233. package/schema/v1/drive.schema.json +112 -0
  234. package/schema/v1/error.schema.json +26 -0
  235. package/schema/v1/file-scenario.schema.json +175 -0
  236. package/schema/v1/flow.schema.json +216 -0
  237. package/schema/v1/init.schema.json +20 -0
  238. package/schema/v1/list.schema.json +70 -0
  239. package/schema/v1/manifest.schema.json +434 -0
  240. package/schema/v1/observation.schema.json +388 -0
  241. package/schema/v1/open.schema.json +14 -0
  242. package/schema/v1/people.schema.json +88 -0
  243. package/schema/v1/samples/announce.yaml +5 -0
  244. package/schema/v1/samples/check.json +13 -0
  245. package/schema/v1/samples/clean.json +1 -0
  246. package/schema/v1/samples/comparison.json +83 -0
  247. package/schema/v1/samples/dependents.json +7 -0
  248. package/schema/v1/samples/drive.json +10 -0
  249. package/schema/v1/samples/error.json +10 -0
  250. package/schema/v1/samples/file-scenario.yaml +13 -0
  251. package/schema/v1/samples/flow.yaml +13 -0
  252. package/schema/v1/samples/init.json +1 -0
  253. package/schema/v1/samples/list.json +24 -0
  254. package/schema/v1/samples/manifest.yaml +55 -0
  255. package/schema/v1/samples/observation.json +49 -0
  256. package/schema/v1/samples/open.json +6 -0
  257. package/schema/v1/samples/people.json +11 -0
  258. package/schema/v1/samples/services.json +27 -0
  259. package/schema/v1/samples/stage.json +6 -0
  260. package/schema/v1/samples/try.json +13 -0
  261. package/schema/v1/samples/up.json +16 -0
  262. package/schema/v1/samples/validate.json +7 -0
  263. package/schema/v1/samples/worlds.json +21 -0
  264. package/schema/v1/services.schema.json +72 -0
  265. package/schema/v1/stage.schema.json +14 -0
  266. package/schema/v1/try.schema.json +56 -0
  267. package/schema/v1/up.schema.json +55 -0
  268. package/schema/v1/validate.schema.json +40 -0
  269. package/schema/v1/worlds.schema.json +33 -0
  270. package/skill/rehearse/SKILL.md +148 -0
package/llms.txt ADDED
@@ -0,0 +1,46 @@
1
+ # Rehearse
2
+
3
+ > Rehearse sits beside any repository so agents and people can rehearse a change before it ships: bring the product up, sign in as named people, start from named worlds with stand-ins for what can't run, run scenarios on a baseline and on the head, compare them, and try any scenario on one page, the stage. Every command takes --json and prints one object described by a JSON Schema in schema/v1/. A repository declares what it has in rehearse.yaml; every block is optional.
4
+
5
+ ## Commands
6
+
7
+ - `rehearse init`: writes a starter rehearse.yaml, every block commented.
8
+ - `rehearse check [--json]`: reads the manifest and every scenario file; says what it can't read and where (schema check).
9
+ - `rehearse services | people | worlds [--json]`: what can come up; who you can sign in as (people: the sign-in shape {name: {token, …}}, everyone described in about; tokens only with --json); the named starting states.
10
+ - `rehearse list [--affected <file>… | --since <ref>] [--json]`: the scenarios, or those a change reaches, each with reachedBy (schema list).
11
+ - `rehearse up [<service>…] [--world] [--real <stand-in>]` and `rehearse down [--all]`: services left running with a world built on them (schema up).
12
+ - `rehearse run <scenario> [--on <checkout|ref>] [--world] [--as <person>] [--real <stand-in>] [--keep] [--parallel <n>] --json`: one observation (schema observation).
13
+ - `rehearse compare [<id or glob>…] [--affected] [--base <ref|./folder>] [--head <ref|./folder>] [--announce <file>] [--said <id>]… [--world] [--as] [--real] [--fresh] [--parallel <n>] --json`: a verdict per scenario (schema comparison). Exit 0 when both sides came up and nothing fails on the head or changed without saying so. --parallel runs groups that share no service at once, and the base beside the head when budget.services allows two; the result is the same as one at a time.
14
+ - `rehearse drive start [--service <name> | --piece <id>] [--world] [--as <person>] [--scheme light|dark]` (or DRIVE_SCHEME), then `rehearse drive click --name <name> [--role <role>] | fill --name <name> --with <text> | type <text> | key <key> | snapshot [--name <name> [--role <role>]] | screenshot <file.png> | stop`, each with --json: the drive result shape {ok, command, ms, file, tree} plus v and driver (schema drive). Exit 0 done, 1 failed, 2 usage.
15
+ - `rehearse stage [--base] [--head] [--port] [--announce <file>] [--said <id>]…`: the stage on 127.0.0.1 (default port 4400): every scenario in Base, Head and Diff, with Works, Doesn't and a note (kept in .rehearse/tries.jsonl, schema try).
16
+ - `rehearse open <scenario> [--json]`: the stage's address for a scenario (schema open), starting the stage if none runs.
17
+ - `rehearse clean [--all]`: removes old base checkouts, runs and comparisons (schema clean).
18
+ - `rehearse validate <schema> [file]`: checks a JSON or YAML file, or stdin, against a v1 schema (schema validate).
19
+
20
+ ## Kinds
21
+
22
+ - piece: Storybook CSF beside the component. Id `<file>#<Export>`. Rendered in the package's own Vite and React with the preview; Storybook hooks and storybook/test are shimmed; play is not run. Observed: accessibility tree, errors, axe violations (screenshot kept as an artifact).
23
+ - flow: `*.flow.yaml` (name, service or piece, start, world, person, steps) or a reach module `export default {name, steps}` read as data. Steps: `{click: name, role?}`, `{fill: name, with: text}`, `{type: text}`, `{key: Enter}`, `{snapshot: name, role?}`. Observed: the tree after each step. A service with `drive:` is driven through its own driver.
24
+ - call: Hurl's plain part. Each call is a scenario named by the comment above it: `<file>#<name>`. `Authorization: Bearer {{person}}` sends as that person; none is nobody. `{{api}}` is the calls service's URL.
25
+ - file: `*.rehearse.yaml` with input (file, or a command writing {{input}}), run (writing into {{output}}), output (file, layout csv|tsv|json|lines|fixed|zip; zip entries by glob: csv|tsv|json|lines|zip|skip).
26
+
27
+ ## Verdicts
28
+
29
+ - same: as on the base. said: changed and said so (announced, or its own definition edited; announced wins). unsaid: changed without saying so. new: not on the base. fails: fails on the head (failsOnBase: it fails on the base too, so not this change's doing).
30
+ - Ids, times and opaque tokens are set aside before comparing; arrays keep their order unless a scenario says unordered; a comparison counts what it set aside.
31
+ - A change announces what it expects to change in .rehearse/announce.yaml beside rehearse.yaml (schema announce): changes: [{scenario: <id or glob>, why: <one line>}].
32
+ - The base's observations are cached by commit under .rehearse/cache, so each base commit runs once; scenarios that share services in a world are cached and run as a group; --fresh runs again.
33
+
34
+ ## Schemas (schema/v1/)
35
+
36
+ - manifest.schema.json: rehearse.yaml. flow.schema.json: *.flow.yaml. file-scenario.schema.json: *.rehearse.yaml. announce.schema.json: announcements.
37
+ - check, init, services, people, worlds, list, up, observation, comparison, drive, open, try, clean, validate, error: one per command's --json output, each with a sample in schema/v1/samples/.
38
+ - dependents.schema.json: what Rehearse reads from an import graph (`ashlar dependents <files> --json`, or the manifest's affected.graph).
39
+ - Within v1 an output only gains optional fields, and open string fields may gain values: readers ignore what they don't know.
40
+
41
+ ## Optional
42
+
43
+ - skill/rehearse/SKILL.md: the agent skill.
44
+ - docs/: the documentation site (Astro Starlight).
45
+ - examples/kurvball/: Rehearse on Kurvball (https://www.kurvball.ca), from a scratch clone.
46
+ - docs/plans/v1.md: the decisions v1 rests on.
package/package.json CHANGED
@@ -1,6 +1,87 @@
1
1
  {
2
2
  "name": "@kurvball/rehearse",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "1.3.0",
4
+ "description": "Rehearse a change before it ships: bring the product up, sign in as named people, start from named worlds, and compare any scenario on the base and on the head.",
5
+ "homepage": "https://rehearse.kurvball.ca/",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/kurvball/rehearse.git"
9
+ },
10
+ "bugs": {
11
+ "url": "https://github.com/kurvball/rehearse/issues"
12
+ },
13
+ "license": "MIT",
14
+ "keywords": [
15
+ "testing",
16
+ "agents",
17
+ "baseline",
18
+ "comparison",
19
+ "storybook",
20
+ "hurl",
21
+ "playwright"
22
+ ],
23
+ "type": "module",
24
+ "bin": {
25
+ "rehearse": "./dist/cli.js"
26
+ },
27
+ "exports": {
28
+ ".": {
29
+ "types": "./dist/index.d.ts",
30
+ "default": "./dist/index.js"
31
+ },
32
+ "./worlds": {
33
+ "types": "./dist/worlds/define.d.ts",
34
+ "default": "./dist/worlds/define.js"
35
+ },
36
+ "./schema/v1/*": "./schema/v1/*",
37
+ "./package.json": "./package.json"
38
+ },
39
+ "files": [
40
+ "dist",
41
+ "schema",
42
+ "skill",
43
+ "llms.txt"
44
+ ],
45
+ "publishConfig": {
46
+ "access": "public",
47
+ "provenance": true
48
+ },
49
+ "engines": {
50
+ "node": ">=22.18"
51
+ },
52
+ "dependencies": {
53
+ "ajv": "8.20.0",
54
+ "axe-core": "4.14.1",
55
+ "es-module-lexer": "1.7.0",
56
+ "yaml": "2.9.1"
57
+ },
58
+ "optionalDependencies": {
59
+ "playwright-core": "1.64.1"
60
+ },
61
+ "devDependencies": {
62
+ "@changesets/cli": "3.0.3",
63
+ "@kurvball/ashlar": "https://github.com/kurvball/ashlar/releases/download/v1.1.0/kurvball-ashlar-1.1.0.tgz",
64
+ "@types/node": "^22.20.5",
65
+ "oxlint": "1.96.0",
66
+ "prettier": "3.10.2",
67
+ "react": "19.3.1",
68
+ "react-dom": "19.3.1",
69
+ "typescript": "7.0.2",
70
+ "vite": "8.4.1",
71
+ "vitest": "^3.2.7"
72
+ },
73
+ "scripts": {
74
+ "build": "node scripts/build.mjs",
75
+ "typecheck": "tsc --noEmit -p tsconfig.test.json && tsc --noEmit -p src/stage/client/tsconfig.json",
76
+ "lint": "node scripts/private-names.ts && ashlar check && ashlar onboard --check && oxlint --deny-warnings src test scripts && prettier --check .",
77
+ "check": "ashlar check",
78
+ "format": "prettier --write .",
79
+ "test": "vitest run",
80
+ "docs:build": "pnpm --filter rehearse-docs build",
81
+ "docs:dev": "pnpm --filter rehearse-docs dev",
82
+ "rehearse": "node dist/cli.js",
83
+ "changeset": "changeset",
84
+ "release:version": "changeset version && node scripts/changelog.ts && node docs/scripts/since.ts && prettier --write CHANGELOG.md package.json",
85
+ "release:publish": "node scripts/release.ts"
86
+ }
6
87
  }
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://rehearse.kurvball.ca/schema/v1/announce.schema.json",
4
+ "title": "Rehearse v1: an announcement",
5
+ "description": "The scenarios a change expects to change, each with one line saying why. Written in YAML or JSON, by default at .rehearse/announce.yaml beside rehearse.yaml.",
6
+ "type": "object",
7
+ "required": ["changes"],
8
+ "properties": {
9
+ "v": { "$ref": "common.schema.json#/$defs/v" },
10
+ "changes": {
11
+ "type": "array",
12
+ "items": {
13
+ "type": "object",
14
+ "required": ["scenario", "why"],
15
+ "properties": {
16
+ "scenario": {
17
+ "description": "A scenario's id, or a glob over ids (* stops at /, ** does not).",
18
+ "type": "string",
19
+ "minLength": 1
20
+ },
21
+ "why": { "description": "One line: what changes, and why.", "type": "string", "minLength": 1 }
22
+ },
23
+ "additionalProperties": false
24
+ }
25
+ }
26
+ },
27
+ "additionalProperties": false
28
+ }
@@ -0,0 +1,67 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://rehearse.kurvball.ca/schema/v1/check.schema.json",
4
+ "title": "Rehearse v1: rehearse check --json",
5
+ "description": "Whether rehearse.yaml reads well, how much it declares, and every scenario file Rehearse couldn't read. It exits 1 when a file was refused.",
6
+ "type": "object",
7
+ "required": [
8
+ "v",
9
+ "ok",
10
+ "manifest",
11
+ "checkout",
12
+ "base",
13
+ "services",
14
+ "people",
15
+ "worlds",
16
+ "standins",
17
+ "scenarios",
18
+ "refused"
19
+ ],
20
+ "properties": {
21
+ "v": {
22
+ "$ref": "common.schema.json#/$defs/v"
23
+ },
24
+ "ok": {
25
+ "type": "boolean"
26
+ },
27
+ "manifest": {
28
+ "type": "string"
29
+ },
30
+ "checkout": {
31
+ "type": "string"
32
+ },
33
+ "base": {
34
+ "type": "string"
35
+ },
36
+ "services": {
37
+ "type": "integer",
38
+ "minimum": 0
39
+ },
40
+ "people": {
41
+ "type": "integer",
42
+ "minimum": 0
43
+ },
44
+ "worlds": {
45
+ "type": "integer",
46
+ "minimum": 0
47
+ },
48
+ "standins": {
49
+ "type": "integer",
50
+ "minimum": 0
51
+ },
52
+ "scenarios": {
53
+ "description": "How many scenarios of each kind it read.",
54
+ "type": "object",
55
+ "additionalProperties": {
56
+ "type": "integer",
57
+ "minimum": 0
58
+ }
59
+ },
60
+ "refused": {
61
+ "type": "array",
62
+ "items": {
63
+ "$ref": "common.schema.json#/$defs/refused"
64
+ }
65
+ }
66
+ }
67
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://rehearse.kurvball.ca/schema/v1/clean.schema.json",
4
+ "title": "Rehearse v1: rehearse clean --json",
5
+ "description": "What rehearse clean removed.",
6
+ "type": "object",
7
+ "required": ["v", "removed"],
8
+ "properties": {
9
+ "v": {
10
+ "$ref": "common.schema.json#/$defs/v"
11
+ },
12
+ "removed": {
13
+ "type": "array",
14
+ "items": {
15
+ "type": "string"
16
+ }
17
+ }
18
+ }
19
+ }
@@ -0,0 +1,210 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://rehearse.kurvball.ca/schema/v1/common.schema.json",
4
+ "title": "Rehearse v1: shared definitions",
5
+ "description": "Definitions the other v1 schemas share. Not an output on its own. Within v1 an output only gains optional fields, and a field typed as a plain string with examples may gain new values: readers ignore fields they don't know and treat an unknown value as 'something else', never as an error. A verdict stays one of its five values.",
6
+ "$defs": {
7
+ "v": {
8
+ "description": "The contract's major version. Every output carries it.",
9
+ "const": 1
10
+ },
11
+ "kind": {
12
+ "description": "A scenario's kind. v1 runs piece, flow, call and file; job, agent and plan are reserved for later; a repository may add its own.",
13
+ "type": "string",
14
+ "pattern": "^[a-z][a-z0-9-]*$",
15
+ "examples": ["piece", "flow", "call", "file", "job", "agent", "plan"]
16
+ },
17
+ "verdict": {
18
+ "description": "same: as on the base. said: changed and said so. unsaid: changed without saying so. new: not on the base. fails: fails on the head.",
19
+ "enum": ["same", "said", "unsaid", "new", "fails"]
20
+ },
21
+ "scenarioRef": {
22
+ "type": "object",
23
+ "required": ["id", "kind", "name", "file"],
24
+ "properties": {
25
+ "id": {
26
+ "description": "The scenario's id: its file, then # and its name within the file when the file holds more than one.",
27
+ "type": "string",
28
+ "minLength": 1
29
+ },
30
+ "kind": {
31
+ "$ref": "#/$defs/kind"
32
+ },
33
+ "name": {
34
+ "description": "What the scenario tries, in plain words.",
35
+ "type": "string"
36
+ },
37
+ "file": {
38
+ "description": "The file it is written in, relative to its root.",
39
+ "type": "string"
40
+ },
41
+ "line": {
42
+ "description": "The line it starts on, when the file holds more than one.",
43
+ "type": "integer",
44
+ "minimum": 1
45
+ },
46
+ "area": {
47
+ "description": "Where it is grouped: its package, or its folder.",
48
+ "type": "string"
49
+ },
50
+ "from": {
51
+ "description": "checkout: read from each checkout. manifest: read beside rehearse.yaml, the same on both sides.",
52
+ "enum": ["checkout", "manifest"]
53
+ },
54
+ "definition": {
55
+ "description": "A hash of the scenario's parsed definition. It changes when the scenario itself is edited.",
56
+ "type": "string"
57
+ }
58
+ }
59
+ },
60
+ "checkout": {
61
+ "type": "object",
62
+ "required": ["path"],
63
+ "properties": {
64
+ "path": {
65
+ "description": "The checkout's folder.",
66
+ "type": "string"
67
+ },
68
+ "ref": {
69
+ "description": "The ref it was asked for, when one was.",
70
+ "type": ["string", "null"]
71
+ },
72
+ "commit": {
73
+ "description": "The commit it holds.",
74
+ "type": ["string", "null"]
75
+ },
76
+ "dirty": {
77
+ "description": "Whether it holds uncommitted changes. A dirty checkout is never cached.",
78
+ "type": "boolean"
79
+ }
80
+ }
81
+ },
82
+ "standin": {
83
+ "description": "A stand-in a run used, or the real dependency chosen in its place.",
84
+ "type": "object",
85
+ "required": ["name", "replaces", "fidelity", "real"],
86
+ "properties": {
87
+ "name": {
88
+ "type": "string"
89
+ },
90
+ "replaces": {
91
+ "description": "What it stands in for.",
92
+ "type": "string"
93
+ },
94
+ "by": {
95
+ "description": "What plays it.",
96
+ "type": ["string", "null"]
97
+ },
98
+ "fidelity": {
99
+ "description": "How real it is: fake (written by hand), recorded (replays real answers), local (the real thing, run locally). More may come.",
100
+ "type": "string",
101
+ "examples": ["fake", "recorded", "local"]
102
+ },
103
+ "real": {
104
+ "description": "True when the real dependency was chosen in its place (--real).",
105
+ "type": "boolean"
106
+ }
107
+ }
108
+ },
109
+ "failure": {
110
+ "description": "One way a scenario failed: the line or step, what was expected and what came back.",
111
+ "type": "object",
112
+ "required": ["text", "expected", "got"],
113
+ "properties": {
114
+ "line": {
115
+ "type": "integer",
116
+ "minimum": 1
117
+ },
118
+ "step": {
119
+ "type": "integer",
120
+ "minimum": 1
121
+ },
122
+ "text": {
123
+ "description": "The line, assert or step that failed.",
124
+ "type": "string"
125
+ },
126
+ "expected": {
127
+ "type": ["string", "null"]
128
+ },
129
+ "got": {
130
+ "type": ["string", "null"]
131
+ }
132
+ }
133
+ },
134
+ "difference": {
135
+ "description": "One thing that differs between the base and the head, after what is set aside.",
136
+ "type": "object",
137
+ "required": ["path", "base", "head", "count"],
138
+ "properties": {
139
+ "path": {
140
+ "description": "Where it differs: status, a JSON path with indices folded ($.items[*].name), a column (column 5 \"item_quantity\"), a step (step 3), or tree.",
141
+ "type": "string"
142
+ },
143
+ "base": {
144
+ "description": "What the base had there, clipped.",
145
+ "type": "string"
146
+ },
147
+ "head": {
148
+ "description": "What the head has there, clipped.",
149
+ "type": "string"
150
+ },
151
+ "count": {
152
+ "description": "In how many places, rows or items it differs.",
153
+ "type": "integer",
154
+ "minimum": 1
155
+ }
156
+ }
157
+ },
158
+ "setAside": {
159
+ "description": "What was set aside before comparing, by kind and count, so a person can see why two answers matched.",
160
+ "type": "object",
161
+ "properties": {
162
+ "ids": {
163
+ "type": "integer",
164
+ "minimum": 0
165
+ },
166
+ "times": {
167
+ "type": "integer",
168
+ "minimum": 0
169
+ },
170
+ "opaque": {
171
+ "type": "integer",
172
+ "minimum": 0
173
+ },
174
+ "order": {
175
+ "type": "integer",
176
+ "minimum": 0
177
+ },
178
+ "custom": {
179
+ "type": "integer",
180
+ "minimum": 0
181
+ }
182
+ },
183
+ "additionalProperties": {
184
+ "type": "integer",
185
+ "minimum": 0
186
+ }
187
+ },
188
+ "refused": {
189
+ "description": "A scenario file Rehearse could not read, and why.",
190
+ "type": "object",
191
+ "required": ["file", "says"],
192
+ "properties": {
193
+ "file": {
194
+ "type": "string"
195
+ },
196
+ "line": {
197
+ "type": "integer",
198
+ "minimum": 1
199
+ },
200
+ "says": {
201
+ "type": "string"
202
+ }
203
+ }
204
+ },
205
+ "person": {
206
+ "description": "A person's name, or nobody.",
207
+ "type": ["string", "null"]
208
+ }
209
+ }
210
+ }