agentic-qe 3.9.20 → 3.9.21
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/skills-manifest.json +1 -1
- package/CHANGELOG.md +24 -0
- package/README.md +39 -0
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/cli/bundle.js +5 -5
- package/dist/cli/chunks/adapter-WOEZOCHJ.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-T5JB3MOF.js → agent-booster-wasm-55SQPP6T.js} +2 -2
- package/dist/cli/chunks/{agent-handler-EASMQSQO.js → agent-handler-Q2UXL73Y.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-7GWN2KCG.js → agent-memory-branch-56GIYNGH.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-5AHKLABJ.js +2 -0
- package/dist/cli/chunks/{audit-VHV4GXPW.js → audit-2JQ3URVN.js} +2 -2
- package/dist/cli/chunks/base-RNCRGTZJ.js +2 -0
- package/dist/cli/chunks/{better-sqlite3-GNK7MDXZ.js → better-sqlite3-XGA7Z5YL.js} +2 -2
- package/dist/cli/chunks/{brain-handler-ALXZKWO4.js → brain-handler-TOOZFEK5.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-JNYLOLMM.js → branch-enumerator-2BLPN73D.js} +2 -2
- package/dist/cli/chunks/{browser-FXRW6LID.js → browser-FSVNN36N.js} +2 -2
- package/dist/cli/chunks/browser-workflow-MXHA63OC.js +2 -0
- package/dist/cli/chunks/{chunk-X3NADG4S.js → chunk-2AEWOQWU.js} +2 -2
- package/dist/cli/chunks/{chunk-T3TEQH2H.js → chunk-34BTSZ5D.js} +1 -1
- package/dist/cli/chunks/{chunk-4IUNBRKQ.js → chunk-3Y7OZ2PC.js} +2 -2
- package/dist/cli/chunks/{chunk-EJQRDMON.js → chunk-44BAZASI.js} +1 -1
- package/dist/cli/chunks/{chunk-ICLWWAGZ.js → chunk-4O7YJIOS.js} +2 -2
- package/dist/cli/chunks/{chunk-IHBRFVGA.js → chunk-4XZPDEK5.js} +1 -1
- package/dist/cli/chunks/{chunk-Z5MG54R4.js → chunk-4Z4C7BXV.js} +1 -1
- package/dist/cli/chunks/{chunk-H647PYXW.js → chunk-4ZUXTOUG.js} +1 -1
- package/dist/cli/chunks/{chunk-P2ABIGYB.js → chunk-56DGV2Q3.js} +1 -1
- package/dist/cli/chunks/{chunk-AFMLL2G3.js → chunk-5EYQP3V3.js} +2 -2
- package/dist/cli/chunks/{chunk-CEVIRL2S.js → chunk-5FNEOJSD.js} +2 -2
- package/dist/cli/chunks/{chunk-DERQRIAR.js → chunk-5PZG4WUA.js} +3 -3
- package/dist/cli/chunks/{chunk-J7SDO52P.js → chunk-63PHZGO2.js} +2 -2
- package/dist/cli/chunks/{chunk-BKGCMWFL.js → chunk-65U55JIH.js} +3 -3
- package/dist/cli/chunks/{chunk-F3PX6EJX.js → chunk-6MGACOLN.js} +1 -1
- package/dist/cli/chunks/{chunk-LSYMQG52.js → chunk-6OYRNNP2.js} +1 -1
- package/dist/cli/chunks/{chunk-7OGFOHG5.js → chunk-7P4IZQVQ.js} +2 -2
- package/dist/cli/chunks/{chunk-WF6MKBRI.js → chunk-ACOEV3YB.js} +2 -2
- package/dist/cli/chunks/{chunk-7Q7SCQMQ.js → chunk-ADC73GLJ.js} +2 -2
- package/dist/cli/chunks/{chunk-3CLKKAGH.js → chunk-AEQNCDYD.js} +2 -2
- package/dist/cli/chunks/chunk-AMOCYHP3.js +2 -0
- package/dist/cli/chunks/{chunk-QLZPCEVI.js → chunk-AT25VXEO.js} +1 -1
- package/dist/cli/chunks/{chunk-BXGAXGME.js → chunk-C4CZXAOE.js} +2 -2
- package/dist/cli/chunks/{chunk-RYBFRFKY.js → chunk-CJKR47YY.js} +1 -1
- package/dist/cli/chunks/{chunk-3GPNZPM4.js → chunk-D24HN6BG.js} +1 -1
- package/dist/cli/chunks/{chunk-5ILP2ZDZ.js → chunk-DBW745QA.js} +2 -2
- package/dist/cli/chunks/{chunk-7Y4QQ6JL.js → chunk-DQI5ZR34.js} +1 -1
- package/dist/cli/chunks/{chunk-NWYYWFUO.js → chunk-E2XIPBJ7.js} +1 -1
- package/dist/cli/chunks/{chunk-2J5OO63R.js → chunk-E55MYZGP.js} +2 -2
- package/dist/cli/chunks/{chunk-ZCH5MNST.js → chunk-E5TGH4V3.js} +2 -2
- package/dist/cli/chunks/{chunk-QAZYSC3T.js → chunk-E7J32PW2.js} +2 -2
- package/dist/cli/chunks/{chunk-KMDZOVCF.js → chunk-ETEV7IZI.js} +1 -1
- package/dist/cli/chunks/{chunk-DSPH4GI3.js → chunk-EVWNZEYV.js} +1 -1
- package/dist/cli/chunks/{chunk-3HQ4VKK6.js → chunk-F4VJ4PPI.js} +47 -47
- package/dist/cli/chunks/{chunk-G7HYTJDG.js → chunk-FBCLQTXO.js} +2 -2
- package/dist/cli/chunks/{chunk-3BFNYFXV.js → chunk-FZ2SYLSK.js} +1 -1
- package/dist/cli/chunks/{chunk-U7RTH6F4.js → chunk-G276EI3G.js} +2 -2
- package/dist/cli/chunks/{chunk-7R45TEY6.js → chunk-G7ZYDJZ3.js} +2 -2
- package/dist/cli/chunks/{chunk-NGWGOMOP.js → chunk-GB6ATLR3.js} +2 -2
- package/dist/cli/chunks/{chunk-NQIOXSHW.js → chunk-GDZ6XQRI.js} +1 -1
- package/dist/cli/chunks/{chunk-4G6OH5LQ.js → chunk-GJGFPXWG.js} +2 -2
- package/dist/cli/chunks/{chunk-K2D5L7YV.js → chunk-GLQ6LLKC.js} +1 -1
- package/dist/cli/chunks/{chunk-XJRXB5Z5.js → chunk-GR4RXQXV.js} +2 -2
- package/dist/cli/chunks/{chunk-RXXKU3VP.js → chunk-HC4VOQZJ.js} +2 -2
- package/dist/cli/chunks/{chunk-O3PLWCCD.js → chunk-HIEP3L7H.js} +2 -2
- package/dist/cli/chunks/{chunk-UAE37LHP.js → chunk-HJCJWPN5.js} +2 -2
- package/dist/cli/chunks/{chunk-QKOPJ5CZ.js → chunk-HMMJ6ZI6.js} +2 -2
- package/dist/cli/chunks/{chunk-SMQ5OARZ.js → chunk-HRHKLRBB.js} +1 -1
- package/dist/cli/chunks/{chunk-MXAEZHW6.js → chunk-I3HLZASP.js} +2 -2
- package/dist/cli/chunks/{chunk-GJACTPDK.js → chunk-ICPQR533.js} +2 -2
- package/dist/cli/chunks/{chunk-LJW7BTMK.js → chunk-IM7X6BDZ.js} +2 -2
- package/dist/cli/chunks/{chunk-UHWRRJBH.js → chunk-IS6IES7Q.js} +1 -1
- package/dist/cli/chunks/{chunk-QMGXALN3.js → chunk-ISNDQOXC.js} +2 -2
- package/dist/cli/chunks/{chunk-UABC2Z3S.js → chunk-J3GG3Q4X.js} +2 -2
- package/dist/cli/chunks/{chunk-T5MMSSSF.js → chunk-KDOA7YHW.js} +2 -2
- package/dist/cli/chunks/{chunk-4HD7YRW7.js → chunk-KENZAFI2.js} +2 -2
- package/dist/cli/chunks/{chunk-MXDGMXJA.js → chunk-KID7PTBZ.js} +2 -2
- package/dist/cli/chunks/{chunk-Y6U4CCPP.js → chunk-KRXJ7LFP.js} +1 -1
- package/dist/cli/chunks/{chunk-LGSPAQSP.js → chunk-KWPPF7O4.js} +2 -2
- package/dist/cli/chunks/{chunk-FUTRX4ZT.js → chunk-KYPN6G7T.js} +2 -2
- package/dist/cli/chunks/{chunk-BJF77EFA.js → chunk-LHXIAPKR.js} +2 -2
- package/dist/cli/chunks/chunk-LP52AQE2.js +2 -0
- package/dist/cli/chunks/{chunk-6R7SJ5FS.js → chunk-LYZUB3NP.js} +1 -1
- package/dist/cli/chunks/{chunk-SL7WTN5Z.js → chunk-MJGMH7TW.js} +2 -2
- package/dist/cli/chunks/{chunk-MIST354H.js → chunk-MYZ43VKA.js} +2 -2
- package/dist/cli/chunks/{chunk-DODH6CEQ.js → chunk-ND2TFQF5.js} +1 -1
- package/dist/cli/chunks/{chunk-CQSME43Z.js → chunk-NGT3VL66.js} +24 -16
- package/dist/cli/chunks/{chunk-AVVRA6FG.js → chunk-NJICCYCB.js} +2 -2
- package/dist/cli/chunks/{chunk-S6SRHNJV.js → chunk-NKOGDRZE.js} +2 -2
- package/dist/cli/chunks/{chunk-Z65DB2Z7.js → chunk-NS2ZWXUK.js} +3 -3
- package/dist/cli/chunks/{chunk-4SBMTHTA.js → chunk-NV6AUEIH.js} +2 -2
- package/dist/cli/chunks/{chunk-3ZHUKLU7.js → chunk-OEB3V633.js} +2 -2
- package/dist/cli/chunks/chunk-OHR5ILR3.js +2 -0
- package/dist/cli/chunks/{chunk-TV5OVFKK.js → chunk-OK5JHHXK.js} +1 -1
- package/dist/cli/chunks/{chunk-OD5SVOVP.js → chunk-OXXCWRFU.js} +1 -1
- package/dist/cli/chunks/{chunk-V5UB75TQ.js → chunk-P4Q5TMDH.js} +2 -2
- package/dist/cli/chunks/{chunk-FPBNTPCM.js → chunk-PAXSPZ3F.js} +2 -2
- package/dist/cli/chunks/{chunk-JCPXG42O.js → chunk-PEOTZFNZ.js} +2 -2
- package/dist/cli/chunks/{chunk-7WXYQDML.js → chunk-PGHTRQK6.js} +2 -2
- package/dist/cli/chunks/{chunk-5GA4BUQU.js → chunk-QERANESS.js} +2 -2
- package/dist/cli/chunks/{chunk-QQMHE4RT.js → chunk-QPSPIESU.js} +2 -2
- package/dist/cli/chunks/{chunk-YPUDYGIU.js → chunk-QREO5LNR.js} +1 -1
- package/dist/cli/chunks/{chunk-GXO42P3X.js → chunk-QSLXOYPR.js} +6 -6
- package/dist/cli/chunks/{chunk-EYSGJZ7Y.js → chunk-QU3VFWZZ.js} +13 -13
- package/dist/cli/chunks/{chunk-VQI6JQQP.js → chunk-RDUIN7LO.js} +1 -1
- package/dist/cli/chunks/{chunk-FAQPPMEC.js → chunk-RHAUASC6.js} +2 -2
- package/dist/cli/chunks/{chunk-KNOZWD6E.js → chunk-RIVX6YLS.js} +2 -2
- package/dist/cli/chunks/{chunk-HXQ7GAUV.js → chunk-ROC2SSV3.js} +3 -3
- package/dist/cli/chunks/{chunk-BIODM56C.js → chunk-S3TU7B7D.js} +2 -2
- package/dist/cli/chunks/{chunk-7J34I3CI.js → chunk-S5RNBBJ6.js} +2 -2
- package/dist/cli/chunks/{chunk-TG6P44UT.js → chunk-S6FFUCVZ.js} +4 -4
- package/dist/cli/chunks/{chunk-WALYYW6B.js → chunk-SIW4N4NE.js} +4 -4
- package/dist/cli/chunks/{chunk-DJCLA5AG.js → chunk-SMAC5IX4.js} +2 -2
- package/dist/cli/chunks/{chunk-NN6VRHNL.js → chunk-SMBQERK7.js} +2 -2
- package/dist/cli/chunks/{chunk-UNAVOVD7.js → chunk-T5Z5LL5Y.js} +3 -3
- package/dist/cli/chunks/{chunk-SGGY4QYU.js → chunk-TCNJ5NGT.js} +2 -2
- package/dist/cli/chunks/{chunk-QMUZMIV7.js → chunk-TFAS5UND.js} +3 -3
- package/dist/cli/chunks/{chunk-SH2UPGO7.js → chunk-TMKJXKY2.js} +2 -2
- package/dist/cli/chunks/{chunk-HCFRGEMK.js → chunk-TOE6DKE4.js} +1 -1
- package/dist/cli/chunks/{chunk-RVWGW7TI.js → chunk-UOLIGPDW.js} +2 -2
- package/dist/cli/chunks/{chunk-FHDYN73D.js → chunk-V5AVC4D4.js} +2 -2
- package/dist/cli/chunks/{chunk-LATJ2LKJ.js → chunk-V6GJ3EMZ.js} +1 -1
- package/dist/cli/chunks/{chunk-CPVGZYEP.js → chunk-VGAG5TG7.js} +1 -1
- package/dist/cli/chunks/{chunk-Q4OITFDX.js → chunk-VQLHHNOH.js} +2 -2
- package/dist/cli/chunks/{chunk-QCLEA3CM.js → chunk-VQXHHEPD.js} +2 -2
- package/dist/cli/chunks/{chunk-SYXPLFK7.js → chunk-WI5HBS3C.js} +2 -2
- package/dist/cli/chunks/{chunk-YPVPWDKL.js → chunk-WL5IRCU4.js} +2 -2
- package/dist/cli/chunks/{chunk-7I6ROJGF.js → chunk-WY3H7VHF.js} +2 -2
- package/dist/cli/chunks/{chunk-6LKEFWKI.js → chunk-XEMVYJ2Z.js} +3 -3
- package/dist/cli/chunks/{chunk-MXHJUAM7.js → chunk-Y36AJ462.js} +2 -2
- package/dist/cli/chunks/{chunk-RCPFDAOC.js → chunk-YH7BAX7S.js} +1 -1
- package/dist/cli/chunks/{chunk-4PNLBMKY.js → chunk-YS5WV3CJ.js} +1 -1
- package/dist/cli/chunks/{chunk-5LM2W3NE.js → chunk-YVG4D6P3.js} +1 -1
- package/dist/cli/chunks/{chunk-ZBBHJGPI.js → chunk-YVPPR33H.js} +2 -2
- package/dist/cli/chunks/{chunk-HW47UOFK.js → chunk-ZUTYZIWQ.js} +2 -2
- package/dist/cli/chunks/{ci-TE3744OR.js → ci-GU2HBK5E.js} +2 -2
- package/dist/cli/chunks/{ci-output-GSNS52SY.js → ci-output-FGZTTY3R.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-7ROW7QBW.js → circuit-breaker-6UNLOLMW.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-Z5GPMILN.js → claude-flow-setup-SCOCIDBC.js} +2 -2
- package/dist/cli/chunks/client-XU3ZUFMH.js +2 -0
- package/dist/cli/chunks/{cline-installer-6D4SAAM4.js → cline-installer-G6PQERGI.js} +2 -2
- package/dist/cli/chunks/{code-JZKH7FRS.js → code-RNKTYBI4.js} +2 -2
- package/dist/cli/chunks/{code-index-extractor-JJFTZLOK.js → code-index-extractor-A6KAUQOU.js} +2 -2
- package/dist/cli/chunks/{codex-installer-O5KIPN3Z.js → codex-installer-ABWDMKEX.js} +2 -2
- package/dist/cli/chunks/{completions-QNMAUYKK.js → completions-TB4E6O46.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-JYJ7TLYE.js → complexity-analyzer-XS37O7OR.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-JYMVLG6S.js → continuedev-installer-WDY6O2SR.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-SSV6GF5G.js → copilot-installer-SDJ3GYLU.js} +2 -2
- package/dist/cli/chunks/{cost-tracker-2VZ3IMJZ.js → cost-tracker-MWEXRK7F.js} +2 -2
- package/dist/cli/chunks/{coverage-KW4V5D5L.js → coverage-Y3KDB56G.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-KKYQWQE7.js +2 -0
- package/dist/cli/chunks/{cursor-installer-QVGDAHOI.js → cursor-installer-4U7XENLX.js} +2 -2
- package/dist/cli/chunks/{daemon-JKMFDYK2.js → daemon-D6R3BPBJ.js} +3 -3
- package/dist/cli/chunks/{dag-attention-scheduler-WKRV7DFE.js → dag-attention-scheduler-EMVUX6ES.js} +2 -2
- package/dist/cli/chunks/{detect-ROCCKX63.js → detect-QIJPCTZO.js} +2 -2
- package/dist/cli/chunks/{dist-node-QGU7TJTW.js → dist-node-4ZYBZKOB.js} +2 -2
- package/dist/cli/chunks/{domain-handler-3UJHQPOR.js → domain-handler-X6CTXJQF.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-R47ISVU5.js → domain-transfer-HK4ER37F.js} +2 -2
- package/dist/cli/chunks/dream-FBYASIID.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-ZVK7WSY2.js → embed-and-insert-pattern-XKTD5DQ3.js} +2 -2
- package/dist/cli/chunks/{eval-WNZWXFOW.js → eval-WEEB3CHY.js} +2 -2
- package/dist/cli/chunks/{fast-paths-QPF47RZJ.js → fast-paths-M2ENEKQX.js} +2 -2
- package/dist/cli/chunks/{feature-flags-PGIG2W3G.js → feature-flags-3WIZC67K.js} +2 -2
- package/dist/cli/chunks/{feature-flags-2MAHHM66.js → feature-flags-CZQXGFGX.js} +2 -2
- package/dist/cli/chunks/{file-discovery-JL6FCXRB.js → file-discovery-ERTPM3C4.js} +2 -2
- package/dist/cli/chunks/{fleet-LMBZU2GU.js → fleet-WBEPTBQR.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-GFNFVEER.js → gnn-wrapper-GVRS33BK.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-YN7ES3AX.js → heartbeat-handler-JQ6NSC6T.js} +4 -4
- package/dist/cli/chunks/{heartbeat-scheduler-SII2KJSQ.js → heartbeat-scheduler-7XHIE6IV.js} +2 -2
- package/dist/cli/chunks/hnsw-adapter-L7QOLNKP.js +2 -0
- package/dist/cli/chunks/hnsw-index-O2YO7WVU.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-CPMBYE7C.js → hnsw-legacy-bridge-TYO6GZ6Z.js} +2 -2
- package/dist/cli/chunks/hnswlib-node-UHEP6UZZ.js +2 -0
- package/dist/cli/chunks/{hooks-EYSB7XDW.js → hooks-2GU7LGNL.js} +10 -10
- package/dist/cli/chunks/{hybrid-router-BR7O6WT2.js → hybrid-router-Z5V4E5SJ.js} +2 -2
- package/dist/cli/chunks/{hypergraph-engine-HAKGWDYX.js → hypergraph-engine-F435AM7S.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-UCI3LXUF.js → hypergraph-handler-DQMYDUQY.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-37TDXM6V.js +2 -0
- package/dist/cli/chunks/{init-handler-7RYGU3W5.js → init-handler-Y4NPRT2W.js} +6 -6
- package/dist/cli/chunks/init-wizard-ONNAHU4H.js +2 -0
- package/dist/cli/chunks/kernel-3S7RJ7PT.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-W6ITMEFA.js → kilocode-installer-EUTWNH4I.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-2BO34D3O.js → kiro-installer-I3ECJ37F.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-GNJMYFT2.js +2 -0
- package/dist/cli/chunks/{learning-GEXYG72Z.js → learning-5FW7N6DA.js} +3 -3
- package/dist/cli/chunks/{llm-router-EGHA5YOC.js → llm-router-ZRYFNNPU.js} +4 -4
- package/dist/cli/chunks/{load-VU2OOAEF.js → load-7BF33NMJ.js} +2 -2
- package/dist/cli/chunks/load-test-ZHTSLJMB.js +2 -0
- package/dist/cli/chunks/{mcp-NVQFFQ2R.js → mcp-7K6P7FMG.js} +2 -2
- package/dist/cli/chunks/{memory-JNXMKTZQ.js → memory-O2DCN3GS.js} +5 -5
- package/dist/cli/chunks/memory-backend-LN6NWT4F.js +2 -0
- package/dist/cli/chunks/{memory-handlers-NLGQ5I7K.js → memory-handlers-WA63DMQ4.js} +2 -2
- package/dist/cli/chunks/{multi-model-executor-SG6OME2A.js → multi-model-executor-SJXBFOK5.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-AY4JCZIM.js → opencode-installer-PE7ZV6SV.js} +2 -2
- package/dist/cli/chunks/{orchestrator-GWI7HQG6.js → orchestrator-N4GT5IGY.js} +5 -5
- package/dist/cli/chunks/{pipeline-7T6IAMC7.js → pipeline-DUTGGNO6.js} +2 -2
- package/dist/cli/chunks/{platform-IXUST66M.js → platform-EGUD7X2R.js} +2 -2
- package/dist/cli/chunks/{plugin-PW7F6MVH.js → plugin-6ZS3HK43.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-BUAZHZCM.js → prime-radiant-advanced-wasm-B5S4RUJS.js} +2 -2
- package/dist/cli/chunks/protocol-executor-ED36SYE4.js +2 -0
- package/dist/cli/chunks/{protocol-handler-6746OC4P.js → protocol-handler-Z3QDY7O6.js} +2 -2
- package/dist/cli/chunks/{prove-VYV5DQGC.js → prove-TQHP2XVD.js} +2 -2
- package/dist/cli/chunks/{provider-manager-GEO3CUOO.js → provider-manager-2JFXKYMZ.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-AC5ZWDAZ.js +2 -0
- package/dist/cli/chunks/{quality-4XXENNNW.js → quality-NXDHVPAS.js} +2 -2
- package/dist/cli/chunks/queen-coordinator-IZ4RQGKV.js +2 -0
- package/dist/cli/chunks/{real-embeddings-ZVEZVXVT.js → real-embeddings-P2LYDBVF.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-ZRNDOIDL.js → roocode-installer-YSRXO4W4.js} +2 -2
- package/dist/cli/chunks/router-DZVPCD7E.js +2 -0
- package/dist/cli/chunks/routing-feedback-3LUE56G4.js +2 -0
- package/dist/cli/chunks/{routing-handler-MPSJ7DDI.js → routing-handler-HVDQQF34.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-V4BVCY2U.js → ruvector-commands-5NJ5FQ3E.js} +2 -2
- package/dist/cli/chunks/{rvf-dual-writer-X4VNU5KH.js → rvf-dual-writer-GZ2HIIKX.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-adapter-KOYYJSNH.js → rvf-migration-adapter-QKEYGJFL.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-coordinator-SF5IBKTK.js → rvf-migration-coordinator-5RBME46Y.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-UTX4WYSI.js +2 -0
- package/dist/cli/chunks/safe-db-PEJN42TX.js +2 -0
- package/dist/cli/chunks/schedule-UULIQP2J.js +2 -0
- package/dist/cli/chunks/scheduler-T57XAXKF.js +2 -0
- package/dist/cli/chunks/{security-AA5GBNNU.js → security-KB4TOOFJ.js} +3 -3
- package/dist/cli/chunks/shared-rvf-adapter-UZVFV2RJ.js +2 -0
- package/dist/cli/chunks/{shared-rvf-dual-writer-EGP3BYIY.js → shared-rvf-dual-writer-UMDFMGVS.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-W7E26KF3.js +2 -0
- package/dist/cli/chunks/{status-handler-ARHPRXJ4.js → status-handler-T53CO6SX.js} +2 -2
- package/dist/cli/chunks/{structural-health-IDV4RBZV.js → structural-health-AVS2GE7S.js} +2 -2
- package/dist/cli/chunks/{sync-7BRLSLDG.js → sync-Q3UHMELK.js} +2 -2
- package/dist/cli/chunks/{task-handler-XY42QA3K.js → task-handler-UAJWNRMS.js} +2 -2
- package/dist/cli/chunks/{task-handlers-QEHOKEJC.js → task-handlers-HYSHMTJN.js} +3 -3
- package/dist/cli/chunks/{test-TQIHDBEX.js → test-GMXM664Y.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-BBVOLGFT.js → test-scheduling-PYU4NLDU.js} +3 -3
- package/dist/cli/chunks/{token-bootstrap-BUHTWVEF.js → token-bootstrap-5SIETJI6.js} +2 -2
- package/dist/cli/chunks/{token-usage-MRVQ7G3H.js → token-usage-3H4KEKTT.js} +2 -2
- package/dist/cli/chunks/{hnswlib-node-NWNBNU3W.js → transformers-ZFPUASV4.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-6GDZQNFV.js → tree-sitter-wasm-parser-X72YXRIP.js} +2 -2
- package/dist/cli/chunks/{types-F2LWFMRI.js → types-CB2HAVZ6.js} +2 -2
- package/dist/cli/chunks/unified-memory-SAIRUPOI.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-NQALAER6.js +2 -0
- package/dist/cli/chunks/unified-persistence-XNGQFWFS.js +2 -0
- package/dist/cli/chunks/{upgrade-N676MSDA.js → upgrade-BWAZTJKE.js} +2 -2
- package/dist/cli/chunks/{validate-56AA6YYM.js → validate-3OVVTWN6.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-YPHV7MMC.js → validate-swarm-WJVG4OUQ.js} +2 -2
- package/dist/cli/chunks/{vibium-ABPFT3DX.js → vibium-IIU2F5HC.js} +2 -2
- package/dist/cli/chunks/visual-security-CE37LMFR.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-KN4PWKMV.js → web-tree-sitter-RO4TKGTV.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-IZOJBDNN.js → windsurf-installer-7N5CZTJS.js} +2 -2
- package/dist/cli/chunks/{witness-chain-H2DM5WMB.js → witness-chain-B4CHDDS5.js} +2 -2
- package/dist/cli/chunks/witness-chain-L2KM336B.js +2 -0
- package/dist/cli/chunks/{workflow-R42PK45F.js → workflow-FKJKW36Z.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-BE5PCEBO.js +2 -0
- package/dist/cli/chunks/{wrappers-6TIJNWN4.js → wrappers-HU3SB4FT.js} +2 -2
- package/dist/domains/code-intelligence/coordinator.js +20 -0
- package/dist/integrations/embeddings/index/HNSWIndex.js +16 -6
- package/dist/integrations/ruvector/hypergraph-engine.d.ts +45 -0
- package/dist/integrations/ruvector/hypergraph-engine.js +102 -0
- package/dist/integrations/ruvector/shared-rvf-adapter.js +110 -2
- package/dist/learning/pattern-store.js +38 -1
- package/dist/mcp/bundle.js +300 -292
- package/package.json +2 -2
- package/scripts/preinstall.cjs +54 -0
- package/dist/cli/chunks/adapter-UOX57IAN.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-KZES2SKE.js +0 -2
- package/dist/cli/chunks/base-7MXMBRSW.js +0 -2
- package/dist/cli/chunks/browser-workflow-4C5R54CZ.js +0 -2
- package/dist/cli/chunks/chunk-35HDLA22.js +0 -2
- package/dist/cli/chunks/chunk-F32R4LVS.js +0 -2
- package/dist/cli/chunks/chunk-ZTWHRDUY.js +0 -2
- package/dist/cli/chunks/client-S5TFLKHN.js +0 -2
- package/dist/cli/chunks/cross-domain-router-GZG5GU7Q.js +0 -2
- package/dist/cli/chunks/dream-PGYTIOQS.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-ANJKCXK6.js +0 -2
- package/dist/cli/chunks/hnsw-index-D4CJEP7L.js +0 -2
- package/dist/cli/chunks/impact-analyzer-55JW3OK6.js +0 -2
- package/dist/cli/chunks/init-wizard-MWKJNVB2.js +0 -2
- package/dist/cli/chunks/kernel-5MKKDS4J.js +0 -2
- package/dist/cli/chunks/knowledge-graph-2A7AE7L7.js +0 -2
- package/dist/cli/chunks/load-test-UD4ZXCGG.js +0 -2
- package/dist/cli/chunks/memory-backend-X3Z4IAYG.js +0 -2
- package/dist/cli/chunks/protocol-executor-AB6KPFK5.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-Y4IDDIYA.js +0 -2
- package/dist/cli/chunks/queen-coordinator-GBSTXGA2.js +0 -2
- package/dist/cli/chunks/router-JA2X4MF6.js +0 -2
- package/dist/cli/chunks/routing-feedback-YCVJIWFM.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-5YN7EEB5.js +0 -2
- package/dist/cli/chunks/safe-db-S46Y7IC5.js +0 -2
- package/dist/cli/chunks/schedule-KSDHFWSY.js +0 -2
- package/dist/cli/chunks/scheduler-PLFJHU54.js +0 -2
- package/dist/cli/chunks/shared-rvf-adapter-MLXVW4N6.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-RK3JWKB4.js +0 -2
- package/dist/cli/chunks/transformers-3PFLFSWR.js +0 -2
- package/dist/cli/chunks/unified-memory-JVZZMZRE.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-EJJHCMFR.js +0 -2
- package/dist/cli/chunks/unified-persistence-IEKOYCBL.js +0 -2
- package/dist/cli/chunks/visual-security-APS7K3TZ.js +0 -2
- package/dist/cli/chunks/witness-chain-DMHO7R75.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-BDHRNVOG.js +0 -2
|
@@ -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.9.
|
|
2
|
-
import{a as ie,b as ae}from"./chunk-AVVRA6FG.js";import{S as oe,i as j,p as q}from"./chunk-4SBMTHTA.js";import{c as g,e as D,g as $}from"./chunk-H647PYXW.js";var I,E=g(()=>{"use strict";I={dimensions:384,M:16,efConstruction:200,efSearch:100,metric:"cosine"}});function se(){if(z)return A!==null;try{let i=(ae(),$(ie));if(A=i.differentiableSearch,P=i.init,P)try{P()}catch{}return z=!0,!0}catch{return z=!0,!1}}function B(i){let e=0;for(let r=0;r<i.length;r++)e+=i[r]*i[r];return Math.sqrt(e)}function ce(i,e,r,t){let n=r*t;if(n===0)return 0;let a=0,o=Math.min(i.length,e.length);for(let c=0;c<o;c++)a+=i[c]*e[c];return a/n}function U(i,e){let r=0,t=Math.min(i.length,e.length);for(let n=0;n<t;n++){let a=i[n]-e[n];r+=a*a}return Math.sqrt(r)}function le(i,e){if(i.length===e)return i;let r=new Float32Array(e);if(i.length>e){let t=i.length/e;for(let n=0;n<e;n++){let a=Math.floor(n*t),o=Math.floor((n+1)*t),c=0;for(let s=a;s<o;s++)c+=i[s];r[n]=c/(o-a)}}else for(let t=0;t<i.length;t++)r[t]=i[t];return r}var A,P,z,S,O=g(()=>{"use strict";E();A=null,P=null,z=!1;S=class{config;entries=[];idToIndex=new Map;hasRuvector=!1;loaded=!1;constructor(e){this.config={...I,...e}}ensureLoaded(){this.loaded||(this.hasRuvector=se(),this.loaded=!0)}normalizeVector(e){return e.length===this.config.dimensions?e:le(e,this.config.dimensions)}add(e,r,t){this.ensureLoaded();let n=this.normalizeVector(r),a=B(n);if(this.idToIndex.has(e)){let c=this.idToIndex.get(e);this.entries[c]={id:e,vector:n,norm:a,metadata:t};return}let o=this.entries.length;this.entries.push({id:e,vector:n,norm:a,metadata:t}),this.idToIndex.set(e,o)}search(e,r){if(this.ensureLoaded(),this.entries.length===0)return[];let t=this.normalizeVector(e),n=B(t),a=Math.min(r,this.entries.length),o=this.entries.length>0?this.entries[0].vector.length:0,c=t.length===o;if(this.config.metric==="cosine")return this.bruteForcSearch(t,n,a);if(this.hasRuvector&&c&&A)try{let s=this.entries.map(u=>u.vector),l=A(t,s,a,1).indices.map(u=>{let h=this.entries[u],m=-U(t,h.vector);return{id:h.id,score:m,metadata:h.metadata}});return l.sort((u,h)=>h.score-u.score),l}catch{}return this.bruteForcSearch(t,n,a)}bruteForcSearch(e,r,t){let n=[];for(let a of this.entries){let o;this.config.metric==="cosine"?o=ce(e,a.vector,r,a.norm):o=-U(e,a.vector),n.push({id:a.id,score:o,metadata:a.metadata})}return n.sort((a,o)=>o.score-a.score),n.slice(0,t)}remove(e){let r=this.idToIndex.get(e);if(r===void 0)return!1;let t=this.entries.length-1;if(r!==t){let n=this.entries[t];this.entries[r]=n,this.idToIndex.set(n.id,r)}return this.entries.pop(),this.idToIndex.delete(e),!0}size(){return this.entries.length}dimensions(){return this.config.dimensions}recall(){return this.hasRuvector,1}isRuvectorAvailable(){return this.ensureLoaded(),this.hasRuvector}getConfig(){return{...this.config}}clear(){this.entries=[],this.idToIndex.clear()}dispose(){this.clear()}}});import{createRequire as he}from"module";function de(){if(K){if(k)return k;throw new b(J??"Unknown load error")}K=!0;try{let i=ue("hnswlib-node");if(!i.HierarchicalNSW)throw new Error("hnswlib-node module missing HierarchicalNSW export");return k=i,k}catch(i){let e=i instanceof Error?i.message:String(i);throw J=e,new b(e)}}function me(i,e){if(i.length===e)return i;let r=new Float32Array(e);if(i.length>e){let t=i.length/e;for(let n=0;n<e;n++){let a=Math.floor(n*t),o=Math.floor((n+1)*t),c=0;for(let s=a;s<o;s++)c+=i[s];r[n]=c/(o-a)}}else for(let t=0;t<i.length;t++)r[t]=i[t];return r}function Q(i){let e=new Array(i.length);for(let r=0;r<i.length;r++)e[r]=i[r];return e}var ue,b,k,K,J,X,H,Y=g(()=>{"use strict";E();ue=he(import.meta.url),b=class extends Error{constructor(e){super(`Native HNSW backend unavailable: ${e}`),this.name="NativeHnswUnavailableError"}},k=null,K=!1,J=null;X=1e4,H=class{config;nativeIndex=null;currentMaxElements=X;liveIds=new Set;metadataStore=new Map;_metrics={totalSearches:0,totalAdds:0,totalRemoves:0,avgSearchLatencyMs:0,maxSearchLatencyMs:0,lastSearchLatencyMs:0,fallbackSearchCount:0,bruteForceSearchCount:0,nativeSearchCount:0,fallbackRate:0,allSearchesBruteForce:!1};constructor(e){this.config={...I,...e},this.nativeIndex=this.createFreshIndex()}createFreshIndex(){let e=de(),r=this.config.metric==="euclidean"?"l2":"cosine";try{let t=new e.HierarchicalNSW(r,this.config.dimensions);return t.initIndex(this.currentMaxElements,this.config.M,this.config.efConstruction,100,!0),t.setEf(this.config.efSearch),t}catch(t){let n=t instanceof Error?t.message:String(t);throw new b(`HierarchicalNSW init failed: ${n}`)}}add(e,r,t){if(!this.nativeIndex)throw new Error("NativeHnswBackend has been disposed");let n=this.normalizeVector(r);if(!this.liveIds.has(e)&&this.liveIds.size>=this.currentMaxElements){let a=this.currentMaxElements*2;this.nativeIndex.resizeIndex(a),this.currentMaxElements=a}this.nativeIndex.addPoint(Q(n),e,!0),this.liveIds.add(e),t?this.metadataStore.set(e,t):this.metadataStore.delete(e),this._metrics.totalAdds++}search(e,r){if(!this.nativeIndex)throw new Error("NativeHnswBackend has been disposed");if(this.liveIds.size===0||r<=0)return[];let t=performance.now(),n=this.normalizeVector(e),a=Math.min(r,this.liveIds.size),o=Math.min(a*2,this.liveIds.size),c=this.nativeIndex.searchKnn(Q(n),o),s=this.config.metric==="cosine",d=new Map;for(let h=0;h<c.neighbors.length;h++){let m=c.neighbors[h];if(!this.liveIds.has(m))continue;let x=c.distances[h],f=s?1-x:-x,W=d.get(m);(W===void 0||f>W.score)&&d.set(m,{id:m,score:f,metadata:this.metadataStore.get(m)})}let l=Array.from(d.values());l.sort((h,m)=>m.score-h.score),l.length>a&&(l.length=a);let u=performance.now()-t;return this.updateSearchMetrics(u),this._metrics.nativeSearchCount=this._metrics.totalSearches,u>50&&console.warn(`[NativeHNSW] search took ${u.toFixed(1)}ms (k=${r}, results=${l.length})`),l}remove(e){if(!this.nativeIndex||!this.liveIds.has(e))return!1;try{this.nativeIndex.markDelete(e)}catch{return!1}return this.liveIds.delete(e),this.metadataStore.delete(e),this._metrics.totalRemoves++,!0}size(){return this.liveIds.size}dimensions(){return this.config.dimensions}recall(){return .99}getMetrics(){return{...this._metrics}}get lastSearchLatencyMs(){return this._metrics.lastSearchLatencyMs}getConfig(){return{...this.config}}clear(){this.nativeIndex&&(this.liveIds.clear(),this.metadataStore.clear(),this.currentMaxElements=X,this.nativeIndex=this.createFreshIndex())}dispose(){this.liveIds.clear(),this.metadataStore.clear(),this.nativeIndex=null}isNativeAvailable(){return this.nativeIndex!==null}normalizeVector(e){return e.length===this.config.dimensions?e:me(e,this.config.dimensions)}updateSearchMetrics(e){this._metrics.totalSearches++,this._metrics.lastSearchLatencyMs=e,e>this._metrics.maxSearchLatencyMs&&(this._metrics.maxSearchLatencyMs=e);let r=this._metrics.totalSearches;this._metrics.avgSearchLatencyMs=this._metrics.avgSearchLatencyMs*((r-1)/r)+e/r}}});function Z(i,e){let r=Array.from({length:e},()=>new Float64Array(e));for(let t=0;t<e;t++){let n=i[t].length;r[t][t]=n;for(let a of i[t])r[t][a]=-1}return r}function N(i,e){let r=e.length,t=new Float64Array(r);for(let n=0;n<r;n++){let a=i[n].length;t[n]=a*e[n];for(let o of i[n])t[n]-=e[o]}return t}function w(i){let e=0;for(let r=0;r<i.length;r++)e+=i[r]*i[r];return Math.sqrt(e)}function R(i){let e=w(i);if(e>0)for(let r=0;r<i.length;r++)i[r]/=e}function v(i,e){let r=0;for(let t=0;t<i.length;t++)r+=i[t]*e[t];for(let t=0;t<i.length;t++)i[t]-=r*e[t]}function y(i,e,r=100,t=1e-6){if(e<=1)return 0;if(e===2)return i[0].includes(1)?2:0;let n=new Float64Array(e).fill(1/Math.sqrt(e)),a=new Float64Array(e);for(let l=0;l<e;l++)a[l]=Math.random()-.5;v(a,n),R(a);let o=0;for(let l=0;l<30;l++){let u=N(i,a);if(v(u,n),o=w(u),o>0)for(let h=0;h<e;h++)a[h]=u[h]/o}if(o<t)return 0;let c=new Float64Array(e);for(let l=0;l<e;l++)c[l]=Math.random()-.5;v(c,n),R(c);let s=0;for(let l=0;l<r;l++){let u=N(i,c),h=new Float64Array(e);for(let f=0;f<e;f++)h[f]=o*c[f]-u[f];v(h,n);let m=w(h);if(m<t)break;let x=m;for(let f=0;f<e;f++)c[f]=h[f]/m;if(Math.abs(x-s)<t)break;s=x}let d=o-s;return Math.max(0,d)}function F(i,e,r=100,t=1e-6){return y(i,e,r,t)}function C(i,e,r=50,t){if(e<=1)return 0;let n=t??y(i,e);if(n<1e-10)return 1/0;let o=2*Math.max(...i.map(d=>d.length),1),s=2*(Math.log(o/n)/(o-n));return Math.max(0,s)}function M(i,e,r){let t=1-Math.exp(-i/.05),n=1-Math.exp(-e/.5),a=r===1/0?0:1/(1+r/5),o=.4*t+.3*n+.3*a;return Math.max(0,Math.min(1,o))}var _=g(()=>{"use strict"});var re={};D(re,{ALERT_THRESHOLDS:()=>fe,DEFAULT_HNSW_HEALTH_CONFIG:()=>ee,HnswHealthMonitor:()=>L,_resetNativeLoader:()=>be,approximateFiedlerValue:()=>y,approximateSpectralGap:()=>F,buildAdjacencyFromIndex:()=>te,buildLaplacian:()=>Z,computeCoherenceScore:()=>M,createHnswHealthMonitor:()=>ge,deflateVector:()=>v,estimateEffectiveResistance:()=>C,laplacianMultiply:()=>N,normalizeInPlace:()=>R,vectorNorm:()=>w});function pe(){return V?T:(V=!0,T=null,null)}function be(){T=null,V=!1}function te(i,e=16,r){let t=i.size();if(t===0)return{adjacency:[],nodeCount:0,adjacencySource:"approximate"};let n=Array.from({length:t},()=>[]),a=Math.min(e,t-1);if(a===0)return{adjacency:n,nodeCount:t,adjacencySource:"approximate"};if(r&&r.size>0){let o=Array.from(r.keys()).slice(0,t),c=new Map;for(let s=0;s<o.length;s++)c.set(o[s],s);for(let s=0;s<o.length;s++){let d=r.get(o[s]);if(!d)continue;let l=i.search(d,a+1);for(let u of l){if(u.id===o[s])continue;let h=c.get(u.id);h!==void 0&&(n[s].includes(h)||n[s].push(h),n[h].includes(s)||n[h].push(s))}}return{adjacency:n,nodeCount:t,adjacencySource:"actual-search"}}console.warn("[HnswHealthMonitor] No stored vectors provided \u2014 using approximate circular adjacency. Pass stored vectors for accurate health metrics.");for(let o=0;o<t;o++)for(let c=0;c<a;c++){let s=(o+c+1)%t;n[o].includes(s)||n[o].push(s),n[s].includes(o)||n[s].push(o)}return{adjacency:n,nodeCount:t,adjacencySource:"approximate"}}function ge(i){return new L(i)}var ee,fe,T,V,L,ne=g(()=>{"use strict";_();_();ee={fiedlerThreshold:.01,spectralGapThreshold:.1,resistanceThreshold:10,coherenceThreshold:.3,maxPowerIterations:100,convergenceTolerance:1e-6,resistanceSampleSize:50,maxHistoryEntries:200,minIndexSize:3},fe={FragileIndex:.01,PoorExpansion:.1,HighResistance:10,LowCoherence:.3},T=null,V=!1;L=class{config;alerts=[];history=[];lastReport=null;useNative=!1;nativeChecked=!1;constructor(e){this.config={...ee,...e}}checkHealth(e){let r=performance.now(),t=e.size();if(t<this.config.minIndexSize)return this.createSmallIndexReport(t,performance.now()-r);this.nativeChecked||(this.nativeChecked=!0,this.useNative=pe()!==null);let{adjacency:n,nodeCount:a,adjacencySource:o}=te(e),c=this.useNative?this.computeNativeMetrics(n):this.computeApproximateMetrics(n,a),s=this.generateAlerts(c);this.alerts.length=0,this.alerts.push(...s);let d=performance.now()-r,l={healthy:s.length===0,metrics:c,alerts:s,indexSize:t,usedNativeBackend:this.useNative,adjacencySource:o,checkDurationMs:d,checkedAt:new Date};return this.addHistoryPoint({coherenceScore:c.coherenceScore,fiedlerValue:c.fiedlerValue,indexSize:t,healthy:l.healthy,timestamp:l.checkedAt}),this.lastReport=l,l}getAlerts(){return[...this.alerts]}getMetricsHistory(e){let r=[...this.history];return e!==void 0&&e<r.length?r.slice(-e):r}isHealthy(){return this.lastReport===null?!0:this.lastReport.healthy}getLastReport(){return this.lastReport}clearHistory(){this.history.length=0,this.alerts.length=0,this.lastReport=null}computeNativeMetrics(e){let r=T,t=r.computeFiedlerValue(e),n=r.computeSpectralGap(e),a=r.computeEffectiveResistance(e),o=M(t,n,a);return{fiedlerValue:t,spectralGap:n,effectiveResistance:a,coherenceScore:o}}computeApproximateMetrics(e,r){let t=y(e,r,this.config.maxPowerIterations,this.config.convergenceTolerance),n=F(e,r,this.config.maxPowerIterations,this.config.convergenceTolerance),a=C(e,r,this.config.resistanceSampleSize,t),o=M(t,n,a);return{fiedlerValue:t,spectralGap:n,effectiveResistance:a,coherenceScore:o}}generateAlerts(e){let r=[],t=new Date;return e.fiedlerValue<this.config.fiedlerThreshold&&r.push({type:"FragileIndex",message:`Fiedler value ${e.fiedlerValue.toFixed(6)} is below threshold ${this.config.fiedlerThreshold}. The index graph has weak algebraic connectivity.`,value:e.fiedlerValue,threshold:this.config.fiedlerThreshold,timestamp:t}),e.spectralGap<this.config.spectralGapThreshold&&r.push({type:"PoorExpansion",message:`Spectral gap ${e.spectralGap.toFixed(6)} is below threshold ${this.config.spectralGapThreshold}. The index graph has poor expansion properties.`,value:e.spectralGap,threshold:this.config.spectralGapThreshold,timestamp:t}),e.effectiveResistance>this.config.resistanceThreshold&&r.push({type:"HighResistance",message:`Average effective resistance ${e.effectiveResistance.toFixed(4)} exceeds threshold ${this.config.resistanceThreshold}. Nodes are poorly connected.`,value:e.effectiveResistance,threshold:this.config.resistanceThreshold,timestamp:t}),e.coherenceScore<this.config.coherenceThreshold&&r.push({type:"LowCoherence",message:`Coherence score ${e.coherenceScore.toFixed(4)} is below threshold ${this.config.coherenceThreshold}. Overall index health is degraded.`,value:e.coherenceScore,threshold:this.config.coherenceThreshold,timestamp:t}),r}createSmallIndexReport(e,r){let t={fiedlerValue:e>0?1:0,spectralGap:e>0?1:0,effectiveResistance:e>0?.5:0,coherenceScore:e>0?1:0},n={healthy:!0,metrics:t,alerts:[],indexSize:e,usedNativeBackend:!1,adjacencySource:"approximate",checkDurationMs:r,checkedAt:new Date};return this.addHistoryPoint({coherenceScore:t.coherenceScore,fiedlerValue:t.fiedlerValue,indexSize:e,healthy:!0,timestamp:n.checkedAt}),this.lastReport=n,n}addHistoryPoint(e){this.history.push(e),this.history.length>this.config.maxHistoryEntries&&this.history.splice(0,this.history.length-this.config.maxHistoryEntries)}}});var ye={};D(ye,{HnswAdapter:()=>G});var ve,p,G,xe=g(()=>{O();Y();oe();ve={patterns:{dimensions:384,M:16,efConstruction:200,efSearch:100,metric:"cosine"},"qe-memory":{dimensions:384,M:16,efConstruction:200,efSearch:100,metric:"cosine"},learning:{dimensions:384,M:16,efConstruction:200,efSearch:50,metric:"cosine"},coverage:{dimensions:384,M:16,efConstruction:200,efSearch:100,metric:"cosine"}},p=new Map,G=class i{backend;_isNativeBackend;indexName;stringToNumericId=new Map;numericToStringId=new Map;nextAutoId=0;healthMonitor=null;healthMonitorLoaded=!1;operationsSinceLastCheck=0;healthCheckFrequency=100;lastHealthReport=null;constructor(e,r){this.indexName=e;let n={...ve[e]??{},...r},{backend:a,isNative:o}=i.createBackend(n);this.backend=a,this._isNativeBackend=o}add(e,r,t){this.backend.add(e,r,t),this.maybeRunHealthCheck()}search(e,r){let t=performance.now(),n=this.backend.search(e,r),a=performance.now()-t;return a>50&&console.warn(`[HNSW] search took ${a.toFixed(1)}ms (k=${r}, results=${n.length})`),this._lastSearchLatencyMs=a,n}_lastSearchLatencyMs=0;get lastSearchLatencyMs(){return this._lastSearchLatencyMs}remove(e){return this.backend.remove(e)}size(){return this.backend.size()}dimensions(){return this.backend.dimensions()}recall(){return this.backend.recall()}addByStringId(e,r){let t=this.stringToNumericId.get(e);t!==void 0?this.backend.remove(t):(t=this.nextAutoId++,this.stringToNumericId.set(e,t),this.numericToStringId.set(t,e)),this.backend.add(t,new Float32Array(r))}searchByArray(e,r){return this.backend.search(new Float32Array(e),r).map(n=>({id:this.numericToStringId.get(n.id)??String(n.id),score:n.score}))}removeByStringId(e){let r=this.stringToNumericId.get(e);if(r===void 0)return!1;let t=this.backend.remove(r);return t&&(this.stringToNumericId.delete(e),this.numericToStringId.delete(r)),t}clear(){this.backend.clear?.(),this.stringToNumericId.clear(),this.numericToStringId.clear(),this.nextAutoId=0}dispose(){try{this.backend.dispose?.()}catch{}this.stringToNumericId.clear(),this.numericToStringId.clear(),this.nextAutoId=0}isRuvectorAvailable(){return this.backend instanceof S?this.backend.isRuvectorAvailable():this.backend instanceof H?this.backend.isNativeAvailable():!1}isNativeBackend(){return this._isNativeBackend}getName(){return this.indexName}setHealthCheckFrequency(e){this.healthCheckFrequency=Math.max(1,e)}getHealthCheckFrequency(){return this.healthCheckFrequency}getLastHealthReport(){return this.lastHealthReport}getHealthMonitor(){return this.healthMonitor}maybeRunHealthCheck(){if(q()&&(this.operationsSinceLastCheck++,!(this.operationsSinceLastCheck<this.healthCheckFrequency)&&(this.operationsSinceLastCheck=0,this.ensureHealthMonitor(),this.healthMonitor)))try{this.lastHealthReport=this.healthMonitor.checkHealth(this.backend),this.lastHealthReport.healthy||console.warn(`[HNSW-Health] Index "${this.indexName}" health check failed: ${this.lastHealthReport.alerts.length} alert(s). Coherence: ${this.lastHealthReport.metrics.coherenceScore.toFixed(3)}`)}catch(e){console.warn(`[HNSW-Health] Health check error for "${this.indexName}":`,e)}}ensureHealthMonitor(){if(!this.healthMonitorLoaded){this.healthMonitorLoaded=!0;try{let e=(ne(),$(re));this.healthMonitor=e.createHnswHealthMonitor()}catch(e){process.env.DEBUG&&console.debug("[HNSW-Health] Monitor module unavailable:",e instanceof Error?e.message:e),this.healthMonitor=null}}}static createBackend(e){if(j())try{return{backend:new H(e),isNative:!0}}catch(r){r instanceof b?console.info(`[HNSW] Native backend unavailable, falling back to JS: ${r.message}`):console.warn("[HNSW] Unexpected error creating native backend, falling back to JS:",r)}return{backend:new S(e),isNative:!1}}static create(e,r){let t=p.get(e);if(t instanceof i)return t;let n=new i(e,r);return p.set(e,n),n}static get(e){let r=p.get(e);return r instanceof i?r:void 0}static close(e){let r=p.get(e);r instanceof i&&r.dispose(),p.delete(e)}static closeAll(){for(let[e]of p)i.close(e);p.clear()}static listIndexes(){return Array.from(p.keys())}}});export{G as a,ye as b,xe as c};
|
|
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.9.21");process.exit(0)}
|
|
2
|
+
import{a as ie,b as ae}from"./chunk-NJICCYCB.js";import{S as oe,i as j,p as q}from"./chunk-NV6AUEIH.js";import{c as g,e as D,g as $}from"./chunk-4ZUXTOUG.js";var I,E=g(()=>{"use strict";I={dimensions:384,M:16,efConstruction:200,efSearch:100,metric:"cosine"}});function se(){if(z)return A!==null;try{let i=(ae(),$(ie));if(A=i.differentiableSearch,P=i.init,P)try{P()}catch{}return z=!0,!0}catch{return z=!0,!1}}function B(i){let e=0;for(let r=0;r<i.length;r++)e+=i[r]*i[r];return Math.sqrt(e)}function ce(i,e,r,t){let n=r*t;if(n===0)return 0;let a=0,o=Math.min(i.length,e.length);for(let c=0;c<o;c++)a+=i[c]*e[c];return a/n}function U(i,e){let r=0,t=Math.min(i.length,e.length);for(let n=0;n<t;n++){let a=i[n]-e[n];r+=a*a}return Math.sqrt(r)}function le(i,e){if(i.length===e)return i;let r=new Float32Array(e);if(i.length>e){let t=i.length/e;for(let n=0;n<e;n++){let a=Math.floor(n*t),o=Math.floor((n+1)*t),c=0;for(let s=a;s<o;s++)c+=i[s];r[n]=c/(o-a)}}else for(let t=0;t<i.length;t++)r[t]=i[t];return r}var A,P,z,S,O=g(()=>{"use strict";E();A=null,P=null,z=!1;S=class{config;entries=[];idToIndex=new Map;hasRuvector=!1;loaded=!1;constructor(e){this.config={...I,...e}}ensureLoaded(){this.loaded||(this.hasRuvector=se(),this.loaded=!0)}normalizeVector(e){return e.length===this.config.dimensions?e:le(e,this.config.dimensions)}add(e,r,t){this.ensureLoaded();let n=this.normalizeVector(r),a=B(n);if(this.idToIndex.has(e)){let c=this.idToIndex.get(e);this.entries[c]={id:e,vector:n,norm:a,metadata:t};return}let o=this.entries.length;this.entries.push({id:e,vector:n,norm:a,metadata:t}),this.idToIndex.set(e,o)}search(e,r){if(this.ensureLoaded(),this.entries.length===0)return[];let t=this.normalizeVector(e),n=B(t),a=Math.min(r,this.entries.length),o=this.entries.length>0?this.entries[0].vector.length:0,c=t.length===o;if(this.config.metric==="cosine")return this.bruteForcSearch(t,n,a);if(this.hasRuvector&&c&&A)try{let s=this.entries.map(u=>u.vector),l=A(t,s,a,1).indices.map(u=>{let h=this.entries[u],m=-U(t,h.vector);return{id:h.id,score:m,metadata:h.metadata}});return l.sort((u,h)=>h.score-u.score),l}catch{}return this.bruteForcSearch(t,n,a)}bruteForcSearch(e,r,t){let n=[];for(let a of this.entries){let o;this.config.metric==="cosine"?o=ce(e,a.vector,r,a.norm):o=-U(e,a.vector),n.push({id:a.id,score:o,metadata:a.metadata})}return n.sort((a,o)=>o.score-a.score),n.slice(0,t)}remove(e){let r=this.idToIndex.get(e);if(r===void 0)return!1;let t=this.entries.length-1;if(r!==t){let n=this.entries[t];this.entries[r]=n,this.idToIndex.set(n.id,r)}return this.entries.pop(),this.idToIndex.delete(e),!0}size(){return this.entries.length}dimensions(){return this.config.dimensions}recall(){return this.hasRuvector,1}isRuvectorAvailable(){return this.ensureLoaded(),this.hasRuvector}getConfig(){return{...this.config}}clear(){this.entries=[],this.idToIndex.clear()}dispose(){this.clear()}}});import{createRequire as he}from"module";function de(){if(K){if(k)return k;throw new b(J??"Unknown load error")}K=!0;try{let i=ue("hnswlib-node");if(!i.HierarchicalNSW)throw new Error("hnswlib-node module missing HierarchicalNSW export");return k=i,k}catch(i){let e=i instanceof Error?i.message:String(i);throw J=e,new b(e)}}function me(i,e){if(i.length===e)return i;let r=new Float32Array(e);if(i.length>e){let t=i.length/e;for(let n=0;n<e;n++){let a=Math.floor(n*t),o=Math.floor((n+1)*t),c=0;for(let s=a;s<o;s++)c+=i[s];r[n]=c/(o-a)}}else for(let t=0;t<i.length;t++)r[t]=i[t];return r}function Q(i){let e=new Array(i.length);for(let r=0;r<i.length;r++)e[r]=i[r];return e}var ue,b,k,K,J,X,H,Y=g(()=>{"use strict";E();ue=he(import.meta.url),b=class extends Error{constructor(e){super(`Native HNSW backend unavailable: ${e}`),this.name="NativeHnswUnavailableError"}},k=null,K=!1,J=null;X=1e4,H=class{config;nativeIndex=null;currentMaxElements=X;liveIds=new Set;metadataStore=new Map;_metrics={totalSearches:0,totalAdds:0,totalRemoves:0,avgSearchLatencyMs:0,maxSearchLatencyMs:0,lastSearchLatencyMs:0,fallbackSearchCount:0,bruteForceSearchCount:0,nativeSearchCount:0,fallbackRate:0,allSearchesBruteForce:!1};constructor(e){this.config={...I,...e},this.nativeIndex=this.createFreshIndex()}createFreshIndex(){let e=de(),r=this.config.metric==="euclidean"?"l2":"cosine";try{let t=new e.HierarchicalNSW(r,this.config.dimensions);return t.initIndex(this.currentMaxElements,this.config.M,this.config.efConstruction,100,!0),t.setEf(this.config.efSearch),t}catch(t){let n=t instanceof Error?t.message:String(t);throw new b(`HierarchicalNSW init failed: ${n}`)}}add(e,r,t){if(!this.nativeIndex)throw new Error("NativeHnswBackend has been disposed");let n=this.normalizeVector(r);if(!this.liveIds.has(e)&&this.liveIds.size>=this.currentMaxElements){let a=this.currentMaxElements*2;this.nativeIndex.resizeIndex(a),this.currentMaxElements=a}this.nativeIndex.addPoint(Q(n),e,!0),this.liveIds.add(e),t?this.metadataStore.set(e,t):this.metadataStore.delete(e),this._metrics.totalAdds++}search(e,r){if(!this.nativeIndex)throw new Error("NativeHnswBackend has been disposed");if(this.liveIds.size===0||r<=0)return[];let t=performance.now(),n=this.normalizeVector(e),a=Math.min(r,this.liveIds.size),o=Math.min(a*2,this.liveIds.size),c=this.nativeIndex.searchKnn(Q(n),o),s=this.config.metric==="cosine",d=new Map;for(let h=0;h<c.neighbors.length;h++){let m=c.neighbors[h];if(!this.liveIds.has(m))continue;let x=c.distances[h],f=s?1-x:-x,W=d.get(m);(W===void 0||f>W.score)&&d.set(m,{id:m,score:f,metadata:this.metadataStore.get(m)})}let l=Array.from(d.values());l.sort((h,m)=>m.score-h.score),l.length>a&&(l.length=a);let u=performance.now()-t;return this.updateSearchMetrics(u),this._metrics.nativeSearchCount=this._metrics.totalSearches,u>50&&console.warn(`[NativeHNSW] search took ${u.toFixed(1)}ms (k=${r}, results=${l.length})`),l}remove(e){if(!this.nativeIndex||!this.liveIds.has(e))return!1;try{this.nativeIndex.markDelete(e)}catch{return!1}return this.liveIds.delete(e),this.metadataStore.delete(e),this._metrics.totalRemoves++,!0}size(){return this.liveIds.size}dimensions(){return this.config.dimensions}recall(){return .99}getMetrics(){return{...this._metrics}}get lastSearchLatencyMs(){return this._metrics.lastSearchLatencyMs}getConfig(){return{...this.config}}clear(){this.nativeIndex&&(this.liveIds.clear(),this.metadataStore.clear(),this.currentMaxElements=X,this.nativeIndex=this.createFreshIndex())}dispose(){this.liveIds.clear(),this.metadataStore.clear(),this.nativeIndex=null}isNativeAvailable(){return this.nativeIndex!==null}normalizeVector(e){return e.length===this.config.dimensions?e:me(e,this.config.dimensions)}updateSearchMetrics(e){this._metrics.totalSearches++,this._metrics.lastSearchLatencyMs=e,e>this._metrics.maxSearchLatencyMs&&(this._metrics.maxSearchLatencyMs=e);let r=this._metrics.totalSearches;this._metrics.avgSearchLatencyMs=this._metrics.avgSearchLatencyMs*((r-1)/r)+e/r}}});function Z(i,e){let r=Array.from({length:e},()=>new Float64Array(e));for(let t=0;t<e;t++){let n=i[t].length;r[t][t]=n;for(let a of i[t])r[t][a]=-1}return r}function N(i,e){let r=e.length,t=new Float64Array(r);for(let n=0;n<r;n++){let a=i[n].length;t[n]=a*e[n];for(let o of i[n])t[n]-=e[o]}return t}function w(i){let e=0;for(let r=0;r<i.length;r++)e+=i[r]*i[r];return Math.sqrt(e)}function R(i){let e=w(i);if(e>0)for(let r=0;r<i.length;r++)i[r]/=e}function v(i,e){let r=0;for(let t=0;t<i.length;t++)r+=i[t]*e[t];for(let t=0;t<i.length;t++)i[t]-=r*e[t]}function y(i,e,r=100,t=1e-6){if(e<=1)return 0;if(e===2)return i[0].includes(1)?2:0;let n=new Float64Array(e).fill(1/Math.sqrt(e)),a=new Float64Array(e);for(let l=0;l<e;l++)a[l]=Math.random()-.5;v(a,n),R(a);let o=0;for(let l=0;l<30;l++){let u=N(i,a);if(v(u,n),o=w(u),o>0)for(let h=0;h<e;h++)a[h]=u[h]/o}if(o<t)return 0;let c=new Float64Array(e);for(let l=0;l<e;l++)c[l]=Math.random()-.5;v(c,n),R(c);let s=0;for(let l=0;l<r;l++){let u=N(i,c),h=new Float64Array(e);for(let f=0;f<e;f++)h[f]=o*c[f]-u[f];v(h,n);let m=w(h);if(m<t)break;let x=m;for(let f=0;f<e;f++)c[f]=h[f]/m;if(Math.abs(x-s)<t)break;s=x}let d=o-s;return Math.max(0,d)}function F(i,e,r=100,t=1e-6){return y(i,e,r,t)}function C(i,e,r=50,t){if(e<=1)return 0;let n=t??y(i,e);if(n<1e-10)return 1/0;let o=2*Math.max(...i.map(d=>d.length),1),s=2*(Math.log(o/n)/(o-n));return Math.max(0,s)}function M(i,e,r){let t=1-Math.exp(-i/.05),n=1-Math.exp(-e/.5),a=r===1/0?0:1/(1+r/5),o=.4*t+.3*n+.3*a;return Math.max(0,Math.min(1,o))}var _=g(()=>{"use strict"});var re={};D(re,{ALERT_THRESHOLDS:()=>fe,DEFAULT_HNSW_HEALTH_CONFIG:()=>ee,HnswHealthMonitor:()=>L,_resetNativeLoader:()=>be,approximateFiedlerValue:()=>y,approximateSpectralGap:()=>F,buildAdjacencyFromIndex:()=>te,buildLaplacian:()=>Z,computeCoherenceScore:()=>M,createHnswHealthMonitor:()=>ge,deflateVector:()=>v,estimateEffectiveResistance:()=>C,laplacianMultiply:()=>N,normalizeInPlace:()=>R,vectorNorm:()=>w});function pe(){return V?T:(V=!0,T=null,null)}function be(){T=null,V=!1}function te(i,e=16,r){let t=i.size();if(t===0)return{adjacency:[],nodeCount:0,adjacencySource:"approximate"};let n=Array.from({length:t},()=>[]),a=Math.min(e,t-1);if(a===0)return{adjacency:n,nodeCount:t,adjacencySource:"approximate"};if(r&&r.size>0){let o=Array.from(r.keys()).slice(0,t),c=new Map;for(let s=0;s<o.length;s++)c.set(o[s],s);for(let s=0;s<o.length;s++){let d=r.get(o[s]);if(!d)continue;let l=i.search(d,a+1);for(let u of l){if(u.id===o[s])continue;let h=c.get(u.id);h!==void 0&&(n[s].includes(h)||n[s].push(h),n[h].includes(s)||n[h].push(s))}}return{adjacency:n,nodeCount:t,adjacencySource:"actual-search"}}console.warn("[HnswHealthMonitor] No stored vectors provided \u2014 using approximate circular adjacency. Pass stored vectors for accurate health metrics.");for(let o=0;o<t;o++)for(let c=0;c<a;c++){let s=(o+c+1)%t;n[o].includes(s)||n[o].push(s),n[s].includes(o)||n[s].push(o)}return{adjacency:n,nodeCount:t,adjacencySource:"approximate"}}function ge(i){return new L(i)}var ee,fe,T,V,L,ne=g(()=>{"use strict";_();_();ee={fiedlerThreshold:.01,spectralGapThreshold:.1,resistanceThreshold:10,coherenceThreshold:.3,maxPowerIterations:100,convergenceTolerance:1e-6,resistanceSampleSize:50,maxHistoryEntries:200,minIndexSize:3},fe={FragileIndex:.01,PoorExpansion:.1,HighResistance:10,LowCoherence:.3},T=null,V=!1;L=class{config;alerts=[];history=[];lastReport=null;useNative=!1;nativeChecked=!1;constructor(e){this.config={...ee,...e}}checkHealth(e){let r=performance.now(),t=e.size();if(t<this.config.minIndexSize)return this.createSmallIndexReport(t,performance.now()-r);this.nativeChecked||(this.nativeChecked=!0,this.useNative=pe()!==null);let{adjacency:n,nodeCount:a,adjacencySource:o}=te(e),c=this.useNative?this.computeNativeMetrics(n):this.computeApproximateMetrics(n,a),s=this.generateAlerts(c);this.alerts.length=0,this.alerts.push(...s);let d=performance.now()-r,l={healthy:s.length===0,metrics:c,alerts:s,indexSize:t,usedNativeBackend:this.useNative,adjacencySource:o,checkDurationMs:d,checkedAt:new Date};return this.addHistoryPoint({coherenceScore:c.coherenceScore,fiedlerValue:c.fiedlerValue,indexSize:t,healthy:l.healthy,timestamp:l.checkedAt}),this.lastReport=l,l}getAlerts(){return[...this.alerts]}getMetricsHistory(e){let r=[...this.history];return e!==void 0&&e<r.length?r.slice(-e):r}isHealthy(){return this.lastReport===null?!0:this.lastReport.healthy}getLastReport(){return this.lastReport}clearHistory(){this.history.length=0,this.alerts.length=0,this.lastReport=null}computeNativeMetrics(e){let r=T,t=r.computeFiedlerValue(e),n=r.computeSpectralGap(e),a=r.computeEffectiveResistance(e),o=M(t,n,a);return{fiedlerValue:t,spectralGap:n,effectiveResistance:a,coherenceScore:o}}computeApproximateMetrics(e,r){let t=y(e,r,this.config.maxPowerIterations,this.config.convergenceTolerance),n=F(e,r,this.config.maxPowerIterations,this.config.convergenceTolerance),a=C(e,r,this.config.resistanceSampleSize,t),o=M(t,n,a);return{fiedlerValue:t,spectralGap:n,effectiveResistance:a,coherenceScore:o}}generateAlerts(e){let r=[],t=new Date;return e.fiedlerValue<this.config.fiedlerThreshold&&r.push({type:"FragileIndex",message:`Fiedler value ${e.fiedlerValue.toFixed(6)} is below threshold ${this.config.fiedlerThreshold}. The index graph has weak algebraic connectivity.`,value:e.fiedlerValue,threshold:this.config.fiedlerThreshold,timestamp:t}),e.spectralGap<this.config.spectralGapThreshold&&r.push({type:"PoorExpansion",message:`Spectral gap ${e.spectralGap.toFixed(6)} is below threshold ${this.config.spectralGapThreshold}. The index graph has poor expansion properties.`,value:e.spectralGap,threshold:this.config.spectralGapThreshold,timestamp:t}),e.effectiveResistance>this.config.resistanceThreshold&&r.push({type:"HighResistance",message:`Average effective resistance ${e.effectiveResistance.toFixed(4)} exceeds threshold ${this.config.resistanceThreshold}. Nodes are poorly connected.`,value:e.effectiveResistance,threshold:this.config.resistanceThreshold,timestamp:t}),e.coherenceScore<this.config.coherenceThreshold&&r.push({type:"LowCoherence",message:`Coherence score ${e.coherenceScore.toFixed(4)} is below threshold ${this.config.coherenceThreshold}. Overall index health is degraded.`,value:e.coherenceScore,threshold:this.config.coherenceThreshold,timestamp:t}),r}createSmallIndexReport(e,r){let t={fiedlerValue:e>0?1:0,spectralGap:e>0?1:0,effectiveResistance:e>0?.5:0,coherenceScore:e>0?1:0},n={healthy:!0,metrics:t,alerts:[],indexSize:e,usedNativeBackend:!1,adjacencySource:"approximate",checkDurationMs:r,checkedAt:new Date};return this.addHistoryPoint({coherenceScore:t.coherenceScore,fiedlerValue:t.fiedlerValue,indexSize:e,healthy:!0,timestamp:n.checkedAt}),this.lastReport=n,n}addHistoryPoint(e){this.history.push(e),this.history.length>this.config.maxHistoryEntries&&this.history.splice(0,this.history.length-this.config.maxHistoryEntries)}}});var ye={};D(ye,{HnswAdapter:()=>G});var ve,p,G,xe=g(()=>{O();Y();oe();ve={patterns:{dimensions:384,M:16,efConstruction:200,efSearch:100,metric:"cosine"},"qe-memory":{dimensions:384,M:16,efConstruction:200,efSearch:100,metric:"cosine"},learning:{dimensions:384,M:16,efConstruction:200,efSearch:50,metric:"cosine"},coverage:{dimensions:384,M:16,efConstruction:200,efSearch:100,metric:"cosine"}},p=new Map,G=class i{backend;_isNativeBackend;indexName;stringToNumericId=new Map;numericToStringId=new Map;nextAutoId=0;healthMonitor=null;healthMonitorLoaded=!1;operationsSinceLastCheck=0;healthCheckFrequency=100;lastHealthReport=null;constructor(e,r){this.indexName=e;let n={...ve[e]??{},...r},{backend:a,isNative:o}=i.createBackend(n);this.backend=a,this._isNativeBackend=o}add(e,r,t){this.backend.add(e,r,t),this.maybeRunHealthCheck()}search(e,r){let t=performance.now(),n=this.backend.search(e,r),a=performance.now()-t;return a>50&&console.warn(`[HNSW] search took ${a.toFixed(1)}ms (k=${r}, results=${n.length})`),this._lastSearchLatencyMs=a,n}_lastSearchLatencyMs=0;get lastSearchLatencyMs(){return this._lastSearchLatencyMs}remove(e){return this.backend.remove(e)}size(){return this.backend.size()}dimensions(){return this.backend.dimensions()}recall(){return this.backend.recall()}addByStringId(e,r){let t=this.stringToNumericId.get(e);t!==void 0?this.backend.remove(t):(t=this.nextAutoId++,this.stringToNumericId.set(e,t),this.numericToStringId.set(t,e)),this.backend.add(t,new Float32Array(r))}searchByArray(e,r){return this.backend.search(new Float32Array(e),r).map(n=>({id:this.numericToStringId.get(n.id)??String(n.id),score:n.score}))}removeByStringId(e){let r=this.stringToNumericId.get(e);if(r===void 0)return!1;let t=this.backend.remove(r);return t&&(this.stringToNumericId.delete(e),this.numericToStringId.delete(r)),t}clear(){this.backend.clear?.(),this.stringToNumericId.clear(),this.numericToStringId.clear(),this.nextAutoId=0}dispose(){try{this.backend.dispose?.()}catch{}this.stringToNumericId.clear(),this.numericToStringId.clear(),this.nextAutoId=0}isRuvectorAvailable(){return this.backend instanceof S?this.backend.isRuvectorAvailable():this.backend instanceof H?this.backend.isNativeAvailable():!1}isNativeBackend(){return this._isNativeBackend}getName(){return this.indexName}setHealthCheckFrequency(e){this.healthCheckFrequency=Math.max(1,e)}getHealthCheckFrequency(){return this.healthCheckFrequency}getLastHealthReport(){return this.lastHealthReport}getHealthMonitor(){return this.healthMonitor}maybeRunHealthCheck(){if(q()&&(this.operationsSinceLastCheck++,!(this.operationsSinceLastCheck<this.healthCheckFrequency)&&(this.operationsSinceLastCheck=0,this.ensureHealthMonitor(),this.healthMonitor)))try{this.lastHealthReport=this.healthMonitor.checkHealth(this.backend),this.lastHealthReport.healthy||console.warn(`[HNSW-Health] Index "${this.indexName}" health check failed: ${this.lastHealthReport.alerts.length} alert(s). Coherence: ${this.lastHealthReport.metrics.coherenceScore.toFixed(3)}`)}catch(e){console.warn(`[HNSW-Health] Health check error for "${this.indexName}":`,e)}}ensureHealthMonitor(){if(!this.healthMonitorLoaded){this.healthMonitorLoaded=!0;try{let e=(ne(),$(re));this.healthMonitor=e.createHnswHealthMonitor()}catch(e){process.env.DEBUG&&console.debug("[HNSW-Health] Monitor module unavailable:",e instanceof Error?e.message:e),this.healthMonitor=null}}}static createBackend(e){if(j())try{return{backend:new H(e),isNative:!0}}catch(r){r instanceof b?console.info(`[HNSW] Native backend unavailable, falling back to JS: ${r.message}`):console.warn("[HNSW] Unexpected error creating native backend, falling back to JS:",r)}return{backend:new S(e),isNative:!1}}static create(e,r){let t=p.get(e);if(t instanceof i)return t;let n=new i(e,r);return p.set(e,n),n}static get(e){let r=p.get(e);return r instanceof i?r:void 0}static close(e){let r=p.get(e);r instanceof i&&r.dispose(),p.delete(e)}static closeAll(){for(let[e]of p)i.close(e);p.clear()}static listIndexes(){return Array.from(p.keys())}}});export{G as a,ye as b,xe as c};
|
|
@@ -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.9.
|
|
2
|
-
import{a as h}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.9.21");process.exit(0)}
|
|
2
|
+
import{a as h}from"./chunk-OHR5ILR3.js";import{c as m}from"./chunk-MYZ43VKA.js";h();var g=m.create("regret-tracker"),l=50,R=.9,d=1.1;function f(o,t){let e=o.length;if(e<2)return 0;let n=0,r=0,i=0,a=0;for(let s=0;s<e;s++)n+=o[s],r+=t[s],i+=o[s]*t[s],a+=o[s]*o[s];let u=e*a-n*n;return Math.abs(u)<1e-10?0:(e*i-n*r)/u}var c=class{domains=new Map;alertCallbacks=[];alerts=[];maxAlerts;recentWindow;constructor(t){this.maxAlerts=t?.maxAlerts??100,this.recentWindow=t?.recentWindow??20}recordDecision(t,e,n){let r=this.getOrCreateDomainState(t),i=Math.max(0,n-e);if(r.cumulativeRegret+=i,r.decisionCount++,r.points.push({decisionCount:r.decisionCount,cumulativeRegret:r.cumulativeRegret,timestamp:Date.now()}),r.decisionCount>=l){let a=this.classifyGrowthRate(r.points);r.lastGrowthRate!=="insufficient_data"&&a!==r.lastGrowthRate&&this.emitAlert(t,r.lastGrowthRate,a),r.lastGrowthRate=a}}getCumulativeRegret(t){return this.domains.get(t)?.cumulativeRegret??0}getRegretCurve(t){let e=this.domains.get(t);return e?[...e.points]:[]}getRegretGrowthRate(t){let e=this.domains.get(t);return e?this.classifyGrowthRate(e.points):"insufficient_data"}detectStagnation(t){let e=this.getRegretGrowthRate(t);return e==="linear"||e==="superlinear"}getHealthSummary(){let t=[];for(let[e,n]of this.domains){let r=this.classifyGrowthRate(n.points),i=this.computeLogLogSlope(n.points),a=this.computeRecentAvgRegret(n);t.push({domain:e,totalDecisions:n.decisionCount,cumulativeRegret:n.cumulativeRegret,growthRate:r,stagnating:r==="linear"||r==="superlinear",slope:i,recentAvgRegret:a})}return t.sort((e,n)=>e.domain.localeCompare(n.domain)),t}onAlert(t){this.alertCallbacks.push(t)}getAlerts(){return[...this.alerts]}getTrackedDomains(){return[...this.domains.keys()].sort()}getTotalDecisions(){let t=0;for(let e of this.domains.values())t+=e.decisionCount;return t}reset(t){t?this.domains.delete(t):(this.domains.clear(),this.alerts=[])}getOrCreateDomainState(t){let e=this.domains.get(t);return e||(e={points:[],cumulativeRegret:0,decisionCount:0,lastGrowthRate:"insufficient_data"},this.domains.set(t,e)),e}classifyGrowthRate(t){if(t.length<l)return"insufficient_data";let e=this.computeLogLogSlope(t);return e===void 0?"insufficient_data":e<R?"sublinear":e<=d?"linear":"superlinear"}computeLogLogSlope(t){if(t.length<l)return;let e=t.filter(i=>i.cumulativeRegret>0&&i.decisionCount>0);if(e.length<2)return;let n=e.map(i=>Math.log(i.decisionCount)),r=e.map(i=>Math.log(i.cumulativeRegret));return f(n,r)}computeRecentAvgRegret(t){if(t.points.length<2)return 0;let e=Math.min(this.recentWindow,t.points.length),n=t.points.slice(-e),r=n[0],i=n[n.length-1],a=i.cumulativeRegret-r.cumulativeRegret,u=i.decisionCount-r.decisionCount;return u<=0?0:a/u}emitAlert(t,e,n){let r={domain:t,previousRate:e,newRate:n,timestamp:Date.now(),message:`Domain "${t}" regret growth changed from ${e} to ${n}`};this.alerts.push(r),this.alerts.length>this.maxAlerts&&this.alerts.shift(),g.info("Regret growth rate transition",{domain:t,previousRate:e,newRate:n});for(let i of this.alertCallbacks)try{i(r)}catch(a){g.error("Alert callback error",a instanceof Error?a:void 0)}}};function b(o){return new c(o)}export{b as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.21");process.exit(0)}
|
|
2
|
+
import{c as t,e as o}from"./chunk-4ZUXTOUG.js";var g={};o(g,{DotProductAttention:()=>u,FlashAttention:()=>m,HyperbolicAttention:()=>h,LinearAttention:()=>f,MoEAttention:()=>_,MultiHeadAttention:()=>A,RuvectorLayer:()=>a,SonaEngine:()=>b,TensorCompress:()=>c,default:()=>r,differentiableSearch:()=>l,getCompressionLevel:()=>p,hierarchicalForward:()=>s,init:()=>d,pipeline:()=>L});import{createRequire as n}from"module";var i,e,r,a,c,l,s,p,d,m,u,A,h,f,_,b,L,q=t(()=>{i=n(import.meta.url),e=i("hnswlib-node"),r=e,{RuvectorLayer:a,TensorCompress:c,differentiableSearch:l,hierarchicalForward:s,getCompressionLevel:p,init:d,FlashAttention:m,DotProductAttention:u,MultiHeadAttention:A,HyperbolicAttention:h,LinearAttention:f,MoEAttention:_,SonaEngine:b,pipeline:L}=e||{}});export{r as a,a as b,c,l as d,s as e,p as f,d as g,m as h,u as i,A as j,h as k,f as l,_ as m,b as n,L as o,g as p,q};
|
|
@@ -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.9.
|
|
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.9.21");process.exit(0)}
|
|
2
2
|
import{isIP as o}from"net";import{lookup as n}from"dns/promises";var f=[/^10\./,/^172\.(1[6-9]|2\d|3[01])\./,/^192\.168\./,/^127\./,/^0\./,/^169\.254\./,/^::1$/,/^fc00:/,/^fe80:/,/^fd[0-9a-f]{2}:/i];function t(r){return f.some(s=>s.test(r))}async function u(r){if(process.env.AQE_HOOKS_SSRF_DISABLED==="true")return{safe:!0};let s;try{s=new URL(r)}catch{return{safe:!1,reason:`Invalid URL: ${r}`}}let e=s.hostname.replace(/^\[|\]$/g,"");if(o(e))return t(e)?{safe:!1,reason:`Private IP blocked: ${e}`}:{safe:!0};try{let a=await n(e);if(t(a.address))return{safe:!1,reason:`DNS resolves to private IP: ${a.address}`}}catch(a){return{safe:!1,reason:`DNS lookup failed for ${e}: ${a.message}`}}return{safe:!0}}export{t as a,u as b};
|
|
@@ -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.9.
|
|
2
|
-
import{a as y}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.9.21");process.exit(0)}
|
|
2
|
+
import{a as y}from"./chunk-E2XIPBJ7.js";import{a as g,c as h}from"./chunk-56DGV2Q3.js";import{S as b,b as p}from"./chunk-NV6AUEIH.js";b();var m=class{calculator;constructor(){this.calculator=new g}computeLambda(t){let n=this.maybeSparsify(t),e=this.toSwarmGraph(n);return this.calculator.getMinCutValue(e)}computeRoutingTier(t,n){let e=this.buildTaskGraphFromTopology(n),o=this.toSwarmGraph(e),s=this.calculator.getMinCutValue(o),r=Math.max(n.length-1,1),a=Math.min(s/r,1),{tier:i,label:d}=this.lambdaToTier(a),c=this.computeConfidence(o,a),l=this.buildRationale(t,a,i,n.length);return{tier:i,label:d,lambda:s,normalizedLambda:a,confidence:c,rationale:l}}getStructuralHealth(t){let n=this.maybeSparsify(t),e=this.toSwarmGraph(n);if(e.isEmpty())return this.emptyHealthReport();let o=this.calculator.getMinCutValue(e),s=e.getStats(),r=Math.max(s.vertexCount-1,1),a=Math.min(o/r,1),i=this.calculator.findWeakVertices(e),d=i.map(f=>f.vertexId),c=1-a,l=a>=.4,u=this.generateHealthSuggestions(a,i.length,s);return{lambda:o,normalizedLambda:a,healthy:l,weakPoints:d,riskScore:c,componentCount:s.componentCount,isConnected:s.isConnected,suggestions:u,analyzedAt:new Date}}maybeSparsify(t){if(!p().useSpectralSparsification||t.edges.length<=100)return t;let n=new Map;t.nodes.forEach((i,d)=>n.set(i.id,d));let e=[];for(let i of t.edges){let d=n.get(i.source),c=n.get(i.target);d!==void 0&&c!==void 0&&e.push([d,c,i.weight])}let o={nodeCount:t.nodes.length,edges:e},r=new y({epsilon:.3}).sparsify(o),a=[];for(let[i,d,c]of r.edges){let l=t.nodes[i],u=t.nodes[d];l&&u&&a.push({source:l.id,target:u.id,weight:c,edgeType:"coordination"})}return{nodes:t.nodes,edges:a}}toSwarmGraph(t){let n=new h;for(let e of t.nodes){let o={id:e.id,type:e.type==="task"||e.type==="agent"?"agent":"domain",domain:e.domain,weight:e.weight,createdAt:new Date,metadata:e.metadata};n.addVertex(o)}for(let e of t.edges)if(n.hasVertex(e.source)&&n.hasVertex(e.target)){let o={source:e.source,target:e.target,weight:e.weight,type:e.edgeType==="dependency"?"dependency":e.edgeType==="communication"?"communication":e.edgeType==="workflow"?"workflow":"coordination",bidirectional:e.edgeType!=="dependency"};n.addEdge(o)}return n}buildTaskGraphFromTopology(t){let n=t.map(r=>({id:r.id,label:r.name,type:"agent",domain:r.domain,weight:r.weight})),e=[],o=new Set(t.map(r=>r.id));for(let r of t)for(let a of r.dependsOn)o.has(a)&&e.push({source:r.id,target:a,weight:1,edgeType:"dependency"});let s=new Map;for(let r of t){let a=s.get(r.domain)||[];a.push(r.id),s.set(r.domain,a)}for(let[,r]of s)for(let a=0;a<r.length;a++)for(let i=a+1;i<r.length;i++)e.push({source:r[a],target:r[i],weight:.5,edgeType:"coordination"});return{nodes:n,edges:e}}lambdaToTier(t){return t>=.8?{tier:1,label:"Haiku"}:t>=.4?{tier:2,label:"Sonnet"}:{tier:3,label:"Opus"}}computeConfidence(t,n){let e=t.getStats();if(e.vertexCount<3)return .4;let o=Math.min(Math.abs(n-.4),Math.abs(n-.8)),s=Math.min(.95,.5+o*2.25),r=Math.min(1,e.density*2);return Math.min(.99,s*(.7+.3*r))}buildRationale(t,n,e,o){let s=t.slice(0,80),r=n>=.8?"highly connected":n>=.4?"moderately connected":"fragmented";return`Task "${s}" routed to ${e===1?"Haiku":e===2?"Sonnet":"Opus"} (Tier ${e}). Fleet topology is ${r} (lambda=${n.toFixed(3)}) across ${o} agents.`}generateHealthSuggestions(t,n,e){let o=[];return e.isConnected||o.push(`Graph has ${e.componentCount} disconnected components. Add cross-domain coordination edges to improve connectivity.`),t<.2?o.push("Critical: Fleet connectivity is very low. Consider spawning coordination agents."):t<.4&&o.push("Warning: Fleet connectivity is below healthy threshold. Reinforce weak connections."),n>0&&o.push(`${n} weak point(s) detected. Add redundant connections to these agents.`),e.vertexCount<3&&o.push("Fleet has fewer than 3 agents. MinCut analysis is most useful with larger topologies."),o}emptyHealthReport(){return{lambda:0,normalizedLambda:0,healthy:!1,weakPoints:[],riskScore:1,componentCount:0,isConnected:!0,suggestions:["No agents in fleet. Spawn agents to build a topology."],analyzedAt:new Date}}};function C(){return new m}export{C as a};
|
|
@@ -1,3 +1,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.9.
|
|
2
|
-
import{c}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.9.21");process.exit(0)}
|
|
2
|
+
import{c}from"./chunk-4ZUXTOUG.js";function u(r){switch(r.toUpperCase()){case"DEBUG":return 0;case"INFO":return 1;case"WARN":case"WARNING":return 2;case"ERROR":return 3;case"SILENT":case"NONE":case"OFF":return 4;default:return 1}}var f,l=c(()=>{"use strict";f={0:"DEBUG",1:"INFO",2:"WARN",3:"ERROR",4:"SILENT"}});var a,s,g,d=c(()=>{"use strict";l();a={includeTimestamp:!0,includeLevel:!0,timestampFormat:"short",prettyPrint:!1,maxContextDepth:3},s=class r{domain;level;config;inheritedContext;constructor(e,n=1,o={},t={}){this.domain=e,this.level=n,this.config={...a,...o},this.inheritedContext=t}debug(e,n){this.level<=0&&this.output(0,e,n)}info(e,n){this.level<=1&&this.output(1,e,n)}warn(e,n){this.level<=2&&this.output(2,e,n)}error(e,n,o){if(this.level<=3){let t={...o};if(n){t.errorName=n.name,t.errorMessage=n.message,n.stack&&(t.stack=n.stack);let i=n;i.cause!==void 0&&(t.cause=String(i.cause))}this.output(3,e,t)}}isEnabled(e){return this.level<=e}getDomain(){return this.domain}child(e){return new r(this.domain,this.level,this.config,{...this.inheritedContext,...e})}output(e,n,o){let t=this.format(e,n,o);switch(e){case 0:console.debug(t);break;case 1:console.info(t);break;case 2:console.warn(t);break;case 3:console.error(t);break}}format(e,n,o){let t=[];this.config.includeTimestamp&&t.push(this.formatTimestamp()),this.config.includeLevel&&t.push(this.formatLevel(e)),t.push(`[${this.domain}]`),t.push(n);let i=this.mergeContext(o);return i&&Object.keys(i).length>0&&t.push(this.formatContext(i)),t.join(" ")}formatTimestamp(){let e=new Date;if(this.config.timestampFormat==="iso")return`[${e.toISOString()}]`;let n=String(e.getHours()).padStart(2,"0"),o=String(e.getMinutes()).padStart(2,"0"),t=String(e.getSeconds()).padStart(2,"0"),i=String(e.getMilliseconds()).padStart(3,"0");return`[${n}:${o}:${t}.${i}]`}formatLevel(e){return`[${f[e].padEnd(5)}]`}mergeContext(e){if(!(!e&&Object.keys(this.inheritedContext).length===0))return{...this.inheritedContext,...e}}formatContext(e){try{return this.config.prettyPrint?`
|
|
3
3
|
`+JSON.stringify(e,this.createReplacer(),2):JSON.stringify(e,this.createReplacer())}catch{return"[unserializable context]"}}createReplacer(){let e=new WeakSet,n=0;return(o,t)=>{if(typeof t=="object"&&t!==null){if(n>=this.config.maxContextDepth)return"[object]";if(e.has(t))return"[circular]";e.add(t),n++}return t instanceof Error?{name:t.name,message:t.message,stack:t.stack}:typeof t=="bigint"?t.toString():typeof t=="function"?"[function]":typeof t=="symbol"?t.toString():t}}},g=class{domain;constructor(e="null"){this.domain=e}debug(e,n){}info(e,n){}warn(e,n){}error(e,n,o){}isEnabled(e){return!1}getDomain(){return this.domain}child(e){return this}}});function F(r,e){return L.create(r,e)}var v,L,m=c(()=>{"use strict";l();d();v={defaultLevel:1,domainLevels:new Map,consoleConfig:a,silent:!1},L=class{static config={...v};static customProvider=null;static instances=new Map;static setLevel(e){this.config.defaultLevel=e,this.instances.clear()}static setLevelFromString(e){this.setLevel(u(e))}static getLevel(){return this.config.defaultLevel}static setDomainLevel(e,n){this.config.domainLevels.set(e,n),this.instances.delete(e)}static getDomainLevel(e){return this.config.domainLevels.get(e)??this.config.defaultLevel}static clearDomainLevel(e){this.config.domainLevels.delete(e),this.instances.delete(e)}static configure(e){this.config.consoleConfig={...this.config.consoleConfig,...e},this.instances.clear()}static setSilent(e){this.config.silent=e,this.instances.clear()}static isSilent(){return this.config.silent}static setProvider(e){this.customProvider=e,this.instances.clear()}static create(e,n){if(!n&&this.instances.has(e))return this.instances.get(e);let o=this.getDomainLevel(e),t;return this.config.silent?t=new g(e):this.customProvider?t=this.customProvider(e,o,n):t=new s(e,o,this.config.consoleConfig,n),n||this.instances.set(e,t),t}static getLogger(e,n){return this.create(e,n)}static reset(){this.config={defaultLevel:1,domainLevels:new Map,consoleConfig:{...a},silent:!1},this.customProvider=null,this.instances.clear()}static initFromEnv(){let e=process.env.LOG_LEVEL;e&&this.setLevelFromString(e);let n=process.env.LOG_TIMESTAMP;n!==void 0&&this.configure({includeTimestamp:n.toLowerCase()==="true"});let o=process.env.LOG_PRETTY;o!==void 0&&this.configure({prettyPrint:o.toLowerCase()==="true"})}static getStats(){return{cachedLoggers:this.instances.size,domains:Array.from(this.instances.keys()),domainOverrides:this.config.domainLevels.size,currentLevel:this.config.defaultLevel,silent:this.config.silent}}}});export{l as a,d as b,L as c,F as d,m as e};
|
|
@@ -1 +1 @@
|
|
|
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.9.
|
|
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.9.21");process.exit(0)}
|
|
@@ -1,17 +1,17 @@
|
|
|
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.9.
|
|
2
|
-
import{a as w,b as A,c as O,e as D,f as
|
|
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.9.21");process.exit(0)}
|
|
2
|
+
import{a as w,b as A,c as O,e as D,f as z}from"./chunk-I3HLZASP.js";import{b as S,d as $}from"./chunk-PEOTZFNZ.js";import{a as N,c as F}from"./chunk-SMBQERK7.js";import{i as v}from"./chunk-GDZ6XQRI.js";import*as I from"node:path";z();$();var P=["function","module","test","file","class"],L=["calls","imports","tests","depends_on","covers"],b=class{ensureSchema(e){e.transaction(()=>{e.exec(w),e.exec(A),e.exec(O)})()}schemaExists(e){return D(e)}getNodeTypes(){return P}getEdgeTypes(){return L}isValidNodeType(e){return P.includes(e)}isValidEdgeType(e){return L.includes(e)}getStats(e){if(!this.schemaExists(e))return{nodeCount:0,edgeCount:0};let t=e.prepare("SELECT COUNT(*) as count FROM hypergraph_nodes").get().count,r=e.prepare("SELECT COUNT(*) as count FROM hypergraph_edges").get().count;return{nodeCount:t,edgeCount:r}}dropSchema(e){let t=e.prepare("SELECT COUNT(*) as cnt FROM hypergraph_nodes").get()?.cnt??0,r=e.prepare("SELECT COUNT(*) as cnt FROM hypergraph_edges").get()?.cnt??0;if(t>0||r>0)throw new Error(`REFUSING to drop hypergraph schema: tables contain data (${t} nodes, ${r} edges). Backup and manually drop if needed.`);e.transaction(()=>{e.exec("DROP TABLE IF EXISTS hypergraph_edges"),e.exec("DROP TABLE IF EXISTS hypergraph_nodes")})()}};function C(n){return{id:n.id,type:n.type,name:n.name,file_path:n.filePath??null,line_start:n.lineStart??null,line_end:n.lineEnd??null,complexity:n.complexity??null,coverage:n.coverage??null,metadata:n.metadata?JSON.stringify(n.metadata):null,embedding:n.embedding?U(n.embedding):null}}function T(n){return{id:n.id,type:n.type,name:n.name,filePath:n.file_path??void 0,lineStart:n.line_start??void 0,lineEnd:n.line_end??void 0,complexity:n.complexity??void 0,coverage:n.coverage??void 0,metadata:n.metadata?S(n.metadata):void 0,embedding:n.embedding?W(n.embedding):void 0,createdAt:n.created_at,updatedAt:n.updated_at}}function M(n){return{id:n.id,source_id:n.sourceId,target_id:n.targetId,type:n.type,weight:n.weight??1,properties:n.properties?JSON.stringify(n.properties):null}}function H(n){return{id:n.id,sourceId:n.source_id,targetId:n.target_id,type:n.type,weight:n.weight,properties:n.properties?S(n.properties):void 0,createdAt:n.created_at}}function x(n,e,t){return`${n}--${t}-->${e}`}function U(n){let e=Buffer.alloc(n.length*4);for(let t=0;t<n.length;t++)e.writeFloatLE(n[t],t*4);return e}function W(n){let e=[],t=n.length/4;for(let r=0;r<t;r++)e.push(n.readFloatLE(r*4));return e}F();var B={maxTraversalDepth:10,maxQueryResults:1e3,enableVectorSearch:!1},R=class{config;schemaManager;initialized=!1;constructor(e){this.config={...B,...e},this.schemaManager=new b}async initialize(){this.initialized||(this.schemaManager.ensureSchema(this.config.db),this.initialized=!0)}isInitialized(){return this.initialized}async addNode(e){this.ensureInitialized();let t=v(),r={id:t,...e},s=C(r);return this.config.db.prepare(`
|
|
3
3
|
INSERT INTO hypergraph_nodes (id, type, name, file_path, line_start, line_end, complexity, coverage, metadata, embedding)
|
|
4
4
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
5
|
-
`).run(
|
|
5
|
+
`).run(s.id,s.type,s.name,s.file_path,s.line_start,s.line_end,s.complexity,s.coverage,s.metadata,s.embedding),t}async addEdge(e){this.ensureInitialized();let t=x(e.sourceId,e.targetId,e.type),r={id:t,...e},s=M(r);return this.config.db.prepare(`
|
|
6
6
|
INSERT OR REPLACE INTO hypergraph_edges (id, source_id, target_id, type, weight, properties)
|
|
7
7
|
VALUES (?, ?, ?, ?, ?, ?)
|
|
8
|
-
`).run(
|
|
8
|
+
`).run(s.id,s.source_id,s.target_id,s.type,s.weight,s.properties),t}async getNode(e){this.ensureInitialized();let t=this.config.db.prepare("SELECT * FROM hypergraph_nodes WHERE id = ?").get(e);return t?T(t):null}async getEdge(e){this.ensureInitialized();let t=this.config.db.prepare("SELECT * FROM hypergraph_edges WHERE id = ?").get(e);return t?H(t):null}async updateNode(e,t){this.ensureInitialized();let r=await this.getNode(e);if(!r)throw new Error(`Node not found: ${e}`);let s={...r,...t},o=C(s);this.config.db.prepare(`
|
|
9
9
|
UPDATE hypergraph_nodes
|
|
10
10
|
SET type = ?, name = ?, file_path = ?, line_start = ?, line_end = ?,
|
|
11
11
|
complexity = ?, coverage = ?, metadata = ?, embedding = ?,
|
|
12
12
|
updated_at = datetime('now')
|
|
13
13
|
WHERE id = ?
|
|
14
|
-
`).run(
|
|
14
|
+
`).run(o.type,o.name,o.file_path,o.line_start,o.line_end,o.complexity,o.coverage,o.metadata,o.embedding,e)}async deleteNode(e){this.ensureInitialized(),this.config.db.prepare("DELETE FROM hypergraph_edges WHERE source_id = ? OR target_id = ?").run(e,e),this.config.db.prepare("DELETE FROM hypergraph_nodes WHERE id = ?").run(e)}async deleteEdge(e){this.ensureInitialized(),this.config.db.prepare("DELETE FROM hypergraph_edges WHERE id = ?").run(e)}async findNodes(e){this.ensureInitialized();let t=[],r=[];if(e.type){let u=Array.isArray(e.type)?e.type:[e.type];t.push(`type IN (${u.map(()=>"?").join(", ")})`),r.push(...u)}e.filePath&&(e.filePath.includes("%")?t.push("file_path LIKE ?"):t.push("file_path = ?"),r.push(e.filePath)),e.name&&typeof e.name=="string"&&(t.push("name = ?"),r.push(e.name)),e.minComplexity!==void 0&&(t.push("complexity >= ?"),r.push(e.minComplexity)),e.maxComplexity!==void 0&&(t.push("complexity <= ?"),r.push(e.maxComplexity)),e.minCoverage!==void 0&&(t.push("coverage >= ?"),r.push(e.minCoverage)),e.maxCoverage!==void 0&&(t.push("coverage <= ?"),r.push(e.maxCoverage));let s=t.length>0?`WHERE ${t.join(" AND ")}`:"",o=e.limit??this.config.maxQueryResults,d=`SELECT * FROM hypergraph_nodes ${s} LIMIT ?`;r.push(o);let c=this.config.db.prepare(d).all(...r).map(T);return e.name instanceof RegExp&&(c=c.filter(u=>e.name instanceof RegExp&&e.name.test(u.name))),c}async findEdges(e){this.ensureInitialized();let t=[],r=[];if(e.type){let c=Array.isArray(e.type)?e.type:[e.type];t.push(`type IN (${c.map(()=>"?").join(", ")})`),r.push(...c)}e.sourceId&&(t.push("source_id = ?"),r.push(e.sourceId)),e.targetId&&(t.push("target_id = ?"),r.push(e.targetId)),e.minWeight!==void 0&&(t.push("weight >= ?"),r.push(e.minWeight));let s=t.length>0?`WHERE ${t.join(" AND ")}`:"",o=e.limit??this.config.maxQueryResults,d=`SELECT * FROM hypergraph_edges ${s} LIMIT ?`;return r.push(o),this.config.db.prepare(d).all(...r).map(H)}async traverse(e,t=[],r=5){this.ensureInitialized();let s=new Map,o=new Map,d=[],p=0,c=[{nodeId:e,depth:0,path:{nodes:[e],edges:[]}}],u=Math.min(r,this.config.maxTraversalDepth);for(;c.length>0;){let{nodeId:a,depth:g,path:i}=c.shift();if(!s.has(a)){let l=await this.getNode(a);l&&s.set(a,l)}if(p=Math.max(p,g),g>=u){d.push(i);continue}let h={sourceId:a};t.length>0&&(h.type=t);let y=await this.findEdges(h);if(y.length===0){d.push(i);continue}for(let l of y)if(!o.has(l.id)){o.set(l.id,l);let m={nodes:[...i.nodes,l.targetId],edges:[...i.edges,l.id]};c.push({nodeId:l.targetId,depth:g+1,path:m})}}return{nodes:Array.from(s.values()),edges:Array.from(o.values()),paths:d,maxDepthReached:p}}async findUntestedFunctions(){return this.ensureInitialized(),this.config.db.prepare(`
|
|
15
15
|
SELECT n.* FROM hypergraph_nodes n
|
|
16
16
|
WHERE n.type = 'function'
|
|
17
17
|
AND NOT EXISTS (
|
|
@@ -23,7 +23,7 @@ import{a as w,b as A,c as O,e as D,f as $}from"./chunk-MXAEZHW6.js";import{b as
|
|
|
23
23
|
)
|
|
24
24
|
ORDER BY n.complexity DESC NULLS LAST
|
|
25
25
|
LIMIT ?
|
|
26
|
-
`).all(this.config.maxQueryResults).map(
|
|
26
|
+
`).all(this.config.maxQueryResults).map(T)}async findImpactedTests(e){if(this.ensureInitialized(),e.length===0)return[];let r=`
|
|
27
27
|
SELECT DISTINCT t.* FROM hypergraph_nodes t
|
|
28
28
|
JOIN hypergraph_edges e ON e.source_id = t.id
|
|
29
29
|
JOIN hypergraph_nodes f ON f.id = e.target_id
|
|
@@ -32,38 +32,46 @@ import{a as w,b as A,c as O,e as D,f as $}from"./chunk-MXAEZHW6.js";import{b as
|
|
|
32
32
|
AND f.type = 'function'
|
|
33
33
|
AND f.file_path IN (${e.map(()=>"?").join(", ")})
|
|
34
34
|
LIMIT ?
|
|
35
|
-
`,
|
|
35
|
+
`,s=[...e,this.config.maxQueryResults];return this.config.db.prepare(r).all(...s).map(T)}async findCoverageGaps(e=50){return this.ensureInitialized(),this.config.db.prepare(`
|
|
36
36
|
SELECT * FROM hypergraph_nodes
|
|
37
37
|
WHERE type = 'function'
|
|
38
38
|
AND coverage IS NOT NULL
|
|
39
39
|
AND coverage <= ?
|
|
40
40
|
ORDER BY coverage ASC, complexity DESC NULLS LAST
|
|
41
41
|
LIMIT ?
|
|
42
|
-
`).all(e,this.config.maxQueryResults).map(
|
|
42
|
+
`).all(e,this.config.maxQueryResults).map(T)}async findModuleDependencies(e){this.ensureInitialized();let t=await this.findNodes({type:"module",filePath:e,limit:1});if(t.length===0){let a=await this.findNodes({type:"file",filePath:e,limit:1});if(a.length===0)throw new Error(`Module not found: ${e}`);t.push(a[0])}let r=t[0],s=await this.findEdges({sourceId:r.id,type:["imports","depends_on"]}),o=[];for(let a of s){let g=await this.getNode(a.targetId);g&&o.push(g)}let d=await this.findEdges({targetId:r.id,type:["imports","depends_on"]}),p=[];for(let a of d){let g=await this.getNode(a.sourceId);g&&p.push(g)}let c=await this.traverse(r.id,["imports","depends_on"],5),u=c.nodes.filter(a=>a.id!==r.id);return{module:r,directDependencies:o,dependents:p,transitiveDependencies:u,maxDependencyDepth:c.maxDepthReached}}async buildFromIndexResult(e){this.ensureInitialized();let t=Date.now(),r=0,s=0,o=0,d=[];return this.config.db.transaction(()=>{for(let a of e.files)try{let g=`file:${a.path}`;this.config.db.prepare("SELECT id FROM hypergraph_nodes WHERE id = ?").get(g)?s++:(this.config.db.prepare(`
|
|
43
43
|
INSERT INTO hypergraph_nodes (id, type, name, file_path)
|
|
44
44
|
VALUES (?, 'file', ?, ?)
|
|
45
|
-
`).run(
|
|
45
|
+
`).run(g,a.path.split("/").pop()||a.path,a.path),r++)}catch(g){d.push({entity:`file:${a.path}`,error:N(g)})}for(let a of e.files){let g=`file:${a.path}`;for(let i of a.entities)try{let h=`${i.type}:${a.path}:${i.name}`,y=this.mapEntityTypeToNodeType(i.type);this.config.db.prepare("SELECT id FROM hypergraph_nodes WHERE id = ?").get(h)?(this.config.db.prepare(`
|
|
46
46
|
UPDATE hypergraph_nodes
|
|
47
47
|
SET line_start = ?, line_end = ?, complexity = ?, coverage = ?,
|
|
48
48
|
updated_at = datetime('now')
|
|
49
49
|
WHERE id = ?
|
|
50
|
-
`).run(
|
|
50
|
+
`).run(i.lineStart,i.lineEnd,i.complexity,i.coverage,h),s++):(this.config.db.prepare(`
|
|
51
51
|
INSERT INTO hypergraph_nodes (id, type, name, file_path, line_start, line_end, complexity, coverage)
|
|
52
52
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?)
|
|
53
|
-
`).run(h,y,
|
|
53
|
+
`).run(h,y,i.name,a.path,i.lineStart,i.lineEnd,i.complexity,i.coverage),r++);try{let m=x(g,h,"contains");this.config.db.prepare(`
|
|
54
54
|
INSERT OR REPLACE INTO hypergraph_edges (id, source_id, target_id, type, weight)
|
|
55
55
|
VALUES (?, ?, ?, 'contains', 1.0)
|
|
56
|
-
`).run(m,
|
|
56
|
+
`).run(m,g,h),o++}catch(m){d.push({entity:`contains:${i.type}:${i.name}`,error:N(m)})}}catch(h){d.push({entity:`${i.type}:${i.name}`,error:N(h)})}}let c=[".ts",".tsx",".js",".jsx",".py",".mjs",".cjs"],u=["/index.ts","/index.tsx","/index.js","/index.jsx","/index.py"];for(let a of e.files){let g=`file:${a.path}`;for(let i of a.imports)try{let h=i;(i.startsWith("./")||i.startsWith("../"))&&(h=I.resolve(I.dirname(a.path),i));let y=`file:${h}`,l=this.config.db.prepare("SELECT id FROM hypergraph_nodes WHERE id = ?"),m=l.get(y);if(!m)for(let f of c){let E=y+f,_=l.get(E);if(_){y=E,m=_;break}}if(!m)for(let f of u){let E=y+f,_=l.get(E);if(_){y=E,m=_;break}}if(m){let f=x(g,y,"imports");this.config.db.prepare(`
|
|
57
57
|
INSERT OR REPLACE INTO hypergraph_edges (id, source_id, target_id, type, weight)
|
|
58
58
|
VALUES (?, ?, ?, 'imports', 1.0)
|
|
59
|
-
`).run(
|
|
59
|
+
`).run(f,g,y),o++}}catch(h){d.push({entity:`import:${i}`,error:N(h)})}}})(),{nodesCreated:r,nodesUpdated:s,edgesCreated:o,durationMs:Date.now()-t,errors:d}}async syncWithKnowledgeGraph(e){this.ensureInitialized();let t=Date.now(),r=0,s=0,o=0,d=0,p=await this.findNodes({});for(let u of p){let a=await e.getNode(u.id);r++}return s=(await this.findEdges({})).length,{nodesSynced:r,edgesSynced:s,nodesAdded:o,nodesRemoved:d,durationMs:Date.now()-t}}async getStats(){this.ensureInitialized();let e=this.schemaManager.getStats(this.config.db),t=this.config.db.prepare(`
|
|
60
60
|
SELECT type, COUNT(*) as count FROM hypergraph_nodes GROUP BY type
|
|
61
|
-
`).all(),r={function:0,module:0,test:0,file:0,class:0};for(let
|
|
61
|
+
`).all(),r={function:0,module:0,test:0,file:0,class:0};for(let p of t)p.type in r&&(r[p.type]=p.count);let s=this.config.db.prepare(`
|
|
62
62
|
SELECT type, COUNT(*) as count FROM hypergraph_edges GROUP BY type
|
|
63
|
-
`).all(),
|
|
63
|
+
`).all(),o={calls:0,imports:0,tests:0,depends_on:0,covers:0,contains:0};for(let p of s)p.type in o&&(o[p.type]=p.count);let d=this.config.db.prepare(`
|
|
64
64
|
SELECT
|
|
65
65
|
AVG(complexity) as avg_complexity,
|
|
66
66
|
AVG(coverage) as avg_coverage,
|
|
67
67
|
COUNT(CASE WHEN embedding IS NOT NULL THEN 1 END) as nodes_with_embeddings
|
|
68
68
|
FROM hypergraph_nodes
|
|
69
|
-
`).get();return{totalNodes:e.nodeCount,totalEdges:e.edgeCount,nodesByType:r,edgesByType:
|
|
69
|
+
`).get();return{totalNodes:e.nodeCount,totalEdges:e.edgeCount,nodesByType:r,edgesByType:o,avgComplexity:d.avg_complexity??0,avgCoverage:d.avg_coverage??0,nodesWithEmbeddings:d.nodes_with_embeddings}}ensureInitialized(){if(!this.initialized)throw new Error("HypergraphEngine not initialized. Call initialize() first.")}mapEntityTypeToNodeType(e){return{function:"function",class:"class",module:"module",interface:"module",file:"file",test:"test"}[e]??"function"}async synthesizeTestCoverage(e){this.ensureInitialized();let t=e?.testPathPatterns??j,r=0,s=0,o=this.config.db.prepare(`SELECT id, file_path FROM hypergraph_nodes
|
|
70
|
+
WHERE type IN ('file', 'test') AND file_path IS NOT NULL`).all(),d=[];for(let i of o)t.some(h=>h.test(i.file_path))&&d.push(i.id);if(d.length===0)return{testsTagged:0,coversCreated:0};let p=this.config.db.prepare(`UPDATE hypergraph_nodes SET type = 'test', updated_at = datetime('now')
|
|
71
|
+
WHERE id = ? AND type = 'file'`),c=this.config.db.prepare(`SELECT target_id FROM hypergraph_edges
|
|
72
|
+
WHERE source_id = ? AND type = 'imports'`),u=this.config.db.prepare(`SELECT n.id AS id FROM hypergraph_nodes n
|
|
73
|
+
JOIN hypergraph_edges e ON e.target_id = n.id
|
|
74
|
+
WHERE e.source_id = ? AND e.type = 'contains' AND n.type = 'function'`),a=this.config.db.prepare(`
|
|
75
|
+
INSERT OR REPLACE INTO hypergraph_edges (id, source_id, target_id, type, weight)
|
|
76
|
+
VALUES (?, ?, ?, 'covers', 1.0)
|
|
77
|
+
`);return this.config.db.transaction(()=>{for(let i of d){p.run(i).changes>0&&r++;let y=c.all(i).map(l=>l.target_id);for(let l of y){let m=u.all(l).map(f=>f.id);for(let f of m){let E=`${i}--covers-->${f}`;a.run(E,i,f),s++}}}})(),{testsTagged:r,coversCreated:s}}},j=[/\.test\.[tj]sx?$/,/\.spec\.[tj]sx?$/,/_test\.[tj]sx?$/,/test_.*\.py$/,/.*_test\.py$/,/.*_test\.go$/];async function Q(n){let e=new R(n);return await e.initialize(),e}function X(n){return new R(n)}var K=R;export{B as a,R as b,Q as c,X as d,K as 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.9.
|
|
2
|
-
import{c as t,e 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.9.21");process.exit(0)}
|
|
2
|
+
import{c as t,e as o}from"./chunk-4ZUXTOUG.js";var L={};o(L,{DotProductAttention:()=>d,FlashAttention:()=>m,HyperbolicAttention:()=>f,LinearAttention:()=>h,MoEAttention:()=>_,MultiHeadAttention:()=>A,RuvectorLayer:()=>a,SonaEngine:()=>g,TensorCompress:()=>c,default:()=>i,differentiableSearch:()=>l,getCompressionLevel:()=>s,hierarchicalForward:()=>p,init:()=>u,pipeline:()=>v});import{createRequire as n}from"module";var r,e,i,a,c,l,p,s,u,m,d,A,f,h,_,g,v,b=t(()=>{r=n(import.meta.url),e=r("@ruvector/gnn"),i=e,{RuvectorLayer:a,TensorCompress:c,differentiableSearch:l,hierarchicalForward:p,getCompressionLevel:s,init:u,FlashAttention:m,DotProductAttention:d,MultiHeadAttention:A,HyperbolicAttention:f,LinearAttention:h,MoEAttention:_,SonaEngine:g,pipeline:v}=e||{}});export{L as a,b};
|
|
@@ -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.9.
|
|
2
|
-
import{a as S}from"./chunk-F32R4LVS.js";import{c as g}from"./chunk-MIST354H.js";import{S as T,b as l}from"./chunk-4SBMTHTA.js";S();T();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}S();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)}T();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},y=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)}},v=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 y,this.plateauDetector=new v,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,y as d,v 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.9.21");process.exit(0)}
|
|
2
|
+
import{a as S}from"./chunk-OHR5ILR3.js";import{c as g}from"./chunk-MYZ43VKA.js";import{S as T,b as l}from"./chunk-NV6AUEIH.js";S();T();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}S();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)}T();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},y=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)}},v=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 y,this.plateauDetector=new v,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,y as d,v as e,D as f,C as g,P as h,J as i};
|