waygraph 0.15.54 → 0.16.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 (510) hide show
  1. package/README.md +8 -3
  2. package/bin/waygraph +2 -2
  3. package/dist/analysis/check.d.ts +38 -0
  4. package/dist/analysis/check.js +87 -0
  5. package/dist/analysis/coverage-gap.d.ts +1 -1
  6. package/dist/analysis/coverage-gap.js +14 -37
  7. package/dist/analysis/flow-source.d.ts +9 -0
  8. package/dist/analysis/flow-source.js +25 -0
  9. package/dist/analysis/graph.d.ts +10 -14
  10. package/dist/analysis/graph.js +48 -371
  11. package/dist/analysis/map-check.js +4 -39
  12. package/dist/analysis/practices-check.d.ts +1 -1
  13. package/dist/analysis/practices-check.js +24 -45
  14. package/dist/cli/args.d.ts +23 -0
  15. package/dist/cli/args.js +20 -0
  16. package/dist/{cli.d.ts → cli/cli.d.ts} +0 -1
  17. package/dist/{cli.js → cli/cli.js} +10 -9
  18. package/dist/{commands → cli/commands}/agent-dive-scaffold.js +35 -64
  19. package/dist/cli/commands/agent-dive.js +42 -0
  20. package/dist/{commands → cli/commands}/check.d.ts +0 -1
  21. package/dist/cli/commands/check.js +104 -0
  22. package/dist/cli/commands/codemod-checkpoints.d.ts +18 -0
  23. package/dist/cli/commands/codemod-checkpoints.js +186 -0
  24. package/dist/cli/commands/codemod-flows.d.ts +18 -0
  25. package/dist/cli/commands/codemod-flows.js +284 -0
  26. package/dist/cli/commands/codemod-stubs.d.ts +10 -0
  27. package/dist/cli/commands/codemod-stubs.js +187 -0
  28. package/dist/{commands → cli/commands}/extensions.js +5 -4
  29. package/dist/{commands → cli/commands}/init.js +1 -2
  30. package/dist/{commands → cli/commands}/list.js +9 -7
  31. package/dist/cli/commands/manifest.d.ts +2 -0
  32. package/dist/cli/commands/manifest.js +20 -0
  33. package/dist/cli/commands/map.js +57 -0
  34. package/dist/{commands → cli/commands}/run.d.ts +0 -1
  35. package/dist/cli/commands/run.js +64 -0
  36. package/dist/{commands → cli/commands}/session.js +61 -88
  37. package/dist/{commands → cli/commands}/test.js +11 -14
  38. package/dist/cli/commands/traverse.js +105 -0
  39. package/dist/{commands → cli/commands}/try.js +29 -25
  40. package/dist/{commands → cli/commands}/upgrade.js +40 -4
  41. package/dist/cli/flags.d.ts +193 -16
  42. package/dist/cli/flags.js +179 -234
  43. package/dist/cli/run-chain.d.ts +1 -0
  44. package/dist/cli/run-chain.js +42 -7
  45. package/dist/cli/usage.d.ts +1 -1
  46. package/dist/cli/usage.js +21 -53
  47. package/dist/cli/util.d.ts +2 -2
  48. package/dist/cli/util.js +2 -3
  49. package/dist/{highlights → demo/narration}/css.d.ts +1 -1
  50. package/dist/{highlights → demo/narration}/css.js +2 -3
  51. package/dist/{highlights → demo/narration}/demo-pace.d.ts +3 -11
  52. package/dist/{highlights → demo/narration}/demo-pace.js +5 -11
  53. package/dist/{highlights → demo/narration}/device.d.ts +2 -2
  54. package/dist/{highlights → demo/narration}/device.js +1 -1
  55. package/dist/demo/narration/merge.d.ts +8 -0
  56. package/dist/demo/narration/merge.js +71 -0
  57. package/dist/{highlights/run-phase.d.ts → demo/narration/narration.d.ts} +10 -14
  58. package/dist/{highlights/run-phase.js → demo/narration/narration.js} +25 -94
  59. package/dist/{highlights → demo/narration}/shorthand.d.ts +1 -1
  60. package/dist/demo/narration/stub-ctx.d.ts +8 -0
  61. package/dist/demo/narration/stub-ctx.js +164 -0
  62. package/dist/{highlights → demo/narration}/style.d.ts +1 -7
  63. package/dist/{highlights → demo/narration}/style.js +1 -41
  64. package/dist/{highlights → demo/narration}/todo-dock.d.ts +3 -3
  65. package/dist/{highlights → demo/narration}/todo-dock.js +13 -30
  66. package/dist/demo/overlay/auto-chrome.d.ts +7 -0
  67. package/dist/demo/overlay/auto-chrome.js +97 -0
  68. package/dist/demo/overlay/cursor.d.ts +12 -0
  69. package/dist/demo/overlay/cursor.js +142 -0
  70. package/dist/demo/overlay/device-stage.d.ts +13 -0
  71. package/dist/demo/overlay/device-stage.js +396 -0
  72. package/dist/demo/overlay/inpage/banner.d.ts +1 -0
  73. package/dist/demo/overlay/inpage/banner.js +160 -0
  74. package/dist/demo/overlay/inpage/caption.d.ts +2 -0
  75. package/dist/demo/overlay/inpage/caption.js +24 -0
  76. package/dist/demo/overlay/inpage/core.d.ts +1 -0
  77. package/dist/demo/overlay/inpage/core.js +345 -0
  78. package/dist/demo/overlay/inpage/device-chip.d.ts +1 -0
  79. package/dist/demo/overlay/inpage/device-chip.js +191 -0
  80. package/dist/demo/overlay/inpage/network.d.ts +9 -0
  81. package/dist/demo/overlay/inpage/network.js +200 -0
  82. package/dist/demo/overlay/inpage/panel-chrome.d.ts +1 -0
  83. package/dist/demo/overlay/inpage/panel-chrome.js +203 -0
  84. package/dist/demo/overlay/inpage/stamp.d.ts +1 -0
  85. package/dist/demo/overlay/inpage/stamp.js +46 -0
  86. package/dist/demo/overlay/inpage/swipe-zoom.d.ts +1 -0
  87. package/dist/demo/overlay/inpage/swipe-zoom.js +220 -0
  88. package/dist/demo/overlay/inpage/todos.d.ts +1 -0
  89. package/dist/demo/overlay/inpage/todos.js +294 -0
  90. package/dist/demo/overlay/locator-theater.d.ts +25 -0
  91. package/dist/demo/overlay/locator-theater.js +76 -0
  92. package/dist/demo/overlay/network-capture.d.ts +22 -0
  93. package/dist/demo/overlay/network-capture.js +127 -0
  94. package/dist/demo/overlay/overlay-css.d.ts +3 -0
  95. package/dist/demo/overlay/overlay-css.js +369 -0
  96. package/dist/demo/overlay/overlay-stage.d.ts +23 -0
  97. package/dist/demo/overlay/overlay-stage.js +106 -0
  98. package/dist/demo/overlay/overlay.d.ts +10 -0
  99. package/dist/demo/overlay/overlay.js +89 -0
  100. package/dist/{pilot-overlay/overlay-fixtures.d.ts → demo/overlay/phase-fixtures.d.ts} +2 -2
  101. package/dist/{pilot-overlay/overlay-fixtures.js → demo/overlay/phase-fixtures.js} +2 -2
  102. package/dist/{pilot-overlay/action-ring.js → demo/overlay/pilot/actions.js} +2 -1
  103. package/dist/{pilot-overlay → demo/overlay/pilot}/fixtures.d.ts +6 -5
  104. package/dist/{pilot-overlay → demo/overlay/pilot}/fixtures.js +19 -18
  105. package/dist/{pilot-overlay → demo/overlay/pilot}/shell.d.ts +2 -2
  106. package/dist/{pilot-overlay → demo/overlay/pilot}/shell.js +13 -22
  107. package/dist/demo/overlay/reattach.d.ts +7 -0
  108. package/dist/demo/overlay/reattach.js +23 -0
  109. package/dist/demo/overlay/rings.d.ts +33 -0
  110. package/dist/demo/overlay/rings.js +448 -0
  111. package/dist/{ui → demo/overlay/ui}/components/ring.js +2 -2
  112. package/dist/{ui → demo/overlay/ui}/overlay.css +4 -4
  113. package/dist/{ui → demo/overlay/ui}/shadow.d.ts +1 -1
  114. package/dist/{ui → demo/overlay/ui}/shadow.js +39 -2
  115. package/dist/demo/stepper/after.d.ts +3 -0
  116. package/dist/demo/stepper/after.js +113 -0
  117. package/dist/demo/stepper/banner-log.d.ts +37 -0
  118. package/dist/demo/stepper/banner-log.js +63 -0
  119. package/dist/demo/stepper/before.d.ts +4 -0
  120. package/dist/demo/stepper/before.js +110 -0
  121. package/dist/demo/stepper/demo-log.d.ts +31 -0
  122. package/dist/demo/stepper/demo-log.js +309 -0
  123. package/dist/demo/stepper/gate.d.ts +11 -0
  124. package/dist/demo/stepper/gate.js +78 -0
  125. package/dist/demo/stepper/interaction-patch.d.ts +3 -0
  126. package/dist/demo/stepper/interaction-patch.js +323 -0
  127. package/dist/demo/stepper/pacing.d.ts +21 -0
  128. package/dist/demo/stepper/pacing.js +23 -0
  129. package/dist/demo/stepper/slides.d.ts +11 -0
  130. package/dist/demo/stepper/slides.js +233 -0
  131. package/dist/demo/stepper/step-panels.d.ts +21 -0
  132. package/dist/demo/stepper/step-panels.js +589 -0
  133. package/dist/demo/stepper/stepper.d.ts +24 -0
  134. package/dist/demo/stepper/stepper.js +122 -0
  135. package/dist/demo/stepper/teardown.d.ts +48 -0
  136. package/dist/demo/stepper/teardown.js +179 -0
  137. package/dist/demo/stepper/todo-advance.d.ts +14 -0
  138. package/dist/demo/stepper/todo-advance.js +110 -0
  139. package/dist/demo/stepper/view.d.ts +68 -0
  140. package/dist/demo/stepper/view.js +31 -0
  141. package/dist/demo/types.d.ts +17 -0
  142. package/dist/demo/verbose-log.js +15 -0
  143. package/dist/{types.d.ts → engine/block/block.d.ts} +106 -91
  144. package/dist/{core → engine/block}/block.js +10 -53
  145. package/dist/{core → engine/block}/compose.d.ts +9 -7
  146. package/dist/{core → engine/block}/compose.js +1 -1
  147. package/dist/{core/blocks → engine/block/kinds}/api.d.ts +16 -12
  148. package/dist/{core/blocks → engine/block/kinds}/api.js +26 -18
  149. package/dist/{core/blocks → engine/block/kinds}/effect.d.ts +13 -18
  150. package/dist/engine/block/kinds/effect.js +17 -0
  151. package/dist/{core/blocks → engine/block/kinds}/method.d.ts +17 -29
  152. package/dist/{core/blocks → engine/block/kinds}/method.js +6 -21
  153. package/dist/{core/blocks → engine/block/kinds}/nav.d.ts +21 -31
  154. package/dist/{core/blocks → engine/block/kinds}/nav.js +6 -12
  155. package/dist/{core/blocks → engine/block/kinds}/page.d.ts +14 -20
  156. package/dist/{core/blocks → engine/block/kinds}/page.js +5 -7
  157. package/dist/engine/checkpoint/checkpoint.d.ts +22 -0
  158. package/dist/engine/checkpoint/checkpoint.js +8 -0
  159. package/dist/engine/checkpoint/route.d.ts +28 -0
  160. package/dist/engine/checkpoint/route.js +28 -0
  161. package/dist/{core → engine}/config.d.ts +7 -2
  162. package/dist/engine/config.js +6 -0
  163. package/dist/engine/engine.d.ts +45 -0
  164. package/dist/{core → engine}/engine.js +6 -10
  165. package/dist/engine/env.d.ts +59 -0
  166. package/dist/engine/env.js +83 -0
  167. package/dist/{errors.d.ts → engine/errors.d.ts} +22 -22
  168. package/dist/{errors.js → engine/errors.js} +22 -22
  169. package/dist/{core → engine/flow}/branch-regression.d.ts +7 -7
  170. package/dist/{core → engine/flow}/branch-regression.js +4 -3
  171. package/dist/engine/flow/flow.d.ts +162 -0
  172. package/dist/engine/flow/flow.js +244 -0
  173. package/dist/{core → engine/flow}/map-builder.d.ts +34 -39
  174. package/dist/{core → engine/flow}/map-builder.js +45 -47
  175. package/dist/{core → engine}/locate.d.ts +1 -1
  176. package/dist/{core → engine}/locate.js +1 -2
  177. package/dist/{mem-stub.d.ts → engine/mem/mem-stub.d.ts} +9 -8
  178. package/dist/{mem-stub.js → engine/mem/mem-stub.js} +2 -2
  179. package/dist/{mem-page.d.ts → engine/mem/mem.d.ts} +1 -1
  180. package/dist/{mem-page.js → engine/mem/mem.js} +2 -1
  181. package/dist/engine/page-gone.d.ts +5 -0
  182. package/dist/engine/page-gone.js +20 -0
  183. package/dist/engine/run/connect.d.ts +28 -0
  184. package/dist/{types.js → engine/run/connect.js} +11 -10
  185. package/dist/engine/run/events.d.ts +67 -0
  186. package/dist/engine/run/events.js +90 -0
  187. package/dist/engine/run/hooks.d.ts +16 -0
  188. package/dist/engine/run/hooks.js +8 -0
  189. package/dist/engine/run/launch.d.ts +13 -0
  190. package/dist/engine/run/launch.js +27 -0
  191. package/dist/{core/run-graph.d.ts → engine/run/run.d.ts} +8 -12
  192. package/dist/{core/run-graph.js → engine/run/run.js} +22 -12
  193. package/dist/engine/stub/pace.d.ts +12 -0
  194. package/dist/engine/stub/pace.js +2 -0
  195. package/dist/engine/stub/ring.d.ts +130 -0
  196. package/dist/engine/stub/ring.js +41 -0
  197. package/dist/engine/stub/stub.d.ts +268 -0
  198. package/dist/engine/stub/stub.js +1 -0
  199. package/dist/engine/stub/todos.d.ts +104 -0
  200. package/dist/engine/stub/todos.js +2 -0
  201. package/dist/engine/stub/viewport.d.ts +26 -0
  202. package/dist/engine/stub/viewport.js +2 -0
  203. package/dist/{trait.d.ts → engine/trait/trait.d.ts} +1 -1
  204. package/dist/index.d.ts +84 -36
  205. package/dist/index.js +44 -19
  206. package/dist/{session/auto-explore-run.d.ts → live/auto/auto.d.ts} +10 -16
  207. package/dist/{session/auto-explore-run.js → live/auto/auto.js} +164 -254
  208. package/dist/{session/auto-explore.d.ts → live/auto/explore.d.ts} +4 -14
  209. package/dist/{session/auto-explore.js → live/auto/explore.js} +21 -127
  210. package/dist/{auto-session/session.d.ts → live/auto-session/auto-session.d.ts} +1 -1
  211. package/dist/{auto-session/session.js → live/auto-session/auto-session.js} +27 -24
  212. package/dist/{auto-session → live/auto-session}/helpers.d.ts +6 -5
  213. package/dist/{auto-session → live/auto-session}/helpers.js +1 -1
  214. package/dist/{session/auto-session-ipc.d.ts → live/auto-session/ipc.d.ts} +7 -5
  215. package/dist/{session/auto-session-ipc.js → live/auto-session/ipc.js} +31 -16
  216. package/dist/{session/browser.d.ts → live/auto-session/start.d.ts} +1 -2
  217. package/dist/{session/browser.js → live/auto-session/start.js} +2 -3
  218. package/dist/{pilot-overlay → live/pilot}/panel.d.ts +1 -1
  219. package/dist/{pilot-overlay → live/pilot}/panel.js +23 -31
  220. package/dist/{session → live/pilot}/pilot.d.ts +3 -3
  221. package/dist/{session → live/pilot}/pilot.js +4 -4
  222. package/dist/{traverse/run.d.ts → live/traverse/traverse.d.ts} +1 -1
  223. package/dist/{traverse/run.js → live/traverse/traverse.js} +26 -43
  224. package/dist/manifest/manifest.d.ts +52 -0
  225. package/dist/manifest/manifest.js +93 -0
  226. package/dist/manifest/map-imports.d.ts +7 -0
  227. package/dist/manifest/map-imports.js +22 -0
  228. package/dist/manifest/maps.d.ts +33 -0
  229. package/dist/manifest/maps.js +62 -0
  230. package/dist/manifest/pack.d.ts +21 -0
  231. package/dist/manifest/pack.js +109 -0
  232. package/dist/manifest/project.d.ts +60 -0
  233. package/dist/manifest/project.js +101 -0
  234. package/dist/{session/block-inject.js → manifest/roots.js} +1 -18
  235. package/dist/manifest/scan.d.ts +19 -0
  236. package/dist/manifest/scan.js +57 -0
  237. package/dist/manifest/source.d.ts +23 -0
  238. package/dist/manifest/source.js +86 -0
  239. package/dist/runner/mode.d.ts +71 -0
  240. package/dist/runner/mode.js +1 -0
  241. package/dist/runner/modes/branches.d.ts +5 -0
  242. package/dist/runner/modes/branches.js +37 -0
  243. package/dist/runner/modes/demo.d.ts +3 -0
  244. package/dist/runner/modes/demo.js +13 -0
  245. package/dist/runner/modes/report.d.ts +2 -0
  246. package/dist/runner/modes/report.js +54 -0
  247. package/dist/runner/modes/run.d.ts +2 -0
  248. package/dist/runner/modes/run.js +3 -0
  249. package/dist/runner/options.d.ts +31 -0
  250. package/dist/runner/options.js +42 -0
  251. package/dist/runner/plan/find.d.ts +18 -0
  252. package/dist/runner/plan/find.js +65 -0
  253. package/dist/runner/plan/plan.d.ts +11 -0
  254. package/dist/runner/plan/plan.js +97 -0
  255. package/dist/runner/plan/seed-mem.d.ts +12 -0
  256. package/dist/runner/plan/seed-mem.js +98 -0
  257. package/dist/runner/plan/spec.d.ts +5 -0
  258. package/dist/runner/plan/spec.js +17 -0
  259. package/dist/runner/play-steps.d.ts +2 -0
  260. package/dist/runner/play-steps.js +59 -0
  261. package/dist/runner/runner.d.ts +4 -0
  262. package/dist/runner/runner.js +64 -0
  263. package/dist/runner/session.d.ts +9 -0
  264. package/dist/runner/session.js +87 -0
  265. package/dist/{browser.js → runtime/browser.js} +4 -2
  266. package/dist/{env-file.js → runtime/env-file.js} +7 -12
  267. package/dist/{extensions.d.ts → runtime/extensions.d.ts} +1 -5
  268. package/dist/{extensions.js → runtime/extensions.js} +2 -1
  269. package/dist/runtime/full-launch.d.ts +1 -0
  270. package/dist/runtime/full-launch.js +34 -0
  271. package/dist/runtime/global-flag.d.ts +5 -0
  272. package/dist/runtime/global-flag.js +18 -0
  273. package/dist/{playwright-config.d.ts → runtime/playwright-config.d.ts} +1 -1
  274. package/dist/{playwright.config.js → runtime/playwright.config.js} +3 -2
  275. package/dist/runtime/run-log.d.ts +2 -0
  276. package/dist/runtime/run-log.js +17 -0
  277. package/dist/{video-dir.js → runtime/video-dir.js} +3 -2
  278. package/dist/{config.d.ts → runtime/waygraph-config.d.ts} +6 -9
  279. package/dist/{config.js → runtime/waygraph-config.js} +21 -51
  280. package/dist/{webserver.js → runtime/webserver.js} +5 -30
  281. package/examples/routed-demo/config/waygraph.config.ts +20 -0
  282. package/examples/routed-demo/package.json +1 -4
  283. package/examples/routed-demo/scripts/fixture-server.mjs +1 -1
  284. package/examples/routed-demo/src/flows/routed-demo-map.flow.ts +2 -4
  285. package/examples/routed-demo/src/flows/routed-demo.flow.ts +1 -2
  286. package/examples/routed-demo/src/map/(app_base)/dashboard/_methods/click-widget.block.ts +5 -4
  287. package/examples/routed-demo/src/map/(app_base)/dashboard/_nav.block.ts +3 -3
  288. package/examples/routed-demo/src/map/(app_base)/dashboard/_page.block.ts +3 -3
  289. package/examples/routed-demo/src/map/(external)/docs/_nav.block.ts +3 -3
  290. package/examples/routed-demo/src/map/(external)/docs/_page.block.ts +3 -3
  291. package/examples/routed-demo/src/states/routed-demo.states.ts +5 -3
  292. package/examples/routed-demo/tests/routed-demo.spec.ts +4 -4
  293. package/examples/routed-demo/tsconfig.json +1 -1
  294. package/examples/saucedemo/docs/CONVENTION.md +4 -5
  295. package/examples/saucedemo/docs/HELPERS.md +11 -11
  296. package/examples/saucedemo/src/blocks/SITE-MAP.md +0 -1
  297. package/examples/saucedemo/src/blocks/saucedemo-web/NAV.md +1 -5
  298. package/examples/saucedemo/src/blocks/saucedemo-web/cart/nav-cart.block.ts +3 -3
  299. package/examples/saucedemo/src/blocks/saucedemo-web/cart/nav-checkout-info.block.ts +3 -3
  300. package/examples/saucedemo/src/blocks/saucedemo-web/checkout-step-one/methods/fill-first-name.method.block.ts +5 -4
  301. package/examples/saucedemo/src/blocks/saucedemo-web/checkout-step-one/methods/fill-last-name.method.block.ts +5 -4
  302. package/examples/saucedemo/src/blocks/saucedemo-web/checkout-step-one/methods/fill-postal-code.method.block.ts +5 -4
  303. package/examples/saucedemo/src/blocks/saucedemo-web/checkout-step-one/methods/submit-checkout-info.method.block.ts +5 -4
  304. package/examples/saucedemo/src/blocks/saucedemo-web/checkout-step-two/methods/finish-order.method.block.ts +5 -8
  305. package/examples/saucedemo/src/blocks/saucedemo-web/inventory/inventory.page.block.ts +3 -3
  306. package/examples/saucedemo/src/blocks/saucedemo-web/inventory/methods/add-all-to-cart.method.block.ts +4 -6
  307. package/examples/saucedemo/src/blocks/saucedemo-web/inventory/methods/add-to-cart.effect.block.ts +35 -43
  308. package/examples/saucedemo/src/blocks/saucedemo-web/inventory/methods/remove-all-from-cart.method.block.ts +4 -6
  309. package/examples/saucedemo/src/blocks/saucedemo-web/inventory/methods/remove-from-cart.effect.block.ts +4 -3
  310. package/examples/saucedemo/src/blocks/saucedemo-web/inventory/nav-item-detail.block.ts +3 -3
  311. package/examples/saucedemo/src/blocks/saucedemo-web/inventory-item/nav-back-to-inventory.block.ts +3 -3
  312. package/examples/saucedemo/src/blocks/saucedemo-web/inventory-item/nav-back-to-products.block.ts +3 -3
  313. package/examples/saucedemo/src/blocks/saucedemo-web/inventory-item/nav-continue-shopping.block.ts +3 -3
  314. package/examples/saucedemo/src/blocks/saucedemo-web/methods/fill-password.method.block.ts +5 -4
  315. package/examples/saucedemo/src/blocks/saucedemo-web/methods/fill-username.method.block.ts +5 -4
  316. package/examples/saucedemo/src/blocks/saucedemo-web/methods/submit-login.method.block.ts +4 -5
  317. package/examples/saucedemo/src/blocks/saucedemo-web/methods/submit-logout.method.block.ts +5 -4
  318. package/examples/saucedemo/src/blocks/saucedemo-web/nav-login.block.ts +3 -3
  319. package/examples/saucedemo/src/flows/api-demo.flow.ts +12 -10
  320. package/examples/saucedemo/src/states/checkout.states.ts +21 -11
  321. package/examples/saucedemo/src/stubs/device-showcase.ts +8 -10
  322. package/examples/saucedemo/tests/auto-graph.spec.ts +4 -12
  323. package/package.json +10 -6
  324. package/templates/agents/waygraph-planner.agent.md +2 -2
  325. package/templates/quickstart/docs/CONVENTION.md +4 -4
  326. package/templates/quickstart/docs/HELPERS.md +10 -8
  327. package/templates/quickstart/package.json +0 -3
  328. package/templates/quickstart/src/blocks/SITE-MAP.md +0 -1
  329. package/templates/quickstart/src/blocks/saucedemo-web/NAV.md +1 -5
  330. package/templates/quickstart/src/blocks/saucedemo-web/cart/nav-cart.block.ts +3 -3
  331. package/templates/quickstart/src/blocks/saucedemo-web/cart/nav-checkout-info.block.ts +3 -3
  332. package/templates/quickstart/src/blocks/saucedemo-web/checkout-step-one/methods/fill-first-name.method.block.ts +5 -4
  333. package/templates/quickstart/src/blocks/saucedemo-web/checkout-step-one/methods/fill-last-name.method.block.ts +5 -4
  334. package/templates/quickstart/src/blocks/saucedemo-web/checkout-step-one/methods/fill-postal-code.method.block.ts +5 -4
  335. package/templates/quickstart/src/blocks/saucedemo-web/checkout-step-one/methods/submit-checkout-info.method.block.ts +5 -4
  336. package/templates/quickstart/src/blocks/saucedemo-web/checkout-step-two/methods/finish-order.method.block.ts +5 -8
  337. package/templates/quickstart/src/blocks/saucedemo-web/inventory/inventory.page.block.ts +3 -3
  338. package/templates/quickstart/src/blocks/saucedemo-web/inventory/methods/add-all-to-cart.method.block.ts +4 -6
  339. package/templates/quickstart/src/blocks/saucedemo-web/inventory/methods/add-to-cart.effect.block.ts +35 -43
  340. package/templates/quickstart/src/blocks/saucedemo-web/inventory/methods/remove-all-from-cart.method.block.ts +4 -6
  341. package/templates/quickstart/src/blocks/saucedemo-web/inventory/methods/remove-from-cart.effect.block.ts +4 -3
  342. package/templates/quickstart/src/blocks/saucedemo-web/inventory/nav-item-detail.block.ts +3 -3
  343. package/templates/quickstart/src/blocks/saucedemo-web/inventory-item/nav-back-to-inventory.block.ts +3 -3
  344. package/templates/quickstart/src/blocks/saucedemo-web/inventory-item/nav-back-to-products.block.ts +3 -3
  345. package/templates/quickstart/src/blocks/saucedemo-web/inventory-item/nav-continue-shopping.block.ts +3 -3
  346. package/templates/quickstart/src/blocks/saucedemo-web/methods/fill-password.method.block.ts +5 -4
  347. package/templates/quickstart/src/blocks/saucedemo-web/methods/fill-username.method.block.ts +5 -4
  348. package/templates/quickstart/src/blocks/saucedemo-web/methods/submit-login.method.block.ts +4 -5
  349. package/templates/quickstart/src/blocks/saucedemo-web/methods/submit-logout.method.block.ts +5 -4
  350. package/templates/quickstart/src/blocks/saucedemo-web/nav-login.block.ts +3 -3
  351. package/templates/quickstart/src/flows/api-demo.flow.ts +12 -10
  352. package/templates/quickstart/src/states/checkout.states.ts +21 -11
  353. package/templates/quickstart/src/stubs/device-showcase.ts +8 -10
  354. package/templates/scaffold/README.md +2 -1
  355. package/templates/scaffold/STRUCTURE.md +5 -4
  356. package/templates/scaffold/config/waygraph.config.ts +1 -0
  357. package/templates/scaffold/gitignore +1 -0
  358. package/templates/scaffold/src/flows/README.md +2 -2
  359. package/templates/scaffold/src/map/(app_base)/docs/_nav.block.ts +3 -3
  360. package/templates/scaffold/src/map/(app_base)/docs/_page.block.ts +3 -3
  361. package/templates/scaffold/src/map/(app_base)/home/_methods/add-item.effect.block.ts +4 -4
  362. package/templates/scaffold/src/map/(app_base)/home/_methods/assert-hello.method.block.ts +3 -3
  363. package/templates/scaffold/src/map/(app_base)/home/_methods/assert-item-added.method.block.ts +3 -3
  364. package/templates/scaffold/src/map/(app_base)/home/_methods/clear-cart.method.block.ts +5 -4
  365. package/templates/scaffold/src/map/(app_base)/home/_methods/remove-item.effect.block.ts +4 -4
  366. package/templates/scaffold/src/map/(app_base)/home/_nav.block.ts +3 -3
  367. package/templates/scaffold/src/map/(app_base)/home/_page.block.ts +3 -3
  368. package/templates/scaffold/src/map/(app_base)/home/nav-verification-link.block.ts +4 -4
  369. package/templates/scaffold/src/map/(external)/hoppscotch/_keys.ts +21 -0
  370. package/templates/scaffold/src/map/(external)/hoppscotch/_methods/assert-response-body.method.block.ts +4 -4
  371. package/templates/scaffold/src/map/(external)/hoppscotch/_methods/assert-response-header.method.block.ts +4 -4
  372. package/templates/scaffold/src/map/(external)/hoppscotch/_methods/assert-status.method.block.ts +4 -4
  373. package/templates/scaffold/src/map/(external)/hoppscotch/_methods/pick-extension-interceptor.method.block.ts +5 -4
  374. package/templates/scaffold/src/map/(external)/hoppscotch/_methods/read-response-body.method.block.ts +6 -5
  375. package/templates/scaffold/src/map/(external)/hoppscotch/_methods/read-response-headers.method.block.ts +6 -5
  376. package/templates/scaffold/src/map/(external)/hoppscotch/_methods/send-request.method.block.ts +5 -4
  377. package/templates/scaffold/src/map/(external)/hoppscotch/_methods/set-bearer-token.method.block.ts +6 -5
  378. package/templates/scaffold/src/map/(external)/hoppscotch/_methods/set-headers.method.block.ts +6 -5
  379. package/templates/scaffold/src/map/(external)/hoppscotch/_methods/set-json-body.method.block.ts +6 -5
  380. package/templates/scaffold/src/map/(external)/hoppscotch/_methods/set-method.method.block.ts +6 -5
  381. package/templates/scaffold/src/map/(external)/hoppscotch/_methods/set-query-params.method.block.ts +6 -5
  382. package/templates/scaffold/src/map/(external)/hoppscotch/_methods/set-url.method.block.ts +6 -5
  383. package/templates/scaffold/src/map/(external)/hoppscotch/_nav.block.ts +3 -3
  384. package/templates/scaffold/src/map/(external)/hoppscotch/_page.block.ts +3 -3
  385. package/templates/scaffold/src/map/(external)/hoppscotch/_states.ts +6 -0
  386. package/templates/scaffold/src/map/(external)/hoppscotch/settings/_nav.block.ts +3 -3
  387. package/templates/scaffold/src/map/(external)/mailpit/_keys.ts +13 -0
  388. package/templates/scaffold/src/map/(external)/mailpit/_methods/assert-email-content.method.block.ts +4 -4
  389. package/templates/scaffold/src/map/(external)/mailpit/_methods/assert-email-received.method.block.ts +4 -4
  390. package/templates/scaffold/src/map/(external)/mailpit/_methods/extract-email-link.method.block.ts +6 -5
  391. package/templates/scaffold/src/map/(external)/mailpit/_methods/open-message.method.block.ts +6 -5
  392. package/templates/scaffold/src/map/(external)/mailpit/_nav.block.ts +3 -3
  393. package/templates/scaffold/src/map/(external)/mailpit/_page.block.ts +3 -3
  394. package/templates/scaffold/src/map/(external)/mailpit/_states.ts +9 -0
  395. package/templates/scaffold/src/map/README.md +7 -0
  396. package/templates/scaffold/src/states/README.md +4 -1
  397. package/templates/scaffold/src/states/demo.mem-keys.ts +1 -29
  398. package/templates/scaffold/src/states/demo.states.ts +14 -20
  399. package/templates/scaffold/tests/hoppscotch.spec.ts +1 -11
  400. package/templates/scaffold/tests/mail-verify.spec.ts +2 -2
  401. package/templates/skills/waygraph-blind-pilot.skill.md +2 -6
  402. package/templates/skills/waygraph-convention.skill.md +23 -14
  403. package/templates/skills/waygraph-pilot.skill.md +7 -4
  404. package/dist/auto-session/verbose-log.js +0 -16
  405. package/dist/auto-session.d.ts +0 -2
  406. package/dist/auto-session.js +0 -3
  407. package/dist/cli/discover.d.ts +0 -40
  408. package/dist/cli/discover.js +0 -148
  409. package/dist/commands/agent-dive.js +0 -52
  410. package/dist/commands/check.js +0 -192
  411. package/dist/commands/map.js +0 -29
  412. package/dist/commands/run.js +0 -104
  413. package/dist/commands/traverse.js +0 -177
  414. package/dist/core/block.d.ts +0 -109
  415. package/dist/core/blocks/effect.js +0 -23
  416. package/dist/core/config.js +0 -17
  417. package/dist/core/engine.d.ts +0 -198
  418. package/dist/core/flow.d.ts +0 -294
  419. package/dist/core/flow.js +0 -432
  420. package/dist/core.d.ts +0 -14
  421. package/dist/core.js +0 -15
  422. package/dist/highlights/merge.d.ts +0 -8
  423. package/dist/highlights/merge.js +0 -173
  424. package/dist/highlights/stub-ctx.d.ts +0 -10
  425. package/dist/highlights/stub-ctx.js +0 -331
  426. package/dist/highlights/types.d.ts +0 -613
  427. package/dist/highlights.d.ts +0 -9
  428. package/dist/highlights.js +0 -10
  429. package/dist/pilot-overlay.d.ts +0 -5
  430. package/dist/pilot-overlay.js +0 -6
  431. package/dist/runner/banner-log.js +0 -63
  432. package/dist/runner/chain-run.js +0 -102
  433. package/dist/runner/cursor.js +0 -140
  434. package/dist/runner/demo-log.js +0 -316
  435. package/dist/runner/device-stage.d.ts +0 -9
  436. package/dist/runner/device-stage.js +0 -420
  437. package/dist/runner/discovery.js +0 -105
  438. package/dist/runner/index.js +0 -2
  439. package/dist/runner/inpage/banner.d.ts +0 -21
  440. package/dist/runner/inpage/banner.js +0 -156
  441. package/dist/runner/inpage/caption.d.ts +0 -3
  442. package/dist/runner/inpage/caption.js +0 -23
  443. package/dist/runner/inpage/core.d.ts +0 -4
  444. package/dist/runner/inpage/core.js +0 -316
  445. package/dist/runner/inpage/device.d.ts +0 -3
  446. package/dist/runner/inpage/device.js +0 -211
  447. package/dist/runner/inpage/network.d.ts +0 -15
  448. package/dist/runner/inpage/network.js +0 -217
  449. package/dist/runner/inpage/panel-chrome.js +0 -192
  450. package/dist/runner/inpage/stamp.js +0 -46
  451. package/dist/runner/inpage/swipe-zoom.js +0 -220
  452. package/dist/runner/inpage/todos.js +0 -337
  453. package/dist/runner/interaction-patch.js +0 -384
  454. package/dist/runner/main.js +0 -469
  455. package/dist/runner/network-capture.d.ts +0 -9
  456. package/dist/runner/network-capture.js +0 -126
  457. package/dist/runner/overlay-css.d.ts +0 -3
  458. package/dist/runner/overlay-css.js +0 -377
  459. package/dist/runner/overlay-install.js +0 -90
  460. package/dist/runner/overlay-stage.js +0 -110
  461. package/dist/runner/rings.js +0 -514
  462. package/dist/runner/seed-mem.js +0 -110
  463. package/dist/runner/slides.js +0 -278
  464. package/dist/runner/step-mode.js +0 -703
  465. package/dist/runner/step-panels.js +0 -729
  466. package/dist/runner/teardown.js +0 -202
  467. package/dist/runner/todo-dock.js +0 -142
  468. package/dist/session/step-overlay.d.ts +0 -37
  469. package/dist/session/step-overlay.js +0 -244
  470. package/examples/routed-demo/playwright.config.ts +0 -21
  471. package/examples/saucedemo/src/blocks/saucedemo-web/ff-owner-auth.block.ts +0 -22
  472. package/templates/quickstart/src/blocks/saucedemo-web/ff-owner-auth.block.ts +0 -22
  473. /package/dist/{commands → cli/commands}/agent-dive-scaffold.d.ts +0 -0
  474. /package/dist/{commands → cli/commands}/agent-dive.d.ts +0 -0
  475. /package/dist/{commands → cli/commands}/extensions.d.ts +0 -0
  476. /package/dist/{commands → cli/commands}/init.d.ts +0 -0
  477. /package/dist/{commands → cli/commands}/list.d.ts +0 -0
  478. /package/dist/{commands → cli/commands}/map.d.ts +0 -0
  479. /package/dist/{commands → cli/commands}/session.d.ts +0 -0
  480. /package/dist/{commands → cli/commands}/test.d.ts +0 -0
  481. /package/dist/{commands → cli/commands}/traverse.d.ts +0 -0
  482. /package/dist/{commands → cli/commands}/try.d.ts +0 -0
  483. /package/dist/{commands → cli/commands}/upgrade.d.ts +0 -0
  484. /package/dist/{highlights → demo/narration}/shorthand.js +0 -0
  485. /package/dist/{session/overlay-beacon.d.ts → demo/overlay/beacon.d.ts} +0 -0
  486. /package/dist/{session/overlay-beacon.js → demo/overlay/beacon.js} +0 -0
  487. /package/dist/{pilot-overlay/action-ring.d.ts → demo/overlay/pilot/actions.d.ts} +0 -0
  488. /package/dist/{ui → demo/overlay/ui}/components/ring.d.ts +0 -0
  489. /package/dist/{ui → demo/overlay/ui}/stylesheet.d.ts +0 -0
  490. /package/dist/{ui → demo/overlay/ui}/stylesheet.js +0 -0
  491. /package/dist/{ui → demo/overlay/ui}/tokens.d.ts +0 -0
  492. /package/dist/{ui → demo/overlay/ui}/tokens.js +0 -0
  493. /package/dist/{highlights → demo}/types.js +0 -0
  494. /package/dist/{auto-session → demo}/verbose-log.d.ts +0 -0
  495. /package/dist/{selector.d.ts → engine/trait/selector.d.ts} +0 -0
  496. /package/dist/{selector.js → engine/trait/selector.js} +0 -0
  497. /package/dist/{trait.js → engine/trait/trait.js} +0 -0
  498. /package/dist/{traverse → live/traverse}/coverage.d.ts +0 -0
  499. /package/dist/{traverse → live/traverse}/coverage.js +0 -0
  500. /package/dist/{traverse → live/traverse}/lease.d.ts +0 -0
  501. /package/dist/{traverse → live/traverse}/lease.js +0 -0
  502. /package/dist/{session/block-inject.d.ts → manifest/roots.d.ts} +0 -0
  503. /package/dist/{blocks-select.d.ts → manifest/select.d.ts} +0 -0
  504. /package/dist/{blocks-select.js → manifest/select.js} +0 -0
  505. /package/dist/{browser.d.ts → runtime/browser.d.ts} +0 -0
  506. /package/dist/{env-file.d.ts → runtime/env-file.d.ts} +0 -0
  507. /package/dist/{playwright-config.js → runtime/playwright-config.js} +0 -0
  508. /package/dist/{playwright.config.d.ts → runtime/playwright.config.d.ts} +0 -0
  509. /package/dist/{video-dir.d.ts → runtime/video-dir.d.ts} +0 -0
  510. /package/dist/{webserver.d.ts → runtime/webserver.d.ts} +0 -0
