agentic-qe 3.14.8 → 3.15.0
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/release/SKILL.md +6 -0
- package/.claude/skills/skills-manifest.json +1 -1
- package/CHANGELOG.md +145 -0
- package/README.md +143 -366
- package/assets/readme/credit-ruflo.svg +1 -0
- package/assets/readme/credit-ruvector.svg +1 -0
- package/assets/readme/project-header.svg +1 -0
- package/assets/readme/quality-loop.svg +1 -0
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/adapters/a2a/notifications/retry-queue.js +5 -1
- package/dist/adapters/ag-ui/json-patch.js +14 -7
- package/dist/adapters/ag-ui/state-delta-cache.js +20 -12
- package/dist/cli/bundle.js +5 -5
- package/dist/cli/chunks/adapter-D7G5MIDQ.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-67OKGDGZ.js → agent-booster-wasm-GDHJ6QUN.js} +2 -2
- package/dist/cli/chunks/{agent-handler-4HZEQ3WQ.js → agent-handler-MPYYQ2RZ.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-IBHZQSRN.js → agent-memory-branch-QBSHKLA2.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-G6TUFGHC.js +2 -0
- package/dist/cli/chunks/{arena-LCLRGUIK.js → arena-UJE2FROF.js} +4 -4
- package/dist/cli/chunks/{arena-EJBIGSF4.js → arena-WIGSL37B.js} +2 -2
- package/dist/cli/chunks/{audit-PY4JNDQQ.js → audit-VT7Y2Z7V.js} +3 -3
- package/dist/cli/chunks/base-B45BOC7E.js +2 -0
- package/dist/cli/chunks/{better-sqlite3-2JG5K6XT.js → better-sqlite3-DSL7LFRK.js} +2 -2
- package/dist/cli/chunks/{brain-handler-3UYK55GA.js → brain-handler-N3C2MDMK.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-GOSWOX46.js → branch-enumerator-B6NSQ3PZ.js} +2 -2
- package/dist/cli/chunks/{browser-DC2JV47Z.js → browser-KQ3YNRGW.js} +2 -2
- package/dist/cli/chunks/browser-workflow-MIBU4XMV.js +2 -0
- package/dist/cli/chunks/{chunk-RM6OC35G.js → chunk-2ORTL5WG.js} +1 -1
- package/dist/cli/chunks/{chunk-B2QKBQYD.js → chunk-2ZEV3O24.js} +1 -1
- package/dist/cli/chunks/{chunk-H5UH234L.js → chunk-32YSI6OT.js} +1 -1
- package/dist/cli/chunks/{chunk-GQJ4QDEN.js → chunk-3DKYBHNA.js} +4 -4
- package/dist/cli/chunks/{chunk-BFIXUKOR.js → chunk-3Y24VTZ3.js} +1 -1
- package/dist/cli/chunks/{chunk-G36RZF2Y.js → chunk-4BWDCUZZ.js} +1 -1
- package/dist/cli/chunks/{chunk-JRLZ7LZ3.js → chunk-4DCDIKBX.js} +2 -2
- package/dist/cli/chunks/{chunk-BHPTHC5O.js → chunk-4EEY23JS.js} +2 -2
- package/dist/cli/chunks/{chunk-NJEEKYEP.js → chunk-4FOKHGP5.js} +2 -2
- package/dist/cli/chunks/{chunk-NEXBTLN6.js → chunk-4OQSAUKR.js} +2 -2
- package/dist/cli/chunks/{chunk-KNSQWM2E.js → chunk-4YPL3OXS.js} +2 -2
- package/dist/cli/chunks/{chunk-QQVE65ER.js → chunk-5DJGP4TA.js} +2 -2
- package/dist/cli/chunks/{chunk-7TNCEVWX.js → chunk-5KN4QL3G.js} +2 -2
- package/dist/cli/chunks/{chunk-T6W2EYHC.js → chunk-5LN7FQZI.js} +2 -2
- package/dist/cli/chunks/{chunk-KKXH25IH.js → chunk-5PNRUMRV.js} +2 -2
- package/dist/cli/chunks/{chunk-G3C7Z6FO.js → chunk-62IEVKN3.js} +2 -2
- package/dist/cli/chunks/{chunk-3576QGPP.js → chunk-6GTIJNRO.js} +1 -1
- package/dist/cli/chunks/{chunk-SKJQKOFJ.js → chunk-6MN4L6BS.js} +2 -2
- package/dist/cli/chunks/{chunk-JTOFLDU7.js → chunk-7D6NVIGP.js} +6 -6
- package/dist/cli/chunks/{chunk-M7QKCHLQ.js → chunk-7JABIXP3.js} +2 -2
- package/dist/cli/chunks/chunk-7JC3LHA6.js +742 -0
- package/dist/cli/chunks/{chunk-LQVS5IWH.js → chunk-7WUHVGGT.js} +2 -2
- package/dist/cli/chunks/{chunk-I6NZFBT3.js → chunk-A37YYHUD.js} +2 -2
- package/dist/cli/chunks/{chunk-FRC7AFB4.js → chunk-AAQNRZKT.js} +2 -2
- package/dist/cli/chunks/{chunk-SPS472C5.js → chunk-AGYPPPXR.js} +2 -2
- package/dist/cli/chunks/chunk-AIE6OKCD.js +2 -0
- package/dist/cli/chunks/{chunk-5X4HDW5W.js → chunk-ANUZGOLQ.js} +2 -2
- package/dist/cli/chunks/{chunk-XFT4FYTC.js → chunk-AQZSF32Y.js} +2 -2
- package/dist/cli/chunks/{chunk-BITFGVZ4.js → chunk-ATXAMGVE.js} +2 -2
- package/dist/cli/chunks/{chunk-VAXTPLO3.js → chunk-AV3RX2L5.js} +2 -2
- package/dist/cli/chunks/{chunk-GHMJFICO.js → chunk-AW5OWYQ4.js} +2 -2
- package/dist/cli/chunks/{chunk-GA63ESNT.js → chunk-B6QTNTCU.js} +2 -2
- package/dist/cli/chunks/{chunk-HHANMCD2.js → chunk-BAPMEDWC.js} +1 -1
- package/dist/cli/chunks/{chunk-EKO5QL2B.js → chunk-BH2SQQ2N.js} +1 -1
- package/dist/cli/chunks/{chunk-W7JUD4EZ.js → chunk-C6M27NQE.js} +2 -2
- package/dist/cli/chunks/{chunk-4PY44TKH.js → chunk-CMYZWIXS.js} +2 -2
- package/dist/cli/chunks/{chunk-3FCHH4VP.js → chunk-CZWWC7GC.js} +1 -1
- package/dist/cli/chunks/{chunk-DSJJHPPS.js → chunk-D7NOHASX.js} +3 -3
- package/dist/cli/chunks/{chunk-N3ASALOL.js → chunk-DGRE6ZAA.js} +2 -2
- package/dist/cli/chunks/{chunk-U2QTL5T2.js → chunk-DSGRXW6K.js} +3 -3
- package/dist/cli/chunks/{chunk-F2WAB4WK.js → chunk-DXA7RLYU.js} +2 -2
- package/dist/cli/chunks/{chunk-C647D42G.js → chunk-DZHIE5UW.js} +2 -2
- package/dist/cli/chunks/{chunk-EMOZ5O5S.js → chunk-EBK6CUBD.js} +1 -1
- package/dist/cli/chunks/{chunk-PVJLQ2YZ.js → chunk-EPEKEUCF.js} +1 -1
- package/dist/cli/chunks/{chunk-UHLZKH6B.js → chunk-EQ4SDE4L.js} +25 -25
- package/dist/cli/chunks/{chunk-HE3BDBAO.js → chunk-EZPWSS3B.js} +2 -2
- package/dist/cli/chunks/{chunk-TCQWVVSR.js → chunk-F76SYOBT.js} +1 -1
- package/dist/cli/chunks/{chunk-7X3LMTRA.js → chunk-F7JVDLOI.js} +2 -2
- package/dist/cli/chunks/{chunk-CLUHGBLN.js → chunk-FCSETOWZ.js} +1 -1
- package/dist/cli/chunks/{chunk-77WL5HQW.js → chunk-FFE4XAQA.js} +1 -1
- package/dist/cli/chunks/{chunk-4HXFPBAA.js → chunk-FPTZP7W5.js} +1 -1
- package/dist/cli/chunks/{chunk-6GNWVPMR.js → chunk-FTFIA4I5.js} +2 -2
- package/dist/cli/chunks/{chunk-YHX74M7C.js → chunk-FTS6NGBP.js} +2 -2
- package/dist/cli/chunks/{chunk-UNFE4RPV.js → chunk-FZ3TQAPW.js} +1 -1
- package/dist/cli/chunks/{chunk-UIWXKRTK.js → chunk-G35KP72N.js} +2 -2
- package/dist/cli/chunks/{chunk-D2Y36V5J.js → chunk-GCHDMO5V.js} +2 -2
- package/dist/cli/chunks/{chunk-ES7TAJRJ.js → chunk-GRN47ANK.js} +2 -2
- package/dist/cli/chunks/{chunk-OVMG6EEF.js → chunk-GV7P5JYF.js} +2 -2
- package/dist/cli/chunks/{chunk-XAESN54Q.js → chunk-GX5RFGW2.js} +1 -1
- package/dist/cli/chunks/{chunk-SUNXA2UR.js → chunk-H77AUJNW.js} +2 -2
- package/dist/cli/chunks/{chunk-T4WQPE77.js → chunk-HBIV7PQH.js} +1 -1
- package/dist/cli/chunks/{chunk-VCSNNLWL.js → chunk-HOPXHZA3.js} +2 -2
- package/dist/cli/chunks/{chunk-GK5WLUX3.js → chunk-I3BH3KIF.js} +1 -1
- package/dist/cli/chunks/{chunk-RTD4U7IW.js → chunk-ILKMNDUM.js} +2 -2
- package/dist/cli/chunks/{chunk-LMAI74EP.js → chunk-IRHBR56R.js} +1 -1
- package/dist/cli/chunks/{chunk-DZHXCOSK.js → chunk-ISAMM7QA.js} +1 -1
- package/dist/cli/chunks/{chunk-6VTC3OHD.js → chunk-ISGFAMHZ.js} +2 -2
- package/dist/cli/chunks/{chunk-QPACHVDI.js → chunk-J46XGXPS.js} +1 -1
- package/dist/cli/chunks/{chunk-T53ZN4NO.js → chunk-J4XCBOPA.js} +2 -2
- package/dist/cli/chunks/{chunk-LKFBW2QM.js → chunk-JIWMFLHV.js} +2 -2
- package/dist/cli/chunks/{chunk-A5CLVZC3.js → chunk-JJ7WAU4I.js} +2 -2
- package/dist/cli/chunks/{chunk-CQEWL32R.js → chunk-JLPNYHJJ.js} +1 -1
- package/dist/cli/chunks/{chunk-6F7MFHTY.js → chunk-JO2YLIZH.js} +2 -2
- package/dist/cli/chunks/{chunk-VSPNIDQK.js → chunk-JSYNSJDQ.js} +2 -2
- package/dist/cli/chunks/{chunk-AJMAKUS3.js → chunk-JYRBOSOF.js} +2 -2
- package/dist/cli/chunks/{chunk-3S5IIK32.js → chunk-KEZ4PXVF.js} +1 -1
- package/dist/cli/chunks/{chunk-TT45RCLN.js → chunk-KLGFEHEN.js} +2 -2
- package/dist/cli/chunks/{chunk-673XJBGW.js → chunk-KU4WLKDK.js} +2 -2
- package/dist/cli/chunks/{chunk-EXQGHTPD.js → chunk-KUTMQBV4.js} +4 -4
- package/dist/cli/chunks/{chunk-A53MMSGC.js → chunk-L6PUBB6L.js} +2 -2
- package/dist/cli/chunks/{chunk-F6JJNBE5.js → chunk-LDJ5DZT5.js} +1 -1
- package/dist/cli/chunks/{chunk-25EEIAHS.js → chunk-LLS6JYPN.js} +2 -2
- package/dist/cli/chunks/{chunk-NWUFTLSF.js → chunk-LPCFIFZF.js} +2 -2
- package/dist/cli/chunks/{chunk-SMBGK7XI.js → chunk-M5EKZA7Q.js} +1 -1
- package/dist/cli/chunks/{chunk-YIWBJ637.js → chunk-MEYSIVMP.js} +2 -2
- package/dist/cli/chunks/{chunk-BUVJIVFG.js → chunk-MFGLRMO4.js} +1 -1
- package/dist/cli/chunks/{chunk-HBAFXWSO.js → chunk-MM57SD2F.js} +1 -1
- package/dist/cli/chunks/{chunk-UQGIC5OX.js → chunk-MO3QXLF2.js} +1 -1
- package/dist/cli/chunks/{chunk-WFKE7NZ5.js → chunk-MRIZY6HB.js} +2 -2
- package/dist/cli/chunks/{chunk-O4QB2GFL.js → chunk-N2MDNEF7.js} +2 -2
- package/dist/cli/chunks/{chunk-GVLRE3BV.js → chunk-N5ZHIQAV.js} +3 -3
- package/dist/cli/chunks/{chunk-6GJWT2OY.js → chunk-NZ556KZN.js} +2 -2
- package/dist/cli/chunks/{chunk-K6EOHGKS.js → chunk-O5AUOBGU.js} +2 -2
- package/dist/cli/chunks/{chunk-RJJIPTVH.js → chunk-OBSX3I4Y.js} +2 -2
- package/dist/cli/chunks/{chunk-3X2JSW3R.js → chunk-OLD2CIDI.js} +1 -1
- package/dist/cli/chunks/{chunk-AJ5PCJQ2.js → chunk-OTJ22IO2.js} +3 -3
- package/dist/cli/chunks/{chunk-J5HTQHJK.js → chunk-OYVDTD3A.js} +2 -2
- package/dist/cli/chunks/{chunk-JDOVO4E4.js → chunk-P2PPJUGD.js} +126 -130
- package/dist/cli/chunks/{chunk-TUZNWRYC.js → chunk-P4FRYNHL.js} +1 -1
- package/dist/cli/chunks/{chunk-56M4QNXU.js → chunk-P4WE6VRR.js} +2 -2
- package/dist/cli/chunks/{chunk-QDRFLM77.js → chunk-P725KXHX.js} +2 -2
- package/dist/cli/chunks/{chunk-AOD2ES44.js → chunk-P7MNF2SK.js} +2 -2
- package/dist/cli/chunks/{chunk-EBV3WFIR.js → chunk-PJU5HVWV.js} +2 -2
- package/dist/cli/chunks/{chunk-LTHV4PIG.js → chunk-PN3FYSQ6.js} +2 -2
- package/dist/cli/chunks/{chunk-CIEXUYY7.js → chunk-PPFW3H7E.js} +1 -1
- package/dist/cli/chunks/{chunk-L5T32SRF.js → chunk-Q4RCUCHD.js} +1 -1
- package/dist/cli/chunks/{chunk-Z5UZOYQS.js → chunk-QRALXNNX.js} +2 -2
- package/dist/cli/chunks/{chunk-CBWM5NOO.js → chunk-QVX22EIM.js} +2 -2
- package/dist/cli/chunks/{chunk-JQAJUXRE.js → chunk-R6CZCMKD.js} +2 -2
- package/dist/cli/chunks/chunk-ROK5YQ5P.js +3 -0
- package/dist/cli/chunks/{chunk-QP7EKLWU.js → chunk-S2GNFAOC.js} +2 -2
- package/dist/cli/chunks/{chunk-JRK5GX56.js → chunk-S644OORE.js} +1 -1
- package/dist/cli/chunks/{chunk-TGRHO4ES.js → chunk-S7CROKX4.js} +2 -2
- package/dist/cli/chunks/{chunk-BT3MI2BW.js → chunk-S7QUHLXV.js} +1 -1
- package/dist/cli/chunks/{chunk-SVP3BP52.js → chunk-UGYXUPGN.js} +2 -2
- package/dist/cli/chunks/{chunk-ISBOHF6Y.js → chunk-URRPJ3M7.js} +1 -1
- package/dist/cli/chunks/{chunk-R6I5I724.js → chunk-URUOTHPO.js} +2 -2
- package/dist/cli/chunks/{chunk-QKM4XT2F.js → chunk-VCYOFWMG.js} +2 -2
- package/dist/cli/chunks/{chunk-BCCSV3RH.js → chunk-VQVFGFYK.js} +1 -1
- package/dist/cli/chunks/{chunk-QH7C4PTX.js → chunk-VT5SMBEM.js} +1 -1
- package/dist/cli/chunks/{chunk-WVEHKAIH.js → chunk-VTGRGYY4.js} +3 -3
- package/dist/cli/chunks/{chunk-TP7L4EX6.js → chunk-VWCFXCSV.js} +2 -2
- package/dist/cli/chunks/{chunk-OZJQN7YE.js → chunk-VY4557VF.js} +2 -2
- package/dist/cli/chunks/{chunk-4RNCVSVN.js → chunk-VYERAOQL.js} +2 -2
- package/dist/cli/chunks/{chunk-VV2JVYOI.js → chunk-W6H2SOIK.js} +2 -2
- package/dist/cli/chunks/{chunk-VW7AXJQS.js → chunk-WBR4VRQE.js} +2 -2
- package/dist/cli/chunks/{chunk-T7YCNOW5.js → chunk-WDV6CBED.js} +2 -2
- package/dist/cli/chunks/{chunk-Z6G3QVZ4.js → chunk-WO7NPGUD.js} +19 -19
- package/dist/cli/chunks/{chunk-AEYJ4ZLA.js → chunk-WPOYFV4X.js} +1 -1
- package/dist/cli/chunks/{chunk-3EKG7HFV.js → chunk-WPSGMTI4.js} +3 -3
- package/dist/cli/chunks/{chunk-XECZYQT5.js → chunk-WQMXQO3O.js} +2 -2
- package/dist/cli/chunks/{chunk-QYCZYJH7.js → chunk-WR54SKKL.js} +2 -2
- package/dist/cli/chunks/{chunk-BTBJ2NLH.js → chunk-X4OESN7M.js} +2 -2
- package/dist/cli/chunks/{chunk-HPVYJ6JH.js → chunk-X5RELRY7.js} +2 -2
- package/dist/cli/chunks/{chunk-BOIUENWW.js → chunk-X7JEBPEW.js} +1 -1
- package/dist/cli/chunks/{chunk-OX7MJFLC.js → chunk-XEABMIUH.js} +2 -2
- package/dist/cli/chunks/{chunk-BL6273KR.js → chunk-XELFJC77.js} +3 -3
- package/dist/cli/chunks/{chunk-775WGWLL.js → chunk-XPUY3ZKD.js} +2 -2
- package/dist/cli/chunks/{chunk-BZIPW2PA.js → chunk-XZDPR6I2.js} +2 -2
- package/dist/cli/chunks/{chunk-OA75C4HY.js → chunk-Y63DADOR.js} +2 -2
- package/dist/cli/chunks/{chunk-F57FTFWS.js → chunk-YFRZVNE4.js} +2 -2
- package/dist/cli/chunks/{chunk-CXUC7YKA.js → chunk-YIDZ3TEN.js} +2 -2
- package/dist/cli/chunks/{chunk-LRGTPUJA.js → chunk-Z6CRROLU.js} +2 -2
- package/dist/cli/chunks/{chunk-J24AJEDE.js → chunk-ZPH2YT3J.js} +2 -2
- package/dist/cli/chunks/{chunk-AUFV2G2J.js → chunk-ZV7LJPSI.js} +5 -5
- package/dist/cli/chunks/{chunk-AR2S4DOB.js → chunk-ZXIIB3QE.js} +1 -1
- package/dist/cli/chunks/{ci-5LIV2HW5.js → ci-63JINRNB.js} +3 -3
- package/dist/cli/chunks/{ci-output-UO5BDFU4.js → ci-output-CRFWLUAA.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-UQDPXYRD.js → circuit-breaker-PJLG3WYL.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-62QES3QX.js → claude-flow-setup-UKHSQMJU.js} +2 -2
- package/dist/cli/chunks/client-A4FTITK3.js +2 -0
- package/dist/cli/chunks/{cline-installer-X7VZTSZG.js → cline-installer-PYQ27AS3.js} +2 -2
- package/dist/cli/chunks/{code-H3BF4L4H.js → code-K7VGLZ3W.js} +3 -3
- package/dist/cli/chunks/{code-index-extractor-BJGFZGGL.js → code-index-extractor-NNWAVWSL.js} +2 -2
- package/dist/cli/chunks/{codex-installer-KVZWKU6S.js → codex-installer-U4VJIKRN.js} +2 -2
- package/dist/cli/chunks/{completions-YMILE6V7.js → completions-DOCI3P4W.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-J26N2PWG.js → complexity-analyzer-RFW2QRFR.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-MAR42OV7.js → continuedev-installer-S5WXXOBU.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-CVOJF6OT.js → copilot-installer-AAQ6YLVJ.js} +2 -2
- package/dist/cli/chunks/core-handlers-FO3QTNWI.js +2 -0
- package/dist/cli/chunks/{cost-tracker-SXLWXE55.js → cost-tracker-R4VOHTWQ.js} +2 -2
- package/dist/cli/chunks/{coverage-D7HCHFP3.js → coverage-P54HPCLV.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-LIV6SRWF.js +2 -0
- package/dist/cli/chunks/{cursor-installer-X37VHIKW.js → cursor-installer-VHBWZE5A.js} +2 -2
- package/dist/cli/chunks/{daemon-JN7SOH6F.js → daemon-BTRSWNB4.js} +3 -3
- package/dist/cli/chunks/{daemon-LIW47IDM.js → daemon-JLH5TTWZ.js} +4 -4
- package/dist/cli/chunks/{dag-attention-scheduler-QCHHIZBT.js → dag-attention-scheduler-5Z6DCRFK.js} +2 -2
- package/dist/cli/chunks/{detect-WRFCWAX5.js → detect-NWGASRJJ.js} +2 -2
- package/dist/cli/chunks/{dist-node-6FWT4XZO.js → dist-node-XMNNSEFJ.js} +2 -2
- package/dist/cli/chunks/{domain-handler-SNFPNMRT.js → domain-handler-BWVBZTNR.js} +2 -2
- package/dist/cli/chunks/{domain-plugins-MXKHH62P.js → domain-plugins-YAD4USA4.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-47UJNERX.js → domain-transfer-Z3MRPZEZ.js} +2 -2
- package/dist/cli/chunks/dream-DNLGHYXY.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-LZFAUNBQ.js → embed-and-insert-pattern-5CCO45WC.js} +2 -2
- package/dist/cli/chunks/{eval-AMUXTMJB.js → eval-JEMLTGY4.js} +2 -2
- package/dist/cli/chunks/{experience-capture-middleware-3D65TR2C.js → experience-capture-middleware-FKVYBBAN.js} +3 -3
- package/dist/cli/chunks/{fast-paths-Y7BBMM56.js → fast-paths-TFL32H3C.js} +2 -2
- package/dist/cli/chunks/{feature-flags-VESRRQ6V.js → feature-flags-CNGAUUMT.js} +2 -2
- package/dist/cli/chunks/{feature-flags-JMQQ7JW4.js → feature-flags-OHGD2NCW.js} +2 -2
- package/dist/cli/chunks/{file-discovery-JJKQQUV6.js → file-discovery-IHGDYW34.js} +2 -2
- package/dist/cli/chunks/{fleet-WIGHICJF.js → fleet-OGTSDGJ2.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-BFNPETTT.js → gnn-wrapper-QYTTKNCE.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-HDXKTGUI.js → heartbeat-handler-R5OD2SKN.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-DL4LXXJF.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-Y64M43J4.js +2 -0
- package/dist/cli/chunks/hnsw-index-5V6DDMTA.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-6A7OTAPT.js → hnsw-legacy-bridge-ULJWYXBQ.js} +2 -2
- package/dist/cli/chunks/{hnswlib-node-LKV2H47B.js → hnswlib-node-SYKJXGE2.js} +2 -2
- package/dist/cli/chunks/{hooks-KDSFYQQG.js → hooks-XAJXPXTU.js} +10 -10
- package/dist/cli/chunks/hybrid-backend-JWT2V4FQ.js +2 -0
- package/dist/cli/chunks/{hypergraph-engine-GDLPEPUC.js → hypergraph-engine-GIBPGW4N.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-4UMFA2EW.js → hypergraph-handler-ENFK6IDN.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-XUZQSZZC.js +2 -0
- package/dist/cli/chunks/{init-handler-4GCHPQHD.js → init-handler-CSA62LGT.js} +6 -6
- package/dist/cli/chunks/init-wizard-KDJKHEPN.js +2 -0
- package/dist/cli/chunks/kernel-MUDYPGFR.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-HJZMT2G5.js → kilocode-installer-YXFIRTSA.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-WUPY67HG.js → kiro-installer-JW3BG2MQ.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-GR52N7PU.js +2 -0
- package/dist/cli/chunks/{learning-AXKIS7IG.js → learning-BDBZ7ZVG.js} +3 -3
- package/dist/cli/chunks/{llm-router-HUDPNZLJ.js → llm-router-CCX2DYTC.js} +4 -4
- package/dist/cli/chunks/llm-router-service-QL6LVKZ4.js +2 -0
- package/dist/cli/chunks/{load-RM44POD7.js → load-UJTTEOOK.js} +2 -2
- package/dist/cli/chunks/load-test-76V75WZ5.js +2 -0
- package/dist/cli/chunks/{mcp-5JVQRBOP.js → mcp-2NAJYREC.js} +2 -2
- package/dist/cli/chunks/{memory-VGZ2V6PL.js → memory-C3UQSN5F.js} +5 -5
- package/dist/cli/chunks/memory-backend-SMQRS5QN.js +2 -0
- package/dist/cli/chunks/{memory-handlers-EI537Z32.js → memory-handlers-ESFIJENU.js} +2 -2
- package/dist/cli/chunks/{multi-model-executor-WPRKCSCM.js → multi-model-executor-SIHSHAD7.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-YAJMRCQO.js → opencode-installer-KDYHUGPG.js} +2 -2
- package/dist/cli/chunks/{orchestrator-MUGWBUYP.js → orchestrator-MJHIQEHD.js} +5 -5
- package/dist/cli/chunks/pattern-null-store-MWAJMOYU.js +2 -0
- package/dist/cli/chunks/{pattern-usage-recorder-ZQJJ2YNG.js → pattern-usage-recorder-OLBE4UIF.js} +2 -2
- package/dist/cli/chunks/{pipeline-F4DXDUDC.js → pipeline-IOK2CV3U.js} +2 -2
- package/dist/cli/chunks/{platform-HI3A3OWF.js → platform-53JQ7JXN.js} +2 -2
- package/dist/cli/chunks/{plugin-XRITPTR7.js → plugin-L5SDIWDI.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-HHNJP7CQ.js → prime-radiant-advanced-wasm-2DS67JFS.js} +2 -2
- package/dist/cli/chunks/{project-root-2VN4WO2A.js → project-root-LQMOFO2Z.js} +2 -2
- package/dist/cli/chunks/protocol-executor-32X3GAJT.js +2 -0
- package/dist/cli/chunks/{protocol-handler-ZEVHSEBG.js → protocol-handler-NXG2M43B.js} +2 -2
- package/dist/cli/chunks/{prove-C4BLZWBS.js → prove-7K7PFSSX.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-KAFV3TGI.js +2 -0
- package/dist/cli/chunks/{quality-M3DTE4KK.js → quality-ATILUGMJ.js} +2 -2
- package/dist/cli/chunks/{quality-gate-V6KS7ML3.js → quality-gate-MPZMDPIZ.js} +3 -3
- package/dist/cli/chunks/queen-coordinator-L3SODGRX.js +2 -0
- package/dist/cli/chunks/{real-embeddings-YWSE3IRT.js → real-embeddings-VZN3KIAI.js} +2 -2
- package/dist/cli/chunks/{ref-validation-ZWOTFA3T.js → ref-validation-EUATPVXX.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-GJBIWETD.js → roocode-installer-7M2GOUNZ.js} +2 -2
- package/dist/cli/chunks/router-DDCSSXYQ.js +2 -0
- package/dist/cli/chunks/routing-feedback-RFASKYCD.js +2 -0
- package/dist/cli/chunks/{routing-handler-CFYLGNAR.js → routing-handler-VWANE652.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-EDKG456B.js → ruvector-commands-B2YIPGOV.js} +2 -2
- package/dist/cli/chunks/rvf-dual-writer-HCIF2G56.js +2 -0
- package/dist/cli/chunks/rvf-migration-adapter-UVAHQ7SV.js +2 -0
- package/dist/cli/chunks/{rvf-migration-coordinator-ZMEYMAI6.js → rvf-migration-coordinator-RQXOQJ5T.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-F2I5FFHK.js +2 -0
- package/dist/cli/chunks/{rvf-store-integrity-AH6PNJP6.js → rvf-store-integrity-7P5YDXRH.js} +2 -2
- package/dist/cli/chunks/safe-db-6ZAA4S23.js +2 -0
- package/dist/cli/chunks/schedule-SM5Q6UVP.js +2 -0
- package/dist/cli/chunks/scheduler-4EYP4EZ6.js +2 -0
- package/dist/cli/chunks/{security-ZU2GW3ZM.js → security-VJ7TVSQF.js} +3 -3
- package/dist/cli/chunks/{shared-rvf-adapter-5FOVSL3T.js → shared-rvf-adapter-63NXQFBX.js} +2 -2
- package/dist/cli/chunks/{shared-rvf-dual-writer-IO4DC4XV.js → shared-rvf-dual-writer-JQRP7P5A.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-KLN2K266.js +2 -0
- package/dist/cli/chunks/{standalone-memory-3UXDZ7HI.js → standalone-memory-WJ72PH5P.js} +2 -2
- package/dist/cli/chunks/{status-handler-264CHTWS.js → status-handler-G72ZSLAX.js} +2 -2
- package/dist/cli/chunks/{structural-health-E2QPUOZE.js → structural-health-HYBGP4BD.js} +2 -2
- package/dist/cli/chunks/{sync-N2L2OST4.js → sync-5YMZZIF4.js} +2 -2
- package/dist/cli/chunks/{sync-2ACMWM7D.js → sync-O5FQAHT7.js} +2 -2
- package/dist/cli/chunks/{task-handler-IB5CVOTY.js → task-handler-E6IFNHZG.js} +2 -2
- package/dist/cli/chunks/{task-handlers-QBMYNJHE.js → task-handlers-P3GC2L5L.js} +3 -3
- package/dist/cli/chunks/{test-7RGLRDSP.js → test-OU6ERW67.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-RJABJT2W.js → test-scheduling-3HY4I3HY.js} +7 -7
- package/dist/cli/chunks/{token-bootstrap-JVHMHB72.js → token-bootstrap-A5QA4CWK.js} +2 -2
- package/dist/cli/chunks/{token-usage-3ECHQVCY.js → token-usage-MUNQVPFT.js} +2 -2
- package/dist/cli/chunks/{transformers-KJH3IJWI.js → transformers-IEO25W5V.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-XN6PFI32.js → tree-sitter-wasm-parser-T2EQHEAY.js} +2 -2
- package/dist/cli/chunks/{types-5BAPXOLS.js → types-ODCPGCID.js} +2 -2
- package/dist/cli/chunks/unified-memory-B5IA2KKQ.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-YF74LL3Z.js +2 -0
- package/dist/cli/chunks/unified-persistence-VZMGNGWY.js +2 -0
- package/dist/cli/chunks/{upgrade-S5NFQZID.js → upgrade-4DN6EIW2.js} +2 -2
- package/dist/cli/chunks/{validate-BIBWOLJD.js → validate-TBNAPDE3.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-WAA3LBHH.js → validate-swarm-ZN7XXUY4.js} +2 -2
- package/dist/cli/chunks/visual-security-ZV3BLLSH.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-OTBQTHAV.js → web-tree-sitter-DWAWVD2X.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-NNQ22EW6.js → windsurf-installer-U6EROS5S.js} +2 -2
- package/dist/cli/chunks/{witness-chain-E7MUBOJW.js → witness-chain-EQEJS2P4.js} +2 -2
- package/dist/cli/chunks/witness-chain-OA24MQWX.js +2 -0
- package/dist/cli/chunks/{witness-chain-repair-FW4QSN4C.js → witness-chain-repair-KBXDRXS3.js} +2 -2
- package/dist/cli/chunks/{witness-chain-verifier-YMROEBVL.js → witness-chain-verifier-HSQGZ4R4.js} +2 -2
- package/dist/cli/chunks/{witness-key-manager-4CGRNDMJ.js → witness-key-manager-RAODG73T.js} +2 -2
- package/dist/cli/chunks/{workflow-4VRSTRAN.js → workflow-KNFJNNKG.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-IMX2LSVE.js +2 -0
- package/dist/cli/chunks/{wrappers-4M4UTGEU.js → wrappers-NIJBA22T.js} +2 -2
- package/dist/cli/utils/workflow-parser.js +73 -57
- package/dist/domains/code-intelligence/services/metric-collector/test-counter.d.ts +1 -1
- package/dist/domains/code-intelligence/services/metric-collector/test-counter.js +17 -15
- package/dist/domains/test-execution/services/retry-handler.js +6 -3
- package/dist/governance/ab-benchmarking.d.ts +5 -1
- package/dist/governance/ab-benchmarking.js +64 -29
- package/dist/mcp/bundle.js +414 -412
- package/dist/mcp/security/rate-limiter.d.ts +1 -0
- package/dist/mcp/security/rate-limiter.js +22 -5
- package/dist/mcp/services/session-store.js +17 -17
- package/dist/mcp/tools/planning/goap-status.d.ts +2 -0
- package/dist/mcp/tools/planning/goap-status.js +8 -2
- package/dist/planning/goap-planner.d.ts +3 -0
- package/dist/planning/goap-planner.js +80 -37
- package/dist/shared/embeddings/embedding-cache.js +1 -1
- package/dist/shared/embeddings/nomic-embedder.js +17 -7
- package/dist/shared/embeddings/ollama-client.js +5 -3
- package/dist/shared/git/git-analyzer.js +31 -30
- package/dist/shared/http/http-client.js +20 -13
- package/dist/shared/io/file-reader.js +11 -8
- package/dist/shared/llm/cache.d.ts +8 -29
- package/dist/shared/llm/cache.js +6 -2
- package/dist/shared/llm/cost-tracker.js +2 -1
- package/dist/shared/llm/provider-manager.js +4 -22
- package/dist/shared/llm/providers/gemini.d.ts +1 -0
- package/dist/shared/llm/providers/gemini.js +14 -5
- package/dist/shared/llm/providers/openrouter.js +6 -3
- package/dist/shared/metrics/code-metrics.js +1 -1
- package/dist/shared/metrics/system-metrics.js +8 -2
- package/dist/shared/retry-engine.js +2 -12
- package/dist/test-scheduling/executors/vitest-executor.js +26 -17
- package/package.json +3 -1
- package/dist/cli/chunks/adapter-XYCOXQCC.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-DTJCROTG.js +0 -2
- package/dist/cli/chunks/base-5TQ34GMD.js +0 -2
- package/dist/cli/chunks/browser-workflow-KWX4ESTJ.js +0 -2
- package/dist/cli/chunks/chunk-7STWD4KJ.js +0 -3
- package/dist/cli/chunks/chunk-PFXCRRR6.js +0 -736
- package/dist/cli/chunks/chunk-U64QORFO.js +0 -2
- package/dist/cli/chunks/client-AJZKCP4I.js +0 -2
- package/dist/cli/chunks/core-handlers-MQHEMGDV.js +0 -2
- package/dist/cli/chunks/cross-domain-router-3QNMZV5R.js +0 -2
- package/dist/cli/chunks/dream-OSWAITPT.js +0 -2
- package/dist/cli/chunks/heartbeat-scheduler-BVRVVIE2.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-MZTHXULS.js +0 -2
- package/dist/cli/chunks/hnsw-index-KHEX4VDG.js +0 -2
- package/dist/cli/chunks/hybrid-backend-2B3LCLR4.js +0 -2
- package/dist/cli/chunks/impact-analyzer-4R4VWOGQ.js +0 -2
- package/dist/cli/chunks/init-wizard-TAOPXHHD.js +0 -2
- package/dist/cli/chunks/kernel-6I6VZUWY.js +0 -2
- package/dist/cli/chunks/knowledge-graph-KFMTTUR5.js +0 -2
- package/dist/cli/chunks/llm-router-service-2D74XVM3.js +0 -2
- package/dist/cli/chunks/load-test-53FWOWNS.js +0 -2
- package/dist/cli/chunks/memory-backend-KFJDDPEZ.js +0 -2
- package/dist/cli/chunks/pattern-null-store-7DMU5CJ4.js +0 -2
- package/dist/cli/chunks/protocol-executor-2EMTBTMG.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-VZHZZPHE.js +0 -2
- package/dist/cli/chunks/queen-coordinator-7MYTTUHI.js +0 -2
- package/dist/cli/chunks/router-ZD4LXAWA.js +0 -2
- package/dist/cli/chunks/routing-feedback-FSLMDVGD.js +0 -2
- package/dist/cli/chunks/rvf-dual-writer-LTKTDRFS.js +0 -2
- package/dist/cli/chunks/rvf-migration-adapter-IF24EVC5.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-E6JNBKMZ.js +0 -2
- package/dist/cli/chunks/safe-db-F6TRB5KZ.js +0 -2
- package/dist/cli/chunks/schedule-HBD4BYTE.js +0 -2
- package/dist/cli/chunks/scheduler-6FYWPMQC.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-DOU72F5Z.js +0 -2
- package/dist/cli/chunks/unified-memory-GHAYAXWZ.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-CCC63YXT.js +0 -2
- package/dist/cli/chunks/unified-persistence-HKRHI5PG.js +0 -2
- package/dist/cli/chunks/visual-security-APOXJ3Q3.js +0 -2
- package/dist/cli/chunks/witness-chain-7IP5IJGT.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-2HNW5ZMQ.js +0 -2
|
@@ -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.
|
|
2
|
-
import{b as G,d as z}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.0");process.exit(0)}
|
|
2
|
+
import{b as G,d as z}from"./chunk-GV7P5JYF.js";import{a as F,e as le}from"./chunk-X5RELRY7.js";import{b as k,c as pe}from"./chunk-QRALXNNX.js";z();le();z();import*as C from"node:http";import*as _ from"node:https";import{createHash as ce}from"node:crypto";import{URL as X}from"node:url";var T={model:"Xenova/all-MiniLM-L6-v2",expectedDim:384,connectTimeoutMs:5e3,requestTimeoutMs:3e4,failureThreshold:3,failureWindowMs:6e4},me="AQE embedder endpoint identity canary v1",ue="/v1/embeddings";function J(t){if(t.startsWith("unix:"))return t;try{let e=new X(t);return e.username||e.password?(e.username="",e.password="",e.toString().replace(/\/$/,"")):t}catch{return t}}function fe(t){if(t.startsWith("unix:")){let r=t.slice(5);if(!r.startsWith("/"))throw new Error(`unix endpoint must be an absolute path: ${t}`);return{transport:"unix",socketPath:r,safeUrl:t}}let e=new X(t);if(e.protocol!=="http:"&&e.protocol!=="https:")throw new Error(`unsupported embedder endpoint protocol: ${e.protocol}`);return(e.username||e.password)&&(console.warn("[EmbedderEndpointClient] endpoint URL contained userinfo; stripping. Use AQE_EMBEDDER_TOKEN env var for credentials."),e.username="",e.password=""),{transport:e.protocol==="https:"?"https":"http",host:e.hostname,port:e.port?Number(e.port):e.protocol==="https:"?443:80,protocol:e.protocol,safeUrl:e.toString().replace(/\/$/,"")}}var q=class{constructor(e,n,r=()=>{}){this.threshold=e;this.windowMs=n;this.onRecover=r}threshold;windowMs;onRecover;failures=[];trippedAt=null;recordSuccess(){this.failures=[],this.trippedAt=null}recordFailure(){let e=Date.now();this.failures=this.failures.filter(n=>e-n<this.windowMs),this.failures.push(e),this.failures.length>=this.threshold&&(this.trippedAt=e)}isOpen(){return this.trippedAt===null?!1:Date.now()-this.trippedAt>=this.windowMs?(this.failures=[],this.trippedAt=null,this.onRecover(),!1):!0}getState(){return{open:this.isOpen(),failures:this.failures.length,trippedAt:this.trippedAt}}},R=class{parsed;agent;breaker;opts;cachedIdentity=null;probeInFlight=null;constructor(e){if(this.opts={endpoint:e.endpoint,token:e.token,model:e.model??T.model,expectedDim:e.expectedDim??T.expectedDim,connectTimeoutMs:e.connectTimeoutMs??T.connectTimeoutMs,requestTimeoutMs:e.requestTimeoutMs??T.requestTimeoutMs,failureThreshold:e.failureThreshold??T.failureThreshold,failureWindowMs:e.failureWindowMs??T.failureWindowMs,tlsOptions:e.tlsOptions},this.parsed=fe(e.endpoint),this.parsed.transport==="https"){let n=e.tlsOptions??{};this.agent=new _.Agent({keepAlive:!0,ca:n.ca,cert:n.cert,key:n.key,rejectUnauthorized:n.rejectUnauthorized!==!1,servername:n.servername})}else this.agent=new C.Agent({keepAlive:!0});this.breaker=new q(this.opts.failureThreshold,this.opts.failureWindowMs,()=>{this.cachedIdentity=null})}getSafeEndpoint(){return this.parsed.safeUrl}async embed(e){if(e.length===0)return[];if(this.breaker.isOpen())throw new Error(`[EmbedderEndpointClient] circuit breaker open for ${this.parsed.safeUrl} \u2014 fast-failing`);this.cachedIdentity===null&&await this.ensureProbed();try{let n=await this.postEmbeddings(e),r=this.decodeAndNormalize(n,e.length);return this.breaker.recordSuccess(),r}catch(n){throw this.breaker.recordFailure(),n}}async probe(){return this.probeInFlight?this.probeInFlight:(this.probeInFlight=this.doProbe().finally(()=>{this.probeInFlight=null}),this.probeInFlight)}async ensureProbed(){return this.cachedIdentity?this.cachedIdentity:this.probe()}async doProbe(){let e;try{let a=await this.postEmbeddings([me]);e=this.decodeAndNormalize(a,1)[0],this.breaker.recordSuccess()}catch(a){throw this.breaker.recordFailure(),a}if(!e||e.length!==this.opts.expectedDim)throw new Error(`[EmbedderEndpointClient] dim mismatch: expected ${this.opts.expectedDim}, got ${e?.length??0} from ${this.parsed.safeUrl}`);let n=Buffer.alloc(e.length*2);for(let a=0;a<e.length;a++){let i=Math.max(-32768,Math.min(32767,Math.round(e[a]*32767)));n.writeInt16LE(i,a*2)}let r=ce("sha256").update(n).digest("hex").slice(0,16);return this.cachedIdentity={dim:e.length,fingerprint:r,endpoint:this.parsed.safeUrl},this.cachedIdentity}getCachedIdentity(){return this.cachedIdentity}getBreakerState(){return this.breaker.getState()}close(){this.agent.destroy()}decodeAndNormalize(e,n){if(!e||typeof e!="object"||!Array.isArray(e.data))throw new Error("[EmbedderEndpointClient] response missing data array");let r=e.data;if(r.length!==n)throw new Error(`[EmbedderEndpointClient] response count mismatch: expected ${n}, got ${r.length}`);let a=r.map((i,s)=>({idx:typeof i.index=="number"?i.index:s,embedding:i.embedding}));return a.sort((i,s)=>i.idx-s.idx),a.map(({embedding:i},s)=>{if(typeof i=="string")throw new Error(`[EmbedderEndpointClient] received base64 embedding at position ${s} \u2014 server ignored encoding_format=float. Configure the server to return float arrays.`);if(!Array.isArray(i))throw new Error(`[EmbedderEndpointClient] missing embedding at position ${s}`);if(i.length!==this.opts.expectedDim)throw new Error(`[EmbedderEndpointClient] dim mismatch at position ${s}: expected ${this.opts.expectedDim}, got ${i.length}`);return G(i)})}postEmbeddings(e){let n=JSON.stringify({model:this.opts.model,input:e,encoding_format:"float"});return this.request(ue,n)}request(e,n){let r={"content-type":"application/json","content-length":Buffer.byteLength(n),accept:"application/json"};this.opts.token&&(r.authorization=`Bearer ${this.opts.token}`);let a={method:"POST",path:e,headers:r,agent:this.agent},i,s;this.parsed.transport==="unix"?(i={...a,socketPath:this.parsed.socketPath},s=C.request):(i={...a,host:this.parsed.host,port:this.parsed.port,protocol:this.parsed.protocol},s=this.parsed.transport==="https"?_.request:C.request);let o=this.parsed.safeUrl,l=this.opts.connectTimeoutMs,m=this.opts.requestTimeoutMs;return new Promise((b,$)=>{let y=!1,M=d=>{y||(y=!0,b(d))},h=d=>{y||(y=!0,$(d))},w=s(i,d=>{let g=[];d.on("data",u=>g.push(Buffer.from(u))),d.on("end",()=>{let u=Buffer.concat(g).toString("utf-8");if(!d.statusCode||d.statusCode<200||d.statusCode>=300){h(new Error(`[EmbedderEndpointClient] HTTP ${d.statusCode} from ${o}: ${u.slice(0,200)}`));return}try{let E=JSON.parse(u);M(E)}catch(E){h(new Error(`[EmbedderEndpointClient] invalid JSON from ${o}: ${E.message}`))}}),d.on("error",u=>h(u))});w.on("socket",d=>{d.setTimeout(l);let g=()=>{d.setTimeout(m)};d.connecting?d.once("connect",g):g(),d.on("timeout",()=>{let u=d.connecting?"connect":"request",E=d.connecting?l:m,S=new Error(`[EmbedderEndpointClient] ${u} timeout after ${E}ms`);h(S),w.destroy(S)})}),w.on("error",d=>h(d)),w.write(n),w.end()})}};pe();import{join as K,resolve as ge}from"node:path";import{existsSync as he,mkdirSync as Ee}from"node:fs";import{createRequire as be}from"node:module";var ye=be(import.meta.url);function we(){let t=process.env.AQE_MEMORY_PATH;return t&&t.length>0?t===":memory:"?t:ge(k(),t):K(k(),".agentic-qe","memory.db")}var Q="_system",Y="embedder_identity:",x=null,U=!1;function Z(){if(x)return x;if(U)return null;try{let t=ye("better-sqlite3"),e=we(),n=K(e,"..");he(n)||Ee(n,{recursive:!0});let r=new t(e);return r.pragma("journal_mode = WAL"),r.pragma("busy_timeout = 5000"),r.exec(`
|
|
3
3
|
CREATE TABLE IF NOT EXISTS kv_store (
|
|
4
4
|
key TEXT NOT NULL,
|
|
5
5
|
namespace TEXT NOT NULL,
|
|
@@ -10,4 +10,4 @@ import{b as G,d as z}from"./chunk-OVMG6EEF.js";import{a as F,e as le}from"./chun
|
|
|
10
10
|
);
|
|
11
11
|
CREATE INDEX IF NOT EXISTS idx_kv_namespace ON kv_store(namespace);
|
|
12
12
|
`),x=r,r}catch{return U=!0,null}}function ee(t){let e=Z();if(!e)return null;try{let n=e.prepare("SELECT value FROM kv_store WHERE namespace = ? AND key = ?").get(Q,Y+t);if(!n)return null;let r=JSON.parse(n.value);return!r.fingerprint||typeof r.dim!="number"?null:{fingerprint:r.fingerprint,dim:r.dim,endpoint:r.endpoint}}catch{return null}}function te(t){let e=Z();if(!e)return;let n={fingerprint:t.fingerprint,dim:t.dim,endpoint:t.endpoint,updatedAt:Date.now()};e.prepare("INSERT OR REPLACE INTO kv_store (key, namespace, value) VALUES (?, ?, ?)").run(Y+t.endpoint,Q,JSON.stringify(n))}function ne(){if(x)try{x.close()}catch{}x=null,U=!1}z();import{createHash as re}from"node:crypto";import{existsSync as ve,readFileSync as Ae,renameSync as Te,writeFileSync as xe}from"node:fs";var ie="aqe embedding-space compatibility canary v1";var I=class extends Error{constructor(n,r){super(`${n}: ${r}`);this.code=n;this.name="EmbeddingSpaceError"}code};function Se(t){return JSON.stringify({provider:t.provider,model:t.model,dimensions:t.dimensions,pooling:t.pooling??null,normalized:t.normalized,preprocessingVersion:t.preprocessingVersion??null,implementation:t.implementation??null,runtimeFingerprint:t.runtimeFingerprint})}function oe(t){let e=Buffer.alloc(t.length*2);for(let n=0;n<t.length;n++){let r=Math.max(-32768,Math.min(32767,Math.round(t[n]*32767)));e.writeInt16LE(r,n*2)}return re("sha256").update(e).digest("hex").slice(0,16)}function B(t){if(!t.runtimeFingerprint)throw new Error("Embedding space identity requires executable runtime evidence");let e=re("sha256").update("aqe:embedding-space:v1\0").update(Se(t)).digest("hex");return{...t,spaceId:e}}function Be(t,e){let n=[...new Set(t.flatMap(o=>o.spaceId?[o.spaceId]:[]))].sort(),r=t.filter(o=>!o.spaceId).length,a=e?t.filter(o=>o.spaceId===e).length:0,i=e?t.filter(o=>o.spaceId!==null&&o.spaceId!==e).length:t.length-r;return{status:r>0||!e?"unverified":i>0||n.length>1?"vector_space_mismatch":"healthy",activeSpaceId:e,storedSpaceIds:n,verifiedVectors:a,mismatchedVectors:i,unverifiedVectors:r}}function Ce(t){return`${t}.space.json`}function Ve(t,e,n){if(!e)throw new I("VECTOR_SPACE_UNVERIFIED",`cannot open ANN index ${t} without runtime provenance`);let r=Ce(t);if(ve(r)){let s;try{s=JSON.parse(Ae(r,"utf8"))}catch{throw new I("VECTOR_SPACE_UNVERIFIED",`ANN index manifest ${r} is unreadable`)}if(s.version!==1||!s.spaceId)throw new I("VECTOR_SPACE_UNVERIFIED",`ANN index manifest ${r} has no verified space`);if(s.spaceId!==e)throw new I("VECTOR_SPACE_MISMATCH",`ANN index space ${s.spaceId} != active space ${e}`);return}if(n>0)throw new I("VECTOR_SPACE_UNVERIFIED",`populated ANN index ${t} has no embedding-space manifest; rebuild required`);let a={version:1,spaceId:e},i=`${r}.${process.pid}.tmp`;xe(i,`${JSON.stringify(a)}
|
|
13
|
-
`,{encoding:"utf8",mode:384}),Te(i,r)}var V=null,f=null,N=null,O=!1,P="",v=null,p=null,A=null,H={modelName:"Xenova/all-MiniLM-L6-v2",quantized:!0,enableCache:!0,maxCacheSize:1e4,endpoint:process.env.AQE_EMBEDDER_ENDPOINT,endpointToken:process.env.AQE_EMBEDDER_TOKEN},c=new Map,se=36e5;function L(t){return p?`endpoint:${p.fingerprint}:${t}`:`inproc:${t}`}function ae(t){let e=t.trim();return!!(e.startsWith("{")&&/["']metrics["']/.test(e)||e.startsWith("[")&&e.endsWith("]")&&e.length>50||(e.match(/[a-zA-Z]/g)||[]).length/Math.max(e.length,1)<.3&&e.length>20)}async function W(t={}){if(O)throw new Error(`Transformer initialization previously failed: ${P}`);if(N)return N;let e={...H,...t};return N=(async()=>{try{if(e.endpoint){let l=J(e.endpoint);console.log(`[RealEmbeddings] Using external embedder endpoint: ${l}`),v=new R({endpoint:e.endpoint,token:e.endpointToken,model:e.modelName,expectedDim:D()}),p=await v.probe(),A=B({provider:"openai-compatible-endpoint",model:e.modelName,dimensions:p.dim,pooling:"mean",normalized:!0,preprocessingVersion:"aqe-text-v1",implementation:p.endpoint,runtimeFingerprint:p.fingerprint}),console.log(`[RealEmbeddings] Endpoint identity: dim=${p.dim} fingerprint=${p.fingerprint}`);try{let m=ee(p.endpoint);m&&m.fingerprint!==p.fingerprint&&console.warn(`[RealEmbeddings] WARNING: endpoint identity changed since last run. Previous fingerprint=${m.fingerprint} dim=${m.dim}, current fingerprint=${p.fingerprint} dim=${p.dim}. Vectors written before this change may no longer be comparable.`),te(p)}catch(m){console.warn(`[RealEmbeddings] Could not persist endpoint identity: ${F(m)}`)}f=Ne(v);return}let n;try{n=await import("./transformers-
|
|
13
|
+
`,{encoding:"utf8",mode:384}),Te(i,r)}var V=null,f=null,N=null,O=!1,P="",v=null,p=null,A=null,H={modelName:"Xenova/all-MiniLM-L6-v2",quantized:!0,enableCache:!0,maxCacheSize:1e4,endpoint:process.env.AQE_EMBEDDER_ENDPOINT,endpointToken:process.env.AQE_EMBEDDER_TOKEN},c=new Map,se=36e5;function L(t){return p?`endpoint:${p.fingerprint}:${t}`:`inproc:${t}`}function ae(t){let e=t.trim();return!!(e.startsWith("{")&&/["']metrics["']/.test(e)||e.startsWith("[")&&e.endsWith("]")&&e.length>50||(e.match(/[a-zA-Z]/g)||[]).length/Math.max(e.length,1)<.3&&e.length>20)}async function W(t={}){if(O)throw new Error(`Transformer initialization previously failed: ${P}`);if(N)return N;let e={...H,...t};return N=(async()=>{try{if(e.endpoint){let l=J(e.endpoint);console.log(`[RealEmbeddings] Using external embedder endpoint: ${l}`),v=new R({endpoint:e.endpoint,token:e.endpointToken,model:e.modelName,expectedDim:D()}),p=await v.probe(),A=B({provider:"openai-compatible-endpoint",model:e.modelName,dimensions:p.dim,pooling:"mean",normalized:!0,preprocessingVersion:"aqe-text-v1",implementation:p.endpoint,runtimeFingerprint:p.fingerprint}),console.log(`[RealEmbeddings] Endpoint identity: dim=${p.dim} fingerprint=${p.fingerprint}`);try{let m=ee(p.endpoint);m&&m.fingerprint!==p.fingerprint&&console.warn(`[RealEmbeddings] WARNING: endpoint identity changed since last run. Previous fingerprint=${m.fingerprint} dim=${m.dim}, current fingerprint=${p.fingerprint} dim=${p.dim}. Vectors written before this change may no longer be comparable.`),te(p)}catch(m){console.warn(`[RealEmbeddings] Could not persist endpoint identity: ${F(m)}`)}f=Ne(v);return}let n;try{n=await import("./transformers-IEO25W5V.js")}catch{throw new Error('In-process embeddings require the optional package "@huggingface/transformers", which is not installed. Configure an embedding endpoint (EmbeddingConfig.endpoint / AQE_EMBEDDER_ENDPOINT) so no local model is loaded. Installing @huggingface/transformers@4.2.0 is an explicit security opt-in: its compatible dependency chain currently has unresolved HIGH advisories GHSA-xcpc-8h2w-3j85 and GHSA-f88m-g3jw-g9cj.')}V=n.pipeline,console.log(`[RealEmbeddings] Loading model: ${e.modelName}`);let r=performance.now();f=await V("feature-extraction",e.modelName,{quantized:e.quantized});let a=f;if(!a)throw new Error("Transformer pipeline returned no embedding model");let i=await a(ie,{pooling:"mean",normalize:!0}),s=Array.from(i.data);A=B({provider:"huggingface-transformers",model:e.modelName,dimensions:s.length,pooling:"mean",normalized:!0,preprocessingVersion:"aqe-text-v1",implementation:`transformers:${e.quantized?"quantized":"full"}`,runtimeFingerprint:oe(s)});let o=performance.now()-r;console.log(`[RealEmbeddings] Model loaded in ${o.toFixed(0)}ms`)}catch(n){throw O=!0,P=F(n),new Error(`Failed to initialize transformer model: ${P}`)}})(),N}function Ne(t){return async e=>{let n=Array.isArray(e)?e:[e],r=await t.embed(n),a=r[0]?.length??D(),i=new Float32Array(n.length*a);for(let s=0;s<r.length;s++)i.set(r[s],s*a);return{data:i,dims:[n.length,a]}}}async function Xe(t,e={}){let n={...H,...e};if(ae(t))return new Array(D()).fill(0);if(f||await W(e),!f)throw new Error("Embedding model failed to initialize");let r=L(t);if(n.enableCache){let l=c.get(r);if(l&&Date.now()-l.timestamp<se)return l.embedding}let a=performance.now(),i=await f(t,{pooling:"mean",normalize:!0}),s=Array.from(i.data),o=performance.now()-a;if(o>500&&console.warn(`[RealEmbeddings] Slow embedding computation: ${o.toFixed(1)}ms for "${t.slice(0,50)}..."`),n.enableCache){if(c.size>=n.maxCacheSize){let l=c.keys().next().value;l&&c.delete(l)}c.set(r,{embedding:s,timestamp:Date.now()})}return s}async function Je(t,e={}){let n={...H,...e},r=[],a=[],i=new Array(t.length).fill(null),s=[];for(let o=0;o<t.length;o++)ae(t[o])?i[o]=new Array(D()).fill(0):s.push(o);if(s.length===0)return i;if(f||await W(e),!f)throw new Error("Embedding model failed to initialize");if(n.enableCache)for(let o of s){let l=c.get(L(t[o]));l&&Date.now()-l.timestamp<se?i[o]=l.embedding:(r.push(t[o]),a.push(o))}else for(let o of s)r.push(t[o]),a.push(o);if(r.length>0){let o=performance.now(),l=32;for(let b=0;b<r.length;b+=l){let $=Math.min(b+l,r.length),y=r.slice(b,$),M=await f(y,{pooling:"mean",normalize:!0}),h=M.dims||[y.length,384],w=h[0],d=h[1];for(let g=0;g<w;g++){let u=g*d,E=Array.from(M.data.slice(u,u+d)),S=b+g,de=a[S];if(i[de]=E,n.enableCache){if(c.size>=n.maxCacheSize){let j=c.keys().next().value;j&&c.delete(j)}c.set(L(r[S]),{embedding:E,timestamp:Date.now()})}}}let m=performance.now()-o;console.log(`[RealEmbeddings] Batch computed ${r.length} embeddings in ${m.toFixed(0)}ms`)}return i.filter(o=>o!==null)}function Ke(){c.clear(),console.log("[RealEmbeddings] Cache cleared")}function Qe(){return{size:c.size,hitRate:0}}function Ye(){return!O&&f!==null}function D(){return 384}function Ze(){V=null,f=null,N=null,O=!1,P="",c.clear(),v&&v.close(),v=null,p=null,A=null,ne()}function et(){return v!==null}function tt(){return p}function nt(){return A}async function rt(){if(A)return A;let t=process.env.AQE_EMBEDDER_ENDPOINT;return t?(await W({endpoint:t,endpointToken:process.env.AQE_EMBEDDER_TOKEN}),A):null}export{ie as a,Be as b,Ve as c,H as d,Xe as e,Je as f,Ke as g,Qe as h,Ye as i,D as j,Ze as k,et as l,tt as m,nt as n,rt as o};
|
|
@@ -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.
|
|
2
|
-
import{l as c,o as d,s as f}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.0");process.exit(0)}
|
|
2
|
+
import{l as c,o as d,s as f}from"./chunk-XZDPR6I2.js";import{a as r,e as p}from"./chunk-HOPXHZA3.js";import{a as h}from"./chunk-AIE6OKCD.js";import{e as l}from"./chunk-OYVDTD3A.js";f();p();h();import*as m from"path";var u=l.create("hybrid-backend"),s=class{unifiedMemory=null;config;cleanupInterval;cleanupCount=0;initialized=!1;constructor(e){this.config={sqlite:{path:e?.sqlite?.path??".agentic-qe/memory.db",walMode:e?.sqlite?.walMode??!0,poolSize:e?.sqlite?.poolSize??5,busyTimeout:e?.sqlite?.busyTimeout??r.BUSY_TIMEOUT_MS,...e?.sqlite},agentdb:{path:e?.agentdb?.path??".agentic-qe/memory.db",...e?.agentdb},enableFallback:e?.enableFallback??!0,defaultNamespace:e?.defaultNamespace??"default",cleanupInterval:e?.cleanupInterval??r.CLEANUP_INTERVAL_MS}}async initialize(e){if(this.initialized)return;let i=e?.signal;i?.throwIfAborted();let t={dbPath:this.config.sqlite.path??c.dbPath,walMode:this.config.sqlite.walMode??!0,busyTimeout:this.config.sqlite.busyTimeout??r.BUSY_TIMEOUT_MS};this.unifiedMemory=d(t),i?.throwIfAborted(),await this.unifiedMemory.initialize({signal:i}),i?.throwIfAborted(),this.cleanupInterval=setInterval(()=>this.cleanup(),this.config.cleanupInterval),this.cleanupInterval.unref&&this.cleanupInterval.unref(),this.initialized=!0,console.log(`[HybridBackend] Initialized with unified memory: ${this.unifiedMemory.getDbPath()}`)}async dispose(){this.cleanupInterval&&clearInterval(this.cleanupInterval),this.initialized=!1}async set(e,i,t){this.ensureInitialized();let n=t?.namespace??this.config.defaultNamespace;await this.unifiedMemory.kvSet(e,i,n,t?.ttl)}async get(e,i){this.ensureInitialized();let t=i?.namespace??this.config.defaultNamespace;return this.unifiedMemory.kvGet(e,t)}async delete(e,i){this.ensureInitialized();let t=i?.namespace??this.config.defaultNamespace,n=await this.unifiedMemory.kvDelete(e,t),a=await this.unifiedMemory.vectorDelete(e);return n||a}async has(e,i){this.ensureInitialized();let t=i?.namespace??this.config.defaultNamespace;return this.unifiedMemory.kvExists(e,t)}async search(e,i=100,t){this.ensureInitialized();let n=t?.namespace??this.config.defaultNamespace;return this.unifiedMemory.kvSearch(e,n,i)}async vectorSearch(e,i,t){return this.ensureInitialized(),(await this.unifiedMemory.vectorSearch(e,i,void 0,t)).map(a=>({key:a.id,score:a.score,metadata:a.metadata}))}getVectorSearchProvenance(){return this.ensureInitialized(),this.unifiedMemory.getVectorSearchProvenance()}async storeVector(e,i,t){this.ensureInitialized(),await this.unifiedMemory.vectorStore(e,i,this.config.defaultNamespace,t)}getHealth(){return{sqlite:this.unifiedMemory?.isInitialized()?"healthy":"unavailable",sqlitePersistent:!0,agentdb:this.unifiedMemory?.isInitialized()?"healthy":"unavailable",fallback:"inactive"}}isPersistent(){return this.unifiedMemory?.isInitialized()??!1}getConfig(){return{...this.config}}async setWithBackend(e,i,t,n){await this.set(e,i,n)}async getVectorStats(){if(!this.unifiedMemory?.isInitialized())return null;let e=await this.unifiedMemory.vectorCount(),i=this.unifiedMemory.getStats();return{vectorCount:e,indexSize:i.vectorIndexSize}}getUnifiedMemory(){return this.unifiedMemory}async count(e){return this.ensureInitialized(),this.unifiedMemory.getDatabase().prepare(`
|
|
3
3
|
SELECT COUNT(*) as count FROM kv_store
|
|
4
4
|
WHERE namespace LIKE ?
|
|
5
5
|
AND (expires_at IS NULL OR expires_at > ?)
|
|
@@ -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.
|
|
2
|
-
import{a as T}from"./chunk-U64QORFO.js";import{e as g}from"./chunk-J5HTQHJK.js";import{S,b as l}from"./chunk-R6I5I724.js";T();S();import{createRequire as B}from"module";var G=B(import.meta.url),d=class{validateTransfer(e,t){return{approved:!0}}};function R(){if(l().useCoherenceGate)try{let{CoherenceGate:o}=G("./coherence-gate.js");return new o}catch{}return new d}T();var x=g.create("transfer-verification"),A={maxSourceRegression:.05,minTargetImprovement:0,maxSourceConfidenceRegression:.1},b=class{config;constructor(e={}){this.config={...A,...e}}verifyTransfer(e){let t=e.sourcePerformanceAfter.successRate-e.sourcePerformanceBefore.successRate,r=e.targetPerformanceAfter.successRate-e.targetPerformanceBefore.successRate,n=e.sourcePerformanceAfter.avgConfidence-e.sourcePerformanceBefore.avgConfidence,a=e.targetPerformanceAfter.avgConfidence-e.targetPerformanceBefore.avgConfidence,s=t>=-this.config.maxSourceRegression&&n>=-this.config.maxSourceConfidenceRegression,c=r>=this.config.minTargetImprovement,u=s&&c,m;if(!u){let i=[];s||i.push(`source domain regressed: successRate delta=${t.toFixed(4)}, confidence delta=${n.toFixed(4)}`),c||i.push(`target domain did not improve: successRate delta=${r.toFixed(4)}`),m=i.join("; ")}return u?x.debug("Transfer verification passed",{transferId:e.transferId,sourceDelta:t,targetDelta:r}):x.warn("Transfer verification failed",{transferId:e.transferId,sourceDomain:e.sourceDomain,targetDomain:e.targetDomain,sourceDelta:t,targetDelta:r,failureReason:m}),{passed:u,sourceStable:s,targetImproved:c,sourceDelta:t,targetDelta:r,sourceConfidenceDelta:n,targetConfidenceDelta:a,failureReason:m}}getConfig(){return{...this.config}}};function M(o){return new b(o)}S();var p=class{alphas=new Map;betas=new Map;sample(e){let t=this.alphas.get(e)??1,r=this.betas.get(e)??1;return this.sampleBeta(t,r)}update(e,t){t?this.alphas.set(e,(this.alphas.get(e)??1)+1):this.betas.set(e,(this.betas.get(e)??1)+1)}getMean(e){let t=this.alphas.get(e)??1,r=this.betas.get(e)??1;return t/(t+r)}getObservationCount(e){let t=this.alphas.get(e)??1,r=this.betas.get(e)??1;return t-1+(r-1)}getAlpha(e){return this.alphas.get(e)??1}getBeta(e){return this.betas.get(e)??1}sampleBeta(e,t){let r=this.sampleGamma(e),n=this.sampleGamma(t);return r+n===0?.5:r/(r+n)}sampleGamma(e){if(e<1){let n=Math.random();return this.sampleGamma(e+1)*Math.pow(n,1/e)}let t=e-1/3,r=1/Math.sqrt(9*t);for(;;){let n,a;do n=this.standardNormal(),a=1+r*n;while(a<=0);a=a*a*a;let s=Math.random();if(s<1-.0331*n*n*n*n||Math.log(s)<.5*n*n+t*(1-a+Math.log(a)))return t*a}}standardNormal(){let e=Math.random(),t=Math.random();return Math.sqrt(-2*Math.log(e||1e-10))*Math.cos(2*Math.PI*t)}};var I={threshold:5,slack:.5,resetOnAlarm:!0,warmupSamples:20},h=class{config;states=new Map;constructor(e={}){this.config={...I,...e}}update(e,t){let r=this.getOrCreateState(e);if(r.samplesSinceReset++,r.mu===null)return r.warmupSum+=t,r.warmupCount++,r.warmupCount>=this.config.warmupSamples&&(r.mu=r.warmupSum/r.warmupCount),{driftDetected:!1,cumulativeSum:0,direction:"none",samplesSinceReset:r.samplesSinceReset};r.sPlus=Math.max(0,r.sPlus+(t-r.mu-this.config.slack)),r.sMinus=Math.max(0,r.sMinus+(-t+r.mu-this.config.slack));let n=Math.max(r.sPlus,r.sMinus),a=!1,s="none";r.sPlus>this.config.threshold?(a=!0,s="positive"):r.sMinus>this.config.threshold&&(a=!0,s="negative");let c={driftDetected:a,cumulativeSum:n,direction:s,samplesSinceReset:r.samplesSinceReset};return a&&this.config.resetOnAlarm&&(r.sPlus=0,r.sMinus=0,r.samplesSinceReset=0),c}reset(e){e?this.states.delete(e):this.states.clear()}getState(e){let t=this.states.get(e);if(!t)return{driftDetected:!1,cumulativeSum:0,direction:"none",samplesSinceReset:0};let r=Math.max(t.sPlus,t.sMinus),n="none";return t.sPlus>this.config.threshold?n="positive":t.sMinus>this.config.threshold&&(n="negative"),{driftDetected:t.sPlus>this.config.threshold||t.sMinus>this.config.threshold,cumulativeSum:r,direction:n,samplesSinceReset:t.samplesSinceReset}}getOrCreateState(e){let t=this.states.get(e);return t||(t={sPlus:0,sMinus:0,samplesSinceReset:0,warmupSum:0,warmupCount:0,mu:null},this.states.set(e,t)),t}};var w=g.create("domain-transfer"),V={minTransferProbability:.3,explorationWarmup:5,verification:{},maxHistorySize:1e3,useMetaLearningEnhancements:!0},v=class{constructor(e=100){this.decayThreshold=e}decayThreshold;getDecayMultiplier(e){return e<=0?1:Math.pow(.5,e/this.decayThreshold)}applyDecay(e,t,r){return t+(e-t)*this.getDecayMultiplier(r)}},y=class{cusum;outcomes=[];windowSize;constructor(e=20){this.windowSize=e,this.cusum=new h({threshold:3,slack:.1,resetOnAlarm:!1,warmupSamples:Math.min(10,Math.floor(e/2))})}record(e){this.outcomes.push(e),this.outcomes.length>this.windowSize*2&&this.outcomes.splice(0,this.outcomes.length-this.windowSize*2);let t=this.getCurrentRate();this.cusum.update("learn",t)}isPlateaued(){return this.outcomes.length<this.windowSize?!1:!this.cusum.getState("learn").driftDetected}getCurrentRate(){if(this.outcomes.length===0)return 0;let e=this.outcomes.slice(-this.windowSize);return e.filter(Boolean).length/e.length}getOutcomeCount(){return this.outcomes.length}getCusumState(){return this.cusum.getState("learn")}},D=class{front=[];dominates(e,t){let r=e.successRate>=t.successRate&&e.speed>=t.speed&&e.confidence>=t.confidence,n=e.successRate>t.successRate||e.speed>t.speed||e.confidence>t.confidence;return r&&n}add(e){for(let t=this.front.length-1;t>=0;t--)this.dominates(e,this.front[t])&&this.front.splice(t,1);this.front.some(t=>this.dominates(t,e))||this.front.push(e)}getFront(){return[...this.front]}isNonDominated(e){return!this.front.some(t=>this.dominates(t,e))}},C=class{constructor(e=.2){this.bonusScale=e}bonusScale;triedPairs=new Set;markTried(e){this.triedPairs.add(e)}isTried(e){return this.triedPairs.has(e)}getBonus(e){return this.triedPairs.has(e)?0:this.bonusScale}apply(e,t){return Math.min(1,e+this.getBonus(t))}getTriedCount(){return this.triedPairs.size}},P=class{config;sampler;verifier;coherenceGate;transferHistory=[];affinityScores=new Map;performanceProvider=null;transferExecutor=null;nativeModule=null;decayingBeta;plateauDetector;paretoFront;curiosityBonus;constructor(e={}){this.config={...V,...e},this.sampler=new p,this.verifier=M(this.config.verification),this.coherenceGate=R(),this.decayingBeta=new v,this.plateauDetector=new y,this.paretoFront=new D,this.curiosityBonus=new C,this.tryLoadNativeModule()}evaluateTransfer(e,t){if(!this.isEnabled())return this.createRejectedCandidate(e,t);let r=this.makePairKey(e,t),n=this.sampler.sample(r),s=this.sampler.getObservationCount(r)<this.config.explorationWarmup,c=this.getAffinityScore(e,t);if(this.isMetaLearningEnabled()){let u=this.sampler.getMean(r),m=this.sampler.getAlpha(r)-1;n=this.decayingBeta.applyDecay(n,u,m),n=this.curiosityBonus.apply(n,r)}return{sourceDomain:e,targetDomain:t,sampledProbability:n,affinityScore:c,isExploration:s,pairKey:r}}executeTransfer(e){let t=`transfer-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,r=this.coherenceGate.validateTransfer({domain:e.sourceDomain},e.targetDomain);if(!r.approved)return w.info("Transfer blocked by coherence gate",{transferId:t,source:e.sourceDomain,target:e.targetDomain,reason:r.rejectionReason}),this.createBlockedResult(t,e,r);let n=this.getPerformanceSnapshot(e.sourceDomain),a=this.getPerformanceSnapshot(e.targetDomain),s=this.computeSqrtDampening(e),c=this.doTransfer(e.sourceDomain,e.targetDomain,s),u=this.getPerformanceSnapshot(e.sourceDomain),m=this.getPerformanceSnapshot(e.targetDomain),i=this.verifier.verifyTransfer({transferId:t,sourceDomain:e.sourceDomain,targetDomain:e.targetDomain,sourcePerformanceBefore:n,sourcePerformanceAfter:u,targetPerformanceBefore:a,targetPerformanceAfter:m}),f=c&&i.passed;if(this.sampler.update(e.pairKey,f),this.updateAffinityScore(e.pairKey,f),this.isMetaLearningEnabled()){this.plateauDetector.record(f),this.curiosityBonus.markTried(e.pairKey);let F=this.sampler.getMean(e.pairKey);this.paretoFront.add({pairKey:e.pairKey,successRate:F,speed:1/(1+s),confidence:this.getAffinityScore(e.sourceDomain,e.targetDomain)})}return this.addToHistory({transferId:t,sourceDomain:e.sourceDomain,targetDomain:e.targetDomain,success:f,sampledProbability:e.sampledProbability,dampeningFactor:s,sourceDelta:i.sourceDelta,targetDelta:i.targetDelta,timestamp:Date.now()}),w.info("Transfer completed",{transferId:t,source:e.sourceDomain,target:e.targetDomain,success:f,dampeningFactor:s.toFixed(4),sourceDelta:i.sourceDelta.toFixed(4),targetDelta:i.targetDelta.toFixed(4)}),{transferId:t,candidate:e,success:f,dampeningFactor:s,verification:i,coherenceResult:r,sourcePerformanceBefore:n,sourcePerformanceAfter:u,targetPerformanceBefore:a,targetPerformanceAfter:m,timestamp:Date.now()}}getAffinityScore(e,t){return this.affinityScores.get(this.makePairKey(e,t))??.5}getTransferHistory(){return[...this.transferHistory]}getExpectedSuccessRate(e,t){return this.sampler.getMean(this.makePairKey(e,t))}getObservationCount(e,t){return this.sampler.getObservationCount(this.makePairKey(e,t))}setPerformanceProvider(e){this.performanceProvider=e}setTransferExecutor(e){this.transferExecutor=e}getSampler(){return this.sampler}getCoherenceGate(){return this.coherenceGate}getDecayingBeta(){return this.decayingBeta}getPlateauDetector(){return this.plateauDetector}getParetoFront(){return this.paretoFront}getCuriosityBonus(){return this.curiosityBonus}isLearningPlateaued(){return this.plateauDetector.isPlateaued()}isEnabled(){return l().useCrossDomainTransfer===!0}isMetaLearningEnabled(){return this.config.useMetaLearningEnhancements===!0&&l().useMetaLearningEnhancements!==!1}makePairKey(e,t){return`${e}->${t}`}computeSqrtDampening(e){let t=this.sampler.getObservationCount(e.pairKey);return Math.sqrt(t/(t+this.config.explorationWarmup))}doTransfer(e,t,r){return this.transferExecutor?this.transferExecutor(e,t,r):!0}getPerformanceSnapshot(e){return this.performanceProvider?this.performanceProvider(e):{domain:e,successRate:.5,avgConfidence:.5,patternCount:0,timestamp:Date.now()}}updateAffinityScore(e,t){let r=this.affinityScores.get(e)??.5;this.affinityScores.set(e,.2*(t?1:0)+.8*r)}addToHistory(e){for(this.transferHistory.push(e);this.transferHistory.length>this.config.maxHistorySize;)this.transferHistory.shift()}createBlockedResult(e,t,r){let n={domain:"",successRate:0,avgConfidence:0,patternCount:0,timestamp:Date.now()};return{transferId:e,candidate:t,success:!1,dampeningFactor:0,verification:{passed:!1,sourceStable:!1,targetImproved:!1,sourceDelta:0,targetDelta:0,sourceConfidenceDelta:0,targetConfidenceDelta:0,failureReason:`Coherence gate rejected: ${r.rejectionReason??"unknown"}`},coherenceResult:r,sourcePerformanceBefore:{...n,domain:t.sourceDomain},sourcePerformanceAfter:{...n,domain:t.sourceDomain},targetPerformanceBefore:{...n,domain:t.targetDomain},targetPerformanceAfter:{...n,domain:t.targetDomain},timestamp:Date.now()}}createRejectedCandidate(e,t){return{sourceDomain:e,targetDomain:t,sampledProbability:0,affinityScore:0,isExploration:!1,pairKey:this.makePairKey(e,t)}}tryLoadNativeModule(){this.nativeModule=null}};function J(o){return new P(o)}export{p as a,h as b,V as c,v as d,y as e,D as f,C as g,P as h,J as i};
|
|
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.0");process.exit(0)}
|
|
2
|
+
import{a as T}from"./chunk-AIE6OKCD.js";import{e as g}from"./chunk-OYVDTD3A.js";import{S,b as l}from"./chunk-URUOTHPO.js";T();S();import{createRequire as B}from"module";var G=B(import.meta.url),d=class{validateTransfer(e,t){return{approved:!0}}};function R(){if(l().useCoherenceGate)try{let{CoherenceGate:o}=G("./coherence-gate.js");return new o}catch{}return new d}T();var x=g.create("transfer-verification"),A={maxSourceRegression:.05,minTargetImprovement:0,maxSourceConfidenceRegression:.1},b=class{config;constructor(e={}){this.config={...A,...e}}verifyTransfer(e){let t=e.sourcePerformanceAfter.successRate-e.sourcePerformanceBefore.successRate,r=e.targetPerformanceAfter.successRate-e.targetPerformanceBefore.successRate,n=e.sourcePerformanceAfter.avgConfidence-e.sourcePerformanceBefore.avgConfidence,a=e.targetPerformanceAfter.avgConfidence-e.targetPerformanceBefore.avgConfidence,s=t>=-this.config.maxSourceRegression&&n>=-this.config.maxSourceConfidenceRegression,c=r>=this.config.minTargetImprovement,u=s&&c,m;if(!u){let i=[];s||i.push(`source domain regressed: successRate delta=${t.toFixed(4)}, confidence delta=${n.toFixed(4)}`),c||i.push(`target domain did not improve: successRate delta=${r.toFixed(4)}`),m=i.join("; ")}return u?x.debug("Transfer verification passed",{transferId:e.transferId,sourceDelta:t,targetDelta:r}):x.warn("Transfer verification failed",{transferId:e.transferId,sourceDomain:e.sourceDomain,targetDomain:e.targetDomain,sourceDelta:t,targetDelta:r,failureReason:m}),{passed:u,sourceStable:s,targetImproved:c,sourceDelta:t,targetDelta:r,sourceConfidenceDelta:n,targetConfidenceDelta:a,failureReason:m}}getConfig(){return{...this.config}}};function M(o){return new b(o)}S();var p=class{alphas=new Map;betas=new Map;sample(e){let t=this.alphas.get(e)??1,r=this.betas.get(e)??1;return this.sampleBeta(t,r)}update(e,t){t?this.alphas.set(e,(this.alphas.get(e)??1)+1):this.betas.set(e,(this.betas.get(e)??1)+1)}getMean(e){let t=this.alphas.get(e)??1,r=this.betas.get(e)??1;return t/(t+r)}getObservationCount(e){let t=this.alphas.get(e)??1,r=this.betas.get(e)??1;return t-1+(r-1)}getAlpha(e){return this.alphas.get(e)??1}getBeta(e){return this.betas.get(e)??1}sampleBeta(e,t){let r=this.sampleGamma(e),n=this.sampleGamma(t);return r+n===0?.5:r/(r+n)}sampleGamma(e){if(e<1){let n=Math.random();return this.sampleGamma(e+1)*Math.pow(n,1/e)}let t=e-1/3,r=1/Math.sqrt(9*t);for(;;){let n,a;do n=this.standardNormal(),a=1+r*n;while(a<=0);a=a*a*a;let s=Math.random();if(s<1-.0331*n*n*n*n||Math.log(s)<.5*n*n+t*(1-a+Math.log(a)))return t*a}}standardNormal(){let e=Math.random(),t=Math.random();return Math.sqrt(-2*Math.log(e||1e-10))*Math.cos(2*Math.PI*t)}};var I={threshold:5,slack:.5,resetOnAlarm:!0,warmupSamples:20},h=class{config;states=new Map;constructor(e={}){this.config={...I,...e}}update(e,t){let r=this.getOrCreateState(e);if(r.samplesSinceReset++,r.mu===null)return r.warmupSum+=t,r.warmupCount++,r.warmupCount>=this.config.warmupSamples&&(r.mu=r.warmupSum/r.warmupCount),{driftDetected:!1,cumulativeSum:0,direction:"none",samplesSinceReset:r.samplesSinceReset};r.sPlus=Math.max(0,r.sPlus+(t-r.mu-this.config.slack)),r.sMinus=Math.max(0,r.sMinus+(-t+r.mu-this.config.slack));let n=Math.max(r.sPlus,r.sMinus),a=!1,s="none";r.sPlus>this.config.threshold?(a=!0,s="positive"):r.sMinus>this.config.threshold&&(a=!0,s="negative");let c={driftDetected:a,cumulativeSum:n,direction:s,samplesSinceReset:r.samplesSinceReset};return a&&this.config.resetOnAlarm&&(r.sPlus=0,r.sMinus=0,r.samplesSinceReset=0),c}reset(e){e?this.states.delete(e):this.states.clear()}getState(e){let t=this.states.get(e);if(!t)return{driftDetected:!1,cumulativeSum:0,direction:"none",samplesSinceReset:0};let r=Math.max(t.sPlus,t.sMinus),n="none";return t.sPlus>this.config.threshold?n="positive":t.sMinus>this.config.threshold&&(n="negative"),{driftDetected:t.sPlus>this.config.threshold||t.sMinus>this.config.threshold,cumulativeSum:r,direction:n,samplesSinceReset:t.samplesSinceReset}}getOrCreateState(e){let t=this.states.get(e);return t||(t={sPlus:0,sMinus:0,samplesSinceReset:0,warmupSum:0,warmupCount:0,mu:null},this.states.set(e,t)),t}};var w=g.create("domain-transfer"),V={minTransferProbability:.3,explorationWarmup:5,verification:{},maxHistorySize:1e3,useMetaLearningEnhancements:!0},v=class{constructor(e=100){this.decayThreshold=e}decayThreshold;getDecayMultiplier(e){return e<=0?1:Math.pow(.5,e/this.decayThreshold)}applyDecay(e,t,r){return t+(e-t)*this.getDecayMultiplier(r)}},y=class{cusum;outcomes=[];windowSize;constructor(e=20){this.windowSize=e,this.cusum=new h({threshold:3,slack:.1,resetOnAlarm:!1,warmupSamples:Math.min(10,Math.floor(e/2))})}record(e){this.outcomes.push(e),this.outcomes.length>this.windowSize*2&&this.outcomes.splice(0,this.outcomes.length-this.windowSize*2);let t=this.getCurrentRate();this.cusum.update("learn",t)}isPlateaued(){return this.outcomes.length<this.windowSize?!1:!this.cusum.getState("learn").driftDetected}getCurrentRate(){if(this.outcomes.length===0)return 0;let e=this.outcomes.slice(-this.windowSize);return e.filter(Boolean).length/e.length}getOutcomeCount(){return this.outcomes.length}getCusumState(){return this.cusum.getState("learn")}},D=class{front=[];dominates(e,t){let r=e.successRate>=t.successRate&&e.speed>=t.speed&&e.confidence>=t.confidence,n=e.successRate>t.successRate||e.speed>t.speed||e.confidence>t.confidence;return r&&n}add(e){for(let t=this.front.length-1;t>=0;t--)this.dominates(e,this.front[t])&&this.front.splice(t,1);this.front.some(t=>this.dominates(t,e))||this.front.push(e)}getFront(){return[...this.front]}isNonDominated(e){return!this.front.some(t=>this.dominates(t,e))}},C=class{constructor(e=.2){this.bonusScale=e}bonusScale;triedPairs=new Set;markTried(e){this.triedPairs.add(e)}isTried(e){return this.triedPairs.has(e)}getBonus(e){return this.triedPairs.has(e)?0:this.bonusScale}apply(e,t){return Math.min(1,e+this.getBonus(t))}getTriedCount(){return this.triedPairs.size}},P=class{config;sampler;verifier;coherenceGate;transferHistory=[];affinityScores=new Map;performanceProvider=null;transferExecutor=null;nativeModule=null;decayingBeta;plateauDetector;paretoFront;curiosityBonus;constructor(e={}){this.config={...V,...e},this.sampler=new p,this.verifier=M(this.config.verification),this.coherenceGate=R(),this.decayingBeta=new v,this.plateauDetector=new y,this.paretoFront=new D,this.curiosityBonus=new C,this.tryLoadNativeModule()}evaluateTransfer(e,t){if(!this.isEnabled())return this.createRejectedCandidate(e,t);let r=this.makePairKey(e,t),n=this.sampler.sample(r),s=this.sampler.getObservationCount(r)<this.config.explorationWarmup,c=this.getAffinityScore(e,t);if(this.isMetaLearningEnabled()){let u=this.sampler.getMean(r),m=this.sampler.getAlpha(r)-1;n=this.decayingBeta.applyDecay(n,u,m),n=this.curiosityBonus.apply(n,r)}return{sourceDomain:e,targetDomain:t,sampledProbability:n,affinityScore:c,isExploration:s,pairKey:r}}executeTransfer(e){let t=`transfer-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,r=this.coherenceGate.validateTransfer({domain:e.sourceDomain},e.targetDomain);if(!r.approved)return w.info("Transfer blocked by coherence gate",{transferId:t,source:e.sourceDomain,target:e.targetDomain,reason:r.rejectionReason}),this.createBlockedResult(t,e,r);let n=this.getPerformanceSnapshot(e.sourceDomain),a=this.getPerformanceSnapshot(e.targetDomain),s=this.computeSqrtDampening(e),c=this.doTransfer(e.sourceDomain,e.targetDomain,s),u=this.getPerformanceSnapshot(e.sourceDomain),m=this.getPerformanceSnapshot(e.targetDomain),i=this.verifier.verifyTransfer({transferId:t,sourceDomain:e.sourceDomain,targetDomain:e.targetDomain,sourcePerformanceBefore:n,sourcePerformanceAfter:u,targetPerformanceBefore:a,targetPerformanceAfter:m}),f=c&&i.passed;if(this.sampler.update(e.pairKey,f),this.updateAffinityScore(e.pairKey,f),this.isMetaLearningEnabled()){this.plateauDetector.record(f),this.curiosityBonus.markTried(e.pairKey);let F=this.sampler.getMean(e.pairKey);this.paretoFront.add({pairKey:e.pairKey,successRate:F,speed:1/(1+s),confidence:this.getAffinityScore(e.sourceDomain,e.targetDomain)})}return this.addToHistory({transferId:t,sourceDomain:e.sourceDomain,targetDomain:e.targetDomain,success:f,sampledProbability:e.sampledProbability,dampeningFactor:s,sourceDelta:i.sourceDelta,targetDelta:i.targetDelta,timestamp:Date.now()}),w.info("Transfer completed",{transferId:t,source:e.sourceDomain,target:e.targetDomain,success:f,dampeningFactor:s.toFixed(4),sourceDelta:i.sourceDelta.toFixed(4),targetDelta:i.targetDelta.toFixed(4)}),{transferId:t,candidate:e,success:f,dampeningFactor:s,verification:i,coherenceResult:r,sourcePerformanceBefore:n,sourcePerformanceAfter:u,targetPerformanceBefore:a,targetPerformanceAfter:m,timestamp:Date.now()}}getAffinityScore(e,t){return this.affinityScores.get(this.makePairKey(e,t))??.5}getTransferHistory(){return[...this.transferHistory]}getExpectedSuccessRate(e,t){return this.sampler.getMean(this.makePairKey(e,t))}getObservationCount(e,t){return this.sampler.getObservationCount(this.makePairKey(e,t))}setPerformanceProvider(e){this.performanceProvider=e}setTransferExecutor(e){this.transferExecutor=e}getSampler(){return this.sampler}getCoherenceGate(){return this.coherenceGate}getDecayingBeta(){return this.decayingBeta}getPlateauDetector(){return this.plateauDetector}getParetoFront(){return this.paretoFront}getCuriosityBonus(){return this.curiosityBonus}isLearningPlateaued(){return this.plateauDetector.isPlateaued()}isEnabled(){return l().useCrossDomainTransfer===!0}isMetaLearningEnabled(){return this.config.useMetaLearningEnhancements===!0&&l().useMetaLearningEnhancements!==!1}makePairKey(e,t){return`${e}->${t}`}computeSqrtDampening(e){let t=this.sampler.getObservationCount(e.pairKey);return Math.sqrt(t/(t+this.config.explorationWarmup))}doTransfer(e,t,r){return this.transferExecutor?this.transferExecutor(e,t,r):!0}getPerformanceSnapshot(e){return this.performanceProvider?this.performanceProvider(e):{domain:e,successRate:.5,avgConfidence:.5,patternCount:0,timestamp:Date.now()}}updateAffinityScore(e,t){let r=this.affinityScores.get(e)??.5;this.affinityScores.set(e,.2*(t?1:0)+.8*r)}addToHistory(e){for(this.transferHistory.push(e);this.transferHistory.length>this.config.maxHistorySize;)this.transferHistory.shift()}createBlockedResult(e,t,r){let n={domain:"",successRate:0,avgConfidence:0,patternCount:0,timestamp:Date.now()};return{transferId:e,candidate:t,success:!1,dampeningFactor:0,verification:{passed:!1,sourceStable:!1,targetImproved:!1,sourceDelta:0,targetDelta:0,sourceConfidenceDelta:0,targetConfidenceDelta:0,failureReason:`Coherence gate rejected: ${r.rejectionReason??"unknown"}`},coherenceResult:r,sourcePerformanceBefore:{...n,domain:t.sourceDomain},sourcePerformanceAfter:{...n,domain:t.sourceDomain},targetPerformanceBefore:{...n,domain:t.targetDomain},targetPerformanceAfter:{...n,domain:t.targetDomain},timestamp:Date.now()}}createRejectedCandidate(e,t){return{sourceDomain:e,targetDomain:t,sampledProbability:0,affinityScore:0,isExploration:!1,pairKey:this.makePairKey(e,t)}}tryLoadNativeModule(){this.nativeModule=null}};function J(o){return new P(o)}export{p as a,h as b,V as c,v as d,y as e,D as f,C as g,P as h,J as i};
|
|
@@ -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.
|
|
2
|
-
import{g}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.0");process.exit(0)}
|
|
2
|
+
import{g}from"./chunk-EQ4SDE4L.js";import{i as h}from"./chunk-MO3QXLF2.js";import{c as p,d}from"./chunk-BH2SQQ2N.js";import{b as m,e as f}from"./chunk-X5RELRY7.js";f();var I={maxDepth:5,riskWeights:{directImpact:.4,transitiveImpact:.2,testCoverage:.2,criticalPath:.15,dependencyCount:.05},testPatterns:["**/*.test.ts","**/*.test.tsx","**/*.spec.ts","**/*.spec.tsx","**/test_*.py","**/*_test.py","**/*_test.go"],criticalPaths:["**/auth/**","**/security/**","**/payment/**","**/api/**","**/core/**"],namespace:"code-intelligence:impact"},u=class{constructor(e,t,i={}){this.memory=e;this.config={...I,...i},this.knowledgeGraph=t||new g(e)}memory;config;knowledgeGraph;async analyzeImpact(e){try{let{changedFiles:t,depth:i=this.config.maxDepth,includeTests:r=!0}=e;if(t.length===0)return p({directImpact:[],transitiveImpact:[],impactedTests:[],riskLevel:"info",recommendations:[]});let n=await this.analyzeDirectImpact(t),l=await this.analyzeTransitiveImpact(t,n,i),s=[];if(r){let a=await this.getImpactedTests(t);a.success&&(s=a.value)}let c={directImpact:n,transitiveImpact:l,impactedTests:s,riskLevel:"info",recommendations:[]};return c.riskLevel=this.calculateRiskLevel(c),c.recommendations=this.getRecommendations(c),await this.storeAnalysis(t,c),p(c)}catch(t){return d(m(t))}}async getImpactedTests(e){try{let t=new Set;for(let i of e){if(this.isTestFile(i)){t.add(i);continue}let r=await this.knowledgeGraph.mapDependencies({files:[i],direction:"incoming",depth:3});if(r.success)for(let s of r.value.nodes)this.isTestFile(s.path)&&t.add(s.path);let n=this.getBaseName(i),l=[`${n}.test`,`${n}.spec`,`test_${n}`,`${n}_test`];for(let s of l){let c=await this.memory.search(`code-intelligence:kg:node:*${s}*`,10,{namespace:"code-intelligence:kg"});for(let a of c){let o=await this.memory.get(a,{namespace:"code-intelligence:kg"});o?.properties?.path&&this.isTestFile(o.properties.path)&&t.add(o.properties.path)}}}return p(Array.from(t))}catch(t){return d(m(t))}}calculateRiskLevel(e){let t=this.config.riskWeights,i=0,r=Math.min(1,e.directImpact.length/10);i+=r*t.directImpact;let n=Math.min(1,e.transitiveImpact.length/20);i+=n*t.transitiveImpact;let l=e.impactedTests.length>0?Math.max(0,1-e.impactedTests.length/(e.directImpact.length||1)):1;i+=l*t.testCoverage;let s=this.countCriticalFiles([...e.directImpact.map(o=>o.file),...e.transitiveImpact.map(o=>o.file)]),c=Math.min(1,s/5);i+=c*t.criticalPath;let a=this.calculateAverageRiskScore([...e.directImpact,...e.transitiveImpact]);return i+=a*t.dependencyCount,i>=.8?"critical":i>=.6?"high":i>=.4?"medium":i>=.2?"low":"info"}getRecommendations(e){let t=[];(e.riskLevel==="critical"||e.riskLevel==="high")&&t.push("This change has significant impact - consider peer review before merging"),e.impactedTests.length===0&&e.directImpact.length>0?t.push("No tests found for impacted files - add test coverage"):e.impactedTests.length<e.directImpact.length/2&&t.push("Test coverage appears low for impacted files"),e.impactedTests.length>0&&(e.impactedTests.length<=10?t.push(`Run these ${e.impactedTests.length} tests: ${e.impactedTests.slice(0,3).join(", ")}${e.impactedTests.length>3?"...":""}`):t.push(`Run all ${e.impactedTests.length} impacted tests before deployment`));let i=[...e.directImpact,...e.transitiveImpact].filter(n=>this.isCriticalPath(n.file));i.length>0&&t.push(`${i.length} critical path files affected - extra scrutiny recommended`),e.transitiveImpact.length>10&&t.push("Large transitive impact - consider breaking down into smaller changes");let r=[...e.directImpact,...e.transitiveImpact].filter(n=>n.riskScore>=.7);return r.length>0&&t.push(`${r.length} high-risk files impacted: ${r.slice(0,2).map(n=>this.getFileName(n.file)).join(", ")}`),t}async analyzeDirectImpact(e){let t=[];for(let i of e){let r=await this.knowledgeGraph.mapDependencies({files:[i],direction:"incoming",depth:1});if(r.success){let{nodes:n,edges:l}=r.value;for(let s of n){if(s.path===i)continue;let c=l.find(o=>o.target===s.id||o.source===s.id),a=this.calculateFileRiskScore(s.path,s.inDegree,s.outDegree);t.push({file:s.path,reason:`Directly ${c?.type||"depends on"} ${this.getFileName(i)}`,distance:1,riskScore:a})}}}return this.deduplicateImpact(t)}async analyzeTransitiveImpact(e,t,i){let r=[],n=new Set([...e,...t.map(s=>s.file)]),l=t.map(s=>({file:s.file,distance:1}));for(;l.length>0;){let s=l.shift();if(s.distance>=i)continue;let c=await this.knowledgeGraph.mapDependencies({files:[s.file],direction:"incoming",depth:1});if(c.success)for(let a of c.value.nodes){if(n.has(a.path)||a.path===s.file)continue;n.add(a.path);let o=this.calculateFileRiskScore(a.path,a.inDegree,a.outDegree,s.distance+1);r.push({file:a.path,reason:`Transitively depends via ${this.getFileName(s.file)}`,distance:s.distance+1,riskScore:o}),l.push({file:a.path,distance:s.distance+1})}}return this.deduplicateImpact(r)}calculateFileRiskScore(e,t,i,r=1){let n=0;return n+=Math.min(.3,t/20),n+=Math.min(.2,i/30),this.isCriticalPath(e)&&(n+=.3),this.isEntryPoint(e)&&(n+=.2),n=n*Math.pow(.8,r-1),Math.min(1,Math.max(0,n))}calculateAverageRiskScore(e){return e.length===0?0:e.reduce((i,r)=>i+r.riskScore,0)/e.length}countCriticalFiles(e){return e.filter(t=>this.isCriticalPath(t)).length}isTestFile(e){return[/\.test\.[tj]sx?$/,/\.spec\.[tj]sx?$/,/_test\.[tj]sx?$/,/test_.*\.py$/,/.*_test\.py$/,/.*_test\.go$/].some(i=>i.test(e))}isCriticalPath(e){return this.config.criticalPaths.map(i=>i.replace(/\*\*/g,".*").replace(/\*/g,"[^/]*")).some(i=>new RegExp(i).test(e))}isEntryPoint(e){return[/\/index\.[tj]sx?$/,/\/main\.[tj]sx?$/,/\/app\.[tj]sx?$/,/^src\/[^/]+\.[tj]sx?$/,/\/server\.[tj]sx?$/,/\/__init__\.py$/,/\/main\.go$/].some(i=>i.test(e))}getBaseName(e){return this.getFileName(e).replace(/\.[^.]+$/,"")}getFileName(e){return e.split(/[/\\]/).pop()||e}deduplicateImpact(e){let t=new Map;for(let i of e){let r=t.get(i.file);(!r||i.distance<r.distance)&&t.set(i.file,i)}return Array.from(t.values()).sort((i,r)=>r.riskScore!==i.riskScore?r.riskScore-i.riskScore:i.distance-r.distance)}async storeAnalysis(e,t){let i=h();await this.memory.set(`${this.config.namespace}:analysis:${i}`,{id:i,changedFiles:e,analysis:t,timestamp:new Date().toISOString()},{namespace:this.config.namespace,persist:!0})}};export{u as a};
|
|
@@ -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.
|
|
2
|
-
import{b as o}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.0");process.exit(0)}
|
|
2
|
+
import{b as o}from"./chunk-GX5RFGW2.js";function s(n){return n instanceof Error?n.message:String(n)}function u(n){return n instanceof Error?n:new Error(String(n))}function a(n){return n instanceof r||typeof n=="object"&&n!==null&&n.callerError===!0}var r,e=o(()=>{"use strict";r=class extends Error{callerError=!0;constructor(t){super(t),this.name="CallerInputError"}}});export{s as a,u as b,r as c,a as d,e};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.
|
|
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.0");process.exit(0)}
|
|
2
2
|
import{existsSync as o,openSync as d,readSync as f,closeSync as p,renameSync as S,unlinkSync as l}from"fs";var b="FLVR",c=4,g=["",".idmap.json",".manifest.json",".space.json"];function m(n,e){let r;try{r=d(n,"r");let t=Buffer.alloc(e);return f(r,t,0,e,0)<e?null:t}catch{return null}finally{if(r!==void 0)try{p(r)}catch{}}}function a(n){try{return process.kill(n,0),!0}catch(e){return e.code==="EPERM"}}function i(n){let e=m(`${n}.lock`,c+4);if(!e||e.subarray(0,4).toString("latin1")!==b)return null;let r=e.readUInt32LE(c);return r>0?r:null}function k(n){let e=i(n);return e===null?!1:a(e)}function E(n){let e=n instanceof Error?n.message:String(n);return e.includes("LockHeld")||e.includes("0x0300")}function y(n){let e=n instanceof Error?n.message:String(n);return/ManifestNotFound|InvalidMagic|ChecksumMismatch|CorruptStore/i.test(e)}function L(n){let e=i(n);if(e===null||a(e))return!1;try{return i(n)!==e?!1:(l(`${n}.lock`),!0)}catch{return!1}}function x(n,e,r){if(!o(n)||!y(r))return null;if(k(n))return console.warn(`[RVF] ${n} is unusable but its lock is held by a live process \u2014 leaving it alone and degrading to SQLite for this run.`),null;let t=`${n}.corrupt-${process.pid}`;for(let s of g){let u=`${n}${s}`;if(o(u))try{S(u,`${t}${s}`)}catch{}}try{o(`${n}.lock`)&&l(`${n}.lock`)}catch{}return console.warn(`[RVF] Quarantined unusable store ${n} \u2192 ${t} (${e}). It is a derived cache and will be rebuilt from the unified DB. Please report a recurrence with the quarantined files (issue #563).`),t}export{i as a,k as b,E as c,y as d,L as e,x as f};
|
|
@@ -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.
|
|
2
|
-
import{a as r,h as n}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.0");process.exit(0)}
|
|
2
|
+
import{a as r,h as n}from"./chunk-JIWMFLHV.js";var a={claude:"metered-api","claude-code":"subscription",codex:"subscription",openai:"metered-api",openrouter:"metered-api",gemini:"metered-api","azure-openai":"metered-api",bedrock:"metered-api",cognitum:"metered-capped",ollama:"local"};function o(e){return r(e)?a[e]:void 0}function p(e){return e.billingMode??o(e.type)??"metered-api"}function c(e){return o(e)??"metered-api"}function g(e,t){switch(t){case"metered-api":return`\u26A0\uFE0F LLM provider "${e}" bills a pay-per-token API key (not your Claude subscription) and has no server-side spend cap. Set a budget with --max-budget-usd / AQE_MAX_BUDGET_USD, or use AQE_LLM_PROVIDER=claude-code to run on your Claude Code subscription instead.`;case"metered-capped":return`\u2139\uFE0F LLM provider "${e}" bills per-token but enforces a server-side hard spend cap; it will pause at the cap rather than overspend.`;case"subscription":{let i=n(e);if(i){let d=i.detail?`declared by ${i.detail}`:`declared by ${i.source==="config"?"config":"the registering caller"}`;return`\u2139\uFE0F LLM provider "${e}" is an external provider that reports subscription billing (${d}) \u2014 AQE does not verify this. It draws on that host's own plan, not on your Claude Code or ChatGPT subscription.`}return`\u2139\uFE0F LLM provider "${e}" runs on your ${e==="codex"?"ChatGPT":"Claude Code"} subscription (shared plan usage). Worst case is hitting your plan's rate limit and pausing \u2014 no per-token API charges.`}case"local":return}}export{p as a,c as b,g as c};
|
|
@@ -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.
|
|
2
|
-
import{a as D,b as _,c as X,d as I,f as ne}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.0");process.exit(0)}
|
|
2
|
+
import{a as D,b as _,c as X,d as I,f as ne}from"./chunk-KEZ4PXVF.js";import{a as K,d as J}from"./chunk-KUTMQBV4.js";import{c as Z,d as ee,e as te,f as re}from"./chunk-GCHDMO5V.js";import{b as C,g as $,j as H}from"./chunk-I3BH3KIF.js";import{b as k}from"./chunk-7JABIXP3.js";import{d as Y}from"./chunk-KU4WLKDK.js";import{o as j,s as fe}from"./chunk-XZDPR6I2.js";import{n as U}from"./chunk-WPSGMTI4.js";import{c as q,d as E}from"./chunk-BH2SQQ2N.js";import{a as G}from"./chunk-AIE6OKCD.js";import{e as T}from"./chunk-OYVDTD3A.js";import{a as h,b as W,e as z}from"./chunk-X5RELRY7.js";import{S as he,b as B}from"./chunk-URUOTHPO.js";G();z();var M={enableLearning:!0,enableGuidance:!0,enableRouting:!0,embeddingDimension:384,useONNXEmbeddings:!0,maxRoutingCandidates:10,routingWeights:{similarity:.3,performance:.4,capabilities:.3},coherenceThreshold:.4};var A=[{patternType:"test-template",name:"AAA Unit Test",description:"Arrange-Act-Assert pattern for clear, maintainable unit tests",template:{type:"code",content:`describe('{{className}}', () => {
|
|
3
3
|
describe('{{methodName}}', () => {
|
|
4
4
|
it('should {{expectedBehavior}}', {{async}} () => {
|
|
5
5
|
// Arrange
|
|
@@ -317,4 +317,4 @@ On promotion:
|
|
|
317
317
|
AND agent_id = 'aqe-hook-router'
|
|
318
318
|
AND state_key = ?
|
|
319
319
|
AND action_key = ?
|
|
320
|
-
`);return s=>{try{let a=o.get(e,s);return a?{qValue:a.q_value,visits:a.visits}:void 0}catch{return}}}catch{return()=>{}}}getGuidance(e,r){return D(e)}generateContext(e,r){return I(e,r||{})}checkAntiPatterns(e,r){return X(e,r)}async embed(e){if(this.config.useONNXEmbeddings)try{let{computeRealEmbedding:r}=await import("./real-embeddings-
|
|
320
|
+
`);return s=>{try{let a=o.get(e,s);return a?{qValue:a.q_value,visits:a.visits}:void 0}catch{return}}}catch{return()=>{}}}getGuidance(e,r){return D(e)}generateContext(e,r){return I(e,r||{})}checkAntiPatterns(e,r){return X(e,r)}async embed(e){if(this.config.useONNXEmbeddings)try{let{computeRealEmbedding:r}=await import("./real-embeddings-VZN3KIAI.js"),t=await r(e);if(t.length!==this.config.embeddingDimension)return ue(t,this.config.embeddingDimension);let n=U()?.spaceId;return n&&this.embeddingProvenance.set(t,n),t}catch(r){let{isUsingEndpoint:t}=await import("./real-embeddings-VZN3KIAI.js");if(t())throw r;process.env.DEBUG&&g.warn("ONNX embeddings unavailable, using hash fallback",{error:h(r)})}return de(e,this.config.embeddingDimension)}async getStats(){this.initialized||await this.initialize();let e=await this.patternStore.getStats(),r={};for(let a of H)r[a]=e.byDomain[a]||0;let t=this.stats.routingRequests,n=this.stats.routingRequests>0?this.stats.totalRoutingConfidence/this.stats.routingRequests:0,o=this.stats.learningOutcomes,s=this.stats.learningOutcomes>0?this.stats.successfulOutcomes/this.stats.learningOutcomes:0;try{let a=this.getSqliteStore().getAggregateOutcomeStats();a.routingRequests>t&&(t=a.routingRequests,n=a.avgRoutingConfidence),a.learningOutcomes>o&&(o=a.learningOutcomes,s=a.learningOutcomes>0?a.successfulOutcomes/a.learningOutcomes:a.avgPatternSuccessRate)}catch{}return{totalPatterns:e.totalPatterns,byDomain:r,routingRequests:t,avgRoutingConfidence:n,learningOutcomes:o,patternSuccessRate:s,patternStoreStats:e}}async dispose(){if(await this.patternStore.dispose(),this.sqliteStore&&(this.sqliteStore.close(),this.sqliteStore=null),this.rvfDualWriter){try{this.rvfDualWriter.close()}catch{}this.rvfDualWriter=null}this.initialized=!1}};function Et(i,e,r,t){return new V(i,e,r,t)}export{M as a,A as b,x as c,se as d,N as e,Q as f,V as g,Et as h};
|
|
@@ -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.
|
|
2
|
-
import{c as R,d as j}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.0");process.exit(0)}
|
|
2
|
+
import{c as R,d as j}from"./chunk-KLGFEHEN.js";import{a as b}from"./chunk-OLD2CIDI.js";import{b as le}from"./chunk-FFE4XAQA.js";import{a as oe,b as ae}from"./chunk-JLPNYHJJ.js";import{e as ie,f as se}from"./chunk-I3BH3KIF.js";import{b as O,d as Ce}from"./chunk-ATXAMGVE.js";import{a as re}from"./chunk-BH2SQQ2N.js";import{a as k,e as P}from"./chunk-X5RELRY7.js";var we={M:16,efConstruction:200,efSearch:100},F={enabled:!0,pretrainedPatterns:!0,hnswConfig:we,promotionThreshold:ie,qualityThreshold:se,embeddingModel:"auto"},$={mode:"hybrid",confidenceThreshold:.7,feedbackEnabled:!0,cacheEnabled:!0,cacheTTLMs:300*1e3},L={enabled:["pattern-consolidator","coverage-gap-scanner","flaky-test-detector","routing-accuracy-monitor"],intervals:{"pattern-consolidator":1800*1e3,"coverage-gap-scanner":3600*1e3,"flaky-test-detector":7200*1e3,"routing-accuracy-monitor":900*1e3},maxConcurrent:4,daemonAutoStart:!0},M={claudeCode:!0,preCommit:!1,ciIntegration:!1},V={install:!0,installV2:!0,installV3:!0,overwrite:!1},Q={enabled:!0,parameters:["hnsw.efSearch","routing.confidenceThreshold","pattern.promotionThreshold","testGen.complexityLimit"],tuningIntervalMs:10080*60*1e3,evaluationPeriodMs:5e3};var E=re.filter(r=>r!=="coordination");function W(){return"3.15.0"}function Ke(r,e){return{version:W(),project:{name:r,root:e,type:"single"},learning:structuredClone(F),routing:structuredClone($),workers:structuredClone(L),hooks:structuredClone(M),skills:structuredClone(V),autoTuning:structuredClone(Q),domains:{enabled:[...E],disabled:[]},agents:{maxConcurrent:15,defaultTimeout:6e4}}}Ce();import{readFileSync as C,existsSync as p,statSync as De,readdirSync as Re}from"fs";import{join as d,basename as ce,extname as ue,relative as B}from"path";var je=[{name:"jest",detect:r=>{let e=["jest.config.js","jest.config.ts","jest.config.mjs","jest.config.cjs"];for(let n of e)if(p(d(r,n)))return{name:"jest",version:x(r,"jest"),configFile:n,confidence:1};let t=A(r);return t?.jest?{name:"jest",version:x(r,"jest"),configFile:"package.json",confidence:.9}:t?.devDependencies?.jest||t?.dependencies?.jest?{name:"jest",version:t.devDependencies?.jest||t.dependencies?.jest,confidence:.7}:null}},{name:"vitest",detect:r=>{let e=["vitest.config.ts","vitest.config.js","vitest.config.mts","vite.config.ts"];for(let n of e)if(p(d(r,n)))return{name:"vitest",version:x(r,"vitest"),configFile:n,confidence:1};let t=A(r);return t?.devDependencies?.vitest||t?.dependencies?.vitest?{name:"vitest",version:t.devDependencies?.vitest,confidence:.8}:null}},{name:"mocha",detect:r=>{let e=[".mocharc.js",".mocharc.json",".mocharc.yaml",".mocharc.yml"];for(let n of e)if(p(d(r,n)))return{name:"mocha",version:x(r,"mocha"),configFile:n,confidence:1};let t=A(r);return t?.devDependencies?.mocha?{name:"mocha",version:t.devDependencies?.mocha,confidence:.8}:null}},{name:"pytest",detect:r=>{let e=["pytest.ini","pyproject.toml","setup.cfg"];for(let n of e){let i=d(r,n);if(p(i))try{let s=C(i,"utf-8");if(s.includes("[pytest]")||s.includes("[tool.pytest]"))return{name:"pytest",configFile:n,confidence:1}}catch(s){console.debug("[ProjectAnalyzer] Config read failed:",s instanceof Error?s.message:s)}}let t=d(r,"requirements.txt");if(p(t))try{if(C(t,"utf-8").includes("pytest"))return{name:"pytest",configFile:"requirements.txt",confidence:.8}}catch(n){console.debug("[ProjectAnalyzer] requirements.txt read failed:",n instanceof Error?n.message:n)}return null}},{name:"playwright",detect:r=>{let e=["playwright.config.ts","playwright.config.js"];for(let n of e)if(p(d(r,n)))return{name:"playwright",version:x(r,"@playwright/test"),configFile:n,confidence:1};let t=A(r);return t?.devDependencies?.["@playwright/test"]?{name:"playwright",version:t.devDependencies["@playwright/test"],confidence:.8}:null}},{name:"cypress",detect:r=>{let e=["cypress.config.ts","cypress.config.js","cypress.json"];for(let t of e)if(p(d(r,t)))return{name:"cypress",version:x(r,"cypress"),configFile:t,confidence:1};return p(d(r,"cypress"))?{name:"cypress",configFile:"cypress/",confidence:.9}:null}}],Ee=[{name:"typescript",extensions:[".ts",".tsx",".mts",".cts"]},{name:"javascript",extensions:[".js",".jsx",".mjs",".cjs"]},{name:"python",extensions:[".py",".pyw"]},{name:"java",extensions:[".java"]},{name:"go",extensions:[".go"]},{name:"rust",extensions:[".rs"]},{name:"csharp",extensions:[".cs"]},{name:"ruby",extensions:[".rb"]},{name:"php",extensions:[".php"]},{name:"kotlin",extensions:[".kt",".kts"]},{name:"swift",extensions:[".swift"]}];function A(r){let e=d(r,"package.json");if(!p(e))return null;try{return O(C(e,"utf-8"))}catch{return null}}function x(r,e){let t=A(r);if(t)return t.devDependencies?.[e]||t.dependencies?.[e]}var Ie=["node_modules",".git","dist","build","coverage",".next","__pycache__",".agentic-qe",".claude",".agents",".codex",".opencode",".kiro",".cursor",".roo",".kilocode",".windsurf",".continue",".clinerules",".swarm",".claude-flow",".hive-mind"];function G(r,e,t={}){let{maxDepth:n=10,exclude:i=Ie}=t;function s(o,a){if(a>n)return;let c;try{c=Re(o)}catch{return}for(let u of c){if(i.includes(u))continue;let l=d(o,u),D;try{D=De(l)}catch{continue}D.isDirectory()?s(l,a+1):D.isFile()&&e(l)}}s(r,0)}var z=class{projectRoot;constructor(e){this.projectRoot=e}async analyze(){let e=Date.now(),[t,n,i,s,o]=await Promise.all([this.detectFrameworks(),this.detectLanguages(),this.detectExistingTests(),this.analyzeComplexity(),this.measureCoverage()]);return{projectName:A(this.projectRoot)?.name||ce(this.projectRoot),projectRoot:this.projectRoot,projectType:this.detectProjectType(),frameworks:t,languages:n,existingTests:i,codeComplexity:s,coverage:o,packageManager:this.detectPackageManager(),hasTypeScript:p(d(this.projectRoot,"tsconfig.json")),hasCIConfig:this.detectCIConfig(),ciProvider:this.detectCIProvider(),analysisTimestamp:new Date,analysisDurationMs:Date.now()-e}}async detectFrameworks(){let e=[];for(let t of je){let n=t.detect(this.projectRoot);n&&e.push(n)}return e.sort((t,n)=>n.confidence-t.confidence)}async detectLanguages(){let e=new Map,t=0;G(this.projectRoot,i=>{let s=ue(i).toLowerCase();if(s){for(let o of Ee)if(o.extensions.includes(s)){let a=e.get(o.name)||{count:0,extensions:new Set};a.count++,a.extensions.add(s),e.set(o.name,a),t++;break}}});let n=[];for(let[i,s]of e)n.push({name:i,percentage:t>0?Math.round(s.count/t*100):0,fileCount:s.count,extensions:Array.from(s.extensions)});return n.sort((i,s)=>s.fileCount-i.fileCount)}async detectExistingTests(){let e={totalCount:0,byFramework:{},byType:{unit:0,integration:0,e2e:0,unknown:0},directories:[]},t=new Set,n=[/\.test\.[jt]sx?$/,/\.spec\.[jt]sx?$/,/_test\.[jt]sx?$/,/test_.*\.py$/,/.*_test\.py$/,/.*_test\.go$/,/.*Test\.java$/];return G(this.projectRoot,i=>{let s=ce(i);if(n.some(a=>a.test(s))){e.totalCount++;let a=B(this.projectRoot,i).toLowerCase();a.includes("e2e")||a.includes("cypress")||a.includes("playwright")?e.byType.e2e++:a.includes("integration")||a.includes("int-test")?e.byType.integration++:a.includes("unit")||a.includes("__tests__")||a.includes("test/")?e.byType.unit++:e.byType.unknown++;let c=B(this.projectRoot,d(i,".."));t.add(c)}}),e.directories=Array.from(t).slice(0,10),e}async analyzeComplexity(){let e=[],t=[],n=0,i=0;G(this.projectRoot,a=>{let c=ue(a);if([".ts",".tsx",".js",".jsx",".py",".java",".go"].includes(c))try{let u=C(a,"utf-8"),l=this.calculateFileComplexity(u,c);t.push(...l.functionComplexities),l.maxComplexity>n&&(n=l.maxComplexity),i++,l.maxComplexity>10&&e.push(B(this.projectRoot,a))}catch(u){console.debug("[ProjectAnalyzer] Complexity analysis read failed:",u instanceof Error?u.message:u)}});let s=t.reduce((a,c)=>a+c,0),o=t.length>0?s/t.length:0;return{averageCyclomatic:Math.round(o*10)/10,maxCyclomatic:n,totalFiles:i,complexFiles:e.slice(0,20),recommendation:o<5?"simple":o<15?"medium":"complex"}}calculateFileComplexity(e,t){let n=this.stripCommentsAndStrings(e,t),i=this.calculateComplexity(n);return{functionComplexities:[i],maxComplexity:i}}removeDelimitedBlocks(e,t,n){let i="",s=0;for(;s<e.length;){let o=e.indexOf(t,s);if(o===-1){i+=e.slice(s);break}i+=e.slice(s,o);let a=e.indexOf(n,o+t.length);if(a===-1)break;s=a+n.length}return i}stripCommentsAndStrings(e,t){let n=e;return[".ts",".tsx",".js",".jsx",".java",".go"].includes(t)?(n=n.split(`
|
|
3
3
|
`).map(i=>{let s=i.indexOf("//");return s>=0?i.slice(0,s):i}).join(`
|
|
4
4
|
`),n=this.removeDelimitedBlocks(n,"/*","*/"),n=this.removeDelimitedBlocks(n,"`","`"),n=this.removeDelimitedBlocks(n,'"','"'),n=this.removeDelimitedBlocks(n,"'","'")):t===".py"&&(n=n.split(`
|
|
5
5
|
`).map(i=>{let s=i.indexOf("#");return s>=0?i.slice(0,s):i}).join(`
|
|
@@ -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.
|
|
2
|
-
import{d as W,f as it}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.0");process.exit(0)}
|
|
2
|
+
import{d as W,f as it}from"./chunk-ILKMNDUM.js";import{b as I,d as de}from"./chunk-ATXAMGVE.js";import{a as Y,c as ot}from"./chunk-JJ7WAU4I.js";import{a as le,d as F,e as ge,f as pe}from"./chunk-7WUHVGGT.js";import{a as X,b as ue,e as st}from"./chunk-HOPXHZA3.js";import{a as _e,c as me,d as at}from"./chunk-5LN7FQZI.js";import{a as tt}from"./chunk-AIE6OKCD.js";import{e as Te}from"./chunk-OYVDTD3A.js";import{a as O,e as ce}from"./chunk-X5RELRY7.js";import{a as H,b as y,c as nt}from"./chunk-QRALXNNX.js";import{a as Ee,b as rt}from"./chunk-AGYPPPXR.js";import{b as R,d as et}from"./chunk-GX5RFGW2.js";import{createHash as Se}from"node:crypto";function Tt(n){let e=Buffer.alloc(8);return e.writeBigUInt64LE(BigInt(n)),e}function Et(n){return typeof n=="string"?Buffer.from(n,"utf8"):n instanceof Uint8Array?Buffer.from(n):Buffer.from($(n),"utf8")}function $(n){return n===null||typeof n!="object"?JSON.stringify(n)??"null":Array.isArray(n)?`[${n.map($).join(",")}]`:`{${Object.keys(n).sort().map(t=>`${JSON.stringify(t)}:${$(n[t])}`).join(",")}}`}function he(...n){let e=Se("sha256");for(let t of n)e.update(t);return e.digest()}function Ne(n,e,t){return he(ct,n,e,Tt(t))}var ct,fe,A,Re=R(()=>{"use strict";ct=Buffer.from("ruvector:chain:"),fe=Se("sha256").update("ruvector-proof-gate-v1").digest();A=class n{seq=0;prev=fe;chain=[];payloadHashes=[];admit(e){let t=he(Et(e)),r=Ne(this.prev,t,this.seq);this.prev=r,this.chain.push(r),this.payloadHashes.push(t);let i={sequence:this.seq,payloadHash:t.toString("hex"),chainCommitment:r.toString("hex")};return this.seq+=1,i}verifyReceipt(e){return e.sequence>=0&&e.sequence<this.chain.length&&this.chain[e.sequence].toString("hex")===e.chainCommitment}chainRoot(){return this.prev.toString("hex")}get length(){return this.seq}get isEmpty(){return this.seq===0}verifyIntegrity(){if(this.chain.length!==this.payloadHashes.length)return!1;let e=fe;for(let t=0;t<this.chain.length;t++){if(!Ne(e,this.payloadHashes[t],t).equals(this.chain[t]))return!1;e=this.chain[t]}return e.equals(this.prev)}toJSON(){return{seq:this.seq,head:this.prev.toString("hex"),chain:this.chain.map(e=>e.toString("hex")),payloadHashes:this.payloadHashes.map(e=>e.toString("hex"))}}static fromJSON(e){let t=new n;t.seq=e.seq,t.prev=Buffer.from(e.head,"hex");for(let r of e.chain)t.chain.push(Buffer.from(r,"hex"));for(let r of e.payloadHashes)t.payloadHashes.push(Buffer.from(r,"hex"));return t}}});function v(n){if(!K.has(n))throw new Error(`Invalid table name: "${n}" is not in the allowlist`);return n}function It(n){let e=n.split(".");if(e.length>2)throw new Error(`Invalid SQL identifier: "${n}" has too many parts (max: schema.table)`);for(let t of e)if(!Le.test(t))throw new Error(`Invalid SQL identifier: "${n}" \u2014 part "${t}" does not match pattern ${Le}`);return n}var K,Le,V=R(()=>{"use strict";K=new Set(["schema_version","kv_store","vectors","rl_q_values","goap_goals","goap_actions","goap_plans","goap_plan_signatures","concept_nodes","concept_edges","dream_cycles","dream_insights","qe_patterns","qe_pattern_embeddings","qe_pattern_usage","qe_trajectories","embeddings","execution_results","executed_steps","mincut_snapshots","mincut_history","mincut_weak_vertices","mincut_alerts","mincut_healing_actions","mincut_observations","sona_patterns","sona_fisher_matrices","test_outcomes","routing_outcomes","coverage_sessions","patterns","hypergraph_nodes","hypergraph_edges","hypergraph_vertices","hypergraph_hyperedges","hypergraph_edge_vertices","hypergraph_vertex_properties","hypergraph_edge_properties","captured_experiences","experience_applications","witness_chain","witness_chain_receipts","witness_chain_archive","trajectories","trajectory_steps","pattern_evolution_events","pattern_relationships","pattern_versions","learning_daily_snapshots","metrics_outcomes","experience_consolidation_log","qe_pattern_reuse","learning_evidence_manifests","learning_evidence_segments","learning_segment_edges","learning_evidence_admissions","pattern_manifest_lineage","pattern_segment_lineage","qe_agent_co_execution"]);Le=/^[a-z_][a-z0-9_]{0,62}$/});function Ce(n){n.exec(Ie),n.exec(`
|
|
3
3
|
INSERT OR IGNORE INTO learning_evidence_manifests (
|
|
4
4
|
id, trajectory_id, trajectory_hash, manifest_hash, task_family,
|
|
5
5
|
outcome, oracle_refs_json, source_kind, process_signals_json
|
|
@@ -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.
|
|
2
|
-
import{i as t,j as s,l as a,n as m}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.0");process.exit(0)}
|
|
2
|
+
import{i as t,j as s,l as a,n as m}from"./chunk-H77AUJNW.js";m();var p={0:{tier:0,name:"Agent Booster",description:"Mechanical code transforms via Rust/WASM",useCases:["var-to-const conversion","add-types","remove-console statements","promise-to-async","cjs-to-esm","func-to-arrow"],typicalLatencyMs:1,relativeCost:0,exampleModels:["agent-booster-wasm","agent-booster-typescript"],requiresNetwork:!1,complexityRange:[0,10]},1:{tier:1,name:"Haiku",description:"Fast, cost-effective for simple tasks",useCases:["Simple bug fixes","Code formatting","Documentation updates","Basic refactoring","Test generation (simple)"],typicalLatencyMs:500,relativeCost:1,exampleModels:[a[1],"gpt-4o-mini","gemini-flash"],requiresNetwork:!0,complexityRange:[10,35]},2:{tier:2,name:"Sonnet",description:"Balanced capability for complex reasoning",useCases:["Feature implementation","Complex refactoring","Security analysis","Performance optimization","Test generation (complex)"],typicalLatencyMs:3e3,relativeCost:2,exampleModels:[t,"gpt-4o","gemini-pro"],requiresNetwork:!0,complexityRange:[35,70]},3:{tier:3,name:"Sonnet Extended",description:"Extended context for multi-step workflows",useCases:["Multi-file refactoring","Workflow orchestration","Cross-domain coordination","Large codebase analysis"],typicalLatencyMs:7e3,relativeCost:3,exampleModels:[t],requiresNetwork:!0,complexityRange:[60,85]},4:{tier:4,name:"Opus",description:"Maximum capability for critical decisions",useCases:["Architecture design","Security audits","Complex algorithm design","Critical bug analysis","System-wide refactoring"],typicalLatencyMs:5e3,relativeCost:4,exampleModels:[s,"gpt-4-turbo"],requiresNetwork:!0,complexityRange:[75,100]}},c={enabled:!0,tierBudgets:{0:{tier:0,maxCostPerRequest:0,maxRequestsPerHour:1e4,maxRequestsPerDay:1e5,maxDailyCostUsd:0,enabled:!0},1:{tier:1,maxCostPerRequest:.01,maxRequestsPerHour:100,maxRequestsPerDay:1e3,maxDailyCostUsd:5,enabled:!0},2:{tier:2,maxCostPerRequest:.1,maxRequestsPerHour:50,maxRequestsPerDay:500,maxDailyCostUsd:20,enabled:!0},3:{tier:3,maxCostPerRequest:.5,maxRequestsPerHour:20,maxRequestsPerDay:100,maxDailyCostUsd:30,enabled:!0},4:{tier:4,maxCostPerRequest:2,maxRequestsPerHour:10,maxRequestsPerDay:50,maxDailyCostUsd:50,enabled:!0}},maxDailyCostUsd:100,warningThreshold:.8,onBudgetExceeded:"downgrade",onBudgetWarning:"warn",allowCriticalOverrides:!0},b={budgetConfig:c,enableAgentBooster:!0,agentBoosterThreshold:.7,enableAutoRouting:!0,complexityThresholds:{0:10,1:35,2:70,3:85,4:100},allowManualOverrides:!0,enableDecisionCache:!0,decisionCacheTtlMs:300*1e3,enableMetrics:!0,maxDecisionTimeMs:10,fallbackTier:2,tierModels:{0:"agent-booster",...a}},r=class extends Error{constructor(e,i,y){super(e);this.code=i;this.cause=y;this.name="ModelRouterError"}code;cause},l=class extends r{constructor(e,i,y){super(e,"BUDGET_EXCEEDED");this.tier=i;this.usage=y;this.name="BudgetExceededError"}tier;usage},d=class extends r{constructor(o,e){super(o,"COMPLEXITY_ANALYSIS_ERROR",e),this.name="ComplexityAnalysisError"}},u=class extends r{constructor(e,i){super(e,"ROUTING_TIMEOUT");this.timeoutMs=i;this.name="RoutingTimeoutError"}timeoutMs};export{p as a,c as b,b as c,r as d,l as e,d as f,u as g};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.
|
|
2
|
-
import{d as s}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.0");process.exit(0)}
|
|
2
|
+
import{d as s}from"./chunk-ATXAMGVE.js";s();
|