agentic-qe 3.9.13 → 3.9.14
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/assets/skills/skills-manifest.json +1 -1
- package/dist/cli/bundle.js +5 -5
- package/dist/cli/chunks/adapter-W2EM7ZQ7.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-3RBPTJAU.js → agent-booster-wasm-O6EXMPMF.js} +2 -2
- package/dist/cli/chunks/{agent-handler-XV45GCWC.js → agent-handler-4LPJVTJU.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-V6EXWWMY.js → agent-memory-branch-PRR323JZ.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-JQMPNHQU.js +2 -0
- package/dist/cli/chunks/{audit-WXFI4AC4.js → audit-YCKXQOXD.js} +2 -2
- package/dist/cli/chunks/base-EOPYE6JR.js +2 -0
- package/dist/cli/chunks/{better-sqlite3-23MIVVHF.js → better-sqlite3-44RIH62G.js} +2 -2
- package/dist/cli/chunks/{brain-handler-LQUMAACV.js → brain-handler-IAYJBAFL.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-HE37VX7G.js → branch-enumerator-RVVS2UYR.js} +2 -2
- package/dist/cli/chunks/{browser-3VG5M7WM.js → browser-L6IKC4PR.js} +2 -2
- package/dist/cli/chunks/browser-workflow-CSARLAJD.js +2 -0
- package/dist/cli/chunks/chunk-2L3BCZ2F.js +2 -0
- package/dist/cli/chunks/{chunk-WQGP5ULD.js → chunk-36YZ2UF7.js} +2 -2
- package/dist/cli/chunks/{chunk-LHZLH6I4.js → chunk-3GIZRGX6.js} +2 -2
- package/dist/cli/chunks/{chunk-VJN7NQGI.js → chunk-3NUMJB3U.js} +10 -10
- package/dist/cli/chunks/{chunk-Q7TWE55T.js → chunk-3PZ2QLLR.js} +4 -4
- package/dist/cli/chunks/{chunk-4VETZICF.js → chunk-3ZKTPPIC.js} +1 -1
- package/dist/cli/chunks/{chunk-RYPUA6E2.js → chunk-4EQWK6P6.js} +2 -2
- package/dist/cli/chunks/{chunk-RURYOWWU.js → chunk-4JYLXYAH.js} +1 -1
- package/dist/cli/chunks/{chunk-WQIB5ERQ.js → chunk-4RDTR2OF.js} +2 -2
- package/dist/cli/chunks/chunk-53KLVMAT.js +18 -0
- package/dist/cli/chunks/{chunk-TPTKR5ZO.js → chunk-5DWTU2PN.js} +1 -1
- package/dist/cli/chunks/{chunk-W2YCNX4O.js → chunk-5HUAD4UU.js} +2 -2
- package/dist/cli/chunks/{chunk-Q3MQYATA.js → chunk-5MWNXDQW.js} +2 -2
- package/dist/cli/chunks/{chunk-LRHJOYKY.js → chunk-5U6M4XCP.js} +3 -3
- package/dist/cli/chunks/{chunk-OKCI6BNZ.js → chunk-6BK2S2WE.js} +2 -2
- package/dist/cli/chunks/chunk-6EZY2QVM.js +3021 -0
- package/dist/cli/chunks/{chunk-OJGR56BP.js → chunk-6GKXC6DE.js} +2 -2
- package/dist/cli/chunks/{chunk-YBKSENTJ.js → chunk-6J6GXRHX.js} +5 -5
- package/dist/cli/chunks/chunk-7732TLNA.js +5 -0
- package/dist/cli/chunks/{chunk-AXDGBI4Y.js → chunk-7IJBZGZY.js} +1 -1
- package/dist/cli/chunks/{chunk-Y7YSJD4I.js → chunk-A2TK52B2.js} +2 -2
- package/dist/cli/chunks/chunk-AEQMQVDJ.js +2 -0
- package/dist/cli/chunks/{chunk-ZN7KPIJW.js → chunk-AHVUILGE.js} +1 -1
- package/dist/cli/chunks/{chunk-4MZZMWF6.js → chunk-AOYN6XYJ.js} +1 -1
- package/dist/cli/chunks/{chunk-FEGITTAE.js → chunk-BFCMOMOF.js} +1 -1
- package/dist/cli/chunks/{chunk-D22MEX2U.js → chunk-BNPJMPM3.js} +2 -2
- package/dist/cli/chunks/{chunk-3IJ4NRJF.js → chunk-BOMJHE4I.js} +2 -2
- package/dist/cli/chunks/{chunk-TU3JIH3U.js → chunk-CGC63MGF.js} +4 -4
- package/dist/cli/chunks/{chunk-FS4TPAAA.js → chunk-D6APBW66.js} +1 -1
- package/dist/cli/chunks/chunk-DD4T7ZUM.js +3 -0
- package/dist/cli/chunks/{chunk-ERGY45RL.js → chunk-DGUAAG3T.js} +1 -1
- package/dist/cli/chunks/{chunk-JOCR5TWI.js → chunk-DJLRRCR6.js} +2 -2
- package/dist/cli/chunks/{chunk-VCJP7HQG.js → chunk-DMZ2XOEW.js} +2 -2
- package/dist/cli/chunks/{chunk-6GYMFSPA.js → chunk-DNFDSDKE.js} +2 -2
- package/dist/cli/chunks/{chunk-H53V7GI3.js → chunk-ERMIIRYN.js} +1 -1
- package/dist/cli/chunks/{chunk-RMNZSGTE.js → chunk-FFACJODG.js} +2 -2
- package/dist/cli/chunks/{chunk-AV23XNRL.js → chunk-FNKKENLS.js} +2 -2
- package/dist/cli/chunks/{chunk-UDIRBCZW.js → chunk-FWI7PK4X.js} +1 -1
- package/dist/cli/chunks/{chunk-QNUVC6OX.js → chunk-FYBTGEOV.js} +1 -1
- package/dist/cli/chunks/{chunk-ZUW3KVML.js → chunk-G2KQUEGY.js} +2 -2
- package/dist/cli/chunks/{chunk-IQGVQBVS.js → chunk-G7L5Y47C.js} +1 -1
- package/dist/cli/chunks/{chunk-OHG6SNIA.js → chunk-GALNZTYE.js} +2 -2
- package/dist/cli/chunks/chunk-GIUAY4KY.js +12 -0
- package/dist/cli/chunks/chunk-GM5LIYLQ.js +2 -0
- package/dist/cli/chunks/{chunk-DY5JRJXV.js → chunk-GOTVYSX5.js} +3 -3
- package/dist/cli/chunks/{chunk-HHRUXDLT.js → chunk-GUEK5DOK.js} +2 -2
- package/dist/cli/chunks/{chunk-AOTEEGQA.js → chunk-HEQ23HBE.js} +2 -2
- package/dist/cli/chunks/{chunk-MXT7YUOZ.js → chunk-HJJTLOWZ.js} +2 -2
- package/dist/cli/chunks/{chunk-KULWZMVC.js → chunk-I3P5RZX7.js} +4 -4
- package/dist/cli/chunks/{chunk-HJHFGPGP.js → chunk-I5U64MHU.js} +2 -2
- package/dist/cli/chunks/{chunk-VWEGO7BY.js → chunk-IH4OOAEP.js} +1 -1
- package/dist/cli/chunks/{chunk-SSZMISGC.js → chunk-IL3ESNHA.js} +2 -2
- package/dist/cli/chunks/{chunk-6HSHLSGU.js → chunk-IOHDE27P.js} +2 -2
- package/dist/cli/chunks/{chunk-OM7A3YC3.js → chunk-J3XLOHWB.js} +2 -2
- package/dist/cli/chunks/{chunk-OUNZPHTA.js → chunk-J5YOXLBD.js} +1 -1
- package/dist/cli/chunks/{chunk-V2CV6J2A.js → chunk-JLBUS4PR.js} +2 -2
- package/dist/cli/chunks/{chunk-77GZ7LXL.js → chunk-JN7MSUGK.js} +2 -2
- package/dist/cli/chunks/{chunk-YYQVSVBO.js → chunk-JNLKLC7G.js} +2 -2
- package/dist/cli/chunks/chunk-JOGKQTCU.js +24 -0
- package/dist/cli/chunks/{chunk-BUIMIUJA.js → chunk-JWR3NNFA.js} +1 -1
- package/dist/cli/chunks/chunk-KFAN5FZM.js +2 -0
- package/dist/cli/chunks/{chunk-6LDRSG7C.js → chunk-KHUFPJE4.js} +3 -3
- package/dist/cli/chunks/{chunk-TRJRRJV3.js → chunk-KJB6JJXT.js} +1 -1
- package/dist/cli/chunks/{chunk-W6LEOFA4.js → chunk-KVN4FTPT.js} +2 -2
- package/dist/cli/chunks/{chunk-V6UODTBP.js → chunk-L4IWZXSC.js} +1 -1
- package/dist/cli/chunks/{chunk-VHSDZEYF.js → chunk-LJ3WQIBN.js} +1 -1
- package/dist/cli/chunks/{chunk-AEKTVLLF.js → chunk-LKGLKX2A.js} +2 -2
- package/dist/cli/chunks/{chunk-CF5EJGOV.js → chunk-LWHM5BWD.js} +2 -2
- package/dist/cli/chunks/{chunk-I6O4MVEY.js → chunk-M2RO34V7.js} +4 -4
- package/dist/cli/chunks/{chunk-XV42SKJD.js → chunk-ME4LVBTT.js} +2 -2
- package/dist/cli/chunks/chunk-MFGYMNNY.js +2 -0
- package/dist/cli/chunks/{chunk-54A2LVKM.js → chunk-MXIFVOYA.js} +2 -2
- package/dist/cli/chunks/{chunk-TOS3PI5Q.js → chunk-NWGIQCCO.js} +1 -1
- package/dist/cli/chunks/chunk-NWZYULZE.js +65 -0
- package/dist/cli/chunks/{chunk-4PCHU2X7.js → chunk-OGLS6HB4.js} +1 -1
- package/dist/cli/chunks/{chunk-E7P6GAD7.js → chunk-ORHCO2I7.js} +2 -2
- package/dist/cli/chunks/{chunk-X3UVXJIK.js → chunk-OZBTC26R.js} +2 -2
- package/dist/cli/chunks/{chunk-ZXJNX5D2.js → chunk-P5YSBYZV.js} +1 -1
- package/dist/cli/chunks/{chunk-GHAEDZDE.js → chunk-PFSSI3YR.js} +2 -2
- package/dist/cli/chunks/{chunk-QIE76ERL.js → chunk-PZF5ISGS.js} +1 -1
- package/dist/cli/chunks/{chunk-3RM2VNYG.js → chunk-Q4DAYLH4.js} +2 -2
- package/dist/cli/chunks/{chunk-OGHIQCJU.js → chunk-QLWP7ZIT.js} +2 -2
- package/dist/cli/chunks/{chunk-Z6F4GRXY.js → chunk-QUK34CSU.js} +2 -2
- package/dist/cli/chunks/chunk-RQFC7Q33.js +2 -0
- package/dist/cli/chunks/{chunk-OBDM6OJL.js → chunk-S2KGZJHS.js} +1 -1
- package/dist/cli/chunks/{chunk-TNQBHQFH.js → chunk-S6SM7LJK.js} +2 -2
- package/dist/cli/chunks/chunk-STYNOKOM.js +2 -0
- package/dist/cli/chunks/{chunk-2RTGP76Y.js → chunk-SUXUCW5I.js} +2 -2
- package/dist/cli/chunks/chunk-SY74WSBN.js +2 -0
- package/dist/cli/chunks/{chunk-FLML5IT7.js → chunk-TJOZPPZR.js} +2 -2
- package/dist/cli/chunks/{chunk-JV7HKHQS.js → chunk-TOSFK4VG.js} +2 -2
- package/dist/cli/chunks/{chunk-VVVIRGO7.js → chunk-UAAJ3BSW.js} +2 -2
- package/dist/cli/chunks/{chunk-QHCOAG7D.js → chunk-UG2J5MTY.js} +1 -1
- package/dist/cli/chunks/{chunk-3AOWTHLS.js → chunk-UIYK4Y7K.js} +2 -2
- package/dist/cli/chunks/{chunk-XXQYSDLV.js → chunk-UUVTLYUK.js} +2 -2
- package/dist/cli/chunks/{chunk-HXLAXSEM.js → chunk-VDGWDDBC.js} +2 -2
- package/dist/cli/chunks/{chunk-GKRKCJ6D.js → chunk-VEAVDXXT.js} +2 -2
- package/dist/cli/chunks/{chunk-YCQ2GHFH.js → chunk-VQB5SLXZ.js} +2 -2
- package/dist/cli/chunks/{chunk-EC2CI3ZC.js → chunk-VU4QET3C.js} +2 -2
- package/dist/cli/chunks/{chunk-OP54A7C6.js → chunk-VUS4VRPQ.js} +2 -2
- package/dist/cli/chunks/{chunk-DHYJMGKC.js → chunk-VVKENR4I.js} +1 -1
- package/dist/cli/chunks/{chunk-ZS5BM2EE.js → chunk-WE7KIXR6.js} +2 -2
- package/dist/cli/chunks/{chunk-ES6CEZG2.js → chunk-WELNFHDN.js} +1 -1
- package/dist/cli/chunks/{chunk-TWRGM5TY.js → chunk-WSZVSDD5.js} +2 -2
- package/dist/cli/chunks/{chunk-SL66MHDM.js → chunk-WUYJYRBY.js} +1 -1
- package/dist/cli/chunks/{chunk-WVWB7K6H.js → chunk-WVN4YJSF.js} +2 -2
- package/dist/cli/chunks/{chunk-CPRYUCPC.js → chunk-XH774Q6Z.js} +1 -1
- package/dist/cli/chunks/{chunk-AZPDX4KS.js → chunk-XNXOW7BQ.js} +2 -2
- package/dist/cli/chunks/{chunk-7HX2PMBB.js → chunk-Y3X5OS5F.js} +2 -2
- package/dist/cli/chunks/chunk-YPMBD44A.js +2 -0
- package/dist/cli/chunks/{chunk-BE2DYHUB.js → chunk-YZBY4ZRF.js} +2 -2
- package/dist/cli/chunks/{chunk-VU7ENCSU.js → chunk-Z3PSKGBO.js} +2 -2
- package/dist/cli/chunks/{chunk-UCCNB75R.js → chunk-ZCRLZINE.js} +2 -2
- package/dist/cli/chunks/{chunk-EBQUXPIG.js → chunk-ZFZX2NA3.js} +2 -2
- package/dist/cli/chunks/{chunk-5TDHUYYF.js → chunk-ZU5VHW6P.js} +2 -2
- package/dist/cli/chunks/{ci-FEEIAOQN.js → ci-QQ4F5TYO.js} +2 -2
- package/dist/cli/chunks/{ci-output-2WMUTORB.js → ci-output-QC4WRENA.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-MFEE23XA.js → circuit-breaker-HFQUNYTK.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-6D655INK.js → claude-flow-setup-XNSCWIUN.js} +2 -2
- package/dist/cli/chunks/client-3GECKJWB.js +2 -0
- package/dist/cli/chunks/{cline-installer-5PIYMPAG.js → cline-installer-S3CECBYL.js} +2 -2
- package/dist/cli/chunks/{code-ACS453WG.js → code-QHUELDUH.js} +2 -2
- package/dist/cli/chunks/{code-index-extractor-5SERI6TM.js → code-index-extractor-QLA5EQTE.js} +2 -2
- package/dist/cli/chunks/{codex-installer-WCUUWHP5.js → codex-installer-CQ7JNNOA.js} +2 -2
- package/dist/cli/chunks/{completions-6WFG3FPJ.js → completions-S33U3KIT.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-IFZEFCB6.js → complexity-analyzer-J7IEW3EM.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-RW6FEEND.js → continuedev-installer-DVU24D37.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-UZPE65RL.js → copilot-installer-DYISOPBC.js} +2 -2
- package/dist/cli/chunks/{cost-tracker-2R4FT6TY.js → cost-tracker-URJADKKS.js} +2 -2
- package/dist/cli/chunks/{coverage-ZUC5U47P.js → coverage-NGMKJNW6.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-UYONX76U.js +2 -0
- package/dist/cli/chunks/{cursor-installer-7JBZT7JZ.js → cursor-installer-DFBJRDSY.js} +2 -2
- package/dist/cli/chunks/daemon-JSKKVVCV.js +19 -0
- package/dist/cli/chunks/{dag-attention-scheduler-MS7D2NFM.js → dag-attention-scheduler-YITFS6MR.js} +2 -2
- package/dist/cli/chunks/{detect-UHOSHYVB.js → detect-5APZP2D3.js} +2 -2
- package/dist/cli/chunks/{domain-handler-BVW4AX7O.js → domain-handler-WHH6XPSZ.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-PA2ENF3D.js → domain-transfer-SERX53SS.js} +2 -2
- package/dist/cli/chunks/dream-Z5QDQJSM.js +2 -0
- package/dist/cli/chunks/esm-node-FOI5Y3O2.js +2 -0
- package/dist/cli/chunks/{eval-Y3ODM7JU.js → eval-FM3BLVFO.js} +2 -2
- package/dist/cli/chunks/{fast-paths-DYQ5NC4Y.js → fast-paths-4MSOOJVK.js} +2 -2
- package/dist/cli/chunks/{feature-flags-YMMGYWT3.js → feature-flags-564YFR65.js} +2 -2
- package/dist/cli/chunks/{feature-flags-V34UZPHG.js → feature-flags-WJT57IEJ.js} +2 -2
- package/dist/cli/chunks/{file-discovery-75ZHSK4G.js → file-discovery-5QVG65WF.js} +2 -2
- package/dist/cli/chunks/{fleet-DD2CFGJL.js → fleet-CF5JRK5B.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-UXM3L5LV.js → gnn-wrapper-NYQ77563.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-ANHRYXNS.js → heartbeat-handler-42QJPKHE.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-7XEAV74Y.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-NOAQ76QF.js +2 -0
- package/dist/cli/chunks/hnsw-index-KDIZQRSB.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-IFUEUOVF.js → hnsw-legacy-bridge-ZRR6PGWN.js} +2 -2
- package/dist/cli/chunks/{hnswlib-node-GYVDPTWU.js → hnswlib-node-DY7NOW76.js} +2 -2
- package/dist/cli/chunks/{hooks-R3DQNG2F.js → hooks-IRRHEJLR.js} +6 -6
- package/dist/cli/chunks/{hybrid-router-MSCQ2XGU.js → hybrid-router-S4JXJLUY.js} +2 -2
- package/dist/cli/chunks/{hypergraph-engine-3TKB5O7T.js → hypergraph-engine-WFHZJMP2.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-4APYID2S.js → hypergraph-handler-LHUKR7PT.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-VDXJBWFG.js +2 -0
- package/dist/cli/chunks/{init-handler-E7B2GKH3.js → init-handler-ZBIW7PSB.js} +6 -6
- package/dist/cli/chunks/init-wizard-Q6DEACKX.js +2 -0
- package/dist/cli/chunks/kernel-YNQOGTM5.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-WY6VTFSA.js → kilocode-installer-JYHA4NW7.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-SCNF3JXD.js → kiro-installer-OBXTRK77.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-GOZG3YOM.js +2 -0
- package/dist/cli/chunks/learning-OAEJHEJD.js +107 -0
- package/dist/cli/chunks/{llm-router-RBKYYHBJ.js → llm-router-NNEOZAVB.js} +4 -4
- package/dist/cli/chunks/{load-FY64UGHV.js → load-WIKLBESW.js} +2 -2
- package/dist/cli/chunks/load-test-UJLTMPXW.js +2 -0
- package/dist/cli/chunks/{mcp-6VMQOWMX.js → mcp-KR43GFGP.js} +2 -2
- package/dist/cli/chunks/{memory-Y5RO4PGM.js → memory-KQIYKAYU.js} +5 -5
- package/dist/cli/chunks/memory-backend-WJH6XER3.js +2 -0
- package/dist/cli/chunks/{memory-handlers-CMMVHHPG.js → memory-handlers-LAI4AO4O.js} +2 -2
- package/dist/cli/chunks/{multi-model-executor-JO3MNMPZ.js → multi-model-executor-NPS3VOAR.js} +3 -3
- package/dist/cli/chunks/{opencode-installer-WQBTY6JT.js → opencode-installer-FE475WME.js} +2 -2
- package/dist/cli/chunks/{orchestrator-4J7OSNSG.js → orchestrator-MW4MZ3RW.js} +5 -5
- package/dist/cli/chunks/{pipeline-63T6HN72.js → pipeline-R2TGZSUA.js} +2 -2
- package/dist/cli/chunks/{platform-UJMD4EPZ.js → platform-N2GZBCBP.js} +2 -2
- package/dist/cli/chunks/{plugin-NDOZ63JW.js → plugin-V2AQF23V.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-ELGHVIFI.js → prime-radiant-advanced-wasm-ZQSYRLRS.js} +2 -2
- package/dist/cli/chunks/protocol-executor-LYYYHXAX.js +2 -0
- package/dist/cli/chunks/{protocol-handler-KYERIMVF.js → protocol-handler-V3U724F2.js} +2 -2
- package/dist/cli/chunks/{prove-ATSSBP4Z.js → prove-NCH56HZB.js} +2 -2
- package/dist/cli/chunks/{provider-manager-YYMIF23V.js → provider-manager-7NUHS3T5.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-JK4UKLYY.js +2 -0
- package/dist/cli/chunks/{quality-2AGJSJW6.js → quality-J3IVPPPW.js} +2 -2
- package/dist/cli/chunks/queen-coordinator-6OKLSCHV.js +2 -0
- package/dist/cli/chunks/{real-embeddings-H36GVXMI.js → real-embeddings-VURZXAEY.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-PMRBAY7O.js → roocode-installer-STWFJGMR.js} +2 -2
- package/dist/cli/chunks/router-DDZHCGUD.js +2 -0
- package/dist/cli/chunks/routing-feedback-BA66F37P.js +2 -0
- package/dist/cli/chunks/{routing-handler-Z7VZSDXW.js → routing-handler-6GZT7EXM.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-N3FZ3ZEE.js → ruvector-commands-LCPAH6WH.js} +2 -2
- package/dist/cli/chunks/{rvf-dual-writer-L5DQHUF3.js → rvf-dual-writer-76LWFT5X.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-adapter-NPGFA3SL.js → rvf-migration-adapter-G7KFWJKY.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-coordinator-MCJDNKXG.js → rvf-migration-coordinator-3DXOUPWF.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-TXTRJNPW.js +2 -0
- package/dist/cli/chunks/safe-db-IFBVWIGF.js +2 -0
- package/dist/cli/chunks/schedule-WMZLOPCW.js +2 -0
- package/dist/cli/chunks/scheduler-WBORWJD5.js +2 -0
- package/dist/cli/chunks/{security-TX7TXUGI.js → security-XDBPYA5T.js} +3 -3
- package/dist/cli/chunks/shared-rvf-adapter-SQQ27EEI.js +2 -0
- package/dist/cli/chunks/{shared-rvf-dual-writer-6K3ZAG7P.js → shared-rvf-dual-writer-UGXTS2XI.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-XH47B3BG.js +2 -0
- package/dist/cli/chunks/{status-handler-MIRLQRNN.js → status-handler-ZLXES3QL.js} +2 -2
- package/dist/cli/chunks/{structural-health-CIHASLUE.js → structural-health-4PFCOQ7T.js} +2 -2
- package/dist/cli/chunks/{sync-FGLAP7EK.js → sync-3DROIEZN.js} +2 -2
- package/dist/cli/chunks/{task-handler-7HMPRCHY.js → task-handler-4UGZ5VIE.js} +2 -2
- package/dist/cli/chunks/{task-handlers-DQLQCLCT.js → task-handlers-I5VVBTWI.js} +2 -2
- package/dist/cli/chunks/{test-JKDO5ZHU.js → test-Z2MM7O5A.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-2YKZ7PVZ.js → test-scheduling-AP76GKN5.js} +4 -4
- package/dist/cli/chunks/{token-bootstrap-C7UUPMQN.js → token-bootstrap-P54N6PZV.js} +2 -2
- package/dist/cli/chunks/{token-usage-2RVIPCY4.js → token-usage-AXAZTPA6.js} +2 -2
- package/dist/cli/chunks/{transformers-UEMAGHQ5.js → transformers-VOZ2Z7FS.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-MELABICK.js → tree-sitter-wasm-parser-IYKLBTXB.js} +2 -2
- package/dist/cli/chunks/{types-5B4RD7ZV.js → types-TKDH5EBW.js} +2 -2
- package/dist/cli/chunks/unified-memory-NHJHPLIC.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-IMMCI2XK.js +2 -0
- package/dist/cli/chunks/unified-persistence-JS6CEV35.js +2 -0
- package/dist/cli/chunks/{validate-CHDG7SC3.js → validate-ZGF5FVZE.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-LB7GORKE.js → validate-swarm-OPWWUWYA.js} +2 -2
- package/dist/cli/chunks/{vibium-ZMC4G2YA.js → vibium-HEQUGRKJ.js} +2 -2
- package/dist/cli/chunks/visual-security-XLO5JBVP.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-THNO6S2V.js → web-tree-sitter-JZ7JCJJR.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-LRB43BPX.js → windsurf-installer-2SGRCS6C.js} +2 -2
- package/dist/cli/chunks/{witness-chain-JC5UBXPM.js → witness-chain-LJUYOCB5.js} +2 -2
- package/dist/cli/chunks/witness-chain-PPWPHYTY.js +2 -0
- package/dist/cli/chunks/{workflow-Q4IYQ6F2.js → workflow-QORI3KO7.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-H4DKRHVP.js +2 -0
- package/dist/cli/chunks/{wrappers-WSSLMFSE.js → wrappers-3NR7LNB5.js} +2 -2
- package/dist/cli/commands/learning.js +28 -8
- package/dist/domains/chaos-resilience/services/chaos-engineer.js +1 -1
- package/dist/domains/constants.d.ts +1 -1
- package/dist/domains/constants.js +1 -1
- package/dist/domains/contract-testing/services/contract-validator.js +1 -1
- package/dist/domains/learning-optimization/services/learning-coordinator.js +1 -1
- package/dist/domains/test-execution/services/test-executor.js +1 -1
- package/dist/domains/test-generation/services/test-data-generator.d.ts +1 -0
- package/dist/domains/test-generation/services/test-data-generator.js +17 -3
- package/dist/domains/visual-accessibility/services/visual-tester.js +1 -1
- package/dist/mcp/bundle.js +1782 -1790
- package/dist/mcp/protocol-server.js +20 -10
- package/package.json +7 -5
- package/dist/cli/chunks/adapter-VP3WBXE5.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-ASPPEOKQ.js +0 -2
- package/dist/cli/chunks/base-SIAOYPTD.js +0 -2
- package/dist/cli/chunks/browser-workflow-BG3M3RZU.js +0 -2
- package/dist/cli/chunks/chunk-3I6KWFJT.js +0 -2
- package/dist/cli/chunks/chunk-4WJ3BHCN.js +0 -24
- package/dist/cli/chunks/chunk-67TMNSO3.js +0 -3
- package/dist/cli/chunks/chunk-APQYMAKG.js +0 -65
- package/dist/cli/chunks/chunk-BSTCXDVH.js +0 -2
- package/dist/cli/chunks/chunk-F74IVEON.js +0 -2
- package/dist/cli/chunks/chunk-FHWDVN65.js +0 -18
- package/dist/cli/chunks/chunk-HEHGQM2H.js +0 -3029
- package/dist/cli/chunks/chunk-HRD7LL7Q.js +0 -2
- package/dist/cli/chunks/chunk-QKTB5FZP.js +0 -2
- package/dist/cli/chunks/chunk-R4B2B6MZ.js +0 -5
- package/dist/cli/chunks/chunk-SI7AQK7I.js +0 -2
- package/dist/cli/chunks/chunk-TVASP2E6.js +0 -2
- package/dist/cli/chunks/chunk-VLZBQ3XN.js +0 -2
- package/dist/cli/chunks/chunk-Y2ONHWXI.js +0 -2
- package/dist/cli/chunks/chunk-YCTGWMCP.js +0 -12
- package/dist/cli/chunks/client-LMOHUGOA.js +0 -2
- package/dist/cli/chunks/cross-domain-router-IZB5ZMXO.js +0 -2
- package/dist/cli/chunks/daemon-YNF54UYB.js +0 -19
- package/dist/cli/chunks/dream-SAPSS25B.js +0 -2
- package/dist/cli/chunks/esm-node-FTBUMV4L.js +0 -2
- package/dist/cli/chunks/heartbeat-scheduler-HYVMXCXT.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-CBDRZLXX.js +0 -2
- package/dist/cli/chunks/hnsw-index-EOJG4VF4.js +0 -2
- package/dist/cli/chunks/impact-analyzer-C2TXXYPC.js +0 -2
- package/dist/cli/chunks/init-wizard-IQV7SBMW.js +0 -2
- package/dist/cli/chunks/kernel-NJOPFGK7.js +0 -2
- package/dist/cli/chunks/knowledge-graph-EUMGCQPH.js +0 -2
- package/dist/cli/chunks/learning-Y4OZJFBV.js +0 -107
- package/dist/cli/chunks/load-test-LBYVVG35.js +0 -2
- package/dist/cli/chunks/memory-backend-NQMJKHCQ.js +0 -2
- package/dist/cli/chunks/protocol-executor-ZSWPG5SU.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-4RLPRCGF.js +0 -2
- package/dist/cli/chunks/queen-coordinator-KQ673NYE.js +0 -2
- package/dist/cli/chunks/router-UBNV4H5S.js +0 -2
- package/dist/cli/chunks/routing-feedback-BMMGZ346.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-LXBCTTVF.js +0 -2
- package/dist/cli/chunks/safe-db-FFSPBUAK.js +0 -2
- package/dist/cli/chunks/schedule-2MOMNZ6B.js +0 -2
- package/dist/cli/chunks/scheduler-5VGVANFG.js +0 -2
- package/dist/cli/chunks/shared-rvf-adapter-6JWYF7WV.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-LCOAORK7.js +0 -2
- package/dist/cli/chunks/unified-memory-CZCWZUFP.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-QEOXVSOZ.js +0 -2
- package/dist/cli/chunks/unified-persistence-HGZAYZGP.js +0 -2
- package/dist/cli/chunks/visual-security-ITKF4E4Z.js +0 -2
- package/dist/cli/chunks/witness-chain-SYFYXQD3.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-GZS2O3KW.js +0 -2
|
@@ -1,2 +0,0 @@
|
|
|
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.13");process.exit(0)}
|
|
2
|
-
import{a as S}from"./chunk-Y2ONHWXI.js";import{c as g}from"./chunk-HHRUXDLT.js";import{S as T,b as l}from"./chunk-W2YCNX4O.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}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}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,2 +0,0 @@
|
|
|
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.13");process.exit(0)}
|
|
2
|
-
import{a as l}from"./chunk-BSTCXDVH.js";import{a as m}from"./chunk-QIE76ERL.js";import{f as a}from"./chunk-IQGVQBVS.js";var u=class{constructor(t,e){this.eventBus=t;this.maxHistorySize=e?.maxHistorySize??1e4,this.eventHistory=new l(this.maxHistorySize),this.correlationTimeout=e?.correlationTimeout??6e4,this.maxEventsPerCorrelation=e?.maxEventsPerCorrelation??100}subscriptions=new Map;correlations=new Map;eventHistory;routes=[];domainSubscriptions=new Map;maxHistorySize;correlationTimeout;maxEventsPerCorrelation;initialized=!1;async initialize(){if(!this.initialized){for(let t of m){let e=this.eventBus.subscribeToChannel(t,async i=>{await this.handleIncomingEvent(i)});this.domainSubscriptions.set(t,e)}this.eventBus.subscribe("*",async t=>{m.includes(t.source)||await this.handleIncomingEvent(t)}),this.initialized=!0}}subscribeToDoamin(t,e){let i=`sub_domain_${a()}`;return this.subscriptions.set(i,{id:i,type:"domain",filter:t,handler:e,active:!0}),i}subscribeToEventType(t,e){let i=`sub_type_${a()}`;return this.subscriptions.set(i,{id:i,type:"eventType",filter:t,handler:e,active:!0}),i}unsubscribe(t){let e=this.subscriptions.get(t);return e?(e.active=!1,this.subscriptions.delete(t),!0):!1}async route(t){this.addToHistory(t),t.correlationId&&this.trackCorrelation(t);let i=this.findMatchingSubscriptions(t).map(async o=>{try{await o.handler(t)}catch(n){console.error(`Error in subscription handler ${o.id}:`,n instanceof Error?n.message:n)}}),r=await this.applyRoutes(t);await Promise.allSettled([...i,...r])}getCorrelation(t){let e=this.correlations.get(t);if(e)return{correlationId:e.correlationId,events:[...e.events],domains:new Set(e.domains),startedAt:e.startedAt,lastEventAt:e.lastEventAt,complete:e.complete}}trackCorrelation(t){if(!t.correlationId)return;let e=this.correlations.get(t.correlationId);e||(e={correlationId:t.correlationId,events:[],domains:new Set,startedAt:t.timestamp,lastEventAt:t.timestamp,complete:!1,timeout:null},this.correlations.set(t.correlationId,e)),e.events.length<this.maxEventsPerCorrelation&&(e.events.push(t),e.domains.add(t.source),e.lastEventAt=t.timestamp),e.timeout&&clearTimeout(e.timeout),e.timeout=setTimeout(()=>{e.complete=!0,e.timeout=null},this.correlationTimeout)}aggregate(t,e){let i=this.eventHistory.toArray().filter(s=>s.timestamp>=t&&s.timestamp<=e),r=new Map,o=new Map;for(let s of i)r.set(s.type,(r.get(s.type)??0)+1),o.set(s.source,(o.get(s.source)??0)+1);let n={totalEvents:i.length,uniqueEventTypes:r.size,uniqueDomains:o.size,eventsPerSecond:i.length>0?i.length/((e.getTime()-t.getTime())/1e3):0};return{id:a(),windowStart:t,windowEnd:e,events:i,countByType:r,countByDomain:o,metrics:n}}getHistory(t){let e=this.eventHistory.toArray();return t&&(t.eventTypes?.length&&(e=e.filter(i=>t.eventTypes.includes(i.type))),t.domains?.length&&(e=e.filter(i=>t.domains.includes(i.source))),t.fromTimestamp&&(e=e.filter(i=>i.timestamp>=t.fromTimestamp)),t.toTimestamp&&(e=e.filter(i=>i.timestamp<=t.toTimestamp)),t.limit&&(e=e.slice(-t.limit))),e}addRoute(t){let e=t.priority??0,i=this.routes.findIndex(r=>(r.priority??0)<e);i===-1?this.routes.push(t):this.routes.splice(i,0,t)}removeRoute(t,e){let i=this.routes.findIndex(r=>r.eventPattern===t&&(e===void 0||r.source===e));return i!==-1?(this.routes.splice(i,1),!0):!1}async dispose(){this.subscriptions.clear();for(let t of this.domainSubscriptions.values())t.unsubscribe();this.domainSubscriptions.clear();for(let t of this.correlations.values())t.timeout&&clearTimeout(t.timeout);this.correlations.clear(),this.eventHistory.clear(),this.initialized=!1}async handleIncomingEvent(t){await this.route(t)}findMatchingSubscriptions(t){let e=[];for(let i of this.subscriptions.values())i.active&&(i.type==="domain"&&i.filter===t.source||i.type==="eventType"&&this.matchEventType(t.type,i.filter))&&e.push(i);return e}matchEventType(t,e){if(e==="*")return!0;let i=e.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*");return new RegExp(`^${i}$`).test(t)}async applyRoutes(t){let e=[];for(let i of this.routes){if(!(i.source==="*"||i.source===t.source||Array.isArray(i.source)&&i.source.includes(t.source))||!this.matchEventType(t.type,i.eventPattern)||i.filter&&!i.filter(t))continue;let o=i.transform?i.transform(t):t;for(let n of i.targets)n!==t.source&&e.push(this.eventBus.publish({...o,id:a(),correlationId:t.correlationId??t.id}))}return e}addToHistory(t){this.eventHistory.push(t)}};function y(c,t){return new u(c,t)}export{u as a,y as b};
|
|
@@ -1,5 +0,0 @@
|
|
|
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.13");process.exit(0)}
|
|
2
|
-
import{a as p,b as A,c as L}from"./chunk-3AOWTHLS.js";var S={reflexThreshold:.1,retrievalThreshold:.4,heavyThreshold:.7},M={enabled:!0,laneConfig:S,coherenceThreshold:.1,fallbackEnabled:!0,timeoutMs:5e3,cacheEnabled:!0,cacheTtlMs:300*1e3},m={debug:()=>{},info:()=>{},warn:()=>{},error:()=>{}},f=class extends Error{constructor(t,i,n){super(t);this.code=i;this.cause=n;this.name="CoherenceError"}},h=class extends f{constructor(e="WASM module is not loaded",t){super(e,"WASM_NOT_LOADED",t),this.name="WasmNotLoadedError"}};var T=class extends f{constructor(t,i,n){super(t,"WASM_LOAD_FAILED",n);this.attempts=i;this.name="WasmLoadError"}},z={maxAttempts:3,baseDelayMs:100,maxDelayMs:5e3,timeoutMs:1e4};L();function D(u){let e=new Map,t=[],i=new Map,n=new Map,r=0,a=s=>{let l=i.get(s);return l===void 0&&(l=r++,i.set(s,l),n.set(l,s)),l},o=s=>n.get(s)??`unknown-${s}`,d=()=>({nodes:Array.from(e.entries()).map(([s,l])=>({id:a(s),label:s,section:Array.from(l.embedding),weight:1})),edges:t.map(s=>({source:a(s.source),target:a(s.target),weight:s.weight}))});return{add_node(s,l){e.set(s,{embedding:l}),a(s)},add_edge(s,l,c){t.push({source:s,target:l,weight:c}),a(s),a(l)},remove_node(s){e.delete(s);for(let l=t.length-1;l>=0;l--)(t[l].source===s||t[l].target===s)&&t.splice(l,1)},remove_edge(s,l){let c=t.findIndex(g=>g.source===s&&g.target===l);c>=0&&t.splice(c,1)},sheaf_laplacian_energy(){let s=d();return u.consistencyEnergy(s)},detect_contradictions(s){let l=d(),c=u.detectObstructions(l);return c?c.filter(g=>g.energy>s).map(g=>({node1:o(g.node1),node2:o(g.node2),severity:g.energy,distance:g.energy})):[]},clear(){e.clear(),t.length=0,i.clear(),n.clear(),r=0}}}var y=class{constructor(e,t=m){this.wasmLoader=e;this.logger=t}engine=null;initialized=!1;nodes=new Map;edges=[];async initialize(){if(this.initialized)return;if(this.logger.debug("Initializing CohomologyAdapter"),!await this.wasmLoader.isAvailable())throw new h("WASM module is not available. Cannot initialize CohomologyAdapter.");let t=await this.wasmLoader.load(),i=new t.CohomologyEngine;this.engine=D(i),this.initialized=!0,this.logger.info("CohomologyAdapter initialized successfully")}isInitialized(){return this.initialized}ensureInitialized(){if(!this.initialized||!this.engine)throw new h("CohomologyAdapter not initialized. Call initialize() first.")}addNode(e){this.ensureInitialized(),this.nodes.set(e.id,e);let t=new Float64Array(e.embedding);this.engine.add_node(e.id,t),this.logger.debug("Added node to cohomology graph",{nodeId:e.id,embeddingDim:e.embedding.length})}addEdge(e){this.ensureInitialized(),this.edges.push(e),this.engine.add_edge(e.source,e.target,e.weight),this.logger.debug("Added edge to cohomology graph",{source:e.source,target:e.target,weight:e.weight})}removeNode(e){this.ensureInitialized(),this.nodes.delete(e),this.engine.remove_node(e);let t=[];this.edges.forEach((i,n)=>{(i.source===e||i.target===e)&&t.push(n)}),t.reverse().forEach(i=>this.edges.splice(i,1)),this.logger.debug("Removed node from cohomology graph",{nodeId:e})}removeEdge(e,t){this.ensureInitialized();let i=this.edges.findIndex(n=>n.source===e&&n.target===t);i>=0&&this.edges.splice(i,1),this.engine.remove_edge(e,t),this.logger.debug("Removed edge from cohomology graph",{source:e,target:t})}computeEnergy(){this.ensureInitialized();let e=this.engine.sheaf_laplacian_energy();return this.logger.debug("Computed sheaf Laplacian energy",{energy:e}),e}detectContradictions(e=.1){this.ensureInitialized();let i=this.engine.detect_contradictions(e).map(n=>this.transformContradiction(n));return this.logger.debug("Detected contradictions",{count:i.length,threshold:e}),i}transformContradiction(e){return{nodeIds:[e.node1,e.node2],severity:this.severityFromDistance(e.severity),description:this.generateContradictionDescription(e),confidence:1-e.distance,resolution:this.suggestResolution(e)}}severityFromDistance(e){return e>=.9?"critical":e>=.7?"high":e>=.4?"medium":e>=.2?"low":"info"}generateContradictionDescription(e){let t=this.nodes.get(e.node1),i=this.nodes.get(e.node2);return t?.metadata?.statement&&i?.metadata?.statement?`Contradiction detected between "${t.metadata.statement}" and "${i.metadata.statement}"`:`Contradiction detected between nodes '${e.node1}' and '${e.node2}' with distance ${e.distance.toFixed(3)}`}suggestResolution(e){return e.severity>=.9?"Critical contradiction requires manual review. Consider removing one of the conflicting beliefs.":e.severity>=.7?"High-severity contradiction. Recommend gathering additional evidence to determine which belief is correct.":e.severity>=.4?"Moderate contradiction. Consider adding context or constraints to differentiate the beliefs.":"Low-severity contradiction. May be resolved with additional context or can be safely ignored."}clear(){this.ensureInitialized(),this.nodes.clear(),this.edges.length=0,this.engine.clear(),this.logger.debug("Cleared cohomology graph")}dispose(){this.engine&&(this.engine.clear(),this.engine=null),this.nodes.clear(),this.edges.length=0,this.initialized=!1,this.logger.info("CohomologyAdapter disposed")}getNodeCount(){return this.nodes.size}getEdgeCount(){return this.edges.length}getNode(e){return this.nodes.get(e)}};L();function N(u){let e=new Set,t=[],i=new Map,n=new Map,r=0,a=s=>{let l=i.get(s);return l===void 0&&(l=r++,i.set(s,l),n.set(l,s)),l},o=s=>n.get(s)??`unknown-${s}`,d=()=>({n:e.size,edges:t.map(s=>[a(s.source),a(s.target),s.weight])});return{add_node(s){e.add(s),a(s)},add_edge(s,l,c){t.push({source:s,target:l,weight:c}),a(s),a(l)},remove_node(s){e.delete(s);for(let l=t.length-1;l>=0;l--)(t[l].source===s||t[l].target===s)&&t.splice(l,1)},compute_fiedler_value(){if(e.size<2||t.length===0)return 0;try{let s=d(),l=u.algebraicConnectivity(s);return Number.isFinite(l)&&l>=0?l:0}catch(s){return console.warn("[SpectralAdapter] algebraicConnectivity failed:",s),0}},predict_collapse_risk(){if(e.size<2)return 0;if(t.length===0)return 1;try{let s=d(),l=u.algebraicConnectivity(s),c=Number.isFinite(l)&&l>=0?l:0;return Math.max(0,Math.min(1,1-c))}catch(s){return console.warn("[SpectralAdapter] predict_collapse_risk failed:",s),.8}},get_weak_vertices(s){if(e.size===0)return[];if(t.length===0)return Array.from(e).slice(0,s);try{let l=d(),c=u.predictMinCut(l);return c?.vertices?c.vertices.slice(0,s).map(g=>o(g)):Array.from(e).slice(0,s)}catch(l){return console.warn("[SpectralAdapter] predictMinCut failed:",l),Array.from(e).slice(0,s)}},clear(){e.clear(),t.length=0,i.clear(),n.clear(),r=0}}}var v=class{constructor(e,t=m){this.wasmLoader=e;this.logger=t}engine=null;initialized=!1;nodes=new Set;edges=[];async initialize(){if(this.initialized)return;if(this.logger.debug("Initializing SpectralAdapter"),!await this.wasmLoader.isAvailable())throw new h("WASM module is not available. Cannot initialize SpectralAdapter.");let t=await this.wasmLoader.load(),i=new t.SpectralEngine;this.engine=N(i),this.initialized=!0,this.logger.info("SpectralAdapter initialized successfully")}isInitialized(){return this.initialized}ensureInitialized(){if(!this.initialized||!this.engine)throw new h("SpectralAdapter not initialized. Call initialize() first.")}addNode(e){if(this.ensureInitialized(),this.nodes.has(e)){this.logger.debug("Node already exists",{nodeId:e});return}this.nodes.add(e),this.engine.add_node(e),this.logger.debug("Added node to spectral graph",{nodeId:e})}addEdge(e,t,i){this.ensureInitialized(),this.nodes.has(e)||this.addNode(e),this.nodes.has(t)||this.addNode(t),this.edges.push({source:e,target:t,weight:i}),this.engine.add_edge(e,t,i),this.logger.debug("Added edge to spectral graph",{source:e,target:t,weight:i})}removeNode(e){this.ensureInitialized(),this.nodes.delete(e),this.engine.remove_node(e);for(let t=this.edges.length-1;t>=0;t--){let i=this.edges[t];(i.source===e||i.target===e)&&this.edges.splice(t,1)}this.logger.debug("Removed node from spectral graph",{nodeId:e})}computeFiedlerValue(){if(this.ensureInitialized(),this.nodes.size<2||this.edges.length===0)return 0;try{let e=this.engine.compute_fiedler_value();return this.logger.debug("Computed Fiedler value",{fiedlerValue:e}),e}catch(e){return this.logger.warn("Failed to compute Fiedler value",{error:p(e),nodeCount:this.nodes.size,edgeCount:this.edges.length}),0}}predictCollapseRisk(){if(this.ensureInitialized(),this.nodes.size<2)return 0;if(this.edges.length===0)return 1;try{let e=this.engine.predict_collapse_risk();return this.logger.debug("Predicted collapse risk",{risk:e}),e}catch(e){return this.logger.warn("Failed to predict collapse risk",{error:p(e),nodeCount:this.nodes.size,edgeCount:this.edges.length}),.8}}getWeakVertices(e){if(this.ensureInitialized(),this.nodes.size===0)return[];if(this.edges.length===0)return Array.from(this.nodes).slice(0,e);let t=Math.min(e,this.nodes.size);try{let i=this.engine.get_weak_vertices(t);return this.logger.debug("Retrieved weak vertices",{requested:e,returned:i.length}),i}catch(i){return this.logger.warn("Failed to get weak vertices",{error:p(i),nodeCount:this.nodes.size,edgeCount:this.edges.length}),Array.from(this.nodes).slice(0,e)}}analyzeSwarmState(e){let t=Date.now();this.clear();for(let d of e.agents)this.addNode(d.agentId);this.buildEdgesFromAgents(e.agents);let i=this.predictCollapseRisk(),n=this.computeFiedlerValue(),r=this.getWeakVertices(5),a=Date.now()-t,o={risk:i,fiedlerValue:n,collapseImminent:i>.7,weakVertices:r,recommendations:this.generateRecommendations(i,n,r),durationMs:a,usedFallback:!1};return this.logger.info("Analyzed swarm state",{agentCount:e.agents.length,risk:i,fiedlerValue:n,durationMs:a}),o}buildEdgesFromAgents(e){for(let t=0;t<e.length;t++)for(let i=t+1;i<e.length;i++){let n=this.computeAgentSimilarity(e[t],e[i]);n>.3&&this.addEdge(e[t].agentId,e[i].agentId,n)}}computeAgentSimilarity(e,t){let i=1-Math.abs(e.health-t.health),n=1-Math.abs(e.successRate-t.successRate),r=e.agentType===t.agentType?.2:0,a=0,o=e.beliefs??[],d=t.beliefs??[];return o.length>0&&d.length>0&&(a=this.computeBeliefOverlap(o,d)),i*.3+n*.3+r+a*.2}computeBeliefOverlap(e,t){if(e.length===0||t.length===0)return 0;let i=0,n=0;for(let r of e)for(let a of t)i+=this.cosineSimilarity(r.embedding,a.embedding),n++;return n>0?i/n:0}cosineSimilarity(e,t){if(e.length!==t.length||e.length===0)return 0;let i=0,n=0,r=0;for(let o=0;o<e.length;o++)i+=e[o]*t[o],n+=e[o]*e[o],r+=t[o]*t[o];let a=Math.sqrt(n)*Math.sqrt(r);return a===0?0:i/a}generateRecommendations(e,t,i){let n=[];return e>.7?(n.push("CRITICAL: Immediate action required to prevent swarm collapse."),n.push("Consider spawning additional coordination agents to strengthen connectivity.")):e>.5&&n.push("WARNING: Elevated collapse risk detected. Monitor closely."),t<.1&&n.push("Network connectivity is weak. Consider adding redundant communication channels."),t<.05&&(n.push("ALERT: Near-zero Fiedler value indicates potential false consensus."),n.push("Recommend spawning an independent reviewer to verify decisions.")),i.length>0&&n.push(`At-risk agents: ${i.join(", ")}. Consider reassigning critical tasks.`),n.length===0&&n.push("Swarm health is good. No immediate action required."),n}clear(){this.ensureInitialized(),this.nodes.clear(),this.edges.length=0,this.engine.clear(),this.logger.debug("Cleared spectral graph")}dispose(){this.engine&&(this.engine.clear(),this.engine=null),this.nodes.clear(),this.edges.length=0,this.initialized=!1,this.logger.info("SpectralAdapter disposed")}getNodeCount(){return this.nodes.size}getEdgeCount(){return this.edges.length}};function O(u){let e=null,t=null,i=new Map,n=()=>({cause:e?Array.from(e):[],effect:t?Array.from(t):[],confounders:Object.fromEntries(Array.from(i.entries()).map(([r,a])=>[r,Array.from(a)]))});return{set_data(r,a){e=r,t=a},add_confounder(r,a){i.set(r,a)},compute_causal_effect(){let r=n();return u.computeCausalEffect(r,"cause","effect",1)?.effect??0},detect_spurious_correlation(){let r=n();return(u.findConfounders(r,"cause","effect")?.length??0)>0},get_confounders(){let r=n();return u.findConfounders(r,"cause","effect")??Array.from(i.keys())},clear(){e=null,t=null,i.clear()}}}var b=class{constructor(e,t=m){this.wasmLoader=e;this.logger=t}engine=null;initialized=!1;currentCause="";currentEffect="";async initialize(){if(this.initialized)return;if(this.logger.debug("Initializing CausalAdapter"),!await this.wasmLoader.isAvailable())throw new h("WASM module is not available. Cannot initialize CausalAdapter.");let t=await this.wasmLoader.load(),i=new t.CausalEngine;this.engine=O(i),this.initialized=!0,this.logger.info("CausalAdapter initialized successfully")}isInitialized(){return this.initialized}ensureInitialized(){if(!this.initialized||!this.engine)throw new h("CausalAdapter not initialized. Call initialize() first.")}verifyCausality(e,t,i){this.ensureInitialized();let n=Date.now();if(this.clear(),this.currentCause=e,this.currentEffect=t,this.setData(i.causeValues,i.effectValues),i.confounders)for(let[g,P]of Object.entries(i.confounders))this.addConfounder(g,P);let r=this.computeCausalEffect(),a=this.detectSpuriousCorrelation(),o=this.getConfounders(),d=this.determineRelationshipType(r,a,o.length>0),s=this.computeConfidence(i.sampleSize,r,a),l=Date.now()-n,c={isCausal:d==="causal",effectStrength:r,relationshipType:d,confidence:s,confounders:o,explanation:this.generateExplanation(e,t,d,r,o),durationMs:l,usedFallback:!1};return this.logger.info("Verified causality",{cause:e,effect:t,isCausal:c.isCausal,relationshipType:d,effectStrength:r,durationMs:l}),c}setData(e,t){if(this.ensureInitialized(),e.length!==t.length)throw new Error(`Cause and effect arrays must have same length. Got ${e.length} and ${t.length}.`);let i=new Float64Array(e),n=new Float64Array(t);this.engine.set_data(i,n),this.logger.debug("Set causal data",{sampleSize:e.length})}addConfounder(e,t){this.ensureInitialized();let i=new Float64Array(t);this.engine.add_confounder(e,i),this.logger.debug("Added confounder",{name:e,valueCount:t.length})}computeCausalEffect(){this.ensureInitialized();let e=this.engine.compute_causal_effect();return this.logger.debug("Computed causal effect",{effect:e}),e}detectSpuriousCorrelation(){this.ensureInitialized();let e=this.engine.detect_spurious_correlation();return this.logger.debug("Detected spurious correlation",{isSpurious:e}),e}getConfounders(){return this.ensureInitialized(),this.engine.get_confounders()}determineRelationshipType(e,t,i){return e<.1?"none":t?"spurious":i?"confounded":e<0?"reverse":"causal"}computeConfidence(e,t,i){let n=Math.min(1,e/100)*.5;return n+=Math.abs(t)*.3,i&&(n+=.15),Math.min(.95,n)}generateExplanation(e,t,i,n,r){switch(i){case"causal":return`Analysis indicates a true causal relationship between '${e}' and '${t}'. Effect strength: ${(n*100).toFixed(1)}%. Changes in '${e}' are likely to cause changes in '${t}'.`;case"spurious":return`The correlation between '${e}' and '${t}' appears to be spurious. No true causal mechanism detected. This may be coincidental or due to a hidden common cause.`;case"reverse":return`Analysis suggests reverse causation: '${t}' may cause '${e}', not the other way around. Consider swapping the direction of your hypothesis.`;case"confounded":return`The relationship between '${e}' and '${t}' is confounded by: ${r.join(", ")}. These variables may explain the observed correlation without direct causation.`;case"none":return`No significant relationship detected between '${e}' and '${t}'. Effect strength is below the detection threshold.`;default:return`Analysis complete for '${e}' -> '${t}'.`}}clear(){this.ensureInitialized(),this.engine.clear(),this.currentCause="",this.currentEffect="",this.logger.debug("Cleared causal engine state")}dispose(){this.engine&&(this.engine.clear(),this.engine=null),this.initialized=!1,this.logger.info("CausalAdapter disposed")}};function H(u){let e=new Map,t=[],i=()=>({objects:Array.from(e.entries()).map(([n,r])=>({name:n,schema:r})),morphisms:t.map(n=>({source:n.source,target:n.target,name:n.name}))});return{add_type(n,r){e.set(n,r)},add_morphism(n,r,a){t.push({source:n,target:r,name:a})},verify_composition(n){if(n.length<2)return!0;for(let a=0;a<n.length-1;a++){let o=n[a],d=n[a+1];if(!t.some(l=>l.source===o&&l.target===d))return!1}let r=i();return u.verifyCategoryLaws(r)},check_type_consistency(){let n=[];for(let r of t)e.has(r.source)||n.push({location:r.name,expected:"defined type",actual:`undefined type '${r.source}'`}),e.has(r.target)||n.push({location:r.name,expected:"defined type",actual:`undefined type '${r.target}'`});return n},clear(){e.clear(),t.length=0}}}var C=class{constructor(e,t=m){this.wasmLoader=e;this.logger=t}engine=null;initialized=!1;types=new Map;morphisms=[];async initialize(){if(this.initialized)return;if(this.logger.debug("Initializing CategoryAdapter"),!await this.wasmLoader.isAvailable())throw new h("WASM module is not available. Cannot initialize CategoryAdapter.");let t=await this.wasmLoader.load(),i=new t.CategoryEngine;this.engine=H(i),this.initialized=!0,this.logger.info("CategoryAdapter initialized successfully")}isInitialized(){return this.initialized}ensureInitialized(){if(!this.initialized||!this.engine)throw new h("CategoryAdapter not initialized. Call initialize() first.")}addType(e,t){this.ensureInitialized(),this.types.set(e,t),this.engine.add_type(e,t),this.logger.debug("Added type to category",{name:e})}addMorphism(e,t,i){this.ensureInitialized(),this.morphisms.push({source:e,target:t,name:i}),this.engine.add_morphism(e,t,i),this.logger.debug("Added morphism to category",{source:e,target:t,name:i})}verifyComposition(e){if(this.ensureInitialized(),e.length<2)return!0;let t=this.engine.verify_composition(e);return this.logger.debug("Verified composition",{path:e,isValid:t}),t}checkTypeConsistency(){this.ensureInitialized();let t=this.engine.check_type_consistency().map(i=>this.transformMismatch(i));return this.logger.debug("Checked type consistency",{mismatchCount:t.length}),t}verifyPipeline(e){let t=Date.now();this.clear(),this.addType(e.inputType,this.inferSchema(e.inputType)),this.addType(e.outputType,this.inferSchema(e.outputType));for(let s of e.elements)this.addType(s.inputType,this.inferSchema(s.inputType)),this.addType(s.outputType,this.inferSchema(s.outputType));for(let s of e.elements)this.addMorphism(s.inputType,s.outputType,s.name);let i=this.buildCompositionPath(e),n=this.verifyComposition(i),r=this.checkTypeConsistency(),a=this.generateWarnings(e,n,r),o=Date.now()-t,d={isValid:n&&r.length===0,mismatches:r,warnings:a,durationMs:o,usedFallback:!1};return this.logger.info("Verified pipeline",{pipelineId:e.id,isValid:d.isValid,mismatchCount:r.length,warningCount:a.length,durationMs:o}),d}buildCompositionPath(e){let t=[e.inputType];for(let i of e.elements)i.inputType!==t[t.length-1]&&t.push(i.inputType),t.push(i.outputType);return t[t.length-1]!==e.outputType&&t.push(e.outputType),t}inferSchema(e){return e.endsWith("[]")?`{ items: ${e.slice(0,-2)}[] }`:e.includes("|")?`{ union: [${e.split("|").map(t=>`"${t.trim()}"`).join(", ")}] }`:`{ type: "${e}" }`}transformMismatch(e){return{location:e.location,expected:e.expected,actual:e.actual,severity:this.determineMismatchSeverity(e)}}determineMismatchSeverity(e){return e.expected==="never"||e.actual==="never"?"critical":e.actual==="any"||e.actual==="unknown"?"high":e.expected.includes(e.actual)||e.actual.includes(e.expected)?"medium":"low"}generateWarnings(e,t,i){let n=[];t||n.push(`Pipeline '${e.id}' has an invalid composition chain. Types do not connect properly from input to output.`);for(let a of e.elements)(a.inputType==="any"||a.outputType==="any")&&n.push(`Element '${a.name}' uses 'any' type, which bypasses type safety.`);for(let a of e.elements)(a.inputType.includes("<T>")||a.outputType.includes("<T>"))&&n.push(`Element '${a.name}' has unconstrained generic types.`);let r=i.filter(a=>a.severity==="critical");return r.length>0&&n.push(`Found ${r.length} critical type mismatch(es) that will cause runtime errors.`),n}clear(){this.ensureInitialized(),this.types.clear(),this.morphisms.length=0,this.engine.clear(),this.logger.debug("Cleared category")}dispose(){this.engine&&(this.engine.clear(),this.engine=null),this.types.clear(),this.morphisms.length=0,this.initialized=!1,this.logger.info("CategoryAdapter disposed")}getTypeCount(){return this.types.size}getMorphismCount(){return this.morphisms.length}};function V(u){let e=new Map,t=new Map;return{add_proposition(i,n){e.set(i,{formula:n,proven:!1})},add_proof(i,n){let r=e.get(i);if(!r)return!1;let a={id:i,proof:n},o={formula:r.formula};return u.typeCheck(a,o)?.valid?(r.proven=!0,t.set(i,n),!0):!1},verify_path_equivalence(i,n){let r={steps:i},a={steps:n};return u.checkTypeEquivalence(r,a)},get_unproven_propositions(){let i=[];return e.forEach((n,r)=>{n.proven||i.push(r)}),i},clear(){e.clear(),t.clear()}}}var w=class{constructor(e,t=m){this.wasmLoader=e;this.logger=t}engine=null;initialized=!1;propositions=new Map;async initialize(){if(this.initialized)return;if(this.logger.debug("Initializing HomotopyAdapter"),!await this.wasmLoader.isAvailable())throw new h("WASM module is not available. Cannot initialize HomotopyAdapter.");let t=await this.wasmLoader.load(),i=new t.HoTTEngine;this.engine=V(i),this.initialized=!0,this.logger.info("HomotopyAdapter initialized successfully")}isInitialized(){return this.initialized}ensureInitialized(){if(!this.initialized||!this.engine)throw new h("HomotopyAdapter not initialized. Call initialize() first.")}addProposition(e,t){this.ensureInitialized();let i={id:e,formula:t,proven:!1};this.propositions.set(e,i),this.engine.add_proposition(e,t),this.logger.debug("Added proposition",{id:e,formula:t})}addProof(e,t){this.ensureInitialized();let i=this.propositions.get(e);if(!i)return this.logger.warn("Proposition not found",{propositionId:e}),!1;let n=this.engine.add_proof(e,t);return n?(i.proven=!0,this.logger.info("Proposition proven",{propositionId:e})):this.logger.warn("Proof rejected",{propositionId:e}),n}verifyPathEquivalence(e,t){this.ensureInitialized();let i=this.engine.verify_path_equivalence(e,t),n=this.generateEquivalenceExplanation(e,t,i),r={equivalent:i,path1:e,path2:t,explanation:n};return this.logger.debug("Verified path equivalence",{path1Length:e.length,path2Length:t.length,equivalent:i}),r}generateEquivalenceExplanation(e,t,i){if(i)return e.length===t.length?"The execution paths are homotopically equivalent. Both paths traverse the same abstract structure and will produce equivalent results.":`The execution paths are equivalent despite different lengths. The ${e.length>t.length?"first":"second"} path contains redundant steps that can be contracted without changing the result (homotopy contraction).`;{let n=0,r=Math.min(e.length,t.length);for(;n<r&&e[n]===t[n];)n++;return n===0?`The execution paths diverge immediately. Path 1 starts with '${e[0]}' while Path 2 starts with '${t[0]}'. These lead to fundamentally different computation spaces.`:`The execution paths diverge at step ${n+1}. After '${e[n-1]}', Path 1 proceeds to '${e[n]}' while Path 2 proceeds to '${t[n]}'. No homotopy exists between these paths.`}}getUnprovenPropositions(){return this.ensureInitialized(),this.engine.get_unproven_propositions()}getVerificationStatus(){let e=this.propositions.size,t=Array.from(this.propositions.values()).filter(n=>n.proven).length,i=this.getUnprovenPropositions();return{totalPropositions:e,provenCount:t,unprovenIds:i,verificationPercentage:e>0?t/e*100:100}}getProposition(e){return this.propositions.get(e)}clear(){this.ensureInitialized(),this.propositions.clear(),this.engine.clear(),this.logger.debug("Cleared homotopy engine")}dispose(){this.engine&&(this.engine.clear(),this.engine=null),this.propositions.clear(),this.initialized=!1,this.logger.info("HomotopyAdapter disposed")}getPropositionCount(){return this.propositions.size}};import{createHash as $}from"crypto";var E=class{constructor(e,t=m){this.wasmLoader=e;this.logger=t}engine=null;initialized=!1;witnesses=new Map;decisions=new Map;witnessCounter=0;async initialize(){if(this.initialized)return;if(this.logger.debug("Initializing WitnessAdapter"),!await this.wasmLoader.isAvailable())throw new h("WASM module is not available. Cannot initialize WitnessAdapter.");let t=await this.wasmLoader.load();this.engine=this.createWitnessEngine(t),this.initialized=!0,this.logger.info("WitnessAdapter initialized successfully")}createWitnessEngine(e){return this.createFallbackEngine()}createFallbackEngine(){let e=[];return{create_witness:(t,i)=>{let r={hash:this.computeHash(t,i),previousHash:i,position:e.length,timestamp:Date.now()};return e.push(r),r},verify_witness:(t,i)=>{let n=e.find(a=>a.hash===i);return this.computeHash(t,n?.previousHash)===i},verify_chain:t=>{if(t.length===0)return!0;if(t[0].previousHash!==void 0)return!1;for(let i=1;i<t.length;i++)if(t[i].previousHash!==t[i-1].hash)return!1;return!0},get_chain_length:()=>e.length}}computeHash(e,t){let i=$("sha256");return i.update(e),t&&i.update(t,"utf-8"),i.digest("hex")}isInitialized(){return this.initialized}ensureInitialized(){if(!this.initialized||!this.engine)throw new h("WitnessAdapter not initialized. Call initialize() first.")}createWitness(e){this.ensureInitialized();let t=this.serializeDecision(e),i=this.getLastWitness(),n=i?.hash,r=this.engine.create_witness(t,n),a=`witness-${++this.witnessCounter}-${Date.now()}`,o={witnessId:a,decisionId:e.id,hash:r.hash,previousWitnessId:i?.witnessId,chainPosition:r.position,timestamp:new Date(r.timestamp)};return this.witnesses.set(a,o),this.decisions.set(e.id,e),this.logger.info("Created witness",{witnessId:a,decisionId:e.id,chainPosition:o.chainPosition}),o}verifyWitness(e,t){this.ensureInitialized();let i=this.serializeDecision(e),n=this.engine.verify_witness(i,t);return this.logger.debug("Verified witness",{decisionId:e.id,hash:t,isValid:n}),n}verifyChain(e){if(this.ensureInitialized(),e.length===0)return!0;let t=e.map(n=>({hash:n.hash,previousHash:n.previousWitnessId?this.witnesses.get(n.previousWitnessId)?.hash:void 0,position:n.chainPosition,timestamp:n.timestamp.getTime()})),i=this.engine.verify_chain(t);return this.logger.info("Verified witness chain",{chainLength:e.length,isValid:i}),i}replayFromWitness(e){let t=Date.now(),i=this.witnesses.get(e);if(!i)return{success:!1,decision:this.createEmptyDecision(),matchesOriginal:!1,differences:[`Witness not found: ${e}`],durationMs:Date.now()-t};let n=this.decisions.get(i.decisionId);if(!n)return{success:!1,decision:this.createEmptyDecision(),matchesOriginal:!1,differences:[`Decision not found: ${i.decisionId}`],durationMs:Date.now()-t};let r=this.verifyWitness(n,i.hash),a=Date.now()-t,o={success:!0,decision:n,matchesOriginal:r,differences:r?void 0:["Hash mismatch detected"],durationMs:a};return this.logger.info("Replayed from witness",{witnessId:e,decisionId:n.id,matchesOriginal:r,durationMs:a}),o}getChainLength(){return this.ensureInitialized(),this.engine.get_chain_length()}getWitnessChain(){return Array.from(this.witnesses.values()).sort((e,t)=>e.chainPosition-t.chainPosition)}getWitness(e){return this.witnesses.get(e)}getLastWitness(){let e=this.getWitnessChain();return e[e.length-1]}serializeDecision(e){let t=JSON.stringify({id:e.id,type:e.type,inputs:e.inputs,output:e.output,agents:e.agents,timestamp:e.timestamp.toISOString(),reasoning:e.reasoning});return new TextEncoder().encode(t)}createEmptyDecision(){return{id:"",type:"routing",inputs:{},output:null,agents:[],timestamp:new Date}}dispose(){this.witnesses.clear(),this.decisions.clear(),this.witnessCounter=0,this.engine=null,this.initialized=!1,this.logger.info("WitnessAdapter disposed")}};var I=class{constructor(e,t={},i){this.wasmLoader=e;this.config={...M,...t},this.logger=i||m}config;logger;cohomologyAdapter=null;spectralAdapter=null;causalAdapter=null;categoryAdapter=null;homotopyAdapter=null;witnessAdapter=null;initialized=!1;stats={totalChecks:0,coherentCount:0,incoherentCount:0,averageEnergy:0,averageDurationMs:0,totalContradictions:0,laneDistribution:{reflex:0,retrieval:0,heavy:0,human:0},fallbackCount:0,wasmAvailable:!1};totalEnergySum=0;totalDurationSum=0;async initialize(){if(this.initialized)return;this.logger.info("Initializing CoherenceService");let e=await this.wasmLoader.isAvailable();if(!e&&!this.config.fallbackEnabled)throw new h("WASM module is not available and fallback is disabled. Enable fallbackEnabled in config to use TypeScript fallback.");if(this.stats.wasmAvailable=e,e)try{this.cohomologyAdapter=new y(this.wasmLoader,this.logger),this.spectralAdapter=new v(this.wasmLoader,this.logger),this.causalAdapter=new b(this.wasmLoader,this.logger),this.categoryAdapter=new C(this.wasmLoader,this.logger),this.homotopyAdapter=new w(this.wasmLoader,this.logger),this.witnessAdapter=new E(this.wasmLoader,this.logger),await Promise.all([this.cohomologyAdapter.initialize(),this.spectralAdapter.initialize(),this.causalAdapter.initialize(),this.categoryAdapter.initialize(),this.homotopyAdapter.initialize(),this.witnessAdapter.initialize()]),this.logger.info("All coherence engine adapters initialized")}catch(t){if(!this.config.fallbackEnabled)throw t;this.logger.warn("WASM initialization failed, using fallback",{error:t instanceof Error?t.message:"Unknown error"}),this.stats.wasmAvailable=!1}else this.logger.info("WASM not available, using TypeScript fallback");this.initialized=!0,this.logger.info("CoherenceService initialized",{wasmAvailable:this.stats.wasmAvailable,fallbackEnabled:this.config.fallbackEnabled})}isInitialized(){return this.initialized}ensureInitialized(){if(!this.initialized)throw new f("CoherenceService not initialized. Call initialize() first.","NOT_INITIALIZED")}async checkCoherence(e){this.ensureInitialized();let t=Date.now();try{return this.cohomologyAdapter?.isInitialized()?await this.checkCoherenceWithWasm(e,t):this.checkCoherenceWithFallback(e,t)}catch(i){return this.logger.error("Coherence check failed",A(i)),{energy:1,isCoherent:!1,lane:"human",contradictions:[],recommendations:["Coherence check failed. Manual review recommended."],durationMs:Date.now()-t,usedFallback:!0}}}async checkCoherenceWithWasm(e,t){this.cohomologyAdapter.clear();for(let o of e)this.cohomologyAdapter.addNode(o);this.buildEdgesFromNodes(e);let i=this.cohomologyAdapter.computeEnergy(),n=this.cohomologyAdapter.detectContradictions(this.config.coherenceThreshold),r=this.computeLane(i),a=Date.now()-t;return this.updateStats(i,a,n.length,r,!1),{energy:i,isCoherent:i<this.config.coherenceThreshold,lane:r,contradictions:n,recommendations:this.generateRecommendations(i,r,n),durationMs:a,usedFallback:!1}}checkCoherenceWithFallback(e,t){this.stats.fallbackCount++;let i=0,n=0,r=[];for(let s=0;s<e.length;s++)for(let l=s+1;l<e.length;l++){let c=this.euclideanDistance(e[s].embedding,e[l].embedding);i+=c,n++,c>1.5&&r.push({nodeIds:[e[s].id,e[l].id],severity:c>2?"critical":"high",description:`High distance (${c.toFixed(2)}) between nodes`,confidence:Math.min(1,c/2)})}let a=n>0?i/n:0,o=this.computeLane(a),d=Date.now()-t;return this.updateStats(a,d,r.length,o,!0),{energy:a,isCoherent:a<this.config.coherenceThreshold,lane:o,contradictions:r,recommendations:this.generateRecommendations(a,o,r),durationMs:d,usedFallback:!0}}buildEdgesFromNodes(e){for(let t=0;t<e.length;t++)for(let i=t+1;i<e.length;i++){let n=this.cosineSimilarity(e[t].embedding,e[i].embedding);n>.3&&this.cohomologyAdapter.addEdge({source:e[t].id,target:e[i].id,weight:n})}}async detectContradictions(e){this.ensureInitialized();let t=e.map(n=>({id:n.id,embedding:n.embedding,weight:n.confidence,metadata:{statement:n.statement,source:n.source}}));return(await this.checkCoherence(t)).contradictions}async predictCollapse(e){if(this.ensureInitialized(),!e.agents||e.agents.length===0)return{risk:0,fiedlerValue:0,collapseImminent:!1,weakVertices:[],recommendations:["No agents to analyze"],durationMs:0,usedFallback:!0};if(this.spectralAdapter?.isInitialized())try{return this.spectralAdapter.analyzeSwarmState(e)}catch(t){return this.logger.warn("Spectral collapse prediction failed, using fallback",{error:p(t),agentCount:e.agents.length}),this.predictCollapseWithFallback(e)}return this.predictCollapseWithFallback(e)}predictCollapseWithFallback(e){let t=Date.now(),i=e.agents.reduce((o,d)=>o+d.health,0)/Math.max(e.agents.length,1),n=e.agents.reduce((o,d)=>o+d.successRate,0)/Math.max(e.agents.length,1),r=0;r+=(1-i)*.3,r+=(1-n)*.3,r+=e.errorRate*.2,r+=e.utilization>.9?.2:e.utilization*.1;let a=e.agents.filter(o=>o.health<.5||o.successRate<.5).map(o=>o.agentId);return{risk:Math.min(1,r),fiedlerValue:i*n,collapseImminent:r>.7,weakVertices:a,recommendations:r>.5?["System health degraded. Consider spawning additional agents."]:["System health is acceptable."],durationMs:Date.now()-t,usedFallback:!0}}async verifyCausality(e,t,i){return this.ensureInitialized(),this.causalAdapter?.isInitialized()?this.causalAdapter.verifyCausality(e,t,i):this.verifyCausalityWithFallback(e,t,i)}verifyCausalityWithFallback(e,t,i){let n=Date.now(),r=this.computeCorrelation(i.causeValues,i.effectValues),a=Math.abs(r);return{isCausal:a>.5,effectStrength:a,relationshipType:a<.2?"none":a>.5?"causal":"spurious",confidence:Math.min(.7,i.sampleSize/100),confounders:[],explanation:`Correlation-based analysis: r=${r.toFixed(3)}. Note: Correlation does not imply causation. This is a fallback analysis without full causal inference.`,durationMs:Date.now()-n,usedFallback:!0}}async verifyTypes(e){return this.ensureInitialized(),this.categoryAdapter?.isInitialized()?this.categoryAdapter.verifyPipeline(e):this.verifyTypesWithFallback(e)}verifyTypesWithFallback(e){let t=Date.now(),i=[],n=e.inputType;for(let r of e.elements)r.inputType!==n&&n!=="any"&&i.push({location:r.name,expected:n,actual:r.inputType,severity:"high"}),n=r.outputType;return n!==e.outputType&&n!=="any"&&i.push({location:"pipeline output",expected:e.outputType,actual:n,severity:"critical"}),{isValid:i.length===0,mismatches:i,warnings:["Using fallback type verification. Full categorical analysis unavailable."],durationMs:Date.now()-t,usedFallback:!0}}async createWitness(e){return this.ensureInitialized(),this.witnessAdapter?.isInitialized()?this.witnessAdapter.createWitness(e):{witnessId:`witness-fallback-${Date.now()}`,decisionId:e.id,hash:this.simpleHash(JSON.stringify(e)),chainPosition:0,timestamp:new Date}}async replayFromWitness(e){return this.ensureInitialized(),this.witnessAdapter?.isInitialized()?this.witnessAdapter.replayFromWitness(e):{success:!1,decision:{id:"",type:"routing",inputs:{},output:null,agents:[],timestamp:new Date},matchesOriginal:!1,differences:["Replay not available in fallback mode"],durationMs:0}}async checkSwarmCoherence(e){this.ensureInitialized();let t=[];return e.forEach((i,n)=>{let r=this.agentHealthToEmbedding(i);t.push({id:n,embedding:r,weight:i.health,metadata:{agentType:i.agentType,successRate:i.successRate,errorCount:i.errorCount}})}),this.checkCoherence(t)}async verifyConsensus(e){this.ensureInitialized();let t=Date.now();if(e.length<2)return{isValid:e.length===1,confidence:e.length===1?e[0].confidence:0,isFalseConsensus:!1,fiedlerValue:e.length===1?1:0,collapseRisk:0,recommendation:e.length===0?"No votes to analyze":"Single vote - consensus trivially achieved",durationMs:Date.now()-t,usedFallback:!0};if(this.spectralAdapter?.isInitialized())try{this.spectralAdapter.clear();for(let a of e)this.spectralAdapter.addNode(a.agentId);let i=0;for(let a=0;a<e.length;a++)for(let o=a+1;o<e.length;o++)e[a].verdict===e[o].verdict&&(this.spectralAdapter.addEdge(e[a].agentId,e[o].agentId,Math.min(e[a].confidence,e[o].confidence)),i++);if(i===0)return this.logger.debug("No agreement edges, using fallback consensus"),this.verifyConsensusWithFallback(e,t);let n=this.spectralAdapter.predictCollapseRisk(),r=this.spectralAdapter.computeFiedlerValue();return{isValid:n<.3&&r>.1,confidence:1-n,isFalseConsensus:r<.05,fiedlerValue:r,collapseRisk:n,recommendation:n>.3?"Spawn independent reviewer":"Consensus verified",durationMs:Date.now()-t,usedFallback:!1}}catch(i){return this.logger.warn("Spectral consensus verification failed, using fallback",{error:p(i),voteCount:e.length}),this.verifyConsensusWithFallback(e,t)}return this.verifyConsensusWithFallback(e,t)}verifyConsensusWithFallback(e,t){let i=new Map;for(let o of e){let d=String(o.verdict);i.set(d,(i.get(d)||0)+1)}let n=0;i.forEach(o=>{n=Math.max(n,o)});let r=n/e.length,a=e.reduce((o,d)=>o+d.confidence,0)/e.length;return{isValid:r>.6,confidence:r*a,isFalseConsensus:i.size===1&&e.length>2,fiedlerValue:r,collapseRisk:1-r,recommendation:r<.6?"No clear majority. Consider spawning additional agents.":r===1&&i.size===1?"Unanimous consensus may indicate false consensus. Consider adding diversity.":"Majority consensus achieved.",durationMs:Date.now()-t,usedFallback:!0}}async filterCoherent(e,t){if(this.ensureInitialized(),e.length===0)return[];if(e.length===1)return e;let i=e.map(a=>({id:a.id,embedding:a.embedding})),n=await this.checkCoherence(i);if(n.isCoherent)return e;let r=new Set;for(let a of n.contradictions)a.nodeIds.forEach(o=>r.add(o));return e.filter(a=>!r.has(a.id))}getStats(){return{...this.stats,averageEnergy:this.stats.totalChecks>0?this.totalEnergySum/this.stats.totalChecks:0,averageDurationMs:this.stats.totalChecks>0?this.totalDurationSum/this.stats.totalChecks:0,lastCheckAt:this.stats.lastCheckAt}}async dispose(){this.cohomologyAdapter?.dispose(),this.spectralAdapter?.dispose(),this.causalAdapter?.dispose(),this.categoryAdapter?.dispose(),this.homotopyAdapter?.dispose(),this.witnessAdapter?.dispose(),this.cohomologyAdapter=null,this.spectralAdapter=null,this.causalAdapter=null,this.categoryAdapter=null,this.homotopyAdapter=null,this.witnessAdapter=null,this.initialized=!1,this.logger.info("CoherenceService disposed")}computeLane(e){let{laneConfig:t}=this.config;return e<t.reflexThreshold?"reflex":e<t.retrievalThreshold?"retrieval":e<t.heavyThreshold?"heavy":"human"}updateStats(e,t,i,n,r){this.stats.totalChecks++,this.totalEnergySum+=e,this.totalDurationSum+=t,this.stats.totalContradictions+=i,this.stats.laneDistribution[n]++,this.stats.lastCheckAt=new Date,e<this.config.coherenceThreshold?this.stats.coherentCount++:this.stats.incoherentCount++,r&&this.stats.fallbackCount++}generateRecommendations(e,t,i){let n=[];if(t==="reflex"?n.push("Low energy detected. Safe to proceed with immediate execution."):t==="retrieval"?n.push("Moderate energy detected. Consider fetching additional context before proceeding."):t==="heavy"?n.push("High energy detected. Deep analysis recommended before proceeding."):n.push("Critical energy level. Escalate to human review (Queen agent)."),i.length>0){let r=i.filter(a=>a.severity==="critical");r.length>0&&n.push(`Found ${r.length} critical contradiction(s) that must be resolved.`)}return n}agentHealthToEmbedding(e){let t=e.beliefs??[];return[e.health,e.successRate,Math.min(1,e.errorCount/10),this.agentTypeToNumber(e.agentType),t.length/10,...t[0]?.embedding.slice(0,5)||[0,0,0,0,0],...t[1]?.embedding.slice(0,5)||[0,0,0,0,0],...t[2]?.embedding.slice(0,5)||[0,0,0,0,0]]}agentTypeToNumber(e){let t=["coordinator","specialist","analyzer","generator","validator","tester","reviewer","optimizer"],i=t.indexOf(e);return i>=0?i/t.length:.5}euclideanDistance(e,t){if(e.length!==t.length)return 1/0;let i=0;for(let n=0;n<e.length;n++)i+=(e[n]-t[n])**2;return Math.sqrt(i)}cosineSimilarity(e,t){if(e.length!==t.length||e.length===0)return 0;let i=0,n=0,r=0;for(let o=0;o<e.length;o++)i+=e[o]*t[o],n+=e[o]*e[o],r+=t[o]*t[o];let a=Math.sqrt(n)*Math.sqrt(r);return a===0?0:i/a}computeCorrelation(e,t){if(e.length!==t.length||e.length<2)return 0;let i=e.length,n=e.reduce((l,c)=>l+c,0)/i,r=t.reduce((l,c)=>l+c,0)/i,a=0,o=0,d=0;for(let l=0;l<i;l++){let c=e[l]-n,g=t[l]-r;a+=c*g,o+=c*c,d+=g*g}let s=Math.sqrt(o*d);return s===0?0:a/s}simpleHash(e){let t=0;for(let i=0;i<e.length;i++){let n=e.charCodeAt(i);t=(t<<5)-t+n,t=t&t}return(t>>>0).toString(16).padStart(8,"0")}};async function Q(u,e,t){let i=new I(u,e,t);return await i.initialize(),i}L();import{createRequire as _}from"node:module";import{fileURLToPath as K}from"node:url";import{dirname as x,join as R}from"node:path";import{readFileSync as X,existsSync as F}from"node:fs";var W=[1e3,2e3,4e3],k=class{state="unloaded";wasmModule=null;engines=null;loadPromise=null;lastError=null;config;version="";fallbackState={mode:"wasm",consecutiveFailures:0,totalActivations:0,nextRetryAt:void 0,lastSuccessfulLoad:void 0};retryTimer=null;degradedModeStartTime=null;eventListeners;constructor(e={}){this.config={...z,...e},this.eventListeners=new Map,this.eventListeners.set("loaded",new Set),this.eventListeners.set("error",new Set),this.eventListeners.set("retry",new Set),this.eventListeners.set("degraded_mode",new Set),this.eventListeners.set("recovered",new Set)}isLoaded(){return this.state==="loaded"&&this.engines!==null}getState(){return this.state}getVersion(){return this.version}getLastError(){return this.lastError}isInDegradedMode(){return this.state==="degraded"||this.fallbackState.mode==="fallback"}getFallbackState(){return{...this.fallbackState}}getFallbackResult(){return{usedFallback:!0,confidence:.5,retryCount:this.fallbackState.consecutiveFailures,lastError:this.lastError?.message,activatedAt:this.degradedModeStartTime??new Date}}async getEngines(){if(this.state==="loaded"&&this.engines)return this.engines;if(this.state==="loading"&&this.loadPromise)return this.loadPromise;this.state="loading",this.loadPromise=this.loadWithRetry();try{return this.engines=await this.loadPromise,this.state="loaded",(this.fallbackState.mode==="fallback"||this.fallbackState.mode==="recovering")&&this.emitRecoveryEvent(),this.fallbackState.mode="wasm",this.fallbackState.consecutiveFailures=0,this.fallbackState.lastSuccessfulLoad=new Date,this.engines}catch(e){throw this.state="failed",this.lastError=A(e),this.enterDegradedMode(this.lastError),e}finally{this.loadPromise=null}}async getEnginesWithFallback(){if(this.state==="loaded"&&this.engines)return{engines:this.engines,fallback:{usedFallback:!1,confidence:1,retryCount:0}};if(this.state==="degraded")return{engines:null,fallback:this.getFallbackResult()};try{return{engines:await this.getEngines(),fallback:{usedFallback:!1,confidence:1,retryCount:0}}}catch{return{engines:null,fallback:this.getFallbackResult()}}}getEnginesSync(){if(!this.engines)throw new h("WASM module is not loaded. Call getEngines() first.");return this.engines}async isAvailable(){if(this.state==="loaded"&&this.wasmModule)return!0;if(this.state==="failed")return!1;try{let e=_(import.meta.url),t=[(()=>{try{let i=e.resolve("prime-radiant-advanced-wasm");return R(x(i),"prime_radiant_advanced_wasm_bg.wasm")}catch{return null}})(),R(process.cwd(),"node_modules/prime-radiant-advanced-wasm/prime_radiant_advanced_wasm_bg.wasm")].filter(i=>i!==null);for(let i of t)if(F(i))return!0;return!1}catch{return!1}}async load(){if(await this.getEngines(),!this.wasmModule)throw new h("WASM module failed to load");return this.wasmModule}getModule(){if(!this.wasmModule)throw new h("WASM module is not loaded. Call load() first.");return this.wasmModule}on(e,t){let i=this.eventListeners.get(e);return i&&i.add(t),()=>{i?.delete(t)}}off(e,t){let i=this.eventListeners.get(e);i&&i.delete(t)}reset(){if(this.retryTimer&&(clearTimeout(this.retryTimer),this.retryTimer=null),this.engines)try{this.engines.cohomology.free(),this.engines.spectral.free(),this.engines.causal.free(),this.engines.category.free(),this.engines.hott.free(),this.engines.quantum.free()}catch(e){console.debug("[WASMLoader] Cleanup error during unload:",e instanceof Error?e.message:e)}this.state="unloaded",this.wasmModule=null,this.engines=null,this.loadPromise=null,this.lastError=null,this.version="",this.fallbackState={mode:"wasm",consecutiveFailures:0,totalActivations:0,nextRetryAt:void 0,lastSuccessfulLoad:void 0},this.degradedModeStartTime=null}async forceRetry(){this.retryTimer&&(clearTimeout(this.retryTimer),this.retryTimer=null),(this.state==="failed"||this.state==="degraded")&&(this.state="unloaded",this.fallbackState.mode="recovering");try{return await this.getEngines(),!0}catch{return!1}}async loadWithRetry(){let{maxAttempts:e,baseDelayMs:t,maxDelayMs:i}=this.config,n=new Error("Unknown error");for(let r=1;r<=e;r++)try{let a=performance.now(),o=await this.attemptLoad(),d=performance.now()-a;return this.emit("loaded",{version:this.version,loadTimeMs:Math.round(d*100)/100}),o}catch(a){if(n=A(a),this.emit("error",{error:n,fatal:r>=e,attempt:r}),r<e){let o=Math.min(t*Math.pow(2,r-1),i);this.emit("retry",{attempt:r+1,maxAttempts:e,delayMs:o,previousError:n}),await this.sleep(o)}}throw new T(`Failed to load WASM module after ${e} attempts: ${n.message}`,e,n)}async attemptLoad(){let e;try{e=_(import.meta.url)}catch{e=globalThis.require||(await import("module")).createRequire(__filename)}let t;try{t=await import("./prime-radiant-advanced-wasm-ELGHVIFI.js")}catch(r){try{t=e("prime-radiant-advanced-wasm")}catch{throw new Error(`Failed to import prime-radiant-advanced-wasm: ${p(r)}`)}}if(typeof process<"u"&&process.versions!=null&&process.versions.node!=null?await this.initializeForNodeJs(t,e):t.default&&typeof t.default=="function"&&await t.default(),t.initModule&&typeof t.initModule=="function")try{t.initModule()}catch{}return t.getVersion&&typeof t.getVersion=="function"&&(this.version=t.getVersion()),this.wasmModule=t,{cohomology:new t.CohomologyEngine,spectral:new t.SpectralEngine,causal:new t.CausalEngine,category:new t.CategoryEngine,hott:new t.HoTTEngine,quantum:new t.QuantumEngine}}async initializeForNodeJs(e,t){let i=[(()=>{try{let a=t.resolve("prime-radiant-advanced-wasm");return R(x(a),"prime_radiant_advanced_wasm_bg.wasm")}catch{return null}})(),R(x(K(import.meta.url)),"../../../../node_modules/prime-radiant-advanced-wasm/prime_radiant_advanced_wasm_bg.wasm"),R(process.cwd(),"node_modules/prime-radiant-advanced-wasm/prime_radiant_advanced_wasm_bg.wasm")].filter(a=>a!==null),n=null;for(let a of i)if(F(a)){n=a;break}if(!n)throw new Error(`Could not find WASM binary. Searched paths:
|
|
3
|
-
${i.join(`
|
|
4
|
-
`)}
|
|
5
|
-
Ensure prime-radiant-advanced-wasm is installed.`);let r=X(n);if(e.initSync&&typeof e.initSync=="function")e.initSync({module:r});else throw new Error("WASM module does not export initSync function")}emit(e,t){let i=this.eventListeners.get(e);if(i){let n=Array.from(i);for(let r=0;r<n.length;r++)try{n[r](t)}catch{}}}sleep(e){return new Promise(t=>setTimeout(t,e))}enterDegradedMode(e){this.state="degraded",this.fallbackState.mode="fallback",this.fallbackState.consecutiveFailures++,this.fallbackState.totalActivations++,this.degradedModeStartTime||(this.degradedModeStartTime=new Date);let t=Math.min(this.fallbackState.consecutiveFailures-1,W.length-1),i=W[t],n=new Date(Date.now()+i);this.fallbackState.nextRetryAt=n,console.warn(`[WasmLoader] WASM load failed, entering degraded mode. Retry ${this.fallbackState.consecutiveFailures}/3 in ${i}ms. Error: ${e.message}`),this.emit("degraded_mode",{reason:"WASM load failed after retries",retryCount:this.fallbackState.consecutiveFailures,lastError:e.message,activatedAt:this.degradedModeStartTime,nextRetryAt:n}),this.fallbackState.consecutiveFailures<W.length&&this.scheduleBackgroundRetry(i)}scheduleBackgroundRetry(e){this.retryTimer&&clearTimeout(this.retryTimer),this.retryTimer=setTimeout(()=>{this.retryTimer=null,this.fallbackState.mode="recovering",this.attemptBackgroundRecovery()},e)}async attemptBackgroundRecovery(){this.state="unloaded",this.loadPromise=null;try{await this.getEngines()}catch{}}emitRecoveryEvent(){if(!this.degradedModeStartTime)return;let e=Date.now()-this.degradedModeStartTime.getTime();console.info(`[WasmLoader] WASM recovered after ${e}ms in degraded mode. Retry count: ${this.fallbackState.consecutiveFailures}`),this.emit("recovered",{degradedDurationMs:e,retryCount:this.fallbackState.consecutiveFailures,version:this.version}),this.degradedModeStartTime=null}},J=new k;var Z={emaAlpha:.1,minSamplesForCalibration:10,maxHistorySize:1e3,targetFalsePositiveRate:.05,targetFalseNegativeRate:.02,maxAdjustmentPerCycle:.05,autoCalibrate:!1,autoCalibrateInterval:100,defaultThresholds:{...S}};export{Q as a,J as b};
|
|
@@ -1,2 +0,0 @@
|
|
|
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.13");process.exit(0)}
|
|
2
|
-
import{a as g}from"./chunk-WQGP5ULD.js";import{b as p,c}from"./chunk-QIE76ERL.js";import{a as x,b as f,c as w}from"./chunk-3AOWTHLS.js";import{f as v}from"./chunk-IQGVQBVS.js";w();var l={ProtocolStarted:"coordination.ProtocolStarted",ProtocolCompleted:"coordination.ProtocolCompleted",ProtocolFailed:"coordination.ProtocolFailed",ProtocolCancelled:"coordination.ProtocolCancelled",ActionStarted:"coordination.ActionStarted",ActionCompleted:"coordination.ActionCompleted",ActionFailed:"coordination.ActionFailed"},E=class{constructor(e,t,o){this.eventBus=e;this.memory=t;this.getDomainAPI=o}protocols=new Map;executions=new Map;scheduledProtocols=new Map;schedulerRunning=!1;registerProtocol(e){this.protocols.set(e.id,e),e.schedule.type==="event"&&e.enabled&&this.setupEventTriggers(e),(e.schedule.type==="cron"||e.schedule.type==="interval")&&e.enabled&&this.scheduleProtocol(e)}unregisterProtocol(e){if(!this.protocols.get(e))return!1;let o=this.scheduledProtocols.get(e);return o?.intervalId&&clearInterval(o.intervalId),this.scheduledProtocols.delete(e),this.protocols.delete(e),!0}getProtocol(e){return this.protocols.get(e)}listProtocols(){return Array.from(this.protocols.values())}async execute(e,t){let o=this.protocols.get(e);return o?o.enabled?this.executeProtocol(o,t):c(new Error(`Protocol is disabled: ${e}`)):c(new Error(`Protocol not found: ${e}`))}async executeOnEvent(e,t){let o=this.protocols.get(e);return o?o.enabled?this.executeProtocol(o,void 0,t):c(new Error(`Protocol is disabled: ${e}`)):c(new Error(`Protocol not found: ${e}`))}getExecution(e){let t=this.executions.get(e);if(t)return this.toImmutableExecution(t.execution)}listActiveExecutions(){return Array.from(this.executions.values()).filter(e=>e.execution.status==="running"||e.execution.status==="paused").map(e=>this.toImmutableExecution(e.execution))}async cancelExecution(e){let t=this.executions.get(e);return t?t.execution.status!=="running"&&t.execution.status!=="paused"?c(new Error(`Cannot cancel execution in status: ${t.execution.status}`)):(t.cancelled=!0,t.execution.status="cancelled",t.execution.completedAt=new Date,await this.publishEvent(l.ProtocolCancelled,{executionId:e,protocolId:t.protocol.id}),p(void 0)):c(new Error(`Execution not found: ${e}`))}async pauseExecution(e){let t=this.executions.get(e);return t?t.execution.status!=="running"?c(new Error(`Cannot pause execution in status: ${t.execution.status}`)):(t.paused=!0,t.execution.status="paused",p(void 0)):c(new Error(`Execution not found: ${e}`))}async resumeExecution(e){let t=this.executions.get(e);return t?t.execution.status!=="paused"?c(new Error(`Cannot resume execution in status: ${t.execution.status}`)):(t.paused=!1,t.execution.status="running",p(void 0)):c(new Error(`Execution not found: ${e}`))}startScheduler(){if(!this.schedulerRunning){this.schedulerRunning=!0;for(let e of this.protocols.values())e.enabled&&(e.schedule.type==="interval"||e.schedule.type==="cron")&&this.scheduleProtocol(e)}}stopScheduler(){this.schedulerRunning=!1;for(let e of this.scheduledProtocols.values())e.intervalId&&(clearInterval(e.intervalId),e.intervalId=void 0)}async dispose(){this.stopScheduler(),this.protocols.clear(),this.executions.clear(),this.scheduledProtocols.clear()}async executeProtocol(e,t,o){let r=v(),a=o?.correlationId??r,n={executionId:r,protocolId:e.id,status:"running",participants:[...e.participants],results:new Map,startedAt:new Date,correlationId:a,triggeredBy:o},u={execution:n,protocol:e,params:t,actionResults:new Map,cancelled:!1,paused:!1};this.executions.set(r,u),await this.publishEvent(l.ProtocolStarted,{executionId:r,protocolId:e.id,participants:e.participants},a);try{await this.executeActions(u);let i=Array.from(u.actionResults.values()).some(s=>s.status==="failed");return u.cancelled?n.status="cancelled":i?(n.status="failed",await this.publishEvent(l.ProtocolFailed,{executionId:r,protocolId:e.id,failedActions:Array.from(u.actionResults.values()).filter(s=>s.status==="failed").map(s=>s.actionId)},a)):(n.status="completed",await this.publishEvent(l.ProtocolCompleted,{executionId:r,protocolId:e.id,duration:Date.now()-n.startedAt.getTime()},a)),n.completedAt=new Date,n.results=u.actionResults,await this.storeExecutionHistory(n),p(this.toImmutableExecution(n))}catch(i){return n.status="failed",n.completedAt=new Date,await this.publishEvent(l.ProtocolFailed,{executionId:r,protocolId:e.id,error:x(i)},a),c(f(i))}}async executeActions(e){let{protocol:t,actionResults:o}=e,r=new Set(t.actions.map(n=>n.id)),a=new Set;for(;r.size>0&&!e.cancelled;){for(;e.paused&&!e.cancelled;)await this.sleep(100);if(e.cancelled)break;let n=t.actions.filter(i=>r.has(i.id)&&this.dependenciesSatisfied(i,a));if(n.length===0&&r.size>0)throw new Error(`Deadlock detected: actions ${Array.from(r).join(", ")} cannot proceed`);let u=await Promise.allSettled(n.map(i=>this.executeAction(i,e)));for(let i=0;i<n.length;i++){let s=n[i],d=u[i],m;d.status==="fulfilled"?m=d.value:m={actionId:s.id,status:"failed",error:d.reason instanceof Error?d.reason.message:String(d.reason)},o.set(s.id,m),r.delete(s.id),m.status==="completed"&&a.add(s.id)}}for(let n of r)o.set(n,{actionId:n,status:e.cancelled?"cancelled":"skipped"})}async executeAction(e,t){let o=new Date;await this.publishEvent(l.ActionStarted,{executionId:t.execution.executionId,actionId:e.id,actionName:e.name,targetDomain:e.targetDomain},t.execution.correlationId);let r=0,a=e.retry?.maxAttempts??1,n;for(;r<a;){r++;try{let i=this.getDomainAPI(e.targetDomain);if(!i)throw new Error(`Domain API not available: ${e.targetDomain}`);let s=i[e.method];if(typeof s!="function")throw new Error(`Method ${e.method} not found on domain ${e.targetDomain}`);let d={...e.params,...t.params},m=await this.executeWithTimeout(s.bind(i)(d),e.timeout??3e4),h=new Date;return await this.publishEvent(l.ActionCompleted,{executionId:t.execution.executionId,actionId:e.id,duration:h.getTime()-o.getTime()},t.execution.correlationId),{actionId:e.id,status:"completed",startedAt:o,completedAt:h,duration:h.getTime()-o.getTime(),result:m,retryAttempts:r>1?r-1:void 0}}catch(i){if(n=f(i),r<a&&e.retry){let s=e.retry.backoffMs*Math.pow(e.retry.backoffMultiplier??2,r-1);await this.sleep(s)}}}let u=new Date;return await this.publishEvent(l.ActionFailed,{executionId:t.execution.executionId,actionId:e.id,error:n?.message??"Unknown error",attempts:r},t.execution.correlationId),{actionId:e.id,status:"failed",startedAt:o,completedAt:u,duration:u.getTime()-o.getTime(),error:n?.message??"Unknown error",retryAttempts:r>1?r-1:void 0}}dependenciesSatisfied(e,t){return!e.dependsOn||e.dependsOn.length===0?!0:e.dependsOn.every(o=>t.has(o))}async executeWithTimeout(e,t){return Promise.race([e,new Promise((o,r)=>setTimeout(()=>r(new Error("Action timeout")),t))])}setupEventTriggers(e){if(e.schedule.type==="event")for(let t of e.schedule.triggerEvents)this.eventBus.subscribe(t,async o=>{await this.executeOnEvent(e.id,o)})}scheduleProtocol(e){if(e.schedule.type==="interval"){let t={protocolId:e.id,schedule:e.schedule};t.intervalId=setInterval(async()=>{this.schedulerRunning&&await this.execute(e.id)},e.schedule.intervalMs),this.scheduledProtocols.set(e.id,t)}}async storeExecutionHistory(e){let t=`protocol-execution:${e.executionId}`;await this.memory.set(t,{...e,results:Object.fromEntries(e.results)},{namespace:"coordination",ttl:864e5})}toImmutableExecution(e){return{executionId:e.executionId,protocolId:e.protocolId,status:e.status,participants:[...e.participants],results:new Map(e.results),startedAt:e.startedAt,completedAt:e.completedAt,correlationId:e.correlationId,triggeredBy:e.triggeredBy}}async publishEvent(e,t,o){let r=g(e,"learning-optimization",t,o);await this.eventBus.publish(r)}sleep(e){return new Promise(t=>setTimeout(t,e))}};function S(P,e,t){return new E(P,e,t)}export{E as a,S as b};
|
|
@@ -1,2 +0,0 @@
|
|
|
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.13");process.exit(0)}
|
|
2
|
-
import{g}from"./chunk-DY5JRJXV.js";import{b as p,c as d}from"./chunk-QIE76ERL.js";import{b as m,c as f}from"./chunk-3AOWTHLS.js";import{f as h}from"./chunk-IQGVQBVS.js";f();var I={maxDepth:5,riskWeights:{directImpact:.4,transitiveImpact:.2,testCoverage:.2,criticalPath:.15,dependencyCount:.05},testPatterns:["**/*.test.ts","**/*.test.tsx","**/*.spec.ts","**/*.spec.tsx","**/test_*.py","**/*_test.py","**/*_test.go"],criticalPaths:["**/auth/**","**/security/**","**/payment/**","**/api/**","**/core/**"],namespace:"code-intelligence:impact"},u=class{constructor(e,t,i={}){this.memory=e;this.config={...I,...i},this.knowledgeGraph=t||new g(e)}config;knowledgeGraph;async analyzeImpact(e){try{let{changedFiles:t,depth:i=this.config.maxDepth,includeTests:n=!0}=e;if(t.length===0)return p({directImpact:[],transitiveImpact:[],impactedTests:[],riskLevel:"info",recommendations:[]});let r=await this.analyzeDirectImpact(t),l=await this.analyzeTransitiveImpact(t,r,i),s=[];if(n){let a=await this.getImpactedTests(t);a.success&&(s=a.value)}let c={directImpact:r,transitiveImpact:l,impactedTests:s,riskLevel:"info",recommendations:[]};return c.riskLevel=this.calculateRiskLevel(c),c.recommendations=this.getRecommendations(c),await this.storeAnalysis(t,c),p(c)}catch(t){return d(m(t))}}async getImpactedTests(e){try{let t=new Set;for(let i of e){if(this.isTestFile(i)){t.add(i);continue}let n=await this.knowledgeGraph.mapDependencies({files:[i],direction:"incoming",depth:3});if(n.success)for(let s of n.value.nodes)this.isTestFile(s.path)&&t.add(s.path);let r=this.getBaseName(i),l=[`${r}.test`,`${r}.spec`,`test_${r}`,`${r}_test`];for(let s of l){let c=await this.memory.search(`code-intelligence:kg:node:*${s}*`,10);for(let a of c){let o=await this.memory.get(a);o?.properties?.path&&this.isTestFile(o.properties.path)&&t.add(o.properties.path)}}}return p(Array.from(t))}catch(t){return d(m(t))}}calculateRiskLevel(e){let t=this.config.riskWeights,i=0,n=Math.min(1,e.directImpact.length/10);i+=n*t.directImpact;let r=Math.min(1,e.transitiveImpact.length/20);i+=r*t.transitiveImpact;let l=e.impactedTests.length>0?Math.max(0,1-e.impactedTests.length/(e.directImpact.length||1)):1;i+=l*t.testCoverage;let s=this.countCriticalFiles([...e.directImpact.map(o=>o.file),...e.transitiveImpact.map(o=>o.file)]),c=Math.min(1,s/5);i+=c*t.criticalPath;let a=this.calculateAverageRiskScore([...e.directImpact,...e.transitiveImpact]);return i+=a*t.dependencyCount,i>=.8?"critical":i>=.6?"high":i>=.4?"medium":i>=.2?"low":"info"}getRecommendations(e){let t=[];(e.riskLevel==="critical"||e.riskLevel==="high")&&t.push("This change has significant impact - consider peer review before merging"),e.impactedTests.length===0&&e.directImpact.length>0?t.push("No tests found for impacted files - add test coverage"):e.impactedTests.length<e.directImpact.length/2&&t.push("Test coverage appears low for impacted files"),e.impactedTests.length>0&&(e.impactedTests.length<=10?t.push(`Run these ${e.impactedTests.length} tests: ${e.impactedTests.slice(0,3).join(", ")}${e.impactedTests.length>3?"...":""}`):t.push(`Run all ${e.impactedTests.length} impacted tests before deployment`));let i=[...e.directImpact,...e.transitiveImpact].filter(r=>this.isCriticalPath(r.file));i.length>0&&t.push(`${i.length} critical path files affected - extra scrutiny recommended`),e.transitiveImpact.length>10&&t.push("Large transitive impact - consider breaking down into smaller changes");let n=[...e.directImpact,...e.transitiveImpact].filter(r=>r.riskScore>=.7);return n.length>0&&t.push(`${n.length} high-risk files impacted: ${n.slice(0,2).map(r=>this.getFileName(r.file)).join(", ")}`),t}async analyzeDirectImpact(e){let t=[];for(let i of e){let n=await this.knowledgeGraph.mapDependencies({files:[i],direction:"incoming",depth:1});if(n.success){let{nodes:r,edges:l}=n.value;for(let s of r){if(s.path===i)continue;let c=l.find(o=>o.target===s.id||o.source===s.id),a=this.calculateFileRiskScore(s.path,s.inDegree,s.outDegree);t.push({file:s.path,reason:`Directly ${c?.type||"depends on"} ${this.getFileName(i)}`,distance:1,riskScore:a})}}}return this.deduplicateImpact(t)}async analyzeTransitiveImpact(e,t,i){let n=[],r=new Set([...e,...t.map(s=>s.file)]),l=t.map(s=>({file:s.file,distance:1}));for(;l.length>0;){let s=l.shift();if(s.distance>=i)continue;let c=await this.knowledgeGraph.mapDependencies({files:[s.file],direction:"incoming",depth:1});if(c.success)for(let a of c.value.nodes){if(r.has(a.path)||a.path===s.file)continue;r.add(a.path);let o=this.calculateFileRiskScore(a.path,a.inDegree,a.outDegree,s.distance+1);n.push({file:a.path,reason:`Transitively depends via ${this.getFileName(s.file)}`,distance:s.distance+1,riskScore:o}),l.push({file:a.path,distance:s.distance+1})}}return this.deduplicateImpact(n)}calculateFileRiskScore(e,t,i,n=1){let r=0;return r+=Math.min(.3,t/20),r+=Math.min(.2,i/30),this.isCriticalPath(e)&&(r+=.3),this.isEntryPoint(e)&&(r+=.2),r=r*Math.pow(.8,n-1),Math.min(1,Math.max(0,r))}calculateAverageRiskScore(e){return e.length===0?0:e.reduce((i,n)=>i+n.riskScore,0)/e.length}countCriticalFiles(e){return e.filter(t=>this.isCriticalPath(t)).length}isTestFile(e){return[/\.test\.[tj]sx?$/,/\.spec\.[tj]sx?$/,/_test\.[tj]sx?$/,/test_.*\.py$/,/.*_test\.py$/,/.*_test\.go$/].some(i=>i.test(e))}isCriticalPath(e){return this.config.criticalPaths.map(i=>i.replace(/\*\*/g,".*").replace(/\*/g,"[^/]*")).some(i=>new RegExp(i).test(e))}isEntryPoint(e){return[/\/index\.[tj]sx?$/,/\/main\.[tj]sx?$/,/\/app\.[tj]sx?$/,/^src\/[^/]+\.[tj]sx?$/,/\/server\.[tj]sx?$/,/\/__init__\.py$/,/\/main\.go$/].some(i=>i.test(e))}getBaseName(e){return this.getFileName(e).replace(/\.[^.]+$/,"")}getFileName(e){return e.split(/[/\\]/).pop()||e}deduplicateImpact(e){let t=new Map;for(let i of e){let n=t.get(i.file);(!n||i.distance<n.distance)&&t.set(i.file,i)}return Array.from(t.values()).sort((i,n)=>n.riskScore!==i.riskScore?n.riskScore-i.riskScore:i.distance-n.distance)}async storeAnalysis(e,t){let i=h();await this.memory.set(`${this.config.namespace}:analysis:${i}`,{id:i,changedFiles:e,analysis:t,timestamp:new Date().toISOString()},{namespace:this.config.namespace,persist:!0})}};export{u as a};
|
|
@@ -1,2 +0,0 @@
|
|
|
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.13");process.exit(0)}
|
|
2
|
-
import{a as b}from"./chunk-Y2ONHWXI.js";import{c as k}from"./chunk-HHRUXDLT.js";import{b as p,d as C}from"./chunk-VCJP7HQG.js";C();b();var m=k.create("skill-validation-learner"),v=class{constructor(e){this.reasoningBank=e}memoryNamespace="skill-validation";feedbackLoop=null;connectFeedbackLoop(e){this.feedbackLoop=e}async recordValidationOutcome(e){await this.reasoningBank.storeQEPattern({patternType:"test-template",name:`${e.skillName}-validation-${e.validationLevel}`,description:`Validation outcome for ${e.skillName} at level ${e.validationLevel}`,context:{tags:["skill-validation",e.skillName,e.model,e.validationLevel],testType:"integration"},template:{type:"config",content:JSON.stringify({outcome:{skillName:e.skillName,trustTier:e.trustTier,validationLevel:e.validationLevel,model:e.model,passed:e.passed,score:e.score,testCaseCount:e.testCaseResults.length,passedTests:e.testCaseResults.filter(s=>s.passed).length,avgReasoningQuality:this.calculateAvgReasoningQuality(e.testCaseResults),timestamp:e.timestamp.toISOString(),runId:e.runId,metadata:e.metadata}}),variables:[]}}),await this.updateSkillConfidence(e),e.validationLevel==="eval"&&await this.trackCrossModelBehavior(e),this.feedbackLoop&&e.runId&&await this.recordToFeedbackLoop(e)}async updateSkillConfidence(e){let s=`skill-confidence-${e.skillName}`,n=await this.reasoningBank.searchQEPatterns(s,{limit:1}),t;if(n.success&&n.value.length>0)try{let r=n.value[0].pattern.template?.content;if(r){let i=p(r);i&&typeof i=="object"&&Array.isArray(i.outcomes)?t=i:t=this.createEmptyConfidence(e.skillName)}else t=this.createEmptyConfidence(e.skillName)}catch(a){m.debug("Confidence history parse failed",{skill:e.skillName,error:a instanceof Error?a.message:String(a)}),t=this.createEmptyConfidence(e.skillName)}else t=this.createEmptyConfidence(e.skillName);t.outcomes.push({score:e.score,timestamp:e.timestamp,model:e.model,validationLevel:e.validationLevel,passed:e.passed}),t.outcomes.length>100&&(t.outcomes=t.outcomes.slice(-100)),t.avgScore=t.outcomes.reduce((a,r)=>a+r.score,0)/t.outcomes.length,t.lastUpdated=new Date,t.trend=this.calculateTrend(t.outcomes),t.byLevel=this.calculateConfidenceByLevel(t.outcomes),await this.reasoningBank.storeQEPattern({patternType:"test-template",name:s,description:`Skill confidence tracking for ${e.skillName}`,context:{tags:["skill-confidence",e.skillName]},template:{type:"config",content:JSON.stringify(t),variables:[]}})}async trackCrossModelBehavior(e){let s=`cross-model-${e.skillName}`,n=await this.reasoningBank.searchQEPatterns(s,{limit:1}),t;if(n.success&&n.value.length>0)try{let c=n.value[0].pattern.template?.content;if(c){let l=p(c);l&&typeof l=="object"&&typeof l.models=="object"?t=l:t=this.createEmptyCrossModelAnalysis()}else t=this.createEmptyCrossModelAnalysis()}catch(o){m.debug("Cross-model analysis parse failed",{error:o instanceof Error?o.message:String(o)}),t=this.createEmptyCrossModelAnalysis()}else t=this.createEmptyCrossModelAnalysis();t.models||(t.models={}),t.models[e.model]||(t.models[e.model]={scores:[],passRate:0,avgReasoningQuality:0,sampleCount:0});let a=t.models[e.model];a.scores.push(e.score),a.sampleCount++,a.scores.length>50&&(a.scores=a.scores.slice(-50));let r=this.calculateAvgReasoningQuality(e.testCaseResults);a.passRate=a.scores.filter(o=>o>=.9).length/a.scores.length,a.avgReasoningQuality=(a.avgReasoningQuality*(a.sampleCount-1)+r)/a.sampleCount;let i=Object.values(t.models).map(o=>o.passRate);if(i.length>1){let o=i.reduce((l,d)=>l+d,0)/i.length,c=i.reduce((l,d)=>l+Math.pow(d-o,2),0)/i.length;t.variance=c,t.hasAnomalies=c>.04,t.anomalies=[];for(let[l,d]of Object.entries(t.models))Math.abs(d.passRate-o)>.2&&t.anomalies.push({model:l,type:d.passRate<o?"low_performance":"high_variance",description:`Model ${l} has ${((d.passRate-o)*100).toFixed(1)}% difference from average`})}t.lastUpdated=new Date,await this.reasoningBank.storeQEPattern({patternType:"test-template",name:s,description:`Cross-model behavior tracking for ${e.skillName}`,context:{tags:["cross-model",e.skillName]},template:{type:"config",content:JSON.stringify(t),variables:[]}})}async recordToFeedbackLoop(e){if(!this.feedbackLoop)return;let s={taskId:e.runId,taskDescription:`Skill validation: ${e.skillName} (${e.validationLevel})`,recommendedAgent:"skill-validator",usedAgent:"skill-validator",followedRecommendation:!0,success:e.passed,qualityScore:e.score,durationMs:e.metadata?.duration||0,timestamp:e.timestamp};await this.feedbackLoop.recordRoutingOutcome(s)}async getSkillConfidence(e){let s=`skill-confidence-${e}`,n=await this.reasoningBank.searchQEPatterns(s,{limit:1});if(n.success&&n.value.length>0)try{let t=n.value[0].pattern.template?.content;if(t)return p(t)}catch(t){m.debug("Skill confidence pattern content invalid",{skill:e,error:t instanceof Error?t.message:String(t)})}return null}async getCrossModelAnalysis(e){let s=`cross-model-${e}`,n=await this.reasoningBank.searchQEPatterns(s,{limit:1});if(n.success&&n.value.length>0)try{let t=n.value[0].pattern.template?.content;if(t)return p(t)}catch(t){m.debug("Cross-model pattern content invalid",{skill:e,error:t instanceof Error?t.message:String(t)})}return null}async queryValidationPatterns(e,s=10){let n=await this.reasoningBank.searchQEPatterns(`${e} validation`,{limit:s});return n.success?n.value.filter(t=>t.pattern.context?.tags?.includes("skill-validation")).map(t=>t.pattern):[]}async getValidationTrends(e){let s=await this.getSkillConfidence(e),n=await this.getCrossModelAnalysis(e);if(!s)return null;let t={};if(n)for(let i of Object.keys(n.models)){let o=s.outcomes.filter(c=>c.model===i).map(c=>({score:c.score}));t[i]=this.calculateTrend(o)}let a=s.outcomes.slice(-20),r=a.filter(i=>i.passed).length/a.length;return{overall:s.trend||"stable",byModel:t,recentPassRate:r}}async extractLearnedPatterns(e){let s=await this.queryValidationPatterns(e,50),n=[],t=new Map;for(let a of s)try{let i=p(a.template?.content||"{}").outcome?.metadata?.category||"general";t.has(i)||t.set(i,[]),t.get(i).push(a)}catch(r){m.debug("Invalid pattern during category grouping",{error:r instanceof Error?r.message:String(r)})}for(let[a,r]of Array.from(t.entries())){let i=new Set,o=new Set,c=new Set,l=0;for(let d of r)try{let f=p(d.template?.content||"{}").outcome;if(!f)continue;c.add(f.model),l+=f.score;let h=d.context?.tags||[];f.passed?h.filter(g=>!["skill-validation",e].includes(g)).forEach(g=>i.add(g)):h.filter(g=>!["skill-validation",e].includes(g)).forEach(g=>o.add(g))}catch(u){m.debug("Invalid pattern during category extraction",{error:u instanceof Error?u.message:String(u)})}r.length>0&&n.push({id:`${e}-${a}`,skillName:e,category:a,successIndicators:Array.from(i),failureIndicators:Array.from(o),models:Array.from(c),confidence:l/r.length,observationCount:r.length})}return n}createEmptyConfidence(e){return{skillName:e,avgScore:0,outcomes:[],lastUpdated:new Date}}createEmptyCrossModelAnalysis(){return{models:{},variance:0,hasAnomalies:!1,lastUpdated:new Date}}calculateAvgReasoningQuality(e){return e.length===0?0:e.reduce((s,n)=>s+n.reasoningQuality,0)/e.length}calculateTrend(e){if(e.length<5)return"stable";let s=e.slice(-10),n=e.slice(-20,-10);if(n.length===0)return"stable";let t=s.reduce((i,o)=>i+o.score,0)/s.length,a=n.reduce((i,o)=>i+o.score,0)/n.length,r=t-a;return r>.05?"improving":r<-.05?"declining":"stable"}calculateConfidenceByLevel(e){let s={schema:[],validator:[],eval:[]};for(let t of e)t.validationLevel&&s[t.validationLevel].push(t.score);let n={};for(let[t,a]of Object.entries(s))a.length>0&&(n[t]=a.reduce((r,i)=>r+i,0)/a.length);return n}};function L(y){return new v(y)}export{L as a};
|
|
@@ -1,2 +0,0 @@
|
|
|
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.13");process.exit(0)}
|
|
2
|
-
import{a as e,b as g,e as r}from"./chunk-HHRUXDLT.js";import{c as o}from"./chunk-ERGY45RL.js";var L=o(()=>{"use strict";e();g();r()});export{L as a};
|
|
@@ -1,12 +0,0 @@
|
|
|
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.13");process.exit(0)}
|
|
2
|
-
import{e as x,f as C,j as y,k as R,q as F}from"./chunk-XV42SKJD.js";import{b as I,c as k}from"./chunk-3AOWTHLS.js";import{c as w}from"./chunk-ERGY45RL.js";var P,S=w(()=>{"use strict";P={enabled:!0,headless:!0,timeout:3e4,retryAttempts:3,fallbackEnabled:!0,browserType:"chromium",viewport:{width:1280,height:720},userAgent:"",devtools:!1,slowMo:0,screenshotDir:".agentic-qe/screenshots"}});function B(i){return i instanceof o}function a(i,e="Unknown Vibium error"){return B(i)?i:i instanceof Error?new o(i.message||e,"UNKNOWN_ERROR",i):new o(typeof i=="string"?i:e,"UNKNOWN_ERROR")}var o,c,f,g,l,p,m,b,A=w(()=>{"use strict";o=class i extends Error{constructor(t,r,s){super(t);this.code=r;this.cause=s;this.name="VibiumError",Error.captureStackTrace&&Error.captureStackTrace(this,i),s?.stack&&(this.stack+=`
|
|
3
|
-
Caused by: ${s.stack}`)}},c=class extends o{constructor(e="Vibium MCP server is unavailable",t){super(e,"VIBIUM_UNAVAILABLE",t),this.name="VibiumUnavailableError"}},f=class extends o{constructor(e="Browser operation timed out",t){super(e,"VIBIUM_TIMEOUT",t),this.name="VibiumTimeoutError"}},g=class extends o{selector;constructor(e,t){super(`Element not found: ${e}`,"ELEMENT_NOT_FOUND",t),this.name="VibiumElementNotFoundError",this.selector=e}},l=class extends o{constructor(e="Failed to connect to browser",t){super(e,"CONNECTION_ERROR",t),this.name="VibiumConnectionError"}},p=class extends o{url;statusCode;constructor(e,t,r){let s=t?`Navigation failed: ${e} (HTTP ${t})`:`Navigation failed: ${e}`;super(s,"NAVIGATION_ERROR",r),this.name="VibiumNavigationError",this.url=e,this.statusCode=t}},m=class extends o{constructor(e="Failed to capture screenshot",t){super(e,"SCREENSHOT_ERROR",t),this.name="VibiumScreenshotError"}},b=class extends o{action;selector;constructor(e,t,r){super(`Failed to ${e} element: ${t}`,"INTERACTION_ERROR",r),this.name="VibiumInteractionError",this.action=e,this.selector=t}}});import{randomUUID as _}from"crypto";async function V(){if(v!==null)return v;try{return v=(await import("./vibium-ZMC4G2YA.js")).browser,O=!0,v}catch(i){return console.warn("[Vibium] Failed to load vibium package:",i),O=!1,null}}async function T(i,e,t){let r;for(let s=1;s<=e;s++)try{return await i()}catch(n){if(r=I(n),s<e){let u=Math.min(100*Math.pow(2,s-1),2e3);await new Promise(d=>setTimeout(d,u))}}throw new o(`${t} failed after ${e} attempts`,"RETRY_EXHAUSTED",r)}async function h(i,e){let t=Date.now();try{let r=await i();return R()&&console.log(`[Vibium] ${e}: ${Date.now()-t}ms`),r}catch(r){throw R()&&console.log(`[Vibium] ${e} failed: ${Date.now()-t}ms`,r),r}}var v,O,E,N,M=w(()=>{S();A();k();F();v=null,O=!1;E=class{config;currentSession=null;lastHealthCheck=null;_initialized=!1;_available=null;vibeInstance=null;constructor(e={}){this.config={...P,...e}}async isAvailable(){if(!this.config.enabled)return!1;if(this._available!==null)return this._available;try{let e=await V();return this._available=e!==null,this._available}catch{return this._available=!1,!1}}async getHealth(){let e=new Date;if(!this.config.enabled)return{status:"unavailable",features:["fallback-only"],lastChecked:e,error:"Vibium is disabled by configuration",sessionActive:!1};try{await this.isAvailable()?this.lastHealthCheck={status:this.vibeInstance?"connected":"disconnected",version:"0.1.2",browserType:this.config.browserType,features:["browser-launch","navigation","element-interaction","screenshots","script-evaluation","accessibility-testing"],latencyMs:10,lastChecked:e,sessionActive:this.vibeInstance!==null}:this.lastHealthCheck={status:"unavailable",features:["fallback-only"],lastChecked:e,error:"Vibium package not available - install with: npm install vibium",sessionActive:!1}}catch(t){this.lastHealthCheck={status:"error",features:["fallback-only"],lastChecked:e,error:t instanceof Error?t.message:"Unknown error",sessionActive:!1}}return this.lastHealthCheck}async getSession(){return this.currentSession}async launch(e){if(!x())return{success:!1,error:new c("Browser mode is disabled by feature flags")};let t=async()=>{let r=await V();if(!r)throw new c("Vibium package not available. Install with: npm install vibium");let s=e?.headless??this.config.headless;this.vibeInstance=await r.launch({headless:s});let n={id:this.generateSessionId(),browserType:this.config.browserType,launchedAt:new Date,status:"connected",viewport:e?.viewport??this.config.viewport,headless:s};return this.currentSession=n,n};try{return{success:!0,value:y()?await T(()=>h(t,"browser_launch"),this.config.retryAttempts,"browser_launch"):await h(t,"browser_launch")}}catch(r){return{success:!1,error:a(r,"Failed to launch browser")}}}async quit(){if(!this.vibeInstance)return{success:!1,error:new l("No active browser session")};let e=async()=>{this.vibeInstance&&(await this.vibeInstance.quit(),this.vibeInstance=null),this.currentSession=null};try{return await h(e,"browser_quit"),{success:!0,value:void 0}}catch(t){return{success:!1,error:a(t,"Failed to quit browser")}}}async navigate(e){this.ensureSession();let t=async()=>{let r=Date.now();await this.vibeInstance.go(e.url);let s="";try{s=await this.vibeInstance.evaluate("document.title")}catch{s="Unknown"}let n={url:e.url,statusCode:200,title:s,durationMs:Date.now()-r,success:!0};return this.currentSession&&(this.currentSession.currentUrl=e.url),n};try{return{success:!0,value:y()?await T(()=>h(t,"page_navigate"),this.config.retryAttempts,"page_navigate"):await h(t,"page_navigate")}}catch(r){return{success:!1,error:new p(e.url,void 0,r instanceof Error?r:void 0)}}}async getPageInfo(){this.ensureSession();try{let e=await this.vibeInstance.evaluate("window.location.href"),t=await this.vibeInstance.evaluate("document.title");return{success:!0,value:{url:e,title:t,viewport:this.config.viewport,loadState:"loaded"}}}catch(e){return{success:!1,error:a(e,"Failed to get page info")}}}async goBack(){this.ensureSession();try{return await this.vibeInstance.evaluate("window.history.back()"),{success:!0,value:void 0}}catch(e){return{success:!1,error:a(e,"Failed to go back")}}}async goForward(){this.ensureSession();try{return await this.vibeInstance.evaluate("window.history.forward()"),{success:!0,value:void 0}}catch(e){return{success:!1,error:a(e,"Failed to go forward")}}}async reload(){this.ensureSession();try{return await this.vibeInstance.evaluate("window.location.reload()"),{success:!0,value:void 0}}catch(e){return{success:!1,error:a(e,"Failed to reload page")}}}async findElement(e){this.ensureSession();try{let t=await this.vibeInstance.find(e.selector,{timeout:e.timeout??this.config.timeout});return{success:!0,value:{selector:e.selector,tagName:t.info.tag,textContent:t.info.text,attributes:{},boundingBox:t.info.box,visible:!0,enabled:!0}}}catch(t){return{success:!1,error:new g(e.selector,t instanceof Error?t:void 0)}}}async findElements(e){this.ensureSession();try{let t=e.selector.replace(/\\/g,"\\\\").replace(/'/g,"\\'");return{success:!0,value:(await this.vibeInstance.evaluate(`
|
|
4
|
-
Array.from(document.querySelectorAll('${t}'))
|
|
5
|
-
.map(el => ({
|
|
6
|
-
tag: el.tagName.toLowerCase(),
|
|
7
|
-
text: el.textContent?.trim() || ''
|
|
8
|
-
}))
|
|
9
|
-
`)).map((n,u)=>({selector:`${e.selector}:nth-child(${u+1})`,tagName:n.tag,textContent:n.text,attributes:{},visible:!0,enabled:!0}))}}catch(t){return{success:!1,error:a(t,"Failed to find elements")}}}async click(e){this.ensureSession();let t=Date.now();try{return await(await this.vibeInstance.find(e.selector,{timeout:e.timeout??this.config.timeout})).click({timeout:e.timeout??this.config.timeout}),{success:!0,value:{success:!0,durationMs:Date.now()-t}}}catch(r){return{success:!1,error:new b("click",e.selector,r instanceof Error?r:void 0)}}}async type(e){this.ensureSession();let t=Date.now();try{let r=await this.vibeInstance.find(e.selector,{timeout:e.timeout??this.config.timeout});if(e.clear){let n=e.selector.replace(/\\/g,"\\\\").replace(/'/g,"\\'");await this.vibeInstance.evaluate(`
|
|
10
|
-
const el = document.querySelector('${n}');
|
|
11
|
-
if (el) el.value = '';
|
|
12
|
-
`)}return await r.type(e.text,{timeout:e.timeout??this.config.timeout}),{success:!0,value:{success:!0,durationMs:Date.now()-t}}}catch(r){return{success:!1,error:new b("type",e.selector,r instanceof Error?r:void 0)}}}async getText(e){this.ensureSession();try{return{success:!0,value:await(await this.vibeInstance.find(e)).text()}}catch(t){return{success:!1,error:a(t,`Failed to get text from ${e}`)}}}async getAttribute(e,t){this.ensureSession();try{return{success:!0,value:await(await this.vibeInstance.find(e)).getAttribute(t)??""}}catch(r){return{success:!1,error:a(r,`Failed to get attribute ${t} from ${e}`)}}}async waitForElement(e,t){this.ensureSession();try{let r=await this.vibeInstance.find(e,{timeout:t?.timeout??this.config.timeout});return{success:!0,value:{selector:e,tagName:r.info.tag,textContent:r.info.text,attributes:{},boundingBox:r.info.box,visible:!0,enabled:!0}}}catch(r){return{success:!1,error:new f(`Element ${e} not found within timeout`,r instanceof Error?r:void 0)}}}async screenshot(e){if(this.ensureSession(),!C())return{success:!1,error:new m("Screenshot capture is disabled by feature flags")};try{let t=await this.vibeInstance.screenshot(),r=t.toString("base64");return e?.path&&await(await import("fs/promises")).writeFile(e.path,t),{success:!0,value:{base64:e?.path?void 0:r,path:e?.path,format:e?.format??"png",dimensions:this.config.viewport,sizeBytes:t.length,capturedAt:new Date}}}catch(t){return{success:!1,error:new m("Failed to capture screenshot",t instanceof Error?t:void 0)}}}async compareScreenshots(e,t,r=.01){try{let s=await import("fs/promises"),n=await s.readFile(e),u=await s.readFile(t),d=n.equals(u);return{success:!0,value:{matches:d,differencePercent:d?0:100,diffRegions:[],comparedAt:new Date}}}catch(s){return{success:!1,error:a(s,"Failed to compare screenshots")}}}async evaluate(e,t){this.ensureSession();try{return{success:!0,value:await this.vibeInstance.evaluate(e)}}catch(r){return{success:!1,error:a(r,"Failed to evaluate script")}}}async checkAccessibility(e){return this.ensureSession(),{success:!1,error:new o("Use axe-core-integration module for accessibility testing. Call injectAxeCore() then runAxeAudit() using client.evaluate().","USE_AXE_CORE_INTEGRATION")}}async initialize(){await V(),this._initialized=!0}async dispose(){if(this.vibeInstance){try{await this.vibeInstance.quit()}catch(e){console.debug("[VibiumClient] Disposal error:",e instanceof Error?e.message:e)}this.vibeInstance=null}this.currentSession=null,this._initialized=!1,this._available=null}ensureSession(){if(!this.vibeInstance)throw new l("No active browser session. Call launch() first.")}generateSessionId(){return`vibium-session-${Date.now()}-${_().slice(0,9)}`}},N=class i{static instance=null;client=null;config;constructor(e={}){this.config=e}static getInstance(e){return i.instance||(i.instance=new i(e)),i.instance}static resetInstance(){i.instance?.client&&i.instance.client.dispose(),i.instance=null}async getClient(){return this.client||(this.client=new E(this.config),await this.client.initialize()),this.client}getClientSync(){return this.client||(this.client=new E(this.config)),this.client}getConfig(){return{...this.config}}configure(e){this.config={...this.config,...e},this.client&&(this.client.dispose(),this.client=null)}async dispose(){this.client&&(await this.client.dispose(),this.client=null)}}});export{S as a,A as b,E as c,N as d,M as e};
|
|
@@ -1,2 +0,0 @@
|
|
|
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.13");process.exit(0)}
|
|
2
|
-
import{c as a,d as b,e as c}from"./chunk-YCTGWMCP.js";import"./chunk-XV42SKJD.js";import"./chunk-3AOWTHLS.js";import"./chunk-ERGY45RL.js";c();export{a as VibiumClientImpl,b as VibiumClientProvider};
|
|
@@ -1,2 +0,0 @@
|
|
|
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.13");process.exit(0)}
|
|
2
|
-
import{a,b}from"./chunk-QKTB5FZP.js";import"./chunk-BSTCXDVH.js";import"./chunk-QIE76ERL.js";import"./chunk-IQGVQBVS.js";import"./chunk-ERGY45RL.js";export{a as CrossDomainEventRouter,b as createCrossDomainRouter};
|
|
@@ -1,19 +0,0 @@
|
|
|
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.13");process.exit(0)}
|
|
2
|
-
import{a as N}from"./chunk-UDIRBCZW.js";import"./chunk-ERGY45RL.js";import{Command as ae}from"commander";import s from"chalk";import{cpus as ne,freemem as ie,totalmem as re,loadavg as se}from"os";var f=class{queues={now:[],next:[],later:[]};_maxSize;constructor(e=1e3){this._maxSize=e}enqueue(e){return this.size>=this._maxSize?!1:(this.queues[e.priority].push(e),!0)}dequeue(){let e=Date.now();for(let t of["now","next","later"]){let o=this.queues[t];for(;o.length>0;){let n=o.shift();if(!(n.ttlMs&&e-n.createdAt>n.ttlMs))return n}}}peek(){let e=Date.now();for(let t of["now","next","later"]){let o=this.queues[t];for(let n of o)if(!n.ttlMs||e-n.createdAt<=n.ttlMs)return n}}drainPriority(e){let t=this.queues[e].splice(0),o=Date.now();return t.filter(n=>!n.ttlMs||o-n.createdAt<=n.ttlMs)}pruneExpired(){let e=0,t=Date.now();for(let o of["now","next","later"]){let n=this.queues[o].length;this.queues[o]=this.queues[o].filter(i=>!i.ttlMs||t-i.createdAt<=i.ttlMs),e+=n-this.queues[o].length}return e}get size(){return this.queues.now.length+this.queues.next.length+this.queues.later.length}get depths(){return{now:this.queues.now.length,next:this.queues.next.length,later:this.queues.later.length}}get isEmpty(){return this.size===0}clear(){this.queues.now=[],this.queues.next=[],this.queues.later=[]}};import{watch as E}from"fs";import{execFile as L}from"child_process";import{promisify as U}from"util";import{resolve as W,join as z}from"path";import{existsSync as j,readFileSync as B}from"fs";var M=U(L),J={repoRoot:process.cwd(),debounceMs:500,maxChangedFiles:200,pollIntervalMs:5e3},y=class{constructor(e,t){this.queue=e;this.options={...J,...t}}watcher;pollTimer;options;lastKnownHeads=new Map;debounceTimer;_running=!1;_polling=!1;get running(){return this._running}async start(){if(this._running)return;let e=W(this.options.repoRoot,".git","refs","heads");if(!j(e))throw new Error(`Git refs directory not found: ${e}`);await this.snapshotHeads(),process.platform==="darwin"||process.platform==="win32"?this.watcher=E(e,{recursive:!0},(o,n)=>{n&&this.handleRefChange(n)}):this.pollTimer=setInterval(()=>{this.poll().catch(o=>{console.debug("[GitWatcher] Poll error:",o)})},this.options.pollIntervalMs),this._running=!0}stop(){this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=void 0),this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=void 0),this.watcher&&(this.watcher.close(),this.watcher=void 0),this._running=!1}async poll(){if(this._polling)return[];this._polling=!0;let e=[];try{let{stdout:t}=await M("git",["for-each-ref","--format=%(refname:short) %(objectname:short)","refs/heads/"],{cwd:this.options.repoRoot});for(let o of t.trim().split(`
|
|
3
|
-
`)){if(!o)continue;let[n,i]=o.split(" "),r=this.lastKnownHeads.get(n);r&&r!==i&&(e.push(n),await this.enqueueCommitAnalysis(n,i)),this.lastKnownHeads.set(n,i)}}catch{}finally{this._polling=!1}return e}handleRefChange(e){this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{this.processRefChange(e).catch(t=>{console.debug("[GitWatcher] Error processing ref change:",t)})},this.options.debounceMs)}async processRefChange(e){let t=e.replace(/\\/g,"/"),o=W(this.options.repoRoot,".git","refs","heads"),n=z(o,e),i;try{i=B(n,"utf-8").trim()}catch{return}this.lastKnownHeads.get(t)!==i&&(this.lastKnownHeads.set(t,i),await this.enqueueCommitAnalysis(t,i))}async enqueueCommitAnalysis(e,t){let o=[];try{let{stdout:r}=await M("git",["diff-tree","--no-commit-id","--name-only","-r",t],{cwd:this.options.repoRoot});o=r.trim().split(`
|
|
4
|
-
`).filter(Boolean).slice(0,this.options.maxChangedFiles)}catch{}let n={type:"git_commit",branch:e,commitHash:t,changedFiles:o},i={id:`git-${t}-${Date.now()}`,priority:"next",payload:n,createdAt:Date.now(),source:"git-watcher",ttlMs:300*1e3};this.queue.enqueue(i)}async snapshotHeads(){try{let{stdout:e}=await M("git",["for-each-ref","--format=%(refname:short) %(objectname:short)","refs/heads/"],{cwd:this.options.repoRoot});for(let t of e.trim().split(`
|
|
5
|
-
`)){if(!t)continue;let[o,n]=t.split(" ");this.lastKnownHeads.set(o,n)}}catch{}}};var V={regressionThreshold:2,gapThreshold:60,memoryPrefix:"quality-daemon:coverage"},v=class{constructor(e,t){this.queue=e;this.options={...V,...t}}options;async analyze(e,t,o){let n=await t.get(`${this.options.memoryPrefix}:snapshot`);if(await t.set(`${this.options.memoryPrefix}:snapshot`,e),!n)return{regressionDetected:!1,overallDelta:{line:0,branch:0,function:0,statement:0},affectedFiles:[],newGaps:[]};let i=n,r={line:e.overall.line-i.overall.line,branch:e.overall.branch-i.overall.branch,function:e.overall.function-i.overall.function,statement:e.overall.statement-i.overall.statement},a=r.line<-this.options.regressionThreshold||r.branch<-this.options.regressionThreshold,c=o??Object.keys(e.files),d=[],h=[];for(let g of c){let m=e.files[g],p=i.files[g];if(!m)continue;let R=p?m.line-p.line:0,$=p?m.branch-p.branch:0,I=p?m.uncoveredLines.filter(_=>!p.uncoveredLines.includes(_)):m.uncoveredLines;if((R!==0||$!==0||I.length>0)&&d.push({file:g,lineDelta:R,branchDelta:$,newUncoveredLines:I}),m.line<this.options.gapThreshold){let _=this.computeRiskScore(m,I.length);h.push({file:g,uncoveredLines:m.uncoveredLines,currentCoverage:m.line,riskScore:_})}}return(a||h.length>0)&&this.enqueueTestSuggestion(e,i,h),await t.set(`${this.options.memoryPrefix}:delta`,{timestamp:Date.now(),overallDelta:r,regressionDetected:a,affectedFileCount:d.length,gapCount:h.length}),{regressionDetected:a,overallDelta:r,affectedFiles:d,newGaps:h}}async buildSnapshot(e){let t=await e.get("coverage:latest");if(t)return{timestamp:Date.now(),overall:{line:t.line,branch:t.branch,function:t.function,statement:t.statement},files:t.files??{}}}computeRiskScore(e,t){let n=1-Math.min(100,Math.max(0,e.line))/100,i=Math.min(t/50,1);return Math.min(1,n*.6+i*.4)}enqueueTestSuggestion(e,t,o){let n={type:"coverage_delta",previousSnapshot:`snapshot-${t.timestamp}`,currentSnapshot:`snapshot-${e.timestamp}`},i={id:`coverage-delta-${Date.now()}`,priority:o.some(r=>r.riskScore>.8)?"now":"next",payload:n,createdAt:Date.now(),source:"coverage-delta",ttlMs:600*1e3};this.queue.enqueue(i)}};import{execFile as K}from"child_process";import{promisify as Y}from"util";var X=Y(K),Z={runsPerWorkflow:10,flakyThreshold:3,repo:""},w=class{constructor(e,t){this.queue=e;this.options={...Z,...t}}options;async check(){let e=await this.fetchRecentRuns(),t=this.groupByWorkflow(e),o=[],n=[],i=0;for(let[a,c]of Object.entries(t)){let d=c.filter(p=>p.conclusion==="failure").length,h=c.length>0?(c.length-d)/c.length*100:100,g=this.countConsecutiveFailures(c),m=c[0]?.conclusion??"unknown";m==="failure"&&i++,g>=this.options.flakyThreshold&&(n.push(a),this.enqueueFailureAlert(a,c[0])),o.push({name:a,recentRuns:c.length,failedRuns:d,successRate:Math.round(h*10)/10,lastConclusion:m,consecutiveFailures:g})}let r=this.calculateHealthScore(o);return{timestamp:Date.now(),workflows:o,failingWorkflows:i,flakyWorkflows:n,healthScore:r}}async fetchRecentRuns(){try{let e=["run","list","--limit",String(this.options.runsPerWorkflow*5),"--json","name,status,conclusion,headBranch,number,databaseId,createdAt"];this.options.repo&&e.push("--repo",this.options.repo);let{stdout:t}=await X("gh",e,{timeout:15e3});return JSON.parse(t).map(n=>({name:n.name,status:n.status,conclusion:n.conclusion??"pending",headBranch:n.headBranch,runNumber:n.number,databaseId:n.databaseId,createdAt:n.createdAt}))}catch{return[]}}groupByWorkflow(e){let t={};for(let o of e)t[o.name]||(t[o.name]=[]),t[o.name].push(o);for(let o of Object.keys(t))t[o]=t[o].slice(0,this.options.runsPerWorkflow);return t}countConsecutiveFailures(e){let t=0;for(let o of e)if(o.conclusion==="failure")t++;else break;return t}calculateHealthScore(e){if(e.length===0)return 100;let t=e.reduce((o,n)=>o+n.successRate,0)/e.length;return Math.round(t)}enqueueFailureAlert(e,t){let o={type:"ci_failure",workflowName:e,runId:t.databaseId,conclusion:t.conclusion},n={id:`ci-failure-${e}-${Date.now()}`,priority:"now",payload:o,createdAt:Date.now(),source:"ci-monitor",ttlMs:1800*1e3};this.queue.enqueue(n)}};var ee={memoryPrefix:"quality-daemon:suggestions",maxSuggestions:100,minRiskScore:.3},b=class{options;constructor(e){this.options={...ee,...e}}async suggest(e,t,o){let n=[],i=e.filter(a=>a.riskScore>=this.options.minRiskScore);for(let a of i){let c=t.includes(a.file),d=this.determinePriority(a,c),h=this.determineTestType(a.file),g=this.estimateEffort(a);n.push({id:`suggestion-${Date.now()}-${n.length}`,file:a.file,uncoveredLines:a.uncoveredLines.slice(0,50),suggestedTestType:h,description:this.generateDescription(a,h),priority:d,estimatedEffort:g,createdAt:Date.now(),status:"pending"})}n.sort((a,c)=>{let d={high:0,medium:1,low:2};return d[a.priority]-d[c.priority]});let r=n.slice(0,this.options.maxSuggestions);return await this.storeSuggestions(r,o),r}async getPending(e){return(await e.get(`${this.options.memoryPrefix}:list`)??[]).filter(o=>o.status==="pending")}async updateStatus(e,t,o){let n=await o.get(`${this.options.memoryPrefix}:list`);if(!n)return!1;let i=n.findIndex(a=>a.id===e);if(i===-1)return!1;let r=n.map((a,c)=>c===i?{...a,status:t}:a);return await o.set(`${this.options.memoryPrefix}:list`,r),!0}determinePriority(e,t){return e.riskScore>.8?"high":t||e.riskScore>.5?"medium":"low"}determineTestType(e){return e.includes("/api/")||e.includes("/routes/")||e.includes("/handlers/")?"integration":e.includes("/e2e/")||e.includes("/pages/")||e.includes("/views/")?"e2e":"unit"}estimateEffort(e){return e.uncoveredLines.length<=10?"small":e.uncoveredLines.length<=50?"medium":"large"}generateDescription(e,t){let o=e.uncoveredLines.length,n=Math.round(e.currentCoverage);return`Add ${t} tests for ${e.file} (${o} uncovered lines, ${n}% coverage, risk ${(e.riskScore*100).toFixed(0)}%)`}async storeSuggestions(e,t){let i=[...(await t.get(`${this.options.memoryPrefix}:list`)??[]).filter(r=>r.status!=="pending"),...e].slice(-this.options.maxSuggestions);await t.set(`${this.options.memoryPrefix}:list`,i),await t.set(`${this.options.memoryPrefix}:count`,{pending:e.length,total:i.length,lastUpdated:Date.now()})}};var te={memoryPrefix:"quality-daemon:nightly",maxEntryAge:6048e5,nightlyHour:2},k=class{constructor(e,t){this.queue=e;this.options={...te,...t}}options;lastRunDate;shouldRun(){let e=new Date,t=e.toISOString().split("T")[0];return this.lastRunDate===t?!1:e.getHours()>=this.options.nightlyHour}scheduleIfDue(){if(!this.shouldRun())return!1;let e={type:"nightly",tasks:["consolidate_patterns","prune_expired","generate_report"]},t={id:`nightly-${Date.now()}`,priority:"later",payload:e,createdAt:Date.now(),source:"nightly-consolidation",ttlMs:720*60*1e3};return this.queue.enqueue(t)}async execute(e,t){let o=Date.now(),n=new Date().toISOString().split("T")[0],i=await this.consolidatePatterns(e),r=await this.pruneExpired(e),a=this.generateReport(n,t);await e.set(`${this.options.memoryPrefix}:report:${n}`,a),this.lastRunDate=n;let c={timestamp:Date.now(),patternsConsolidated:i,entriesPruned:r,reportGenerated:!0,durationMs:Date.now()-o};return await e.set(`${this.options.memoryPrefix}:last-result`,c),c}async getLastResult(e){return e.get(`${this.options.memoryPrefix}:last-result`)}async consolidatePatterns(e){let t=await e.search("quality-daemon:*"),o=0;return await e.get("quality-daemon:suggestions:count")&&o++,await e.get("quality-daemon:coverage:delta")&&o++,o}async pruneExpired(e){let t=await e.search("quality-daemon:*"),o=0,n=Date.now();for(let i of t){if(i.endsWith(":snapshot")||i.endsWith(":list"))continue;let r=await e.get(i);r&&typeof r.timestamp=="number"&&n-r.timestamp>this.options.maxEntryAge&&(await e.set(i,{pruned:!0,prunedAt:n}),o++)}return o}generateReport(e,t){return{date:e,coverageHealth:t.coverageHealth??0,ciHealth:t.ciHealth??0,commitsAnalyzed:t.commitsAnalyzed??0,suggestionsGenerated:t.suggestionsGenerated??0,notificationsSent:t.notificationsSent??0,queueDepthAvg:t.queueDepthAvg??0,daemonUptime:t.uptimeSeconds??0}}};import{writeFileSync as A,mkdirSync as Q,readdirSync as P,readFileSync as F,unlinkSync as G}from"fs";import{join as C,resolve as oe}from"path";var O={notificationsDir:oe(process.cwd(),".agentic-qe","notifications"),maxNotifications:200},S=class{notificationsDir;maxNotifications;webhookUrl;urlValidator;_sentCount=0;constructor(e){this.notificationsDir=e?.notificationsDir??O.notificationsDir,this.maxNotifications=e?.maxNotifications??O.maxNotifications,this.webhookUrl=e?.webhookUrl,this.urlValidator=e?.urlValidator}get sentCount(){return this._sentCount}initialize(){Q(this.notificationsDir,{recursive:!0})}async send(e){let t={...e,id:`notif-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,timestamp:Date.now(),read:!1};return this.writeToFile(t),this.webhookUrl&&await this.sendWebhook(t),this._sentCount++,this.pruneOldNotifications(),t}list(e){let t=e?.limit??50;try{let o=P(this.notificationsDir).filter(i=>i.endsWith(".json")).sort().reverse(),n=[];for(let i of o){if(n.length>=t)break;try{let r=F(C(this.notificationsDir,i),"utf-8"),a=JSON.parse(r);if(e?.unreadOnly&&a.read||e?.type&&a.type!==e.type)continue;n.push(a)}catch{}}return n}catch{return[]}}markRead(e){try{let t=P(this.notificationsDir).filter(r=>r.endsWith(`-${e}.json`));if(t.length===0)return!1;let o=C(this.notificationsDir,t[0]),i={...JSON.parse(F(o,"utf-8")),read:!0};return A(o,JSON.stringify(i,null,2)),!0}catch{return!1}}clear(){try{let e=P(this.notificationsDir).filter(t=>t.endsWith(".json"));for(let t of e)G(C(this.notificationsDir,t));return e.length}catch{return 0}}writeToFile(e){try{Q(this.notificationsDir,{recursive:!0});let t=`${e.timestamp}-${e.id}.json`,o=C(this.notificationsDir,t);A(o,JSON.stringify(e,null,2))}catch(t){console.debug("[NotificationService] Failed to write notification:",t)}}async sendWebhook(e){if(this.webhookUrl){if(this.urlValidator&&!this.urlValidator(this.webhookUrl)){console.warn("[NotificationService] Webhook URL blocked by SSRF guard:",this.webhookUrl);return}try{let t=await fetch(this.webhookUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),signal:AbortSignal.timeout(5e3)});t.ok||console.debug(`[NotificationService] Webhook returned ${t.status}`)}catch(t){console.debug("[NotificationService] Webhook delivery failed:",t)}}}pruneOldNotifications(){try{let e=P(this.notificationsDir).filter(o=>o.endsWith(".json")).sort();if(e.length<=this.maxNotifications)return;let t=e.slice(0,e.length-this.maxNotifications);for(let o of t)G(C(this.notificationsDir,o))}catch{}}};var q="quality-daemon",D=class{constructor(e){this.backend=e}async get(e){return this.backend.kvGet(e,q)}async set(e,t){await this.backend.kvSet(e,t,q)}async search(e){return this.backend.kvSearch(e,q)}};var T={tickIntervalMs:3e4,ciPollIntervalMs:5*6e4,coverageCheckIntervalMs:2*6e4,cpuThreshold:.7,memoryThreshold:.8},x=class{queue;gitWatcher;coverageDelta;ciMonitor;testSuggester;nightlyConsolidation;notificationService;tickTimer;_running=!1;_startedAt=0;_tickCount=0;_lastTickAt;_throttled=!1;_commitsAnalyzed=0;_suggestionsGenerated=0;_ciHealth=100;_coverageHealth=100;_lastCICheck;_lastCoverageCheck;_memory;config;constructor(e){this.config={tickIntervalMs:e?.tickIntervalMs??T.tickIntervalMs,ciPollIntervalMs:e?.ciPollIntervalMs??T.ciPollIntervalMs,coverageCheckIntervalMs:e?.coverageCheckIntervalMs??T.coverageCheckIntervalMs,cpuThreshold:e?.cpuThreshold??T.cpuThreshold,memoryThreshold:e?.memoryThreshold??T.memoryThreshold},this.queue=new f,this.gitWatcher=new y(this.queue,e?.git),this.coverageDelta=new v(this.queue,e?.coverage),this.ciMonitor=new w(this.queue,e?.ci),this.testSuggester=new b(e?.suggestions),this.nightlyConsolidation=new k(this.queue,e?.nightly),this.notificationService=new S(e?.notifications)}get running(){return this._running}async start(e){this._running||(this._memory=e,this._running=!0,this._startedAt=Date.now(),this.notificationService.initialize(),await this.gitWatcher.start().catch(t=>{console.debug("[QualityDaemon] Git watcher failed to start:",t)}),this.scheduleTick())}async stop(){this._running&&(this._running=!1,this.tickTimer&&(clearTimeout(this.tickTimer),this.tickTimer=void 0),this.gitWatcher.stop(),this._memory&&await this._memory.set("quality-daemon:state",{stoppedAt:Date.now(),tickCount:this._tickCount,commitsAnalyzed:this._commitsAnalyzed,suggestionsGenerated:this._suggestionsGenerated}))}getStatus(){return{running:this._running,uptimeSeconds:this._running?Math.floor((Date.now()-this._startedAt)/1e3):0,tickCount:this._tickCount,queueDepth:this.queue.depths,lastTickAt:this._lastTickAt,throttled:this._throttled,commitsAnalyzed:this._commitsAnalyzed,suggestionsGenerated:this._suggestionsGenerated,notificationsSent:this.notificationService.sentCount,ciHealth:this._ciHealth,coverageHealth:this._coverageHealth,lastCICheck:this._lastCICheck,lastCoverageCheck:this._lastCoverageCheck}}scheduleTick(){this._running&&(this.tickTimer=setTimeout(()=>this.tick(),this.config.tickIntervalMs))}async tick(){if(!(!this._running||!this._memory)){if(this._tickCount++,this._lastTickAt=Date.now(),this._throttled=this.isResourceConstrained(),this._throttled){await this.processNowItems(this._memory),this.scheduleTick();return}await this.processQueue(this._memory),await this.runPeriodicChecks(this._memory),this.nightlyConsolidation.scheduleIfDue(),this.queue.pruneExpired(),this.scheduleTick()}}async processQueue(e){let t=0,o=10;for(;t<o&&!this.queue.isEmpty;){let n=this.queue.dequeue();if(!n)break;await this.handleQueueItem(n,e),t++}}async processNowItems(e){let t=this.queue.drainPriority("now");for(let o of t)await this.handleQueueItem(o,e)}async handleQueueItem(e,t){let o=e.payload;switch(o.type){case"git_commit":this._commitsAnalyzed++;let n=await this.coverageDelta.buildSnapshot(t);if(n){let i=await this.coverageDelta.analyze(n,t,o.changedFiles);if(i.regressionDetected&&await this.notificationService.send({type:"coverage_drop",title:"Coverage Regression Detected",message:`Line coverage delta: ${i.overallDelta.line.toFixed(1)}% (${i.affectedFiles.length} files affected)`,severity:"high",metadata:{delta:i.overallDelta,commit:o.commitHash}}),i.newGaps.length>0){let r=await this.testSuggester.suggest(i.newGaps,o.changedFiles,t);this._suggestionsGenerated+=r.length,r.length>0&&await this.notificationService.send({type:"suggestion_available",title:"New Test Suggestions Available",message:`${r.length} test suggestions generated for uncovered code`,severity:"info",metadata:{count:r.length}})}}break;case"coverage_delta":{let i=await this.testSuggester.getPending(t);i.length>0&&await this.notificationService.send({type:"suggestion_available",title:"Test Suggestions Pending",message:`${i.length} test suggestions awaiting review`,severity:"info",metadata:{count:i.length}});break}case"gate_failure":await this.notificationService.send({type:"gate_failure",title:`Quality Gate Failed: ${o.gateName}`,message:`Score ${o.score} below threshold ${o.threshold}`,severity:"critical",metadata:{gate:o.gateName,score:o.score,threshold:o.threshold}});break;case"ci_failure":await this.notificationService.send({type:"ci_failure",title:`CI Failure: ${o.workflowName}`,message:`Workflow ${o.workflowName} run #${o.runId} concluded: ${o.conclusion}`,severity:"high",metadata:{workflow:o.workflowName,runId:o.runId}});break;case"nightly":{let i={coverageHealth:this._coverageHealth,ciHealth:this._ciHealth,commitsAnalyzed:this._commitsAnalyzed,suggestionsGenerated:this._suggestionsGenerated,notificationsSent:this.notificationService.sentCount,queueDepthAvg:this.queue.size,uptimeSeconds:Math.floor((Date.now()-this._startedAt)/1e3)};await this.nightlyConsolidation.execute(t,i);break}default:console.warn("[QualityDaemon] Unhandled payload type:",o.type)}}async runPeriodicChecks(e){let t=Date.now();if(!this._lastCICheck||t-this._lastCICheck>=this.config.ciPollIntervalMs)try{let o=await this.ciMonitor.check();this._ciHealth=o.healthScore,this._lastCICheck=t,o.flakyWorkflows.length>0&&await this.notificationService.send({type:"flaky_detected",title:"Flaky Workflows Detected",message:`${o.flakyWorkflows.length} workflows showing repeated failures: ${o.flakyWorkflows.join(", ")}`,severity:"medium",metadata:{workflows:o.flakyWorkflows}})}catch{}if(!this._lastCoverageCheck||t-this._lastCoverageCheck>=this.config.coverageCheckIntervalMs)try{let o=await this.coverageDelta.buildSnapshot(e);o&&(this._coverageHealth=Math.round((o.overall.line+o.overall.branch+o.overall.function+o.overall.statement)/4),this._lastCoverageCheck=t)}catch{}}isResourceConstrained(){if(1-ie()/re()>this.config.memoryThreshold)return!0;let t=ne().length;return(t>0?se()[0]/t:0)>this.config.cpuThreshold}};var u;function Ke(){let l=new ae("daemon").description("Manage the QE Quality Daemon").addHelpText("after",`
|
|
6
|
-
Examples:
|
|
7
|
-
aqe daemon start Start daemon in foreground
|
|
8
|
-
aqe daemon stop Stop running daemon
|
|
9
|
-
aqe daemon status Show daemon health and queue depth
|
|
10
|
-
aqe daemon notifications List recent notifications
|
|
11
|
-
aqe daemon clear-notifications Clear all notifications
|
|
12
|
-
`);return l.command("start").description("Start the QE Quality Daemon").option("--tick-interval <ms>","Tick interval in milliseconds","30000").option("--ci-interval <ms>","CI poll interval in milliseconds","300000").action(async e=>{if(u?.running){console.log(s.yellow("Daemon is already running"));let r=u.getStatus();console.log(s.gray(` Uptime: ${r.uptimeSeconds}s, Ticks: ${r.tickCount}`));return}let t={tickIntervalMs:parseInt(e.tickInterval,10),ciPollIntervalMs:parseInt(e.ciInterval,10),notifications:{urlValidator:r=>{try{let c=new URL(r).hostname.replace(/^\[|\]$/g,"");return!N(c)}catch{return!1}}}};u=new x(t);let o;try{let{UnifiedMemoryManager:r}=await import("./unified-memory-CZCWZUFP.js"),a=await r.getInstanceAsync();o=new D(a),console.log(s.gray(" Storage: SQLite (persistent)"))}catch{let r=new Map;o={async get(a){return r.get(a)},async set(a,c){r.set(a,c)},async search(a){let c=a.replace(/[.+?^${}()|[\]\\]/g,"\\$&"),d=new RegExp(c.replace(/\*/g,".*"));return Array.from(r.keys()).filter(h=>d.test(h))}},console.log(s.yellow(" Storage: in-memory (no SQLite available, state will not persist)"))}console.log(s.green("Starting QE Quality Daemon...")),await u.start(o),console.log(s.green("QE Quality Daemon started")),console.log(s.gray(` Tick interval: ${t.tickIntervalMs}ms`)),console.log(s.gray(` CI poll interval: ${t.ciPollIntervalMs}ms`)),console.log(s.gray(` PID: ${process.pid}`)),console.log(s.gray(`
|
|
13
|
-
Press Ctrl+C to stop`));let n=setInterval(()=>{u?.running||clearInterval(n)},5e3),i=async()=>{console.log(s.yellow(`
|
|
14
|
-
Stopping QE Quality Daemon...`)),await u?.stop(),clearInterval(n),console.log(s.green("Daemon stopped")),process.exit(0)};process.once("SIGINT",i),process.once("SIGTERM",i)}),l.command("stop").description("Stop the QE Quality Daemon").action(async()=>{if(!u?.running){console.log(s.yellow("No running daemon found"));return}await u.stop(),console.log(s.green("Daemon stopped")),u=void 0}),l.command("status").description("Show daemon health and queue status").action(()=>{if(!u){console.log(s.yellow("No daemon instance (start with: aqe daemon start)"));return}let e=u.getStatus();console.log(s.bold(`
|
|
15
|
-
QE Quality Daemon Status`)),console.log(s.gray("\u2500".repeat(40))),console.log(` Running: ${e.running?s.green("yes"):s.red("no")}`),console.log(` Uptime: ${le(e.uptimeSeconds)}`),console.log(` Ticks: ${e.tickCount}`),console.log(` Throttled: ${e.throttled?s.yellow("yes"):s.green("no")}`),console.log(s.bold(`
|
|
16
|
-
Queue Depth`)),console.log(` Now: ${e.queueDepth.now}`),console.log(` Next: ${e.queueDepth.next}`),console.log(` Later: ${e.queueDepth.later}`),console.log(s.bold(`
|
|
17
|
-
Health`)),console.log(` CI: ${H(e.ciHealth)}${e.ciHealth}%${s.reset("")}`),console.log(` Coverage: ${H(e.coverageHealth)}${e.coverageHealth}%${s.reset("")}`),console.log(s.bold(`
|
|
18
|
-
Activity`)),console.log(` Commits: ${e.commitsAnalyzed}`),console.log(` Suggestions: ${e.suggestionsGenerated}`),console.log(` Notifications: ${e.notificationsSent}`),console.log()}),l.command("notifications").description("List recent notifications").option("--unread","Show only unread notifications").option("--limit <n>","Maximum notifications to show","20").option("--type <type>","Filter by type (gate_failure, coverage_drop, flaky_detected, etc.)").action(e=>{if(!u){console.log(s.yellow("No daemon instance"));return}let t=u.notificationService.list({unreadOnly:e.unread,limit:parseInt(e.limit,10),type:e.type});if(t.length===0){console.log(s.gray("No notifications"));return}console.log(s.bold(`
|
|
19
|
-
Notifications (${t.length})`)),console.log(s.gray("\u2500".repeat(60)));for(let o of t){let n=ce(o.severity),i=new Date(o.timestamp).toLocaleString(),r=o.read?s.gray("\u2713"):s.yellow("\u25CF");console.log(`${r} ${n} ${s.bold(o.title)}`),console.log(` ${o.message}`),console.log(s.gray(` ${i} [${o.type}]`)),console.log()}}),l.command("clear-notifications").description("Clear all notifications").action(()=>{if(!u){console.log(s.yellow("No daemon instance"));return}let e=u.notificationService.clear();console.log(s.green(`Cleared ${e} notifications`))}),l}function le(l){if(l<60)return`${l}s`;if(l<3600)return`${Math.floor(l/60)}m ${l%60}s`;let e=Math.floor(l/3600),t=Math.floor(l%3600/60);return`${e}h ${t}m`}function H(l){return l>=80?s.green(""):l>=60?s.yellow(""):s.red("")}function ce(l){switch(l){case"critical":return s.red("!!");case"high":return s.red("!");case"medium":return s.yellow("~");case"low":return s.blue("-");case"info":return s.gray("i");default:return" "}}export{Ke as createDaemonCommand};
|
|
@@ -1,2 +0,0 @@
|
|
|
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.13");process.exit(0)}
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u}from"./chunk-I6O4MVEY.js";import"./chunk-MXT7YUOZ.js";import"./chunk-4WJ3BHCN.js";import"./chunk-R4B2B6MZ.js";import"./chunk-Q7TWE55T.js";import"./chunk-APQYMAKG.js";import"./chunk-TRJRRJV3.js";import"./chunk-OBDM6OJL.js";import"./chunk-TOS3PI5Q.js";import"./chunk-VVVIRGO7.js";import"./chunk-UCCNB75R.js";import"./chunk-FLML5IT7.js";import"./chunk-RYPUA6E2.js";import"./chunk-7HX2PMBB.js";import"./chunk-TWRGM5TY.js";import"./chunk-W6LEOFA4.js";import"./chunk-EBQUXPIG.js";import"./chunk-XXQYSDLV.js";import"./chunk-Y2ONHWXI.js";import"./chunk-HHRUXDLT.js";import"./chunk-VCJP7HQG.js";import"./chunk-QIE76ERL.js";import"./chunk-3AOWTHLS.js";import"./chunk-IQGVQBVS.js";import"./chunk-CF5EJGOV.js";import"./chunk-OM7A3YC3.js";import"./chunk-77GZ7LXL.js";import"./chunk-YYQVSVBO.js";import"./chunk-ZS5BM2EE.js";import"./chunk-AZPDX4KS.js";import"./chunk-V2CV6J2A.js";import"./chunk-JOCR5TWI.js";import"./chunk-W2YCNX4O.js";import"./chunk-ERGY45RL.js";export{t as BUILT_IN_STRATEGIES,b as ConceptGraph,g as DEFAULT_ACTIVATION_CONFIG,a as DEFAULT_CONCEPT_GRAPH_CONFIG,m as DEFAULT_DREAM_CONFIG,q as DEFAULT_DREAM_SCHEDULER_CONFIG,i as DEFAULT_INSIGHT_CONFIG,k as DEFAULT_VALIDATION_THRESHOLDS,n as DreamEngine,r as DreamScheduler,f as HISTORY_TRIM_TARGET_RATIO,j as InsightGenerator,d as MAX_ACTIVATION_HISTORY_ENTRIES,e as MAX_COACTIVATION_ENTRIES,l as RVCOWBranchManager,u as SpeculativeDreamer,h as SpreadingActivation,c as createConceptGraph,o as createDreamEngine,s as createDreamScheduler,p as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
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.13");process.exit(0)}
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i}from"./chunk-IQGVQBVS.js";import"./chunk-ERGY45RL.js";export{h as NIL,d as parse,b as stringify,c as v1,e as v3,f as v4,g as v5,a as validate,i as version};
|
|
@@ -1,2 +0,0 @@
|
|
|
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.13");process.exit(0)}
|
|
2
|
-
import{a as v,b as k}from"./chunk-OP54A7C6.js";import"./chunk-SL66MHDM.js";import"./chunk-TOS3PI5Q.js";import{k as g,o as P}from"./chunk-EBQUXPIG.js";import"./chunk-XXQYSDLV.js";import"./chunk-Y2ONHWXI.js";import"./chunk-HHRUXDLT.js";import"./chunk-VCJP7HQG.js";import{a as d,b as y,c as R}from"./chunk-3AOWTHLS.js";import"./chunk-CF5EJGOV.js";import"./chunk-OM7A3YC3.js";import"./chunk-77GZ7LXL.js";import"./chunk-YYQVSVBO.js";import"./chunk-ZS5BM2EE.js";import"./chunk-AZPDX4KS.js";import"./chunk-V2CV6J2A.js";import"./chunk-JOCR5TWI.js";import"./chunk-W2YCNX4O.js";import"./chunk-ERGY45RL.js";R();import{randomUUID as M}from"crypto";var p=class{constructor(e){this.config=e}_status="idle";_lastResult;_lastRunAt;_nextRunAt;_totalExecutions=0;_successfulExecutions=0;_failedExecutions=0;_executionDurations=[];_recentResults=[];get status(){return this._status}get lastResult(){return this._lastResult}get lastRunAt(){return this._lastRunAt}get nextRunAt(){return this._nextRunAt}async initialize(){this._status="idle",this._nextRunAt=new Date(Date.now()+this.config.intervalMs)}async execute(e){let r=Date.now();this._status="running",this._lastRunAt=new Date,this._totalExecutions++;let n,t;for(let a=0;a<=this.config.retryCount;a++)try{if(e.signal.aborted)throw new Error("Worker execution aborted");t=await this.executeWithTimeout(()=>this.doExecute(e),this.config.timeoutMs,e.signal);break}catch(u){n=y(u),e.logger.warn(`Worker ${this.config.id} attempt ${a+1} failed: ${n.message}`),a<this.config.retryCount&&await this.delay(this.config.retryDelayMs)}let o=Date.now()-r;return t?(this._successfulExecutions++,this._lastResult=t):(this._failedExecutions++,t=this.createErrorResult(n,o),this._lastResult=t),this._executionDurations.push(o),this._executionDurations.length>100&&this._executionDurations.shift(),this._recentResults.push({timestamp:new Date,success:t.success,durationMs:o}),this._recentResults.length>5&&this._recentResults.shift(),this._nextRunAt=new Date(Date.now()+this.config.intervalMs),this._status=t.success?"idle":"error",await e.eventBus.publish({type:"worker.executed",workerId:this.config.id,timestamp:new Date,payload:{success:t.success,durationMs:o,findingsCount:t.findings.length,healthScore:t.metrics.healthScore}}),t}pause(){this._status!=="stopped"&&(this._status="paused")}resume(){this._status==="paused"&&(this._status="idle")}async stop(){this._status="stopped"}getHealth(){let e=this._executionDurations.length>0?this._executionDurations.reduce((n,t)=>n+t,0)/this._executionDurations.length:0,r=this._totalExecutions>0?this._successfulExecutions/this._totalExecutions:1;return{status:this._status,healthScore:Math.round(r*100),totalExecutions:this._totalExecutions,successfulExecutions:this._successfulExecutions,failedExecutions:this._failedExecutions,avgDurationMs:Math.round(e),recentResults:[...this._recentResults]}}async executeWithTimeout(e,r,n){return new Promise((t,o)=>{let a=setTimeout(()=>{o(new Error(`Worker execution timed out after ${r}ms`))},r),u=()=>{clearTimeout(a),o(new Error("Worker execution aborted"))};n.addEventListener("abort",u,{once:!0}),e().then(c=>{clearTimeout(a),n.removeEventListener("abort",u),t(c)}).catch(c=>{clearTimeout(a),n.removeEventListener("abort",u),o(c)})})}createErrorResult(e,r){return{workerId:this.config.id,timestamp:new Date,durationMs:r,success:!1,error:e.message,metrics:{itemsAnalyzed:0,issuesFound:0,healthScore:0,trend:"degrading",domainMetrics:{}},findings:[],recommendations:[]}}createResult(e,r,n,t){return{workerId:this.config.id,timestamp:new Date,durationMs:e,success:!0,metrics:r,findings:n,recommendations:t}}delay(e){return new Promise(r=>setTimeout(r,e))}generateId(){return`${Date.now()}-${M().slice(0,9)}`}};P();R();var W={id:"heartbeat-scheduler",name:"Heartbeat Scheduler",description:"Token-free maintenance: pattern promotion, stale detection, experience buffer monitoring",intervalMs:1800*1e3,priority:"normal",targetDomains:["learning-optimization"],enabled:!0,timeoutMs:6e4,retryCount:1,retryDelayMs:5e3},b=class extends p{lifecycleManager=null;dailyLogger;lastRunTimestamp=0;constructor(){super(W),this.dailyLogger=new k}async getLifecycleManager(){if(this.lifecycleManager)return this.lifecycleManager;try{let e=g();await e.initialize();let r=e.getDatabase();return this.lifecycleManager=v(r,{promotionRewardThreshold:.7,promotionMinOccurrences:2,promotionMinSuccessRate:.7,deprecationFailureThreshold:3,staleDaysThreshold:30,confidenceDecayRate:.01,minActiveConfidence:.3}),this.lifecycleManager}catch{return null}}getPendingExperienceCount(){try{return g().getDatabase().prepare("SELECT COUNT(*) as pending FROM qe_pattern_usage WHERE created_at > datetime('now', '-1 day')").get()?.pending??0}catch{return 0}}async doExecute(e){let r=Date.now();e.logger.info("Heartbeat scheduler running (token-free maintenance)");let n=[],t=[],o=await this.getLifecycleManager();if(!o)return e.logger.warn("Unified memory unavailable \u2014 returning zero-metric heartbeat"),this.createResult(Date.now()-r,{itemsAnalyzed:0,issuesFound:0,healthScore:50,trend:"stable",domainMetrics:{promoted:0,deprecated:0,decayed:0,stalePatterns:0,pendingExperiences:0,avgConfidence:0,avgSuccessRate:0}},[],[]);let a=0,u=0;try{let s=o.promoteEligiblePatterns();a=s.promoted,u=s.checked,a>0&&n.push({type:"heartbeat-promotion",severity:"info",domain:"learning-optimization",title:"Patterns Promoted",description:`${a} of ${u} short-term patterns promoted to long-term`})}catch(s){e.logger.warn("Pattern promotion failed",{error:d(s)})}let c=0,h=0;try{let s=o.deprecateStalePatterns();c=s.deprecated,h=s.checked,c>0&&n.push({type:"heartbeat-deprecation",severity:"low",domain:"learning-optimization",title:"Stale Patterns Deprecated",description:`${c} of ${h} patterns deprecated (stale, failed, or low confidence)`})}catch(s){e.logger.warn("Stale pattern detection failed",{error:d(s)})}let l=0;try{let s=this.lastRunTimestamp>0?(Date.now()-this.lastRunTimestamp)/864e5:1;l=o.applyConfidenceDecay(Math.min(s,7)).decayed}catch(s){e.logger.warn("Confidence decay failed",{error:d(s)})}let m=this.getPendingExperienceCount(),i={totalPatterns:0,activePatterns:0,deprecatedPatterns:0,promotedPatterns:0,shortTermPatterns:0,longTermPatterns:0,avgConfidence:0,avgSuccessRate:0,patternsNearDeprecation:0};try{i=o.getStats()}catch(s){e.logger.warn("Stats retrieval failed",{error:d(s)})}try{this.dailyLogger.log({timestamp:new Date,type:"pattern-promoted",summary:`Heartbeat: ${a} promoted, ${c} deprecated, ${l} decayed, ${m} pending exp, ${i.activePatterns} active patterns (avg conf: ${i.avgConfidence.toFixed(2)})`,details:{promoted:a,deprecated:c,decayed:l,pendingExperiences:m,totalPatterns:i.totalPatterns,activePatterns:i.activePatterns,avgConfidence:i.avgConfidence,avgSuccessRate:i.avgSuccessRate}}),this.dailyLogger.flush()}catch(s){e.logger.warn("Daily log write failed",{error:d(s)})}this.lastRunTimestamp=Date.now(),i.activePatterns>0&&i.patternsNearDeprecation/i.activePatterns>.5&&t.push({priority:"p2",domain:"learning-optimization",action:"Review At-Risk Patterns",description:`${i.patternsNearDeprecation} of ${i.activePatterns} active patterns are near deprecation. Manual review recommended.`,estimatedImpact:"medium",effort:"low",autoFixable:!1});let f=this.calculateHealthScore(i,a,c),D=this.determineTrend(a,c,i.activePatterns),_=Math.max(u,h),x=a+c+i.patternsNearDeprecation;return e.logger.info("Heartbeat complete",{promoted:a,deprecated:c,decayed:l,pendingExperiences:m,healthScore:f}),this.createResult(Date.now()-r,{itemsAnalyzed:_,issuesFound:x,healthScore:f,trend:D,domainMetrics:{promoted:a,deprecated:c,decayed:l,stalePatterns:i.patternsNearDeprecation,pendingExperiences:m,avgConfidence:Number(i.avgConfidence.toFixed(3)),avgSuccessRate:Number(i.avgSuccessRate.toFixed(3))}},n,t)}calculateHealthScore(e,r,n){let t=70;if(t+=Math.min(15,r*5),e.avgConfidence>0&&(t+=Math.round((e.avgConfidence-.5)*30)),e.activePatterns>0){let o=n/e.activePatterns;t-=Math.round(o*20)}return e.activePatterns>0&&e.patternsNearDeprecation/e.activePatterns>.5&&(t-=10),Math.max(0,Math.min(100,Math.round(t)))}determineTrend(e,r,n){return n===0?"stable":e>r?"improving":r>e&&r/n>.1?"degrading":"stable"}};export{b as HeartbeatSchedulerWorker};
|
|
@@ -1,2 +0,0 @@
|
|
|
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.13");process.exit(0)}
|
|
2
|
-
import{a,c as b}from"./chunk-V2CV6J2A.js";import"./chunk-JOCR5TWI.js";import"./chunk-W2YCNX4O.js";import"./chunk-ERGY45RL.js";b();export{a as HnswAdapter};
|
|
@@ -1,2 +0,0 @@
|
|
|
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.13");process.exit(0)}
|
|
2
|
-
import{a,b,c,d}from"./chunk-3I6KWFJT.js";import"./chunk-Y2ONHWXI.js";import"./chunk-HHRUXDLT.js";import"./chunk-YYQVSVBO.js";import"./chunk-V2CV6J2A.js";import"./chunk-JOCR5TWI.js";import"./chunk-W2YCNX4O.js";import"./chunk-ERGY45RL.js";export{a as DEFAULT_HNSW_CONFIG,b as HNSWIndex,d as benchmarkHNSW,c as createHNSWIndex};
|
|
@@ -1,2 +0,0 @@
|
|
|
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.13");process.exit(0)}
|
|
2
|
-
import{a}from"./chunk-TVASP2E6.js";import"./chunk-DY5JRJXV.js";import"./chunk-Y2ONHWXI.js";import"./chunk-HHRUXDLT.js";import"./chunk-VCJP7HQG.js";import"./chunk-QIE76ERL.js";import"./chunk-3AOWTHLS.js";import"./chunk-IQGVQBVS.js";import"./chunk-ERGY45RL.js";export{a as ImpactAnalyzerService};
|
|
@@ -1,2 +0,0 @@
|
|
|
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.13");process.exit(0)}
|
|
2
|
-
import{a,b,c,d}from"./chunk-TU3JIH3U.js";import"./chunk-AOTEEGQA.js";import"./chunk-FEGITTAE.js";import"./chunk-CPRYUCPC.js";import"./chunk-V6UODTBP.js";import"./chunk-VCJP7HQG.js";import"./chunk-3AOWTHLS.js";import"./chunk-CF5EJGOV.js";import"./chunk-OM7A3YC3.js";import"./chunk-ERGY45RL.js";export{a as InitOrchestrator,b as createInitOrchestrator,d as formatInitResult,c as quickInit};
|
|
@@ -1,2 +0,0 @@
|
|
|
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.13");process.exit(0)}
|
|
2
|
-
import{v as a,w as b}from"./chunk-HEHGQM2H.js";import"./chunk-BUIMIUJA.js";import"./chunk-OUNZPHTA.js";import"./chunk-KULWZMVC.js";import"./chunk-QHCOAG7D.js";import"./chunk-ZUW3KVML.js";import"./chunk-6LDRSG7C.js";import"./chunk-TPTKR5ZO.js";import"./chunk-WQGP5ULD.js";import"./chunk-HXLAXSEM.js";import"./chunk-FS4TPAAA.js";import"./chunk-AV23XNRL.js";import"./chunk-BSTCXDVH.js";import"./chunk-YCTGWMCP.js";import"./chunk-I6O4MVEY.js";import"./chunk-MXT7YUOZ.js";import"./chunk-4WJ3BHCN.js";import"./chunk-R4B2B6MZ.js";import"./chunk-Q7TWE55T.js";import"./chunk-APQYMAKG.js";import"./chunk-TRJRRJV3.js";import"./chunk-OBDM6OJL.js";import"./chunk-TOS3PI5Q.js";import"./chunk-VVVIRGO7.js";import"./chunk-UCCNB75R.js";import"./chunk-2RTGP76Y.js";import"./chunk-FLML5IT7.js";import"./chunk-YCQ2GHFH.js";import"./chunk-OKCI6BNZ.js";import"./chunk-XV42SKJD.js";import"./chunk-Q3MQYATA.js";import"./chunk-3I6KWFJT.js";import"./chunk-RYPUA6E2.js";import"./chunk-TVASP2E6.js";import"./chunk-DY5JRJXV.js";import"./chunk-5TDHUYYF.js";import"./chunk-HRD7LL7Q.js";import"./chunk-7HX2PMBB.js";import"./chunk-TWRGM5TY.js";import"./chunk-W6LEOFA4.js";import"./chunk-EBQUXPIG.js";import"./chunk-XXQYSDLV.js";import"./chunk-WQIB5ERQ.js";import"./chunk-Y2ONHWXI.js";import"./chunk-HHRUXDLT.js";import"./chunk-EC2CI3ZC.js";import"./chunk-VCJP7HQG.js";import"./chunk-QIE76ERL.js";import"./chunk-3AOWTHLS.js";import"./chunk-IQGVQBVS.js";import"./chunk-Y7YSJD4I.js";import"./chunk-CF5EJGOV.js";import"./chunk-OM7A3YC3.js";import"./chunk-77GZ7LXL.js";import"./chunk-YYQVSVBO.js";import"./chunk-ZS5BM2EE.js";import"./chunk-AZPDX4KS.js";import"./chunk-V2CV6J2A.js";import"./chunk-JOCR5TWI.js";import"./chunk-W2YCNX4O.js";import"./chunk-ERGY45RL.js";export{a as QEKernelImpl,b as createKernel};
|
|
@@ -1,2 +0,0 @@
|
|
|
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.13");process.exit(0)}
|
|
2
|
-
import{g as a}from"./chunk-DY5JRJXV.js";import"./chunk-Y2ONHWXI.js";import"./chunk-HHRUXDLT.js";import"./chunk-VCJP7HQG.js";import"./chunk-QIE76ERL.js";import"./chunk-3AOWTHLS.js";import"./chunk-ERGY45RL.js";export{a as KnowledgeGraphService};
|