agentic-qe 3.9.17 → 3.9.18
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 +22 -0
- package/README.md +65 -0
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/cli/bundle.js +5 -5
- package/dist/cli/chunks/adapter-C7AKAAPC.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-JN7W7O5X.js → agent-booster-wasm-RJHBIG5V.js} +2 -2
- package/dist/cli/chunks/{agent-handler-F6Q75SJQ.js → agent-handler-CXS6EE2V.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-3GGTDVR4.js → agent-memory-branch-7NV5DD5A.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-7P3AXQNO.js +2 -0
- package/dist/cli/chunks/{audit-R7KN45HM.js → audit-3NWGSPJW.js} +2 -2
- package/dist/cli/chunks/base-GIDVLEPA.js +2 -0
- package/dist/cli/chunks/{better-sqlite3-2LTGEMYR.js → better-sqlite3-NXOMSJDC.js} +2 -2
- package/dist/cli/chunks/{brain-handler-PML5L6WQ.js → brain-handler-6N5WWZVA.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-OKUPS2XC.js → branch-enumerator-I7UTOCAW.js} +2 -2
- package/dist/cli/chunks/{browser-KOQOTSAT.js → browser-6VOFWA52.js} +2 -2
- package/dist/cli/chunks/browser-workflow-DAUS4Z5V.js +2 -0
- package/dist/cli/chunks/{chunk-YE5AYBHX.js → chunk-27MW2RFA.js} +2 -2
- package/dist/cli/chunks/{chunk-3UGV2XWF.js → chunk-2A4JCRAW.js} +2 -2
- package/dist/cli/chunks/{chunk-QFFSQWXP.js → chunk-3DLD7OMF.js} +1 -1
- package/dist/cli/chunks/{chunk-CPZUNBSQ.js → chunk-3GA7M5NK.js} +2 -2
- package/dist/cli/chunks/{chunk-PGTMLW5K.js → chunk-4666TC3P.js} +2 -2
- package/dist/cli/chunks/{chunk-AZQ476BM.js → chunk-4BIWQLD3.js} +2 -2
- package/dist/cli/chunks/{chunk-3GYAIW2P.js → chunk-4ELLGWTS.js} +2 -2
- package/dist/cli/chunks/{chunk-XZOJWFLH.js → chunk-4U2JKV44.js} +1 -1
- package/dist/cli/chunks/chunk-4XYQJ4LQ.js +2 -0
- package/dist/cli/chunks/{chunk-MPEQXXXR.js → chunk-54TOOHER.js} +2 -2
- package/dist/cli/chunks/{chunk-APWO3FI3.js → chunk-5ROA7KOT.js} +1 -1
- package/dist/cli/chunks/{chunk-V3VJNWOF.js → chunk-5SZLQCFP.js} +2 -2
- package/dist/cli/chunks/{chunk-X66N7E7D.js → chunk-6BGSH2YR.js} +1 -1
- package/dist/cli/chunks/{chunk-PV6WBC2D.js → chunk-6G3RNT5H.js} +2 -2
- package/dist/cli/chunks/{chunk-OUSQ4KQN.js → chunk-6IBFYVLK.js} +2 -2
- package/dist/cli/chunks/{chunk-65Z6HMDA.js → chunk-6KTF7QB3.js} +2 -2
- package/dist/cli/chunks/{chunk-Z77BVREU.js → chunk-6QSB4XOL.js} +2 -2
- package/dist/cli/chunks/{chunk-6YFEWIL5.js → chunk-6ZMQL3U6.js} +2 -2
- package/dist/cli/chunks/{chunk-N64PBOR5.js → chunk-7GGSUXVM.js} +2 -2
- package/dist/cli/chunks/{chunk-G3G5QEHL.js → chunk-7OGUAZGJ.js} +1 -1
- package/dist/cli/chunks/{chunk-EVQYUUQ3.js → chunk-7XLTLFP5.js} +2 -2
- package/dist/cli/chunks/{chunk-LD4OYOX2.js → chunk-7ZIKFJ6X.js} +2 -2
- package/dist/cli/chunks/{chunk-6HGRJPD6.js → chunk-A26GU6YU.js} +1 -1
- package/dist/cli/chunks/{chunk-V4DMYY6P.js → chunk-AGPZVE6B.js} +2 -2
- package/dist/cli/chunks/{chunk-32FWC6G3.js → chunk-AMRUZ6XG.js} +2 -2
- package/dist/cli/chunks/{chunk-3KIUCAVI.js → chunk-AZGESIFV.js} +1 -1
- package/dist/cli/chunks/{chunk-I5BLJ2QQ.js → chunk-B6BAK2JI.js} +2 -2
- package/dist/cli/chunks/{chunk-PEHHOJE6.js → chunk-BADBKGZE.js} +2 -2
- package/dist/cli/chunks/{chunk-HMT6LKHH.js → chunk-BFM47L3X.js} +2 -2
- package/dist/cli/chunks/{chunk-MNSF47HC.js → chunk-BGSYFAEJ.js} +3 -3
- package/dist/cli/chunks/{chunk-42HSEBOH.js → chunk-BRWWIY6O.js} +2 -2
- package/dist/cli/chunks/{chunk-63ERVKIO.js → chunk-BSQTOKNR.js} +1 -1
- package/dist/cli/chunks/{chunk-W5HTZ3VZ.js → chunk-BXTHB2A2.js} +2 -2
- package/dist/cli/chunks/{chunk-JVDYHVF2.js → chunk-BY44ODHD.js} +4 -4
- package/dist/cli/chunks/{chunk-BCIEQ4IP.js → chunk-CCM7MBLA.js} +2 -2
- package/dist/cli/chunks/{chunk-FYNDV2NZ.js → chunk-CSYQKVZY.js} +1 -1
- package/dist/cli/chunks/{chunk-6YCZDIGF.js → chunk-D7SS56EG.js} +2 -2
- package/dist/cli/chunks/{chunk-QW554DTP.js → chunk-DC3PADV3.js} +1 -1
- package/dist/cli/chunks/{chunk-7PWW2OXP.js → chunk-DCB2VUYM.js} +1 -1
- package/dist/cli/chunks/{chunk-ARN2KDLJ.js → chunk-DOSDUAVZ.js} +2 -2
- package/dist/cli/chunks/{chunk-RP2RHB7H.js → chunk-DQCWNCOT.js} +2 -2
- package/dist/cli/chunks/{chunk-A3WC5KTG.js → chunk-EN2A2CVT.js} +1 -1
- package/dist/cli/chunks/{chunk-BCBC3DVN.js → chunk-ENYQUSSK.js} +2 -2
- package/dist/cli/chunks/{chunk-I64R2D4U.js → chunk-EZN7QMOZ.js} +4 -4
- package/dist/cli/chunks/{chunk-63V33NAB.js → chunk-F7XU7KZL.js} +2 -2
- package/dist/cli/chunks/{chunk-42TUEMH7.js → chunk-FDDB7QTM.js} +1 -1
- package/dist/cli/chunks/{chunk-XB4JRJU4.js → chunk-FKNYOKIK.js} +1 -1
- package/dist/cli/chunks/{chunk-QXOAFWWK.js → chunk-FTIHPDWV.js} +2 -2
- package/dist/cli/chunks/{chunk-QYDBV5MD.js → chunk-G2H4W7NN.js} +1 -1
- package/dist/cli/chunks/{chunk-G5DEPXD4.js → chunk-H5JZZH2C.js} +2 -2
- package/dist/cli/chunks/{chunk-VYCFMW64.js → chunk-HLXPD4Y2.js} +39 -38
- package/dist/cli/chunks/{chunk-7VGZDTY4.js → chunk-HZKY5KPB.js} +1 -1
- package/dist/cli/chunks/{chunk-BGY4CHZA.js → chunk-I3POPZT5.js} +2 -2
- package/dist/cli/chunks/{chunk-KUEG6K4A.js → chunk-IJPTWPXG.js} +1 -1
- package/dist/cli/chunks/{chunk-2K7GRX5U.js → chunk-IS2PMHB5.js} +2 -2
- package/dist/cli/chunks/{chunk-CZXV3JAF.js → chunk-J7BG55VG.js} +3 -3
- package/dist/cli/chunks/{chunk-B3M3JEFD.js → chunk-JBW2A2O6.js} +2 -2
- package/dist/cli/chunks/{chunk-OSBJWQZL.js → chunk-JD6KE6DJ.js} +2 -2
- package/dist/cli/chunks/{chunk-I3NUJ6KJ.js → chunk-JGNVI5UB.js} +3 -3
- package/dist/cli/chunks/{chunk-WGEJ646F.js → chunk-JMK5OCWL.js} +2 -2
- package/dist/cli/chunks/{chunk-PMNZN4K7.js → chunk-JZG23IPV.js} +1 -1
- package/dist/cli/chunks/{chunk-BUWZOMC7.js → chunk-JZTB35EQ.js} +1 -1
- package/dist/cli/chunks/{chunk-VI2I5R6C.js → chunk-K5NFP7B5.js} +2 -2
- package/dist/cli/chunks/{chunk-2LXXYKAP.js → chunk-KFITGSW3.js} +2 -2
- package/dist/cli/chunks/{chunk-TATCL3AK.js → chunk-KMHGQD76.js} +2 -2
- package/dist/cli/chunks/{chunk-ZI3UBCIN.js → chunk-KV6PIOHN.js} +1 -1
- package/dist/cli/chunks/{chunk-6PCGUJCG.js → chunk-KYLE6ZSC.js} +4 -4
- package/dist/cli/chunks/{chunk-Z5R46W6Q.js → chunk-LVABI4OA.js} +1 -1
- package/dist/cli/chunks/{chunk-F5X3U57Y.js → chunk-MBGWDELE.js} +2 -2
- package/dist/cli/chunks/{chunk-QMVGGG4B.js → chunk-MDCTQOUJ.js} +1 -1
- package/dist/cli/chunks/chunk-MJ7UYPGY.js +15 -0
- package/dist/cli/chunks/{chunk-AFLTMVMT.js → chunk-MLVVYUFS.js} +1 -1
- package/dist/cli/chunks/{chunk-FCWB2FJG.js → chunk-NBQW7MXF.js} +1 -1
- package/dist/cli/chunks/{chunk-JC4O47QG.js → chunk-NKOLFLXF.js} +2 -2
- package/dist/cli/chunks/{chunk-KTUSZRS3.js → chunk-ODGACHEZ.js} +2 -2
- package/dist/cli/chunks/{chunk-DVEQOD74.js → chunk-OXL6JSVR.js} +45 -44
- package/dist/cli/chunks/{chunk-Y47U7ICT.js → chunk-P6HIDCTQ.js} +1 -1
- package/dist/cli/chunks/{chunk-YUCMGFHE.js → chunk-PM77Z4PR.js} +2 -2
- package/dist/cli/chunks/{chunk-K44EQV74.js → chunk-QGSELG75.js} +2 -2
- package/dist/cli/chunks/{chunk-DDJUVCKF.js → chunk-QTNDHCZ7.js} +3 -3
- package/dist/cli/chunks/{chunk-ZLOMFM25.js → chunk-QTUTQLOY.js} +2 -2
- package/dist/cli/chunks/{chunk-VX6XHAG2.js → chunk-QW2RFI73.js} +2 -2
- package/dist/cli/chunks/{chunk-RYATPB5L.js → chunk-R3U3ARVJ.js} +2 -2
- package/dist/cli/chunks/{chunk-ZQKNVZPD.js → chunk-RGLCMGNZ.js} +2 -2
- package/dist/cli/chunks/{chunk-R3COBKOP.js → chunk-RHYGRUNU.js} +3 -3
- package/dist/cli/chunks/{chunk-DR6SJ6P3.js → chunk-RI3NTZ2I.js} +2 -2
- package/dist/cli/chunks/{chunk-B36RPXAQ.js → chunk-RPT7HCMH.js} +2 -2
- package/dist/cli/chunks/{chunk-PMH52K5J.js → chunk-S2XBAOXE.js} +1 -1
- package/dist/cli/chunks/{chunk-A67FRRPJ.js → chunk-SQHM6WUF.js} +3 -3
- package/dist/cli/chunks/{chunk-USORP6QK.js → chunk-TFUWIKGZ.js} +2 -2
- package/dist/cli/chunks/{chunk-UTO2M76W.js → chunk-TPL3CBMS.js} +1 -1
- package/dist/cli/chunks/{chunk-LA565BGJ.js → chunk-UFGFV4BO.js} +2 -2
- package/dist/cli/chunks/{chunk-DJXYFFGA.js → chunk-UNPTSPAO.js} +2 -2
- package/dist/cli/chunks/{chunk-5J444NJR.js → chunk-UPP5V7Y3.js} +2 -2
- package/dist/cli/chunks/{chunk-WP55YBB2.js → chunk-V2N7KWT7.js} +1 -1
- package/dist/cli/chunks/{chunk-K4FG3CRS.js → chunk-VRHKEJR6.js} +3 -3
- package/dist/cli/chunks/{chunk-PJZHNAUT.js → chunk-VW7FKTFO.js} +2 -2
- package/dist/cli/chunks/{chunk-CY73RJJJ.js → chunk-VXQK4GKV.js} +1 -1
- package/dist/cli/chunks/{chunk-6F6BNLVP.js → chunk-VZO5I23B.js} +1 -1
- package/dist/cli/chunks/{chunk-6MRUG5G2.js → chunk-WC5A7C5L.js} +1 -1
- package/dist/cli/chunks/{chunk-FVVZWNLV.js → chunk-WH7ZOJCF.js} +1 -1
- package/dist/cli/chunks/{chunk-QVJQXRHU.js → chunk-WKQSZTU6.js} +2 -2
- package/dist/cli/chunks/{chunk-4TDIA2EN.js → chunk-WMJCFDTA.js} +2 -2
- package/dist/cli/chunks/{chunk-JT2KLBDB.js → chunk-X2T4TI7D.js} +2 -2
- package/dist/cli/chunks/{chunk-ORNWQXEX.js → chunk-XBWVHO6G.js} +2 -2
- package/dist/cli/chunks/{chunk-HQXRCW7Z.js → chunk-XSLKR2DM.js} +2 -2
- package/dist/cli/chunks/{chunk-XMMKAV5R.js → chunk-XTCV5UOJ.js} +2 -2
- package/dist/cli/chunks/{chunk-6PRIY3HT.js → chunk-YNVVRND7.js} +2 -2
- package/dist/cli/chunks/{chunk-L5JZIORJ.js → chunk-YQL6JH2Y.js} +2 -2
- package/dist/cli/chunks/{chunk-CQSU7NTG.js → chunk-YZIOM7JL.js} +2 -2
- package/dist/cli/chunks/{chunk-P2V5ZG3Q.js → chunk-Z4YHL4JU.js} +1 -1
- package/dist/cli/chunks/{chunk-L6ZJSFAA.js → chunk-ZHA5Z5V4.js} +1 -1
- package/dist/cli/chunks/{chunk-AZWCJFT6.js → chunk-ZJEVL5O3.js} +2 -2
- package/dist/cli/chunks/{chunk-MER7IHAZ.js → chunk-ZURHHRSA.js} +2 -2
- package/dist/cli/chunks/{chunk-EGBRCXYT.js → chunk-ZWR4PZ4Z.js} +2 -2
- package/dist/cli/chunks/{ci-TRWQ33L2.js → ci-LYAVZLM3.js} +2 -2
- package/dist/cli/chunks/{ci-output-TCFNHOTU.js → ci-output-L7TR2NCN.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-GO2TIL7E.js → circuit-breaker-AQOGJGKI.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-U77JVSVU.js → claude-flow-setup-SO2ZN26K.js} +2 -2
- package/dist/cli/chunks/client-LIKTMSIP.js +2 -0
- package/dist/cli/chunks/{cline-installer-XFD3SMGS.js → cline-installer-XCXFH4UR.js} +2 -2
- package/dist/cli/chunks/{code-V3VE2TMW.js → code-3Z2HMS5I.js} +2 -2
- package/dist/cli/chunks/{code-index-extractor-C6DHOOWA.js → code-index-extractor-KE362AJX.js} +2 -2
- package/dist/cli/chunks/{codex-installer-IUR7MVE6.js → codex-installer-GTD3GFTF.js} +2 -2
- package/dist/cli/chunks/{completions-R7FZHNJJ.js → completions-EDCXRRJO.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-EP4QF5CS.js → complexity-analyzer-QMN3V6D3.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-6DW2SBMQ.js → continuedev-installer-U6HN376C.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-U3UOX7D5.js → copilot-installer-54PZIREM.js} +2 -2
- package/dist/cli/chunks/{cost-tracker-5QZ5A46I.js → cost-tracker-33O475QA.js} +2 -2
- package/dist/cli/chunks/{coverage-QOOOITLD.js → coverage-B7E545AJ.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-SSBT32Q3.js +2 -0
- package/dist/cli/chunks/{cursor-installer-SY3TRE2I.js → cursor-installer-LKKSPZUM.js} +2 -2
- package/dist/cli/chunks/{daemon-HBSBIPUZ.js → daemon-DVOHWXUR.js} +3 -3
- package/dist/cli/chunks/{dag-attention-scheduler-ZNLUW2HL.js → dag-attention-scheduler-EQOHQBUG.js} +2 -2
- package/dist/cli/chunks/{detect-DMUJPGNC.js → detect-OCB2XT6C.js} +2 -2
- package/dist/cli/chunks/{dist-node-4RPPRXUH.js → dist-node-HSG4QK4G.js} +2 -2
- package/dist/cli/chunks/{domain-handler-XJFDML77.js → domain-handler-USGF4CIG.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-MXPKJ2A2.js → domain-transfer-OUERZRGL.js} +2 -2
- package/dist/cli/chunks/dream-FAHB6BWB.js +2 -0
- package/dist/cli/chunks/{eval-DHBZ74RL.js → eval-LHYXXWFK.js} +2 -2
- package/dist/cli/chunks/{fast-paths-WTNFCV2I.js → fast-paths-UTK7BN63.js} +2 -2
- package/dist/cli/chunks/{feature-flags-VC7BQNHU.js → feature-flags-XB6ALB3X.js} +2 -2
- package/dist/cli/chunks/{feature-flags-264QUQ3E.js → feature-flags-XEP6B4GN.js} +2 -2
- package/dist/cli/chunks/{file-discovery-LXQPIRKG.js → file-discovery-O4DUCNHK.js} +2 -2
- package/dist/cli/chunks/{fleet-4OAZWNXG.js → fleet-37NGGRJI.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-MAXAOMTP.js → gnn-wrapper-5E7T3IQX.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-ZTUI75EB.js → heartbeat-handler-Q44PCI7K.js} +4 -4
- package/dist/cli/chunks/{heartbeat-scheduler-VWPA7XKA.js → heartbeat-scheduler-6JPB2AQS.js} +2 -2
- package/dist/cli/chunks/hnsw-adapter-GQM3ONQE.js +2 -0
- package/dist/cli/chunks/hnsw-index-XF3NY4R4.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-EQDYPKGL.js → hnsw-legacy-bridge-B55GGQYA.js} +2 -2
- package/dist/cli/chunks/{hnswlib-node-G4QGTGIB.js → hnswlib-node-B3D2XIL5.js} +2 -2
- package/dist/cli/chunks/{hooks-RBVHAPBL.js → hooks-MOBQSJLJ.js} +6 -6
- package/dist/cli/chunks/{hybrid-router-XODWORQ3.js → hybrid-router-RV34PYQD.js} +2 -2
- package/dist/cli/chunks/{hypergraph-engine-T73DH7N6.js → hypergraph-engine-FT5YK5RF.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-OZJJJW5B.js → hypergraph-handler-EUS6MIYW.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-V6PBIMZH.js +2 -0
- package/dist/cli/chunks/{init-handler-YXXNCXM4.js → init-handler-3MV32TKZ.js} +6 -6
- package/dist/cli/chunks/init-wizard-7ROJWLEO.js +2 -0
- package/dist/cli/chunks/kernel-AOUBGDXU.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-3RCK2JPW.js → kilocode-installer-RZPRXQI2.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-LKC42QRS.js → kiro-installer-BGDBNZHI.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-SJA3YGMQ.js +2 -0
- package/dist/cli/chunks/{learning-BIBRKCYL.js → learning-KNEBWLEZ.js} +3 -3
- package/dist/cli/chunks/{llm-router-Z6Z7TTBI.js → llm-router-Q2VQPOQ3.js} +4 -4
- package/dist/cli/chunks/{load-T2QUB663.js → load-RL53SYBD.js} +2 -2
- package/dist/cli/chunks/load-test-NSHIGHCV.js +2 -0
- package/dist/cli/chunks/{mcp-QBOL6TK4.js → mcp-GTINFFUF.js} +2 -2
- package/dist/cli/chunks/{memory-7RQ2SF36.js → memory-STPMUUAK.js} +5 -5
- package/dist/cli/chunks/memory-backend-SZAYMQVP.js +2 -0
- package/dist/cli/chunks/{memory-handlers-5OHDUBJS.js → memory-handlers-LWX3LPVF.js} +2 -2
- package/dist/cli/chunks/{multi-model-executor-PGSNT3NO.js → multi-model-executor-36ZYYDA6.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-AEOXTTFG.js → opencode-installer-KTCQKS2K.js} +2 -2
- package/dist/cli/chunks/{orchestrator-6K2L36JA.js → orchestrator-6EGOOXQG.js} +5 -5
- package/dist/cli/chunks/{pipeline-MFQCW7JD.js → pipeline-WSLAIOYC.js} +2 -2
- package/dist/cli/chunks/{platform-DM6RQ3FM.js → platform-MNUN663B.js} +2 -2
- package/dist/cli/chunks/{plugin-CCTGDC55.js → plugin-PLDTG4A2.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-J4FXB63L.js → prime-radiant-advanced-wasm-B4UFONWB.js} +2 -2
- package/dist/cli/chunks/protocol-executor-22KKAYX2.js +2 -0
- package/dist/cli/chunks/{protocol-handler-7UOBNLET.js → protocol-handler-VAVLLAI2.js} +2 -2
- package/dist/cli/chunks/{prove-VAPGITFF.js → prove-WVNPDWUC.js} +2 -2
- package/dist/cli/chunks/{provider-manager-F6TLUJFW.js → provider-manager-VJF4D6AW.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-N7ZXOAEN.js +2 -0
- package/dist/cli/chunks/{quality-7LJQI3SB.js → quality-LTMHVQBG.js} +2 -2
- package/dist/cli/chunks/queen-coordinator-BC54OCHH.js +2 -0
- package/dist/cli/chunks/{real-embeddings-NHWAUSV3.js → real-embeddings-6ACQACTM.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-HQFQJJPU.js → roocode-installer-T5ZWC3SS.js} +2 -2
- package/dist/cli/chunks/router-YTQZRTIB.js +2 -0
- package/dist/cli/chunks/routing-feedback-AASAMEUY.js +2 -0
- package/dist/cli/chunks/{routing-handler-VH66WSPU.js → routing-handler-Y2O2I2HM.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-IPUWLJFU.js → ruvector-commands-F2V36B4W.js} +2 -2
- package/dist/cli/chunks/{rvf-dual-writer-KRFEM6JH.js → rvf-dual-writer-R6CNMPQD.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-adapter-SVCZ72IU.js → rvf-migration-adapter-IDVOB3LN.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-coordinator-FYBIF3SX.js → rvf-migration-coordinator-VM4AMFZG.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-VHIHJOPA.js +2 -0
- package/dist/cli/chunks/safe-db-NVEBL662.js +2 -0
- package/dist/cli/chunks/schedule-KVUFE56T.js +2 -0
- package/dist/cli/chunks/scheduler-6GRLJZ2A.js +2 -0
- package/dist/cli/chunks/{security-C2I6CG7B.js → security-WQ7YMR6M.js} +3 -3
- package/dist/cli/chunks/shared-rvf-adapter-XORIDF3Q.js +2 -0
- package/dist/cli/chunks/{shared-rvf-dual-writer-BPIFGN7I.js → shared-rvf-dual-writer-HYI64CBX.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-25TDMX6G.js +2 -0
- package/dist/cli/chunks/{status-handler-57UA6GNR.js → status-handler-BH2WCMPA.js} +2 -2
- package/dist/cli/chunks/{structural-health-KMHBG6FO.js → structural-health-XWX6FKVF.js} +2 -2
- package/dist/cli/chunks/{sync-53YM6U4S.js → sync-PRDGCHE2.js} +2 -2
- package/dist/cli/chunks/{task-handler-W2XPS5WW.js → task-handler-YFHFBMHO.js} +2 -2
- package/dist/cli/chunks/{task-handlers-BG4IAMBJ.js → task-handlers-4OQRADMG.js} +2 -2
- package/dist/cli/chunks/{test-QJBBVPL2.js → test-ZBTQ4Z66.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-Y4J6EY2K.js → test-scheduling-F47Y3KNO.js} +3 -3
- package/dist/cli/chunks/{token-bootstrap-3TKR3UIE.js → token-bootstrap-XOGAEQPG.js} +2 -2
- package/dist/cli/chunks/{token-usage-5FUNHHVZ.js → token-usage-2KZ7WE5J.js} +2 -2
- package/dist/cli/chunks/{transformers-KVPA35SR.js → transformers-KCJ7PWZ4.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-LTBBLY5U.js → tree-sitter-wasm-parser-H6DL2DFA.js} +2 -2
- package/dist/cli/chunks/{types-Y2BHPD6B.js → types-633TMIO3.js} +2 -2
- package/dist/cli/chunks/unified-memory-BTX45KY5.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-MMHMQ4CP.js +2 -0
- package/dist/cli/chunks/unified-persistence-GA7HKYZC.js +2 -0
- package/dist/cli/chunks/{upgrade-E4VAQZQR.js → upgrade-CH742GRF.js} +2 -2
- package/dist/cli/chunks/{validate-4ICDQCKJ.js → validate-44WH3CKE.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-AIEOQOUF.js → validate-swarm-W2A7CUM7.js} +2 -2
- package/dist/cli/chunks/{vibium-AF2K6YXR.js → vibium-B25MIEBK.js} +2 -2
- package/dist/cli/chunks/visual-security-HPF5HCYF.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-PM67K5SP.js → web-tree-sitter-B54K47HF.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-4MKUQ2KT.js → windsurf-installer-EWL7COTI.js} +2 -2
- package/dist/cli/chunks/{witness-chain-FLPF7CS6.js → witness-chain-DWNP7VR6.js} +2 -2
- package/dist/cli/chunks/witness-chain-LROQLFND.js +2 -0
- package/dist/cli/chunks/{workflow-DHTCI6QD.js → workflow-LT2J7U23.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-VFRKGG5Y.js +2 -0
- package/dist/cli/chunks/{wrappers-5K6UGI3T.js → wrappers-OAZ6MKXO.js} +2 -2
- package/dist/coordination/handlers/test-execution-handlers.d.ts +18 -0
- package/dist/coordination/handlers/test-execution-handlers.js +77 -9
- package/dist/domains/test-generation/generators/jest-vitest-generator.js +13 -3
- package/dist/domains/test-generation/interfaces.d.ts +12 -0
- package/dist/domains/test-generation/services/test-generator.js +5 -1
- package/dist/governance/continue-gate-integration.d.ts +13 -0
- package/dist/governance/continue-gate-integration.js +31 -8
- package/dist/mcp/bundle.js +333 -331
- package/dist/mcp/protocol-server.js +6 -1
- package/dist/mcp/tools/coverage-analysis/index.js +11 -2
- package/package.json +1 -1
- package/dist/cli/chunks/adapter-2BIT6BGH.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-B5G3RG4W.js +0 -2
- package/dist/cli/chunks/base-A3ZRMSIZ.js +0 -2
- package/dist/cli/chunks/browser-workflow-C6Z53ZH6.js +0 -2
- package/dist/cli/chunks/chunk-2ARCG4XJ.js +0 -2
- package/dist/cli/chunks/chunk-KTJWRVFR.js +0 -15
- package/dist/cli/chunks/client-B3QSCZSJ.js +0 -2
- package/dist/cli/chunks/cross-domain-router-OYBTXKCV.js +0 -2
- package/dist/cli/chunks/dream-R2F6L47W.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-TQPQE4OJ.js +0 -2
- package/dist/cli/chunks/hnsw-index-2X3NMTDU.js +0 -2
- package/dist/cli/chunks/impact-analyzer-B7GBDSA3.js +0 -2
- package/dist/cli/chunks/init-wizard-7N6MCER4.js +0 -2
- package/dist/cli/chunks/kernel-6CJ4FP5Z.js +0 -2
- package/dist/cli/chunks/knowledge-graph-4XYLO6ZW.js +0 -2
- package/dist/cli/chunks/load-test-UODCPBYF.js +0 -2
- package/dist/cli/chunks/memory-backend-PUPAE4QQ.js +0 -2
- package/dist/cli/chunks/protocol-executor-X3EYJINP.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-3RDWPSYG.js +0 -2
- package/dist/cli/chunks/queen-coordinator-XIQZIYAZ.js +0 -2
- package/dist/cli/chunks/router-AFEFPU2A.js +0 -2
- package/dist/cli/chunks/routing-feedback-AGYMQFMV.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-AFOWXCZH.js +0 -2
- package/dist/cli/chunks/safe-db-NNF5DE5T.js +0 -2
- package/dist/cli/chunks/schedule-HJUZSHEA.js +0 -2
- package/dist/cli/chunks/scheduler-DZ53RPJQ.js +0 -2
- package/dist/cli/chunks/shared-rvf-adapter-5UQSTUSR.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-27ESC5DX.js +0 -2
- package/dist/cli/chunks/unified-memory-O7GFUSD3.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-XBLROJEN.js +0 -2
- package/dist/cli/chunks/unified-persistence-YBHEAL2S.js +0 -2
- package/dist/cli/chunks/visual-security-4F7VYCAU.js +0 -2
- package/dist/cli/chunks/witness-chain-AXJ44BGW.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-UAFUPHD3.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,28 @@ All notable changes to the Agentic QE project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [3.9.18] - 2026-04-30
|
|
9
|
+
|
|
10
|
+
**Four MCP fixes shipped together: governance no longer blocks legitimate tool calls, generated jest tests now actually run, and coverage error messages tell you what really happened.** Also adds the `agentic-qe-fleet` Claude Code plugin (11 agents, 9 commands, 9 skills) for one-command install via `/plugin marketplace`.
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **`coverage_analyze_sublinear` and other domain MCP tools blocked by governance after 1–2 calls** — `continue-gate-integration.ts` was passing a synthetic `history.length * 500` token estimate to the guidance gate. The linear-regression slope detector saw slope = 500, threshold = 0.02, and emitted a `throttle` decision. The integration then mapped `throttle` to `shouldContinue: false`, surfacing as `Task blocked by governance: Budget acceleration detected (slope: 500.0000 > 0.02)` on legitimate first-time tool invocations. Root-cause fix: replaced the synthetic estimate with `totalTokensUsed: 0` and `budgetRemaining.tokens: MAX_SAFE_INTEGER` until real token telemetry is wired in. The coherence/uncertainty/rework checks still operate on real signals. `mapGuidanceDecision` was also corrected so `throttle` is treated as a soft slowdown hint (proceed with `throttleMs`), and only `pause`/`stop` block.
|
|
15
|
+
- **`test_generate_enhanced` with `framework: "jest"` produced tests that crashed at runtime** — the generator emitted `import { describe, it, expect, beforeEach } from 'jest';`, but the `'jest'` package is the CLI, not a runtime export. Tests-as-emitted failed with `Cannot find module 'jest'`. Fix: emit `from '@jest/globals'` for jest (modern jest 28+ runtime API) and `from 'vitest'` for vitest. Both the main analysis path and the stub fallback now produce framework-correct imports.
|
|
16
|
+
- **Generated test imports referenced `/tmp/aqe-temp-*` paths that never existed in the user's codebase** — when callers passed `sourceCode` without `filePath`, the handler wrote a temp file for analysis and the generator baked that throwaway path into emitted test imports. Fix: added `IGenerateTestsRequest.importPathOverrides` so the handler can tell the generator the logical import path (the user-supplied `filePath` when available, or `'./module-under-test'` placeholder + TODO comment when not). The temp file is also explicitly cleaned up via `fs.unlink` after generation.
|
|
17
|
+
- **`qe/coverage/gaps` error message misled callers about which input failed** — when an explicit `coverageFile` parsed to zero entries, the tool returned `"No coverage data found in '<target>'"` (templated with `target`, not `coverageFile`). Callers reasonably assumed the `coverageFile` parameter was being silently dropped. Fix: distinguish the two miss paths — empty `coverageFile` returns `"Coverage file '<path>' contains no usable coverage data..."`; autodiscovery miss returns `"No coverage data found by autodiscovery under target '<target>'..."`.
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- **`test_generate_enhanced` MCP schema now exposes `framework`, `filePath`, `coverageGoal`, `aiEnhancement`, and `detectAntiPatterns` parameters** — previously only `sourceCode`, `language`, and `testType` were declared, so `framework: jest` and other args were silently dropped at the schema validation layer even though the underlying handler accepted them.
|
|
22
|
+
- **`agentic-qe-fleet` Claude Code plugin** — a slim starter bundle of the AQE platform installable via `/plugin marketplace add ruvnet/agentic-qe`. Includes 11 specialized QE agents (model-routed: 6 on Opus for heavy reasoning, 5 on Sonnet for focused execution), 9 trust-tier-2/3 skills with scoped `allowed-tools` lists, 9 `/aqe-*` slash commands, and an auto-registered MCP server entry. Tier-1 (untested) skills are excluded from the bundle per AQE trust-tier policy.
|
|
23
|
+
- **`scripts/smoke-test-fixes.sh`** — end-to-end MCP smoke test covering all four fixes with proper exit-code handling (single sys.exit, no false negatives).
|
|
24
|
+
- **`scripts/plugin-load-test.sh`** — 14-check structural validation for the bundled plugin.
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
|
|
28
|
+
- **`IGenerateTestsRequest` interface gains `importPathOverrides?: Record<string, string>`** — public API extension. Existing callers continue to work; the field is opt-in and only consulted when present.
|
|
29
|
+
|
|
8
30
|
## [3.9.17] - 2026-04-27
|
|
9
31
|
|
|
10
32
|
**One-line fix that closes the routing learning loop.** The shipped `aqe init` template wired the UserPromptSubmit hook to `--task "$PROMPT"`, but Claude Code never exposed `$PROMPT` as an env var — every prompt routed as empty. The CLI now reads stdin event JSON, the templates drop the broken arg, and existing projects upgrade automatically on re-init.
|
package/README.md
CHANGED
|
@@ -52,6 +52,71 @@ After init, your coding agent can use AQE tools directly. For example in Claude
|
|
|
52
52
|
|
|
53
53
|
---
|
|
54
54
|
|
|
55
|
+
## Claude Code Plugin (Alternative Install)
|
|
56
|
+
|
|
57
|
+
If you only need a slim, scoped fleet inside Claude Code — without the full `aqe init` setup — install the **`agentic-qe-fleet`** plugin. It bundles 11 specialized QE agents, 9 slash commands, 9 skills, and auto-registers the MCP server.
|
|
58
|
+
|
|
59
|
+
### Install from a local checkout
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
git clone https://github.com/proffesor-for-testing/agentic-qe.git
|
|
63
|
+
claude --plugin-dir ./agentic-qe/plugins/agentic-qe-fleet
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Install from the marketplace
|
|
67
|
+
|
|
68
|
+
In any Claude Code session:
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
/plugin marketplace add proffesor-for-testing/agentic-qe
|
|
72
|
+
/plugin install agentic-qe-fleet
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### What you get
|
|
76
|
+
|
|
77
|
+
| Asset | Count | Notes |
|
|
78
|
+
|---|---|---|
|
|
79
|
+
| **Agents** (Task tool) | 11 | Model-routed: 6 on Opus (heavy reasoning), 5 on Sonnet (focused execution) |
|
|
80
|
+
| **Slash commands** | 9 | `/aqe-analyze`, `/aqe-execute`, `/aqe-generate`, `/aqe-optimize`, `/aqe-chaos`, `/aqe-fleet-status`, `/aqe-report`, `/aqe-benchmark`, `/aqe-costs` |
|
|
81
|
+
| **Skills** | 9 | All trust-tier 2 or 3 (validated/verified). Tier-1 untested skills excluded per policy. |
|
|
82
|
+
| **MCP server** | 1 | Auto-registers via `npx -y agentic-qe@latest mcp` — no separate `claude mcp add` |
|
|
83
|
+
|
|
84
|
+
**Bundled agents:** `qe-test-architect`, `qe-coverage-specialist`, `qe-flaky-hunter`, `qe-chaos-engineer`, `qe-fleet-commander`, `qe-quality-gate`, `qe-security-scanner`, `qe-performance-tester`, `qe-regression-analyzer`, `qe-tdd-specialist`, `qe-requirements-validator`.
|
|
85
|
+
|
|
86
|
+
**Bundled skills:** `qe-test-generation`, `qe-coverage-analysis`, `qe-test-execution`, `qe-chaos-resilience`, `qe-quality-assessment`, `chaos-engineering-resilience`, `mutation-testing`, `risk-based-testing`, `tdd-london-chicago`.
|
|
87
|
+
|
|
88
|
+
### Use it
|
|
89
|
+
|
|
90
|
+
After loading the plugin, the slash commands and agents are available immediately:
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
/aqe-fleet-status # health and metrics
|
|
94
|
+
/aqe-generate src/services/Auth.ts
|
|
95
|
+
/aqe-analyze src/ # coverage gap analysis
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Or invoke an agent through the Task tool:
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
"Use qe-test-architect to generate tests for src/services/PaymentService.ts"
|
|
102
|
+
"Use qe-flaky-hunter to find and stabilize flaky tests in tests/integration/"
|
|
103
|
+
"Use qe-chaos-engineer to inject network partitions into the order workflow"
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Plugin vs `aqe init` — which to use?
|
|
107
|
+
|
|
108
|
+
| | **Plugin** | **`aqe init`** |
|
|
109
|
+
|---|---|---|
|
|
110
|
+
| Setup | One slash command | Full project setup |
|
|
111
|
+
| Scope | 11 agents, 9 skills | 60 agents, 85 skills |
|
|
112
|
+
| Persistent learning DB | No (uses MCP server's) | Yes (`.agentic-qe/memory.db`) |
|
|
113
|
+
| Cross-platform support | Claude Code only | 11 platforms (Cursor, Copilot, Cline, etc.) |
|
|
114
|
+
| Use when | Quick start, single Claude Code project | Production team setup, multi-platform, full fleet |
|
|
115
|
+
|
|
116
|
+
You can run both — the plugin's MCP server uses the same `agentic-qe` package, so installing both gives you the full fleet via `aqe init` and the slash-command shortcuts via the plugin.
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
55
120
|
## Platform Support
|
|
56
121
|
|
|
57
122
|
AQE works with **11 coding agent platforms** through a single MCP server:
|
package/dist/cli/bundle.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
3
|
-
import{a as y}from"./chunks/chunk-
|
|
2
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.18");process.exit(0)}
|
|
3
|
+
import{a as y}from"./chunks/chunk-TPL3CBMS.js";import{a as f,c as A}from"./chunks/chunk-UNPTSPAO.js";import"./chunks/chunk-FKNYOKIK.js";A();import{Command as P}from"commander";import m from"chalk";function h(e,i,a,s){let l=e.command(i).description(a);if(s)for(let u of s)l.alias(u);return l.helpOption(!1),l.allowUnknownOption(!0),l.allowExcessArguments(!0),l}function w(e,i){let a=e.commands,s=a.indexOf(i);s>=0&&a.splice(s,1)}function o(e,i){let a=h(e,i.name,i.description,i.aliases);a.action(async()=>{try{let s=await i.factory();w(e,a),e.addCommand(s),await e.parseAsync(process.argv)}catch(s){console.error(`Failed to load command '${i.name}':`,s instanceof Error?s.message:s),process.exit(1)}})}function d(e,i,a,s,l,u){let g=h(e,i,a,u);g.action(async()=>{try{let p=await s();w(e,g),p.register(e,l),await e.parseAsync(process.argv)}catch(p){console.error(`Failed to load command '${i}':`,p instanceof Error?p.message:p),process.exit(1)}})}var S=["[UnifiedMemory]","[HybridBackend]","[UnifiedPersistence]","[PersistentSONAEngine]","[QueenGovernance]","[QueenCoordinator]","[Queen]","[QUEEN]","[DomainBreakerRegistry]","[RealEmbeddings]","[HNSWIndex]","[PatternStore]","[TestGenerationCoordinator]","[CodeIntelligence]","[ProductFactorsBridge]","[LearningOptimizationCoordinator]","[DreamEngine]","[DreamScheduler]","[SecurityCompliance]","[Providers]","[GNN]","[test-generation]","[test-execution]","[coverage-analysis]","[quality-assessment]","[defect-intelligence]","[requirements-validation]","[code-intelligence]","[security-compliance]","[contract-testing]","[visual-accessibility]","[chaos-resilience]","[learning-optimization]","[enterprise-integration]","[coordination]","[PatternLearnerService]","[RequirementsValidation]","[ParserRegistry]","[AdversarialDefense]","[ContinueGateIntegration]","[ContinueGate]","[SQLitePatternStore]","[TokenTracking]","[InfraHealing]","[ExperienceCapture]"],I=/^\[\d{2}:\d{2}:\d{2}\.\d{3}\]\s+\[/,b=console.log.bind(console);console.log=(...e)=>{let a=(typeof e[0]=="string"?e[0]:"").trimStart();if(S.some(s=>a.startsWith(s))||I.test(a)){process.stderr.write(e.map(String).join(" ")+`
|
|
4
4
|
`);return}b(...e)};console.info=(...e)=>{process.stderr.write(e.map(String).join(" ")+`
|
|
5
|
-
`)};var t={kernel:null,queen:null,router:null,workflowOrchestrator:null,scheduledWorkflows:new Map,persistentScheduler:null,initialized:!1};function C(e,i){let a=e.getDomainAPI("visual-accessibility");if(a?.registerWorkflowActions)try{a.registerWorkflowActions(i)}catch(l){console.error(m.yellow(` Warning: Could not register visual-accessibility workflow actions: ${f(l)}`))}let s=e.getDomainAPI("requirements-validation");if(s?.registerWorkflowActions)try{s.registerWorkflowActions(i)}catch(l){console.error(m.yellow(` Warning: Could not register requirements-validation workflow actions: ${f(l)}`))}}async function D(){let{QEKernelImpl:e}=await import("./chunks/kernel-
|
|
5
|
+
`)};var t={kernel:null,queen:null,router:null,workflowOrchestrator:null,scheduledWorkflows:new Map,persistentScheduler:null,initialized:!1};function C(e,i){let a=e.getDomainAPI("visual-accessibility");if(a?.registerWorkflowActions)try{a.registerWorkflowActions(i)}catch(l){console.error(m.yellow(` Warning: Could not register visual-accessibility workflow actions: ${f(l)}`))}let s=e.getDomainAPI("requirements-validation");if(s?.registerWorkflowActions)try{s.registerWorkflowActions(i)}catch(l){console.error(m.yellow(` Warning: Could not register requirements-validation workflow actions: ${f(l)}`))}}async function D(){let{QEKernelImpl:e}=await import("./chunks/kernel-AOUBGDXU.js"),{CrossDomainEventRouter:i}=await import("./chunks/cross-domain-router-SSBT32Q3.js"),{DefaultProtocolExecutor:a}=await import("./chunks/protocol-executor-22KKAYX2.js"),{WorkflowOrchestrator:s}=await import("./chunks/workflow-orchestrator-VFRKGG5Y.js"),{createQueenCoordinator:l}=await import("./chunks/queen-coordinator-BC54OCHH.js"),{createPersistentScheduler:u}=await import("./chunks/scheduler-6GRLJZ2A.js");t.kernel=new e({maxConcurrentAgents:15,memoryBackend:"sqlite",hnswEnabled:!0,lazyLoading:!0,enabledDomains:[...y]}),await t.kernel.initialize(),t.router=new i(t.kernel.eventBus),await t.router.initialize();let g=E=>t.kernel.getDomainAPI(E),p=new a(t.kernel.eventBus,t.kernel.memory,g);t.workflowOrchestrator=new s(t.kernel.eventBus,t.kernel.memory,t.kernel.coordinator),await t.workflowOrchestrator.initialize(),C(t.kernel,t.workflowOrchestrator),t.persistentScheduler=u(),t.queen=l(t.kernel,t.router,p,void 0),await t.queen.initialize(),t.initialized=!0}async function k(){if(t.initialized&&t.kernel&&t.queen)return!0;let e=await import("fs"),a=(await import("path")).resolve(".agentic-qe");return e.existsSync(a)?c():(console.error(m.red(`
|
|
6
6
|
Error: AQE system not initialized in this directory.`)),console.log(m.yellow("Run `aqe init` first to set up this project.\n")),!1)}async function c(){if(t.initialized&&t.kernel&&t.queen)return!0;process.stderr.write(m.gray("Auto-initializing v3 system...")+`
|
|
7
7
|
`);let e=3e4,i=new Promise((a,s)=>{setTimeout(()=>s(new Error("Initialization timeout after 30 seconds")),e)});try{return await Promise.race([D(),i]),process.stderr.write(m.green("System ready")+`
|
|
8
8
|
|
|
9
|
-
`),!0}catch(a){return a.message.includes("timeout")?(console.error(m.red("Initialization timed out after 30 seconds.")),console.log(m.yellow("Try running `aqe init` manually."))):(console.error(m.red("Failed to auto-initialize:"),a),console.log(m.yellow("Try running `aqe init` manually."))),!1}}async function r(e=0){try{t.workflowOrchestrator&&t.workflowOrchestrator.dispose().catch(()=>{}),t.queen&&t.queen.dispose().catch(()=>{}),t.router&&t.router.dispose().catch(()=>{}),t.kernel&&t.kernel.dispose().catch(()=>{})}catch{}process.exit(e)}var n=new P,v="3.9.
|
|
9
|
+
`),!0}catch(a){return a.message.includes("timeout")?(console.error(m.red("Initialization timed out after 30 seconds.")),console.log(m.yellow("Try running `aqe init` manually."))):(console.error(m.red("Failed to auto-initialize:"),a),console.log(m.yellow("Try running `aqe init` manually."))),!1}}async function r(e=0){try{t.workflowOrchestrator&&t.workflowOrchestrator.dispose().catch(()=>{}),t.queen&&t.queen.dispose().catch(()=>{}),t.router&&t.router.dispose().catch(()=>{}),t.kernel&&t.kernel.dispose().catch(()=>{})}catch{}process.exit(e)}var n=new P,v="3.9.18";n.name("aqe").description("Agentic QE - Domain-Driven Quality Engineering").version(v);d(n,"init","Initialize the AQE v3 system",()=>import("./chunks/init-handler-3MV32TKZ.js").then(e=>e.createInitHandler(r)),t);d(n,"status","Show system status",()=>import("./chunks/status-handler-BH2WCMPA.js").then(e=>e.createStatusHandler(r,k)),t);d(n,"health","Check system health",()=>import("./chunks/status-handler-BH2WCMPA.js").then(e=>e.createHealthHandler(r,k)),t);d(n,"task","Manage QE tasks",()=>import("./chunks/task-handler-YFHFBMHO.js").then(e=>e.createTaskHandler(r,c)),t);d(n,"agent","Manage QE agents",()=>import("./chunks/agent-handler-CXS6EE2V.js").then(e=>e.createAgentHandler(r,c)),t);d(n,"domain","Domain operations",()=>import("./chunks/domain-handler-USGF4CIG.js").then(e=>e.createDomainHandler(r,c)),t);d(n,"protocol","Execute coordination protocols",()=>import("./chunks/protocol-handler-VAVLLAI2.js").then(e=>e.createProtocolHandler(r,c)),t);d(n,"brain","Export, import, and inspect QE brain state",()=>import("./chunks/brain-handler-6N5WWZVA.js").then(e=>e.createBrainHandler(r,c)),t);d(n,"hypergraph","Query the code knowledge hypergraph",()=>import("./chunks/hypergraph-handler-EUS6MIYW.js").then(e=>e.createHypergraphHandler(r,c)),t,["hg"]);d(n,"heartbeat","Manage the token-free heartbeat scheduler",()=>import("./chunks/heartbeat-handler-Q44PCI7K.js").then(e=>e.createHeartbeatHandler(r)),t);d(n,"routing","View routing performance, economics, and accuracy",()=>import("./chunks/routing-handler-Y2O2I2HM.js").then(e=>e.createRoutingHandler(r)),t);o(n,{name:"workflow",description:"Manage QE workflows and pipelines (ADR-041)",factory:()=>import("./chunks/workflow-LT2J7U23.js").then(e=>e.createWorkflowCommand(t,r,c))});o(n,{name:"test",description:"Test generation, execution, scheduling, and load testing",factory:()=>import("./chunks/test-ZBTQ4Z66.js").then(e=>e.createTestCommand(t,r,c))});o(n,{name:"coverage",description:"Coverage analysis shortcut",factory:()=>import("./chunks/coverage-B7E545AJ.js").then(e=>e.createCoverageCommand(t,r,c))});o(n,{name:"quality",description:"Quality assessment shortcut",factory:()=>import("./chunks/quality-LTMHVQBG.js").then(e=>e.createQualityCommand(t,r,c))});o(n,{name:"security",description:"Security scanning and URL validation",factory:()=>import("./chunks/security-WQ7YMR6M.js").then(e=>e.createSecurityCommand(t,r,c))});o(n,{name:"code",description:"Code intelligence analysis",factory:()=>import("./chunks/code-3Z2HMS5I.js").then(e=>e.createCodeCommand(t,r,c))});o(n,{name:"completions",description:"Generate shell completions for aqe",factory:()=>import("./chunks/completions-EDCXRRJO.js").then(e=>e.createCompletionsCommand(r))});o(n,{name:"upgrade",description:"Detect optional native bindings and recommend install / flag changes",factory:()=>import("./chunks/upgrade-CH742GRF.js").then(e=>e.createUpgradeCommand(r))});o(n,{name:"fleet",description:"Fleet operations with multi-agent progress tracking",factory:()=>import("./chunks/fleet-37NGGRJI.js").then(e=>e.createFleetCommand(t,r,c,C))});o(n,{name:"validate",description:"Validation commands for skills and agents",factory:()=>import("./chunks/validate-swarm-W2A7CUM7.js").then(e=>e.createValidateSwarmCommand(t,r,c))});o(n,{name:"skill",description:"Skill validation and reporting (ADR-056)",factory:()=>import("./chunks/validate-44WH3CKE.js").then(e=>e.createValidateCommand(t,r,c))});o(n,{name:"eval",description:"Run skill evaluation suites in parallel",factory:()=>import("./chunks/eval-LHYXXWFK.js").then(e=>e.createEvalCommand())});o(n,{name:"ci",description:"CI/CD pipeline orchestration",factory:()=>import("./chunks/ci-LYAVZLM3.js").then(e=>e.createCICommand(t,r,c))});o(n,{name:"token-usage",description:"View and analyze token consumption metrics (ADR-042)",factory:()=>import("./chunks/token-usage-2KZ7WE5J.js").then(e=>e.createTokenUsageCommand())});o(n,{name:"llm",description:"LLM Router management (ADR-043)",factory:()=>import("./chunks/llm-router-Q2VQPOQ3.js").then(e=>e.createLLMRouterCommand())});o(n,{name:"sync",description:"Sync local learning data to cloud PostgreSQL",factory:()=>import("./chunks/sync-PRDGCHE2.js").then(e=>e.createSyncCommands())});o(n,{name:"hooks",description:"Self-learning QE hooks for pattern recognition and guidance",factory:()=>import("./chunks/hooks-MOBQSJLJ.js").then(e=>e.createHooksCommand())});o(n,{name:"learning",description:"AQE self-learning system management (standalone, no claude-flow required)",factory:()=>import("./chunks/learning-KNEBWLEZ.js").then(e=>e.createLearningCommand())});o(n,{name:"memory",description:"Memory store, retrieve, search, and delete operations",factory:()=>import("./chunks/memory-STPMUUAK.js").then(e=>e.createMemoryCommand(t,r,c))});o(n,{name:"mcp",description:"Start the MCP protocol server for Claude Code integration",factory:()=>import("./chunks/mcp-GTINFFUF.js").then(e=>e.createMcpCommand())});o(n,{name:"platform",description:"Manage coding agent platform configurations",factory:()=>import("./chunks/platform-MNUN663B.js").then(e=>e.createPlatformCommand())});o(n,{name:"prove",description:"Generate a verifiable Proof-of-Quality attestation",factory:()=>import("./chunks/prove-WVNPDWUC.js").then(e=>e.createProveCommand(t,r,c))});o(n,{name:"ruvector",description:"RuVector integration management",factory:()=>import("./chunks/ruvector-commands-F2V36B4W.js").then(e=>e.createRuVectorCommand())});o(n,{name:"audit",description:"Witness chain audit trail management",factory:()=>import("./chunks/audit-3NWGSPJW.js").then(e=>e.createAuditCommand(t,r,c))});o(n,{name:"pipeline",description:"Manage YAML deterministic pipelines (Imp-9)",factory:()=>import("./chunks/pipeline-WSLAIOYC.js").then(e=>e.createPipelineCommand(t,r,c))});o(n,{name:"plugin",description:"Manage external QE domain plugins",factory:()=>import("./chunks/plugin-PLDTG4A2.js").then(e=>e.createPluginCommand())});o(n,{name:"daemon",description:"Manage the QE Quality Daemon",factory:()=>import("./chunks/daemon-DVOHWXUR.js").then(e=>e.createDaemonCommand())});process.on("SIGINT",async()=>{console.log(m.yellow(`
|
|
10
10
|
|
|
11
11
|
Shutting down...`)),console.log(m.green(`Shutdown complete
|
|
12
12
|
`)),await r(0)});process.on("SIGTERM",async()=>{console.log(m.yellow(`
|
|
13
|
-
Received SIGTERM, shutting down gracefully...`)),await r(0)});async function z(){let{isVersionFastPath:e}=await import("./chunks/fast-paths-
|
|
13
|
+
Received SIGTERM, shutting down gracefully...`)),await r(0)});async function z(){let{isVersionFastPath:e}=await import("./chunks/fast-paths-UTK7BN63.js");e(process.argv)&&(console.log(v),process.exit(0));let{bootstrapTokenTracking:i}=await import("./chunks/token-bootstrap-XOGAEQPG.js");await i({enableOptimization:!0,enablePersistence:!0,verbose:process.env.AQE_VERBOSE==="true"}),await n.parseAsync(),await r(0)}z().catch(async e=>{console.error(m.red("Fatal error:"),e),await r(1)});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.18");process.exit(0)}
|
|
2
|
+
import{a,b,c}from"./chunk-BGSYFAEJ.js";import"./chunk-4ELLGWTS.js";import"./chunk-Z4YHL4JU.js";import"./chunk-6ZMQL3U6.js";import"./chunk-UNPTSPAO.js";import"./chunk-FKNYOKIK.js";export{a as AgentBoosterAdapter,b as createAgentBoosterAdapter,c as createAgentBoosterAdapterSync};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a as x}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.18");process.exit(0)}
|
|
2
|
+
import{a as x}from"./chunk-4XYQJ4LQ.js";import{c as f}from"./chunk-6KTF7QB3.js";import"./chunk-FKNYOKIK.js";x();import{createRequire as w}from"module";var S=f.create("agent-booster-wasm"),t={JavaScript:0,TypeScript:1,Python:2,Rust:3,Go:4,Java:5,C:6,Cpp:7},l={ExactReplace:0,FuzzyReplace:1,InsertAfter:2,InsertBefore:3,Append:4},v={0:"JavaScript",1:"TypeScript",2:"Python",3:"Rust",4:"Go",5:"Java",6:"C",7:"Cpp"},a=null,u=null,p=null;async function g(){if(a)return!0;if(p)return!1;try{if(a=w(import.meta.url)("./agent_booster_wasm.js"),!a)throw new Error("WASM module loaded but is null");return u=new a.AgentBoosterWasm,!0}catch(e){return p=e,console.warn("[AgentBoosterWASM] Failed to load WASM module:",e),!1}}function A(e){return{".js":t.JavaScript,".mjs":t.JavaScript,".cjs":t.JavaScript,".jsx":t.JavaScript,".ts":t.TypeScript,".tsx":t.TypeScript,".mts":t.TypeScript,".cts":t.TypeScript,".py":t.Python,".rs":t.Rust,".go":t.Go,".java":t.Java,".c":t.C,".h":t.C,".cpp":t.Cpp,".cc":t.Cpp,".cxx":t.Cpp,".hpp":t.Cpp}[e.toLowerCase()]??t.JavaScript}var M=[{name:"var-to-const",detect:(e,r)=>e.includes("var ")&&r.includes("const "),apply:(e,r)=>e.replace(/\bvar\s+/g,"const ")},{name:"var-to-let",detect:(e,r)=>e.includes("var ")&&r.includes("let "),apply:(e,r)=>e.replace(/\bvar\s+/g,"let ")},{name:"add-types-function",detect:(e,r)=>e.includes("function")&&!e.includes(":")&&r.includes(":"),apply:(e,r)=>r},{name:"async-wrapper",detect:(e,r)=>!e.includes("async")&&r.includes("async")&&r.includes("await"),apply:(e,r)=>r},{name:"try-catch-wrapper",detect:(e,r)=>!e.includes("try {")&&r.includes("try {"),apply:(e,r)=>r},{name:"null-check",detect:(e,r)=>!e.includes("if (!")&&!e.includes("if (!")&&(r.includes("if (!")||r.includes("?.")),apply:(e,r)=>r},{name:"test-assertion",detect:(e,r)=>e.includes("test(")&&!e.includes("expect(")&&r.includes("expect("),apply:(e,r)=>r}];function y(e,r){for(let n of M)if(n.detect(e,r))try{return{success:!0,code:n.apply(e,r),pattern:n.name}}catch(s){S.debug("Pattern transform failed, trying next",{pattern:n.name,error:s instanceof Error?s.message:String(s)});continue}return{success:!1,code:r}}async function b(e,r,n,s={}){let o=performance.now(),{confidenceThreshold:T=.5,allowFallback:d=!0}=s;if(!e.trim())return{success:!0,mergedCode:r,confidence:1,strategy:l.Append,syntaxValid:!0,source:"fallback",latencyMs:performance.now()-o};if(await g()&&u&&a)try{let c=a.WasmLanguage[v[n]],i=u.apply_edit(e,r,c);return{success:!0,mergedCode:i.merged_code,confidence:i.confidence,strategy:i.strategy,syntaxValid:i.syntax_valid,source:"wasm",latencyMs:performance.now()-o}}catch(c){let i=c;if(d){let m=y(e,r);if(m.success)return{success:!0,mergedCode:m.code,confidence:.7,strategy:l.FuzzyReplace,syntaxValid:!0,source:"pattern",latencyMs:performance.now()-o}}return{success:!1,mergedCode:r,confidence:0,strategy:l.Append,syntaxValid:!1,source:"fallback",latencyMs:performance.now()-o,error:i.message}}if(d){let c=y(e,r);return{success:c.success,mergedCode:c.code,confidence:c.success?.7:0,strategy:l.FuzzyReplace,syntaxValid:!0,source:"pattern",latencyMs:performance.now()-o}}return{success:!1,mergedCode:r,confidence:0,strategy:l.Append,syntaxValid:!1,source:"fallback",latencyMs:performance.now()-o,error:p?.message??"WASM not available"}}async function W(e,r={}){return Promise.all(e.map(({original:n,edit:s,language:o})=>b(n,s,o,r)))}async function C(){return g()}async function L(){return await g()&&a?a.AgentBoosterWasm.version():"unavailable"}async function R(){if(await g(),u&&a)try{u.apply_edit("function x() {}","function x() {}",a.WasmLanguage.JavaScript)}catch(e){console.debug("[AgentBoosterWASM] Warmup error:",e instanceof Error?e.message:e)}}var _={transform:b,batchTransform:W,isWasmAvailable:C,getVersion:L,warmup:R,Language:t,MergeStrategy:l,languageFromExtension:A};export{t as Language,l as MergeStrategy,W as batchTransform,_ as default,L as getVersion,C as isWasmAvailable,A as languageFromExtension,b as transform,R as warmup};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{b as p}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.18");process.exit(0)}
|
|
2
|
+
import{b as p}from"./chunk-VW7FKTFO.js";import{a as g}from"./chunk-ZHA5Z5V4.js";import"./chunk-6ZMQL3U6.js";import"./chunk-FKNYOKIK.js";import s from"chalk";var l=class{name="agent";description="Manage QE agents";cleanupAndExit;ensureInitialized;constructor(n,t){this.cleanupAndExit=n,this.ensureInitialized=t}register(n,t){let a=n.command("agent").description(this.description);a.command("list").description("List all agents").option("-d, --domain <domain>","Filter by domain").option("-s, --status <status>","Filter by status").action(async e=>{await this.executeList(e,t)}),a.command("spawn <domain>").description("Spawn an agent in a domain").option("-t, --type <type>","Agent type","worker").option("-c, --capabilities <caps>","Comma-separated capabilities","general").option("--no-progress","Disable progress indicator").action(async(e,o)=>{await this.executeSpawn(e,o,t)})}async executeList(n,t){if(await this.ensureInitialized())try{let a=n.domain?t.queen.getAgentsByDomain(n.domain):t.queen.listAllAgents();if(n.status&&(a=a.filter(e=>e.status===n.status)),console.log(s.blue(`
|
|
3
3
|
Agents (${a.length})
|
|
4
4
|
`)),a.length===0)console.log(s.gray(" No agents found"));else{let e=new Map;for(let i of a)e.has(i.domain)||e.set(i.domain,[]),e.get(i.domain).push(i);let o=Array.from(e.entries());for(let[i,m]of o){console.log(s.cyan(` ${i}:`));for(let r of m)console.log(` ${r.id}`),console.log(` Type: ${r.type}`),console.log(` Status: ${g(r.status)}`),r.startedAt&&console.log(s.gray(` Started: ${r.startedAt.toISOString()}`));console.log("")}}}catch(a){console.error(s.red(`
|
|
5
5
|
Failed to list agents:`),a),await this.cleanupAndExit(1)}}async executeSpawn(n,t,a){if(await this.ensureInitialized())try{let e=t.capabilities.split(",");console.log(s.blue(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.18");process.exit(0)}
|
|
2
|
+
import"./chunk-FKNYOKIK.js";import{existsSync as i,mkdirSync as d,unlinkSync as s,readdirSync as p,statSync as f}from"fs";import{join as o,basename as l}from"path";var v={branchDir:".agentic-qe/branches",defaultStrategy:"child-wins",orphanMaxAgeMs:36e5},g=class{config;parentAdapter;activeBranches=new Map;witnessChain=null;constructor(t,e){this.parentAdapter=t,this.config={...v,...e}}setWitnessChain(t){this.witnessChain=t}createBranch(t){if(this.activeBranches.has(t))throw new Error(`Branch already exists for agent ${t}`);i(this.config.branchDir)||d(this.config.branchDir,{recursive:!0});let e=o(this.config.branchDir,`${t}.rvf`),r=this.parentAdapter.path(),n=this.parentAdapter.derive(e),a={agentId:t,childPath:e,parentPath:r,childAdapter:n,createdAt:Date.now(),ingestLog:[]};return this.activeBranches.set(t,a),a}recordIngest(t,e){let r=this.activeBranches.get(t);if(r)for(let n of e)r.ingestLog.push({id:n.id,vector:n.vector})}async mergeBranch(t,e){let r=e??this.config.defaultStrategy,n=performance.now(),a=0;if(r==="child-wins"&&t.ingestLog.length>0)try{a=this.parentAdapter.ingest(t.ingestLog).accepted}catch(c){console.warn(`[AgentMemoryBranch] Merge replay failed for ${t.agentId}:`,c)}return this.witnessChain?.append("BRANCH_MERGE",{agentId:t.agentId,strategy:r,vectorsMerged:a,branchPath:t.childPath},`agent-${t.agentId}`),this.cleanupBranchFile(t),this.activeBranches.delete(t.agentId),{vectorsMerged:a,strategy:r,durationMs:performance.now()-n}}discardBranch(t){this.witnessChain?.append("BRANCH_DISCARD",{agentId:t.agentId,action:"discard",branchPath:t.childPath},`agent-${t.agentId}`),this.cleanupBranchFile(t),this.activeBranches.delete(t.agentId)}getBranch(t){return this.activeBranches.get(t)}getActiveBranches(){return Array.from(this.activeBranches.values())}listBranchFiles(){return i(this.config.branchDir)?p(this.config.branchDir).filter(e=>e.endsWith(".rvf")).map(e=>{let r=o(this.config.branchDir,e),n=f(r);return{agentId:l(e,".rvf"),path:r,sizeBytes:n.size,modifiedAt:n.mtime}}):[]}cleanupOrphans(t){let e=t??this.config.orphanMaxAgeMs,r=Date.now(),n=0;for(let a of this.listBranchFiles())if(r-a.modifiedAt.getTime()>e&&!this.activeBranches.has(a.agentId))try{s(a.path);let h=`${a.path}.idmap.json`;i(h)&&s(h),n++}catch{}return n}cleanupBranchFile(t){try{t.childAdapter.close()}catch{}try{i(t.childPath)&&s(t.childPath);let e=`${t.childPath}.idmap.json`;i(e)&&s(e)}catch{}}};export{g as AgentMemoryBranch};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.18");process.exit(0)}
|
|
2
|
+
import{a,b,c,d,e,f}from"./chunk-RHYGRUNU.js";import"./chunk-6IBFYVLK.js";import"./chunk-SQHM6WUF.js";import"./chunk-EZN7QMOZ.js";import"./chunk-JZTB35EQ.js";import"./chunk-VZO5I23B.js";import"./chunk-G2H4W7NN.js";import"./chunk-JMK5OCWL.js";import"./chunk-X2T4TI7D.js";import"./chunk-QW2RFI73.js";import"./chunk-BADBKGZE.js";import"./chunk-3GA7M5NK.js";import"./chunk-D7SS56EG.js";import"./chunk-RPT7HCMH.js";import"./chunk-AGPZVE6B.js";import"./chunk-4XYQJ4LQ.js";import"./chunk-6KTF7QB3.js";import"./chunk-6ZMQL3U6.js";import"./chunk-TPL3CBMS.js";import"./chunk-UNPTSPAO.js";import"./chunk-LVABI4OA.js";import"./chunk-UFGFV4BO.js";import"./chunk-MBGWDELE.js";import"./chunk-IS2PMHB5.js";import"./chunk-QGSELG75.js";import"./chunk-ZURHHRSA.js";import"./chunk-DOSDUAVZ.js";import"./chunk-TFUWIKGZ.js";import"./chunk-JBW2A2O6.js";import"./chunk-FTIHPDWV.js";import"./chunk-FKNYOKIK.js";export{b as AQELearningEngine,a as DEFAULT_ENGINE_CONFIG,c as DEFAULT_META_LEARNING_CONFIG,d as MetaLearningEngine,e as createAQELearningEngine,f as createDefaultLearningEngine};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{f as s,o as p}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.18");process.exit(0)}
|
|
2
|
+
import{f as s,o as p}from"./chunk-RPT7HCMH.js";import"./chunk-AGPZVE6B.js";import{d as c,e as u,f as h,g as m}from"./chunk-DQCWNCOT.js";import"./chunk-4XYQJ4LQ.js";import"./chunk-6KTF7QB3.js";import"./chunk-6ZMQL3U6.js";import"./chunk-UNPTSPAO.js";import"./chunk-UFGFV4BO.js";import{p as l,q as d}from"./chunk-MBGWDELE.js";import"./chunk-IS2PMHB5.js";import"./chunk-QGSELG75.js";import"./chunk-ZURHHRSA.js";import"./chunk-DOSDUAVZ.js";import"./chunk-TFUWIKGZ.js";import"./chunk-JBW2A2O6.js";import"./chunk-FTIHPDWV.js";import{g as f}from"./chunk-FKNYOKIK.js";import{Command as g}from"commander";import a from"chalk";p();import{existsSync as y}from"node:fs";import b from"node:path";function C(n,i){let t=[];t.push(a.bold("Witness Chain Audit Verification")),t.push("");let e=i?a.green("ENABLED"):a.yellow("DISABLED");t.push(` Feature Flag: ${e}`),t.push(` Chain Length: ${n.length} receipts`);let r=n.valid?a.green("VALID"):a.red("BROKEN");return t.push(` Integrity: ${r}`),n.length>0&&t.push(` Last Hash: ${n.lastHash.slice(0,16)}...`),!n.valid&&n.brokenAt>=0&&(t.push(""),t.push(a.red(` Break detected at index ${n.brokenAt}`)),t.push(a.red(` ${n.message}`))),t.push(""),t.join(`
|
|
3
3
|
`)}function x(){try{let n=s(),i=b.join(n,".agentic-qe","memory.db");if(!y(i))return null;let t=(d(),f(l)),e=new t(i),r=c(e),o=h(r);return e.close(),o}catch{return null}}async function A(n){let i=m(),e=(x()??u()).verifyChain(),r={featureEnabled:i,chainLength:e.length,integrity:e.valid,brokenAt:e.brokenAt,lastHash:e.lastHash,message:e.message};return n.format==="json"?console.log(JSON.stringify(r,null,2)):console.log(C(e,i)),r}function v(n,i,t){let e=new g("audit").description("Witness chain audit trail management");return e.command("verify").description("Verify witness chain integrity").option("-F, --format <format>","Output format (json|text)","text").action(async r=>{try{await A({format:r.format}),await i(0)}catch(o){console.error("Failed to verify witness chain:",o),await i(1)}}),e}export{v as createAuditCommand,C as formatVerificationText,A as handleAuditVerify};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.18");process.exit(0)}
|
|
2
|
+
import{a,b,c,d,e,f}from"./chunk-RI3NTZ2I.js";import"./chunk-XSLKR2DM.js";import"./chunk-RPT7HCMH.js";import"./chunk-AGPZVE6B.js";import"./chunk-4XYQJ4LQ.js";import"./chunk-6KTF7QB3.js";import"./chunk-6ZMQL3U6.js";import"./chunk-UNPTSPAO.js";import"./chunk-LVABI4OA.js";import"./chunk-UFGFV4BO.js";import"./chunk-MBGWDELE.js";import"./chunk-IS2PMHB5.js";import"./chunk-QGSELG75.js";import"./chunk-ZURHHRSA.js";import"./chunk-DOSDUAVZ.js";import"./chunk-TFUWIKGZ.js";import"./chunk-JBW2A2O6.js";import"./chunk-FTIHPDWV.js";import"./chunk-FKNYOKIK.js";export{f as MCPToolBase,e as defaultToolLogger,d as getMemoryBackend,b as getSharedMemoryBackend,a as registerRvfResetFn,c as resetSharedMemoryBackend};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,q as p}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.18");process.exit(0)}
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,q as p}from"./chunk-MBGWDELE.js";import"./chunk-FKNYOKIK.js";p();export{i as DotProductAttention,h as FlashAttention,k as HyperbolicAttention,l as LinearAttention,m as MoEAttention,j as MultiHeadAttention,b as RuvectorLayer,n as SonaEngine,c as TensorCompress,a as default,d as differentiableSearch,f as getCompressionLevel,e as hierarchicalForward,g as init,o as pipeline};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a as A,b as L,c as F,d as R,e as Y,f as T,g as P,h as C,i as j,j as X,k as V,l as ge,m as $,n as Z,o as ye,p as _,q as J,r as U,s as W}from"./chunk-63V33NAB.js";import{h as fe}from"./chunk-PEHHOJE6.js";import{a as me,b as ue,c as pe,d as k,f as We}from"./chunk-CPZUNBSQ.js";import"./chunk-B36RPXAQ.js";import"./chunk-V4DMYY6P.js";import"./chunk-2ARCG4XJ.js";import"./chunk-65Z6HMDA.js";import{b as x,d as Q}from"./chunk-6YFEWIL5.js";import"./chunk-DJXYFFGA.js";import{a as O,b as Ue}from"./chunk-LA565BGJ.js";import"./chunk-F5X3U57Y.js";import"./chunk-2K7GRX5U.js";import"./chunk-K44EQV74.js";import"./chunk-MER7IHAZ.js";import"./chunk-ARN2KDLJ.js";import"./chunk-USORP6QK.js";import"./chunk-B3M3JEFD.js";import"./chunk-QXOAFWWK.js";import"./chunk-XB4JRJU4.js";import B from"path";import o from"chalk";Ue();Q();import{existsSync as z,mkdirSync as ze,writeFileSync as He,readFileSync as ee}from"fs";import{join as E,resolve as ne}from"path";var Ke={rl_q_values:"includeQValues",dream_insights:"includeDreamInsights",dream_cycles:"includeDreamInsights",witness_chain:"includeWitnessChain",vectors:"includeVectors"};function Ge(e,n){let r=Ke[e.tableName];return!(r&&n[r]===!1)}var Qe=1e4;function Ye(e,n,r,t){if(!Ge(n,r))return Z(E(t,n.fileName),[]),{count:0,rows:[]};let[a,s]=n.domainColumn?$(r.domains,n.domainColumn):[void 0,[]];if(X(e,n.tableName,a,s)>=Qe){let d=n.blobColumns,c=d&&d.length>0?p=>T(p,d):void 0;return{count:ye(E(t,n.fileName),ge(e,n.tableName,a,s),c)}}let i=V(e,n.tableName,a,s);return n.blobColumns&&n.blobColumns.length>0&&(i=i.map(d=>T(d,n.blobColumns))),Z(E(t,n.fileName),i),{count:i.length,rows:i}}function be(e){let n=[];for(let r of R){let t=E(e,r.fileName);z(t)?n.push(C(ee(t,"utf-8"))):n.push(C(""))}return C(n.join(":"))}function he(e,n,r="memory.db"){let t=ne(n.outputPath);z(t)||ze(t,{recursive:!0});let a=0,s={},l=new Set;for(let u of R){let p=Ye(e,u,n,t);if(s[u.tableName]=p.count,a+=p.count,u.tableName==="qe_patterns"){if(p.rows)for(let f of p.rows)f.qe_domain&&l.add(f.qe_domain);else if(p.count>0){let[f,w]=u.domainColumn?$(n.domains,u.domainColumn):[void 0,[]],y=`SELECT DISTINCT qe_domain FROM qe_patterns ${f?`WHERE ${f} AND qe_domain IS NOT NULL`:"WHERE qe_domain IS NOT NULL"}`;try{let g=e.prepare(y).all(...w||[]);for(let v of g)l.add(v.qe_domain)}catch{}}}}let i=n.includeVectors!==!1?X(e,"vectors"):0,d=be(t),c={version:"3.0",exportedAt:new Date().toISOString(),sourceDb:r,stats:{patternCount:s.qe_patterns||0,vectorCount:i,qValueCount:s.rl_q_values||0,dreamInsightCount:s.dream_insights||0,witnessChainLength:s.witness_chain||0,totalRecords:a},domains:[...l].sort(),checksum:d,tableRecordCounts:s};return He(E(t,"manifest.json"),JSON.stringify(c,null,2),"utf-8"),c}var Xe=new Set(["qe_patterns","rl_q_values","dream_insights","witness_chain"]);function Ze(e){return e==="1.0"?R.filter(n=>Xe.has(n.tableName)):e==="3.0"?R:(console.warn(`[brain-import] Unknown manifest version '${e}'. Attempting full import \u2014 some files may be missing.`),R)}function we(e,n,r){let t=ne(n),a=E(t,"manifest.json");if(!z(a))throw new Error(`Manifest not found at ${a}`);let s=x(ee(a,"utf-8")),l=be(t);if(l!==s.checksum)throw new Error(`Checksum mismatch: expected ${s.checksum}, got ${l}. The export may have been tampered with or corrupted.`);let i=Ze(s.version);if(r.dryRun){let f=0;for(let w of i){let m=_(E(t,w.fileName),x);f+=m.length}return{imported:f,skipped:0,conflicts:0}}W(e);let d=0,c=0,u=0;return e.transaction(()=>{for(let f of i){let w=E(t,f.fileName),m=_(w,x);f.blobColumns&&f.blobColumns.length>0&&(m=m.map(y=>P(y,f.blobColumns)));for(let y of m){let g;if(f.dedupColumns&&f.dedupColumns.length>0)g=U(e,f.tableName,y,f.dedupColumns);else{let v=A[f.tableName]||"id",b=F[f.tableName],I=L[f.tableName];g=J(e,f.tableName,y,v,r.mergeStrategy,b,I)}d+=g.imported,c+=g.skipped,u+=g.conflicts}}})(),{imported:d,skipped:c,conflicts:u}}function ve(e){let n=ne(e),r=E(n,"manifest.json");if(!z(r))throw new Error(`Manifest not found at ${r}`);return x(ee(r,"utf-8"))}We();import{existsSync as H,statSync as en,unlinkSync as Re,writeFileSync as nn}from"fs";import{resolve as te}from"path";function Se(e,n,r="memory.db"){if(!k())throw new Error("@ruvector/rvf-node is not available. Install it or use --format jsonl instead.");let t=te(n.outputPath),a=n.dimension??384;H(t)&&Re(t);let s=`${t}.idmap.json`;H(s)&&Re(s);let l=me(t,a);try{let i={},d=new Set,c=0;for(let S of R){let[h,ce]=S.domainColumn?$(n.domains,S.domainColumn):[void 0,[]],D=V(e,S.tableName,h,ce);if(S.tableName==="qe_patterns")for(let q of D)q.qe_domain&&d.add(q.qe_domain);let G=Y[S.tableName];G&&G.length>0&&(D=D.map(q=>T(q,G))),i[S.tableName]=D,c+=D.length}let u=0,p=[];if(j(e,"qe_pattern_embeddings")){let S=e.prepare("SELECT pattern_id, embedding, dimension FROM qe_pattern_embeddings").all();for(let h of S)h.embedding&&h.dimension===a&&p.push({id:`pe:${h.pattern_id}`,vector:new Float32Array(h.embedding.buffer,h.embedding.byteOffset,a),metadata:{tableName:"qe_pattern_embeddings"}})}if(j(e,"captured_experiences")){let S=e.prepare("SELECT id, embedding, embedding_dimension, domain, quality FROM captured_experiences WHERE embedding IS NOT NULL").all();for(let h of S)h.embedding_dimension===a&&p.push({id:`exp:${h.id}`,vector:new Float32Array(h.embedding.buffer,h.embedding.byteOffset,a),metadata:{tableName:"captured_experiences",domain:h.domain,confidence:h.quality}})}if(j(e,"sona_patterns")){let S=e.prepare("SELECT id, state_embedding, domain, confidence FROM sona_patterns WHERE state_embedding IS NOT NULL").all();for(let h of S)h.state_embedding.byteLength/4===a&&p.push({id:`sona:${h.id}`,vector:new Float32Array(h.state_embedding.buffer,h.state_embedding.byteOffset,a),metadata:{tableName:"sona_patterns",domain:h.domain,confidence:h.confidence}})}p.length>0&&(u=l.ingest(p).accepted);let f={version:"3.0",format:"rvf",exportedAt:new Date().toISOString(),sourceDb:r,domains:[...d].sort(),tables:i},w=JSON.stringify(f),m=C(w),y=Buffer.from(w);l.embedKernel(y);let g=n.sign?l.sign(y)??void 0:void 0,v=g?n.signerKeyId??"default":void 0,b=l.fileId(),I=b?{fileId:b,parentId:l.parentId(),lineageDepth:l.lineageDepth()}:void 0,N=l.status(),M={version:"3.0",format:"rvf",exportedAt:f.exportedAt,sourceDb:r,stats:{patternCount:(i.qe_patterns||[]).length,embeddingCount:u,qValueCount:(i.rl_q_values||[]).length,dreamInsightCount:(i.dream_insights||[]).length,witnessChainLength:(i.witness_chain||[]).length,totalRecords:c},domains:f.domains,checksum:m,rvfStatus:{totalVectors:N.totalVectors,totalSegments:N.totalSegments,fileSizeBytes:N.fileSizeBytes},...g?{signature:g,signerKeyId:v}:{},...I?{lineage:I}:{}};if(g)try{l.freeze()}catch{}let Je=`${t}.manifest.json`;return nn(Je,JSON.stringify(M,null,2),"utf-8"),M}finally{l.close()}}var tn={patterns:"qe_patterns",qValues:"rl_q_values",dreamInsights:"dream_insights",witnessChain:"witness_chain"};function xe(e,n,r){if(!k())throw new Error("@ruvector/rvf-node is not available. Install it or use JSONL format.");let t=te(n);if(!H(t))throw new Error(`RVF file not found: ${t}`);let a=ue(t);try{let s=a.verifyWitness();if(!s.valid&&(s.totalEntries>0||s.errors.length>0)){let m=s.errors.length>0?s.errors.join("; "):"unknown integrity error";throw new Error(`RVF witness verification failed: ${m}`)}let l=a.extractKernel();if(!l||!l.image)throw new Error("No brain data found in RVF file (missing kernel segment)");let i;try{i=JSON.parse(l.image.toString("utf-8"))}catch(m){throw new Error(`Failed to parse brain kernel data as JSON: ${m instanceof Error?m.message:m}`)}if(r.dryRun){let m=0;if(i.tables)for(let y of Object.values(i.tables))m+=y?.length??0;else m=(i.patterns?.length??0)+(i.qValues?.length??0)+(i.dreamInsights?.length??0)+(i.witnessChain?.length??0);return{imported:m,skipped:0,conflicts:0,embeddingsRestored:0}}W(e);let d=0,c=0,u=0,p=0,f={};if(i.tables)Object.assign(f,i.tables);else for(let[m,y]of Object.entries(tn)){let g=i[m];Array.isArray(g)&&(f[y]=g)}if(e.transaction(()=>{for(let m of R){let y=f[m.tableName];if(!y||!Array.isArray(y))continue;let g=Y[m.tableName];if(g&&g.length>0){y=y.map(v=>P(v,g));for(let v of y)for(let b of g)v[b]instanceof Buffer&&p++}for(let v of y){let b;if(m.dedupColumns&&m.dedupColumns.length>0)b=U(e,m.tableName,v,m.dedupColumns);else{let I=A[m.tableName]||"id",N=F[m.tableName],M=L[m.tableName];b=J(e,m.tableName,v,I,r.mergeStrategy,N,M)}d+=b.imported,c+=b.skipped,u+=b.conflicts}}})(),u>0)try{a.compact()}catch{}return{imported:d,skipped:c,conflicts:u,embeddingsRestored:p}}finally{a.close()}}function K(e){if(!k())throw new Error("@ruvector/rvf-node is not available.");let n=te(e);if(!H(n))throw new Error(`RVF file not found: ${n}`);let r=pe(n);try{let t=r.extractKernel();if(!t||!t.image)throw new Error("No brain data found in RVF file");let a=t.image.toString("utf-8"),s;try{s=JSON.parse(a)}catch(w){throw new Error(`Failed to parse brain kernel data as JSON: ${w instanceof Error?w.message:w}`)}let l=r.status(),i=en(n).size,d=s.tables,c=d?d.qe_patterns?.length??0:s.patterns?.length??0,u=d?d.rl_q_values?.length??0:s.qValues?.length??0,p=d?d.dream_insights?.length??0:s.dreamInsights?.length??0,f=d?d.witness_chain?.length??0:s.witnessChain?.length??0;return{version:"3.0",format:"rvf",exportedAt:s.exportedAt??"unknown",sourceDb:s.sourceDb??"unknown",stats:{patternCount:c,embeddingCount:l.totalVectors,qValueCount:u,dreamInsightCount:p,witnessChainLength:f},domains:s.domains??[],checksum:C(a),rvfStatus:{totalVectors:l.totalVectors,totalSegments:l.totalSegments,fileSizeBytes:i}}}finally{r.close()}}function re(){return k()}Q();import{existsSync as ae,readFileSync as rn,statSync as on}from"fs";import{join as oe,resolve as Ce}from"path";function Ie(e,n,r={}){let t=Ce(e),a=Ce(n),s=Ee(t),l=Ee(a),i=Be(t,s),d=Be(a,l),c=s==="jsonl"&&l==="jsonl",u=ln({pathA:t,pathB:a,manifestA:i,manifestB:d,recordLevel:c,tableFilter:r.tableFilter,maxIdsPerBucket:r.maxIdsPerBucket??500}),p=new Set(i.domains),f=new Set(d.domains),w=i.domains.filter(b=>!f.has(b)),m=d.domains.filter(b=>!p.has(b)),y=i.checksum===d.checksum,g=i.version===d.version,v=y&&g&&u.every(b=>b.delta===0&&(b.added?.length??0)===0&&(b.removed?.length??0)===0&&(b.changed?.length??0)===0);return{pathA:t,pathB:a,formatA:s,formatB:l,manifestA:i,manifestB:d,checksumMatch:y,versionMatch:g,identical:v,recordLevel:c,tableDiffs:u,domainsOnlyInA:w,domainsOnlyInB:m}}function Ee(e){if(!ae(e))throw new Error(`Path not found: ${e}`);if(e.endsWith(".rvf"))return"rvf";if(on(e).isFile())throw new Error(`Unsupported brain export: ${e} (expected a .rvf file or a JSONL directory)`);return"jsonl"}function Be(e,n){return n==="rvf"?sn(e):an(e)}function an(e){let n=oe(e,"manifest.json");if(!ae(n))throw new Error(`Manifest not found at ${n}`);let r=x(rn(n,"utf-8"));return Oe(r,"jsonl")}function sn(e){let n=K(e);return Oe(n,"rvf")}function Oe(e,n){return{format:n,version:e.version??"unknown",exportedAt:e.exportedAt??"unknown",sourceDb:e.sourceDb??"unknown",checksum:e.checksum??"",totalRecords:e.stats?.totalRecords??0,domains:e.domains??[],tableRecordCounts:e.tableRecordCounts??{}}}function ln(e){let n=e.tableFilter?R.filter(t=>t.tableName===e.tableFilter):R;if(e.tableFilter&&n.length===0)throw new Error(`Unknown table: ${e.tableFilter}`);let r=[];for(let t of n){let a=e.manifestA.tableRecordCounts[t.tableName]??0,s=e.manifestB.tableRecordCounts[t.tableName]??0,l=s-a,i,d,c;if(e.recordLevel&&dn(t)){let u=cn(oe(e.pathA,t.fileName),oe(e.pathB,t.fileName),t,e.maxIdsPerBucket);i=u.added,d=u.removed,c=u.changed}r.push({tableName:t.tableName,countA:a,countB:s,delta:l,...i!==void 0?{added:i}:{},...d!==void 0?{removed:d}:{},...c!==void 0?{changed:c}:{}})}return r}function dn(e){return!0}function cn(e,n,r,t){let a=_e(e,r),s=_e(n,r),l=[],i=[],d=[];for(let[c,u]of a){let p=s.get(c);if(p===void 0)i.length<t&&i.push(c);else if(p!==u){if(r.dedupColumns&&r.dedupColumns.length>0)continue;d.length<t&&d.push(c)}}for(let c of s.keys())a.has(c)||l.length<t&&l.push(c);return l.sort(),i.sort(),d.sort(),{added:l,removed:i,changed:d}}function _e(e,n){let r=new Map;if(!ae(e))return r;let t=_(e,x);for(let a of t){let s=fn(a,n);if(s===void 0)continue;let l=mn(a);r.set(s,un(l))}return r}function fn(e,n){if(n.dedupColumns&&n.dedupColumns.length>0){let a=[];for(let s of n.dedupColumns){let l=e[s];if(l==null)return;a.push(String(l))}return a.join("")}let r=A[n.tableName]??"id",t=e[r];if(t!=null)return String(t)}function mn(e){let n=Object.keys(e).sort(),r={};for(let t of n)r[t]=e[t];return JSON.stringify(r)}function un(e){return C(e)}Q();import{existsSync as ie,statSync as pn}from"fs";import{join as Ae,resolve as gn}from"path";var yn=20,bn="qe_patterns";function Ne(e,n={}){let r=gn(e);vn(r);let t=n.table??bn,a=R.find(g=>g.tableName===t);if(!a)throw new Error(`Unknown table: ${t}`);let s=Ae(r,a.fileName);if(!ie(s))throw new Error(`Table file not found: ${a.fileName} (expected in ${r}). Was this export generated with --format jsonl?`);let l=_(s,x),i=a.domainColumn,d=Math.max(1,n.limit??yn),c=n.query?n.query.toLowerCase():void 0,u=n.domains&&n.domains.length>0?new Set(n.domains):void 0,p=n.since,f=n.until,w=n.patternType,m=0,y=[];for(let g of l)hn(g,{domainColumn:i,domains:u,patternType:w,since:p,until:f,queryLower:c})&&(m++,y.length<d&&y.push(wn(g,a.tableName,i)));return{table:t,inputPath:r,totalScanned:l.length,totalMatched:m,limit:d,hits:y,truncated:m>d}}function hn(e,n){if(n.domains){if(!n.domainColumn)return!1;let r=e[n.domainColumn];if(typeof r!="string"||!n.domains.has(r))return!1}if(n.patternType!==void 0&&e.pattern_type!==n.patternType)return!1;if(n.since!==void 0||n.until!==void 0){let r=De(e);if(r===void 0||n.since!==void 0&&r<n.since||n.until!==void 0&&r>n.until)return!1}if(n.queryLower!==void 0){let r=typeof e.name=="string"?e.name.toLowerCase():"",t=typeof e.description=="string"?e.description.toLowerCase():"";if(!r.includes(n.queryLower)&&!t.includes(n.queryLower))return!1}return!0}function De(e){for(let n of["updated_at","created_at","timestamp"]){let r=e[n];if(typeof r=="string"&&r.length>0)return r}}function wn(e,n,r){let t=(typeof e.id=="string"||typeof e.id=="number"?String(e.id):void 0)??`${n}:?`,a={name:typeof e.name=="string"?e.name:void 0,description:typeof e.description=="string"?e.description:void 0,domain:r&&typeof e[r]=="string"?e[r]:void 0,patternType:typeof e.pattern_type=="string"?e.pattern_type:void 0,confidence:typeof e.confidence=="number"?e.confidence:void 0,updatedAt:De(e)};return{id:t,display:a,row:e}}function vn(e){if(!ie(e))throw new Error(`Path not found: ${e}`);if(pn(e).isFile())throw e.endsWith(".rvf")?new Error("Brain search does not support RVF exports. Re-export with --format jsonl, or use `aqe brain info` for RVF summaries."):new Error(`Unsupported brain export: ${e} (expected a JSONL directory)`);let r=Ae(e,"manifest.json");if(!ie(r))throw new Error(`Manifest not found at ${r}. Is this a brain export directory?`)}function ke(e,n){if(!e.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='qe_patterns'").get())return{created:0,skipped:0};e.exec(`
|
|
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.18");process.exit(0)}
|
|
2
|
+
import{a as A,b as L,c as F,d as R,e as Y,f as T,g as P,h as C,i as j,j as X,k as V,l as ge,m as $,n as Z,o as ye,p as _,q as J,r as U,s as W}from"./chunk-F7XU7KZL.js";import{h as fe}from"./chunk-BADBKGZE.js";import{a as me,b as ue,c as pe,d as k,f as We}from"./chunk-3GA7M5NK.js";import"./chunk-RPT7HCMH.js";import"./chunk-AGPZVE6B.js";import"./chunk-4XYQJ4LQ.js";import"./chunk-6KTF7QB3.js";import{b as x,d as Q}from"./chunk-6ZMQL3U6.js";import"./chunk-UNPTSPAO.js";import{a as O,b as Ue}from"./chunk-UFGFV4BO.js";import"./chunk-MBGWDELE.js";import"./chunk-IS2PMHB5.js";import"./chunk-QGSELG75.js";import"./chunk-ZURHHRSA.js";import"./chunk-DOSDUAVZ.js";import"./chunk-TFUWIKGZ.js";import"./chunk-JBW2A2O6.js";import"./chunk-FTIHPDWV.js";import"./chunk-FKNYOKIK.js";import B from"path";import o from"chalk";Ue();Q();import{existsSync as z,mkdirSync as ze,writeFileSync as He,readFileSync as ee}from"fs";import{join as E,resolve as ne}from"path";var Ke={rl_q_values:"includeQValues",dream_insights:"includeDreamInsights",dream_cycles:"includeDreamInsights",witness_chain:"includeWitnessChain",vectors:"includeVectors"};function Ge(e,n){let r=Ke[e.tableName];return!(r&&n[r]===!1)}var Qe=1e4;function Ye(e,n,r,t){if(!Ge(n,r))return Z(E(t,n.fileName),[]),{count:0,rows:[]};let[a,s]=n.domainColumn?$(r.domains,n.domainColumn):[void 0,[]];if(X(e,n.tableName,a,s)>=Qe){let d=n.blobColumns,c=d&&d.length>0?p=>T(p,d):void 0;return{count:ye(E(t,n.fileName),ge(e,n.tableName,a,s),c)}}let i=V(e,n.tableName,a,s);return n.blobColumns&&n.blobColumns.length>0&&(i=i.map(d=>T(d,n.blobColumns))),Z(E(t,n.fileName),i),{count:i.length,rows:i}}function be(e){let n=[];for(let r of R){let t=E(e,r.fileName);z(t)?n.push(C(ee(t,"utf-8"))):n.push(C(""))}return C(n.join(":"))}function he(e,n,r="memory.db"){let t=ne(n.outputPath);z(t)||ze(t,{recursive:!0});let a=0,s={},l=new Set;for(let u of R){let p=Ye(e,u,n,t);if(s[u.tableName]=p.count,a+=p.count,u.tableName==="qe_patterns"){if(p.rows)for(let f of p.rows)f.qe_domain&&l.add(f.qe_domain);else if(p.count>0){let[f,w]=u.domainColumn?$(n.domains,u.domainColumn):[void 0,[]],y=`SELECT DISTINCT qe_domain FROM qe_patterns ${f?`WHERE ${f} AND qe_domain IS NOT NULL`:"WHERE qe_domain IS NOT NULL"}`;try{let g=e.prepare(y).all(...w||[]);for(let v of g)l.add(v.qe_domain)}catch{}}}}let i=n.includeVectors!==!1?X(e,"vectors"):0,d=be(t),c={version:"3.0",exportedAt:new Date().toISOString(),sourceDb:r,stats:{patternCount:s.qe_patterns||0,vectorCount:i,qValueCount:s.rl_q_values||0,dreamInsightCount:s.dream_insights||0,witnessChainLength:s.witness_chain||0,totalRecords:a},domains:[...l].sort(),checksum:d,tableRecordCounts:s};return He(E(t,"manifest.json"),JSON.stringify(c,null,2),"utf-8"),c}var Xe=new Set(["qe_patterns","rl_q_values","dream_insights","witness_chain"]);function Ze(e){return e==="1.0"?R.filter(n=>Xe.has(n.tableName)):e==="3.0"?R:(console.warn(`[brain-import] Unknown manifest version '${e}'. Attempting full import \u2014 some files may be missing.`),R)}function we(e,n,r){let t=ne(n),a=E(t,"manifest.json");if(!z(a))throw new Error(`Manifest not found at ${a}`);let s=x(ee(a,"utf-8")),l=be(t);if(l!==s.checksum)throw new Error(`Checksum mismatch: expected ${s.checksum}, got ${l}. The export may have been tampered with or corrupted.`);let i=Ze(s.version);if(r.dryRun){let f=0;for(let w of i){let m=_(E(t,w.fileName),x);f+=m.length}return{imported:f,skipped:0,conflicts:0}}W(e);let d=0,c=0,u=0;return e.transaction(()=>{for(let f of i){let w=E(t,f.fileName),m=_(w,x);f.blobColumns&&f.blobColumns.length>0&&(m=m.map(y=>P(y,f.blobColumns)));for(let y of m){let g;if(f.dedupColumns&&f.dedupColumns.length>0)g=U(e,f.tableName,y,f.dedupColumns);else{let v=A[f.tableName]||"id",b=F[f.tableName],I=L[f.tableName];g=J(e,f.tableName,y,v,r.mergeStrategy,b,I)}d+=g.imported,c+=g.skipped,u+=g.conflicts}}})(),{imported:d,skipped:c,conflicts:u}}function ve(e){let n=ne(e),r=E(n,"manifest.json");if(!z(r))throw new Error(`Manifest not found at ${r}`);return x(ee(r,"utf-8"))}We();import{existsSync as H,statSync as en,unlinkSync as Re,writeFileSync as nn}from"fs";import{resolve as te}from"path";function Se(e,n,r="memory.db"){if(!k())throw new Error("@ruvector/rvf-node is not available. Install it or use --format jsonl instead.");let t=te(n.outputPath),a=n.dimension??384;H(t)&&Re(t);let s=`${t}.idmap.json`;H(s)&&Re(s);let l=me(t,a);try{let i={},d=new Set,c=0;for(let S of R){let[h,ce]=S.domainColumn?$(n.domains,S.domainColumn):[void 0,[]],D=V(e,S.tableName,h,ce);if(S.tableName==="qe_patterns")for(let q of D)q.qe_domain&&d.add(q.qe_domain);let G=Y[S.tableName];G&&G.length>0&&(D=D.map(q=>T(q,G))),i[S.tableName]=D,c+=D.length}let u=0,p=[];if(j(e,"qe_pattern_embeddings")){let S=e.prepare("SELECT pattern_id, embedding, dimension FROM qe_pattern_embeddings").all();for(let h of S)h.embedding&&h.dimension===a&&p.push({id:`pe:${h.pattern_id}`,vector:new Float32Array(h.embedding.buffer,h.embedding.byteOffset,a),metadata:{tableName:"qe_pattern_embeddings"}})}if(j(e,"captured_experiences")){let S=e.prepare("SELECT id, embedding, embedding_dimension, domain, quality FROM captured_experiences WHERE embedding IS NOT NULL").all();for(let h of S)h.embedding_dimension===a&&p.push({id:`exp:${h.id}`,vector:new Float32Array(h.embedding.buffer,h.embedding.byteOffset,a),metadata:{tableName:"captured_experiences",domain:h.domain,confidence:h.quality}})}if(j(e,"sona_patterns")){let S=e.prepare("SELECT id, state_embedding, domain, confidence FROM sona_patterns WHERE state_embedding IS NOT NULL").all();for(let h of S)h.state_embedding.byteLength/4===a&&p.push({id:`sona:${h.id}`,vector:new Float32Array(h.state_embedding.buffer,h.state_embedding.byteOffset,a),metadata:{tableName:"sona_patterns",domain:h.domain,confidence:h.confidence}})}p.length>0&&(u=l.ingest(p).accepted);let f={version:"3.0",format:"rvf",exportedAt:new Date().toISOString(),sourceDb:r,domains:[...d].sort(),tables:i},w=JSON.stringify(f),m=C(w),y=Buffer.from(w);l.embedKernel(y);let g=n.sign?l.sign(y)??void 0:void 0,v=g?n.signerKeyId??"default":void 0,b=l.fileId(),I=b?{fileId:b,parentId:l.parentId(),lineageDepth:l.lineageDepth()}:void 0,N=l.status(),M={version:"3.0",format:"rvf",exportedAt:f.exportedAt,sourceDb:r,stats:{patternCount:(i.qe_patterns||[]).length,embeddingCount:u,qValueCount:(i.rl_q_values||[]).length,dreamInsightCount:(i.dream_insights||[]).length,witnessChainLength:(i.witness_chain||[]).length,totalRecords:c},domains:f.domains,checksum:m,rvfStatus:{totalVectors:N.totalVectors,totalSegments:N.totalSegments,fileSizeBytes:N.fileSizeBytes},...g?{signature:g,signerKeyId:v}:{},...I?{lineage:I}:{}};if(g)try{l.freeze()}catch{}let Je=`${t}.manifest.json`;return nn(Je,JSON.stringify(M,null,2),"utf-8"),M}finally{l.close()}}var tn={patterns:"qe_patterns",qValues:"rl_q_values",dreamInsights:"dream_insights",witnessChain:"witness_chain"};function xe(e,n,r){if(!k())throw new Error("@ruvector/rvf-node is not available. Install it or use JSONL format.");let t=te(n);if(!H(t))throw new Error(`RVF file not found: ${t}`);let a=ue(t);try{let s=a.verifyWitness();if(!s.valid&&(s.totalEntries>0||s.errors.length>0)){let m=s.errors.length>0?s.errors.join("; "):"unknown integrity error";throw new Error(`RVF witness verification failed: ${m}`)}let l=a.extractKernel();if(!l||!l.image)throw new Error("No brain data found in RVF file (missing kernel segment)");let i;try{i=JSON.parse(l.image.toString("utf-8"))}catch(m){throw new Error(`Failed to parse brain kernel data as JSON: ${m instanceof Error?m.message:m}`)}if(r.dryRun){let m=0;if(i.tables)for(let y of Object.values(i.tables))m+=y?.length??0;else m=(i.patterns?.length??0)+(i.qValues?.length??0)+(i.dreamInsights?.length??0)+(i.witnessChain?.length??0);return{imported:m,skipped:0,conflicts:0,embeddingsRestored:0}}W(e);let d=0,c=0,u=0,p=0,f={};if(i.tables)Object.assign(f,i.tables);else for(let[m,y]of Object.entries(tn)){let g=i[m];Array.isArray(g)&&(f[y]=g)}if(e.transaction(()=>{for(let m of R){let y=f[m.tableName];if(!y||!Array.isArray(y))continue;let g=Y[m.tableName];if(g&&g.length>0){y=y.map(v=>P(v,g));for(let v of y)for(let b of g)v[b]instanceof Buffer&&p++}for(let v of y){let b;if(m.dedupColumns&&m.dedupColumns.length>0)b=U(e,m.tableName,v,m.dedupColumns);else{let I=A[m.tableName]||"id",N=F[m.tableName],M=L[m.tableName];b=J(e,m.tableName,v,I,r.mergeStrategy,N,M)}d+=b.imported,c+=b.skipped,u+=b.conflicts}}})(),u>0)try{a.compact()}catch{}return{imported:d,skipped:c,conflicts:u,embeddingsRestored:p}}finally{a.close()}}function K(e){if(!k())throw new Error("@ruvector/rvf-node is not available.");let n=te(e);if(!H(n))throw new Error(`RVF file not found: ${n}`);let r=pe(n);try{let t=r.extractKernel();if(!t||!t.image)throw new Error("No brain data found in RVF file");let a=t.image.toString("utf-8"),s;try{s=JSON.parse(a)}catch(w){throw new Error(`Failed to parse brain kernel data as JSON: ${w instanceof Error?w.message:w}`)}let l=r.status(),i=en(n).size,d=s.tables,c=d?d.qe_patterns?.length??0:s.patterns?.length??0,u=d?d.rl_q_values?.length??0:s.qValues?.length??0,p=d?d.dream_insights?.length??0:s.dreamInsights?.length??0,f=d?d.witness_chain?.length??0:s.witnessChain?.length??0;return{version:"3.0",format:"rvf",exportedAt:s.exportedAt??"unknown",sourceDb:s.sourceDb??"unknown",stats:{patternCount:c,embeddingCount:l.totalVectors,qValueCount:u,dreamInsightCount:p,witnessChainLength:f},domains:s.domains??[],checksum:C(a),rvfStatus:{totalVectors:l.totalVectors,totalSegments:l.totalSegments,fileSizeBytes:i}}}finally{r.close()}}function re(){return k()}Q();import{existsSync as ae,readFileSync as rn,statSync as on}from"fs";import{join as oe,resolve as Ce}from"path";function Ie(e,n,r={}){let t=Ce(e),a=Ce(n),s=Ee(t),l=Ee(a),i=Be(t,s),d=Be(a,l),c=s==="jsonl"&&l==="jsonl",u=ln({pathA:t,pathB:a,manifestA:i,manifestB:d,recordLevel:c,tableFilter:r.tableFilter,maxIdsPerBucket:r.maxIdsPerBucket??500}),p=new Set(i.domains),f=new Set(d.domains),w=i.domains.filter(b=>!f.has(b)),m=d.domains.filter(b=>!p.has(b)),y=i.checksum===d.checksum,g=i.version===d.version,v=y&&g&&u.every(b=>b.delta===0&&(b.added?.length??0)===0&&(b.removed?.length??0)===0&&(b.changed?.length??0)===0);return{pathA:t,pathB:a,formatA:s,formatB:l,manifestA:i,manifestB:d,checksumMatch:y,versionMatch:g,identical:v,recordLevel:c,tableDiffs:u,domainsOnlyInA:w,domainsOnlyInB:m}}function Ee(e){if(!ae(e))throw new Error(`Path not found: ${e}`);if(e.endsWith(".rvf"))return"rvf";if(on(e).isFile())throw new Error(`Unsupported brain export: ${e} (expected a .rvf file or a JSONL directory)`);return"jsonl"}function Be(e,n){return n==="rvf"?sn(e):an(e)}function an(e){let n=oe(e,"manifest.json");if(!ae(n))throw new Error(`Manifest not found at ${n}`);let r=x(rn(n,"utf-8"));return Oe(r,"jsonl")}function sn(e){let n=K(e);return Oe(n,"rvf")}function Oe(e,n){return{format:n,version:e.version??"unknown",exportedAt:e.exportedAt??"unknown",sourceDb:e.sourceDb??"unknown",checksum:e.checksum??"",totalRecords:e.stats?.totalRecords??0,domains:e.domains??[],tableRecordCounts:e.tableRecordCounts??{}}}function ln(e){let n=e.tableFilter?R.filter(t=>t.tableName===e.tableFilter):R;if(e.tableFilter&&n.length===0)throw new Error(`Unknown table: ${e.tableFilter}`);let r=[];for(let t of n){let a=e.manifestA.tableRecordCounts[t.tableName]??0,s=e.manifestB.tableRecordCounts[t.tableName]??0,l=s-a,i,d,c;if(e.recordLevel&&dn(t)){let u=cn(oe(e.pathA,t.fileName),oe(e.pathB,t.fileName),t,e.maxIdsPerBucket);i=u.added,d=u.removed,c=u.changed}r.push({tableName:t.tableName,countA:a,countB:s,delta:l,...i!==void 0?{added:i}:{},...d!==void 0?{removed:d}:{},...c!==void 0?{changed:c}:{}})}return r}function dn(e){return!0}function cn(e,n,r,t){let a=_e(e,r),s=_e(n,r),l=[],i=[],d=[];for(let[c,u]of a){let p=s.get(c);if(p===void 0)i.length<t&&i.push(c);else if(p!==u){if(r.dedupColumns&&r.dedupColumns.length>0)continue;d.length<t&&d.push(c)}}for(let c of s.keys())a.has(c)||l.length<t&&l.push(c);return l.sort(),i.sort(),d.sort(),{added:l,removed:i,changed:d}}function _e(e,n){let r=new Map;if(!ae(e))return r;let t=_(e,x);for(let a of t){let s=fn(a,n);if(s===void 0)continue;let l=mn(a);r.set(s,un(l))}return r}function fn(e,n){if(n.dedupColumns&&n.dedupColumns.length>0){let a=[];for(let s of n.dedupColumns){let l=e[s];if(l==null)return;a.push(String(l))}return a.join("")}let r=A[n.tableName]??"id",t=e[r];if(t!=null)return String(t)}function mn(e){let n=Object.keys(e).sort(),r={};for(let t of n)r[t]=e[t];return JSON.stringify(r)}function un(e){return C(e)}Q();import{existsSync as ie,statSync as pn}from"fs";import{join as Ae,resolve as gn}from"path";var yn=20,bn="qe_patterns";function Ne(e,n={}){let r=gn(e);vn(r);let t=n.table??bn,a=R.find(g=>g.tableName===t);if(!a)throw new Error(`Unknown table: ${t}`);let s=Ae(r,a.fileName);if(!ie(s))throw new Error(`Table file not found: ${a.fileName} (expected in ${r}). Was this export generated with --format jsonl?`);let l=_(s,x),i=a.domainColumn,d=Math.max(1,n.limit??yn),c=n.query?n.query.toLowerCase():void 0,u=n.domains&&n.domains.length>0?new Set(n.domains):void 0,p=n.since,f=n.until,w=n.patternType,m=0,y=[];for(let g of l)hn(g,{domainColumn:i,domains:u,patternType:w,since:p,until:f,queryLower:c})&&(m++,y.length<d&&y.push(wn(g,a.tableName,i)));return{table:t,inputPath:r,totalScanned:l.length,totalMatched:m,limit:d,hits:y,truncated:m>d}}function hn(e,n){if(n.domains){if(!n.domainColumn)return!1;let r=e[n.domainColumn];if(typeof r!="string"||!n.domains.has(r))return!1}if(n.patternType!==void 0&&e.pattern_type!==n.patternType)return!1;if(n.since!==void 0||n.until!==void 0){let r=De(e);if(r===void 0||n.since!==void 0&&r<n.since||n.until!==void 0&&r>n.until)return!1}if(n.queryLower!==void 0){let r=typeof e.name=="string"?e.name.toLowerCase():"",t=typeof e.description=="string"?e.description.toLowerCase():"";if(!r.includes(n.queryLower)&&!t.includes(n.queryLower))return!1}return!0}function De(e){for(let n of["updated_at","created_at","timestamp"]){let r=e[n];if(typeof r=="string"&&r.length>0)return r}}function wn(e,n,r){let t=(typeof e.id=="string"||typeof e.id=="number"?String(e.id):void 0)??`${n}:?`,a={name:typeof e.name=="string"?e.name:void 0,description:typeof e.description=="string"?e.description:void 0,domain:r&&typeof e[r]=="string"?e[r]:void 0,patternType:typeof e.pattern_type=="string"?e.pattern_type:void 0,confidence:typeof e.confidence=="number"?e.confidence:void 0,updatedAt:De(e)};return{id:t,display:a,row:e}}function vn(e){if(!ie(e))throw new Error(`Path not found: ${e}`);if(pn(e).isFile())throw e.endsWith(".rvf")?new Error("Brain search does not support RVF exports. Re-export with --format jsonl, or use `aqe brain info` for RVF summaries."):new Error(`Unsupported brain export: ${e} (expected a JSONL directory)`);let r=Ae(e,"manifest.json");if(!ie(r))throw new Error(`Manifest not found at ${r}. Is this a brain export directory?`)}function ke(e,n){if(!e.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='qe_patterns'").get())return{created:0,skipped:0};e.exec(`
|
|
3
3
|
CREATE TEMP TABLE IF NOT EXISTS _covered_patterns (
|
|
4
4
|
pattern_id TEXT PRIMARY KEY
|
|
5
5
|
)
|
|
@@ -74,7 +74,7 @@ Examples:
|
|
|
74
74
|
aqe brain diff ./brain-a ./brain-b --verbose
|
|
75
75
|
aqe brain search -i ./brain-export --query oauth --domain test-generation
|
|
76
76
|
aqe brain search -i ./brain-export --since 2026-03-01 --limit 50 --json
|
|
77
|
-
`}};async function se(e){if(e)return e;let{findProjectRoot:n}=await import("./unified-memory-
|
|
77
|
+
`}};async function se(e){if(e)return e;let{findProjectRoot:n}=await import("./unified-memory-BTX45KY5.js");return B.join(n(),".agentic-qe","memory.db")}function je(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Sn(e){let n=Number.parseInt(e,10);return!Number.isFinite(n)||n<1?20:n}function xn(e){if(e===void 0)return;let n=Array.isArray(e)?e:[e],r=[];for(let t of n)for(let a of t.split(",")){let s=a.trim();s&&r.push(s)}return r.length>0?r:void 0}function Cn(e,n){console.log(o.blue(`
|
|
78
78
|
Brain Diff
|
|
79
79
|
`)),console.log(` A: ${o.cyan(e.pathA)} (${e.formatA})`),console.log(` B: ${o.cyan(e.pathB)} (${e.formatB})`),console.log(` Versions: ${o.cyan(e.manifestA.version)} \u2192 ${o.cyan(e.manifestB.version)}`+(e.versionMatch?o.gray(" (match)"):o.yellow(" (differ)"))),console.log(` Checksums: ${o.gray(e.manifestA.checksum.slice(0,12))}\u2026 \u2192 ${o.gray(e.manifestB.checksum.slice(0,12))}\u2026`+(e.checksumMatch?o.gray(" (match)"):o.yellow(" (differ)"))),console.log(` Exported: ${o.gray(e.manifestA.exportedAt)} \u2192 ${o.gray(e.manifestB.exportedAt)}`),console.log(` Records: ${o.cyan(e.manifestA.totalRecords)} \u2192 ${o.cyan(e.manifestB.totalRecords)} `+Ve(e.manifestB.totalRecords-e.manifestA.totalRecords)),(e.domainsOnlyInA.length>0||e.domainsOnlyInB.length>0)&&(console.log(o.blue(`
|
|
80
80
|
Domains:`)),e.domainsOnlyInA.length>0&&console.log(` Only in A: ${o.yellow(e.domainsOnlyInA.join(", "))}`),e.domainsOnlyInB.length>0&&console.log(` Only in B: ${o.yellow(e.domainsOnlyInB.join(", "))}`)),e.recordLevel||console.log(o.gray(`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.18");process.exit(0)}
|
|
2
|
+
import"./chunk-FKNYOKIK.js";var f=class{language;constructor(e="typescript"){this.language=e}enumerate(e,s){let r=[],n=e.split(`
|
|
3
3
|
`),l=!1;for(let i=0;i<n.length;i++){let d=n[i],t=d.trim(),c=i+1,u=d.length-d.trimStart().length+1;if(l){t.includes("*/")&&(l=!1);continue}if(t.startsWith("/*")){l=!t.includes("*/");continue}if(t.startsWith("//"))continue;if(/^\s*if\s*\(/.test(d)&&(this.findMatchingElse(n,i)||r.push({file:s,line:c,column:u,language:this.language,construct:"if-without-else",triggerCondition:"when condition is false",currentHandling:"falls through \u2014 no else branch",suggestedGuard:"Add else branch or document why falsy path is safe",severity:"medium"})),/^\s*switch\s*\(/.test(d)){let a=this.extractBlock(n,i);if(a&&!a.includes("default:")&&!a.includes("default :")&&r.push({file:s,line:c,column:u,language:this.language,construct:"switch-no-default",triggerCondition:"when value matches no case",currentHandling:"falls through \u2014 no default case",suggestedGuard:"Add default case with error handling or exhaustive check",severity:"high"}),a){let g=a.match(/case\s+[^:]+:/g)||[],h=a.match(/\b(break|return|throw|continue)\b/g)||[];g.length>0&&h.length<g.length&&r.push({file:s,line:c,column:u,language:this.language,construct:"switch-missing-break",triggerCondition:"when case falls through to next case",currentHandling:"fall-through \u2014 may execute unintended cases",suggestedGuard:"Add break/return to each case or add explicit // falls through comment",severity:"medium"})}}if(/\bcatch\s*\(/.test(t)||/\bcatch\s*\{/.test(t)){let a=this.extractBlock(n,i);if(a!==null){let g=a.replace(/[{}]/g,"").trim();(g.length===0||/^\s*\/\//.test(g))&&r.push({file:s,line:c,column:u,language:this.language,construct:"try-empty-catch",triggerCondition:"when exception is thrown",currentHandling:"exception silently swallowed",suggestedGuard:"Log the error or rethrow with context",severity:"high"})}}if(/\btry\s*\{/.test(t)&&this.extractBlock(n,i)&&(n.slice(i,Math.min(i+30,n.length)).join(`
|
|
4
4
|
`).includes("finally")||r.push({file:s,line:c,column:u,language:this.language,construct:"try-no-finally",triggerCondition:"when cleanup is needed regardless of success/failure",currentHandling:"no finally block \u2014 cleanup may be skipped on exception",suggestedGuard:"Add finally block for resource cleanup if applicable",severity:"low"})),t.includes("?.")){let a=t.match(/(\w+(?:\.\w+)*)\?\./g)||[];for(let g of a)if(!t.includes("??")&&!t.includes("|| ")&&!t.includes("if")){r.push({file:s,line:c,column:u,language:this.language,construct:"optional-chaining-null-path",triggerCondition:`when ${g.replace("?.","")} is null/undefined`,currentHandling:"returns undefined \u2014 may propagate",suggestedGuard:"Add ?? fallback or explicit null check",severity:"low"});break}}if(t.includes("??")&&!t.includes("?.")&&r.push({file:s,line:c,column:u,language:this.language,construct:"nullish-coalescing-fallback",triggerCondition:"when left side is null/undefined",currentHandling:"uses fallback value",suggestedGuard:"Verify fallback value is appropriate for all null cases",severity:"low"}),/\.\s*then\s*\(/.test(t)&&!t.includes(".catch")&&!t.includes("await")){let a=n.slice(i,Math.min(i+5,n.length)).join(" ");!a.includes(".catch")&&!a.includes("try")&&r.push({file:s,line:c,column:u,language:this.language,construct:"promise-no-catch",triggerCondition:"when promise rejects",currentHandling:"unhandled rejection \u2014 may crash process",suggestedGuard:"Add .catch() handler or use try/catch with await",severity:"high"})}let p=["map","filter","reduce","forEach","find","some","every","flatMap"];for(let a of p)if(new RegExp(`\\.${a}\\s*\\(`).test(t)){let h=n.slice(Math.max(0,i-3),i).join(" ");if(!h.includes(".length")&&!h.includes("if (")&&!h.includes("?.")){r.push({file:s,line:c,column:u,language:this.language,construct:"array-callback-empty",triggerCondition:`when array is empty before .${a}()`,currentHandling:a==="reduce"?"may throw without initial value":"returns empty result \u2014 may cause downstream issues",suggestedGuard:a==="reduce"?"Provide initial value or check array length":"Check array length or handle empty result",severity:a==="reduce"?"high":"low"});break}}/\|\|\s*['"`\d]/.test(t)&&!t.includes("??")&&r.push({file:s,line:c,column:u,language:this.language,construct:"logical-or-falsy",triggerCondition:'when left side is falsy (0, "", false, null, undefined)',currentHandling:'uses fallback \u2014 may unintentionally override 0, "", or false',suggestedGuard:"Use ?? instead of || if only null/undefined should trigger fallback",severity:"medium"}),/&&\s*\w+\s*\(/.test(t)&&!t.includes("if")&&!t.includes("while")&&r.push({file:s,line:c,column:u,language:this.language,construct:"logical-and-short-circuit",triggerCondition:"when left side is falsy \u2014 right side never executes",currentHandling:"short-circuits \u2014 function call skipped silently",suggestedGuard:"Use explicit if-statement for clarity when side effects matter",severity:"low"}),(t.match(/\?/g)||[]).length>=2&&t.includes(":")&&r.push({file:s,line:c,column:u,language:this.language,construct:"ternary-complex",triggerCondition:"when nested ternary conditions interact",currentHandling:"nested ternary \u2014 hard to read and maintain",suggestedGuard:"Refactor to if/else or switch for readability",severity:"medium"}),(/\btypeof\s+\w+\s*===?\s*['"]/.test(t)||/\binstanceof\b/.test(t))&&!t.includes("else")&&!this.findMatchingElse(n,i)&&r.push({file:s,line:c,column:u,language:this.language,construct:"type-guard-unhandled",triggerCondition:"when value does not match the guarded type",currentHandling:"unguarded type path \u2014 may cause runtime type errors",suggestedGuard:"Add else branch or exhaustive type checking",severity:"medium"})}return r}findMatchingElse(e,s){let r={depth:0};for(let n=s;n<Math.min(s+30,e.length);n++){let l=e[n];for(let i of l)i==="{"&&r.depth++,i==="}"&&r.depth--;if(r.depth===0&&n>s){if((e[n+1]?.trim()||"").startsWith("else")||e[n].trim().endsWith("else")||e[n].trim().endsWith("else {")||e[n].includes("} else"))return!0;break}}return!1}extractBlock(e,s){let r=0,n=!1,l=[];for(let i=s;i<Math.min(s+50,e.length);i++){let d=e[i];for(let t of d)t==="{"&&(r++,n=!0),t==="}"&&r--;if(n&&(l.push(d),r===0))return l.join(`
|
|
5
5
|
`)}return null}};function y(o,e,s){let r=Date.now(),n=s||(e.endsWith(".ts")||e.endsWith(".tsx")?"typescript":"javascript"),i=new f(n).enumerate(o,e);return{file:e,language:n,branches:i,totalConstructs:i.length,unhandledCount:i.length,duration:Date.now()-r}}function b(o){let e=[];if(e.push(`# Branch Enumeration Report: ${o.file}`),e.push(""),e.push(`**Language**: ${o.language} | **Branches**: ${o.unhandledCount} | **Duration**: ${o.duration}ms`),e.push(""),o.branches.length===0)return e.push("No unhandled branches detected."),e.join(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a as p}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.18");process.exit(0)}
|
|
2
|
+
import{a as p}from"./chunk-P6HIDCTQ.js";import"./chunk-FKNYOKIK.js";import{readFile as m,readdir as k}from"fs/promises";import{join as c,basename as y}from"path";import{parse as d}from"yaml";var l=class{templatesDir;cache=new Map;constructor(r){this.templatesDir=r||c(__dirname,"templates")}async load(r){if(this.cache.has(r))return this.cache.get(r);try{let e=c(this.templatesDir,`${r}.yaml`),n=await m(e,"utf-8"),o=d(n),i=await this.validate(o);if(!i.valid)throw new Error(`Invalid workflow template ${r}:
|
|
3
3
|
${i.errors.join(`
|
|
4
4
|
`)}`);return this.cache.set(r,o),o}catch(e){throw e.code==="ENOENT"?new Error(`Workflow template not found: ${r}`):e}}async list(){try{return(await k(this.templatesDir)).filter(e=>e.endsWith(".yaml")||e.endsWith(".yml")).map(e=>y(e,e.endsWith(".yaml")?".yaml":".yml")).sort()}catch(r){if(r.code==="ENOENT")return[];throw r}}async validate(r){let e=[],n=[];if(r.name||e.push("Workflow must have a name"),r.version||e.push("Workflow must have a version"),r.description||n.push("Workflow should have a description"),Array.isArray(r.variables)?r.variables.forEach((o,i)=>{o.name||e.push(`Variable at index ${i} must have a name`),o.type||e.push(`Variable ${o.name} must have a type`),o.required===void 0&&n.push(`Variable ${o.name} should specify if it's required`)}):e.push("Workflow must have a variables array"),!Array.isArray(r.steps))e.push("Workflow must have a steps array");else if(r.steps.length===0)e.push("Workflow must have at least one step");else{r.steps.forEach((t,s)=>{t.name||e.push(`Step at index ${s} must have a name`),t.action||e.push(`Step ${t.name||s} must have an action`),(!t.config||typeof t.config!="object")&&e.push(`Step ${t.name||s} must have a config object`),t.assertions&&Array.isArray(t.assertions)&&t.assertions.forEach((f,u)=>{f.condition||e.push(`Assertion ${u} in step ${t.name||s} must have a condition`),f.message||n.push(`Assertion ${u} in step ${t.name||s} should have a message`)})});let o=r.steps.map(t=>t.name),i=o.filter((t,s)=>o.indexOf(t)!==s);i.length>0&&e.push(`Duplicate step names found: ${i.join(", ")}`)}return{valid:e.length===0,errors:e,warnings:n}}async createContext(r,e){let n=await this.load(r),o=n.variables.filter(t=>t.required&&!(t.name in e)).map(t=>t.name);if(o.length>0)throw new Error(`Missing required variables: ${o.join(", ")}`);let i={};return n.variables.forEach(t=>{t.name in e?i[t.name]=e[t.name]:"default"in t&&(i[t.name]=t.default)}),{variables:i,results:new Map,metadata:{startTime:Date.now(),workflow:n.name,templateName:r}}}async getMetadata(r){try{let e=c(this.templatesDir,`${r}.yaml`),n=await m(e,"utf-8"),o=d(n);return{name:o.name,version:o.version,description:o.description}}catch(e){throw e.code==="ENOENT"?new Error(`Workflow template not found: ${r}`):e}}clearCache(){this.cache.clear()}async reload(r){return this.cache.delete(r),this.load(r)}},W=new l;function w(a,r){return a.replace(/\{\{([^}]+)\}\}/g,(e,n)=>{let i=n.trim().split("."),t=r;for(let s of i)if(t&&typeof t=="object"&&s in t)t=t[s];else return e;return t!=null?String(t):e})}function v(a,r){let e={...r.variables,result:r.results.get("__last_result__")},n=w(a,e);return p(n,e,!1)}var g=["login-flow","oauth-flow","scraping-workflow","visual-regression","form-validation","navigation-flow","api-integration","performance-audit","accessibility-audit"],b={"login-flow":"Authentication testing workflow for login forms with credential validation","oauth-flow":"OAuth2/OIDC authentication testing workflow with provider integration","scraping-workflow":"Data extraction workflow for web scraping with pagination and structured output","visual-regression":"Screenshot comparison workflow for visual regression testing across breakpoints","form-validation":"Input validation testing workflow for form fields with error handling","navigation-flow":"Multi-page navigation workflow for testing user journeys and state persistence","api-integration":"Browser-API hybrid testing workflow for validating frontend-backend integration","performance-audit":"Lighthouse-style performance audit workflow with Core Web Vitals","accessibility-audit":"WCAG 2.1 Level AA compliance audit workflow with automated accessibility testing"},h={authentication:["login-flow","oauth-flow"],testing:["form-validation","navigation-flow","api-integration"],quality:["visual-regression","performance-audit","accessibility-audit"],automation:["scraping-workflow"]};function R(a){return h[a]}function S(a){return g.includes(a)}function $(){return g.map(a=>{let r=Object.entries(h).find(([e,n])=>n.includes(a))?.[0]||"other";return{name:a,description:b[a],category:r}})}export{h as WORKFLOW_CATEGORIES,b as WORKFLOW_DESCRIPTIONS,g as WORKFLOW_TEMPLATES,l as WorkflowLoader,W as defaultWorkflowLoader,v as evaluateCondition,$ as getAllWorkflowTemplates,R as getWorkflowsByCategory,w as interpolateVariables,S as isValidWorkflowTemplate};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.18");process.exit(0)}
|
|
2
|
+
import{a}from"./chunk-CCM7MBLA.js";import"./chunk-RI3NTZ2I.js";import"./chunk-XSLKR2DM.js";import"./chunk-RPT7HCMH.js";import"./chunk-AGPZVE6B.js";import"./chunk-4XYQJ4LQ.js";import"./chunk-6KTF7QB3.js";import"./chunk-6ZMQL3U6.js";import"./chunk-UNPTSPAO.js";import"./chunk-LVABI4OA.js";import"./chunk-UFGFV4BO.js";import"./chunk-MBGWDELE.js";import"./chunk-IS2PMHB5.js";import"./chunk-QGSELG75.js";import"./chunk-ZURHHRSA.js";import"./chunk-DOSDUAVZ.js";import"./chunk-TFUWIKGZ.js";import"./chunk-JBW2A2O6.js";import"./chunk-FTIHPDWV.js";import"./chunk-FKNYOKIK.js";export{a as BrowserWorkflowTool};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a as _}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.18");process.exit(0)}
|
|
2
|
+
import{a as _}from"./chunk-S2XBAOXE.js";import{e as E}from"./chunk-G2H4W7NN.js";import{a as T}from"./chunk-4XYQJ4LQ.js";import{c as h}from"./chunk-6KTF7QB3.js";import{b as p,d as b}from"./chunk-6ZMQL3U6.js";import{S,j as g}from"./chunk-FTIHPDWV.js";b();T();S();var o=h.create("pattern-lifecycle"),A={promotionRewardThreshold:.7,promotionMinOccurrences:E,promotionMinSuccessRate:.7,deprecationFailureThreshold:3,staleDaysThreshold:30,confidenceDecayRate:.01,minActiveConfidence:.3,maxAgeForActivePatterns:90,promotionActivityWindowDays:30,asymmetricLearning:{}},f=class{constructor(e,t={}){this.db=e;this.config={...A,...t},this.asymmetricEngine=new _(this.config.asymmetricLearning),this.ensureSchema()}db;config;asymmetricEngine;_witnessChain=null;set witnessChain(e){this._witnessChain=e}_compressionService=null;set compressionService(e){this._compressionService=e}ensureSchema(){try{this.db.prepare(`
|
|
3
3
|
SELECT deprecated_at FROM qe_patterns LIMIT 1
|
|
4
4
|
`).get()}catch(e){o.debug("Adding missing deprecated_at column",{error:e instanceof Error?e.message:String(e)}),this.db.exec(`
|
|
5
5
|
ALTER TABLE qe_patterns ADD COLUMN deprecated_at TEXT DEFAULT NULL
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a as te,b as ne}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.18");process.exit(0)}
|
|
2
|
+
import{a as te,b as ne}from"./chunk-NBQW7MXF.js";import{a as k}from"./chunk-WH7ZOJCF.js";import{b as ee}from"./chunk-WC5A7C5L.js";import{b as E,d as fe}from"./chunk-6ZMQL3U6.js";import{a as b,c as T}from"./chunk-UNPTSPAO.js";var he={M:16,efConstruction:200,efSearch:100},P={enabled:!0,pretrainedPatterns:!0,hnswConfig:he,promotionThreshold:3,qualityThreshold:.7,embeddingModel:"auto"},_={mode:"hybrid",confidenceThreshold:.7,feedbackEnabled:!0,cacheEnabled:!0,cacheTTLMs:300*1e3},F={enabled:["pattern-consolidator","coverage-gap-scanner","flaky-test-detector","routing-accuracy-monitor"],intervals:{"pattern-consolidator":1800*1e3,"coverage-gap-scanner":3600*1e3,"flaky-test-detector":7200*1e3,"routing-accuracy-monitor":900*1e3},maxConcurrent:4,daemonAutoStart:!0},N={claudeCode:!0,preCommit:!1,ciIntegration:!1},$={install:!0,installV2:!0,installV3:!0,overwrite:!1},O={enabled:!0,parameters:["hnsw.efSearch","routing.confidenceThreshold","pattern.promotionThreshold","testGen.complexityLimit"],tuningIntervalMs:10080*60*1e3,evaluationPeriodMs:5e3};var L=["test-generation","test-execution","coverage-analysis","quality-assessment","defect-intelligence","requirements-validation","code-intelligence","security-compliance","contract-testing","visual-accessibility","chaos-resilience","learning-optimization","enterprise-integration"];function M(){return"3.9.18"}function Fe(i,e){return{version:M(),project:{name:i,root:e,type:"single"},learning:P,routing:_,workers:F,hooks:N,skills:$,autoTuning:O,domains:{enabled:L,disabled:[]},agents:{maxConcurrent:15,defaultTimeout:6e4}}}fe();import{readFileSync as w,existsSync as p,statSync as ye,readdirSync as ve}from"fs";import{join as u,basename as ie,extname as re,relative as V}from"path";var be=[{name:"jest",detect:i=>{let e=["jest.config.js","jest.config.ts","jest.config.mjs","jest.config.cjs"];for(let n of e)if(p(u(i,n)))return{name:"jest",version:A(i,"jest"),configFile:n,confidence:1};let t=S(i);return t?.jest?{name:"jest",version:A(i,"jest"),configFile:"package.json",confidence:.9}:t?.devDependencies?.jest||t?.dependencies?.jest?{name:"jest",version:t.devDependencies?.jest||t.dependencies?.jest,confidence:.7}:null}},{name:"vitest",detect:i=>{let e=["vitest.config.ts","vitest.config.js","vitest.config.mts","vite.config.ts"];for(let n of e)if(p(u(i,n)))return{name:"vitest",version:A(i,"vitest"),configFile:n,confidence:1};let t=S(i);return t?.devDependencies?.vitest||t?.dependencies?.vitest?{name:"vitest",version:t.devDependencies?.vitest,confidence:.8}:null}},{name:"mocha",detect:i=>{let e=[".mocharc.js",".mocharc.json",".mocharc.yaml",".mocharc.yml"];for(let n of e)if(p(u(i,n)))return{name:"mocha",version:A(i,"mocha"),configFile:n,confidence:1};let t=S(i);return t?.devDependencies?.mocha?{name:"mocha",version:t.devDependencies?.mocha,confidence:.8}:null}},{name:"pytest",detect:i=>{let e=["pytest.ini","pyproject.toml","setup.cfg"];for(let n of e){let r=u(i,n);if(p(r))try{let s=w(r,"utf-8");if(s.includes("[pytest]")||s.includes("[tool.pytest]"))return{name:"pytest",configFile:n,confidence:1}}catch(s){console.debug("[ProjectAnalyzer] Config read failed:",s instanceof Error?s.message:s)}}let t=u(i,"requirements.txt");if(p(t))try{if(w(t,"utf-8").includes("pytest"))return{name:"pytest",configFile:"requirements.txt",confidence:.8}}catch(n){console.debug("[ProjectAnalyzer] requirements.txt read failed:",n instanceof Error?n.message:n)}return null}},{name:"playwright",detect:i=>{let e=["playwright.config.ts","playwright.config.js"];for(let n of e)if(p(u(i,n)))return{name:"playwright",version:A(i,"@playwright/test"),configFile:n,confidence:1};let t=S(i);return t?.devDependencies?.["@playwright/test"]?{name:"playwright",version:t.devDependencies["@playwright/test"],confidence:.8}:null}},{name:"cypress",detect:i=>{let e=["cypress.config.ts","cypress.config.js","cypress.json"];for(let t of e)if(p(u(i,t)))return{name:"cypress",version:A(i,"cypress"),configFile:t,confidence:1};return p(u(i,"cypress"))?{name:"cypress",configFile:"cypress/",confidence:.9}:null}}],ke=[{name:"typescript",extensions:[".ts",".tsx",".mts",".cts"]},{name:"javascript",extensions:[".js",".jsx",".mjs",".cjs"]},{name:"python",extensions:[".py",".pyw"]},{name:"java",extensions:[".java"]},{name:"go",extensions:[".go"]},{name:"rust",extensions:[".rs"]},{name:"csharp",extensions:[".cs"]},{name:"ruby",extensions:[".rb"]},{name:"php",extensions:[".php"]},{name:"kotlin",extensions:[".kt",".kts"]},{name:"swift",extensions:[".swift"]}];function S(i){let e=u(i,"package.json");if(!p(e))return null;try{return E(w(e,"utf-8"))}catch{return null}}function A(i,e){let t=S(i);if(t)return t.devDependencies?.[e]||t.dependencies?.[e]}function Q(i,e,t={}){let{maxDepth:n=10,exclude:r=["node_modules",".git","dist","build","coverage",".next","__pycache__"]}=t;function s(o,a){if(a>n)return;let l;try{l=ve(o)}catch{return}for(let g of l){if(r.includes(g))continue;let c=u(o,g),x;try{x=ye(c)}catch{continue}x.isDirectory()?s(c,a+1):x.isFile()&&e(c)}}s(i,0)}var W=class{projectRoot;constructor(e){this.projectRoot=e}async analyze(){let e=Date.now(),[t,n,r,s,o]=await Promise.all([this.detectFrameworks(),this.detectLanguages(),this.detectExistingTests(),this.analyzeComplexity(),this.measureCoverage()]);return{projectName:S(this.projectRoot)?.name||ie(this.projectRoot),projectRoot:this.projectRoot,projectType:this.detectProjectType(),frameworks:t,languages:n,existingTests:r,codeComplexity:s,coverage:o,packageManager:this.detectPackageManager(),hasTypeScript:p(u(this.projectRoot,"tsconfig.json")),hasCIConfig:this.detectCIConfig(),ciProvider:this.detectCIProvider(),analysisTimestamp:new Date,analysisDurationMs:Date.now()-e}}async detectFrameworks(){let e=[];for(let t of be){let n=t.detect(this.projectRoot);n&&e.push(n)}return e.sort((t,n)=>n.confidence-t.confidence)}async detectLanguages(){let e=new Map,t=0;Q(this.projectRoot,r=>{let s=re(r).toLowerCase();if(s){for(let o of ke)if(o.extensions.includes(s)){let a=e.get(o.name)||{count:0,extensions:new Set};a.count++,a.extensions.add(s),e.set(o.name,a),t++;break}}});let n=[];for(let[r,s]of e)n.push({name:r,percentage:t>0?Math.round(s.count/t*100):0,fileCount:s.count,extensions:Array.from(s.extensions)});return n.sort((r,s)=>s.fileCount-r.fileCount)}async detectExistingTests(){let e={totalCount:0,byFramework:{},byType:{unit:0,integration:0,e2e:0,unknown:0},directories:[]},t=new Set,n=[/\.test\.[jt]sx?$/,/\.spec\.[jt]sx?$/,/_test\.[jt]sx?$/,/test_.*\.py$/,/.*_test\.py$/,/.*_test\.go$/,/.*Test\.java$/];return Q(this.projectRoot,r=>{let s=ie(r);if(n.some(a=>a.test(s))){e.totalCount++;let a=V(this.projectRoot,r).toLowerCase();a.includes("e2e")||a.includes("cypress")||a.includes("playwright")?e.byType.e2e++:a.includes("integration")||a.includes("int-test")?e.byType.integration++:a.includes("unit")||a.includes("__tests__")||a.includes("test/")?e.byType.unit++:e.byType.unknown++;let l=V(this.projectRoot,u(r,".."));t.add(l)}}),e.directories=Array.from(t).slice(0,10),e}async analyzeComplexity(){let e=[],t=[],n=0,r=0;Q(this.projectRoot,a=>{let l=re(a);if([".ts",".tsx",".js",".jsx",".py",".java",".go"].includes(l))try{let g=w(a,"utf-8"),c=this.calculateFileComplexity(g,l);t.push(...c.functionComplexities),c.maxComplexity>n&&(n=c.maxComplexity),r++,c.maxComplexity>10&&e.push(V(this.projectRoot,a))}catch(g){console.debug("[ProjectAnalyzer] Complexity analysis read failed:",g instanceof Error?g.message:g)}});let s=t.reduce((a,l)=>a+l,0),o=t.length>0?s/t.length:0;return{averageCyclomatic:Math.round(o*10)/10,maxCyclomatic:n,totalFiles:r,complexFiles:e.slice(0,20),recommendation:o<5?"simple":o<15?"medium":"complex"}}calculateFileComplexity(e,t){let n=this.stripCommentsAndStrings(e,t),r=this.calculateComplexity(n);return{functionComplexities:[r],maxComplexity:r}}removeDelimitedBlocks(e,t,n){let r="",s=0;for(;s<e.length;){let o=e.indexOf(t,s);if(o===-1){r+=e.slice(s);break}r+=e.slice(s,o);let a=e.indexOf(n,o+t.length);if(a===-1)break;s=a+n.length}return r}stripCommentsAndStrings(e,t){let n=e;return[".ts",".tsx",".js",".jsx",".java",".go"].includes(t)?(n=n.split(`
|
|
3
3
|
`).map(r=>{let s=r.indexOf("//");return s>=0?r.slice(0,s):r}).join(`
|
|
4
4
|
`),n=this.removeDelimitedBlocks(n,"/*","*/"),n=this.removeDelimitedBlocks(n,"`","`"),n=this.removeDelimitedBlocks(n,'"','"'),n=this.removeDelimitedBlocks(n,"'","'")):t===".py"&&(n=n.split(`
|
|
5
5
|
`).map(r=>{let s=r.indexOf("#");return s>=0?r.slice(0,s):r}).join(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.18");process.exit(0)}
|
|
2
2
|
import{createRequire as t}from"module";var o=t(import.meta.url),e=o("@xenova/transformers"),n=e,{RuvectorLayer:i,TensorCompress:a,differentiableSearch:s,hierarchicalForward:c,getCompressionLevel:l,init:p,FlashAttention:m,DotProductAttention:u,MultiHeadAttention:d,HyperbolicAttention:A,LinearAttention:f,MoEAttention:h,SonaEngine:_,pipeline:v}=e||{};export{n as a,i as b,a as c,s as d,c as e,l as f,p as g,m as h,u as i,d as j,A as k,f as l,h as m,_ as n,v as o};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{c as b,e as v,g as T}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.18");process.exit(0)}
|
|
2
|
+
import{c as b,e as v,g as T}from"./chunk-FKNYOKIK.js";var y={};v(y,{DotProductAttention:()=>z,FlashAttention:()=>k,HyperbolicAttention:()=>W,LinearAttention:()=>j,MoEAttention:()=>K,MultiHeadAttention:()=>F,RuvectorLayer:()=>_,SonaEngine:()=>q,TensorCompress:()=>E,default:()=>O,differentiableSearch:()=>L,getCompressionLevel:()=>B,hierarchicalForward:()=>V,init:()=>D,pipeline:()=>J});import{createRequire as A}from"module";var I,g,O,_,E,L,V,B,D,k,z,F,W,j,K,q,J,S=b(()=>{I=A(import.meta.url),g=I("@ruvector/rvf-node"),O=g,{RuvectorLayer:_,TensorCompress:E,differentiableSearch:L,hierarchicalForward:V,getCompressionLevel:B,init:D,FlashAttention:k,DotProductAttention:z,MultiHeadAttention:F,HyperbolicAttention:W,LinearAttention:j,MoEAttention:K,SonaEngine:q,pipeline:J}=g||{}});var Z={};v(Z,{createRvfStore:()=>Q,isRvfNativeAvailable:()=>Y,openRvfStore:()=>U,openRvfStoreReadonly:()=>X});import{readFileSync as C,writeFileSync as H,copyFileSync as $,existsSync as G}from"fs";function l(){if(R)return f;R=!0;try{let i=(S(),T(y));!i.RvfDatabase&&i.default&&i.default.RvfDatabase&&(i=i.default),f=i}catch{f=null}return f}function w(i){return`${i}.idmap.json`}function N(i){let e=w(i),t=new Map,n=new Map,s=1;if(G(e))try{let r=JSON.parse(C(e,"utf-8"));s=r.nextLabel;for(let[a,m]of r.entries)t.set(a,m),n.set(m,a)}catch{}return{strToNum:t,numToStr:n,nextLabel:s}}function h(i,e,t){let n={nextLabel:t,entries:Array.from(e.entries())};H(w(i),JSON.stringify(n),"utf-8")}function Q(i,e){let t=l();if(!t)throw new Error("@ruvector/rvf-node is not available \u2014 install the package or check platform compatibility");let n=t.RvfDatabase.create(i,{dimension:e}),s=n.dimension();return new d(n,i,s,new Map,new Map,1)}function U(i){let e=l();if(!e)throw new Error("@ruvector/rvf-node is not available \u2014 install the package or check platform compatibility");let t=e.RvfDatabase.open(i),n=t.dimension(),{strToNum:s,numToStr:r,nextLabel:a}=N(i);return new d(t,i,n,s,r,a)}function X(i){let e=l();if(!e)throw new Error("@ruvector/rvf-node is not available \u2014 install the package or check platform compatibility");let t=e.RvfDatabase.openReadonly(i),n=t.dimension(),{strToNum:s,numToStr:r,nextLabel:a}=N(i);return new d(t,i,n,s,r,a)}function Y(){return l()!==null}var f,R,d,P=b(()=>{f=null,R=!1;d=class i{db;_path;_dimension;strToNum;numToStr;nextLabel;_open;constructor(e,t,n,s,r,a){this.db=e,this._path=t,this._dimension=n,this.strToNum=s,this.numToStr=r,this.nextLabel=a,this._open=!0}ingest(e){if(this.ensureOpen(),e.length===0)return{accepted:0,rejected:0};let t=this._dimension,n=new Float32Array(e.length*t),s=[],r=[];for(let o=0;o<e.length;o++){let{id:u,vector:p,metadata:x}=e[o],c=this.strToNum.get(u);c===void 0&&(c=this.nextLabel++,this.strToNum.set(u,c),this.numToStr.set(c,u)),s.push(c),r.push(x);let M=p instanceof Float32Array?p:new Float32Array(p);n.set(M.subarray(0,t),o*t)}let a;if(r.some(o=>o!==void 0)&&typeof this.db.ingestBatchWithMetadata=="function"){let o=r.map(u=>u?JSON.stringify(u):"");a=this.db.ingestBatchWithMetadata(n,s,o)}else a=this.db.ingestBatch(n,s);return this.persistIdMap(),{accepted:a.accepted,rejected:a.rejected}}search(e,t){this.ensureOpen();let n=e instanceof Float32Array?e:new Float32Array(e);return this.db.query(n,t).map(r=>{let a=this.numToStr.get(r.id);return a===void 0?null:{id:a,distance:r.distance,score:1/(1+r.distance)}}).filter(r=>r!==null)}delete(e){this.ensureOpen();let t=[];for(let s of e){let r=this.strToNum.get(s);r!==void 0&&t.push(r)}if(t.length===0)return 0;let n=this.db.delete(t);for(let s of e){let r=this.strToNum.get(s);r!==void 0&&(this.strToNum.delete(s),this.numToStr.delete(r))}return this.persistIdMap(),n.deleted}fork(e){this.ensureOpen(),$(this._path,e);let t=new Map(this.strToNum),n=new Map(this.numToStr);h(e,t,this.nextLabel);let r=l().RvfDatabase.open(e);return new i(r,e,this._dimension,t,n,this.nextLabel)}status(){this.ensureOpen();let e=this.db.status(),n=this.db.segments().filter(s=>s.segType==="witness");return{totalVectors:e.totalVectors,totalSegments:e.totalSegments,fileSizeBytes:e.fileSize,epoch:e.currentEpoch,witnessValid:n.length>0,witnessEntries:n.length}}dimension(){return this._dimension}size(){return this.ensureOpen(),this.db.status().totalVectors}compact(){this.ensureOpen(),this.db.compact()}close(){this._open&&(this.db.close(),this._open=!1)}isOpen(){return this._open}path(){return this._path}embedKernel(e){return this.ensureOpen(),this.db.embedKernel(0,99,0,e,0,"")}extractKernel(){return this.ensureOpen(),this.db.extractKernel()}verifyWitness(){this.ensureOpen();let e=this.tryNative("verifyWitness");return e?{valid:e.valid??!0,totalEntries:e.totalEntries??0,errors:Array.isArray(e.errors)?e.errors:[]}:{valid:!0,totalEntries:0,errors:[]}}sign(e){this.ensureOpen();let t=this.tryNative("sign",e);return typeof t=="string"?t:null}fileId(){this.ensureOpen();let e=this.tryNative("fileId");return typeof e=="string"?e:null}parentId(){this.ensureOpen();let e=this.tryNative("parentId");return typeof e=="string"?e:null}lineageDepth(){this.ensureOpen();let e=this.tryNative("lineageDepth");return typeof e=="number"?e:0}indexStats(){let e=this.status();return{totalVectors:e.totalVectors,dimension:this._dimension,totalSegments:e.totalSegments,fileSizeBytes:e.fileSizeBytes,epoch:e.epoch,witnessValid:e.witnessValid,witnessEntries:e.witnessEntries,idMapSize:this.strToNum.size}}freeze(){this.ensureOpen();let e=this.tryNative("freeze");return typeof e=="number"?e:0}derive(e){this.ensureOpen();let t=l();if(typeof this.db.derive=="function")try{let n=this.db.derive(e),s=new Map(this.strToNum),r=new Map(this.numToStr);return h(e,s,this.nextLabel),new i(n,e,this._dimension,s,r,this.nextLabel)}catch{}return this.fork(e)}ensureOpen(){if(!this._open)throw new Error("RVF database is closed")}tryNative(e,...t){if(typeof this.db[e]!="function")return null;try{return this.db[e](...t)}catch{return null}}persistIdMap(){h(this._path,this.strToNum,this.nextLabel)}}});export{Q as a,U as b,X as c,Y as d,Z as e,P as f};
|