waygraph 0.13.7 → 0.15.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.
- package/README.md +970 -232
- package/assets/stubs/stub.mp4 +0 -0
- package/assets/stubs/stub.pdf +32 -0
- package/assets/stubs/stub.png +0 -0
- package/dist/agent-dive.d.ts +9 -0
- package/dist/agent-dive.js +32 -0
- package/dist/auto-explore-run.d.ts +20 -2
- package/dist/auto-explore-run.js +9 -8
- package/dist/auto-explore.js +22 -2
- package/dist/auto-session-ipc.d.ts +123 -0
- package/dist/auto-session-ipc.js +381 -0
- package/dist/auto-session.d.ts +342 -0
- package/dist/auto-session.js +760 -0
- package/dist/cli.js +450 -51
- package/dist/engine.d.ts +201 -1
- package/dist/engine.js +312 -2
- package/dist/graph.d.ts +18 -0
- package/dist/graph.js +65 -2
- package/dist/highlights.d.ts +20 -1
- package/dist/highlights.js +60 -0
- package/dist/index.d.ts +8 -4
- package/dist/index.js +5 -3
- package/dist/map-check.d.ts +18 -0
- package/dist/map-check.js +140 -0
- package/dist/pilot-overlay.d.ts +88 -0
- package/dist/pilot-overlay.js +363 -0
- package/dist/pilot.d.ts +49 -0
- package/dist/pilot.js +53 -0
- package/dist/trait.d.ts +22 -0
- package/dist/trait.js +60 -3
- package/dist/types.d.ts +21 -1
- package/dist/types.js +17 -1
- package/examples/routed-demo/.waygraph-auto/4d4902b7.log +0 -0
- package/examples/routed-demo/.waygraph-auto/51ef462e.log +0 -0
- package/examples/routed-demo/.waygraph-auto/71527ad9.log +0 -0
- package/examples/routed-demo/.waygraph-auto/ca16778e.log +0 -0
- package/examples/routed-demo/package.json +26 -0
- package/examples/routed-demo/playwright.config.ts +20 -0
- package/examples/routed-demo/scripts/fixture-server.mjs +37 -0
- package/examples/routed-demo/scripts/with-fixture.mjs +70 -0
- package/examples/routed-demo/src/flows/routed-demo-map.flow.ts +39 -0
- package/examples/routed-demo/src/flows/routed-demo.flow.ts +12 -0
- package/examples/routed-demo/src/map/(app_base)/dashboard/_methods/click-widget.block.ts +23 -0
- package/examples/routed-demo/src/map/(app_base)/dashboard/_nav.block.ts +18 -0
- package/examples/routed-demo/src/map/(app_base)/dashboard/_page.block.ts +22 -0
- package/examples/routed-demo/src/map/(app_base)/dashboard/_sel.ts +10 -0
- package/examples/routed-demo/src/map/(external)/docs/_nav.block.ts +21 -0
- package/examples/routed-demo/src/map/(external)/docs/_page.block.ts +15 -0
- package/examples/routed-demo/src/map/(external)/docs/_sel.ts +7 -0
- package/examples/routed-demo/src/pages/dashboard.html +10 -0
- package/examples/routed-demo/src/pages/docs.html +8 -0
- package/examples/routed-demo/src/states/routed-demo.states.ts +10 -0
- package/examples/routed-demo/test-results/.last-run.json +4 -0
- package/examples/routed-demo/tests/routed-demo-map.spec.ts +17 -0
- package/examples/routed-demo/tests/routed-demo.spec.ts +75 -0
- package/examples/routed-demo/tsconfig.json +18 -0
- package/examples/routed-demo-consumer/package.json +18 -0
- package/examples/saucedemo/.waygraph-auto/00d5336e.log +0 -0
- package/examples/saucedemo/.waygraph-auto/010dd92b.log +0 -0
- package/examples/saucedemo/.waygraph-auto/011ad671.log +0 -0
- package/examples/saucedemo/.waygraph-auto/01b45645.log +0 -0
- package/examples/saucedemo/.waygraph-auto/03764153.log +0 -0
- package/examples/saucedemo/.waygraph-auto/0593587e.log +0 -0
- package/examples/saucedemo/.waygraph-auto/06d12823.log +0 -0
- package/examples/saucedemo/.waygraph-auto/083cc5b9.log +0 -0
- package/examples/saucedemo/.waygraph-auto/0b1f5b26.json +8 -0
- package/examples/saucedemo/.waygraph-auto/0c00f25f.log +0 -0
- package/examples/saucedemo/.waygraph-auto/0e480591.log +0 -0
- package/examples/saucedemo/.waygraph-auto/104751ef.log +0 -0
- package/examples/saucedemo/.waygraph-auto/110958b8.log +0 -0
- package/examples/saucedemo/.waygraph-auto/138107c1.log +0 -0
- package/examples/saucedemo/.waygraph-auto/159d541b.log +0 -0
- package/examples/saucedemo/.waygraph-auto/16aa2c01.log +0 -0
- package/examples/saucedemo/.waygraph-auto/16c35dd5.log +0 -0
- package/examples/saucedemo/.waygraph-auto/1706547d.log +0 -0
- package/examples/saucedemo/.waygraph-auto/17537e42.log +0 -0
- package/examples/saucedemo/.waygraph-auto/175655f7.log +0 -0
- package/examples/saucedemo/.waygraph-auto/17ede493.log +0 -0
- package/examples/saucedemo/.waygraph-auto/1fe2414f.log +0 -0
- package/examples/saucedemo/.waygraph-auto/1fe2e3b8.log +0 -0
- package/examples/saucedemo/.waygraph-auto/2219f00b.log +0 -0
- package/examples/saucedemo/.waygraph-auto/23e62571.log +0 -0
- package/examples/saucedemo/.waygraph-auto/25f68ada.log +0 -0
- package/examples/saucedemo/.waygraph-auto/26ca9cd8.log +0 -0
- package/examples/saucedemo/.waygraph-auto/2bb6c4e8.log +0 -0
- package/examples/saucedemo/.waygraph-auto/2d425004.log +0 -0
- package/examples/saucedemo/.waygraph-auto/2f5b3ea6.log +0 -0
- package/examples/saucedemo/.waygraph-auto/31bb303d.log +0 -0
- package/examples/saucedemo/.waygraph-auto/31f2042f.log +0 -0
- package/examples/saucedemo/.waygraph-auto/36551ec1.log +0 -0
- package/examples/saucedemo/.waygraph-auto/36a1c274.log +0 -0
- package/examples/saucedemo/.waygraph-auto/381aa338.log +0 -0
- package/examples/saucedemo/.waygraph-auto/3882bce1.log +0 -0
- package/examples/saucedemo/.waygraph-auto/38acd1dc.log +0 -0
- package/examples/saucedemo/.waygraph-auto/3b8b77b9.log +0 -0
- package/examples/saucedemo/.waygraph-auto/4028d2a2.log +0 -0
- package/examples/saucedemo/.waygraph-auto/4168b208.log +0 -0
- package/examples/saucedemo/.waygraph-auto/42cc9113.log +0 -0
- package/examples/saucedemo/.waygraph-auto/439d30aa.log +0 -0
- package/examples/saucedemo/.waygraph-auto/43ab66ce.log +0 -0
- package/examples/saucedemo/.waygraph-auto/43f66838.log +0 -0
- package/examples/saucedemo/.waygraph-auto/442171d4.log +0 -0
- package/examples/saucedemo/.waygraph-auto/453b1ce1.log +0 -0
- package/examples/saucedemo/.waygraph-auto/457322bd.log +0 -0
- package/examples/saucedemo/.waygraph-auto/46197027.log +0 -0
- package/examples/saucedemo/.waygraph-auto/46889468.log +0 -0
- package/examples/saucedemo/.waygraph-auto/4890da1c.log +0 -0
- package/examples/saucedemo/.waygraph-auto/4893a63b.log +0 -0
- package/examples/saucedemo/.waygraph-auto/4a85f496.log +0 -0
- package/examples/saucedemo/.waygraph-auto/4af71440.log +0 -0
- package/examples/saucedemo/.waygraph-auto/4f7496d1.log +0 -0
- package/examples/saucedemo/.waygraph-auto/50e8baaa.log +0 -0
- package/examples/saucedemo/.waygraph-auto/52b3a455.log +0 -0
- package/examples/saucedemo/.waygraph-auto/532dd9b8.log +0 -0
- package/examples/saucedemo/.waygraph-auto/5391ce40.log +0 -0
- package/examples/saucedemo/.waygraph-auto/57dbddb3.log +0 -0
- package/examples/saucedemo/.waygraph-auto/5897f501.log +0 -0
- package/examples/saucedemo/.waygraph-auto/59c0b57d.log +0 -0
- package/examples/saucedemo/.waygraph-auto/5b511794.log +0 -0
- package/examples/saucedemo/.waygraph-auto/5c0eef7f.log +0 -0
- package/examples/saucedemo/.waygraph-auto/5c47910f.log +0 -0
- package/examples/saucedemo/.waygraph-auto/5d60da77.log +0 -0
- package/examples/saucedemo/.waygraph-auto/5eda8273.log +0 -0
- package/examples/saucedemo/.waygraph-auto/5fc3a33b.log +0 -0
- package/examples/saucedemo/.waygraph-auto/61b6546d.log +0 -0
- package/examples/saucedemo/.waygraph-auto/621518ad.log +0 -0
- package/examples/saucedemo/.waygraph-auto/632b7118.log +0 -0
- package/examples/saucedemo/.waygraph-auto/64314c2b.log +0 -0
- package/examples/saucedemo/.waygraph-auto/650ed066.log +0 -0
- package/examples/saucedemo/.waygraph-auto/66516213.log +0 -0
- package/examples/saucedemo/.waygraph-auto/66c17079.log +0 -0
- package/examples/saucedemo/.waygraph-auto/69bf0b80.log +0 -0
- package/examples/saucedemo/.waygraph-auto/69c2347a.log +0 -0
- package/examples/saucedemo/.waygraph-auto/6d22bdb0.log +0 -0
- package/examples/saucedemo/.waygraph-auto/6d9aaad3.log +0 -0
- package/examples/saucedemo/.waygraph-auto/7103bebb.log +0 -0
- package/examples/saucedemo/.waygraph-auto/740c9faa.log +0 -0
- package/examples/saucedemo/.waygraph-auto/74872fc5.log +0 -0
- package/examples/saucedemo/.waygraph-auto/75846ca9.log +0 -0
- package/examples/saucedemo/.waygraph-auto/7626c85b.log +0 -0
- package/examples/saucedemo/.waygraph-auto/76308eec.log +0 -0
- package/examples/saucedemo/.waygraph-auto/76c1650e.log +0 -0
- package/examples/saucedemo/.waygraph-auto/7861f38f.log +0 -0
- package/examples/saucedemo/.waygraph-auto/78b21219.log +0 -0
- package/examples/saucedemo/.waygraph-auto/7af224ed.log +0 -0
- package/examples/saucedemo/.waygraph-auto/7c3be585.log +0 -0
- package/examples/saucedemo/.waygraph-auto/7ed55a2c.log +0 -0
- package/examples/saucedemo/.waygraph-auto/80086ba2.log +0 -0
- package/examples/saucedemo/.waygraph-auto/80206369.log +0 -0
- package/examples/saucedemo/.waygraph-auto/847f1092.log +0 -0
- package/examples/saucedemo/.waygraph-auto/84d6d293.log +0 -0
- package/examples/saucedemo/.waygraph-auto/8581abfa.log +0 -0
- package/examples/saucedemo/.waygraph-auto/87b7e0fd.log +0 -0
- package/examples/saucedemo/.waygraph-auto/87c79256.log +0 -0
- package/examples/saucedemo/.waygraph-auto/88af2495.log +0 -0
- package/examples/saucedemo/.waygraph-auto/8a3eb088.log +0 -0
- package/examples/saucedemo/.waygraph-auto/8c04a403.log +0 -0
- package/examples/saucedemo/.waygraph-auto/8c9ab09e.log +0 -0
- package/examples/saucedemo/.waygraph-auto/8cc5db51.log +0 -0
- package/examples/saucedemo/.waygraph-auto/8ea3a69c.log +0 -0
- package/examples/saucedemo/.waygraph-auto/9150f913.log +0 -0
- package/examples/saucedemo/.waygraph-auto/929a4313.log +0 -0
- package/examples/saucedemo/.waygraph-auto/95a599e4.log +0 -0
- package/examples/saucedemo/.waygraph-auto/96c45350.log +0 -0
- package/examples/saucedemo/.waygraph-auto/986030e6.log +0 -0
- package/examples/saucedemo/.waygraph-auto/99787abb.log +0 -0
- package/examples/saucedemo/.waygraph-auto/99ddb62c.log +0 -0
- package/examples/saucedemo/.waygraph-auto/a2dd30dd.log +0 -0
- package/examples/saucedemo/.waygraph-auto/a63a2d20.log +0 -0
- package/examples/saucedemo/.waygraph-auto/a78befb7.log +0 -0
- package/examples/saucedemo/.waygraph-auto/a84d9b79.log +0 -0
- package/examples/saucedemo/.waygraph-auto/a87bb3ee.log +0 -0
- package/examples/saucedemo/.waygraph-auto/a9270890.log +0 -0
- package/examples/saucedemo/.waygraph-auto/aa440153.log +0 -0
- package/examples/saucedemo/.waygraph-auto/ab7561e0.log +0 -0
- package/examples/saucedemo/.waygraph-auto/ac19ae60.log +0 -0
- package/examples/saucedemo/.waygraph-auto/ae21ad8e.log +0 -0
- package/examples/saucedemo/.waygraph-auto/af09042f.log +0 -0
- package/examples/saucedemo/.waygraph-auto/b1684126.log +0 -0
- package/examples/saucedemo/.waygraph-auto/b21e9d12.log +0 -0
- package/examples/saucedemo/.waygraph-auto/b5a838be.log +0 -0
- package/examples/saucedemo/.waygraph-auto/b603549d.log +0 -0
- package/examples/saucedemo/.waygraph-auto/b81e074f.log +0 -0
- package/examples/saucedemo/.waygraph-auto/b83e6259.log +0 -0
- package/examples/saucedemo/.waygraph-auto/b9cb2796.log +0 -0
- package/examples/saucedemo/.waygraph-auto/ba58abb7.log +0 -0
- package/examples/saucedemo/.waygraph-auto/bb0a0018.log +0 -0
- package/examples/saucedemo/.waygraph-auto/bb9fd384.log +0 -0
- package/examples/saucedemo/.waygraph-auto/bc0bdd0e.log +0 -0
- package/examples/saucedemo/.waygraph-auto/bc7d4a83.log +0 -0
- package/examples/saucedemo/.waygraph-auto/bd8e082a.log +0 -0
- package/examples/saucedemo/.waygraph-auto/bea0c93e.log +0 -0
- package/examples/saucedemo/.waygraph-auto/bf35201a.log +0 -0
- package/examples/saucedemo/.waygraph-auto/bffa3a7a.log +0 -0
- package/examples/saucedemo/.waygraph-auto/c02ea583.log +0 -0
- package/examples/saucedemo/.waygraph-auto/c2caf0a8.log +0 -0
- package/examples/saucedemo/.waygraph-auto/c3bdc714.log +0 -0
- package/examples/saucedemo/.waygraph-auto/c4afb8bc.log +0 -0
- package/examples/saucedemo/.waygraph-auto/c916a654.log +0 -0
- package/examples/saucedemo/.waygraph-auto/c9b8d69e.log +0 -0
- package/examples/saucedemo/.waygraph-auto/cd68bbc4.log +0 -0
- package/examples/saucedemo/.waygraph-auto/cdc6db50.log +0 -0
- package/examples/saucedemo/.waygraph-auto/d01906a7.log +0 -0
- package/examples/saucedemo/.waygraph-auto/d02e5e7e.log +0 -0
- package/examples/saucedemo/.waygraph-auto/d09aff71.log +0 -0
- package/examples/saucedemo/.waygraph-auto/d0e41396.log +0 -0
- package/examples/saucedemo/.waygraph-auto/d1370d76.log +0 -0
- package/examples/saucedemo/.waygraph-auto/d3714ae4.log +0 -0
- package/examples/saucedemo/.waygraph-auto/d9e5f8a4.log +0 -0
- package/examples/saucedemo/.waygraph-auto/da0685dc.log +0 -0
- package/examples/saucedemo/.waygraph-auto/da894ad8.log +0 -0
- package/examples/saucedemo/.waygraph-auto/daa2f922.log +0 -0
- package/examples/saucedemo/.waygraph-auto/daefb614.log +0 -0
- package/examples/saucedemo/.waygraph-auto/db97e833.log +0 -0
- package/examples/saucedemo/.waygraph-auto/dec3076e.log +0 -0
- package/examples/saucedemo/.waygraph-auto/e101d19a.log +0 -0
- package/examples/saucedemo/.waygraph-auto/e1973991.log +0 -0
- package/examples/saucedemo/.waygraph-auto/e207c989.log +0 -0
- package/examples/saucedemo/.waygraph-auto/e633e545.log +0 -0
- package/examples/saucedemo/.waygraph-auto/e69aec68.log +0 -0
- package/examples/saucedemo/.waygraph-auto/e70e2d06.log +0 -0
- package/examples/saucedemo/.waygraph-auto/e8306a4b.log +0 -0
- package/examples/saucedemo/.waygraph-auto/ebad3410.log +0 -0
- package/examples/saucedemo/.waygraph-auto/ec88b3ef.log +0 -0
- package/examples/saucedemo/.waygraph-auto/ecbb0966.log +0 -0
- package/examples/saucedemo/.waygraph-auto/ecdee753.log +0 -0
- package/examples/saucedemo/.waygraph-auto/ed888783.log +0 -0
- package/examples/saucedemo/.waygraph-auto/ed931dac.log +0 -0
- package/examples/saucedemo/.waygraph-auto/ef655a3f.log +0 -0
- package/examples/saucedemo/.waygraph-auto/f34c9a26.log +0 -0
- package/examples/saucedemo/.waygraph-auto/f3c29b21.log +0 -0
- package/examples/saucedemo/.waygraph-auto/f53f7cfc.log +0 -0
- package/examples/saucedemo/.waygraph-auto/f5525d53.log +0 -0
- package/examples/saucedemo/.waygraph-auto/f5ad5830.log +0 -0
- package/examples/saucedemo/.waygraph-auto/f90035b3.log +0 -0
- package/examples/saucedemo/.waygraph-auto/fa687bc2.log +0 -0
- package/examples/saucedemo/.waygraph-auto/faed36dd.log +0 -0
- package/examples/saucedemo/.waygraph-auto/fb66fba0.log +0 -0
- package/examples/saucedemo/.waygraph-auto/fc48fd76.log +0 -0
- package/examples/saucedemo/docs/CONVENTION.md +25 -5
- package/examples/saucedemo/docs/HELPERS.md +15 -4
- package/examples/saucedemo/scripts/capture-wrong-login.mjs +8 -2
- package/examples/saucedemo/scripts/prove-wrong-login-runtime.mjs +8 -2
- package/examples/saucedemo/src/blocks/SITE-MAP.md +14 -3
- package/examples/saucedemo/src/blocks/saucedemo-web/NAV.md +15 -1
- package/examples/saucedemo/src/blocks/saucedemo-web/cart/NAV.md +1 -0
- package/examples/saucedemo/src/blocks/saucedemo-web/cart/cart.sel.ts +9 -0
- package/examples/saucedemo/src/blocks/saucedemo-web/cart/nav-cart.block.ts +3 -2
- package/examples/saucedemo/src/blocks/saucedemo-web/cart/nav-checkout-info.block.ts +2 -1
- package/examples/saucedemo/src/blocks/saucedemo-web/checkout-step-one/NAV.md +6 -1
- package/examples/saucedemo/src/blocks/saucedemo-web/checkout-step-one/methods/checkout-info.sel.ts +11 -0
- package/examples/saucedemo/src/blocks/saucedemo-web/checkout-step-one/methods/fill-first-name.method.block.ts +22 -0
- package/examples/saucedemo/src/blocks/saucedemo-web/checkout-step-one/methods/fill-last-name.method.block.ts +21 -0
- package/examples/saucedemo/src/blocks/saucedemo-web/checkout-step-one/methods/fill-postal-code.method.block.ts +21 -0
- package/examples/saucedemo/src/blocks/saucedemo-web/checkout-step-one/methods/submit-checkout-info.method.block.ts +6 -7
- package/examples/saucedemo/src/blocks/saucedemo-web/checkout-step-two/NAV.md +2 -0
- package/examples/saucedemo/src/blocks/saucedemo-web/checkout-step-two/methods/checkout-overview.sel.ts +9 -0
- package/examples/saucedemo/src/blocks/saucedemo-web/checkout-step-two/methods/finish-order.method.block.ts +7 -6
- package/examples/saucedemo/src/blocks/saucedemo-web/ff-owner-auth.block.ts +7 -2
- package/examples/saucedemo/src/blocks/saucedemo-web/inventory-item/NAV.md +1 -0
- package/examples/saucedemo/src/blocks/saucedemo-web/inventory-item/item-detail.sel.ts +9 -0
- package/examples/saucedemo/src/blocks/saucedemo-web/inventory-item/nav-back-to-inventory.block.ts +2 -1
- package/examples/saucedemo/src/blocks/saucedemo-web/inventory-item/nav-back-to-products.block.ts +2 -1
- package/examples/saucedemo/src/blocks/saucedemo-web/inventory-item/nav-continue-shopping.block.ts +2 -1
- package/examples/saucedemo/src/blocks/saucedemo-web/methods/fill-password.method.block.ts +51 -0
- package/examples/saucedemo/src/blocks/saucedemo-web/methods/fill-username.method.block.ts +69 -0
- package/examples/saucedemo/src/blocks/saucedemo-web/methods/login.sel.ts +13 -0
- package/examples/saucedemo/src/blocks/saucedemo-web/methods/submit-login-for-flow.ts +4 -4
- package/examples/saucedemo/src/blocks/saucedemo-web/methods/submit-login.method.block.ts +13 -51
- package/examples/saucedemo/src/blocks/saucedemo-web/methods/submit-logout.method.block.ts +4 -3
- package/examples/saucedemo/src/blocks/saucedemo-web/nav-login.block.ts +14 -6
- package/examples/saucedemo/src/flows/checkout-then-browse-again.flow.ts +15 -0
- package/examples/saucedemo/src/flows/checkout.flow.ts +20 -2
- package/examples/saucedemo/src/flows/device-showcase.flow.ts +4 -0
- package/examples/saucedemo/src/flows/login.flow.ts +3 -1
- package/examples/saucedemo/src/flows/shop.flow.ts +6 -0
- package/examples/saucedemo/src/flows/smoke.flow.ts +13 -7
- package/examples/saucedemo/src/flows/stub-on-error.flow.ts +4 -2
- package/examples/saucedemo/src/flows/viewer-blocked.flow.ts +6 -2
- package/examples/saucedemo/tests/flow-block-verify.spec.ts +3 -3
- package/examples/saucedemo/tests/submit-login-branch.spec.ts +5 -3
- package/package.json +2 -1
- package/templates/agents/waygraph-author.agent.md +43 -5
- package/templates/agents/waygraph-planner.agent.md +33 -2
- package/templates/quickstart/src/blocks/saucedemo-web/NAV.md +15 -1
- package/templates/quickstart/src/blocks/saucedemo-web/cart/NAV.md +1 -0
- package/templates/quickstart/src/blocks/saucedemo-web/cart/cart.sel.ts +9 -0
- package/templates/quickstart/src/blocks/saucedemo-web/cart/nav-cart.block.ts +19 -15
- package/templates/quickstart/src/blocks/saucedemo-web/cart/nav-checkout-info.block.ts +2 -1
- package/templates/quickstart/src/blocks/saucedemo-web/checkout-step-one/NAV.md +6 -1
- package/templates/quickstart/src/blocks/saucedemo-web/checkout-step-one/methods/checkout-info.sel.ts +11 -0
- package/templates/quickstart/src/blocks/saucedemo-web/checkout-step-one/methods/fill-first-name.method.block.ts +22 -0
- package/templates/quickstart/src/blocks/saucedemo-web/checkout-step-one/methods/fill-last-name.method.block.ts +21 -0
- package/templates/quickstart/src/blocks/saucedemo-web/checkout-step-one/methods/fill-postal-code.method.block.ts +21 -0
- package/templates/quickstart/src/blocks/saucedemo-web/checkout-step-one/methods/submit-checkout-info.method.block.ts +6 -7
- package/templates/quickstart/src/blocks/saucedemo-web/checkout-step-two/NAV.md +2 -0
- package/templates/quickstart/src/blocks/saucedemo-web/checkout-step-two/methods/checkout-overview.sel.ts +9 -0
- package/templates/quickstart/src/blocks/saucedemo-web/checkout-step-two/methods/finish-order.method.block.ts +7 -6
- package/templates/quickstart/src/blocks/saucedemo-web/ff-owner-auth.block.ts +7 -2
- package/templates/quickstart/src/blocks/saucedemo-web/inventory/methods/add-to-cart.effect.block.ts +24 -16
- package/templates/quickstart/src/blocks/saucedemo-web/inventory/nav-item-detail.block.ts +3 -3
- package/templates/quickstart/src/blocks/saucedemo-web/inventory-item/NAV.md +1 -0
- package/templates/quickstart/src/blocks/saucedemo-web/inventory-item/item-detail.sel.ts +9 -0
- package/templates/quickstart/src/blocks/saucedemo-web/inventory-item/nav-back-to-inventory.block.ts +2 -1
- package/templates/quickstart/src/blocks/saucedemo-web/inventory-item/nav-back-to-products.block.ts +2 -1
- package/templates/quickstart/src/blocks/saucedemo-web/inventory-item/nav-continue-shopping.block.ts +2 -1
- package/templates/quickstart/src/blocks/saucedemo-web/methods/fill-password.method.block.ts +51 -0
- package/templates/quickstart/src/blocks/saucedemo-web/methods/fill-username.method.block.ts +69 -0
- package/templates/quickstart/src/blocks/saucedemo-web/methods/login.sel.ts +13 -0
- package/templates/quickstart/src/blocks/saucedemo-web/methods/submit-login-for-flow.ts +4 -4
- package/templates/quickstart/src/blocks/saucedemo-web/methods/submit-login.method.block.ts +35 -63
- package/templates/quickstart/src/blocks/saucedemo-web/methods/submit-logout.method.block.ts +4 -3
- package/templates/quickstart/src/blocks/saucedemo-web/nav-login.block.ts +14 -6
- package/templates/quickstart/src/flows/checkout-then-browse-again.flow.ts +15 -0
- package/templates/quickstart/src/flows/checkout.flow.ts +29 -2
- package/templates/quickstart/src/flows/device-showcase.flow.ts +4 -0
- package/templates/quickstart/src/flows/login.flow.ts +3 -1
- package/templates/quickstart/src/flows/shop.flow.ts +6 -0
- package/templates/quickstart/src/flows/smoke.flow.ts +13 -7
- package/templates/quickstart/src/flows/viewer-blocked.flow.ts +6 -2
- package/templates/quickstart/tests/chain-flow.spec.ts +8 -1
- package/templates/scaffold/STRUCTURE.md +23 -3
- package/templates/scaffold/scripts/fixture-server.mjs +11 -2
- package/templates/scaffold/src/flows/example.flow.ts +8 -6
- package/templates/scaffold/src/flows/mail-verify.flow.ts +85 -0
- package/templates/scaffold/src/flows/shop.flow.ts +23 -6
- package/templates/scaffold/src/map/(app_base)/docs/_nav.block.ts +20 -0
- package/templates/scaffold/src/map/(app_base)/docs/_page.block.ts +15 -0
- package/templates/scaffold/src/map/(app_base)/docs/_sel.ts +7 -0
- package/templates/scaffold/src/map/(app_base)/docs/docs.html +8 -0
- package/templates/scaffold/src/{blocks/demo-web/methods → map/(app_base)/home/_methods}/add-item.effect.block.ts +3 -3
- package/templates/scaffold/src/map/(app_base)/home/_methods/assert-hello.method.block.ts +46 -0
- package/templates/scaffold/src/map/(app_base)/home/_methods/assert-item-added.method.block.ts +38 -0
- package/templates/scaffold/src/{blocks/demo-web/methods → map/(app_base)/home/_methods}/clear-cart.method.block.ts +9 -3
- package/templates/scaffold/src/{blocks/demo-web/methods → map/(app_base)/home/_methods}/remove-item.effect.block.ts +3 -3
- package/templates/scaffold/src/{blocks/demo-web/nav-home.block.ts → map/(app_base)/home/_nav.block.ts} +2 -2
- package/templates/scaffold/src/{blocks/demo-web/home.page.block.ts → map/(app_base)/home/_page.block.ts} +7 -7
- package/templates/scaffold/src/{blocks/demo-web/demo-sel.ts → map/(app_base)/home/_sel.ts} +1 -0
- package/templates/scaffold/src/{blocks/demo-web → map/(app_base)/home}/home.html +4 -0
- package/templates/scaffold/src/map/(app_base)/home/nav-verification-link.block.ts +34 -0
- package/templates/scaffold/src/map/(external)/mailpit/_methods/assert-email-content.method.block.ts +48 -0
- package/templates/scaffold/src/map/(external)/mailpit/_methods/assert-email-received.method.block.ts +49 -0
- package/templates/scaffold/src/map/(external)/mailpit/_methods/extract-email-link.method.block.ts +41 -0
- package/templates/scaffold/src/map/(external)/mailpit/_methods/open-message.method.block.ts +39 -0
- package/templates/scaffold/src/map/(external)/mailpit/_nav.block.ts +20 -0
- package/templates/scaffold/src/map/(external)/mailpit/_page.block.ts +30 -0
- package/templates/scaffold/src/map/(external)/mailpit/_sel.ts +5 -0
- package/templates/scaffold/src/states/demo.mem-keys.ts +25 -1
- package/templates/scaffold/src/states/demo.states.ts +11 -0
- package/templates/scaffold/test-results/.last-run.json +4 -0
- package/templates/scaffold/tests/example.spec.ts +2 -2
- package/templates/scaffold/tests/mail-verify.spec.ts +191 -0
- package/templates/skills/waygraph-blind-pilot.skill.md +61 -0
- package/templates/skills/waygraph-pilot.skill.md +108 -0
- package/templates/quickstart/README-saucedemo-commands.md +0 -72
- package/templates/scaffold/src/blocks/SITE-MAP.md +0 -12
- package/templates/scaffold/src/blocks/demo-web/NAV.md +0 -29
- package/templates/scaffold/src/blocks/demo-web/methods/assert-hello.method.block.ts +0 -50
package/dist/cli.js
CHANGED
|
@@ -18,7 +18,10 @@ import { tmpdir } from "node:os";
|
|
|
18
18
|
import { fileURLToPath } from "node:url";
|
|
19
19
|
import { spawn } from "node:child_process";
|
|
20
20
|
import { discoverGraph, toMermaid, findOrphanBlocks, findBlockPath } from "./graph.js";
|
|
21
|
+
import { checkMap } from "./map-check.js";
|
|
21
22
|
import { runAutoExplore } from "./auto-explore-run.js";
|
|
23
|
+
import { pilotStart } from "./pilot.js";
|
|
24
|
+
import { spawnDetachedSession, requestSession, runAttachLoop, runAutoServeCommand, } from "./auto-session-ipc.js";
|
|
22
25
|
import { runAgentDive } from "./agent-dive.js";
|
|
23
26
|
import { runTraverse } from "./traverse-run.js";
|
|
24
27
|
import { parseMinEdgeCoverage } from "./traverse-coverage.js";
|
|
@@ -232,6 +235,7 @@ import {
|
|
|
232
235
|
completeSequentialTodoDock,
|
|
233
236
|
applyDevicePhase,
|
|
234
237
|
resolveDeviceState,
|
|
238
|
+
WAYGRAPH_RING_CSS,
|
|
235
239
|
} from "waygraph";
|
|
236
240
|
|
|
237
241
|
function walkDir(dir, pattern) {
|
|
@@ -416,45 +420,10 @@ function seedMemForFlow(mem, flowBlocks, json, label) {
|
|
|
416
420
|
// Purely CLI-level orchestration - no engine changes, no change to the
|
|
417
421
|
// non-STEP path above.
|
|
418
422
|
const RING_CSS =
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
//
|
|
422
|
-
|
|
423
|
-
// color transitions read as a muddy gray/purple/yellow morph on ring 2+.
|
|
424
|
-
"box-shadow:0 0 0 4px rgba(124,58,237,.16);transition:opacity .3s ease;}" +
|
|
425
|
-
// Planned (stubs / fixtures / YAP / instruction.highlights) = purple.
|
|
426
|
-
// Automation (verify fallback, unmatched fill/click) = gray - operators
|
|
427
|
-
// can ignore engine checks and watch purple + semantic tones.
|
|
428
|
-
"#wg-ring[data-tone=planned]{border-color:#7C3AED;box-shadow:0 0 0 4px rgba(124,58,237,.16);}" +
|
|
429
|
-
"#wg-ring[data-tone=auto]{border-color:#9CA3AF;box-shadow:0 0 0 4px rgba(156,163,175,.28);}" +
|
|
430
|
-
"#wg-ring[data-tone=info]{border-color:#3B82F6;box-shadow:0 0 0 4px rgba(59,130,246,.22);}" +
|
|
431
|
-
"#wg-ring[data-tone=warning]{border-color:#EAB308;box-shadow:0 0 0 4px rgba(234,179,8,.22);}" +
|
|
432
|
-
"#wg-ring[data-tone=danger]{border-color:#EF4444;box-shadow:0 0 0 4px rgba(239,68,68,.22);}" +
|
|
433
|
-
"#wg-ring[data-tone=success]{border-color:#22C55E;box-shadow:0 0 0 4px rgba(34,197,94,.22);}" +
|
|
434
|
-
// A real element, not a ::after pseudo-element - a pseudo-element's
|
|
435
|
-
// position is CSS-relative to the ring's own box (left:0 always meant
|
|
436
|
-
// "the ring's own left edge"), so it had no way to be clamped back onto
|
|
437
|
-
// screen when that box sat near a viewport edge - the label's text just
|
|
438
|
-
// ran off, invisibly, with no overflow guard at all. A real sibling can
|
|
439
|
-
// be measured (its actual rendered width) and repositioned in JS -
|
|
440
|
-
// pushed back onto screen, same width, never shrunk. See
|
|
441
|
-
// window.__wgPositionRing in installOverlay.
|
|
442
|
-
"#wg-ring-label{position:fixed;z-index:2147483646;pointer-events:none;opacity:0;" +
|
|
443
|
-
"max-width:min(360px,70vw);white-space:normal;padding:6px 10px;border-radius:7px;background:#7C3AED;color:#fff;" +
|
|
444
|
-
"font:600 12px/1.35 system-ui,sans-serif;transition:opacity .3s ease;}" +
|
|
445
|
-
"#wg-ring-label[data-tone=planned]{background:#7C3AED;color:#fff;}" +
|
|
446
|
-
"#wg-ring-label[data-tone=auto]{background:#6B7280;color:#fff;}" +
|
|
447
|
-
"#wg-ring-label[data-tone=info]{background:#2563EB;color:#fff;}" +
|
|
448
|
-
"#wg-ring-label[data-tone=warning]{background:#EAB308;color:#1c1917;}" +
|
|
449
|
-
"#wg-ring-label[data-tone=danger]{background:#DC2626;color:#fff;}" +
|
|
450
|
-
"#wg-ring-label[data-tone=success]{background:#16A34A;color:#fff;}" +
|
|
451
|
-
// size: ring pad + label font; weight: label boldness
|
|
452
|
-
"#wg-ring[data-size=sm]{border-width:1.5px;border-radius:8px;}" +
|
|
453
|
-
"#wg-ring[data-size=lg]{border-width:4px;border-radius:12px;}" +
|
|
454
|
-
"#wg-ring-label[data-size=sm]{font-size:10px;line-height:1.25;padding:4px 7px;border-radius:5px;}" +
|
|
455
|
-
"#wg-ring-label[data-size=lg]{font-size:16px;line-height:1.35;padding:8px 14px;border-radius:9px;max-width:min(480px,85vw);}" +
|
|
456
|
-
"#wg-ring-label[data-weight=bold]{font-weight:800;}" +
|
|
457
|
-
"#wg-ring-label[data-weight=normal]{font-weight:600;}" +
|
|
423
|
+
// Shared with pilot-overlay.ts's showPilotVision - same ring/label CSS,
|
|
424
|
+
// one source of truth (highlights.ts), so a Blind Pilot vision ring and a
|
|
425
|
+
// demo stepper ring never visually drift apart.
|
|
426
|
+
WAYGRAPH_RING_CSS +
|
|
458
427
|
// Mouse cursor icon that travels to a target before it's acted on, plus a
|
|
459
428
|
// quick expanding ripple at the moment of a click - same idea as
|
|
460
429
|
// help-center-clip-engine's #clip-cursor/#clip-ring (video-pipeline). The
|
|
@@ -6343,7 +6312,7 @@ async function validateFlows(projectDir) {
|
|
|
6343
6312
|
// instant a regular Block's act() calls a navigation method; this command
|
|
6344
6313
|
// sweeps a whole project in one shot for contexts with no editor watching
|
|
6345
6314
|
// (CI, an autonomous agent writing Block files without a language server).
|
|
6346
|
-
// See openspec/
|
|
6315
|
+
// See openspec/specs/nav-block-and-check/spec.md for the full rationale.
|
|
6347
6316
|
// ---------------------------------------------------------------------------
|
|
6348
6317
|
function discoverBlocks(projectDir) {
|
|
6349
6318
|
return walkDir(projectDir, /\.block\.ts$/);
|
|
@@ -6362,6 +6331,19 @@ function isNavBlockMarked(val) {
|
|
|
6362
6331
|
return val.__waygraphKind === "nav";
|
|
6363
6332
|
}
|
|
6364
6333
|
const NAV_METHOD_CALLS = ["page.goto(", "page.reload(", "page.goBack(", "page.goForward("];
|
|
6334
|
+
/**
|
|
6335
|
+
* Matches a selector-taking Trait factory call whose first argument is a
|
|
6336
|
+
* literal string/template, not an identifier or property access - the exact
|
|
6337
|
+
* shape found repeatedly in hand-written assertion Blocks
|
|
6338
|
+
* (`Trait.visible("#some-id")` instead of `Trait.visible(SomeSel.thing)`).
|
|
6339
|
+
* `Trait.url(...)` is deliberately excluded - it takes a URLPatternInit, never
|
|
6340
|
+
* a DOM selector. Same file-scoped-regex bluntness the nav-escape sweep above
|
|
6341
|
+
* already accepts (see openspec/specs/nav-block-and-check/spec.md) - a known
|
|
6342
|
+
* blind spot on string concatenation/template-built selectors, not solved
|
|
6343
|
+
* here for the same "recipe before promotion" reason that check accepts its
|
|
6344
|
+
* own shared-helper blind spot.
|
|
6345
|
+
*/
|
|
6346
|
+
const INLINE_SELECTOR_CALL = /\b(?:Trait\.visible|Trait\.text|textEquals|visible)\(\s*["'`]/;
|
|
6365
6347
|
/**
|
|
6366
6348
|
* Walks every `*.block.ts` file under `projectDir`, imports each to find its
|
|
6367
6349
|
* exported Blocks, and for any Block NOT built via `defineNavBlock`, scans
|
|
@@ -6457,7 +6439,8 @@ function initCommand(projectName) {
|
|
|
6457
6439
|
}
|
|
6458
6440
|
async function checkCommand(projectDir) {
|
|
6459
6441
|
const files = discoverBlocks(projectDir);
|
|
6460
|
-
const
|
|
6442
|
+
const navWarnings = [];
|
|
6443
|
+
const selWarnings = [];
|
|
6461
6444
|
for (const file of files) {
|
|
6462
6445
|
let mod;
|
|
6463
6446
|
try {
|
|
@@ -6470,15 +6453,21 @@ async function checkCommand(projectDir) {
|
|
|
6470
6453
|
for (const [exportName, exported] of Object.entries(mod)) {
|
|
6471
6454
|
if (!isBlockLike(exported))
|
|
6472
6455
|
continue;
|
|
6473
|
-
if (isNavBlockMarked(exported))
|
|
6474
|
-
continue;
|
|
6475
6456
|
src ??= readFileSync(file, "utf-8");
|
|
6476
|
-
|
|
6477
|
-
|
|
6457
|
+
// Nav-escape: NavBlocks are exempt (their generated act() is the one
|
|
6458
|
+
// legitimate goto/click call site).
|
|
6459
|
+
if (!isNavBlockMarked(exported) &&
|
|
6460
|
+
NAV_METHOD_CALLS.some((needle) => src.includes(needle))) {
|
|
6461
|
+
navWarnings.push({ file, blockName: exported.name, exportName });
|
|
6462
|
+
}
|
|
6463
|
+
// Inline selector: applies to every Block kind, including NavBlocks -
|
|
6464
|
+
// a Nav's own `verify` array is just as likely to inline a selector.
|
|
6465
|
+
if (INLINE_SELECTOR_CALL.test(src)) {
|
|
6466
|
+
selWarnings.push({ file, blockName: exported.name, exportName });
|
|
6478
6467
|
}
|
|
6479
6468
|
}
|
|
6480
6469
|
}
|
|
6481
|
-
return
|
|
6470
|
+
return { navWarnings, selWarnings };
|
|
6482
6471
|
}
|
|
6483
6472
|
function takeFlagValue(argv, i, a, flag) {
|
|
6484
6473
|
if (a.startsWith(flag + "=")) {
|
|
@@ -6560,6 +6549,9 @@ function parseRunFlags(argv) {
|
|
|
6560
6549
|
else if (a === "--cli") {
|
|
6561
6550
|
out.cli = true;
|
|
6562
6551
|
}
|
|
6552
|
+
else if (a === "--detach") {
|
|
6553
|
+
out.detach = true;
|
|
6554
|
+
}
|
|
6563
6555
|
else if (a === "--headed") {
|
|
6564
6556
|
out.headed = true;
|
|
6565
6557
|
}
|
|
@@ -6881,9 +6873,81 @@ function usage() {
|
|
|
6881
6873
|
Primary (less is more):
|
|
6882
6874
|
waygraph auto [project|.flow.ts] Interactive explore (picker)
|
|
6883
6875
|
--cli Terminal menu instead of browser panel
|
|
6876
|
+
--cli --detach Run the --cli session as a background socket
|
|
6877
|
+
server; prints {sessionId, socketPath} and exits
|
|
6884
6878
|
--blocks <From> <To> Graph path-find From->To, then run
|
|
6885
6879
|
--data '{...}' Mem seed (same as demo/run)
|
|
6886
6880
|
(pass a .flow.ts to run that flow - same as run)
|
|
6881
|
+
--cli --detach --non-headless Detached session with a real visible browser
|
|
6882
|
+
(same --non-headless flag run/demo already use)
|
|
6883
|
+
waygraph auto send <sessionId> "<pick>" Send one pick to a --detach session, print
|
|
6884
|
+
the resulting state as JSON (no TTY needed)
|
|
6885
|
+
--timeout <ms> Override the 15s default wait for this one call -
|
|
6886
|
+
a single Block can legitimately run a slow real
|
|
6887
|
+
interaction (e.g. a multi-step mouse drag)
|
|
6888
|
+
waygraph auto status <sessionId> Read a --detach session's state (no side effects)
|
|
6889
|
+
waygraph auto attach <sessionId> Reopen an interactive terminal against a
|
|
6890
|
+
running --detach session
|
|
6891
|
+
waygraph auto dom <sessionId> Read the live page's structure (no side effects)
|
|
6892
|
+
--mode aria|full Default aria (Playwright ariaSnapshotJSON, AI mode);
|
|
6893
|
+
full = bounded raw DOM walk (tag/attrs/text/children)
|
|
6894
|
+
--selector <sel> Scope either mode to one element's subtree
|
|
6895
|
+
--depth N Limit snapshot depth (aria: native; full: caller cap)
|
|
6896
|
+
waygraph auto trace <sessionId> Read the session's Checkpoint/Block-level history
|
|
6897
|
+
(no side effects; not raw click/fill recording)
|
|
6898
|
+
waygraph auto console <sessionId> Read the real browser console/pageerror messages and
|
|
6899
|
+
failed (4xx/5xx) network responses seen so far - for
|
|
6900
|
+
diagnosing a silent failure (e.g. a form submit that
|
|
6901
|
+
does nothing observable in the DOM) that inspectDom
|
|
6902
|
+
alone can't explain, since it only reads what actually
|
|
6903
|
+
rendered, not what the page/network actually said
|
|
6904
|
+
waygraph auto storage <sessionId> Read localStorage/sessionStorage plus registered
|
|
6905
|
+
service workers (scope/active URL/state) - client-
|
|
6906
|
+
side state (push-subscription/auth tokens etc.) that
|
|
6907
|
+
never appears in the rendered DOM inspectDom reads
|
|
6908
|
+
waygraph auto click <sessionId> <sel> Click a real element - works even with zero Blocks
|
|
6909
|
+
(Blind Pilot: act before any Block covers this)
|
|
6910
|
+
waygraph auto type <sessionId> <sel> <text> Fill a real input the same way
|
|
6911
|
+
waygraph auto goto <sessionId> <url> Navigate the real live page
|
|
6912
|
+
waygraph auto press <sessionId> <sel> <key>
|
|
6913
|
+
Presses a real key (Playwright name, e.g. Enter,
|
|
6914
|
+
Escape, Tab) on a real focused element - many real
|
|
6915
|
+
inline-edit inputs (no visible Save button until you
|
|
6916
|
+
type) commit on Enter, not blur/click-elsewhere
|
|
6917
|
+
waygraph auto upload <sessionId> <sel> <image|pdf|video|path>
|
|
6918
|
+
Fill a real <input type="file"> - a built-in stub
|
|
6919
|
+
(small, real, valid: assets/stubs/stub.png|pdf|mp4)
|
|
6920
|
+
or a caller-supplied file path
|
|
6921
|
+
(click/type/goto/upload each re-detect the session's Checkpoint afterward,
|
|
6922
|
+
same detection send/status already use)
|
|
6923
|
+
waygraph auto reload <sessionId> Re-discover the project's Block library/graph
|
|
6924
|
+
from disk without restarting the session - picks
|
|
6925
|
+
up a Block written to disk mid-session
|
|
6926
|
+
waygraph auto reach <sessionId> <Checkpoint> Path-find from here to Checkpoint and run
|
|
6927
|
+
the whole route in one call - not one auto send
|
|
6928
|
+
per step. Same findBlockPath BFS auto --blocks
|
|
6929
|
+
<From> <To> already uses, against this session's
|
|
6930
|
+
own live graph/position. Fails loud (not a guess)
|
|
6931
|
+
if a step has several live options on the page
|
|
6932
|
+
(an instanceOptions Block) - use send for that step
|
|
6933
|
+
waygraph auto resync <sessionId> Force here to be re-detected from the real live
|
|
6934
|
+
page right now, discarding whatever was cached -
|
|
6935
|
+
fixes a session's tracked position going stale
|
|
6936
|
+
after anything OUTSIDE this session changed the
|
|
6937
|
+
page (e.g. a human clicking around in a visible
|
|
6938
|
+
--non-headless session someone is co-driving);
|
|
6939
|
+
send/reach never do this on their own, since they
|
|
6940
|
+
only re-detect when the position is already unknown
|
|
6941
|
+
waygraph pilot start Bootstrap for an agent: starts a --detach session
|
|
6942
|
+
(same as auto --cli --detach) AND reads back the
|
|
6943
|
+
whole project's Block graph (same as waygraph
|
|
6944
|
+
graph) in one call - {sessionId, socketPath,
|
|
6945
|
+
headless, graph, snapshot}. Drive it afterward with
|
|
6946
|
+
auto send/status/dom/trace <sessionId> - pilot start
|
|
6947
|
+
does not resolve, narrate, or act on anything itself;
|
|
6948
|
+
planning a multi-step request is the agent's job.
|
|
6949
|
+
--non-headless Real visible browser (same flag as auto/demo/run)
|
|
6950
|
+
--base-url / --data Same as auto/demo/run
|
|
6887
6951
|
waygraph demo [--blocks <flow|file|spec>] Watch with step overlay (QA path)
|
|
6888
6952
|
--data '{...}' Mem seed JSON (or inline flow({...}))
|
|
6889
6953
|
--auto-next Auto-advance steps (alias: --autoplay)
|
|
@@ -6908,6 +6972,12 @@ Primary (less is more):
|
|
|
6908
6972
|
|
|
6909
6973
|
Also:
|
|
6910
6974
|
waygraph list | nav | validate | check | graph | init <name>
|
|
6975
|
+
waygraph map [project] Waygraph Map convention enforcement: every static
|
|
6976
|
+
Nav/Page url must verbatim-match its src/map/ folder
|
|
6977
|
+
path ((group) segments excluded) - exits 1 on a
|
|
6978
|
+
violation, unlike check's warnings-only stance. A
|
|
6979
|
+
no-op (exit 0, informational) if the project has no
|
|
6980
|
+
src/map/ directory at all.
|
|
6911
6981
|
waygraph traverse [project] Graph crawl (Phase B-E)
|
|
6912
6982
|
--blocks <glob|/re/|sub> Phase C: filter *.block.ts discovery
|
|
6913
6983
|
--parallel N Phase D: N clone workers (max 4)
|
|
@@ -7311,6 +7381,233 @@ Agents shipped: waygraph-planner, waygraph-author, waygraph-healer.
|
|
|
7311
7381
|
}
|
|
7312
7382
|
case "graph":
|
|
7313
7383
|
case "auto": {
|
|
7384
|
+
// auto send|status|attach <sessionId> - session control against a
|
|
7385
|
+
// --detach'd background session. Intercepted before the normal
|
|
7386
|
+
// project-directory resolution below, same pattern `try demo|auto|
|
|
7387
|
+
// auto:cli` already uses for a sub-verb positional.
|
|
7388
|
+
if (command === "auto" &&
|
|
7389
|
+
(args[1] === "send" ||
|
|
7390
|
+
args[1] === "status" ||
|
|
7391
|
+
args[1] === "attach" ||
|
|
7392
|
+
args[1] === "dom" ||
|
|
7393
|
+
args[1] === "trace" ||
|
|
7394
|
+
args[1] === "console" ||
|
|
7395
|
+
args[1] === "storage" ||
|
|
7396
|
+
args[1] === "upload" ||
|
|
7397
|
+
args[1] === "click" ||
|
|
7398
|
+
args[1] === "type" ||
|
|
7399
|
+
args[1] === "press" ||
|
|
7400
|
+
args[1] === "goto" ||
|
|
7401
|
+
args[1] === "reload" ||
|
|
7402
|
+
args[1] === "reach" ||
|
|
7403
|
+
args[1] === "resync")) {
|
|
7404
|
+
const sub = args[1];
|
|
7405
|
+
const sessionId = args[2];
|
|
7406
|
+
if (!sessionId) {
|
|
7407
|
+
console.error(`waygraph auto ${sub}: missing <sessionId>`);
|
|
7408
|
+
process.exit(1);
|
|
7409
|
+
}
|
|
7410
|
+
const proj = resolve(process.cwd());
|
|
7411
|
+
if (sub === "attach") {
|
|
7412
|
+
await runAttachLoop(proj, sessionId);
|
|
7413
|
+
break;
|
|
7414
|
+
}
|
|
7415
|
+
if (sub === "send") {
|
|
7416
|
+
const pick = args[3];
|
|
7417
|
+
if (pick === undefined) {
|
|
7418
|
+
console.error('waygraph auto send: usage: waygraph auto send <sessionId> "<pick>" [--timeout <ms>]');
|
|
7419
|
+
process.exit(1);
|
|
7420
|
+
}
|
|
7421
|
+
// Real, direct need found live: a single Block can legitimately
|
|
7422
|
+
// run a genuinely slow real interaction (e.g. a multi-step mouse
|
|
7423
|
+
// drag) that exceeds the 15s default - same reasoning `auto
|
|
7424
|
+
// reach` already gets a 90s default for (multiple Blocks in one
|
|
7425
|
+
// call). Unlike reach, send has no way to know ahead of time
|
|
7426
|
+
// whether the ONE Block it's running is fast or slow, so this is
|
|
7427
|
+
// opt-in via a flag rather than a raised default.
|
|
7428
|
+
let timeoutMs;
|
|
7429
|
+
for (let i = 4; i < args.length; i++) {
|
|
7430
|
+
if (args[i] === "--timeout") {
|
|
7431
|
+
const raw = args[++i];
|
|
7432
|
+
const n = Number(raw);
|
|
7433
|
+
if (!Number.isFinite(n) || n <= 0) {
|
|
7434
|
+
console.error(`waygraph auto send: --timeout must be a positive number of ms, got "${raw}"`);
|
|
7435
|
+
process.exit(1);
|
|
7436
|
+
}
|
|
7437
|
+
timeoutMs = n;
|
|
7438
|
+
}
|
|
7439
|
+
}
|
|
7440
|
+
const res = await requestSession(proj, sessionId, { op: "send", pick }, timeoutMs);
|
|
7441
|
+
console.log(JSON.stringify(res));
|
|
7442
|
+
if (!res.ok)
|
|
7443
|
+
process.exitCode = 1;
|
|
7444
|
+
break;
|
|
7445
|
+
}
|
|
7446
|
+
if (sub === "dom") {
|
|
7447
|
+
const domArgs = args.slice(3);
|
|
7448
|
+
let mode;
|
|
7449
|
+
let selector;
|
|
7450
|
+
let depth;
|
|
7451
|
+
for (let i = 0; i < domArgs.length; i++) {
|
|
7452
|
+
const a = domArgs[i];
|
|
7453
|
+
if (a === "--mode" || a.startsWith("--mode=")) {
|
|
7454
|
+
const v = a.startsWith("--mode=") ? a.slice("--mode=".length) : domArgs[++i];
|
|
7455
|
+
if (v !== "aria" && v !== "full") {
|
|
7456
|
+
console.error(`waygraph auto dom: --mode must be "aria" or "full", got "${v}"`);
|
|
7457
|
+
process.exit(1);
|
|
7458
|
+
}
|
|
7459
|
+
mode = v;
|
|
7460
|
+
}
|
|
7461
|
+
else if (a === "--selector" || a.startsWith("--selector=")) {
|
|
7462
|
+
selector = a.startsWith("--selector=") ? a.slice("--selector=".length) : domArgs[++i];
|
|
7463
|
+
}
|
|
7464
|
+
else if (a === "--depth" || a.startsWith("--depth=")) {
|
|
7465
|
+
const raw = a.startsWith("--depth=") ? a.slice("--depth=".length) : domArgs[++i];
|
|
7466
|
+
const n = Number(raw);
|
|
7467
|
+
if (!Number.isInteger(n) || n < 1) {
|
|
7468
|
+
console.error(`waygraph auto dom: --depth must be a positive integer, got "${raw}"`);
|
|
7469
|
+
process.exit(1);
|
|
7470
|
+
}
|
|
7471
|
+
depth = n;
|
|
7472
|
+
}
|
|
7473
|
+
else {
|
|
7474
|
+
console.error(`waygraph auto dom: unrecognized argument "${a}"`);
|
|
7475
|
+
process.exit(1);
|
|
7476
|
+
}
|
|
7477
|
+
}
|
|
7478
|
+
const res = await requestSession(proj, sessionId, {
|
|
7479
|
+
op: "dom",
|
|
7480
|
+
...(mode ? { mode } : {}),
|
|
7481
|
+
...(selector ? { selector } : {}),
|
|
7482
|
+
...(depth !== undefined ? { depth } : {}),
|
|
7483
|
+
});
|
|
7484
|
+
console.log(JSON.stringify(res));
|
|
7485
|
+
if (!res.ok)
|
|
7486
|
+
process.exitCode = 1;
|
|
7487
|
+
break;
|
|
7488
|
+
}
|
|
7489
|
+
if (sub === "trace") {
|
|
7490
|
+
const res = await requestSession(proj, sessionId, { op: "trace" });
|
|
7491
|
+
console.log(JSON.stringify(res));
|
|
7492
|
+
if (!res.ok)
|
|
7493
|
+
process.exitCode = 1;
|
|
7494
|
+
break;
|
|
7495
|
+
}
|
|
7496
|
+
if (sub === "console") {
|
|
7497
|
+
const res = await requestSession(proj, sessionId, { op: "console" });
|
|
7498
|
+
console.log(JSON.stringify(res));
|
|
7499
|
+
if (!res.ok)
|
|
7500
|
+
process.exitCode = 1;
|
|
7501
|
+
break;
|
|
7502
|
+
}
|
|
7503
|
+
if (sub === "storage") {
|
|
7504
|
+
const res = await requestSession(proj, sessionId, { op: "storage" });
|
|
7505
|
+
console.log(JSON.stringify(res));
|
|
7506
|
+
if (!res.ok)
|
|
7507
|
+
process.exitCode = 1;
|
|
7508
|
+
break;
|
|
7509
|
+
}
|
|
7510
|
+
if (sub === "click") {
|
|
7511
|
+
const selector = args[3];
|
|
7512
|
+
if (selector === undefined) {
|
|
7513
|
+
console.error('waygraph auto click: usage: waygraph auto click <sessionId> "<selector>"');
|
|
7514
|
+
process.exit(1);
|
|
7515
|
+
}
|
|
7516
|
+
const res = await requestSession(proj, sessionId, { op: "click", selector });
|
|
7517
|
+
console.log(JSON.stringify(res));
|
|
7518
|
+
if (!res.ok)
|
|
7519
|
+
process.exitCode = 1;
|
|
7520
|
+
break;
|
|
7521
|
+
}
|
|
7522
|
+
if (sub === "type") {
|
|
7523
|
+
const selector = args[3];
|
|
7524
|
+
const text = args[4];
|
|
7525
|
+
if (selector === undefined || text === undefined) {
|
|
7526
|
+
console.error('waygraph auto type: usage: waygraph auto type <sessionId> "<selector>" "<text>"');
|
|
7527
|
+
process.exit(1);
|
|
7528
|
+
}
|
|
7529
|
+
const res = await requestSession(proj, sessionId, { op: "type", selector, text });
|
|
7530
|
+
console.log(JSON.stringify(res));
|
|
7531
|
+
if (!res.ok)
|
|
7532
|
+
process.exitCode = 1;
|
|
7533
|
+
break;
|
|
7534
|
+
}
|
|
7535
|
+
if (sub === "press") {
|
|
7536
|
+
const selector = args[3];
|
|
7537
|
+
const key = args[4];
|
|
7538
|
+
if (selector === undefined || key === undefined) {
|
|
7539
|
+
console.error('waygraph auto press: usage: waygraph auto press <sessionId> "<selector>" <key>');
|
|
7540
|
+
process.exit(1);
|
|
7541
|
+
}
|
|
7542
|
+
const res = await requestSession(proj, sessionId, { op: "press", selector, key });
|
|
7543
|
+
console.log(JSON.stringify(res));
|
|
7544
|
+
if (!res.ok)
|
|
7545
|
+
process.exitCode = 1;
|
|
7546
|
+
break;
|
|
7547
|
+
}
|
|
7548
|
+
if (sub === "goto") {
|
|
7549
|
+
const url = args[3];
|
|
7550
|
+
if (url === undefined) {
|
|
7551
|
+
console.error("waygraph auto goto: usage: waygraph auto goto <sessionId> <url>");
|
|
7552
|
+
process.exit(1);
|
|
7553
|
+
}
|
|
7554
|
+
const res = await requestSession(proj, sessionId, { op: "goto", url });
|
|
7555
|
+
console.log(JSON.stringify(res));
|
|
7556
|
+
if (!res.ok)
|
|
7557
|
+
process.exitCode = 1;
|
|
7558
|
+
break;
|
|
7559
|
+
}
|
|
7560
|
+
if (sub === "upload") {
|
|
7561
|
+
const selector = args[3];
|
|
7562
|
+
const kindOrPath = args[4];
|
|
7563
|
+
if (selector === undefined || kindOrPath === undefined) {
|
|
7564
|
+
console.error('waygraph auto upload: usage: waygraph auto upload <sessionId> "<selector>" <image|pdf|video|path-to-file>');
|
|
7565
|
+
process.exit(1);
|
|
7566
|
+
}
|
|
7567
|
+
const stub = kindOrPath === "image" || kindOrPath === "pdf" || kindOrPath === "video"
|
|
7568
|
+
? { selector, stub: kindOrPath }
|
|
7569
|
+
: { selector, stub: { filePath: resolve(process.cwd(), kindOrPath) } };
|
|
7570
|
+
const res = await requestSession(proj, sessionId, { op: "upload", ...stub });
|
|
7571
|
+
console.log(JSON.stringify(res));
|
|
7572
|
+
if (!res.ok)
|
|
7573
|
+
process.exitCode = 1;
|
|
7574
|
+
break;
|
|
7575
|
+
}
|
|
7576
|
+
if (sub === "reload") {
|
|
7577
|
+
const res = await requestSession(proj, sessionId, { op: "reload" });
|
|
7578
|
+
console.log(JSON.stringify(res));
|
|
7579
|
+
if (!res.ok)
|
|
7580
|
+
process.exitCode = 1;
|
|
7581
|
+
break;
|
|
7582
|
+
}
|
|
7583
|
+
if (sub === "reach") {
|
|
7584
|
+
const checkpoint = args[3];
|
|
7585
|
+
if (checkpoint === undefined) {
|
|
7586
|
+
console.error("waygraph auto reach: usage: waygraph auto reach <sessionId> <Checkpoint>");
|
|
7587
|
+
process.exit(1);
|
|
7588
|
+
}
|
|
7589
|
+
// Longer than every other op's default (15s): a real multi-step
|
|
7590
|
+
// route runs several real Blocks in sequence server-side before
|
|
7591
|
+
// responding - a legitimately slow single request, not a hang.
|
|
7592
|
+
const res = await requestSession(proj, sessionId, { op: "reach", checkpoint }, 90_000);
|
|
7593
|
+
console.log(JSON.stringify(res));
|
|
7594
|
+
if (!res.ok)
|
|
7595
|
+
process.exitCode = 1;
|
|
7596
|
+
break;
|
|
7597
|
+
}
|
|
7598
|
+
if (sub === "resync") {
|
|
7599
|
+
const res = await requestSession(proj, sessionId, { op: "resync" });
|
|
7600
|
+
console.log(JSON.stringify(res));
|
|
7601
|
+
if (!res.ok)
|
|
7602
|
+
process.exitCode = 1;
|
|
7603
|
+
break;
|
|
7604
|
+
}
|
|
7605
|
+
const res = await requestSession(proj, sessionId, { op: "status" });
|
|
7606
|
+
console.log(JSON.stringify(res));
|
|
7607
|
+
if (!res.ok)
|
|
7608
|
+
process.exitCode = 1;
|
|
7609
|
+
break;
|
|
7610
|
+
}
|
|
7314
7611
|
const flags = parseRunFlags(args.slice(1));
|
|
7315
7612
|
applyRunFlags(flags);
|
|
7316
7613
|
const mermaid = flags.mermaid === true;
|
|
@@ -7345,6 +7642,29 @@ Agents shipped: waygraph-planner, waygraph-author, waygraph-healer.
|
|
|
7345
7642
|
" or path-find: waygraph auto --blocks LoginPage OrderComplete");
|
|
7346
7643
|
process.exit(1);
|
|
7347
7644
|
}
|
|
7645
|
+
// auto --cli --detach: start the explore session as a background socket
|
|
7646
|
+
// server instead of blocking in the interactive loop. Session control
|
|
7647
|
+
// only applies to --cli (spec: "Headful mode is unaffected").
|
|
7648
|
+
if (command === "auto" && flags.detach) {
|
|
7649
|
+
if (!cliPicker) {
|
|
7650
|
+
console.error("waygraph auto --detach requires --cli (headful has no session control)");
|
|
7651
|
+
process.exit(1);
|
|
7652
|
+
}
|
|
7653
|
+
const baseURL = flags.baseUrl ?? process.env.WAYGRAPH_BASE_URL ?? resolveBaseUrl(proj);
|
|
7654
|
+
try {
|
|
7655
|
+
const meta = await spawnDetachedSession({
|
|
7656
|
+
projectDir: proj,
|
|
7657
|
+
...(baseURL ? { baseURL } : {}),
|
|
7658
|
+
...(flags.nonHeadless ? { headless: false } : {}),
|
|
7659
|
+
});
|
|
7660
|
+
console.log(JSON.stringify({ sessionId: meta.sessionId, socketPath: meta.socketPath, headless: meta.headless }));
|
|
7661
|
+
}
|
|
7662
|
+
catch (err) {
|
|
7663
|
+
console.error(`waygraph auto --detach: ${err instanceof Error ? err.message : String(err)}`);
|
|
7664
|
+
process.exit(1);
|
|
7665
|
+
}
|
|
7666
|
+
break;
|
|
7667
|
+
}
|
|
7348
7668
|
// auto --blocks From To (graph path-find + run)
|
|
7349
7669
|
// auto --blocks '/regex/' or '**/*.block.ts' (Phase C file select → explore)
|
|
7350
7670
|
if (command === "auto" && (flags.blocksFromTo || flags.blocks)) {
|
|
@@ -7389,6 +7709,49 @@ Agents shipped: waygraph-planner, waygraph-author, waygraph-healer.
|
|
|
7389
7709
|
await runAutoExplore(proj, baseURL ? { cli: cliPicker, baseURL } : { cli: cliPicker });
|
|
7390
7710
|
break;
|
|
7391
7711
|
}
|
|
7712
|
+
case "pilot": {
|
|
7713
|
+
if (args[1] !== "start") {
|
|
7714
|
+
console.error('waygraph pilot: usage: waygraph pilot start [--non-headless] [--base-url <url>] [--data <json>]');
|
|
7715
|
+
process.exit(1);
|
|
7716
|
+
}
|
|
7717
|
+
const flags = parseRunFlags(args.slice(2));
|
|
7718
|
+
applyRunFlags(flags);
|
|
7719
|
+
const proj = resolve(process.cwd());
|
|
7720
|
+
const baseURL = flags.baseUrl ?? process.env.WAYGRAPH_BASE_URL ?? resolveBaseUrl(proj);
|
|
7721
|
+
try {
|
|
7722
|
+
const result = await pilotStart({
|
|
7723
|
+
projectDir: proj,
|
|
7724
|
+
...(baseURL ? { baseURL } : {}),
|
|
7725
|
+
...(flags.nonHeadless ? { headless: false } : {}),
|
|
7726
|
+
});
|
|
7727
|
+
console.log(JSON.stringify(result));
|
|
7728
|
+
}
|
|
7729
|
+
catch (err) {
|
|
7730
|
+
console.error(`waygraph pilot start: ${err instanceof Error ? err.message : String(err)}`);
|
|
7731
|
+
process.exit(1);
|
|
7732
|
+
}
|
|
7733
|
+
break;
|
|
7734
|
+
}
|
|
7735
|
+
// Hidden: the detached server's own entry point, spawned by
|
|
7736
|
+
// `spawnDetachedSession` (auto --cli --detach). Not documented in
|
|
7737
|
+
// usage() - not meant to be invoked directly by a person.
|
|
7738
|
+
case "__auto-serve": {
|
|
7739
|
+
const proj = resolve(args[1] ?? process.cwd());
|
|
7740
|
+
const flags = parseRunFlags(args.slice(2));
|
|
7741
|
+
const sessionIdIdx = args.indexOf("--session-id");
|
|
7742
|
+
const sessionId = sessionIdIdx >= 0 ? args[sessionIdIdx + 1] : undefined;
|
|
7743
|
+
if (!sessionId) {
|
|
7744
|
+
console.error("waygraph __auto-serve: missing --session-id");
|
|
7745
|
+
process.exit(1);
|
|
7746
|
+
}
|
|
7747
|
+
const baseURL = flags.baseUrl ?? process.env.WAYGRAPH_BASE_URL ?? resolveBaseUrl(proj);
|
|
7748
|
+
await runAutoServeCommand({
|
|
7749
|
+
projectDir: proj,
|
|
7750
|
+
...(baseURL ? { baseURL } : {}),
|
|
7751
|
+
...(flags.nonHeadless ? { headless: false } : {}),
|
|
7752
|
+
}, sessionId);
|
|
7753
|
+
break;
|
|
7754
|
+
}
|
|
7392
7755
|
case "try": {
|
|
7393
7756
|
const flags = parseRunFlags(args.slice(1));
|
|
7394
7757
|
applyRunFlags(flags);
|
|
@@ -7418,23 +7781,59 @@ Agents shipped: waygraph-planner, waygraph-author, waygraph-healer.
|
|
|
7418
7781
|
}
|
|
7419
7782
|
case "check": {
|
|
7420
7783
|
const proj = resolve(args[1] ?? process.cwd());
|
|
7421
|
-
const
|
|
7422
|
-
if (
|
|
7784
|
+
const { navWarnings, selWarnings } = await checkCommand(proj);
|
|
7785
|
+
if (navWarnings.length === 0) {
|
|
7423
7786
|
console.log(`waygraph check: no navigation found outside NavBlocks under ${proj}`);
|
|
7424
7787
|
}
|
|
7425
7788
|
else {
|
|
7426
|
-
for (const w of
|
|
7789
|
+
for (const w of navWarnings) {
|
|
7427
7790
|
const rel = relative(proj, w.file);
|
|
7428
7791
|
console.warn(`waygraph check: ${rel} (${w.blockName}) calls page.goto/reload/goBack/goForward outside a NavBlock - consider defineNavBlock instead`);
|
|
7429
7792
|
}
|
|
7430
|
-
console.log(`waygraph check: ${
|
|
7793
|
+
console.log(`waygraph check: ${navWarnings.length} nav warning${navWarnings.length === 1 ? "" : "s"}`);
|
|
7794
|
+
}
|
|
7795
|
+
if (selWarnings.length === 0) {
|
|
7796
|
+
console.log(`waygraph check: no inline selectors found in verify arrays under ${proj}`);
|
|
7797
|
+
}
|
|
7798
|
+
else {
|
|
7799
|
+
for (const w of selWarnings) {
|
|
7800
|
+
const rel = relative(proj, w.file);
|
|
7801
|
+
console.warn(`waygraph check: ${rel} (${w.blockName}) has an inline selector literal in verify - move it into a *Sel object`);
|
|
7802
|
+
}
|
|
7803
|
+
console.log(`waygraph check: ${selWarnings.length} inline-selector warning${selWarnings.length === 1 ? "" : "s"}`);
|
|
7431
7804
|
}
|
|
7432
7805
|
const orphans = await findOrphanBlocks(proj);
|
|
7433
7806
|
printOrphanReport(proj, orphans);
|
|
7434
|
-
//
|
|
7807
|
+
// Warnings only - never fail exit code. Orphans are reported for
|
|
7435
7808
|
// human/agent cleanup; chain auto refuses while any remain.
|
|
7436
7809
|
break;
|
|
7437
7810
|
}
|
|
7811
|
+
case "map": {
|
|
7812
|
+
const proj = resolve(args[1] ?? process.cwd());
|
|
7813
|
+
const result = await checkMap(proj);
|
|
7814
|
+
if (!result.hasMapDir) {
|
|
7815
|
+
console.log(`waygraph map: no src/map/ directory under ${proj} - nothing to check ` +
|
|
7816
|
+
"(this project isn't on the Waygraph Map convention, or hasn't been migrated yet)");
|
|
7817
|
+
break;
|
|
7818
|
+
}
|
|
7819
|
+
console.log(`waygraph map: ${result.nodes.length} node(s) found under ${relative(proj, result.mapRoot)}`);
|
|
7820
|
+
if (result.violations.length === 0) {
|
|
7821
|
+
console.log("waygraph map: 0 violations - every static Nav/Page url verbatim-matches its folder path");
|
|
7822
|
+
}
|
|
7823
|
+
else {
|
|
7824
|
+
for (const v of result.violations) {
|
|
7825
|
+
console.error(`waygraph map: ${v.file} (${v.block}) - ${v.reason}`);
|
|
7826
|
+
}
|
|
7827
|
+
console.error(`waygraph map: ${result.violations.length} violation${result.violations.length === 1 ? "" : "s"}`);
|
|
7828
|
+
// Unlike `check`'s warnings-only stance, a Map violation is exactly
|
|
7829
|
+
// the class of bug this command exists to catch (a fabricated
|
|
7830
|
+
// folder grouping that never matched the real site, e.g. the real
|
|
7831
|
+
// (auth)/signin/ mistake this command's own header comment cites) -
|
|
7832
|
+
// fail loud, not just warn.
|
|
7833
|
+
process.exitCode = 1;
|
|
7834
|
+
}
|
|
7835
|
+
break;
|
|
7836
|
+
}
|
|
7438
7837
|
default:
|
|
7439
7838
|
console.error(`waygraph: unknown command "${command}"`);
|
|
7440
7839
|
process.exit(1);
|