waygraph 0.15.51 → 0.15.53

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 (153) hide show
  1. package/README.md +8 -1
  2. package/dist/analysis/graph.d.ts +1 -1
  3. package/dist/analysis/graph.js +10 -15
  4. package/dist/analysis/map-check.d.ts +3 -2
  5. package/dist/analysis/practices-check.d.ts +0 -1
  6. package/dist/analysis/practices-check.js +0 -13
  7. package/dist/auto-session/session.d.ts +1 -1
  8. package/dist/auto-session/session.js +13 -8
  9. package/dist/blocks-select.d.ts +7 -4
  10. package/dist/blocks-select.js +0 -14
  11. package/dist/browser.d.ts +27 -0
  12. package/dist/browser.js +62 -0
  13. package/dist/cli/flags.js +3 -1
  14. package/dist/cli/run-chain.js +4 -0
  15. package/dist/cli/usage.js +17 -1
  16. package/dist/cli.js +13 -1
  17. package/dist/commands/agent-dive-scaffold.d.ts +5 -20
  18. package/dist/commands/agent-dive-scaffold.js +10 -3
  19. package/dist/commands/extensions.d.ts +1 -0
  20. package/dist/commands/extensions.js +22 -0
  21. package/dist/commands/init.js +43 -5
  22. package/dist/commands/test.js +16 -2
  23. package/dist/commands/try.js +2 -1
  24. package/dist/commands/upgrade.d.ts +6 -0
  25. package/dist/commands/upgrade.js +113 -0
  26. package/dist/config.d.ts +81 -3
  27. package/dist/config.js +91 -16
  28. package/dist/core/block.d.ts +19 -2
  29. package/dist/core/block.js +43 -3
  30. package/dist/core/blocks/nav.d.ts +11 -0
  31. package/dist/core/blocks/nav.js +8 -0
  32. package/dist/core/config.d.ts +5 -0
  33. package/dist/core/engine.d.ts +19 -16
  34. package/dist/core/engine.js +6 -4
  35. package/dist/core/flow.d.ts +27 -0
  36. package/dist/core/flow.js +75 -28
  37. package/dist/core/map-builder.d.ts +30 -4
  38. package/dist/core/map-builder.js +45 -7
  39. package/dist/env-file.d.ts +7 -7
  40. package/dist/env-file.js +29 -16
  41. package/dist/extensions.d.ts +21 -0
  42. package/dist/extensions.js +178 -0
  43. package/dist/highlights/demo-pace.d.ts +0 -1
  44. package/dist/highlights/demo-pace.js +24 -3
  45. package/dist/index.d.ts +7 -5
  46. package/dist/index.js +3 -2
  47. package/dist/pilot-overlay/action-ring.d.ts +0 -9
  48. package/dist/pilot-overlay/action-ring.js +1 -1
  49. package/dist/pilot-overlay/overlay-fixtures.d.ts +0 -7
  50. package/dist/pilot-overlay/overlay-fixtures.js +0 -45
  51. package/dist/pilot-overlay/panel.d.ts +2 -1
  52. package/dist/playwright-config.d.ts +4 -0
  53. package/dist/playwright-config.js +15 -0
  54. package/dist/playwright.config.d.ts +2 -0
  55. package/dist/playwright.config.js +6 -0
  56. package/dist/runner/demo-log.js +1 -7
  57. package/dist/runner/inpage/core.d.ts +1 -1
  58. package/dist/runner/inpage/core.js +8 -7
  59. package/dist/runner/interaction-patch.js +32 -1
  60. package/dist/runner/main.js +22 -11
  61. package/dist/runner/rings.js +0 -49
  62. package/dist/runner/step-mode.js +10 -4
  63. package/dist/session/auto-explore-run.js +9 -5
  64. package/dist/session/auto-explore.d.ts +2 -1
  65. package/dist/session/auto-explore.js +6 -4
  66. package/dist/session/auto-session-ipc.d.ts +1 -2
  67. package/dist/session/auto-session-ipc.js +1 -1
  68. package/dist/session/block-inject.d.ts +0 -13
  69. package/dist/session/block-inject.js +3 -3
  70. package/dist/session/pilot.d.ts +0 -2
  71. package/dist/session/pilot.js +1 -2
  72. package/dist/session/step-overlay.js +3 -1
  73. package/dist/traverse/coverage.d.ts +0 -4
  74. package/dist/traverse/coverage.js +1 -1
  75. package/dist/traverse/run.js +3 -1
  76. package/dist/types.d.ts +1 -1
  77. package/dist/ui/components/ring.js +1 -0
  78. package/dist/ui/overlay.css +1 -0
  79. package/dist/ui/shadow.d.ts +1 -3
  80. package/dist/ui/shadow.js +0 -4
  81. package/dist/ui/tokens.d.ts +0 -11
  82. package/dist/ui/tokens.js +0 -5
  83. package/dist/video-dir.d.ts +8 -0
  84. package/dist/video-dir.js +60 -0
  85. package/dist/webserver.js +5 -1
  86. package/package.json +11 -5
  87. package/templates/scaffold/README.md +5 -3
  88. package/templates/scaffold/STRUCTURE.md +10 -4
  89. package/templates/scaffold/config/waygraph.config.ts +45 -0
  90. package/templates/scaffold/package.json +7 -7
  91. package/templates/scaffold/src/flows/(external)/hoppscotch/auth.flow.ts +36 -0
  92. package/templates/scaffold/src/flows/(external)/hoppscotch/get.flow.ts +24 -0
  93. package/templates/scaffold/src/flows/(external)/hoppscotch/post.flow.ts +34 -0
  94. package/templates/scaffold/src/flows/(user-stories)/email-verification.flow.ts +47 -0
  95. package/templates/scaffold/src/flows/README.md +35 -14
  96. package/templates/scaffold/src/flows/home/cart.flow.ts +51 -0
  97. package/templates/scaffold/src/flows/home/hello.flow.ts +42 -0
  98. package/templates/scaffold/src/map/(app_base)/docs/_nav.block.ts +0 -9
  99. package/templates/scaffold/src/map/(app_base)/docs/_page.block.ts +0 -5
  100. package/templates/scaffold/src/map/(app_base)/docs/_sel.ts +1 -1
  101. package/templates/scaffold/src/map/(app_base)/home/_methods/add-item.effect.block.ts +3 -19
  102. package/templates/scaffold/src/map/(app_base)/home/_methods/assert-hello.method.block.ts +2 -25
  103. package/templates/scaffold/src/map/(app_base)/home/_methods/assert-item-added.method.block.ts +2 -19
  104. package/templates/scaffold/src/map/(app_base)/home/_methods/clear-cart.method.block.ts +1 -17
  105. package/templates/scaffold/src/map/(app_base)/home/_methods/remove-item.effect.block.ts +1 -10
  106. package/templates/scaffold/src/map/(app_base)/home/_nav.block.ts +1 -12
  107. package/templates/scaffold/src/map/(app_base)/home/_page.block.ts +0 -9
  108. package/templates/scaffold/src/map/(app_base)/home/_sel.ts +3 -1
  109. package/templates/scaffold/src/map/(app_base)/home/nav-verification-link.block.ts +1 -23
  110. package/templates/scaffold/src/map/(external)/hoppscotch/_methods/assert-response-body.method.block.ts +21 -0
  111. package/templates/scaffold/src/map/(external)/hoppscotch/_methods/assert-response-header.method.block.ts +19 -0
  112. package/templates/scaffold/src/map/(external)/hoppscotch/_methods/assert-status.method.block.ts +20 -0
  113. package/templates/scaffold/src/map/(external)/hoppscotch/_methods/pick-extension-interceptor.method.block.ts +18 -0
  114. package/templates/scaffold/src/map/(external)/hoppscotch/_methods/read-response-body.method.block.ts +21 -0
  115. package/templates/scaffold/src/map/(external)/hoppscotch/_methods/read-response-headers.method.block.ts +21 -0
  116. package/templates/scaffold/src/map/(external)/hoppscotch/_methods/send-request.method.block.ts +15 -0
  117. package/templates/scaffold/src/map/(external)/hoppscotch/_methods/set-bearer-token.method.block.ts +20 -0
  118. package/templates/scaffold/src/map/(external)/hoppscotch/_methods/set-headers.method.block.ts +23 -0
  119. package/templates/scaffold/src/map/(external)/hoppscotch/_methods/set-json-body.method.block.ts +36 -0
  120. package/templates/scaffold/src/map/(external)/hoppscotch/_methods/set-method.method.block.ts +17 -0
  121. package/templates/scaffold/src/map/(external)/hoppscotch/_methods/set-query-params.method.block.ts +22 -0
  122. package/templates/scaffold/src/map/(external)/hoppscotch/_methods/set-url.method.block.ts +18 -0
  123. package/templates/scaffold/src/map/(external)/hoppscotch/_nav.block.ts +11 -0
  124. package/templates/scaffold/src/map/(external)/hoppscotch/_page.block.ts +36 -0
  125. package/templates/scaffold/src/map/(external)/hoppscotch/_sel.ts +27 -0
  126. package/templates/scaffold/src/map/(external)/hoppscotch/settings/_nav.block.ts +10 -0
  127. package/templates/scaffold/src/map/(external)/mailpit/_methods/assert-email-content.method.block.ts +2 -27
  128. package/templates/scaffold/src/map/(external)/mailpit/_methods/assert-email-received.method.block.ts +2 -21
  129. package/templates/scaffold/src/map/(external)/mailpit/_methods/extract-email-link.method.block.ts +1 -19
  130. package/templates/scaffold/src/map/(external)/mailpit/_methods/open-message.method.block.ts +1 -11
  131. package/templates/scaffold/src/map/(external)/mailpit/_nav.block.ts +1 -9
  132. package/templates/scaffold/src/map/(external)/mailpit/_page.block.ts +0 -11
  133. package/templates/scaffold/src/states/demo.mem-keys.ts +20 -19
  134. package/templates/scaffold/src/states/demo.mem-stubs.ts +4 -0
  135. package/templates/scaffold/src/states/demo.states.ts +5 -1
  136. package/templates/scaffold/tests/example.spec.ts +6 -7
  137. package/templates/scaffold/tests/hoppscotch.spec.ts +97 -0
  138. package/templates/scaffold/tests/mail-verify.spec.ts +8 -17
  139. package/templates/scaffold/tsconfig.json +1 -1
  140. package/templates/skills/waygraph-convention.skill.md +40 -3
  141. package/templates/skills/waygraph-pilot.skill.md +4 -5
  142. package/dist/browser-path.d.ts +0 -5
  143. package/dist/browser-path.js +0 -18
  144. package/dist/runner/overlay-present.d.ts +0 -8
  145. package/dist/runner/overlay-present.js +0 -57
  146. package/dist/ui/components/banner.d.ts +0 -2
  147. package/dist/ui/components/banner.js +0 -10
  148. package/dist/ui/components/cursor.d.ts +0 -2
  149. package/dist/ui/components/cursor.js +0 -19
  150. package/templates/scaffold/playwright.config.ts +0 -12
  151. package/templates/scaffold/src/flows/example.flow.ts +0 -29
  152. package/templates/scaffold/src/flows/mail-verify.flow.ts +0 -85
  153. package/templates/scaffold/src/flows/shop.flow.ts +0 -74
