waygraph 0.15.46 → 0.15.49
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/dist/analysis/graph.js +2 -2
- package/dist/auto-session/session.js +2 -2
- package/dist/cli/discover.d.ts +1 -1
- package/dist/cli/discover.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/{agent-dive.js → commands/agent-dive-scaffold.js} +2 -2
- package/dist/commands/agent-dive.js +1 -1
- package/dist/{engine/core.js → core/block.js} +6 -6
- package/dist/core/blocks/api.d.ts +54 -0
- package/dist/core/blocks/api.js +75 -0
- package/dist/{engine → core}/blocks/effect.d.ts +1 -1
- package/dist/{engine → core}/blocks/effect.js +1 -1
- package/dist/{engine → core}/blocks/method.d.ts +1 -1
- package/dist/{engine → core}/blocks/method.js +1 -1
- package/dist/{engine → core}/blocks/nav.js +1 -1
- package/dist/{engine → core}/blocks/page.js +1 -1
- package/dist/{engine → core}/branch-regression.js +2 -3
- package/dist/{engine → core}/compose.js +4 -4
- package/dist/{engine/engine-class.d.ts → core/engine.d.ts} +2 -133
- package/dist/core/engine.js +50 -0
- package/dist/{engine → core}/flow.js +5 -5
- package/dist/core/map-builder.d.ts +171 -0
- package/dist/{engine/engine-class.js → core/map-builder.js} +82 -98
- package/dist/{engine → core}/run-graph.js +4 -6
- package/dist/core.d.ts +14 -0
- package/dist/core.js +15 -0
- package/dist/errors.d.ts +54 -20
- package/dist/errors.js +67 -20
- package/dist/highlights/run-phase.js +15 -2
- package/dist/highlights/stub-ctx.js +16 -0
- package/dist/highlights/types.d.ts +38 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.js +1 -1
- package/dist/mem-page.js +2 -2
- package/dist/mem-stub.d.ts +1 -1
- package/dist/pilot-overlay/fixtures.js +55 -43
- package/dist/pilot-overlay/shell.js +23 -10
- package/dist/runner/banner-log.js +1 -0
- package/dist/runner/device-stage.js +35 -15
- package/dist/runner/inpage/banner.d.ts +21 -0
- package/dist/runner/inpage/banner.js +29 -4
- package/dist/runner/inpage/caption.d.ts +3 -0
- package/dist/runner/inpage/caption.js +23 -0
- package/dist/runner/inpage/core.js +32 -9
- package/dist/runner/inpage/network.d.ts +15 -0
- package/dist/runner/inpage/network.js +217 -0
- package/dist/runner/inpage/panel-chrome.js +41 -1
- package/dist/runner/inpage/swipe-zoom.js +1 -1
- package/dist/runner/inpage/todos.js +6 -1
- package/dist/runner/main.js +9 -2
- package/dist/runner/network-capture.d.ts +9 -0
- package/dist/runner/network-capture.js +126 -0
- package/dist/runner/overlay-css.js +71 -7
- package/dist/runner/overlay-install.js +39 -2
- package/dist/runner/overlay-stage.js +5 -0
- package/dist/runner/rings.js +69 -45
- package/dist/runner/slides.js +14 -8
- package/dist/runner/step-mode.js +12 -0
- package/dist/runner/step-panels.js +9 -3
- package/dist/runner/teardown.js +16 -9
- package/dist/session/auto-explore-run.d.ts +1 -1
- package/dist/session/auto-explore-run.js +47 -10
- package/dist/{step-overlay.d.ts → session/step-overlay.d.ts} +1 -1
- package/dist/{step-overlay.js → session/step-overlay.js} +1 -1
- package/dist/trait.d.ts +1 -0
- package/dist/trait.js +15 -0
- package/dist/traverse/run.js +1 -1
- package/dist/ui/components/ring.js +4 -2
- package/dist/ui/overlay.css +36 -3
- package/examples/saucedemo/.waygraph-auto/00d147d1.log +21 -0
- package/examples/saucedemo/.waygraph-auto/02f7dd22.log +20 -0
- package/examples/saucedemo/.waygraph-auto/0402cfcf.log +6 -0
- package/examples/saucedemo/.waygraph-auto/062b581f.log +20 -0
- package/examples/saucedemo/.waygraph-auto/0681582b.log +6 -0
- package/examples/saucedemo/.waygraph-auto/07f3e964.log +6 -0
- package/examples/saucedemo/.waygraph-auto/0868ae4d.log +0 -0
- package/examples/saucedemo/.waygraph-auto/0924ddaa.log +22 -0
- package/examples/saucedemo/.waygraph-auto/092d6173.log +5 -0
- package/examples/saucedemo/.waygraph-auto/09924510.log +0 -0
- package/examples/saucedemo/.waygraph-auto/0998c941.log +21 -0
- package/examples/saucedemo/.waygraph-auto/0bf74300.log +21 -0
- package/examples/saucedemo/.waygraph-auto/0c01fd29.log +4 -0
- package/examples/saucedemo/.waygraph-auto/0c302590.log +0 -0
- package/examples/saucedemo/.waygraph-auto/0dee62d6.log +5 -0
- package/examples/saucedemo/.waygraph-auto/0eb4c081.log +5 -0
- package/examples/saucedemo/.waygraph-auto/10fd431c.log +0 -0
- package/examples/saucedemo/.waygraph-auto/13c6fe3c.log +0 -0
- package/examples/saucedemo/.waygraph-auto/1581b677.log +0 -0
- package/examples/saucedemo/.waygraph-auto/164761a5.log +6 -0
- package/examples/saucedemo/.waygraph-auto/1905ceb2.log +0 -0
- package/examples/saucedemo/.waygraph-auto/1b1d55c6.log +0 -0
- package/examples/saucedemo/.waygraph-auto/1b80fd24.log +6 -0
- package/examples/saucedemo/.waygraph-auto/1c30a3c2.log +0 -0
- package/examples/saucedemo/.waygraph-auto/1c58a174.log +0 -0
- package/examples/saucedemo/.waygraph-auto/1d90aa9a.log +0 -0
- package/examples/saucedemo/.waygraph-auto/1de7d889.log +0 -0
- package/examples/saucedemo/.waygraph-auto/1f233a4c.log +6 -0
- package/examples/saucedemo/.waygraph-auto/20e66801.log +0 -0
- package/examples/saucedemo/.waygraph-auto/20ffdb77.log +0 -0
- package/examples/saucedemo/.waygraph-auto/22f1a704.log +5 -0
- package/examples/saucedemo/.waygraph-auto/239cced3.log +20 -0
- package/examples/saucedemo/.waygraph-auto/25204b46.log +4 -0
- package/examples/saucedemo/.waygraph-auto/25e2e90f.log +0 -0
- package/examples/saucedemo/.waygraph-auto/2708455e.log +22 -0
- package/examples/saucedemo/.waygraph-auto/272a96fd.log +20 -0
- package/examples/saucedemo/.waygraph-auto/28d7be5d.log +0 -0
- package/examples/saucedemo/.waygraph-auto/2a6a8266.log +6 -0
- package/examples/saucedemo/.waygraph-auto/2b3401cf.log +20 -0
- package/examples/saucedemo/.waygraph-auto/2ceccd6d.log +0 -0
- package/examples/saucedemo/.waygraph-auto/2f1b0c13.log +6 -0
- package/examples/saucedemo/.waygraph-auto/2f8d4073.log +6 -0
- package/examples/saucedemo/.waygraph-auto/30739278.log +6 -0
- package/examples/saucedemo/.waygraph-auto/31cb2e80.log +0 -0
- package/examples/saucedemo/.waygraph-auto/322d63cd.log +0 -0
- package/examples/saucedemo/.waygraph-auto/3239aa8a.log +6 -0
- package/examples/saucedemo/.waygraph-auto/326d87b7.log +6 -0
- package/examples/saucedemo/.waygraph-auto/3351c0b6.log +0 -0
- package/examples/saucedemo/.waygraph-auto/33df0770.log +0 -0
- package/examples/saucedemo/.waygraph-auto/340d624d.log +0 -0
- package/examples/saucedemo/.waygraph-auto/36367ccf.log +0 -0
- package/examples/saucedemo/.waygraph-auto/372536a5.log +6 -0
- package/examples/saucedemo/.waygraph-auto/3a412f3c.log +0 -0
- package/examples/saucedemo/.waygraph-auto/3a859bd7.log +0 -0
- package/examples/saucedemo/.waygraph-auto/3cb0add7.log +0 -0
- package/examples/saucedemo/.waygraph-auto/3e42f0d8.log +0 -0
- package/examples/saucedemo/.waygraph-auto/4144071d.log +0 -0
- package/examples/saucedemo/.waygraph-auto/4176a3c6.log +0 -0
- package/examples/saucedemo/.waygraph-auto/41d0793d.log +4 -0
- package/examples/saucedemo/.waygraph-auto/41e6feae.log +0 -0
- package/examples/saucedemo/.waygraph-auto/424b4d5d.log +0 -0
- package/examples/saucedemo/.waygraph-auto/43253aba.log +0 -0
- package/examples/saucedemo/.waygraph-auto/438c6c53.log +22 -0
- package/examples/saucedemo/.waygraph-auto/4477db12.log +0 -0
- package/examples/saucedemo/.waygraph-auto/4a1258b7.log +0 -0
- package/examples/saucedemo/.waygraph-auto/4adcd179.log +20 -0
- package/examples/saucedemo/.waygraph-auto/4c9d9b16.log +21 -0
- package/examples/saucedemo/.waygraph-auto/4da39c36.log +6 -0
- package/examples/saucedemo/.waygraph-auto/4dbefa7e.log +5 -0
- package/examples/saucedemo/.waygraph-auto/4efa7035.log +6 -0
- package/examples/saucedemo/.waygraph-auto/505affdc.log +4 -0
- package/examples/saucedemo/.waygraph-auto/51bcb60a.log +0 -0
- package/examples/saucedemo/.waygraph-auto/5291bc78.log +22 -0
- package/examples/saucedemo/.waygraph-auto/54274c39.log +5 -0
- package/examples/saucedemo/.waygraph-auto/5440ce7e.log +0 -0
- package/examples/saucedemo/.waygraph-auto/5738175f.log +22 -0
- package/examples/saucedemo/.waygraph-auto/57ce5643.log +22 -0
- package/examples/saucedemo/.waygraph-auto/5984426b.log +6 -0
- package/examples/saucedemo/.waygraph-auto/5a682e7c.log +22 -0
- package/examples/saucedemo/.waygraph-auto/5b79320c.log +21 -0
- package/examples/saucedemo/.waygraph-auto/5c55aaac.log +21 -0
- package/examples/saucedemo/.waygraph-auto/5ed00b16.log +4 -0
- package/examples/saucedemo/.waygraph-auto/60b9c066.log +6 -0
- package/examples/saucedemo/.waygraph-auto/610dd127.log +0 -0
- package/examples/saucedemo/.waygraph-auto/61105500.log +5 -0
- package/examples/saucedemo/.waygraph-auto/61333142.log +5 -0
- package/examples/saucedemo/.waygraph-auto/6134afe8.log +20 -0
- package/examples/saucedemo/.waygraph-auto/61937e83.log +22 -0
- package/examples/saucedemo/.waygraph-auto/62a0bdc9.log +22 -0
- package/examples/saucedemo/.waygraph-auto/6376fc15.log +0 -0
- package/examples/saucedemo/.waygraph-auto/6599cbca.log +22 -0
- package/examples/saucedemo/.waygraph-auto/67aaca30.log +0 -0
- package/examples/saucedemo/.waygraph-auto/68b10298.log +0 -0
- package/examples/saucedemo/.waygraph-auto/68be5e12.log +0 -0
- package/examples/saucedemo/.waygraph-auto/68df05a6.log +22 -0
- package/examples/saucedemo/.waygraph-auto/693f67c4.log +20 -0
- package/examples/saucedemo/.waygraph-auto/69ae030a.log +6 -0
- package/examples/saucedemo/.waygraph-auto/69e73f35.log +6 -0
- package/examples/saucedemo/.waygraph-auto/6b2333b0.log +5 -0
- package/examples/saucedemo/.waygraph-auto/6c4c3817.log +0 -0
- package/examples/saucedemo/.waygraph-auto/6c954911.log +0 -0
- package/examples/saucedemo/.waygraph-auto/6d65a439.log +5 -0
- package/examples/saucedemo/.waygraph-auto/6d700055.log +0 -0
- package/examples/saucedemo/.waygraph-auto/6ead848f.log +0 -0
- package/examples/saucedemo/.waygraph-auto/72675b2d.log +6 -0
- package/examples/saucedemo/.waygraph-auto/733dd260.log +5 -0
- package/examples/saucedemo/.waygraph-auto/75016486.log +0 -0
- package/examples/saucedemo/.waygraph-auto/752b01c6.log +22 -0
- package/examples/saucedemo/.waygraph-auto/75675227.log +6 -0
- package/examples/saucedemo/.waygraph-auto/75e2e658.log +0 -0
- package/examples/saucedemo/.waygraph-auto/76ac1a86.log +0 -0
- package/examples/saucedemo/.waygraph-auto/77605295.log +0 -0
- package/examples/saucedemo/.waygraph-auto/792671f4.log +22 -0
- package/examples/saucedemo/.waygraph-auto/79915adb.log +20 -0
- package/examples/saucedemo/.waygraph-auto/7a398774.log +6 -0
- package/examples/saucedemo/.waygraph-auto/7a72f66e.log +6 -0
- package/examples/saucedemo/.waygraph-auto/7a984334.log +4 -0
- package/examples/saucedemo/.waygraph-auto/7c6ee793.log +20 -0
- package/examples/saucedemo/.waygraph-auto/7c726dc4.log +22 -0
- package/examples/saucedemo/.waygraph-auto/7c72e8a5.log +4 -0
- package/examples/saucedemo/.waygraph-auto/7dbee625.log +22 -0
- package/examples/saucedemo/.waygraph-auto/7df66956.log +0 -0
- package/examples/saucedemo/.waygraph-auto/7e053160.log +0 -0
- package/examples/saucedemo/.waygraph-auto/802a0b5b.log +0 -0
- package/examples/saucedemo/.waygraph-auto/80322e0b.log +0 -0
- package/examples/saucedemo/.waygraph-auto/80a4978e.log +6 -0
- package/examples/saucedemo/.waygraph-auto/81cfe480.log +22 -0
- package/examples/saucedemo/.waygraph-auto/832f5add.log +0 -0
- package/examples/saucedemo/.waygraph-auto/8337b6ad.log +0 -0
- package/examples/saucedemo/.waygraph-auto/8493928e.log +0 -0
- package/examples/saucedemo/.waygraph-auto/853bde43.log +0 -0
- package/examples/saucedemo/.waygraph-auto/86350ea6.log +22 -0
- package/examples/saucedemo/.waygraph-auto/86bb598a.log +0 -0
- package/examples/saucedemo/.waygraph-auto/86d09876.log +22 -0
- package/examples/saucedemo/.waygraph-auto/878ad01b.log +4 -0
- package/examples/saucedemo/.waygraph-auto/87c88ba5.log +0 -0
- package/examples/saucedemo/.waygraph-auto/87cb80ff.log +0 -0
- package/examples/saucedemo/.waygraph-auto/880b2e78.log +6 -0
- package/examples/saucedemo/.waygraph-auto/88527936.log +5 -0
- package/examples/saucedemo/.waygraph-auto/893023ea.log +5 -0
- package/examples/saucedemo/.waygraph-auto/89416718.log +0 -0
- package/examples/saucedemo/.waygraph-auto/8996a857.log +6 -0
- package/examples/saucedemo/.waygraph-auto/8a64ba0f.log +6 -0
- package/examples/saucedemo/.waygraph-auto/8b1cc2aa.log +6 -0
- package/examples/saucedemo/.waygraph-auto/8b73d13e.log +6 -0
- package/examples/saucedemo/.waygraph-auto/8d960d31.log +1 -0
- package/examples/saucedemo/.waygraph-auto/8d9e5cd2.log +21 -0
- package/examples/saucedemo/.waygraph-auto/8ec7d260.log +0 -0
- package/examples/saucedemo/.waygraph-auto/8ed43279.log +0 -0
- package/examples/saucedemo/.waygraph-auto/93acae32.log +5 -0
- package/examples/saucedemo/.waygraph-auto/96321a08.log +0 -0
- package/examples/saucedemo/.waygraph-auto/9742b6c2.log +6 -0
- package/examples/saucedemo/.waygraph-auto/99cc93eb.log +6 -0
- package/examples/saucedemo/.waygraph-auto/9cbfbedc.log +0 -0
- package/examples/saucedemo/.waygraph-auto/9dc147d2.log +22 -0
- package/examples/saucedemo/.waygraph-auto/a215a395.log +22 -0
- package/examples/saucedemo/.waygraph-auto/a23b7086.log +4 -0
- package/examples/saucedemo/.waygraph-auto/a35bd5ec.log +0 -0
- package/examples/saucedemo/.waygraph-auto/a68995e9.log +22 -0
- package/examples/saucedemo/.waygraph-auto/a6e4f936.log +22 -0
- package/examples/saucedemo/.waygraph-auto/a7da862b.log +0 -0
- package/examples/saucedemo/.waygraph-auto/a82e2a48.log +0 -0
- package/examples/saucedemo/.waygraph-auto/a952eb91.log +0 -0
- package/examples/saucedemo/.waygraph-auto/a9559653.log +5 -0
- package/examples/saucedemo/.waygraph-auto/aa478de2.log +0 -0
- package/examples/saucedemo/.waygraph-auto/ac350fc7.log +20 -0
- package/examples/saucedemo/.waygraph-auto/acc1b63a.log +0 -0
- package/examples/saucedemo/.waygraph-auto/ad12d191.log +0 -0
- package/examples/saucedemo/.waygraph-auto/ae3a9b06.log +0 -0
- package/examples/saucedemo/.waygraph-auto/b04638f4.log +6 -0
- package/examples/saucedemo/.waygraph-auto/b48863e5.log +22 -0
- package/examples/saucedemo/.waygraph-auto/b56968e1.log +6 -0
- package/examples/saucedemo/.waygraph-auto/b64e0620.log +20 -0
- package/examples/saucedemo/.waygraph-auto/b86a6218.log +6 -0
- package/examples/saucedemo/.waygraph-auto/b8e9e956.log +22 -0
- package/examples/saucedemo/.waygraph-auto/b9b310ff.log +21 -0
- package/examples/saucedemo/.waygraph-auto/bc111745.log +22 -0
- package/examples/saucedemo/.waygraph-auto/bf7a77a2.log +0 -0
- package/examples/saucedemo/.waygraph-auto/c0d6f353.log +21 -0
- package/examples/saucedemo/.waygraph-auto/c0febcf2.log +20 -0
- package/examples/saucedemo/.waygraph-auto/c4c52998.log +6 -0
- package/examples/saucedemo/.waygraph-auto/c809ceb4.log +22 -0
- package/examples/saucedemo/.waygraph-auto/ca6de7e7.log +0 -0
- package/examples/saucedemo/.waygraph-auto/ca8561bc.log +0 -0
- package/examples/saucedemo/.waygraph-auto/cb86d45b.log +0 -0
- package/examples/saucedemo/.waygraph-auto/cb9a1978.log +6 -0
- package/examples/saucedemo/.waygraph-auto/cbbc689c.log +6 -0
- package/examples/saucedemo/.waygraph-auto/cd88364b.log +0 -0
- package/examples/saucedemo/.waygraph-auto/cd919e1d.log +0 -0
- package/examples/saucedemo/.waygraph-auto/cfff9eef.log +20 -0
- package/examples/saucedemo/.waygraph-auto/d0f59b21.log +4 -0
- package/examples/saucedemo/.waygraph-auto/d1195079.log +20 -0
- package/examples/saucedemo/.waygraph-auto/d2ef067a.log +5 -0
- package/examples/saucedemo/.waygraph-auto/d425471f.log +6 -0
- package/examples/saucedemo/.waygraph-auto/d5293921.log +0 -0
- package/examples/saucedemo/.waygraph-auto/d62a22c2.log +21 -0
- package/examples/saucedemo/.waygraph-auto/d6d1761f.log +22 -0
- package/examples/saucedemo/.waygraph-auto/d6d5f411.log +22 -0
- package/examples/saucedemo/.waygraph-auto/d6df2771.log +6 -0
- package/examples/saucedemo/.waygraph-auto/d7075012.log +21 -0
- package/examples/saucedemo/.waygraph-auto/d9ddc297.log +0 -0
- package/examples/saucedemo/.waygraph-auto/db4ac845.log +0 -0
- package/examples/saucedemo/.waygraph-auto/db6d7774.log +0 -0
- package/examples/saucedemo/.waygraph-auto/db839827.log +5 -0
- package/examples/saucedemo/.waygraph-auto/dde5e859.log +22 -0
- package/examples/saucedemo/.waygraph-auto/de8cac58.log +0 -0
- package/examples/saucedemo/.waygraph-auto/ded5511a.log +6 -0
- package/examples/saucedemo/.waygraph-auto/dedfcb18.log +0 -0
- package/examples/saucedemo/.waygraph-auto/def4d9b1.log +0 -0
- package/examples/saucedemo/.waygraph-auto/e1549e40.log +0 -0
- package/examples/saucedemo/.waygraph-auto/e1b0676d.log +21 -0
- package/examples/saucedemo/.waygraph-auto/e5111463.log +0 -0
- package/examples/saucedemo/.waygraph-auto/e5fc1d7c.log +5 -0
- package/examples/saucedemo/.waygraph-auto/e6fd2202.log +0 -0
- package/examples/saucedemo/.waygraph-auto/edaa806d.log +0 -0
- package/examples/saucedemo/.waygraph-auto/edaf33de.log +0 -0
- package/examples/saucedemo/.waygraph-auto/edd40cbb.log +20 -0
- package/examples/saucedemo/.waygraph-auto/eddfbffc.log +6 -0
- package/examples/saucedemo/.waygraph-auto/ee9fa1ad.log +5 -0
- package/examples/saucedemo/.waygraph-auto/ef319474.log +22 -0
- package/examples/saucedemo/.waygraph-auto/f28eee8d.log +0 -0
- package/examples/saucedemo/.waygraph-auto/f33bde90.log +0 -0
- package/examples/saucedemo/.waygraph-auto/f6ba7cb4.log +6 -0
- package/examples/saucedemo/.waygraph-auto/f7ac4d62.log +20 -0
- package/examples/saucedemo/.waygraph-auto/f929bb79.log +0 -0
- package/examples/saucedemo/.waygraph-auto/f92d4c6c.log +22 -0
- package/examples/saucedemo/.waygraph-auto/f92faf40.log +5 -0
- package/examples/saucedemo/.waygraph-auto/fa784369.log +21 -0
- package/examples/saucedemo/.waygraph-auto/fb55f723.log +20 -0
- package/examples/saucedemo/.waygraph-auto/fba3b738.log +0 -0
- package/examples/saucedemo/.waygraph-auto/ffdf2854.log +6 -0
- package/examples/saucedemo/README.md +13 -2
- package/examples/saucedemo/package.json +4 -0
- package/examples/saucedemo/src/flows/api-demo.flow.ts +37 -0
- package/examples/saucedemo/src/flows/checkout.flow.ts +34 -11
- package/package.json +5 -3
- package/dist/auto-explore-run.d.ts +0 -37
- package/dist/auto-explore-run.js +0 -670
- package/dist/auto-explore.d.ts +0 -57
- package/dist/auto-explore.js +0 -376
- package/dist/auto-session-ipc.d.ts +0 -150
- package/dist/auto-session-ipc.js +0 -497
- package/dist/block-inject.d.ts +0 -15
- package/dist/block-inject.js +0 -91
- package/dist/browser.d.ts +0 -15
- package/dist/browser.js +0 -29
- package/dist/coverage-gap.d.ts +0 -11
- package/dist/coverage-gap.js +0 -119
- package/dist/engine.d.ts +0 -12
- package/dist/engine.js +0 -13
- package/dist/graph.d.ts +0 -92
- package/dist/graph.js +0 -467
- package/dist/highlight-shorthand.d.ts +0 -24
- package/dist/highlight-shorthand.js +0 -30
- package/dist/map-check.d.ts +0 -18
- package/dist/map-check.js +0 -140
- package/dist/overlay-beacon.d.ts +0 -44
- package/dist/overlay-beacon.js +0 -85
- package/dist/pilot.d.ts +0 -54
- package/dist/pilot.js +0 -80
- package/dist/practices-check.d.ts +0 -14
- package/dist/practices-check.js +0 -195
- package/dist/traverse-coverage.d.ts +0 -59
- package/dist/traverse-coverage.js +0 -127
- package/dist/traverse-lease.d.ts +0 -18
- package/dist/traverse-lease.js +0 -62
- package/dist/traverse-run.d.ts +0 -47
- package/dist/traverse-run.js +0 -439
- package/dist/ui/compose.d.ts +0 -4
- package/dist/ui/compose.js +0 -7
- /package/dist/{verbose-log.d.ts → auto-session/verbose-log.d.ts} +0 -0
- /package/dist/{verbose-log.js → auto-session/verbose-log.js} +0 -0
- /package/dist/{agent-dive.d.ts → commands/agent-dive-scaffold.d.ts} +0 -0
- /package/dist/{engine/core.d.ts → core/block.d.ts} +0 -0
- /package/dist/{engine → core}/blocks/nav.d.ts +0 -0
- /package/dist/{engine → core}/blocks/page.d.ts +0 -0
- /package/dist/{engine → core}/branch-regression.d.ts +0 -0
- /package/dist/{engine → core}/compose.d.ts +0 -0
- /package/dist/{engine → core}/config.d.ts +0 -0
- /package/dist/{engine → core}/config.js +0 -0
- /package/dist/{engine → core}/flow.d.ts +0 -0
- /package/dist/{engine → core}/locate.d.ts +0 -0
- /package/dist/{engine → core}/locate.js +0 -0
- /package/dist/{engine → core}/run-graph.d.ts +0 -0
package/dist/auto-explore.d.ts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import type { Page } from "@playwright/test";
|
|
2
|
-
import type { Block, Checkpoint, WaygraphInstanceOption } from "./types.js";
|
|
3
|
-
import { type WaygraphGraph, type WaygraphEdge } from "./analysis/graph.js";
|
|
4
|
-
export interface ExploreContextOpts {
|
|
5
|
-
blocksSelect?: import("./blocks-select.js").BlocksSelect;
|
|
6
|
-
/** Absolute paths of extra Block trees to merge (host projectDir is always first). */
|
|
7
|
-
inject?: string[];
|
|
8
|
-
}
|
|
9
|
-
export interface BlockEntry {
|
|
10
|
-
block: Block<Checkpoint<string>, Checkpoint<string>>;
|
|
11
|
-
exportName: string;
|
|
12
|
-
file: string;
|
|
13
|
-
kind: "nav" | "action";
|
|
14
|
-
description: string;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* One menu row. Usually just a `WaygraphEdge` as discovered statically; when
|
|
18
|
-
* a Block declares `instanceOptions`, one `ExploreEdge` is produced per live
|
|
19
|
-
* option instead of a single generic row - `label` overrides the default
|
|
20
|
-
* "block -> checkpoint" text, and `instanceOption` is what the runner
|
|
21
|
-
* `mem.set()`s before running that row's Block.
|
|
22
|
-
*/
|
|
23
|
-
export interface ExploreEdge extends WaygraphEdge {
|
|
24
|
-
label?: string;
|
|
25
|
-
instanceOption?: WaygraphInstanceOption;
|
|
26
|
-
}
|
|
27
|
-
export interface ExploreSection {
|
|
28
|
-
title: string;
|
|
29
|
-
edges: ExploreEdge[];
|
|
30
|
-
}
|
|
31
|
-
/** Grouped menu for auto explore — `flat` preserves pick indices for CLI/headful. */
|
|
32
|
-
export interface ExploreMenu {
|
|
33
|
-
here: string | null;
|
|
34
|
-
sections: ExploreSection[];
|
|
35
|
-
flat: ExploreEdge[];
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Import every `*.block.ts` export keyed by runtime Block `.name`.
|
|
39
|
-
*/
|
|
40
|
-
export declare function loadBlockLibrary(projectDir: string, opts?: ExploreContextOpts): Promise<{
|
|
41
|
-
byName: Map<string, BlockEntry>;
|
|
42
|
-
navBlocks: BlockEntry[];
|
|
43
|
-
}>;
|
|
44
|
-
/**
|
|
45
|
-
* @deprecated Use {@link buildExploreMenu} — kept for unit tests.
|
|
46
|
-
*/
|
|
47
|
-
export declare function exploreChoices(graph: WaygraphGraph, here: string | null): WaygraphEdge[];
|
|
48
|
-
/**
|
|
49
|
-
* Runtime-filtered menu: only Blocks that can run on the live page, grouped forward/back.
|
|
50
|
-
*/
|
|
51
|
-
export declare function buildExploreMenu(page: Page, graph: WaygraphGraph, library: {
|
|
52
|
-
byName: Map<string, BlockEntry>;
|
|
53
|
-
}, here: string | null): Promise<ExploreMenu>;
|
|
54
|
-
export declare function buildExploreContext(projectDir: string, opts?: ExploreContextOpts): Promise<{
|
|
55
|
-
graph: WaygraphGraph;
|
|
56
|
-
library: Awaited<ReturnType<typeof loadBlockLibrary>>;
|
|
57
|
-
}>;
|
package/dist/auto-explore.js
DELETED
|
@@ -1,376 +0,0 @@
|
|
|
1
|
-
import { readdirSync, statSync } from "node:fs";
|
|
2
|
-
import { join, relative, resolve } from "node:path";
|
|
3
|
-
import { discoverGraph } from "./analysis/graph.js";
|
|
4
|
-
import { exploreRoots, injectTaggedFile } from "./block-inject.js";
|
|
5
|
-
function walkDir(dir, pattern) {
|
|
6
|
-
const results = [];
|
|
7
|
-
let entries;
|
|
8
|
-
try {
|
|
9
|
-
entries = readdirSync(dir, { withFileTypes: true });
|
|
10
|
-
}
|
|
11
|
-
catch {
|
|
12
|
-
return results;
|
|
13
|
-
}
|
|
14
|
-
for (const entry of entries) {
|
|
15
|
-
const full = join(dir, entry.name);
|
|
16
|
-
if (entry.isDirectory()) {
|
|
17
|
-
if (entry.name === "node_modules" || entry.name === "dist" || entry.name === ".git")
|
|
18
|
-
continue;
|
|
19
|
-
results.push(...walkDir(full, pattern));
|
|
20
|
-
}
|
|
21
|
-
else if (pattern.test(entry.name)) {
|
|
22
|
-
results.push(full);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
return results;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Real, confirmed bug this fixes: a bare `import(url.href)` is permanently
|
|
29
|
-
* cached by Node's ESM loader for the lifetime of the process, keyed on the
|
|
30
|
-
* exact specifier. `AutoSession.reloadLibrary()` exists specifically so a
|
|
31
|
-
* Block edited on disk mid-session takes effect without restarting the
|
|
32
|
-
* session - but a SECOND `reload` of a file already imported once in this
|
|
33
|
-
* process silently kept returning the FIRST version's content, no matter
|
|
34
|
-
* how many times the file changed on disk after that. A one-shot CLI
|
|
35
|
-
* process (`waygraph graph`, etc.) never hits this - it only ever imports
|
|
36
|
-
* each file once anyway - but a long-running `--detach` session calling
|
|
37
|
-
* `reloadLibrary()` repeatedly does.
|
|
38
|
-
*
|
|
39
|
-
* Fix: bust the cache with the file's own mtime as a query param - a
|
|
40
|
-
* genuinely changed file gets a new specifier (forcing a fresh import); an
|
|
41
|
-
* UNCHANGED file between two reloads keeps hitting the SAME specifier (no
|
|
42
|
-
* unbounded accumulation of dead module instances across many reloads).
|
|
43
|
-
*/
|
|
44
|
-
async function importModule(filePath) {
|
|
45
|
-
const resolved = resolve(filePath);
|
|
46
|
-
const url = new URL(`file://${resolved}`);
|
|
47
|
-
const mtimeMs = statSync(resolved).mtimeMs;
|
|
48
|
-
url.searchParams.set("t", String(mtimeMs));
|
|
49
|
-
return (await import(url.href));
|
|
50
|
-
}
|
|
51
|
-
function isBlockLike(val) {
|
|
52
|
-
if (val === null || typeof val !== "object")
|
|
53
|
-
return false;
|
|
54
|
-
const obj = val;
|
|
55
|
-
if (typeof obj.name !== "string")
|
|
56
|
-
return false;
|
|
57
|
-
const instruction = obj.instruction;
|
|
58
|
-
return instruction !== null && typeof instruction === "object" && typeof instruction?.act === "function";
|
|
59
|
-
}
|
|
60
|
-
function isNavBlockMarked(val) {
|
|
61
|
-
const kind = val.__waygraphKind;
|
|
62
|
-
return kind === "nav" || kind === "page";
|
|
63
|
-
}
|
|
64
|
-
function isUrlNav(entry) {
|
|
65
|
-
return entry.block.__waygraphNavClick === undefined;
|
|
66
|
-
}
|
|
67
|
-
function isBackEdge(edge) {
|
|
68
|
-
return /^nav-back/.test(edge.block) || edge.block === "submit-logout";
|
|
69
|
-
}
|
|
70
|
-
async function navRunnable(page, entry) {
|
|
71
|
-
const click = entry.block.__waygraphNavClick;
|
|
72
|
-
if (click === undefined)
|
|
73
|
-
return true;
|
|
74
|
-
if (typeof click !== "string")
|
|
75
|
-
return false;
|
|
76
|
-
try {
|
|
77
|
-
// Short timeout: menu scan must stay snappy (many edges miss on this page).
|
|
78
|
-
return await page.locator(click).first().isVisible({ timeout: 150 });
|
|
79
|
-
}
|
|
80
|
-
catch {
|
|
81
|
-
return false;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
async function wildcardActionRunnable(page, entry, here) {
|
|
85
|
-
if (here === null)
|
|
86
|
-
return false;
|
|
87
|
-
const name = entry.block.name;
|
|
88
|
-
// Bulk / non-instance * actions: show when matching live buttons exist.
|
|
89
|
-
try {
|
|
90
|
-
if (name === "add-all-to-cart" || name === "add-to-cart") {
|
|
91
|
-
return await page.locator('button[data-test^="add-to-cart-"]').first().isVisible({ timeout: 150 });
|
|
92
|
-
}
|
|
93
|
-
if (name === "remove-all-from-cart" || name === "remove-from-cart") {
|
|
94
|
-
return await page.locator('button[data-test^="remove-"]').first().isVisible({ timeout: 150 });
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
catch {
|
|
98
|
-
return false;
|
|
99
|
-
}
|
|
100
|
-
return false;
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Import every `*.block.ts` export keyed by runtime Block `.name`.
|
|
104
|
-
*/
|
|
105
|
-
export async function loadBlockLibrary(projectDir, opts) {
|
|
106
|
-
const { matchBlocksSelect } = await import("./blocks-select.js");
|
|
107
|
-
const byName = new Map();
|
|
108
|
-
const navBlocks = [];
|
|
109
|
-
const navSeen = new Set();
|
|
110
|
-
const select = opts?.blocksSelect;
|
|
111
|
-
for (const root of exploreRoots(projectDir, opts?.inject)) {
|
|
112
|
-
for (const file of walkDir(root, /\.block\.ts$/)) {
|
|
113
|
-
const relFile = relative(root, file).replace(/\\/g, "/");
|
|
114
|
-
const taggedFile = injectTaggedFile(projectDir, root, relFile);
|
|
115
|
-
// Glob/bare: path filter before import. Regex: need block name — filter after.
|
|
116
|
-
if (select && select.kind !== "regex" && !matchBlocksSelect(select, { relFile })) {
|
|
117
|
-
continue;
|
|
118
|
-
}
|
|
119
|
-
let mod;
|
|
120
|
-
try {
|
|
121
|
-
mod = await importModule(file);
|
|
122
|
-
}
|
|
123
|
-
catch (err) {
|
|
124
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
125
|
-
if (/second time|playwright/i.test(msg)) {
|
|
126
|
-
console.error(`waygraph auto: skip ${relFile}: ${msg.split("\n")[0]}`);
|
|
127
|
-
}
|
|
128
|
-
continue;
|
|
129
|
-
}
|
|
130
|
-
for (const [exportName, exported] of Object.entries(mod)) {
|
|
131
|
-
if (!isBlockLike(exported))
|
|
132
|
-
continue;
|
|
133
|
-
if (select &&
|
|
134
|
-
!matchBlocksSelect(select, { relFile, blockName: exported.name })) {
|
|
135
|
-
continue;
|
|
136
|
-
}
|
|
137
|
-
const kind = isNavBlockMarked(exported) ? "nav" : "action";
|
|
138
|
-
const entry = {
|
|
139
|
-
block: exported,
|
|
140
|
-
exportName,
|
|
141
|
-
file: taggedFile,
|
|
142
|
-
kind,
|
|
143
|
-
description: typeof exported.description === "string" ? exported.description : "",
|
|
144
|
-
};
|
|
145
|
-
if (byName.has(exported.name)) {
|
|
146
|
-
console.error(`waygraph: inject skipped duplicate Block name "${exported.name}" (${taggedFile})`);
|
|
147
|
-
continue;
|
|
148
|
-
}
|
|
149
|
-
byName.set(exported.name, entry);
|
|
150
|
-
if (kind === "nav" && !navSeen.has(exported.name)) {
|
|
151
|
-
navSeen.add(exported.name);
|
|
152
|
-
navBlocks.push(entry);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
navBlocks.sort((a, b) => {
|
|
158
|
-
const aUrl = isUrlNav(a) ? 0 : 1;
|
|
159
|
-
const bUrl = isUrlNav(b) ? 0 : 1;
|
|
160
|
-
return aUrl - bUrl || a.block.name.localeCompare(b.block.name);
|
|
161
|
-
});
|
|
162
|
-
return { byName, navBlocks };
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* @deprecated Use {@link buildExploreMenu} — kept for unit tests.
|
|
166
|
-
*/
|
|
167
|
-
export function exploreChoices(graph, here) {
|
|
168
|
-
const seen = new Set();
|
|
169
|
-
const out = [];
|
|
170
|
-
for (const edge of graph.edges) {
|
|
171
|
-
if (here === null) {
|
|
172
|
-
if (edge.kind !== "nav")
|
|
173
|
-
continue;
|
|
174
|
-
}
|
|
175
|
-
else if (edge.from !== here && edge.from !== "*") {
|
|
176
|
-
continue;
|
|
177
|
-
}
|
|
178
|
-
if (seen.has(edge.block))
|
|
179
|
-
continue;
|
|
180
|
-
seen.add(edge.block);
|
|
181
|
-
out.push(edge);
|
|
182
|
-
}
|
|
183
|
-
return out.sort((a, b) => a.block.localeCompare(b.block));
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
* Runtime-filtered menu: only Blocks that can run on the live page, grouped forward/back.
|
|
187
|
-
*/
|
|
188
|
-
export async function buildExploreMenu(page, graph, library, here) {
|
|
189
|
-
const forward = [];
|
|
190
|
-
const anywhere = [];
|
|
191
|
-
const navigate = [];
|
|
192
|
-
const back = [];
|
|
193
|
-
const seen = new Set();
|
|
194
|
-
// Union Out tags create duplicate edges for the same Block - cache instanceOptions
|
|
195
|
-
// so we only scrape the DOM once per Block name per menu build.
|
|
196
|
-
const instanceOptionsCache = new Map();
|
|
197
|
-
const push = (bucket, edge) => {
|
|
198
|
-
if (seen.has(edge.block))
|
|
199
|
-
return;
|
|
200
|
-
seen.add(edge.block);
|
|
201
|
-
bucket.push(edge);
|
|
202
|
-
};
|
|
203
|
-
async function loadInstanceOptions(entry) {
|
|
204
|
-
const fn = entry.block.instanceOptions;
|
|
205
|
-
if (!fn)
|
|
206
|
-
return [];
|
|
207
|
-
const cached = instanceOptionsCache.get(entry.block.name);
|
|
208
|
-
if (cached)
|
|
209
|
-
return cached;
|
|
210
|
-
let options = [];
|
|
211
|
-
try {
|
|
212
|
-
options = await fn(page);
|
|
213
|
-
}
|
|
214
|
-
catch {
|
|
215
|
-
options = [];
|
|
216
|
-
}
|
|
217
|
-
instanceOptionsCache.set(entry.block.name, options);
|
|
218
|
-
return options;
|
|
219
|
-
}
|
|
220
|
-
for (const edge of graph.edges) {
|
|
221
|
-
const entry = library.byName.get(edge.block);
|
|
222
|
-
if (!entry)
|
|
223
|
-
continue;
|
|
224
|
-
if (edge.kind === "action") {
|
|
225
|
-
if (here !== null && edge.from === here) {
|
|
226
|
-
if (entry.block.instanceOptions) {
|
|
227
|
-
const options = await loadInstanceOptions(entry);
|
|
228
|
-
for (const option of options) {
|
|
229
|
-
const seenKey = `${edge.block}::${option.id}`;
|
|
230
|
-
if (seen.has(seenKey))
|
|
231
|
-
continue;
|
|
232
|
-
seen.add(seenKey);
|
|
233
|
-
(isBackEdge(edge) ? back : forward).push({
|
|
234
|
-
...edge,
|
|
235
|
-
label: option.label,
|
|
236
|
-
instanceOption: option,
|
|
237
|
-
});
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
else {
|
|
241
|
-
push(isBackEdge(edge) ? back : forward, edge);
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
else if (here !== null && edge.from === "*") {
|
|
245
|
-
if (entry.block.instanceOptions) {
|
|
246
|
-
const options = await loadInstanceOptions(entry);
|
|
247
|
-
for (const option of options) {
|
|
248
|
-
const seenKey = `${edge.block}::${option.id}`;
|
|
249
|
-
if (seen.has(seenKey))
|
|
250
|
-
continue;
|
|
251
|
-
seen.add(seenKey);
|
|
252
|
-
anywhere.push({ ...edge, label: option.label, instanceOption: option });
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
else if (await wildcardActionRunnable(page, entry, here)) {
|
|
256
|
-
const bulkLabel = {
|
|
257
|
-
"add-all-to-cart": "Add all to cart",
|
|
258
|
-
"remove-all-from-cart": "Remove all from cart",
|
|
259
|
-
};
|
|
260
|
-
const label = bulkLabel[entry.block.name] ?? (entry.description?.trim() || undefined);
|
|
261
|
-
push(anywhere, label ? { ...edge, label } : edge);
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
continue;
|
|
265
|
-
}
|
|
266
|
-
// Nav: MemNavBlock (instanceOptions) expands one row per live target;
|
|
267
|
-
// plain NavBlock still uses click-visibility (navRunnable).
|
|
268
|
-
if (here !== null && (edge.from === here || edge.from === "*") && edge.to !== here) {
|
|
269
|
-
if (entry.block.instanceOptions) {
|
|
270
|
-
const options = await loadInstanceOptions(entry);
|
|
271
|
-
const bucket = isBackEdge(edge) ? back : navigate;
|
|
272
|
-
for (const option of options) {
|
|
273
|
-
const seenKey = `${edge.block}::${option.id}`;
|
|
274
|
-
if (seen.has(seenKey))
|
|
275
|
-
continue;
|
|
276
|
-
seen.add(seenKey);
|
|
277
|
-
bucket.push({ ...edge, label: option.label, instanceOption: option });
|
|
278
|
-
}
|
|
279
|
-
continue;
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
if (!(await navRunnable(page, entry)))
|
|
283
|
-
continue;
|
|
284
|
-
if (here === null) {
|
|
285
|
-
// Bootstrap only: URL deep-links as "Start here". Click-nav needs a live
|
|
286
|
-
// control so it cannot seed an unknown page.
|
|
287
|
-
if (!isUrlNav(entry))
|
|
288
|
-
continue;
|
|
289
|
-
push(navigate, edge);
|
|
290
|
-
continue;
|
|
291
|
-
}
|
|
292
|
-
if (edge.to === here)
|
|
293
|
-
continue;
|
|
294
|
-
// Known screen: do NOT dump every defineNavBlock({ url }) under Navigate.
|
|
295
|
-
// Graph still marks NavBlocks from:"*" for pathfinding/traverse; auto menu
|
|
296
|
-
// only offers click-nav whose control is visible on this page (navRunnable).
|
|
297
|
-
// Otherwise LoginForm lists every app route + mailpit as if legal moves.
|
|
298
|
-
if (isUrlNav(entry))
|
|
299
|
-
continue;
|
|
300
|
-
if (isBackEdge(edge) && (edge.from === here || edge.from === "*")) {
|
|
301
|
-
push(back, edge);
|
|
302
|
-
}
|
|
303
|
-
else if (edge.from === here || edge.from === "*") {
|
|
304
|
-
push(navigate, edge);
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
const sections = [];
|
|
308
|
-
if (here === null) {
|
|
309
|
-
if (navigate.length > 0) {
|
|
310
|
-
sections.push({ title: "Start here", edges: navigate.sort((a, b) => a.block.localeCompare(b.block)) });
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
else {
|
|
314
|
-
if (forward.length > 0) {
|
|
315
|
-
sections.push({
|
|
316
|
-
title: `Methods from ${here}`,
|
|
317
|
-
edges: forward.sort((a, b) => a.block.localeCompare(b.block)),
|
|
318
|
-
});
|
|
319
|
-
}
|
|
320
|
-
if (anywhere.length > 0) {
|
|
321
|
-
sections.push({
|
|
322
|
-
title: "Also on this page",
|
|
323
|
-
edges: anywhere.sort((a, b) => (a.label ?? a.block).localeCompare(b.label ?? b.block)),
|
|
324
|
-
});
|
|
325
|
-
}
|
|
326
|
-
if (navigate.length > 0) {
|
|
327
|
-
sections.push({
|
|
328
|
-
title: "Navigate",
|
|
329
|
-
edges: navigate.sort((a, b) => (a.label ?? a.block).localeCompare(b.label ?? b.block)),
|
|
330
|
-
});
|
|
331
|
-
}
|
|
332
|
-
if (back.length > 0) {
|
|
333
|
-
sections.push({
|
|
334
|
-
title: "Go back",
|
|
335
|
-
edges: back.sort((a, b) => a.block.localeCompare(b.block)),
|
|
336
|
-
});
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
const flat = sections.flatMap((s) => s.edges);
|
|
340
|
-
// Stuck screen: graph knows actions from `here` but none made it into the menu
|
|
341
|
-
// (failed library load, empty instanceOptions, etc.). Surface them so LoginPage
|
|
342
|
-
// never shows a dead "No moves" when submit-login is in the graph.
|
|
343
|
-
if (here !== null && flat.length === 0) {
|
|
344
|
-
const rescue = [];
|
|
345
|
-
const rescued = new Set();
|
|
346
|
-
for (const edge of graph.edges) {
|
|
347
|
-
if (edge.kind !== "action" || edge.from !== here)
|
|
348
|
-
continue;
|
|
349
|
-
if (rescued.has(edge.block))
|
|
350
|
-
continue;
|
|
351
|
-
const entry = library.byName.get(edge.block);
|
|
352
|
-
if (!entry)
|
|
353
|
-
continue;
|
|
354
|
-
if (entry.block.instanceOptions)
|
|
355
|
-
continue; // still need live rows
|
|
356
|
-
rescued.add(edge.block);
|
|
357
|
-
rescue.push(edge);
|
|
358
|
-
}
|
|
359
|
-
if (rescue.length > 0) {
|
|
360
|
-
sections.push({
|
|
361
|
-
title: `Methods from ${here}`,
|
|
362
|
-
edges: rescue.sort((a, b) => a.block.localeCompare(b.block)),
|
|
363
|
-
});
|
|
364
|
-
return { here, sections, flat: sections.flatMap((s) => s.edges) };
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
return { here, sections, flat };
|
|
368
|
-
}
|
|
369
|
-
export async function buildExploreContext(projectDir, opts) {
|
|
370
|
-
// Sequential: parallel import of the same *.block.ts tree raced Playwright's
|
|
371
|
-
// dual-copy guard in some installs and left graph edges without library entries
|
|
372
|
-
// (LoginPage → "No moves").
|
|
373
|
-
const library = await loadBlockLibrary(projectDir, opts);
|
|
374
|
-
const graph = await discoverGraph(projectDir, opts);
|
|
375
|
-
return { graph, library };
|
|
376
|
-
}
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import { AutoSession, type AutoSessionInit, type SessionSnapshot, type InspectDomOptions, type DomSnapshot, type TraceStep, type ApplyPathResult, type ConsoleLogEntry, type StorageSnapshot, type StubFileKind } from "./auto-session.js";
|
|
2
|
-
import type { PilotHighlightFixtures } from "./pilot-overlay.js";
|
|
3
|
-
export type { PilotHighlightFixtures, PilotFixtureRing } from "./pilot-overlay.js";
|
|
4
|
-
export interface SessionMeta {
|
|
5
|
-
sessionId: string;
|
|
6
|
-
socketPath: string;
|
|
7
|
-
pid: number;
|
|
8
|
-
projectDir: string;
|
|
9
|
-
startedAt: string;
|
|
10
|
-
headless: boolean;
|
|
11
|
-
}
|
|
12
|
-
export type StatusOrSendResponse = {
|
|
13
|
-
ok: true;
|
|
14
|
-
snapshot: SessionSnapshot;
|
|
15
|
-
quit: boolean;
|
|
16
|
-
} | {
|
|
17
|
-
ok: false;
|
|
18
|
-
error: string;
|
|
19
|
-
};
|
|
20
|
-
export type DomResponse = {
|
|
21
|
-
ok: true;
|
|
22
|
-
snapshot: DomSnapshot;
|
|
23
|
-
} | {
|
|
24
|
-
ok: false;
|
|
25
|
-
error: string;
|
|
26
|
-
};
|
|
27
|
-
export type TraceResponse = {
|
|
28
|
-
ok: true;
|
|
29
|
-
trace: TraceStep[];
|
|
30
|
-
} | {
|
|
31
|
-
ok: false;
|
|
32
|
-
error: string;
|
|
33
|
-
};
|
|
34
|
-
export type ConsoleResponse = {
|
|
35
|
-
ok: true;
|
|
36
|
-
consoleLog: ConsoleLogEntry[];
|
|
37
|
-
} | {
|
|
38
|
-
ok: false;
|
|
39
|
-
error: string;
|
|
40
|
-
};
|
|
41
|
-
export type StorageResponse = ({
|
|
42
|
-
ok: true;
|
|
43
|
-
} & StorageSnapshot) | {
|
|
44
|
-
ok: false;
|
|
45
|
-
error: string;
|
|
46
|
-
};
|
|
47
|
-
export type ReachResponse = ApplyPathResult;
|
|
48
|
-
export type HighlightResponse = {
|
|
49
|
-
ok: true;
|
|
50
|
-
painted: number;
|
|
51
|
-
missing: string[];
|
|
52
|
-
snapshot: SessionSnapshot;
|
|
53
|
-
} | {
|
|
54
|
-
ok: false;
|
|
55
|
-
error: string;
|
|
56
|
-
};
|
|
57
|
-
export declare function readSessionMeta(projectDir: string, sessionId: string): SessionMeta | null;
|
|
58
|
-
/**
|
|
59
|
-
* Resolve session metadata from a project hint (cwd) or the global registry.
|
|
60
|
-
* Fixes "session unreachable" when the agent calls status/send from a different
|
|
61
|
-
* directory or pane than the one that ran `pilot start`.
|
|
62
|
-
*/
|
|
63
|
-
export declare function resolveSessionMeta(sessionId: string, projectDirHint?: string): SessionMeta | null;
|
|
64
|
-
/**
|
|
65
|
-
* Client-side: sends one request to a running session and returns its
|
|
66
|
-
* response. Reports a stale/unreachable session as an error within
|
|
67
|
-
* `timeoutMs`, never hangs indefinitely.
|
|
68
|
-
*/
|
|
69
|
-
export declare function requestSession(projectDir: string, sessionId: string, request: {
|
|
70
|
-
op: "status";
|
|
71
|
-
} | {
|
|
72
|
-
op: "send";
|
|
73
|
-
pick: string;
|
|
74
|
-
} | {
|
|
75
|
-
op: "click";
|
|
76
|
-
selector: string;
|
|
77
|
-
} | {
|
|
78
|
-
op: "type";
|
|
79
|
-
selector: string;
|
|
80
|
-
text: string;
|
|
81
|
-
} | {
|
|
82
|
-
op: "press";
|
|
83
|
-
selector: string;
|
|
84
|
-
key: string;
|
|
85
|
-
} | {
|
|
86
|
-
op: "goto";
|
|
87
|
-
url: string;
|
|
88
|
-
} | {
|
|
89
|
-
op: "reload";
|
|
90
|
-
} | {
|
|
91
|
-
op: "resync";
|
|
92
|
-
} | {
|
|
93
|
-
op: "upload";
|
|
94
|
-
selector: string;
|
|
95
|
-
stub: StubFileKind | {
|
|
96
|
-
filePath: string;
|
|
97
|
-
};
|
|
98
|
-
}, timeoutMs?: number): Promise<StatusOrSendResponse>;
|
|
99
|
-
export declare function requestSession(projectDir: string, sessionId: string, request: {
|
|
100
|
-
op: "dom";
|
|
101
|
-
} & InspectDomOptions, timeoutMs?: number): Promise<DomResponse>;
|
|
102
|
-
export declare function requestSession(projectDir: string, sessionId: string, request: {
|
|
103
|
-
op: "trace";
|
|
104
|
-
}, timeoutMs?: number): Promise<TraceResponse>;
|
|
105
|
-
export declare function requestSession(projectDir: string, sessionId: string, request: {
|
|
106
|
-
op: "console";
|
|
107
|
-
}, timeoutMs?: number): Promise<ConsoleResponse>;
|
|
108
|
-
export declare function requestSession(projectDir: string, sessionId: string, request: {
|
|
109
|
-
op: "storage";
|
|
110
|
-
}, timeoutMs?: number): Promise<StorageResponse>;
|
|
111
|
-
export declare function requestSession(projectDir: string, sessionId: string, request: {
|
|
112
|
-
op: "reach";
|
|
113
|
-
checkpoint: string;
|
|
114
|
-
}, timeoutMs?: number): Promise<ReachResponse>;
|
|
115
|
-
export declare function requestSession(projectDir: string, sessionId: string, request: {
|
|
116
|
-
op: "highlight";
|
|
117
|
-
} & PilotHighlightFixtures, timeoutMs?: number): Promise<HighlightResponse>;
|
|
118
|
-
/**
|
|
119
|
-
* Server-side: runs `session` behind a unix socket at
|
|
120
|
-
* `.waygraph-auto/<sessionId>.sock`, writing session metadata only once the
|
|
121
|
-
* socket is actually listening (the metadata file's existence is the
|
|
122
|
-
* "session is ready" signal a spawning parent polls for). Requests are
|
|
123
|
-
* processed one at a time via a queue - Node's single-threaded event loop
|
|
124
|
-
* already prevents true parallelism, but two overlapping `await`-heavy
|
|
125
|
-
* handlers could still interleave against the same page/mem.
|
|
126
|
-
*/
|
|
127
|
-
export declare function serveSession(session: AutoSession, projectDir: string, sessionId: string, headless?: boolean): Promise<void>;
|
|
128
|
-
/** Entry point for the hidden `__auto-serve` CLI command (runs in the detached child). */
|
|
129
|
-
export declare function runAutoServeCommand(init: AutoSessionInit, sessionId: string): Promise<void>;
|
|
130
|
-
/**
|
|
131
|
-
* Parent-side: spawns a detached background process running the same
|
|
132
|
-
* explore session as a socket server, waits for it to signal readiness (its
|
|
133
|
-
* metadata file appearing), and returns its identity. Recurses through the
|
|
134
|
-
* existing `bin/waygraph` launcher (same tsx/esm registration every other
|
|
135
|
-
* invocation already gets) with the hidden `__auto-serve` command, rather
|
|
136
|
-
* than re-implementing that resolution here.
|
|
137
|
-
*/
|
|
138
|
-
export declare function spawnDetachedSession(init: AutoSessionInit, readyTimeoutMs?: number): Promise<SessionMeta>;
|
|
139
|
-
/** Stop one detached session (SIGTERM + cleanup metadata/socket). */
|
|
140
|
-
export declare function stopBrowserSession(projectDir: string, sessionId: string): boolean;
|
|
141
|
-
/** Stop every live session registered for a project. */
|
|
142
|
-
export declare function stopAllBrowserSessions(projectDir: string): number;
|
|
143
|
-
/** Live browser sessions for a project (metadata + socket + pid still present). */
|
|
144
|
-
export declare function listBrowserSessions(projectDir: string): SessionMeta[];
|
|
145
|
-
/**
|
|
146
|
-
* Client-only interactive loop against a running detached session - reopens
|
|
147
|
-
* the same rendering/parsing the foreground `--cli` loop uses, driven purely
|
|
148
|
-
* through `status`/`send`. No server-side support beyond those two ops.
|
|
149
|
-
*/
|
|
150
|
-
export declare function runAttachLoop(projectDir: string, sessionId: string): Promise<void>;
|