@@ -1,613 +0,0 @@
1
- import type { Checkpoint } from "../types.js";
2
- import type { MemPage } from "../mem-page.js";
3
- /** Shared dwell fields on stubs, fixtures, and yap slides. */
4
- export type FixtureDurationFields = {
5
- /**
6
- * Min time this fixture stays visible before the demo advances.
7
- * - `true` - defaults (2000ms normal, {@link FixtureDurationFields.fastMode} or 600ms when --fast)
8
- * - `number` - override normal dwell ms
9
- * - omit / false - no authored dwell (caller keeps legacy timing)
10
- */
11
- duration?: boolean | number;
12
- /**
13
- * Dwell ms when demo `--fast` / gatesFast (only when {@link duration} is set).
14
- * Default 600.
15
- */
16
- fastMode?: number;
17
- };
18
- /**
19
- * One checklist row for episode planning (demo panel).
20
- * Set via {@link StubCtx.todos} / {@link StubCtx.todoIndex} inside the lifecycle.
21
- */
22
- export type WaygraphTodoItem = {
23
- text: string;
24
- /**
25
- * Stable id for external asserts / redirects (Mailhog, deep links).
26
- * Stamped as `data-wg-todo-item` on the row.
27
- */
28
- id?: string;
29
- /** Alias for {@link WaygraphTodoItem.id}. */
30
- name?: string;
31
- /** Explicit done. If omitted, derived from todoIndex (index < todoIndex). */
32
- done?: boolean;
33
- /** Explicit current. If omitted, derived from todoIndex (index === todoIndex). */
34
- current?: boolean;
35
- };
36
- /** One todo item as authored: a string or `{ id, text, done }`. */
37
- export type WaygraphTodoInput = string | WaygraphTodoItem;
38
- /**
39
- * Dock list presentation:
40
- * - `sequential` - arrow on current, strike done (demo walkthrough)
41
- * - `checklist` - checkbox done/pending only (no current arrow; independent checks)
42
- * - `bullets` - flat bullet list (no arrow/checkbox; open notes / trimmed dock)
43
- */
44
- export type TodoListStyle = "sequential" | "checklist" | "bullets";
45
- /** Where the top banner sits. */
46
- export type BannerPos = "left" | "center" | "right";
47
- /** Banner UX, mirrors {@link TodoDockUiOpts}: pass `false` fields to opt out for this phase. */
48
- export interface BannerUiOpts {
49
- /** Move to a free spot while a highlight ring would overlap it (default true). */
50
- collision?: boolean;
51
- /** Hide the banner entirely for this phase. */
52
- hidden?: boolean;
53
- /**
54
- * Fade duration (ms) when the banner's title text changes, so a change reads as a deliberate
55
- * beat instead of an instant flicker. Default 220; 0 disables the fade (instant swap).
56
- */
57
- captionFadeMs?: number;
58
- }
59
- /** One titled group in the floating todo dock (FR / Scenarios / ACs, etc.). */
60
- export type WaygraphTodoGroupInput = {
61
- /** Stable group id -> `data-wg-todo-group`. */
62
- id?: string;
63
- /** Alias for {@link WaygraphTodoGroupInput.id}. */
64
- name?: string;
65
- /** Group heading shown above the items. */
66
- title?: string;
67
- /** Per-group style; falls back to dock default ({@link StubCtx.todoStyle}). */
68
- style?: TodoListStyle;
69
- items: readonly WaygraphTodoInput[];
70
- /** Sequential only: which item is current (0-based). */
71
- todoIndex?: number;
72
- };
73
- /** A titled checklist in the demo todo dock. */
74
- export type WaygraphTodoGroup = {
75
- id?: string;
76
- title?: string;
77
- style: TodoListStyle;
78
- items: WaygraphTodoItem[];
79
- };
80
- /** Full floating dock payload passed to the browser. */
81
- export type TodoDockState = {
82
- /**
83
- * Stable dock id for external targeting after redirects
84
- * (`#wg-todo-dock[data-wg-todo-id="…"]`).
85
- */
86
- id?: string;
87
- /** Default style for groups that omit their own. */
88
- style: TodoListStyle;
89
- /** Single-list title when using {@link StubCtx.todos} + {@link StubCtx.todoTitle}. */
90
- title?: string;
91
- groups: WaygraphTodoGroup[];
92
- pos?: "left" | "right";
93
- };
94
- /** Options for compact {@link StubCtx.todos}(`id`, items, opts). */
95
- export type WaygraphTodosOpts = {
96
- /** Dock heading. */
97
- title?: string;
98
- /** Current item index (0-based). */
99
- index?: number;
100
- /** `sequential` | `checklist` | `bullets`. */
101
- style?: TodoListStyle;
102
- /** Dock side. */
103
- pos?: "left" | "right";
104
- /**
105
- * Keep other docks with different ids (multi-todo). Default false —
106
- * one checklist at a time (setting todos replaces the previous dock).
107
- */
108
- parallel?: boolean;
109
- };
110
- /**
111
- * Floating todo-dock UX knobs (0.15.8+). Defaults are **smart on** so long
112
- * FR/AC checklists do not bury highlight rings. Opt out per phase or globally.
113
- *
114
- * Defaults: `compact`, `collision`, `behindRing` = true; `cap` = 5; `expandCap` = 14.
115
- *
116
- * Global: `WAYGRAPH_TODO_UI=full` / `waygraph demo --todo-full` turns smart off.
117
- * Per-knob env: `WAYGRAPH_TODO_COMPACT=0`, `WAYGRAPH_TODO_COLLISION=0`,
118
- * `WAYGRAPH_TODO_BEHIND=0`, `WAYGRAPH_TODO_CAP`, `WAYGRAPH_TODO_EXPAND_CAP`.
119
- */
120
- export type TodoDockUiOpts = {
121
- /** Fold long lists around the current row (+N more / hover). Default true. */
122
- compact?: boolean;
123
- /** Visible rows when compact. Default 5. */
124
- cap?: number;
125
- /** Visible rows on hover / pinned expand. Default 14. */
126
- expandCap?: number;
127
- /** Flip dock L/R when an active ring overlaps it. Default true. */
128
- collision?: boolean;
129
- /** Dim + lower z-index while a highlight ring is up. Default true. */
130
- behindRing?: boolean;
131
- };
132
- /** Resolved todo-dock UX (all fields present). */
133
- export type TodoDockUiResolved = {
134
- compact: boolean;
135
- cap: number;
136
- expandCap: number;
137
- collision: boolean;
138
- behindRing: boolean;
139
- };
140
- /** Episode-level fixtures authored inside stubBefore/After/OnError(ctx). */
141
- export type StubPhaseFixtures = {
142
- todos?: readonly WaygraphTodoInput[];
143
- /** Which todo is current (0-based). Rows before = done, after = pending. */
144
- todoIndex?: number;
145
- /** Heading above a single {@link StubCtx.todos} list. */
146
- todoTitle?: string;
147
- /**
148
- * Stable dock id (`data-wg-todo-id`) for external redirect asserts
149
- * (e.g. Mailhog -> back to app and still find the checklist).
150
- */
151
- todoId?: string;
152
- /** `sequential` (default), `checklist`, or `bullets`. */
153
- todoStyle?: TodoListStyle;
154
- /** Multiple titled lists (FR / Scenarios / ACs). Wins over bare todos when set. */
155
- todoGroups?: readonly WaygraphTodoGroupInput[];
156
- /**
157
- * Camera zoom (Screen Studio style) - scales the page toward the target /
158
- * cursor. Not element CSS zoom. Typical `1.25` .. `2`.
159
- */
160
- zoom?: number;
161
- /** Default zoomOut for rings (false = keep camera between rings). */
162
- zoomOut?: boolean;
163
- /** Top demo banner title (the purple "waygraph demo" card). */
164
- title?: string;
165
- /** Banner side/position (`left` | `center` | `right`). Authored control, like {@link todoPos}. */
166
- titlePos?: BannerPos;
167
- /** Banner UX: collision (move away from a ring it overlaps), hidden. See {@link BannerUiOpts}. */
168
- bannerUi?: BannerUiOpts;
169
- /**
170
- * Bottom narration caption - a white rounded card (black text, shadow), bottom-centered above
171
- * the step pill, distinct from the banner (top, card-shaped). Omit/clear to hide it; set again
172
- * to change the text, fading out/in.
173
- */
174
- caption?: string;
175
- /**
176
- * Network-tab overlay visibility - capture always happens in the background regardless; this
177
- * only controls whether the panel itself is shown. Intentionally hidden by default (`undefined`
178
- * on the very first phase); omit to leave whatever the previous step set alone.
179
- */
180
- networkTabVisible?: boolean;
181
- /**
182
- * Floating checklist dock side. `left` | `right`.
183
- * Authored control (also click / WAYGRAPH_TODO_POS / --todo-left|right).
184
- */
185
- todoPos?: "left" | "right";
186
- /**
187
- * Todo-dock UX (compact / collision / behind-ring). Merged onto env defaults.
188
- * See {@link TodoDockUiOpts}.
189
- */
190
- todoDockUi?: TodoDockUiOpts;
191
- /**
192
- * Viewport preset: `mobile` | `tablet` | `desktop` (default / clear).
193
- * Omit on later blocks = **keep** (same persist pattern as todos).
194
- */
195
- device?: DevicePreset | DeviceState;
196
- /** Explicit pixel viewport (wins over preset width/height when both set). */
197
- viewport?: DeviceViewport;
198
- /** Touch theater + Playwright touchscreen when true. */
199
- touch?: boolean;
200
- /** Portrait / landscape (swaps preset width/height). */
201
- orientation?: DeviceOrientation;
202
- };
203
- /** Named viewport presets (0.13+). */
204
- export type DevicePreset = "mobile" | "tablet" | "desktop";
205
- /** Explicit viewport box. */
206
- export type DeviceViewport = {
207
- width: number;
208
- height: number;
209
- deviceScaleFactor?: number;
210
- };
211
- /**
212
- * Carried device fixture (todo-dock shaped persist).
213
- * Omit on a later step = keep; hideDevice/clearDevice/desktop = clear to desktop.
214
- */
215
- export type DeviceState = {
216
- preset: DevicePreset;
217
- viewport: DeviceViewport;
218
- /** Playwright-ish: treat as mobile layout. */
219
- isMobile: boolean;
220
- /** Context needs hasTouch for touchscreen.tap (demo launches with hasTouch). */
221
- hasTouch: boolean;
222
- /** Demo gesture theater: finger cursor, tap/hold timing, prefer touchscreen. */
223
- touchMode: boolean;
224
- /** Viewport orientation (0.13.3+). Default derived from width/height. */
225
- orientation?: DeviceOrientation;
226
- };
227
- /** Portrait (tall) or landscape (wide). */
228
- export type DeviceOrientation = "portrait" | "landscape";
229
- /** One named highlight slot on a block (selector + caption). */
230
- export interface WaygraphHighlightStub extends FixtureDurationFields {
231
- selector: string;
232
- /** Primary caption line. */
233
- label: string;
234
- /** Extra caption line (ring / slide body). */
235
- detail?: string;
236
- /** Short badge, e.g. AC / BUG / GATE / YAP. */
237
- tag?: string;
238
- /**
239
- * Demo ring color + icon:
240
- * - `planned` purple (authored narration, default)
241
- * - `auto` gray (engine automation / verify fallback)
242
- * - `info` blue · `warning` yellow · `danger` red · `success` green
243
- */
244
- tone?: HighlightTone;
245
- /**
246
- * Ring padding + label font scale: `sm` | `md` (default) | `lg`.
247
- * Aliases: small/medium/large, s/m/l.
248
- */
249
- size?: HighlightSize;
250
- /**
251
- * Label font weight: `normal` (default) | `bold`.
252
- * Aliases: regular, strong.
253
- */
254
- weight?: HighlightWeight;
255
- /**
256
- * Camera zoom while this ring is up (Screen Studio style - page scales toward
257
- * the target / cursor). Typical `1.25` .. `2`. Cleared when the ring hides
258
- * unless `zoomOut: false`. Episode default: {@link StubCtx.zoom}.
259
- */
260
- zoom?: number;
261
- /**
262
- * When false, keep the camera zoomed after this ring (pan to the next target
263
- * instead of zooming out). Default true. Phase default: {@link StubCtx.zoomOut}.
264
- */
265
- zoomOut?: boolean;
266
- /**
267
- * Spotlight: dim the rest of the page, keep this target as the focal point.
268
- */
269
- focus?: boolean;
270
- /**
271
- * Deprecated no-op. Camera auto-centers on the ring target; host mouse is
272
- * ignored. Playwright's real mouse is driven to the centered target instead.
273
- */
274
- followMouse?: boolean;
275
- /** Alias for {@link WaygraphHighlightStub.followMouse} (no-op). */
276
- follow?: boolean;
277
- /**
278
- * Caption text color (CSS color). Overrides tone label color when set.
279
- * Aliases accepted at runtime: `color`, `labelColor`, `textColor`.
280
- */
281
- color?: string;
282
- /**
283
- * Move the demo cursor to the target while this ring is up (default true
284
- * for authored stub queues; set false to keep cursor hidden).
285
- */
286
- cursor?: boolean;
287
- /**
288
- * Optional link to a todo item id. When set, Method fill/click advances that
289
- * todo row instead of relying on stub array index (avoids password/submit/username
290
- * alphabetical reorder bugs).
291
- */
292
- todo?: string;
293
- /** Slot key from stubBefore/After map (e.g. "username") - set by resolver. */
294
- slotId?: string;
295
- /**
296
- * Pointer feel when touchMode is on (0.13+):
297
- * - `tap` - short press via touchscreen (default in touch mode)
298
- * - `hold` - long-press (~600ms) then release
299
- * - `click` - mouse click even in touch mode
300
- */
301
- gesture?: "tap" | "hold" | "click" | "swipe";
302
- }
303
- /** Flow fixture patch: label required; selector optional (inherits from stub). */
304
- export type WaygraphHighlightFixture = Partial<Pick<WaygraphHighlightStub, "selector">> & Required<Pick<WaygraphHighlightStub, "label">> & Pick<WaygraphHighlightStub, "detail" | "tag" | "tone" | "size" | "weight" | "zoom" | "zoomOut" | "focus" | "followMouse" | "follow" | "color" | "cursor" | "todo" | "gesture"> & FixtureDurationFields;
305
- /** A static stub phase: named ring slots to paint before or after a step. */
306
- export type HighlightStubPhase = Record<string, WaygraphHighlightStub>;
307
- /**
308
- * Open stub lifecycle context. Authors set rings + episode fixtures freely —
309
- * not restricted to returning a closed slot object.
310
- *
311
- * @example
312
- * stubBefore: (ctx) => {
313
- * ctx.todos(["Enter email", "Enter password", "Click Sign in"]);
314
- * ctx.todoIndex(0);
315
- * ctx.zoom(1.35);
316
- * ctx.highlights({
317
- * email: { selector: "#email", label: "Email" },
318
- * submit: { selector: "#login-button", label: "Sign in" },
319
- * });
320
- * }
321
- * // Sequential plan: bump todoIndex in a later phase / later block's stubBefore
322
- * stubAfter: (ctx) => {
323
- * ctx.todos(["Enter email", "Enter password", "Click Sign in"]);
324
- * ctx.todoIndex(2);
325
- * ctx.ring("inventory", { selector: ".inventory_list", label: "Landed" });
326
- * }
327
- */
328
- export type StubCtx<Out extends Checkpoint<string> = Checkpoint<string>> = {
329
- /**
330
- * Live Mem for this run - same store `act`/`observe` read. Prefer this over
331
- * closing over outer scope or inventing parallel fixture bags.
332
- * Undefined only if the caller ran a stub phase without passing mem (tests).
333
- */
334
- readonly mem: MemPage | undefined;
335
- /** Present after resolve (stubAfter). Undefined for stubBefore. */
336
- readonly out: Out | undefined;
337
- /** Present on stubOnError when the step threw. */
338
- readonly error: unknown | undefined;
339
- /** Replace named highlight rings for this phase. */
340
- highlights(slots: HighlightStubPhase): void;
341
- /** Set / overwrite one named ring. */
342
- ring(id: string, stub: WaygraphHighlightStub): void;
343
- /**
344
- * Floating checklist. Prefer the compact form:
345
- * ctx.todos("login", ["Enter email", "Enter password"], { title: "Sign in", index: 0 })
346
- * Legacy: ctx.todos([...]); ctx.todoId(...); ctx.todoIndex(...); …
347
- * Default = one dock (setting todos replaces). Pass `{ parallel: true }` to keep others.
348
- */
349
- todos(items: readonly WaygraphTodoInput[]): void;
350
- todos(id: string, items: readonly WaygraphTodoInput[], opts?: WaygraphTodosOpts): void;
351
- /** Current checklist index (bump for sequential plans). */
352
- todoIndex(n: number): void;
353
- /** Heading above the single {@link StubCtx.todos} list. */
354
- todoTitle(text: string): void;
355
- /**
356
- * Stable dock id for external selectors after redirects
357
- * (`#wg-todo-dock[data-wg-todo-id="ep10-coverage"]`).
358
- */
359
- todoId(id: string): void;
360
- /**
361
- * Dock presentation: `sequential` (arrow walkthrough), `checklist`
362
- * (independent checkboxes), or `bullets` (flat • list, no progress marks).
363
- */
364
- todoStyle(style: TodoListStyle): void;
365
- /**
366
- * Multiple titled lists (e.g. Functional Requirements / Scenarios / ACs).
367
- * Replaces a bare {@link StubCtx.todos} list when set.
368
- */
369
- todoGroups(groups: readonly WaygraphTodoGroupInput[]): void;
370
- /**
371
- * Hide the floating todo dock. Omit todos on a later block = **keep** the
372
- * previous dock (carry forward). Only hideTodos / clearTodos / todos([]) clears it.
373
- */
374
- hideTodos(): void;
375
- /** Alias for {@link StubCtx.hideTodos}. */
376
- clearTodos(): void;
377
- /**
378
- * Viewport / device fixture (0.13+). `mobile` | `tablet` | `desktop`.
379
- * Omit on later blocks = **keep** (same persist as todos). Use
380
- * {@link StubCtx.hideDevice} / {@link StubCtx.clearDevice} to return to desktop.
381
- */
382
- device(preset: DevicePreset | DeviceState): void;
383
- /** Explicit CSS-pixel viewport (implies mobile-ish unless desktop-sized). */
384
- viewport(box: DeviceViewport): void;
385
- /** Enable / disable touch theater + touchscreen gestures. */
386
- touch(on?: boolean): void;
387
- /**
388
- * Rotate viewport to portrait or landscape (0.13.3+).
389
- * Keeps current preset; swaps width/height. Toast + lerp like device().
390
- */
391
- orientation(o: DeviceOrientation): void;
392
- /** Alias for {@link StubCtx.orientation}("landscape"). */
393
- landscape(): void;
394
- /** Alias for {@link StubCtx.orientation}("portrait"). */
395
- portrait(): void;
396
- /**
397
- * Reset to desktop viewport and clear touch mode. Omit device on a later
398
- * block = **keep**; only hideDevice / clearDevice / device("desktop") clears.
399
- */
400
- hideDevice(): void;
401
- /** Alias for {@link StubCtx.hideDevice}. */
402
- clearDevice(): void;
403
- /** Default camera zoom for rings without their own zoom. */
404
- zoom(n: number): void;
405
- /**
406
- * Default zoomOut for rings in this phase. `false` = keep camera between rings.
407
- */
408
- zoomOut(keep: boolean): void;
409
- /** Top banner title (waygraph demo card). `opts.pos` also places it (left | center | right). */
410
- title(text: string, opts?: {
411
- pos?: BannerPos;
412
- }): void;
413
- /** Alias for {@link StubCtx.title}. */
414
- banner(text: string, opts?: {
415
- pos?: BannerPos;
416
- }): void;
417
- /** Place the banner: `left` | `center` | `right` (authored; click / env are fallbacks). */
418
- titlePos(side: BannerPos): void;
419
- /** Alias for {@link StubCtx.titlePos}. */
420
- bannerPos(side: BannerPos): void;
421
- /**
422
- * Banner UX: `{ collision: false }` keeps it put even over a ring; `{ hidden: true }` hides it.
423
- * @example ctx.bannerUi({ collision: false });
424
- */
425
- bannerUi(opts: BannerUiOpts): void;
426
- /**
427
- * Bottom narration caption - a white rounded card (black text, shadow), bottom-centered above
428
- * the step pill; distinct from {@link StubCtx.title}, which is the top banner card. Fades in/out
429
- * on change. Pass `""` (or call {@link StubCtx.hideCaption}) to clear.
430
- * @example ctx.caption("Click Add to cart to continue");
431
- */
432
- caption(text: string): void;
433
- /** Clears the caption (fades it out). */
434
- hideCaption(): void;
435
- /** Shorthand for `bannerUi({ hidden: true })`. */
436
- hideBanner(): void;
437
- /**
438
- * Shows the network-tab overlay (Postman-style inspector of real page traffic + defineApiBlock
439
- * calls) - capture always runs in the background; this just reveals the panel. Hidden by default.
440
- * @example ctx.showNetworkTab();
441
- */
442
- showNetworkTab(): void;
443
- /** Hides the network-tab overlay (capture keeps running - only the panel disappears). */
444
- hideNetworkTab(): void;
445
- /**
446
- * Floating checklist dock side (`left` | `right`). Authors control this in
447
- * code; click / env / --todo-left|right are fallbacks.
448
- */
449
- todoPos(side: "left" | "right"): void;
450
- /**
451
- * Todo-dock UX: compact fold, collision flip, dim-behind-ring.
452
- * Defaults are smart-on; pass false fields to opt out for this phase.
453
- * @example
454
- * ctx.todoDockUi({ compact: false }); // always show full list
455
- * ctx.todoDockFull(); // shorthand: compact+collision+behindRing off
456
- */
457
- todoDockUi(opts: TodoDockUiOpts): void;
458
- /** Shorthand: full checklist, no compact/collision/behind-ring for this phase. */
459
- todoDockFull(): void;
460
- /** Batch-set rings + episode fixtures. */
461
- set(partial: {
462
- highlights?: HighlightStubPhase;
463
- } & StubPhaseFixtures): void;
464
- };
465
- /** A stub callback: receives the stub `ctx` and paints rings, titles and todos. */
466
- export type StubLifecycleFn<Out extends Checkpoint<string>> = (ctx: StubCtx<Out>) => void | HighlightStubPhase | Promise<void | HighlightStubPhase>;
467
- /**
468
- * Block stub authoring:
469
- * - **preferred:** open lifecycle `stubBefore(ctx) { ctx.todos(...); ctx.ring(...) }`
470
- * - **shorthand:** static slot map `{ email: { selector, label } }`
471
- *
472
- * Exactly one function member, so an inline `stubAfter(ctx) {}` gets `ctx` typed.
473
- */
474
- export type HighlightStubPhaseOrFn<Out extends Checkpoint<string>> = HighlightStubPhase | StubLifecycleFn<Out>;
475
- /** Result of running a stub phase (rings + episode fixtures). */
476
- export type StubPhaseResult = {
477
- highlights: ResolvedHighlight[];
478
- /** Flattened first-group items (compat). Prefer {@link todoDock}. */
479
- todos: WaygraphTodoItem[];
480
- todoIndex?: number;
481
- todoDock?: TodoDockState;
482
- /**
483
- * Todo dock intent for this phase:
484
- * - `set` - replace dock with {@link todoDock}
485
- * - `clear` - hide dock (author called hideTodos / empty todos())
486
- * - `keep` - author omitted todos; demo must leave previous dock alone
487
- */
488
- todoSync?: "set" | "clear" | "keep";
489
- /** Todo-dock UX for this phase (when author called {@link StubCtx.todoDockUi}). */
490
- todoDockUi?: TodoDockUiOpts;
491
- /** Resolved device after this phase (undefined when keep with no prior). */
492
- device?: DeviceState;
493
- /**
494
- * Device intent (mirror todoSync):
495
- * - `set` - apply {@link device}
496
- * - `clear` - reset to desktop (hideDevice / clearDevice / device desktop)
497
- * - `keep` - author omitted device; demo must leave previous alone
498
- */
499
- deviceSync?: "set" | "clear" | "keep";
500
- zoom?: number;
501
- zoomOut?: boolean;
502
- title?: string;
503
- titlePos?: BannerPos;
504
- bannerUi?: BannerUiOpts;
505
- caption?: string;
506
- networkTabVisible?: boolean;
507
- todoPos?: "left" | "right";
508
- /** When true, keep other docks (multi-todo). Default false = replace. */
509
- todoParallel?: boolean;
510
- };
511
- /**
512
- * One yap/slide in a multi-step demo caption sequence.
513
- * Not block lifecycle - demo pauses (Next / auto-next) between slides.
514
- */
515
- export interface WaygraphSlide extends FixtureDurationFields {
516
- /** Primary caption (required). */
517
- caption: string;
518
- detail?: string;
519
- tag?: string;
520
- /** Optional ring while this slide is showing. */
521
- selector?: string;
522
- tone?: HighlightTone;
523
- size?: HighlightSize;
524
- weight?: HighlightWeight;
525
- /** Magnify via camera (Screen Studio) while this slide is showing. */
526
- zoom?: number;
527
- }
528
- /**
529
- * Demo ring tones (iconified).
530
- * Automation (`auto`) is gray so authored planned/info/warning/danger/success stand out.
531
- * `orange` added for Blind Pilot's own real, direct user request: a visible
532
- * color distinction between a real Playwright-driven action (a Block run,
533
- * or a raw click/type/upload - `auto` gray, already meant exactly this) and
534
- * a pure DOM inspection (`auto dom` - orange, new) - "gray is waygraph
535
- * playwright run. orange is dom check."
536
- */
537
- export type HighlightTone = "planned" | "auto" | "info" | "warning" | "danger" | "success" | "orange";
538
- /** Ring + label scale. */
539
- export type HighlightSize = "sm" | "md" | "lg";
540
- /** Label font weight. */
541
- export type HighlightWeight = "normal" | "bold";
542
- /** Optional Flow-level defaults for demo rings (episode-wide). Stub/fixture wins. */
543
- export type HighlightStyleDefaults = {
544
- tone?: HighlightTone;
545
- size?: HighlightSize;
546
- weight?: HighlightWeight;
547
- };
548
- /**
549
- * Demo pacing for a Flow episode or a Block/compose group.
550
- * - `blitz` - FF-like: skip theater + short gates (same as fastForwardComposeBlock)
551
- * - `fast` - shorter gates, keep cursor theater (~0.33x normal)
552
- * - `normal` - default demo pace (1x)
553
- * - `slow` - longer autoplay + fixture dwell (~2x)
554
- * - `number` - scale vs normal when `<= 20` (e.g. `0.5`, `1.5`, `3`);
555
- * absolute gate/dwell ms when `> 20` (e.g. `4500`)
556
- */
557
- export type DemoPaceName = "blitz" | "fast" | "normal" | "slow";
558
- /** How fast a demo step runs: `"fast"`, `"slow"`, `"blitz"`, `"normal"`, or a multiplier (`0.5`, `2`). */
559
- export type DemoPace = DemoPaceName | number;
560
- export type WaygraphSlidesOrFn<Out extends Checkpoint<string>> = readonly WaygraphSlide[] | ((out: Out) => readonly WaygraphSlide[]);
561
- /** Demo stub phase names (block instruction + flow fixtures). */
562
- export type HighlightStubPhaseName = "stubBefore" | "stubAfter" | "stubOnError";
563
- /** Per-block fixture map attached to a Flow via {@link withHighlightFixtures}. */
564
- export type HighlightFixtureMap = Record<string, {
565
- stubBefore?: Record<string, WaygraphHighlightFixture>;
566
- stubAfter?: Record<string, WaygraphHighlightFixture>;
567
- /** Fail-path rings (demo step throw) - distinct copy from success stubAfter. */
568
- stubOnError?: Record<string, WaygraphHighlightFixture>;
569
- /** Override / supply multi-step yap slides for this block (demo only). */
570
- slides?: readonly WaygraphSlide[];
571
- }>;
572
- /** Legacy array highlight (shimmed to stubAfter keys "0", "1", ...). */
573
- export interface WaygraphHighlight {
574
- selector: string;
575
- label: string;
576
- tone?: HighlightTone;
577
- }
578
- /** A ring or caption after its defaults and overrides are merged, ready to paint. */
579
- export type ResolvedHighlight = WaygraphHighlightStub;
580
- export type StubBagState = {
581
- highlights: HighlightStubPhase;
582
- todos?: readonly WaygraphTodoInput[] | undefined;
583
- todoIndex?: number | undefined;
584
- todoTitle?: string | undefined;
585
- todoId?: string | undefined;
586
- todoStyle?: TodoListStyle | undefined;
587
- todoGroups?: readonly WaygraphTodoGroupInput[] | undefined;
588
- /** Author touched the todo dock this phase (set or clear). */
589
- todoTouched?: boolean | undefined;
590
- /** Author asked to hide the dock. */
591
- hideTodos?: boolean | undefined;
592
- /** Author touched device this phase (set or clear). */
593
- deviceTouched?: boolean | undefined;
594
- /** Author asked to reset to desktop. */
595
- hideDevice?: boolean | undefined;
596
- device?: DeviceState | undefined;
597
- /** Touch override when set via ctx.touch() alone or with device. */
598
- touchOverride?: boolean | undefined;
599
- /** Orientation override when set via ctx.orientation / landscape / portrait. */
600
- orientationOverride?: DeviceOrientation | undefined;
601
- zoom?: number | undefined;
602
- zoomOut?: boolean | undefined;
603
- title?: string | undefined;
604
- titlePos?: BannerPos | undefined;
605
- bannerUi?: BannerUiOpts | undefined;
606
- caption?: string | undefined;
607
- networkTabVisible?: boolean | undefined;
608
- todoPos?: "left" | "right" | undefined;
609
- /** Author patched todo-dock UX this phase. */
610
- todoDockUi?: TodoDockUiOpts | undefined;
611
- /** Keep sibling docks (compact todos opts.parallel). */
612
- todoParallel?: boolean | undefined;
613
- };
@@ -1,9 +0,0 @@
1
- export * from "./highlights/types.js";
2
- export * from "./highlights/todo-dock.js";
3
- export * from "./highlights/device.js";
4
- export * from "./highlights/css.js";
5
- export * from "./highlights/style.js";
6
- export * from "./highlights/demo-pace.js";
7
- export * from "./highlights/merge.js";
8
- export * from "./highlights/stub-ctx.js";
9
- export * from "./highlights/run-phase.js";
@@ -1,10 +0,0 @@
1
- // Barrel: highlights live in src/highlights/ (see src/ARCHITECTURE.md). Kept so existing imports of "./highlights.js" don't change.
2
- export * from "./highlights/types.js";
3
- export * from "./highlights/todo-dock.js";
4
- export * from "./highlights/device.js";
5
- export * from "./highlights/css.js";
6
- export * from "./highlights/style.js";
7
- export * from "./highlights/demo-pace.js";
8
- export * from "./highlights/merge.js";
9
- export * from "./highlights/stub-ctx.js";
10
- export * from "./highlights/run-phase.js";
@@ -1,5 +0,0 @@
1
- export * from "./pilot-overlay/shell.js";
2
- export * from "./pilot-overlay/fixtures.js";
3
- export * from "./pilot-overlay/panel.js";
4
- export * from "./pilot-overlay/action-ring.js";
5
- export * from "./pilot-overlay/overlay-fixtures.js";
@@ -1,6 +0,0 @@
1
- // Barrel: pilot-overlay lives in src/pilot-overlay/ (see src/ARCHITECTURE.md). Kept so existing imports of "./pilot-overlay.js" don't change.
2
- export * from "./pilot-overlay/shell.js";
3
- export * from "./pilot-overlay/fixtures.js";
4
- export * from "./pilot-overlay/panel.js";
5
- export * from "./pilot-overlay/action-ring.js";
6
- export * from "./pilot-overlay/overlay-fixtures.js";