agentic-qe 3.9.8 → 3.9.10
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/.claude/agents/_shared/executor-preamble.md +86 -0
- package/.claude/agents/v3/qe-coverage-specialist.md +20 -1
- package/.claude/agents/v3/qe-fleet-commander.md +20 -1
- package/.claude/agents/v3/qe-pentest-validator.md +20 -1
- package/.claude/agents/v3/qe-queen-coordinator.md +20 -1
- package/.claude/agents/v3/qe-risk-assessor.md +20 -1
- package/.claude/agents/v3/qe-root-cause-analyzer.md +19 -0
- package/.claude/agents/v3/qe-security-auditor.md +20 -1
- package/.claude/agents/v3/qe-test-architect.md +33 -1
- package/.claude/helpers/advisor-call.cjs +283 -0
- package/.claude/skills/README.md +4 -3
- package/.claude/skills/a11y-ally/SKILL.md +40 -18
- package/.claude/skills/accessibility-testing/SKILL.md +4 -0
- package/.claude/skills/compatibility-testing/SKILL.md +23 -0
- package/.claude/skills/e2e-flow-verifier/SKILL.md +87 -52
- package/.claude/skills/enterprise-integration-testing/SKILL.md +4 -0
- package/.claude/skills/localization-testing/SKILL.md +14 -0
- package/.claude/skills/observability-testing-patterns/SKILL.md +16 -0
- package/.claude/skills/qe-browser/SKILL.md +409 -0
- package/.claude/skills/qe-browser/evals/qe-browser.yaml +291 -0
- package/.claude/skills/qe-browser/fixtures/package.json +7 -0
- package/.claude/skills/qe-browser/fixtures/serve-skills.js +130 -0
- package/.claude/skills/qe-browser/references/assertion-kinds.md +132 -0
- package/.claude/skills/qe-browser/references/migration-from-playwright.md +195 -0
- package/.claude/skills/qe-browser/schemas/output.json +188 -0
- package/.claude/skills/qe-browser/scripts/assert.js +378 -0
- package/.claude/skills/qe-browser/scripts/batch.js +292 -0
- package/.claude/skills/qe-browser/scripts/check-injection.js +267 -0
- package/.claude/skills/qe-browser/scripts/intent-score.js +325 -0
- package/.claude/skills/qe-browser/scripts/lib/vibium.js +330 -0
- package/.claude/skills/qe-browser/scripts/package.json +7 -0
- package/.claude/skills/qe-browser/scripts/smoke-test.sh +212 -0
- package/.claude/skills/qe-browser/scripts/validate-config.json +46 -0
- package/.claude/skills/qe-browser/scripts/visual-diff.js +276 -0
- package/.claude/skills/qe-visual-accessibility/SKILL.md +31 -1
- package/.claude/skills/security-visual-testing/SKILL.md +18 -0
- package/.claude/skills/skills-manifest.json +20 -13
- package/.claude/skills/testability-scoring/SKILL.md +23 -0
- package/.claude/skills/trust-tier-manifest.json +14 -3
- package/.claude/skills/visual-testing-advanced/SKILL.md +41 -1
- package/CHANGELOG.md +75 -0
- package/README.md +5 -3
- package/assets/agents/v3/helpers/advisor-call.cjs +283 -0
- package/assets/agents/v3/qe-coverage-specialist.md +20 -1
- package/assets/agents/v3/qe-fleet-commander.md +20 -1
- package/assets/agents/v3/qe-pentest-validator.md +20 -1
- package/assets/agents/v3/qe-queen-coordinator.md +20 -1
- package/assets/agents/v3/qe-risk-assessor.md +20 -1
- package/assets/agents/v3/qe-root-cause-analyzer.md +19 -0
- package/assets/agents/v3/qe-security-auditor.md +20 -1
- package/assets/agents/v3/qe-test-architect.md +33 -1
- package/assets/skills/README.md +4 -3
- package/assets/skills/a11y-ally/SKILL.md +40 -18
- package/assets/skills/accessibility-testing/SKILL.md +4 -0
- package/assets/skills/compatibility-testing/SKILL.md +23 -0
- package/assets/skills/e2e-flow-verifier/SKILL.md +87 -52
- package/assets/skills/enterprise-integration-testing/SKILL.md +4 -0
- package/assets/skills/localization-testing/SKILL.md +14 -0
- package/assets/skills/observability-testing-patterns/SKILL.md +16 -0
- package/assets/skills/qe-browser/SKILL.md +409 -0
- package/assets/skills/qe-browser/evals/qe-browser.yaml +291 -0
- package/assets/skills/qe-browser/fixtures/package.json +7 -0
- package/assets/skills/qe-browser/fixtures/serve-skills.js +130 -0
- package/assets/skills/qe-browser/references/assertion-kinds.md +132 -0
- package/assets/skills/qe-browser/references/migration-from-playwright.md +195 -0
- package/assets/skills/qe-browser/schemas/output.json +188 -0
- package/assets/skills/qe-browser/scripts/assert.js +378 -0
- package/assets/skills/qe-browser/scripts/batch.js +292 -0
- package/assets/skills/qe-browser/scripts/check-injection.js +267 -0
- package/assets/skills/qe-browser/scripts/intent-score.js +325 -0
- package/assets/skills/qe-browser/scripts/lib/vibium.js +330 -0
- package/assets/skills/qe-browser/scripts/package.json +7 -0
- package/assets/skills/qe-browser/scripts/smoke-test.sh +212 -0
- package/assets/skills/qe-browser/scripts/validate-config.json +46 -0
- package/assets/skills/qe-browser/scripts/visual-diff.js +276 -0
- package/assets/skills/qe-visual-accessibility/SKILL.md +31 -1
- package/assets/skills/security-visual-testing/SKILL.md +18 -0
- package/assets/skills/skills-manifest.json +211 -15
- package/assets/skills/testability-scoring/SKILL.md +23 -0
- package/assets/skills/trust-tier-manifest.json +14 -3
- package/assets/skills/visual-testing-advanced/SKILL.md +41 -1
- package/dist/cli/bundle.js +5 -5
- package/dist/cli/chunks/adapter-IKCDCMSI.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-LAE4NTVX.js → agent-booster-wasm-HM4XSABF.js} +2 -2
- package/dist/cli/chunks/{agent-handler-FVXHR6XN.js → agent-handler-UDBDLLO4.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-Q7LLBA7C.js → agent-memory-branch-VIXQ3DAR.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-W4WW7SQW.js +2 -0
- package/dist/cli/chunks/{audit-YRLKHJLX.js → audit-FWTGLQHH.js} +2 -2
- package/dist/cli/chunks/base-UQKFTHOY.js +2 -0
- package/dist/cli/chunks/{better-sqlite3-XFGOGICB.js → better-sqlite3-TYI3CCWU.js} +2 -2
- package/dist/cli/chunks/{brain-handler-KIUSNVSS.js → brain-handler-45ZGBLSB.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-VKZ4L3FH.js → branch-enumerator-ZBXELCQA.js} +2 -2
- package/dist/cli/chunks/{browser-GZVIYFIB.js → browser-2KM5IKEX.js} +2 -2
- package/dist/cli/chunks/browser-workflow-NMOEM3HW.js +2 -0
- package/dist/cli/chunks/{chunk-7PHNHFZI.js → chunk-226DSROQ.js} +3 -3
- package/dist/cli/chunks/{chunk-MGX2BZWE.js → chunk-27B575K6.js} +2 -2
- package/dist/cli/chunks/{chunk-P7APAQD6.js → chunk-2IJFZW3N.js} +12 -12
- package/dist/cli/chunks/{chunk-TWDWDKOI.js → chunk-32OB4ZYQ.js} +1 -1
- package/dist/cli/chunks/{chunk-E4D36LGH.js → chunk-335CCAOL.js} +1 -1
- package/dist/cli/chunks/{chunk-Q5PARJC6.js → chunk-34WI4QNF.js} +2 -2
- package/dist/cli/chunks/chunk-3A4BL62O.js +2 -0
- package/dist/cli/chunks/{chunk-6ZMM7MXA.js → chunk-3AG647MY.js} +2 -2
- package/dist/cli/chunks/{chunk-LPRHYSXN.js → chunk-3HIDCXW3.js} +1 -1
- package/dist/cli/chunks/{chunk-HN7HYUW6.js → chunk-4EKWEDHA.js} +9 -9
- package/dist/cli/chunks/{chunk-JCROLOP6.js → chunk-4FU6YNDP.js} +2 -2
- package/dist/cli/chunks/{chunk-A4DJMFDM.js → chunk-4LOJJ4VX.js} +1 -1
- package/dist/cli/chunks/{chunk-I25KIHQE.js → chunk-4VOGUZW5.js} +1 -1
- package/dist/cli/chunks/{chunk-KJZU3E5G.js → chunk-4ZR5G4MZ.js} +2 -2
- package/dist/cli/chunks/{chunk-W45FANJG.js → chunk-52ZHPZVX.js} +2 -2
- package/dist/cli/chunks/{chunk-LOANEFGZ.js → chunk-53G3OCGS.js} +2 -2
- package/dist/cli/chunks/{chunk-TZMKO6PC.js → chunk-54TZA65H.js} +2 -2
- package/dist/cli/chunks/{chunk-GHJRX7PV.js → chunk-5QKTLOGO.js} +1 -1
- package/dist/cli/chunks/{chunk-76UL224Z.js → chunk-5TATJQ3Z.js} +2 -2
- package/dist/cli/chunks/{chunk-OGFGNAKQ.js → chunk-5V6DRRLO.js} +2 -2
- package/dist/cli/chunks/{chunk-BXMIQRF3.js → chunk-6X7WKNDF.js} +2 -2
- package/dist/cli/chunks/chunk-7FWZHYYE.js +2 -0
- package/dist/cli/chunks/{chunk-R2LWLZ3Y.js → chunk-A2ULGMMG.js} +1 -1
- package/dist/cli/chunks/{chunk-AVKDT3UL.js → chunk-A53XKLEA.js} +8 -8
- package/dist/cli/chunks/{chunk-GOPE5OB5.js → chunk-A5OIXFFL.js} +1 -1
- package/dist/cli/chunks/{chunk-I7OH6RAC.js → chunk-ACNL4NFI.js} +2 -2
- package/dist/cli/chunks/{chunk-PBPOSPTY.js → chunk-AE6Y5CNJ.js} +2 -2
- package/dist/cli/chunks/{chunk-TN72MXLI.js → chunk-AO4HDN62.js} +2 -2
- package/dist/cli/chunks/{chunk-IHJXFWUL.js → chunk-AOA454FC.js} +2 -2
- package/dist/cli/chunks/{chunk-N2L7RWNX.js → chunk-B2QVWL5R.js} +2 -2
- package/dist/cli/chunks/{chunk-7CFEGUEH.js → chunk-B3L3CT4X.js} +2 -2
- package/dist/cli/chunks/{chunk-XVXSQOQG.js → chunk-B4AFVIOA.js} +2 -2
- package/dist/cli/chunks/{chunk-S72TSJS4.js → chunk-BCSCJBYQ.js} +2 -2
- package/dist/cli/chunks/{chunk-UAI5NPPQ.js → chunk-BIV6HWMT.js} +2 -2
- package/dist/cli/chunks/{chunk-XPL3BXLM.js → chunk-BNNH3KZP.js} +1 -1
- package/dist/cli/chunks/{chunk-JK6JBNGL.js → chunk-C234RGWZ.js} +2 -2
- package/dist/cli/chunks/{chunk-4EAAHMVM.js → chunk-C55GEYDA.js} +2 -2
- package/dist/cli/chunks/{chunk-Y67OXEUM.js → chunk-CEBZHZ4O.js} +1 -1
- package/dist/cli/chunks/{chunk-A2QLTNN5.js → chunk-CFQHIWWH.js} +1 -1
- package/dist/cli/chunks/{chunk-KMGAJRQ6.js → chunk-CJO2V2FB.js} +1 -1
- package/dist/cli/chunks/{chunk-5TGK7VTS.js → chunk-CQNXIYQW.js} +2 -2
- package/dist/cli/chunks/{chunk-IP2Z4Z6X.js → chunk-D2A4TGZY.js} +1 -1
- package/dist/cli/chunks/{chunk-VVNR4R22.js → chunk-DG2OYKUQ.js} +2 -2
- package/dist/cli/chunks/{chunk-ELZ5SKEN.js → chunk-DPYCHODC.js} +2 -2
- package/dist/cli/chunks/{chunk-WUCWFDBE.js → chunk-E4YKNKQL.js} +2 -2
- package/dist/cli/chunks/{chunk-ZCKNGICX.js → chunk-EEWTTYRC.js} +1 -1
- package/dist/cli/chunks/{chunk-IFIYNCT2.js → chunk-EGIYLRW5.js} +2 -2
- package/dist/cli/chunks/{chunk-DLKRK2GU.js → chunk-EHGTNSJ2.js} +1 -1
- package/dist/cli/chunks/{chunk-IIYXSWJN.js → chunk-EJNASXOY.js} +2 -2
- package/dist/cli/chunks/{chunk-ZJ4PMOIZ.js → chunk-F7HRGQRS.js} +2 -2
- package/dist/cli/chunks/{chunk-2QI5RYVR.js → chunk-FF7TSDO4.js} +2 -2
- package/dist/cli/chunks/{chunk-DDDEGBBJ.js → chunk-FIQNVPYY.js} +2 -2
- package/dist/cli/chunks/{chunk-F5VLJFVU.js → chunk-FJOBKT7N.js} +1 -1
- package/dist/cli/chunks/{chunk-JNJYWWBG.js → chunk-FYI52MFF.js} +6 -6
- package/dist/cli/chunks/{chunk-UOSKMAAY.js → chunk-GCNTU3QJ.js} +1 -1
- package/dist/cli/chunks/{chunk-4GMV6Z7Y.js → chunk-H56YBNXW.js} +2 -2
- package/dist/cli/chunks/{chunk-HTL2WT64.js → chunk-HJMLJNCB.js} +1 -1
- package/dist/cli/chunks/chunk-I3IRIJOT.js +2 -0
- package/dist/cli/chunks/chunk-IEQ2VYMO.js +3 -0
- package/dist/cli/chunks/{chunk-PG7CZ6Q4.js → chunk-IGRKFVFD.js} +2 -2
- package/dist/cli/chunks/{chunk-SQ6XZGR4.js → chunk-IJPE6OGD.js} +10 -10
- package/dist/cli/chunks/{chunk-AYKMWP7F.js → chunk-IJUL2UMO.js} +1 -1
- package/dist/cli/chunks/{chunk-JVH7753D.js → chunk-ISZJAZ2D.js} +1 -1
- package/dist/cli/chunks/{chunk-NCXVOOA7.js → chunk-ITDYTODU.js} +2 -2
- package/dist/cli/chunks/{chunk-RGCCSAHI.js → chunk-JHUEBBSX.js} +2 -2
- package/dist/cli/chunks/{chunk-TDPHLQ2M.js → chunk-JN3CC2TX.js} +2 -2
- package/dist/cli/chunks/{chunk-TSDTRJOG.js → chunk-JOEEGNNX.js} +2 -2
- package/dist/cli/chunks/{chunk-QVGSD25D.js → chunk-JQX2DHQT.js} +1 -1
- package/dist/cli/chunks/{chunk-VHZ653XS.js → chunk-JRG4AFUR.js} +3 -3
- package/dist/cli/chunks/{chunk-SP3ZBJ63.js → chunk-JRMNQWRL.js} +3 -3
- package/dist/cli/chunks/{chunk-EKDFIYV5.js → chunk-JXDJMVIG.js} +2 -2
- package/dist/cli/chunks/{chunk-3WOQMFTD.js → chunk-JYPW22JV.js} +2 -2
- package/dist/cli/chunks/{chunk-WJDOOT2M.js → chunk-KK3KVYE7.js} +2 -2
- package/dist/cli/chunks/{chunk-4KX6TMKB.js → chunk-KSRAA6ZD.js} +3 -3
- package/dist/cli/chunks/chunk-KUCU5ML6.js +6 -0
- package/dist/cli/chunks/{chunk-MVW7AACO.js → chunk-KXXLMLMJ.js} +2 -2
- package/dist/cli/chunks/{chunk-HE2NWYHK.js → chunk-LKCFJC4Q.js} +1 -1
- package/dist/cli/chunks/{chunk-237NNDKL.js → chunk-LODXDV4G.js} +2 -2
- package/dist/cli/chunks/{chunk-W4IRWGGR.js → chunk-M4CYXAVP.js} +4 -4
- package/dist/cli/chunks/{chunk-R4VOIXJQ.js → chunk-MOLMS6MA.js} +2 -2
- package/dist/cli/chunks/{chunk-SDMGF3KD.js → chunk-NBTM2J4B.js} +2 -2
- package/dist/cli/chunks/{chunk-X66IXWSO.js → chunk-NIFVFUCU.js} +2 -2
- package/dist/cli/chunks/{chunk-266SKKFM.js → chunk-OOHKW3UE.js} +2 -2
- package/dist/cli/chunks/{chunk-WXEDVKJS.js → chunk-ORA6NIXN.js} +2 -2
- package/dist/cli/chunks/{chunk-ECYDMBDA.js → chunk-OSD55UO7.js} +2 -2
- package/dist/cli/chunks/{chunk-SSURIMCL.js → chunk-OWQRMH3G.js} +2 -2
- package/dist/cli/chunks/chunk-QFUINEBN.js +2 -0
- package/dist/cli/chunks/{chunk-HYACMUUR.js → chunk-RE2IBX7Z.js} +2 -2
- package/dist/cli/chunks/{chunk-2V5VKOJ2.js → chunk-RMQQ5UHM.js} +2 -2
- package/dist/cli/chunks/{chunk-U62WL3WZ.js → chunk-ROEMVTXC.js} +3 -3
- package/dist/cli/chunks/{chunk-YOKRSFGA.js → chunk-SMTAZQJ3.js} +2 -2
- package/dist/cli/chunks/{chunk-OZTSMI7P.js → chunk-TO4NGP3E.js} +1 -1
- package/dist/cli/chunks/{chunk-LFEBTWFS.js → chunk-TTXYZUTQ.js} +2 -2
- package/dist/cli/chunks/{chunk-IZTUAI5T.js → chunk-U4NODKRR.js} +2 -2
- package/dist/cli/chunks/{chunk-JD3GH47Z.js → chunk-U635PSAW.js} +2 -2
- package/dist/cli/chunks/{chunk-6DBYVKGA.js → chunk-UBT7VCKQ.js} +2 -2
- package/dist/cli/chunks/{chunk-YSUMQBMY.js → chunk-UETM5XDO.js} +1 -1
- package/dist/cli/chunks/{chunk-BZB5D4BO.js → chunk-URXG7FMO.js} +4 -3
- package/dist/cli/chunks/{chunk-M2JBQVBP.js → chunk-VIWDVS24.js} +2 -2
- package/dist/cli/chunks/{chunk-6A4FEIE2.js → chunk-VNKCUKUJ.js} +3 -3
- package/dist/cli/chunks/{chunk-6KWX7A3R.js → chunk-VXIXHZCN.js} +2 -2
- package/dist/cli/chunks/{chunk-YIJDCZVX.js → chunk-WFEXEDMC.js} +2 -2
- package/dist/cli/chunks/{chunk-CG3HIYF4.js → chunk-WLX57ULC.js} +2 -2
- package/dist/cli/chunks/{chunk-FKODRXOU.js → chunk-WVQZGLCT.js} +2 -2
- package/dist/cli/chunks/{chunk-677V67MR.js → chunk-WW5DZ6BU.js} +1 -1
- package/dist/cli/chunks/{chunk-7L64UC5U.js → chunk-X364AIY6.js} +1 -1
- package/dist/cli/chunks/{chunk-UGJNR52C.js → chunk-XH7D6EGE.js} +1 -1
- package/dist/cli/chunks/{chunk-66DCG6RO.js → chunk-XICRAXUR.js} +4 -4
- package/dist/cli/chunks/{chunk-ETXK25IY.js → chunk-XMAV7AIC.js} +1 -1
- package/dist/cli/chunks/{chunk-NHXFAXEV.js → chunk-XSUPK7FI.js} +1 -1
- package/dist/cli/chunks/{chunk-3ZAGYTEC.js → chunk-XSWOB74I.js} +2 -2
- package/dist/cli/chunks/chunk-YPIZMTTA.js +14 -0
- package/dist/cli/chunks/{chunk-YDW522M7.js → chunk-YT6KBEXE.js} +2 -2
- package/dist/cli/chunks/{chunk-P2H5ARHM.js → chunk-ZENLP5LF.js} +1 -1
- package/dist/cli/chunks/{ci-A5ZXOEC4.js → ci-WS32HBBS.js} +2 -2
- package/dist/cli/chunks/{ci-output-S47BMRYC.js → ci-output-67R5MSLL.js} +2 -2
- package/dist/cli/chunks/circuit-breaker-MA562FT7.js +2 -0
- package/dist/cli/chunks/{claude-flow-setup-F5WBEBVK.js → claude-flow-setup-4QKGSRS7.js} +2 -2
- package/dist/cli/chunks/client-XQGZKXOB.js +2 -0
- package/dist/cli/chunks/{cline-installer-HLKR4QDR.js → cline-installer-6VSROHRY.js} +2 -2
- package/dist/cli/chunks/{code-MTZWS6JT.js → code-FBPBHVV3.js} +2 -2
- package/dist/cli/chunks/{code-index-extractor-BALTZ2WQ.js → code-index-extractor-62F622V2.js} +2 -2
- package/dist/cli/chunks/{codex-installer-LI2VIGET.js → codex-installer-LSR6DVCU.js} +2 -2
- package/dist/cli/chunks/{completions-TOF4GTNF.js → completions-56QOICBN.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-IPFXIT6T.js → complexity-analyzer-SDH4NWIS.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-KWI66RBI.js → continuedev-installer-S7ZPL3VC.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-REFOE6UF.js → copilot-installer-25GNNKNL.js} +2 -2
- package/dist/cli/chunks/{cost-tracker-M2MZQXCN.js → cost-tracker-73J4Y2RS.js} +2 -2
- package/dist/cli/chunks/{coverage-UR2XSJCR.js → coverage-WEE2AZ5F.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-C2ZFCSXJ.js +2 -0
- package/dist/cli/chunks/{cursor-installer-X4PXCVYH.js → cursor-installer-DHQ644T3.js} +2 -2
- package/dist/cli/chunks/{daemon-5R6ZEEBB.js → daemon-3WUJ5E3X.js} +3 -3
- package/dist/cli/chunks/{dag-attention-scheduler-RUY2RJZA.js → dag-attention-scheduler-IRLAM43H.js} +2 -2
- package/dist/cli/chunks/{detect-PX2AYBHM.js → detect-DTSB4T4R.js} +2 -2
- package/dist/cli/chunks/{domain-handler-5JXWEO3E.js → domain-handler-DDN2Z5XC.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-6M2YLBJY.js → domain-transfer-3RRG4S6R.js} +2 -2
- package/dist/cli/chunks/dream-JSZZ67OO.js +2 -0
- package/dist/cli/chunks/esm-node-X4TES6NX.js +2 -0
- package/dist/cli/chunks/{eval-L6ZBG462.js → eval-UXEP425X.js} +2 -2
- package/dist/cli/chunks/{fast-paths-WIFDALFK.js → fast-paths-4XLHS2VN.js} +2 -2
- package/dist/cli/chunks/{feature-flags-YLBXFUCN.js → feature-flags-6C2HD76K.js} +2 -2
- package/dist/cli/chunks/{feature-flags-GRHF5MTK.js → feature-flags-KXXHAEYF.js} +2 -2
- package/dist/cli/chunks/{file-discovery-4HXUB4HN.js → file-discovery-YSDUIZO4.js} +2 -2
- package/dist/cli/chunks/{fleet-RPLJXOEP.js → fleet-TYDG5DWK.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-2D5IOGAT.js → gnn-wrapper-GJVYRPHB.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-D5SWZZGA.js → heartbeat-handler-X63CM35O.js} +4 -4
- package/dist/cli/chunks/{heartbeat-scheduler-WSG4Y3M2.js → heartbeat-scheduler-NYH4CMVM.js} +2 -2
- package/dist/cli/chunks/hnsw-adapter-SQCVEHB5.js +2 -0
- package/dist/cli/chunks/hnsw-index-UGVC5IDK.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-UH6RWE74.js → hnsw-legacy-bridge-YDVUZTJI.js} +2 -2
- package/dist/cli/chunks/{hnswlib-node-BJ4ZJPMP.js → hnswlib-node-TLBDFWA6.js} +2 -2
- package/dist/cli/chunks/{hooks-KGDQNB5T.js → hooks-B6PVGP7D.js} +6 -6
- package/dist/cli/chunks/hybrid-router-YZEBKUZJ.js +2 -0
- package/dist/cli/chunks/{hypergraph-engine-LARQCK7V.js → hypergraph-engine-OQ2ZEG53.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-RACF4AOX.js → hypergraph-handler-VPD424MI.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-ZIXSRWED.js +2 -0
- package/dist/cli/chunks/{init-handler-64AOFMJD.js → init-handler-5WYP6NJW.js} +6 -6
- package/dist/cli/chunks/init-wizard-MO6PCXPX.js +2 -0
- package/dist/cli/chunks/kernel-P54KQB2F.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-4ICIP6QN.js → kilocode-installer-YVY4EVMY.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-J2GOV2OB.js → kiro-installer-GNT4BN3A.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-GU57FQAQ.js +2 -0
- package/dist/cli/chunks/{learning-QD4JVH3K.js → learning-LD2RSBRS.js} +3 -3
- package/dist/cli/chunks/llm-router-ALKXFKLQ.js +36 -0
- package/dist/cli/chunks/{load-EXKUJMBK.js → load-XAOTGZYB.js} +2 -2
- package/dist/cli/chunks/load-test-5RFBTSS7.js +2 -0
- package/dist/cli/chunks/{mcp-NSNDZSMH.js → mcp-WDAJHGH4.js} +2 -2
- package/dist/cli/chunks/{memory-63JTNVZN.js → memory-M7QD57JD.js} +5 -5
- package/dist/cli/chunks/memory-backend-GPOP3IR4.js +2 -0
- package/dist/cli/chunks/memory-handlers-2NHGZLQM.js +2 -0
- package/dist/cli/chunks/multi-model-executor-2XZQK2IN.js +14 -0
- package/dist/cli/chunks/{opencode-installer-244LFSPN.js → opencode-installer-ASCVY3GG.js} +2 -2
- package/dist/cli/chunks/{orchestrator-TZB457J6.js → orchestrator-GOZICWN3.js} +22 -19
- package/dist/cli/chunks/{pipeline-YLBD2Z5Q.js → pipeline-YHQRJWV3.js} +2 -2
- package/dist/cli/chunks/{platform-53PWFZSE.js → platform-4NESYFHN.js} +2 -2
- package/dist/cli/chunks/{plugin-6GUQEFJU.js → plugin-E24I2RVB.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-VCOK7FV5.js → prime-radiant-advanced-wasm-CDVSLR7R.js} +2 -2
- package/dist/cli/chunks/protocol-executor-M5IONISJ.js +2 -0
- package/dist/cli/chunks/{protocol-handler-25UEGTE2.js → protocol-handler-TGTDKSZB.js} +2 -2
- package/dist/cli/chunks/{prove-CTOU5F6G.js → prove-WUKDAMSE.js} +2 -2
- package/dist/cli/chunks/provider-manager-BTKK6W7M.js +24 -0
- package/dist/cli/chunks/qe-reasoning-bank-WIEXCBVE.js +2 -0
- package/dist/cli/chunks/{quality-PB7H5UEF.js → quality-RTIOIS2K.js} +2 -2
- package/dist/cli/chunks/queen-coordinator-ZFK6DANW.js +2 -0
- package/dist/cli/chunks/{real-embeddings-RWWYCIE5.js → real-embeddings-4JJKAEMO.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-U4AGYVKL.js → roocode-installer-XU2IXRBM.js} +2 -2
- package/dist/cli/chunks/router-TOFBEI2Q.js +2 -0
- package/dist/cli/chunks/routing-feedback-RC2VDP6W.js +2 -0
- package/dist/cli/chunks/{routing-handler-NTDKDEBE.js → routing-handler-3KBOCIEN.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-RQKOLQSW.js → ruvector-commands-HHE2ZPX7.js} +2 -2
- package/dist/cli/chunks/{rvf-dual-writer-6EZ7S7OG.js → rvf-dual-writer-GAWM2BUZ.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-adapter-EBTV6FV2.js → rvf-migration-adapter-HQPEC4BN.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-coordinator-MERU7VLY.js → rvf-migration-coordinator-A4K45EFU.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-ZOQDH3JY.js +2 -0
- package/dist/cli/chunks/safe-db-RIP3X32S.js +2 -0
- package/dist/cli/chunks/schedule-Q6KZRLWS.js +2 -0
- package/dist/cli/chunks/scheduler-SJO5QPAU.js +2 -0
- package/dist/cli/chunks/{security-JPDLGHMC.js → security-UIKUNOXB.js} +3 -3
- package/dist/cli/chunks/shared-rvf-adapter-JJCR3AWU.js +2 -0
- package/dist/cli/chunks/{shared-rvf-dual-writer-7OGLQE5Y.js → shared-rvf-dual-writer-ZUWSLFPH.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-HK2S6XAI.js +2 -0
- package/dist/cli/chunks/{status-handler-3TI3DHEL.js → status-handler-E3VSWGA6.js} +2 -2
- package/dist/cli/chunks/{structural-health-WCZKXVWS.js → structural-health-Y22H4BOU.js} +2 -2
- package/dist/cli/chunks/{sync-AM5T4GYO.js → sync-CA4KWZFS.js} +2 -2
- package/dist/cli/chunks/{task-handler-VHDTXPVP.js → task-handler-3EZPIAMD.js} +2 -2
- package/dist/cli/chunks/task-handlers-6UVAQAGP.js +2 -0
- package/dist/cli/chunks/{test-G6P5XGHM.js → test-Q5DOFSJI.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-37RBUN4E.js → test-scheduling-BSXWCIMQ.js} +3 -3
- package/dist/cli/chunks/token-bootstrap-XGEZU2CS.js +2 -0
- package/dist/cli/chunks/{token-usage-5XGVBLFR.js → token-usage-BZX5TCG6.js} +2 -2
- package/dist/cli/chunks/{transformers-JTKWAZJU.js → transformers-7ITQPXAU.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-KW2GWIIQ.js → tree-sitter-wasm-parser-ZYBBNYR3.js} +2 -2
- package/dist/cli/chunks/{types-7R72BACI.js → types-ACZ5VVRC.js} +2 -2
- package/dist/cli/chunks/unified-memory-EXO6WK33.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-7HPSTFVV.js +2 -0
- package/dist/cli/chunks/unified-persistence-WC3O4WOJ.js +2 -0
- package/dist/cli/chunks/{validate-TYB4ZTUL.js → validate-IQL6OVXD.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-3TFI6PLT.js → validate-swarm-J52J2K5X.js} +2 -2
- package/dist/cli/chunks/{vibium-3YELURJT.js → vibium-XSE76PXE.js} +2 -2
- package/dist/cli/chunks/visual-security-COW3OCEE.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-7Q77A27Y.js → web-tree-sitter-YM6QXUIY.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-ASARRM2X.js → windsurf-installer-M27DVL4H.js} +2 -2
- package/dist/cli/chunks/{witness-chain-WZ6PNXEY.js → witness-chain-NB5LP73S.js} +2 -2
- package/dist/cli/chunks/witness-chain-XQXF3RSP.js +2 -0
- package/dist/cli/chunks/{workflow-JDTEE6TY.js → workflow-5DODQ6XS.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-HSIZEKZM.js +2 -0
- package/dist/cli/chunks/{wrappers-X7WZLBZD.js → wrappers-K7HHCIYD.js} +2 -2
- package/dist/cli/commands/llm-router.js +252 -0
- package/dist/coordination/queen-task-management.js +8 -1
- package/dist/init/browser-engine-installer.d.ts +60 -0
- package/dist/init/browser-engine-installer.js +92 -0
- package/dist/init/init-wizard-steps.js +9 -0
- package/dist/init/phases/09-assets.d.ts +2 -0
- package/dist/init/phases/09-assets.js +65 -0
- package/dist/init/phases/12-verification.js +8 -0
- package/dist/init/skills-installer.js +1 -0
- package/dist/kernel/unified-memory-schemas.d.ts +1 -1
- package/dist/kernel/unified-memory-schemas.js +2 -1
- package/dist/mcp/bundle.js +47 -44
- package/dist/mcp/protocol-server.js +87 -0
- package/dist/routing/advisor/circuit-breaker.d.ts +56 -0
- package/dist/routing/advisor/circuit-breaker.js +128 -0
- package/dist/routing/advisor/domain-prompts.d.ts +14 -0
- package/dist/routing/advisor/domain-prompts.js +53 -0
- package/dist/routing/advisor/index.d.ts +10 -0
- package/dist/routing/advisor/index.js +9 -0
- package/dist/routing/advisor/multi-model-executor.d.ts +60 -0
- package/dist/routing/advisor/multi-model-executor.js +176 -0
- package/dist/routing/advisor/redaction.d.ts +40 -0
- package/dist/routing/advisor/redaction.js +187 -0
- package/dist/routing/advisor/types.d.ts +101 -0
- package/dist/routing/advisor/types.js +9 -0
- package/dist/routing/queen-integration.d.ts +3 -0
- package/dist/routing/queen-integration.js +7 -1
- package/dist/routing/routing-feedback.d.ts +7 -1
- package/dist/routing/routing-feedback.js +57 -11
- package/dist/routing/tiny-dancer-router.d.ts +35 -1
- package/dist/routing/tiny-dancer-router.js +33 -0
- package/dist/routing/types.d.ts +12 -0
- package/package.json +1 -1
- package/dist/cli/chunks/adapter-D4XQUIJD.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-CGIWYLIP.js +0 -2
- package/dist/cli/chunks/base-BYVP2STR.js +0 -2
- package/dist/cli/chunks/browser-workflow-PC4N5TKL.js +0 -2
- package/dist/cli/chunks/chunk-2K3DJ3EK.js +0 -7
- package/dist/cli/chunks/chunk-JBQ4WGB4.js +0 -14
- package/dist/cli/chunks/chunk-OT4JADWW.js +0 -2
- package/dist/cli/chunks/client-56BU3GAX.js +0 -2
- package/dist/cli/chunks/cross-domain-router-XQT52BTB.js +0 -2
- package/dist/cli/chunks/dream-LFZCN5WK.js +0 -2
- package/dist/cli/chunks/esm-node-EBDIEPKS.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-BMXTVGZB.js +0 -2
- package/dist/cli/chunks/hnsw-index-YX6XLICT.js +0 -2
- package/dist/cli/chunks/impact-analyzer-MGSI2WBK.js +0 -2
- package/dist/cli/chunks/init-wizard-TBDWRRMC.js +0 -2
- package/dist/cli/chunks/kernel-NV7TO2FK.js +0 -2
- package/dist/cli/chunks/knowledge-graph-7REGYH6A.js +0 -2
- package/dist/cli/chunks/llm-router-4K4IT2PQ.js +0 -30
- package/dist/cli/chunks/load-test-RYQK44TT.js +0 -2
- package/dist/cli/chunks/memory-backend-3EBE2DEX.js +0 -2
- package/dist/cli/chunks/memory-handlers-2335MVQJ.js +0 -2
- package/dist/cli/chunks/protocol-executor-MR37S7GX.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-DANGLPTH.js +0 -2
- package/dist/cli/chunks/queen-coordinator-4YJPYF5F.js +0 -2
- package/dist/cli/chunks/router-F4IPY4RQ.js +0 -2
- package/dist/cli/chunks/routing-feedback-VGHFIJ5S.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-2P75WF5A.js +0 -2
- package/dist/cli/chunks/safe-db-47NEO2RS.js +0 -2
- package/dist/cli/chunks/schedule-L5GJW25Z.js +0 -2
- package/dist/cli/chunks/scheduler-NGGGSZMO.js +0 -2
- package/dist/cli/chunks/shared-rvf-adapter-NKNTYGHO.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-TE2ZRHKA.js +0 -2
- package/dist/cli/chunks/task-handlers-GEJ36WNB.js +0 -2
- package/dist/cli/chunks/token-bootstrap-JPE3LWXQ.js +0 -2
- package/dist/cli/chunks/unified-memory-KSBLUZT4.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-V3EOMQIZ.js +0 -2
- package/dist/cli/chunks/unified-persistence-URIRJ4BM.js +0 -2
- package/dist/cli/chunks/visual-security-DJOOVCBZ.js +0 -2
- package/dist/cli/chunks/witness-chain-ZWJUCXCJ.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-5CKA6Q74.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{e as a}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.10");process.exit(0)}
|
|
2
|
+
import{e as a}from"./chunk-CQNXIYQW.js";import{b as w,d as y}from"./chunk-DG2OYKUQ.js";import{a as f,c as P}from"./chunk-IGRKFVFD.js";import{randomUUID as v}from"crypto";import*as i from"fs";import*as n from"path";import*as c from"os";y();P();var k=".aqe",b="schedules.json",F="1.0.0",g=5e3,x=50,p=10*1024*1024,d=class{schedulesPath;debug;lockFile;initialized=!1;constructor(e={}){e.schedulesPath&&this.validateSchedulesPath(e.schedulesPath),this.schedulesPath=e.schedulesPath??this.getDefaultSchedulesPath(),this.lockFile=`${this.schedulesPath}.lock`,this.debug=e.debug??!1}validateSchedulesPath(e){let s=c.homedir(),t=n.resolve(e),r=n.resolve(s);if(t.startsWith(r+n.sep)||t===r)return;let l=process.cwd(),h=n.resolve(l);if(t.startsWith(h+n.sep)||t===h)return;let u=c.tmpdir(),S=n.resolve(u);if(!(t.startsWith(S+n.sep)||t===S))throw new Error(`Security: Custom schedulesPath must be within home directory (${s}), current working directory (${l}), or temp directory (${u}). Provided path: ${e}`)}getDefaultSchedulesPath(){let e=c.homedir();return n.join(e,k,b)}async initialize(){if(this.initialized)return;let e=n.dirname(this.schedulesPath);i.existsSync(e)||(i.mkdirSync(e,{recursive:!0}),this.log(`Created directory: ${e}`)),this.initialized=!0}async loadSchedules(){if(await this.initialize(),!i.existsSync(this.schedulesPath))return this.log("Schedules file does not exist, returning empty array"),[];try{let e=i.readFileSync(this.schedulesPath,"utf-8"),s=this.parseSchedulesFile(e);return this.log(`Loaded ${s.schedules.length} schedules`),s.schedules}catch(e){return await this.handleCorruptFile(e),[]}}async saveSchedule(e){await this.initialize(),await this.withFileLock(async()=>{let s=await this.loadSchedulesUnsafe(),t=s.findIndex(r=>r.id===e.id);t>=0?(s[t]=e,this.log(`Updated schedule: ${e.id}`)):(s.push(e),this.log(`Added schedule: ${e.id}`)),await this.writeSchedules(s)})}async removeSchedule(e){await this.initialize(),await this.withFileLock(async()=>{let s=await this.loadSchedulesUnsafe(),t=s.filter(r=>r.id!==e);if(t.length===s.length){this.log(`Schedule not found: ${e}`);return}await this.writeSchedules(t),this.log(`Removed schedule: ${e}`)})}async getSchedules(){return this.loadSchedules()}async getSchedule(e){return(await this.loadSchedules()).find(t=>t.id===e)}async getDueSchedules(){let e=await this.loadSchedules(),s=new Date;return e.filter(t=>t.enabled?new Date(t.nextRun)<=s:!1)}async markExecuted(e){await this.initialize(),await this.withFileLock(async()=>{let s=await this.loadSchedulesUnsafe(),t=s.find(l=>l.id===e);if(!t)throw new Error(`Schedule not found: ${e}`);let r=new Date;t.lastRun=r.toISOString(),t.nextRun=a(t.schedule,r).toISOString(),await this.writeSchedules(s),this.log(`Marked executed: ${e}, next run: ${t.nextRun}`)})}async setEnabled(e,s){await this.initialize(),await this.withFileLock(async()=>{let t=await this.loadSchedulesUnsafe(),r=t.find(l=>l.id===e);if(!r)throw new Error(`Schedule not found: ${e}`);r.enabled=s,s&&(r.nextRun=a(r.schedule,new Date).toISOString()),await this.writeSchedules(t),this.log(`Set enabled=${s}: ${e}`)})}async getEnabledSchedules(){return(await this.loadSchedules()).filter(s=>s.enabled)}async getSchedulesByWorkflow(e){return(await this.loadSchedules()).filter(t=>t.workflowId===e)}async clearAll(){await this.initialize(),await this.withFileLock(async()=>{await this.writeSchedules([]),this.log("Cleared all schedules")})}async getStats(){let e=await this.loadSchedules(),s=new Date;return{total:e.length,enabled:e.filter(t=>t.enabled).length,disabled:e.filter(t=>!t.enabled).length,due:e.filter(t=>t.enabled&&new Date(t.nextRun)<=s).length}}async loadSchedulesUnsafe(){if(!i.existsSync(this.schedulesPath))return[];try{let e=i.readFileSync(this.schedulesPath,"utf-8");return this.parseSchedulesFile(e).schedules}catch{return[]}}parseSchedulesFile(e){let s=Buffer.byteLength(e,"utf-8");if(s>p)throw new Error(`Schedules file exceeds maximum allowed size (${p/(1024*1024)}MB). File is ${(s/(1024*1024)).toFixed(2)}MB.`);let t=w(e);if(!t.schedules||!Array.isArray(t.schedules))throw new Error("Invalid schedules file: missing schedules array");for(let r of t.schedules)if(!r.id||!r.workflowId||!r.schedule)throw new Error("Invalid schedule entry: missing required fields");return t}async writeSchedules(e){let s={version:F,updatedAt:new Date().toISOString(),schedules:e},t=JSON.stringify(s,null,2);i.writeFileSync(this.schedulesPath,t,"utf-8"),this.log(`Wrote ${e.length} schedules to disk`)}async handleCorruptFile(e){let s=f(e);this.log(`Corrupt schedules file detected: ${s}`);let t=`${this.schedulesPath}.corrupt.${Date.now()}`;try{i.existsSync(this.schedulesPath)&&(i.copyFileSync(this.schedulesPath,t),this.log(`Backed up corrupt file to: ${t}`))}catch(r){this.log(`Failed to backup corrupt file: ${r}`)}try{i.existsSync(this.schedulesPath)&&(i.unlinkSync(this.schedulesPath),this.log("Removed corrupt schedules file"))}catch(r){this.log(`Failed to remove corrupt file: ${r}`)}}async withFileLock(e){await this.acquireLock();try{return await e()}finally{this.releaseLock()}}async acquireLock(){let e=Date.now();for(;i.existsSync(this.lockFile);){try{let s=i.statSync(this.lockFile);if(Date.now()-s.mtimeMs>g){i.unlinkSync(this.lockFile),this.log("Removed stale lock file");break}}catch{break}if(Date.now()-e>g)throw new Error("Timeout waiting for scheduler lock");await this.sleep(x)}try{i.writeFileSync(this.lockFile,`${process.pid}:${Date.now()}`,{flag:"wx"})}catch(s){if(s.code==="EEXIST")return this.acquireLock();throw s}}releaseLock(){try{i.existsSync(this.lockFile)&&i.unlinkSync(this.lockFile)}catch(e){console.debug("[PersistentScheduler] Lock release error:",e instanceof Error?e.message:e)}}sleep(e){return new Promise(s=>setTimeout(s,e))}log(e){this.debug&&console.log(`[PersistentScheduler] ${e}`)}};function E(o={}){return new d(o)}function m(){let o=Date.now().toString(36),e=v().slice(0,8);return`sched-${o}-${e}`}function $(o){let e=new Date;return{id:m(),workflowId:o.workflowId,pipelinePath:o.pipelinePath,schedule:o.schedule,scheduleDescription:o.scheduleDescription,nextRun:a(o.schedule,e).toISOString(),enabled:o.enabled??!0,createdAt:e.toISOString()}}export{d as a,E as b,m as c,$ as d};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{b as d,d as L}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.10");process.exit(0)}
|
|
2
|
+
import{b as d,d as L}from"./chunk-URXG7FMO.js";import{createHash as m}from"crypto";import{existsSync as g,readFileSync as R,writeFileSync as A,openSync as X,writeSync as U,closeSync as f}from"fs";var p=[`CREATE TABLE IF NOT EXISTS qe_patterns (
|
|
3
3
|
id TEXT PRIMARY KEY, pattern_type TEXT NOT NULL, qe_domain TEXT NOT NULL,
|
|
4
4
|
domain TEXT NOT NULL, name TEXT NOT NULL, description TEXT,
|
|
5
5
|
confidence REAL DEFAULT 0.5, usage_count INTEGER DEFAULT 0,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.10");process.exit(0)}
|
|
2
2
|
var i={domain:"test-generation",bestPractices:["Follow Arrange-Act-Assert (AAA) pattern for clear test structure","One logical assertion per test - test one behavior at a time","Use descriptive test names: should_returnValue_when_condition","Mock external dependencies to isolate unit under test","Test edge cases and boundary conditions, not just happy paths","Keep tests deterministic - avoid time-dependent assertions","Use test data builders or factories for complex objects","Prefer integration tests for workflows, unit tests for logic","Maintain test independence - no shared mutable state between tests","Write failing test first (TDD Red) before implementation"],antiPatterns:[{name:"God Test",description:"A single test that verifies too many behaviors",reason:"Hard to diagnose failures, brittle, slow to run",alternative:"Split into focused tests, each verifying one behavior",detection:"expect.*expect.*expect.*expect.*expect"},{name:"Mystery Guest",description:"Test relies on external data files or state not visible in test",reason:"Tests are hard to understand and maintain",alternative:"Make test data explicit within the test or use fixtures"},{name:"Eager Test",description:"Test that verifies more than needed for the current behavior",reason:"Creates unnecessary coupling, breaks easily",alternative:"Only assert what is necessary for this specific test case"},{name:"Flaky Assertion",description:"Assertions that depend on timing, order, or external state",reason:"Creates unreliable test suite, erodes trust",alternative:"Use deterministic assertions, mock time/random",detection:"setTimeout|Date\\.now|Math\\.random"},{name:"Test Code Duplication",description:"Same setup or assertion code repeated across tests",reason:"Maintenance burden, inconsistency risk",alternative:"Extract to beforeEach, helpers, or fixtures"}],frameworkGuidance:{jest:["Use describe blocks to group related tests","Prefer toEqual for deep equality, toBe for primitives","Use jest.mock() at module level for consistent mocking","Use jest.spyOn for partial mocking of objects","Enable --coverage to track test coverage"],vitest:["Use vi.mock() for module mocking","Prefer vi.fn() over jest.fn() syntax","Use vitest/ui for interactive test debugging","Enable browser mode for component tests","Use inline snapshots for small expected values"],mocha:["Use beforeEach/afterEach for setup/teardown","Combine with chai for assertions","Use sinon for spies, stubs, and mocks","Set appropriate timeouts for async tests"],pytest:["Use fixtures for reusable test setup","Use parametrize for data-driven tests","Use conftest.py for shared fixtures","Use pytest.raises for exception testing","Use pytest-cov for coverage reporting"],junit:["Use @BeforeEach and @AfterEach for setup/teardown","Use @DisplayName for readable test names","Use @ParameterizedTest for data-driven tests","Use Mockito for mocking dependencies"],testng:["Use @BeforeMethod and @AfterMethod appropriately","Use @DataProvider for parameterized tests","Configure test groups for selective execution"],playwright:["Use page.locator() for resilient element selection","Use expect(locator) for auto-waiting assertions","Use page.waitForLoadState for navigation","Use test.describe for grouping tests","Use fixtures for reusable browser contexts"],cypress:["Use cy.intercept() for API mocking","Avoid conditional testing - use deterministic state","Use data-cy attributes for stable selectors","Use cy.within() for scoped queries","Prefer cy.contains() for text-based selection"],selenium:["Use explicit waits over implicit waits","Use Page Object Model for maintainability","Handle stale element references with retry logic","Clean up browser state between tests"]},languageGuidance:{typescript:["Use type assertions in tests for better IDE support","Create typed test fixtures and builders","Use satisfies operator for test data validation","Mock types with ts-mockito or typed mocking libs"],javascript:["Use JSDoc comments for test documentation","Consider TypeScript for larger test suites","Use ESLint with testing plugins"],python:["Use type hints in test functions","Use dataclasses for test data","Follow PEP 8 naming: test_should_do_something"],java:["Use AssertJ for fluent assertions","Use Lombok for test data classes","Follow naming: shouldDoSomething_whenCondition"],go:["Use table-driven tests for multiple cases","Use testify for assertions and mocking","Place tests in _test.go files"],rust:["Use #[test] attribute for test functions","Use assert!, assert_eq!, assert_ne! macros","Place unit tests in same file with #[cfg(test)]"],csharp:["Use xUnit or NUnit for testing","Use FluentAssertions for readable assertions","Use Moq for mocking interfaces"],kotlin:["Use kotest for BDD-style testing","Use MockK for Kotlin-first mocking","Use data classes for test fixtures"]},examples:[{title:"Unit Test Template (TypeScript + Vitest)",description:"Standard AAA pattern for unit tests",content:`describe('UserService', () => {
|
|
3
3
|
describe('createUser', () => {
|
|
4
4
|
it('should create user with valid data', async () => {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{d as l,f as i}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.10");process.exit(0)}
|
|
2
|
+
import{d as l,f as i}from"./chunk-34WI4QNF.js";import{a as r,c as g}from"./chunk-IGRKFVFD.js";g();var c=class extends i{config={name:"qe/tests/schedule",description:"Schedule and execute tests using phase-based pipeline with git-aware selection and flaky tracking. Runs tests in phases (unit, integration, e2e), selects affected tests from git changes, and tracks flaky tests.",domain:"test-execution",schema:this.buildSchema()};buildSchema(){return{type:"object",properties:{cwd:{type:"string",description:"Working directory for test execution (defaults to project root)"},gitRef:{type:"string",description:'Git ref to compare for affected test selection (e.g., "main", "HEAD~3")'},useGitAware:{type:"boolean",description:"Enable git-aware test selection to only run affected tests",default:!0},trackFlaky:{type:"boolean",description:"Enable flaky test tracking and quarantine",default:!0}}}}async execute(s,o){try{let{runTestPipeline:n}=await import("./test-scheduling-BSXWCIMQ.js"),d=await l(o),t=await n({cwd:s.cwd||process.cwd(),memory:d,baseRef:s.gitRef,flakyHistoryPath:s.trackFlaky!==!1?".agentic-qe/flaky-history.json":void 0,runAllTests:s.useGitAware===!1}),u=t.phaseResults.reduce((e,a)=>e+a.totalTests,0),f=t.phaseResults.reduce((e,a)=>e+a.passed,0),p=t.phaseResults.reduce((e,a)=>e+a.failed,0);return{success:!0,data:{pipelineId:o.requestId,phases:t.phaseResults.map(e=>({phaseId:e.phaseId,phaseName:e.phaseName,totalTests:e.totalTests,passed:e.passed,failed:e.failed,passRate:e.passRate,durationMs:e.durationMs})),gitAware:{enabled:!t.ranAllTests,selectedTests:t.selectedTests.length,gitRef:s.gitRef},flakyTracking:{enabled:s.trackFlaky!==!1},totalDuration:t.totalDurationMs,ranAllTests:t.ranAllTests,summary:`Executed ${t.phaseResults.length} phases, ${u} tests (${f} passed, ${p} failed) in ${t.totalDurationMs}ms`}}}catch(n){return{success:!1,error:r(n)}}}};export{c as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.10");process.exit(0)}
|
|
2
2
|
import{writeFileSync as p,readFileSync as m}from"node:fs";import{resolve as f,dirname as c,join as d}from"node:path";import{mkdirSync as g}from"node:fs";import{fileURLToPath as h}from"node:url";function $(){try{let e=typeof __dirname<"u"?__dirname:c(h(import.meta.url));for(let t=0;t<5;t++){let n=d(e,"package.json");try{let r=JSON.parse(m(n,"utf-8"));if(r.version)return r.version}catch{}e=c(e)}}catch{}return"unknown"}var T=["-F, --format <format>","Output format (text|json|sarif|junit|markdown)","text"],x=["-o, --output <path>","Write output to file instead of stdout"];function C(e,t,n){if(t){let r=f(t);g(c(r),{recursive:!0}),p(r,e,"utf-8"),n&&console.log(n),console.log(`Output written to: ${r}`)}else console.log(e)}function R(e){return JSON.stringify(e,null,2)}var v="https://raw.githubusercontent.com/oasis-tcs/sarif-spec/main/sarif-2.1/schema/sarif-schema-2.1.0.json";function w(e){let t=i=>{switch(i.toLowerCase()){case"critical":case"high":return"error";case"medium":return"warning";case"low":case"info":return"note";default:return"warning"}},n=new Map,r=[];for(let i of e.vulnerabilities){let o=i.ruleId||`AQE/${i.type.replace(/\s+/g,"-").toLowerCase()}`;n.has(o)||n.set(o,{id:o,name:i.type,shortDescription:i.type,...i.cweId?{helpUri:`https://cwe.mitre.org/data/definitions/${i.cweId.replace("CWE-","")}.html`}:{}}),r.push({ruleId:o,level:t(i.severity),message:{text:i.message},locations:[{physicalLocation:{artifactLocation:{uri:i.file,uriBaseId:"%SRCROOT%"},region:{startLine:i.line,startColumn:1}}}],...i.cweId?{taxa:[{id:i.cweId,toolComponent:{name:"CWE"}}]}:{}})}let s={$schema:v,version:"2.1.0",runs:[{tool:{driver:{name:"agentic-qe",version:$(),informationUri:"https://github.com/proffesor-for-testing/agentic-qe",rules:Array.from(n.values()).map(i=>({id:i.id,name:i.name,shortDescription:{text:i.shortDescription},...i.helpUri?{helpUri:i.helpUri}:{},defaultConfiguration:{level:"warning"}}))}},results:r,invocations:[{executionSuccessful:!0,commandLine:`aqe security --sast --format sarif -t ${e.target}`}]}]};return JSON.stringify(s,null,2)}function a(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function I(e){let t=e.tests||[],n=e.passed+e.failed+e.skipped,r=(e.duration/1e3).toFixed(3),s=`<?xml version="1.0" encoding="UTF-8"?>
|
|
3
3
|
`;if(s+=`<testsuites tests="${n}" failures="${e.failed}" errors="0" time="${r}">
|
|
4
4
|
`,s+=` <testsuite name="aqe-test-run" tests="${n}" failures="${e.failed}" errors="0" skipped="${e.skipped}" time="${r}" id="${a(e.runId)}">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{i as c}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.10");process.exit(0)}
|
|
2
|
+
import{i as c}from"./chunk-XH7D6EGE.js";import{a as p}from"./chunk-7FWZHYYE.js";import{c as m}from"./chunk-WLX57ULC.js";import{b as g,d as E}from"./chunk-DG2OYKUQ.js";import{a as l,b as _}from"./chunk-RMQQ5UHM.js";_();import b from"node:path";import{existsSync as h}from"node:fs";E();p();var T=m.create("metrics-tracker"),d=class{db=null;dbPath;initialized=!1;constructor(e=process.cwd()){this.dbPath=b.join(e,".agentic-qe","memory.db")}async initialize(){if(!this.initialized){if(!h(this.dbPath))throw new Error(`Database not found: ${this.dbPath}. Run "aqe init --auto" first.`);this.db=l(this.dbPath),this.ensureMetricsTable(),this.initialized=!0}}ensureMetricsTable(){this.db&&this.db.exec(`
|
|
3
3
|
CREATE TABLE IF NOT EXISTS learning_daily_snapshots (
|
|
4
4
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
5
5
|
snapshot_date TEXT NOT NULL UNIQUE,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{S as f,b as p}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.10");process.exit(0)}
|
|
2
|
+
import{S as f,b as p}from"./chunk-54TZA65H.js";f();var y={predictionWindowSize:10,compressionThreshold:.3,maxConcurrentStreams:8,oscillationFrequencyMs:100};function d(s){try{return JSON.stringify(s).length}catch{return 0}}function w(s,t){let e={},n=!1;for(let r of Object.keys(t))JSON.stringify(s[r])!==JSON.stringify(t[r])&&(e[r]=t[r],n=!0);for(let r of Object.keys(s))r in t||(e[r]=void 0,n=!0);return n?e:null}function v(s,t){let e={...s};for(let[n,r]of Object.entries(t))r===void 0?delete e[n]:e[n]=r;return e}var l=class{windowSize;windows=new Map;constructor(t){this.windowSize=Math.max(1,t)}predict(t){let e=this.windows.get(t);if(!e||e.length===0)return null;let n=e[e.length-1];return typeof n!="object"||n===null||Array.isArray(n)?null:{...n}}record(t,e){let n=this.windows.get(t);n||(n=[],this.windows.set(t,n)),n.push(e),n.length>this.windowSize&&n.shift()}removeStream(t){this.windows.delete(t)}},h=class{maxStreams;cycleMs;streamIds=[];currentIndex=0;constructor(t,e){this.maxStreams=Math.max(1,t),this.cycleMs=Math.max(1,e)}addStream(t){return this.streamIds.includes(t)||this.streamIds.length>=this.maxStreams?!1:(this.streamIds.push(t),!0)}removeStream(t){let e=this.streamIds.indexOf(t);return e===-1?!1:(this.streamIds.splice(e,1),this.currentIndex>=this.streamIds.length&&(this.currentIndex=0),!0)}nextStream(){if(this.streamIds.length===0)return null;let t=this.streamIds[this.currentIndex];return this.currentIndex=(this.currentIndex+1)%this.streamIds.length,t}getActiveStreams(){return[...this.streamIds]}get activeCount(){return this.streamIds.length}},g=class{config;predictor;router;lastPayloads=new Map;totalMessages=0;compressedMessages=0;totalOriginalBytes=0;totalCompressedBytes=0;constructor(t){this.config={...y,...t},this.predictor=new l(this.config.predictionWindowSize),this.router=new h(this.config.maxConcurrentStreams,this.config.oscillationFrequencyMs)}send(t,e,n,r){this.totalMessages++;let i=d(r);this.totalOriginalBytes+=i;let c=!1,o=r,a=i;if(typeof r=="object"&&r!==null&&!Array.isArray(r)){let m=this.predictor.predict(t);if(m){let u=w(m,r);u?1-d(u)/Math.max(i,1)>=this.config.compressionThreshold&&(o={__delta:!0,__changes:u},a=d(o),c=!0,this.compressedMessages++):(o={__delta:!0,__changes:{}},a=d(o),c=!0,this.compressedMessages++)}}return this.totalCompressedBytes+=a,this.predictor.record(t,r),this.lastPayloads.set(t,r),{streamId:t,senderId:e,receiverId:n,payload:o,compressed:c,originalSize:i,compressedSize:a,timestamp:Date.now()}}receive(t){if(!t.compressed||typeof t.payload!="object"||t.payload===null)return this.lastPayloads.set(t.streamId,t.payload),this.predictor.record(t.streamId,t.payload),t.payload;let e=t.payload;if(!e.__delta)return this.lastPayloads.set(t.streamId,t.payload),this.predictor.record(t.streamId,t.payload),t.payload;let n=this.predictor.predict(t.streamId),r=e.__changes??{};if(!n)return r;let i=v(n,r);return this.predictor.record(t.streamId,i),this.lastPayloads.set(t.streamId,i),i}getStats(){let t=this.totalOriginalBytes-this.totalCompressedBytes;return{totalMessages:this.totalMessages,compressedMessages:this.compressedMessages,bandwidthSavedBytes:Math.max(0,t),bandwidthReductionPercent:this.totalOriginalBytes>0?Math.max(0,t)/this.totalOriginalBytes*100:0,activeStreams:this.router.activeCount}}addStream(t){this.router.addStream(t)}removeStream(t){this.router.removeStream(t),this.predictor.removeStream(t),this.lastPayloads.delete(t)}};function M(s){return S()?new g(s):null}function S(){return p().useCognitiveRouting}export{M as a,S as b};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a as x,c as N}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.10");process.exit(0)}
|
|
2
|
+
import{a as x,c as N}from"./chunk-IGRKFVFD.js";import{b as w,c as P,d as O}from"./chunk-AOA454FC.js";N();O();import*as k from"fs";import*as T from"path";import*as L from"yaml";var D=5,F=4,U=3e4,W=".claude/skills",G=5e3,$=500,A=100,V=1e3,I=500,H=.8,Q=.2,K=.1,v=.1,q=.1,B=.1,z=.1,X=200,j=500,Y=300,J=1,Z=.9,M={maxWorkers:D,batchSize:F,retryFailedTests:!0,timeout:U,skillsDir:W,progressIntervalMs:G},R=class{async execute(e,s,t){let r=P(A,$+A);return await new Promise(i=>setTimeout(i,r)),{output:this.generateMockResponse(e),tokensUsed:w(I,V+I),durationMs:r}}generateMockResponse(e){let s=[];return e.includes("alt")&&s.push("alt","1.1.1","perceivable"),e.includes("contrast")&&s.push("contrast","1.4.3","4.5:1"),e.includes("keyboard")&&s.push("keyboard","2.1.1","operable","button"),e.includes("label")&&s.push("label","3.3.2","understandable"),e.includes("ARIA")&&s.push("ARIA","4.1.2","robust"),e.includes("focus")&&s.push("focus","2.4.7","outline"),e.includes("lang")&&s.push("lang","3.1.1","language"),e.includes("caption")&&s.push("caption","1.2.2","track"),e.includes("accessible")&&s.push("accessible","compliant"),s.length===0&&s.push("accessibility","WCAG","finding"),`Analysis complete. Found issues related to: ${s.join(", ")}.
|
|
3
3
|
Recommendations: Implement proper ${s[0]} attributes for better accessibility.
|
|
4
4
|
Severity: ${e.includes("critical")?"critical":"serious"}`}},y=class{constructor(e,s,t){this.executor=s;this.config=t;this.id=e}id;status="idle";tasksCompleted=0;tasksFailed=0;lastHeartbeat=Date.now();async executeBatch(e){this.status="running";let s=[];for(let t of e){this.lastHeartbeat=Date.now();try{let r=await this.executeTestCase(t);if(s.push(r),r.passed)this.tasksCompleted++;else if(this.tasksFailed++,this.config.retryFailedTests&&!r.passed){let a=await this.executeTestCase(t,!0);a.passed&&(s[s.length-1]=a,this.tasksCompleted++,this.tasksFailed--)}}catch(r){this.tasksFailed++,s.push({testId:t.testCaseId,passed:!1,expectedPatterns:t.testCase.expected_output.must_contain||[],actualPatterns:[],reasoningQuality:0,category:t.testCase.category,priority:t.testCase.priority,error:x(r)})}}return this.status="idle",s}async executeTestCase(e,s=!1){let t=Date.now(),r=this.buildPrompt(e),a=await this.executor.execute(r,e.model,{timeout:this.config.timeout}),i=this.validateResponse(a.output,e.testCase.expected_output,e.testCase.validation);return{testId:e.testCaseId,passed:i.passed,expectedPatterns:e.testCase.expected_output.must_contain||[],actualPatterns:i.foundPatterns,reasoningQuality:i.reasoningQuality,executionTimeMs:Date.now()-t,category:e.testCase.category,priority:e.testCase.priority,error:i.error}}buildPrompt(e){let{testCase:s}=e,t=s.input.context;return`Analyze the following ${t.language||"HTML"} code for accessibility issues.
|
|
5
5
|
Context: ${t.description||s.description}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{d as m}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.10");process.exit(0)}
|
|
2
|
+
import{d as m}from"./chunk-AOA454FC.js";import{d as T}from"./chunk-B4AFVIOA.js";T();function p(t,r,o){let e=0,n=t.length;for(;e<n;){let i=e+n>>>1;o(t[i],r)<=0?e=i+1:n=i}return e}function a(t,r,o){let e=p(t,r,o);return t.splice(e,0,r),e}function s(){return(t,r)=>t.createdAt.getTime()-r.createdAt.getTime()}m();export{a,s as b};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.10");process.exit(0)}
|
|
2
2
|
import a from"chalk";import{existsSync as m,statSync as V}from"fs";import{join as p,relative as P}from"path";var l=class{static prompt(t,e){return new Promise(r=>{t.question(e,s=>{r(s)})})}static printStepHeader(t,e,r){console.log(""),console.log(a.cyan(`Step ${t}: ${e}`)),r&&console.log(a.gray(r)),console.log("")}static printWizardHeader(t,e){console.log(""),console.log(a.blue("========================================")),console.log(a.blue.bold(` ${t}`)),console.log(a.blue("========================================")),e&&console.log(a.gray(e)),console.log(a.gray("Press Ctrl+C to cancel at any time")),console.log("")}static printSummaryHeader(){console.log(""),console.log(a.blue("========================================")),console.log(a.blue.bold(" Configuration Summary")),console.log(a.blue("========================================")),console.log("")}static printSummaryField(t,e,r){let s=r?.indent??" ",i=r?.maxItems??5,c=r?.formatValue??(o=>a.cyan(o));if(Array.isArray(e))e.length===0?console.log(a.white(`${s}${t}: ${a.gray("(none)")}`)):e.length<=i?console.log(a.white(`${s}${t}: ${c(e.join(", "))}`)):(console.log(a.white(`${s}${t}:`)),e.slice(0,i).forEach(o=>{console.log(a.gray(`${s} - ${o}`))}),console.log(a.gray(`${s} ... and ${e.length-i} more`)));else{let o=t.padEnd(16);console.log(a.white(`${s}${o}${c(e)}`))}}static printDerivedSettings(t,e=" "){console.log(""),console.log(a.gray(`${e}Derived settings:`));for(let[r,s]of Object.entries(t))console.log(a.gray(`${e} ${r}: ${s}`));console.log("")}};var h=class u{static getSourceDirectories(t){let e=[],r=["src","lib","app","packages","api"];for(let s of r){let i=p(t,s);m(i)&&V(i).isDirectory()&&e.push(s)}return e}static getCoverageTargets(t){let e=u.getSourceDirectories(t),r=["coverage","coverage/lcov.info","coverage/coverage-final.json",".nyc_output"];for(let s of r){let i=p(t,s);m(i)&&e.push(s)}return e}static getSecurityTargets(t){let e=u.getSourceDirectories(t),r=["package.json","package-lock.json","yarn.lock","pnpm-lock.yaml",".env",".env.example","docker-compose.yml","Dockerfile"];for(let s of r){let i=p(t,s);m(i)&&e.push(s)}return e}static getTestSourceFiles(t){let e=[],r=["src","lib","app","packages"];for(let s of r){let i=p(t,s);m(i)&&V(i).isDirectory()&&(e.push(`${s}/**/*.ts`),e.push(s))}return m(p(t,"src"))&&(e.push("src/services/**/*.ts"),e.push("src/utils/**/*.ts"),e.push("src/components/**/*.tsx")),e}static checkPatternsExist(t){return[p(t,".agentic-qe","patterns"),p(t,".agentic-qe","memory.db"),p(t,".aqe","patterns"),p(t,"data","patterns")].some(r=>m(r))}},f=class{static relativePath(t,e){return P(e,t)||"."}static yesNo(t){return t?"Yes":"No"}static enabledDisabled(t){return t?"Enabled":"Disabled"}static percentage(t){return`${t}%`}static truncatedList(t,e=5){return t.length===0?"(none)":t.length<=e?t.join(", "):`${t.slice(0,e).join(", ")}... and ${t.length-e} more`}};import n from"chalk";import{existsSync as w}from"fs";import{resolve as I}from"path";var d=class{constructor(t){this.defaultValue=t}description;getDefaultValue(){return this.defaultValue}success(t){return{value:t,continue:!0}}cancelled(){return{value:this.defaultValue,continue:!1}}error(t){return{value:this.defaultValue,continue:!1,error:t}}};var y=class extends d{id;stepNumber;title;description;options;validValues;constructor(t){super(t.defaultValue),this.id=t.id,this.stepNumber=t.stepNumber,this.title=t.title,this.description=t.description,this.options=t.options,this.validValues=t.validValues}async execute(t){if(t.nonInteractive)return this.success(this.defaultValue);l.printStepHeader(this.stepNumber,this.title,this.description),this.options.forEach(i=>{let c=[];i.isRecommended?c.push(n.green(" (recommended)")):(i.isDefault||i.value===this.defaultValue)&&c.push(n.green(" (default)")),console.log(n.white(` ${i.key}. ${i.label||i.value}${c.join("")}`)),i.description&&console.log(n.gray(` ${i.description}`))}),console.log("");let r=(await l.prompt(t.rl,`Select ${this.title.toLowerCase()} [${n.gray(String(this.defaultValue))}]: `)).trim();if(!r)return this.success(this.defaultValue);let s=parseInt(r,10);return s>=1&&s<=this.options.length?this.success(this.options[s-1].value):this.validValues.includes(r)?this.success(r):(console.log(n.yellow(` Invalid input, using default: ${this.defaultValue}`)),this.success(this.defaultValue))}},b=class extends d{id;stepNumber;title;description;options;validValues;instructions;allowEmpty;constructor(t){super(t.defaultValue),this.id=t.id,this.stepNumber=t.stepNumber,this.title=t.title,this.description=t.description,this.options=t.options,this.validValues=t.validValues,this.instructions=t.instructions,this.allowEmpty=t.allowEmpty??!1}async execute(t){if(t.nonInteractive)return this.success(this.defaultValue);l.printStepHeader(this.stepNumber,this.title,this.description),this.instructions&&(console.log(n.gray(this.instructions)),console.log("")),this.options.forEach(o=>{let N=o.isDefaultSelected||this.defaultValue.includes(o.value)?n.green(" *"):"";console.log(n.white(` ${o.key}. ${o.label||o.value}${N}`)),o.description&&console.log(n.gray(` ${o.description}`))}),console.log(""),console.log(n.gray(" * = included in default selection")),console.log("");let e=this.defaultValue.join(","),s=(await l.prompt(t.rl,`Select options [${n.gray(e)}]: `)).trim();if(!s)return this.success(this.defaultValue);let i=s.split(",").map(o=>o.trim().toLowerCase()).filter(o=>o.length>0),c=[];for(let o of i){let g=parseInt(o,10);g>=1&&g<=this.options.length?c.push(this.options[g-1].value):this.validValues.includes(o)&&c.push(o)}return c.length===0?this.allowEmpty?this.success([]):(console.log(n.yellow(` Invalid input, using default: ${e}`)),this.success(this.defaultValue)):this.success([...new Set(c)])}},v=class extends d{id;stepNumber;title;description;additionalInfo;constructor(t){super(t.defaultValue),this.id=t.id,this.stepNumber=t.stepNumber,this.title=t.title,this.description=t.description,this.additionalInfo=t.additionalInfo}async execute(t){if(t.nonInteractive)return this.success(this.defaultValue);l.printStepHeader(this.stepNumber,this.title,this.description),this.additionalInfo&&(console.log(n.gray(this.additionalInfo)),console.log(""));let e=this.defaultValue?"Y/n":"y/N",s=(await l.prompt(t.rl,`${this.title}? [${n.gray(e)}]: `)).trim().toLowerCase();return s===""?this.success(this.defaultValue):s==="n"||s==="no"?this.success(!1):s==="y"||s==="yes"?this.success(!0):this.success(this.defaultValue)}},x=class extends d{id;stepNumber;title;description;presets;min;max;constructor(t){super(t.defaultValue),this.id=t.id,this.stepNumber=t.stepNumber,this.title=t.title,this.description=t.description,this.presets=t.presets,this.min=t.min,this.max=t.max}async execute(t){if(t.nonInteractive)return this.success(this.defaultValue);l.printStepHeader(this.stepNumber,this.title,this.description),this.presets&&this.presets.length>0&&(this.presets.forEach(i=>{let c=i.value===this.defaultValue?n.green(" (default)"):"";console.log(n.gray(` ${i.key}. ${i.label}${c}`))}),this.min!==void 0&&this.max!==void 0&&console.log(n.gray(` Or enter a custom number (${this.min}-${this.max})`)),console.log(""));let r=(await l.prompt(t.rl,`${this.title} [${n.gray(String(this.defaultValue))}]: `)).trim();if(!r)return this.success(this.defaultValue);let s=parseInt(r,10);if(this.presets){let i=s;if(i>=1&&i<=this.presets.length)return this.success(this.presets[i-1].value)}return isNaN(s)?(console.log(n.yellow(` Invalid input, using default: ${this.defaultValue}`)),this.success(this.defaultValue)):this.min!==void 0&&s<this.min?(console.log(n.yellow(` Value too low, using minimum: ${this.min}`)),this.success(this.min)):this.max!==void 0&&s>this.max?(console.log(n.yellow(` Value too high, using maximum: ${this.max}`)),this.success(this.max)):this.success(s)}},C=class extends d{id;stepNumber;title;description;examples;suggestionsProvider;validatePath;constructor(t){super(t.defaultValue),this.id=t.id,this.stepNumber=t.stepNumber,this.title=t.title,this.description=t.description,this.examples=t.examples,this.suggestionsProvider=t.suggestionsProvider,this.validatePath=t.validatePath??!0}async execute(t){if(t.nonInteractive){let i=I(t.cwd,this.defaultValue);return this.success(w(i)?i:t.cwd)}if(l.printStepHeader(this.stepNumber,this.title,this.description),this.examples&&(console.log(n.gray(`Examples: ${this.examples}`)),console.log("")),this.suggestionsProvider){let i=this.suggestionsProvider(t.cwd);i.length>0&&(console.log(n.yellow("Detected directories:")),i.slice(0,5).forEach((c,o)=>{console.log(n.gray(` ${o+1}. ${c}`))}),console.log(""))}let r=(await l.prompt(t.rl,`${this.title} [${n.gray(this.defaultValue)}]: `)).trim()||this.defaultValue,s=I(t.cwd,r);return this.validatePath&&!w(s)?(console.log(n.yellow(` Warning: '${r}' does not exist, using current directory.`)),this.success(t.cwd)):this.success(s)}};var T=class extends d{id;stepNumber;title;description;constructor(t){super({}),this.id=t.id,this.stepNumber=t.stepNumber,this.title=t.title,this.description=t.description}async execute(t){if(t.nonInteractive)return this.success({});l.printStepHeader(this.stepNumber,this.title,this.description);let e=await l.prompt(t.rl,`Include patterns [${n.gray("e.g., src/**/*.ts")}]: `),r=await l.prompt(t.rl,`Exclude patterns [${n.gray("e.g., **/*.test.ts,dist/**")}]: `),s={};return e.trim()&&(s.include=e.split(",").map(i=>i.trim()).filter(i=>i.length>0)),r.trim()&&(s.exclude=r.split(",").map(i=>i.trim()).filter(i=>i.length>0)),this.success(s)}};import{createInterface as R}from"readline";import $ from"chalk";var S=class{options;cwd;constructor(t){this.options=t,this.cwd=process.cwd()}async run(){if(this.isNonInteractive())return this.getDefaults();let t=R({input:process.stdin,output:process.stdout});try{this.printHeader();let e={},r=this.getCommands();for(let c of r){let o={rl:t,cwd:this.cwd,results:e,nonInteractive:!1},g=await c.execute(o);if(!g.continue)return this.getCancelled();e[c.id]=g.value}let s=this.buildResult(e);return this.printSummary(s),await this.promptConfirmation(t)?s:this.getCancelled()}finally{t.close()}}printHeader(){l.printWizardHeader(this.getTitle(),this.getSubtitle())}async promptConfirmation(t){console.log("");let r=(await l.prompt(t,`${$.green(this.getConfirmationPrompt())} [${$.gray("Y/n")}]: `)).trim().toLowerCase();return r==="n"||r==="no"?(console.log($.yellow(`
|
|
3
3
|
Wizard cancelled.`)),!1):!0}};export{l as a,h as b,f as c,y as d,b as e,v as f,x as g,C as h,T as i,S as j};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a as te,b as ne}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.10");process.exit(0)}
|
|
2
|
+
import{a as te,b as ne}from"./chunk-X364AIY6.js";import{a as b}from"./chunk-WW5DZ6BU.js";import{b as ee}from"./chunk-TO4NGP3E.js";import{b as E,d as fe}from"./chunk-DG2OYKUQ.js";import{a as k,c as T}from"./chunk-IGRKFVFD.js";var he={M:16,efConstruction:200,efSearch:100},P={enabled:!0,pretrainedPatterns:!0,hnswConfig:he,promotionThreshold:3,qualityThreshold:.7,embeddingModel:"auto"},_={mode:"hybrid",confidenceThreshold:.7,feedbackEnabled:!0,cacheEnabled:!0,cacheTTLMs:300*1e3},F={enabled:["pattern-consolidator","coverage-gap-scanner","flaky-test-detector","routing-accuracy-monitor"],intervals:{"pattern-consolidator":1800*1e3,"coverage-gap-scanner":3600*1e3,"flaky-test-detector":7200*1e3,"routing-accuracy-monitor":900*1e3},maxConcurrent:4,daemonAutoStart:!0},N={claudeCode:!0,preCommit:!1,ciIntegration:!1},$={install:!0,installV2:!0,installV3:!0,overwrite:!1},O={enabled:!0,parameters:["hnsw.efSearch","routing.confidenceThreshold","pattern.promotionThreshold","testGen.complexityLimit"],tuningIntervalMs:10080*60*1e3,evaluationPeriodMs:5e3};var L=["test-generation","test-execution","coverage-analysis","quality-assessment","defect-intelligence","requirements-validation","code-intelligence","security-compliance","contract-testing","visual-accessibility","chaos-resilience","learning-optimization","enterprise-integration"];function M(){return"3.9.10"}function Fe(i,e){return{version:M(),project:{name:i,root:e,type:"single"},learning:P,routing:_,workers:F,hooks:N,skills:$,autoTuning:O,domains:{enabled:L,disabled:[]},agents:{maxConcurrent:15,defaultTimeout:6e4}}}fe();import{readFileSync as w,existsSync as p,statSync as ye,readdirSync as ve}from"fs";import{join as u,basename as ie,extname as re,relative as V}from"path";var ke=[{name:"jest",detect:i=>{let e=["jest.config.js","jest.config.ts","jest.config.mjs","jest.config.cjs"];for(let n of e)if(p(u(i,n)))return{name:"jest",version:A(i,"jest"),configFile:n,confidence:1};let t=S(i);return t?.jest?{name:"jest",version:A(i,"jest"),configFile:"package.json",confidence:.9}:t?.devDependencies?.jest||t?.dependencies?.jest?{name:"jest",version:t.devDependencies?.jest||t.dependencies?.jest,confidence:.7}:null}},{name:"vitest",detect:i=>{let e=["vitest.config.ts","vitest.config.js","vitest.config.mts","vite.config.ts"];for(let n of e)if(p(u(i,n)))return{name:"vitest",version:A(i,"vitest"),configFile:n,confidence:1};let t=S(i);return t?.devDependencies?.vitest||t?.dependencies?.vitest?{name:"vitest",version:t.devDependencies?.vitest,confidence:.8}:null}},{name:"mocha",detect:i=>{let e=[".mocharc.js",".mocharc.json",".mocharc.yaml",".mocharc.yml"];for(let n of e)if(p(u(i,n)))return{name:"mocha",version:A(i,"mocha"),configFile:n,confidence:1};let t=S(i);return t?.devDependencies?.mocha?{name:"mocha",version:t.devDependencies?.mocha,confidence:.8}:null}},{name:"pytest",detect:i=>{let e=["pytest.ini","pyproject.toml","setup.cfg"];for(let n of e){let r=u(i,n);if(p(r))try{let s=w(r,"utf-8");if(s.includes("[pytest]")||s.includes("[tool.pytest]"))return{name:"pytest",configFile:n,confidence:1}}catch(s){console.debug("[ProjectAnalyzer] Config read failed:",s instanceof Error?s.message:s)}}let t=u(i,"requirements.txt");if(p(t))try{if(w(t,"utf-8").includes("pytest"))return{name:"pytest",configFile:"requirements.txt",confidence:.8}}catch(n){console.debug("[ProjectAnalyzer] requirements.txt read failed:",n instanceof Error?n.message:n)}return null}},{name:"playwright",detect:i=>{let e=["playwright.config.ts","playwright.config.js"];for(let n of e)if(p(u(i,n)))return{name:"playwright",version:A(i,"@playwright/test"),configFile:n,confidence:1};let t=S(i);return t?.devDependencies?.["@playwright/test"]?{name:"playwright",version:t.devDependencies["@playwright/test"],confidence:.8}:null}},{name:"cypress",detect:i=>{let e=["cypress.config.ts","cypress.config.js","cypress.json"];for(let t of e)if(p(u(i,t)))return{name:"cypress",version:A(i,"cypress"),configFile:t,confidence:1};return p(u(i,"cypress"))?{name:"cypress",configFile:"cypress/",confidence:.9}:null}}],be=[{name:"typescript",extensions:[".ts",".tsx",".mts",".cts"]},{name:"javascript",extensions:[".js",".jsx",".mjs",".cjs"]},{name:"python",extensions:[".py",".pyw"]},{name:"java",extensions:[".java"]},{name:"go",extensions:[".go"]},{name:"rust",extensions:[".rs"]},{name:"csharp",extensions:[".cs"]},{name:"ruby",extensions:[".rb"]},{name:"php",extensions:[".php"]},{name:"kotlin",extensions:[".kt",".kts"]},{name:"swift",extensions:[".swift"]}];function S(i){let e=u(i,"package.json");if(!p(e))return null;try{return E(w(e,"utf-8"))}catch{return null}}function A(i,e){let t=S(i);if(t)return t.devDependencies?.[e]||t.dependencies?.[e]}function Q(i,e,t={}){let{maxDepth:n=10,exclude:r=["node_modules",".git","dist","build","coverage",".next","__pycache__"]}=t;function s(o,a){if(a>n)return;let l;try{l=ve(o)}catch{return}for(let g of l){if(r.includes(g))continue;let c=u(o,g),x;try{x=ye(c)}catch{continue}x.isDirectory()?s(c,a+1):x.isFile()&&e(c)}}s(i,0)}var W=class{projectRoot;constructor(e){this.projectRoot=e}async analyze(){let e=Date.now(),[t,n,r,s,o]=await Promise.all([this.detectFrameworks(),this.detectLanguages(),this.detectExistingTests(),this.analyzeComplexity(),this.measureCoverage()]);return{projectName:S(this.projectRoot)?.name||ie(this.projectRoot),projectRoot:this.projectRoot,projectType:this.detectProjectType(),frameworks:t,languages:n,existingTests:r,codeComplexity:s,coverage:o,packageManager:this.detectPackageManager(),hasTypeScript:p(u(this.projectRoot,"tsconfig.json")),hasCIConfig:this.detectCIConfig(),ciProvider:this.detectCIProvider(),analysisTimestamp:new Date,analysisDurationMs:Date.now()-e}}async detectFrameworks(){let e=[];for(let t of ke){let n=t.detect(this.projectRoot);n&&e.push(n)}return e.sort((t,n)=>n.confidence-t.confidence)}async detectLanguages(){let e=new Map,t=0;Q(this.projectRoot,r=>{let s=re(r).toLowerCase();if(s){for(let o of be)if(o.extensions.includes(s)){let a=e.get(o.name)||{count:0,extensions:new Set};a.count++,a.extensions.add(s),e.set(o.name,a),t++;break}}});let n=[];for(let[r,s]of e)n.push({name:r,percentage:t>0?Math.round(s.count/t*100):0,fileCount:s.count,extensions:Array.from(s.extensions)});return n.sort((r,s)=>s.fileCount-r.fileCount)}async detectExistingTests(){let e={totalCount:0,byFramework:{},byType:{unit:0,integration:0,e2e:0,unknown:0},directories:[]},t=new Set,n=[/\.test\.[jt]sx?$/,/\.spec\.[jt]sx?$/,/_test\.[jt]sx?$/,/test_.*\.py$/,/.*_test\.py$/,/.*_test\.go$/,/.*Test\.java$/];return Q(this.projectRoot,r=>{let s=ie(r);if(n.some(a=>a.test(s))){e.totalCount++;let a=V(this.projectRoot,r).toLowerCase();a.includes("e2e")||a.includes("cypress")||a.includes("playwright")?e.byType.e2e++:a.includes("integration")||a.includes("int-test")?e.byType.integration++:a.includes("unit")||a.includes("__tests__")||a.includes("test/")?e.byType.unit++:e.byType.unknown++;let l=V(this.projectRoot,u(r,".."));t.add(l)}}),e.directories=Array.from(t).slice(0,10),e}async analyzeComplexity(){let e=[],t=[],n=0,r=0;Q(this.projectRoot,a=>{let l=re(a);if([".ts",".tsx",".js",".jsx",".py",".java",".go"].includes(l))try{let g=w(a,"utf-8"),c=this.calculateFileComplexity(g,l);t.push(...c.functionComplexities),c.maxComplexity>n&&(n=c.maxComplexity),r++,c.maxComplexity>10&&e.push(V(this.projectRoot,a))}catch(g){console.debug("[ProjectAnalyzer] Complexity analysis read failed:",g instanceof Error?g.message:g)}});let s=t.reduce((a,l)=>a+l,0),o=t.length>0?s/t.length:0;return{averageCyclomatic:Math.round(o*10)/10,maxCyclomatic:n,totalFiles:r,complexFiles:e.slice(0,20),recommendation:o<5?"simple":o<15?"medium":"complex"}}calculateFileComplexity(e,t){let n=this.stripCommentsAndStrings(e,t),r=this.calculateComplexity(n);return{functionComplexities:[r],maxComplexity:r}}removeDelimitedBlocks(e,t,n){let r="",s=0;for(;s<e.length;){let o=e.indexOf(t,s);if(o===-1){r+=e.slice(s);break}r+=e.slice(s,o);let a=e.indexOf(n,o+t.length);if(a===-1)break;s=a+n.length}return r}stripCommentsAndStrings(e,t){let n=e;return[".ts",".tsx",".js",".jsx",".java",".go"].includes(t)?(n=n.split(`
|
|
3
3
|
`).map(r=>{let s=r.indexOf("//");return s>=0?r.slice(0,s):r}).join(`
|
|
4
4
|
`),n=this.removeDelimitedBlocks(n,"/*","*/"),n=this.removeDelimitedBlocks(n,"`","`"),n=this.removeDelimitedBlocks(n,'"','"'),n=this.removeDelimitedBlocks(n,"'","'")):t===".py"&&(n=n.split(`
|
|
5
5
|
`).map(r=>{let s=r.indexOf("#");return s>=0?r.slice(0,s):r}).join(`
|
|
6
|
-
`),n=this.removeDelimitedBlocks(n,'"""','"""'),n=this.removeDelimitedBlocks(n,"'''","'''"),n=this.removeDelimitedBlocks(n,'"','"'),n=this.removeDelimitedBlocks(n,"'","'")),n}calculateComplexity(e){let t=1,n=[{pattern:/(?<![a-zA-Z])if\s*\(/g,name:"if"},{pattern:/\bfor\s*\(/g,name:"for"},{pattern:/\bwhile\s*\(/g,name:"while"},{pattern:/\bcase\s+[^:]+:/g,name:"case"},{pattern:/\bcatch\s*\(/g,name:"catch"},{pattern:/&&/g,name:"&&"},{pattern:/\|\|/g,name:"||"},{pattern:/\?[^?:]+:/g,name:"ternary"},{pattern:/\belif\s+/g,name:"elif"},{pattern:/\bexcept\s*(?:\w+)?:/g,name:"except"},{pattern:/\bfor\s+\w+\s+in\s+/g,name:"for-in"},{pattern:/\bselect\s*\{/g,name:"select"}];for(let{pattern:r}of n){let s=e.match(r);s&&(t+=s.length)}return t}async measureCoverage(){let e=["coverage/lcov-report/index.html","coverage/coverage-summary.json","coverage/clover.xml","coverage/lcov.info","htmlcov/index.html"];for(let t of e){let n=u(this.projectRoot,t);if(p(n)){if(t.endsWith(".json"))try{let s=E(w(n,"utf-8")).total||{};return{lines:s.lines?.pct||0,branches:s.branches?.pct||0,functions:s.functions?.pct||0,statements:s.statements?.pct||0,hasReport:!0,reportPath:t}}catch(r){console.debug("[ProjectAnalyzer] Coverage report parse failed:",r instanceof Error?r.message:r)}return{lines:0,branches:0,functions:0,statements:0,hasReport:!0,reportPath:t}}}return{lines:0,branches:0,functions:0,statements:0,hasReport:!1}}detectProjectType(){if(p(u(this.projectRoot,"lerna.json"))||p(u(this.projectRoot,"pnpm-workspace.yaml"))||p(u(this.projectRoot,"packages")))return"monorepo";let e=S(this.projectRoot);return e?.workspaces?"monorepo":e?.main||e?.module||e?.exports?"library":"single"}detectPackageManager(){return p(u(this.projectRoot,"bun.lockb"))?"bun":p(u(this.projectRoot,"pnpm-lock.yaml"))?"pnpm":p(u(this.projectRoot,"yarn.lock"))?"yarn":p(u(this.projectRoot,"package-lock.json"))?"npm":"unknown"}detectCIConfig(){return[".github/workflows",".gitlab-ci.yml","Jenkinsfile",".circleci/config.yml",".travis.yml","azure-pipelines.yml"].some(t=>p(u(this.projectRoot,t)))}detectCIProvider(){if(p(u(this.projectRoot,".github/workflows")))return"github-actions";if(p(u(this.projectRoot,".gitlab-ci.yml")))return"gitlab-ci";if(p(u(this.projectRoot,"Jenkinsfile")))return"jenkins";if(p(u(this.projectRoot,".circleci/config.yml")))return"circleci";if(this.detectCIConfig())return"other"}};function Me(i){return new W(i)}var se=[{name:"typescript-vitest",condition:i=>i.hasTypeScript&&i.frameworks.some(e=>e.name==="vitest"),apply:i=>{i.learning.embeddingModel="transformer",i.routing.confidenceThreshold=.75}},{name:"large-codebase",condition:i=>i.codeComplexity.totalFiles>500,apply:i=>{i.learning.hnswConfig.M=32,i.learning.hnswConfig.efConstruction=400,i.learning.hnswConfig.efSearch=200,i.agents.maxConcurrent=15}},{name:"small-project",condition:i=>i.codeComplexity.totalFiles<50,apply:i=>{i.learning.hnswConfig.M=8,i.learning.hnswConfig.efConstruction=100,i.workers.enabled=["pattern-consolidator","routing-accuracy-monitor"],i.workers.maxConcurrent=2,i.agents.maxConcurrent=5}},{name:"high-complexity",condition:i=>i.codeComplexity.recommendation==="complex",apply:i=>{i.autoTuning.parameters.push("complexity.analysisDepth"),i.domains.enabled=L}},{name:"low-coverage",condition:i=>i.coverage.hasReport&&i.coverage.lines<50,apply:i=>{i.workers.enabled.push("coverage-gap-scanner"),i.workers.intervals["coverage-gap-scanner"]=1800*1e3}},{name:"monorepo",condition:i=>i.projectType==="monorepo",apply:i=>{i.agents.maxConcurrent=15,i.workers.maxConcurrent=6,i.domains.enabled=[...new Set([...i.domains.enabled,"code-intelligence"])]}},{name:"has-e2e",condition:i=>i.frameworks.some(e=>["playwright","cypress"].includes(e.name))||i.existingTests.byType.e2e>0,apply:i=>{i.domains.enabled=[...new Set([...i.domains.enabled,"visual-accessibility","chaos-resilience"])]}},{name:"has-ci",condition:i=>i.hasCIConfig,apply:i=>{i.hooks.ciIntegration=!0,i.domains.enabled=[...new Set([...i.domains.enabled,"quality-assessment"])]}},{name:"github-actions",condition:i=>i.ciProvider==="github-actions",apply:i=>{i.hooks.ciIntegration=!0,i.hooks.claudeCode=!0}},{name:"python-project",condition:i=>i.languages.some(e=>e.name==="python"&&e.percentage>30),apply:i=>{i.routing.mode="hybrid",i.domains.enabled=[...new Set([...i.domains.enabled,"security-compliance"])]}},{name:"java-project",condition:i=>i.languages.some(e=>e.name==="java"&&e.percentage>30),apply:i=>{i.agents.defaultTimeout=12e4}},{name:"no-tests",condition:i=>i.existingTests.totalCount===0,apply:i=>{i.workers.enabled=["pattern-consolidator"],i.learning.qualityThreshold=.5,i.learning.promotionThreshold=2}},{name:"many-tests",condition:i=>i.existingTests.totalCount>500,apply:i=>{i.workers.enabled=[...new Set([...i.workers.enabled,"flaky-test-detector"])],i.domains.enabled=[...new Set([...i.domains.enabled,"test-execution"])]}},{name:"security-focus",condition:i=>i.codeComplexity.totalFiles>100,apply:i=>{i.domains.enabled=[...new Set([...i.domains.enabled,"security-compliance"])]}}],z=class{rules;constructor(e={}){this.rules=e.minimal?se.filter(t=>["typescript-vitest","large-codebase","small-project"].includes(t.name)):[...se,...e.customRules||[]]}recommend(e){let t={version:M(),project:{name:e.projectName,root:e.projectRoot,type:e.projectType==="unknown"?"single":e.projectType},learning:this.recommendLearning(e),routing:this.recommendRouting(e),workers:this.recommendWorkers(e),hooks:this.recommendHooks(e),skills:this.recommendSkills(e),autoTuning:this.recommendAutoTuning(e),domains:{enabled:this.recommendDomains(e),disabled:[]},agents:{maxConcurrent:this.recommendMaxAgents(e),defaultTimeout:6e4}},n=[];for(let r of this.rules)r.condition(e)&&(r.apply(t,e),n.push(r.name));return t.domains.enabled=[...new Set(t.domains.enabled)],t.workers.enabled=[...new Set(t.workers.enabled)],t}getApplicableRules(e){return this.rules.filter(t=>t.condition(e)).map(t=>t.name)}recommendLearning(e){let t={...P};return e.codeComplexity.totalFiles>1e3?t.hnswConfig={M:32,efConstruction:400,efSearch:200}:e.codeComplexity.totalFiles<100&&(t.hnswConfig={M:8,efConstruction:100,efSearch:50}),e.languages.some(n=>["typescript","javascript"].includes(n.name))&&(t.embeddingModel="transformer"),t}recommendRouting(e){let t={..._};return e.codeComplexity.recommendation==="simple"?t.mode="rules":e.codeComplexity.recommendation==="complex"?t.mode="ml":t.mode="hybrid",t}recommendWorkers(e){let t={...F},n=new Set(["pattern-consolidator","routing-accuracy-monitor"]);return(!e.coverage.hasReport||e.coverage.lines<70)&&n.add("coverage-gap-scanner"),e.existingTests.totalCount>100&&n.add("flaky-test-detector"),t.enabled=Array.from(n),e.codeComplexity.totalFiles>500?t.maxConcurrent=6:e.codeComplexity.totalFiles<50&&(t.maxConcurrent=2),t}recommendHooks(e){let t={...N};return t.ciIntegration=e.hasCIConfig,t.preCommit=e.existingTests.totalCount>50,t}recommendSkills(e){let t={...$};return t.install=!0,t.installV2=!0,t.installV3=!0,t}recommendAutoTuning(e){let t={...O};return e.codeComplexity.totalFiles<20&&(t.enabled=!1),t}recommendDomains(e){return["test-generation","test-execution","coverage-analysis","quality-assessment","defect-intelligence","requirements-validation","code-intelligence","security-compliance","contract-testing","visual-accessibility","chaos-resilience","learning-optimization"]}recommendMaxAgents(e){return e.projectType==="monorepo"?15:e.codeComplexity.totalFiles>500?12:e.codeComplexity.totalFiles>100?8:5}};function ze(i){return new z(i)}var xe=[/\baqe\b/i,/\bagentic-qe\b/i,/\bnpx\s+agentic-qe\b/i,/\bnpx\s+@anthropics\/agentic-qe\b/i,/brain-checkpoint\.cjs/i,/\.claude\/helpers\//i];function Se(i){let e=i;return!e?.hooks||!Array.isArray(e.hooks)?!1:e.hooks.some(t=>!t.command||typeof t.command!="string"?!1:xe.some(n=>n.test(t.command)))}function Ue(i,e){let t={};for(let[n,r]of Object.entries(e)){let s=i[n]||[],o=Array.isArray(s)?s.filter(a=>!Se(a)):[];t[n]=[...r,...o]}for(let[n,r]of Object.entries(i))t[n]||(t[n]=r);return t}function He(i){let e=i.domains?.enabled||[];return{AQE_MEMORY_PATH:".agentic-qe/memory.db",AQE_MEMORY_ENABLED:"true",AQE_LEARNING_ENABLED:i.learning?.enabled?"true":"false",AQE_V3_MODE:"true",AQE_V3_DDD_ENABLED:"true",AQE_V3_DOMAINS:e.join(","),AQE_V3_SWARM_SIZE:String(i.agents?.maxConcurrent??15),AQE_V3_TOPOLOGY:"hierarchical",AQE_V3_SUBLINEAR_ENABLED:"true",AQE_V3_HNSW_ENABLED:i.learning?.hnswConfig?"true":"false",AQE_V3_HOOKS_ENABLED:"true",AQE_V3_AISP_ENABLED:"true",AQE_V3_REASONING_BANK:".agentic-qe/memory.db",AQE_V3_PATTERN_PROMOTION_THRESHOLD:String(i.learning?.promotionThreshold??3),AQE_V3_SUCCESS_RATE_THRESHOLD:String(i.learning?.qualityThreshold??.7)}}function Be(i,e){let t=i.domains?.enabled||[];return{aqe:{version:i.version??"3.0.0",initialized:new Date().toISOString(),hooksConfigured:!0},statusLine:{type:"command",command:`sh -c 'node "\${CLAUDE_PROJECT_DIR:-.}/.claude/helpers/statusline-v3.cjs" 2>/dev/null || echo "\u258A Agentic QE v3"'`,refreshMs:5e3,enabled:!0},_aqePermissions:["Bash(npx agentic-qe:*)","Bash(npx @anthropics/agentic-qe:*)","mcp__agentic-qe__*"],includeCoAuthoredBy:!0,v3Configuration:{domains:{total:t.length,names:t},swarm:{totalAgents:i.agents?.maxConcurrent??15,topology:"hierarchical",coordination:"queen-led"}},v3Learning:{enabled:i.learning?.enabled??!0,reasoningBank:{dbPath:".agentic-qe/memory.db",enableHNSW:!!i.learning?.hnswConfig},patternPromotion:{threshold:i.learning?.promotionThreshold??3,successRateMin:i.learning?.qualityThreshold??.7}}}}T();import{existsSync as h,mkdirSync as j,readdirSync as R,statSync as G,readFileSync as Ae,writeFileSync as Ce,copyFileSync as we,unlinkSync as De,rmdirSync as je}from"fs";import{join as m}from"path";var U=["qe-test-generation","qe-test-execution","qe-coverage-analysis","qe-quality-assessment","qe-defect-intelligence","qe-requirements-validation","qe-code-intelligence","pentest-validation","qe-visual-accessibility","qe-chaos-resilience","qe-learning-optimization","qe-iterative-loop","strict-tdd","no-skip","coverage-guard","freeze-tests","security-watch","skill-stats","test-failure-investigator","coverage-drop-investigator","e2e-flow-verifier","test-metrics-dashboard"],H=["v3-core-implementation","v3-cli-modernization","v3-ddd-architecture","v3-integration-deep","v3-mcp-optimization","v3-memory-unification","v3-performance-optimization","v3-security-overhaul","v3-swarm-coordination","v3-qe-core-implementation","v3-qe-ddd-architecture","v3-qe-cli","v3-qe-memory-system","v3-qe-performance","v3-qe-security","v3-qe-mcp","v3-qe-mcp-optimization","v3-qe-memory-unification","v3-qe-integration","v3-qe-agentic-flow-integration","v3-qe-fleet-coordination","agentdb-advanced","agentdb-learning","agentdb-memory-patterns","agentdb-optimization","agentdb-vector-search","github-code-review","github-multi-repo","github-project-management","github-release-management","github-workflow-automation","flow-nexus-neural","flow-nexus-platform","flow-nexus-swarm","reasoningbank-agentdb","reasoningbank-intelligence","swarm-orchestration","swarm-advanced","sparc-methodology","hooks-automation","hive-mind-advanced","stream-chain","agentic-jujutsu","iterative-loop","performance-analysis","skill-builder","qe-agentic-flow-integration","release"],Re=["qe-contract-testing","qe-security-compliance","aqe-v2-v3-migration"],B=class{projectRoot;options;sourceSkillsDir;constructor(e){this.projectRoot=e.projectRoot,this.options={installV2Skills:!0,installV3Skills:!0,overwrite:!1,exclude:[],include:void 0,...e},this.sourceSkillsDir=this.findSourceSkillsDir()}findSourceSkillsDir(){let e=b(import.meta.url),t=[];e&&(t.push(m(e,"assets/skills")),t.push(m(e,".claude/skills"))),t.push(m(this.projectRoot,"node_modules/agentic-qe/assets/skills"));for(let n of t)if(h(n))return n;return t[0]}async install(){let e={installed:[],skipped:[],removed:[],errors:[],totalCount:0,skillsDir:m(this.projectRoot,".claude","skills"),validationInstalled:!1};if(!h(this.sourceSkillsDir))return e.errors.push(`Source skills directory not found: ${this.sourceSkillsDir}`),e;let t=m(this.projectRoot,".claude","skills");h(t)||j(t,{recursive:!0});let n=this.getAvailableSkills();e.totalCount=n.length;let r=this.filterSkills(n);for(let s of r)try{let o=await this.installSkill(s,t);o?e.installed.push(o):e.skipped.push(s)}catch(o){e.errors.push(`Failed to install ${s}: ${k(o)}`)}return this.options.overwrite&&(e.removed=this.removeDeprecatedSkills(t)),e.validationInstalled=this.installValidationInfrastructure(t),await this.createSkillsIndex(t,e.installed),e}installValidationInfrastructure(e){let t=m(this.sourceSkillsDir,".validation"),n=m(e,".validation");if(!h(t))return console.debug("[SkillsInstaller] Validation infrastructure not found in source"),!1;if(h(n)&&!this.options.overwrite)return console.debug("[SkillsInstaller] Validation infrastructure already exists, skipping"),!0;try{return h(n)||j(n,{recursive:!0}),this.copyDirectoryRecursive(t,n),console.debug("[SkillsInstaller] Validation infrastructure installed successfully"),!0}catch(r){return console.error("[SkillsInstaller] Failed to install validation infrastructure:",r instanceof Error?r.message:r),!1}}removeDeprecatedSkills(e){let t=[];for(let n of Re){let r=m(e,n);if(h(r))try{this.removeDirectoryRecursive(r),t.push(n)}catch(s){console.error(`[SkillsInstaller] Failed to remove deprecated skill ${n}:`,s instanceof Error?s.message:s)}}return t.length>0&&console.debug(`[SkillsInstaller] Removed ${t.length} deprecated skills: ${t.join(", ")}`),t}removeDirectoryRecursive(e){let t=R(e,{withFileTypes:!0});for(let n of t){let r=m(e,n.name);n.isDirectory()?this.removeDirectoryRecursive(r):De(r)}je(e)}getAvailableSkills(){try{return R(this.sourceSkillsDir).filter(t=>{let n=m(this.sourceSkillsDir,t);return G(n).isDirectory()&&!t.startsWith(".")})}catch{return[]}}filterSkills(e){let t=e;return t=t.filter(n=>!H.includes(n)),this.options.include&&this.options.include.length>0&&(t=t.filter(n=>this.options.include.includes(n))),this.options.exclude&&this.options.exclude.length>0&&(t=t.filter(n=>!this.options.exclude.some(r=>n.includes(r)||n.match(new RegExp(r))))),this.options.installV3Skills||(t=t.filter(n=>!U.includes(n))),this.options.installV2Skills||(t=t.filter(n=>U.includes(n))),t}async installSkill(e,t){let n=m(this.sourceSkillsDir,e),r=m(t,e);if(h(r)&&!this.options.overwrite)return null;h(r)||j(r,{recursive:!0}),this.copyDirectoryRecursive(n,r);let s=this.getSkillType(e),o=this.getSkillDescription(r),a=h(m(r,"resources"));return{name:e,type:s,description:o,hasResources:a}}copyDirectoryRecursive(e,t){let n=R(e);for(let r of n){let s=m(e,r),o=m(t,r);G(s).isDirectory()?(h(o)||j(o,{recursive:!0}),this.copyDirectoryRecursive(s,o)):we(s,o)}}getSkillType(e){return U.includes(e)?"v3-domain":"v2-methodology"}getSkillDescription(e){let t=m(e,"SKILL.md");if(h(t))try{let n=Ae(t,"utf-8"),r=n.match(/description:\s*["']?([^"'\n]+)["']?/i);if(r)return r[1].trim();let s=n.split(`
|
|
6
|
+
`),n=this.removeDelimitedBlocks(n,'"""','"""'),n=this.removeDelimitedBlocks(n,"'''","'''"),n=this.removeDelimitedBlocks(n,'"','"'),n=this.removeDelimitedBlocks(n,"'","'")),n}calculateComplexity(e){let t=1,n=[{pattern:/(?<![a-zA-Z])if\s*\(/g,name:"if"},{pattern:/\bfor\s*\(/g,name:"for"},{pattern:/\bwhile\s*\(/g,name:"while"},{pattern:/\bcase\s+[^:]+:/g,name:"case"},{pattern:/\bcatch\s*\(/g,name:"catch"},{pattern:/&&/g,name:"&&"},{pattern:/\|\|/g,name:"||"},{pattern:/\?[^?:]+:/g,name:"ternary"},{pattern:/\belif\s+/g,name:"elif"},{pattern:/\bexcept\s*(?:\w+)?:/g,name:"except"},{pattern:/\bfor\s+\w+\s+in\s+/g,name:"for-in"},{pattern:/\bselect\s*\{/g,name:"select"}];for(let{pattern:r}of n){let s=e.match(r);s&&(t+=s.length)}return t}async measureCoverage(){let e=["coverage/lcov-report/index.html","coverage/coverage-summary.json","coverage/clover.xml","coverage/lcov.info","htmlcov/index.html"];for(let t of e){let n=u(this.projectRoot,t);if(p(n)){if(t.endsWith(".json"))try{let s=E(w(n,"utf-8")).total||{};return{lines:s.lines?.pct||0,branches:s.branches?.pct||0,functions:s.functions?.pct||0,statements:s.statements?.pct||0,hasReport:!0,reportPath:t}}catch(r){console.debug("[ProjectAnalyzer] Coverage report parse failed:",r instanceof Error?r.message:r)}return{lines:0,branches:0,functions:0,statements:0,hasReport:!0,reportPath:t}}}return{lines:0,branches:0,functions:0,statements:0,hasReport:!1}}detectProjectType(){if(p(u(this.projectRoot,"lerna.json"))||p(u(this.projectRoot,"pnpm-workspace.yaml"))||p(u(this.projectRoot,"packages")))return"monorepo";let e=S(this.projectRoot);return e?.workspaces?"monorepo":e?.main||e?.module||e?.exports?"library":"single"}detectPackageManager(){return p(u(this.projectRoot,"bun.lockb"))?"bun":p(u(this.projectRoot,"pnpm-lock.yaml"))?"pnpm":p(u(this.projectRoot,"yarn.lock"))?"yarn":p(u(this.projectRoot,"package-lock.json"))?"npm":"unknown"}detectCIConfig(){return[".github/workflows",".gitlab-ci.yml","Jenkinsfile",".circleci/config.yml",".travis.yml","azure-pipelines.yml"].some(t=>p(u(this.projectRoot,t)))}detectCIProvider(){if(p(u(this.projectRoot,".github/workflows")))return"github-actions";if(p(u(this.projectRoot,".gitlab-ci.yml")))return"gitlab-ci";if(p(u(this.projectRoot,"Jenkinsfile")))return"jenkins";if(p(u(this.projectRoot,".circleci/config.yml")))return"circleci";if(this.detectCIConfig())return"other"}};function Me(i){return new W(i)}var se=[{name:"typescript-vitest",condition:i=>i.hasTypeScript&&i.frameworks.some(e=>e.name==="vitest"),apply:i=>{i.learning.embeddingModel="transformer",i.routing.confidenceThreshold=.75}},{name:"large-codebase",condition:i=>i.codeComplexity.totalFiles>500,apply:i=>{i.learning.hnswConfig.M=32,i.learning.hnswConfig.efConstruction=400,i.learning.hnswConfig.efSearch=200,i.agents.maxConcurrent=15}},{name:"small-project",condition:i=>i.codeComplexity.totalFiles<50,apply:i=>{i.learning.hnswConfig.M=8,i.learning.hnswConfig.efConstruction=100,i.workers.enabled=["pattern-consolidator","routing-accuracy-monitor"],i.workers.maxConcurrent=2,i.agents.maxConcurrent=5}},{name:"high-complexity",condition:i=>i.codeComplexity.recommendation==="complex",apply:i=>{i.autoTuning.parameters.push("complexity.analysisDepth"),i.domains.enabled=L}},{name:"low-coverage",condition:i=>i.coverage.hasReport&&i.coverage.lines<50,apply:i=>{i.workers.enabled.push("coverage-gap-scanner"),i.workers.intervals["coverage-gap-scanner"]=1800*1e3}},{name:"monorepo",condition:i=>i.projectType==="monorepo",apply:i=>{i.agents.maxConcurrent=15,i.workers.maxConcurrent=6,i.domains.enabled=[...new Set([...i.domains.enabled,"code-intelligence"])]}},{name:"has-e2e",condition:i=>i.frameworks.some(e=>["playwright","cypress"].includes(e.name))||i.existingTests.byType.e2e>0,apply:i=>{i.domains.enabled=[...new Set([...i.domains.enabled,"visual-accessibility","chaos-resilience"])]}},{name:"has-ci",condition:i=>i.hasCIConfig,apply:i=>{i.hooks.ciIntegration=!0,i.domains.enabled=[...new Set([...i.domains.enabled,"quality-assessment"])]}},{name:"github-actions",condition:i=>i.ciProvider==="github-actions",apply:i=>{i.hooks.ciIntegration=!0,i.hooks.claudeCode=!0}},{name:"python-project",condition:i=>i.languages.some(e=>e.name==="python"&&e.percentage>30),apply:i=>{i.routing.mode="hybrid",i.domains.enabled=[...new Set([...i.domains.enabled,"security-compliance"])]}},{name:"java-project",condition:i=>i.languages.some(e=>e.name==="java"&&e.percentage>30),apply:i=>{i.agents.defaultTimeout=12e4}},{name:"no-tests",condition:i=>i.existingTests.totalCount===0,apply:i=>{i.workers.enabled=["pattern-consolidator"],i.learning.qualityThreshold=.5,i.learning.promotionThreshold=2}},{name:"many-tests",condition:i=>i.existingTests.totalCount>500,apply:i=>{i.workers.enabled=[...new Set([...i.workers.enabled,"flaky-test-detector"])],i.domains.enabled=[...new Set([...i.domains.enabled,"test-execution"])]}},{name:"security-focus",condition:i=>i.codeComplexity.totalFiles>100,apply:i=>{i.domains.enabled=[...new Set([...i.domains.enabled,"security-compliance"])]}}],z=class{rules;constructor(e={}){this.rules=e.minimal?se.filter(t=>["typescript-vitest","large-codebase","small-project"].includes(t.name)):[...se,...e.customRules||[]]}recommend(e){let t={version:M(),project:{name:e.projectName,root:e.projectRoot,type:e.projectType==="unknown"?"single":e.projectType},learning:this.recommendLearning(e),routing:this.recommendRouting(e),workers:this.recommendWorkers(e),hooks:this.recommendHooks(e),skills:this.recommendSkills(e),autoTuning:this.recommendAutoTuning(e),domains:{enabled:this.recommendDomains(e),disabled:[]},agents:{maxConcurrent:this.recommendMaxAgents(e),defaultTimeout:6e4}},n=[];for(let r of this.rules)r.condition(e)&&(r.apply(t,e),n.push(r.name));return t.domains.enabled=[...new Set(t.domains.enabled)],t.workers.enabled=[...new Set(t.workers.enabled)],t}getApplicableRules(e){return this.rules.filter(t=>t.condition(e)).map(t=>t.name)}recommendLearning(e){let t={...P};return e.codeComplexity.totalFiles>1e3?t.hnswConfig={M:32,efConstruction:400,efSearch:200}:e.codeComplexity.totalFiles<100&&(t.hnswConfig={M:8,efConstruction:100,efSearch:50}),e.languages.some(n=>["typescript","javascript"].includes(n.name))&&(t.embeddingModel="transformer"),t}recommendRouting(e){let t={..._};return e.codeComplexity.recommendation==="simple"?t.mode="rules":e.codeComplexity.recommendation==="complex"?t.mode="ml":t.mode="hybrid",t}recommendWorkers(e){let t={...F},n=new Set(["pattern-consolidator","routing-accuracy-monitor"]);return(!e.coverage.hasReport||e.coverage.lines<70)&&n.add("coverage-gap-scanner"),e.existingTests.totalCount>100&&n.add("flaky-test-detector"),t.enabled=Array.from(n),e.codeComplexity.totalFiles>500?t.maxConcurrent=6:e.codeComplexity.totalFiles<50&&(t.maxConcurrent=2),t}recommendHooks(e){let t={...N};return t.ciIntegration=e.hasCIConfig,t.preCommit=e.existingTests.totalCount>50,t}recommendSkills(e){let t={...$};return t.install=!0,t.installV2=!0,t.installV3=!0,t}recommendAutoTuning(e){let t={...O};return e.codeComplexity.totalFiles<20&&(t.enabled=!1),t}recommendDomains(e){return["test-generation","test-execution","coverage-analysis","quality-assessment","defect-intelligence","requirements-validation","code-intelligence","security-compliance","contract-testing","visual-accessibility","chaos-resilience","learning-optimization"]}recommendMaxAgents(e){return e.projectType==="monorepo"?15:e.codeComplexity.totalFiles>500?12:e.codeComplexity.totalFiles>100?8:5}};function ze(i){return new z(i)}var xe=[/\baqe\b/i,/\bagentic-qe\b/i,/\bnpx\s+agentic-qe\b/i,/\bnpx\s+@anthropics\/agentic-qe\b/i,/brain-checkpoint\.cjs/i,/\.claude\/helpers\//i];function Se(i){let e=i;return!e?.hooks||!Array.isArray(e.hooks)?!1:e.hooks.some(t=>!t.command||typeof t.command!="string"?!1:xe.some(n=>n.test(t.command)))}function Ue(i,e){let t={};for(let[n,r]of Object.entries(e)){let s=i[n]||[],o=Array.isArray(s)?s.filter(a=>!Se(a)):[];t[n]=[...r,...o]}for(let[n,r]of Object.entries(i))t[n]||(t[n]=r);return t}function He(i){let e=i.domains?.enabled||[];return{AQE_MEMORY_PATH:".agentic-qe/memory.db",AQE_MEMORY_ENABLED:"true",AQE_LEARNING_ENABLED:i.learning?.enabled?"true":"false",AQE_V3_MODE:"true",AQE_V3_DDD_ENABLED:"true",AQE_V3_DOMAINS:e.join(","),AQE_V3_SWARM_SIZE:String(i.agents?.maxConcurrent??15),AQE_V3_TOPOLOGY:"hierarchical",AQE_V3_SUBLINEAR_ENABLED:"true",AQE_V3_HNSW_ENABLED:i.learning?.hnswConfig?"true":"false",AQE_V3_HOOKS_ENABLED:"true",AQE_V3_AISP_ENABLED:"true",AQE_V3_REASONING_BANK:".agentic-qe/memory.db",AQE_V3_PATTERN_PROMOTION_THRESHOLD:String(i.learning?.promotionThreshold??3),AQE_V3_SUCCESS_RATE_THRESHOLD:String(i.learning?.qualityThreshold??.7)}}function Be(i,e){let t=i.domains?.enabled||[];return{aqe:{version:i.version??"3.0.0",initialized:new Date().toISOString(),hooksConfigured:!0},statusLine:{type:"command",command:`sh -c 'node "\${CLAUDE_PROJECT_DIR:-.}/.claude/helpers/statusline-v3.cjs" 2>/dev/null || echo "\u258A Agentic QE v3"'`,refreshMs:5e3,enabled:!0},_aqePermissions:["Bash(npx agentic-qe:*)","Bash(npx @anthropics/agentic-qe:*)","mcp__agentic-qe__*"],includeCoAuthoredBy:!0,v3Configuration:{domains:{total:t.length,names:t},swarm:{totalAgents:i.agents?.maxConcurrent??15,topology:"hierarchical",coordination:"queen-led"}},v3Learning:{enabled:i.learning?.enabled??!0,reasoningBank:{dbPath:".agentic-qe/memory.db",enableHNSW:!!i.learning?.hnswConfig},patternPromotion:{threshold:i.learning?.promotionThreshold??3,successRateMin:i.learning?.qualityThreshold??.7}}}}T();import{existsSync as h,mkdirSync as j,readdirSync as R,statSync as G,readFileSync as Ae,writeFileSync as Ce,copyFileSync as we,unlinkSync as De,rmdirSync as je}from"fs";import{join as m}from"path";var U=["qe-test-generation","qe-test-execution","qe-coverage-analysis","qe-quality-assessment","qe-defect-intelligence","qe-requirements-validation","qe-code-intelligence","qe-browser","pentest-validation","qe-visual-accessibility","qe-chaos-resilience","qe-learning-optimization","qe-iterative-loop","strict-tdd","no-skip","coverage-guard","freeze-tests","security-watch","skill-stats","test-failure-investigator","coverage-drop-investigator","e2e-flow-verifier","test-metrics-dashboard"],H=["v3-core-implementation","v3-cli-modernization","v3-ddd-architecture","v3-integration-deep","v3-mcp-optimization","v3-memory-unification","v3-performance-optimization","v3-security-overhaul","v3-swarm-coordination","v3-qe-core-implementation","v3-qe-ddd-architecture","v3-qe-cli","v3-qe-memory-system","v3-qe-performance","v3-qe-security","v3-qe-mcp","v3-qe-mcp-optimization","v3-qe-memory-unification","v3-qe-integration","v3-qe-agentic-flow-integration","v3-qe-fleet-coordination","agentdb-advanced","agentdb-learning","agentdb-memory-patterns","agentdb-optimization","agentdb-vector-search","github-code-review","github-multi-repo","github-project-management","github-release-management","github-workflow-automation","flow-nexus-neural","flow-nexus-platform","flow-nexus-swarm","reasoningbank-agentdb","reasoningbank-intelligence","swarm-orchestration","swarm-advanced","sparc-methodology","hooks-automation","hive-mind-advanced","stream-chain","agentic-jujutsu","iterative-loop","performance-analysis","skill-builder","qe-agentic-flow-integration","release"],Re=["qe-contract-testing","qe-security-compliance","aqe-v2-v3-migration"],B=class{projectRoot;options;sourceSkillsDir;constructor(e){this.projectRoot=e.projectRoot,this.options={installV2Skills:!0,installV3Skills:!0,overwrite:!1,exclude:[],include:void 0,...e},this.sourceSkillsDir=this.findSourceSkillsDir()}findSourceSkillsDir(){let e=b(import.meta.url),t=[];e&&(t.push(m(e,"assets/skills")),t.push(m(e,".claude/skills"))),t.push(m(this.projectRoot,"node_modules/agentic-qe/assets/skills"));for(let n of t)if(h(n))return n;return t[0]}async install(){let e={installed:[],skipped:[],removed:[],errors:[],totalCount:0,skillsDir:m(this.projectRoot,".claude","skills"),validationInstalled:!1};if(!h(this.sourceSkillsDir))return e.errors.push(`Source skills directory not found: ${this.sourceSkillsDir}`),e;let t=m(this.projectRoot,".claude","skills");h(t)||j(t,{recursive:!0});let n=this.getAvailableSkills();e.totalCount=n.length;let r=this.filterSkills(n);for(let s of r)try{let o=await this.installSkill(s,t);o?e.installed.push(o):e.skipped.push(s)}catch(o){e.errors.push(`Failed to install ${s}: ${k(o)}`)}return this.options.overwrite&&(e.removed=this.removeDeprecatedSkills(t)),e.validationInstalled=this.installValidationInfrastructure(t),await this.createSkillsIndex(t,e.installed),e}installValidationInfrastructure(e){let t=m(this.sourceSkillsDir,".validation"),n=m(e,".validation");if(!h(t))return console.debug("[SkillsInstaller] Validation infrastructure not found in source"),!1;if(h(n)&&!this.options.overwrite)return console.debug("[SkillsInstaller] Validation infrastructure already exists, skipping"),!0;try{return h(n)||j(n,{recursive:!0}),this.copyDirectoryRecursive(t,n),console.debug("[SkillsInstaller] Validation infrastructure installed successfully"),!0}catch(r){return console.error("[SkillsInstaller] Failed to install validation infrastructure:",r instanceof Error?r.message:r),!1}}removeDeprecatedSkills(e){let t=[];for(let n of Re){let r=m(e,n);if(h(r))try{this.removeDirectoryRecursive(r),t.push(n)}catch(s){console.error(`[SkillsInstaller] Failed to remove deprecated skill ${n}:`,s instanceof Error?s.message:s)}}return t.length>0&&console.debug(`[SkillsInstaller] Removed ${t.length} deprecated skills: ${t.join(", ")}`),t}removeDirectoryRecursive(e){let t=R(e,{withFileTypes:!0});for(let n of t){let r=m(e,n.name);n.isDirectory()?this.removeDirectoryRecursive(r):De(r)}je(e)}getAvailableSkills(){try{return R(this.sourceSkillsDir).filter(t=>{let n=m(this.sourceSkillsDir,t);return G(n).isDirectory()&&!t.startsWith(".")})}catch{return[]}}filterSkills(e){let t=e;return t=t.filter(n=>!H.includes(n)),this.options.include&&this.options.include.length>0&&(t=t.filter(n=>this.options.include.includes(n))),this.options.exclude&&this.options.exclude.length>0&&(t=t.filter(n=>!this.options.exclude.some(r=>n.includes(r)||n.match(new RegExp(r))))),this.options.installV3Skills||(t=t.filter(n=>!U.includes(n))),this.options.installV2Skills||(t=t.filter(n=>U.includes(n))),t}async installSkill(e,t){let n=m(this.sourceSkillsDir,e),r=m(t,e);if(h(r)&&!this.options.overwrite)return null;h(r)||j(r,{recursive:!0}),this.copyDirectoryRecursive(n,r);let s=this.getSkillType(e),o=this.getSkillDescription(r),a=h(m(r,"resources"));return{name:e,type:s,description:o,hasResources:a}}copyDirectoryRecursive(e,t){let n=R(e);for(let r of n){let s=m(e,r),o=m(t,r);G(s).isDirectory()?(h(o)||j(o,{recursive:!0}),this.copyDirectoryRecursive(s,o)):we(s,o)}}getSkillType(e){return U.includes(e)?"v3-domain":"v2-methodology"}getSkillDescription(e){let t=m(e,"SKILL.md");if(h(t))try{let n=Ae(t,"utf-8"),r=n.match(/description:\s*["']?([^"'\n]+)["']?/i);if(r)return r[1].trim();let s=n.split(`
|
|
7
7
|
`);for(let o of s){let a=o.trim();if(a&&!a.startsWith("#")&&!a.startsWith("-")&&!a.startsWith("```"))return a.slice(0,100)+(a.length>100?"...":"")}}catch(n){console.debug("[SkillsInstaller] Failed to read skill description:",n instanceof Error?n.message:n)}}async createSkillsIndex(e,t){let n=this.scanSkillsDirectory(e),r=n.filter(c=>!H.includes(c.name)),s=r.filter(c=>c.type==="v2-methodology"),o=r.filter(c=>c.type==="v3-domain"),a=n.filter(c=>H.includes(c.name)),l=h(m(e,".validation")),g=`# AQE Skills Index
|
|
8
8
|
|
|
9
9
|
This directory contains Quality Engineering skills managed by Agentic QE.
|
|
@@ -54,7 +54,7 @@ See \`.validation/README.md\` for usage instructions.
|
|
|
54
54
|
---
|
|
55
55
|
|
|
56
56
|
*Generated by AQE v3 init on ${new Date().toISOString()}*
|
|
57
|
-
`;Ce(m(e,"README.md"),g,"utf-8")}scanSkillsDirectory(e){let t=[];try{let n=R(e);for(let r of n){if(r.startsWith("."))continue;let s=m(e,r);if(!G(s).isDirectory())continue;let o=m(s,"SKILL.md");if(!h(o))continue;let a=this.getSkillType(r),l=this.getSkillDescription(s),g=h(m(s,"resources"));t.push({name:r,type:a,description:l,hasResources:g})}}catch(n){console.debug("[SkillsInstaller] Failed to scan skills directory:",n instanceof Error?n.message:n)}return t.sort((n,r)=>n.name.localeCompare(r.name))}};function
|
|
57
|
+
`;Ce(m(e,"README.md"),g,"utf-8")}scanSkillsDirectory(e){let t=[];try{let n=R(e);for(let r of n){if(r.startsWith("."))continue;let s=m(e,r);if(!G(s).isDirectory())continue;let o=m(s,"SKILL.md");if(!h(o))continue;let a=this.getSkillType(r),l=this.getSkillDescription(s),g=h(m(s,"resources"));t.push({name:r,type:a,description:l,hasResources:g})}}catch(n){console.debug("[SkillsInstaller] Failed to scan skills directory:",n instanceof Error?n.message:n)}return t.sort((n,r)=>n.name.localeCompare(r.name))}};function et(i){return new B(i)}T();import{existsSync as f,mkdirSync as D,readdirSync as K,statSync as oe,readFileSync as ae,writeFileSync as le,copyFileSync as J}from"fs";import{join as d}from"path";function Ie(i){let e=new Date().toISOString().slice(0,10),t=i.match(/^---\n([\s\S]*?)\n---/);if(!t)return i;let n=t[1],r;return/^updated:/m.test(n)?r=n.replace(/^updated:.*$/m,`updated: ${e}`):/^created:/m.test(n)?r=n.replace(/^(created:.*$)/m,`$1
|
|
58
58
|
updated: ${e}`):r=n+`
|
|
59
59
|
updated: ${e}`,i.replace(/^---\n[\s\S]*?\n---/,`---
|
|
60
60
|
${r}
|
|
@@ -105,7 +105,7 @@ ${r.map(l=>`- **${l.name}**${l.description?`: ${l.description}`:""}`).join(`
|
|
|
105
105
|
---
|
|
106
106
|
|
|
107
107
|
*Generated by AQE v3 init on ${new Date().toISOString()}*
|
|
108
|
-
`,a=d(this.projectRoot,".claude","docs");f(a)||D(a,{recursive:!0}),le(d(a,"v3-agents-index.md"),o,"utf-8")}};function
|
|
108
|
+
`,a=d(this.projectRoot,".claude","docs");f(a)||D(a,{recursive:!0}),le(d(a,"v3-agents-index.md"),o,"utf-8")}};function gt(i){return new Y(i)}T();import{existsSync as v,mkdirSync as Z,readdirSync as ce,readFileSync as Ee,writeFileSync as Pe,copyFileSync as ge}from"fs";import{join as y}from"path";var ue={core:[{name:"workflow-executor",filename:"n8n-workflow-executor.md",category:"core"},{name:"node-validator",filename:"n8n-node-validator.md",category:"core"},{name:"trigger-test",filename:"n8n-trigger-test.md",category:"core"},{name:"expression-validator",filename:"n8n-expression-validator.md",category:"core"},{name:"integration-test",filename:"n8n-integration-test.md",category:"core"},{name:"security-auditor",filename:"n8n-security-auditor.md",category:"core"}],advanced:[{name:"unit-tester",filename:"n8n-unit-tester.md",category:"advanced"},{name:"performance-tester",filename:"n8n-performance-tester.md",category:"advanced"},{name:"ci-orchestrator",filename:"n8n-ci-orchestrator.md",category:"advanced"}],quality:[{name:"version-comparator",filename:"n8n-version-comparator.md",category:"quality"},{name:"bdd-scenario-tester",filename:"n8n-bdd-scenario-tester.md",category:"quality"},{name:"monitoring-validator",filename:"n8n-monitoring-validator.md",category:"quality"}],enterprise:[{name:"compliance-validator",filename:"n8n-compliance-validator.md",category:"enterprise"},{name:"chaos-tester",filename:"n8n-chaos-tester.md",category:"enterprise"}],reliability:[{name:"base-agent",filename:"n8n-base-agent.md",category:"reliability"}]},_e=["n8n-expression-testing","n8n-integration-testing-patterns","n8n-security-testing","n8n-trigger-testing-strategies","n8n-workflow-testing-fundamentals"],X=class{projectRoot;options;sourceAgentsDir;sourceSkillsDir;constructor(e){this.projectRoot=e.projectRoot,this.options={installAgents:!0,installSkills:!0,overwrite:!1,...e},this.sourceAgentsDir=this.findSourceAgentsDir(),this.sourceSkillsDir=this.findSourceSkillsDir()}findSourceAgentsDir(){let e=b(import.meta.url),t=[];e&&t.push(y(e,".claude/agents/n8n")),t.push(y(this.projectRoot,"node_modules/agentic-qe/.claude/agents/n8n"));for(let n of t)if(v(n))return n;return t[0]}findSourceSkillsDir(){let e=b(import.meta.url),t=[];e&&(t.push(y(e,"assets/skills")),t.push(y(e,".claude/skills"))),t.push(y(this.projectRoot,"node_modules/agentic-qe/assets/skills"));for(let n of t)if(v(n))return n;return t[0]}async install(){let e={success:!0,agentsInstalled:[],skillsInstalled:[],configGenerated:!1,errors:[],agentsDir:y(this.projectRoot,".claude/agents/n8n"),skillsDir:y(this.projectRoot,".claude/skills")};try{if(this.options.installAgents){let t=await this.installAgents(e.agentsDir);e.agentsInstalled=t.installed,e.errors.push(...t.errors)}if(this.options.installSkills){let t=await this.installSkills(e.skillsDir);e.skillsInstalled=t.installed,e.errors.push(...t.errors)}this.options.n8nApiConfig&&(e.configGenerated=!0),e.agentsInstalled.length>0&&this.createAgentsIndex(e.agentsDir,e.agentsInstalled)}catch(t){e.success=!1,e.errors.push(`Installation failed: ${k(t)}`)}return e}async installAgents(e){let t=[],n=[];if(v(e)||Z(e,{recursive:!0}),!v(this.sourceAgentsDir))return n.push(`Source agents directory not found: ${this.sourceAgentsDir}`),{installed:t,errors:n};let r=ce(this.sourceAgentsDir).filter(s=>s.endsWith(".md"));for(let s of Object.keys(ue))for(let o of ue[s]){let a=y(this.sourceAgentsDir,o.filename),l=y(e,o.filename);if(r.includes(o.filename)&&!(v(l)&&!this.options.overwrite))try{ge(a,l);let c=Ee(a,"utf-8").match(/description:\s*["']?(.+?)["']?\n/);o.description=c?.[1]||`n8n ${o.name} agent`,t.push(o)}catch(g){n.push(`Failed to install ${o.name}: ${k(g)}`)}}return{installed:t,errors:n}}async installSkills(e){let t=[],n=[];if(v(e)||Z(e,{recursive:!0}),!v(this.sourceSkillsDir))return n.push(`Source skills directory not found: ${this.sourceSkillsDir}`),{installed:t,errors:n};for(let r of _e){let s=y(this.sourceSkillsDir,r),o=y(e,r);if(v(s)&&!(v(o)&&!this.options.overwrite))try{this.copyDirectory(s,o),t.push(r)}catch(a){n.push(`Failed to install skill ${r}: ${k(a)}`)}}return{installed:t,errors:n}}copyDirectory(e,t){v(t)||Z(t,{recursive:!0});let n=ce(e,{withFileTypes:!0});for(let r of n){let s=y(e,r.name),o=y(t,r.name);r.isDirectory()?this.copyDirectory(s,o):ge(s,o)}}createAgentsIndex(e,t){let n=y(e,"README.md"),r={core:t.filter(o=>o.category==="core"),advanced:t.filter(o=>o.category==="advanced"),quality:t.filter(o=>o.category==="quality"),enterprise:t.filter(o=>o.category==="enterprise"),reliability:t.filter(o=>o.category==="reliability")},s=`# N8n Testing Agents
|
|
109
109
|
|
|
110
110
|
> Auto-generated by \`aqe init --with-n8n\`
|
|
111
111
|
|
|
@@ -177,4 +177,4 @@ N8n agents map to v3 domains:
|
|
|
177
177
|
- Compliance agents \u2192 security-compliance domain
|
|
178
178
|
- Chaos agents \u2192 chaos-resilience domain
|
|
179
179
|
|
|
180
|
-
`}};function
|
|
180
|
+
`}};function yt(i){return new X(i)}export{M as a,Fe as b,Me as c,ze as d,Se as e,Ue as f,He as g,Be as h,et as i,gt as j,yt as k};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.10");process.exit(0)}
|
|
2
2
|
var l=["var-to-const","add-types","remove-console","promise-to-async","cjs-to-esm","func-to-arrow"],p={"var-to-const":{type:"var-to-const",name:"Var to Const/Let",description:"Convert var declarations to const (if not reassigned) or let (if reassigned)",complexity:"simple",wasmAvailable:!0,typicalLatencyMs:1},"add-types":{type:"add-types",name:"Add TypeScript Types",description:"Add TypeScript type annotations to function parameters and return types",complexity:"moderate",wasmAvailable:!0,typicalLatencyMs:5},"remove-console":{type:"remove-console",name:"Remove Console Statements",description:"Remove all console.log, console.warn, console.error, etc. statements",complexity:"simple",wasmAvailable:!0,typicalLatencyMs:1},"promise-to-async":{type:"promise-to-async",name:"Promise to Async/Await",description:"Convert Promise .then()/.catch() chains to async/await syntax",complexity:"complex",wasmAvailable:!0,typicalLatencyMs:10},"cjs-to-esm":{type:"cjs-to-esm",name:"CommonJS to ES Modules",description:"Convert require() calls to import statements and module.exports to export",complexity:"moderate",wasmAvailable:!0,typicalLatencyMs:5},"func-to-arrow":{type:"func-to-arrow",name:"Function to Arrow",description:"Convert function declarations and expressions to arrow functions",complexity:"moderate",wasmAvailable:!0,typicalLatencyMs:3}},u={enabled:!0,fallbackToLLM:!0,confidenceThreshold:.7,transforms:[],maxFileSizeBytes:1024*1024,timeoutMs:5e3,cacheEnabled:!0,cacheTtlMs:300*1e3},t=class extends Error{constructor(e,s,o){super(e);this.code=s;this.cause=o;this.name="AgentBoosterError"}},a=class extends t{constructor(e,s,o){super(e,"TRANSFORM_ERROR",o);this.transformType=s;this.name="TransformError"}},i=class extends t{constructor(r="WASM module is not available",e){super(r,"WASM_UNAVAILABLE",e),this.name="WasmUnavailableError"}},c=class extends t{constructor(e,s,o){super(e,"TRANSFORM_TIMEOUT");this.transformType=s;this.timeoutMs=o;this.name="TransformTimeoutError"}},m=class extends t{constructor(e,s,o){super(`File ${e} is too large (${s} bytes, max ${o} bytes)`,"FILE_TOO_LARGE");this.filePath=e;this.sizeBytes=s;this.maxSizeBytes=o;this.name="FileTooLargeError"}};export{l as a,p as b,u as c,a as d,i as e,c as f,m as g};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{h as s,k as o,m as c,o as m}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.10");process.exit(0)}
|
|
2
|
+
import{h as s,k as o,m as c,o as m}from"./chunk-URXG7FMO.js";import{a,c as d}from"./chunk-IGRKFVFD.js";import{a as r,e as l}from"./chunk-UBT7VCKQ.js";d();m();l();var u={dbPath:s.dbPath,walMode:!0,mmapSize:r.MMAP_SIZE_BYTES,cacheSize:r.CACHE_SIZE_KB,busyTimeout:r.BUSY_TIMEOUT_MS},n=class e{static instance=null;static instancePromise=null;unifiedMemory=null;config;initialized=!1;initPromise=null;constructor(i){this.config={...u,...i}}static getInstance(i){return e.instance||(e.instance=new e(i)),e.instance}static async getInstanceAsync(i){return e.instance?.initialized?e.instance:(e.instancePromise||(e.instancePromise=(async()=>{let t=e.getInstance(i);return await t.initialize(),t})()),e.instancePromise)}static resetInstance(){e.instance&&(e.instance.close(),e.instance=null),e.instancePromise=null,c()}async initialize(){if(!this.initialized)return this.initPromise||(this.initPromise=this._doInitialize()),this.initPromise}async _doInitialize(){if(!this.initialized)try{let i={dbPath:this.config.dbPath,walMode:this.config.walMode,busyTimeout:this.config.busyTimeout,mmapSize:this.config.mmapSize,cacheSize:this.config.cacheSize};this.unifiedMemory=o(i),await this.unifiedMemory.initialize(),this.initialized=!0,console.log(`[UnifiedPersistence] Initialized via UnifiedMemoryManager: ${this.config.dbPath}`)}catch(i){throw this.initPromise=null,new Error(`Failed to initialize UnifiedPersistenceManager: ${a(i)}`)}}getDatabase(){if(!this.unifiedMemory||!this.initialized)throw new Error("UnifiedPersistenceManager not initialized");return this.unifiedMemory.getDatabase()}isInitialized(){return this.initialized}getDbPath(){return this.config.dbPath}prepare(i,t){if(!this.unifiedMemory)throw new Error("Database not initialized");return this.unifiedMemory.prepare(i,t)}transaction(i){if(!this.unifiedMemory)throw new Error("Database not initialized");return this.unifiedMemory.transaction(i)}getStats(){if(!this.unifiedMemory)throw new Error("Database not initialized");let i=this.unifiedMemory.getStats();return{tables:i.tables,fileSize:i.fileSize,walSize:i.walSize}}vacuum(){this.getDatabase().exec("VACUUM")}checkpoint(){this.getDatabase().pragma("wal_checkpoint(TRUNCATE)")}close(){this.initialized=!1,console.log("[UnifiedPersistence] Facade closed")}};function g(e){return n.getInstance(e)}async function U(e){let i=g(e);return await i.initialize(),i}function z(){n.resetInstance()}var f=!1;function h(){if(f)return;f=!0;let e=()=>{try{let i=n.instance;i&&i.close()}catch(i){console.debug("[UnifiedPersistence] Cleanup error:",i instanceof Error?i.message:i)}};process.on("beforeExit",e),process.on("SIGINT",()=>{e(),process.exit(0)}),process.on("SIGTERM",()=>{e(),process.exit(0)})}h();export{u as a,n as b,g as c,U as d,z as e};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.10");process.exit(0)}
|
|
2
2
|
import{existsSync as _,readdirSync as d,statSync as w}from"fs";import{join as i,extname as E}from"path";var T=new Set([".ts",".tsx",".js",".jsx",".mjs",".cjs",".py",".pyw",".go",".rs",".java",".kt",".kts",".rb",".cs",".php",".swift",".c",".h",".cpp",".hpp",".cc",".scala"]),v=[".test.",".spec.","_test.","_spec."],b=new Set(["node_modules","dist","build","coverage",".git","__pycache__",".venv","venv",".tox",".mypy_cache","target",".gradle","vendor",".bundle",".next",".nuxt",".output"]);function O(s,p={}){let{maxDepth:f=6,includeTests:m=!1,testsOnly:x=!1,extraExtensions:S=[]}=p;if(!_(s))return[];let o=w(s);if(o.isFile())return[s];if(!o.isDirectory())return[];let y=new Set(S.map(t=>t.startsWith(".")?t:`.${t}`)),n=[];function r(t,c){if(c>f)return;let a;try{a=d(t,{withFileTypes:!0})}catch{return}for(let e of a)if(e.isDirectory()){if(b.has(e.name))continue;r(i(t,e.name),c+1)}else if(e.isFile()){let u=E(e.name).toLowerCase();if(!(T.has(u)||y.has(u))||e.name.endsWith(".d.ts"))continue;let l=v.some(h=>e.name.includes(h))||e.name.startsWith("test_");x?l&&n.push(i(t,e.name)):(m||!l)&&n.push(i(t,e.name))}}return r(s,0),n}export{T as a,O as b};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.10");process.exit(0)}
|
|
2
|
+
function o(r,t,n){let e=new Error(r);return e.name="LLMError",e.code=t,e.provider=n?.provider,e.model=n?.model,e.retryable=n?.retryable??!1,e.retryAfterMs=n?.retryAfterMs,e.cause=n?.cause,e}function i(r){return r instanceof Error&&"code"in r&&typeof r.code=="string"}export{o as a,i as b};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.10");process.exit(0)}
|
|
2
|
+
import{k as f,o as P}from"./chunk-URXG7FMO.js";import{d as p,e as y}from"./chunk-WLX57ULC.js";import{b as h,d as U}from"./chunk-DG2OYKUQ.js";import{a as T,c as C}from"./chunk-IGRKFVFD.js";P();C();U();y();import{randomUUID as v}from"crypto";var M=p("TokenTracker"),S={costPerInputToken:.003/1e3,costPerOutputToken:.015/1e3},I={filePath:".agentic-qe/token-metrics.json",autoSaveIntervalMs:6e4,maxMetricsInMemory:1e4},m=class u{taskMetrics=[];agentMetrics=new Map;domainMetrics=new Map;sessionId;sessionStartTime;costConfig;cacheHits=0;earlyExits=0;totalTokensSaved=0;totalPatternsReused=0;initialized=!1;persistenceConfig=I;autoSaveTimer=null;isDirty=!1;db=null;kvPersistCount=0;static KV_NAMESPACE="token-usage-metrics";static KV_KEY="token-tracker-snapshot";static KV_TTL=604800;static KV_PERSIST_INTERVAL=10;constructor(){this.sessionId=`session-${Date.now()}-${v().substring(0,8)}`,this.sessionStartTime=Date.now(),this.costConfig=S}initialize(t){this.initialized||(this.initialized=!0,t&&(this.costConfig={...S,...t}),this.initializeDb().catch(e=>{M.warn("DB initialization failed",{error:e instanceof Error?e.message:String(e)})}),this.startAutoSave())}setCostConfig(t){this.costConfig={...this.costConfig,...t}}recordTokenUsage(t,e,n,a,s,r){this.ensureInitialized();let c,d,i,o,l,k;typeof e=="object"?(c="default",d="unknown",i="unknown",o=e,l=!1,k=0):(c=e,d=n??"unknown",i=a??"unknown",o=s,l=r?.patternReused??!1,k=r?.tokensSaved??0),o.estimatedCostUsd===void 0&&(o.estimatedCostUsd=this.calculateCost(o));let g={taskId:t,agentId:c,domain:d,operation:i,timestamp:Date.now(),usage:o,patternReused:l,tokensSaved:k};this.taskMetrics.push(g),this.updateAgentMetrics(c,o,l,k),this.updateDomainMetrics(d,o),l&&this.totalPatternsReused++,k>0&&(this.totalTokensSaved+=k),this.isDirty=!0,this.maybePersistToKv()}recordPatternReuse(t,e){this.ensureInitialized(),this.totalPatternsReused++,this.totalTokensSaved+=e;let n={taskId:t,agentId:"pattern-cache",domain:"optimization",operation:"pattern-reuse",timestamp:Date.now(),usage:{inputTokens:0,outputTokens:0,totalTokens:0,estimatedCostUsd:0},patternReused:!0,tokensSaved:e};this.taskMetrics.push(n),this.isDirty=!0}recordCacheHit(t){this.cacheHits++,this.totalTokensSaved+=t,this.isDirty=!0}recordEarlyExit(t){this.earlyExits++,this.totalTokensSaved+=t,this.isDirty=!0}getSessionSummary(t){this.ensureInitialized();let e=this.filterByTimeframe(this.taskMetrics,t),n=this.aggregateTokenUsage(e),a=new Map;for(let i of e){let o=a.get(i.agentId);o?(o.totalInputTokens+=i.usage.inputTokens,o.totalOutputTokens+=i.usage.outputTokens,o.totalTokens+=i.usage.totalTokens,o.totalCost+=i.usage.estimatedCostUsd||0,o.tasksExecuted++,i.patternReused&&o.patternsReused++,o.estimatedTokensSaved+=i.tokensSaved||0):a.set(i.agentId,{agentId:i.agentId,totalInputTokens:i.usage.inputTokens,totalOutputTokens:i.usage.outputTokens,totalTokens:i.usage.totalTokens,totalCost:i.usage.estimatedCostUsd||0,tasksExecuted:1,patternsReused:i.patternReused?1:0,estimatedTokensSaved:i.tokensSaved||0})}let s=new Map;for(let i of e){let o=s.get(i.domain);o?(o.inputTokens+=i.usage.inputTokens,o.outputTokens+=i.usage.outputTokens,o.totalTokens+=i.usage.totalTokens,o.estimatedCostUsd=(o.estimatedCostUsd||0)+(i.usage.estimatedCostUsd||0)):s.set(i.domain,{...i.usage})}let r=n.totalTokens,c=this.totalTokensSaved,d=r+c>0?c/(r+c)*100:0;return{sessionId:this.sessionId,startTime:this.sessionStartTime,endTime:Date.now(),byAgent:a,byDomain:s,totalUsage:n,optimizationStats:{patternsReused:this.totalPatternsReused,cacheHits:this.cacheHits,earlyExits:this.earlyExits,tokensSaved:this.totalTokensSaved,savingsPercentage:Math.round(d*100)/100}}}getAgentMetrics(t,e){this.ensureInitialized();let n=this.filterByTimeframe(this.taskMetrics,e);if(t){let s=n.filter(r=>r.agentId===t);return this.aggregateAgentMetrics(t,s)}let a=new Map;for(let s of n){let r=a.get(s.agentId)||[];r.push(s),a.set(s.agentId,r)}return Array.from(a.entries()).map(([s,r])=>this.aggregateAgentMetrics(s,r))}getDomainMetrics(t,e){this.ensureInitialized();let n=this.filterByTimeframe(this.taskMetrics,e);if(t){let s=n.filter(r=>r.domain===t);return this.aggregateTokenUsage(s)}let a=new Map;for(let s of n){let r=a.get(s.domain);r?(r.inputTokens+=s.usage.inputTokens,r.outputTokens+=s.usage.outputTokens,r.totalTokens+=s.usage.totalTokens,r.estimatedCostUsd=(r.estimatedCostUsd||0)+(s.usage.estimatedCostUsd||0)):a.set(s.domain,{...s.usage})}return a}getTaskMetrics(t){return this.ensureInitialized(),this.filterByTimeframe(this.taskMetrics,t)}getEfficiencyReport(t){return this.getTokenEfficiency(t)}getTokenEfficiency(t){this.ensureInitialized();let e=this.filterByTimeframe(this.taskMetrics,t),a=this.aggregateTokenUsage(e).totalTokens,s=this.totalTokensSaved,r=a+s>0?s/(a+s)*100:0,c=e.length,d=c>0?e.filter(l=>l.patternReused).length/c:0,i=c>0?a/c:0,o=this.generateRecommendations(e);return{totalTokensUsed:a,totalTokensSaved:s,savingsPercentage:Math.round(r*100)/100,patternReuseRate:Math.round(d*100)/100,averageTokensPerTask:Math.round(i),recommendations:o}}reset(){this.stopAutoSave(),this.taskMetrics=[],this.agentMetrics.clear(),this.domainMetrics.clear(),this.sessionId=`session-${Date.now()}-${v().substring(0,8)}`,this.sessionStartTime=Date.now(),this.cacheHits=0,this.earlyExits=0,this.totalTokensSaved=0,this.totalPatternsReused=0,this.isDirty=!1}configurePersistence(t){this.persistenceConfig={...this.persistenceConfig,...t},t.autoSaveIntervalMs!==void 0&&(this.stopAutoSave(),t.autoSaveIntervalMs>0&&this.startAutoSave())}startAutoSave(){this.autoSaveTimer||this.persistenceConfig.autoSaveIntervalMs>0&&(this.autoSaveTimer=setInterval(()=>{this.isDirty&&this.save().catch(t=>{console.warn("[TokenMetricsCollector] Auto-save failed:",t)})},this.persistenceConfig.autoSaveIntervalMs))}stopAutoSave(){this.autoSaveTimer&&(clearInterval(this.autoSaveTimer),this.autoSaveTimer=null)}async save(){let t=await import("fs"),e=await import("path"),n={version:"1.0.0",sessionId:this.sessionId,sessionStartTime:this.sessionStartTime,taskMetrics:this.taskMetrics.slice(-this.persistenceConfig.maxMetricsInMemory),optimizationStats:{cacheHits:this.cacheHits,earlyExits:this.earlyExits,totalTokensSaved:this.totalTokensSaved,totalPatternsReused:this.totalPatternsReused},lastSavedAt:Date.now()},a=e.resolve(this.persistenceConfig.filePath),s=e.dirname(a);t.existsSync(s)||t.mkdirSync(s,{recursive:!0}),t.writeFileSync(a,JSON.stringify(n,null,2)),this.isDirty=!1}async load(){let t=await import("fs"),n=(await import("path")).resolve(this.persistenceConfig.filePath);if(!t.existsSync(n))return!1;try{let a=t.readFileSync(n,"utf-8"),s=h(a);if(!s.version||!s.version.startsWith("1."))return console.warn("[TokenMetricsCollector] Incompatible data version, skipping load"),!1;let r=s.taskMetrics||[];this.taskMetrics=[...r,...this.taskMetrics],this.cacheHits+=s.optimizationStats?.cacheHits||0,this.earlyExits+=s.optimizationStats?.earlyExits||0,this.totalTokensSaved+=s.optimizationStats?.totalTokensSaved||0,this.totalPatternsReused+=s.optimizationStats?.totalPatternsReused||0;for(let c of r)this.updateAgentMetrics(c.agentId,c.usage,c.patternReused,c.tokensSaved||0),this.updateDomainMetrics(c.domain,c.usage);return this.taskMetrics.length>this.persistenceConfig.maxMetricsInMemory&&(this.taskMetrics=this.taskMetrics.slice(-this.persistenceConfig.maxMetricsInMemory)),!0}catch(a){return console.warn("[TokenMetricsCollector] Failed to load persisted data:",a),!1}}getPersistenceFilePath(){return this.persistenceConfig.filePath}hasUnsavedChanges(){return this.isDirty}async initializeDb(){try{this.db=f(),this.db.isInitialized()||await this.db.initialize(),await this.loadFromKv()}catch(t){console.warn("[TokenMetricsCollector] DB init failed, using memory-only:",T(t)),this.db=null}}async persistToKv(){if(!this.db)return;let t={version:"1.0.0",sessionId:this.sessionId,sessionStartTime:this.sessionStartTime,taskMetrics:this.taskMetrics.slice(-this.persistenceConfig.maxMetricsInMemory),optimizationStats:{cacheHits:this.cacheHits,earlyExits:this.earlyExits,totalTokensSaved:this.totalTokensSaved,totalPatternsReused:this.totalPatternsReused},lastSavedAt:Date.now()};await this.db.kvSet(u.KV_KEY,t,u.KV_NAMESPACE,u.KV_TTL)}async loadFromKv(){if(!this.db)return!1;let t=await this.db.kvGet(u.KV_KEY,u.KV_NAMESPACE);if(!t)return!1;if(!t.version||!t.version.startsWith("1."))return console.warn("[TokenMetricsCollector] Incompatible kv_store data version, skipping load"),!1;let e=t.taskMetrics||[];this.taskMetrics=[...e,...this.taskMetrics],this.cacheHits+=t.optimizationStats?.cacheHits||0,this.earlyExits+=t.optimizationStats?.earlyExits||0,this.totalTokensSaved+=t.optimizationStats?.totalTokensSaved||0,this.totalPatternsReused+=t.optimizationStats?.totalPatternsReused||0;for(let n of e)this.updateAgentMetrics(n.agentId,n.usage,n.patternReused,n.tokensSaved||0),this.updateDomainMetrics(n.domain,n.usage);return this.taskMetrics.length>this.persistenceConfig.maxMetricsInMemory&&(this.taskMetrics=this.taskMetrics.slice(-this.persistenceConfig.maxMetricsInMemory)),!0}maybePersistToKv(){this.kvPersistCount++,this.kvPersistCount>=u.KV_PERSIST_INTERVAL&&(this.kvPersistCount=0,this.persistToKv().catch(t=>{M.warn("KV persist failed",{error:t instanceof Error?t.message:String(t)})}))}ensureInitialized(){this.initialized||this.initialize()}calculateCost(t){let e=t.inputTokens*this.costConfig.costPerInputToken,n=t.outputTokens*this.costConfig.costPerOutputToken;return Math.round((e+n)*1e5)/1e5}filterByTimeframe(t,e){if(!e)return t;let n=Date.now(),a;switch(e){case"1h":a=n-3600*1e3;break;case"24h":a=n-1440*60*1e3;break;case"7d":a=n-10080*60*1e3;break;case"30d":a=n-720*60*60*1e3;break;default:return t}return t.filter(s=>s.timestamp>=a)}aggregateTokenUsage(t){let e=0,n=0,a=0,s=0;for(let r of t)e+=r.usage.inputTokens,n+=r.usage.outputTokens,a+=r.usage.totalTokens,s+=r.usage.estimatedCostUsd||0;return{inputTokens:e,outputTokens:n,totalTokens:a,estimatedCostUsd:Math.round(s*1e5)/1e5}}aggregateAgentMetrics(t,e){let n=0,a=0,s=0,r=0,c=0,d=0;for(let i of e)n+=i.usage.inputTokens,a+=i.usage.outputTokens,s+=i.usage.totalTokens,r+=i.usage.estimatedCostUsd||0,i.patternReused&&c++,d+=i.tokensSaved||0;return{agentId:t,totalInputTokens:n,totalOutputTokens:a,totalTokens:s,totalCost:Math.round(r*1e5)/1e5,tasksExecuted:e.length,patternsReused:c,estimatedTokensSaved:d}}updateAgentMetrics(t,e,n,a){let s=this.agentMetrics.get(t);s?(s.totalInputTokens+=e.inputTokens,s.totalOutputTokens+=e.outputTokens,s.totalTokens+=e.totalTokens,s.totalCost+=e.estimatedCostUsd||0,s.tasksExecuted++,n&&s.patternsReused++,s.estimatedTokensSaved+=a):this.agentMetrics.set(t,{agentId:t,totalInputTokens:e.inputTokens,totalOutputTokens:e.outputTokens,totalTokens:e.totalTokens,totalCost:e.estimatedCostUsd||0,tasksExecuted:1,patternsReused:n?1:0,estimatedTokensSaved:a})}updateDomainMetrics(t,e){let n=this.domainMetrics.get(t);n?(n.inputTokens+=e.inputTokens,n.outputTokens+=e.outputTokens,n.totalTokens+=e.totalTokens,n.estimatedCostUsd=(n.estimatedCostUsd||0)+(e.estimatedCostUsd||0)):this.domainMetrics.set(t,{...e})}generateRecommendations(t){let e=[];if(t.length===0)return["No token usage data available yet. Start executing tasks to track consumption."];let n=t.filter(i=>i.patternReused).length/t.length;n<.2?e.push("Low pattern reuse rate detected. Consider enabling pattern caching for similar tasks."):n>.5&&e.push("Good pattern reuse rate. Continue leveraging cached patterns for token savings.");let a=new Map;for(let i of t){let o=a.get(i.domain)||0;a.set(i.domain,o+i.usage.totalTokens)}let s=Array.from(a.entries()).sort((i,o)=>o[1]-i[1]);if(s.length>0){let i=s[0];e.push(`Highest token consumer: ${i[0]} (${i[1].toLocaleString()} tokens). Consider optimizing prompts or increasing caching.`)}let r=t.reduce((i,o)=>i+o.usage.inputTokens,0);return t.reduce((i,o)=>i+o.usage.outputTokens,0)/(r||1)>2&&e.push("High output-to-input token ratio. Consider requesting more concise responses."),this.cacheHits===0&&t.length>10&&e.push("No cache hits detected. Enable response caching to reduce duplicate API calls."),this.earlyExits===0&&t.length>20&&e.push("Early exit optimization not utilized. Enable high-confidence pattern matching to skip unnecessary LLM calls."),e}};function b(u){return u.toLocaleString("en-US")}function z(u){if(process.env.AQE_TOKEN_DASHBOARD_ENABLED==="false")return"Token dashboard disabled (AQE_TOKEN_DASHBOARD_ENABLED=false)";if(!u){let d=E.getSessionSummary(),i=d.totalUsage.totalTokens,o=d.totalUsage.estimatedCostUsd??0,l=d.optimizationStats.tokensSaved,k=i>0?o/i:0,g=l*k;u={totalTokens:i,totalCostUsd:o,savedTokens:l,savedCostUsd:g}}let t=u.totalTokens??0,e=u.totalCostUsd??0,n=u.savedTokens??0,a=u.savedCostUsd??0,s=u.budgetLimitUsd;if(t===0&&n===0)return"Token Dashboard: No data available";let r=`Token Usage: ${b(t)} tokens ($${e.toFixed(2)})`;n>0&&(r+=` | Saved: ${b(n)} tokens ($${a.toFixed(2)}) via pattern reuse`);let c=[];if(s!==void 0&&s>0){let d=Math.round(e/s*100);c.push(`Budget: $${e.toFixed(2)} / $${s.toFixed(2)} (${d}%)`)}if(u.tierSplit&&Object.keys(u.tierSplit).length>0){let d=Object.entries(u.tierSplit).sort((i,o)=>o[1]-i[1]).map(([i,o])=>`${i} ${o}%`);c.push(`Tier split: ${d.join(" | ")}`)}return c.length===0?r:`${r}
|
|
3
|
+
${c.join(" | ")}`}var E=new m;function $(u){return`$${u.toFixed(2)}`}export{z as a,E as b,$ as c};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{c as r}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.10");process.exit(0)}
|
|
2
|
+
import{c as r}from"./chunk-335CCAOL.js";function o(n){return n instanceof Error?n.message:String(n)}function e(n){return n instanceof Error?n:new Error(String(n))}var t=r(()=>{"use strict"});export{o as a,e as b,t as c};
|