@crvouga/atlas 0.0.0-stage → 0.2.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 (606) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +21 -0
  3. package/README.md +649 -2
  4. package/dist/bun/src/driver.d.ts +67 -0
  5. package/dist/bun/src/driver.js +90 -0
  6. package/dist/bun/src/index.d.ts +2 -0
  7. package/dist/bun/src/index.js +2 -0
  8. package/dist/core/src/cli.d.ts +1 -0
  9. package/dist/core/src/cli.js +177 -0
  10. package/dist/core/src/config.d.ts +477 -0
  11. package/dist/core/src/config.js +100 -0
  12. package/dist/core/src/events/cloudevents.d.ts +56 -0
  13. package/dist/core/src/events/cloudevents.js +152 -0
  14. package/dist/core/src/graph.d.ts +113 -0
  15. package/dist/core/src/graph.js +221 -0
  16. package/dist/core/src/index.d.ts +17 -0
  17. package/dist/core/src/index.js +17 -0
  18. package/dist/core/src/lint.d.ts +53 -0
  19. package/dist/core/src/lint.js +138 -0
  20. package/dist/core/src/plan.d.ts +109 -0
  21. package/dist/core/src/plan.js +324 -0
  22. package/dist/core/src/privacy.d.ts +8 -0
  23. package/dist/core/src/privacy.js +42 -0
  24. package/dist/core/src/report/formats.d.ts +69 -0
  25. package/dist/core/src/report/formats.js +109 -0
  26. package/dist/core/src/report/markdown.d.ts +8 -0
  27. package/dist/core/src/report/markdown.js +140 -0
  28. package/dist/core/src/run/clients.d.ts +42 -0
  29. package/dist/core/src/run/clients.js +250 -0
  30. package/dist/core/src/run/execute.d.ts +854 -0
  31. package/dist/core/src/run/execute.js +877 -0
  32. package/dist/core/src/run/frames.d.ts +16 -0
  33. package/dist/core/src/run/frames.js +52 -0
  34. package/dist/core/src/run/http.d.ts +41 -0
  35. package/dist/core/src/run/http.js +71 -0
  36. package/dist/core/src/run/types.d.ts +248 -0
  37. package/dist/core/src/run/types.js +39 -0
  38. package/dist/core/src/signals.d.ts +110 -0
  39. package/dist/core/src/signals.js +121 -0
  40. package/dist/core/src/spec/compose.d.ts +28 -0
  41. package/dist/core/src/spec/compose.js +71 -0
  42. package/dist/core/src/spec/index.d.ts +5 -0
  43. package/dist/core/src/spec/index.js +5 -0
  44. package/dist/core/src/spec/load.d.ts +8 -0
  45. package/dist/core/src/spec/load.js +46 -0
  46. package/dist/core/src/spec/parse.d.ts +5 -0
  47. package/dist/core/src/spec/parse.js +32 -0
  48. package/dist/core/src/spec/scxml.d.ts +19 -0
  49. package/dist/core/src/spec/scxml.js +239 -0
  50. package/dist/core/src/spec/types.d.ts +96 -0
  51. package/dist/core/src/spec/types.js +25 -0
  52. package/dist/detox/src/index.d.ts +75 -0
  53. package/dist/detox/src/index.js +110 -0
  54. package/dist/playwright/src/driver.d.ts +44 -0
  55. package/dist/playwright/src/driver.js +82 -0
  56. package/dist/playwright/src/index.d.ts +3 -0
  57. package/dist/playwright/src/index.js +3 -0
  58. package/dist/playwright/src/media.d.ts +68 -0
  59. package/dist/playwright/src/media.js +283 -0
  60. package/dist/playwright/src/signals.d.ts +34 -0
  61. package/dist/playwright/src/signals.js +56 -0
  62. package/dist/reports/src/browser-navigation.d.ts +2 -0
  63. package/dist/reports/src/browser-navigation.js +28 -0
  64. package/dist/reports/src/bundle.d.ts +24 -0
  65. package/dist/reports/src/bundle.js +114 -0
  66. package/dist/reports/src/catalog.d.ts +37 -0
  67. package/dist/reports/src/catalog.js +127 -0
  68. package/dist/reports/src/clock.d.ts +14 -0
  69. package/dist/reports/src/clock.js +4 -0
  70. package/dist/reports/src/completion-order.d.ts +10 -0
  71. package/dist/reports/src/completion-order.js +76 -0
  72. package/dist/reports/src/evidence-live.d.ts +40 -0
  73. package/dist/reports/src/evidence-live.js +118 -0
  74. package/dist/reports/src/evidence-types.d.ts +90 -0
  75. package/dist/reports/src/evidence-types.js +15 -0
  76. package/dist/reports/src/evidence-view.d.ts +68 -0
  77. package/dist/reports/src/evidence-view.js +113 -0
  78. package/dist/reports/src/explorer-types.d.ts +56 -0
  79. package/dist/reports/src/explorer-types.js +0 -0
  80. package/dist/reports/src/explorer-versions.d.ts +4 -0
  81. package/dist/reports/src/explorer-versions.js +21 -0
  82. package/dist/reports/src/export-evidence.d.ts +11 -0
  83. package/dist/reports/src/export-evidence.js +94 -0
  84. package/dist/reports/src/fetcher.d.ts +50 -0
  85. package/dist/reports/src/fetcher.js +205 -0
  86. package/dist/reports/src/format-date.d.ts +1 -0
  87. package/dist/reports/src/format-date.js +10 -0
  88. package/dist/reports/src/format.d.ts +16 -0
  89. package/dist/reports/src/format.js +71 -0
  90. package/dist/reports/src/frames.d.ts +46 -0
  91. package/dist/reports/src/frames.js +245 -0
  92. package/dist/reports/src/hash.d.ts +17 -0
  93. package/dist/reports/src/hash.js +43 -0
  94. package/dist/reports/src/html-frame.d.ts +13 -0
  95. package/dist/reports/src/html-frame.js +63 -0
  96. package/dist/reports/src/http.d.ts +3 -0
  97. package/dist/reports/src/http.js +0 -0
  98. package/dist/reports/src/junit.d.ts +23 -0
  99. package/dist/reports/src/junit.js +119 -0
  100. package/dist/reports/src/keyboard.d.ts +16 -0
  101. package/dist/reports/src/keyboard.js +135 -0
  102. package/dist/reports/src/keys.d.ts +53 -0
  103. package/dist/reports/src/keys.js +122 -0
  104. package/dist/reports/src/layer-catalog.d.ts +5 -0
  105. package/dist/reports/src/layer-catalog.js +39 -0
  106. package/dist/reports/src/layer-merge.d.ts +43 -0
  107. package/dist/reports/src/layer-merge.js +154 -0
  108. package/dist/reports/src/layer-source.d.ts +6 -0
  109. package/dist/reports/src/layer-source.js +32 -0
  110. package/dist/reports/src/layer-store.d.ts +10 -0
  111. package/dist/reports/src/layer-store.js +36 -0
  112. package/dist/reports/src/layer-types.d.ts +32 -0
  113. package/dist/reports/src/layer-types.js +0 -0
  114. package/dist/reports/src/layers-route.d.ts +20 -0
  115. package/dist/reports/src/layers-route.js +259 -0
  116. package/dist/reports/src/namespace-guard.d.ts +11 -0
  117. package/dist/reports/src/namespace-guard.js +40 -0
  118. package/dist/reports/src/navigation.d.ts +8 -0
  119. package/dist/reports/src/navigation.js +0 -0
  120. package/dist/reports/src/object-io.d.ts +9 -0
  121. package/dist/reports/src/object-io.js +41 -0
  122. package/dist/reports/src/object-store.d.ts +67 -0
  123. package/dist/reports/src/object-store.js +32 -0
  124. package/dist/reports/src/performance-part.d.ts +9 -0
  125. package/dist/reports/src/performance-part.js +42 -0
  126. package/dist/reports/src/performance.d.ts +13 -0
  127. package/dist/reports/src/performance.js +45 -0
  128. package/dist/reports/src/persist.d.ts +10 -0
  129. package/dist/reports/src/persist.js +38 -0
  130. package/dist/reports/src/phone.d.ts +5 -0
  131. package/dist/reports/src/phone.js +18 -0
  132. package/dist/reports/src/protocol.d.ts +78 -0
  133. package/dist/reports/src/protocol.js +36 -0
  134. package/dist/reports/src/publication.d.ts +4 -0
  135. package/dist/reports/src/publication.js +35 -0
  136. package/dist/reports/src/publish.d.ts +52 -0
  137. package/dist/reports/src/publish.js +189 -0
  138. package/dist/reports/src/read.d.ts +62 -0
  139. package/dist/reports/src/read.js +214 -0
  140. package/dist/reports/src/recording-bundle.d.ts +22 -0
  141. package/dist/reports/src/recording-bundle.js +4 -0
  142. package/dist/reports/src/recording-keys.d.ts +9 -0
  143. package/dist/reports/src/recording-keys.js +50 -0
  144. package/dist/reports/src/remote-report.d.ts +39 -0
  145. package/dist/reports/src/remote-report.js +304 -0
  146. package/dist/reports/src/report-loader.d.ts +22 -0
  147. package/dist/reports/src/report-loader.js +0 -0
  148. package/dist/reports/src/report-parts.d.ts +10 -0
  149. package/dist/reports/src/report-parts.js +112 -0
  150. package/dist/reports/src/report-types.d.ts +194 -0
  151. package/dist/reports/src/report-types.js +29 -0
  152. package/dist/reports/src/reports-explorer-route.d.ts +90 -0
  153. package/dist/reports/src/reports-explorer-route.js +65 -0
  154. package/dist/reports/src/reports-list-route.d.ts +23 -0
  155. package/dist/reports/src/reports-list-route.js +55 -0
  156. package/dist/reports/src/reports-route.d.ts +267 -0
  157. package/dist/reports/src/reports-route.js +204 -0
  158. package/dist/reports/src/reports-store.d.ts +11 -0
  159. package/dist/reports/src/reports-store.js +28 -0
  160. package/dist/reports/src/resilient-cache.d.ts +3 -0
  161. package/dist/reports/src/resilient-cache.js +33 -0
  162. package/dist/reports/src/retention.d.ts +9 -0
  163. package/dist/reports/src/retention.js +16 -0
  164. package/dist/reports/src/scenario.d.ts +15 -0
  165. package/dist/reports/src/scenario.js +35 -0
  166. package/dist/reports/src/snapshot-bundle.d.ts +18 -0
  167. package/dist/reports/src/snapshot-bundle.js +94 -0
  168. package/dist/reports/src/snapshot-surface.d.ts +29 -0
  169. package/dist/reports/src/snapshot-surface.js +339 -0
  170. package/dist/reports/src/source-content.d.ts +30 -0
  171. package/dist/reports/src/source-content.js +63 -0
  172. package/dist/reports/src/source-entries.d.ts +4 -0
  173. package/dist/reports/src/source-entries.js +34 -0
  174. package/dist/reports/src/source-part.d.ts +4 -0
  175. package/dist/reports/src/source-part.js +66 -0
  176. package/dist/reports/src/source-reader.d.ts +6 -0
  177. package/dist/reports/src/source-reader.js +17 -0
  178. package/dist/reports/src/spec-evidence.d.ts +6 -0
  179. package/dist/reports/src/spec-evidence.js +20 -0
  180. package/dist/reports/src/spec-inventory.d.ts +14 -0
  181. package/dist/reports/src/spec-inventory.js +75 -0
  182. package/dist/reports/src/status.d.ts +4 -0
  183. package/dist/reports/src/status.js +8 -0
  184. package/dist/reports/src/store-prefix.d.ts +21 -0
  185. package/dist/reports/src/store-prefix.js +53 -0
  186. package/dist/reports/src/test-catalog-entity.d.ts +3 -0
  187. package/dist/reports/src/test-catalog-entity.js +34 -0
  188. package/dist/reports/src/types.d.ts +5 -0
  189. package/dist/reports/src/types.js +0 -0
  190. package/dist/reports/src/use-report-nav.d.ts +25 -0
  191. package/dist/reports/src/use-report-nav.js +181 -0
  192. package/dist/schema/src/common.d.ts +57 -0
  193. package/dist/schema/src/common.js +32 -0
  194. package/dist/schema/src/index.d.ts +5 -0
  195. package/dist/schema/src/index.js +5 -0
  196. package/dist/schema/src/manifest.d.ts +457 -0
  197. package/dist/schema/src/manifest.js +247 -0
  198. package/dist/schema/src/report-sources.d.ts +68 -0
  199. package/dist/schema/src/report-sources.js +53 -0
  200. package/dist/schema/src/runs-index.d.ts +52 -0
  201. package/dist/schema/src/runs-index.js +24 -0
  202. package/dist/schema/src/spec.d.ts +245 -0
  203. package/dist/schema/src/spec.js +133 -0
  204. package/dist/vitest/src/index.d.ts +22 -0
  205. package/dist/vitest/src/index.js +33 -0
  206. package/dist/webdriver/src/driver.d.ts +69 -0
  207. package/dist/webdriver/src/driver.js +230 -0
  208. package/dist/webdriver/src/index.d.ts +11 -0
  209. package/dist/webdriver/src/index.js +10 -0
  210. package/dist/webdriver/src/protocol.d.ts +60 -0
  211. package/dist/webdriver/src/protocol.js +146 -0
  212. package/package.json +181 -4
  213. package/packages/bun/README.md +69 -0
  214. package/packages/core/README.md +78 -0
  215. package/packages/core/bin/atlas.mjs +8 -0
  216. package/packages/detox/README.md +73 -0
  217. package/packages/playwright/README.md +77 -0
  218. package/packages/reports/README.md +47 -0
  219. package/packages/reports/STORAGE.md +73 -0
  220. package/packages/schema/README.md +23 -0
  221. package/packages/schema/schemas/atlas-change.schema.json +34 -0
  222. package/packages/schema/schemas/atlas.schema.json +32 -0
  223. package/packages/schema/schemas/cloud-event.schema.json +40 -0
  224. package/packages/schema/schemas/journeys.schema.json +17 -0
  225. package/packages/schema/schemas/manifest.schema.json +160 -0
  226. package/packages/schema/schemas/path-record.schema.json +151 -0
  227. package/packages/schema/schemas/report-sources.schema.json +95 -0
  228. package/packages/schema/schemas/run-info.schema.json +176 -0
  229. package/packages/schema/schemas/run-summary.schema.json +206 -0
  230. package/packages/schema/schemas/runs-index.schema.json +23 -0
  231. package/packages/schema/schemas/state-node.schema.json +238 -0
  232. package/packages/schema/schemas/state-record.schema.json +354 -0
  233. package/packages/schema/schemas/timeline-entry.schema.json +124 -0
  234. package/packages/schema/schemas/transition-record.schema.json +125 -0
  235. package/packages/visualizer/README.md +154 -0
  236. package/packages/visualizer/bin/atlas-visualizer.mjs +176 -0
  237. package/packages/visualizer/example/specs/coffee/ordering/checkout.scxml +82 -0
  238. package/packages/visualizer/example/specs/coffee/ordering/journeys.yaml +129 -0
  239. package/packages/visualizer/example/specs/coffee/ordering/known-issues.md +14 -0
  240. package/packages/visualizer/example/specs/coffee/ordering/machine.yaml +158 -0
  241. package/packages/visualizer/example/specs/coffee/ordering/open-questions.md +25 -0
  242. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/chart.mmd +67 -0
  243. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/ctrf.json +245 -0
  244. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/junit.xml +12 -0
  245. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/manifest.json +2003 -0
  246. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/001.vtt +9 -0
  247. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/002.vtt +9 -0
  248. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/003.vtt +9 -0
  249. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/004.vtt +9 -0
  250. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/005.vtt +17 -0
  251. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/006.vtt +9 -0
  252. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/007.vtt +17 -0
  253. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/008.vtt +17 -0
  254. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/009.vtt +13 -0
  255. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/010.vtt +9 -0
  256. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/011.vtt +9 -0
  257. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/012.vtt +9 -0
  258. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/013.vtt +9 -0
  259. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/01.mp4 +0 -0
  260. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/01.poster.webp +0 -0
  261. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/02.mp4 +0 -0
  262. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/02.poster.webp +0 -0
  263. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/03.mp4 +0 -0
  264. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/03.poster.webp +0 -0
  265. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/04.mp4 +0 -0
  266. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/04.poster.webp +0 -0
  267. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/01.png +0 -0
  268. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/01.webp +0 -0
  269. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/02.png +0 -0
  270. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/02.webp +0 -0
  271. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/03.png +0 -0
  272. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/03.webp +0 -0
  273. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/04.png +0 -0
  274. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/04.webp +0 -0
  275. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/05.png +0 -0
  276. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/05.webp +0 -0
  277. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-2/01.png +0 -0
  278. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-2/01.webp +0 -0
  279. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-3/failed-01.png +0 -0
  280. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-3/failed-01.webp +0 -0
  281. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-4/01.png +0 -0
  282. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-4/01.webp +0 -0
  283. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-5/01.png +0 -0
  284. package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-5/01.webp +0 -0
  285. package/packages/visualizer/fixtures/failures/specs/coffee/ordering/checkout.scxml +82 -0
  286. package/packages/visualizer/fixtures/failures/specs/coffee/ordering/journeys.yaml +129 -0
  287. package/packages/visualizer/fixtures/failures/specs/coffee/ordering/known-issues.md +14 -0
  288. package/packages/visualizer/fixtures/failures/specs/coffee/ordering/machine.yaml +158 -0
  289. package/packages/visualizer/fixtures/failures/specs/coffee/ordering/open-questions.md +25 -0
  290. package/packages/visualizer/fixtures/full/runs/2026-10-02T09-10-00-000Z-fast/chart.mmd +67 -0
  291. package/packages/visualizer/fixtures/full/runs/2026-10-02T09-10-00-000Z-fast/ctrf.json +247 -0
  292. package/packages/visualizer/fixtures/full/runs/2026-10-02T09-10-00-000Z-fast/junit.xml +12 -0
  293. package/packages/visualizer/fixtures/full/runs/2026-10-02T09-10-00-000Z-fast/manifest.json +1875 -0
  294. package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/chart.mmd +67 -0
  295. package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/ctrf.json +244 -0
  296. package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/junit.xml +12 -0
  297. package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/manifest.json +1977 -0
  298. package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/captions/001.vtt +9 -0
  299. package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/captions/002.vtt +9 -0
  300. package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/captions/003.vtt +9 -0
  301. package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/captions/004.vtt +9 -0
  302. package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/captions/005.vtt +17 -0
  303. package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/captions/006.vtt +9 -0
  304. package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/clips/journey-1/01.mp4 +0 -0
  305. package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/clips/journey-1/01.poster.webp +0 -0
  306. package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/clips/journey-1/02.mp4 +0 -0
  307. package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/clips/journey-1/02.poster.webp +0 -0
  308. package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/paths/journey-1/01.png +0 -0
  309. package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/paths/journey-1/01.webp +0 -0
  310. package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/paths/journey-1/02.png +0 -0
  311. package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/paths/journey-1/02.webp +0 -0
  312. package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/paths/journey-1/03.png +0 -0
  313. package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/paths/journey-1/03.webp +0 -0
  314. package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/paths/journey-2/01.png +0 -0
  315. package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/paths/journey-2/01.webp +0 -0
  316. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/chart.mmd +67 -0
  317. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/ctrf.json +472 -0
  318. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/junit.xml +16 -0
  319. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/manifest.json +3701 -0
  320. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/001.vtt +9 -0
  321. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/002.vtt +9 -0
  322. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/003.vtt +9 -0
  323. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/004.vtt +9 -0
  324. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/005.vtt +9 -0
  325. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/006.vtt +13 -0
  326. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/007.vtt +9 -0
  327. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/008.vtt +13 -0
  328. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/009.vtt +17 -0
  329. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/010.vtt +9 -0
  330. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/011.vtt +13 -0
  331. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/012.vtt +9 -0
  332. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/013.vtt +9 -0
  333. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/014.vtt +9 -0
  334. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/015.vtt +9 -0
  335. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/016.vtt +9 -0
  336. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/017.vtt +9 -0
  337. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/018.vtt +17 -0
  338. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/019.vtt +9 -0
  339. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/020.vtt +9 -0
  340. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/021.vtt +9 -0
  341. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/022.vtt +17 -0
  342. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/023.vtt +17 -0
  343. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/024.vtt +13 -0
  344. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/025.vtt +9 -0
  345. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/026.vtt +9 -0
  346. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/027.vtt +9 -0
  347. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/028.vtt +9 -0
  348. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/01.mp4 +0 -0
  349. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/01.poster.webp +0 -0
  350. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/02.mp4 +0 -0
  351. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/02.poster.webp +0 -0
  352. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/03.mp4 +0 -0
  353. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/03.poster.webp +0 -0
  354. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/04.mp4 +0 -0
  355. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/04.poster.webp +0 -0
  356. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/01.png +0 -0
  357. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/01.webp +0 -0
  358. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/02.png +0 -0
  359. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/02.webp +0 -0
  360. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/03.png +0 -0
  361. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/03.webp +0 -0
  362. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/04.png +0 -0
  363. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/04.webp +0 -0
  364. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/05.png +0 -0
  365. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/05.webp +0 -0
  366. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/06.png +0 -0
  367. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/06.webp +0 -0
  368. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/07.png +0 -0
  369. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/07.webp +0 -0
  370. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/08.png +0 -0
  371. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/08.webp +0 -0
  372. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/09.png +0 -0
  373. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/09.webp +0 -0
  374. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/10.png +0 -0
  375. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/10.webp +0 -0
  376. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/11.png +0 -0
  377. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/11.webp +0 -0
  378. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/12.png +0 -0
  379. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/12.webp +0 -0
  380. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/13.png +0 -0
  381. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/13.webp +0 -0
  382. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/14.png +0 -0
  383. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/14.webp +0 -0
  384. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-2/01.png +0 -0
  385. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-2/01.webp +0 -0
  386. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-3/01.png +0 -0
  387. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-3/01.webp +0 -0
  388. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-4/01.png +0 -0
  389. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-4/01.webp +0 -0
  390. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-5/01.png +0 -0
  391. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-5/01.webp +0 -0
  392. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-6/01.png +0 -0
  393. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-6/01.webp +0 -0
  394. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-7/01.png +0 -0
  395. package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-7/01.webp +0 -0
  396. package/packages/visualizer/fixtures/full/specs/coffee/ordering/checkout.scxml +82 -0
  397. package/packages/visualizer/fixtures/full/specs/coffee/ordering/journeys.yaml +129 -0
  398. package/packages/visualizer/fixtures/full/specs/coffee/ordering/known-issues.md +14 -0
  399. package/packages/visualizer/fixtures/full/specs/coffee/ordering/machine.yaml +158 -0
  400. package/packages/visualizer/fixtures/full/specs/coffee/ordering/open-questions.md +25 -0
  401. package/packages/visualizer/fixtures/large/runs/2026-10-06T14-40-00-000Z-fast/ctrf.json +1280 -0
  402. package/packages/visualizer/fixtures/large/runs/2026-10-06T14-40-00-000Z-fast/junit.xml +26 -0
  403. package/packages/visualizer/fixtures/large/runs/2026-10-06T14-40-00-000Z-fast/manifest.json +28393 -0
  404. package/packages/visualizer/fixtures/large/specs/accounts/sign-up/identity-check.machine.yaml +397 -0
  405. package/packages/visualizer/fixtures/large/specs/accounts/sign-up/journeys.yaml +129 -0
  406. package/packages/visualizer/fixtures/large/specs/accounts/sign-up/machine.yaml +830 -0
  407. package/packages/visualizer/fixtures/large/specs/atlas.yaml +65 -0
  408. package/packages/visualizer/fixtures/large/specs/billing/invoices/journeys.yaml +132 -0
  409. package/packages/visualizer/fixtures/large/specs/billing/invoices/machine.yaml +830 -0
  410. package/packages/visualizer/fixtures/large/specs/billing/invoices/refund-handling.scxml +288 -0
  411. package/packages/visualizer/fixtures/large/specs/catalog/browsing/journeys.yaml +126 -0
  412. package/packages/visualizer/fixtures/large/specs/catalog/browsing/machine.yaml +831 -0
  413. package/packages/visualizer/fixtures/large/specs/catalog/browsing/product-comparison.machine.yaml +395 -0
  414. package/packages/visualizer/fixtures/large/specs/orders/checkout/journeys.yaml +120 -0
  415. package/packages/visualizer/fixtures/large/specs/orders/checkout/machine.yaml +724 -0
  416. package/packages/visualizer/fixtures/large/specs/orders/checkout/open-questions.md +16 -0
  417. package/packages/visualizer/fixtures/large/specs/orders/checkout/payment.scxml +288 -0
  418. package/packages/visualizer/fixtures/large/specs/shipping/deliveries/delivery-scheduling.machine.yaml +397 -0
  419. package/packages/visualizer/fixtures/large/specs/shipping/deliveries/journeys.yaml +132 -0
  420. package/packages/visualizer/fixtures/large/specs/shipping/deliveries/known-issues.md +13 -0
  421. package/packages/visualizer/fixtures/large/specs/shipping/deliveries/machine.yaml +830 -0
  422. package/packages/visualizer/fixtures/large/specs/support/tickets/escalation.machine.yaml +395 -0
  423. package/packages/visualizer/fixtures/large/specs/support/tickets/journeys.yaml +123 -0
  424. package/packages/visualizer/fixtures/large/specs/support/tickets/machine.yaml +720 -0
  425. package/packages/visualizer/fixtures/malformed/runs/2026-10-06T10-00-00-000Z-showcase/manifest.json +68 -0
  426. package/packages/visualizer/fixtures/malformed/runs/2026-10-06T11-00-00-000Z-showcase/ctrf.json +50 -0
  427. package/packages/visualizer/fixtures/malformed/runs/2026-10-06T11-00-00-000Z-showcase/junit.xml +6 -0
  428. package/packages/visualizer/fixtures/malformed/runs/2026-10-06T11-00-00-000Z-showcase/manifest.json +1281 -0
  429. package/packages/visualizer/fixtures/malformed/runs/2026-10-06T12-00-00-000Z-showcase/ctrf.json +50 -0
  430. package/packages/visualizer/fixtures/malformed/runs/2026-10-06T12-00-00-000Z-showcase/junit.xml +6 -0
  431. package/packages/visualizer/fixtures/malformed/runs/2026-10-06T12-00-00-000Z-showcase/manifest.json +1232 -0
  432. package/packages/visualizer/fixtures/malformed/runs/2026-10-06T13-00-00-000Z-showcase/manifest.json +1244 -0
  433. package/packages/visualizer/fixtures/malformed/specs/coffee/ordering/checkout.scxml +82 -0
  434. package/packages/visualizer/fixtures/malformed/specs/coffee/ordering/journeys.yaml +134 -0
  435. package/packages/visualizer/fixtures/malformed/specs/coffee/ordering/known-issues.md +14 -0
  436. package/packages/visualizer/fixtures/malformed/specs/coffee/ordering/loyalty.scxml +4 -0
  437. package/packages/visualizer/fixtures/malformed/specs/coffee/ordering/machine.yaml +156 -0
  438. package/packages/visualizer/fixtures/malformed/specs/coffee/ordering/open-questions.md +25 -0
  439. package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/chart.mmd +67 -0
  440. package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/ctrf.json +149 -0
  441. package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/junit.xml +9 -0
  442. package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/manifest.json +1718 -0
  443. package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/001.vtt +9 -0
  444. package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/002.vtt +17 -0
  445. package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/003.vtt +17 -0
  446. package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/004.vtt +9 -0
  447. package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/005.vtt +9 -0
  448. package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/01.mp4 +0 -0
  449. package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/01.poster.webp +0 -0
  450. package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/02.mp4 +0 -0
  451. package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/02.poster.webp +0 -0
  452. package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/03.mp4 +0 -0
  453. package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/03.poster.webp +0 -0
  454. package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/01.png +0 -0
  455. package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/01.webp +0 -0
  456. package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/02.png +0 -0
  457. package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/02.webp +0 -0
  458. package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/03.png +0 -0
  459. package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/03.webp +0 -0
  460. package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/05.png +0 -0
  461. package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/05.webp +0 -0
  462. package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-3/01.png +0 -0
  463. package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-3/01.webp +0 -0
  464. package/packages/visualizer/fixtures/partial/runs/2026-10-06T15-05-00-000Z-showcase/media/paths/journey-1/00-start-01.png +0 -0
  465. package/packages/visualizer/fixtures/partial/runs/2026-10-06T15-05-00-000Z-showcase/media/paths/journey-1/00-start-01.webp +0 -0
  466. package/packages/visualizer/fixtures/partial/runs/2026-10-06T15-05-00-000Z-showcase/media/paths/journey-1/02.png +0 -0
  467. package/packages/visualizer/fixtures/partial/runs/2026-10-06T15-05-00-000Z-showcase/media/paths/journey-1/02.webp +0 -0
  468. package/packages/visualizer/fixtures/partial/specs/coffee/ordering/checkout.scxml +82 -0
  469. package/packages/visualizer/fixtures/partial/specs/coffee/ordering/journeys.yaml +129 -0
  470. package/packages/visualizer/fixtures/partial/specs/coffee/ordering/known-issues.md +14 -0
  471. package/packages/visualizer/fixtures/partial/specs/coffee/ordering/machine.yaml +158 -0
  472. package/packages/visualizer/fixtures/partial/specs/coffee/ordering/open-questions.md +25 -0
  473. package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/ctrf.json +79 -0
  474. package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/junit.xml +7 -0
  475. package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/manifest.json +1504 -0
  476. package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/001.vtt +9 -0
  477. package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/002.vtt +9 -0
  478. package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/003.vtt +9 -0
  479. package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/004.vtt +17 -0
  480. package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/01.mp4 +0 -0
  481. package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/01.poster.webp +0 -0
  482. package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/02.mp4 +0 -0
  483. package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/02.poster.webp +0 -0
  484. package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/01.png +0 -0
  485. package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/01.webp +0 -0
  486. package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/02.png +0 -0
  487. package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/02.webp +0 -0
  488. package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/03.png +0 -0
  489. package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/03.webp +0 -0
  490. package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/04.png +0 -0
  491. package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/04.webp +0 -0
  492. package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-2/01.png +0 -0
  493. package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-2/01.webp +0 -0
  494. package/packages/visualizer/fixtures/removed/specs/coffee/ordering/checkout.scxml +82 -0
  495. package/packages/visualizer/fixtures/removed/specs/coffee/ordering/journeys.yaml +129 -0
  496. package/packages/visualizer/fixtures/removed/specs/coffee/ordering/known-issues.md +14 -0
  497. package/packages/visualizer/fixtures/removed/specs/coffee/ordering/machine.yaml +158 -0
  498. package/packages/visualizer/fixtures/removed/specs/coffee/ordering/open-questions.md +25 -0
  499. package/packages/visualizer/fixtures/spec-only/runs/.gitkeep +0 -0
  500. package/packages/visualizer/fixtures/spec-only/specs/coffee/ordering/checkout.scxml +82 -0
  501. package/packages/visualizer/fixtures/spec-only/specs/coffee/ordering/journeys.yaml +129 -0
  502. package/packages/visualizer/fixtures/spec-only/specs/coffee/ordering/known-issues.md +14 -0
  503. package/packages/visualizer/fixtures/spec-only/specs/coffee/ordering/machine.yaml +158 -0
  504. package/packages/visualizer/fixtures/spec-only/specs/coffee/ordering/open-questions.md +25 -0
  505. package/packages/visualizer/index.html +13 -0
  506. package/packages/visualizer/scripts/make-fixtures.ts +1490 -0
  507. package/packages/visualizer/scripts/publish-data.ts +22 -0
  508. package/packages/visualizer/src/app/AppShell.tsx +56 -0
  509. package/packages/visualizer/src/app/atlas-context.tsx +23 -0
  510. package/packages/visualizer/src/app/gazetteer.module.css +97 -0
  511. package/packages/visualizer/src/app/gazetteer.tsx +105 -0
  512. package/packages/visualizer/src/app/report-sources.tsx +122 -0
  513. package/packages/visualizer/src/app/router.tsx +69 -0
  514. package/packages/visualizer/src/app/search-query.tsx +14 -0
  515. package/packages/visualizer/src/components/DataIssues.module.css +136 -0
  516. package/packages/visualizer/src/components/DataIssues.tsx +70 -0
  517. package/packages/visualizer/src/components/Header.module.css +189 -0
  518. package/packages/visualizer/src/components/Header.tsx +127 -0
  519. package/packages/visualizer/src/components/Legend.module.css +84 -0
  520. package/packages/visualizer/src/components/Legend.tsx +50 -0
  521. package/packages/visualizer/src/components/Screen.module.css +312 -0
  522. package/packages/visualizer/src/components/Screen.tsx +141 -0
  523. package/packages/visualizer/src/components/Status.module.css +116 -0
  524. package/packages/visualizer/src/components/Status.tsx +60 -0
  525. package/packages/visualizer/src/components/icons.tsx +156 -0
  526. package/packages/visualizer/src/components/labels.tsx +22 -0
  527. package/packages/visualizer/src/data/adapters/adapter.ts +112 -0
  528. package/packages/visualizer/src/data/adapters/context.tsx +11 -0
  529. package/packages/visualizer/src/data/adapters/index.ts +29 -0
  530. package/packages/visualizer/src/data/adapters/report-backend.test.ts +96 -0
  531. package/packages/visualizer/src/data/adapters/report-backend.ts +42 -0
  532. package/packages/visualizer/src/data/fixtures.test.ts +407 -0
  533. package/packages/visualizer/src/data/model/build.ts +418 -0
  534. package/packages/visualizer/src/data/model/event-kind.test.ts +59 -0
  535. package/packages/visualizer/src/data/model/event-kind.ts +54 -0
  536. package/packages/visualizer/src/data/model/index.ts +3 -0
  537. package/packages/visualizer/src/data/model/journeys.test.ts +159 -0
  538. package/packages/visualizer/src/data/model/journeys.ts +29 -0
  539. package/packages/visualizer/src/data/model/simulation.test.ts +115 -0
  540. package/packages/visualizer/src/data/model/simulation.ts +187 -0
  541. package/packages/visualizer/src/data/model/status.test.ts +34 -0
  542. package/packages/visualizer/src/data/model/status.ts +43 -0
  543. package/packages/visualizer/src/data/model/types.ts +280 -0
  544. package/packages/visualizer/src/data/parse/issues.test.ts +82 -0
  545. package/packages/visualizer/src/data/parse/issues.ts +114 -0
  546. package/packages/visualizer/src/data/parse/manifest.ts +173 -0
  547. package/packages/visualizer/src/data/parse/markdown.test.ts +119 -0
  548. package/packages/visualizer/src/data/parse/markdown.ts +133 -0
  549. package/packages/visualizer/src/data/parse/spec.test.ts +106 -0
  550. package/packages/visualizer/src/data/parse/spec.ts +557 -0
  551. package/packages/visualizer/src/data/parse/structured.ts +44 -0
  552. package/packages/visualizer/src/data/queries.ts +369 -0
  553. package/packages/visualizer/src/data/testing/load-fixture.ts +63 -0
  554. package/packages/visualizer/src/evidence/api.ts +41 -0
  555. package/packages/visualizer/src/evidence/check-detail.tsx +257 -0
  556. package/packages/visualizer/src/evidence/decision-table.tsx +68 -0
  557. package/packages/visualizer/src/evidence/document-page.tsx +40 -0
  558. package/packages/visualizer/src/evidence/evidence-context.tsx +159 -0
  559. package/packages/visualizer/src/evidence/evidence.module.css +877 -0
  560. package/packages/visualizer/src/evidence/feature-page.tsx +88 -0
  561. package/packages/visualizer/src/evidence/format.ts +56 -0
  562. package/packages/visualizer/src/evidence/gherkin.ts +98 -0
  563. package/packages/visualizer/src/evidence/marks.tsx +118 -0
  564. package/packages/visualizer/src/evidence/model-page.tsx +60 -0
  565. package/packages/visualizer/src/evidence/model-trace.tsx +57 -0
  566. package/packages/visualizer/src/evidence/overview.tsx +134 -0
  567. package/packages/visualizer/src/evidence/quint.ts +45 -0
  568. package/packages/visualizer/src/evidence/recording-page.tsx +69 -0
  569. package/packages/visualizer/src/evidence/recording.module.css +464 -0
  570. package/packages/visualizer/src/evidence/recording.tsx +197 -0
  571. package/packages/visualizer/src/evidence/snapshot.tsx +108 -0
  572. package/packages/visualizer/src/evidence/sources-panel.tsx +134 -0
  573. package/packages/visualizer/src/evidence/sources.module.css +168 -0
  574. package/packages/visualizer/src/evidence/spec-header.tsx +64 -0
  575. package/packages/visualizer/src/evidence/spec-index.tsx +82 -0
  576. package/packages/visualizer/src/evidence/spec-page.tsx +92 -0
  577. package/packages/visualizer/src/evidence/spec-snapshot.tsx +26 -0
  578. package/packages/visualizer/src/layout/graph.test.ts +113 -0
  579. package/packages/visualizer/src/layout/graph.ts +324 -0
  580. package/packages/visualizer/src/layout/layout.ts +237 -0
  581. package/packages/visualizer/src/layout/use-chart-layout.ts +18 -0
  582. package/packages/visualizer/src/main.tsx +31 -0
  583. package/packages/visualizer/src/map/ChartMap.tsx +252 -0
  584. package/packages/visualizer/src/map/EventEdge.tsx +138 -0
  585. package/packages/visualizer/src/map/map.module.css +546 -0
  586. package/packages/visualizer/src/map/nodes.tsx +145 -0
  587. package/packages/visualizer/src/map/path.ts +24 -0
  588. package/packages/visualizer/src/reachable.test.ts +54 -0
  589. package/packages/visualizer/src/spec-kind.test.ts +27 -0
  590. package/packages/visualizer/src/spec-kind.ts +56 -0
  591. package/packages/visualizer/src/state/ui-store.ts +44 -0
  592. package/packages/visualizer/src/styles/global.css +105 -0
  593. package/packages/visualizer/src/styles/tokens.css +80 -0
  594. package/packages/visualizer/src/views/ChartPage.tsx +52 -0
  595. package/packages/visualizer/src/views/ProductPage.tsx +35 -0
  596. package/packages/visualizer/src/views/SidePanel.tsx +339 -0
  597. package/packages/visualizer/src/views/views.module.css +546 -0
  598. package/packages/visualizer/vite/atlas-dev-plugin.ts +169 -0
  599. package/packages/visualizer/vite/atlas-files.test.ts +119 -0
  600. package/packages/visualizer/vite/atlas-files.ts +199 -0
  601. package/packages/visualizer/vite/publish.test.ts +52 -0
  602. package/packages/visualizer/vite/publish.ts +99 -0
  603. package/packages/visualizer/vite/reports-dev-plugin.ts +82 -0
  604. package/packages/visualizer/vite.config.ts +13 -0
  605. package/packages/vitest/README.md +58 -0
  606. package/packages/webdriver/README.md +77 -0
