spana-test 0.16.0 → 0.19.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 +11 -0
- package/dist/accessibility-audit-IWTD2HPR.js +17 -0
- package/dist/agent/index.js +36 -33
- package/dist/agent/index.js.map +1 -1
- package/dist/{agent-fixture-H6GOUHNX.js → agent-fixture-WQVCNL73.js} +4 -3
- package/dist/{allure-XOM7BXL5.js → allure-LF4CALKP.js} +3 -2
- package/dist/{allure-XOM7BXL5.js.map → allure-LF4CALKP.js.map} +1 -1
- package/dist/{android-C2S4B4TH.js → android-TPO53H5Q.js} +4 -3
- package/dist/api/app.d.ts +79 -14
- package/dist/api/app.d.ts.map +1 -1
- package/dist/api/expect.d.ts +3 -0
- package/dist/api/expect.d.ts.map +1 -1
- package/dist/api/flow.d.ts +37 -14
- package/dist/api/flow.d.ts.map +1 -1
- package/dist/app-LGNFQMU7.js +17 -0
- package/dist/{appium-CC77BJNK.js → appium-2PJWZXJI.js} +64 -64
- package/dist/{appium-CC77BJNK.js.map → appium-2PJWZXJI.js.map} +1 -1
- package/dist/{appium-server-M6CWWUWF.js → appium-server-CCTQQGTV.js} +3 -2
- package/dist/{appium-server-M6CWWUWF.js.map → appium-server-CCTQQGTV.js.map} +1 -1
- package/dist/{baseline-manager-LVUVH2MJ.js → baseline-manager-XJ3LADKC.js} +3 -2
- package/dist/{baseline-manager-LVUVH2MJ.js.map → baseline-manager-XJ3LADKC.js.map} +1 -1
- package/dist/bridge-server-X5W4PCAR.js +13 -0
- package/dist/cache-command-OMV6DPC7.js +13 -0
- package/dist/channels/cdp-client.d.ts +15 -2
- package/dist/channels/cdp-client.d.ts.map +1 -1
- package/dist/channels/dom-channel.d.ts +31 -2
- package/dist/channels/dom-channel.d.ts.map +1 -1
- package/dist/{chunk-WJH5K42V.js → chunk-3HQKY24K.js} +4 -3
- package/dist/{chunk-WJH5K42V.js.map → chunk-3HQKY24K.js.map} +1 -1
- package/dist/{chunk-WBCAF7SC.js → chunk-3ONT32BO.js} +314 -182
- package/dist/chunk-3ONT32BO.js.map +1 -0
- package/dist/{chunk-HIEOI3WN.js → chunk-44U3F2RY.js} +264 -54
- package/dist/chunk-44U3F2RY.js.map +1 -0
- package/dist/{chunk-FHCOPLYB.js → chunk-4TTYSFBG.js} +4 -2
- package/dist/chunk-4TTYSFBG.js.map +1 -0
- package/dist/{chunk-4LJ3KYCX.js → chunk-5DSPPJ76.js} +4 -3
- package/dist/{chunk-4LJ3KYCX.js.map → chunk-5DSPPJ76.js.map} +1 -1
- package/dist/{accessibility-audit-F5KLUHLS.js → chunk-5TAHLRZD.js} +8 -5
- package/dist/chunk-5TAHLRZD.js.map +1 -0
- package/dist/chunk-67PLJEY2.js +24645 -0
- package/dist/chunk-67PLJEY2.js.map +1 -0
- package/dist/{chunk-JRGJTUPS.js → chunk-6X2SK2XO.js} +5 -4
- package/dist/{chunk-JRGJTUPS.js.map → chunk-6X2SK2XO.js.map} +1 -1
- package/dist/{chunk-CA66JCX2.js → chunk-7K24Q7V3.js} +976 -219
- package/dist/chunk-7K24Q7V3.js.map +1 -0
- package/dist/{chunk-2MA5G2VH.js → chunk-AGG2RJGU.js} +4 -3
- package/dist/{chunk-2MA5G2VH.js.map → chunk-AGG2RJGU.js.map} +1 -1
- package/dist/{chunk-LGFTUVN4.js → chunk-AP5SGSO7.js} +49 -48
- package/dist/{chunk-LGFTUVN4.js.map → chunk-AP5SGSO7.js.map} +1 -1
- package/dist/{chunk-NWGA3R2E.js → chunk-B4FOISOF.js} +3 -2
- package/dist/{chunk-NWGA3R2E.js.map → chunk-B4FOISOF.js.map} +1 -1
- package/dist/{chunk-7Q7TSUNL.js → chunk-B6NTHBPF.js} +3 -2
- package/dist/{chunk-7Q7TSUNL.js.map → chunk-B6NTHBPF.js.map} +1 -1
- package/dist/{chunk-7WHQIQPM.js → chunk-BPUBV7OF.js} +7 -4
- package/dist/chunk-BPUBV7OF.js.map +1 -0
- package/dist/{chunk-62SDNQKK.js → chunk-C2YM5GNF.js} +33 -32
- package/dist/{chunk-62SDNQKK.js.map → chunk-C2YM5GNF.js.map} +1 -1
- package/dist/{chunk-HJZT6YOA.js → chunk-C7HZJIGQ.js} +6 -5
- package/dist/{chunk-HJZT6YOA.js.map → chunk-C7HZJIGQ.js.map} +1 -1
- package/dist/{chunk-GMEVJQTT.js → chunk-CQ67PB3R.js} +5 -4
- package/dist/{chunk-GMEVJQTT.js.map → chunk-CQ67PB3R.js.map} +1 -1
- package/dist/{chunk-GDVHJBR2.js → chunk-CZAFFUMN.js} +5 -4
- package/dist/{chunk-GDVHJBR2.js.map → chunk-CZAFFUMN.js.map} +1 -1
- package/dist/{chunk-4TYO6O7T.js → chunk-DNWVDGKS.js} +46 -45
- package/dist/{chunk-4TYO6O7T.js.map → chunk-DNWVDGKS.js.map} +1 -1
- package/dist/{chunk-5WPPWTC3.js → chunk-E67QUGT3.js} +1888 -675
- package/dist/chunk-E67QUGT3.js.map +1 -0
- package/dist/{chunk-FSPMFRJO.js → chunk-FBJPNZUN.js} +3 -2
- package/dist/{chunk-FSPMFRJO.js.map → chunk-FBJPNZUN.js.map} +1 -1
- package/dist/{chunk-EA7DZ5TN.js → chunk-FLPPA2XY.js} +40 -5
- package/dist/chunk-FLPPA2XY.js.map +1 -0
- package/dist/{chunk-UZU7VYKN.js → chunk-FZ7EMXIM.js} +289 -125
- package/dist/chunk-FZ7EMXIM.js.map +1 -0
- package/dist/{chunk-ZCSH3QKX.js → chunk-G4ZUJCEN.js} +1518 -1069
- package/dist/chunk-G4ZUJCEN.js.map +1 -0
- package/dist/{chunk-X5FRYDZ3.js → chunk-GACJRITH.js} +4 -3
- package/dist/{chunk-X5FRYDZ3.js.map → chunk-GACJRITH.js.map} +1 -1
- package/dist/{chunk-K4K2ACT2.js → chunk-IC46FAEW.js} +8 -7
- package/dist/chunk-IC46FAEW.js.map +1 -0
- package/dist/{chunk-7O5YXVCD.js → chunk-IJWAAODK.js} +4 -3
- package/dist/{chunk-7O5YXVCD.js.map → chunk-IJWAAODK.js.map} +1 -1
- package/dist/{chunk-MUMIMDRJ.js → chunk-IKMNHITS.js} +3 -2
- package/dist/{chunk-MUMIMDRJ.js.map → chunk-IKMNHITS.js.map} +1 -1
- package/dist/{chunk-6C2EILMC.js → chunk-KIDTBRIV.js} +47 -7
- package/dist/chunk-KIDTBRIV.js.map +1 -0
- package/dist/{chunk-TFEXYI6N.js → chunk-KRTQZPYL.js} +3 -2
- package/dist/{chunk-TFEXYI6N.js.map → chunk-KRTQZPYL.js.map} +1 -1
- package/dist/{chunk-HWS3XUEF.js → chunk-LX6GMZIN.js} +8 -7
- package/dist/{chunk-HWS3XUEF.js.map → chunk-LX6GMZIN.js.map} +1 -1
- package/dist/{chunk-MPJCUL2B.js → chunk-MQRGWQI5.js} +3 -2
- package/dist/{chunk-MPJCUL2B.js.map → chunk-MQRGWQI5.js.map} +1 -1
- package/dist/{chunk-7K7WVTFZ.js → chunk-NC32K762.js} +75 -74
- package/dist/{chunk-7K7WVTFZ.js.map → chunk-NC32K762.js.map} +1 -1
- package/dist/{chunk-ZIETAMAD.js → chunk-NQYTD3JG.js} +3 -2
- package/dist/{chunk-ZIETAMAD.js.map → chunk-NQYTD3JG.js.map} +1 -1
- package/dist/{chunk-KIFNHFFI.js → chunk-NR4QAM5W.js} +335 -69
- package/dist/chunk-NR4QAM5W.js.map +1 -0
- package/dist/{chunk-YFTHJRDO.js → chunk-ODRB22QA.js} +3 -2
- package/dist/{chunk-YFTHJRDO.js.map → chunk-ODRB22QA.js.map} +1 -1
- package/dist/{chunk-HNQLWFHL.js → chunk-OYME74M3.js} +3 -2
- package/dist/{chunk-HNQLWFHL.js.map → chunk-OYME74M3.js.map} +1 -1
- package/dist/chunk-PS3DALTI.js +17 -0
- package/dist/chunk-PS3DALTI.js.map +1 -0
- package/dist/{chunk-UKUXNFQP.js → chunk-QU365GZA.js} +3 -2
- package/dist/{chunk-UKUXNFQP.js.map → chunk-QU365GZA.js.map} +1 -1
- package/dist/{chunk-HIGFQRWM.js → chunk-R52P4KQC.js} +3 -2
- package/dist/{chunk-HIGFQRWM.js.map → chunk-R52P4KQC.js.map} +1 -1
- package/dist/{chunk-U56N5JCJ.js → chunk-RL3ICBAB.js} +3 -2
- package/dist/{chunk-U56N5JCJ.js.map → chunk-RL3ICBAB.js.map} +1 -1
- package/dist/{chunk-HUYC4OAL.js → chunk-RQRJ2I2Z.js} +3 -2
- package/dist/{chunk-HUYC4OAL.js.map → chunk-RQRJ2I2Z.js.map} +1 -1
- package/dist/{chunk-NXET4BFJ.js → chunk-SPGD4QGA.js} +3 -2
- package/dist/{chunk-NXET4BFJ.js.map → chunk-SPGD4QGA.js.map} +1 -1
- package/dist/{chunk-XVL4FHXA.js → chunk-T46S4VA3.js} +3 -2
- package/dist/{chunk-XVL4FHXA.js.map → chunk-T46S4VA3.js.map} +1 -1
- package/dist/{chunk-RIXZISMX.js → chunk-V6PEMZCL.js} +3 -2
- package/dist/{chunk-RIXZISMX.js.map → chunk-V6PEMZCL.js.map} +1 -1
- package/dist/{chunk-FTXUQMGH.js → chunk-VBAPZMPX.js} +2 -1
- package/dist/{chunk-FTXUQMGH.js.map → chunk-VBAPZMPX.js.map} +1 -1
- package/dist/{chunk-DMF2BPPA.js → chunk-VILLVGBP.js} +3 -2
- package/dist/{chunk-DMF2BPPA.js.map → chunk-VILLVGBP.js.map} +1 -1
- package/dist/{chunk-NHT3XSX3.js → chunk-XGXOE3DF.js} +3 -2
- package/dist/{chunk-NHT3XSX3.js.map → chunk-XGXOE3DF.js.map} +1 -1
- package/dist/{chunk-PRQTAIYA.js → chunk-XPEWAHAK.js} +4 -3
- package/dist/{chunk-PRQTAIYA.js.map → chunk-XPEWAHAK.js.map} +1 -1
- package/dist/{chunk-GLNTGHR6.js → chunk-YKNHKVE6.js} +49 -40
- package/dist/chunk-YKNHKVE6.js.map +1 -0
- package/dist/{chunk-XD6A3VXB.js → chunk-Z5BMFLZ5.js} +8 -7
- package/dist/chunk-Z5BMFLZ5.js.map +1 -0
- package/dist/cli/test-command.d.ts +2 -0
- package/dist/cli/test-command.d.ts.map +1 -1
- package/dist/cli.js +102 -35
- package/dist/cli.js.map +1 -1
- package/dist/cloud/common.d.ts.map +1 -1
- package/dist/{compiler-44UW2FID.js → compiler-UOVKUQHE.js} +4 -3
- package/dist/{compiler-44UW2FID.js.map → compiler-UOVKUQHE.js.map} +1 -1
- package/dist/config-loader-MX232REU.js +11 -0
- package/dist/{console-T6TVZ65G.js → console-OHKVJLW3.js} +39 -6
- package/dist/console-OHKVJLW3.js.map +1 -0
- package/dist/core/accessibility-audit.d.ts.map +1 -1
- package/dist/core/engine.d.ts +1 -1
- package/dist/core/engine.d.ts.map +1 -1
- package/dist/core/orchestrator.d.ts +1 -0
- package/dist/core/orchestrator.d.ts.map +1 -1
- package/dist/core/projects.d.ts +10 -6
- package/dist/core/projects.d.ts.map +1 -1
- package/dist/core/rejections.d.ts +5 -0
- package/dist/core/rejections.d.ts.map +1 -0
- package/dist/core/screenshot-compare.d.ts +7 -2
- package/dist/core/screenshot-compare.d.ts.map +1 -1
- package/dist/core/video-recorder.d.ts.map +1 -1
- package/dist/{daemon-manager-2SK5PHJR.js → daemon-manager-6CFUXGTR.js} +4 -3
- package/dist/discover-AHMM7QLN.js +16 -0
- package/dist/{doctor-command-UUQ4RFMK.js → doctor-command-YTT5SMQW.js} +18 -16
- package/dist/{doctor-command-UUQ4RFMK.js.map → doctor-command-YTT5SMQW.js.map} +1 -1
- package/dist/driver-AN3I4H6O.js +21 -0
- package/dist/driver-X4FWTDNU.js +20 -0
- package/dist/drivers/cdp-browser.d.ts +36 -2
- package/dist/drivers/cdp-browser.d.ts.map +1 -1
- package/dist/drivers/cdp-embed.d.ts +104 -0
- package/dist/drivers/cdp-embed.d.ts.map +1 -0
- package/dist/drivers/electron.d.ts +0 -8
- package/dist/drivers/electron.d.ts.map +1 -1
- package/dist/drivers/playwright.d.ts +18 -7
- package/dist/drivers/playwright.d.ts.map +1 -1
- package/dist/drivers/raw-driver.d.ts +36 -3
- package/dist/drivers/raw-driver.d.ts.map +1 -1
- package/dist/electrobun-OUTYOM5G.js +17 -0
- package/dist/electron-XL7H25IQ.js +10 -0
- package/dist/{filters-5DCGGJRN.js → filters-6W73R3IV.js} +4 -3
- package/dist/gherkin/steps.js +3 -2
- package/dist/gherkin/steps.js.map +1 -1
- package/dist/github-pr-XZZZ3YE6.js +11 -0
- package/dist/{html-KJ2QAGF4.js → html-GDWXFYFL.js} +4 -3
- package/dist/{html-KJ2QAGF4.js.map → html-GDWXFYFL.js.map} +1 -1
- package/dist/index.d.ts +8 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +237 -122
- package/dist/index.js.map +1 -1
- package/dist/{init-command-V5VGN3IS.js → init-command-PYZ5X6M5.js} +3 -2
- package/dist/{init-command-V5VGN3IS.js.map → init-command-PYZ5X6M5.js.map} +1 -1
- package/dist/{init-flow-command-INYUCC6N.js → init-flow-command-SLLEGSRZ.js} +4 -3
- package/dist/{init-flow-command-INYUCC6N.js.map → init-flow-command-SLLEGSRZ.js.map} +1 -1
- package/dist/installer-3X5SKWVX.js +18 -0
- package/dist/{installer-DMTY47SI.js → installer-Q37BOG5G.js} +6 -5
- package/dist/{ios-SZ4RBI7Q.js → ios-YFRAK2CL.js} +5 -4
- package/dist/{json-67HY4VQK.js → json-QVHG6I3O.js} +3 -2
- package/dist/{json-67HY4VQK.js.map → json-QVHG6I3O.js.map} +1 -1
- package/dist/{junit-MHD5AXBU.js → junit-G5LNOYUL.js} +3 -2
- package/dist/{junit-MHD5AXBU.js.map → junit-G5LNOYUL.js.map} +1 -1
- package/dist/local-UWIYOREU.js +40 -0
- package/dist/{machine-NOOFRT45.js → machine-VEVBT2GU.js} +4 -3
- package/dist/pagesource-GQLIXL5R.js +10 -0
- package/dist/pagesource-HKLE3FZN.js +10 -0
- package/dist/playwright-KBWUBU5S.js +30 -0
- package/dist/provider-HWM3GF54.js +14 -0
- package/dist/{redact-OG4M3IEU.js → redact-YWR6GHBX.js} +3 -2
- package/dist/{redact-OG4M3IEU.js.map → redact-YWR6GHBX.js.map} +1 -1
- package/dist/report/console.d.ts +2 -0
- package/dist/report/console.d.ts.map +1 -1
- package/dist/report/types.d.ts +2 -0
- package/dist/report/types.d.ts.map +1 -1
- package/dist/{runner-ABGUVOJG.js → runner-P2BFG4VZ.js} +4 -3
- package/dist/runtime/daemon-manager.d.ts.map +1 -1
- package/dist/runtime/local.d.ts +17 -0
- package/dist/runtime/local.d.ts.map +1 -1
- package/dist/runtime/web-server.d.ts +5 -1
- package/dist/runtime/web-server.d.ts.map +1 -1
- package/dist/schemas/config.d.ts +78 -6
- package/dist/schemas/config.d.ts.map +1 -1
- package/dist/schemas/selector.d.ts +6 -2
- package/dist/schemas/selector.d.ts.map +1 -1
- package/dist/screenshot-compare-DNIP2EK4.js +15 -0
- package/dist/{server-RTDMJIQZ.js → server-BS3O4WVU.js} +42 -39
- package/dist/{server-RTDMJIQZ.js.map → server-BS3O4WVU.js.map} +1 -1
- package/dist/server-CWCMC244.js +15 -0
- package/dist/session-YWYRRXXR.js +42 -0
- package/dist/smart/auto-wait.d.ts.map +1 -1
- package/dist/smart/channel-resolver.d.ts +4 -0
- package/dist/smart/channel-resolver.d.ts.map +1 -1
- package/dist/smart/coordinator.d.ts +12 -2
- package/dist/smart/coordinator.d.ts.map +1 -1
- package/dist/smart/diagnostics.d.ts.map +1 -1
- package/dist/smart/element-matcher.d.ts.map +1 -1
- package/dist/{studio-command-PZHMLCKE.js → studio-command-XJDGLNAJ.js} +4 -3
- package/dist/{studio-command-PZHMLCKE.js.map → studio-command-XJDGLNAJ.js.map} +1 -1
- package/dist/{test-command-FJOP2GYD.js → test-command-3IRGNEPB.js} +518 -88
- package/dist/test-command-3IRGNEPB.js.map +1 -0
- package/dist/validator-6XP3PGCP.js +18 -0
- package/dist/watch-mode-HWZ4XCKH.js +11 -0
- package/dist/watch-mode-HWZ4XCKH.js.map +1 -0
- package/native/darwin-arm64/libspana_native.dylib +0 -0
- package/native/darwin-x64/libspana_native.dylib +0 -0
- package/native/linux-arm64/libspana_native.so +0 -0
- package/native/linux-x64/libspana_native.so +0 -0
- package/native/win32-x64/spana_native.dll +0 -0
- package/package.json +15 -6
- package/studio-dist/assets/{index-DXGUfzm3.js → index-DAE7R_Zp.js} +1 -1
- package/studio-dist/index.html +1 -1
- package/dist/accessibility-audit-F5KLUHLS.js.map +0 -1
- package/dist/app-C353NGBT.js +0 -13
- package/dist/bridge-server-S3DHK7XE.js +0 -12
- package/dist/cache-command-OL7HUK2K.js +0 -12
- package/dist/chunk-5WPPWTC3.js.map +0 -1
- package/dist/chunk-6C2EILMC.js.map +0 -1
- package/dist/chunk-7WHQIQPM.js.map +0 -1
- package/dist/chunk-A7Z52TDQ.js +0 -97
- package/dist/chunk-A7Z52TDQ.js.map +0 -1
- package/dist/chunk-CA66JCX2.js.map +0 -1
- package/dist/chunk-EA7DZ5TN.js.map +0 -1
- package/dist/chunk-FHCOPLYB.js.map +0 -1
- package/dist/chunk-GLNTGHR6.js.map +0 -1
- package/dist/chunk-HIEOI3WN.js.map +0 -1
- package/dist/chunk-K4K2ACT2.js.map +0 -1
- package/dist/chunk-KIFNHFFI.js.map +0 -1
- package/dist/chunk-UZU7VYKN.js.map +0 -1
- package/dist/chunk-WBCAF7SC.js.map +0 -1
- package/dist/chunk-XD6A3VXB.js.map +0 -1
- package/dist/chunk-ZCSH3QKX.js.map +0 -1
- package/dist/config-loader-TSADVSBY.js +0 -10
- package/dist/console-T6TVZ65G.js.map +0 -1
- package/dist/discover-6ULCTB5T.js +0 -15
- package/dist/driver-3HBDKESK.js +0 -19
- package/dist/driver-LKXSKNG3.js +0 -19
- package/dist/electrobun-HILYDIJ3.js +0 -15
- package/dist/electron-SQACDON3.js +0 -9
- package/dist/github-pr-RYO6IAKD.js +0 -10
- package/dist/installer-KL2NCILK.js +0 -17
- package/dist/local-J2NC6YKI.js +0 -30
- package/dist/pagesource-KIQ5T5MA.js +0 -9
- package/dist/pagesource-KKG7WMFJ.js +0 -9
- package/dist/playwright-JMHCABDJ.js +0 -28
- package/dist/provider-CBAXZ2VA.js +0 -12
- package/dist/screenshot-compare-BJRJHKNQ.js +0 -12
- package/dist/server-RHAHCANZ.js +0 -14
- package/dist/session-7CWHTQ2E.js +0 -39
- package/dist/test-command-FJOP2GYD.js.map +0 -1
- package/dist/validator-AJNOFBQM.js +0 -17
- package/dist/watch-mode-NR5MHNNL.js +0 -10
- /package/dist/{agent-fixture-H6GOUHNX.js.map → accessibility-audit-IWTD2HPR.js.map} +0 -0
- /package/dist/{android-C2S4B4TH.js.map → agent-fixture-WQVCNL73.js.map} +0 -0
- /package/dist/{app-C353NGBT.js.map → android-TPO53H5Q.js.map} +0 -0
- /package/dist/{bridge-server-S3DHK7XE.js.map → app-LGNFQMU7.js.map} +0 -0
- /package/dist/{cache-command-OL7HUK2K.js.map → bridge-server-X5W4PCAR.js.map} +0 -0
- /package/dist/{config-loader-TSADVSBY.js.map → cache-command-OMV6DPC7.js.map} +0 -0
- /package/dist/{daemon-manager-2SK5PHJR.js.map → config-loader-MX232REU.js.map} +0 -0
- /package/dist/{discover-6ULCTB5T.js.map → daemon-manager-6CFUXGTR.js.map} +0 -0
- /package/dist/{driver-3HBDKESK.js.map → discover-AHMM7QLN.js.map} +0 -0
- /package/dist/{driver-LKXSKNG3.js.map → driver-AN3I4H6O.js.map} +0 -0
- /package/dist/{electrobun-HILYDIJ3.js.map → driver-X4FWTDNU.js.map} +0 -0
- /package/dist/{electron-SQACDON3.js.map → electrobun-OUTYOM5G.js.map} +0 -0
- /package/dist/{filters-5DCGGJRN.js.map → electron-XL7H25IQ.js.map} +0 -0
- /package/dist/{github-pr-RYO6IAKD.js.map → filters-6W73R3IV.js.map} +0 -0
- /package/dist/{installer-DMTY47SI.js.map → github-pr-XZZZ3YE6.js.map} +0 -0
- /package/dist/{installer-KL2NCILK.js.map → installer-3X5SKWVX.js.map} +0 -0
- /package/dist/{ios-SZ4RBI7Q.js.map → installer-Q37BOG5G.js.map} +0 -0
- /package/dist/{local-J2NC6YKI.js.map → ios-YFRAK2CL.js.map} +0 -0
- /package/dist/{machine-NOOFRT45.js.map → local-UWIYOREU.js.map} +0 -0
- /package/dist/{pagesource-KIQ5T5MA.js.map → machine-VEVBT2GU.js.map} +0 -0
- /package/dist/{pagesource-KKG7WMFJ.js.map → pagesource-GQLIXL5R.js.map} +0 -0
- /package/dist/{playwright-JMHCABDJ.js.map → pagesource-HKLE3FZN.js.map} +0 -0
- /package/dist/{provider-CBAXZ2VA.js.map → playwright-KBWUBU5S.js.map} +0 -0
- /package/dist/{runner-ABGUVOJG.js.map → provider-HWM3GF54.js.map} +0 -0
- /package/dist/{screenshot-compare-BJRJHKNQ.js.map → runner-P2BFG4VZ.js.map} +0 -0
- /package/dist/{server-RHAHCANZ.js.map → screenshot-compare-DNIP2EK4.js.map} +0 -0
- /package/dist/{session-7CWHTQ2E.js.map → server-CWCMC244.js.map} +0 -0
- /package/dist/{validator-AJNOFBQM.js.map → session-YWYRRXXR.js.map} +0 -0
- /package/dist/{watch-mode-NR5MHNNL.js.map → validator-6XP3PGCP.js.map} +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { createRequire as __spanaCreateRequire } from "node:module"; const require = __spanaCreateRequire(import.meta.url);
|
|
1
2
|
import {
|
|
2
3
|
init_esm_shims
|
|
3
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VBAPZMPX.js";
|
|
4
5
|
|
|
5
6
|
// src/core/filters.ts
|
|
6
7
|
init_esm_shims();
|
|
@@ -613,4 +614,4 @@ export {
|
|
|
613
614
|
applyTestFilters,
|
|
614
615
|
formatFilterSummary
|
|
615
616
|
};
|
|
616
|
-
//# sourceMappingURL=chunk-
|
|
617
|
+
//# sourceMappingURL=chunk-FBJPNZUN.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/core/filters.ts"],"sourcesContent":["import { execFileSync } from \"node:child_process\";\nimport { readFileSync, existsSync, statSync } from \"node:fs\";\nimport { basename, dirname, relative, resolve } from \"node:path\";\nimport type { FlowDefinition } from \"../api/flow.js\";\nimport type { Platform } from \"../schemas/selector.js\";\n\n/** A file changed between `baseRef` and `HEAD` (or working tree). */\nexport interface ChangedFile {\n path: string;\n status: \"A\" | \"M\" | \"D\" | \"R\" | \"C\" | string;\n}\n\n/** Git diff snapshot provided to test filters when `--changed-since <ref>` is active. */\nexport interface GitChanges {\n baseRef: string;\n mergeBase?: string;\n files: string[];\n entries: ChangedFile[];\n /** Unified diff text (truncated when exceeding `maxDiffBytes`). */\n diff: string;\n /** Full byte length of the raw diff before truncation. */\n diffBytes: number;\n /** True when the diff exceeded the configured safety cap. */\n truncated: boolean;\n}\n\n/** Descriptor for a candidate flow passed into a `TestFilter`. */\nexport interface FilterCandidate {\n id: string;\n name: string;\n file: string;\n tags: string[];\n platforms?: Platform[];\n source?: string;\n}\n\n/** Context supplied to every `TestFilter.filter()` invocation. */\nexport interface FilterContext {\n cwd: string;\n changes: GitChanges;\n configPath?: string;\n platforms: Platform[];\n}\n\nexport interface FilterUsage {\n calls?: number;\n tokens?: number;\n costUsd?: number;\n}\n\nexport interface FilterDecisionOutput {\n /** Map of candidate `id` -> human-readable skip reason. Any ID not present is kept. */\n exclude: Record<string, string>;\n /** Optional summary note displayed next to the filter output. */\n note?: string;\n /** Optional model/API usage metrics for summary logging. */\n usage?: FilterUsage;\n}\n\n/**\n * Pluggable CI test filter inspired by `e2e-inc/e2e`'s Filters API.\n * Compose deterministic path/tag rules or plug in a decision model / LLM.\n */\nexport interface TestFilter {\n name: string;\n filter(\n flows: FilterCandidate[],\n context: FilterContext,\n ): Promise<FilterDecisionOutput> | FilterDecisionOutput;\n}\n\nexport interface AppliedFilterReport {\n filterName: string;\n total: number;\n kept: number;\n excluded: number;\n note?: string;\n usage?: FilterUsage;\n failedOpen?: boolean;\n}\n\nexport interface ApplyFiltersResult<T> {\n kept: T[];\n excluded: Array<{ item: T; candidate: FilterCandidate; filterName: string; reason: string }>;\n reports: AppliedFilterReport[];\n}\n\nconst DEFAULT_LOCKFILES = new Set([\n \"bun.lock\",\n \"bun.lockb\",\n \"package.json\",\n \"package-lock.json\",\n \"pnpm-lock.yaml\",\n \"yarn.lock\",\n]);\n\nconst DEFAULT_MAX_DIFF_BYTES = 60 * 1024; // 60 kB fail-open safety ceiling\n\nfunction normalizePath(p: string): string {\n return p.replaceAll(\"\\\\\", \"/\").replace(/^\\.\\//, \"\");\n}\n\nfunction isConfigOrLockfile(filePath: string, configPath?: string): boolean {\n const norm = normalizePath(filePath);\n const name = basename(norm);\n if (DEFAULT_LOCKFILES.has(name)) return true;\n if (/^spana\\.config(\\.[^.]+)?\\.(ts|mts|js|mjs|cjs)$/.test(name)) return true;\n if (configPath && normalizePath(configPath).endsWith(norm)) return true;\n return false;\n}\n\n/**\n * Collect changed files and unified diff relative to `baseRef` using `git merge-base`.\n * Fails cleanly if git is unavailable or `baseRef` does not exist (shallow checkout).\n */\nexport function collectGitChanges(\n baseRef: string,\n cwd: string = process.cwd(),\n maxDiffBytes: number = DEFAULT_MAX_DIFF_BYTES,\n runGit?: (args: string[], workdir: string) => string,\n): GitChanges {\n const execGit =\n runGit ??\n ((args: string[], workdir: string) =>\n execFileSync(\"git\", args, {\n cwd: workdir,\n encoding: \"utf-8\",\n maxBuffer: 16 * 1024 * 1024,\n stdio: [\"ignore\", \"pipe\", \"pipe\"],\n }));\n\n let mergeBase: string | undefined;\n try {\n mergeBase = execGit([\"merge-base\", baseRef, \"HEAD\"], cwd).trim() || undefined;\n } catch {\n mergeBase = undefined;\n }\n\n const diffRange = mergeBase ? `${mergeBase}...HEAD` : baseRef;\n const nameStatusRaw = execGit([\"diff\", \"--name-status\", diffRange], cwd);\n const entries: ChangedFile[] = [];\n const files: string[] = [];\n\n for (const line of nameStatusRaw.split(\"\\n\")) {\n const trimmed = line.trim();\n if (!trimmed) continue;\n const parts = trimmed.split(/\\t+/);\n const status = parts[0]?.[0] ?? \"M\";\n // For renames (R100 old new), include the destination path\n const filePath = normalizePath(parts[parts.length - 1] ?? \"\");\n if (!filePath) continue;\n entries.push({ path: filePath, status });\n files.push(filePath);\n }\n\n const rawDiff = execGit([\"diff\", \"--unified=3\", diffRange], cwd);\n const diffBytes = Buffer.byteLength(rawDiff, \"utf-8\");\n const truncated = diffBytes > maxDiffBytes;\n const diff = truncated ? rawDiff.slice(0, maxDiffBytes) : rawDiff;\n\n return {\n baseRef,\n mergeBase,\n files,\n entries,\n diff,\n diffBytes,\n truncated,\n };\n}\n\n/** Build filter candidates from loaded Spana flows (including source file content when readable). */\nexport function buildFilterCandidates(\n loaded: Array<{ sourcePath: string; flow: FlowDefinition }>,\n cwd: string = process.cwd(),\n): FilterCandidate[] {\n const sourceCache = new Map<string, string | undefined>();\n return loaded.map((entry, idx) => {\n const rel = normalizePath(relative(cwd, resolve(cwd, entry.sourcePath)));\n if (!sourceCache.has(entry.sourcePath)) {\n let src: string | undefined;\n if (existsSync(entry.sourcePath)) {\n try {\n src = readFileSync(entry.sourcePath, \"utf-8\");\n } catch {\n src = undefined;\n }\n }\n sourceCache.set(entry.sourcePath, src);\n }\n return {\n id: `${rel}::${entry.flow.name}#${idx}`,\n name: entry.flow.name,\n file: rel,\n tags: entry.flow.config.tags ?? [],\n platforms: entry.flow.config.platforms,\n source: sourceCache.get(entry.sourcePath),\n };\n });\n}\n\n// ── Built-in Decision-Model Filter ──────────────────────────────────────────\n\nexport interface DecisionJudgeInput {\n candidate: FilterCandidate;\n changes: GitChanges;\n}\n\nexport interface DecisionJudgeResult {\n /** Probability [0..1] that the PR changes can affect this flow. */\n probability: number;\n reason?: string;\n usage?: FilterUsage;\n}\n\nexport type DecisionModelJudge = (\n input: DecisionJudgeInput,\n) => Promise<DecisionJudgeResult> | DecisionJudgeResult;\n\nexport interface DecisionBatchJudgeResult {\n /** Map of candidate `id` -> probability `[0, 1]` that the PR changes affect it. */\n probabilities: Record<string, number>;\n reasons?: Record<string, string>;\n usage?: FilterUsage;\n}\n\nexport type DecisionBatchJudge = (input: {\n candidates: FilterCandidate[];\n changes: GitChanges;\n}) => Promise<DecisionBatchJudgeResult> | DecisionBatchJudgeResult;\n\nexport interface DecisionFilterOptions {\n /** Optional custom name (default: \"decision\") */\n name?: string;\n /**\n * Per-flow model judge function returning an impact probability in `[0, 1]`.\n * Provide either `judge` or `batchJudge` (batched evaluates all flows in 1 LLM call).\n */\n judge?: DecisionModelJudge;\n /**\n * Batched model judge evaluating all candidate flows in a single model call\n * (dramatically faster for local Ollama/MLX models and cloud decision models).\n */\n batchJudge?: DecisionBatchJudge;\n /**\n * Skip a flow only when `probability < threshold`.\n * Default: `0.20` (fail-open safety bias — runs anything >= 20% likely affected).\n */\n threshold?: number;\n /** Max diff size in bytes before failing open and running everything. Default: 60 kB. */\n maxDiffBytes?: number;\n /** Max single flow file size in bytes before failing open for that flow. Default: 32 kB. */\n maxFileBytes?: number;\n /** Tags that are NEVER excluded (e.g. `[\"smoke\"]`). */\n alwaysRunTags?: string[];\n /** Path prefixes that force the entire suite to run (e.g. `[\"infra/\", \"db/migrations/\"]`). */\n runAllOnPaths?: string[];\n}\n\n/**\n * Create a fail-open decision-model filter for `--changed-since`:\n *\n * Safety invariants (never skip important tests):\n * 1. Changed flow files always run.\n * 2. Config or lockfile changes run the entire suite.\n * 3. Diffs over `maxDiffBytes` (default 60 kB) run the entire suite.\n * 4. Flows tagged in `alwaysRunTags` always run.\n * 5. Any judge error or invalid probability fails open (flow runs).\n * 6. A flow is excluded only when `probability < threshold` (default 0.20).\n */\nexport function decisionFilter(options: DecisionFilterOptions): TestFilter {\n const filterName = options.name ?? \"decision\";\n const threshold = options.threshold ?? 0.2;\n const maxDiffBytes = options.maxDiffBytes ?? DEFAULT_MAX_DIFF_BYTES;\n const maxFileBytes = options.maxFileBytes ?? 32 * 1024;\n const alwaysRunTags = new Set(options.alwaysRunTags ?? []);\n const runAllOnPaths = (options.runAllOnPaths ?? []).map(normalizePath);\n\n return {\n name: filterName,\n async filter(flows, context): Promise<FilterDecisionOutput> {\n const { changes, configPath } = context;\n\n if (changes.files.length === 0) {\n return { exclude: {}, note: \"no git changes detected\" };\n }\n\n if (changes.files.some((f) => isConfigOrLockfile(f, configPath))) {\n return { exclude: {}, note: \"config or lockfile changed — running all flows\" };\n }\n\n const matchedGlobalPath = changes.files.find((f) =>\n runAllOnPaths.some((prefix) => normalizePath(f).startsWith(prefix)),\n );\n if (matchedGlobalPath) {\n return {\n exclude: {},\n note: `global path changed (${matchedGlobalPath}) — running all flows`,\n };\n }\n\n if (changes.truncated || changes.diffBytes > maxDiffBytes) {\n return {\n exclude: {},\n note: `diff exceeds ${Math.round(maxDiffBytes / 1024)}kB cap — failing open`,\n };\n }\n\n const changedSet = new Set(changes.files.map(normalizePath));\n const exclude: Record<string, string> = {};\n let calls = 0;\n let tokens = 0;\n let costUsd = 0;\n\n // Filter down to flows eligible for model judgment (safety rules always keep the rest)\n const eligible: FilterCandidate[] = [];\n for (const candidate of flows) {\n if (changedSet.has(normalizePath(candidate.file))) continue;\n if (candidate.tags.some((t) => alwaysRunTags.has(t))) continue;\n if (candidate.source && Buffer.byteLength(candidate.source, \"utf-8\") > maxFileBytes) {\n continue;\n }\n eligible.push(candidate);\n }\n\n if (eligible.length === 0) {\n return { exclude };\n }\n\n // Fast path: evaluate all eligible flows in ONE batched model call\n if (options.batchJudge) {\n try {\n const batch = await options.batchJudge({ candidates: eligible, changes });\n calls += batch.usage?.calls ?? 1;\n tokens += batch.usage?.tokens ?? 0;\n costUsd += batch.usage?.costUsd ?? 0;\n for (const candidate of eligible) {\n const prob = batch.probabilities[candidate.id];\n if (typeof prob === \"number\" && !Number.isNaN(prob) && prob >= 0 && prob < threshold) {\n const pct = Math.round(prob * 100);\n exclude[candidate.id] =\n batch.reasons?.[candidate.id] ??\n `rated ${pct}% likely affected (< ${Math.round(threshold * 100)}%)`;\n }\n }\n } catch {\n // Fail open on batch judge error\n return { exclude: {}, note: \"decision model error — failed open\" };\n }\n return {\n exclude,\n usage: calls > 0 ? { calls, tokens, costUsd } : undefined,\n };\n }\n\n if (!options.judge) {\n return { exclude: {}, note: \"no judge configured — failed open\" };\n }\n\n for (const candidate of eligible) {\n try {\n const verdict = await options.judge({ candidate, changes });\n calls += verdict.usage?.calls ?? 1;\n tokens += verdict.usage?.tokens ?? 0;\n costUsd += verdict.usage?.costUsd ?? 0;\n\n if (\n typeof verdict.probability === \"number\" &&\n !Number.isNaN(verdict.probability) &&\n verdict.probability >= 0 &&\n verdict.probability < threshold\n ) {\n const pct = Math.round(verdict.probability * 100);\n exclude[candidate.id] =\n verdict.reason ?? `rated ${pct}% likely affected (< ${Math.round(threshold * 100)}%)`;\n }\n } catch {\n // Fail open on any model/network error\n continue;\n }\n }\n\n return {\n exclude,\n usage: calls > 0 ? { calls, tokens, costUsd } : undefined,\n };\n },\n };\n}\n\nexport interface OllamaDecisionJudgeOptions {\n /** Ollama model tag, e.g. `\"qwen2.5:1.5b\"` or `\"qwen2.5:0.5b\"`. */\n model: string;\n /** Ollama HTTP endpoint (default: `\"http://127.0.0.1:11434\"`). */\n baseUrl?: string;\n /** Request timeout in ms (default: 15000). */\n timeoutMs?: number;\n /** Optional custom fetch implementation for testing. */\n fetchFn?: typeof fetch;\n}\n\n/**\n * Built-in local batched decision judge for Ollama (Apple Silicon / local GPU).\n * Evaluates all candidate flows against a PR diff in ONE structured JSON call\n * with `temperature: 0` and zero cloud token cost ($0.0000).\n */\nexport function createOllamaDecisionJudge(options: OllamaDecisionJudgeOptions): DecisionBatchJudge {\n const baseUrl = (options.baseUrl ?? \"http://127.0.0.1:11434\").replace(/\\/$/, \"\");\n const timeoutMs = options.timeoutMs ?? 15_000;\n const fetchFn = options.fetchFn ?? fetch;\n\n return async ({ candidates, changes }): Promise<DecisionBatchJudgeResult> => {\n const flowList = candidates\n .map((c, i) => `${i}: file=\"${c.file}\", name=\"${c.name}\", tags=[${c.tags.join(\",\")}]`)\n .join(\"\\n\");\n\n const prompt = [\n \"You are a conservative CI test-impact classifier. Err on the side of RUNNING tests (high recall).\",\n \"For each E2E flow below, output a probability from 0.0 to 1.0 that the git diff could affect it.\",\n \"Rules:\",\n \"- If a flow's file path, name, or tags share the same feature/module/domain as ANY changed file, rate it 0.9.\",\n \"- If unsure or possibly connected via shared UI/state/API, rate it 0.5.\",\n \"- Rate 0.05 ONLY if the flow is clearly in a completely unrelated module.\",\n `Changed files: ${changes.files.join(\", \")}`,\n `Diff:\\n${changes.diff.slice(0, 3000)}`,\n `Flows:\\n${flowList}`,\n 'Output compact single-line JSON mapping each index string to a number, e.g. {\"0\":0.9,\"1\":0.05}',\n ].join(\"\\n\");\n\n const res = await fetchFn(`${baseUrl}/api/generate`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({\n model: options.model,\n prompt,\n format: \"json\",\n stream: false,\n options: { temperature: 0, num_predict: 256 },\n }),\n signal: AbortSignal.timeout(timeoutMs),\n });\n\n if (!res.ok) {\n throw new Error(`Ollama returned HTTP ${res.status}`);\n }\n\n const payload = (await res.json()) as {\n response?: string;\n prompt_eval_count?: number;\n eval_count?: number;\n };\n\n const rawJson = (payload.response ?? \"{}\").trim();\n const parsed = JSON.parse(rawJson) as Record<string, unknown>;\n const probabilities: Record<string, number> = {};\n\n for (let i = 0; i < candidates.length; i++) {\n const cand = candidates[i]!;\n const val = parsed[String(i)] ?? parsed[cand.id] ?? parsed[cand.name];\n if (typeof val === \"number\" && !Number.isNaN(val)) {\n probabilities[cand.id] = Math.max(0, Math.min(1, val));\n } else {\n // Missing index -> fail open (1.0)\n probabilities[cand.id] = 1;\n }\n }\n\n return {\n probabilities,\n usage: {\n calls: 1,\n tokens: (payload.prompt_eval_count ?? 0) + (payload.eval_count ?? 0),\n costUsd: 0,\n },\n };\n };\n}\n\nexport interface LogprobDecisionJudgeOptions {\n /** Model identifier (e.g. `\"hf.co/apus-ailab/APUS-OpenJev-v1-9B-GGUF:Q8_0\"`, `\"jevk5-4b-v0.3:q8_0\"`, `\"decider4b-v2:bf16\"`, `\"plumb-4b\"`). */\n model: string;\n /** Protocol backend: `\"openai\"` (vLLM / SGLang / llama-server / OpenRouter / Typesafe AI) or `\"ollama\"`. */\n provider: \"openai\" | \"ollama\";\n /** Base URL (default: `http://127.0.0.1:8000/v1` for openai, `http://127.0.0.1:11434` for ollama). */\n baseUrl?: string;\n /** Optional Bearer API key for hosted OpenAI-compatible endpoints. */\n apiKey?: string;\n /** Request timeout per flow judgment in ms (default: 15000). */\n timeoutMs?: number;\n /** Injectable fetch for unit tests. */\n fetchFn?: typeof fetch;\n}\n\n/**\n * Compute calibrated binary YES probability from OpenAI-style `top_logprobs`\n * on a 1-token decision model response (`max_tokens: 1`, `logprobs: true`).\n * Returns `null` when neither YES nor NO tokens appeared in top_logprobs.\n */\nexport function probabilityFromTopLogprobs(\n topLogprobs: Array<{ token: string; logprob: number }>,\n): number | null {\n let yesProb = 0;\n let noProb = 0;\n\n for (const entry of topLogprobs) {\n const norm = entry.token.trim().toLowerCase();\n const p = Math.exp(entry.logprob);\n if (norm === \"yes\" || norm === \"y\" || norm === \"true\" || norm === \"1\") {\n yesProb += p;\n } else if (norm === \"no\" || norm === \"n\" || norm === \"false\" || norm === \"0\") {\n noProb += p;\n }\n }\n\n const total = yesProb + noProb;\n if (total <= 0) return null;\n return Math.max(0, Math.min(1, yesProb / total));\n}\n\n/**\n * Native 1-Token Logprob Decision Judge for System-1 decision models\n * (OpenJev, JevK5, Decider-4B, Plumb-4B, Winnow-12B, Typesafe AI Jev).\n *\n * Places the shared git diff prefix at the start of every prompt so vLLM,\n * SGLang, and llama.cpp automatically reuse the KV cache across all flows in a PR,\n * generating only **1 single token** (`YES` / `NO`) with exact calibrated probabilities.\n */\nexport function createLogprobDecisionJudge(\n options: LogprobDecisionJudgeOptions,\n): DecisionModelJudge {\n const baseUrl = (\n options.baseUrl ??\n (options.provider === \"ollama\" ? \"http://127.0.0.1:11434\" : \"http://127.0.0.1:8000/v1\")\n ).replace(/\\/$/, \"\");\n const timeoutMs = options.timeoutMs ?? 15_000;\n const fetchFn = options.fetchFn ?? fetch;\n\n return async ({ candidate, changes }): Promise<DecisionJudgeResult> => {\n // Shared prefix FIRST to maximize automatic KV-cache prefix hits across flows\n const prompt = [\n \"You are a binary CI test-impact classifier. Answer strictly YES or NO.\",\n `Changed files: ${changes.files.join(\", \")}`,\n `Git diff:\\n${changes.diff.slice(0, 3500)}`,\n `Question: Could this change affect or break the E2E flow below?`,\n `Flow file: ${candidate.file}`,\n `Flow name: ${candidate.name}`,\n `Flow tags: ${candidate.tags.join(\", \") || \"(none)\"}`,\n \"Answer (YES or NO):\",\n ].join(\"\\n\");\n\n if (options.provider === \"ollama\") {\n const res = await fetchFn(`${baseUrl}/api/generate`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({\n model: options.model,\n prompt,\n stream: false,\n logprobs: true,\n top_logprobs: 10,\n options: { temperature: 0, num_predict: 1 },\n }),\n signal: AbortSignal.timeout(timeoutMs),\n });\n if (!res.ok) throw new Error(`Ollama returned HTTP ${res.status}`);\n const data = (await res.json()) as {\n response?: string;\n prompt_eval_count?: number;\n eval_count?: number;\n logprobs?: Array<{ top_logprobs?: Array<{ token: string; logprob: number }> }>;\n };\n\n const top = data.logprobs?.[0]?.top_logprobs;\n let probability = top ? probabilityFromTopLogprobs(top) : null;\n if (probability === null) {\n const tok = (data.response ?? \"\").trim().toLowerCase();\n if (tok.startsWith(\"n\") || tok === \"0\" || tok === \"false\") probability = 0.05;\n else probability = 0.95; // fail open on ambiguous token\n }\n\n return {\n probability,\n usage: {\n calls: 1,\n tokens: (data.prompt_eval_count ?? 0) + (data.eval_count ?? 0),\n costUsd: 0,\n },\n };\n }\n\n // OpenAI-compatible 1-token logprob endpoint (vLLM / SGLang / llama-server / Typesafe AI / OpenRouter)\n const res = await fetchFn(`${baseUrl}/chat/completions`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n ...(options.apiKey ? { Authorization: `Bearer ${options.apiKey}` } : {}),\n },\n body: JSON.stringify({\n model: options.model,\n temperature: 0,\n max_tokens: 1,\n logprobs: true,\n top_logprobs: 10,\n messages: [{ role: \"user\", content: prompt }],\n }),\n signal: AbortSignal.timeout(timeoutMs),\n });\n if (!res.ok) throw new Error(`Decision endpoint returned HTTP ${res.status}`);\n const data = (await res.json()) as {\n choices?: Array<{\n message?: { content?: string };\n logprobs?: {\n content?: Array<{ top_logprobs?: Array<{ token: string; logprob: number }> }>;\n };\n }>;\n usage?: { prompt_tokens?: number; completion_tokens?: number };\n };\n\n const top = data.choices?.[0]?.logprobs?.content?.[0]?.top_logprobs;\n let probability = top ? probabilityFromTopLogprobs(top) : null;\n if (probability === null) {\n const tok = (data.choices?.[0]?.message?.content ?? \"\").trim().toLowerCase();\n if (tok.startsWith(\"n\") || tok === \"0\" || tok === \"false\") probability = 0.05;\n else probability = 0.95;\n }\n\n return {\n probability,\n usage: {\n calls: 1,\n tokens: (data.usage?.prompt_tokens ?? 0) + (data.usage?.completion_tokens ?? 0),\n costUsd: 0,\n },\n };\n };\n}\n\n// ── Built-in Deterministic Path-Rule Filter ─────────────────────────────────\n\nexport interface PathRule {\n /** Flow tag or path prefix this rule owns. */\n matchFlow: { tag?: string; filePrefix?: string };\n /** Source path prefixes that can affect matching flows. */\n watchPaths: string[];\n}\n\nexport interface PathRuleFilterOptions {\n name?: string;\n rules: PathRule[];\n alwaysRunTags?: string[];\n runAllOnPaths?: string[];\n}\n\n/**\n * 100% deterministic zero-LLM filter mapping repo path prefixes to flow tags/files.\n * Flows not matched by any rule fail open and run automatically.\n */\nexport function pathRuleFilter(options: PathRuleFilterOptions): TestFilter {\n const filterName = options.name ?? \"path-rules\";\n const alwaysRunTags = new Set(options.alwaysRunTags ?? []);\n const runAllOnPaths = (options.runAllOnPaths ?? []).map(normalizePath);\n\n return {\n name: filterName,\n filter(flows, context): FilterDecisionOutput {\n const { changes, configPath } = context;\n\n if (changes.files.length === 0) {\n return { exclude: {}, note: \"no git changes detected\" };\n }\n\n if (changes.files.some((f) => isConfigOrLockfile(f, configPath))) {\n return { exclude: {}, note: \"config or lockfile changed — running all flows\" };\n }\n\n const matchedGlobal = changes.files.find((f) =>\n runAllOnPaths.some((prefix) => normalizePath(f).startsWith(prefix)),\n );\n if (matchedGlobal) {\n return { exclude: {}, note: `global path changed (${matchedGlobal}) — running all flows` };\n }\n\n const changedFiles = changes.files.map(normalizePath);\n const changedSet = new Set(changedFiles);\n const exclude: Record<string, string> = {};\n\n for (const candidate of flows) {\n if (changedSet.has(normalizePath(candidate.file))) continue;\n if (candidate.tags.some((t) => alwaysRunTags.has(t))) continue;\n\n const matchedRules = options.rules.filter((rule) => {\n const tagOk = rule.matchFlow.tag ? candidate.tags.includes(rule.matchFlow.tag) : true;\n const fileOk = rule.matchFlow.filePrefix\n ? normalizePath(candidate.file).startsWith(normalizePath(rule.matchFlow.filePrefix))\n : true;\n return (rule.matchFlow.tag || rule.matchFlow.filePrefix) && tagOk && fileOk;\n });\n\n // No rule owns this flow -> fail open (keep it)\n if (matchedRules.length === 0) continue;\n\n const watchedPrefixes = matchedRules.flatMap((r) => r.watchPaths.map(normalizePath));\n const affected = changedFiles.some((cf) =>\n watchedPrefixes.some((prefix) => cf.startsWith(prefix)),\n );\n\n if (!affected) {\n exclude[candidate.id] = `no changed files matched [${watchedPrefixes.join(\", \")}]`;\n }\n }\n\n return { exclude };\n },\n };\n}\n\n// ── Built-in Deterministic Import-Graph Impact Filter (Zero AI) ─────────────\n\nexport interface DeterministicImpactFilterOptions {\n name?: string;\n /** Additional path-to-flow rules combined with automatic static import-graph tracing. */\n pathMappings?: PathRule[];\n /** Flow tags that are NEVER skipped (e.g. `[\"smoke\"]`). */\n alwaysRunTags?: string[];\n /** Path prefixes that force the entire suite to run (e.g. `[\"src/shared/\", \"db/\"]`). */\n runAllOnPaths?: string[];\n /**\n * When true (default), if a changed file is NOT imported by any flow and does not\n * match any `pathMappings`, fail open and run all flows so unmapped app changes are\n * never silently missed. Set to `false` for strict import-graph-only selection.\n */\n failOpenOnUnmappedChange?: boolean;\n /** Max recursive import depth to trace from each flow file. Default: 12. */\n maxDepth?: number;\n}\n\nconst IMPORT_SPECIFIER_RE =\n /(?:import|export)\\s+(?:[^'\"]*?\\s+from\\s+)?[\"'](\\.{1,2}\\/[^\"']+)[\"']|require\\(\\s*[\"'](\\.{1,2}\\/[^\"']+)[\"']\\s*\\)|import\\(\\s*[\"'](\\.{1,2}\\/[^\"']+)[\"']\\s*\\)/g;\n\nconst RESOLVE_EXTENSIONS = [\n \"\",\n \".ts\",\n \".tsx\",\n \".mts\",\n \".js\",\n \".jsx\",\n \".mjs\",\n \".cjs\",\n \"/index.ts\",\n \"/index.tsx\",\n \"/index.js\",\n \"/index.mjs\",\n];\n\nfunction resolveLocalImport(fromFileAbs: string, specifier: string): string | null {\n const baseDir = dirname(fromFileAbs);\n const rawTarget = resolve(baseDir, specifier);\n // Handle TS ESM `.js` -> `.ts` / `.tsx` extension rewriting\n const withoutJs = rawTarget.replace(/\\.m?js$/, \"\");\n const candidates =\n rawTarget !== withoutJs\n ? [withoutJs + \".ts\", withoutJs + \".tsx\", withoutJs + \".mts\", rawTarget]\n : [rawTarget];\n\n for (const base of candidates) {\n for (const ext of RESOLVE_EXTENSIONS) {\n const full = ext ? base + ext : base;\n try {\n if (existsSync(full) && statSync(full).isFile()) {\n return full;\n }\n } catch {\n // ignore unreadable paths\n }\n }\n }\n return null;\n}\n\nfunction collectTransitiveImports(\n entryAbs: string,\n cwd: string,\n maxDepth: number,\n fileCache: Map<string, string[]>,\n): Set<string> {\n const visited = new Set<string>();\n const queue: Array<{ abs: string; depth: number }> = [{ abs: entryAbs, depth: 0 }];\n\n while (queue.length > 0) {\n const { abs, depth } = queue.shift()!;\n const normRel = normalizePath(relative(cwd, abs));\n if (visited.has(normRel)) continue;\n visited.add(normRel);\n if (depth >= maxDepth) continue;\n\n let specs = fileCache.get(abs);\n if (!specs) {\n specs = [];\n try {\n if (existsSync(abs) && statSync(abs).isFile()) {\n const content = readFileSync(abs, \"utf-8\");\n IMPORT_SPECIFIER_RE.lastIndex = 0;\n let match: RegExpExecArray | null;\n while ((match = IMPORT_SPECIFIER_RE.exec(content)) !== null) {\n const spec = match[1] ?? match[2] ?? match[3];\n if (spec) specs.push(spec);\n }\n }\n } catch {\n // ignore unreadable\n }\n fileCache.set(abs, specs);\n }\n\n for (const spec of specs) {\n const resolved = resolveLocalImport(abs, spec);\n if (resolved) {\n queue.push({ abs: resolved, depth: depth + 1 });\n }\n }\n }\n\n return visited;\n}\n\n/**\n * 100% deterministic, zero-AI test impact filter for `--changed-since`.\n *\n * Recursively traces static ESM/CJS imports (`import`, `export ... from`, `require`)\n * from every `.flow.ts` file and combines them with optional `pathMappings`.\n * Fails open on config/lockfile changes, `runAllOnPaths`, and (by default) any\n * changed file not covered by any import graph or path mapping.\n */\nexport function deterministicImpactFilter(\n options: DeterministicImpactFilterOptions = {},\n): TestFilter {\n const filterName = options.name ?? \"deterministic-impact\";\n const alwaysRunTags = new Set(options.alwaysRunTags ?? []);\n const runAllOnPaths = (options.runAllOnPaths ?? []).map(normalizePath);\n const pathMappings = options.pathMappings ?? [];\n const failOpenOnUnmapped = options.failOpenOnUnmappedChange ?? true;\n const maxDepth = options.maxDepth ?? 12;\n\n return {\n name: filterName,\n filter(flows, context): FilterDecisionOutput {\n const { changes, configPath, cwd } = context;\n\n if (changes.files.length === 0) {\n return { exclude: {}, note: \"no git changes detected\" };\n }\n\n if (changes.files.some((f) => isConfigOrLockfile(f, configPath))) {\n return { exclude: {}, note: \"config or lockfile changed — running all flows\" };\n }\n\n const matchedGlobal = changes.files.find((f) =>\n runAllOnPaths.some((prefix) => normalizePath(f).startsWith(prefix)),\n );\n if (matchedGlobal) {\n return { exclude: {}, note: `global path changed (${matchedGlobal}) — running all flows` };\n }\n\n const changedFiles = changes.files.map(normalizePath);\n const changedSet = new Set(changedFiles);\n const fileCache = new Map<string, string[]>();\n\n // Build transitive import graph for every candidate flow\n const flowDeps = new Map<string, Set<string>>();\n const allKnownFiles = new Set<string>();\n for (const candidate of flows) {\n const entryAbs = resolve(cwd, candidate.file);\n const deps = collectTransitiveImports(entryAbs, cwd, maxDepth, fileCache);\n deps.add(normalizePath(candidate.file));\n flowDeps.set(candidate.id, deps);\n for (const d of deps) allKnownFiles.add(d);\n }\n\n const allWatchedPrefixes = pathMappings.flatMap((r) => r.watchPaths.map(normalizePath));\n\n if (failOpenOnUnmapped) {\n const unmapped = changedFiles.find(\n (cf) =>\n !allKnownFiles.has(cf) && !allWatchedPrefixes.some((prefix) => cf.startsWith(prefix)),\n );\n if (unmapped) {\n return {\n exclude: {},\n note: `unmapped file changed (${unmapped}) — failing open and running all flows`,\n };\n }\n }\n\n const exclude: Record<string, string> = {};\n for (const candidate of flows) {\n if (changedSet.has(normalizePath(candidate.file))) continue;\n if (candidate.tags.some((t) => alwaysRunTags.has(t))) continue;\n\n const deps = flowDeps.get(candidate.id);\n const touchedByImport = deps ? changedFiles.some((cf) => deps.has(cf)) : false;\n if (touchedByImport) continue;\n\n const matchedRules = pathMappings.filter((rule) => {\n const tagOk = rule.matchFlow.tag ? candidate.tags.includes(rule.matchFlow.tag) : true;\n const fileOk = rule.matchFlow.filePrefix\n ? normalizePath(candidate.file).startsWith(normalizePath(rule.matchFlow.filePrefix))\n : true;\n return (rule.matchFlow.tag || rule.matchFlow.filePrefix) && tagOk && fileOk;\n });\n const touchedByRule = matchedRules.some((rule) =>\n changedFiles.some((cf) =>\n rule.watchPaths.some((prefix) => cf.startsWith(normalizePath(prefix))),\n ),\n );\n if (touchedByRule) continue;\n\n exclude[candidate.id] = \"unaffected by changed imports or path mappings\";\n }\n\n return { exclude };\n },\n };\n}\n\n/**\n * Run a chain of `TestFilter`s sequentially over candidate flows.\n * Any filter that throws fails open (keeps all remaining flows) and logs a note.\n */\nexport async function applyTestFilters<T>(\n items: T[],\n candidates: FilterCandidate[],\n filters: TestFilter[],\n context: FilterContext,\n): Promise<ApplyFiltersResult<T>> {\n let remainingIndices = items.map((_, i) => i);\n const excluded: ApplyFiltersResult<T>[\"excluded\"] = [];\n const reports: AppliedFilterReport[] = [];\n\n for (const filter of filters) {\n const activeCandidates = remainingIndices.map((idx) => candidates[idx]!);\n const totalBefore = activeCandidates.length;\n\n try {\n const output = await filter.filter(activeCandidates, context);\n const excludeMap = output.exclude ?? {};\n const nextRemaining: number[] = [];\n let excludedCount = 0;\n\n for (const idx of remainingIndices) {\n const cand = candidates[idx]!;\n const reason = excludeMap[cand.id];\n if (reason !== undefined) {\n excludedCount += 1;\n excluded.push({\n item: items[idx]!,\n candidate: cand,\n filterName: filter.name,\n reason,\n });\n } else {\n nextRemaining.push(idx);\n }\n }\n\n remainingIndices = nextRemaining;\n reports.push({\n filterName: filter.name,\n total: totalBefore,\n kept: remainingIndices.length,\n excluded: excludedCount,\n note: output.note,\n usage: output.usage,\n });\n } catch (err) {\n reports.push({\n filterName: filter.name,\n total: totalBefore,\n kept: totalBefore,\n excluded: 0,\n failedOpen: true,\n note: `filter error (${err instanceof Error ? err.message : String(err)}) — failed open`,\n });\n }\n }\n\n return {\n kept: remainingIndices.map((idx) => items[idx]!),\n excluded,\n reports,\n };\n}\n\n/** Format a concise, `e2e`-style CI summary line for each applied filter. */\nexport function formatFilterSummary(reports: AppliedFilterReport[]): string[] {\n return reports.map((r) => {\n const parts: string[] = [];\n if (r.usage?.calls) {\n parts.push(`${r.usage.calls} call${r.usage.calls === 1 ? \"\" : \"s\"}`);\n }\n if (r.usage?.tokens) {\n const tok =\n r.usage.tokens >= 1000 ? `${(r.usage.tokens / 1000).toFixed(1)}k` : String(r.usage.tokens);\n parts.push(`${tok} tokens`);\n }\n if (r.usage?.costUsd !== undefined && r.usage.costUsd > 0) {\n parts.push(`$${r.usage.costUsd.toFixed(4)}`);\n }\n if (r.note) {\n parts.push(r.note);\n }\n const detail = parts.length > 0 ? ` (${parts.join(\", \")})` : \"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"sources":["../src/core/filters.ts"],"sourcesContent":["import { execFileSync } from \"node:child_process\";\nimport { readFileSync, existsSync, statSync } from \"node:fs\";\nimport { basename, dirname, relative, resolve } from \"node:path\";\nimport type { FlowDefinition } from \"../api/flow.js\";\nimport type { Platform } from \"../schemas/selector.js\";\n\n/** A file changed between `baseRef` and `HEAD` (or working tree). */\nexport interface ChangedFile {\n path: string;\n status: \"A\" | \"M\" | \"D\" | \"R\" | \"C\" | string;\n}\n\n/** Git diff snapshot provided to test filters when `--changed-since <ref>` is active. */\nexport interface GitChanges {\n baseRef: string;\n mergeBase?: string;\n files: string[];\n entries: ChangedFile[];\n /** Unified diff text (truncated when exceeding `maxDiffBytes`). */\n diff: string;\n /** Full byte length of the raw diff before truncation. */\n diffBytes: number;\n /** True when the diff exceeded the configured safety cap. */\n truncated: boolean;\n}\n\n/** Descriptor for a candidate flow passed into a `TestFilter`. */\nexport interface FilterCandidate {\n id: string;\n name: string;\n file: string;\n tags: string[];\n platforms?: Platform[];\n source?: string;\n}\n\n/** Context supplied to every `TestFilter.filter()` invocation. */\nexport interface FilterContext {\n cwd: string;\n changes: GitChanges;\n configPath?: string;\n platforms: Platform[];\n}\n\nexport interface FilterUsage {\n calls?: number;\n tokens?: number;\n costUsd?: number;\n}\n\nexport interface FilterDecisionOutput {\n /** Map of candidate `id` -> human-readable skip reason. Any ID not present is kept. */\n exclude: Record<string, string>;\n /** Optional summary note displayed next to the filter output. */\n note?: string;\n /** Optional model/API usage metrics for summary logging. */\n usage?: FilterUsage;\n}\n\n/**\n * Pluggable CI test filter inspired by `e2e-inc/e2e`'s Filters API.\n * Compose deterministic path/tag rules or plug in a decision model / LLM.\n */\nexport interface TestFilter {\n name: string;\n filter(\n flows: FilterCandidate[],\n context: FilterContext,\n ): Promise<FilterDecisionOutput> | FilterDecisionOutput;\n}\n\nexport interface AppliedFilterReport {\n filterName: string;\n total: number;\n kept: number;\n excluded: number;\n note?: string;\n usage?: FilterUsage;\n failedOpen?: boolean;\n}\n\nexport interface ApplyFiltersResult<T> {\n kept: T[];\n excluded: Array<{ item: T; candidate: FilterCandidate; filterName: string; reason: string }>;\n reports: AppliedFilterReport[];\n}\n\nconst DEFAULT_LOCKFILES = new Set([\n \"bun.lock\",\n \"bun.lockb\",\n \"package.json\",\n \"package-lock.json\",\n \"pnpm-lock.yaml\",\n \"yarn.lock\",\n]);\n\nconst DEFAULT_MAX_DIFF_BYTES = 60 * 1024; // 60 kB fail-open safety ceiling\n\nfunction normalizePath(p: string): string {\n return p.replaceAll(\"\\\\\", \"/\").replace(/^\\.\\//, \"\");\n}\n\nfunction isConfigOrLockfile(filePath: string, configPath?: string): boolean {\n const norm = normalizePath(filePath);\n const name = basename(norm);\n if (DEFAULT_LOCKFILES.has(name)) return true;\n if (/^spana\\.config(\\.[^.]+)?\\.(ts|mts|js|mjs|cjs)$/.test(name)) return true;\n if (configPath && normalizePath(configPath).endsWith(norm)) return true;\n return false;\n}\n\n/**\n * Collect changed files and unified diff relative to `baseRef` using `git merge-base`.\n * Fails cleanly if git is unavailable or `baseRef` does not exist (shallow checkout).\n */\nexport function collectGitChanges(\n baseRef: string,\n cwd: string = process.cwd(),\n maxDiffBytes: number = DEFAULT_MAX_DIFF_BYTES,\n runGit?: (args: string[], workdir: string) => string,\n): GitChanges {\n const execGit =\n runGit ??\n ((args: string[], workdir: string) =>\n execFileSync(\"git\", args, {\n cwd: workdir,\n encoding: \"utf-8\",\n maxBuffer: 16 * 1024 * 1024,\n stdio: [\"ignore\", \"pipe\", \"pipe\"],\n }));\n\n let mergeBase: string | undefined;\n try {\n mergeBase = execGit([\"merge-base\", baseRef, \"HEAD\"], cwd).trim() || undefined;\n } catch {\n mergeBase = undefined;\n }\n\n const diffRange = mergeBase ? `${mergeBase}...HEAD` : baseRef;\n const nameStatusRaw = execGit([\"diff\", \"--name-status\", diffRange], cwd);\n const entries: ChangedFile[] = [];\n const files: string[] = [];\n\n for (const line of nameStatusRaw.split(\"\\n\")) {\n const trimmed = line.trim();\n if (!trimmed) continue;\n const parts = trimmed.split(/\\t+/);\n const status = parts[0]?.[0] ?? \"M\";\n // For renames (R100 old new), include the destination path\n const filePath = normalizePath(parts[parts.length - 1] ?? \"\");\n if (!filePath) continue;\n entries.push({ path: filePath, status });\n files.push(filePath);\n }\n\n const rawDiff = execGit([\"diff\", \"--unified=3\", diffRange], cwd);\n const diffBytes = Buffer.byteLength(rawDiff, \"utf-8\");\n const truncated = diffBytes > maxDiffBytes;\n const diff = truncated ? rawDiff.slice(0, maxDiffBytes) : rawDiff;\n\n return {\n baseRef,\n mergeBase,\n files,\n entries,\n diff,\n diffBytes,\n truncated,\n };\n}\n\n/** Build filter candidates from loaded Spana flows (including source file content when readable). */\nexport function buildFilterCandidates(\n loaded: Array<{ sourcePath: string; flow: FlowDefinition }>,\n cwd: string = process.cwd(),\n): FilterCandidate[] {\n const sourceCache = new Map<string, string | undefined>();\n return loaded.map((entry, idx) => {\n const rel = normalizePath(relative(cwd, resolve(cwd, entry.sourcePath)));\n if (!sourceCache.has(entry.sourcePath)) {\n let src: string | undefined;\n if (existsSync(entry.sourcePath)) {\n try {\n src = readFileSync(entry.sourcePath, \"utf-8\");\n } catch {\n src = undefined;\n }\n }\n sourceCache.set(entry.sourcePath, src);\n }\n return {\n id: `${rel}::${entry.flow.name}#${idx}`,\n name: entry.flow.name,\n file: rel,\n tags: entry.flow.config.tags ?? [],\n platforms: entry.flow.config.platforms,\n source: sourceCache.get(entry.sourcePath),\n };\n });\n}\n\n// ── Built-in Decision-Model Filter ──────────────────────────────────────────\n\nexport interface DecisionJudgeInput {\n candidate: FilterCandidate;\n changes: GitChanges;\n}\n\nexport interface DecisionJudgeResult {\n /** Probability [0..1] that the PR changes can affect this flow. */\n probability: number;\n reason?: string;\n usage?: FilterUsage;\n}\n\nexport type DecisionModelJudge = (\n input: DecisionJudgeInput,\n) => Promise<DecisionJudgeResult> | DecisionJudgeResult;\n\nexport interface DecisionBatchJudgeResult {\n /** Map of candidate `id` -> probability `[0, 1]` that the PR changes affect it. */\n probabilities: Record<string, number>;\n reasons?: Record<string, string>;\n usage?: FilterUsage;\n}\n\nexport type DecisionBatchJudge = (input: {\n candidates: FilterCandidate[];\n changes: GitChanges;\n}) => Promise<DecisionBatchJudgeResult> | DecisionBatchJudgeResult;\n\nexport interface DecisionFilterOptions {\n /** Optional custom name (default: \"decision\") */\n name?: string;\n /**\n * Per-flow model judge function returning an impact probability in `[0, 1]`.\n * Provide either `judge` or `batchJudge` (batched evaluates all flows in 1 LLM call).\n */\n judge?: DecisionModelJudge;\n /**\n * Batched model judge evaluating all candidate flows in a single model call\n * (dramatically faster for local Ollama/MLX models and cloud decision models).\n */\n batchJudge?: DecisionBatchJudge;\n /**\n * Skip a flow only when `probability < threshold`.\n * Default: `0.20` (fail-open safety bias — runs anything >= 20% likely affected).\n */\n threshold?: number;\n /** Max diff size in bytes before failing open and running everything. Default: 60 kB. */\n maxDiffBytes?: number;\n /** Max single flow file size in bytes before failing open for that flow. Default: 32 kB. */\n maxFileBytes?: number;\n /** Tags that are NEVER excluded (e.g. `[\"smoke\"]`). */\n alwaysRunTags?: string[];\n /** Path prefixes that force the entire suite to run (e.g. `[\"infra/\", \"db/migrations/\"]`). */\n runAllOnPaths?: string[];\n}\n\n/**\n * Create a fail-open decision-model filter for `--changed-since`:\n *\n * Safety invariants (never skip important tests):\n * 1. Changed flow files always run.\n * 2. Config or lockfile changes run the entire suite.\n * 3. Diffs over `maxDiffBytes` (default 60 kB) run the entire suite.\n * 4. Flows tagged in `alwaysRunTags` always run.\n * 5. Any judge error or invalid probability fails open (flow runs).\n * 6. A flow is excluded only when `probability < threshold` (default 0.20).\n */\nexport function decisionFilter(options: DecisionFilterOptions): TestFilter {\n const filterName = options.name ?? \"decision\";\n const threshold = options.threshold ?? 0.2;\n const maxDiffBytes = options.maxDiffBytes ?? DEFAULT_MAX_DIFF_BYTES;\n const maxFileBytes = options.maxFileBytes ?? 32 * 1024;\n const alwaysRunTags = new Set(options.alwaysRunTags ?? []);\n const runAllOnPaths = (options.runAllOnPaths ?? []).map(normalizePath);\n\n return {\n name: filterName,\n async filter(flows, context): Promise<FilterDecisionOutput> {\n const { changes, configPath } = context;\n\n if (changes.files.length === 0) {\n return { exclude: {}, note: \"no git changes detected\" };\n }\n\n if (changes.files.some((f) => isConfigOrLockfile(f, configPath))) {\n return { exclude: {}, note: \"config or lockfile changed — running all flows\" };\n }\n\n const matchedGlobalPath = changes.files.find((f) =>\n runAllOnPaths.some((prefix) => normalizePath(f).startsWith(prefix)),\n );\n if (matchedGlobalPath) {\n return {\n exclude: {},\n note: `global path changed (${matchedGlobalPath}) — running all flows`,\n };\n }\n\n if (changes.truncated || changes.diffBytes > maxDiffBytes) {\n return {\n exclude: {},\n note: `diff exceeds ${Math.round(maxDiffBytes / 1024)}kB cap — failing open`,\n };\n }\n\n const changedSet = new Set(changes.files.map(normalizePath));\n const exclude: Record<string, string> = {};\n let calls = 0;\n let tokens = 0;\n let costUsd = 0;\n\n // Filter down to flows eligible for model judgment (safety rules always keep the rest)\n const eligible: FilterCandidate[] = [];\n for (const candidate of flows) {\n if (changedSet.has(normalizePath(candidate.file))) continue;\n if (candidate.tags.some((t) => alwaysRunTags.has(t))) continue;\n if (candidate.source && Buffer.byteLength(candidate.source, \"utf-8\") > maxFileBytes) {\n continue;\n }\n eligible.push(candidate);\n }\n\n if (eligible.length === 0) {\n return { exclude };\n }\n\n // Fast path: evaluate all eligible flows in ONE batched model call\n if (options.batchJudge) {\n try {\n const batch = await options.batchJudge({ candidates: eligible, changes });\n calls += batch.usage?.calls ?? 1;\n tokens += batch.usage?.tokens ?? 0;\n costUsd += batch.usage?.costUsd ?? 0;\n for (const candidate of eligible) {\n const prob = batch.probabilities[candidate.id];\n if (typeof prob === \"number\" && !Number.isNaN(prob) && prob >= 0 && prob < threshold) {\n const pct = Math.round(prob * 100);\n exclude[candidate.id] =\n batch.reasons?.[candidate.id] ??\n `rated ${pct}% likely affected (< ${Math.round(threshold * 100)}%)`;\n }\n }\n } catch {\n // Fail open on batch judge error\n return { exclude: {}, note: \"decision model error — failed open\" };\n }\n return {\n exclude,\n usage: calls > 0 ? { calls, tokens, costUsd } : undefined,\n };\n }\n\n if (!options.judge) {\n return { exclude: {}, note: \"no judge configured — failed open\" };\n }\n\n for (const candidate of eligible) {\n try {\n const verdict = await options.judge({ candidate, changes });\n calls += verdict.usage?.calls ?? 1;\n tokens += verdict.usage?.tokens ?? 0;\n costUsd += verdict.usage?.costUsd ?? 0;\n\n if (\n typeof verdict.probability === \"number\" &&\n !Number.isNaN(verdict.probability) &&\n verdict.probability >= 0 &&\n verdict.probability < threshold\n ) {\n const pct = Math.round(verdict.probability * 100);\n exclude[candidate.id] =\n verdict.reason ?? `rated ${pct}% likely affected (< ${Math.round(threshold * 100)}%)`;\n }\n } catch {\n // Fail open on any model/network error\n continue;\n }\n }\n\n return {\n exclude,\n usage: calls > 0 ? { calls, tokens, costUsd } : undefined,\n };\n },\n };\n}\n\nexport interface OllamaDecisionJudgeOptions {\n /** Ollama model tag, e.g. `\"qwen2.5:1.5b\"` or `\"qwen2.5:0.5b\"`. */\n model: string;\n /** Ollama HTTP endpoint (default: `\"http://127.0.0.1:11434\"`). */\n baseUrl?: string;\n /** Request timeout in ms (default: 15000). */\n timeoutMs?: number;\n /** Optional custom fetch implementation for testing. */\n fetchFn?: typeof fetch;\n}\n\n/**\n * Built-in local batched decision judge for Ollama (Apple Silicon / local GPU).\n * Evaluates all candidate flows against a PR diff in ONE structured JSON call\n * with `temperature: 0` and zero cloud token cost ($0.0000).\n */\nexport function createOllamaDecisionJudge(options: OllamaDecisionJudgeOptions): DecisionBatchJudge {\n const baseUrl = (options.baseUrl ?? \"http://127.0.0.1:11434\").replace(/\\/$/, \"\");\n const timeoutMs = options.timeoutMs ?? 15_000;\n const fetchFn = options.fetchFn ?? fetch;\n\n return async ({ candidates, changes }): Promise<DecisionBatchJudgeResult> => {\n const flowList = candidates\n .map((c, i) => `${i}: file=\"${c.file}\", name=\"${c.name}\", tags=[${c.tags.join(\",\")}]`)\n .join(\"\\n\");\n\n const prompt = [\n \"You are a conservative CI test-impact classifier. Err on the side of RUNNING tests (high recall).\",\n \"For each E2E flow below, output a probability from 0.0 to 1.0 that the git diff could affect it.\",\n \"Rules:\",\n \"- If a flow's file path, name, or tags share the same feature/module/domain as ANY changed file, rate it 0.9.\",\n \"- If unsure or possibly connected via shared UI/state/API, rate it 0.5.\",\n \"- Rate 0.05 ONLY if the flow is clearly in a completely unrelated module.\",\n `Changed files: ${changes.files.join(\", \")}`,\n `Diff:\\n${changes.diff.slice(0, 3000)}`,\n `Flows:\\n${flowList}`,\n 'Output compact single-line JSON mapping each index string to a number, e.g. {\"0\":0.9,\"1\":0.05}',\n ].join(\"\\n\");\n\n const res = await fetchFn(`${baseUrl}/api/generate`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({\n model: options.model,\n prompt,\n format: \"json\",\n stream: false,\n options: { temperature: 0, num_predict: 256 },\n }),\n signal: AbortSignal.timeout(timeoutMs),\n });\n\n if (!res.ok) {\n throw new Error(`Ollama returned HTTP ${res.status}`);\n }\n\n const payload = (await res.json()) as {\n response?: string;\n prompt_eval_count?: number;\n eval_count?: number;\n };\n\n const rawJson = (payload.response ?? \"{}\").trim();\n const parsed = JSON.parse(rawJson) as Record<string, unknown>;\n const probabilities: Record<string, number> = {};\n\n for (let i = 0; i < candidates.length; i++) {\n const cand = candidates[i]!;\n const val = parsed[String(i)] ?? parsed[cand.id] ?? parsed[cand.name];\n if (typeof val === \"number\" && !Number.isNaN(val)) {\n probabilities[cand.id] = Math.max(0, Math.min(1, val));\n } else {\n // Missing index -> fail open (1.0)\n probabilities[cand.id] = 1;\n }\n }\n\n return {\n probabilities,\n usage: {\n calls: 1,\n tokens: (payload.prompt_eval_count ?? 0) + (payload.eval_count ?? 0),\n costUsd: 0,\n },\n };\n };\n}\n\nexport interface LogprobDecisionJudgeOptions {\n /** Model identifier (e.g. `\"hf.co/apus-ailab/APUS-OpenJev-v1-9B-GGUF:Q8_0\"`, `\"jevk5-4b-v0.3:q8_0\"`, `\"decider4b-v2:bf16\"`, `\"plumb-4b\"`). */\n model: string;\n /** Protocol backend: `\"openai\"` (vLLM / SGLang / llama-server / OpenRouter / Typesafe AI) or `\"ollama\"`. */\n provider: \"openai\" | \"ollama\";\n /** Base URL (default: `http://127.0.0.1:8000/v1` for openai, `http://127.0.0.1:11434` for ollama). */\n baseUrl?: string;\n /** Optional Bearer API key for hosted OpenAI-compatible endpoints. */\n apiKey?: string;\n /** Request timeout per flow judgment in ms (default: 15000). */\n timeoutMs?: number;\n /** Injectable fetch for unit tests. */\n fetchFn?: typeof fetch;\n}\n\n/**\n * Compute calibrated binary YES probability from OpenAI-style `top_logprobs`\n * on a 1-token decision model response (`max_tokens: 1`, `logprobs: true`).\n * Returns `null` when neither YES nor NO tokens appeared in top_logprobs.\n */\nexport function probabilityFromTopLogprobs(\n topLogprobs: Array<{ token: string; logprob: number }>,\n): number | null {\n let yesProb = 0;\n let noProb = 0;\n\n for (const entry of topLogprobs) {\n const norm = entry.token.trim().toLowerCase();\n const p = Math.exp(entry.logprob);\n if (norm === \"yes\" || norm === \"y\" || norm === \"true\" || norm === \"1\") {\n yesProb += p;\n } else if (norm === \"no\" || norm === \"n\" || norm === \"false\" || norm === \"0\") {\n noProb += p;\n }\n }\n\n const total = yesProb + noProb;\n if (total <= 0) return null;\n return Math.max(0, Math.min(1, yesProb / total));\n}\n\n/**\n * Native 1-Token Logprob Decision Judge for System-1 decision models\n * (OpenJev, JevK5, Decider-4B, Plumb-4B, Winnow-12B, Typesafe AI Jev).\n *\n * Places the shared git diff prefix at the start of every prompt so vLLM,\n * SGLang, and llama.cpp automatically reuse the KV cache across all flows in a PR,\n * generating only **1 single token** (`YES` / `NO`) with exact calibrated probabilities.\n */\nexport function createLogprobDecisionJudge(\n options: LogprobDecisionJudgeOptions,\n): DecisionModelJudge {\n const baseUrl = (\n options.baseUrl ??\n (options.provider === \"ollama\" ? \"http://127.0.0.1:11434\" : \"http://127.0.0.1:8000/v1\")\n ).replace(/\\/$/, \"\");\n const timeoutMs = options.timeoutMs ?? 15_000;\n const fetchFn = options.fetchFn ?? fetch;\n\n return async ({ candidate, changes }): Promise<DecisionJudgeResult> => {\n // Shared prefix FIRST to maximize automatic KV-cache prefix hits across flows\n const prompt = [\n \"You are a binary CI test-impact classifier. Answer strictly YES or NO.\",\n `Changed files: ${changes.files.join(\", \")}`,\n `Git diff:\\n${changes.diff.slice(0, 3500)}`,\n `Question: Could this change affect or break the E2E flow below?`,\n `Flow file: ${candidate.file}`,\n `Flow name: ${candidate.name}`,\n `Flow tags: ${candidate.tags.join(\", \") || \"(none)\"}`,\n \"Answer (YES or NO):\",\n ].join(\"\\n\");\n\n if (options.provider === \"ollama\") {\n const res = await fetchFn(`${baseUrl}/api/generate`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({\n model: options.model,\n prompt,\n stream: false,\n logprobs: true,\n top_logprobs: 10,\n options: { temperature: 0, num_predict: 1 },\n }),\n signal: AbortSignal.timeout(timeoutMs),\n });\n if (!res.ok) throw new Error(`Ollama returned HTTP ${res.status}`);\n const data = (await res.json()) as {\n response?: string;\n prompt_eval_count?: number;\n eval_count?: number;\n logprobs?: Array<{ top_logprobs?: Array<{ token: string; logprob: number }> }>;\n };\n\n const top = data.logprobs?.[0]?.top_logprobs;\n let probability = top ? probabilityFromTopLogprobs(top) : null;\n if (probability === null) {\n const tok = (data.response ?? \"\").trim().toLowerCase();\n if (tok.startsWith(\"n\") || tok === \"0\" || tok === \"false\") probability = 0.05;\n else probability = 0.95; // fail open on ambiguous token\n }\n\n return {\n probability,\n usage: {\n calls: 1,\n tokens: (data.prompt_eval_count ?? 0) + (data.eval_count ?? 0),\n costUsd: 0,\n },\n };\n }\n\n // OpenAI-compatible 1-token logprob endpoint (vLLM / SGLang / llama-server / Typesafe AI / OpenRouter)\n const res = await fetchFn(`${baseUrl}/chat/completions`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n ...(options.apiKey ? { Authorization: `Bearer ${options.apiKey}` } : {}),\n },\n body: JSON.stringify({\n model: options.model,\n temperature: 0,\n max_tokens: 1,\n logprobs: true,\n top_logprobs: 10,\n messages: [{ role: \"user\", content: prompt }],\n }),\n signal: AbortSignal.timeout(timeoutMs),\n });\n if (!res.ok) throw new Error(`Decision endpoint returned HTTP ${res.status}`);\n const data = (await res.json()) as {\n choices?: Array<{\n message?: { content?: string };\n logprobs?: {\n content?: Array<{ top_logprobs?: Array<{ token: string; logprob: number }> }>;\n };\n }>;\n usage?: { prompt_tokens?: number; completion_tokens?: number };\n };\n\n const top = data.choices?.[0]?.logprobs?.content?.[0]?.top_logprobs;\n let probability = top ? probabilityFromTopLogprobs(top) : null;\n if (probability === null) {\n const tok = (data.choices?.[0]?.message?.content ?? \"\").trim().toLowerCase();\n if (tok.startsWith(\"n\") || tok === \"0\" || tok === \"false\") probability = 0.05;\n else probability = 0.95;\n }\n\n return {\n probability,\n usage: {\n calls: 1,\n tokens: (data.usage?.prompt_tokens ?? 0) + (data.usage?.completion_tokens ?? 0),\n costUsd: 0,\n },\n };\n };\n}\n\n// ── Built-in Deterministic Path-Rule Filter ─────────────────────────────────\n\nexport interface PathRule {\n /** Flow tag or path prefix this rule owns. */\n matchFlow: { tag?: string; filePrefix?: string };\n /** Source path prefixes that can affect matching flows. */\n watchPaths: string[];\n}\n\nexport interface PathRuleFilterOptions {\n name?: string;\n rules: PathRule[];\n alwaysRunTags?: string[];\n runAllOnPaths?: string[];\n}\n\n/**\n * 100% deterministic zero-LLM filter mapping repo path prefixes to flow tags/files.\n * Flows not matched by any rule fail open and run automatically.\n */\nexport function pathRuleFilter(options: PathRuleFilterOptions): TestFilter {\n const filterName = options.name ?? \"path-rules\";\n const alwaysRunTags = new Set(options.alwaysRunTags ?? []);\n const runAllOnPaths = (options.runAllOnPaths ?? []).map(normalizePath);\n\n return {\n name: filterName,\n filter(flows, context): FilterDecisionOutput {\n const { changes, configPath } = context;\n\n if (changes.files.length === 0) {\n return { exclude: {}, note: \"no git changes detected\" };\n }\n\n if (changes.files.some((f) => isConfigOrLockfile(f, configPath))) {\n return { exclude: {}, note: \"config or lockfile changed — running all flows\" };\n }\n\n const matchedGlobal = changes.files.find((f) =>\n runAllOnPaths.some((prefix) => normalizePath(f).startsWith(prefix)),\n );\n if (matchedGlobal) {\n return { exclude: {}, note: `global path changed (${matchedGlobal}) — running all flows` };\n }\n\n const changedFiles = changes.files.map(normalizePath);\n const changedSet = new Set(changedFiles);\n const exclude: Record<string, string> = {};\n\n for (const candidate of flows) {\n if (changedSet.has(normalizePath(candidate.file))) continue;\n if (candidate.tags.some((t) => alwaysRunTags.has(t))) continue;\n\n const matchedRules = options.rules.filter((rule) => {\n const tagOk = rule.matchFlow.tag ? candidate.tags.includes(rule.matchFlow.tag) : true;\n const fileOk = rule.matchFlow.filePrefix\n ? normalizePath(candidate.file).startsWith(normalizePath(rule.matchFlow.filePrefix))\n : true;\n return (rule.matchFlow.tag || rule.matchFlow.filePrefix) && tagOk && fileOk;\n });\n\n // No rule owns this flow -> fail open (keep it)\n if (matchedRules.length === 0) continue;\n\n const watchedPrefixes = matchedRules.flatMap((r) => r.watchPaths.map(normalizePath));\n const affected = changedFiles.some((cf) =>\n watchedPrefixes.some((prefix) => cf.startsWith(prefix)),\n );\n\n if (!affected) {\n exclude[candidate.id] = `no changed files matched [${watchedPrefixes.join(\", \")}]`;\n }\n }\n\n return { exclude };\n },\n };\n}\n\n// ── Built-in Deterministic Import-Graph Impact Filter (Zero AI) ─────────────\n\nexport interface DeterministicImpactFilterOptions {\n name?: string;\n /** Additional path-to-flow rules combined with automatic static import-graph tracing. */\n pathMappings?: PathRule[];\n /** Flow tags that are NEVER skipped (e.g. `[\"smoke\"]`). */\n alwaysRunTags?: string[];\n /** Path prefixes that force the entire suite to run (e.g. `[\"src/shared/\", \"db/\"]`). */\n runAllOnPaths?: string[];\n /**\n * When true (default), if a changed file is NOT imported by any flow and does not\n * match any `pathMappings`, fail open and run all flows so unmapped app changes are\n * never silently missed. Set to `false` for strict import-graph-only selection.\n */\n failOpenOnUnmappedChange?: boolean;\n /** Max recursive import depth to trace from each flow file. Default: 12. */\n maxDepth?: number;\n}\n\nconst IMPORT_SPECIFIER_RE =\n /(?:import|export)\\s+(?:[^'\"]*?\\s+from\\s+)?[\"'](\\.{1,2}\\/[^\"']+)[\"']|require\\(\\s*[\"'](\\.{1,2}\\/[^\"']+)[\"']\\s*\\)|import\\(\\s*[\"'](\\.{1,2}\\/[^\"']+)[\"']\\s*\\)/g;\n\nconst RESOLVE_EXTENSIONS = [\n \"\",\n \".ts\",\n \".tsx\",\n \".mts\",\n \".js\",\n \".jsx\",\n \".mjs\",\n \".cjs\",\n \"/index.ts\",\n \"/index.tsx\",\n \"/index.js\",\n \"/index.mjs\",\n];\n\nfunction resolveLocalImport(fromFileAbs: string, specifier: string): string | null {\n const baseDir = dirname(fromFileAbs);\n const rawTarget = resolve(baseDir, specifier);\n // Handle TS ESM `.js` -> `.ts` / `.tsx` extension rewriting\n const withoutJs = rawTarget.replace(/\\.m?js$/, \"\");\n const candidates =\n rawTarget !== withoutJs\n ? [withoutJs + \".ts\", withoutJs + \".tsx\", withoutJs + \".mts\", rawTarget]\n : [rawTarget];\n\n for (const base of candidates) {\n for (const ext of RESOLVE_EXTENSIONS) {\n const full = ext ? base + ext : base;\n try {\n if (existsSync(full) && statSync(full).isFile()) {\n return full;\n }\n } catch {\n // ignore unreadable paths\n }\n }\n }\n return null;\n}\n\nfunction collectTransitiveImports(\n entryAbs: string,\n cwd: string,\n maxDepth: number,\n fileCache: Map<string, string[]>,\n): Set<string> {\n const visited = new Set<string>();\n const queue: Array<{ abs: string; depth: number }> = [{ abs: entryAbs, depth: 0 }];\n\n while (queue.length > 0) {\n const { abs, depth } = queue.shift()!;\n const normRel = normalizePath(relative(cwd, abs));\n if (visited.has(normRel)) continue;\n visited.add(normRel);\n if (depth >= maxDepth) continue;\n\n let specs = fileCache.get(abs);\n if (!specs) {\n specs = [];\n try {\n if (existsSync(abs) && statSync(abs).isFile()) {\n const content = readFileSync(abs, \"utf-8\");\n IMPORT_SPECIFIER_RE.lastIndex = 0;\n let match: RegExpExecArray | null;\n while ((match = IMPORT_SPECIFIER_RE.exec(content)) !== null) {\n const spec = match[1] ?? match[2] ?? match[3];\n if (spec) specs.push(spec);\n }\n }\n } catch {\n // ignore unreadable\n }\n fileCache.set(abs, specs);\n }\n\n for (const spec of specs) {\n const resolved = resolveLocalImport(abs, spec);\n if (resolved) {\n queue.push({ abs: resolved, depth: depth + 1 });\n }\n }\n }\n\n return visited;\n}\n\n/**\n * 100% deterministic, zero-AI test impact filter for `--changed-since`.\n *\n * Recursively traces static ESM/CJS imports (`import`, `export ... from`, `require`)\n * from every `.flow.ts` file and combines them with optional `pathMappings`.\n * Fails open on config/lockfile changes, `runAllOnPaths`, and (by default) any\n * changed file not covered by any import graph or path mapping.\n */\nexport function deterministicImpactFilter(\n options: DeterministicImpactFilterOptions = {},\n): TestFilter {\n const filterName = options.name ?? \"deterministic-impact\";\n const alwaysRunTags = new Set(options.alwaysRunTags ?? []);\n const runAllOnPaths = (options.runAllOnPaths ?? []).map(normalizePath);\n const pathMappings = options.pathMappings ?? [];\n const failOpenOnUnmapped = options.failOpenOnUnmappedChange ?? true;\n const maxDepth = options.maxDepth ?? 12;\n\n return {\n name: filterName,\n filter(flows, context): FilterDecisionOutput {\n const { changes, configPath, cwd } = context;\n\n if (changes.files.length === 0) {\n return { exclude: {}, note: \"no git changes detected\" };\n }\n\n if (changes.files.some((f) => isConfigOrLockfile(f, configPath))) {\n return { exclude: {}, note: \"config or lockfile changed — running all flows\" };\n }\n\n const matchedGlobal = changes.files.find((f) =>\n runAllOnPaths.some((prefix) => normalizePath(f).startsWith(prefix)),\n );\n if (matchedGlobal) {\n return { exclude: {}, note: `global path changed (${matchedGlobal}) — running all flows` };\n }\n\n const changedFiles = changes.files.map(normalizePath);\n const changedSet = new Set(changedFiles);\n const fileCache = new Map<string, string[]>();\n\n // Build transitive import graph for every candidate flow\n const flowDeps = new Map<string, Set<string>>();\n const allKnownFiles = new Set<string>();\n for (const candidate of flows) {\n const entryAbs = resolve(cwd, candidate.file);\n const deps = collectTransitiveImports(entryAbs, cwd, maxDepth, fileCache);\n deps.add(normalizePath(candidate.file));\n flowDeps.set(candidate.id, deps);\n for (const d of deps) allKnownFiles.add(d);\n }\n\n const allWatchedPrefixes = pathMappings.flatMap((r) => r.watchPaths.map(normalizePath));\n\n if (failOpenOnUnmapped) {\n const unmapped = changedFiles.find(\n (cf) =>\n !allKnownFiles.has(cf) && !allWatchedPrefixes.some((prefix) => cf.startsWith(prefix)),\n );\n if (unmapped) {\n return {\n exclude: {},\n note: `unmapped file changed (${unmapped}) — failing open and running all flows`,\n };\n }\n }\n\n const exclude: Record<string, string> = {};\n for (const candidate of flows) {\n if (changedSet.has(normalizePath(candidate.file))) continue;\n if (candidate.tags.some((t) => alwaysRunTags.has(t))) continue;\n\n const deps = flowDeps.get(candidate.id);\n const touchedByImport = deps ? changedFiles.some((cf) => deps.has(cf)) : false;\n if (touchedByImport) continue;\n\n const matchedRules = pathMappings.filter((rule) => {\n const tagOk = rule.matchFlow.tag ? candidate.tags.includes(rule.matchFlow.tag) : true;\n const fileOk = rule.matchFlow.filePrefix\n ? normalizePath(candidate.file).startsWith(normalizePath(rule.matchFlow.filePrefix))\n : true;\n return (rule.matchFlow.tag || rule.matchFlow.filePrefix) && tagOk && fileOk;\n });\n const touchedByRule = matchedRules.some((rule) =>\n changedFiles.some((cf) =>\n rule.watchPaths.some((prefix) => cf.startsWith(normalizePath(prefix))),\n ),\n );\n if (touchedByRule) continue;\n\n exclude[candidate.id] = \"unaffected by changed imports or path mappings\";\n }\n\n return { exclude };\n },\n };\n}\n\n/**\n * Run a chain of `TestFilter`s sequentially over candidate flows.\n * Any filter that throws fails open (keeps all remaining flows) and logs a note.\n */\nexport async function applyTestFilters<T>(\n items: T[],\n candidates: FilterCandidate[],\n filters: TestFilter[],\n context: FilterContext,\n): Promise<ApplyFiltersResult<T>> {\n let remainingIndices = items.map((_, i) => i);\n const excluded: ApplyFiltersResult<T>[\"excluded\"] = [];\n const reports: AppliedFilterReport[] = [];\n\n for (const filter of filters) {\n const activeCandidates = remainingIndices.map((idx) => candidates[idx]!);\n const totalBefore = activeCandidates.length;\n\n try {\n const output = await filter.filter(activeCandidates, context);\n const excludeMap = output.exclude ?? {};\n const nextRemaining: number[] = [];\n let excludedCount = 0;\n\n for (const idx of remainingIndices) {\n const cand = candidates[idx]!;\n const reason = excludeMap[cand.id];\n if (reason !== undefined) {\n excludedCount += 1;\n excluded.push({\n item: items[idx]!,\n candidate: cand,\n filterName: filter.name,\n reason,\n });\n } else {\n nextRemaining.push(idx);\n }\n }\n\n remainingIndices = nextRemaining;\n reports.push({\n filterName: filter.name,\n total: totalBefore,\n kept: remainingIndices.length,\n excluded: excludedCount,\n note: output.note,\n usage: output.usage,\n });\n } catch (err) {\n reports.push({\n filterName: filter.name,\n total: totalBefore,\n kept: totalBefore,\n excluded: 0,\n failedOpen: true,\n note: `filter error (${err instanceof Error ? err.message : String(err)}) — failed open`,\n });\n }\n }\n\n return {\n kept: remainingIndices.map((idx) => items[idx]!),\n excluded,\n reports,\n };\n}\n\n/** Format a concise, `e2e`-style CI summary line for each applied filter. */\nexport function formatFilterSummary(reports: AppliedFilterReport[]): string[] {\n return reports.map((r) => {\n const parts: string[] = [];\n if (r.usage?.calls) {\n parts.push(`${r.usage.calls} call${r.usage.calls === 1 ? \"\" : \"s\"}`);\n }\n if (r.usage?.tokens) {\n const tok =\n r.usage.tokens >= 1000 ? `${(r.usage.tokens / 1000).toFixed(1)}k` : String(r.usage.tokens);\n parts.push(`${tok} tokens`);\n }\n if (r.usage?.costUsd !== undefined && r.usage.costUsd > 0) {\n parts.push(`$${r.usage.costUsd.toFixed(4)}`);\n }\n if (r.note) {\n parts.push(r.note);\n }\n const detail = parts.length > 0 ? ` (${parts.join(\", \")})` : \"\";\n return `${r.filterName} kept ${r.kept} of ${r.total} flows, left out ${r.excluded}${detail}`;\n });\n}\n"],"mappings":";;;;;;AAAA;AAAA,SAAS,oBAAoB;AAC7B,SAAS,cAAc,YAAY,gBAAgB;AACnD,SAAS,UAAU,SAAS,UAAU,eAAe;AAqFrD,IAAM,oBAAoB,oBAAI,IAAI;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAED,IAAM,yBAAyB,KAAK;AAEpC,SAAS,cAAc,GAAmB;AACxC,SAAO,EAAE,WAAW,MAAM,GAAG,EAAE,QAAQ,SAAS,EAAE;AACpD;AAEA,SAAS,mBAAmB,UAAkB,YAA8B;AAC1E,QAAM,OAAO,cAAc,QAAQ;AACnC,QAAM,OAAO,SAAS,IAAI;AAC1B,MAAI,kBAAkB,IAAI,IAAI,EAAG,QAAO;AACxC,MAAI,iDAAiD,KAAK,IAAI,EAAG,QAAO;AACxE,MAAI,cAAc,cAAc,UAAU,EAAE,SAAS,IAAI,EAAG,QAAO;AACnE,SAAO;AACT;AAMO,SAAS,kBACd,SACA,MAAc,QAAQ,IAAI,GAC1B,eAAuB,wBACvB,QACY;AACZ,QAAM,UACJ,WACC,CAAC,MAAgB,YAChB,aAAa,OAAO,MAAM;AAAA,IACxB,KAAK;AAAA,IACL,UAAU;AAAA,IACV,WAAW,KAAK,OAAO;AAAA,IACvB,OAAO,CAAC,UAAU,QAAQ,MAAM;AAAA,EAClC,CAAC;AAEL,MAAI;AACJ,MAAI;AACF,gBAAY,QAAQ,CAAC,cAAc,SAAS,MAAM,GAAG,GAAG,EAAE,KAAK,KAAK;AAAA,EACtE,QAAQ;AACN,gBAAY;AAAA,EACd;AAEA,QAAM,YAAY,YAAY,GAAG,SAAS,YAAY;AACtD,QAAM,gBAAgB,QAAQ,CAAC,QAAQ,iBAAiB,SAAS,GAAG,GAAG;AACvE,QAAM,U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H;","names":["res","data","top","probability"]}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { createRequire as __spanaCreateRequire } from "node:module"; const require = __spanaCreateRequire(import.meta.url);
|
|
1
2
|
import {
|
|
2
3
|
external_exports
|
|
3
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RL3ICBAB.js";
|
|
4
5
|
import {
|
|
5
6
|
init_esm_shims
|
|
6
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VBAPZMPX.js";
|
|
7
8
|
|
|
8
9
|
// src/schemas/config.ts
|
|
9
10
|
init_esm_shims();
|
|
@@ -158,15 +159,45 @@ var webExecutionConfigSchema = external_exports.object({
|
|
|
158
159
|
reducedMotion: external_exports.enum(["reduce", "no-preference"]).optional(),
|
|
159
160
|
timezoneId: external_exports.string().min(1).optional(),
|
|
160
161
|
locale: external_exports.string().min(1).optional(),
|
|
162
|
+
userAgent: external_exports.string().min(1).optional(),
|
|
163
|
+
httpCredentials: external_exports.object({
|
|
164
|
+
username: external_exports.string(),
|
|
165
|
+
password: external_exports.string()
|
|
166
|
+
}).strict().optional(),
|
|
161
167
|
viewport: external_exports.object({
|
|
162
168
|
width: external_exports.number().int().positive(),
|
|
163
|
-
height: external_exports.number().int().positive()
|
|
169
|
+
height: external_exports.number().int().positive(),
|
|
170
|
+
deviceScaleFactor: external_exports.number().positive().optional(),
|
|
171
|
+
mobile: external_exports.boolean().optional(),
|
|
172
|
+
isMobile: external_exports.boolean().optional(),
|
|
173
|
+
hasTouch: external_exports.boolean().optional()
|
|
174
|
+
}).strict().optional(),
|
|
175
|
+
deviceScaleFactor: external_exports.number().positive().optional(),
|
|
176
|
+
mobile: external_exports.boolean().optional(),
|
|
177
|
+
isMobile: external_exports.boolean().optional(),
|
|
178
|
+
hasTouch: external_exports.boolean().optional(),
|
|
179
|
+
device: external_exports.object({
|
|
180
|
+
name: external_exports.string().min(1).optional(),
|
|
181
|
+
viewport: external_exports.object({
|
|
182
|
+
width: external_exports.number().int().positive(),
|
|
183
|
+
height: external_exports.number().int().positive(),
|
|
184
|
+
deviceScaleFactor: external_exports.number().positive().optional(),
|
|
185
|
+
mobile: external_exports.boolean().optional(),
|
|
186
|
+
isMobile: external_exports.boolean().optional(),
|
|
187
|
+
hasTouch: external_exports.boolean().optional()
|
|
188
|
+
}).strict().optional(),
|
|
189
|
+
deviceScaleFactor: external_exports.number().positive().optional(),
|
|
190
|
+
mobile: external_exports.boolean().optional(),
|
|
191
|
+
isMobile: external_exports.boolean().optional(),
|
|
192
|
+
hasTouch: external_exports.boolean().optional(),
|
|
193
|
+
userAgent: external_exports.string().min(1).optional()
|
|
164
194
|
}).strict().optional(),
|
|
165
195
|
args: external_exports.array(external_exports.string()).optional(),
|
|
166
196
|
chromiumSandbox: external_exports.boolean().optional(),
|
|
167
197
|
readyExpression: external_exports.string().min(1).optional(),
|
|
168
198
|
launchTimeout: external_exports.number().positive().optional(),
|
|
169
|
-
evaluateTimeout: external_exports.number().positive().optional()
|
|
199
|
+
evaluateTimeout: external_exports.number().positive().optional(),
|
|
200
|
+
navigationTimeout: external_exports.number().positive().optional()
|
|
170
201
|
}).strict();
|
|
171
202
|
var executionConfigSchema = external_exports.object({
|
|
172
203
|
mode: external_exports.enum(["local", "appium"]).optional(),
|
|
@@ -269,6 +300,8 @@ var provConfigSchema = external_exports.object({
|
|
|
269
300
|
port: external_exports.number().int().positive().optional(),
|
|
270
301
|
cwd: external_exports.string().min(1).optional(),
|
|
271
302
|
env: external_exports.record(external_exports.string(), external_exports.string()).optional(),
|
|
303
|
+
inheritEnv: external_exports.boolean().optional(),
|
|
304
|
+
inheritEnvKeys: external_exports.array(external_exports.string().min(1)).optional(),
|
|
272
305
|
timeout: external_exports.number().positive().optional(),
|
|
273
306
|
reuseExistingServer: external_exports.boolean().optional(),
|
|
274
307
|
stdout: external_exports.enum(["pipe", "ignore", "inherit"]).optional(),
|
|
@@ -283,6 +316,8 @@ var provConfigSchema = external_exports.object({
|
|
|
283
316
|
port: external_exports.number().int().positive().optional(),
|
|
284
317
|
cwd: external_exports.string().min(1).optional(),
|
|
285
318
|
env: external_exports.record(external_exports.string(), external_exports.string()).optional(),
|
|
319
|
+
inheritEnv: external_exports.boolean().optional(),
|
|
320
|
+
inheritEnvKeys: external_exports.array(external_exports.string().min(1)).optional(),
|
|
286
321
|
timeout: external_exports.number().positive().optional(),
|
|
287
322
|
reuseExistingServer: external_exports.boolean().optional(),
|
|
288
323
|
stdout: external_exports.enum(["pipe", "ignore", "inherit"]).optional(),
|
|
@@ -336,4 +371,4 @@ export {
|
|
|
336
371
|
validateConfig,
|
|
337
372
|
formatConfigValidationError
|
|
338
373
|
};
|
|
339
|
-
//# sourceMappingURL=chunk-
|
|
374
|
+
//# sourceMappingURL=chunk-FLPPA2XY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schemas/config.ts"],"sourcesContent":["import type { Platform, TapMode } from \"./selector.js\";\nimport type {\n DeviceStateConfig,\n LaunchOptions,\n VirtualAuthenticatorOptions,\n} from \"../drivers/raw-driver.js\";\nimport type { WebServerConfig } from \"../runtime/web-server.js\";\nimport type { ProjectConfig } from \"../core/projects.js\";\nimport type { AgentProviderConfig } from \"../api/agent-fixture.js\";\nimport { z, type ZodError } from \"zod\";\n\nexport type {\n DeviceStateConfig,\n LaunchOptions,\n VirtualAuthenticatorOptions,\n WebServerConfig,\n ProjectConfig,\n AgentProviderConfig,\n};\n\nexport interface IOSSigningConfig {\n /** Apple Development Team ID (from developer.apple.com or Xcode) */\n teamId: string;\n /** Code signing identity (default: \"Apple Development\") */\n signingIdentity?: string;\n}\n\nexport interface BridgeConfig {\n /** Enable the in-app spana-bridge WebSocket server. Default: auto-detected when port/url is set. */\n enabled?: boolean;\n /** Port for the runner's spana-bridge WebSocket server (default: 9333). */\n port?: number;\n /** Host to bind the bridge server on (default: \"127.0.0.1\"). */\n host?: string;\n /** Explicit external bridge URL if already running (e.g. ws://127.0.0.1:9333). */\n url?: string;\n /** Connection timeout in ms when waiting for the app bridge to connect (default: 5000). */\n connectTimeout?: number;\n}\n\nexport interface WarmDaemonConfig {\n /** Keep WDA / UiAutomator2 daemons alive across test runs and reuse them. Default: false. */\n enabled?: boolean;\n /** Reuse a single browser process across flows with fresh BrowserContexts. Default: true. */\n reuseBrowserProcess?: boolean;\n /** Reuse an active WDA/UiAutomator2 session across flows instead of recreating. Default: true when warm daemons enabled. */\n reuseSession?: boolean;\n /** Optional path to store warm daemon metadata. */\n stateFile?: string;\n}\n\nexport type WebUrlResolver =\n | string\n | ((ctx: { workerIndex: number; parallelIndex: number }) => string);\n\nexport interface AppConfig {\n url?: WebUrlResolver;\n packageName?: string;\n bundleId?: string;\n /** Path to .app or .ipa for auto-install on device/simulator */\n appPath?: string;\n /** iOS code signing config for physical devices */\n signing?: IOSSigningConfig;\n /** Explicit WebKit Inspector URL or port for iOS WKWebView direct DOM access */\n webkitInspectorUrl?: string;\n webkitInspectorPort?: number;\n /** Explicit CDP port for Android WebView or desktop targets */\n cdpPort?: number;\n /** Pin device locale (e.g. \"en_US\", \"sv_SE\") for predictable system UI labels */\n locale?: string;\n /** Optional spana-bridge override for this app target */\n bridge?: BridgeConfig;\n}\n\nexport interface ElectronAppConfig {\n /** Path to Electron main entry file or app directory (passed to Playwright _electron.launch) */\n entry?: string;\n /** Path to a packaged Electron executable */\n executablePath?: string;\n /** Extra CLI arguments passed to Electron */\n args?: string[];\n /** Working directory for Electron launch */\n cwd?: string;\n /** Additional environment variables for Electron */\n env?: Record<string, string>;\n /** Attach to an already-running Electron app over CDP instead of launching */\n cdpUrl?: string;\n /** Remote debugging port when launching or attaching over CDP */\n cdpPort?: number;\n /** Optional URL to navigate to after launch */\n url?: string;\n /** Optional spana-bridge config */\n bridge?: BridgeConfig;\n}\n\nexport type ElectrobunRenderer = \"native\" | \"cef\";\n\nexport interface ElectrobunAppConfig {\n /** Path to Electrobun binary or packaged .app/.exe */\n executablePath?: string;\n /** Path to Electrobun project root (containing electrobun.config.ts) */\n appDir?: string;\n /** Extra CLI arguments passed to the Electrobun process */\n args?: string[];\n /** Working directory for launch */\n cwd?: string;\n /** Additional environment variables */\n env?: Record<string, string>;\n /** Renderer engine used by the Electrobun build: \"native\" (WKWebView/WebView2/WebKitGTK) or \"cef\" */\n renderer?: ElectrobunRenderer;\n /** Attach to an already-running Electrobun CEF/WebView2 app over CDP */\n cdpUrl?: string;\n /** Remote debugging port (ELECTROBUN_CDP_PORT / WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS) */\n cdpPort?: number;\n /** WebKit Inspector port for macOS WKWebView or Linux WebKitGTK */\n webkitInspectorPort?: number;\n /** Optional URL to navigate to after launch */\n url?: string;\n /** Optional spana-bridge config */\n bridge?: BridgeConfig;\n}\n\nexport type BrowserName = \"chromium\" | \"firefox\" | \"webkit\";\nexport type WebBrowserEngine = \"auto\" | \"playwright\" | \"cdp\" | \"lightpanda\";\nexport type WebContextIsolation = \"fresh\" | \"hot-cache\";\nexport type WebGpuMode = \"auto\" | \"swiftshader\" | \"hardware\" | \"disabled\";\nexport type WebResourceBlockType = \"image\" | \"font\" | \"media\" | \"stylesheet\";\nexport type VideoRecordingMode = \"off\" | \"on\" | \"retain-on-failure\";\n\nexport interface WasmAppConfig {\n /** Path to a compiled `.wasm` binary for headless in-process / WASI / wasmtime testing. */\n modulePath?: string;\n /** Execution backend: `\"in-process\"` (default), `\"wasi\"` (`node:wasi`), or `\"wasmtime\"` CLI. */\n runtime?: \"in-process\" | \"wasi\" | \"wasmtime\";\n /** CLI arguments passed to WASI / wasmtime modules. */\n args?: string[];\n /** Environment variables passed to WASI / wasmtime modules. */\n env?: Record<string, string>;\n /** Preopened host directories mapped into WASI (`{ \"/sandbox\": \"./tmp\" }`). */\n preopens?: Record<string, string>;\n /** Optional export function name invoked on launch (default: `_start` for WASI). */\n entryExport?: string;\n}\n\nexport type StorybookValue = string | number | boolean | null;\n\nexport interface StorybookConfig {\n /** Optional dedicated Storybook URL (falls back to apps.web.url when omitted) */\n url?: string;\n /** Preview iframe path used to render isolated stories (default: /iframe.html) */\n iframePath?: string;\n}\n\nexport interface WebViewportConfig {\n width: number;\n height: number;\n /** Device pixel ratio (e.g. `2` or `3` for Retina/mobile). */\n deviceScaleFactor?: number;\n /** Emulate mobile device metrics & viewport meta tag. */\n mobile?: boolean;\n /** Playwright-compatible alias for `mobile`. */\n isMobile?: boolean;\n /** Enable touch event emulation (`Emulation.setTouchEmulationEnabled`). */\n hasTouch?: boolean;\n}\n\nexport interface HttpCredentialsConfig {\n username: string;\n password: string;\n}\n\nexport interface WebDeviceConfig {\n name?: string;\n viewport?: WebViewportConfig;\n deviceScaleFactor?: number;\n mobile?: boolean;\n isMobile?: boolean;\n hasTouch?: boolean;\n userAgent?: string;\n}\n\nexport interface WebExecutionConfig {\n browser?: BrowserName;\n /** Browser engine backend: \"playwright\" (default), \"cdp\" (direct CDP WebSocket — zero Playwright pipe), or \"lightpanda\". */\n engine?: WebBrowserEngine;\n /** Connect to an existing CDP browser / Lightpanda endpoint (e.g. \"http://127.0.0.1:9222\"). */\n cdpUrl?: string;\n /** Connect to a remote Playwright server WebSocket (e.g. BrowserStack Automate Web `wss://cdp.browserstack.com/playwright?...`). */\n wsEndpoint?: string;\n /** Explicit browser executable path (e.g. system Chrome or custom Chromium binary). */\n executablePath?: string;\n /** Browser release channel (e.g. \"chrome\", \"chrome-beta\", \"msedge\"). */\n channel?: string;\n headless?: boolean;\n /** Navigation readiness event for launchApp/openLink (default: \"domcontentloaded\" on CDP, \"load\" on Playwright). */\n waitUntil?: \"domcontentloaded\" | \"load\" | \"networkidle\" | \"commit\";\n /** Collapse CSS transitions & animations to 0.001ms for faster deterministic runs. */\n instantAnimations?: boolean;\n /** Abort heavy asset requests (\"image\" | \"font\" | \"media\" | \"stylesheet\") during web runs. */\n blockResources?: WebResourceBlockType[];\n /** Reuse a persistent warm Chromium daemon across runs via CDP (chromium only). */\n warmBrowser?: boolean;\n /** Scope key for isolating warm Chromium daemons across concurrent repos/runs (defaults to cwd hash). */\n warmBrowserScope?: string;\n /** Create a fresh isolated BrowserContext per flow using pre-warmed context pooling + background teardown. */\n freshContextPerFlow?: boolean;\n /**\n * Context isolation strategy when `freshContextPerFlow` is enabled (Direct CDP):\n * - `\"hot-cache\"` (default in v0.14+): keeps Chromium's HTTP & V8 bytecode cache hot while wiping\n * cookies, localStorage, sessionStorage, OPFS, IndexedDB, CacheStorage, and service workers\n * between flows (~4 ms reset!).\n * - `\"fresh\"`: new `Target.createBrowserContext` per flow (strictest isolation).\n */\n contextIsolation?: WebContextIsolation;\n /** Max worker contexts sharing one Chromium browser process under `--parallel` (default: 4 for `cdp`, 2 otherwise). */\n maxContextsPerBrowser?: number;\n /** Automatically attach a CDP WebAuthn virtual authenticator (passkey) to every fresh context. */\n virtualAuthenticator?: boolean | VirtualAuthenticatorOptions;\n /** Optional Playwright storage state JSON file to preload for web runs */\n storageState?: string;\n /** Print verbose Playwright runtime events to stdout for local web debugging */\n verboseLogging?: boolean;\n /** Optional Storybook config for isolated component/story flows in the browser runtime */\n storybook?: StorybookConfig;\n /** Unpacked Chromium browser extension directories to load at launch. */\n extensions?: string[];\n /** Emulate `prefers-color-scheme` on web launch (`\"dark\"` | `\"light\"` | `\"no-preference\"`). */\n colorScheme?: \"dark\" | \"light\" | \"no-preference\";\n /** Emulate `prefers-reduced-motion` on web launch (`\"reduce\"` | `\"no-preference\"`). */\n reducedMotion?: \"reduce\" | \"no-preference\";\n /** Emulate IANA timezone ID on Chromium launch (e.g. `\"America/New_York\"`). */\n timezoneId?: string;\n /** Emulate browser locale / Accept-Language (e.g. `\"sv-SE\"`, `\"en-US\"`). */\n locale?: string;\n /** Explicit User-Agent header & `navigator.userAgent` override. */\n userAgent?: string;\n /** HTTP Basic/Digest authentication credentials for protected origins. */\n httpCredentials?: HttpCredentialsConfig;\n /** Default viewport dimensions & optional mobile metrics applied before first navigation (default: 1280×720). */\n viewport?: WebViewportConfig;\n /** Device pixel ratio override (e.g. `2` or `3`). */\n deviceScaleFactor?: number;\n /** Emulate a mobile device (meta viewport + mobile media features). */\n mobile?: boolean;\n /** Playwright-compatible alias for `mobile`. */\n isMobile?: boolean;\n /** Enable touch event emulation. */\n hasTouch?: boolean;\n /** Bundled device emulation descriptor (`viewport`, `deviceScaleFactor`, `isMobile`, `hasTouch`, `userAgent`). */\n device?: WebDeviceConfig;\n /** Extra Chromium CLI arguments passed when launching the browser (e.g. `--use-fake-device-for-media-stream`). */\n args?: string[];\n /**\n * GPU rendering mode for headless/headed Chromium:\n * - `\"auto\"` (default): `\"swiftshader\"` when `webgpu: true` in headless, `\"hardware\"` when headed, `\"disabled\"` otherwise.\n * - `\"swiftshader\"`: deterministic software WebGL2/WebGPU via ANGLE SwiftShader (ideal for canvas/WASM CI).\n * - `\"hardware\"`: use host GPU (omits `--disable-gpu`).\n * - `\"disabled\"`: pass `--disable-gpu` in headless mode.\n */\n gpu?: WebGpuMode;\n /** Enable WebGPU flags (`--enable-unsafe-webgpu`, plus deterministic SwiftShader in headless mode). */\n webgpu?: boolean;\n /**\n * Enable Chromium's OS sandbox for Direct CDP launches.\n * Default: `false` (passes `--no-sandbox`, matching Playwright's default so headless Chromium works\n * out-of-the-box on Ubuntu 23.10+ / GitHub Actions runners with AppArmor userns restrictions).\n * Set `true` to keep Chromium's sandbox enabled.\n */\n chromiumSandbox?: boolean;\n /**\n * Optional JS expression evaluated inside `isAppReady()` (via `window.__SPANA_APP_READY__`)\n * so SSR apps wait for client hydration before interactions without modifying app source code.\n */\n readyExpression?: string;\n /** Timeout in ms when waiting for the browser debugging endpoint to start (default: 30000). */\n launchTimeout?: number;\n /** Timeout in ms for `app.evaluate()` / CDP `Runtime.evaluate` calls (default: 10000). */\n evaluateTimeout?: number;\n /** Timeout in ms for page navigations (`openLink`, `launchApp`, `reload`, `back`, `forward`). Defaults to `defaults.waitTimeout` or 30000ms. */\n navigationTimeout?: number;\n}\n\nexport interface CloudAppReferenceConfig {\n /** Existing remote app reference, e.g. bs://... or storage:... */\n id?: string;\n /** Local file path to upload when the provider supports managed upload */\n path?: string;\n /** Override the uploaded file name when the provider supports it */\n name?: string;\n}\n\nexport interface BrowserStackAppConfig extends CloudAppReferenceConfig {\n /** Stable BrowserStack app alias */\n customId?: string;\n}\n\nexport interface BrowserStackLocalConfig {\n enabled?: boolean;\n binary?: string;\n identifier?: string;\n args?: string[];\n}\n\nexport interface BrowserStackHelperConfig {\n app?: BrowserStackAppConfig;\n local?: BrowserStackLocalConfig;\n options?: Record<string, unknown>;\n}\n\nexport interface SauceConnectConfig {\n enabled?: boolean;\n binary?: string;\n tunnelName?: string;\n args?: string[];\n}\n\nexport interface SauceLabsHelperConfig {\n app?: CloudAppReferenceConfig;\n connect?: SauceConnectConfig;\n options?: Record<string, unknown>;\n}\n\nexport interface AppiumExecutionConfig {\n serverUrl?: string;\n capabilities?: Record<string, unknown>;\n /**\n * Platform-specific capabilities merged on top of `capabilities` when the\n * matching platform runs. Useful when you want different `appium:deviceName`\n * or `appium:platformVersion` for Android vs iOS.\n */\n platformCapabilities?: {\n android?: Record<string, unknown>;\n ios?: Record<string, unknown>;\n };\n capabilitiesFile?: string;\n reportToProvider?: boolean;\n browserstack?: BrowserStackHelperConfig;\n saucelabs?: SauceLabsHelperConfig;\n /** Path to a custom cloud provider module (default export must conform to CloudProvider interface). */\n cloudProvider?: string;\n /**\n * Opt in to having spana spawn a local `appium` subprocess for the\n * duration of the test run. Requires `appium` to be on PATH. When true,\n * `serverUrl` (if set) is ignored and a URL is assigned to the\n * auto-started server instead. Off by default — spana never spawns\n * background processes unless you ask.\n */\n autoStart?: boolean;\n /** Override the `appium` binary name. Default: \"appium\". */\n autoStartBinary?: string;\n /** Extra CLI args to forward to the spawned Appium process. */\n autoStartArgs?: readonly string[];\n}\n\nexport interface ExecutionConfig {\n mode?: \"local\" | \"appium\";\n web?: WebExecutionConfig;\n appium?: AppiumExecutionConfig;\n /** In-app spana-bridge configuration shared across webview targets */\n bridge?: BridgeConfig;\n /** Warm daemon & process reuse settings for fast repeated runs */\n warmDaemons?: WarmDaemonConfig;\n}\n\nexport interface ArtifactConfig {\n outputDir?: string;\n captureOnFailure?: boolean;\n captureOnSuccess?: boolean;\n captureSteps?: boolean;\n screenshot?: boolean;\n uiHierarchy?: boolean;\n consoleLogs?: boolean;\n jsErrors?: boolean;\n har?: boolean;\n jsCoverage?: boolean;\n /** Video / screencast recording mode: \"off\" (default), \"on\", or \"retain-on-failure\". */\n video?: VideoRecordingMode;\n /** Embed interactive step-by-step visual playback timeline inside report.html (auto-enabled when video !== \"off\"). */\n playback?: boolean;\n /** Write Playwright-style interactive `trace.json` + `trace-viewer.html` bundle per flow. */\n trace?: boolean;\n /** Automatically attach Android `adb logcat` / iOS Simulator crash logs on native failure (default: true). */\n nativeLogs?: boolean;\n}\n\nexport interface HookContext {\n app: unknown; // Will be typed properly when App is defined\n expect?: unknown;\n platform?: Platform;\n result?: unknown;\n summary?: unknown;\n}\n\nexport interface ProvConfig {\n apps?: {\n web?: AppConfig;\n android?: AppConfig;\n ios?: AppConfig;\n electron?: ElectronAppConfig;\n electrobun?: ElectrobunAppConfig;\n };\n defaults?: {\n waitTimeout?: number;\n pollInterval?: number;\n settleTimeout?: number;\n retries?: number;\n /** Pause after each action (tap, scroll) to let the UI settle. Default: 0 (disabled). */\n waitForIdleTimeout?: number;\n /** Delay between each character when typing. Default: 0 (instant). */\n typingDelay?: number;\n /** Starting poll interval for adaptive backoff. Default: 50ms. Set equal to pollInterval to disable adaptive backoff. */\n initialPollInterval?: number;\n /** Max age in ms before cached hierarchy is stale. Default: 100. Set to 0 to disable. */\n hierarchyCacheTtl?: number;\n /** Max depth for UI hierarchy snapshots on iOS. Default: 100. */\n snapshotMaxDepth?: number;\n /** Delay in ms between retry attempts of a failed flow. Default: 0 (immediate). */\n retryDelay?: number;\n /** Max workers per platform when using --parallel. */\n workers?: number;\n /** Number of isolated OS worker processes sharing a dynamic longest-first flow queue (`--processes M`). */\n processes?: number;\n /** Max in-process workers before automatically sharding across multiple OS processes (default: 8). */\n maxWorkersPerProcess?: number;\n /** Default tap mode when a DOM channel resolves an element: \"native\" (real touch, default) or \"dom\" (fast synthetic click). */\n tapMode?: TapMode;\n /** Pin device locale across targets so system UI sheet labels stay deterministic. */\n locale?: string;\n /** Fail web element waits early when the page is idle & readyState === \"complete\" instead of waiting full waitTimeout. */\n failFastWhenIdle?: boolean;\n /** Consecutive stable animation frames required before pointer actions on web. Default: 2. Set 0 to disable. */\n actionStableFrames?: number;\n /** Post-fill remount verification delay in ms (default: 12). Set 0 to verify synchronously for faster static-form runs. */\n fillVerifyMs?: number;\n /** Path to a portable JSON timings file (or directory of shard timing files) for duration-balanced `--shard` & longest-first scheduling. */\n timingsFile?: string;\n /** Default timeout in ms for `expect(fn).toPass()` and `expect.poll()`. Defaults to remaining flow timeout. */\n toPassTimeout?: number;\n };\n platforms?: Platform[];\n /** Run platforms concurrently when they use independent resources. Default: false (serial). */\n parallelPlatforms?: boolean;\n flowDir?: string;\n launchOptions?: LaunchOptions;\n /**\n * Reporter names or module paths. Built-in: \"console\", \"json\", \"junit\", \"html\", \"allure\".\n * Custom reporters: provide a relative path (e.g., \"./reporters/slack.ts\") that default-exports\n * a Reporter object or a `(options: { outputDir: string }) => Reporter` factory function.\n */\n reporters?: string[];\n hooks?: {\n beforeAll?: (ctx: HookContext) => Promise<void>;\n beforeEach?: (ctx: HookContext) => Promise<void>;\n afterEach?: (ctx: HookContext) => Promise<void>;\n afterAll?: (ctx: HookContext) => Promise<void>;\n };\n artifacts?: ArtifactConfig;\n execution?: ExecutionConfig;\n visualRegression?: {\n threshold?: number;\n maxDiffPixelRatio?: number;\n baselinesDir?: string;\n mode?: \"pixel\" | \"layout-tolerant\";\n };\n /** Pluggable CI filters evaluated when `--changed-since <ref>` is passed. */\n filters?: Array<{\n name: string;\n filter: (flows: any[], context: any) => Promise<any> | any;\n }>;\n /** Verified replay cache settings for optional agentic steps (`.spana/cache/`). */\n replayCache?: {\n mode?: \"read-write\" | \"strict\" | \"off\";\n dir?: string;\n };\n /** Auto-boot one or more dev servers before tests run and tear them down cleanly afterwards. */\n webServer?: WebServerConfig | WebServerConfig[];\n /** Named test projects with dependency DAG (`dependencies`, `teardown`, per-project `storageState` / `browser` / `testMatch`). */\n projects?: ProjectConfig[];\n /** Optional LLM provider configuration for `agent.act()` / `agent.verify()` / `agent.extract()` and `spana explore`. */\n agent?: Omit<AgentProviderConfig, \"fetchFn\">;\n}\n\nconst platformSchema = z.enum([\"web\", \"android\", \"ios\", \"electron\", \"electrobun\"]);\nconst reporterSchema = z.string().min(1);\nconst hookSchema = z.custom<(...args: unknown[]) => Promise<void>>(\n (value) => typeof value === \"function\",\n { message: \"Expected function\" },\n);\n\nconst iosSigningConfigSchema = z\n .object({\n teamId: z.string().min(1, \"teamId is required\"),\n signingIdentity: z.string().min(1).optional(),\n })\n .strict();\n\nconst bridgeConfigSchema = z\n .object({\n enabled: z.boolean().optional(),\n port: z.number().int().positive().optional(),\n host: z.string().min(1).optional(),\n url: z.string().min(1).optional(),\n connectTimeout: z.number().positive().optional(),\n })\n .strict();\n\nconst warmDaemonConfigSchema = z\n .object({\n enabled: z.boolean().optional(),\n reuseBrowserProcess: z.boolean().optional(),\n reuseSession: z.boolean().optional(),\n stateFile: z.string().min(1).optional(),\n })\n .strict();\n\nconst webUrlResolverSchema = z.union([\n z.string().url(),\n z.custom<(ctx: { workerIndex: number; parallelIndex: number }) => string>(\n (value) => typeof value === \"function\",\n { message: \"Expected URL string or ({ workerIndex, parallelIndex }) => string function\" },\n ),\n]);\n\nconst appConfigSchema = z\n .object({\n url: webUrlResolverSchema.optional(),\n packageName: z.string().min(1).optional(),\n bundleId: z.string().min(1).optional(),\n appPath: z.string().min(1).optional(),\n signing: iosSigningConfigSchema.optional(),\n webkitInspectorUrl: z.string().min(1).optional(),\n webkitInspectorPort: z.number().int().positive().optional(),\n cdpPort: z.number().int().positive().optional(),\n locale: z.string().min(1).optional(),\n bridge: bridgeConfigSchema.optional(),\n })\n .strict();\n\nconst electronAppConfigSchema = z\n .object({\n entry: z.string().min(1).optional(),\n executablePath: z.string().min(1).optional(),\n args: z.array(z.string()).optional(),\n cwd: z.string().min(1).optional(),\n env: z.record(z.string(), z.string()).optional(),\n cdpUrl: z.string().url().optional(),\n cdpPort: z.number().int().positive().optional(),\n url: z.string().url().optional(),\n bridge: bridgeConfigSchema.optional(),\n })\n .strict();\n\nconst electrobunAppConfigSchema = z\n .object({\n executablePath: z.string().min(1).optional(),\n appDir: z.string().min(1).optional(),\n args: z.array(z.string()).optional(),\n cwd: z.string().min(1).optional(),\n env: z.record(z.string(), z.string()).optional(),\n renderer: z.enum([\"native\", \"cef\"]).optional(),\n cdpUrl: z.string().url().optional(),\n cdpPort: z.number().int().positive().optional(),\n webkitInspectorPort: z.number().int().positive().optional(),\n url: z.string().url().optional(),\n bridge: bridgeConfigSchema.optional(),\n })\n .strict();\n\nconst cloudAppReferenceSchema = z\n .object({\n id: z.string().min(1).optional(),\n path: z.string().min(1).optional(),\n name: z.string().min(1).optional(),\n })\n .strict();\n\nconst browserStackAppSchema = cloudAppReferenceSchema\n .extend({\n customId: z.string().min(1).optional(),\n })\n .strict();\n\nconst browserStackLocalSchema = z\n .object({\n enabled: z.boolean().optional(),\n binary: z.string().min(1).optional(),\n identifier: z.string().min(1).optional(),\n args: z.array(z.string().min(1)).optional(),\n })\n .strict();\n\nconst browserStackHelperSchema = z\n .object({\n app: browserStackAppSchema.optional(),\n local: browserStackLocalSchema.optional(),\n options: z.record(z.string(), z.unknown()).optional(),\n })\n .strict();\n\nconst sauceConnectSchema = z\n .object({\n enabled: z.boolean().optional(),\n binary: z.string().min(1).optional(),\n tunnelName: z.string().min(1).optional(),\n args: z.array(z.string().min(1)).optional(),\n })\n .strict();\n\nconst sauceLabsHelperSchema = z\n .object({\n app: cloudAppReferenceSchema.optional(),\n connect: sauceConnectSchema.optional(),\n options: z.record(z.string(), z.unknown()).optional(),\n })\n .strict();\n\nconst storybookConfigSchema = z\n .object({\n url: z.string().url().optional(),\n iframePath: z.string().min(1).optional(),\n })\n .strict();\n\nconst appiumExecutionConfigSchema = z\n .object({\n serverUrl: z.string().url().optional(),\n capabilities: z.record(z.string(), z.unknown()).optional(),\n platformCapabilities: z\n .object({\n android: z.record(z.string(), z.unknown()).optional(),\n ios: z.record(z.string(), z.unknown()).optional(),\n })\n .strict()\n .optional(),\n capabilitiesFile: z.string().min(1).optional(),\n reportToProvider: z.boolean().optional(),\n browserstack: browserStackHelperSchema.optional(),\n saucelabs: sauceLabsHelperSchema.optional(),\n cloudProvider: z.string().min(1).optional(),\n autoStart: z.boolean().optional(),\n autoStartBinary: z.string().min(1).optional(),\n autoStartArgs: z.array(z.string()).optional(),\n })\n .strict();\n\nconst virtualAuthenticatorOptionsSchema = z\n .object({\n protocol: z.enum([\"ctap2\", \"u2f\"]).optional(),\n transport: z.enum([\"usb\", \"nfc\", \"ble\", \"cable\", \"internal\"]).optional(),\n hasResidentKey: z.boolean().optional(),\n hasUserVerification: z.boolean().optional(),\n isUserVerified: z.boolean().optional(),\n automaticPresenceSimulation: z.boolean().optional(),\n })\n .strict();\n\nconst webExecutionConfigSchema = z\n .object({\n browser: z.enum([\"chromium\", \"firefox\", \"webkit\"]).optional(),\n engine: z.enum([\"auto\", \"playwright\", \"cdp\", \"lightpanda\"]).optional(),\n cdpUrl: z.string().url().optional(),\n wsEndpoint: z.string().url().optional(),\n executablePath: z.string().min(1).optional(),\n channel: z.string().min(1).optional(),\n headless: z.boolean().optional(),\n waitUntil: z.enum([\"domcontentloaded\", \"load\", \"networkidle\", \"commit\"]).optional(),\n instantAnimations: z.boolean().optional(),\n blockResources: z.array(z.enum([\"image\", \"font\", \"media\", \"stylesheet\"])).optional(),\n warmBrowser: z.boolean().optional(),\n warmBrowserScope: z.string().min(1).optional(),\n freshContextPerFlow: z.boolean().optional(),\n contextIsolation: z.enum([\"fresh\", \"hot-cache\"]).optional(),\n maxContextsPerBrowser: z.number().int().positive().optional(),\n virtualAuthenticator: z.union([z.boolean(), virtualAuthenticatorOptionsSchema]).optional(),\n storageState: z.string().min(1).optional(),\n verboseLogging: z.boolean().optional(),\n storybook: storybookConfigSchema.optional(),\n extensions: z.array(z.string().min(1)).optional(),\n colorScheme: z.enum([\"dark\", \"light\", \"no-preference\"]).optional(),\n gpu: z.enum([\"auto\", \"swiftshader\", \"hardware\", \"disabled\"]).optional(),\n webgpu: z.boolean().optional(),\n reducedMotion: z.enum([\"reduce\", \"no-preference\"]).optional(),\n timezoneId: z.string().min(1).optional(),\n locale: z.string().min(1).optional(),\n userAgent: z.string().min(1).optional(),\n httpCredentials: z\n .object({\n username: z.string(),\n password: z.string(),\n })\n .strict()\n .optional(),\n viewport: z\n .object({\n width: z.number().int().positive(),\n height: z.number().int().positive(),\n deviceScaleFactor: z.number().positive().optional(),\n mobile: z.boolean().optional(),\n isMobile: z.boolean().optional(),\n hasTouch: z.boolean().optional(),\n })\n .strict()\n .optional(),\n deviceScaleFactor: z.number().positive().optional(),\n mobile: z.boolean().optional(),\n isMobile: z.boolean().optional(),\n hasTouch: z.boolean().optional(),\n device: z\n .object({\n name: z.string().min(1).optional(),\n viewport: z\n .object({\n width: z.number().int().positive(),\n height: z.number().int().positive(),\n deviceScaleFactor: z.number().positive().optional(),\n mobile: z.boolean().optional(),\n isMobile: z.boolean().optional(),\n hasTouch: z.boolean().optional(),\n })\n .strict()\n .optional(),\n deviceScaleFactor: z.number().positive().optional(),\n mobile: z.boolean().optional(),\n isMobile: z.boolean().optional(),\n hasTouch: z.boolean().optional(),\n userAgent: z.string().min(1).optional(),\n })\n .strict()\n .optional(),\n args: z.array(z.string()).optional(),\n chromiumSandbox: z.boolean().optional(),\n readyExpression: z.string().min(1).optional(),\n launchTimeout: z.number().positive().optional(),\n evaluateTimeout: z.number().positive().optional(),\n navigationTimeout: z.number().positive().optional(),\n })\n .strict();\n\nconst executionConfigSchema = z\n .object({\n mode: z.enum([\"local\", \"appium\"]).optional(),\n web: webExecutionConfigSchema.optional(),\n appium: appiumExecutionConfigSchema.optional(),\n bridge: bridgeConfigSchema.optional(),\n warmDaemons: warmDaemonConfigSchema.optional(),\n })\n .strict();\n\nconst artifactConfigSchema = z\n .object({\n outputDir: z.string().min(1).optional(),\n captureOnFailure: z.boolean().optional(),\n captureOnSuccess: z.boolean().optional(),\n captureSteps: z.boolean().optional(),\n screenshot: z.boolean().optional(),\n uiHierarchy: z.boolean().optional(),\n consoleLogs: z.boolean().optional(),\n jsErrors: z.boolean().optional(),\n har: z.boolean().optional(),\n jsCoverage: z.boolean().optional(),\n video: z.enum([\"off\", \"on\", \"retain-on-failure\"]).optional(),\n playback: z.boolean().optional(),\n trace: z.boolean().optional(),\n nativeLogs: z.boolean().optional(),\n })\n .strict();\n\nconst deviceStateSchema = z\n .object({\n language: z.string().min(1).optional(),\n locale: z.string().min(1).optional(),\n timeZone: z.string().min(1).optional(),\n })\n .strict();\n\nconst launchOptionsSchema = z\n .object({\n clearState: z.boolean().optional(),\n clearKeychain: z.boolean().optional(),\n deepLink: z.string().min(1).optional(),\n launchArguments: z.record(z.string(), z.unknown()).optional(),\n deviceState: deviceStateSchema.optional(),\n })\n .strict();\n\nexport const provConfigSchema = z\n .object({\n apps: z\n .object({\n web: appConfigSchema.optional(),\n android: appConfigSchema.optional(),\n ios: appConfigSchema.optional(),\n electron: electronAppConfigSchema.optional(),\n electrobun: electrobunAppConfigSchema.optional(),\n })\n .strict()\n .optional(),\n defaults: z\n .object({\n waitTimeout: z.number().positive().optional(),\n pollInterval: z.number().positive().optional(),\n settleTimeout: z.number().nonnegative().optional(),\n retries: z.number().int().nonnegative().optional(),\n waitForIdleTimeout: z.number().nonnegative().optional(),\n typingDelay: z.number().nonnegative().optional(),\n initialPollInterval: z.number().positive().optional(),\n hierarchyCacheTtl: z.number().nonnegative().optional(),\n snapshotMaxDepth: z.number().int().positive().optional(),\n retryDelay: z.number().nonnegative().optional(),\n workers: z.number().int().positive().optional(),\n processes: z.number().int().positive().optional(),\n maxWorkersPerProcess: z.number().int().positive().optional(),\n tapMode: z.enum([\"native\", \"dom\"]).optional(),\n locale: z.string().min(1).optional(),\n failFastWhenIdle: z.boolean().optional(),\n actionStableFrames: z.number().int().nonnegative().optional(),\n fillVerifyMs: z.number().int().nonnegative().optional(),\n timingsFile: z.string().min(1).optional(),\n toPassTimeout: z.number().positive().optional(),\n })\n .strict()\n .optional(),\n platforms: z.array(platformSchema).optional(),\n parallelPlatforms: z.boolean().optional(),\n flowDir: z.string().min(1).optional(),\n launchOptions: launchOptionsSchema.optional(),\n reporters: z.array(reporterSchema).optional(),\n hooks: z\n .object({\n beforeAll: hookSchema.optional(),\n beforeEach: hookSchema.optional(),\n afterEach: hookSchema.optional(),\n afterAll: hookSchema.optional(),\n })\n .strict()\n .optional(),\n artifacts: artifactConfigSchema.optional(),\n execution: executionConfigSchema.optional(),\n visualRegression: z\n .object({\n threshold: z.number().min(0).max(1).optional(),\n maxDiffPixelRatio: z.number().min(0).max(1).optional(),\n baselinesDir: z.string().optional(),\n mode: z.enum([\"pixel\", \"layout-tolerant\"]).optional(),\n })\n .optional(),\n filters: z\n .array(\n z.custom<{ name: string; filter: (...args: unknown[]) => unknown }>(\n (value) =>\n typeof value === \"object\" &&\n value !== null &&\n typeof (value as Record<string, unknown>).name === \"string\" &&\n typeof (value as Record<string, unknown>).filter === \"function\",\n { message: \"Expected TestFilter ({ name, filter })\" },\n ),\n )\n .optional(),\n replayCache: z\n .object({\n mode: z.enum([\"read-write\", \"strict\", \"off\"]).optional(),\n dir: z.string().min(1).optional(),\n })\n .strict()\n .optional(),\n webServer: z\n .union([\n z\n .object({\n command: z.string().min(1),\n url: z.string().url().optional(),\n port: z.number().int().positive().optional(),\n cwd: z.string().min(1).optional(),\n env: z.record(z.string(), z.string()).optional(),\n inheritEnv: z.boolean().optional(),\n inheritEnvKeys: z.array(z.string().min(1)).optional(),\n timeout: z.number().positive().optional(),\n reuseExistingServer: z.boolean().optional(),\n stdout: z.enum([\"pipe\", \"ignore\", \"inherit\"]).optional(),\n stderr: z.enum([\"pipe\", \"ignore\", \"inherit\"]).optional(),\n ignoreHTTPSErrors: z.boolean().optional(),\n gracefulShutdownMs: z.number().nonnegative().optional(),\n })\n .strict(),\n z.array(\n z\n .object({\n command: z.string().min(1),\n url: z.string().url().optional(),\n port: z.number().int().positive().optional(),\n cwd: z.string().min(1).optional(),\n env: z.record(z.string(), z.string()).optional(),\n inheritEnv: z.boolean().optional(),\n inheritEnvKeys: z.array(z.string().min(1)).optional(),\n timeout: z.number().positive().optional(),\n reuseExistingServer: z.boolean().optional(),\n stdout: z.enum([\"pipe\", \"ignore\", \"inherit\"]).optional(),\n stderr: z.enum([\"pipe\", \"ignore\", \"inherit\"]).optional(),\n ignoreHTTPSErrors: z.boolean().optional(),\n gracefulShutdownMs: z.number().nonnegative().optional(),\n })\n .strict(),\n ),\n ])\n .optional(),\n projects: z\n .array(\n z\n .object({\n name: z.string().min(1),\n platform: platformSchema.optional(),\n browser: z.enum([\"chromium\", \"firefox\", \"webkit\"]).optional(),\n baseUrl: z.string().url().optional(),\n storageState: z.string().min(1).optional(),\n flowDir: z.string().min(1).optional(),\n testMatch: z.array(z.union([z.string().min(1), z.instanceof(RegExp)])).optional(),\n testIgnore: z.array(z.union([z.string().min(1), z.instanceof(RegExp)])).optional(),\n tags: z.array(z.string().min(1)).optional(),\n grep: z.string().min(1).optional(),\n dependencies: z.array(z.string().min(1)).optional(),\n teardown: z.string().min(1).optional(),\n retries: z.number().int().nonnegative().optional(),\n use: z.record(z.string(), z.unknown()).optional(),\n })\n .strict(),\n )\n .optional(),\n agent: z\n .object({\n model: z.string().min(1).optional(),\n baseUrl: z.string().url().optional(),\n apiKey: z.string().min(1).optional(),\n apiKeyEnv: z.string().min(1).optional(),\n maxSteps: z.number().int().positive().optional(),\n })\n .strict()\n .optional(),\n })\n .strict();\n\nexport function defineConfig(config: ProvConfig): ProvConfig {\n return config;\n}\n\nexport function validateConfig(config: unknown): ProvConfig {\n return provConfigSchema.parse(config) as ProvConfig;\n}\n\nexport function formatConfigValidationError(error: ZodError): string {\n return error.issues\n .map((issue) => {\n const path = issue.path.length > 0 ? issue.path.join(\".\") : \"config\";\n return `- ${path}: ${issue.message}`;\n })\n .join(\"\\n\");\n}\n"],"mappings":";;;;;;;;;AAAA;AAkeA,IAAM,iBAAiB,iBAAE,KAAK,CAAC,OAAO,WAAW,OAAO,YAAY,YAAY,CAAC;AACjF,IAAM,iBAAiB,iBAAE,OAAO,EAAE,IAAI,CAAC;AACvC,IAAM,aAAa,iBAAE;AAAA,EACnB,CAAC,UAAU,OAAO,UAAU;AAAA,EAC5B,EAAE,SAAS,oBAAoB;AACjC;AAEA,IAAM,yBAAyB,iBAC5B,OAAO;AAAA,EACN,QAAQ,iBAAE,OAAO,EAAE,IAAI,GAAG,oBAAoB;AAAA,EAC9C,iBAAiB,iBAAE,OAAO,EAAE,IAAI,CAAC,EAAE,SAAS;AAC9C,CAAC,EACA,OAAO;AAEV,IAAM,qBAAqB,iBACxB,OAAO;AAAA,EACN,SAAS,iBAAE,QAAQ,EAAE,SAAS;AAAA,EAC9B,MAAM,iBAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS;AAAA,EAC3C,MAAM,iBAAE,OAAO,EAAE,IAAI,CAAC,EAAE,SAAS;AAAA,EACjC,KAAK,iBAAE,OAAO,EAAE,IAAI,CAAC,EAAE,SAAS;AAAA,EAChC,gBAAgB,iBAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AACjD,CAAC,EACA,OAAO;AAEV,IAAM,yBAAyB,iBAC5B,OAAO;AAAA,EACN,SAAS,iBAAE,QAAQ,EAAE,SAAS;AAAA,EAC9B,qBAAqB,iBAAE,QAAQ,EAAE,SAAS;AAAA,EAC1C,cAAc,iBAAE,QAAQ,EAAE,SAAS;AAAA,EACnC,WAAW,iBAAE,OAAO,EAAE,IAAI,CAAC,EAAE,SAAS;AACxC,CAAC,EACA,OAAO;AAEV,IAAM,uBAAuB,iBAAE,MAAM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