agentic-qe 3.13.4 → 3.13.5
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/helpers/.helpers-version +1 -1
- package/.claude/helpers/auto-memory-hook.mjs +430 -430
- package/.claude/helpers/helpers.manifest.json +6 -6
- package/.claude/helpers/hook-handler.cjs +565 -565
- package/.claude/helpers/intelligence.cjs +1058 -1058
- package/.claude/helpers/statusline.cjs +1022 -968
- package/CHANGELOG.md +48 -0
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/cli/bundle.js +5 -5
- package/dist/cli/chunks/adapter-QGJAFSG5.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-PR3RQWXF.js → agent-booster-wasm-XDKGG2GP.js} +2 -2
- package/dist/cli/chunks/{agent-handler-J5EPFBSZ.js → agent-handler-CTPXGR5P.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-CCHI6QAA.js → agent-memory-branch-MG5OV7AY.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-ZU735SG7.js +2 -0
- package/dist/cli/chunks/{arena-KMKBGSMY.js → arena-FAHVOHNG.js} +2 -2
- package/dist/cli/chunks/{arena-SI7IPVZ3.js → arena-NYO4EUNQ.js} +4 -4
- package/dist/cli/chunks/{audit-ZDKR3HT6.js → audit-6544RL5D.js} +3 -3
- package/dist/cli/chunks/base-EKTX2PRE.js +2 -0
- package/dist/cli/chunks/{hnswlib-node-BP5CZGMD.js → better-sqlite3-MTEONNCQ.js} +2 -2
- package/dist/cli/chunks/{brain-handler-MSYMTM5B.js → brain-handler-DPKCUQUC.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-FRAHCBTO.js → branch-enumerator-SU2KHC2C.js} +2 -2
- package/dist/cli/chunks/{browser-4KHKVNYC.js → browser-ITDN72YJ.js} +2 -2
- package/dist/cli/chunks/browser-workflow-BUPIMI3E.js +2 -0
- package/dist/cli/chunks/{chunk-NAAPL2HK.js → chunk-23AO43XW.js} +1 -1
- package/dist/cli/chunks/{chunk-7YAHECC5.js → chunk-2CF3XZAS.js} +2 -2
- package/dist/cli/chunks/{chunk-RLZZTFEN.js → chunk-2KPGJ4LO.js} +2 -2
- package/dist/cli/chunks/{chunk-NW4YPUPN.js → chunk-2QI3OJAC.js} +3 -3
- package/dist/cli/chunks/{chunk-WUXCL65V.js → chunk-2RZ2S6YR.js} +2 -2
- package/dist/cli/chunks/{chunk-Y7VWCP35.js → chunk-2XZWYKXQ.js} +1 -1
- package/dist/cli/chunks/{chunk-RCRKCMN5.js → chunk-3EWWP3AO.js} +1 -1
- package/dist/cli/chunks/{chunk-6CZUQA4G.js → chunk-3XKCC7LE.js} +1 -1
- package/dist/cli/chunks/chunk-42KQE5H6.js +12 -0
- package/dist/cli/chunks/{chunk-EPSF2ERW.js → chunk-43BXSNKU.js} +2 -2
- package/dist/cli/chunks/{chunk-Z7FVGJYC.js → chunk-4E2NA2GY.js} +2 -2
- package/dist/cli/chunks/{chunk-E7FCVH32.js → chunk-4Z7JP7CD.js} +2 -2
- package/dist/cli/chunks/{chunk-LUAYTM77.js → chunk-54C3OHES.js} +1 -1
- package/dist/cli/chunks/{chunk-RKNKFLCQ.js → chunk-557BFPDB.js} +2 -2
- package/dist/cli/chunks/{chunk-27FWRWOB.js → chunk-5I5KMIFY.js} +2 -2
- package/dist/cli/chunks/{chunk-N57M7UPQ.js → chunk-5YIGAWBO.js} +2 -2
- package/dist/cli/chunks/{chunk-LEIG3KIG.js → chunk-64GTU5LR.js} +2 -2
- package/dist/cli/chunks/{chunk-CQP6BDSF.js → chunk-6BEMH5K5.js} +1 -1
- package/dist/cli/chunks/{chunk-GOHWEQEP.js → chunk-6H3I36DL.js} +2 -2
- package/dist/cli/chunks/{chunk-AROPZPNG.js → chunk-6L5V3JGJ.js} +1 -1
- package/dist/cli/chunks/{chunk-55E62F4T.js → chunk-6RV3W2UZ.js} +1 -1
- package/dist/cli/chunks/{chunk-KDICUKYX.js → chunk-6ZCAZ3TR.js} +2 -2
- package/dist/cli/chunks/{chunk-HGY62IYZ.js → chunk-74QRMQFR.js} +2 -2
- package/dist/cli/chunks/{chunk-PFQLB4XP.js → chunk-76OWM3ZO.js} +2 -2
- package/dist/cli/chunks/{chunk-YZGA4ELM.js → chunk-7A4EXSMN.js} +2 -2
- package/dist/cli/chunks/{chunk-ZAT65V6I.js → chunk-7BLXINIL.js} +2 -2
- package/dist/cli/chunks/{chunk-2Q73TQUQ.js → chunk-7LR4VP2I.js} +1 -1
- package/dist/cli/chunks/{chunk-27REOPQK.js → chunk-7M4X6WTF.js} +2 -2
- package/dist/cli/chunks/{chunk-A2G26WU4.js → chunk-7PHF2JM3.js} +1 -1
- package/dist/cli/chunks/{chunk-L3UTZEVW.js → chunk-7SQXEYII.js} +2 -2
- package/dist/cli/chunks/{chunk-DQ247474.js → chunk-AAGOBPIJ.js} +2 -2
- package/dist/cli/chunks/{chunk-UAEP2ZUQ.js → chunk-AJYJFIKO.js} +2 -2
- package/dist/cli/chunks/{chunk-VLELNETG.js → chunk-AKYOY5KR.js} +2 -2
- package/dist/cli/chunks/{chunk-XBSBVPSM.js → chunk-AKZ6PWHM.js} +2 -2
- package/dist/cli/chunks/{chunk-FBXWU37F.js → chunk-APMLMLSL.js} +1 -1
- package/dist/cli/chunks/{chunk-SQCACQUM.js → chunk-AX4XIG4G.js} +2 -2
- package/dist/cli/chunks/{chunk-OU2YHXJY.js → chunk-BAJK26EI.js} +2 -2
- package/dist/cli/chunks/{chunk-SPTCNM45.js → chunk-BI6OTPC6.js} +2 -2
- package/dist/cli/chunks/chunk-BKI5NFQ5.js +2 -0
- package/dist/cli/chunks/{chunk-PI55PHUL.js → chunk-BUN4WBPW.js} +2 -2
- package/dist/cli/chunks/{chunk-JDADACZZ.js → chunk-BX5MY65W.js} +1 -1
- package/dist/cli/chunks/{chunk-XEI5LLHX.js → chunk-CD4YWKJ2.js} +2 -2
- package/dist/cli/chunks/{chunk-LJSHQU2P.js → chunk-CHFZHORO.js} +5 -5
- package/dist/cli/chunks/{chunk-SJ26ZR75.js → chunk-CPIAZGHF.js} +2 -2
- package/dist/cli/chunks/{chunk-EUIUWZF4.js → chunk-D4P6BKGF.js} +3 -3
- package/dist/cli/chunks/{chunk-RO4BYINM.js → chunk-DFBJPOJR.js} +2 -2
- package/dist/cli/chunks/{chunk-X67O2KUE.js → chunk-DIRFXY3J.js} +7 -7
- package/dist/cli/chunks/chunk-DK7MV2W3.js +2 -0
- package/dist/cli/chunks/chunk-DVYNBMMP.js +62 -0
- package/dist/cli/chunks/{chunk-XF4F5ZXO.js → chunk-EGI6SKQD.js} +2 -2
- package/dist/cli/chunks/{chunk-WSQE3VZB.js → chunk-ELC3UEML.js} +1 -1
- package/dist/cli/chunks/chunk-ELKWYWTD.js +2 -0
- package/dist/cli/chunks/{chunk-QXF6EQFP.js → chunk-EPMUAKU2.js} +2 -2
- package/dist/cli/chunks/{chunk-UOO7P2AK.js → chunk-EROQSNGD.js} +2 -2
- package/dist/cli/chunks/{chunk-26SNR2EK.js → chunk-EXXWOOUL.js} +3 -3
- package/dist/cli/chunks/{chunk-WCUXA3NV.js → chunk-FQPYD6YE.js} +1 -1
- package/dist/cli/chunks/{chunk-UNMWI4QU.js → chunk-FW6OPDA6.js} +1 -1
- package/dist/cli/chunks/{chunk-NQJLUY2K.js → chunk-FYWTMDID.js} +2 -2
- package/dist/cli/chunks/{chunk-N7LIYK7Z.js → chunk-G47WJMHM.js} +1 -1
- package/dist/cli/chunks/{chunk-6XVP6BGM.js → chunk-G73XY2NK.js} +2 -2
- package/dist/cli/chunks/{chunk-KQLJILCZ.js → chunk-GHSP4AC5.js} +1 -1
- package/dist/cli/chunks/{chunk-7EL5QEMJ.js → chunk-GITS44TM.js} +2 -2
- package/dist/cli/chunks/{chunk-NAZFAGJ5.js → chunk-GUO6JZMS.js} +2 -2
- package/dist/cli/chunks/{chunk-C3AF5Z55.js → chunk-GWBV26SE.js} +2 -2
- package/dist/cli/chunks/{chunk-ERKYIV25.js → chunk-HBYVYLBN.js} +2 -2
- package/dist/cli/chunks/{chunk-O45CEMVF.js → chunk-HMNBNGNO.js} +1 -1
- package/dist/cli/chunks/{chunk-ZYCPTARG.js → chunk-HZV3J4VQ.js} +2 -2
- package/dist/cli/chunks/{chunk-5IVXM3TE.js → chunk-IC5JGTM4.js} +1 -1
- package/dist/cli/chunks/{chunk-IUFNB6I6.js → chunk-IS3P5VBL.js} +2 -2
- package/dist/cli/chunks/{chunk-EEHEMDNV.js → chunk-JID7JO7K.js} +2 -2
- package/dist/cli/chunks/{chunk-4HVVVVUF.js → chunk-JOJ2UFHM.js} +2 -2
- package/dist/cli/chunks/{chunk-3RSF7POD.js → chunk-JTUTZUED.js} +2 -2
- package/dist/cli/chunks/{chunk-VDPQ7NVG.js → chunk-JX5IY2YK.js} +1 -1
- package/dist/cli/chunks/{chunk-KE656E6T.js → chunk-K55D3PAR.js} +3 -3
- package/dist/cli/chunks/{chunk-ISGKDLZ7.js → chunk-KAVYTFAS.js} +2 -2
- package/dist/cli/chunks/{chunk-5DESO7E4.js → chunk-KRCIC4JK.js} +2 -2
- package/dist/cli/chunks/{chunk-ESMSH7HG.js → chunk-L6H4MWVN.js} +2 -2
- package/dist/cli/chunks/{chunk-U52IQFMP.js → chunk-L6I2Q6UQ.js} +1 -1
- package/dist/cli/chunks/{chunk-MWWTYPFL.js → chunk-LARAXKTZ.js} +2 -2
- package/dist/cli/chunks/{chunk-FZ4MUDHZ.js → chunk-LELWVGN6.js} +1 -1
- package/dist/cli/chunks/chunk-M7456ZW5.js +2 -0
- package/dist/cli/chunks/{chunk-GOFP47XU.js → chunk-MF6OT43N.js} +1 -1
- package/dist/cli/chunks/{chunk-TO7FTPRV.js → chunk-MX35PIGJ.js} +2 -2
- package/dist/cli/chunks/{chunk-LASZCR5G.js → chunk-ND7IWTVQ.js} +2 -2
- package/dist/cli/chunks/{chunk-KB4S7MGB.js → chunk-NFE4RV2Q.js} +2 -2
- package/dist/cli/chunks/{chunk-O74V7MB4.js → chunk-NVZ3QROA.js} +2 -2
- package/dist/cli/chunks/{chunk-NQVF4M7L.js → chunk-OF5UL3FA.js} +1 -1
- package/dist/cli/chunks/{chunk-MP3RCZ75.js → chunk-OGUPLNRY.js} +1 -1
- package/dist/cli/chunks/{chunk-Q4VZXT6X.js → chunk-OJZ5LI3O.js} +1 -1
- package/dist/cli/chunks/{chunk-LIMFWEUI.js → chunk-OQ4HOHBI.js} +2 -2
- package/dist/cli/chunks/{chunk-HN2DD2DQ.js → chunk-OUWZTYRZ.js} +2 -2
- package/dist/cli/chunks/{chunk-5RVWL2U3.js → chunk-PDOL3FGO.js} +3 -3
- package/dist/cli/chunks/{chunk-FJSL7TWU.js → chunk-PEHSTLU7.js} +1 -1
- package/dist/cli/chunks/{chunk-MPVOZKUP.js → chunk-PKCVQ2I4.js} +1 -1
- package/dist/cli/chunks/{chunk-XTHRSBMJ.js → chunk-PNDWHSZO.js} +2 -2
- package/dist/cli/chunks/{chunk-BQRCNRTJ.js → chunk-PSD2L2JB.js} +2 -2
- package/dist/cli/chunks/{chunk-PJFQGNRW.js → chunk-Q3J5OTZ2.js} +1 -1
- package/dist/cli/chunks/{chunk-IU5SILCS.js → chunk-QHX7VLVT.js} +2 -2
- package/dist/cli/chunks/{chunk-GNFKG2LX.js → chunk-QIHKSRUZ.js} +2 -2
- package/dist/cli/chunks/{chunk-6XCULO27.js → chunk-QLD2WVWN.js} +2 -2
- package/dist/cli/chunks/{chunk-GIU26D5G.js → chunk-R4VDRE75.js} +1 -1
- package/dist/cli/chunks/{chunk-JBHGMLN7.js → chunk-RDHBUCKQ.js} +182 -201
- package/dist/cli/chunks/{chunk-X5JMTHXC.js → chunk-RGBYJAKQ.js} +3 -3
- package/dist/cli/chunks/{chunk-MANWLRAW.js → chunk-RKXN5TVS.js} +1 -1
- package/dist/cli/chunks/{chunk-56QR72EB.js → chunk-S2EUFKHL.js} +2 -2
- package/dist/cli/chunks/{chunk-44SYMJ4T.js → chunk-SN57SNLU.js} +2 -2
- package/dist/cli/chunks/{chunk-6BHRSGR7.js → chunk-SQDHFTGQ.js} +3 -3
- package/dist/cli/chunks/{chunk-OR2RC7ZH.js → chunk-THQ5ZBWP.js} +2 -2
- package/dist/cli/chunks/{chunk-W37WY3OL.js → chunk-TU5S33SD.js} +2 -2
- package/dist/cli/chunks/{chunk-4FP4PJ45.js → chunk-U5GGDJ44.js} +2 -2
- package/dist/cli/chunks/{chunk-VOAXVNO5.js → chunk-UGER2PGN.js} +4 -4
- package/dist/cli/chunks/{chunk-5R26MAMK.js → chunk-UUFLYBUO.js} +2 -2
- package/dist/cli/chunks/{chunk-UQFMQOZB.js → chunk-UWM4CCK7.js} +1 -1
- package/dist/cli/chunks/{chunk-C75V5PTW.js → chunk-V2T7QEPV.js} +1 -1
- package/dist/cli/chunks/{chunk-PIYDPOW6.js → chunk-VE5STFDP.js} +2 -2
- package/dist/cli/chunks/{chunk-75CFWCQV.js → chunk-VNRWJ5JZ.js} +2 -2
- package/dist/cli/chunks/{chunk-PD2ZSCEH.js → chunk-VRV7CXEM.js} +1 -1
- package/dist/cli/chunks/{chunk-IN5KRJSE.js → chunk-W7H46LAX.js} +1 -1
- package/dist/cli/chunks/{chunk-TCYSMSBO.js → chunk-WAELEQP5.js} +2 -2
- package/dist/cli/chunks/{chunk-OU3SYEYJ.js → chunk-WDDU4I5Z.js} +1 -1
- package/dist/cli/chunks/{chunk-XLP44YGX.js → chunk-WLY2J6JP.js} +2 -2
- package/dist/cli/chunks/{chunk-GGZB2ZBB.js → chunk-WSSFH23M.js} +1 -1
- package/dist/cli/chunks/{chunk-II2RP3MY.js → chunk-WZI2REDL.js} +2 -2
- package/dist/cli/chunks/{chunk-6VNUASTQ.js → chunk-X53GJW2E.js} +2 -2
- package/dist/cli/chunks/{chunk-QENUKXPP.js → chunk-XACF7ZLM.js} +2 -2
- package/dist/cli/chunks/{chunk-VZO4V4R4.js → chunk-XNGYWOAK.js} +2 -2
- package/dist/cli/chunks/{chunk-KO3UQYGY.js → chunk-YFD6K7AS.js} +75 -75
- package/dist/cli/chunks/{chunk-TFFEB7XD.js → chunk-YG45ZONW.js} +2 -2
- package/dist/cli/chunks/{chunk-6GNVVQW3.js → chunk-YGMCRJSC.js} +2 -2
- package/dist/cli/chunks/{chunk-Z6FK7T7J.js → chunk-YIEMVVUH.js} +2 -2
- package/dist/cli/chunks/{chunk-OF7674H5.js → chunk-YSWI3APU.js} +2 -2
- package/dist/cli/chunks/{chunk-CTNDSP2M.js → chunk-YU4U3BUY.js} +1 -1
- package/dist/cli/chunks/{chunk-SFRYDGLF.js → chunk-Z5YNYVFO.js} +1 -1
- package/dist/cli/chunks/{chunk-IVZA5XTW.js → chunk-ZE3WS57T.js} +2 -2
- package/dist/cli/chunks/{chunk-KZAVYHH7.js → chunk-ZMA5OWIQ.js} +4 -4
- package/dist/cli/chunks/{chunk-TM6LLT4G.js → chunk-ZOD37GNG.js} +3 -3
- package/dist/cli/chunks/{chunk-GRMKN44A.js → chunk-ZQ7XQLLV.js} +3 -3
- package/dist/cli/chunks/{chunk-ITQCSIYG.js → chunk-ZUIPUO7Q.js} +1 -1
- package/dist/cli/chunks/{chunk-PRHLV6FS.js → chunk-ZWLFEZQC.js} +1 -1
- package/dist/cli/chunks/{ci-DK4FGREO.js → ci-IRCNFD32.js} +2 -2
- package/dist/cli/chunks/{ci-output-HQBBQQES.js → ci-output-NFOUNDJ2.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-MJCS46DN.js → circuit-breaker-GB7SQRD2.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-IIQT52H4.js → claude-flow-setup-STFKPPVL.js} +2 -2
- package/dist/cli/chunks/client-M4WF22UT.js +2 -0
- package/dist/cli/chunks/{cline-installer-7SPKUNNZ.js → cline-installer-MLKKIHIV.js} +2 -2
- package/dist/cli/chunks/{code-V2B4FP3X.js → code-ZRCJC42H.js} +2 -2
- package/dist/cli/chunks/{code-index-extractor-IRGAI76Y.js → code-index-extractor-VWDYYQY2.js} +2 -2
- package/dist/cli/chunks/{codex-installer-PDFCYRU6.js → codex-installer-I5BTWYQV.js} +2 -2
- package/dist/cli/chunks/{completions-TAJ6N7YZ.js → completions-5JCAFTQV.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-JHQKQKBG.js → complexity-analyzer-6JLLAPGO.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-DESZXCLC.js → continuedev-installer-YBOLMUZR.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-OQPXBLWS.js → copilot-installer-GDBJZBXS.js} +2 -2
- package/dist/cli/chunks/core-handlers-3MNFXL44.js +2 -0
- package/dist/cli/chunks/{cost-tracker-KHDFSCAJ.js → cost-tracker-NEAVGEZI.js} +2 -2
- package/dist/cli/chunks/{coverage-T7EENIDE.js → coverage-DXS5XNAA.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-Q5X6ZLJY.js +2 -0
- package/dist/cli/chunks/{cursor-installer-X6BFU5QU.js → cursor-installer-3KEMFIFA.js} +2 -2
- package/dist/cli/chunks/{daemon-22NOG5XI.js → daemon-FT2J6VY4.js} +3 -3
- package/dist/cli/chunks/{daemon-UTPP4JCG.js → daemon-JN377KTA.js} +4 -4
- package/dist/cli/chunks/{dag-attention-scheduler-XI6DG3FW.js → dag-attention-scheduler-EJFEWFXI.js} +2 -2
- package/dist/cli/chunks/{detect-7IMQGJ5I.js → detect-E5MN6N3L.js} +2 -2
- package/dist/cli/chunks/{dist-node-YMLM4K7J.js → dist-node-ZFSAQMFD.js} +2 -2
- package/dist/cli/chunks/{domain-handler-LRTJGTEH.js → domain-handler-S7VFZ2MY.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-HZJ3WUCT.js → domain-transfer-LGHT3FN4.js} +2 -2
- package/dist/cli/chunks/dream-5QB6JABW.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-QSRN7Z5Q.js → embed-and-insert-pattern-OVQS6IKK.js} +2 -2
- package/dist/cli/chunks/{eval-JVVVQVV6.js → eval-45UWDD2R.js} +2 -2
- package/dist/cli/chunks/{experience-capture-middleware-ORZN3ROJ.js → experience-capture-middleware-XDRJSNPY.js} +3 -3
- package/dist/cli/chunks/{fast-paths-LUFARZR5.js → fast-paths-VEDCJL75.js} +2 -2
- package/dist/cli/chunks/{feature-flags-ZHQESXIP.js → feature-flags-NOTQVBLP.js} +2 -2
- package/dist/cli/chunks/{feature-flags-2XC4ECLW.js → feature-flags-TGA3NWVL.js} +2 -2
- package/dist/cli/chunks/file-discovery-AHMR6IGX.js +2 -0
- package/dist/cli/chunks/{fleet-FUQ6G4SB.js → fleet-CQBUCH2S.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-A4E6OKGD.js → gnn-wrapper-SOZCIONJ.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-3JKQORXA.js → heartbeat-handler-6XNV4DGM.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-ZRLIMPKO.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-R4VAEQ2B.js +2 -0
- package/dist/cli/chunks/hnsw-index-GTUOS6DF.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-AHKFKM2J.js → hnsw-legacy-bridge-UILVP37N.js} +2 -2
- package/dist/cli/chunks/hnswlib-node-OHJQOSAH.js +2 -0
- package/dist/cli/chunks/{hooks-JNW5ZB2E.js → hooks-QVDOGEHG.js} +10 -10
- package/dist/cli/chunks/hybrid-router-CYEXFWDT.js +2 -0
- package/dist/cli/chunks/{hypergraph-engine-3DTAMNSJ.js → hypergraph-engine-YMVPBXZS.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-ZV4AZRGF.js → hypergraph-handler-SHUNZXUK.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-HMJ7LAXR.js +2 -0
- package/dist/cli/chunks/{init-handler-NPOUX47N.js → init-handler-JE5FYJAV.js} +12 -12
- package/dist/cli/chunks/init-wizard-OIK6S3PQ.js +2 -0
- package/dist/cli/chunks/kernel-NZCGR72Y.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-D35TR6LG.js → kilocode-installer-TVP4YOOK.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-OHHTQENO.js → kiro-installer-XBSGANX7.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-HA7XW46B.js +2 -0
- package/dist/cli/chunks/{learning-24PCHLWU.js → learning-O4ZXQVRE.js} +3 -3
- package/dist/cli/chunks/{llm-router-XLTE52H5.js → llm-router-FXXJHARR.js} +4 -4
- package/dist/cli/chunks/llm-router-service-FVGQSXYC.js +2 -0
- package/dist/cli/chunks/{load-BHMK4FIL.js → load-IVF6G2SK.js} +2 -2
- package/dist/cli/chunks/load-test-IQTO35GE.js +2 -0
- package/dist/cli/chunks/{mcp-V4MAYT7C.js → mcp-VXSDVG3H.js} +2 -2
- package/dist/cli/chunks/{memory-PDA7MQ7E.js → memory-BINJV3M6.js} +5 -5
- package/dist/cli/chunks/memory-backend-YGSOJ7SI.js +2 -0
- package/dist/cli/chunks/{memory-handlers-X5BLXOSH.js → memory-handlers-BJNFJZFP.js} +2 -2
- package/dist/cli/chunks/{multi-model-executor-KECHOXKD.js → multi-model-executor-RJHYK6JI.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-LWSCQOOZ.js → opencode-installer-VCTF5ETL.js} +2 -2
- package/dist/cli/chunks/{orchestrator-ENEBTEUW.js → orchestrator-5SKZ2BOK.js} +11 -11
- package/dist/cli/chunks/pattern-null-store-4WN5O2PF.js +2 -0
- package/dist/cli/chunks/{pattern-usage-recorder-XIHGXYZZ.js → pattern-usage-recorder-AY2DAOQO.js} +2 -2
- package/dist/cli/chunks/{pipeline-GQOJM3LU.js → pipeline-EMBMC75N.js} +2 -2
- package/dist/cli/chunks/{platform-L56TGXGZ.js → platform-GADIFXCI.js} +2 -2
- package/dist/cli/chunks/{plugin-SZ6PZKYX.js → plugin-Q234ZAAY.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-SID5FQFW.js → prime-radiant-advanced-wasm-CXXKYB2P.js} +2 -2
- package/dist/cli/chunks/protocol-executor-EYTJXPXY.js +2 -0
- package/dist/cli/chunks/{protocol-handler-5MMNVVPX.js → protocol-handler-ZZRFBVNA.js} +2 -2
- package/dist/cli/chunks/{prove-DJ6BQ2AK.js → prove-7674ATXK.js} +2 -2
- package/dist/cli/chunks/provider-manager-TM3JHYLL.js +2 -0
- package/dist/cli/chunks/qe-reasoning-bank-6JLFP3HE.js +2 -0
- package/dist/cli/chunks/quality-QCIGVN2S.js +7 -0
- package/dist/cli/chunks/{quality-gate-CVHVSORK.js → quality-gate-AKV564GE.js} +3 -3
- package/dist/cli/chunks/queen-coordinator-OKGOKGHI.js +2 -0
- package/dist/cli/chunks/{real-embeddings-DN2MEJVM.js → real-embeddings-74POUVMX.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-LTAQJWIH.js → roocode-installer-INBL5AG7.js} +2 -2
- package/dist/cli/chunks/router-J45OF4SP.js +2 -0
- package/dist/cli/chunks/routing-feedback-VTZFH57X.js +2 -0
- package/dist/cli/chunks/{routing-handler-PSWR2UCT.js → routing-handler-C7HMM7RL.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-VTP6Y7PN.js → ruvector-commands-PT6LRVCW.js} +2 -2
- package/dist/cli/chunks/{rvf-dual-writer-EBUMXPRO.js → rvf-dual-writer-PRKROTP3.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-adapter-5N7GHMD3.js → rvf-migration-adapter-ZI2XW4UX.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-coordinator-GQKDBNRR.js → rvf-migration-coordinator-5JTGP35V.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-BDPUBFNP.js +2 -0
- package/dist/cli/chunks/{rvf-store-integrity-LR3SYGQK.js → rvf-store-integrity-3B5TZTFR.js} +2 -2
- package/dist/cli/chunks/safe-db-FHJBWJIB.js +2 -0
- package/dist/cli/chunks/schedule-LP7YYT4P.js +2 -0
- package/dist/cli/chunks/scheduler-BOZWGKJG.js +2 -0
- package/dist/cli/chunks/{security-YDWLYXYD.js → security-IMIWSAHW.js} +3 -3
- package/dist/cli/chunks/{shared-rvf-adapter-I3HQY7DE.js → shared-rvf-adapter-UDKJNX6I.js} +2 -2
- package/dist/cli/chunks/{shared-rvf-dual-writer-2UADEA5N.js → shared-rvf-dual-writer-FQOBQ6S5.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-TDM36AHF.js +2 -0
- package/dist/cli/chunks/{status-handler-QRHI3F4V.js → status-handler-7WON7M7F.js} +2 -2
- package/dist/cli/chunks/{structural-health-FWKE63CM.js → structural-health-JTKTO3A4.js} +2 -2
- package/dist/cli/chunks/{sync-2QRCT5MT.js → sync-6ABYTAOL.js} +2 -2
- package/dist/cli/chunks/{sync-E32MBAOF.js → sync-UJSHBY3B.js} +2 -2
- package/dist/cli/chunks/{task-handler-C7BKMOCL.js → task-handler-5TZNOCCB.js} +2 -2
- package/dist/cli/chunks/{task-handlers-PADWLLDO.js → task-handlers-G7ZUGBHM.js} +3 -3
- package/dist/cli/chunks/test-BSJ6MVTG.js +33 -0
- package/dist/cli/chunks/{test-scheduling-5WKIWH4H.js → test-scheduling-OSJJXIYQ.js} +3 -3
- package/dist/cli/chunks/{token-bootstrap-6SKOJM3U.js → token-bootstrap-MRNFR4YI.js} +2 -2
- package/dist/cli/chunks/{token-usage-V6JW55RV.js → token-usage-YQN7ND7G.js} +2 -2
- package/dist/cli/chunks/{transformers-3UPFBYSB.js → transformers-QL3AG25C.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-UCY4S2DU.js → tree-sitter-wasm-parser-BECZRRZP.js} +2 -2
- package/dist/cli/chunks/{types-XNMNQGET.js → types-FQSNLPWS.js} +2 -2
- package/dist/cli/chunks/unified-memory-6PHUOZRH.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-WYSFH3PS.js +2 -0
- package/dist/cli/chunks/unified-persistence-QBGHDCCO.js +2 -0
- package/dist/cli/chunks/{upgrade-MVTMTOPL.js → upgrade-2ICXXV6D.js} +2 -2
- package/dist/cli/chunks/{validate-OJWR2AGZ.js → validate-LPAUH2F4.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-2RGSF2K2.js → validate-swarm-VWVE2GM7.js} +2 -2
- package/dist/cli/chunks/{vibium-O3ZLAEEZ.js → vibium-U3LBEI4K.js} +2 -2
- package/dist/cli/chunks/visual-security-LH7DRCDS.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-6VPASTI4.js → web-tree-sitter-QGZXQPXU.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-CINHOW3N.js → windsurf-installer-GGLQJWUI.js} +2 -2
- package/dist/cli/chunks/witness-chain-2BDZOPJ2.js +2 -0
- package/dist/cli/chunks/{witness-chain-2NXW7FT7.js → witness-chain-47A2AXUS.js} +2 -2
- package/dist/cli/chunks/{witness-key-manager-ODW4DJWT.js → witness-key-manager-FVS7UOWM.js} +2 -2
- package/dist/cli/chunks/{workflow-BFGS2GAU.js → workflow-KIZPLTYW.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-UYOPFK2T.js +2 -0
- package/dist/cli/chunks/{wrappers-VEVVSVMS.js → wrappers-ER6XCMT6.js} +2 -2
- package/dist/cli/commands/quality.d.ts +12 -0
- package/dist/cli/commands/quality.js +50 -74
- package/dist/cli/commands/test.js +33 -4
- package/dist/cli/handlers/init-handler.d.ts +2 -0
- package/dist/cli/handlers/init-handler.js +4 -1
- package/dist/cli/utils/file-discovery.d.ts +1 -0
- package/dist/cli/utils/file-discovery.js +13 -1
- package/dist/domains/coverage-analysis/services/coverage-analyzer.js +5 -0
- package/dist/domains/quality-assessment/index.d.ts +1 -0
- package/dist/domains/quality-assessment/index.js +1 -0
- package/dist/domains/quality-assessment/quality-evidence.d.ts +41 -0
- package/dist/domains/quality-assessment/quality-evidence.js +115 -0
- package/dist/domains/test-execution/coordinator.d.ts +1 -0
- package/dist/domains/test-execution/coordinator.js +11 -4
- package/dist/domains/test-execution/interfaces.d.ts +2 -0
- package/dist/domains/test-execution/services/retry-handler.js +3 -3
- package/dist/domains/test-execution/services/test-executor.d.ts +5 -0
- package/dist/domains/test-execution/services/test-executor.js +93 -30
- package/dist/domains/test-generation/gates/test-quality-gate.d.ts +8 -2
- package/dist/domains/test-generation/gates/test-quality-gate.js +93 -4
- package/dist/domains/test-generation/generators/base-test-generator.js +0 -15
- package/dist/domains/test-generation/generators/jest-vitest-generator.js +17 -26
- package/dist/domains/test-generation/services/test-generator.js +7 -2
- package/dist/init/orchestrator.js +1 -0
- package/dist/init/phases/07-hooks.js +3 -1
- package/dist/init/phases/phase-interface.d.ts +2 -0
- package/dist/init/settings-merge.d.ts +3 -1
- package/dist/init/settings-merge.js +9 -3
- package/dist/integrations/embeddings/index/HNSWIndex.js +2 -0
- package/dist/learning/real-embeddings.js +19 -3
- package/dist/mcp/bundle.js +453 -472
- package/dist/mcp/tools/quality-assessment/evaluate.d.ts +7 -0
- package/dist/mcp/tools/quality-assessment/evaluate.js +72 -20
- package/dist/mcp/tools/security-compliance/scan.js +8 -1
- package/package.json +2 -2
- package/dist/cli/chunks/adapter-JISQ35YY.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-TVTNP76S.js +0 -2
- package/dist/cli/chunks/base-WBCYKM45.js +0 -2
- package/dist/cli/chunks/better-sqlite3-FXJFG2WH.js +0 -2
- package/dist/cli/chunks/browser-workflow-4JM3IWCS.js +0 -2
- package/dist/cli/chunks/chunk-344CLTV7.js +0 -62
- package/dist/cli/chunks/chunk-CW7LDLJ2.js +0 -2
- package/dist/cli/chunks/chunk-HGBVGEUE.js +0 -2
- package/dist/cli/chunks/chunk-JJ5YIKTJ.js +0 -12
- package/dist/cli/chunks/chunk-QGH54HTH.js +0 -2
- package/dist/cli/chunks/chunk-YQI6SOUO.js +0 -2
- package/dist/cli/chunks/client-FNDZB4TY.js +0 -2
- package/dist/cli/chunks/core-handlers-S37RHLKP.js +0 -2
- package/dist/cli/chunks/cross-domain-router-7ZHDB2V3.js +0 -2
- package/dist/cli/chunks/dream-BEVYNIOO.js +0 -2
- package/dist/cli/chunks/file-discovery-UHXZQ7GS.js +0 -2
- package/dist/cli/chunks/heartbeat-scheduler-K4YLB3X4.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-PPR3LTMA.js +0 -2
- package/dist/cli/chunks/hnsw-index-ZSKFT4LZ.js +0 -2
- package/dist/cli/chunks/hybrid-router-4SXBHTOY.js +0 -2
- package/dist/cli/chunks/impact-analyzer-55GE7EQD.js +0 -2
- package/dist/cli/chunks/init-wizard-EUQLSGI6.js +0 -2
- package/dist/cli/chunks/kernel-BSGSVYPM.js +0 -2
- package/dist/cli/chunks/knowledge-graph-OITIVT5J.js +0 -2
- package/dist/cli/chunks/llm-router-service-RUPU52AR.js +0 -2
- package/dist/cli/chunks/load-test-ZV3C55ZE.js +0 -2
- package/dist/cli/chunks/memory-backend-S3KCPHCF.js +0 -2
- package/dist/cli/chunks/pattern-null-store-ILVDKSCX.js +0 -2
- package/dist/cli/chunks/protocol-executor-GDRHCW3Q.js +0 -2
- package/dist/cli/chunks/provider-manager-BS4MVCSH.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-P3ARGHDN.js +0 -2
- package/dist/cli/chunks/quality-WKC4JCB3.js +0 -7
- package/dist/cli/chunks/queen-coordinator-GI7GNVDM.js +0 -2
- package/dist/cli/chunks/router-YU6MLJBV.js +0 -2
- package/dist/cli/chunks/routing-feedback-D6B2SK5V.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-M7ZVRN5Z.js +0 -2
- package/dist/cli/chunks/safe-db-3OHTLXG7.js +0 -2
- package/dist/cli/chunks/schedule-H43ADREQ.js +0 -2
- package/dist/cli/chunks/scheduler-CGSXNEPJ.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-V6U5FKVK.js +0 -2
- package/dist/cli/chunks/test-KX4UKHSX.js +0 -33
- package/dist/cli/chunks/unified-memory-H2J5BHPY.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-LFGIWMTS.js +0 -2
- package/dist/cli/chunks/unified-persistence-F6W7EXU5.js +0 -2
- package/dist/cli/chunks/visual-security-EHVU32UE.js +0 -2
- package/dist/cli/chunks/witness-chain-BIICGRHC.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-PVTYPYY4.js +0 -2
|
@@ -12,6 +12,7 @@ import { TEST_EXECUTION_CONSTANTS, LLM_ANALYSIS_CONSTANTS } from '../../constant
|
|
|
12
12
|
import { toErrorMessage, toError } from '../../../shared/error-utils.js';
|
|
13
13
|
import { safeJsonParse } from '../../../shared/safe-json.js';
|
|
14
14
|
import { secureRandom, secureRandomInt } from '../../../shared/utils/crypto-random.js';
|
|
15
|
+
import { writeQualityEvidence } from '../../quality-assessment/quality-evidence.js';
|
|
15
16
|
const DEFAULT_CONFIG = {
|
|
16
17
|
simulateForTesting: false,
|
|
17
18
|
simulatedTestsPerFile: 5,
|
|
@@ -102,8 +103,10 @@ export class TestExecutorService {
|
|
|
102
103
|
return err(validation.error);
|
|
103
104
|
}
|
|
104
105
|
const { workers, sharding = 'file', isolation = 'process' } = request;
|
|
106
|
+
const runnerOwnsParallelism = ['vitest', 'jest'].includes(request.framework.toLowerCase());
|
|
107
|
+
const processWorkers = runnerOwnsParallelism ? 1 : workers;
|
|
105
108
|
// Shard tests across workers
|
|
106
|
-
const shards = this.shardTests(request.testFiles,
|
|
109
|
+
const shards = this.shardTests(request.testFiles, processWorkers, sharding);
|
|
107
110
|
// Execute shards in parallel
|
|
108
111
|
const shardResults = await Promise.all(shards.map((shard, index) => this.executeWorker(shard, index, isolation, request)));
|
|
109
112
|
// Aggregate results
|
|
@@ -132,7 +135,7 @@ export class TestExecutorService {
|
|
|
132
135
|
endTime,
|
|
133
136
|
duration,
|
|
134
137
|
testsPerSecond: aggregated.total / (duration / 1000),
|
|
135
|
-
workers,
|
|
138
|
+
workers: processWorkers,
|
|
136
139
|
memoryUsage: process.memoryUsage?.().heapUsed ?? 0,
|
|
137
140
|
};
|
|
138
141
|
this.runStats.set(runId, stats);
|
|
@@ -327,26 +330,29 @@ Provide:
|
|
|
327
330
|
};
|
|
328
331
|
}
|
|
329
332
|
async executeTestFile(file, framework, timeout) {
|
|
333
|
+
return this.executeTestFiles([file], framework, timeout);
|
|
334
|
+
}
|
|
335
|
+
async executeTestFiles(files, framework, timeout) {
|
|
330
336
|
// In simulation mode (for unit testing), use random behavior
|
|
331
337
|
if (this.config.simulateForTesting) {
|
|
332
|
-
return this.simulateTestExecution(file);
|
|
338
|
+
return this.aggregateResults(files.map(file => this.simulateTestExecution(file)));
|
|
333
339
|
}
|
|
334
340
|
// Production mode: spawn actual test runner process
|
|
335
|
-
const result = await this.spawnTestRunner(
|
|
341
|
+
const result = await this.spawnTestRunner(files, framework, timeout);
|
|
336
342
|
if (result.success === false) {
|
|
337
343
|
// Return as a failed test rather than throwing — allows other files to still run
|
|
338
344
|
return {
|
|
339
|
-
total:
|
|
345
|
+
total: files.length,
|
|
340
346
|
passed: 0,
|
|
341
|
-
failed:
|
|
347
|
+
failed: files.length,
|
|
342
348
|
skipped: 0,
|
|
343
|
-
failedTests:
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
349
|
+
failedTests: files.map(file => ({
|
|
350
|
+
testId: file,
|
|
351
|
+
testName: file,
|
|
352
|
+
file,
|
|
353
|
+
error: result.error.message,
|
|
354
|
+
duration: 0,
|
|
355
|
+
})),
|
|
350
356
|
coverage: this.aggregateCoverage([]),
|
|
351
357
|
};
|
|
352
358
|
}
|
|
@@ -355,13 +361,15 @@ Provide:
|
|
|
355
361
|
/**
|
|
356
362
|
* Spawn actual test runner process (vitest, jest, mocha)
|
|
357
363
|
*/
|
|
358
|
-
async spawnTestRunner(
|
|
364
|
+
async spawnTestRunner(files, framework, timeout) {
|
|
359
365
|
// Verify test file exists
|
|
360
|
-
|
|
361
|
-
|
|
366
|
+
const missingFile = files.find(file => !existsSync(file));
|
|
367
|
+
if (missingFile) {
|
|
368
|
+
return err(new Error(`Test file not found: ${missingFile}`));
|
|
362
369
|
}
|
|
363
370
|
// Build command based on framework
|
|
364
|
-
const { command, args } = this.buildTestCommand(
|
|
371
|
+
const { command, args } = this.buildTestCommand(files, framework);
|
|
372
|
+
const fileLabel = files.join(', ');
|
|
365
373
|
return new Promise((resolve) => {
|
|
366
374
|
let stdout = '';
|
|
367
375
|
let stderr = '';
|
|
@@ -381,7 +389,7 @@ Provide:
|
|
|
381
389
|
const timeoutId = setTimeout(() => {
|
|
382
390
|
killed = true;
|
|
383
391
|
proc.kill('SIGTERM');
|
|
384
|
-
resolve(err(new Error(`Test execution timed out after ${timeout}ms for
|
|
392
|
+
resolve(err(new Error(`Test execution timed out after ${timeout}ms for files: ${fileLabel}`)));
|
|
385
393
|
}, timeout);
|
|
386
394
|
proc.stdout?.on('data', (data) => {
|
|
387
395
|
stdout += data.toString();
|
|
@@ -395,10 +403,10 @@ Provide:
|
|
|
395
403
|
return; // Already handled by timeout
|
|
396
404
|
}
|
|
397
405
|
// Parse results based on framework
|
|
398
|
-
const parseResult = this.parseTestOutput(stdout, stderr,
|
|
406
|
+
const parseResult = this.parseTestOutput(stdout, stderr, fileLabel, framework, code);
|
|
399
407
|
// If no coverage in stdout JSON, try reading from disk
|
|
400
408
|
// (vitest/jest write coverage to coverage/coverage-summary.json)
|
|
401
|
-
if (parseResult.success && !parseResult.value.coverage) {
|
|
409
|
+
if (parseResult.success && !parseResult.value.coverage && ['vitest', 'jest'].includes(framework.toLowerCase())) {
|
|
402
410
|
const diskCoverage = this.readCoverageFromDisk();
|
|
403
411
|
if (diskCoverage) {
|
|
404
412
|
parseResult.value.coverage = diskCoverage.summary;
|
|
@@ -418,33 +426,37 @@ Provide:
|
|
|
418
426
|
/**
|
|
419
427
|
* Build test command based on framework
|
|
420
428
|
*/
|
|
421
|
-
buildTestCommand(
|
|
429
|
+
buildTestCommand(fileOrFiles, framework) {
|
|
430
|
+
const files = Array.isArray(fileOrFiles) ? fileOrFiles : [fileOrFiles];
|
|
422
431
|
switch (framework.toLowerCase()) {
|
|
423
432
|
case 'vitest':
|
|
424
433
|
return {
|
|
425
434
|
command: 'npx',
|
|
426
|
-
args: ['vitest', 'run',
|
|
427
|
-
'--coverage', '--coverage.reporter=json'],
|
|
435
|
+
args: ['vitest', 'run', ...files, '--reporter=json', '--no-color'],
|
|
428
436
|
};
|
|
429
437
|
case 'jest':
|
|
430
438
|
return {
|
|
431
439
|
command: 'npx',
|
|
432
|
-
args: ['jest',
|
|
433
|
-
'--coverage', '--coverageReporters=json'],
|
|
440
|
+
args: ['jest', ...files, '--json', '--no-colors', '--testLocationInResults'],
|
|
434
441
|
};
|
|
435
442
|
case 'mocha':
|
|
436
443
|
// Note: mocha has no built-in coverage — requires external nyc/c8 wrapper.
|
|
437
444
|
// Coverage data will be unavailable for mocha-based test runs.
|
|
438
445
|
return {
|
|
439
446
|
command: 'npx',
|
|
440
|
-
args: ['mocha',
|
|
447
|
+
args: ['mocha', ...files, '--reporter=json'],
|
|
448
|
+
};
|
|
449
|
+
case 'node':
|
|
450
|
+
case 'node-test':
|
|
451
|
+
return {
|
|
452
|
+
command: process.execPath,
|
|
453
|
+
args: ['--test', ...files],
|
|
441
454
|
};
|
|
442
455
|
default:
|
|
443
456
|
// Default to vitest
|
|
444
457
|
return {
|
|
445
458
|
command: 'npx',
|
|
446
|
-
args: ['vitest', 'run',
|
|
447
|
-
'--coverage', '--coverage.reporter=json'],
|
|
459
|
+
args: ['vitest', 'run', ...files, '--reporter=json', '--no-color'],
|
|
448
460
|
};
|
|
449
461
|
}
|
|
450
462
|
}
|
|
@@ -460,6 +472,9 @@ Provide:
|
|
|
460
472
|
return this.parseJestOutput(stdout, stderr, file, exitCode);
|
|
461
473
|
case 'mocha':
|
|
462
474
|
return this.parseMochaOutput(stdout, stderr, file, exitCode);
|
|
475
|
+
case 'node':
|
|
476
|
+
case 'node-test':
|
|
477
|
+
return this.parseNodeTestOutput(stdout, stderr, file, exitCode);
|
|
463
478
|
default:
|
|
464
479
|
return this.parseVitestOutput(stdout, stderr, file, exitCode);
|
|
465
480
|
}
|
|
@@ -469,6 +484,47 @@ Provide:
|
|
|
469
484
|
`stdout: ${stdout.slice(0, 500)}\nstderr: ${stderr.slice(0, 500)}`));
|
|
470
485
|
}
|
|
471
486
|
}
|
|
487
|
+
/**
|
|
488
|
+
* Parse the TAP or spec summary emitted by Node's built-in test runner.
|
|
489
|
+
*/
|
|
490
|
+
parseNodeTestOutput(stdout, stderr, file, exitCode) {
|
|
491
|
+
const output = `${stdout}\n${stderr}`;
|
|
492
|
+
const summary = new Map();
|
|
493
|
+
for (const match of output.matchAll(/^(?:#|ℹ) (tests|pass|fail|cancelled|skipped|todo) (\d+)\s*$/gm)) {
|
|
494
|
+
summary.set(match[1], Number(match[2]));
|
|
495
|
+
}
|
|
496
|
+
const total = summary.get('tests') ?? 0;
|
|
497
|
+
if (total === 0) {
|
|
498
|
+
return err(new Error(`node:test reported zero tests for ${file}`));
|
|
499
|
+
}
|
|
500
|
+
const passed = summary.get('pass') ?? 0;
|
|
501
|
+
const failed = summary.get('fail') ?? 0;
|
|
502
|
+
const skipped = (summary.get('skipped') ?? 0) +
|
|
503
|
+
(summary.get('cancelled') ?? 0) +
|
|
504
|
+
(summary.get('todo') ?? 0);
|
|
505
|
+
if (exitCode !== 0 && failed === 0) {
|
|
506
|
+
return err(new Error(`node:test exited with code ${exitCode ?? 'unknown'} for ${file}`));
|
|
507
|
+
}
|
|
508
|
+
const failedNames = [
|
|
509
|
+
...Array.from(output.matchAll(/^not ok \d+ - (.+)$/gm), match => match[1].trim()),
|
|
510
|
+
...Array.from(output.matchAll(/^✖ (.+?)(?: \(|$)/gm), match => match[1].trim()),
|
|
511
|
+
];
|
|
512
|
+
const failedTests = Array.from({ length: failed }, (_, index) => ({
|
|
513
|
+
testId: uuidv4(),
|
|
514
|
+
testName: failedNames[index] ?? `node:test failure ${index + 1}`,
|
|
515
|
+
file,
|
|
516
|
+
error: stderr.trim() || failedNames[index] || 'Test failed',
|
|
517
|
+
duration: 0,
|
|
518
|
+
}));
|
|
519
|
+
return ok({
|
|
520
|
+
total,
|
|
521
|
+
passed,
|
|
522
|
+
failed,
|
|
523
|
+
skipped,
|
|
524
|
+
failedTests,
|
|
525
|
+
coverage: undefined,
|
|
526
|
+
});
|
|
527
|
+
}
|
|
472
528
|
/**
|
|
473
529
|
* Parse vitest JSON output
|
|
474
530
|
*/
|
|
@@ -762,8 +818,7 @@ Provide:
|
|
|
762
818
|
return shards;
|
|
763
819
|
}
|
|
764
820
|
async executeWorker(files, _workerIndex, _isolation, request) {
|
|
765
|
-
|
|
766
|
-
return this.aggregateResults(results);
|
|
821
|
+
return this.executeTestFiles(files, request.framework, request.timeout ?? 30000);
|
|
767
822
|
}
|
|
768
823
|
aggregateResults(results) {
|
|
769
824
|
const aggregated = {
|
|
@@ -973,6 +1028,14 @@ Provide:
|
|
|
973
1028
|
statement: result.coverage.statement ?? 0,
|
|
974
1029
|
files: result.fileCoverages?.length ?? 0,
|
|
975
1030
|
}, { persist: true });
|
|
1031
|
+
if (Number.isFinite(result.coverage.line)) {
|
|
1032
|
+
await writeQualityEvidence(this.memory, {
|
|
1033
|
+
coverage: result.coverage.line,
|
|
1034
|
+
}, {
|
|
1035
|
+
measuredAt: new Date().toISOString(),
|
|
1036
|
+
source: 'test-execution coverage',
|
|
1037
|
+
});
|
|
1038
|
+
}
|
|
976
1039
|
// Store per-file coverage via memory.set() (not storeVector) so that
|
|
977
1040
|
// quality-analyzer's getStoredCoverage() can read it with memory.get()
|
|
978
1041
|
if (result.fileCoverages) {
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
* 3. Empty test bodies - it('...', () => {}) with no assertions
|
|
9
9
|
* 4. Mirrored assertions - expected values copy-pasted from source literals
|
|
10
10
|
*
|
|
11
|
-
*
|
|
11
|
+
* Detection is deterministic (TypeScript parser plus structural checks), with no LLM calls.
|
|
12
12
|
*/
|
|
13
|
-
export type TestQualityIssueType = 'no-source-import' | 'tautological-assertion' | 'empty-test-body' | 'mirrored-assertion';
|
|
13
|
+
export type TestQualityIssueType = 'syntax-error' | 'no-assertions' | 'no-source-import' | 'tautological-assertion' | 'empty-test-body' | 'mirrored-assertion';
|
|
14
14
|
export interface TestQualityIssue {
|
|
15
15
|
type: TestQualityIssueType;
|
|
16
16
|
severity: 'error' | 'warning';
|
|
@@ -35,6 +35,12 @@ export interface TestQualityGateConfig {
|
|
|
35
35
|
/** Minimum score to pass (default: 60) */
|
|
36
36
|
minPassScore: number;
|
|
37
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Return parser errors for generated JavaScript/TypeScript.
|
|
40
|
+
* This is deliberately exported so generation can reject malformed LLM output
|
|
41
|
+
* before replacing a valid deterministic template.
|
|
42
|
+
*/
|
|
43
|
+
export declare function getGeneratedTestSyntaxIssues(testCode: string, sourceFilePath: string): TestQualityIssue[];
|
|
38
44
|
export declare class TestQualityGate {
|
|
39
45
|
private readonly config;
|
|
40
46
|
constructor(config?: Partial<TestQualityGateConfig>);
|
|
@@ -8,8 +8,87 @@
|
|
|
8
8
|
* 3. Empty test bodies - it('...', () => {}) with no assertions
|
|
9
9
|
* 4. Mirrored assertions - expected values copy-pasted from source literals
|
|
10
10
|
*
|
|
11
|
-
*
|
|
11
|
+
* Detection is deterministic (TypeScript parser plus structural checks), with no LLM calls.
|
|
12
12
|
*/
|
|
13
|
+
import ts from 'typescript';
|
|
14
|
+
function scriptKindFor(filePath) {
|
|
15
|
+
if (/\.(?:jsx)$/i.test(filePath))
|
|
16
|
+
return ts.ScriptKind.JSX;
|
|
17
|
+
if (/\.(?:tsx)$/i.test(filePath))
|
|
18
|
+
return ts.ScriptKind.TSX;
|
|
19
|
+
if (/\.(?:js|mjs|cjs)$/i.test(filePath))
|
|
20
|
+
return ts.ScriptKind.JS;
|
|
21
|
+
return ts.ScriptKind.TS;
|
|
22
|
+
}
|
|
23
|
+
function isJavaScriptFamily(filePath) {
|
|
24
|
+
return /\.(?:tsx?|jsx?|mjs|cjs|mts|cts)$/i.test(filePath);
|
|
25
|
+
}
|
|
26
|
+
function parseGeneratedTest(testCode, sourceFilePath) {
|
|
27
|
+
const extension = sourceFilePath.match(/\.(?:tsx?|jsx?|mjs|cjs|mts|cts)$/i)?.[0] ?? '.ts';
|
|
28
|
+
return ts.createSourceFile(`generated.test${extension}`, testCode, ts.ScriptTarget.Latest, true, scriptKindFor(sourceFilePath));
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Return parser errors for generated JavaScript/TypeScript.
|
|
32
|
+
* This is deliberately exported so generation can reject malformed LLM output
|
|
33
|
+
* before replacing a valid deterministic template.
|
|
34
|
+
*/
|
|
35
|
+
export function getGeneratedTestSyntaxIssues(testCode, sourceFilePath) {
|
|
36
|
+
if (!isJavaScriptFamily(sourceFilePath))
|
|
37
|
+
return [];
|
|
38
|
+
const diagnostics = ts.transpileModule(testCode, {
|
|
39
|
+
fileName: sourceFilePath,
|
|
40
|
+
reportDiagnostics: true,
|
|
41
|
+
compilerOptions: {
|
|
42
|
+
jsx: ts.JsxEmit.Preserve,
|
|
43
|
+
module: ts.ModuleKind.ESNext,
|
|
44
|
+
target: ts.ScriptTarget.Latest,
|
|
45
|
+
},
|
|
46
|
+
}).diagnostics ?? [];
|
|
47
|
+
return diagnostics.map((diagnostic) => {
|
|
48
|
+
const position = diagnostic.file?.getLineAndCharacterOfPosition(diagnostic.start ?? 0);
|
|
49
|
+
return {
|
|
50
|
+
type: 'syntax-error',
|
|
51
|
+
severity: 'error',
|
|
52
|
+
line: position ? position.line + 1 : undefined,
|
|
53
|
+
description: `Generated test has invalid syntax: ${ts.flattenDiagnosticMessageText(diagnostic.messageText, ' ')}`,
|
|
54
|
+
suggestion: 'Repair the generated test syntax before accepting or executing it.',
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
function hasExecutableAssertion(testCode, sourceFilePath) {
|
|
59
|
+
if (!isJavaScriptFamily(sourceFilePath)) {
|
|
60
|
+
return /\b(?:assert\w*|expect)\s*(?:[.(])/i.test(testCode);
|
|
61
|
+
}
|
|
62
|
+
const sourceFile = parseGeneratedTest(testCode, sourceFilePath);
|
|
63
|
+
let found = false;
|
|
64
|
+
const visit = (node) => {
|
|
65
|
+
if (found)
|
|
66
|
+
return;
|
|
67
|
+
if (ts.isCallExpression(node)) {
|
|
68
|
+
const expression = node.expression;
|
|
69
|
+
if (ts.isIdentifier(expression)) {
|
|
70
|
+
found = expression.text === 'expect' || expression.text === 'assert';
|
|
71
|
+
}
|
|
72
|
+
else if (ts.isPropertyAccessExpression(expression)) {
|
|
73
|
+
let root = expression.expression;
|
|
74
|
+
while (ts.isPropertyAccessExpression(root))
|
|
75
|
+
root = root.expression;
|
|
76
|
+
if (ts.isIdentifier(root) && root.text === 'assert') {
|
|
77
|
+
found = true;
|
|
78
|
+
}
|
|
79
|
+
else if (ts.isIdentifier(root)
|
|
80
|
+
&& root.text === 'expect'
|
|
81
|
+
&& expression.name.text !== 'assertions'
|
|
82
|
+
&& expression.name.text !== 'hasAssertions') {
|
|
83
|
+
found = true;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
ts.forEachChild(node, visit);
|
|
88
|
+
};
|
|
89
|
+
visit(sourceFile);
|
|
90
|
+
return found;
|
|
91
|
+
}
|
|
13
92
|
const DEFAULT_CONFIG = {
|
|
14
93
|
checkSourceImports: true,
|
|
15
94
|
checkTautologicalAssertions: true,
|
|
@@ -34,7 +113,15 @@ export class TestQualityGate {
|
|
|
34
113
|
* @returns Gate result with pass/fail, issues, and score
|
|
35
114
|
*/
|
|
36
115
|
validate(testCode, sourceFilePath, sourceCode) {
|
|
37
|
-
const issues =
|
|
116
|
+
const issues = getGeneratedTestSyntaxIssues(testCode, sourceFilePath);
|
|
117
|
+
if (!hasExecutableAssertion(testCode, sourceFilePath)) {
|
|
118
|
+
issues.push({
|
|
119
|
+
type: 'no-assertions',
|
|
120
|
+
severity: 'error',
|
|
121
|
+
description: 'Generated test contains no executable assertions.',
|
|
122
|
+
suggestion: 'Add at least one assertion that observes behavior from the source under test.',
|
|
123
|
+
});
|
|
124
|
+
}
|
|
38
125
|
if (this.config.checkSourceImports) {
|
|
39
126
|
issues.push(...this.detectMissingSourceImports(testCode, sourceFilePath));
|
|
40
127
|
}
|
|
@@ -47,8 +134,10 @@ export class TestQualityGate {
|
|
|
47
134
|
if (this.config.checkMirroredAssertions && sourceCode) {
|
|
48
135
|
issues.push(...this.detectMirroredAssertions(testCode, sourceCode));
|
|
49
136
|
}
|
|
50
|
-
const
|
|
51
|
-
const
|
|
137
|
+
const mechanicallyInvalid = issues.some(issue => issue.type === 'syntax-error' || issue.type === 'no-assertions');
|
|
138
|
+
const hasError = issues.some(issue => issue.severity === 'error');
|
|
139
|
+
const score = mechanicallyInvalid ? 0 : this.calculateScore(issues);
|
|
140
|
+
const passed = !hasError && score >= this.config.minPassScore;
|
|
52
141
|
return { passed, issues, score };
|
|
53
142
|
}
|
|
54
143
|
// ============================================================================
|
|
@@ -157,21 +157,6 @@ export class BaseTestGenerator {
|
|
|
157
157
|
assertion: 'expect(action).toThrow();',
|
|
158
158
|
});
|
|
159
159
|
}
|
|
160
|
-
else {
|
|
161
|
-
// Function has no explicit throw — but may still crash on property access.
|
|
162
|
-
// Use try-catch pattern that accepts either behavior.
|
|
163
|
-
const undefinedCall = fn.isAsync
|
|
164
|
-
? `await ${fn.name}(${paramsWithUndefined})`
|
|
165
|
-
: `${fn.name}(${paramsWithUndefined})`;
|
|
166
|
-
testCases.push({
|
|
167
|
-
description: `should handle undefined ${param.name}`,
|
|
168
|
-
type: 'edge-case',
|
|
169
|
-
action: fn.isAsync
|
|
170
|
-
? `let threw = false;\n try {\n await ${fn.name}(${paramsWithUndefined});\n } catch (e) {\n threw = true;\n expect(e).toBeInstanceOf(Error);\n }`
|
|
171
|
-
: `let threw = false;\n try {\n ${fn.name}(${paramsWithUndefined});\n } catch (e) {\n threw = true;\n expect(e).toBeInstanceOf(Error);\n }`,
|
|
172
|
-
assertion: `expect(true).toBe(true); // function either handles undefined or throws TypeError`,
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
160
|
}
|
|
176
161
|
// Type-specific boundary tests
|
|
177
162
|
testCases.push(...this.generateBoundaryTestCases(fn, param));
|
|
@@ -214,16 +214,6 @@ ${importStatement}
|
|
|
214
214
|
code += ` expect(() => instance.${method.name}(${paramsWithUndefined})).toThrow();\n`;
|
|
215
215
|
code += ` });\n`;
|
|
216
216
|
}
|
|
217
|
-
else {
|
|
218
|
-
// Use try-catch to handle both throwing (TypeError from property access) and non-throwing
|
|
219
|
-
code += `\n it('should handle undefined ${param.name}', ${asyncPrefix}() => {\n`;
|
|
220
|
-
code += ` try {\n`;
|
|
221
|
-
code += ` ${method.isAsync ? 'await ' : ''}instance.${method.name}(${paramsWithUndefined});\n`;
|
|
222
|
-
code += ` } catch (e) {\n`;
|
|
223
|
-
code += ` expect(e).toBeInstanceOf(Error);\n`;
|
|
224
|
-
code += ` }\n`;
|
|
225
|
-
code += ` });\n`;
|
|
226
|
-
}
|
|
227
217
|
}
|
|
228
218
|
}
|
|
229
219
|
code += ` });\n\n`;
|
|
@@ -235,9 +225,10 @@ ${importStatement}
|
|
|
235
225
|
generateStubTests(context) {
|
|
236
226
|
const { moduleName, importPath, testType, patterns, dependencies, similarCode } = context;
|
|
237
227
|
const patternComment = this.generatePatternComment(patterns);
|
|
238
|
-
const
|
|
239
|
-
const
|
|
240
|
-
const
|
|
228
|
+
const moduleIdentifier = 'moduleUnderTest';
|
|
229
|
+
const basicOpsTest = this.generateBasicOpsTest(moduleIdentifier, patterns);
|
|
230
|
+
const edgeCaseTest = this.generateEdgeCaseTest(moduleIdentifier, patterns);
|
|
231
|
+
const errorHandlingTest = this.generateErrorHandlingTest(moduleIdentifier, patterns);
|
|
241
232
|
// KG: Generate mock declarations for external (non-relative) dependencies only
|
|
242
233
|
let mockDeclarations = '';
|
|
243
234
|
if (dependencies && dependencies.imports.length > 0) {
|
|
@@ -264,9 +255,9 @@ ${importStatement}
|
|
|
264
255
|
if (dependencies && dependencies.imports.length > 0) {
|
|
265
256
|
depTest += `\n it('should interact with dependencies correctly', () => {\n`;
|
|
266
257
|
depTest += ` // KG-informed: module depends on ${dependencies.imports.length} imports\n`;
|
|
267
|
-
depTest += ` const instance = typeof ${
|
|
268
|
-
depTest += ` ? new ${
|
|
269
|
-
depTest += ` : ${
|
|
258
|
+
depTest += ` const instance = typeof ${moduleIdentifier} === 'function'\n`;
|
|
259
|
+
depTest += ` ? new ${moduleIdentifier}()\n`;
|
|
260
|
+
depTest += ` : ${moduleIdentifier};\n`;
|
|
270
261
|
depTest += ` expect(instance).toBeDefined();\n`;
|
|
271
262
|
depTest += ` });\n`;
|
|
272
263
|
}
|
|
@@ -275,21 +266,21 @@ ${importStatement}
|
|
|
275
266
|
if (dependencies && dependencies.importedBy.length > 0) {
|
|
276
267
|
callerTest += `\n it('should expose stable API for ${dependencies.importedBy.length} consumers', () => {\n`;
|
|
277
268
|
callerTest += ` // KG-informed: used by ${dependencies.importedBy.slice(0, 3).join(', ')}\n`;
|
|
278
|
-
callerTest += ` const publicKeys = Object.keys(typeof ${
|
|
279
|
-
callerTest += ` ? ${
|
|
280
|
-
callerTest += ` : ${
|
|
269
|
+
callerTest += ` const publicKeys = Object.keys(typeof ${moduleIdentifier} === 'function'\n`;
|
|
270
|
+
callerTest += ` ? ${moduleIdentifier}.prototype || {}\n`;
|
|
271
|
+
callerTest += ` : ${moduleIdentifier});\n`;
|
|
281
272
|
callerTest += ` expect(publicKeys.length).toBeGreaterThan(0);\n`;
|
|
282
273
|
callerTest += ` });\n`;
|
|
283
274
|
}
|
|
284
275
|
const stubImportSource = this.framework === 'vitest' ? 'vitest' : '@jest/globals';
|
|
285
276
|
const stubMockImport = this.framework === 'vitest' ? ', vi' : ', jest';
|
|
286
|
-
return `${patternComment}import { describe, it, expect, beforeEach${stubMockImport} } from '${stubImportSource}';
|
|
287
|
-
import
|
|
288
|
-
${mockDeclarations}
|
|
289
|
-
describe('${moduleName}', () => {
|
|
290
|
-
${similarityComment} describe('${testType} tests', () => {
|
|
291
|
-
it('should be defined', () => {
|
|
292
|
-
expect(${
|
|
277
|
+
return `${patternComment}import { describe, it, expect, beforeEach${stubMockImport} } from '${stubImportSource}';
|
|
278
|
+
import * as ${moduleIdentifier} from '${importPath}';
|
|
279
|
+
${mockDeclarations}
|
|
280
|
+
describe('${moduleName}', () => {
|
|
281
|
+
${similarityComment} describe('${testType} tests', () => {
|
|
282
|
+
it('should be defined', () => {
|
|
283
|
+
expect(${moduleIdentifier}).toBeDefined();
|
|
293
284
|
});
|
|
294
285
|
|
|
295
286
|
${basicOpsTest}
|
|
@@ -20,6 +20,7 @@ import { TestDataGeneratorService } from './test-data-generator';
|
|
|
20
20
|
import { toError } from '../../../shared/error-utils.js';
|
|
21
21
|
import { safeJsonParse } from '../../../shared/safe-json.js';
|
|
22
22
|
import { TestQualityGate } from '../gates/index.js';
|
|
23
|
+
import { getGeneratedTestSyntaxIssues } from '../gates/test-quality-gate.js';
|
|
23
24
|
import { EdgeCaseInjector } from '../pattern-injection/index.js';
|
|
24
25
|
import { treeSitterRegistry } from '../../../shared/parsers/multi-language-parser.js';
|
|
25
26
|
import { getLanguageFromExtension } from '../../../shared/types/test-frameworks.js';
|
|
@@ -127,7 +128,7 @@ export class TestGeneratorService {
|
|
|
127
128
|
* Enhance generated test code using LLM
|
|
128
129
|
* Adds edge cases, improves assertions, and adds documentation
|
|
129
130
|
*/
|
|
130
|
-
async enhanceTestWithLLM(testCode, sourceCode, analysis, context) {
|
|
131
|
+
async enhanceTestWithLLM(testCode, sourceCode, analysis, sourceFilePath, context) {
|
|
131
132
|
if (!this.llmRouter)
|
|
132
133
|
return { code: testCode, enhanced: false };
|
|
133
134
|
try {
|
|
@@ -202,6 +203,10 @@ Return ONLY the enhanced test code, no explanations.`,
|
|
|
202
203
|
if (codeMatch) {
|
|
203
204
|
enhancedCode = codeMatch[1].trim();
|
|
204
205
|
}
|
|
206
|
+
if (getGeneratedTestSyntaxIssues(enhancedCode, sourceFilePath).length > 0) {
|
|
207
|
+
logger.warn('LLM enhancement produced invalid syntax, using deterministic template');
|
|
208
|
+
return { code: testCode, enhanced: false };
|
|
209
|
+
}
|
|
205
210
|
// #567: only claim enhancement when the model actually returned code.
|
|
206
211
|
// An empty/unusable response falls back to the template, and the caller
|
|
207
212
|
// must be told that is what happened.
|
|
@@ -465,7 +470,7 @@ Return a JSON array of test suggestions, each with: { "name": "test name", "desc
|
|
|
465
470
|
// report AI-enhanced output it did not produce.
|
|
466
471
|
let llmEnhanced = false;
|
|
467
472
|
if (this.isLLMEnhancementAvailable() && sourceContent) {
|
|
468
|
-
const result = await this.enhanceTestWithLLM(testCode, sourceContent, codeAnalysis, context);
|
|
473
|
+
const result = await this.enhanceTestWithLLM(testCode, sourceContent, codeAnalysis, sourceFile, context);
|
|
469
474
|
testCode = result.code;
|
|
470
475
|
llmEnhanced = result.enhanced;
|
|
471
476
|
}
|
|
@@ -85,7 +85,9 @@ export class HooksPhase extends BasePhase {
|
|
|
85
85
|
// - statusLine / includeCoAuthoredBy preserved when user-set (#362 follow-up)
|
|
86
86
|
// - AQE-owned sections deep-merged so user additions survive
|
|
87
87
|
const v3Sections = generateV3SettingsSections(config, projectRoot);
|
|
88
|
-
applyV3Sections(settings, v3Sections
|
|
88
|
+
applyV3Sections(settings, v3Sections, {
|
|
89
|
+
statusLine: !context.options.noStatusLine,
|
|
90
|
+
});
|
|
89
91
|
// Enable MCP servers (deduplicate, replace old 'aqe' with 'agentic-qe')
|
|
90
92
|
let existingMcp = settings.enabledMcpjsonServers || [];
|
|
91
93
|
// Remove legacy 'aqe' entry if present (renamed to 'agentic-qe')
|
|
@@ -139,6 +139,8 @@ export interface InitOptions {
|
|
|
139
139
|
* unchanged. Pairs naturally with `--no-database`.
|
|
140
140
|
*/
|
|
141
141
|
noClaude?: boolean;
|
|
142
|
+
/** Skip AQE's Claude Code status line and remove a previously AQE-owned one. */
|
|
143
|
+
noStatusLine?: boolean;
|
|
142
144
|
/** @deprecated Use default behavior instead — MCP is now enabled by default */
|
|
143
145
|
withMcp?: boolean;
|
|
144
146
|
/**
|
|
@@ -70,7 +70,9 @@ export declare function isAqeStatusLine(statusLine: unknown): boolean;
|
|
|
70
70
|
*
|
|
71
71
|
* Mutates and returns `settings`.
|
|
72
72
|
*/
|
|
73
|
-
export declare function applyV3Sections(settings: Record<string, unknown>, sections: Record<string, unknown
|
|
73
|
+
export declare function applyV3Sections(settings: Record<string, unknown>, sections: Record<string, unknown>, options?: {
|
|
74
|
+
statusLine?: boolean;
|
|
75
|
+
}): Record<string, unknown>;
|
|
74
76
|
/**
|
|
75
77
|
* Generate v3-specific settings sections for settings.json.
|
|
76
78
|
* These sections enable the self-learning system, status line, and permissions.
|
|
@@ -173,7 +173,7 @@ function isPlainObject(value) {
|
|
|
173
173
|
*
|
|
174
174
|
* Mutates and returns `settings`.
|
|
175
175
|
*/
|
|
176
|
-
export function applyV3Sections(settings, sections) {
|
|
176
|
+
export function applyV3Sections(settings, sections, options = {}) {
|
|
177
177
|
for (const [key, value] of Object.entries(sections)) {
|
|
178
178
|
if (key === '_aqePermissions') {
|
|
179
179
|
const existingPerms = settings.permissions || {};
|
|
@@ -182,6 +182,14 @@ export function applyV3Sections(settings, sections) {
|
|
|
182
182
|
settings.permissions = { ...existingPerms, allow: merged };
|
|
183
183
|
}
|
|
184
184
|
else if (key === 'statusLine') {
|
|
185
|
+
if (options.statusLine === false) {
|
|
186
|
+
// Opting out removes only AQE-owned configuration. A status line from
|
|
187
|
+
// the user or another tool remains outside AQE's ownership boundary.
|
|
188
|
+
if (isAqeStatusLine(settings.statusLine)) {
|
|
189
|
+
delete settings.statusLine;
|
|
190
|
+
}
|
|
191
|
+
continue;
|
|
192
|
+
}
|
|
185
193
|
// Preserve a user's (or another tool's) custom status line.
|
|
186
194
|
if (settings.statusLine === undefined || isAqeStatusLine(settings.statusLine)) {
|
|
187
195
|
settings.statusLine = value;
|
|
@@ -215,8 +223,6 @@ export function generateV3SettingsSections(config, projectRoot) {
|
|
|
215
223
|
statusLine: {
|
|
216
224
|
type: 'command',
|
|
217
225
|
command: 'sh -c \'node "${CLAUDE_PROJECT_DIR:-.}/.claude/helpers/statusline-v3.cjs" 2>/dev/null || echo "▊ Agentic QE v3"\'',
|
|
218
|
-
refreshMs: 5000,
|
|
219
|
-
enabled: true,
|
|
220
226
|
},
|
|
221
227
|
// permissions are union-merged in 07-hooks.ts — not set here to avoid overwriting user entries (#362)
|
|
222
228
|
_aqePermissions: [
|
|
@@ -237,6 +237,22 @@ export async function computeBatchEmbeddings(texts, config = {}) {
|
|
|
237
237
|
const uncachedTexts = [];
|
|
238
238
|
const uncachedIndices = [];
|
|
239
239
|
const results = new Array(texts.length).fill(null);
|
|
240
|
+
// Match computeRealEmbedding(): non-semantic inputs are represented by a
|
|
241
|
+
// zero vector and must never reach the model or its cache (#585).
|
|
242
|
+
const semanticIndices = [];
|
|
243
|
+
for (let i = 0; i < texts.length; i++) {
|
|
244
|
+
if (isNonSemanticText(texts[i])) {
|
|
245
|
+
results[i] = new Array(getEmbeddingDimension()).fill(0);
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
semanticIndices.push(i);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
// Preserve the single-item API's no-initialization behavior when every
|
|
252
|
+
// input is non-semantic.
|
|
253
|
+
if (semanticIndices.length === 0) {
|
|
254
|
+
return results;
|
|
255
|
+
}
|
|
240
256
|
// Init BEFORE cache lookup so the cache key namespace is stable.
|
|
241
257
|
if (!embeddingModel) {
|
|
242
258
|
await initializeModel(config);
|
|
@@ -245,7 +261,7 @@ export async function computeBatchEmbeddings(texts, config = {}) {
|
|
|
245
261
|
throw new Error('Embedding model failed to initialize');
|
|
246
262
|
}
|
|
247
263
|
if (fullConfig.enableCache) {
|
|
248
|
-
for (
|
|
264
|
+
for (const i of semanticIndices) {
|
|
249
265
|
const cached = embeddingCache.get(cacheKey(texts[i]));
|
|
250
266
|
if (cached && Date.now() - cached.timestamp < CACHE_TTL_MS) {
|
|
251
267
|
results[i] = cached.embedding;
|
|
@@ -257,8 +273,8 @@ export async function computeBatchEmbeddings(texts, config = {}) {
|
|
|
257
273
|
}
|
|
258
274
|
}
|
|
259
275
|
else {
|
|
260
|
-
|
|
261
|
-
|
|
276
|
+
for (const i of semanticIndices) {
|
|
277
|
+
uncachedTexts.push(texts[i]);
|
|
262
278
|
uncachedIndices.push(i);
|
|
263
279
|
}
|
|
264
280
|
}
|