agentic-qe 3.9.18 → 3.9.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/helpers/statusline-v3.cjs +1 -1
- package/.claude/skills/skills-manifest.json +1 -1
- package/CHANGELOG.md +34 -0
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/cli/bundle.js +5 -5
- package/dist/cli/chunks/adapter-5NI3IO42.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-RJHBIG5V.js → agent-booster-wasm-HVBKHNIS.js} +2 -2
- package/dist/cli/chunks/{agent-handler-CXS6EE2V.js → agent-handler-XNBDYRSJ.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-7NV5DD5A.js → agent-memory-branch-YCVTQEMJ.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-JOUK5HMO.js +2 -0
- package/dist/cli/chunks/{audit-3NWGSPJW.js → audit-6C2PE7OY.js} +2 -2
- package/dist/cli/chunks/base-DCAB7AHK.js +2 -0
- package/dist/cli/chunks/{better-sqlite3-NXOMSJDC.js → better-sqlite3-HZPCHUQU.js} +2 -2
- package/dist/cli/chunks/{brain-handler-6N5WWZVA.js → brain-handler-OV75Q2NM.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-I7UTOCAW.js → branch-enumerator-QW6D42HJ.js} +2 -2
- package/dist/cli/chunks/{browser-6VOFWA52.js → browser-5BA7Q7OR.js} +2 -2
- package/dist/cli/chunks/browser-workflow-A4UV73SZ.js +2 -0
- package/dist/cli/chunks/{chunk-QTUTQLOY.js → chunk-255CWHTF.js} +2 -2
- package/dist/cli/chunks/{chunk-DC3PADV3.js → chunk-2SIQ742L.js} +1 -1
- package/dist/cli/chunks/{chunk-XTCV5UOJ.js → chunk-2SSDY6OE.js} +2 -2
- package/dist/cli/chunks/{chunk-BFM47L3X.js → chunk-2WJLEZKP.js} +2 -2
- package/dist/cli/chunks/{chunk-QW2RFI73.js → chunk-2WM4NYM5.js} +2 -2
- package/dist/cli/chunks/{chunk-YNVVRND7.js → chunk-2XATUQIG.js} +2 -2
- package/dist/cli/chunks/{chunk-ENYQUSSK.js → chunk-3546SG2L.js} +2 -2
- package/dist/cli/chunks/{chunk-XBWVHO6G.js → chunk-37DTXQ6P.js} +2 -2
- package/dist/cli/chunks/{chunk-4ELLGWTS.js → chunk-3HQ4AZDH.js} +2 -2
- package/dist/cli/chunks/{chunk-PM77Z4PR.js → chunk-3X3QQZ7Q.js} +2 -2
- package/dist/cli/chunks/{chunk-RGLCMGNZ.js → chunk-44SPMVML.js} +2 -2
- package/dist/cli/chunks/{chunk-6KTF7QB3.js → chunk-5KGFDNYI.js} +2 -2
- package/dist/cli/chunks/{chunk-6IBFYVLK.js → chunk-5LXWEAEJ.js} +2 -2
- package/dist/cli/chunks/{chunk-UNPTSPAO.js → chunk-5MGRZ4YD.js} +2 -2
- package/dist/cli/chunks/{chunk-6ZMQL3U6.js → chunk-5R2DUR3A.js} +2 -2
- package/dist/cli/chunks/{chunk-MDCTQOUJ.js → chunk-5X2AUPK2.js} +1 -1
- package/dist/cli/chunks/{chunk-G2H4W7NN.js → chunk-6BRUQTC7.js} +1 -1
- package/dist/cli/chunks/{chunk-DQCWNCOT.js → chunk-7IV2RK5M.js} +2 -2
- package/dist/cli/chunks/{chunk-EN2A2CVT.js → chunk-7WMHLBNZ.js} +1 -1
- package/dist/cli/chunks/{chunk-HLXPD4Y2.js → chunk-AEET2WOI.js} +65 -65
- package/dist/cli/chunks/{chunk-AGPZVE6B.js → chunk-AG7J7DTM.js} +2 -2
- package/dist/cli/chunks/{chunk-X2T4TI7D.js → chunk-ALYUJEYA.js} +2 -2
- package/dist/cli/chunks/{chunk-ZHA5Z5V4.js → chunk-AOASQYOO.js} +1 -1
- package/dist/cli/chunks/{chunk-D7SS56EG.js → chunk-AZKVGH5I.js} +2 -2
- package/dist/cli/chunks/{chunk-2A4JCRAW.js → chunk-B2EHSFUW.js} +2 -2
- package/dist/cli/chunks/{chunk-KMHGQD76.js → chunk-B65GTWF3.js} +2 -2
- package/dist/cli/chunks/{chunk-S2XBAOXE.js → chunk-BB3KUX6C.js} +1 -1
- package/dist/cli/chunks/{chunk-ZWR4PZ4Z.js → chunk-BFBR2ZZJ.js} +2 -2
- package/dist/cli/chunks/{chunk-7ZIKFJ6X.js → chunk-BGTYOZRK.js} +2 -2
- package/dist/cli/chunks/{chunk-IJPTWPXG.js → chunk-BOUCIIUI.js} +1 -1
- package/dist/cli/chunks/{chunk-ZJEVL5O3.js → chunk-C5YFCM2H.js} +2 -2
- package/dist/cli/chunks/{chunk-MBGWDELE.js → chunk-CYLQTVIA.js} +2 -2
- package/dist/cli/chunks/{chunk-7OGUAZGJ.js → chunk-D2EHD2KF.js} +1 -1
- package/dist/cli/chunks/{chunk-MLVVYUFS.js → chunk-D74RGYKI.js} +1 -1
- package/dist/cli/chunks/{chunk-WKQSZTU6.js → chunk-DAPBSAVT.js} +2 -2
- package/dist/cli/chunks/{chunk-I3POPZT5.js → chunk-DZS7XQ2Z.js} +2 -2
- package/dist/cli/chunks/{chunk-R3U3ARVJ.js → chunk-EW5TQQBR.js} +2 -2
- package/dist/cli/chunks/{chunk-YQL6JH2Y.js → chunk-EZZJ5XD6.js} +2 -2
- package/dist/cli/chunks/{chunk-BGSYFAEJ.js → chunk-FJJLNCSL.js} +3 -3
- package/dist/cli/chunks/{chunk-VZO5I23B.js → chunk-FL2DMHOQ.js} +1 -1
- package/dist/cli/chunks/{chunk-7XLTLFP5.js → chunk-FNVA7U7X.js} +2 -2
- package/dist/cli/chunks/{chunk-JGNVI5UB.js → chunk-FPVXXQVX.js} +3 -3
- package/dist/cli/chunks/{chunk-VRHKEJR6.js → chunk-FT3MAIRW.js} +3 -3
- package/dist/cli/chunks/{chunk-J7BG55VG.js → chunk-G2V4GMPR.js} +3 -3
- package/dist/cli/chunks/{chunk-MJ7UYPGY.js → chunk-GJ5FON37.js} +2 -2
- package/dist/cli/chunks/{chunk-KYLE6ZSC.js → chunk-GL742O2V.js} +4 -4
- package/dist/cli/chunks/{chunk-6BGSH2YR.js → chunk-GVDLCJC5.js} +1 -1
- package/dist/cli/chunks/{chunk-AZGESIFV.js → chunk-GYDE5TCN.js} +1 -1
- package/dist/cli/chunks/{chunk-IS2PMHB5.js → chunk-GYESQBDU.js} +2 -2
- package/dist/cli/chunks/{chunk-BSQTOKNR.js → chunk-H4QM37XS.js} +1 -1
- package/dist/cli/chunks/{chunk-K5NFP7B5.js → chunk-HCSTXZYE.js} +2 -2
- package/dist/cli/chunks/{chunk-A26GU6YU.js → chunk-HJ7CRPZY.js} +1 -1
- package/dist/cli/chunks/{chunk-H5JZZH2C.js → chunk-HQFREZRX.js} +2 -2
- package/dist/cli/chunks/{chunk-HZKY5KPB.js → chunk-HVNW3TZS.js} +1 -1
- package/dist/cli/chunks/{chunk-BXTHB2A2.js → chunk-I3JRRFVT.js} +2 -2
- package/dist/cli/chunks/{chunk-P6HIDCTQ.js → chunk-IG2RCBHJ.js} +1 -1
- package/dist/cli/chunks/{chunk-WMJCFDTA.js → chunk-IPLQPBJA.js} +2 -2
- package/dist/cli/chunks/{chunk-DOSDUAVZ.js → chunk-IV74GAZN.js} +2 -2
- package/dist/cli/chunks/{chunk-EZN7QMOZ.js → chunk-J7F65KKG.js} +4 -4
- package/dist/cli/chunks/{chunk-SQHM6WUF.js → chunk-JCPJG2KU.js} +3 -3
- package/dist/cli/chunks/{chunk-XSLKR2DM.js → chunk-JLX35EPX.js} +2 -2
- package/dist/cli/chunks/{chunk-FDDB7QTM.js → chunk-JYHZK44T.js} +1 -1
- package/dist/cli/chunks/{chunk-F7XU7KZL.js → chunk-K554X3T4.js} +2 -2
- package/dist/cli/chunks/{chunk-Z4YHL4JU.js → chunk-KTDGHN2J.js} +1 -1
- package/dist/cli/chunks/{chunk-WH7ZOJCF.js → chunk-KU7OXAFY.js} +1 -1
- package/dist/cli/chunks/{chunk-UPP5V7Y3.js → chunk-LDBHCOM3.js} +2 -2
- package/dist/cli/chunks/{chunk-4666TC3P.js → chunk-LTE3CDOY.js} +2 -2
- package/dist/cli/chunks/{chunk-V2N7KWT7.js → chunk-M6EP724N.js} +1 -1
- package/dist/cli/chunks/{chunk-LVABI4OA.js → chunk-MIQAFOFO.js} +1 -1
- package/dist/cli/chunks/{chunk-JD6KE6DJ.js → chunk-MMVSIESL.js} +2 -2
- package/dist/cli/chunks/{chunk-JMK5OCWL.js → chunk-MN4366PQ.js} +2 -2
- package/dist/cli/chunks/{chunk-DCB2VUYM.js → chunk-MTHO6A3V.js} +1 -1
- package/dist/cli/chunks/{chunk-TPL3CBMS.js → chunk-N2PLNYEV.js} +1 -1
- package/dist/cli/chunks/{chunk-CCM7MBLA.js → chunk-NBBIA3QA.js} +2 -2
- package/dist/cli/chunks/{chunk-KFITGSW3.js → chunk-NMYZSZHW.js} +2 -2
- package/dist/cli/chunks/{chunk-5SZLQCFP.js → chunk-NPSWRGNT.js} +2 -2
- package/dist/cli/chunks/{chunk-BADBKGZE.js → chunk-NXO7CT5K.js} +2 -2
- package/dist/cli/chunks/{chunk-BRWWIY6O.js → chunk-O5ZP3CBF.js} +2 -2
- package/dist/cli/chunks/{chunk-RI3NTZ2I.js → chunk-O6UMETOH.js} +2 -2
- package/dist/cli/chunks/{chunk-3GA7M5NK.js → chunk-OEQCZBBM.js} +2 -2
- package/dist/cli/chunks/{chunk-VW7FKTFO.js → chunk-P6EYD4V3.js} +2 -2
- package/dist/cli/chunks/{chunk-QTNDHCZ7.js → chunk-PS72GF4R.js} +3 -3
- package/dist/cli/chunks/{chunk-UFGFV4BO.js → chunk-PUUTYV32.js} +2 -2
- package/dist/cli/chunks/{chunk-4BIWQLD3.js → chunk-QOK4TIE4.js} +2 -2
- package/dist/cli/chunks/chunk-R5IL3XD5.js +69 -0
- package/dist/cli/chunks/{chunk-JZTB35EQ.js → chunk-RL5CBCBV.js} +1 -1
- package/dist/cli/chunks/{chunk-CSYQKVZY.js → chunk-SKDDAPBV.js} +1 -1
- package/dist/cli/chunks/{chunk-QGSELG75.js → chunk-SKNHAGYP.js} +2 -2
- package/dist/cli/chunks/{chunk-YZIOM7JL.js → chunk-SLDYG7LC.js} +2 -2
- package/dist/cli/chunks/{chunk-6G3RNT5H.js → chunk-SRKBR4DU.js} +2 -2
- package/dist/cli/chunks/{chunk-4U2JKV44.js → chunk-TCUIYIZ4.js} +1 -1
- package/dist/cli/chunks/{chunk-BY44ODHD.js → chunk-TMAIHTE3.js} +4 -4
- package/dist/cli/chunks/{chunk-RPT7HCMH.js → chunk-TXCOK5DC.js} +2 -2
- package/dist/cli/chunks/{chunk-ODGACHEZ.js → chunk-U257SS7D.js} +2 -2
- package/dist/cli/chunks/{chunk-AMRUZ6XG.js → chunk-U2WMCNNR.js} +2 -2
- package/dist/cli/chunks/{chunk-B6BAK2JI.js → chunk-UIASVDYG.js} +2 -2
- package/dist/cli/chunks/{chunk-VXQK4GKV.js → chunk-V7ZPTEP7.js} +1 -1
- package/dist/cli/chunks/{chunk-27MW2RFA.js → chunk-VHG67L7O.js} +2 -2
- package/dist/cli/chunks/{chunk-NBQW7MXF.js → chunk-VLQYU7ZQ.js} +1 -1
- package/dist/cli/chunks/{chunk-RHYGRUNU.js → chunk-VPDZTMMB.js} +3 -3
- package/dist/cli/chunks/{chunk-3DLD7OMF.js → chunk-VRGXYOIN.js} +1 -1
- package/dist/cli/chunks/{chunk-JZG23IPV.js → chunk-VSI45JCP.js} +1 -1
- package/dist/cli/chunks/{chunk-OXL6JSVR.js → chunk-VWWLJBRA.js} +8 -8
- package/dist/cli/chunks/{chunk-WC5A7C5L.js → chunk-VXUIIZNG.js} +1 -1
- package/dist/cli/chunks/{chunk-FTIHPDWV.js → chunk-W3IO4FQ5.js} +2 -2
- package/dist/cli/chunks/{chunk-FKNYOKIK.js → chunk-WULMXLNN.js} +1 -1
- package/dist/cli/chunks/{chunk-ZURHHRSA.js → chunk-WZUQT2BE.js} +2 -2
- package/dist/cli/chunks/{chunk-TFUWIKGZ.js → chunk-XF32XZMY.js} +2 -2
- package/dist/cli/chunks/{chunk-KV6PIOHN.js → chunk-XKD6AFY5.js} +1 -1
- package/dist/cli/chunks/{chunk-6QSB4XOL.js → chunk-XP4T7CZY.js} +2 -2
- package/dist/cli/chunks/{chunk-5ROA7KOT.js → chunk-XQZ63XSL.js} +1 -1
- package/dist/cli/chunks/{chunk-54TOOHER.js → chunk-XXHJKAE6.js} +2 -2
- package/dist/cli/chunks/{chunk-7GGSUXVM.js → chunk-Y3GX66VZ.js} +2 -2
- package/dist/cli/chunks/{chunk-JBW2A2O6.js → chunk-YXLQJ226.js} +2 -2
- package/dist/cli/chunks/chunk-Z2E5DTKX.js +2 -0
- package/dist/cli/chunks/{ci-LYAVZLM3.js → ci-FTZE4PD3.js} +2 -2
- package/dist/cli/chunks/{ci-output-L7TR2NCN.js → ci-output-C3ORCIHU.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-AQOGJGKI.js → circuit-breaker-GS5OTOJZ.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-SO2ZN26K.js → claude-flow-setup-RWOFP5L2.js} +2 -2
- package/dist/cli/chunks/client-UTNF2C5K.js +2 -0
- package/dist/cli/chunks/{cline-installer-XCXFH4UR.js → cline-installer-D7RGRAUH.js} +2 -2
- package/dist/cli/chunks/{code-3Z2HMS5I.js → code-HBDMMYHY.js} +2 -2
- package/dist/cli/chunks/{code-index-extractor-KE362AJX.js → code-index-extractor-B2KUPAEH.js} +2 -2
- package/dist/cli/chunks/{codex-installer-GTD3GFTF.js → codex-installer-MPXV4AOD.js} +2 -2
- package/dist/cli/chunks/{completions-EDCXRRJO.js → completions-QJS6QOZQ.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-QMN3V6D3.js → complexity-analyzer-YQQXWZIL.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-U6HN376C.js → continuedev-installer-Z6PBKYMB.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-54PZIREM.js → copilot-installer-RWVD44CV.js} +2 -2
- package/dist/cli/chunks/{cost-tracker-33O475QA.js → cost-tracker-DFPBFYWL.js} +2 -2
- package/dist/cli/chunks/{coverage-B7E545AJ.js → coverage-DYST26FK.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-FCM34JOR.js +2 -0
- package/dist/cli/chunks/{cursor-installer-LKKSPZUM.js → cursor-installer-LL6UWKTZ.js} +2 -2
- package/dist/cli/chunks/{daemon-DVOHWXUR.js → daemon-6PIHFZNR.js} +3 -3
- package/dist/cli/chunks/{dag-attention-scheduler-EQOHQBUG.js → dag-attention-scheduler-WS3HJW4F.js} +2 -2
- package/dist/cli/chunks/{detect-OCB2XT6C.js → detect-J4OITSUD.js} +2 -2
- package/dist/cli/chunks/{dist-node-HSG4QK4G.js → dist-node-QSLD5K6K.js} +2 -2
- package/dist/cli/chunks/{domain-handler-USGF4CIG.js → domain-handler-BD53QZ4Q.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-OUERZRGL.js → domain-transfer-VZBWINQL.js} +2 -2
- package/dist/cli/chunks/dream-6KCS7EWS.js +2 -0
- package/dist/cli/chunks/embed-and-insert-pattern-5UAFXNDX.js +3 -0
- package/dist/cli/chunks/{eval-LHYXXWFK.js → eval-GBKU6VTD.js} +2 -2
- package/dist/cli/chunks/{fast-paths-UTK7BN63.js → fast-paths-MYZ6GITZ.js} +2 -2
- package/dist/cli/chunks/{feature-flags-XB6ALB3X.js → feature-flags-2WVV66AO.js} +2 -2
- package/dist/cli/chunks/{feature-flags-XEP6B4GN.js → feature-flags-6ALWBTHS.js} +2 -2
- package/dist/cli/chunks/{file-discovery-O4DUCNHK.js → file-discovery-FOYCPGD6.js} +2 -2
- package/dist/cli/chunks/{fleet-37NGGRJI.js → fleet-JROEDHAT.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-5E7T3IQX.js → gnn-wrapper-KAXTFFEE.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-Q44PCI7K.js → heartbeat-handler-PG24CBMQ.js} +4 -4
- package/dist/cli/chunks/{heartbeat-scheduler-6JPB2AQS.js → heartbeat-scheduler-LSS3RD6E.js} +2 -2
- package/dist/cli/chunks/hnsw-adapter-PG6O67CQ.js +2 -0
- package/dist/cli/chunks/hnsw-index-AHYZHLNZ.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-B55GGQYA.js → hnsw-legacy-bridge-HYH4AJAO.js} +2 -2
- package/dist/cli/chunks/{hnswlib-node-B3D2XIL5.js → hnswlib-node-WTTST5LC.js} +2 -2
- package/dist/cli/chunks/hooks-RDZSAFQG.js +214 -0
- package/dist/cli/chunks/{hybrid-router-RV34PYQD.js → hybrid-router-HNPS6EFL.js} +2 -2
- package/dist/cli/chunks/{hypergraph-engine-FT5YK5RF.js → hypergraph-engine-JUFXRXCC.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-EUS6MIYW.js → hypergraph-handler-YFRF53TF.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-USAJVJY5.js +2 -0
- package/dist/cli/chunks/{init-handler-3MV32TKZ.js → init-handler-P4W5F57S.js} +6 -6
- package/dist/cli/chunks/init-wizard-GL7LAZID.js +2 -0
- package/dist/cli/chunks/kernel-2YAIESTR.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-RZPRXQI2.js → kilocode-installer-5VWY4DMH.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-BGDBNZHI.js → kiro-installer-PZC3BQII.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-QSIYZRAG.js +2 -0
- package/dist/cli/chunks/{learning-KNEBWLEZ.js → learning-4OH4ZG25.js} +3 -3
- package/dist/cli/chunks/{llm-router-Q2VQPOQ3.js → llm-router-LZBR6SZQ.js} +4 -4
- package/dist/cli/chunks/{load-RL53SYBD.js → load-SPWP6VB3.js} +2 -2
- package/dist/cli/chunks/load-test-UEHSHLVN.js +2 -0
- package/dist/cli/chunks/{mcp-GTINFFUF.js → mcp-QYPQMM7L.js} +2 -2
- package/dist/cli/chunks/{memory-STPMUUAK.js → memory-54ILJMWQ.js} +5 -5
- package/dist/cli/chunks/memory-backend-4NE4ADPG.js +2 -0
- package/dist/cli/chunks/{memory-handlers-LWX3LPVF.js → memory-handlers-YK7H5UCX.js} +2 -2
- package/dist/cli/chunks/{multi-model-executor-36ZYYDA6.js → multi-model-executor-XAOAVPPI.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-KTCQKS2K.js → opencode-installer-CNS4XMUF.js} +2 -2
- package/dist/cli/chunks/{orchestrator-6EGOOXQG.js → orchestrator-SSEMSKUI.js} +6 -6
- package/dist/cli/chunks/{pipeline-WSLAIOYC.js → pipeline-DS3AENTB.js} +2 -2
- package/dist/cli/chunks/{platform-MNUN663B.js → platform-BL6LH5NF.js} +2 -2
- package/dist/cli/chunks/{plugin-PLDTG4A2.js → plugin-FNXPEQ2C.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-B4UFONWB.js → prime-radiant-advanced-wasm-E6S6BGNA.js} +2 -2
- package/dist/cli/chunks/protocol-executor-YI4HNXND.js +2 -0
- package/dist/cli/chunks/{protocol-handler-VAVLLAI2.js → protocol-handler-D4WIUU3W.js} +2 -2
- package/dist/cli/chunks/{prove-WVNPDWUC.js → prove-OLB3PKW6.js} +2 -2
- package/dist/cli/chunks/{provider-manager-VJF4D6AW.js → provider-manager-GKTQ75DT.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-ANBAXQXC.js +2 -0
- package/dist/cli/chunks/{quality-LTMHVQBG.js → quality-ZYJVYTUL.js} +2 -2
- package/dist/cli/chunks/queen-coordinator-MYYUSWVX.js +2 -0
- package/dist/cli/chunks/{real-embeddings-6ACQACTM.js → real-embeddings-SKJRHLCS.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-T5ZWC3SS.js → roocode-installer-WZGKOLWE.js} +2 -2
- package/dist/cli/chunks/router-RYCLZ7A4.js +2 -0
- package/dist/cli/chunks/routing-feedback-5KSRG2UI.js +2 -0
- package/dist/cli/chunks/{routing-handler-Y2O2I2HM.js → routing-handler-4GIMINCI.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-F2V36B4W.js → ruvector-commands-YZONXZ2W.js} +2 -2
- package/dist/cli/chunks/{rvf-dual-writer-R6CNMPQD.js → rvf-dual-writer-WSS5GF54.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-adapter-IDVOB3LN.js → rvf-migration-adapter-WS4HHVEU.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-coordinator-VM4AMFZG.js → rvf-migration-coordinator-6BY5GI47.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-NEIOLJRF.js +2 -0
- package/dist/cli/chunks/safe-db-3JQP4EPU.js +2 -0
- package/dist/cli/chunks/schedule-2QKCL64E.js +2 -0
- package/dist/cli/chunks/scheduler-FMOP45FC.js +2 -0
- package/dist/cli/chunks/{security-WQ7YMR6M.js → security-HCNOL2K3.js} +3 -3
- package/dist/cli/chunks/shared-rvf-adapter-BMFIVWMJ.js +2 -0
- package/dist/cli/chunks/{shared-rvf-dual-writer-HYI64CBX.js → shared-rvf-dual-writer-QRNLSDS7.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-I5RYLFOE.js +2 -0
- package/dist/cli/chunks/{status-handler-BH2WCMPA.js → status-handler-QXZ442MY.js} +2 -2
- package/dist/cli/chunks/{structural-health-XWX6FKVF.js → structural-health-OFYZ3Z4A.js} +2 -2
- package/dist/cli/chunks/{sync-PRDGCHE2.js → sync-J4BG65NF.js} +2 -2
- package/dist/cli/chunks/{task-handler-YFHFBMHO.js → task-handler-UBSFCKK3.js} +2 -2
- package/dist/cli/chunks/{task-handlers-4OQRADMG.js → task-handlers-JFUT2FQ7.js} +2 -2
- package/dist/cli/chunks/{test-ZBTQ4Z66.js → test-WTNAHJHH.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-F47Y3KNO.js → test-scheduling-QREBYRGW.js} +3 -3
- package/dist/cli/chunks/{token-bootstrap-XOGAEQPG.js → token-bootstrap-HE5H77OL.js} +2 -2
- package/dist/cli/chunks/{token-usage-2KZ7WE5J.js → token-usage-V5B6K3JL.js} +2 -2
- package/dist/cli/chunks/{transformers-KCJ7PWZ4.js → transformers-HIVMQP4O.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-H6DL2DFA.js → tree-sitter-wasm-parser-WP2SF2M5.js} +2 -2
- package/dist/cli/chunks/{types-633TMIO3.js → types-7ZBTAO5Z.js} +2 -2
- package/dist/cli/chunks/unified-memory-2ETCY22B.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-OALJW537.js +2 -0
- package/dist/cli/chunks/unified-persistence-SQMP7A3O.js +2 -0
- package/dist/cli/chunks/{upgrade-CH742GRF.js → upgrade-WIFAJDBG.js} +2 -2
- package/dist/cli/chunks/{validate-44WH3CKE.js → validate-W63V36GA.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-W2A7CUM7.js → validate-swarm-CK5BM3YY.js} +2 -2
- package/dist/cli/chunks/{vibium-B25MIEBK.js → vibium-MJCCO36E.js} +2 -2
- package/dist/cli/chunks/visual-security-JUJPF2QO.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-B54K47HF.js → web-tree-sitter-ESERXLPK.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-EWL7COTI.js → windsurf-installer-FDWQ5BWI.js} +2 -2
- package/dist/cli/chunks/{witness-chain-DWNP7VR6.js → witness-chain-L5KSYE2S.js} +2 -2
- package/dist/cli/chunks/witness-chain-QJVKAAZT.js +2 -0
- package/dist/cli/chunks/{workflow-LT2J7U23.js → workflow-34GYJDFW.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-WXB2RVVW.js +2 -0
- package/dist/cli/chunks/{wrappers-OAZ6MKXO.js → wrappers-VGKEBQLW.js} +2 -2
- package/dist/cli/commands/hooks-handlers/command-hooks.js +104 -11
- package/dist/cli/commands/hooks-handlers/hooks-dream-learning.d.ts +98 -0
- package/dist/cli/commands/hooks-handlers/hooks-dream-learning.js +285 -1
- package/dist/cli/commands/hooks-handlers/hooks-shared.d.ts +20 -1
- package/dist/cli/commands/hooks-handlers/hooks-shared.js +35 -3
- package/dist/cli/commands/hooks-handlers/routing-hooks.js +15 -5
- package/dist/cli/commands/hooks-handlers/task-hooks.js +216 -5
- package/dist/coordination/task-executor.js +11 -2
- package/dist/init/phases/07-hooks.js +2 -2
- package/dist/integrations/ruvector/hypergraph-engine.js +63 -4
- package/dist/integrations/ruvector/hypergraph-schema.d.ts +6 -2
- package/dist/learning/embed-and-insert-pattern.d.ts +36 -0
- package/dist/learning/embed-and-insert-pattern.js +52 -0
- package/dist/learning/pattern-store.d.ts +8 -0
- package/dist/learning/pattern-store.js +66 -43
- package/dist/mcp/bundle.js +333 -327
- package/dist/mcp/entry.js +21 -1
- package/dist/workers/workers/learning-consolidation.js +6 -1
- package/package.json +1 -1
- package/dist/cli/chunks/adapter-C7AKAAPC.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-7P3AXQNO.js +0 -2
- package/dist/cli/chunks/base-GIDVLEPA.js +0 -2
- package/dist/cli/chunks/browser-workflow-DAUS4Z5V.js +0 -2
- package/dist/cli/chunks/chunk-4XYQJ4LQ.js +0 -2
- package/dist/cli/chunks/chunk-NKOLFLXF.js +0 -66
- package/dist/cli/chunks/client-LIKTMSIP.js +0 -2
- package/dist/cli/chunks/cross-domain-router-SSBT32Q3.js +0 -2
- package/dist/cli/chunks/dream-FAHB6BWB.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-GQM3ONQE.js +0 -2
- package/dist/cli/chunks/hnsw-index-XF3NY4R4.js +0 -2
- package/dist/cli/chunks/hooks-MOBQSJLJ.js +0 -101
- package/dist/cli/chunks/impact-analyzer-V6PBIMZH.js +0 -2
- package/dist/cli/chunks/init-wizard-7ROJWLEO.js +0 -2
- package/dist/cli/chunks/kernel-AOUBGDXU.js +0 -2
- package/dist/cli/chunks/knowledge-graph-SJA3YGMQ.js +0 -2
- package/dist/cli/chunks/load-test-NSHIGHCV.js +0 -2
- package/dist/cli/chunks/memory-backend-SZAYMQVP.js +0 -2
- package/dist/cli/chunks/protocol-executor-22KKAYX2.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-N7ZXOAEN.js +0 -2
- package/dist/cli/chunks/queen-coordinator-BC54OCHH.js +0 -2
- package/dist/cli/chunks/router-YTQZRTIB.js +0 -2
- package/dist/cli/chunks/routing-feedback-AASAMEUY.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-VHIHJOPA.js +0 -2
- package/dist/cli/chunks/safe-db-NVEBL662.js +0 -2
- package/dist/cli/chunks/schedule-KVUFE56T.js +0 -2
- package/dist/cli/chunks/scheduler-6GRLJZ2A.js +0 -2
- package/dist/cli/chunks/shared-rvf-adapter-XORIDF3Q.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-25TDMX6G.js +0 -2
- package/dist/cli/chunks/unified-memory-BTX45KY5.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-MMHMQ4CP.js +0 -2
- package/dist/cli/chunks/unified-persistence-GA7HKYZC.js +0 -2
- package/dist/cli/chunks/visual-security-HPF5HCYF.js +0 -2
- package/dist/cli/chunks/witness-chain-LROQLFND.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-VFRKGG5Y.js +0 -2
|
@@ -8,7 +8,7 @@ import { randomUUID } from 'crypto';
|
|
|
8
8
|
import chalk from 'chalk';
|
|
9
9
|
import path from 'node:path';
|
|
10
10
|
import { findProjectRoot } from '../../../kernel/unified-memory.js';
|
|
11
|
-
import { getHooksSystem, createHybridBackendWithTimeout, incrementDreamExperience, printJson, printError, printGuidance, } from './hooks-shared.js';
|
|
11
|
+
import { applyHookBusyTimeout, getHooksSystem, createHybridBackendWithTimeout, incrementDreamExperience, printJson, printError, printGuidance, } from './hooks-shared.js';
|
|
12
12
|
/**
|
|
13
13
|
* Read piped stdin with a short timeout. Claude Code delivers
|
|
14
14
|
* UserPromptSubmit / PostToolUse / etc. events as JSON on stdin —
|
|
@@ -147,7 +147,15 @@ export function registerRoutingHooks(hooks) {
|
|
|
147
147
|
await um.initialize();
|
|
148
148
|
}
|
|
149
149
|
const db = um.getDatabase();
|
|
150
|
+
applyHookBusyTimeout(db);
|
|
150
151
|
const outcomeId = `route-${Date.now()}-${randomUUID().slice(0, 8)}`;
|
|
152
|
+
// Split-write semantics: quality_score means "outcome quality after
|
|
153
|
+
// task ran" (6-dim formula), NOT routing confidence. Routing-
|
|
154
|
+
// confidence stays in decision_json. We write a sentinel
|
|
155
|
+
// (success=0, quality_score=-1) so post-task UPDATE fills the actual
|
|
156
|
+
// quality. lowConfidence is surfaced via decision_json + the error
|
|
157
|
+
// column so it's visible in queries that don't parse JSON.
|
|
158
|
+
const lowConfidence = routing.confidence < 0.5;
|
|
151
159
|
db.prepare(`
|
|
152
160
|
INSERT OR REPLACE INTO routing_outcomes (
|
|
153
161
|
id, task_json, decision_json, used_agent,
|
|
@@ -158,10 +166,12 @@ export function registerRoutingHooks(hooks) {
|
|
|
158
166
|
recommended: routing.recommendedAgent,
|
|
159
167
|
confidence: routing.confidence,
|
|
160
168
|
alternatives: routing.alternatives,
|
|
161
|
-
|
|
162
|
-
1, //
|
|
163
|
-
|
|
164
|
-
|
|
169
|
+
lowConfidence,
|
|
170
|
+
}), routing.recommendedAgent, 1, // followed_recommendation = true
|
|
171
|
+
0, // success = 0 (sentinel — post-task UPDATEs)
|
|
172
|
+
-1, // quality_score = -1 sentinel
|
|
173
|
+
0, // duration not yet tracked
|
|
174
|
+
lowConfidence ? 'low-confidence' : null);
|
|
165
175
|
// Increment dream experience counter
|
|
166
176
|
const projectRoot = findProjectRoot();
|
|
167
177
|
const dataDir = path.join(projectRoot, '.agentic-qe');
|
|
@@ -4,11 +4,52 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Handles task lifecycle hooks for pattern learning.
|
|
6
6
|
*/
|
|
7
|
+
import { createHash, randomUUID } from 'node:crypto';
|
|
7
8
|
import chalk from 'chalk';
|
|
8
9
|
import path from 'node:path';
|
|
9
10
|
import { QE_HOOK_EVENTS } from '../../../learning/qe-hooks.js';
|
|
10
|
-
import { findProjectRoot } from '../../../kernel/unified-memory.js';
|
|
11
|
-
import { getHooksSystem, createHybridBackendWithTimeout, incrementDreamExperience, checkAndTriggerDream, printJson, printSuccess, } from './hooks-shared.js';
|
|
11
|
+
import { findProjectRoot, getUnifiedMemory } from '../../../kernel/unified-memory.js';
|
|
12
|
+
import { applyHookBusyTimeout, getHooksSystem, createHybridBackendWithTimeout, incrementDreamExperience, checkAndTriggerDream, persistTaskOutcome, updateHookRouterQValue, updateRoutingOutcomeQuality, printJson, printSuccess, } from './hooks-shared.js';
|
|
13
|
+
// ============================================================================
|
|
14
|
+
// Constants — task-bridge / routing-quality / q-learning
|
|
15
|
+
// ============================================================================
|
|
16
|
+
/** kv_store namespace key for cross-subprocess pre-task → post-task bridge */
|
|
17
|
+
const TASK_BRIDGE_NAMESPACE = 'task-bridge';
|
|
18
|
+
/** Bridge TTL: a Task() invocation rarely exceeds this — older entries are stale */
|
|
19
|
+
const TASK_BRIDGE_TTL_MS = 600_000; // 10 minutes
|
|
20
|
+
/** Confidence floor below which we flag the route as low-confidence (patch 320) */
|
|
21
|
+
const LOW_CONFIDENCE_THRESHOLD = 0.5;
|
|
22
|
+
// ============================================================================
|
|
23
|
+
// Helpers
|
|
24
|
+
// ============================================================================
|
|
25
|
+
/**
|
|
26
|
+
* Derive a structural taskType from a free-form task description.
|
|
27
|
+
* Mirrors the categories the q-learning router cares about (ADR-061/087).
|
|
28
|
+
*/
|
|
29
|
+
function deriveTaskType(description) {
|
|
30
|
+
const d = description.toLowerCase();
|
|
31
|
+
if (/\bgenerate[- ]?test|\btest[- ]?gen|\bgenerate.+spec/.test(d))
|
|
32
|
+
return 'test-generation';
|
|
33
|
+
if (/\bcoverage|\banalyze.+cover/.test(d))
|
|
34
|
+
return 'coverage-analysis';
|
|
35
|
+
if (/\bquality|\bassess|\baudit/.test(d))
|
|
36
|
+
return 'quality-assessment';
|
|
37
|
+
if (/\bsecurity|\bvulnerab|\bcompliance/.test(d))
|
|
38
|
+
return 'security-compliance';
|
|
39
|
+
if (/\bdefect|\bbug|\bdiagnos/.test(d))
|
|
40
|
+
return 'defect-intelligence';
|
|
41
|
+
if (/\brequirement|\bspec\b/.test(d))
|
|
42
|
+
return 'requirements-validation';
|
|
43
|
+
if (/\brefactor|\brewrite|\boptim/.test(d))
|
|
44
|
+
return 'refactoring';
|
|
45
|
+
if (/\btest|\brun.+test/.test(d))
|
|
46
|
+
return 'test-execution';
|
|
47
|
+
return 'unknown';
|
|
48
|
+
}
|
|
49
|
+
/** Hash a description to a stable short bridge key. */
|
|
50
|
+
function hashDescription(description) {
|
|
51
|
+
return createHash('sha256').update(description).digest('hex').slice(0, 16);
|
|
52
|
+
}
|
|
12
53
|
/**
|
|
13
54
|
* Register pre-task and post-task subcommands on the hooks command.
|
|
14
55
|
*/
|
|
@@ -35,6 +76,132 @@ export function registerTaskHooks(hooks) {
|
|
|
35
76
|
routing = result.value;
|
|
36
77
|
}
|
|
37
78
|
}
|
|
79
|
+
// Patch 050: top-5 selectedPatternIds for downstream per-pattern feedback
|
|
80
|
+
const selectedPatternIds = (routing?.patterns ?? [])
|
|
81
|
+
.slice(0, 5)
|
|
82
|
+
.map((p) => p?.id)
|
|
83
|
+
.filter((id) => typeof id === 'string');
|
|
84
|
+
// Patches 090/100/160/300/320: signals derived from memory.db.
|
|
85
|
+
// All best-effort: failures fall through to empty/default values.
|
|
86
|
+
let historicalBest = null;
|
|
87
|
+
let priorVerdicts = [];
|
|
88
|
+
let estimatedTokenSavings = 0;
|
|
89
|
+
let bridgeKey = null;
|
|
90
|
+
try {
|
|
91
|
+
const um = getUnifiedMemory();
|
|
92
|
+
if (!um.isInitialized()) {
|
|
93
|
+
await um.initialize();
|
|
94
|
+
}
|
|
95
|
+
const db = um.getDatabase();
|
|
96
|
+
applyHookBusyTimeout(db);
|
|
97
|
+
// Patch 090: best-historical-agent across past successful routes
|
|
98
|
+
try {
|
|
99
|
+
const row = db.prepare(`
|
|
100
|
+
SELECT used_agent AS agent,
|
|
101
|
+
ROUND(AVG(quality_score), 3) AS avgQuality,
|
|
102
|
+
COUNT(*) AS n
|
|
103
|
+
FROM routing_outcomes
|
|
104
|
+
WHERE success = 1 AND quality_score >= 0
|
|
105
|
+
GROUP BY used_agent
|
|
106
|
+
ORDER BY avgQuality DESC, n DESC
|
|
107
|
+
LIMIT 1
|
|
108
|
+
`).get();
|
|
109
|
+
if (row)
|
|
110
|
+
historicalBest = row;
|
|
111
|
+
}
|
|
112
|
+
catch { /* table may be empty */ }
|
|
113
|
+
// Patch 100: surface recent verdicts namespace for context reuse
|
|
114
|
+
try {
|
|
115
|
+
const rows = db.prepare(`
|
|
116
|
+
SELECT key, value
|
|
117
|
+
FROM kv_store
|
|
118
|
+
WHERE namespace = 'verdicts'
|
|
119
|
+
AND created_at > datetime('now', '-7 days')
|
|
120
|
+
ORDER BY created_at DESC
|
|
121
|
+
LIMIT 3
|
|
122
|
+
`).all();
|
|
123
|
+
priorVerdicts = rows.map((r) => ({
|
|
124
|
+
key: r.key,
|
|
125
|
+
summary: String(r.value).slice(0, 200),
|
|
126
|
+
}));
|
|
127
|
+
}
|
|
128
|
+
catch { /* table may be empty */ }
|
|
129
|
+
// Patch 300: bootstrap estimatedTokenSavings from selected patterns
|
|
130
|
+
if (selectedPatternIds.length > 0) {
|
|
131
|
+
try {
|
|
132
|
+
const placeholders = selectedPatternIds.map(() => '?').join(',');
|
|
133
|
+
const tokRow = db.prepare(`
|
|
134
|
+
SELECT COALESCE(SUM(average_token_savings), 0) AS sum
|
|
135
|
+
FROM qe_patterns
|
|
136
|
+
WHERE id IN (${placeholders})
|
|
137
|
+
`).get(...selectedPatternIds);
|
|
138
|
+
estimatedTokenSavings = Math.max(0, Math.round(tokRow?.sum ?? 0));
|
|
139
|
+
}
|
|
140
|
+
catch { /* column may not exist on older schemas */ }
|
|
141
|
+
}
|
|
142
|
+
// Patch 160 + 280-bridge: write the task-bridge entry that post-task
|
|
143
|
+
// will consume to fan out experience_applications per pattern_id and
|
|
144
|
+
// derive a structural q-learning state_key.
|
|
145
|
+
if (options.description && selectedPatternIds.length > 0) {
|
|
146
|
+
try {
|
|
147
|
+
const description = String(options.description);
|
|
148
|
+
const taskType = deriveTaskType(description);
|
|
149
|
+
const priority = 'normal';
|
|
150
|
+
const domain = routing?.domains?.[0] ?? 'any';
|
|
151
|
+
const complexityBucket = Math.max(0, Math.min(10, Math.round(Math.min(description.length / 200, 1) * 10)));
|
|
152
|
+
bridgeKey = `task:${hashDescription(description)}`;
|
|
153
|
+
const payload = JSON.stringify({
|
|
154
|
+
selectedPatternIds,
|
|
155
|
+
agent: routing?.recommendedAgent ?? null,
|
|
156
|
+
description: description.slice(0, 200),
|
|
157
|
+
taskType,
|
|
158
|
+
priority,
|
|
159
|
+
domain,
|
|
160
|
+
complexityBucket,
|
|
161
|
+
estimatedTokenSavings,
|
|
162
|
+
ts: Date.now(),
|
|
163
|
+
});
|
|
164
|
+
const expiresAt = Date.now() + TASK_BRIDGE_TTL_MS;
|
|
165
|
+
db.prepare(`
|
|
166
|
+
INSERT OR REPLACE INTO kv_store (key, namespace, value, expires_at, created_at)
|
|
167
|
+
VALUES (?, ?, ?, ?, strftime('%s','now')*1000)
|
|
168
|
+
`).run(bridgeKey, TASK_BRIDGE_NAMESPACE, payload, expiresAt);
|
|
169
|
+
}
|
|
170
|
+
catch (bridgeErr) {
|
|
171
|
+
console.error(chalk.dim(`[hooks] pre-task bridge: ${bridgeErr instanceof Error ? bridgeErr.message : 'unknown'}`));
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
// Patch 150: write a routing_outcomes sentinel that post-task UPDATEs
|
|
175
|
+
// with the 6-dim outcome quality. Pre-task cannot know quality yet.
|
|
176
|
+
// success=0/quality=-1 sentinel pair makes the row easy to find later.
|
|
177
|
+
if (routing?.recommendedAgent && options.taskId) {
|
|
178
|
+
try {
|
|
179
|
+
const outcomeId = `route-${Date.now()}-${randomUUID().slice(0, 8)}`;
|
|
180
|
+
const lowConfidence = routing.confidence < LOW_CONFIDENCE_THRESHOLD;
|
|
181
|
+
db.prepare(`
|
|
182
|
+
INSERT INTO routing_outcomes (
|
|
183
|
+
id, task_json, decision_json, used_agent,
|
|
184
|
+
followed_recommendation, success, quality_score,
|
|
185
|
+
duration_ms, error
|
|
186
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
187
|
+
`).run(outcomeId, JSON.stringify({ description: options.description, taskId: options.taskId }), JSON.stringify({
|
|
188
|
+
recommended: routing.recommendedAgent,
|
|
189
|
+
confidence: routing.confidence,
|
|
190
|
+
alternatives: routing.alternatives,
|
|
191
|
+
lowConfidence,
|
|
192
|
+
}), routing.recommendedAgent, 1, 0, // success = 0 (sentinel — post-task UPDATEs to actual)
|
|
193
|
+
-1, // quality_score = -1 sentinel
|
|
194
|
+
0, lowConfidence ? 'low-confidence' : null);
|
|
195
|
+
}
|
|
196
|
+
catch (sentinelErr) {
|
|
197
|
+
console.error(chalk.dim(`[hooks] pre-task sentinel: ${sentinelErr instanceof Error ? sentinelErr.message : 'unknown'}`));
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
catch (memErr) {
|
|
202
|
+
console.error(chalk.dim(`[hooks] pre-task memory: ${memErr instanceof Error ? memErr.message : 'unknown'}`));
|
|
203
|
+
}
|
|
204
|
+
const lowConfidence = routing ? routing.confidence < LOW_CONFIDENCE_THRESHOLD : false;
|
|
38
205
|
if (options.json) {
|
|
39
206
|
printJson({
|
|
40
207
|
success: true,
|
|
@@ -43,6 +210,18 @@ export function registerTaskHooks(hooks) {
|
|
|
43
210
|
recommendedAgent: routing?.recommendedAgent,
|
|
44
211
|
confidence: routing?.confidence,
|
|
45
212
|
guidance: routing?.guidance || [],
|
|
213
|
+
// Patch 050
|
|
214
|
+
selectedPatternIds,
|
|
215
|
+
// Patch 090
|
|
216
|
+
historicalBest,
|
|
217
|
+
// Patch 100
|
|
218
|
+
priorVerdicts,
|
|
219
|
+
// Patch 300
|
|
220
|
+
estimatedTokenSavings,
|
|
221
|
+
// Patch 320
|
|
222
|
+
lowConfidence,
|
|
223
|
+
// Bridge identifier so post-task can correlate (debug aid)
|
|
224
|
+
bridgeKey,
|
|
46
225
|
});
|
|
47
226
|
}
|
|
48
227
|
else {
|
|
@@ -51,6 +230,9 @@ export function registerTaskHooks(hooks) {
|
|
|
51
230
|
if (routing) {
|
|
52
231
|
console.log(chalk.bold('\n🎯 Recommended:'), chalk.cyan(routing.recommendedAgent));
|
|
53
232
|
console.log(chalk.dim(` Confidence: ${(routing.confidence * 100).toFixed(1)}%`));
|
|
233
|
+
if (lowConfidence) {
|
|
234
|
+
console.log(chalk.yellow(' ⚠ Low confidence — consider providing more context'));
|
|
235
|
+
}
|
|
54
236
|
}
|
|
55
237
|
}
|
|
56
238
|
return;
|
|
@@ -95,14 +277,43 @@ export function registerTaskHooks(hooks) {
|
|
|
95
277
|
// Record as learning experience for every post-task invocation
|
|
96
278
|
if (options.taskId) {
|
|
97
279
|
const agent = options.agent || 'unknown';
|
|
280
|
+
const durationMs = options.duration ? parseInt(options.duration, 10) : 0;
|
|
98
281
|
await reasoningBank.recordOutcome({
|
|
99
282
|
patternId: `task:${agent}:${options.taskId}`,
|
|
100
283
|
success,
|
|
101
|
-
metrics: {
|
|
102
|
-
executionTimeMs: options.duration ? parseInt(options.duration, 10) : 0,
|
|
103
|
-
},
|
|
284
|
+
metrics: { executionTimeMs: durationMs },
|
|
104
285
|
feedback: `Agent: ${agent}, Task: ${options.taskId}`,
|
|
105
286
|
});
|
|
287
|
+
// Stream B: full experience pipeline (captured_experiences,
|
|
288
|
+
// experience_applications + per-pattern fan-out, qe_trajectories
|
|
289
|
+
// single-step + multi-step stitch, dream_insights.applied bump).
|
|
290
|
+
// Patches 060/110/120/160/180/300.
|
|
291
|
+
const outcome = await persistTaskOutcome({
|
|
292
|
+
taskId: options.taskId,
|
|
293
|
+
agent,
|
|
294
|
+
durationMs,
|
|
295
|
+
success,
|
|
296
|
+
});
|
|
297
|
+
// Stream D (patch 150): apply 6-dim outcome quality to the
|
|
298
|
+
// routing_outcomes sentinel that pre-task wrote with quality=-1.
|
|
299
|
+
await updateRoutingOutcomeQuality({
|
|
300
|
+
agent,
|
|
301
|
+
success,
|
|
302
|
+
durationMs,
|
|
303
|
+
qualityScore: outcome.qualityScore,
|
|
304
|
+
});
|
|
305
|
+
// Stream F (patch 280): Bellman Q-update for the hook-router state.
|
|
306
|
+
// Bridge payload carries the structural state derivation.
|
|
307
|
+
if (outcome.bridge) {
|
|
308
|
+
await updateHookRouterQValue({
|
|
309
|
+
taskType: outcome.bridge.taskType,
|
|
310
|
+
priority: outcome.bridge.priority,
|
|
311
|
+
domain: outcome.bridge.domain,
|
|
312
|
+
complexityBucket: outcome.bridge.complexityBucket,
|
|
313
|
+
agent,
|
|
314
|
+
success,
|
|
315
|
+
});
|
|
316
|
+
}
|
|
106
317
|
}
|
|
107
318
|
// Record experience for dream scheduler and check if dream should trigger
|
|
108
319
|
const projectRoot = findProjectRoot();
|
|
@@ -297,9 +297,18 @@ export class DomainTaskExecutor {
|
|
|
297
297
|
// Log outcome for debugging and metrics
|
|
298
298
|
console.debug(`[TaskExecutor] Outcome recorded: task=${task.id}, tier=${tier}, ` +
|
|
299
299
|
`model=${getModelForTier(tier)}, success=${success}, duration=${durationMs}ms`);
|
|
300
|
-
// ADR-023: Record routing outcome for learning feedback loop
|
|
300
|
+
// ADR-023: Record routing outcome for learning feedback loop.
|
|
301
|
+
// qualityScore uses the 6-dim outcome formula (matches the post-task
|
|
302
|
+
// hook UPDATE path) instead of a binary success?0.8:0.2.
|
|
301
303
|
if (this.qualityFeedbackLoop) {
|
|
302
304
|
const targetDomains = task.targetDomains || [];
|
|
305
|
+
const successScore = success ? 1 : 0;
|
|
306
|
+
const durationTier = durationMs < 100 ? 1.0 :
|
|
307
|
+
durationMs < 500 ? 0.8 :
|
|
308
|
+
durationMs < 2000 ? 0.6 :
|
|
309
|
+
durationMs < 5000 ? 0.4 :
|
|
310
|
+
durationMs < 10000 ? 0.2 : 0.1;
|
|
311
|
+
const qualityScore = 0.25 * successScore + 0.325 + 0.10 * durationTier;
|
|
303
312
|
await this.qualityFeedbackLoop.recordRoutingOutcome({
|
|
304
313
|
taskId: task.id,
|
|
305
314
|
taskDescription: task.type,
|
|
@@ -307,7 +316,7 @@ export class DomainTaskExecutor {
|
|
|
307
316
|
usedAgent: String(tier),
|
|
308
317
|
followedRecommendation: true,
|
|
309
318
|
success,
|
|
310
|
-
qualityScore
|
|
319
|
+
qualityScore,
|
|
311
320
|
durationMs,
|
|
312
321
|
timestamp: new Date(),
|
|
313
322
|
error: success ? undefined : 'Task execution failed',
|
|
@@ -439,7 +439,7 @@ if (process.argv.includes('--json')) process.stdout.write(JSON.stringify(result)
|
|
|
439
439
|
},
|
|
440
440
|
// Task routing
|
|
441
441
|
{
|
|
442
|
-
matcher: '^Task$',
|
|
442
|
+
matcher: '^(Task|Agent)$',
|
|
443
443
|
hooks: [
|
|
444
444
|
{
|
|
445
445
|
type: 'command',
|
|
@@ -474,7 +474,7 @@ if (process.argv.includes('--json')) process.stdout.write(JSON.stringify(result)
|
|
|
474
474
|
],
|
|
475
475
|
},
|
|
476
476
|
{
|
|
477
|
-
matcher: '^Task$',
|
|
477
|
+
matcher: '^(Task|Agent)$',
|
|
478
478
|
hooks: [
|
|
479
479
|
{
|
|
480
480
|
type: 'command',
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* @see /docs/plans/GOAP-V3-RUVECTOR-NEURAL-BACKBONE.md
|
|
15
15
|
*/
|
|
16
|
+
import * as nodePath from 'node:path';
|
|
16
17
|
import { v4 as uuidv4 } from 'uuid';
|
|
17
18
|
import { HypergraphSchemaManager, nodeToRow, rowToNode, edgeToRow, rowToEdge, generateEdgeId, } from './hypergraph-schema.js';
|
|
18
19
|
import { toErrorMessage } from '../../shared/error-utils.js';
|
|
@@ -515,8 +516,13 @@ export class HypergraphEngine {
|
|
|
515
516
|
});
|
|
516
517
|
}
|
|
517
518
|
}
|
|
518
|
-
// Phase 2: Create entity nodes
|
|
519
|
+
// Phase 2: Create entity nodes + a `contains` edge from the file node
|
|
520
|
+
// to each entity node. Without the contains edge, hypergraph_edges only
|
|
521
|
+
// ever held import edges from Phase 3 — `findUntestedFunctions`,
|
|
522
|
+
// `findImpactedTests`, and `findCoverageGaps` all returned empty
|
|
523
|
+
// regardless of indexing activity.
|
|
519
524
|
for (const file of indexResult.files) {
|
|
525
|
+
const fileNodeId = `file:${file.path}`;
|
|
520
526
|
for (const entity of file.entities) {
|
|
521
527
|
try {
|
|
522
528
|
const entityId = `${entity.type}:${file.path}:${entity.name}`;
|
|
@@ -540,6 +546,21 @@ export class HypergraphEngine {
|
|
|
540
546
|
`).run(entityId, nodeType, entity.name, file.path, entity.lineStart, entity.lineEnd, entity.complexity, entity.coverage);
|
|
541
547
|
nodesCreated++;
|
|
542
548
|
}
|
|
549
|
+
// file → entity contains edge (idempotent via INSERT OR REPLACE)
|
|
550
|
+
try {
|
|
551
|
+
const containsEdgeId = generateEdgeId(fileNodeId, entityId, 'contains');
|
|
552
|
+
this.config.db.prepare(`
|
|
553
|
+
INSERT OR REPLACE INTO hypergraph_edges (id, source_id, target_id, type, weight)
|
|
554
|
+
VALUES (?, ?, ?, 'contains', 1.0)
|
|
555
|
+
`).run(containsEdgeId, fileNodeId, entityId);
|
|
556
|
+
edgesCreated++;
|
|
557
|
+
}
|
|
558
|
+
catch (edgeError) {
|
|
559
|
+
errors.push({
|
|
560
|
+
entity: `contains:${entity.type}:${entity.name}`,
|
|
561
|
+
error: toErrorMessage(edgeError),
|
|
562
|
+
});
|
|
563
|
+
}
|
|
543
564
|
}
|
|
544
565
|
catch (entityError) {
|
|
545
566
|
errors.push({
|
|
@@ -550,13 +571,50 @@ export class HypergraphEngine {
|
|
|
550
571
|
}
|
|
551
572
|
}
|
|
552
573
|
// Phase 3: Create import edges (now all file nodes exist)
|
|
574
|
+
// Resolves relative paths against the source file's directory and probes
|
|
575
|
+
// common TS/JS/Python extensions (and `/index.ext` for directory imports)
|
|
576
|
+
// so internal imports map to existing hypergraph_nodes. Without this
|
|
577
|
+
// resolver, relative imports never matched any node and 0 edges were
|
|
578
|
+
// ever persisted from intra-repo imports.
|
|
579
|
+
const RESOLVE_EXTENSIONS = ['.ts', '.tsx', '.js', '.jsx', '.py', '.mjs', '.cjs'];
|
|
580
|
+
const RESOLVE_INDEX_FILES = [
|
|
581
|
+
'/index.ts', '/index.tsx', '/index.js', '/index.jsx', '/index.py',
|
|
582
|
+
];
|
|
553
583
|
for (const file of indexResult.files) {
|
|
554
584
|
const fileId = `file:${file.path}`;
|
|
555
585
|
for (const importPath of file.imports) {
|
|
556
586
|
try {
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
587
|
+
// Resolve relative imports against the source file's directory
|
|
588
|
+
let resolvedPath = importPath;
|
|
589
|
+
if (importPath.startsWith('./') || importPath.startsWith('../')) {
|
|
590
|
+
resolvedPath = nodePath.resolve(nodePath.dirname(file.path), importPath);
|
|
591
|
+
}
|
|
592
|
+
let targetId = `file:${resolvedPath}`;
|
|
593
|
+
// Check if target node exists; probe extensions and /index.ext
|
|
594
|
+
const lookup = this.config.db.prepare('SELECT id FROM hypergraph_nodes WHERE id = ?');
|
|
595
|
+
let targetExists = lookup.get(targetId);
|
|
596
|
+
if (!targetExists) {
|
|
597
|
+
for (const ext of RESOLVE_EXTENSIONS) {
|
|
598
|
+
const candidate = targetId + ext;
|
|
599
|
+
const hit = lookup.get(candidate);
|
|
600
|
+
if (hit) {
|
|
601
|
+
targetId = candidate;
|
|
602
|
+
targetExists = hit;
|
|
603
|
+
break;
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
if (!targetExists) {
|
|
608
|
+
for (const idxFile of RESOLVE_INDEX_FILES) {
|
|
609
|
+
const candidate = targetId + idxFile;
|
|
610
|
+
const hit = lookup.get(candidate);
|
|
611
|
+
if (hit) {
|
|
612
|
+
targetId = candidate;
|
|
613
|
+
targetExists = hit;
|
|
614
|
+
break;
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
}
|
|
560
618
|
if (targetExists) {
|
|
561
619
|
const edgeId = generateEdgeId(fileId, targetId, 'imports');
|
|
562
620
|
this.config.db.prepare(`
|
|
@@ -665,6 +723,7 @@ export class HypergraphEngine {
|
|
|
665
723
|
tests: 0,
|
|
666
724
|
depends_on: 0,
|
|
667
725
|
covers: 0,
|
|
726
|
+
contains: 0,
|
|
668
727
|
};
|
|
669
728
|
for (const row of edgesByTypeRows) {
|
|
670
729
|
if (row.type in edgesByType) {
|
|
@@ -17,9 +17,13 @@ import type { Database as DatabaseType } from 'better-sqlite3';
|
|
|
17
17
|
*/
|
|
18
18
|
export type NodeType = 'function' | 'module' | 'test' | 'file' | 'class';
|
|
19
19
|
/**
|
|
20
|
-
* Valid edge types in the hypergraph
|
|
20
|
+
* Valid edge types in the hypergraph.
|
|
21
|
+
*
|
|
22
|
+
* - `contains`: file → entity (function/class/etc) containment edge.
|
|
23
|
+
* Without this, `findUntestedFunctions`, `findImpactedTests`, and
|
|
24
|
+
* `findCoverageGaps` return empty regardless of indexing activity.
|
|
21
25
|
*/
|
|
22
|
-
export type EdgeType = 'calls' | 'imports' | 'tests' | 'depends_on' | 'covers';
|
|
26
|
+
export type EdgeType = 'calls' | 'imports' | 'tests' | 'depends_on' | 'covers' | 'contains';
|
|
23
27
|
/**
|
|
24
28
|
* Represents a node in the hypergraph (code entity)
|
|
25
29
|
*/
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pattern embedding helper — unifies the 3 memory.db `qe_patterns` writers
|
|
3
|
+
* per ADR-058 (embedding-locality).
|
|
4
|
+
*
|
|
5
|
+
* Three live writers in our codebase write to `qe_patterns`:
|
|
6
|
+
*
|
|
7
|
+
* 1. learning/sqlite-persistence.ts:497 SQLitePatternStore.storePattern (canonical)
|
|
8
|
+
* 2. cli/commands/hooks-handlers/hooks-dream-learning.ts (consolidateAgentPatterns)
|
|
9
|
+
* 3. workers/workers/learning-consolidation.ts (createPatternsFromCandidates)
|
|
10
|
+
*
|
|
11
|
+
* Only the canonical writer pairs the row with a `qe_pattern_embeddings` row
|
|
12
|
+
* via `computeRealEmbedding(text, qeConfig.embeddings)`. Writers 2 & 3
|
|
13
|
+
* historically bypassed embedding generation, producing "ghost" patterns that
|
|
14
|
+
* loaded with no vectors and stayed invisible to HNSW pattern recall.
|
|
15
|
+
*
|
|
16
|
+
* This helper provides the embedding side so any caller can compute and persist
|
|
17
|
+
* the embedding adjacent to its existing INSERT INTO qe_patterns. It is
|
|
18
|
+
* fail-soft (errors are logged at debug level and swallowed) — pattern row
|
|
19
|
+
* persistence must not regress when embedding computation fails.
|
|
20
|
+
*/
|
|
21
|
+
import type Database from 'better-sqlite3';
|
|
22
|
+
import { type EmbeddingConfig } from './real-embeddings.js';
|
|
23
|
+
/**
|
|
24
|
+
* Compute an embedding for a pattern (`name + description + tags`) and persist
|
|
25
|
+
* it to `qe_pattern_embeddings`. Caller is responsible for the matching
|
|
26
|
+
* `qe_patterns` row.
|
|
27
|
+
*
|
|
28
|
+
* @param db - better-sqlite3 database handle (typically from UnifiedMemoryManager.getDatabase())
|
|
29
|
+
* @param patternId - id of the pattern row this embedding belongs to
|
|
30
|
+
* @param name - pattern name (the most semantic component)
|
|
31
|
+
* @param description - pattern description (optional)
|
|
32
|
+
* @param tags - pattern tags (optional)
|
|
33
|
+
* @param config - override embedding model/cache config (defaults to Xenova/all-MiniLM-L6-v2)
|
|
34
|
+
*/
|
|
35
|
+
export declare function ensurePatternEmbedding(db: Database.Database, patternId: string, name: string, description: string | undefined | null, tags: string[] | undefined | null, config?: Partial<EmbeddingConfig>): Promise<void>;
|
|
36
|
+
//# sourceMappingURL=embed-and-insert-pattern.d.ts.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pattern embedding helper — unifies the 3 memory.db `qe_patterns` writers
|
|
3
|
+
* per ADR-058 (embedding-locality).
|
|
4
|
+
*
|
|
5
|
+
* Three live writers in our codebase write to `qe_patterns`:
|
|
6
|
+
*
|
|
7
|
+
* 1. learning/sqlite-persistence.ts:497 SQLitePatternStore.storePattern (canonical)
|
|
8
|
+
* 2. cli/commands/hooks-handlers/hooks-dream-learning.ts (consolidateAgentPatterns)
|
|
9
|
+
* 3. workers/workers/learning-consolidation.ts (createPatternsFromCandidates)
|
|
10
|
+
*
|
|
11
|
+
* Only the canonical writer pairs the row with a `qe_pattern_embeddings` row
|
|
12
|
+
* via `computeRealEmbedding(text, qeConfig.embeddings)`. Writers 2 & 3
|
|
13
|
+
* historically bypassed embedding generation, producing "ghost" patterns that
|
|
14
|
+
* loaded with no vectors and stayed invisible to HNSW pattern recall.
|
|
15
|
+
*
|
|
16
|
+
* This helper provides the embedding side so any caller can compute and persist
|
|
17
|
+
* the embedding adjacent to its existing INSERT INTO qe_patterns. It is
|
|
18
|
+
* fail-soft (errors are logged at debug level and swallowed) — pattern row
|
|
19
|
+
* persistence must not regress when embedding computation fails.
|
|
20
|
+
*/
|
|
21
|
+
import { computeRealEmbedding, DEFAULT_EMBEDDING_CONFIG, } from './real-embeddings.js';
|
|
22
|
+
/**
|
|
23
|
+
* Compute an embedding for a pattern (`name + description + tags`) and persist
|
|
24
|
+
* it to `qe_pattern_embeddings`. Caller is responsible for the matching
|
|
25
|
+
* `qe_patterns` row.
|
|
26
|
+
*
|
|
27
|
+
* @param db - better-sqlite3 database handle (typically from UnifiedMemoryManager.getDatabase())
|
|
28
|
+
* @param patternId - id of the pattern row this embedding belongs to
|
|
29
|
+
* @param name - pattern name (the most semantic component)
|
|
30
|
+
* @param description - pattern description (optional)
|
|
31
|
+
* @param tags - pattern tags (optional)
|
|
32
|
+
* @param config - override embedding model/cache config (defaults to Xenova/all-MiniLM-L6-v2)
|
|
33
|
+
*/
|
|
34
|
+
export async function ensurePatternEmbedding(db, patternId, name, description, tags, config = {}) {
|
|
35
|
+
try {
|
|
36
|
+
const text = `${name ?? ''} ${description ?? ''} ${(tags ?? []).join(' ')}`.trim();
|
|
37
|
+
if (!text)
|
|
38
|
+
return;
|
|
39
|
+
const embedding = await computeRealEmbedding(text, config);
|
|
40
|
+
if (!embedding || embedding.length === 0)
|
|
41
|
+
return;
|
|
42
|
+
const buffer = Buffer.from(new Float32Array(embedding).buffer);
|
|
43
|
+
const fullConfig = { ...DEFAULT_EMBEDDING_CONFIG, ...config };
|
|
44
|
+
db.prepare(`INSERT OR REPLACE INTO qe_pattern_embeddings (pattern_id, embedding, dimension, model)
|
|
45
|
+
VALUES (?, ?, ?, ?)`).run(patternId, buffer, embedding.length, fullConfig.modelName);
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
// Non-fatal: pattern row already persisted; embedding can be backfilled later.
|
|
49
|
+
console.debug('[ensurePatternEmbedding] non-fatal:', error instanceof Error ? error.message : String(error));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=embed-and-insert-pattern.js.map
|
|
@@ -238,6 +238,14 @@ export declare class PatternStore implements IPatternStore {
|
|
|
238
238
|
* Internal HNSW initialization with timeout protection
|
|
239
239
|
*/
|
|
240
240
|
private initializeHNSWInternal;
|
|
241
|
+
/**
|
|
242
|
+
* Load existing qe_pattern_embeddings into the active HNSW index.
|
|
243
|
+
*
|
|
244
|
+
* Shared between the unified-HNSW path (ADR-071) and the legacy fallback
|
|
245
|
+
* so both report a populated `vectorCount` after first init. Capped to
|
|
246
|
+
* `maxElements` to prevent boot timeout on large pattern stores.
|
|
247
|
+
*/
|
|
248
|
+
private loadEmbeddingsIntoHNSW;
|
|
241
249
|
/**
|
|
242
250
|
* Lazily initialize the VectorDeltaTracker for embedding version history.
|
|
243
251
|
* Returns null when the useDeltaEventSourcing feature flag is disabled.
|