agentic-qe 3.15.2 → 3.15.4
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/brain-checkpoint.cjs +46 -6
- package/.claude/hooks/aqe-hook.cjs +280 -51
- package/.claude/skills/skills-manifest.json +1 -1
- package/CHANGELOG.md +155 -0
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/adapters/ag-ui/state-delta-cache.js +14 -5
- package/dist/adapters/trajectory-adapter.js +3 -1
- package/dist/cli/bundle.js +5 -5
- package/dist/cli/chunks/adapter-T54G3TBK.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-664M7426.js → agent-booster-wasm-MHJBRXMK.js} +2 -2
- package/dist/cli/chunks/{agent-handler-E47ITH45.js → agent-handler-G64SD7J2.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-CFWVOJX3.js → agent-memory-branch-G4UXFPKH.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-HLCJJ3JM.js +2 -0
- package/dist/cli/chunks/{arena-ZU5CGBGH.js → arena-63M3M6EW.js} +2 -2
- package/dist/cli/chunks/{arena-JM3OY263.js → arena-QJMKYPHS.js} +4 -4
- package/dist/cli/chunks/{audit-HVBRC5AS.js → audit-UDFVTWSX.js} +3 -3
- package/dist/cli/chunks/base-VLD755UU.js +2 -0
- package/dist/cli/chunks/{better-sqlite3-45JLBQX3.js → better-sqlite3-JLX2G56I.js} +2 -2
- package/dist/cli/chunks/{brain-handler-FKDONZYA.js → brain-handler-PWF32LLW.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-M3DPS3D5.js → branch-enumerator-PB7QWXDP.js} +2 -2
- package/dist/cli/chunks/{browser-TG2TV6NR.js → browser-CYNV2F3U.js} +2 -2
- package/dist/cli/chunks/browser-workflow-6M6VLWRF.js +2 -0
- package/dist/cli/chunks/{chunk-JFFVYCTV.js → chunk-2534PXIV.js} +2 -2
- package/dist/cli/chunks/{chunk-GHXNRF63.js → chunk-2DRMTRBM.js} +2 -2
- package/dist/cli/chunks/{chunk-L77Z3Q6L.js → chunk-2ICC4H6K.js} +2 -2
- package/dist/cli/chunks/{chunk-EATZW5T2.js → chunk-2LL35V3A.js} +2 -2
- package/dist/cli/chunks/{chunk-MEUJWTOX.js → chunk-2MU4WCMQ.js} +2 -2
- package/dist/cli/chunks/{chunk-3RC5UMRJ.js → chunk-33IUCP34.js} +2 -2
- package/dist/cli/chunks/{chunk-UX4BOI6K.js → chunk-35A22AUL.js} +1 -1
- package/dist/cli/chunks/{chunk-Z7XCXHEB.js → chunk-3BDDOFYW.js} +2 -2
- package/dist/cli/chunks/chunk-3C2BFLYC.js +54 -0
- package/dist/cli/chunks/{chunk-56CE7UO4.js → chunk-3MSBVOYW.js} +6 -6
- package/dist/cli/chunks/{chunk-EDRIROCG.js → chunk-3ZIVBTX6.js} +2 -2
- package/dist/cli/chunks/{chunk-CRYZXTSQ.js → chunk-4GLR2S2M.js} +2 -2
- package/dist/cli/chunks/{chunk-DHSGCI6H.js → chunk-54ITMOFM.js} +6 -6
- package/dist/cli/chunks/{chunk-2AWU2E6R.js → chunk-54XTJBHV.js} +1 -1
- package/dist/cli/chunks/{chunk-JSTKSPYT.js → chunk-5B5D5KCV.js} +1 -1
- package/dist/cli/chunks/{chunk-NP2WWIZ3.js → chunk-5GWTJJEO.js} +1 -1
- package/dist/cli/chunks/{chunk-D75HDHX3.js → chunk-5H7MR6HP.js} +1 -1
- package/dist/cli/chunks/{chunk-NWYAV2UG.js → chunk-5SS2Z7JC.js} +2 -2
- package/dist/cli/chunks/chunk-5XXLWJU7.js +2 -0
- package/dist/cli/chunks/{chunk-B4H66LPR.js → chunk-6EHVPFHW.js} +1 -1
- package/dist/cli/chunks/{chunk-HSXLHNSS.js → chunk-6HO3XRXE.js} +2 -2
- package/dist/cli/chunks/chunk-6HTO4BLV.js +2 -0
- package/dist/cli/chunks/{chunk-SVHFSOGT.js → chunk-6QPW4OVH.js} +1 -1
- package/dist/cli/chunks/{chunk-BKZSTZDB.js → chunk-6TMUZGM2.js} +1 -1
- package/dist/cli/chunks/{chunk-2AOAEMJG.js → chunk-73MTUM6F.js} +2 -2
- package/dist/cli/chunks/{chunk-ANI3KPB7.js → chunk-73PCVMGA.js} +2 -2
- package/dist/cli/chunks/{chunk-HADOG2PT.js → chunk-76PRW2KY.js} +2 -2
- package/dist/cli/chunks/{chunk-NL6HKEPR.js → chunk-7INP6HZH.js} +3 -3
- package/dist/cli/chunks/{chunk-QB7H62A4.js → chunk-7X2IVMXN.js} +2 -2
- package/dist/cli/chunks/{chunk-ZVQSIH7Y.js → chunk-A4OPQJ4A.js} +8 -8
- package/dist/cli/chunks/{chunk-SKQTRYE7.js → chunk-ADF6LGHZ.js} +2 -2
- package/dist/cli/chunks/{chunk-5YS2DF5G.js → chunk-AHVN3UQZ.js} +2 -2
- package/dist/cli/chunks/{chunk-3XF7YTQC.js → chunk-AOKSLWON.js} +54 -54
- package/dist/cli/chunks/{chunk-CFDIYZGA.js → chunk-ASKPTGUU.js} +2 -2
- package/dist/cli/chunks/{chunk-LH3H4V7C.js → chunk-B7GJXQD2.js} +2 -2
- package/dist/cli/chunks/{chunk-HOBBYORR.js → chunk-B7J3O2WM.js} +1 -1
- package/dist/cli/chunks/{chunk-J4EJMAH3.js → chunk-BBKLVHDQ.js} +1 -1
- package/dist/cli/chunks/{chunk-WMNVFCKY.js → chunk-BND6M2JX.js} +2 -2
- package/dist/cli/chunks/{chunk-LRVR56PD.js → chunk-BPGFCUDO.js} +1 -1
- package/dist/cli/chunks/{chunk-O6QTCUSL.js → chunk-BY3IL56R.js} +1 -1
- package/dist/cli/chunks/{chunk-3KXKJSKS.js → chunk-BY5PLEPZ.js} +32 -32
- package/dist/cli/chunks/{chunk-DGKPGRBT.js → chunk-BZWZTGMF.js} +2 -2
- package/dist/cli/chunks/{chunk-AS27JP67.js → chunk-C5EN5WB6.js} +1 -1
- package/dist/cli/chunks/chunk-CFXFGQEN.js +15 -0
- package/dist/cli/chunks/{chunk-X4CADOSD.js → chunk-CQ3WSTJ2.js} +2 -2
- package/dist/cli/chunks/{chunk-HFF5ERIE.js → chunk-D7RVZ5C2.js} +2 -2
- package/dist/cli/chunks/{chunk-HS3O763N.js → chunk-DAYMT7TH.js} +21 -21
- package/dist/cli/chunks/{chunk-W6PLBRRS.js → chunk-DBIK4OFX.js} +1 -1
- package/dist/cli/chunks/{chunk-OWZ3F7DJ.js → chunk-DEJM2P5K.js} +1 -1
- package/dist/cli/chunks/{chunk-TC4B5D4Z.js → chunk-DF4Y3HPO.js} +1 -1
- package/dist/cli/chunks/{chunk-7UA7SMM4.js → chunk-DFJGXXCL.js} +1 -1
- package/dist/cli/chunks/{chunk-SZYK5JL7.js → chunk-DPL4ZXTE.js} +1 -1
- package/dist/cli/chunks/{chunk-6WVEICL2.js → chunk-DVE5SM5G.js} +4 -4
- package/dist/cli/chunks/{chunk-QR5ILM34.js → chunk-EGHK6NMH.js} +2 -2
- package/dist/cli/chunks/{chunk-E6GANSLP.js → chunk-EWUFVWRT.js} +2 -2
- package/dist/cli/chunks/{chunk-HBMBO4FD.js → chunk-EY5IUF7U.js} +2 -2
- package/dist/cli/chunks/{chunk-JCB6K24D.js → chunk-FDK2GF4G.js} +2 -2
- package/dist/cli/chunks/{chunk-QZNFZ5IQ.js → chunk-FRBCX46J.js} +2 -2
- package/dist/cli/chunks/{chunk-FCMCQ6OX.js → chunk-G3ZUB3HD.js} +2 -2
- package/dist/cli/chunks/{chunk-QGCFMACF.js → chunk-GAXTPQCZ.js} +2 -2
- package/dist/cli/chunks/{chunk-6O4KVU4K.js → chunk-GJVRQBLI.js} +2 -2
- package/dist/cli/chunks/{chunk-NLY5NUHZ.js → chunk-GLKLEHK3.js} +2 -2
- package/dist/cli/chunks/{chunk-IM67YHDK.js → chunk-HCDTLV5J.js} +2 -2
- package/dist/cli/chunks/{chunk-MY2XZHW3.js → chunk-HEDLZWPM.js} +1 -1
- package/dist/cli/chunks/{chunk-WUSSZ2S6.js → chunk-HEKCN5XQ.js} +2 -2
- package/dist/cli/chunks/{chunk-FRZVLRVR.js → chunk-HFSBONCS.js} +2 -2
- package/dist/cli/chunks/{chunk-IAOB2G3X.js → chunk-HX5KQK7I.js} +2 -2
- package/dist/cli/chunks/{chunk-BT6TZTCL.js → chunk-I43QRLLB.js} +2 -2
- package/dist/cli/chunks/{chunk-QJN5RW2U.js → chunk-I53365HG.js} +3 -3
- package/dist/cli/chunks/{chunk-55T7PDYP.js → chunk-I5A3HGO6.js} +2 -2
- package/dist/cli/chunks/{chunk-AR5V7VNC.js → chunk-I6E4X3L3.js} +1 -1
- package/dist/cli/chunks/chunk-IKWAPHJA.js +2 -0
- package/dist/cli/chunks/{chunk-UKRK3IE3.js → chunk-ISASRHZP.js} +2 -2
- package/dist/cli/chunks/{chunk-IHKRKRAV.js → chunk-J3RNVHDH.js} +1 -1
- package/dist/cli/chunks/{chunk-T75PWWK4.js → chunk-JFQDWAU3.js} +2 -2
- package/dist/cli/chunks/{chunk-3KTAMNKI.js → chunk-JL3TI43V.js} +2 -2
- package/dist/cli/chunks/{chunk-3DCRAW43.js → chunk-K2VUYRMG.js} +2 -2
- package/dist/cli/chunks/{chunk-RIAKRZCZ.js → chunk-KOLHZSEC.js} +2 -2
- package/dist/cli/chunks/{chunk-HXT4XDQO.js → chunk-LGA6J4I4.js} +2 -2
- package/dist/cli/chunks/{chunk-MDDECCAC.js → chunk-LJRZAALA.js} +169 -168
- package/dist/cli/chunks/{chunk-2B2MGJ2W.js → chunk-LOLAEDZD.js} +2 -2
- package/dist/cli/chunks/{chunk-2JEPRQMT.js → chunk-LPSE6DOQ.js} +1 -1
- package/dist/cli/chunks/{chunk-6KEYA4EH.js → chunk-LRTF5RMG.js} +4 -4
- package/dist/cli/chunks/{chunk-CV7E627D.js → chunk-LXYTC62V.js} +2 -2
- package/dist/cli/chunks/{chunk-YYVLMW65.js → chunk-LY53L6NH.js} +2 -2
- package/dist/cli/chunks/{chunk-HMDSBWF6.js → chunk-LZSLJJII.js} +2 -2
- package/dist/cli/chunks/{chunk-IT753IPZ.js → chunk-M6SJALLA.js} +2 -2
- package/dist/cli/chunks/{chunk-GDSLQTJC.js → chunk-MBV57LKC.js} +2 -2
- package/dist/cli/chunks/{chunk-I7J2ESGR.js → chunk-MGH4XIHH.js} +2 -2
- package/dist/cli/chunks/{chunk-Q32UGPWK.js → chunk-MVTUFPM2.js} +2 -2
- package/dist/cli/chunks/{chunk-UZL4JYVW.js → chunk-N6CRIUTO.js} +2 -2
- package/dist/cli/chunks/{chunk-326V7N25.js → chunk-NBMQOP2R.js} +1 -1
- package/dist/cli/chunks/{chunk-ZIKH7U5A.js → chunk-NIJMLEAX.js} +2 -2
- package/dist/cli/chunks/{chunk-MYDZBABD.js → chunk-O7TMY4GS.js} +2 -2
- package/dist/cli/chunks/{chunk-LVDZ25VX.js → chunk-OFQDM73J.js} +2 -2
- package/dist/cli/chunks/{chunk-WBZIOTY6.js → chunk-OG4KHX7S.js} +2 -2
- package/dist/cli/chunks/{chunk-GJTH6VBH.js → chunk-OHH6BUZK.js} +1 -1
- package/dist/cli/chunks/{chunk-T5N2PIPS.js → chunk-OOK6GPJR.js} +2 -2
- package/dist/cli/chunks/{chunk-AXJ75X6I.js → chunk-P7GM3EE7.js} +1 -1
- package/dist/cli/chunks/{chunk-IQB5ZBYO.js → chunk-PB2WSCBW.js} +3 -3
- package/dist/cli/chunks/{chunk-M36DAETL.js → chunk-PCWZCXBD.js} +2 -2
- package/dist/cli/chunks/{chunk-Z3PANQUT.js → chunk-PEA4DVXW.js} +1 -1
- package/dist/cli/chunks/{chunk-WBCE6V2N.js → chunk-PJAXWCFC.js} +1 -1
- package/dist/cli/chunks/{chunk-V67UQRQN.js → chunk-PMXWDTDK.js} +2 -2
- package/dist/cli/chunks/chunk-QIAX3JJB.js +3 -0
- package/dist/cli/chunks/chunk-R47LNH5W.js +2 -0
- package/dist/cli/chunks/{chunk-A6L2OCMO.js → chunk-RA3MI5WK.js} +2 -2
- package/dist/cli/chunks/{chunk-ITM26I6O.js → chunk-RB2SL5GD.js} +2 -2
- package/dist/cli/chunks/{chunk-XQBH3366.js → chunk-RG67RZIX.js} +2 -2
- package/dist/cli/chunks/{chunk-NBV37CEK.js → chunk-RI4JPBZD.js} +2 -2
- package/dist/cli/chunks/{chunk-2Q4Y3VQ6.js → chunk-RJ5CZ7B6.js} +2 -2
- package/dist/cli/chunks/{chunk-ATGIGJSL.js → chunk-RJMBHZYL.js} +1 -1
- package/dist/cli/chunks/{chunk-MOSXT6AO.js → chunk-RWZ4F44Y.js} +2 -2
- package/dist/cli/chunks/{chunk-URWT3EQT.js → chunk-S5D3HCGN.js} +2 -2
- package/dist/cli/chunks/{chunk-KQMCCHPO.js → chunk-SCL2OYN7.js} +2 -2
- package/dist/cli/chunks/{chunk-Y5VPLOA7.js → chunk-SIUUAKCE.js} +1 -1
- package/dist/cli/chunks/{chunk-JIRX6KUR.js → chunk-SJB4KMZS.js} +3 -3
- package/dist/cli/chunks/{chunk-TZH2QAFZ.js → chunk-SOSJFEFB.js} +2 -2
- package/dist/cli/chunks/{chunk-IBAXNCR2.js → chunk-SZWXUG36.js} +2 -2
- package/dist/cli/chunks/{chunk-KTLYL3BS.js → chunk-T3BMCEQR.js} +2 -2
- package/dist/cli/chunks/chunk-TB22Y3WW.js +4 -0
- package/dist/cli/chunks/{chunk-GJ7DON5S.js → chunk-TVQPYP2Z.js} +3 -3
- package/dist/cli/chunks/chunk-U2E5F3VZ.js +14 -0
- package/dist/cli/chunks/{chunk-ZSKQPXRW.js → chunk-UK5HY6LC.js} +1 -1
- package/dist/cli/chunks/{chunk-RO6HAZLV.js → chunk-UORI2CZ4.js} +1 -1
- package/dist/cli/chunks/{chunk-VTGAPHJE.js → chunk-V3NZ23X6.js} +2 -2
- package/dist/cli/chunks/{chunk-W7P7EOJ4.js → chunk-VAXQUD5G.js} +1 -1
- package/dist/cli/chunks/{chunk-EQG3JYSV.js → chunk-VMSO6DMF.js} +2 -2
- package/dist/cli/chunks/{chunk-6UO5YSNN.js → chunk-W3PPYNHF.js} +2 -2
- package/dist/cli/chunks/{chunk-FH6N2LKG.js → chunk-W6TJXK5Y.js} +2 -2
- package/dist/cli/chunks/{chunk-WJ7657IX.js → chunk-WEDVLKRB.js} +2 -2
- package/dist/cli/chunks/{chunk-N653RGT3.js → chunk-WI5AEB7Q.js} +2 -2
- package/dist/cli/chunks/{chunk-W5EKSBS4.js → chunk-WO4NSPLX.js} +2 -2
- package/dist/cli/chunks/{chunk-YH7VOLBP.js → chunk-WW6WUMS7.js} +2 -2
- package/dist/cli/chunks/{chunk-6OL2WES5.js → chunk-WYO5VN2L.js} +1 -1
- package/dist/cli/chunks/{chunk-PZK7O445.js → chunk-X5S5UEM6.js} +2 -2
- package/dist/cli/chunks/{chunk-NKWMTXBL.js → chunk-XHCCH7UC.js} +3 -3
- package/dist/cli/chunks/{chunk-GSC6JXDE.js → chunk-XKIFNKHV.js} +1 -1
- package/dist/cli/chunks/{chunk-FNPZINHV.js → chunk-XZ5Z56OP.js} +1 -1
- package/dist/cli/chunks/{chunk-6XLCFDIB.js → chunk-YQ6BK7QC.js} +2 -2
- package/dist/cli/chunks/{chunk-DNS37AHW.js → chunk-YUWUFYHK.js} +1 -1
- package/dist/cli/chunks/{chunk-YJSKT6G6.js → chunk-YZ2AGC7O.js} +1 -1
- package/dist/cli/chunks/{chunk-5TEPPW4J.js → chunk-Z56QTRRB.js} +2 -2
- package/dist/cli/chunks/{chunk-4MCO43NX.js → chunk-ZAOQIVHG.js} +4 -4
- package/dist/cli/chunks/{chunk-TMYGGYRY.js → chunk-ZF5JTQEE.js} +1 -1
- package/dist/cli/chunks/{chunk-HYWW4A2E.js → chunk-ZKXZTIVF.js} +2 -2
- package/dist/cli/chunks/{chunk-N4MNSEKY.js → chunk-ZP6ANUP7.js} +1 -1
- package/dist/cli/chunks/{chunk-5DFPAJ5O.js → chunk-ZURYZEHX.js} +2 -2
- package/dist/cli/chunks/{ci-JNBOR6FP.js → ci-NGMGB43T.js} +3 -3
- package/dist/cli/chunks/{ci-output-FYNKONEQ.js → ci-output-BMJABAEX.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-KOIXRDAD.js → circuit-breaker-GYD5CMJQ.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-4CO7KHRN.js → claude-flow-setup-MMOYVBVD.js} +2 -2
- package/dist/cli/chunks/client-FUHNNK5O.js +2 -0
- package/dist/cli/chunks/{cline-installer-CMYAPKK5.js → cline-installer-B2SOZ44R.js} +2 -2
- package/dist/cli/chunks/{code-WFIAEP3H.js → code-V3FIRAXD.js} +3 -3
- package/dist/cli/chunks/{code-index-extractor-IYM6HWJN.js → code-index-extractor-CV6A756Z.js} +2 -2
- package/dist/cli/chunks/{codex-installer-DORVWRSU.js → codex-installer-EUC6J47Y.js} +2 -2
- package/dist/cli/chunks/{completions-54VM2MX2.js → completions-DQQIBAHR.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-EGZDP5N4.js → complexity-analyzer-HPXMXP5I.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-4SDVDD4T.js → continuedev-installer-RCIYXH6V.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-7FJQ7PCL.js → copilot-installer-VUH32SHF.js} +2 -2
- package/dist/cli/chunks/core-handlers-F7TLX4LM.js +2 -0
- package/dist/cli/chunks/cost-tracker-YLCKLOAL.js +2 -0
- package/dist/cli/chunks/{coverage-DI5LDRJ7.js → coverage-IVKDV236.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-EGWPY67O.js +2 -0
- package/dist/cli/chunks/{cursor-installer-RTSZP5YD.js → cursor-installer-B42FN62K.js} +2 -2
- package/dist/cli/chunks/{daemon-SP3APEZY.js → daemon-DECQRQII.js} +3 -3
- package/dist/cli/chunks/{daemon-LM7LETPV.js → daemon-IPTOSCHM.js} +4 -4
- package/dist/cli/chunks/{dag-attention-scheduler-C3QBODFE.js → dag-attention-scheduler-RY7CDYSC.js} +2 -2
- package/dist/cli/chunks/{detect-I4RBUFFJ.js → detect-NW53BMJN.js} +2 -2
- package/dist/cli/chunks/{dist-node-PT6TCBCO.js → dist-node-LE6KHXAB.js} +2 -2
- package/dist/cli/chunks/{domain-handler-MJMTMB5X.js → domain-handler-JGXFT4LW.js} +2 -2
- package/dist/cli/chunks/{domain-plugins-Y4A2WYJW.js → domain-plugins-GY3RYKKK.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-DUO42TLA.js → domain-transfer-CGBRXNTC.js} +2 -2
- package/dist/cli/chunks/dream-V4QN6OF5.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-66ZQK4AI.js → embed-and-insert-pattern-65H4XHWR.js} +2 -2
- package/dist/cli/chunks/{eval-NQ7H27UF.js → eval-YPYIZQUR.js} +2 -2
- package/dist/cli/chunks/{experience-capture-middleware-MHEYPTIG.js → experience-capture-middleware-4JXVF5PL.js} +3 -3
- package/dist/cli/chunks/{fast-paths-YYDGN6ZC.js → fast-paths-HYQTAF2S.js} +2 -2
- package/dist/cli/chunks/{feature-flags-FY4DOYS2.js → feature-flags-HNSAFFX2.js} +2 -2
- package/dist/cli/chunks/{feature-flags-YFGUORHY.js → feature-flags-YACUH6OW.js} +2 -2
- package/dist/cli/chunks/{file-discovery-TOMDY7TK.js → file-discovery-R73BYEXB.js} +2 -2
- package/dist/cli/chunks/{fleet-MO3UCWB4.js → fleet-6M3BP4OO.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-SLW4PPXQ.js → gnn-wrapper-QLD7KHXV.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-36RFCP4E.js → heartbeat-handler-EZP333X4.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-3N3L6CRM.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-2BXJYDXI.js +2 -0
- package/dist/cli/chunks/hnsw-index-2DLI5OVO.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-BJLWBKHE.js → hnsw-legacy-bridge-47CUCSAU.js} +2 -2
- package/dist/cli/chunks/{hnswlib-node-RAYNVJCJ.js → hnswlib-node-SVNYDJZH.js} +2 -2
- package/dist/cli/chunks/{hooks-JMHFWVEQ.js → hooks-6V5LMWP6.js} +10 -10
- package/dist/cli/chunks/hybrid-backend-OW4J65YH.js +2 -0
- package/dist/cli/chunks/{hypergraph-engine-JUDBKPOX.js → hypergraph-engine-L2FOBIFF.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-AXTWXOZU.js → hypergraph-handler-DU6Z57EE.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-ZH5I2RG6.js +2 -0
- package/dist/cli/chunks/{init-handler-PARJNZFF.js → init-handler-HETPWU67.js} +6 -6
- package/dist/cli/chunks/init-wizard-NIKM3ZOK.js +2 -0
- package/dist/cli/chunks/kernel-2EOSVM6X.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-22HX2E4V.js → kilocode-installer-NHKYGJ7Q.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-OVPBLY7J.js → kiro-installer-24UK6GGR.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-D3BPWNNO.js +2 -0
- package/dist/cli/chunks/{learning-DWXPJ3R6.js → learning-QLVRZNHT.js} +3 -3
- package/dist/cli/chunks/{llm-router-7PPVVKNG.js → llm-router-XRMI2VMG.js} +4 -4
- package/dist/cli/chunks/llm-router-service-TJPPZFUN.js +2 -0
- package/dist/cli/chunks/{load-VI5XHNZA.js → load-W5UWL5C7.js} +2 -2
- package/dist/cli/chunks/load-test-RFT7IDOL.js +2 -0
- package/dist/cli/chunks/{mcp-UW4Z3Z64.js → mcp-N7ALQ4BL.js} +2 -2
- package/dist/cli/chunks/{memory-UD2KCB5M.js → memory-WV52DLSA.js} +5 -5
- package/dist/cli/chunks/memory-backend-O2O4CFKZ.js +2 -0
- package/dist/cli/chunks/memory-handlers-DAEGUDBD.js +2 -0
- package/dist/cli/chunks/{multi-model-executor-5O4WWU5Z.js → multi-model-executor-3FVTZCSO.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-DTRFDGM7.js → opencode-installer-NTPWGHUW.js} +2 -2
- package/dist/cli/chunks/{orchestrator-ENJIKV6Z.js → orchestrator-ORGJ6VAA.js} +85 -26
- package/dist/cli/chunks/pattern-null-store-TUBNXS34.js +2 -0
- package/dist/cli/chunks/{pattern-usage-recorder-QPNIU5PD.js → pattern-usage-recorder-WWXHUH5U.js} +2 -2
- package/dist/cli/chunks/{pipeline-G3JYDNPE.js → pipeline-ZOKZFXTH.js} +2 -2
- package/dist/cli/chunks/{platform-P4WR6N3D.js → platform-CDNL322F.js} +2 -2
- package/dist/cli/chunks/{plugin-C7763Q5W.js → plugin-ZVLFNZZ4.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-DH6R3XSZ.js → prime-radiant-advanced-wasm-FVJDU2JY.js} +2 -2
- package/dist/cli/chunks/{project-root-7DTXDLEG.js → project-root-UCHQH3QL.js} +2 -2
- package/dist/cli/chunks/protocol-executor-6FQTTO3Y.js +2 -0
- package/dist/cli/chunks/{protocol-handler-EODULGOZ.js → protocol-handler-4YBN5R23.js} +2 -2
- package/dist/cli/chunks/{prove-A7G3SIOF.js → prove-BHDHY664.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-TKPND56C.js +2 -0
- package/dist/cli/chunks/{quality-JTURFUX3.js → quality-46AK277P.js} +2 -2
- package/dist/cli/chunks/{quality-gate-M2EI754V.js → quality-gate-WANE7TCN.js} +3 -3
- package/dist/cli/chunks/queen-coordinator-DWMXLPJG.js +2 -0
- package/dist/cli/chunks/{real-embeddings-DI7JMCG7.js → real-embeddings-56MNGJGJ.js} +2 -2
- package/dist/cli/chunks/{ref-validation-MSFMNKDR.js → ref-validation-S7UWXQIP.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-XIMFFHOH.js → roocode-installer-TEYOQYL6.js} +2 -2
- package/dist/cli/chunks/router-QIMUYRCC.js +2 -0
- package/dist/cli/chunks/routing-feedback-4OH5ZNF4.js +2 -0
- package/dist/cli/chunks/{routing-handler-MCDKNBQW.js → routing-handler-KDTLMRWD.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-OBSYAK2X.js → ruvector-commands-AOUDXCYE.js} +2 -2
- package/dist/cli/chunks/rvf-dual-writer-S6JBZL54.js +2 -0
- package/dist/cli/chunks/rvf-migration-adapter-TSGMLMYR.js +2 -0
- package/dist/cli/chunks/{rvf-migration-coordinator-4DTRIHY6.js → rvf-migration-coordinator-V74MVBHS.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-Z7QOW47S.js +2 -0
- package/dist/cli/chunks/{rvf-store-integrity-CWAVMRC4.js → rvf-store-integrity-QI47Y354.js} +2 -2
- package/dist/cli/chunks/safe-db-JLOVBJNC.js +2 -0
- package/dist/cli/chunks/schedule-IM6XOBGR.js +2 -0
- package/dist/cli/chunks/scheduler-XL2SVVK5.js +2 -0
- package/dist/cli/chunks/{security-74TWSO74.js → security-SN6MWOJT.js} +3 -3
- package/dist/cli/chunks/{shared-rvf-adapter-ZHNAGE5H.js → shared-rvf-adapter-2LB56LP4.js} +2 -2
- package/dist/cli/chunks/{shared-rvf-dual-writer-BS5WAVCC.js → shared-rvf-dual-writer-WU7PFKQM.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-LWMIIC4U.js +2 -0
- package/dist/cli/chunks/{standalone-memory-3HGHTE7S.js → standalone-memory-F6FSRFWC.js} +2 -2
- package/dist/cli/chunks/{status-handler-XWEEGNGH.js → status-handler-DHD5MS4G.js} +2 -2
- package/dist/cli/chunks/{structural-health-TB5JGMVS.js → structural-health-P6HPSQMR.js} +2 -2
- package/dist/cli/chunks/{sync-T4VLBURM.js → sync-LISJGDSE.js} +2 -2
- package/dist/cli/chunks/sync-SNAXAVCN.js +2 -0
- package/dist/cli/chunks/{task-handler-RQ65QKXX.js → task-handler-ZT44NT5Z.js} +2 -2
- package/dist/cli/chunks/{task-handlers-USYWJ4H2.js → task-handlers-R6DQ5324.js} +3 -3
- package/dist/cli/chunks/test-MUFHR4JQ.js +34 -0
- package/dist/cli/chunks/test-scheduling-TAUSLZJP.js +15 -0
- package/dist/cli/chunks/token-bootstrap-UGRH7OPU.js +2 -0
- package/dist/cli/chunks/{token-usage-CISTB5K5.js → token-usage-IX65ECBR.js} +2 -2
- package/dist/cli/chunks/{transformers-C7LV763N.js → transformers-QKPSVW2W.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-P26JC3YV.js → tree-sitter-wasm-parser-Z7PPA2JO.js} +2 -2
- package/dist/cli/chunks/{types-YMVMKIWB.js → types-ULNNGGGH.js} +2 -2
- package/dist/cli/chunks/unified-memory-F5IJY7W7.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-C3WAMAQL.js +2 -0
- package/dist/cli/chunks/unified-persistence-EWXXOTCB.js +2 -0
- package/dist/cli/chunks/{upgrade-U2REOPAW.js → upgrade-ECI3YUYA.js} +2 -2
- package/dist/cli/chunks/{validate-NDTCKN7P.js → validate-3JKRUW2S.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-OJUGVH5Q.js → validate-swarm-LZWANCIE.js} +2 -2
- package/dist/cli/chunks/visual-security-CKLTAIAB.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-2CLRSA7K.js → web-tree-sitter-N5V4A6XG.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-DSUJJ4PG.js → windsurf-installer-5TBM5B3C.js} +2 -2
- package/dist/cli/chunks/{witness-chain-TEGL4ZWB.js → witness-chain-MFP3HBWQ.js} +2 -2
- package/dist/cli/chunks/witness-chain-Z6LWFEZS.js +2 -0
- package/dist/cli/chunks/witness-chain-repair-5QWRFVUK.js +2 -0
- package/dist/cli/chunks/{witness-chain-verifier-SPXKFC67.js → witness-chain-verifier-SRAT7LVY.js} +2 -2
- package/dist/cli/chunks/{witness-key-manager-EALOV4OV.js → witness-key-manager-FYZXQTLJ.js} +2 -2
- package/dist/cli/chunks/{workflow-PYI6HCAG.js → workflow-M7TUYYXY.js} +5 -5
- package/dist/cli/chunks/workflow-orchestrator-OFTAR2NA.js +2 -0
- package/dist/cli/chunks/wrappers-COU73OQ6.js +2 -0
- package/dist/cli/commands/test.js +30 -12
- package/dist/cli/commands/workflow.js +3 -0
- package/dist/cli/scheduler/persistent-scheduler.d.ts +2 -0
- package/dist/cli/scheduler/persistent-scheduler.js +12 -2
- package/dist/cli/utils/generated-test-writer.d.ts +35 -0
- package/dist/cli/utils/generated-test-writer.js +44 -0
- package/dist/context/compiler.js +4 -1
- package/dist/coordination/consensus/providers/ollama-provider.js +16 -27
- package/dist/coordination/consensus/providers/openrouter-provider.js +13 -24
- package/dist/coordination/handlers/test-execution-handlers.js +4 -2
- package/dist/coordination/protocols/defect-investigation.js +4 -1
- package/dist/domains/code-intelligence/services/metric-collector/listing-process-owner.d.ts +3 -0
- package/dist/domains/code-intelligence/services/metric-collector/listing-process-owner.js +57 -0
- package/dist/domains/code-intelligence/services/metric-collector/test-counter.js +127 -39
- package/dist/domains/coverage-analysis/services/gap-detector.js +3 -1
- package/dist/domains/learning-optimization/services/learning-coordinator.js +4 -2
- package/dist/domains/test-execution/services/flaky-detector.js +8 -2
- package/dist/domains/test-execution/services/retry-handler.js +23 -20
- package/dist/domains/test-execution/services/test-executor.js +5 -2
- package/dist/domains/test-generation/services/test-generator.js +5 -2
- package/dist/governance/compliance-reporter.js +8 -7
- package/dist/governance/proof-envelope-integration.js +3 -1
- package/dist/init/phases/07-hooks.js +30 -4
- package/dist/init/phases/10-workers.js +42 -6
- package/dist/integrations/agentic-flow/onnx-embeddings/embedding-generator.d.ts +4 -1
- package/dist/integrations/agentic-flow/onnx-embeddings/embedding-generator.js +6 -2
- package/dist/integrations/browser/qe-dashboard/wasm-vector-store.js +2 -1
- package/dist/integrations/ruvector/coverage-router.d.ts +3 -1
- package/dist/integrations/ruvector/coverage-router.js +7 -6
- package/dist/integrations/ruvector/diff-risk-classifier.js +5 -4
- package/dist/integrations/ruvector/rvf-dual-writer.js +10 -1
- package/dist/integrations/vibium/runtime.js +2 -6
- package/dist/learning/dream/dream-engine.d.ts +5 -0
- package/dist/learning/dream/dream-engine.js +20 -3
- package/dist/learning/embedding-space.d.ts +18 -0
- package/dist/learning/embedding-space.js +33 -0
- package/dist/learning/rvf-pattern-store.js +19 -5
- package/dist/mcp/bundle.js +442 -441
- package/dist/mcp/handlers/domain-handler-configs.d.ts +42 -0
- package/dist/mcp/handlers/handler-factory.js +3 -1
- package/dist/mcp/handlers/save-results-option.d.ts +62 -0
- package/dist/mcp/handlers/save-results-option.js +35 -0
- package/dist/mcp/protocol-server.js +22 -11
- package/dist/mcp/security/rate-limiter.d.ts +8 -1
- package/dist/mcp/security/rate-limiter.js +33 -4
- package/dist/mcp/services/session-resume.js +11 -0
- package/dist/mcp/services/session-store.d.ts +31 -2
- package/dist/mcp/services/session-store.js +95 -16
- package/dist/mcp/services/session-write-buffer.d.ts +55 -0
- package/dist/mcp/services/session-write-buffer.js +144 -0
- package/dist/mcp/types.d.ts +18 -0
- package/dist/memory/crdt/convergence-tracker.js +14 -24
- package/dist/memory/crdt/crdt-store.js +15 -0
- package/dist/memory/crdt/g-counter.js +10 -8
- package/dist/memory/crdt/lww-register.js +3 -3
- package/dist/memory/crdt/or-set.js +18 -0
- package/dist/planning/goap-planner.js +18 -10
- package/dist/shared/embeddings/embedding-cache.d.ts +3 -3
- package/dist/shared/embeddings/embedding-cache.js +8 -8
- package/dist/shared/embeddings/nomic-embedder.js +9 -6
- package/dist/shared/embeddings/ollama-client.d.ts +1 -1
- package/dist/shared/embeddings/ollama-client.js +30 -31
- package/dist/shared/git/git-analyzer.d.ts +4 -1
- package/dist/shared/git/git-analyzer.js +9 -4
- package/dist/shared/llm/cache.js +1 -1
- package/dist/shared/llm/cost-tracker.js +8 -6
- package/dist/shared/llm/providers/azure-openai.js +5 -21
- package/dist/shared/llm/providers/bedrock.js +5 -21
- package/dist/shared/llm/providers/claude.js +5 -21
- package/dist/shared/llm/providers/cognitum.js +5 -17
- package/dist/shared/llm/providers/gemini.js +9 -23
- package/dist/shared/llm/providers/ollama.js +5 -21
- package/dist/shared/llm/providers/openai.js +5 -21
- package/dist/shared/llm/providers/openrouter.js +9 -23
- package/dist/shared/llm/providers/response-deadline.d.ts +3 -0
- package/dist/shared/llm/providers/response-deadline.js +100 -0
- package/dist/shared/llm/spend-ledger.js +3 -2
- package/dist/shared/metrics/code-metrics.d.ts +1 -0
- package/dist/shared/metrics/code-metrics.js +3 -44
- package/dist/shared/metrics/cognitive-complexity.d.ts +17 -0
- package/dist/shared/metrics/cognitive-complexity.js +108 -0
- package/dist/shared/npm-cli-invocation.d.ts +21 -0
- package/dist/shared/npm-cli-invocation.js +28 -0
- package/dist/shared/optional-module.js +24 -0
- package/dist/shared/test-runner-args.d.ts +42 -0
- package/dist/shared/test-runner-args.js +74 -0
- package/dist/shared/utils/safe-record.d.ts +18 -0
- package/dist/shared/utils/safe-record.js +28 -0
- package/dist/test-scheduling/executors/vitest-executor.js +23 -5
- package/dist/workers/quality-daemon/git-watcher.js +5 -0
- package/package.json +1 -1
- package/dist/adapters/ag-ui/json-patch-utils.d.ts +0 -136
- package/dist/adapters/ag-ui/json-patch-utils.js +0 -575
- package/dist/cli/chunks/adapter-EUIELRLI.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-LXRKHASR.js +0 -2
- package/dist/cli/chunks/base-4DSLX33Y.js +0 -2
- package/dist/cli/chunks/browser-workflow-AWCQLQZK.js +0 -2
- package/dist/cli/chunks/chunk-E2QHUMCR.js +0 -2
- package/dist/cli/chunks/chunk-I7ECEOFV.js +0 -2
- package/dist/cli/chunks/chunk-LW4BCFIV.js +0 -15
- package/dist/cli/chunks/chunk-QJGKL67W.js +0 -54
- package/dist/cli/chunks/chunk-RLQ4MYB6.js +0 -3
- package/dist/cli/chunks/chunk-X43HA3RF.js +0 -14
- package/dist/cli/chunks/chunk-Z3K4JZXQ.js +0 -4
- package/dist/cli/chunks/client-UJVHZXNQ.js +0 -2
- package/dist/cli/chunks/core-handlers-AFXZOSH3.js +0 -2
- package/dist/cli/chunks/cost-tracker-D6YSKTQC.js +0 -2
- package/dist/cli/chunks/cross-domain-router-ZLNVKLIR.js +0 -2
- package/dist/cli/chunks/dream-4OPJXXEG.js +0 -2
- package/dist/cli/chunks/heartbeat-scheduler-J5KLHO6C.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-56P6XSFR.js +0 -2
- package/dist/cli/chunks/hnsw-index-GFZ6XCEW.js +0 -2
- package/dist/cli/chunks/hybrid-backend-TUBWJDDN.js +0 -2
- package/dist/cli/chunks/impact-analyzer-FXVGKS6B.js +0 -2
- package/dist/cli/chunks/init-wizard-LK73HQ7W.js +0 -2
- package/dist/cli/chunks/kernel-TCZDKRSI.js +0 -2
- package/dist/cli/chunks/knowledge-graph-TWMB2GH2.js +0 -2
- package/dist/cli/chunks/llm-router-service-HPDH3P77.js +0 -2
- package/dist/cli/chunks/load-test-HTYOUYSN.js +0 -2
- package/dist/cli/chunks/memory-backend-X5BE2MPK.js +0 -2
- package/dist/cli/chunks/memory-handlers-SQXMFX5X.js +0 -2
- package/dist/cli/chunks/pattern-null-store-OCQGQZU6.js +0 -2
- package/dist/cli/chunks/protocol-executor-CYEQHQCL.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-GSTA5WJ4.js +0 -2
- package/dist/cli/chunks/queen-coordinator-Y2Q5RQL7.js +0 -2
- package/dist/cli/chunks/router-4QB5L4IW.js +0 -2
- package/dist/cli/chunks/routing-feedback-YBVHJY5L.js +0 -2
- package/dist/cli/chunks/rvf-dual-writer-T5B456SW.js +0 -2
- package/dist/cli/chunks/rvf-migration-adapter-2O2NL7ZF.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-RDB3GWTW.js +0 -2
- package/dist/cli/chunks/safe-db-YXVMLFU4.js +0 -2
- package/dist/cli/chunks/schedule-K6XWCCSK.js +0 -2
- package/dist/cli/chunks/scheduler-4MW22D6Q.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-UVDHUSAU.js +0 -2
- package/dist/cli/chunks/sync-LSPNSVDI.js +0 -2
- package/dist/cli/chunks/test-M2XTKD62.js +0 -33
- package/dist/cli/chunks/test-scheduling-GYXJQHJL.js +0 -15
- package/dist/cli/chunks/token-bootstrap-OTEMRUFR.js +0 -2
- package/dist/cli/chunks/unified-memory-UUK77NSE.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-JOUE6WNF.js +0 -2
- package/dist/cli/chunks/unified-persistence-3DRJGNQE.js +0 -2
- package/dist/cli/chunks/visual-security-EM7FQG5X.js +0 -2
- package/dist/cli/chunks/witness-chain-7NZ6IIUN.js +0 -2
- package/dist/cli/chunks/witness-chain-repair-ZWS5WXFL.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-3C3S5FIM.js +0 -2
- package/dist/cli/chunks/wrappers-NXJHGK3W.js +0 -2
|
@@ -17,7 +17,27 @@ const AQE_DIR = path.join(PROJECT_ROOT, '.agentic-qe');
|
|
|
17
17
|
const RVF_PATH = path.join(AQE_DIR, 'aqe.rvf');
|
|
18
18
|
const DB_PATH = path.join(AQE_DIR, 'memory.db');
|
|
19
19
|
const MAX_AGE_HOURS = 24;
|
|
20
|
-
|
|
20
|
+
/**
|
|
21
|
+
* How to run `aqe`. POSIX: the `aqe` binary. Windows (#872): never execFile
|
|
22
|
+
* `aqe.cmd` (EINVAL without a shell since CVE-2024-27980, and a shell is unsafe);
|
|
23
|
+
* reuse the hook shim's resolver, which finds the bundle and runs it via node.
|
|
24
|
+
*/
|
|
25
|
+
function aqeInvocation() {
|
|
26
|
+
if (process.platform !== 'win32') return { cmd: process.env.AQE_HOOK_BIN || 'aqe', args: [] };
|
|
27
|
+
const shimPath = path.join(__dirname, '..', 'hooks', 'aqe-hook.cjs');
|
|
28
|
+
let src = '';
|
|
29
|
+
try { src = fs.readFileSync(shimPath, 'utf8'); } catch { /* missing: handled below */ }
|
|
30
|
+
// Only a #872+ shim may be required: an older one runs its hook main at load
|
|
31
|
+
// time (spawn + process.exit(0)), which would kill this export silently.
|
|
32
|
+
if (!src.includes('resolveAqeInvocation') || !src.includes('require.main === module')) {
|
|
33
|
+
return { cmd: null, args: [], reason: '.claude/hooks/aqe-hook.cjs is missing or predates #872; re-run `aqe init`' };
|
|
34
|
+
}
|
|
35
|
+
try {
|
|
36
|
+
return require(shimPath).resolveAqeInvocation({ project: PROJECT_ROOT });
|
|
37
|
+
} catch (e) {
|
|
38
|
+
return { cmd: null, args: [], reason: 'aqe-hook.cjs failed to load: ' + e.message };
|
|
39
|
+
}
|
|
40
|
+
}
|
|
21
41
|
|
|
22
42
|
// Mount-local kill switch. `brain export` (below) spawns a native RVF writer
|
|
23
43
|
// that, on a macOS Docker virtiofs bind mount, deadlocks in a futex and IGNORES
|
|
@@ -31,15 +51,35 @@ const CHECKPOINT_DISABLED =
|
|
|
31
51
|
|
|
32
52
|
function log(msg) { process.stderr.write('[brain-checkpoint] ' + msg + '\n'); }
|
|
33
53
|
|
|
54
|
+
/** A repository can commit `.agentic-qe` as a symlink: only write into a REAL dir. */
|
|
55
|
+
function isRealDir(dir) {
|
|
56
|
+
try { const st = fs.lstatSync(dir); return st.isDirectory() && !st.isSymbolicLink(); } catch { return false; }
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Remove whatever sits at `p` WITHOUT following it: unlink drops a planted
|
|
61
|
+
* symlink itself (even a dangling one, which existsSync reports as absent),
|
|
62
|
+
* so the exporter below creates a fresh regular file instead of writing
|
|
63
|
+
* through the link.
|
|
64
|
+
*/
|
|
65
|
+
function removeEntry(p) {
|
|
66
|
+
try { fs.unlinkSync(p); } catch (e) { if (!e || e.code !== 'ENOENT') throw e; }
|
|
67
|
+
}
|
|
68
|
+
|
|
34
69
|
function exportBrain() {
|
|
35
70
|
if (!fs.existsSync(DB_PATH)) { log('No memory.db, skipping'); return { exported: false }; }
|
|
71
|
+
if (!isRealDir(AQE_DIR)) {
|
|
72
|
+
const reason = '.agentic-qe is a symlink; refusing to write through it';
|
|
73
|
+
log('Export skipped: ' + reason); return { exported: false, reason };
|
|
74
|
+
}
|
|
75
|
+
const aqe = aqeInvocation();
|
|
76
|
+
if (!aqe.cmd) { log('Export skipped: ' + aqe.reason); return { exported: false, reason: aqe.reason }; }
|
|
36
77
|
try {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
if (fs.existsSync(idmap)) fs.unlinkSync(idmap);
|
|
78
|
+
removeEntry(RVF_PATH);
|
|
79
|
+
removeEntry(RVF_PATH + '.idmap.json');
|
|
40
80
|
const result = execFileSync(
|
|
41
|
-
|
|
42
|
-
{ timeout: 60000, encoding: 'utf-8' }
|
|
81
|
+
aqe.cmd, [...aqe.args, 'brain', 'export', '-o', RVF_PATH, '--format', 'rvf'],
|
|
82
|
+
{ timeout: 60000, encoding: 'utf-8', windowsHide: true }
|
|
43
83
|
);
|
|
44
84
|
const m = result.match(/Patterns:\s+(\d+)/);
|
|
45
85
|
const p = m ? m[1] : '0';
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
* Contract:
|
|
17
17
|
* * resolve a PROJECT-LOCAL AQE bundle and run it via THIS node (no shell),
|
|
18
18
|
* or invoke an already-installed `aqe` binary without package-manager or
|
|
19
|
-
* network resolution
|
|
19
|
+
* network resolution (on Windows: the global install's bundle, never the
|
|
20
|
+
* `aqe.cmd` shim — see resolveAqeInvocation, #872);
|
|
20
21
|
* * if nothing resolves, no-op (a hook must never block a turn);
|
|
21
22
|
* * keep stderr OUT of the transcript, but tee fatal native-init markers
|
|
22
23
|
* (e.g. better-sqlite3 `invalid ELF header`) to a throttled, durable
|
|
@@ -37,39 +38,240 @@
|
|
|
37
38
|
|
|
38
39
|
'use strict';
|
|
39
40
|
|
|
40
|
-
const
|
|
41
|
+
const childProcess = require('node:child_process');
|
|
41
42
|
const fs = require('node:fs');
|
|
42
43
|
const path = require('node:path');
|
|
43
44
|
|
|
44
45
|
const PROJECT = process.env.CLAUDE_PROJECT_DIR || '.';
|
|
45
46
|
const args = process.argv.slice(2); // hook subcommand + its args
|
|
46
47
|
|
|
47
|
-
|
|
48
|
-
//
|
|
49
|
-
//
|
|
50
|
-
//
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
48
|
+
const BUNDLE_IN_PACKAGE = ['node_modules', 'agentic-qe', 'dist', 'cli', 'bundle.js'];
|
|
49
|
+
// Script shims that Node cannot start without a shell (.ps1 is never directly
|
|
50
|
+
// executable at all). They are only ever READ to find the JS entry behind them.
|
|
51
|
+
// Windows ignores trailing dots/spaces in file names, so `aqe.cmd.` IS aqe.cmd.
|
|
52
|
+
const SCRIPT_SHIM = /\.(cmd|bat|ps1)[. ]*$/i;
|
|
53
|
+
const PREFIX_CACHE_TTL_MS = 5 * 60 * 1000;
|
|
54
|
+
const PREFIX_CACHE_MAX_BYTES = 4096;
|
|
55
|
+
|
|
56
|
+
function existsSafe(p) { try { return fs.existsSync(p); } catch { return false; } }
|
|
57
|
+
function readSafe(p) { try { return fs.readFileSync(p, 'utf8'); } catch { return ''; } }
|
|
58
|
+
|
|
59
|
+
/** Env lookup that is case-insensitive on Windows (PATH is usually `Path`). */
|
|
60
|
+
function envGet(env, name, platform) {
|
|
61
|
+
if (platform !== 'win32') return env[name];
|
|
62
|
+
const key = Object.keys(env).find((k) => k.toUpperCase() === name.toUpperCase());
|
|
63
|
+
return key === undefined ? undefined : env[key];
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* The target a package-manager `.cmd` shim launches, relative to its directory:
|
|
68
|
+
* npm: "%_prog%" "%dp0%\node_modules\agentic-qe\dist\cli\bundle.js" %*
|
|
69
|
+
* pnpm: "%~dp0\global\5\node_modules\agentic-qe\dist\cli\bundle.js" %*
|
|
70
|
+
* yarn v1: @"%~dp0\..\Data\global\node_modules\.bin\aqe.cmd" %* (another .cmd)
|
|
71
|
+
* Volta's `volta run %~n0 %*` names no file, so it yields null.
|
|
72
|
+
*/
|
|
73
|
+
function parseCmdShimTarget(shimPath, content, p) {
|
|
74
|
+
const m = /"%~?dp0%?\\([^"%]+\.(?:[cm]?js|cmd|bat))"/i.exec(content || '');
|
|
75
|
+
return m ? p.join(p.dirname(shimPath), ...m[1].split(/[\\/]+/)) : null;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* The JS bundle behind a shim: its parsed JS target, else npm's layout beside
|
|
80
|
+
* it, else (yarn v1) ONE hop through the `.cmd` it delegates to. Files are only
|
|
81
|
+
* read; the result is always run via node, never as a script.
|
|
82
|
+
*/
|
|
83
|
+
function shimBundle(shim, p, exists, readFile, hops) {
|
|
84
|
+
if (!exists(shim)) return null;
|
|
85
|
+
const target = parseCmdShimTarget(shim, readFile(shim), p);
|
|
86
|
+
const direct = [target && /\.[cm]?js$/i.test(target) ? target : null,
|
|
87
|
+
p.join(p.dirname(shim), ...BUNDLE_IN_PACKAGE)];
|
|
88
|
+
for (const b of direct) if (b && exists(b)) return b;
|
|
89
|
+
if (hops > 0 && target && /\.(cmd|bat)$/i.test(target)) {
|
|
90
|
+
return shimBundle(target, p, exists, readFile, hops - 1);
|
|
91
|
+
}
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* `npm prefix -g` costs a node spawn (up to 1.5s) and only runs when nothing
|
|
97
|
+
* else resolved, i.e. on EVERY hook while AQE is unresolvable. Cache the answer
|
|
98
|
+
* (including "none") per node binary for a few minutes in the project's
|
|
99
|
+
* .agentic-qe/ (not a shared temp dir another user could pre-seed).
|
|
100
|
+
*/
|
|
101
|
+
function cachedNpmPrefix(lookup, execPath, p, exists, cacheFile, now) {
|
|
102
|
+
if (!cacheFile) return lookup(execPath, p, exists);
|
|
103
|
+
try {
|
|
104
|
+
// Never follow a symlink/junction or read something huge: regular file only.
|
|
105
|
+
const st = fs.lstatSync(cacheFile);
|
|
106
|
+
if (st.isFile() && st.size <= PREFIX_CACHE_MAX_BYTES) {
|
|
107
|
+
const c = JSON.parse(fs.readFileSync(cacheFile, 'utf8'));
|
|
108
|
+
if (c && c.execPath === execPath && now - c.at >= 0 && now - c.at < PREFIX_CACHE_TTL_MS) {
|
|
109
|
+
return typeof c.prefix === 'string' ? c.prefix : null;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
} catch { /* no or unreadable cache: look it up */ }
|
|
113
|
+
const prefix = lookup(execPath, p, exists) || null;
|
|
114
|
+
writeFileAtomic(cacheFile, JSON.stringify({ execPath, prefix, at: now }));
|
|
115
|
+
return prefix;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* A repository can commit `.agentic-qe` (or a file in it) as a symlink. Every
|
|
120
|
+
* write this hook makes therefore goes only into a REAL directory (created if
|
|
121
|
+
* missing; a symlink/junction is refused, never followed) ...
|
|
122
|
+
*/
|
|
123
|
+
function ensureRealDir(dir) {
|
|
124
|
+
try {
|
|
125
|
+
let st;
|
|
126
|
+
try { st = fs.lstatSync(dir); } catch (e) {
|
|
127
|
+
if (!e || e.code !== 'ENOENT') return false;
|
|
128
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
129
|
+
st = fs.lstatSync(dir);
|
|
130
|
+
}
|
|
131
|
+
return st.isDirectory() && !st.isSymbolicLink();
|
|
132
|
+
} catch { return false; }
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* ... and appends only to a regular file: lstat refuses an existing link or
|
|
137
|
+
* non-file, and O_NOFOLLOW (POSIX; undefined on Windows, where the lstat check
|
|
138
|
+
* stands alone) closes the race. Returns false when it declined to write.
|
|
139
|
+
*/
|
|
140
|
+
function appendFileSafe(file, text) {
|
|
141
|
+
if (!ensureRealDir(path.dirname(file))) return false;
|
|
142
|
+
try {
|
|
143
|
+
if (!fs.lstatSync(file).isFile()) return false; // lstat: a symlink is never isFile()
|
|
144
|
+
} catch (e) { if (!e || e.code !== 'ENOENT') return false; }
|
|
145
|
+
const c = fs.constants;
|
|
146
|
+
let fd;
|
|
147
|
+
try {
|
|
148
|
+
fd = fs.openSync(file, c.O_APPEND | c.O_CREAT | c.O_WRONLY | (c.O_NOFOLLOW || 0), 0o644);
|
|
149
|
+
fs.writeSync(fd, text);
|
|
150
|
+
return true;
|
|
151
|
+
} catch { return false; } finally {
|
|
152
|
+
if (fd !== undefined) { try { fs.closeSync(fd); } catch { /* ignore */ } }
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Write via a fresh temp file (O_EXCL: never opens an existing path or follows
|
|
158
|
+
* a planted link) + rename. rename REPLACES a symlink at the destination rather
|
|
159
|
+
* than writing through it, and readers never see a torn file. Best-effort.
|
|
160
|
+
*/
|
|
161
|
+
function writeFileAtomic(file, data) {
|
|
162
|
+
if (!ensureRealDir(path.dirname(file))) return;
|
|
163
|
+
const tmp = `${file}.${process.pid}.${Date.now()}.${Math.random().toString(36).slice(2)}.tmp`;
|
|
164
|
+
try {
|
|
165
|
+
fs.writeFileSync(tmp, data, { flag: 'wx' });
|
|
166
|
+
fs.renameSync(tmp, file);
|
|
167
|
+
} catch {
|
|
168
|
+
try { fs.unlinkSync(tmp); } catch { /* nothing to clean up */ }
|
|
169
|
+
}
|
|
66
170
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
171
|
+
|
|
172
|
+
/** `npm prefix -g` via the npm CLI bundled next to node.exe: no shell, no .cmd. */
|
|
173
|
+
function npmGlobalPrefix(execPath, p, exists) {
|
|
174
|
+
const npmCli = p.join(p.dirname(execPath), 'node_modules', 'npm', 'bin', 'npm-cli.js');
|
|
175
|
+
if (!exists(npmCli)) return null;
|
|
176
|
+
try {
|
|
177
|
+
const r = childProcess.spawnSync(execPath, [npmCli, 'prefix', '-g'], {
|
|
178
|
+
encoding: 'utf8', timeout: 1500, stdio: ['ignore', 'pipe', 'ignore'], windowsHide: true,
|
|
179
|
+
});
|
|
180
|
+
return r && r.status === 0 && r.stdout ? r.stdout.trim() || null : null;
|
|
181
|
+
} catch { return null; }
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Resolve how to run `<runner> hooks <args>`, in priority order:
|
|
186
|
+
* 1. AQE_HOOK_BUNDLE, the installed dependency bundle (node_modules/agentic-qe)
|
|
187
|
+
* or a local source build (./dist), run via process.execPath (this node):
|
|
188
|
+
* no shell, no node_modules/.bin/aqe(.cmd) wrapper.
|
|
189
|
+
* 2. POSIX: the installed `aqe` binary (AQE_HOOK_BIN is a test/managed-install
|
|
190
|
+
* seam). No package manager is ever invoked from a lifecycle hook.
|
|
191
|
+
* 3. Windows (#872): NEVER spawn `aqe.cmd`. Since the CVE-2024-27980 fix Node
|
|
192
|
+
* refuses to start .cmd/.bat without `shell: true` (EINVAL), and a shell
|
|
193
|
+
* would expose Claude Code-supplied arguments (--command, prompt text) to
|
|
194
|
+
* cmd.exe metacharacter injection. Instead find the bundle the global shim
|
|
195
|
+
* would have launched and run it via process.execPath: parse `aqe.cmd` on
|
|
196
|
+
* PATH (npm, pnpm, yarn v1), then npm's global layouts, then a cached
|
|
197
|
+
* `npm prefix -g` (bundled npm CLI). An AQE_HOOK_BIN naming a .cmd/.bat/
|
|
198
|
+
* .ps1 is resolved the same way, never spawned.
|
|
199
|
+
* 4. Nothing resolved (e.g. Volta): { cmd: null, reason }. The caller logs it.
|
|
200
|
+
*
|
|
201
|
+
* Returns { cmd, args, source }; `args` are the runner args that precede
|
|
202
|
+
* `hooks <subcommand ...>`. Every input is injectable for tests
|
|
203
|
+
* (`prefixCacheFile: null` disables the npm-prefix cache).
|
|
204
|
+
*/
|
|
205
|
+
function resolveAqeInvocation(opts) {
|
|
206
|
+
const o = opts || {};
|
|
207
|
+
const platform = o.platform || process.platform;
|
|
208
|
+
const env = o.env || process.env;
|
|
209
|
+
const execPath = o.execPath || process.execPath;
|
|
210
|
+
const exists = o.exists || existsSafe;
|
|
211
|
+
const readFile = o.readFile || readSafe;
|
|
212
|
+
const npmPrefix = o.npmPrefix || npmGlobalPrefix;
|
|
213
|
+
// Host path module (=== path.win32 on real Windows); injectable for tests.
|
|
214
|
+
const p = o.path || path;
|
|
215
|
+
const project = o.project || env.CLAUDE_PROJECT_DIR || '.';
|
|
216
|
+
// Always hand node an ABSOLUTE path: a relative one such as `--require=./x.js`
|
|
217
|
+
// would be parsed by node as an option, not as the script to run.
|
|
218
|
+
const viaNode = (bundle, source) => ({ cmd: execPath, args: [p.resolve(bundle)], source });
|
|
219
|
+
|
|
220
|
+
const local = [
|
|
221
|
+
env.AQE_HOOK_BUNDLE,
|
|
222
|
+
p.join(project, ...BUNDLE_IN_PACKAGE),
|
|
223
|
+
p.join(project, 'dist', 'cli', 'bundle.js'),
|
|
224
|
+
].filter(Boolean);
|
|
225
|
+
for (const b of local) if (exists(b)) return viaNode(b, 'project-bundle');
|
|
226
|
+
|
|
227
|
+
const bin = env.AQE_HOOK_BIN;
|
|
228
|
+
if (platform !== 'win32') return { cmd: bin || 'aqe', args: [], source: 'bin' };
|
|
229
|
+
// A real executable (aqe.exe, a test stub) can be spawned without a shell.
|
|
230
|
+
if (bin && !SCRIPT_SHIM.test(bin)) return { cmd: bin, args: [], source: 'bin' };
|
|
231
|
+
|
|
232
|
+
const shims = bin ? [bin] : [];
|
|
233
|
+
for (const dir of (envGet(env, 'PATH', platform) || '').split(';')) {
|
|
234
|
+
const d = dir.trim().replace(/^"(.*)"$/, '$1');
|
|
235
|
+
// Relative PATH entries (`.`, `--require=.`) resolve against an arbitrary
|
|
236
|
+
// cwd; Windows itself never searches them for a hook-launched process here.
|
|
237
|
+
if (d && p.isAbsolute(d)) shims.push(p.join(d, 'aqe.cmd'));
|
|
238
|
+
}
|
|
239
|
+
for (const shim of shims) {
|
|
240
|
+
const b = shimBundle(shim, p, exists, readFile, 1);
|
|
241
|
+
if (b) return viaNode(b, `global-shim:${shim}`);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
const appData = envGet(env, 'APPDATA', platform);
|
|
245
|
+
const prefixes = [
|
|
246
|
+
envGet(env, 'npm_config_prefix', platform),
|
|
247
|
+
appData && p.join(appData, 'npm'), // npm's default global prefix on Windows
|
|
248
|
+
p.dirname(execPath), // nvm-windows: prefix = node install dir
|
|
249
|
+
].filter(Boolean);
|
|
250
|
+
for (const prefix of prefixes) {
|
|
251
|
+
const b = p.join(prefix, ...BUNDLE_IN_PACKAGE);
|
|
252
|
+
if (exists(b)) return viaNode(b, `global-prefix:${prefix}`);
|
|
253
|
+
}
|
|
254
|
+
const cacheFile = o.prefixCacheFile === undefined
|
|
255
|
+
? p.join(project, '.agentic-qe', 'hook-npm-prefix.json') : o.prefixCacheFile;
|
|
256
|
+
const queried = cachedNpmPrefix(npmPrefix, execPath, p, exists, cacheFile, o.now || Date.now());
|
|
257
|
+
if (queried && exists(p.join(queried, ...BUNDLE_IN_PACKAGE))) {
|
|
258
|
+
return viaNode(p.join(queried, ...BUNDLE_IN_PACKAGE), `npm-prefix:${queried}`);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
const binNote = bin
|
|
262
|
+
? `AQE_HOOK_BIN=${bin} is a .cmd/.bat/.ps1 script, which is never started without `
|
|
263
|
+
+ 'a shell, and no agentic-qe bundle was found behind it; ' : '';
|
|
264
|
+
return {
|
|
265
|
+
cmd: null,
|
|
266
|
+
args: [],
|
|
267
|
+
source: 'none',
|
|
268
|
+
reason: `${binNote}no agentic-qe bundle found (Windows cannot spawn aqe.cmd without a shell `
|
|
269
|
+
+ 'since CVE-2024-27980, and a shell is unsafe for hook arguments). Volta and other '
|
|
270
|
+
+ 'non-npm/pnpm/yarn-v1 shims cannot be followed. Fix: `npm install -D agentic-qe`, '
|
|
271
|
+
+ 'or set AQE_HOOK_BUNDLE to the global bundle, e.g. '
|
|
272
|
+
+ '<npm global prefix>\\node_modules\\agentic-qe\\dist\\cli\\bundle.js '
|
|
273
|
+
+ '(Volta: the agentic-qe dist\\cli\\bundle.js inside your Volta tools image directory)',
|
|
274
|
+
};
|
|
73
275
|
}
|
|
74
276
|
|
|
75
277
|
// Fatal init markers that mean the hook ran but its persistence layer is dead
|
|
@@ -100,18 +302,36 @@ function recordHookHealth(line) {
|
|
|
100
302
|
try {
|
|
101
303
|
const logPath = path.join(PROJECT, '.agentic-qe', 'hooks-health.log');
|
|
102
304
|
// Throttle: skip if we logged within the last 5 min (avoid a line/turn).
|
|
305
|
+
// lstat, so a planted symlink's TARGET mtime never decides anything.
|
|
103
306
|
try {
|
|
104
|
-
const st = fs.
|
|
105
|
-
if (Date.now() - st.mtimeMs < 5 * 60 * 1000) return;
|
|
307
|
+
const st = fs.lstatSync(logPath);
|
|
308
|
+
if (st.isFile() && Date.now() - st.mtimeMs < 5 * 60 * 1000) return;
|
|
106
309
|
} catch { /* no log yet — fall through and create it */ }
|
|
107
|
-
|
|
108
|
-
fs.appendFileSync(logPath, line);
|
|
310
|
+
appendFileSafe(logPath, line); // never through a symlinked log or .agentic-qe
|
|
109
311
|
} catch { /* health logging must never block a turn */ }
|
|
110
312
|
}
|
|
111
313
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
const
|
|
314
|
+
/** Spawn the resolved runner; returns its stdout ('' on any failure). */
|
|
315
|
+
function runHook() {
|
|
316
|
+
const ts = () => new Date().toISOString();
|
|
317
|
+
const subcmd = args[0] || 'unknown';
|
|
318
|
+
const inv = resolveAqeInvocation();
|
|
319
|
+
if (!inv.cmd) {
|
|
320
|
+
recordHookHealth(`[${ts()}] SPAWN-FAILED hook could not start `
|
|
321
|
+
+ `(cmd=${subcmd}): ${inv.reason}. Learning for this invocation was NOT captured.\n`);
|
|
322
|
+
return '';
|
|
323
|
+
}
|
|
324
|
+
let out = '';
|
|
325
|
+
try {
|
|
326
|
+
out = superviseSpawn(inv.cmd, [...inv.args, 'hooks', ...args], subcmd, ts);
|
|
327
|
+
} catch { /* never block a turn */ }
|
|
328
|
+
return out;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
function superviseSpawn(cmd, cmdArgs, subcmd, ts) {
|
|
332
|
+
// shell is deliberately NOT set: arguments go to CreateProcess/execve verbatim.
|
|
333
|
+
const res = childProcess.spawnSync(cmd, cmdArgs, {
|
|
334
|
+
windowsHide: true,
|
|
115
335
|
// Claude Code delivers hook event data (prompt, tool_input, etc.) as JSON
|
|
116
336
|
// on stdin — `$PROMPT`/`$TOOL_INPUT_*` env-var substitution is NOT
|
|
117
337
|
// reliable on every hook surface (see hooks-shared.ts:readStdinJsonEvent's
|
|
@@ -123,11 +343,9 @@ try {
|
|
|
123
343
|
maxBuffer: 16 * 1024 * 1024,
|
|
124
344
|
timeout: SPAWN_TIMEOUT_MS,
|
|
125
345
|
});
|
|
126
|
-
out = (res && res.stdout) || '';
|
|
127
|
-
const subcmd = args[0] || 'unknown';
|
|
346
|
+
const out = (res && res.stdout) || '';
|
|
128
347
|
const stderr = (res && res.stderr) || '';
|
|
129
348
|
const hit = FATAL_MARKERS.find((m) => stderr.includes(m));
|
|
130
|
-
const ts = () => new Date().toISOString();
|
|
131
349
|
if (hit) {
|
|
132
350
|
// The fix depends on WHICH failure hit. A native-binary marker (invalid ELF
|
|
133
351
|
// header / ERR_DLOPEN_FAILED / wrong Node version) is a real rebuild case.
|
|
@@ -183,20 +401,31 @@ try {
|
|
|
183
401
|
recordHookHealth(`[${ts()}] EMPTY-RESULT hook exited status=${res.status} `
|
|
184
402
|
+ `with no JSON output (cmd=${subcmd}). stderr: ${stderr.slice(0, 300)}\n`);
|
|
185
403
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
//
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
404
|
+
return out;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
function main() {
|
|
408
|
+
const out = runHook();
|
|
409
|
+
// Emit only the top-level JSON object: the first line beginning with '{' through
|
|
410
|
+
// the first line beginning with '}' (pretty-printed JSON closes at column 0;
|
|
411
|
+
// nested closes are indented). Drops leading init-noise lines AND any async log
|
|
412
|
+
// lines printed after the JSON.
|
|
413
|
+
const lines = out.split('\n');
|
|
414
|
+
const start = lines.findIndex((l) => l.startsWith('{'));
|
|
415
|
+
if (start !== -1) {
|
|
416
|
+
let end = lines.length - 1;
|
|
417
|
+
for (let i = start; i < lines.length; i++) {
|
|
418
|
+
if (lines[i].startsWith('}')) { end = i; break; }
|
|
419
|
+
}
|
|
420
|
+
process.stdout.write(lines.slice(start, end + 1).join('\n') + '\n');
|
|
198
421
|
}
|
|
199
|
-
process.
|
|
422
|
+
process.exit(0);
|
|
200
423
|
}
|
|
201
424
|
|
|
202
|
-
|
|
425
|
+
// Exported so brain-checkpoint.cjs and unit tests can reuse the resolver;
|
|
426
|
+
// requiring this file never spawns anything.
|
|
427
|
+
// brain-checkpoint.cjs checks for this export (and the require.main guard
|
|
428
|
+
// below) before requiring this file; keep both.
|
|
429
|
+
module.exports = { resolveAqeInvocation, parseCmdShimTarget };
|
|
430
|
+
|
|
431
|
+
if (require.main === module) main();
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,161 @@ All notable changes to the Agentic QE project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [3.15.4] - 2026-10-12
|
|
9
|
+
|
|
10
|
+
Correctness fixes for AQE's CRDT memory sync, LLM response caching, embedding
|
|
11
|
+
caches, GOAP planning, Vitest test counting and legacy schedules, mostly
|
|
12
|
+
contributed by Rudy Celekli. Also includes new
|
|
13
|
+
regression tests and a quieter session journal on a full disk.
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- **Expanded Vitest test counts.** Code-intelligence test counting now
|
|
18
|
+
includes each case of `it.each`/`test.each` on small and medium suites.
|
|
19
|
+
Collection runs in its own process group with a timeout, and large suites
|
|
20
|
+
keep the fast static count. Interrupting the caller (Ctrl-C) or hitting the
|
|
21
|
+
timeout no longer leaves Vitest running or temp folders behind ([#890]).
|
|
22
|
+
- **Legacy cron schedules no longer break `workflow list`.** Invalid entries in
|
|
23
|
+
`~/.aqe/schedules.json`, including ones whose `schedule` isn't a string, are
|
|
24
|
+
disabled with a reason instead of making the whole file unreadable. Valid
|
|
25
|
+
schedules are kept exactly ([#951]).
|
|
26
|
+
- **CRDT replicas converge reliably** ([ADR-133]):
|
|
27
|
+
- LWW registers now order concurrent writes the same way on every
|
|
28
|
+
replica, using code-unit comparison and treating version 0 as
|
|
29
|
+
"unwritten" ([#943]);
|
|
30
|
+
- OR-sets resume their tag counters after a restore, so new adds can't
|
|
31
|
+
reuse an old tag and vanish ([#945]);
|
|
32
|
+
- convergence fingerprints are unambiguous (structured SHA-256) ([#949]);
|
|
33
|
+
- a peer whose checkpoint is older than the retained delta history gets the
|
|
34
|
+
full state instead of missing changes ([#952]).
|
|
35
|
+
- **Content-filter refusals aren't cached** by `generate()`, so a retry isn't
|
|
36
|
+
served a cached empty answer ([#946]). `complete()` caching of refusals is
|
|
37
|
+
tracked in #912.
|
|
38
|
+
- **Nomic embeddings:** verified cache entries are namespaced, so unversioned
|
|
39
|
+
legacy entries are recomputed once instead of being reused ([#948]).
|
|
40
|
+
- **GOAP planning:** actions without a duration estimate count as 1000 ms
|
|
41
|
+
against `maxDurationMs`, and the duration backfill runs in a single
|
|
42
|
+
transaction ([#953], [ADR-134]).
|
|
43
|
+
- **Session journal:** a full disk no longer logs `[AQE] FATAL` on every
|
|
44
|
+
flush tick. Entries stay buffered and one warning is shown ([#983]).
|
|
45
|
+
|
|
46
|
+
### Changed
|
|
47
|
+
|
|
48
|
+
- Schedules saved by older versions with cron strings the current parser
|
|
49
|
+
rejects (for example `@daily` or six-field expressions) now show as disabled,
|
|
50
|
+
with the reason in `workflow list` ([#951]).
|
|
51
|
+
- Guard timing tests have CI headroom sized from measurements, and they still
|
|
52
|
+
catch quadratic slowdowns ([#990]).
|
|
53
|
+
- **Rolling upgrades of CRDT memory sync:** until every node runs 3.15.4,
|
|
54
|
+
old and new nodes can pick different winners for writes with exactly equal
|
|
55
|
+
timestamps (for example, owner ids `a` vs `B`). This settles once all nodes
|
|
56
|
+
are upgraded ([#943]).
|
|
57
|
+
- GOAP plan totals now include the 1000 ms fallback, so tight
|
|
58
|
+
`maxDurationMs` budgets may reject plans that used to pass ([#953]).
|
|
59
|
+
- New regression tests for `saveResults` on all 10 domain tools, session
|
|
60
|
+
journal partial writes and init orchestration, ported from Rudy's PRs ([#985]).
|
|
61
|
+
|
|
62
|
+
[ADR-133]: docs/implementation/adrs/ADR-133-crdt-correctness-hardening.md
|
|
63
|
+
[ADR-134]: docs/implementation/adrs/ADR-134-goap-unestimated-action-duration-fallback.md
|
|
64
|
+
[#890]: https://github.com/proffesor-for-testing/agentic-qe/pull/890
|
|
65
|
+
[#951]: https://github.com/proffesor-for-testing/agentic-qe/pull/951
|
|
66
|
+
[#990]: https://github.com/proffesor-for-testing/agentic-qe/pull/990
|
|
67
|
+
[#943]: https://github.com/proffesor-for-testing/agentic-qe/pull/943
|
|
68
|
+
[#945]: https://github.com/proffesor-for-testing/agentic-qe/pull/945
|
|
69
|
+
[#946]: https://github.com/proffesor-for-testing/agentic-qe/pull/946
|
|
70
|
+
[#948]: https://github.com/proffesor-for-testing/agentic-qe/pull/948
|
|
71
|
+
[#949]: https://github.com/proffesor-for-testing/agentic-qe/pull/949
|
|
72
|
+
[#952]: https://github.com/proffesor-for-testing/agentic-qe/pull/952
|
|
73
|
+
[#953]: https://github.com/proffesor-for-testing/agentic-qe/pull/953
|
|
74
|
+
[#983]: https://github.com/proffesor-for-testing/agentic-qe/issues/983
|
|
75
|
+
[#985]: https://github.com/proffesor-for-testing/agentic-qe/pull/985
|
|
76
|
+
|
|
77
|
+
## [3.15.3] - 2026-10-11
|
|
78
|
+
|
|
79
|
+
A bug-fix release. AQE hooks work on Windows again. Several hangs, data-safety
|
|
80
|
+
and correctness bugs are fixed, mostly found while testing the
|
|
81
|
+
`agentic-qe-fleet` plugin end to end and in the October review batch.
|
|
82
|
+
|
|
83
|
+
### Fixed
|
|
84
|
+
|
|
85
|
+
- **AQE hooks run on Windows again.** On Windows, hooks generated by
|
|
86
|
+
`aqe init` silently did nothing when agentic-qe was installed globally,
|
|
87
|
+
because Node refuses to start `aqe.cmd` without a shell. Hooks now run the
|
|
88
|
+
installed AQE bundle directly with Node. That works for npm, pnpm and
|
|
89
|
+
yarn v1 global installs; Volta users can set `AQE_HOOK_BUNDLE`. Re-run
|
|
90
|
+
`aqe init` to refresh existing hooks. This was verified with a simulated
|
|
91
|
+
Windows environment, not yet on a real Windows machine ([#872]).
|
|
92
|
+
- **Hook and daemon files can't be redirected.** The hook, brain-checkpoint
|
|
93
|
+
and daemon scripts no longer follow symbolic links when writing into
|
|
94
|
+
`.agentic-qe/` (#872 hardening).
|
|
95
|
+
- **No more hangs on stalled servers.** These now time out instead of
|
|
96
|
+
waiting forever when a server sends headers and then stalls:
|
|
97
|
+
- LLM providers (including slow but healthy streams, which keep
|
|
98
|
+
working) ([#889]);
|
|
99
|
+
- Ollama embeddings ([#885]);
|
|
100
|
+
- the Ollama and OpenRouter consensus providers ([#961]).
|
|
101
|
+
- **`RateLimiter.wait()` no longer hangs** when a request can never fit the
|
|
102
|
+
bucket ([#905]).
|
|
103
|
+
- **Git refs are validated.** A commit reference that looks like a git option
|
|
104
|
+
(for example `--output=…`) is rejected instead of being passed to git.
|
|
105
|
+
Refs such as `@{-1}` and `HEAD^!` now work correctly ([#960]).
|
|
106
|
+
- **Test retries target exactly the right test.** Retried test names and paths
|
|
107
|
+
are escaped and anchored for Jest, Vitest and Mocha. Names that start with
|
|
108
|
+
`-` work, and Jest 30's renamed path option is used ([#909]).
|
|
109
|
+
- **`aqe test generate` writes every generated test**, not just the first
|
|
110
|
+
10. Generated tests never land outside your project, and existing test
|
|
111
|
+
files are kept unless you pass `--force` ([#936]).
|
|
112
|
+
- **Session journal is crash-safe.** A partial write is completed, not
|
|
113
|
+
duplicated. If the disk stays full, the oldest buffered entries are dropped,
|
|
114
|
+
and a gap marker keeps the session resumable ([#910]).
|
|
115
|
+
- **Fresh projects no longer log an RVF error.** Without an embedder you get
|
|
116
|
+
one clear warning that explains how to enable vector search, and dream
|
|
117
|
+
"apply" succeeds while the vector index is pending. The provenance check
|
|
118
|
+
that protects existing indexes is unchanged ([#852]).
|
|
119
|
+
- **Cognitive complexity follows the SonarSource rules.** `else if` and
|
|
120
|
+
nesting are no longer double-counted, and keywords in comments or strings
|
|
121
|
+
are ignored ([#907]).
|
|
122
|
+
- Cargo test categories no longer overlap ([#906]). The git analyzer includes
|
|
123
|
+
files from a repository's initial commit ([#874]). Optional native modules
|
|
124
|
+
with a missing platform binary now degrade with a clear reason ([#858]).
|
|
125
|
+
- Hardening: costs, counters and caches are safe with keys such as
|
|
126
|
+
`constructor` or `__proto__`. Embedding cache keys can't collide. Cached
|
|
127
|
+
state deltas are JSON-safe ([#914]).
|
|
128
|
+
|
|
129
|
+
### Changed
|
|
130
|
+
|
|
131
|
+
- **Cognitive complexity scores are much lower.** Expect a one-time drop in
|
|
132
|
+
stored reports and trends after upgrading ([#907]).
|
|
133
|
+
- **`aqe test generate` no longer overwrites existing test files.** Pass
|
|
134
|
+
`--force` to overwrite them ([#936]).
|
|
135
|
+
- **`saveResults` on MCP domain tools.** The 11 tools that save results under
|
|
136
|
+
`.agentic-qe/results/` accept `saveResults: false`. They also return
|
|
137
|
+
`resultsSaved`, `resultsNote` and `savedFiles`, which is now always an
|
|
138
|
+
array ([#925], [#933]). `aqe test generate --no-save` prints the tests
|
|
139
|
+
instead of writing them.
|
|
140
|
+
- `goap-status` rejects unknown status filters, including the empty string
|
|
141
|
+
(#894, from the October batch).
|
|
142
|
+
- Dependency updates (lockfile only, dev dependencies) ([#938]).
|
|
143
|
+
|
|
144
|
+
[#852]: https://github.com/proffesor-for-testing/agentic-qe/issues/852
|
|
145
|
+
[#858]: https://github.com/proffesor-for-testing/agentic-qe/pull/858
|
|
146
|
+
[#872]: https://github.com/proffesor-for-testing/agentic-qe/issues/872
|
|
147
|
+
[#874]: https://github.com/proffesor-for-testing/agentic-qe/pull/874
|
|
148
|
+
[#885]: https://github.com/proffesor-for-testing/agentic-qe/pull/885
|
|
149
|
+
[#889]: https://github.com/proffesor-for-testing/agentic-qe/pull/889
|
|
150
|
+
[#905]: https://github.com/proffesor-for-testing/agentic-qe/issues/905
|
|
151
|
+
[#906]: https://github.com/proffesor-for-testing/agentic-qe/issues/906
|
|
152
|
+
[#907]: https://github.com/proffesor-for-testing/agentic-qe/issues/907
|
|
153
|
+
[#909]: https://github.com/proffesor-for-testing/agentic-qe/issues/909
|
|
154
|
+
[#910]: https://github.com/proffesor-for-testing/agentic-qe/issues/910
|
|
155
|
+
[#914]: https://github.com/proffesor-for-testing/agentic-qe/issues/914
|
|
156
|
+
[#925]: https://github.com/proffesor-for-testing/agentic-qe/issues/925
|
|
157
|
+
[#933]: https://github.com/proffesor-for-testing/agentic-qe/issues/933
|
|
158
|
+
[#936]: https://github.com/proffesor-for-testing/agentic-qe/issues/936
|
|
159
|
+
[#938]: https://github.com/proffesor-for-testing/agentic-qe/pull/938
|
|
160
|
+
[#960]: https://github.com/proffesor-for-testing/agentic-qe/issues/960
|
|
161
|
+
[#961]: https://github.com/proffesor-for-testing/agentic-qe/issues/961
|
|
162
|
+
|
|
8
163
|
## [3.15.2] - 2026-10-10
|
|
9
164
|
|
|
10
165
|
This hardening patch fixes problems found by installing the
|