@@ -0,0 +1,159 @@
1
+ import { describe, expect, it } from 'bun:test';
2
+
3
+ import { createIssueSink } from '../parse/issues';
4
+ import { parseSpec, type SpecFile } from '../parse/spec';
5
+ import { createJourneyReplayer } from './journeys';
6
+
7
+ const parent = (host: string) => `id: Shop
8
+ initial: Home
9
+ states:
10
+ Home:
11
+ meta: { description: The home screen. }
12
+ on:
13
+ Taps order a drink: { target: '#Ordering' }
14
+ Ordering:
15
+ ${host}
16
+ on:
17
+ Drink is ordered: { target: '#Waiting for the drink' }
18
+ Leaves ordering: { target: '#Home' }
19
+ Waiting for the drink:
20
+ meta: { description: A drink on its way. }
21
+ on:
22
+ Goes back home: { target: '#Home' }
23
+ `;
24
+
25
+ const LEGACY_HOST = ` meta:
26
+ description: Ordering runs as its own chart.
27
+ childMachine: Ordering flow
28
+ childFinalEvents:
29
+ Ordered: Drink is ordered
30
+ Gave up: Leaves ordering`;
31
+
32
+ const INVOKE_HOST = ` meta:
33
+ description: Ordering runs as its own chart.
34
+ invoke:
35
+ src: Ordering flow
36
+ id: ordering`;
37
+
38
+ const childYaml = (doneEvents: boolean) => `id: Ordering flow
39
+ initial: Picking a drink
40
+ states:
41
+ Picking a drink:
42
+ meta: { description: Drinks. }
43
+ on:
44
+ Picks a drink: '#Confirming the drink'
45
+ Closes ordering: '#Gave up'
46
+ Confirming the drink:
47
+ meta: { description: Confirm. }
48
+ on:
49
+ Confirms the drink: '#Ordered'
50
+ Ordered:
51
+ type: final
52
+ meta: { description: Done.${doneEvents ? ', doneEvent: Drink is ordered' : ''} }
53
+ Gave up:
54
+ type: final
55
+ meta: { description: Left.${doneEvents ? ', doneEvent: Leaves ordering' : ''} }
56
+ `;
57
+
58
+ const CHILD_SCXML = `<?xml version="1.0" encoding="UTF-8"?>
59
+ <scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:atlas="https://github.com/crvouga/atlas/ns/1" version="1.0" name="Ordering flow" initial="picking-a-drink">
60
+ <state id="picking-a-drink" atlas:name="Picking a drink">
61
+ <atlas:meta><atlas:description>Drinks.</atlas:description></atlas:meta>
62
+ <transition event="picks-a-drink" atlas:name="Picks a drink" target="confirming-the-drink"/>
63
+ <transition event="closes-ordering" atlas:name="Closes ordering" target="gave-up"/>
64
+ </state>
65
+ <state id="confirming-the-drink" atlas:name="Confirming the drink">
66
+ <atlas:meta><atlas:description>Confirm.</atlas:description></atlas:meta>
67
+ <transition event="confirms-the-drink" atlas:name="Confirms the drink" target="ordered"/>
68
+ </state>
69
+ <final id="ordered" atlas:name="Ordered" atlas:done-event="Drink is ordered">
70
+ <atlas:meta><atlas:description>Done.</atlas:description></atlas:meta>
71
+ </final>
72
+ <final id="gave-up" atlas:name="Gave up" atlas:done-event="Leaves ordering">
73
+ <atlas:meta><atlas:description>Left.</atlas:description></atlas:meta>
74
+ </final>
75
+ </scxml>
76
+ `;
77
+
78
+ const JOURNEYS = `journeys:
79
+ Orders a drink:
80
+ events: [Taps order a drink, Picks a drink, Confirms the drink]
81
+ endsIn: [Waiting for the drink]
82
+ Leaves and comes back:
83
+ events: [Taps order a drink, Closes ordering, Taps order a drink]
84
+ endsIn: [Ordering, Picking a drink]
85
+ Impossible event:
86
+ events: [Taps order a drink, Goes back home, Picks a drink]
87
+ Lists the hand-off itself:
88
+ events: [Taps order a drink, Picks a drink, Confirms the drink, Drink is ordered]
89
+ Ends in the wrong place:
90
+ events: [Taps order a drink]
91
+ endsIn: [Waiting for the drink]
92
+ `;
93
+
94
+ const COMPOSITIONS: [string, SpecFile[]][] = [
95
+ ['legacy meta.childMachine', [
96
+ { path: 'shop/ordering/machine.yaml', text: parent(LEGACY_HOST) },
97
+ { path: 'shop/ordering/ordering-flow.machine.yaml', text: childYaml(false) }
98
+ ]],
99
+ ['XState invoke', [
100
+ { path: 'shop/ordering/machine.yaml', text: parent(INVOKE_HOST) },
101
+ { path: 'shop/ordering/ordering-flow.machine.yaml', text: childYaml(true) }
102
+ ]],
103
+ ['invoke of an SCXML chart', [
104
+ { path: 'shop/ordering/machine.yaml', text: parent(INVOKE_HOST) },
105
+ { path: 'shop/ordering/ordering-flow.scxml', text: CHILD_SCXML }
106
+ ]]
107
+ ];
108
+
109
+ function replayAll(charts: SpecFile[]) {
110
+ const sink = createIssueSink();
111
+ const doc = parseSpec({ ref: null, files: [...charts, { path: 'shop/ordering/journeys.yaml', text: JOURNEYS }] }, sink);
112
+ expect(sink.issues.filter((i) => i.severity !== 'info')).toEqual([]);
113
+ const replay = createJourneyReplayer(doc, sink);
114
+ const results = new Map(doc.journeys.map((j) => [j.name, replay(j)]));
115
+ return { results, issues: sink.issues };
116
+ }
117
+
118
+ describe.each(COMPOSITIONS)('journey replay with %s', (_label, charts) => {
119
+ const { results, issues } = replayAll(charts);
120
+
121
+ it('inserts the hand-off event when the child chart reaches a final state', () => {
122
+ const result = results.get('Orders a drink')!;
123
+ expect(result).toMatchObject({ ok: true, failedAt: null, missingEnds: [] });
124
+ expect(result.steps.map((s) => [s.event, s.handOff])).toEqual([
125
+ ['Taps order a drink', false],
126
+ ['Picks a drink', false],
127
+ ['Confirms the drink', false],
128
+ ['Drink is ordered', true]
129
+ ]);
130
+ expect(result.steps[3]).toMatchObject({ transitionIds: ['Ordered :: Drink is ordered'], from: expect.arrayContaining(['Ordering', 'Ordered']), to: ['Waiting for the drink'] });
131
+ });
132
+
133
+ it('re-enters the child chart at its start after a hand-off back', () => {
134
+ const result = results.get('Leaves and comes back')!;
135
+ expect(result.ok).toBe(true);
136
+ expect(result.steps.filter((s) => s.handOff).map((s) => s.event)).toEqual(['Leaves ordering']);
137
+ expect(result.steps.at(-1)?.to).toEqual(['Ordering', 'Picking a drink']);
138
+ });
139
+
140
+ it.each<[string, string, number]>([
141
+ ['Impossible event', 'Goes back home', 1],
142
+ ['Lists the hand-off itself', 'Drink is ordered', 4]
143
+ ])('stops "%s" at the event that cannot happen', (name, failedAt, stepsTaken) => {
144
+ const result = results.get(name)!;
145
+ expect(result).toMatchObject({ ok: false, failedAt, missingEnds: [] });
146
+ expect(result.steps).toHaveLength(stepsTaken);
147
+ expect(issues).toContainEqual({
148
+ severity: 'warning',
149
+ file: 'shop/ordering/journeys.yaml',
150
+ path: `journeys › ${name}`,
151
+ message: `"${failedAt}" can't happen at that point in the journey, so the journey stops there on the map.`
152
+ });
153
+ });
154
+
155
+ it('reports the end states a journey misses', () => {
156
+ expect(results.get('Ends in the wrong place')).toMatchObject({ ok: false, failedAt: null, missingEnds: ['Waiting for the drink'] });
157
+ expect(issues.some((i) => i.path === 'journeys › Ends in the wrong place › endsIn' && i.severity === 'info')).toBe(true);
158
+ });
159
+ });
@@ -0,0 +1,29 @@
1
+ import type { IssueSink } from '../parse/issues';
2
+ import type { ParsedJourney, SpecDocument } from '../parse/spec';
3
+ import { createSimulationFactory } from './simulation';
4
+ import type { JourneyStep } from './types';
5
+
6
+ export type ReplayResult = { steps: JourneyStep[]; ok: boolean; failedAt: string | null; missingEnds: string[] };
7
+
8
+ export function createJourneyReplayer(doc: SpecDocument, sink: IssueSink) {
9
+ const simulation = createSimulationFactory(doc);
10
+ return (journey: ParsedJourney): ReplayResult => {
11
+ const group = doc.groups.find((g) => g.dir === journey.dir);
12
+ const top = doc.charts.find((c) => group?.chartIds.includes(c.id) && !c.parent);
13
+ if (!top) return { steps: [], ok: false, failedAt: journey.events[0] ?? null, missingEnds: journey.endsIn };
14
+ try {
15
+ const result = simulation(top.id).replay(journey.events);
16
+ if (result.failedAt) {
17
+ sink.add('warning', journey.file, ['journeys', journey.name], `"${result.failedAt}" can't happen at that point in the journey, so the journey stops there on the map.`);
18
+ return { steps: result.steps, ok: false, failedAt: result.failedAt, missingEnds: [] };
19
+ }
20
+ if (result.error) sink.add('warning', journey.file, ['journeys', journey.name], result.error);
21
+ const missingEnds = journey.endsIn.filter((s) => !result.config.active.includes(s));
22
+ if (missingEnds.length) sink.add('info', journey.file, ['journeys', journey.name, 'endsIn'], `The journey should end in ${missingEnds.map((s) => `"${s}"`).join(', ')}, but the chart doesn't take it there.`);
23
+ return { steps: result.steps, ok: !result.error && missingEnds.length === 0, failedAt: null, missingEnds };
24
+ } catch (error) {
25
+ sink.add('warning', top.file, [], `Journeys can't be traced through this chart: ${error instanceof Error ? error.message : 'unknown problem'}.`);
26
+ return { steps: [], ok: false, failedAt: journey.events[0] ?? null, missingEnds: journey.endsIn };
27
+ }
28
+ };
29
+ }
@@ -0,0 +1,115 @@
1
+ import { describe, expect, it } from 'bun:test';
2
+ import { parseSpec } from '../parse/spec';
3
+ import { ChartSimulation } from './simulation';
4
+
5
+ const root = {
6
+ id: 'Product', initial: 'App', states: {
7
+ App: { type: 'parallel', states: {
8
+ Identity: { initial: 'Guest', states: {
9
+ Guest: { on: { 'Signs in': '#Account', 'A broadcast arrives': '#Account' } },
10
+ Account: { on: { 'Signs out': '#Guest' } }
11
+ } },
12
+ Place: { initial: 'Home', states: {
13
+ Home: { on: { 'Opens checkout': '#Checkout host', 'A broadcast arrives': '#News' } },
14
+ News: { on: { 'Returns home': '#Home' } },
15
+ 'Checkout host': { invoke: { src: 'Checkout' }, on: { 'Paid': '#Receipt', 'Closes checkout': '#Home' } },
16
+ Receipt: { on: { 'Returns home': '#Home' } },
17
+ Unreachable: {}
18
+ } }
19
+ } }
20
+ }
21
+ };
22
+ const child = { id: 'Checkout', initial: 'Card form', states: {
23
+ 'Card form': { on: { 'Pays successfully': '#Payment complete' } },
24
+ 'Payment complete': { type: 'final', meta: { doneEvent: 'Paid' } }
25
+ } };
26
+ const document = () => parseSpec({ ref: null, files: [
27
+ { path: 'product.machine.json', text: JSON.stringify(root) },
28
+ { path: 'checkout.machine.json', text: JSON.stringify(child) }
29
+ ] });
30
+
31
+ describe('free exploration of composed statecharts', () => {
32
+ it('keeps parallel active states and broadcasts one event to both regions', () => {
33
+ const simulation = new ChartSimulation(document(), 'Product');
34
+ expect(simulation.leaves(simulation.initial().config)).toEqual(['Guest', 'Home']);
35
+ const result = simulation.replay(['A broadcast arrives']);
36
+ expect(result.error).toBeNull();
37
+ expect(simulation.leaves(result.config)).toEqual(['Account', 'News']);
38
+ expect(result.steps[0]?.transitionIds).toEqual(['Guest :: A broadcast arrives', 'Home :: A broadcast arrives']);
39
+ });
40
+
41
+ it('shares the composed root from a nested chart and settles child hand-offs', () => {
42
+ const simulation = new ChartSimulation(document(), 'Checkout');
43
+ expect(simulation.rootId).toBe('Product');
44
+ const result = simulation.replay(['Signs in', 'Opens checkout', 'Pays successfully']);
45
+ expect(simulation.leaves(result.config)).toEqual(['Account', 'Receipt']);
46
+ expect(result.steps.map((s) => [s.event, s.handOff])).toEqual([
47
+ ['Signs in', false], ['Opens checkout', false], ['Pays successfully', false], ['Paid', true]
48
+ ]);
49
+ expect(simulation.enabled(result.config)).not.toContain('Paid');
50
+ });
51
+
52
+ it('rejects unavailable events and preserves the exact previous configuration', () => {
53
+ const simulation = new ChartSimulation(document(), 'Product');
54
+ const initial = simulation.initial();
55
+ const result = simulation.advance(initial.config, 'Pays successfully');
56
+ expect(result).toMatchObject({ steps: [], failedAt: 'Pays successfully' });
57
+ expect(result.config).toBe(initial.config);
58
+ expect(result.error).toContain('unavailable');
59
+ });
60
+
61
+ it('finds a shortest route through nested states including automatic hand-offs', () => {
62
+ const simulation = new ChartSimulation(document(), 'Product');
63
+ const start = simulation.initial().config;
64
+ expect(simulation.route(start, 'Card form')).toMatchObject({ status: 'found', events: ['Opens checkout'] });
65
+ const route = simulation.route(start, 'Receipt');
66
+ expect(route).toMatchObject({ status: 'found', events: ['Opens checkout', 'Pays successfully'] });
67
+ expect(simulation.replay(route.events).config.active).toContain('Receipt');
68
+ expect(simulation.route(start, 'Payment complete')).toMatchObject({ status: 'found', events: ['Opens checkout', 'Pays successfully'], transient: true });
69
+ expect(simulation.route(start, 'Guest')).toMatchObject({ status: 'found', events: [] });
70
+ });
71
+
72
+ it('distinguishes exhaustive unreachability, a search limit and an unknown state', () => {
73
+ const simulation = new ChartSimulation(document(), 'Product');
74
+ const start = simulation.initial().config;
75
+ expect(simulation.route(start, 'Unreachable')).toMatchObject({ status: 'unreachable', events: [] });
76
+ expect(simulation.route(start, 'Receipt', 1)).toMatchObject({ status: 'limit', visited: 1, events: [] });
77
+ expect(simulation.route(start, 'Unknown')).toMatchObject({ status: 'invalid', visited: 0, events: [] });
78
+ });
79
+
80
+ it('replays a history prefix without retaining later choices or mutating the initial state', () => {
81
+ const simulation = new ChartSimulation(document(), 'Product');
82
+ const choices = ['Signs in', 'Opens checkout', 'Pays successfully'];
83
+ expect(simulation.leaves(simulation.replay(choices.slice(0, 1)).config)).toEqual(['Account', 'Home']);
84
+ expect(simulation.leaves(simulation.replay([]).config)).toEqual(['Guest', 'Home']);
85
+ expect(simulation.leaves(simulation.replay(choices).config)).toEqual(['Account', 'Receipt']);
86
+ });
87
+
88
+ it('preserves a chart whose root is parallel', () => {
89
+ const doc = parseSpec({ ref: null, files: [{ path: 'parallel.machine.json', text: JSON.stringify({ id: 'Parallel', type: 'parallel', states: {
90
+ Left: { initial: 'Left start', states: { 'Left start': {} } },
91
+ Right: { initial: 'Right start', states: { 'Right start': {} } }
92
+ } }) }] });
93
+ const simulation = new ChartSimulation(doc, 'Parallel');
94
+ expect(simulation.leaves(simulation.initial().config)).toEqual(['Left start', 'Right start']);
95
+ });
96
+
97
+ it('keeps a tolerant map but refuses to simulate guards that the model cannot execute', () => {
98
+ const doc = parseSpec({ ref: null, files: [{ path: 'guarded.machine.json', text: JSON.stringify({ id: 'Guarded', initial: 'A', states: {
99
+ A: { on: { Go: { target: '#B', guard: 'Has account' } } }, B: {}
100
+ } }) }] });
101
+ expect(doc.states.has('A')).toBe(true);
102
+ expect(() => new ChartSimulation(doc, 'Guarded')).toThrow('cannot be explored safely');
103
+ });
104
+
105
+ // regression: atlas-automatic-handoff-cycle
106
+ it('stops a literal automatic hand-off cycle instead of hanging', () => {
107
+ const doc = parseSpec({ ref: null, files: [
108
+ { path: 'cycle.machine.json', text: JSON.stringify({ id: 'Cycle', initial: 'Host', states: { Host: { invoke: { src: 'Child' }, on: { Again: '#Host' } } } }) },
109
+ { path: 'child.machine.json', text: JSON.stringify({ id: 'Child', initial: 'Done', states: { Done: { type: 'final', meta: { doneEvent: 'Again' } } } }) }
110
+ ] });
111
+ const result = new ChartSimulation(doc, 'Cycle').initial();
112
+ expect(result.error).toContain('cycle');
113
+ expect(result.steps).toHaveLength(1);
114
+ });
115
+ });
@@ -0,0 +1,187 @@
1
+ import { createMachine, initialTransition, transition, type AnyMachineSnapshot } from 'xstate';
2
+
3
+ import type { SpecDocument } from '../parse/spec';
4
+ import type { JourneyStep } from './types';
5
+
6
+ type XNode = { id: string; initial?: string; type?: 'parallel' | 'final'; states?: Record<string, XNode>; on?: Record<string, { target: string }> };
7
+ export type Exploration = { active: string[]; snapshot: AnyMachineSnapshot };
8
+ export type ExplorationResult = { config: Exploration; steps: JourneyStep[]; error: string | null; failedAt: string | null };
9
+ export type RouteResult = { status: 'found'; events: string[]; visited: number; transient?: boolean } | { status: 'unreachable' | 'limit' | 'invalid'; events: []; visited: number };
10
+
11
+ /** One pure composed model shared by free exploration and named journey replay. */
12
+ export class ChartSimulation {
13
+ readonly rootId: string;
14
+ private readonly machine;
15
+ private readonly nameOf = new Map<string, string>();
16
+ private readonly parentOf = new Map<string, string | null>();
17
+ private readonly handlers = new Map<string, Map<string, string>>();
18
+ private readonly handOffs = new Map<string, { event: string; transitionId: string }>();
19
+
20
+ constructor(doc: SpecDocument, chartId: string) {
21
+ let top = doc.charts.find((c) => c.id === chartId);
22
+ const parents = new Set<string>();
23
+ while (top?.parent && !parents.has(top.id)) {
24
+ parents.add(top.id);
25
+ top = doc.charts.find((c) => c.id === top!.parent!.chartId);
26
+ }
27
+ if (!top || !top.rootStates.length) throw new Error('This chart has no starting states.');
28
+ this.rootId = top.id;
29
+ if (top.explorationError) throw new Error(top.explorationError);
30
+ const keyOf = new Map<string, string>();
31
+ const key = (name: string) => {
32
+ if (!keyOf.has(name)) {
33
+ const id = `s${keyOf.size}`;
34
+ keyOf.set(name, id);
35
+ this.nameOf.set(id, name);
36
+ }
37
+ return keyOf.get(name)!;
38
+ };
39
+ const visiting = new Set<string>();
40
+ const build = (name: string, parent: string | null): XNode => {
41
+ const state = doc.states.get(name);
42
+ if (!state || visiting.has(name)) throw new Error(`Cannot compose the state “${name}”.`);
43
+ visiting.add(name);
44
+ this.parentOf.set(name, parent);
45
+ const node: XNode = { id: key(name) };
46
+ const on: Record<string, { target: string }> = {};
47
+ const handled = new Map<string, string>();
48
+ for (const tid of state.transitions) {
49
+ const t = doc.transitions.get(tid);
50
+ if (!t?.target || t.carriedBy) continue;
51
+ on[t.event] = { target: `#${key(t.target)}` };
52
+ handled.set(t.event, tid);
53
+ if (t.handOff) this.handOffs.set(name, { event: t.event, transitionId: tid });
54
+ }
55
+ const child = state.childChartId ? doc.charts.find((c) => c.id === state.childChartId) : null;
56
+ if (child?.explorationError) throw new Error(child.explorationError);
57
+ const children = child ? child.rootStates : state.children;
58
+ if (children.length) {
59
+ node.states = {};
60
+ for (const name of children) {
61
+ const built = build(name, state.name);
62
+ node.states[built.id] = built;
63
+ }
64
+ if (state.type === 'parallel' || child?.type === 'parallel') node.type = 'parallel';
65
+ else node.initial = key(child?.initial ?? state.initial ?? children[0]!);
66
+ } else if (state.type === 'final' && !this.handOffs.has(name)) node.type = 'final';
67
+ if (Object.keys(on).length) node.on = on;
68
+ this.handlers.set(name, handled);
69
+ visiting.delete(name);
70
+ return node;
71
+ };
72
+ const root: XNode = { id: 'root', states: {} };
73
+ for (const name of top.rootStates) {
74
+ const node = build(name, null);
75
+ root.states![node.id] = node;
76
+ }
77
+ if (top.type === 'parallel') root.type = 'parallel';
78
+ else root.initial = key(top.initial ?? top.rootStates[0]!);
79
+ this.machine = createMachine(root as Parameters<typeof createMachine>[0]);
80
+ }
81
+
82
+ private config(snapshot: AnyMachineSnapshot): Exploration {
83
+ const active: string[] = [];
84
+ const walk = (value: unknown) => {
85
+ if (typeof value === 'string') active.push(this.nameOf.get(value) ?? value);
86
+ else if (value && typeof value === 'object') for (const [key, child] of Object.entries(value)) {
87
+ active.push(this.nameOf.get(key) ?? key);
88
+ walk(child);
89
+ }
90
+ };
91
+ walk(snapshot.value);
92
+ return { active, snapshot };
93
+ }
94
+
95
+ private descendant(name: string, ancestor: string) {
96
+ for (let p = this.parentOf.get(name); p; p = this.parentOf.get(p)) if (p === ancestor) return true;
97
+ return false;
98
+ }
99
+
100
+ leaves(config: Exploration) {
101
+ return config.active.filter((name) => !config.active.some((other) => other !== name && this.descendant(other, name)));
102
+ }
103
+
104
+ enabled(config: Exploration) {
105
+ return [...new Set(config.active.flatMap((name) => [...(this.handlers.get(name)?.keys() ?? [])]))];
106
+ }
107
+
108
+ private step(config: Exploration, event: string, handOff: boolean): { config: Exploration; step: JourneyStep } | null {
109
+ const candidates = config.active.filter((name) => this.handlers.get(name)?.has(event));
110
+ const fired = candidates.filter((name) => !candidates.some((other) => other !== name && this.descendant(other, name)));
111
+ if (!fired.length) return null;
112
+ const [snapshot] = transition(this.machine, config.snapshot, { type: event });
113
+ const next = this.config(snapshot);
114
+ return { config: next, step: { index: 0, event, handOff, transitionIds: fired.map((name) => this.handlers.get(name)!.get(event)!), from: config.active, to: next.active } };
115
+ }
116
+
117
+ private settle(result: ExplorationResult): ExplorationResult {
118
+ const seen = new Set<string>();
119
+ for (let count = 0; count < 100; count++) {
120
+ const pending = result.config.active.find((name) => this.handOffs.has(name));
121
+ if (!pending) return result;
122
+ const key = JSON.stringify(result.config.snapshot.value);
123
+ if (seen.has(key)) return { ...result, error: 'Automatic hand-offs form a cycle. The model stopped safely.' };
124
+ seen.add(key);
125
+ const event = this.handOffs.get(pending)!.event;
126
+ const next = this.step(result.config, event, true);
127
+ if (!next) return { ...result, error: `The automatic hand-off “${event}” cannot complete.` };
128
+ result = { ...result, config: next.config, steps: [...result.steps, { ...next.step, index: result.steps.length }] };
129
+ }
130
+ return { ...result, error: 'The model exceeded 100 automatic hand-offs. Exploration stopped safely.' };
131
+ }
132
+
133
+ initial(): ExplorationResult {
134
+ const [snapshot] = initialTransition(this.machine);
135
+ return this.settle({ config: this.config(snapshot), steps: [], error: null, failedAt: null });
136
+ }
137
+
138
+ advance(config: Exploration, event: string): ExplorationResult {
139
+ const next = this.step(config, event, false);
140
+ if (!next) return { config, steps: [], error: `“${event}” is unavailable in the current states.`, failedAt: event };
141
+ return this.settle({ config: next.config, steps: [next.step], error: null, failedAt: null });
142
+ }
143
+
144
+ replay(events: readonly string[]): ExplorationResult {
145
+ let result = this.initial();
146
+ if (result.error) return result;
147
+ for (const event of events) {
148
+ const next = this.advance(result.config, event);
149
+ result = { ...next, steps: [...result.steps, ...next.steps].map((step, index) => ({ ...step, index })) };
150
+ if (result.error) return result;
151
+ }
152
+ return result;
153
+ }
154
+
155
+ /** Bounded BFS, including automatic hand-offs; no arbitrary teleporting to a state. */
156
+ route(start: Exploration, target: string, maxConfigs = 2000): RouteResult {
157
+ if (!this.handlers.has(target)) return { status: 'invalid', events: [], visited: 0 };
158
+ const key = (config: Exploration) => JSON.stringify(config.snapshot.value);
159
+ const budget = Number.isFinite(maxConfigs) ? Math.max(1, Math.min(20_000, Math.floor(maxConfigs))) : 2000;
160
+ const queue = [{ config: start, events: [] as string[] }];
161
+ const seen = new Set([key(start)]);
162
+ for (let head = 0; head < queue.length; head++) {
163
+ const here = queue[head]!;
164
+ if (here.config.active.includes(target)) return { status: 'found', events: here.events, visited: seen.size };
165
+ for (const event of this.enabled(here.config)) {
166
+ const next = this.advance(here.config, event);
167
+ if (next.error) continue;
168
+ const events = [...here.events, event];
169
+ if (next.config.active.includes(target)) return { status: 'found', events, visited: seen.size + 1 };
170
+ if (next.steps.some((step) => step.to.includes(target))) return { status: 'found', events, visited: seen.size + 1, transient: true };
171
+ if (seen.has(key(next.config))) continue;
172
+ if (seen.size >= budget) return { status: 'limit', events: [], visited: seen.size };
173
+ seen.add(key(next.config));
174
+ queue.push({ config: next.config, events });
175
+ }
176
+ }
177
+ return { status: 'unreachable', events: [], visited: seen.size };
178
+ }
179
+ }
180
+
181
+ export function createSimulationFactory(doc: SpecDocument) {
182
+ const cache = new Map<string, ChartSimulation>();
183
+ return (chartId: string) => {
184
+ if (!cache.has(chartId)) cache.set(chartId, new ChartSimulation(doc, chartId));
185
+ return cache.get(chartId)!;
186
+ };
187
+ }
@@ -0,0 +1,34 @@
1
+ import { describe, expect, it } from 'bun:test';
2
+
3
+ import { emptyCounts, worstOf } from './status';
4
+ import { ITEM_STATUSES, type ItemStatus } from './types';
5
+
6
+ describe('worstOf', () => {
7
+ it.each<[ItemStatus[], ItemStatus, ItemStatus]>([
8
+ [[], 'spec-only', 'spec-only'],
9
+ [[], 'not-yet-run', 'not-yet-run'],
10
+ [['passed'], 'not-yet-run', 'passed'],
11
+ [['passed', 'failed', 'flaky'], 'not-yet-run', 'failed'],
12
+ [['flaky', 'passed'], 'not-yet-run', 'flaky'],
13
+ [['passed', 'not-reached', 'not-yet-run'], 'not-yet-run', 'passed'],
14
+ [['not-reached', 'not-yet-run'], 'not-yet-run', 'not-reached'],
15
+ [['not-yet-run', 'spec-only'], 'spec-only', 'not-yet-run'],
16
+ [['spec-only', 'spec-only'], 'not-yet-run', 'spec-only'],
17
+ [['not-reached', 'failed', 'not-yet-run'], 'not-yet-run', 'failed']
18
+ ])('%j (empty: %s) is %s', (statuses, empty, expected) => {
19
+ expect(worstOf(statuses, empty)).toBe(expected);
20
+ });
21
+
22
+ it('does not depend on order', () => {
23
+ const statuses = [...ITEM_STATUSES];
24
+ expect(worstOf(statuses, 'spec-only')).toBe(worstOf([...statuses].reverse(), 'spec-only'));
25
+ });
26
+ });
27
+
28
+ describe('emptyCounts', () => {
29
+ it('has a zero for every status and the total', () => {
30
+ const counts = emptyCounts();
31
+ expect(Object.keys(counts).sort()).toEqual([...ITEM_STATUSES, 'total'].sort());
32
+ expect(Object.values(counts).every((n) => n === 0)).toBe(true);
33
+ });
34
+ });
@@ -0,0 +1,43 @@
1
+ import { ITEM_STATUSES, type ItemStatus, type StatusCounts } from './types';
2
+
3
+ export function emptyCounts(): StatusCounts {
4
+ return { passed: 0, flaky: 0, failed: 0, 'not-reached': 0, 'not-yet-run': 0, 'spec-only': 0, total: 0 };
5
+ }
6
+
7
+ const SEVERITY: Record<ItemStatus, number> = {
8
+ failed: 5,
9
+ flaky: 4,
10
+ passed: 3,
11
+ 'not-reached': 2,
12
+ 'not-yet-run': 1,
13
+ 'spec-only': 0
14
+ };
15
+
16
+ /**
17
+ * One status for a group of items: a failure anywhere shows, then flakiness; a group counts as
18
+ * passed when something in it passed and nothing failed.
19
+ */
20
+ export function worstOf(statuses: readonly ItemStatus[], empty: ItemStatus): ItemStatus {
21
+ if (statuses.length === 0) return empty;
22
+ return statuses.reduce((worst, s) => (SEVERITY[s] > SEVERITY[worst] ? s : worst));
23
+ }
24
+
25
+ export const STATUS_LABEL: Record<ItemStatus, string> = {
26
+ passed: 'Working',
27
+ flaky: 'Unreliable',
28
+ failed: 'Broken',
29
+ 'not-reached': 'Not reached',
30
+ 'not-yet-run': 'Not run yet',
31
+ 'spec-only': 'Spec only'
32
+ };
33
+
34
+ /** A sentence only when the status word does not already say it, or when the run gave its own reason. */
35
+ export function statusNote(status: ItemStatus, reason?: string | null): string | null {
36
+ const specific = reason?.trim();
37
+ if (specific) return specific;
38
+ if (status === 'flaky') return 'It worked only on a retry.';
39
+ if (status === 'spec-only') return 'No run has checked it yet.';
40
+ return null;
41
+ }
42
+
43
+ export { ITEM_STATUSES };