agentic-qe 3.15.5 → 3.15.7
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/skills/qe-court/evals/fixtures/seeded-mutant-delivery/README.md +9 -2
- package/.claude/skills/qe-court/evals/qe-court.yaml +3 -2
- package/.claude/skills/qe-quality-assessment/schemas/output.json +12 -2
- package/.claude/skills/skills-manifest.json +1 -1
- package/CHANGELOG.md +262 -0
- package/README.md +2 -0
- package/assets/skills/qe-court/evals/fixtures/seeded-mutant-delivery/README.md +9 -2
- package/assets/skills/qe-court/evals/qe-court.yaml +3 -2
- package/assets/skills/qe-quality-assessment/schemas/output.json +12 -2
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/cli/bundle.js +8 -6
- package/dist/cli/chunks/adapter-PEOUNYXJ.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-CCTTGCQS.js → agent-booster-wasm-OS5G7KMQ.js} +2 -2
- package/dist/cli/chunks/{agent-handler-DHYUF3NX.js → agent-handler-PI4I7PME.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-642W7CYX.js → agent-memory-branch-J7TXHX4U.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-DHKZI5RX.js +2 -0
- package/dist/cli/chunks/{arena-MUCC7UUN.js → arena-FXESDCFR.js} +4 -4
- package/dist/cli/chunks/{arena-NW2JVAFY.js → arena-OWUGXKNT.js} +2 -2
- package/dist/cli/chunks/{audit-VKQTZJAA.js → audit-EPAWLYIZ.js} +3 -3
- package/dist/cli/chunks/base-QZWK3D5P.js +2 -0
- package/dist/cli/chunks/{better-sqlite3-7ZUFVWLQ.js → better-sqlite3-IYVR5EQY.js} +2 -2
- package/dist/cli/chunks/{brain-handler-7LKAWSBI.js → brain-handler-3W2E6TC6.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-HUNXJKM4.js → branch-enumerator-HU7VACJ4.js} +2 -2
- package/dist/cli/chunks/{browser-ZSZEYUDP.js → browser-72XOR6E2.js} +2 -2
- package/dist/cli/chunks/browser-workflow-ITPX72RX.js +2 -0
- package/dist/cli/chunks/{chunk-PVAE65B4.js → chunk-2423JAA5.js} +1 -1
- package/dist/cli/chunks/{chunk-VLOIEVER.js → chunk-24CENUT4.js} +3 -3
- package/dist/cli/chunks/chunk-2AYBYXOA.js +4 -0
- package/dist/cli/chunks/{chunk-FWYJ6UDX.js → chunk-2E3XWKEU.js} +2 -2
- package/dist/cli/chunks/{chunk-L375O3CZ.js → chunk-2RJYA6WK.js} +2 -2
- package/dist/cli/chunks/{chunk-SDWMLT7B.js → chunk-2YVJ5OUL.js} +5 -5
- package/dist/cli/chunks/{chunk-WN55MNZ2.js → chunk-34JLY3U6.js} +2 -2
- package/dist/cli/chunks/{chunk-6ZIDZ4TJ.js → chunk-3JD2USUH.js} +2 -2
- package/dist/cli/chunks/{chunk-5BOZCMXZ.js → chunk-3RM46XFP.js} +1 -1
- package/dist/cli/chunks/{chunk-UE22ODHN.js → chunk-44DPYNPE.js} +1 -1
- package/dist/cli/chunks/{chunk-AUZXRFOX.js → chunk-4DIZ5BT6.js} +2 -2
- package/dist/cli/chunks/{chunk-RUSLEOMC.js → chunk-4G2VNW4C.js} +2 -2
- package/dist/cli/chunks/{chunk-VML4SG3X.js → chunk-56ZKQYZY.js} +3 -3
- package/dist/cli/chunks/{chunk-FHUJCVT3.js → chunk-5KCBX225.js} +2 -2
- package/dist/cli/chunks/chunk-5KS7HA37.js +2 -0
- package/dist/cli/chunks/{chunk-IJ2EXSMO.js → chunk-5PBRBS7D.js} +2 -2
- package/dist/cli/chunks/chunk-5Q22XPTH.js +2 -0
- package/dist/cli/chunks/{chunk-PDPEMBFV.js → chunk-634D2ENF.js} +2 -2
- package/dist/cli/chunks/{chunk-BYXNHGQC.js → chunk-6AYRAOCA.js} +2 -2
- package/dist/cli/chunks/{chunk-ORTBRO7F.js → chunk-6BO3WCK7.js} +2 -2
- package/dist/cli/chunks/{chunk-6LG5UEQE.js → chunk-6FEQ73BF.js} +2 -2
- package/dist/cli/chunks/{chunk-JYY7AYGA.js → chunk-6JT73S5B.js} +1 -1
- package/dist/cli/chunks/{chunk-LNO5IWGH.js → chunk-6OS7HREG.js} +1 -1
- package/dist/cli/chunks/{chunk-XNEEYXR2.js → chunk-6PKCQXEW.js} +2 -2
- package/dist/cli/chunks/{chunk-KHCALIFP.js → chunk-7EX4DEQR.js} +2 -2
- package/dist/cli/chunks/chunk-7UCVYYWL.js +3 -0
- package/dist/cli/chunks/chunk-AAA4SHEG.js +2 -0
- package/dist/cli/chunks/{chunk-DTJODGCE.js → chunk-AXO7OOOA.js} +2 -2
- package/dist/cli/chunks/{chunk-ZT3GUYM5.js → chunk-B7M323VL.js} +2 -2
- package/dist/cli/chunks/{chunk-L6SVCNXK.js → chunk-BB7OLQKO.js} +1 -1
- package/dist/cli/chunks/{chunk-6UYN5PHA.js → chunk-BTIBXGVQ.js} +4 -4
- package/dist/cli/chunks/chunk-BTYKGVJ5.js +2 -0
- package/dist/cli/chunks/{chunk-6JFGB2JB.js → chunk-C2CUPJGR.js} +1 -1
- package/dist/cli/chunks/{chunk-EAYQCBXL.js → chunk-C2MDBBFF.js} +3 -3
- package/dist/cli/chunks/{chunk-3AYYGR6W.js → chunk-CG5DZCOZ.js} +1 -1
- package/dist/cli/chunks/chunk-CIFWOMNX.js +2 -0
- package/dist/cli/chunks/{chunk-Y2WMPEUP.js → chunk-CWPRU7ZI.js} +2 -2
- package/dist/cli/chunks/{chunk-XNHB6TLC.js → chunk-CXTJ47QS.js} +2 -2
- package/dist/cli/chunks/{chunk-4PT5KNXL.js → chunk-DCJW2DPL.js} +4 -4
- package/dist/cli/chunks/{chunk-VCKDVOPD.js → chunk-DGK6GQMO.js} +2 -2
- package/dist/cli/chunks/{chunk-47GEI2LT.js → chunk-DVPGBDBP.js} +3 -3
- package/dist/cli/chunks/chunk-EB2PP6X2.js +2 -0
- package/dist/cli/chunks/{chunk-CXOXUBYU.js → chunk-ECSLJJOQ.js} +1 -1
- package/dist/cli/chunks/{chunk-A2WOQO2N.js → chunk-ED32XJ5R.js} +2 -2
- package/dist/cli/chunks/{chunk-35MDATQE.js → chunk-EDU72RTW.js} +1 -1
- package/dist/cli/chunks/{chunk-PCCIZFD7.js → chunk-EL75G2A3.js} +1 -1
- package/dist/cli/chunks/{chunk-4UXPDV7E.js → chunk-EV2BYY6T.js} +1 -1
- package/dist/cli/chunks/{chunk-3YASZPLO.js → chunk-F62EKVVC.js} +2 -2
- package/dist/cli/chunks/{chunk-AQN5EDBM.js → chunk-FTTFJ7SJ.js} +1 -1
- package/dist/cli/chunks/chunk-FVBFASOD.js +2 -0
- package/dist/cli/chunks/{chunk-QXY3IRBW.js → chunk-G762PEFO.js} +26 -26
- package/dist/cli/chunks/{chunk-A5J4XJS6.js → chunk-G7YTZTGU.js} +1 -1
- package/dist/cli/chunks/{chunk-YINFES3E.js → chunk-GY2SAIXP.js} +2 -2
- package/dist/cli/chunks/chunk-H4WHDFB5.js +4 -0
- package/dist/cli/chunks/chunk-HLZATDD2.js +2 -0
- package/dist/cli/chunks/{chunk-7EZLOC4K.js → chunk-HPG7354V.js} +2 -2
- package/dist/cli/chunks/{chunk-HLFDC4SF.js → chunk-HSDOOFV7.js} +1 -1
- package/dist/cli/chunks/{chunk-MQGEZA2A.js → chunk-HTWIGQL4.js} +2 -2
- package/dist/cli/chunks/{chunk-HBYQYGXP.js → chunk-HXBAQKMH.js} +2 -2
- package/dist/cli/chunks/chunk-HZFT3P5B.js +2 -0
- package/dist/cli/chunks/{chunk-MS3Z2CP5.js → chunk-I7H4IP7T.js} +2 -2
- package/dist/cli/chunks/{chunk-IHFUEPZH.js → chunk-IARSGAG7.js} +2 -2
- package/dist/cli/chunks/{chunk-ZTC5FBL6.js → chunk-IC2WSSD5.js} +8 -8
- package/dist/cli/chunks/{chunk-GKPRECLL.js → chunk-ICPALF4Q.js} +2 -2
- package/dist/cli/chunks/{chunk-FQKEZVN6.js → chunk-IWQQIXHO.js} +2 -2
- package/dist/cli/chunks/{chunk-DWZI3IVB.js → chunk-IYQ7XNE5.js} +2 -2
- package/dist/cli/chunks/{chunk-ZLBBX24Q.js → chunk-J26GADQE.js} +418 -412
- package/dist/cli/chunks/{chunk-NMJVG22Z.js → chunk-J43DV3ME.js} +1 -1
- package/dist/cli/chunks/{chunk-EUEHBERE.js → chunk-JFPXCQNP.js} +1 -1
- package/dist/cli/chunks/{chunk-3YNP33GB.js → chunk-JK6B3ULP.js} +2 -2
- package/dist/cli/chunks/{chunk-FBEXG4HD.js → chunk-JPHDMHFG.js} +2 -2
- package/dist/cli/chunks/{chunk-U6OVPMQX.js → chunk-JVYPXW6Y.js} +2 -2
- package/dist/cli/chunks/{chunk-X52TMBHU.js → chunk-JY4AIEZ7.js} +1 -1
- package/dist/cli/chunks/{chunk-MNQ36MAF.js → chunk-JY4WLN3K.js} +2 -2
- package/dist/cli/chunks/{chunk-E4VIVMDL.js → chunk-JYXOFN3E.js} +2 -2
- package/dist/cli/chunks/{chunk-CR2JUANW.js → chunk-K7W55B7Q.js} +3 -3
- package/dist/cli/chunks/{chunk-WLIYWBQR.js → chunk-KPOPBUUJ.js} +2 -2
- package/dist/cli/chunks/{chunk-DXVZBJE4.js → chunk-LDXQRNTT.js} +1 -1
- package/dist/cli/chunks/{chunk-W3ZGNNDV.js → chunk-LDZWIV2O.js} +1 -1
- package/dist/cli/chunks/{chunk-VRJPH3LG.js → chunk-LGBN7TKC.js} +2 -2
- package/dist/cli/chunks/{chunk-RUJLVJDE.js → chunk-LMEU64TR.js} +2 -2
- package/dist/cli/chunks/{chunk-JI77KJP7.js → chunk-LP4AS2E4.js} +1 -1
- package/dist/cli/chunks/{chunk-QPV3OKX2.js → chunk-LQOVA4YX.js} +2 -2
- package/dist/cli/chunks/{chunk-NLDFNAOS.js → chunk-LVEX4GID.js} +2 -2
- package/dist/cli/chunks/{chunk-U4TV75AC.js → chunk-M63QB466.js} +2 -2
- package/dist/cli/chunks/{chunk-SAPIRK2G.js → chunk-MDC4G323.js} +1 -1
- package/dist/cli/chunks/chunk-MHZPC4HJ.js +2 -0
- package/dist/cli/chunks/{chunk-WR64BKUE.js → chunk-MJJC6HUK.js} +1 -1
- package/dist/cli/chunks/{chunk-Y7GPLOXB.js → chunk-MKFQNCXI.js} +2 -2
- package/dist/cli/chunks/{chunk-BZFT4QDQ.js → chunk-MMXG3LL6.js} +2 -2
- package/dist/cli/chunks/{chunk-HGBJ2QQ4.js → chunk-MNCF643K.js} +2 -2
- package/dist/cli/chunks/{chunk-XIE7OHML.js → chunk-MNZFEIE5.js} +1 -1
- package/dist/cli/chunks/{chunk-FE3AIZI6.js → chunk-MQ6OF6DU.js} +1 -1
- package/dist/cli/chunks/{chunk-3QD7U3FY.js → chunk-MRHM4COP.js} +2 -2
- package/dist/cli/chunks/{chunk-663ZFPUL.js → chunk-N4PMPSJJ.js} +2 -2
- package/dist/cli/chunks/{chunk-DL5JENWD.js → chunk-NZQPP533.js} +3 -3
- package/dist/cli/chunks/{chunk-4XSCZVON.js → chunk-OA4GR3EZ.js} +2 -2
- package/dist/cli/chunks/{chunk-IJOFZBXD.js → chunk-OJEZNLB6.js} +2 -2
- package/dist/cli/chunks/{chunk-OU4ZAWCC.js → chunk-ONVALAZN.js} +2 -2
- package/dist/cli/chunks/{chunk-A337MD3C.js → chunk-PEKDSJBC.js} +2 -2
- package/dist/cli/chunks/{chunk-D3G2NN7F.js → chunk-PG64YV6C.js} +66 -65
- package/dist/cli/chunks/{chunk-VYDNLQJN.js → chunk-PQV7E7XH.js} +2 -2
- package/dist/cli/chunks/chunk-PTK66HEY.js +2 -0
- package/dist/cli/chunks/{chunk-LRASYSGV.js → chunk-PUECC4WI.js} +2 -2
- package/dist/cli/chunks/{chunk-3OAQPN2N.js → chunk-PXZKPUW6.js} +2 -2
- package/dist/cli/chunks/chunk-PYHYOKYT.js +2 -0
- package/dist/cli/chunks/{chunk-WT3JC4A6.js → chunk-PZG3542B.js} +2 -2
- package/dist/cli/chunks/{chunk-RMJ7PJOS.js → chunk-Q2T5FXEA.js} +2 -2
- package/dist/cli/chunks/chunk-QJE6ZW2X.js +6 -0
- package/dist/cli/chunks/{chunk-2XYTS2WY.js → chunk-QNQSM2OG.js} +2 -2
- package/dist/cli/chunks/{chunk-EVCFUYYK.js → chunk-QQT6QENQ.js} +9 -9
- package/dist/cli/chunks/{chunk-VH3EB6ZG.js → chunk-QVG4ZDXX.js} +3 -3
- package/dist/cli/chunks/chunk-QWLTHFZW.js +16 -0
- package/dist/cli/chunks/{chunk-GGDKOJVF.js → chunk-RCYLCA7E.js} +10 -6
- package/dist/cli/chunks/{chunk-BMWAWZAN.js → chunk-REEIFA6A.js} +2 -2
- package/dist/cli/chunks/{chunk-Y2E3IJ53.js → chunk-RNYX4CPI.js} +2 -2
- package/dist/cli/chunks/{chunk-BY646JOM.js → chunk-RORZ5O5Z.js} +2 -2
- package/dist/cli/chunks/{chunk-JNMUVBAJ.js → chunk-RRPYWBFX.js} +2 -2
- package/dist/cli/chunks/{chunk-XQRE2HWM.js → chunk-RXAFLK34.js} +2 -2
- package/dist/cli/chunks/{chunk-UXZEVIFX.js → chunk-SQHLC6I5.js} +1 -1
- package/dist/cli/chunks/{chunk-DPV33C77.js → chunk-SSP2B2WR.js} +2 -2
- package/dist/cli/chunks/chunk-SX2YSHE7.js +115 -0
- package/dist/cli/chunks/chunk-T3ZDVU6F.js +5 -0
- package/dist/cli/chunks/{chunk-JCC7QEKZ.js → chunk-T6W5APYP.js} +1 -1
- package/dist/cli/chunks/{chunk-DEGWCUMY.js → chunk-TU4LIIOP.js} +2 -2
- package/dist/cli/chunks/{chunk-CQMHDAJS.js → chunk-UBYCR3O4.js} +2 -2
- package/dist/cli/chunks/{chunk-PHP4UJYP.js → chunk-UCLN6AME.js} +1 -1
- package/dist/cli/chunks/{chunk-HIUNCO2W.js → chunk-UIYKR2SA.js} +2 -2
- package/dist/cli/chunks/{chunk-ONCH5AXU.js → chunk-UUHIEM2M.js} +18 -18
- package/dist/cli/chunks/{chunk-CFPR24YK.js → chunk-UY3REQOK.js} +2 -2
- package/dist/cli/chunks/{chunk-FNAYDITO.js → chunk-V2SAEMZY.js} +1 -1
- package/dist/cli/chunks/{chunk-JANLATHN.js → chunk-V5NGBQAQ.js} +2 -2
- package/dist/cli/chunks/{chunk-644DFAGS.js → chunk-VCA6YYII.js} +1 -1
- package/dist/cli/chunks/chunk-VJRZFWR5.js +2 -0
- package/dist/cli/chunks/{chunk-7BIYJRQJ.js → chunk-VKPKYMCT.js} +2 -2
- package/dist/cli/chunks/{chunk-2KWI3MT3.js → chunk-VNW5Q2CX.js} +2 -2
- package/dist/cli/chunks/chunk-VUFRTGML.js +3 -0
- package/dist/cli/chunks/{chunk-PHAQWAEV.js → chunk-W4X2VTIY.js} +2 -2
- package/dist/cli/chunks/{chunk-PURHGLEC.js → chunk-WTLIEBDH.js} +1 -1
- package/dist/cli/chunks/{chunk-3SH23PS3.js → chunk-WUV5RZUI.js} +2 -2
- package/dist/cli/chunks/{chunk-OGYWWZU7.js → chunk-WXI2STKQ.js} +2 -2
- package/dist/cli/chunks/{chunk-OW42F2TX.js → chunk-XEWXYGJI.js} +2 -2
- package/dist/cli/chunks/{chunk-DPYDUKVZ.js → chunk-XNSQZ3O7.js} +2 -2
- package/dist/cli/chunks/{chunk-B2UHTA4Q.js → chunk-XTJMY3KS.js} +1 -1
- package/dist/cli/chunks/{chunk-NF6AFIAX.js → chunk-XXAVQACL.js} +1 -1
- package/dist/cli/chunks/{chunk-V7GNUVYI.js → chunk-Y4SAWE45.js} +1 -1
- package/dist/cli/chunks/{chunk-WC47GICZ.js → chunk-Y6A46M3B.js} +2 -2
- package/dist/cli/chunks/{chunk-3DTEQHFB.js → chunk-YDZJWDR6.js} +3 -3
- package/dist/cli/chunks/{chunk-KJ3KBP24.js → chunk-YFOBQSOW.js} +2 -2
- package/dist/cli/chunks/{chunk-MB4VFAJC.js → chunk-YK3NOC2R.js} +2 -2
- package/dist/cli/chunks/{chunk-GRIPCYW5.js → chunk-YUC7RJGR.js} +1 -1
- package/dist/cli/chunks/{chunk-HPLMX62I.js → chunk-Z3VJLWRR.js} +2 -2
- package/dist/cli/chunks/{chunk-EOR3RECZ.js → chunk-ZLVQSEZK.js} +2 -2
- package/dist/cli/chunks/{chunk-4AZP7ZCW.js → chunk-ZRLNACPY.js} +2 -2
- package/dist/cli/chunks/{chunk-OQDC7GCM.js → chunk-ZTMZFF25.js} +2 -2
- package/dist/cli/chunks/chunk-ZUMDDMDE.js +3 -0
- package/dist/cli/chunks/ci-5HEXJZ2C.js +81 -0
- package/dist/cli/chunks/{ci-config-XDDZOOEI.js → ci-config-WU4NPDAM.js} +2 -2
- package/dist/cli/chunks/{ci-output-7ZUQI4U6.js → ci-output-BJQVXX5E.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-ALXKCFAL.js → circuit-breaker-3BMGTQCB.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-RL7K2NI2.js → claude-flow-setup-GVDGJWMU.js} +2 -2
- package/dist/cli/chunks/client-S7GNYTZ5.js +2 -0
- package/dist/cli/chunks/{cline-installer-2Z2QQKC3.js → cline-installer-V4MRGWVA.js} +2 -2
- package/dist/cli/chunks/{code-QSZTDINQ.js → code-A3TGQPEO.js} +3 -3
- package/dist/cli/chunks/{code-index-extractor-5CGR5D3Y.js → code-index-extractor-YJQSYWD3.js} +2 -2
- package/dist/cli/chunks/{codex-installer-7JLSEDE5.js → codex-installer-7N7UQPAH.js} +2 -2
- package/dist/cli/chunks/{completions-U4NBSXEB.js → completions-PPGVYLZS.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-WYZD2YSY.js → complexity-analyzer-XZTFLYV5.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-UPXINJFT.js → continuedev-installer-Z5I57RAH.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-WIVYQRIF.js → copilot-installer-F5YZ6BHB.js} +2 -2
- package/dist/cli/chunks/core-handlers-CUEPOQIO.js +2 -0
- package/dist/cli/chunks/{cost-tracker-RIN4JDDM.js → cost-tracker-GO33ZQAP.js} +2 -2
- package/dist/cli/chunks/coverage-GSHKLY74.js +49 -0
- package/dist/cli/chunks/cross-domain-router-CXN5QFEV.js +2 -0
- package/dist/cli/chunks/{cursor-installer-POM7NGCC.js → cursor-installer-JJ7IVJZB.js} +2 -2
- package/dist/cli/chunks/daemon-3DQCKRYO.js +10 -0
- package/dist/cli/chunks/{daemon-HFGKQ6LB.js → daemon-IRL7QRNE.js} +5 -5
- package/dist/cli/chunks/{dag-attention-scheduler-HJXM7Q5P.js → dag-attention-scheduler-ORXSUHPA.js} +2 -2
- package/dist/cli/chunks/{detect-XKQGLZYN.js → detect-RHU62KRI.js} +2 -2
- package/dist/cli/chunks/{dist-node-SSKB53QL.js → dist-node-3VKV4Z6C.js} +2 -2
- package/dist/cli/chunks/{domain-handler-6BNDHATU.js → domain-handler-SFIML4FK.js} +2 -2
- package/dist/cli/chunks/{domain-plugins-DOX54YE3.js → domain-plugins-CJ4FA3OC.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-FW4ZX3Z7.js → domain-transfer-BCRKPCAA.js} +2 -2
- package/dist/cli/chunks/dream-5AUNJW24.js +2 -0
- package/dist/cli/chunks/embed-and-insert-pattern-VL3HFLPV.js +3 -0
- package/dist/cli/chunks/{eval-K7E4XXBS.js → eval-GGKRI4P5.js} +2 -2
- package/dist/cli/chunks/experience-capture-middleware-F72TIRQY.js +40 -0
- package/dist/cli/chunks/{fast-paths-5JXXTYAG.js → fast-paths-7KOOF3MA.js} +2 -2
- package/dist/cli/chunks/{feature-flags-2CR3CO23.js → feature-flags-FNHBTHBH.js} +2 -2
- package/dist/cli/chunks/{feature-flags-RB72LHOJ.js → feature-flags-IOZEWWFU.js} +2 -2
- package/dist/cli/chunks/file-discovery-AYWF357I.js +2 -0
- package/dist/cli/chunks/{fleet-SDU7QEOA.js → fleet-QX5KXTRC.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-AWCFODUV.js → gnn-wrapper-OH2DOQP7.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-A4PJ3NFP.js → heartbeat-handler-W67NXTNE.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-7ZIDVXIP.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-P77OC7FM.js +2 -0
- package/dist/cli/chunks/hnsw-index-3LBOTQAW.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-KRS7SSFM.js → hnsw-legacy-bridge-6MLLOGOE.js} +2 -2
- package/dist/cli/chunks/{hnswlib-node-OGGCPKPO.js → hnswlib-node-4UDISJ3G.js} +2 -2
- package/dist/cli/chunks/{hooks-XNRNMUBW.js → hooks-NOQJWQ4P.js} +43 -43
- package/dist/cli/chunks/hybrid-backend-LOM54PDD.js +2 -0
- package/dist/cli/chunks/{hypergraph-engine-X35LTXYT.js → hypergraph-engine-2OD3APVP.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-M6THKAG6.js → hypergraph-handler-5AZGMBUM.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-QSDJVBPS.js +2 -0
- package/dist/cli/chunks/init-guard-SMGJ45PW.js +2 -0
- package/dist/cli/chunks/init-handler-5T4MP2NM.js +88 -0
- package/dist/cli/chunks/init-wizard-MK2325JJ.js +2 -0
- package/dist/cli/chunks/kernel-2NJQQ2KT.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-TEPR2ZJD.js → kilocode-installer-RLZYLVQJ.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-RUKHGDEE.js → kiro-installer-LFZOC7VD.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-SDISHO62.js +2 -0
- package/dist/cli/chunks/learning-XRPGLUWR.js +122 -0
- package/dist/cli/chunks/{llm-router-7GECMDCP.js → llm-router-OMK5HYPH.js} +4 -4
- package/dist/cli/chunks/llm-router-service-YTCMRBAN.js +2 -0
- package/dist/cli/chunks/{load-NTJ4Y4ZR.js → load-XADC7KCU.js} +2 -2
- package/dist/cli/chunks/load-test-RPKHLBCC.js +2 -0
- package/dist/cli/chunks/{mcp-4335GTTG.js → mcp-PIBKSSVU.js} +2 -2
- package/dist/cli/chunks/{memory-HYC4M4XS.js → memory-AP7EZERS.js} +5 -5
- package/dist/cli/chunks/memory-backend-BZXFO4JZ.js +2 -0
- package/dist/cli/chunks/memory-handlers-MOFDNB6E.js +2 -0
- package/dist/cli/chunks/{multi-model-executor-T7FYKM6T.js → multi-model-executor-7JJ2FZ33.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-3USXVT5M.js → opencode-installer-ZZZ6EBYJ.js} +2 -2
- package/dist/cli/chunks/orchestrator-2H2YKSGJ.js +452 -0
- package/dist/cli/chunks/pattern-null-store-4PRPIOR6.js +2 -0
- package/dist/cli/chunks/{pattern-usage-recorder-CMZLPX2K.js → pattern-usage-recorder-7MJJWC2Z.js} +2 -2
- package/dist/cli/chunks/{pipeline-BTRZOVSL.js → pipeline-LIE5BWQY.js} +2 -2
- package/dist/cli/chunks/{platform-2MCRKC25.js → platform-SMYUNLGX.js} +2 -2
- package/dist/cli/chunks/plugin-LJDIXQNT.js +27 -0
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-TXFEMBP6.js → prime-radiant-advanced-wasm-RIDNE5D2.js} +2 -2
- package/dist/cli/chunks/project-root-NBIQF63D.js +2 -0
- package/dist/cli/chunks/protocol-executor-BRPGIYWQ.js +2 -0
- package/dist/cli/chunks/{protocol-handler-DZ26OYVZ.js → protocol-handler-YVM66DLI.js} +2 -2
- package/dist/cli/chunks/{prove-QWONEJWX.js → prove-ZBDT52GD.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-GDZACWKW.js +2 -0
- package/dist/cli/chunks/{quality-WFH54FY7.js → quality-DUKXGDDO.js} +2 -2
- package/dist/cli/chunks/{quality-gate-ONJB7XU7.js → quality-gate-SM3RXF4V.js} +3 -3
- package/dist/cli/chunks/queen-coordinator-LDKLBPD5.js +2 -0
- package/dist/cli/chunks/real-embeddings-4QLQZDB5.js +2 -0
- package/dist/cli/chunks/{ref-validation-HW5Y55ZC.js → ref-validation-M3EO32YQ.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-5OABDNZT.js → roocode-installer-S6Q5OLV5.js} +2 -2
- package/dist/cli/chunks/router-H5YSIRH2.js +2 -0
- package/dist/cli/chunks/routing-feedback-5R36TJDH.js +2 -0
- package/dist/cli/chunks/{routing-handler-CVHVOQTC.js → routing-handler-55FMUACP.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-KKDKFGIQ.js → ruvector-commands-QATKAAPK.js} +2 -2
- package/dist/cli/chunks/rvf-dual-writer-TT2DBQQQ.js +2 -0
- package/dist/cli/chunks/rvf-migration-adapter-BCLFJKSK.js +2 -0
- package/dist/cli/chunks/rvf-migration-coordinator-RFXFU6JD.js +2 -0
- package/dist/cli/chunks/rvf-native-adapter-UXI66OQJ.js +2 -0
- package/dist/cli/chunks/{rvf-store-integrity-UGUXKIFX.js → rvf-store-integrity-PKDVXQAW.js} +2 -2
- package/dist/cli/chunks/safe-db-MSTD2GDH.js +2 -0
- package/dist/cli/chunks/schedule-KST6KIFD.js +2 -0
- package/dist/cli/chunks/scheduler-FTQS6YK3.js +2 -0
- package/dist/cli/chunks/security-CMRB6WA3.js +18 -0
- package/dist/cli/chunks/shared-rvf-adapter-YHLLNFHF.js +2 -0
- package/dist/cli/chunks/{shared-rvf-dual-writer-ZSHYG5IA.js → shared-rvf-dual-writer-4BGDVPQ7.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-ZX5QFDMR.js +2 -0
- package/dist/cli/chunks/{standalone-memory-MHZEEYMK.js → standalone-memory-LUHKQAGM.js} +2 -2
- package/dist/cli/chunks/{status-handler-JKXPJ22K.js → status-handler-S6S5PNR7.js} +2 -2
- package/dist/cli/chunks/{structural-health-J4RKCYWF.js → structural-health-PQ7NZAJ4.js} +2 -2
- package/dist/cli/chunks/{sync-PDPORHVN.js → sync-Q6KRQXU6.js} +2 -2
- package/dist/cli/chunks/sync-S744AEJC.js +2 -0
- package/dist/cli/chunks/{task-handler-VERADM44.js → task-handler-GAMGEHUW.js} +2 -2
- package/dist/cli/chunks/{task-handlers-4RUCWUR2.js → task-handlers-6CRDEELN.js} +3 -3
- package/dist/cli/chunks/{test-DMBJFQNL.js → test-FNH67DBK.js} +12 -12
- package/dist/cli/chunks/{test-scheduling-LUPTVGCD.js → test-scheduling-NZA5SHK6.js} +3 -3
- package/dist/cli/chunks/token-bootstrap-CXKG55JD.js +2 -0
- package/dist/cli/chunks/{token-usage-VOA34IKM.js → token-usage-M7WWEDJX.js} +2 -2
- package/dist/cli/chunks/{transformers-GU4TYAN5.js → transformers-2IFMCK6A.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-MZPXAH7C.js → tree-sitter-wasm-parser-NMNA6RJC.js} +2 -2
- package/dist/cli/chunks/{types-K4FLXR2K.js → types-N7FWTOLD.js} +2 -2
- package/dist/cli/chunks/unified-memory-2Z2F446J.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-A4EWYPJQ.js +2 -0
- package/dist/cli/chunks/unified-persistence-Z6N6JZFA.js +2 -0
- package/dist/cli/chunks/{upgrade-M3ATDRMK.js → upgrade-KDB5RGL7.js} +2 -2
- package/dist/cli/chunks/{validate-AAP773B3.js → validate-KMUV5FUA.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-7RGAZX5F.js → validate-swarm-ANZWRCJU.js} +2 -2
- package/dist/cli/chunks/visual-security-GXYZV7KR.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-GQMRHGGI.js → web-tree-sitter-SXXC4NMS.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-HG6HF2GF.js → windsurf-installer-2LWSKMBU.js} +2 -2
- package/dist/cli/chunks/witness-chain-52PEIEGK.js +2 -0
- package/dist/cli/chunks/{witness-chain-WKU3ZIBQ.js → witness-chain-JJMSJFZP.js} +2 -2
- package/dist/cli/chunks/witness-chain-repair-OX7VFW6T.js +2 -0
- package/dist/cli/chunks/{witness-chain-verifier-Q2KW3QEQ.js → witness-chain-verifier-QLSMXHAZ.js} +2 -2
- package/dist/cli/chunks/witness-key-manager-3DS4L7LE.js +2 -0
- package/dist/cli/chunks/{workflow-CX6SHFBW.js → workflow-ARWAMHD3.js} +28 -28
- package/dist/cli/chunks/workflow-orchestrator-DORMQMG7.js +2 -0
- package/dist/cli/chunks/wrappers-J6KGTUSJ.js +2 -0
- package/dist/cli/commands/ci.js +47 -25
- package/dist/cli/commands/coverage.d.ts +1 -28
- package/dist/cli/commands/coverage.js +63 -134
- package/dist/cli/commands/daemon.js +7 -1
- package/dist/cli/commands/hooks-handlers/stats-hooks.d.ts +15 -0
- package/dist/cli/commands/hooks-handlers/stats-hooks.js +54 -2
- package/dist/cli/commands/learning.js +50 -9
- package/dist/cli/commands/security.d.ts +16 -0
- package/dist/cli/commands/security.js +76 -9
- package/dist/cli/commands/test.js +6 -7
- package/dist/cli/commands/workflow.js +9 -5
- package/dist/cli/handlers/init-guard.d.ts +33 -0
- package/dist/cli/handlers/init-guard.js +66 -0
- package/dist/cli/handlers/init-handler.d.ts +3 -0
- package/dist/cli/handlers/init-handler.js +64 -54
- package/dist/cli/handlers/interfaces.js +5 -1
- package/dist/cli/index.js +11 -0
- package/dist/cli/scheduler/persistent-scheduler.d.ts +6 -2
- package/dist/cli/scheduler/persistent-scheduler.js +107 -41
- package/dist/cli/utils/ci-output.d.ts +13 -1
- package/dist/cli/utils/ci-output.js +21 -2
- package/dist/cli/utils/coverage-data.d.ts +3 -0
- package/dist/cli/utils/coverage-data.js +14 -39
- package/dist/cli/utils/coverage-verdict.d.ts +130 -0
- package/dist/cli/utils/coverage-verdict.js +193 -0
- package/dist/cli/utils/file-discovery.js +5 -0
- package/dist/coordination/deterministic-actions.js +24 -13
- package/dist/coordination/handlers/code-intelligence-handlers.d.ts +8 -0
- package/dist/coordination/handlers/code-intelligence-handlers.js +39 -0
- package/dist/coordination/handlers/coverage-handlers.js +34 -6
- package/dist/coordination/handlers/coverage-runner.d.ts +22 -0
- package/dist/coordination/handlers/coverage-runner.js +105 -10
- package/dist/coordination/handlers/coverage-target.d.ts +1 -0
- package/dist/coordination/handlers/coverage-target.js +4 -1
- package/dist/coordination/handlers/handler-types.d.ts +9 -0
- package/dist/coordination/handlers/handler-utils.d.ts +14 -1
- package/dist/coordination/handlers/handler-utils.js +46 -22
- package/dist/coordination/handlers/quality-handlers.js +108 -18
- package/dist/coordination/handlers/security-handlers.js +22 -6
- package/dist/coordination/handlers/test-execution-handlers.js +4 -1
- package/dist/coordination/protocols/defect-investigation.d.ts +2 -1
- package/dist/coordination/protocols/defect-investigation.js +12 -3
- package/dist/coordination/protocols/quality-gate.js +10 -6
- package/dist/coordination/protocols/security-audit.js +11 -0
- package/dist/coordination/result-saver.d.ts +31 -0
- package/dist/coordination/result-saver.js +146 -46
- package/dist/coordination/task-executor.d.ts +7 -0
- package/dist/coordination/task-executor.js +32 -3
- package/dist/domains/code-intelligence/plugin.js +4 -0
- package/dist/domains/code-intelligence/services/metric-collector/index.js +9 -2
- package/dist/domains/code-intelligence/services/metric-collector/interfaces.d.ts +21 -0
- package/dist/domains/code-intelligence/services/metric-collector/interfaces.js +25 -0
- package/dist/domains/code-intelligence/services/metric-collector/loc-counter.d.ts +12 -0
- package/dist/domains/code-intelligence/services/metric-collector/loc-counter.js +69 -3
- package/dist/domains/code-intelligence/services/metric-collector/test-counter.js +4 -1
- package/dist/domains/coverage-analysis/collected-metrics.d.ts +35 -0
- package/dist/domains/coverage-analysis/collected-metrics.js +42 -0
- package/dist/domains/coverage-analysis/coordinator.js +18 -6
- package/dist/domains/coverage-analysis/interfaces.d.ts +44 -0
- package/dist/domains/coverage-analysis/interfaces.js +6 -1
- package/dist/domains/coverage-analysis/services/coverage-analyzer.js +61 -34
- package/dist/domains/coverage-analysis/services/gap-detector.js +7 -2
- package/dist/domains/defect-intelligence/plugin.js +4 -0
- package/dist/domains/defect-intelligence/services/defect-predictor.js +13 -8
- package/dist/domains/learning-optimization/coordinator.js +4 -0
- package/dist/domains/learning-optimization/plugin.js +4 -0
- package/dist/domains/quality-assessment/coordinator-rl-integration.d.ts +14 -0
- package/dist/domains/quality-assessment/coordinator-rl-integration.js +54 -16
- package/dist/domains/quality-assessment/coordinator.js +10 -6
- package/dist/domains/quality-assessment/coverage-report-event.d.ts +32 -8
- package/dist/domains/quality-assessment/coverage-report-event.js +28 -6
- package/dist/domains/quality-assessment/index.d.ts +1 -1
- package/dist/domains/quality-assessment/interfaces.d.ts +50 -0
- package/dist/domains/quality-assessment/quality-evidence.d.ts +49 -3
- package/dist/domains/quality-assessment/quality-evidence.js +62 -0
- package/dist/domains/quality-assessment/services/quality-analyzer.d.ts +23 -2
- package/dist/domains/quality-assessment/services/quality-analyzer.js +197 -112
- package/dist/domains/quality-assessment/services/quality-gate.js +12 -3
- package/dist/domains/security-compliance/dependency-advisory-engine.d.ts +52 -0
- package/dist/domains/security-compliance/dependency-advisory-engine.js +113 -0
- package/dist/domains/security-compliance/interfaces.d.ts +30 -0
- package/dist/domains/security-compliance/plugin.d.ts +7 -1
- package/dist/domains/security-compliance/plugin.js +19 -0
- package/dist/domains/security-compliance/services/scanners/dast-scanner.js +22 -16
- package/dist/domains/security-compliance/services/scanners/dependency-resolver.d.ts +71 -0
- package/dist/domains/security-compliance/services/scanners/dependency-resolver.js +232 -0
- package/dist/domains/security-compliance/services/scanners/dependency-scanner.d.ts +21 -6
- package/dist/domains/security-compliance/services/scanners/dependency-scanner.js +142 -64
- package/dist/domains/security-compliance/services/scanners/lockfile-versions.d.ts +43 -0
- package/dist/domains/security-compliance/services/scanners/lockfile-versions.js +248 -0
- package/dist/domains/security-compliance/services/scanners/scanner-types.d.ts +30 -2
- package/dist/domains/security-compliance/services/security-auditor.d.ts +19 -6
- package/dist/domains/security-compliance/services/security-auditor.js +133 -92
- package/dist/domains/test-execution/interfaces.d.ts +10 -6
- package/dist/domains/test-execution/plugin.js +4 -0
- package/dist/domains/test-execution/services/retry-handler.js +17 -6
- package/dist/domains/test-execution/services/test-executor.d.ts +1 -0
- package/dist/domains/test-execution/services/test-executor.js +239 -109
- package/dist/domains/test-generation/coordinator.js +4 -0
- package/dist/domains/test-generation/plugin.js +4 -0
- package/dist/feedback/coverage-learner.js +4 -1
- package/dist/feedback/coverage-session-provenance.d.ts +29 -0
- package/dist/feedback/coverage-session-provenance.js +39 -0
- package/dist/init/orchestrator.js +2 -0
- package/dist/init/phases/09-assets.d.ts +4 -0
- package/dist/init/phases/09-assets.js +35 -0
- package/dist/init/retired-assets.d.ts +86 -0
- package/dist/init/retired-assets.js +230 -0
- package/dist/init/skills-installer.d.ts +2 -0
- package/dist/init/skills-installer.js +4 -0
- package/dist/init/types.d.ts +3 -0
- package/dist/integrations/ruvector/rvf-native-adapter.d.ts +2 -0
- package/dist/integrations/ruvector/rvf-native-adapter.js +5 -0
- package/dist/integrations/ruvector/server-client.js +4 -12
- package/dist/kernel/project-root.d.ts +17 -0
- package/dist/kernel/project-root.js +54 -2
- package/dist/kernel/shared-dirs.d.ts +66 -0
- package/dist/kernel/shared-dirs.js +180 -0
- package/dist/learning/daily-log.js +2 -1
- package/dist/learning/experience-capture-middleware.d.ts +22 -0
- package/dist/learning/experience-capture-middleware.js +35 -0
- package/dist/learning/learnable-result.d.ts +16 -0
- package/dist/learning/learnable-result.js +24 -0
- package/dist/learning/pattern-mutation-error.d.ts +8 -0
- package/dist/learning/pattern-mutation-error.js +12 -0
- package/dist/learning/qe-reasoning-bank.d.ts +10 -0
- package/dist/learning/qe-reasoning-bank.js +50 -1
- package/dist/learning/rvf-reconcile.d.ts +39 -0
- package/dist/learning/rvf-reconcile.js +40 -0
- package/dist/learning/sqlite-persistence.d.ts +14 -0
- package/dist/learning/sqlite-persistence.js +36 -0
- package/dist/mcp/bundle.js +908 -896
- package/dist/mcp/handlers/domain-handler-configs.d.ts +35 -1
- package/dist/mcp/handlers/domain-handler-configs.js +42 -4
- package/dist/mcp/handlers/handler-factory.js +40 -14
- package/dist/mcp/protocol-server.js +29 -3
- package/dist/mcp/tool-cache-scope.d.ts +31 -0
- package/dist/mcp/tool-cache-scope.js +71 -0
- package/dist/mcp/tools/code-intelligence/analyze.js +5 -3
- package/dist/mcp/types.d.ts +10 -0
- package/dist/optimization/session-cache.d.ts +19 -1
- package/dist/optimization/session-cache.js +36 -2
- package/dist/plugins/cache.js +2 -1
- package/dist/plugins/sources/github.js +2 -1
- package/dist/plugins/sources/npm.js +2 -1
- package/dist/shared/aqe-managed-dirs.d.ts +24 -0
- package/dist/shared/aqe-managed-dirs.js +56 -0
- package/dist/shared/events/domain-events.d.ts +18 -3
- package/dist/shared/events/domain-events.js +4 -0
- package/dist/shared/http/http-client.d.ts +6 -0
- package/dist/shared/http/http-client.js +13 -15
- package/dist/shared/io/file-reader.d.ts +26 -0
- package/dist/shared/io/file-reader.js +111 -17
- package/dist/shared/llm/providers/response-deadline.d.ts +7 -2
- package/dist/shared/llm/providers/response-deadline.js +17 -5
- package/dist/shared/metrics/code-metrics.d.ts +24 -0
- package/dist/shared/metrics/code-metrics.js +93 -6
- package/dist/shared/metrics/index.d.ts +1 -1
- package/dist/shared/security/index.d.ts +2 -2
- package/dist/shared/security/index.js +1 -1
- package/dist/shared/security/osv-client.d.ts +79 -132
- package/dist/shared/security/osv-client.js +344 -167
- package/dist/shared/security/osv-lookup.d.ts +124 -0
- package/dist/shared/security/osv-lookup.js +246 -0
- package/dist/shared/security/osv-types.d.ts +119 -0
- package/dist/shared/security/osv-types.js +6 -0
- package/dist/workers/interfaces.d.ts +15 -2
- package/dist/workers/namespaced-keys.d.ts +16 -0
- package/dist/workers/namespaced-keys.js +24 -0
- package/dist/workers/quality-daemon/coverage-delta.d.ts +4 -3
- package/dist/workers/quality-daemon/coverage-delta.js +13 -6
- package/dist/workers/quality-daemon/index.js +6 -5
- package/dist/workers/quality-daemon/notification-service.js +3 -3
- package/dist/workers/quality-daemon/persistent-memory.d.ts +3 -3
- package/dist/workers/quality-daemon/persistent-memory.js +4 -4
- package/dist/workers/worker-manager.js +10 -3
- package/dist/workers/workers/coverage-tracker.js +69 -33
- package/dist/workers/workers/defect-predictor.d.ts +25 -8
- package/dist/workers/workers/defect-predictor.js +223 -216
- package/dist/workers/workers/performance-baseline.d.ts +24 -9
- package/dist/workers/workers/performance-baseline.js +187 -230
- package/dist/workers/workers/quality-gate.d.ts +11 -9
- package/dist/workers/workers/quality-gate.js +125 -267
- package/dist/workers/workers/regression-monitor.d.ts +18 -1
- package/dist/workers/workers/regression-monitor.js +276 -117
- package/dist/workers/workers/security-scan-records.d.ts +111 -0
- package/dist/workers/workers/security-scan-records.js +128 -0
- package/dist/workers/workers/security-scan.d.ts +25 -7
- package/dist/workers/workers/security-scan.js +187 -164
- package/package.json +2 -2
- package/dist/cli/chunks/adapter-EGIPTX5H.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-WP4GCBDT.js +0 -2
- package/dist/cli/chunks/base-6ORFD62I.js +0 -2
- package/dist/cli/chunks/browser-workflow-PIXGERWP.js +0 -2
- package/dist/cli/chunks/chunk-2WFTZSRT.js +0 -2
- package/dist/cli/chunks/chunk-7YB2KELI.js +0 -5
- package/dist/cli/chunks/chunk-BBL6YXD3.js +0 -2
- package/dist/cli/chunks/chunk-BJ5P4IV2.js +0 -2
- package/dist/cli/chunks/chunk-BO4PKNYP.js +0 -102
- package/dist/cli/chunks/chunk-DFPL5N3Q.js +0 -16
- package/dist/cli/chunks/chunk-DLY4YEN3.js +0 -2
- package/dist/cli/chunks/chunk-ERGWWI4Y.js +0 -3
- package/dist/cli/chunks/chunk-GTSOFCMQ.js +0 -2
- package/dist/cli/chunks/chunk-KZVJW2SD.js +0 -2
- package/dist/cli/chunks/chunk-L336HFFE.js +0 -2
- package/dist/cli/chunks/chunk-N2TJNIHA.js +0 -2
- package/dist/cli/chunks/chunk-RCXMUEZN.js +0 -3
- package/dist/cli/chunks/chunk-SEZLYRCS.js +0 -2
- package/dist/cli/chunks/chunk-TDLKXLJC.js +0 -4
- package/dist/cli/chunks/chunk-WOZIXXY5.js +0 -7
- package/dist/cli/chunks/ci-KP4GZKJ7.js +0 -81
- package/dist/cli/chunks/client-C3KHVRM6.js +0 -2
- package/dist/cli/chunks/core-handlers-KSQM6Q6S.js +0 -2
- package/dist/cli/chunks/coverage-SPFVHRRU.js +0 -43
- package/dist/cli/chunks/coverage-target-GSRBNHXE.js +0 -2
- package/dist/cli/chunks/cross-domain-router-CTGNOVCF.js +0 -2
- package/dist/cli/chunks/daemon-M5TD5Y6T.js +0 -10
- package/dist/cli/chunks/dream-MIK2E4UL.js +0 -2
- package/dist/cli/chunks/embed-and-insert-pattern-QST77T2B.js +0 -3
- package/dist/cli/chunks/experience-capture-middleware-X66IYSRV.js +0 -40
- package/dist/cli/chunks/file-discovery-3NHRUQQB.js +0 -2
- package/dist/cli/chunks/heartbeat-scheduler-OCKRACUW.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-X67XG73C.js +0 -2
- package/dist/cli/chunks/hnsw-index-I7KCQBQR.js +0 -2
- package/dist/cli/chunks/hybrid-backend-FOUHTKAK.js +0 -2
- package/dist/cli/chunks/impact-analyzer-GXYVX46O.js +0 -2
- package/dist/cli/chunks/init-handler-2AXMXHYF.js +0 -86
- package/dist/cli/chunks/init-wizard-C2MRX2QG.js +0 -2
- package/dist/cli/chunks/kernel-Q2IUDIDC.js +0 -2
- package/dist/cli/chunks/knowledge-graph-E2Z6K5EE.js +0 -2
- package/dist/cli/chunks/learning-BEA26RNA.js +0 -122
- package/dist/cli/chunks/llm-router-service-YATYFEDD.js +0 -2
- package/dist/cli/chunks/load-test-LV77JXWA.js +0 -2
- package/dist/cli/chunks/memory-backend-XME3X3QX.js +0 -2
- package/dist/cli/chunks/memory-handlers-VG47X5DX.js +0 -2
- package/dist/cli/chunks/orchestrator-VHUXUYIM.js +0 -452
- package/dist/cli/chunks/pattern-null-store-TAXMLENP.js +0 -2
- package/dist/cli/chunks/plugin-2VAYWAO3.js +0 -27
- package/dist/cli/chunks/project-root-CFFPBGPX.js +0 -2
- package/dist/cli/chunks/protocol-executor-ML76QAVQ.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-LUZH6RYV.js +0 -2
- package/dist/cli/chunks/queen-coordinator-EWXNIXB6.js +0 -2
- package/dist/cli/chunks/real-embeddings-GZV4VKK4.js +0 -2
- package/dist/cli/chunks/router-MXOBVEBF.js +0 -2
- package/dist/cli/chunks/routing-feedback-T6CCRUEK.js +0 -2
- package/dist/cli/chunks/rvf-dual-writer-WHXVT3V3.js +0 -2
- package/dist/cli/chunks/rvf-migration-adapter-JFPWIRCG.js +0 -2
- package/dist/cli/chunks/rvf-migration-coordinator-D4KUBNRZ.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-KOXR7TJL.js +0 -2
- package/dist/cli/chunks/safe-db-CI6IPSIN.js +0 -2
- package/dist/cli/chunks/schedule-X4HW6TVJ.js +0 -2
- package/dist/cli/chunks/scheduler-KCNJ2ON3.js +0 -2
- package/dist/cli/chunks/security-7723AZZ4.js +0 -13
- package/dist/cli/chunks/shared-rvf-adapter-KEQ5CLNI.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-PGHU6VUR.js +0 -2
- package/dist/cli/chunks/sync-EFWXMA2H.js +0 -2
- package/dist/cli/chunks/token-bootstrap-S346YBVO.js +0 -2
- package/dist/cli/chunks/unified-memory-6CK3TUNQ.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-A7BWBGYN.js +0 -2
- package/dist/cli/chunks/unified-persistence-GEPMDBQZ.js +0 -2
- package/dist/cli/chunks/visual-security-L4J7LQWT.js +0 -2
- package/dist/cli/chunks/witness-chain-CDUMX623.js +0 -2
- package/dist/cli/chunks/witness-chain-repair-WNYH6O4L.js +0 -2
- package/dist/cli/chunks/witness-key-manager-NQ5DAAC4.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-USJDWVDR.js +0 -2
- package/dist/cli/chunks/wrappers-CZDI6Z3X.js +0 -2
- /package/.claude/skills/qe-court/evals/fixtures/seeded-mutant-delivery/{budget.test.ts → budget-tests.ts.fixture} +0 -0
- /package/.claude/skills/qe-court/evals/fixtures/seeded-mutant-delivery/{budget.ts → budget.ts.fixture} +0 -0
- /package/.claude/skills/testability-scoring/resources/templates/{testability-scoring.spec.template.js → testability-scoring-spec.template.js} +0 -0
- /package/assets/skills/qe-court/evals/fixtures/seeded-mutant-delivery/{budget.test.ts → budget-tests.ts.fixture} +0 -0
- /package/assets/skills/qe-court/evals/fixtures/seeded-mutant-delivery/{budget.ts → budget.ts.fixture} +0 -0
- /package/assets/skills/testability-scoring/resources/templates/{testability-scoring.spec.template.js → testability-scoring-spec.template.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.
|
|
2
|
-
import{b as d}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.7");process.exit(0)}
|
|
2
|
+
import{b as d}from"./chunk-BTYKGVJ5.js";import"./chunk-AAA4SHEG.js";import{a as c,e as f}from"./chunk-LVEX4GID.js";import"./chunk-HSDOOFV7.js";import*as s from"fs";import*as l from"path";import e from"chalk";f();var h=class{name="heartbeat";description="Manage the token-free heartbeat scheduler";cleanupAndExit;worker;constructor(t){this.cleanupAndExit=t}async getWorker(){if(!this.worker){let{HeartbeatSchedulerWorker:t}=await import("./heartbeat-scheduler-7ZIDVXIP.js");this.worker=new t}return this.worker}register(t,o){let a=t.command("heartbeat").description(this.description);a.command("status").description("Show heartbeat worker status, health, and schedule").action(async()=>{await this.executeStatus()}),a.command("run-now").description("Trigger an immediate heartbeat cycle").option("-t, --timeout <ms>","Timeout in milliseconds (default: worker built-in 60s)").action(async n=>{let i=n.timeout?parseInt(n.timeout,10):void 0;await this.executeRunNow(i)}),a.command("history").description("Show recent heartbeat results").option("-n, --count <count>","Number of entries to show","10").action(async n=>{await this.executeHistory(parseInt(n.count,10)||10)}),a.command("log").description("Show today's daily log entries").option("-d, --date <date>","Show log for specific date (YYYY-MM-DD)").action(async n=>{await this.executeLog(n.date)}),a.command("pause").description("Pause the heartbeat worker").action(async()=>{await this.executePause()}),a.command("resume").description("Resume the heartbeat worker").action(async()=>{await this.executeResume()})}async executeStatus(){try{this.worker=await this.getWorker(),await this.worker.initialize();let t=this.worker.getHealth(),o=this.worker.lastResult;if(console.log(e.blue(`
|
|
3
3
|
Heartbeat Scheduler Status`)),console.log(e.gray(" "+"\u2500".repeat(35))),console.log(` Status: ${x(t.status)}`),console.log(` Health Score: ${y(t.healthScore)}${e.gray("/100")}`),this.worker.lastRunAt){let n=p(this.worker.lastRunAt);console.log(` Last Run: ${e.cyan(this.worker.lastRunAt.toISOString().replace("T"," ").slice(0,19))} ${e.gray(`(${n})`)}`)}else console.log(` Last Run: ${e.gray("never")}`);if(this.worker.nextRunAt){let n=p(this.worker.nextRunAt,!0);console.log(` Next Run: ${e.cyan(this.worker.nextRunAt.toISOString().replace("T"," ").slice(0,19))} ${e.gray(`(${n})`)}`)}console.log(` Total Runs: ${e.cyan(String(t.totalExecutions))}`);let a=t.totalExecutions>0?(t.successfulExecutions/t.totalExecutions*100).toFixed(1):"100.0";if(console.log(` Success Rate: ${e.cyan(a+"%")}`),o?.metrics?.domainMetrics){let n=o.metrics.domainMetrics;console.log(""),console.log(e.blue(" Last Result:")),console.log(` Promoted: ${e.cyan(String(n.promoted??0))} patterns`),console.log(` Deprecated: ${e.cyan(String(n.deprecated??0))} patterns`),console.log(` Decayed: ${e.cyan(String(n.decayed??0))} patterns`),console.log(` Pending Exp: ${e.cyan(String(n.pendingExperiences??0))}`),console.log(` Avg Conf: ${e.cyan(String(n.avgConfidence??0))}`)}console.log(""),await this.cleanupAndExit(0)}catch(t){console.error(e.red(`
|
|
4
4
|
Failed to get heartbeat status:`),c(t)),await this.cleanupAndExit(1)}}async executeRunNow(t){try{this.worker=await this.getWorker(),console.log(e.blue(`
|
|
5
5
|
Triggering heartbeat cycle...
|
|
@@ -8,7 +8,7 @@ import{b as d}from"./chunk-SEZLYRCS.js";import{a as c,e as f}from"./chunk-NLDFNA
|
|
|
8
8
|
Heartbeat History (last ${o.length})`)),console.log(e.gray(" "+"\u2500".repeat(60)));for(let a of o){let n=a.success?e.green("OK"):e.red("FAIL"),i=a.timestamp.slice(0,19).replace("T"," "),u=a.domainMetrics||{};console.log(` ${e.gray(i)} ${n} score:${e.cyan(String(a.healthScore))} +${u.promoted??0}/-${u.deprecated??0} ${e.gray(d(a.durationMs))}`)}console.log(""),await this.cleanupAndExit(0)}catch(o){console.error(e.red(`
|
|
9
9
|
Failed to load history:`),c(o)),await this.cleanupAndExit(1)}}async executeLog(t){try{let o=t||new Date().toISOString().split("T")[0];if(!/^\d{4}-\d{2}-\d{2}$/.test(o)){console.error(e.red(`
|
|
10
10
|
Invalid date format: "${o}". Use YYYY-MM-DD.
|
|
11
|
-
`)),await this.cleanupAndExit(1);return}let{findProjectRoot:a}=await import("./unified-memory-
|
|
11
|
+
`)),await this.cleanupAndExit(1);return}let{findProjectRoot:a}=await import("./unified-memory-2Z2F446J.js"),n=l.join(a(),".agentic-qe","logs"),i=l.join(n,`${o}.md`);if(!s.existsSync(i)){console.log(e.yellow(`
|
|
12
12
|
No daily log found for ${o}.
|
|
13
13
|
`)),await this.cleanupAndExit(0);return}let u=s.readFileSync(i,"utf-8");console.log(e.blue(`
|
|
14
14
|
Daily Log \u2014 ${o}`)),console.log(e.gray(" "+"\u2500".repeat(40)));for(let g of u.split(`
|
|
@@ -45,4 +45,4 @@ Examples:
|
|
|
45
45
|
aqe heartbeat log --date 2026-03-25
|
|
46
46
|
aqe heartbeat pause
|
|
47
47
|
aqe heartbeat resume
|
|
48
|
-
`}},m=100;async function w(){let{findProjectRoot:r}=await import("./unified-memory-
|
|
48
|
+
`}},m=100;async function w(){let{findProjectRoot:r}=await import("./unified-memory-2Z2F446J.js");return l.join(r(),".agentic-qe","heartbeat-history.json")}async function b(r){try{let t=await w(),o=l.dirname(t);s.existsSync(o)||s.mkdirSync(o,{recursive:!0});let a=[];if(s.existsSync(t))try{a=JSON.parse(s.readFileSync(t,"utf-8"))}catch{a=[]}a.unshift({timestamp:r.timestamp.toISOString(),success:r.success,durationMs:r.durationMs,healthScore:r.metrics.healthScore,domainMetrics:r.metrics.domainMetrics}),a.length>m&&(a=a.slice(0,m)),s.writeFileSync(t,JSON.stringify(a,null,2))}catch{}}async function S(r){try{let t=await w();return s.existsSync(t)?JSON.parse(s.readFileSync(t,"utf-8")).slice(0,r):[]}catch{return[]}}function x(r){switch(r){case"idle":return e.cyan(r);case"running":return e.yellow(r);case"paused":return e.yellow(r);case"stopped":return e.gray(r);case"error":return e.red(r);default:return e.white(r)}}function y(r){return r>=80?e.green(String(r)):r>=50?e.yellow(String(r)):e.red(String(r))}function k(r){switch(r){case"improving":return e.green(r);case"stable":return e.cyan(r);case"degrading":return e.red(r);default:return e.gray(r)}}function p(r,t=!1){let o=t?r.getTime()-Date.now():Date.now()-r.getTime();return o<0?t?"now":"just now":o<6e4?`${Math.floor(o/1e3)}s ${t?"from now":"ago"}`:o<36e5?`${Math.floor(o/6e4)}m ${t?"from now":"ago"}`:`${Math.floor(o/36e5)}h ${t?"from now":"ago"}`}function A(r){return new h(r)}export{h as HeartbeatHandler,A as createHeartbeatHandler};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.7");process.exit(0)}
|
|
2
|
+
import{b as a}from"./chunk-I7H4IP7T.js";import"./chunk-QQT6QENQ.js";import"./chunk-3RM46XFP.js";import"./chunk-6OS7HREG.js";import"./chunk-V2SAEMZY.js";import"./chunk-ZLVQSEZK.js";import"./chunk-LMEU64TR.js";import"./chunk-4G2VNW4C.js";import"./chunk-7EX4DEQR.js";import"./chunk-QNQSM2OG.js";import"./chunk-F62EKVVC.js";import"./chunk-HTWIGQL4.js";import"./chunk-ONVALAZN.js";import"./chunk-ZTMZFF25.js";import"./chunk-Q2T5FXEA.js";import"./chunk-RNYX4CPI.js";import"./chunk-WXI2STKQ.js";import"./chunk-VJRZFWR5.js";import"./chunk-JYXOFN3E.js";import"./chunk-KPOPBUUJ.js";import"./chunk-LVEX4GID.js";import"./chunk-LGBN7TKC.js";import"./chunk-5Q22XPTH.js";import"./chunk-ZUMDDMDE.js";import"./chunk-IARSGAG7.js";import"./chunk-JVYPXW6Y.js";import"./chunk-HSDOOFV7.js";export{a as HeartbeatSchedulerWorker};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.7");process.exit(0)}
|
|
2
|
+
import{a,b}from"./chunk-ZTMZFF25.js";import"./chunk-Q2T5FXEA.js";import"./chunk-LGBN7TKC.js";import"./chunk-HSDOOFV7.js";b();export{a as HnswAdapter};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.7");process.exit(0)}
|
|
2
|
+
import{a,b,c,d}from"./chunk-VKPKYMCT.js";import"./chunk-HTWIGQL4.js";import"./chunk-ZTMZFF25.js";import"./chunk-Q2T5FXEA.js";import"./chunk-VJRZFWR5.js";import"./chunk-JYXOFN3E.js";import"./chunk-KPOPBUUJ.js";import"./chunk-LGBN7TKC.js";import"./chunk-HSDOOFV7.js";export{a as DEFAULT_HNSW_CONFIG,b as HNSWIndex,d as benchmarkHNSW,c as createHNSWIndex};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.7");process.exit(0)}
|
|
2
|
+
import"./chunk-HSDOOFV7.js";var s=class{adapter;metadataMap=new Map;insertCount=0;constructor(e){this.adapter=e}async initialize(){}async insert(e,t,r){this.adapter.addByStringId(e,t),this.insertCount++,r&&this.metadataMap.set(e,r)}async search(e,t){return this.adapter.searchByArray(e,t).map(a=>({key:a.id,score:a.score,distance:1-a.score,metadata:this.metadataMap.get(a.id)}))}async batchInsert(e){for(let t of e)await this.insert(t.key,t.vector,t.metadata)}async delete(e){let t=this.adapter.removeByStringId(e);return t&&this.metadataMap.delete(e),t}async getStats(){return{nativeHNSW:!0,backendType:"ruvector-gnn",vectorCount:this.adapter.size(),indexSizeBytes:this.adapter.size()*this.adapter.dimensions()*4,avgSearchLatencyMs:this.adapter.lastSearchLatencyMs,p95SearchLatencyMs:0,p99SearchLatencyMs:0,searchOperations:0,insertOperations:this.insertCount}}async clear(){this.adapter.clear(),this.metadataMap.clear(),this.insertCount=0}isNativeAvailable(){return!0}};export{s as HnswLegacyBridge};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.7");process.exit(0)}
|
|
2
|
+
import"./chunk-HSDOOFV7.js";import{createRequire as t}from"module";var o=t(import.meta.url),e=o("hnswlib-node"),i=e,{RuvectorLayer:r,TensorCompress:a,differentiableSearch:c,hierarchicalForward:l,getCompressionLevel:s,init:p,FlashAttention:d,DotProductAttention:m,MultiHeadAttention:u,HyperbolicAttention:A,LinearAttention:h,MoEAttention:f,SonaEngine:_,pipeline:b}=e||{};export{m as DotProductAttention,d as FlashAttention,A as HyperbolicAttention,h as LinearAttention,f as MoEAttention,u as MultiHeadAttention,r as RuvectorLayer,_ as SonaEngine,a as TensorCompress,i as default,c as differentiableSearch,s as getCompressionLevel,l as hierarchicalForward,p as init,b as pipeline};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.
|
|
3
|
-
import{a as v,b as
|
|
2
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.7");process.exit(0)}
|
|
3
|
+
import{a as v,b as ke,c as ye}from"./chunk-24CENUT4.js";import{c as fe,d as he}from"./chunk-CWPRU7ZI.js";import{a as Y}from"./chunk-MJJC6HUK.js";import{d as W,h as ne}from"./chunk-IC2WSSD5.js";import"./chunk-EV2BYY6T.js";import{b as me}from"./chunk-DCJW2DPL.js";import"./chunk-ZRLNACPY.js";import{b as K}from"./chunk-V2SAEMZY.js";import"./chunk-G7YTZTGU.js";import"./chunk-Y4SAWE45.js";import"./chunk-XEWXYGJI.js";import"./chunk-634D2ENF.js";import"./chunk-J43DV3ME.js";import{a as ue}from"./chunk-PXZKPUW6.js";import"./chunk-RCYLCA7E.js";import{a as pe,b as ge}from"./chunk-BB7OLQKO.js";import"./chunk-N4PMPSJJ.js";import{o as M,s as U}from"./chunk-ZLVQSEZK.js";import"./chunk-LMEU64TR.js";import{b as le,d as qe}from"./chunk-4G2VNW4C.js";import"./chunk-7EX4DEQR.js";import"./chunk-QNQSM2OG.js";import"./chunk-F62EKVVC.js";import"./chunk-HTWIGQL4.js";import"./chunk-ONVALAZN.js";import"./chunk-ZTMZFF25.js";import"./chunk-Q2T5FXEA.js";import"./chunk-C2MDBBFF.js";import"./chunk-RNYX4CPI.js";import"./chunk-FTTFJ7SJ.js";import"./chunk-CG5DZCOZ.js";import"./chunk-WXI2STKQ.js";import{a as Ce}from"./chunk-VJRZFWR5.js";import{e as de}from"./chunk-JYXOFN3E.js";import"./chunk-KPOPBUUJ.js";import"./chunk-LVEX4GID.js";import"./chunk-LGBN7TKC.js";import"./chunk-MRHM4COP.js";import{c as R}from"./chunk-5Q22XPTH.js";import"./chunk-ZUMDDMDE.js";import"./chunk-44DPYNPE.js";import"./chunk-FVBFASOD.js";import"./chunk-IARSGAG7.js";import"./chunk-JVYPXW6Y.js";import"./chunk-HSDOOFV7.js";import{Command as ut}from"commander";import $ from"chalk";import Te from"node:path";U();import{randomUUID as B}from"crypto";import I from"chalk";var H="dream-scheduler:hook-state";async function Ee(r,e,t){try{let{computeRealEmbedding:n}=await import("./real-embeddings-4QLQZDB5.js"),o=await n(t.slice(0,512));r.prepare("UPDATE captured_experiences SET embedding = ?, embedding_dimension = ? WHERE id = ?").run(Buffer.from(new Float32Array(o).buffer),o.length,e)}catch(n){console.error(I.dim(`[hooks] embedding persistence: ${n instanceof Error?n.message:"unknown"}`))}}async function x(r){try{let e=await r.get(H);return e||(e={lastDreamTime:null,experienceCount:0,sessionStartTime:new Date().toISOString(),totalDreamsThisSession:0}),e.experienceCount++,await r.set(H,e),e.experienceCount}catch{return 0}}async function G(r){try{let{getUnifiedMemory:e}=await import("./unified-memory-2Z2F446J.js"),t=e();t.isInitialized()||await t.initialize();let{initializeExperienceCapture:n}=await import("./experience-capture-middleware-F72TIRQY.js");await n();let o=t.getDatabase();try{o.pragma("busy_timeout = 60000")}catch{}let s=`cli-${Date.now()}-${B().slice(0,8)}`,a=r.durationMs||0,c;if(r.success){let i=a>0&&a<5e3?.1:0,f=r.source.includes("post-task")?.1:r.source.includes("post-edit")?.05:0;c=Math.min(.95,.7+i+f)}else{let i=r.source.includes("post-task")?.15:r.source.includes("post-edit")?.1:0;c=Math.min(.6,.3+i)}o.prepare(`
|
|
4
4
|
INSERT OR REPLACE INTO captured_experiences
|
|
5
5
|
(id, task, agent, domain, success, quality, duration_ms,
|
|
6
6
|
started_at, completed_at, source)
|
|
7
7
|
VALUES (?, ?, ?, ?, ?, ?, ?, datetime('now'), datetime('now'), ?)
|
|
8
|
-
`).run(s,
|
|
8
|
+
`).run(s,r.task.slice(0,500),r.agent,r.domain,r.success?1:0,c,a,r.source),await Ee(o,s,`${r.domain}: ${r.task}`)}catch(e){console.error(I.dim(`[hooks] persistCommandExperience: ${e instanceof Error?e.message:"unknown"}`))}}async function re(r){let{getUnifiedMemory:e}=await import("./unified-memory-2Z2F446J.js"),t=e();t.isInitialized()||await t.initialize();let n=t.getDatabase();try{n.pragma("busy_timeout = 60000")}catch{}try{n.exec(`
|
|
9
9
|
CREATE TABLE IF NOT EXISTS captured_experiences (
|
|
10
10
|
id TEXT PRIMARY KEY,
|
|
11
11
|
task TEXT NOT NULL,
|
|
@@ -40,16 +40,16 @@ import{a as v,b as he,c as ke}from"./chunk-VLOIEVER.js";import{c as ge,d as fe}f
|
|
|
40
40
|
FOREIGN KEY (experience_id) REFERENCES captured_experiences(id) ON DELETE CASCADE
|
|
41
41
|
);
|
|
42
42
|
CREATE INDEX IF NOT EXISTS idx_exp_apps_experience ON experience_applications(experience_id);
|
|
43
|
-
`)}catch{}try{let u=n.prepare("PRAGMA table_info(qe_trajectories)").all();u.length>0&&!u.some(E=>E.name==="metadata_json")&&n.exec("ALTER TABLE qe_trajectories ADD COLUMN metadata_json TEXT")}catch{}let
|
|
43
|
+
`)}catch{}try{let u=n.prepare("PRAGMA table_info(qe_trajectories)").all();u.length>0&&!u.some(E=>E.name==="metadata_json")&&n.exec("ALTER TABLE qe_trajectories ADD COLUMN metadata_json TEXT")}catch{}let o=`exp-${Date.now()}-${B().slice(0,8)}`,s=`${r.agent}:${r.taskId}`,a=r.durationMs??0,c=r.success?1:0,i=a<100?1:a<500?.8:a<2e3?.6:a<5e3?.4:a<1e4?.2:.1,f=.25*c+.325+.1*i,l=null,p=0,d=0,k=n.transaction(()=>{n.prepare(`
|
|
44
44
|
INSERT INTO captured_experiences
|
|
45
45
|
(id, task, agent, domain, success, quality, duration_ms,
|
|
46
46
|
model_tier, started_at, completed_at, source)
|
|
47
47
|
VALUES (?, ?, ?, ?, ?, ?, ?, NULL, datetime('now'), datetime('now'), ?)
|
|
48
|
-
`).run(
|
|
48
|
+
`).run(o,s.slice(0,500),r.agent,r.domain??"general",r.success?1:0,f,a,"cli-hook-post-task"),n.prepare(`
|
|
49
49
|
INSERT INTO experience_applications
|
|
50
50
|
(id, experience_id, task, success, tokens_saved, feedback, applied_at)
|
|
51
51
|
VALUES (?, ?, ?, ?, ?, ?, datetime('now'))
|
|
52
|
-
`).run(`app-${Date.now()}-${B().slice(0,8)}`,
|
|
52
|
+
`).run(`app-${Date.now()}-${B().slice(0,8)}`,o,s,r.success?1:0,Math.round(f*100),`[Patch 060] post-task outcome: ${r.success?"success":"failure"}`);try{let g=n.prepare(`
|
|
53
53
|
SELECT key, value FROM kv_store
|
|
54
54
|
WHERE namespace = 'task-bridge'
|
|
55
55
|
AND (expires_at IS NULL OR expires_at > strftime('%s','now') * 1000)
|
|
@@ -71,29 +71,29 @@ import{a as v,b as he,c as ke}from"./chunk-VLOIEVER.js";import{c as ge,d as fe}f
|
|
|
71
71
|
AND successful_uses >= 3
|
|
72
72
|
AND success_rate >= 0.7
|
|
73
73
|
AND confidence >= 0.6
|
|
74
|
-
`);for(let
|
|
74
|
+
`);for(let b of l.selectedPatternIds){D.run(`app-${Date.now()}-${B().slice(0,8)}`,o,`${s}:pattern:${b}`,r.success?1:0,T,`[Patch 160+300] task-bridge pattern_id=${b} ts=${T}`);try{pe(n,{patternId:b,success:r.success,metrics:{tokens_saved:T,source:"cli-hook-post-task",experience_id:o},feedback:`[Patch 160+300] task-bridge pattern_id=${b} ts=${T}`})}catch{}try{let j=L.get(b);j?.tier==="short-term"&&j.successful_uses>=3&&j.success_rate>=.7&&j.confidence>=.6&&C.run(b)}catch{}}g&&n.prepare("DELETE FROM kv_store WHERE namespace='task-bridge' AND key = ?").run(g.key)}}catch(g){console.error(I.dim(`[hooks] post-task bridge: ${g instanceof Error?g.message:"unknown"}`))}let u=`traj-${Date.now()}-${B().slice(0,8)}`,E=r.parentAgentId!==void 0||r.depth!==void 0?JSON.stringify({...r.parentAgentId!==void 0?{parentAgentId:r.parentAgentId}:{},...r.depth!==void 0?{depth:r.depth}:{}}):null;n.prepare(`
|
|
75
75
|
INSERT INTO qe_trajectories (id, task, agent, domain, started_at, ended_at, success, steps_json, metadata_json)
|
|
76
76
|
VALUES (?, ?, ?, ?, datetime('now'), datetime('now'), ?, ?, ?)
|
|
77
|
-
`).run(u,s,
|
|
77
|
+
`).run(u,s,r.agent,r.domain??"general",r.success?1:0,JSON.stringify([{step:1,task:r.taskId,success:r.success}]),E);try{let g=n.prepare(`
|
|
78
78
|
SELECT id, task, agent, success, started_at, completed_at
|
|
79
79
|
FROM captured_experiences
|
|
80
80
|
WHERE consolidated_into IS NULL
|
|
81
81
|
AND task LIKE ?
|
|
82
82
|
AND started_at > datetime('now', '-1 hour')
|
|
83
83
|
ORDER BY started_at ASC
|
|
84
|
-
`).all(`%:${
|
|
84
|
+
`).all(`%:${r.taskId}`);if(g.length>=2){let T=`traj-multi-${Date.now()}-${B().slice(0,8)}`,D=JSON.stringify(g.map((b,j)=>({step:j+1,task:b.task,agent:b.agent,success:!!b.success,started_at:b.started_at,completed_at:b.completed_at}))),L=g.every(b=>!!b.success);n.prepare(`
|
|
85
85
|
INSERT INTO qe_trajectories (id, task, agent, domain, started_at, ended_at, success, steps_json)
|
|
86
86
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?)
|
|
87
|
-
`).run(T,`multi:${
|
|
87
|
+
`).run(T,`multi:${r.taskId}`,r.agent,r.domain??"general",g[0].started_at,g[g.length-1].completed_at,L?1:0,D);let C=g.map(()=>"?").join(",");n.prepare(`UPDATE captured_experiences SET consolidated_into = ? WHERE id IN (${C})`).run(T,...g.map(b=>b.id)),p=g.length}}catch(g){console.error(I.dim(`[hooks] post-task stitch: ${g instanceof Error?g.message:"unknown"}`))}});try{k()}catch(u){console.error(I.dim(`[hooks] persistTaskOutcome txn: ${u instanceof Error?u.message:"unknown"}`))}if(r.success)try{let u=n.prepare(`
|
|
88
88
|
SELECT id FROM dream_insights
|
|
89
89
|
WHERE actionable = 1 AND (applied = 0 OR applied IS NULL)
|
|
90
90
|
ORDER BY created_at DESC
|
|
91
91
|
LIMIT 3
|
|
92
|
-
`).all();if(u.length>0){let{createDreamEngine:E}=await import("./dream-
|
|
92
|
+
`).all();if(u.length>0){let{createDreamEngine:E}=await import("./dream-5AUNJW24.js"),g=E();await g.initialize();try{for(let T of u){let D=await g.applyInsight(T.id);D.success&&D.patternId&&d++}}finally{await g.close()}}}catch(u){console.error(I.dim(`[hooks] post-task insight apply: ${u instanceof Error?u.message:"unknown"}`))}return await Ee(n,o,`${r.domain??"general"}: ${s}`),{experienceId:o,qualityScore:f,bridge:l,stitchedSiblings:p,insightsApplied:d}}async function J(r){try{let{getUnifiedMemory:e}=await import("./unified-memory-2Z2F446J.js"),t=e();t.isInitialized()||await t.initialize();let n=t.getDatabase();try{n.pragma("busy_timeout = 60000")}catch{}let o=`${r.taskType}|${r.priority}|${r.domain||"any"}`,s=r.agent,a=`q-learning:aqe-hook-router:${o}:${s}`,c=r.success?.1:-1,i=.1,f=.9,l=n.prepare(`
|
|
93
93
|
SELECT q_value FROM rl_q_values WHERE id = ?
|
|
94
94
|
`).get(a),p=l&&typeof l.q_value=="number"?l.q_value:0,d=n.prepare(`
|
|
95
95
|
SELECT MAX(q_value) AS m FROM rl_q_values WHERE state_key = ?
|
|
96
|
-
`).get(
|
|
96
|
+
`).get(o),k=d&&typeof d.m=="number"?d.m:0,u=p+i*(c+f*k-p);n.prepare(`
|
|
97
97
|
INSERT INTO rl_q_values
|
|
98
98
|
(id, algorithm, agent_id, state_key, action_key, q_value, visits, last_reward, domain, created_at, updated_at)
|
|
99
99
|
VALUES (?, 'q-learning', 'aqe-hook-router', ?, ?, ?, 1, ?, ?, datetime('now'), datetime('now'))
|
|
@@ -102,7 +102,7 @@ import{a as v,b as he,c as ke}from"./chunk-VLOIEVER.js";import{c as ge,d as fe}f
|
|
|
102
102
|
visits = visits + 1,
|
|
103
103
|
last_reward = excluded.last_reward,
|
|
104
104
|
updated_at = datetime('now')
|
|
105
|
-
`).run(a,
|
|
105
|
+
`).run(a,o,s,u,c,r.domain||"any")}catch(e){console.error(I.dim(`[hooks] q-learning update: ${e instanceof Error?e.message:"unknown"}`))}}async function oe(r){try{let{getUnifiedMemory:e}=await import("./unified-memory-2Z2F446J.js"),t=e();t.isInitialized()||await t.initialize();let n=t.getDatabase();try{n.pragma("busy_timeout = 60000")}catch{}n.prepare(`
|
|
106
106
|
UPDATE routing_outcomes
|
|
107
107
|
SET success = ?, quality_score = ?, duration_ms = ?
|
|
108
108
|
WHERE id IN (
|
|
@@ -113,7 +113,7 @@ import{a as v,b as he,c as ke}from"./chunk-VLOIEVER.js";import{c as ge,d as fe}f
|
|
|
113
113
|
ORDER BY (CASE WHEN used_agent = ? THEN 0 ELSE 1 END), created_at DESC
|
|
114
114
|
LIMIT 1
|
|
115
115
|
)
|
|
116
|
-
`).run(
|
|
116
|
+
`).run(r.success?1:0,r.qualityScore,r.durationMs,r.agent)}catch(e){console.error(I.dim(`[hooks] routing UPDATE: ${e instanceof Error?e.message:"unknown"}`))}}async function se(){let{getUnifiedMemory:r}=await import("./unified-memory-2Z2F446J.js"),e=r();e.isInitialized()||await e.initialize();let t=e.getDatabase();try{t.pragma("busy_timeout = 60000")}catch{}let n=new Set(t.prepare("PRAGMA table_info(captured_experiences)").all().map(i=>i.name)),o=[["consolidated_into","TEXT DEFAULT NULL"],["consolidation_count","INTEGER DEFAULT 1"],["quality_updated_at","TEXT DEFAULT NULL"],["reuse_success_count","INTEGER DEFAULT 0"],["reuse_failure_count","INTEGER DEFAULT 0"]];for(let[i,f]of o)n.has(i)||t.exec(`ALTER TABLE captured_experiences ADD COLUMN ${i} ${f}`);let s=t.prepare(`
|
|
117
117
|
SELECT
|
|
118
118
|
domain,
|
|
119
119
|
agent,
|
|
@@ -129,11 +129,11 @@ import{a as v,b as he,c as ke}from"./chunk-VLOIEVER.js";import{c as ge,d as fe}f
|
|
|
129
129
|
HAVING cnt >= 3 AND avg_quality >= 0.5 AND success_rate >= 0.6
|
|
130
130
|
ORDER BY avg_quality DESC
|
|
131
131
|
LIMIT 50
|
|
132
|
-
`).all();if(s.length===0)return 0;let{v4:a}=await import("./dist-node-
|
|
132
|
+
`).all();if(s.length===0)return 0;let{v4:a}=await import("./dist-node-3VKV4Z6C.js"),c=0;for(let i of s)try{let f=new Date().toISOString().slice(0,7),l=`${i.agent}-${i.domain}-${f}`,p=t.prepare(`
|
|
133
133
|
SELECT id FROM qe_patterns
|
|
134
134
|
WHERE qe_domain = ? AND name = ?
|
|
135
135
|
LIMIT 1
|
|
136
|
-
`).get(i.domain,l);if(p)
|
|
136
|
+
`).get(i.domain,l);if(p)ge(t,{patternId:p.id,usageCount:i.cnt,successfulUses:i.successes,metrics:{source:"session-consolidation",domain:i.domain,agent:i.agent}}),t.prepare(`
|
|
137
137
|
UPDATE qe_patterns
|
|
138
138
|
SET confidence = MIN(0.99, confidence + 0.01), updated_at = datetime('now')
|
|
139
139
|
WHERE id = ?
|
|
@@ -142,33 +142,33 @@ import{a as v,b as he,c as ke}from"./chunk-VLOIEVER.js";import{c as ge,d as fe}f
|
|
|
142
142
|
SET tier = 'long-term', updated_at = datetime('now')
|
|
143
143
|
WHERE id = ? AND tier = 'short-term'
|
|
144
144
|
AND successful_uses >= 3 AND success_rate >= 0.7 AND confidence >= 0.6
|
|
145
|
-
`).run(p.id);else{let d=a(),
|
|
145
|
+
`).run(p.id);else{let d=a(),k=Math.min(.95,i.avg_quality*.8+i.success_rate*.2),u=k*.3+Math.min(i.cnt,100)/100*.2+i.success_rate*.5,E=`Auto-consolidated from ${i.cnt} experiences. Agent: ${i.agent}, success rate: ${(i.success_rate*100).toFixed(0)}%`,g=(i.sources||"").split(",").filter(Boolean);t.prepare(`
|
|
146
146
|
INSERT INTO qe_patterns (
|
|
147
147
|
id, pattern_type, qe_domain, domain, name, description,
|
|
148
148
|
confidence, usage_count, success_rate, quality_score, tier,
|
|
149
149
|
template_json, context_json, created_at, last_used_at, successful_uses
|
|
150
150
|
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, datetime('now'), datetime('now'), ?)
|
|
151
|
-
`).run(d,"workflow",i.domain,i.domain,l,E,
|
|
151
|
+
`).run(d,"workflow",i.domain,i.domain,l,E,k,i.cnt,i.success_rate,u,"short-term",JSON.stringify({type:"workflow",content:`${i.agent} pattern for ${i.domain}`,variables:[]}),JSON.stringify({tags:g,sourceType:"session-consolidation",extractedAt:new Date().toISOString()}),i.successes);let{ensurePatternEmbedding:T}=await import("./embed-and-insert-pattern-VL3HFLPV.js");await T(t,d,l,E,g),c++}t.prepare(`
|
|
152
152
|
UPDATE captured_experiences
|
|
153
153
|
SET application_count = application_count + 1
|
|
154
154
|
WHERE domain = ? AND agent = ? AND application_count = 0
|
|
155
|
-
`).run(i.domain,i.agent)}catch{}return c}var m={reasoningBank:null,hookRegistry:null,coherenceService:null,sessionId:null,initialized:!1,initializationPromise:null};async function
|
|
156
|
-
\u{1F4DD} Pre-Edit Analysis`)),console.log(P.dim(` File: ${e.file}`)),console.log(P.dim(` Operation: ${e.operation}`)),
|
|
157
|
-
\u{1F3AF} Recommended Agent:`),P.cyan(
|
|
158
|
-
\u{1F4A1} Guidance:`)),Z(
|
|
155
|
+
`).run(i.domain,i.agent)}catch{}return c}var m={reasoningBank:null,hookRegistry:null,coherenceService:null,sessionId:null,initialized:!1,initializationPromise:null};async function _e(){let r=m.reasoningBank;try{r&&await r.dispose()}catch{}try{let{resetSharedRvfDualWriter:e}=await import("./shared-rvf-dual-writer-4BGDVPQ7.js");e()}catch{}try{let{resetSharedRvfAdapter:e}=await import("./shared-rvf-adapter-YHLLNFHF.js");e()}catch{}m.reasoningBank=null,m.hookRegistry=null,m.coherenceService=null,m.sessionId=null,m.initialized=!1,m.initializationPromise=null}async function _(){if(m.initializationPromise&&await m.initializationPromise,m.initialized&&m.reasoningBank&&m.hookRegistry)return{reasoningBank:m.reasoningBank,hookRegistry:m.hookRegistry};if(m.initializationPromise=je(),await m.initializationPromise,m.initializationPromise=null,!m.reasoningBank||!m.hookRegistry)throw new Error("Failed to initialize hooks system");return{reasoningBank:m.reasoningBank,hookRegistry:m.hookRegistry}}async function je(){if(!m.initialized)try{let r=R(),e=Te.join(r,".agentic-qe"),t=await O(e);try{m.coherenceService=await fe(he),console.log($.dim("[hooks] CoherenceService initialized with WASM engines"))}catch(a){console.log($.dim(`[hooks] CoherenceService WASM unavailable, using fallback: ${a instanceof Error?a.message:"unknown"}`))}m.reasoningBank=ne(t,void 0,{enableLearning:!0,enableGuidance:!0,enableRouting:!0,embeddingDimension:384,useONNXEmbeddings:!0},m.coherenceService??void 0);let n=1e4,o=new AbortController,s=setTimeout(()=>o.abort(new Error("ReasoningBank init timeout")),n);try{await m.reasoningBank.initialize({signal:o.signal})}finally{clearTimeout(s)}try{let{getSharedRvfDualWriter:a}=await import("./shared-rvf-dual-writer-4BGDVPQ7.js"),c=await a();c&&m.reasoningBank.setRvfDualWriter(c)}catch(a){process.env.DEBUG&&console.debug("[hooks] RVF wiring skipped:",a instanceof Error?a.message:a)}m.hookRegistry=ye(m.reasoningBank),m.initialized=!0,console.log($.dim("[hooks] System initialized"))}catch(r){console.warn($.yellow(`[hooks] Using fallback mode: ${r instanceof Error?r.message:"unknown error"}`));let e=Me();m.reasoningBank=ne(e,void 0,{enableLearning:!0,enableGuidance:!0,enableRouting:!0}),m.hookRegistry=new ke,m.hookRegistry.initialize(m.reasoningBank),m.initialized=!0}}function q(r){try{r.pragma("busy_timeout = 60000")}catch{}}async function O(r){let t=new ue({sqlite:{path:Te.join(r,"memory.db"),walMode:!0,poolSize:3,busyTimeout:6e4},enableFallback:!0,defaultNamespace:"qe-patterns"}),n=new AbortController,o=setTimeout(()=>n.abort(new Error("Backend init timeout")),5e3);try{await t.initialize({signal:n.signal})}finally{clearTimeout(o)}return t}function Me(){let r=new Map;return{initialize:async()=>{},dispose:async()=>{r.clear()},get:async e=>{let t=r.get(e);return t?t.value:void 0},set:async(e,t,n)=>{r.set(e,{value:t})},delete:async e=>r.delete(e),has:async e=>r.has(e),search:async(e,t)=>{let n=e.replace(/[.+?^${}()|[\]\\]/g,"\\$&"),o=new RegExp(n.replace(/\*/g,".*"));return Array.from(r.keys()).filter(s=>o.test(s))},vectorSearch:async(e,t)=>[],storeVector:async(e,t,n)=>{},count:async e=>{let t=0,n=`${e}:`;for(let o of r.keys())o.startsWith(n)&&t++;return t},hasCodeIntelligenceIndex:async()=>{let e="code-intelligence:kg:";for(let t of r.keys())if(t.startsWith(e))return!0;return!1}}}function h(r){console.log(JSON.stringify(r,null,2))}function N(r){console.log($.green("\u2713"),r)}function S(r){console.error($.red("\u2717"),r)}function Z(r){if(r.length===0){console.log($.dim(" No specific guidance"));return}r.forEach((e,t)=>{console.log($.cyan(` ${t+1}.`),e)})}async function F(r=500){return process.stdin.isTTY?"":new Promise(e=>{let t="",n=setTimeout(()=>{process.stdin.removeAllListeners(),process.stdin.pause(),e(t)},r);process.stdin.setEncoding("utf8"),process.stdin.on("data",o=>{t+=o}),process.stdin.on("end",()=>{clearTimeout(n),e(t)}),process.stdin.on("error",()=>{clearTimeout(n),e(t)}),process.stdin.resume()})}function be(r){if(!r.trim())return"";let e;try{e=JSON.parse(r)}catch{return""}let t=e.tool_input,n=e.toolInput,o=[t?.file_path,t?.filePath,n?.file_path,n?.filePath,e.file_path,e.filePath];for(let s of o)if(typeof s=="string"&&s.trim())return s;return""}function Se(r){if(!r.trim())return"";let e;try{e=JSON.parse(r)}catch{return""}let t=e.tool_input,n=e.toolInput,o=[t?.subagent_type,t?.subagentType,n?.subagent_type,n?.subagentType,e.subagent_type,e.subagentType];for(let s of o)if(typeof s=="string"&&s.trim())return s;return""}import P from"chalk";import Ue from"node:path";U();function we(r){r.command("pre-edit").description("Get context and guidance before editing a file").requiredOption("-f, --file <path>","File path to edit").option("-o, --operation <type>","Operation type: create, update, delete, refactor","update").option("--json","Output as JSON").action(async e=>{try{let{hookRegistry:t}=await _(),o=(await t.emit(v.PreTestGeneration,{targetFile:e.file,testType:"unit",operation:e.operation}))[0]||{success:!0,guidance:[],routing:null};if(e.json){let s=o.guidance||[],c=[o.routing?.recommendedAgent?`Recommended agent: ${o.routing.recommendedAgent} (${(o.routing.confidence*100).toFixed(0)}% confidence).`:"",...s.map(i=>i)].filter(Boolean).join(" ");h({hookSpecificOutput:{hookEventName:"PreToolUse",additionalContext:c||void 0},file:e.file,operation:e.operation,patterns:o.routing?.patterns?.length||0})}else console.log(P.bold(`
|
|
156
|
+
\u{1F4DD} Pre-Edit Analysis`)),console.log(P.dim(` File: ${e.file}`)),console.log(P.dim(` Operation: ${e.operation}`)),o.routing&&(console.log(P.bold(`
|
|
157
|
+
\u{1F3AF} Recommended Agent:`),P.cyan(o.routing.recommendedAgent)),console.log(P.dim(` Confidence: ${(o.routing.confidence*100).toFixed(1)}%`))),console.log(P.bold(`
|
|
158
|
+
\u{1F4A1} Guidance:`)),Z(o.guidance||[]);return}catch(t){throw S(`pre-edit failed: ${t instanceof Error?t.message:"unknown"}`),t}}),r.command("post-edit").description("Record editing outcome for pattern learning").requiredOption("-f, --file <path>","File path that was edited").option("--success","Edit was successful").option("--failure","Edit failed").option("--pattern-id <id>","Pattern ID that was applied").option("--json","Output as JSON").action(async e=>{try{let{hookRegistry:t}=await _(),n=e.success||!e.failure,o=e.file||"";if(!o.trim())try{let p=await F();o=be(p)}catch{}let s=o.split("/").pop()||"unknown",c=/\.(test|spec)\.(ts|js|tsx|jsx)$/.test(s)?"test-generation":"code-intelligence",i=e.patternId||`edit:${c}:${s}`,l=(await t.emit(v.PostTestGeneration,{targetFile:o,success:n,patternId:i,generatedTests:null,testCount:0}))[0]||{success:!0,patternsLearned:0};try{let{reasoningBank:p}=await _();await p.recordOutcome({patternId:i,success:n,metrics:{executionTimeMs:0},feedback:`Edit ${n?"succeeded":"failed"}: ${o}`})}catch{}try{await G({task:`edit: ${o}`,agent:"cli-hook",domain:c,success:n,source:"cli-hook-post-edit"})}catch{}try{let p=R(),d=Ue.join(p,".agentic-qe"),k=await O(d);await x(k)}catch{}e.json?h({success:!0,file:o,editSuccess:n,patternsLearned:l.patternsLearned||0,dreamTriggered:!1,dreamReason:"deferred-to-kernel"}):(N(`Recorded edit outcome for ${o||"(unknown file)"}`),l.patternsLearned&&console.log(P.green(` Patterns learned: ${l.patternsLearned}`)));return}catch(t){throw S(`post-edit failed: ${t instanceof Error?t.message:"unknown"}`),t}})}import{randomUUID as Be}from"crypto";U();import A from"chalk";import He from"node:path";function Fe(r){if(!r.trim())return"";let e;try{e=JSON.parse(r)}catch{return r.trim()}let t=[e.prompt,e.user_prompt,e.command,e.tool_input?.prompt,e.tool_input?.description,e.toolInput?.prompt,e.toolInput?.description];for(let n of t)if(typeof n=="string"&&n.trim())return n;return""}function Re(r){r.command("route").description("Route a task to the optimal QE agent").option("-t, --task <description>","Task description (falls back to stdin event JSON)").option("-d, --domain <domain>","Target QE domain hint").option("-c, --capabilities <caps...>","Required capabilities").option("--json","Output as JSON").action(async e=>{try{let t=e.task??"";if(!t.trim()){let c=await F();t=Fe(c)}if(!t.trim())throw new Error("No task provided. Pass --task <description> or pipe a Claude Code hook event JSON to stdin.");let{reasoningBank:n}=await _(),o={task:t,domain:e.domain,capabilities:e.capabilities,includePatternGuidance:!0},s=await n.routeTask(o);if(!s.success)throw new Error(s.error.message);let a=s.value;e.json?h({recommendedAgent:a.recommendedAgent,confidence:a.confidence,alternatives:a.alternatives,domains:a.domains,patternCount:a.patterns.length,patterns:a.patterns.map(c=>({id:c.id,name:c.name,description:c.description,confidence:c.confidence})),guidance:a.guidance,reasoning:a.reasoning,exploration:a.exploration??!1,criticality:a.criticality??null,qWeight:a.qWeight??null}):(console.log(A.bold(`
|
|
159
159
|
\u{1F3AF} Task Routing Result`)),console.log(A.dim(` Task: "${t}"`)),console.log(A.bold(`
|
|
160
160
|
\u{1F464} Recommended Agent:`),A.cyan(a.recommendedAgent)),console.log(A.dim(` Confidence: ${(a.confidence*100).toFixed(1)}%`)),a.alternatives.length>0&&(console.log(A.bold(`
|
|
161
161
|
\u{1F504} Alternatives:`)),a.alternatives.forEach(c=>{console.log(A.dim(` - ${c.agent}: ${(c.score*100).toFixed(1)}%`))})),console.log(A.bold(`
|
|
162
162
|
\u{1F4C2} Detected Domains:`),a.domains.join(", ")),console.log(A.bold(`
|
|
163
163
|
\u{1F4A1} Guidance:`)),Z(a.guidance),console.log(A.bold(`
|
|
164
|
-
\u{1F4D6} Reasoning:`),A.dim(a.reasoning)));try{let{getUnifiedMemory:c}=await import("./unified-memory-
|
|
164
|
+
\u{1F4D6} Reasoning:`),A.dim(a.reasoning)));try{let{getUnifiedMemory:c}=await import("./unified-memory-2Z2F446J.js"),i=c();i.isInitialized()||await i.initialize();let f=i.getDatabase();q(f),Y(f);let l=`route-${Date.now()}-${Be().slice(0,8)}`,p=a.confidence<.5,d=a;f.prepare(`
|
|
165
165
|
INSERT OR REPLACE INTO routing_outcomes (
|
|
166
166
|
id, task_json, decision_json, used_agent,
|
|
167
167
|
followed_recommendation, success, quality_score,
|
|
168
168
|
duration_ms, error,
|
|
169
169
|
exploration, criticality, q_weight
|
|
170
170
|
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
171
|
-
`).run(l,JSON.stringify({description:t,domain:e.domain}),JSON.stringify({recommended:a.recommendedAgent,confidence:a.confidence,alternatives:a.alternatives,lowConfidence:p,exploration:d.exploration??!1,criticality:d.criticality??null,qWeight:d.qWeight??null}),a.recommendedAgent,1,0,-1,0,p?"low-confidence":null,d.exploration?1:0,d.criticality??null,d.qWeight??null);let
|
|
171
|
+
`).run(l,JSON.stringify({description:t,domain:e.domain}),JSON.stringify({recommended:a.recommendedAgent,confidence:a.confidence,alternatives:a.alternatives,lowConfidence:p,exploration:d.exploration??!1,criticality:d.criticality??null,qWeight:d.qWeight??null}),a.recommendedAgent,1,0,-1,0,p?"low-confidence":null,d.exploration?1:0,d.criticality??null,d.qWeight??null);let k=R(),u=He.join(k,".agentic-qe"),E=await O(u);await x(E)}catch(c){console.error(A.dim(`[hooks] route persist: ${c instanceof Error?c.message:"unknown"}`))}return}catch(t){throw S(`route failed: ${t instanceof Error?t.message:"unknown"}`),t}}),r.command("post-route").description("Close the most-recent route sentinel from a Stop hook (#451)").option("--success [bool]","Whether the turn completed successfully","true").option("--json","Output as JSON").action(async e=>{try{let t=e.success==="true"||e.success===!0,n=.325+(t?.25:0)+.1,o=M();o.isInitialized()||await o.initialize();let s=o.getDatabase();q(s);let a=s.prepare(`
|
|
172
172
|
SELECT id, task_json, used_agent FROM routing_outcomes
|
|
173
173
|
WHERE quality_score = -1
|
|
174
174
|
AND task_json NOT LIKE '%"taskId"%'
|
|
@@ -178,7 +178,7 @@ import{a as v,b as he,c as ke}from"./chunk-VLOIEVER.js";import{c as ge,d as fe}f
|
|
|
178
178
|
UPDATE routing_outcomes
|
|
179
179
|
SET success = ?, quality_score = ?, duration_ms = 0, error = NULL
|
|
180
180
|
WHERE id = ?
|
|
181
|
-
`).run(t?1:0,n,a.id):{changes:0};if(a)try{let
|
|
181
|
+
`).run(t?1:0,n,a.id):{changes:0};if(a)try{let f=JSON.parse(a.task_json),l=String(f.description??"");l&&await J({taskType:W(l),priority:"normal",domain:K(l)[0]??"any",agent:a.used_agent,success:t})}catch{}let i=s.prepare(`
|
|
182
182
|
UPDATE routing_outcomes
|
|
183
183
|
SET success = 0,
|
|
184
184
|
quality_score = 0.325,
|
|
@@ -187,20 +187,20 @@ import{a as v,b as he,c as ke}from"./chunk-VLOIEVER.js";import{c as ge,d as fe}f
|
|
|
187
187
|
WHERE quality_score = -1
|
|
188
188
|
AND task_json NOT LIKE '%"taskId"%'
|
|
189
189
|
AND created_at < datetime('now', '-300 seconds')
|
|
190
|
-
`).run();e.json?
|
|
190
|
+
`).run();e.json?h({success:!0,resolved:c.changes>0,staleSwept:i.changes,qualityScore:n,turnSuccess:t}):i.changes>0&&console.log(A.dim(`[hooks] post-route: swept ${i.changes} stale sentinel(s)`));return}catch(t){e.json?h({success:!1,error:t instanceof Error?t.message:"unknown"}):console.error(A.dim(`[hooks] post-route: ${t instanceof Error?t.message:"unknown"}`));return}})}import y from"chalk";qe();function ze(r,e){return!(r.embedding&&r.embedding.length>0)?{vectorIndex:"pending",notice:"Pattern stored in SQLite without a vector (no embedding runtime is available). Text search finds it now. Set AQE_EMBEDDER_ENDPOINT or install @huggingface/transformers, then run `aqe learning backfill-embeddings` to enable semantic search for it."}:e?{vectorIndex:"sqlite",notice:`Pattern stored; its vector is stored in SQLite and vector search can use it now. The ANN index (patterns.rvf) was not open in this process (${e}); the vector is added to it automatically the next time the index opens.`}:{vectorIndex:"indexed"}}function Ae(r){r.command("stats").description("Display hooks system statistics").option("--json","Output as JSON").action(async e=>{try{let{reasoningBank:t}=await _(),n=await t.getStats();if(e.json)h(n);else{console.log(y.bold(`
|
|
191
191
|
\u{1F4CA} Hooks System Statistics
|
|
192
192
|
`)),console.log(y.bold("Patterns:")),console.log(` Total: ${y.cyan(n.totalPatterns)}`),console.log(` Short-term: ${n.patternStoreStats.byTier.shortTerm}`),console.log(` Long-term: ${n.patternStoreStats.byTier.longTerm}`),console.log(y.bold(`
|
|
193
|
-
By Domain:`));for(let[
|
|
193
|
+
By Domain:`));for(let[o,s]of Object.entries(n.byDomain))s>0&&console.log(` ${o}: ${s}`);console.log(y.bold(`
|
|
194
194
|
Routing:`)),console.log(` Requests: ${n.routingRequests}`),console.log(` Avg Confidence: ${(n.avgRoutingConfidence*100).toFixed(1)}%`),console.log(y.bold(`
|
|
195
195
|
Learning:`)),console.log(` Outcomes: ${n.learningOutcomes}`),console.log(` Success Rate: ${(n.patternSuccessRate*100).toFixed(1)}%`),console.log(y.bold(`
|
|
196
|
-
Search Performance:`)),console.log(` Operations: ${n.patternStoreStats.searchOperations}`),console.log(` Avg Latency: ${n.patternStoreStats.avgSearchLatencyMs.toFixed(2)}ms`),console.log(` HNSW Native: ${n.patternStoreStats.hnswStats.nativeAvailable?"\u2713":"\u2717"}`)}}catch(t){throw
|
|
196
|
+
Search Performance:`)),console.log(` Operations: ${n.patternStoreStats.searchOperations}`),console.log(` Avg Latency: ${n.patternStoreStats.avgSearchLatencyMs.toFixed(2)}ms`),console.log(` HNSW Native: ${n.patternStoreStats.hnswStats.nativeAvailable?"\u2713":"\u2717"}`)}}catch(t){throw S(`stats failed: ${t instanceof Error?t.message:"unknown"}`),t}}),r.command("list").description("List all registered QE hook events").option("--json","Output as JSON").action(async e=>{try{let{hookRegistry:t}=await _(),n=t.getRegisteredEvents();if(e.json)h({events:n,totalEvents:Object.keys(v).length,registeredEvents:n.length});else{console.log(y.bold(`
|
|
197
197
|
\u{1F4CB} Registered QE Hook Events
|
|
198
|
-
`)),console.log(y.bold("All Available Events:"));for(let[
|
|
199
|
-
Registered: ${n.length}/${Object.keys(v).length}`))}}catch(t){throw
|
|
200
|
-
\u{1F4E1} Hook Event Emitted`)),console.log(y.dim(` Event: ${e.event}`)),console.log(y.dim(` Handlers: ${
|
|
198
|
+
`)),console.log(y.bold("All Available Events:"));for(let[o,s]of Object.entries(v)){let c=n.includes(s)?y.green("\u2713"):y.dim("\u25CB");console.log(` ${c} ${o}: ${y.dim(s)}`)}console.log(y.dim(`
|
|
199
|
+
Registered: ${n.length}/${Object.keys(v).length}`))}}catch(t){throw S(`list failed: ${t instanceof Error?t.message:"unknown"}`),t}}),r.command("emit").description("Emit a QE hook event").requiredOption("-e, --event <name>","Event name (e.g., qe:pattern-applied)").option("-d, --data <json>","Event data as JSON","{}").option("--json","Output as JSON").action(async e=>{try{let{hookRegistry:t}=await _(),n;try{n=le(e.data)}catch{throw new Error(`Invalid JSON data: ${e.data}`)}let o=await t.emit(e.event,n);e.json?h({event:e.event,results:o}):(console.log(y.bold(`
|
|
200
|
+
\u{1F4E1} Hook Event Emitted`)),console.log(y.dim(` Event: ${e.event}`)),console.log(y.dim(` Handlers: ${o.length}`)),o.forEach((s,a)=>{let c=s.success?y.green("\u2713"):y.red("\u2717");console.log(` ${c} Handler ${a+1}: ${s.success?"success":s.error}`),s.patternsLearned&&console.log(y.green(` Patterns learned: ${s.patternsLearned}`))}))}catch(t){throw S(`emit failed: ${t instanceof Error?t.message:"unknown"}`),t}}),r.command("learn").description("Store a new pattern in the reasoning bank").requiredOption("-n, --name <name>","Pattern name").requiredOption("-d, --description <desc>","Pattern description").option("-t, --type <type>","Pattern type","test-template").option("--domain <domain>","QE domain").option("--tags <tags...>","Pattern tags").option("--json","Output as JSON").action(async e=>{try{let{reasoningBank:t}=await _(),n=await t.storePattern({patternType:e.type,name:e.name,description:e.description,template:{type:"prompt",content:e.description,variables:[]},context:{tags:e.tags||[]}}),o=n.success?n.value:null,s;if(!n.success){let i=me(n.error);if(!i)throw new Error(n.error.message);if(o=await t.getPattern(i),!o)throw new Error(n.error.message);let f=n.error.cause;s=f instanceof Error?f.message:"the vector index is unavailable"}if(!o)throw new Error("learn failed: no pattern returned");let{vectorIndex:a,notice:c}=ze(o,s);e.json?h({success:!0,pattern:{id:o.id,name:o.name,type:o.patternType,domain:o.qeDomain},vectorIndex:a,...c?{warning:c}:{}}):(N(`Pattern stored: ${o.name}`),console.log(y.dim(` ID: ${o.id}`)),console.log(y.dim(` Domain: ${o.qeDomain}`)),console.log(y.dim(` Tier: ${o.tier}`)),c&&console.log(y.yellow(` ${a==="pending"?"Vector index pending":"Vector index"}: ${c}`)))}catch(t){throw S(`learn failed: ${t instanceof Error?t.message:"unknown"}`),t}}),r.command("search").description("Search for patterns in the reasoning bank").requiredOption("-q, --query <query>","Search query").option("-l, --limit <n>","Maximum results","10").option("-d, --domain <domain>","Filter by domain").option("--json","Output as JSON").action(async e=>{try{let{reasoningBank:t}=await _(),n=await t.searchPatterns(e.query,{limit:parseInt(e.limit,10),domain:e.domain});if(!n.success)throw new Error(n.error.message);let o=n.value;e.json?h({query:e.query,total:o.length,patterns:o.map(s=>({id:s.pattern.id,name:s.pattern.name,score:s.score,domain:s.pattern.qeDomain,matchType:s.matchType}))}):(console.log(y.bold(`
|
|
201
201
|
\u{1F50D} Search Results for "${e.query}"
|
|
202
|
-
`)),
|
|
203
|
-
`)){let t=e.match(/^(?:export\s+)?NAGUAL_CLOUD_KEY=(.+)/);if(t)return t[1].trim().replace(/^['"]|['"]$/g,"")}}catch{}}var
|
|
202
|
+
`)),o.length===0?console.log(y.dim(" No patterns found")):o.forEach((s,a)=>{console.log(`${y.cyan(`${a+1}.`)} ${s.pattern.name} ${y.dim(`(${(s.score*100).toFixed(1)}%)`)}`),console.log(y.dim(` Domain: ${s.pattern.qeDomain}`)),console.log(y.dim(` Match: ${s.matchType}`)),console.log(y.dim(` ID: ${s.pattern.id}`)),console.log()}),console.log(y.dim(`Found ${o.length} pattern(s)`)))}catch(t){throw S(`search failed: ${t instanceof Error?t.message:"unknown"}`),t}})}U();import Q from"chalk";import We from"node:path";function ve(r){r.command("session-start").description("Initialize session state when Claude Code session starts").option("-s, --session-id <id>","Session ID").option("--json","Output as JSON").action(async e=>{try{let t=e.sessionId||`session-${Date.now()}`;m.sessionId=t;let{reasoningBank:n}=await _(),o=await n.getStats(),s=R(),a=We.join(s,".agentic-qe"),c=await O(a),i=await c.get(H),f=!i||!i.sessionStartTime;i?(i.sessionStartTime=new Date().toISOString(),i.totalDreamsThisSession=0):i={lastDreamTime:null,experienceCount:0,sessionStartTime:new Date().toISOString(),totalDreamsThisSession:0},await c.set(H,i);let l=[];l.push(`AQE Learning: ${o.totalPatterns} patterns loaded`);let p=Object.entries(o.byDomain).filter(([,k])=>k>0).sort(([,k],[,u])=>u-k).slice(0,5);p.length>0&&l.push(`Top domains: ${p.map(([k,u])=>`${k}(${u})`).join(", ")}`),o.patternSuccessRate>0&&l.push(`Pattern success rate: ${(o.patternSuccessRate*100).toFixed(0)}%`),o.routingRequests>0&&l.push(`Routing confidence: ${(o.avgRoutingConfidence*100).toFixed(0)}% across ${o.routingRequests} requests`);let d=l.join(". ")+".";e.json?h({hookSpecificOutput:{hookEventName:"SessionStart",additionalContext:d},sessionId:t,initialized:!0,patternsLoaded:o.totalPatterns,dreamScheduler:{enabled:!0,lastDreamTime:i.lastDreamTime,pendingExperiences:i.experienceCount}}):(N(`Session started: ${t}`),console.log(Q.dim(` Patterns loaded: ${o.totalPatterns}`)),console.log(Q.dim(` Dream scheduler: enabled (${i.experienceCount} pending experiences)`)));return}catch(t){e.json&&h({success:!1,error:t instanceof Error?t.message:"unknown"});return}}),r.command("session-end").description("Save session state when Claude Code session ends").option("--save-state","Save learning state to disk").option("--export-metrics","Export session metrics").option("--json","Output as JSON").action(async e=>{try{let t=m.sessionId||"unknown",n=null;if(m.initialized&&m.reasoningBank)try{n=await m.reasoningBank.getStats()}catch{}let o=0;try{o=await se()}catch{}if(e.json){let s=n?`Session complete: ${n.totalPatterns} patterns, ${n.routingRequests} routings, ${(n.patternSuccessRate*100).toFixed(0)}% success rate`:"Session complete";h({continue:!0,sessionId:t,stateSaved:e.saveState||!1,metricsExported:e.exportMetrics||!1,patternsConsolidated:o,finalStats:n?{patternsLearned:n.totalPatterns,routingRequests:n.routingRequests,successRate:n.patternSuccessRate}:null})}else N(`Session ended: ${t}`),n&&(console.log(Q.dim(` Patterns: ${n.totalPatterns}`)),console.log(Q.dim(` Routing requests: ${n.routingRequests}`))),o>0&&console.log(Q.dim(` Patterns consolidated: ${o}`));return}catch(t){e.json&&h({success:!1,error:t instanceof Error?t.message:"unknown"});return}})}import{createHash as Ye,randomUUID as Ze}from"node:crypto";import w from"chalk";import et from"node:path";U();Ce();import{readFileSync as Ge}from"node:fs";import{homedir as Je}from"node:os";var ee=de.create("nagual-client");function Qe(){try{let r=Ge(`${Je()}/.nagual/cloud-hooks.env`,"utf8");for(let e of r.split(`
|
|
203
|
+
`)){let t=e.match(/^(?:export\s+)?NAGUAL_CLOUD_KEY=(.+)/);if(t)return t[1].trim().replace(/^['"]|['"]$/g,"")}}catch{}}var Ve="http://localhost:3333",Oe=3e3,Xe=5e3;var ie=class{baseUrl;token;enabled;constructor(){this.baseUrl=process.env.NAGUAL_URL??Ve,this.token=process.env.NAGUAL_CLOUD_KEY??process.env.NAGUAL_API_TOKEN??Qe(),this.enabled=!0}async search(e,t,n=5){try{let o=await fetch(`${this.baseUrl}/api/patterns/search`,{method:"POST",headers:this.headers(),body:JSON.stringify({query:e,domain:t,limit:n}),signal:AbortSignal.timeout(Oe)});return o.ok?(await o.json()).patterns??[]:[]}catch{return[]}}async recordOutcome(e,t){try{let n=await fetch(`${this.baseUrl}/api/patterns/${encodeURIComponent(e)}/outcome`,{method:"POST",headers:this.headers(),body:JSON.stringify(t),signal:AbortSignal.timeout(Oe)});n.ok||ee.debug("nagual recordOutcome non-OK",{patternId:e,status:n.status})}catch(n){ee.debug("nagual recordOutcome failed (non-fatal)",{patternId:e,err:n})}}async promotePattern(e){let t={problem:e.problem,solution:e.solution,domain:e.domain,reward:e.reward*.8,tags:[...e.tags??[],"source:aqe",e.source_project?`project:${e.source_project}`:null].filter(n=>n!==null)};try{let n=await fetch(`${this.baseUrl}/api/patterns`,{method:"POST",headers:this.headers(),body:JSON.stringify(t),signal:AbortSignal.timeout(Xe)});n.ok||ee.debug("nagual promotePattern non-OK",{status:n.status})}catch(n){ee.debug("nagual promotePattern failed (non-fatal)",{err:n})}}headers(){let e={"Content-Type":"application/json"};return this.token&&(e.Authorization=`Bearer ${this.token}`),e}},ae;function Ne(){return ae||(ae=new ie),ae}var Ke=/^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$/;function De(r,e){let t={};if(r!==void 0){if(!Ke.test(r))return{error:`Invalid --parent-agent-id "${r}": must start with a letter or digit and contain only letters, digits, "_", ".", ":", "-" (max 128 chars)`};t.parentAgentId=r}if(e!==void 0){let n=typeof e=="number"?e:Number(e);if(!Number.isInteger(n))return{error:`Invalid --depth "${e}": must be an integer`};if(n<0)return{error:`Invalid --depth ${n}: must be >= 0`};if(n>32)return{error:`Invalid --depth ${n}: must be <= 32`};t.depth=n}return t}var tt="task-bridge",nt=6e5,xe=.5;function rt(r){return Ye("sha256").update(r).digest("hex").slice(0,16)}var ot=new Set(["test-generation","coverage-analysis","defect-intelligence","security-compliance","quality-assessment","requirements-validation"]),st=80;async function at(r,e){return!process.env.NAGUAL_URL&&!process.env.NAGUAL_CLOUD_URL&&!process.env.NAGUAL_CLOUD_KEY?[]:r.length<st?[]:e&&!ot.has(e)?[]:Ne().search(r.slice(0,300),e,3)}function Ie(r){r.command("pre-task").description("Get context and guidance before spawning a Task agent").option("--task-id <id>","Task identifier").option("-d, --description <desc>","Task description").option("--json","Output as JSON").action(async e=>{try{let{reasoningBank:t}=await _(),n=null;if(e.description){let d=await t.routeTask({task:e.description});d.success&&(n=d.value)}let o=(n?.patterns??[]).slice(0,5).map(d=>d?.id).filter(d=>typeof d=="string"),s=n?.domains?.[0],a=e.description?await at(String(e.description),s):[],c=null,i=[],f=0,l=null;try{let d=M();d.isInitialized()||await d.initialize();let k=d.getDatabase();q(k);try{let u=k.prepare(`
|
|
204
204
|
SELECT used_agent AS agent,
|
|
205
205
|
ROUND(AVG(quality_score), 3) AS avgQuality,
|
|
206
206
|
COUNT(*) AS n
|
|
@@ -209,37 +209,37 @@ Registered: ${n.length}/${Object.keys(v).length}`))}}catch(t){throw b(`list fail
|
|
|
209
209
|
GROUP BY used_agent
|
|
210
210
|
ORDER BY avgQuality DESC, n DESC
|
|
211
211
|
LIMIT 1
|
|
212
|
-
`).get();u&&(c=u)}catch{}try{i=
|
|
212
|
+
`).get();u&&(c=u)}catch{}try{i=k.prepare(`
|
|
213
213
|
SELECT key, value
|
|
214
214
|
FROM kv_store
|
|
215
215
|
WHERE namespace = 'verdicts'
|
|
216
216
|
AND created_at > datetime('now', '-7 days')
|
|
217
217
|
ORDER BY created_at DESC
|
|
218
218
|
LIMIT 3
|
|
219
|
-
`).all().map(E=>({key:E.key,summary:String(E.value).slice(0,200)}))}catch{}if(
|
|
219
|
+
`).all().map(E=>({key:E.key,summary:String(E.value).slice(0,200)}))}catch{}if(o.length>0)try{let u=o.map(()=>"?").join(","),E=k.prepare(`
|
|
220
220
|
SELECT COALESCE(SUM(average_token_savings), 0) AS sum
|
|
221
221
|
FROM qe_patterns
|
|
222
222
|
WHERE id IN (${u})
|
|
223
|
-
`).get(...
|
|
223
|
+
`).get(...o);f=Math.max(0,Math.round(E?.sum??0))}catch{}if(e.description)try{let u=String(e.description),E=W(u),g="normal",T=n?.domains?.[0]??"any",D=Math.max(0,Math.min(10,Math.round(Math.min(u.length/200,1)*10)));l=`task:${rt(u)}`;let L=JSON.stringify({selectedPatternIds:o,agent:n?.recommendedAgent??null,description:u.slice(0,200),taskType:E,priority:g,domain:T,complexityBucket:D,estimatedTokenSavings:f,ts:Date.now()}),C=Date.now()+nt;k.prepare(`
|
|
224
224
|
INSERT OR REPLACE INTO kv_store (key, namespace, value, expires_at, created_at)
|
|
225
225
|
VALUES (?, ?, ?, ?, strftime('%s','now')*1000)
|
|
226
|
-
`).run(l,
|
|
226
|
+
`).run(l,tt,L,C)}catch(u){console.error(w.dim(`[hooks] pre-task bridge: ${u instanceof Error?u.message:"unknown"}`))}if(n?.recommendedAgent)try{Y(k);let u=e.taskId||`hook-${Date.now()}`,E=`route-${Date.now()}-${Ze().slice(0,8)}`,g=n.confidence<xe,T=n;k.prepare(`
|
|
227
227
|
INSERT INTO routing_outcomes (
|
|
228
228
|
id, task_json, decision_json, used_agent,
|
|
229
229
|
followed_recommendation, success, quality_score,
|
|
230
230
|
duration_ms, error,
|
|
231
231
|
exploration, criticality, q_weight
|
|
232
232
|
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
233
|
-
`).run(E,JSON.stringify({description:e.description,taskId:u}),JSON.stringify({recommended:n.recommendedAgent,confidence:n.confidence,alternatives:n.alternatives,lowConfidence:g,exploration:T.exploration??!1,criticality:T.criticality??null,qWeight:T.qWeight??null}),n.recommendedAgent,1,0,-1,0,g?"low-confidence":null,T.exploration?1:0,T.criticality??null,T.qWeight??null)}catch(u){console.error(w.dim(`[hooks] pre-task sentinel: ${u instanceof Error?u.message:"unknown"}`))}}catch(d){console.error(w.dim(`[hooks] pre-task memory: ${d instanceof Error?d.message:"unknown"}`))}let p=n?n.confidence<
|
|
233
|
+
`).run(E,JSON.stringify({description:e.description,taskId:u}),JSON.stringify({recommended:n.recommendedAgent,confidence:n.confidence,alternatives:n.alternatives,lowConfidence:g,exploration:T.exploration??!1,criticality:T.criticality??null,qWeight:T.qWeight??null}),n.recommendedAgent,1,0,-1,0,g?"low-confidence":null,T.exploration?1:0,T.criticality??null,T.qWeight??null)}catch(u){console.error(w.dim(`[hooks] pre-task sentinel: ${u instanceof Error?u.message:"unknown"}`))}}catch(d){console.error(w.dim(`[hooks] pre-task memory: ${d instanceof Error?d.message:"unknown"}`))}let p=n?n.confidence<xe:!1;if(e.json)h({success:!0,taskId:e.taskId,description:e.description,recommendedAgent:n?.recommendedAgent,confidence:n?.confidence,guidance:n?.guidance||[],selectedPatternIds:o,historicalBest:c,priorVerdicts:i,estimatedTokenSavings:f,lowConfidence:p,bridgeKey:l,nagualPatterns:a.map(d=>({id:d.id,problem:d.problem,solution:d.solution.slice(0,400),domain:d.domain,reward:d.reward}))});else if(console.log(w.bold(`
|
|
234
234
|
\u{1F680} Pre-Task Analysis`)),console.log(w.dim(` Task ID: ${e.taskId||"N/A"}`)),n&&(console.log(w.bold(`
|
|
235
235
|
\u{1F3AF} Recommended:`),w.cyan(n.recommendedAgent)),console.log(w.dim(` Confidence: ${(n.confidence*100).toFixed(1)}%`)),p&&console.log(w.yellow(" \u26A0 Low confidence \u2014 consider providing more context"))),a.length>0){console.log(w.bold(`
|
|
236
|
-
\u{1F4DA} Nagual context (cross-project):`));for(let d of a)console.log(w.dim(` [${d.domain}] ${d.problem.slice(0,80)} (reward: ${d.reward.toFixed(2)})`))}return}catch(t){e.json&&
|
|
236
|
+
\u{1F4DA} Nagual context (cross-project):`));for(let d of a)console.log(w.dim(` [${d.domain}] ${d.problem.slice(0,80)} (reward: ${d.reward.toFixed(2)})`))}return}catch(t){e.json&&h({success:!1,error:t instanceof Error?t.message:"unknown"});return}}),r.command("post-task").description("Record task outcome for pattern learning").option("--task-id <id>","Task identifier").option("--success [bool]","Whether task succeeded","true").option("--agent <name>","Agent that executed the task").option("--duration <ms>","Task duration in milliseconds").option("-d, --description <desc>","Task description \u2014 fallback Q-state source when pre-task bridge is absent (issue #499)").option("--parent-agent-id <id>","Agent that spawned this task (ADR-101 nesting provenance)").option("--depth <n>","Nesting depth of this task, 0 = top-level (ADR-101)").option("--json","Output as JSON").action(async e=>{try{let t=e.success==="true"||e.success===!0;if(!e.agent||!String(e.agent).trim())try{let s=await F(),a=Se(s);a&&(e.agent=a)}catch{}let n=De(e.parentAgentId,e.depth);if(n.error){e.json?console.log(JSON.stringify({success:!1,error:n.error})):console.error(w.red(` \u2717 ${n.error}`)),process.exitCode=1;return}let o=0;try{let{hookRegistry:s,reasoningBank:a}=await _();o=(await s.emit(v.QEAgentCompletion,{taskId:e.taskId,success:t,agent:e.agent,duration:e.duration?parseInt(e.duration,10):void 0,timestamp:Date.now()})).reduce((p,d)=>p+(d.patternsLearned||0),0);{let p=e.taskId||`hook-${Date.now()}`,d=e.agent||"unknown",k=e.duration?parseInt(e.duration,10):0,u=(n.parentAgentId?`, Parent: ${n.parentAgentId}`:"")+(n.depth!==void 0?`, Depth: ${n.depth}`:"");await a.recordOutcome({patternId:`task:${d}:${p}`,success:t,metrics:{executionTimeMs:k},feedback:`Agent: ${d}, Task: ${p}${u}`});let E=await re({taskId:p,agent:d,durationMs:k,success:t,parentAgentId:n.parentAgentId,depth:n.depth}),g=d==="unknown"&&E.bridge?.agent?E.bridge.agent:d;await oe({agent:g,success:t,durationMs:k,qualityScore:E.qualityScore});let T=String(e.description??"");if(E.bridge||T){let D=E.bridge?.taskType??W(T),L=E.bridge?.priority??"normal",C=E.bridge?.domain??K(T)[0]??"any";await J({taskType:D,priority:L,domain:C,agent:g,success:t})}}let i=R(),f=et.join(i,".agentic-qe"),l=await O(f);await x(l)}catch(s){console.error(w.dim(`[hooks] Learning init: ${s instanceof Error?s.message:"unknown"}`))}e.json?h({success:!0,taskId:e.taskId,taskSuccess:t,patternsLearned:o,dreamTriggered:!1,dreamReason:"deferred-to-kernel"}):(N(`Task completed: ${e.taskId||"unknown"}`),console.log(w.dim(` Success: ${t}`)),o>0&&console.log(w.green(` Patterns learned: ${o}`)));return}catch(t){e.json&&h({success:!1,error:t instanceof Error?t.message:"unknown"});return}})}import{existsSync as it,readFileSync as ct}from"node:fs";import{randomUUID as $e}from"node:crypto";import X from"chalk";import Pe from"node:path";U();import*as z from"fs";import*as te from"path";var V=class r{statePath;warnThreshold;blockThreshold;halfOpenAfterMs;staleAfterMs;constructor(e){this.statePath=e.statePath,this.warnThreshold=e.warnThreshold??3,this.blockThreshold=e.blockThreshold??5,this.halfOpenAfterMs=e.halfOpenAfterMs??12e4,this.staleAfterMs=e.staleAfterMs??30*6e4}static signature(e){return e.trim().replace(/\s+/g," ").slice(0,200)}check(e,t=Date.now()){let n=r.signature(e);if(!n)return{verdict:"allow",consecutiveFailures:0,halfOpen:!1};let o=this.readState()[n];if(!o||o.consecutiveFailures<this.warnThreshold)return{verdict:"allow",consecutiveFailures:o?.consecutiveFailures??0,halfOpen:!1};let s=o.consecutiveFailures;return s>=this.blockThreshold?t-o.lastFailureAt>=this.halfOpenAfterMs?{verdict:"warn",consecutiveFailures:s,halfOpen:!0,hint:`This command has failed ${s}x consecutively; allowing one probe attempt. If it fails again it will be flagged immediately.`}:{verdict:"block",consecutiveFailures:s,halfOpen:!1,hint:`The same command failed ${s}x consecutively. Re-running it unchanged is unlikely to succeed \u2014 inspect the error output, change the approach, or fix the underlying problem first. (A successful run resets this breaker.)`}:{verdict:"warn",consecutiveFailures:s,halfOpen:!1,hint:`This command has failed ${s}x consecutively \u2014 consider changing approach before retrying.`}}record(e,t,n=Date.now()){let o=r.signature(e);if(o)try{let s=this.readState();if(t){s[o]&&(delete s[o],this.writeState(s,n));return}let a=s[o]??{consecutiveFailures:0,lastFailureAt:n};a.consecutiveFailures+=1,a.lastFailureAt=n,s[o]=a,this.writeState(s,n)}catch{}}static isStrict(e=process.env){return e.AQE_STRICT_TOOL_LOOP==="1"||e.AQE_STRICT_TOOL_LOOP==="true"}readState(){try{let e=z.readFileSync(this.statePath,"utf8"),t=JSON.parse(e);return typeof t=="object"&&t!==null?t:{}}catch{return{}}}writeState(e,t){for(let[n,o]of Object.entries(e))t-o.lastFailureAt>this.staleAfterMs&&delete e[n];z.mkdirSync(te.dirname(this.statePath),{recursive:!0}),z.writeFileSync(this.statePath,JSON.stringify(e))}};function ce(r){return new V({statePath:te.join(r,".agentic-qe","tool-loop-state.json")})}function dt(r){return/\bjest\b/i.test(r)?"jest":/\bvitest\b/i.test(r)?"vitest":/\bpytest\b/i.test(r)?"pytest":/\bmocha\b/i.test(r)?"mocha":null}async function lt(r){try{let e=M();e.isInitialized()||await e.initialize();let t=e.getDatabase();q(t);let n=r.framework==="pytest"?"python":"javascript",o=r.command.split(/\s+/).slice(0,3).join("-").slice(0,80);t.prepare(`
|
|
237
237
|
INSERT INTO test_outcomes (
|
|
238
238
|
id, test_id, test_name, generated_by, framework, language, domain,
|
|
239
239
|
passed, execution_time_ms, maintainability_score, created_at
|
|
240
240
|
) VALUES (?, ?, ?, 'cli-hook-post-command', ?, ?, 'test-execution',
|
|
241
241
|
?, ?, 0.5, datetime('now'))
|
|
242
|
-
`).run(`to-${Date.now()}-${$e().slice(0,8)}`,`cmd:${
|
|
242
|
+
`).run(`to-${Date.now()}-${$e().slice(0,8)}`,`cmd:${o}`,r.command.slice(0,200),r.framework,n,r.success?1:0,r.durationMs);try{let s=Pe.join(process.cwd(),"coverage","coverage-summary.json");if(it(s)){let c=JSON.parse(ct(s,"utf-8")).total??{},i=Number(c.lines?.pct??0),f=Number(c.branches?.pct??0),l=Number(c.functions?.pct??0),p=t.prepare(`
|
|
243
243
|
SELECT after_lines, after_branches, after_functions
|
|
244
244
|
FROM coverage_sessions
|
|
245
245
|
WHERE target_path = ?
|
|
@@ -253,8 +253,8 @@ Registered: ${n.length}/${Object.keys(v).length}`))}}catch(t){throw b(`list fail
|
|
|
253
253
|
tests_generated, tests_passed, duration_ms,
|
|
254
254
|
started_at, completed_at
|
|
255
255
|
) VALUES (?, ?, 'cli-hook-post-command', ?, ?, ?, ?, ?, ?, ?, 0, ?, ?, ?, ?)
|
|
256
|
-
`).run(`cs-${Date.now()}-${$e().slice(0,8)}`,process.cwd(),
|
|
257
|
-
\u26A0\uFE0F Command Warnings:`)),a.forEach(i=>console.log(X.yellow(` - ${i}`))));return}catch{e.json&&
|
|
256
|
+
`).run(`cs-${Date.now()}-${$e().slice(0,8)}`,process.cwd(),r.framework,p?.after_lines??0,p?.after_branches??0,p?.after_functions??0,i,f,l,r.success?1:0,r.durationMs,d,d)}}catch(s){console.error(X.dim(`[hooks] coverage_sessions: ${s instanceof Error?s.message:"unknown"}`))}}catch(e){console.error(X.dim(`[hooks] test_outcomes: ${e instanceof Error?e.message:"unknown"}`))}}function Le(r){r.command("guard").description("File guardian - block edits to protected files").requiredOption("-f, --file <path>","File path to check").option("--json","Output as JSON (required for hook API)").action(async e=>{try{let t=e.file||"",n=t.replace(/\\/g,"/"),s=[{pattern:/^\.env($|\.)/,reason:"Environment file contains secrets"},{pattern:/\.env\.[a-zA-Z]+$/,reason:"Environment file contains secrets"},{pattern:/\.lock$/,reason:"Lock files are auto-generated"},{pattern:/(^|\/)node_modules\//,reason:"node_modules is managed by package manager"},{pattern:/(^|\/)\.agentic-qe\/memory\.db/,reason:"AQE memory database must not be directly edited"},{pattern:/(^|\/)\.agentic-qe\/memory\.db-wal$/,reason:"AQE WAL file must not be directly edited"},{pattern:/(^|\/)\.agentic-qe\/memory\.db-shm$/,reason:"AQE shared memory file must not be directly edited"}].find(a=>a.pattern.test(n));s?e.json?h({hookSpecificOutput:{hookEventName:"PreToolUse",permissionDecision:"deny",permissionDecisionReason:`Protected file: ${s.reason} (${t})`}}):S(`Blocked: ${s.reason} (${t})`):e.json?h({hookSpecificOutput:{hookEventName:"PreToolUse",permissionDecision:"allow"}}):N(`Allowed: ${t}`);return}catch{e.json&&h({hookSpecificOutput:{hookEventName:"PreToolUse",permissionDecision:"allow"}});return}}),r.command("pre-command").description("Get context before executing a Bash command").option("-c, --command <cmd>","Command to be executed").option("--json","Output as JSON").action(async e=>{try{let t=e.command||"",n=[{pattern:/rm\s+(-[a-zA-Z]*f[a-zA-Z]*\s+)?-[a-zA-Z]*r[a-zA-Z]*\s+\/(?!\w)/,reason:"Recursive delete of root filesystem"},{pattern:/rm\s+(-[a-zA-Z]*r[a-zA-Z]*\s+)?-[a-zA-Z]*f[a-zA-Z]*\s+\/(?!\w)/,reason:"Recursive delete of root filesystem"},{pattern:/rm\s+-rf\s+~/,reason:"Recursive delete of home directory"},{pattern:/DROP\s+(TABLE|DATABASE|SCHEMA)/i,reason:"Destructive SQL operation"},{pattern:/git\s+push\s+.*--force(?!-)/,reason:"Force push can overwrite remote history"},{pattern:/git\s+reset\s+--hard/,reason:"Hard reset discards uncommitted changes"},{pattern:/>\s*\/dev\/sd[a-z]/,reason:"Direct write to block device"},{pattern:/dd\s+if=.*of=\/dev\/sd/,reason:"Direct disk write via dd"},{pattern:/chmod\s+777\s/,reason:"World-writable permissions are a security risk"},{pattern:/:\(\)\s*\{\s*:\|\s*:&\s*\}\s*;?\s*:/,reason:"Fork bomb detected"},{pattern:/mkfs\./,reason:"Filesystem format operation"},{pattern:/>\s*\/dev\/null\s*2>&1\s*&\s*disown/,reason:"Stealth background process"}],o=[{pattern:/\.agentic-qe.*rm/,reason:"Deleting AQE data files"},{pattern:/rm\s+-rf\s/,reason:"Recursive force delete"},{pattern:/git\s+clean\s+-[a-zA-Z]*f/,reason:"Force cleaning untracked files"}],s=n.find(i=>i.pattern.test(t)),a=o.filter(i=>i.pattern.test(t)).map(i=>i.reason),c=null;try{c=ce(R()).check(t)}catch{}if(c&&c.verdict==="block"&&V.isStrict()){e.json?h({hookSpecificOutput:{hookEventName:"PreToolUse",permissionDecision:"deny",permissionDecisionReason:`Tool-loop breaker (AQE_STRICT_TOOL_LOOP): ${c.hint}`}}):S(`Blocked by tool-loop breaker: ${c.hint}`);return}if(c&&c.verdict==="block"?a.push(`\u{1F6D1} TOOL-LOOP BREAKER: ${c.hint}`):c&&c.verdict==="warn"&&a.push(`Tool-loop breaker: ${c.hint}`),s)e.json?h({hookSpecificOutput:{hookEventName:"PreToolUse",permissionDecision:"deny",permissionDecisionReason:`Dangerous command blocked: ${s.reason}`}}):S(`Blocked: ${s.reason}`);else if(e.json){let i={hookSpecificOutput:{hookEventName:"PreToolUse",permissionDecision:"allow"}};a.length>0&&(i.hookSpecificOutput.additionalContext=`Warnings: ${a.join("; ")}`),h(i)}else a.length>0&&(console.log(X.yellow(`
|
|
257
|
+
\u26A0\uFE0F Command Warnings:`)),a.forEach(i=>console.log(X.yellow(` - ${i}`))));return}catch{e.json&&h({hookSpecificOutput:{hookEventName:"PreToolUse",permissionDecision:"allow"}});return}}),r.command("post-command").description("Record Bash command outcome").option("-c, --command <cmd>","Command that was executed").option("--success [bool]","Whether command succeeded","true").option("--exit-code <code>","Command exit code").option("--json","Output as JSON").action(async e=>{try{let t=e.success==="true"||e.success===!0,n=e.exitCode?parseInt(e.exitCode,10):t?0:1,o=(e.command||"").substring(0,200);try{ce(R()).record(o,t)}catch{}let s=/\b(test|vitest|jest|pytest|mocha)\b/i.test(o),a=/\b(build|compile|tsc)\b/i.test(o),c=/\b(lint|eslint|prettier)\b/i.test(o),i=0,f=!1;try{let{reasoningBank:l}=await _();if(s){let{hookRegistry:T}=await _();await T.emit(v.TestExecutionResult,{runId:`cmd-${Date.now()}`,patternId:`cmd:test:${o.split(/\s+/).slice(0,3).join("-")}`,passed:t?1:0,failed:t?0:1,duration:0,flaky:!1})}let p=o.replace(/[^a-zA-Z0-9]/g,"-").slice(0,80),d=s?"test-execution":a?"code-intelligence":c?"quality-assessment":"code-intelligence";await l.recordOutcome({patternId:`cmd:${p}`,success:t,metrics:{executionTimeMs:0},feedback:`Command: ${o}, exit: ${n}`}),i=1,(s||a||c)&&(await G({task:`bash: ${o}`,agent:"cli-hook",domain:d,success:t,source:"cli-hook-post-command"}),f=!0);let k=dt(o);k&&await lt({command:o,framework:k,success:t,durationMs:0});let u=R(),E=Pe.join(u,".agentic-qe"),g=await O(E);await x(g)}catch(l){console.error(X.dim(`[hooks] post-command learning: ${l instanceof Error?l.message:"unknown"}`))}e.json&&h({success:!0,command:o.substring(0,100),commandSuccess:t,exitCode:n,patternsLearned:i,experienceRecorded:f});return}catch(t){e.json&&h({success:!1,error:t instanceof Error?t.message:"unknown"});return}})}function jn(){let r=new ut("hooks").description("Self-learning QE hooks for pattern recognition and guidance").addHelpText("after",`
|
|
258
258
|
Examples:
|
|
259
259
|
# File editing hooks (learning from edits)
|
|
260
260
|
aqe hooks pre-edit --file src/utils.ts --operation create
|
|
@@ -279,4 +279,4 @@ Examples:
|
|
|
279
279
|
aqe hooks search --query "authentication"
|
|
280
280
|
aqe hooks stats
|
|
281
281
|
aqe hooks list
|
|
282
|
-
`);return
|
|
282
|
+
`);return we(r),Re(r),Ae(r),ve(r),Ie(r),Le(r),r.hook("postAction",async()=>{await _e()}),r}export{v as QE_HOOK_EVENTS,jn as createHooksCommand,_e as disposeHooksSystem,_ as getHooksSystem,m as hooksState};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.7");process.exit(0)}
|
|
2
|
+
import{a,b}from"./chunk-PXZKPUW6.js";import"./chunk-ZLVQSEZK.js";import"./chunk-LMEU64TR.js";import"./chunk-4G2VNW4C.js";import"./chunk-7EX4DEQR.js";import"./chunk-QNQSM2OG.js";import"./chunk-F62EKVVC.js";import"./chunk-HTWIGQL4.js";import"./chunk-ONVALAZN.js";import"./chunk-ZTMZFF25.js";import"./chunk-Q2T5FXEA.js";import"./chunk-RNYX4CPI.js";import"./chunk-WXI2STKQ.js";import"./chunk-VJRZFWR5.js";import"./chunk-JYXOFN3E.js";import"./chunk-KPOPBUUJ.js";import"./chunk-LVEX4GID.js";import"./chunk-LGBN7TKC.js";import"./chunk-5Q22XPTH.js";import"./chunk-ZUMDDMDE.js";import"./chunk-IARSGAG7.js";import"./chunk-JVYPXW6Y.js";import"./chunk-HSDOOFV7.js";export{a as HybridMemoryBackend,b as createKernelMemoryBackend};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.
|
|
2
|
-
import{a,b,c,d,e}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.7");process.exit(0)}
|
|
2
|
+
import{a,b,c,d,e}from"./chunk-CXTJ47QS.js";import"./chunk-LMEU64TR.js";import"./chunk-4G2VNW4C.js";import"./chunk-FTTFJ7SJ.js";import"./chunk-LVEX4GID.js";import"./chunk-HSDOOFV7.js";export{a as DEFAULT_HYPERGRAPH_ENGINE_CONFIG,b as HypergraphEngine,c as createHypergraphEngine,d as createHypergraphEngineSync,e as default};
|