@@ -1,85 +0,0 @@
1
- import { Engine, start, end, withTitle, withHighlightFixtures } from "waygraph";
2
- import { NavMailpitInboxBlock } from "../map/(external)/mailpit/_nav.block.js";
3
- import { AssertEmailReceivedBlock } from "../map/(external)/mailpit/_methods/assert-email-received.method.block.js";
4
- import { OpenMessageBlock } from "../map/(external)/mailpit/_methods/open-message.method.block.js";
5
- import { AssertEmailContentBlock } from "../map/(external)/mailpit/_methods/assert-email-content.method.block.js";
6
- import { ExtractEmailLinkBlock } from "../map/(external)/mailpit/_methods/extract-email-link.method.block.js";
7
- import { NavVerificationLinkBlock } from "../map/(app_base)/home/nav-verification-link.block.js";
8
- import "../map/(external)/mailpit/_page.block.js";
9
- import { MailpitSel } from "../map/(external)/mailpit/_sel.js";
10
-
11
- const engine = new Engine();
12
-
13
- /**
14
- * Cross-origin mail demo, QA-rich: navigate to a real Mailpit inbox (a real,
15
- * separate web UI - not this app), confirm the email actually arrived,
16
- * open it, confirm its body says what it's supposed to, read a link
17
- * straight out of the DOM, then navigate back into the app with it - six
18
- * atomic Blocks, no mail-catcher REST API anywhere.
19
- *
20
- * The four mail-reading Blocks (`assert-email-received`, `open-message`,
21
- * `assert-email-content`, `extract-email-link`) are reusable across any
22
- * number of different email scenarios in a project (signup confirmation,
23
- * password reset, magic link, ...) with zero new Blocks per scenario - only
24
- * mem varies per run: `ExpectedRecipient` (who), `ExpectedLinkPattern`
25
- * (which link in the body to follow), `ExpectedEmailContent` (what the body
26
- * should say). This particular flow wires them to this scaffold's own
27
- * "verified" landing route (`nav-verification-link`, app-specific by
28
- * nature - a different scenario would use a different landing Nav) - see
29
- * tests/mail-verify.spec.ts for two different scenarios driven through the
30
- * same four mail-reading Blocks.
31
- *
32
- * Needs a real Mailpit instance reachable at WAYGRAPH_MAIL_URL (default
33
- * http://127.0.0.1:8025) with a message already waiting for
34
- * ExpectedRecipient's email - see tests/mail-verify.spec.ts for how the test
35
- * drives this end to end (spins up a real Mailpit container, sends a real
36
- * email, then runs this exact flow) - including the negative cases: no email
37
- * arriving, or content that doesn't match, each fail loud, naming
38
- * themselves, not a silent pass.
39
- */
40
- export const mailVerifyFlow = withHighlightFixtures(
41
- withTitle(
42
- engine.defineFlow([
43
- start,
44
- NavMailpitInboxBlock,
45
- AssertEmailReceivedBlock,
46
- OpenMessageBlock,
47
- AssertEmailContentBlock,
48
- ExtractEmailLinkBlock,
49
- NavVerificationLinkBlock,
50
- end,
51
- ]),
52
- "Scaffold: Cross-origin mail verification (QA-rich)",
53
- ),
54
- {
55
- "assert-email-received": {
56
- stubAfter: {
57
- note: {
58
- selector: MailpitSel.messageRow,
59
- label: "AC · email arrived",
60
- detail: "Confirmed before opening anything.",
61
- tag: "AC",
62
- },
63
- },
64
- },
65
- "assert-email-content": {
66
- stubAfter: {
67
- note: {
68
- selector: MailpitSel.previewIframe,
69
- label: "AC · email body matches expected copy",
70
- tag: "AC",
71
- },
72
- },
73
- },
74
- "extract-email-link": {
75
- stubAfter: {
76
- note: {
77
- selector: MailpitSel.previewIframe,
78
- label: "AC · link found",
79
- detail: "Read from the message preview iframe.",
80
- tag: "AC",
81
- },
82
- },
83
- },
84
- },
85
- );
@@ -1,74 +0,0 @@
1
- import {
2
- Engine,
3
- start,
4
- end,
5
- withTitle,
6
- withHighlightFixtures,
7
- withSessionReset,
8
- withMemStub,
9
- registerMemStub,
10
- } from "waygraph";
11
- import { NavHomeBlock } from "../map/(app_base)/home/_nav.block.js";
12
- import { AddItemBlock } from "../map/(app_base)/home/_methods/add-item.effect.block.js";
13
- import { AssertItemAddedBlock } from "../map/(app_base)/home/_methods/assert-item-added.method.block.js";
14
- import { RemoveItemBlock } from "../map/(app_base)/home/_methods/remove-item.effect.block.js";
15
- import { ClearCartBlock } from "../map/(app_base)/home/_methods/clear-cart.method.block.js";
16
- import { SelectedItem } from "../states/demo.mem-keys.js";
17
- import "../map/(app_base)/home/_page.block.js";
18
-
19
- const engine = new Engine();
20
-
21
- /**
22
- * memStub: a real fixture row (`alpha`/`Alpha`), registered once so this Flow never needs
23
- * --data at all. Still override-able - `--data '{"demo.selectedItem":{"id":"beta",...}}'`
24
- * wins over this registration, same as any other memStub (see docs/REFERENCE.md's own
25
- * "memStub - fake values for requires" section).
26
- */
27
- registerMemStub(SelectedItem.key, () => ({ id: "alpha", name: "Alpha" }));
28
-
29
- /**
30
- * Effect + Method demo. `requires: [SelectedItem.key]` (on `add-item`) is filled automatically
31
- * by the memStub registration above - no --data needed. Override it with real data, or use
32
- * `waygraph auto` which fills SelectedItem via instanceOptions instead:
33
- *
34
- * waygraph demo --blocks shopFlow # memStub fills it
35
- * waygraph demo --blocks shopFlow --data '{"demo.selectedItem":{"id":"beta","name":"Beta"}}'
36
- * waygraph auto # after landing on home, pick Add Alpha / Add Beta / Remove ...
37
- *
38
- * Add -> assert it actually landed (mem-matched Remove button + cart count,
39
- * only provable from the method's real effect, not a static page state) ->
40
- * Remove that same row (per-item Effect, `remove-item`) -> Add again ->
41
- * Clear cart (bulk Method, `clear-cart`) - keeps both the per-item and bulk
42
- * clear paths atomic and each wired into a real flow, not orphaned.
43
- */
44
- export const shopFlow = withMemStub(
45
- withHighlightFixtures(
46
- withTitle(
47
- withSessionReset(
48
- engine.defineFlow([
49
- start,
50
- NavHomeBlock,
51
- AddItemBlock,
52
- AssertItemAddedBlock,
53
- RemoveItemBlock,
54
- AddItemBlock,
55
- ClearCartBlock,
56
- end,
57
- ]),
58
- ),
59
- "Scaffold: Shop (Effect + clear)",
60
- ),
61
- {
62
- "add-item": {
63
- stubAfter: {
64
- cart: {
65
- label: "AC · item in cart",
66
- detail: "Cart count bumped after Add.",
67
- tag: "AC",
68
- duration: true,
69
- },
70
- },
71
- },
72
- },
73
- ),
74
- );