agentic-qe 3.8.14 → 3.9.1
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 +60 -0
- package/dist/adapters/a2ui/integration/agui-sync.js +2 -1
- package/dist/audit/witness-chain.d.ts +1 -1
- package/dist/boot/fast-paths.d.ts +24 -0
- package/dist/boot/fast-paths.js +43 -0
- package/dist/boot/parallel-prefetch.d.ts +26 -0
- package/dist/boot/parallel-prefetch.js +36 -0
- package/dist/cli/bundle.js +12 -9431
- package/dist/cli/chunks/adapter-NTM4ZH3P.js +2 -0
- package/dist/cli/chunks/agent-booster-wasm-UH2J6BNA.js +2 -0
- package/dist/cli/chunks/agent-handler-ZCBWQE3X.js +33 -0
- package/dist/cli/chunks/agent-memory-branch-2BAVI7UW.js +2 -0
- package/dist/cli/chunks/aqe-learning-engine-RVX6MPYK.js +2 -0
- package/dist/cli/chunks/audit-G5UIJBSQ.js +3 -0
- package/dist/cli/chunks/base-7HKNQ6UP.js +2 -0
- package/dist/cli/chunks/better-sqlite3-YHIAPPVT.js +2 -0
- package/dist/cli/chunks/brain-handler-5EE3J5PR.js +68 -0
- package/dist/cli/chunks/branch-enumerator-OV54PID5.js +7 -0
- package/dist/cli/chunks/browser-7RZGKOEO.js +4 -0
- package/dist/cli/chunks/browser-workflow-UOFSQK7X.js +2 -0
- package/dist/cli/chunks/chunk-24E47G3D.js +604 -0
- package/dist/cli/chunks/chunk-35H73OPP.js +2 -0
- package/dist/cli/chunks/chunk-36X2O3BL.js +3 -0
- package/dist/cli/chunks/chunk-3JESHZQM.js +2 -0
- package/dist/cli/chunks/chunk-3VAKR43Z.js +2 -0
- package/dist/cli/chunks/chunk-3WQNW6CH.js +2 -0
- package/dist/cli/chunks/chunk-43M6Y6VF.js +15 -0
- package/dist/cli/chunks/chunk-4BHOAQJH.js +2 -0
- package/dist/cli/chunks/chunk-4LWXZCSD.js +146 -0
- package/dist/cli/chunks/chunk-4TNXEANY.js +2 -0
- package/dist/cli/chunks/chunk-4XBY5JDT.js +4 -0
- package/dist/cli/chunks/chunk-4XREPCBZ.js +2 -0
- package/dist/cli/chunks/chunk-5GPTM2RV.js +2 -0
- package/dist/cli/chunks/chunk-5KBQQP3X.js +7 -0
- package/dist/cli/chunks/chunk-5LDBKZ6P.js +2 -0
- package/dist/cli/chunks/chunk-6BSJNG2S.js +2 -0
- package/dist/cli/chunks/chunk-6YC24TPL.js +27 -0
- package/dist/cli/chunks/chunk-7ATLJCSG.js +2 -0
- package/dist/cli/chunks/chunk-7JQTHPCD.js +2 -0
- package/dist/cli/chunks/chunk-7YUOUVN7.js +2 -0
- package/dist/cli/chunks/chunk-7ZNINH6J.js +59 -0
- package/dist/cli/chunks/chunk-A57BEPL7.js +3 -0
- package/dist/cli/chunks/chunk-AFPMCMVX.js +45 -0
- package/dist/cli/chunks/chunk-AREIP4FX.js +3 -0
- package/dist/cli/chunks/chunk-B2I7BJLL.js +3 -0
- package/dist/cli/chunks/chunk-BEHP3DEF.js +66 -0
- package/dist/cli/chunks/chunk-C24ZDUCM.js +30 -0
- package/dist/cli/chunks/chunk-D4PSFWND.js +2 -0
- package/dist/cli/chunks/chunk-D55PSO5D.js +81 -0
- package/dist/cli/chunks/chunk-DC3HPOOJ.js +2 -0
- package/dist/cli/chunks/chunk-DMGLX76J.js +180 -0
- package/dist/cli/chunks/chunk-E33KQBMW.js +2 -0
- package/dist/cli/chunks/chunk-EQFZQPFN.js +2 -0
- package/dist/cli/chunks/chunk-FPRL6UDF.js +2 -0
- package/dist/cli/chunks/chunk-FRNB4CH2.js +2 -0
- package/dist/cli/chunks/chunk-FWDKVTK4.js +2 -0
- package/dist/cli/chunks/chunk-GFNUESMU.js +2 -0
- package/dist/cli/chunks/chunk-GJW6V35N.js +2 -0
- package/dist/cli/chunks/chunk-GLIFZWV2.js +2 -0
- package/dist/cli/chunks/chunk-GNUUBTSX.js +14 -0
- package/dist/cli/chunks/chunk-HAUXLXKZ.js +2 -0
- package/dist/cli/chunks/chunk-HTXSUTWL.js +9 -0
- package/dist/cli/chunks/chunk-I5WZ2NM2.js +95 -0
- package/dist/cli/chunks/chunk-I7TA453K.js +2 -0
- package/dist/cli/chunks/chunk-IF6GW6IY.js +27 -0
- package/dist/cli/chunks/chunk-IHWSNYL2.js +5 -0
- package/dist/cli/chunks/chunk-IJKYJGJL.js +2 -0
- package/dist/cli/chunks/chunk-IQPXANCE.js +14 -0
- package/dist/cli/chunks/chunk-JCEY7RLP.js +2 -0
- package/dist/cli/chunks/chunk-JSOBRKMA.js +2 -0
- package/dist/cli/chunks/chunk-KIGRLIU4.js +2 -0
- package/dist/cli/chunks/chunk-L4H54Z27.js +21 -0
- package/dist/cli/chunks/chunk-LCOEBFAB.js +2 -0
- package/dist/cli/chunks/chunk-MZ54VM6A.js +2 -0
- package/dist/cli/chunks/chunk-NB47YT6A.js +167 -0
- package/dist/cli/chunks/chunk-NG3BKE7V.js +2 -0
- package/dist/cli/chunks/chunk-NG4TE3OW.js +2 -0
- package/dist/cli/chunks/chunk-O636JKJR.js +18 -0
- package/dist/cli/chunks/chunk-O6QQ4HLS.js +2 -0
- package/dist/cli/chunks/chunk-OFNIQCGX.js +2 -0
- package/dist/cli/chunks/chunk-OTSJU5LH.js +2 -0
- package/dist/cli/chunks/chunk-POLFT2PQ.js +15 -0
- package/dist/cli/chunks/chunk-QAYTL6KC.js +2 -0
- package/dist/cli/chunks/chunk-QMFP5OKH.js +2 -0
- package/dist/cli/chunks/chunk-RAJO7VML.js +2 -0
- package/dist/cli/chunks/chunk-RKIGOARX.js +2 -0
- package/dist/cli/chunks/chunk-RU6Q5HOC.js +3 -0
- package/dist/cli/chunks/chunk-RV6SGDET.js +2 -0
- package/dist/cli/chunks/chunk-RWXI7XAR.js +2 -0
- package/dist/cli/chunks/chunk-RXVYOXDB.js +2 -0
- package/dist/cli/chunks/chunk-SGRN6JFB.js +2 -0
- package/dist/cli/chunks/chunk-SVNX4UWR.js +3029 -0
- package/dist/cli/chunks/chunk-TL7ABIMP.js +2 -0
- package/dist/cli/chunks/chunk-TOLYWONQ.js +2 -0
- package/dist/cli/chunks/chunk-TPXYS3WG.js +3 -0
- package/dist/cli/chunks/chunk-U5JQGRHZ.js +2 -0
- package/dist/cli/chunks/chunk-UB7RGVKO.js +2 -0
- package/dist/cli/chunks/chunk-UBKK7KCR.js +70 -0
- package/dist/cli/chunks/chunk-UMGWGX7C.js +2 -0
- package/dist/cli/chunks/chunk-UN4PA4M2.js +2 -0
- package/dist/cli/chunks/chunk-US7INRP2.js +314 -0
- package/dist/cli/chunks/chunk-UWDBFPHQ.js +750 -0
- package/dist/cli/chunks/chunk-UZZCWWIG.js +2 -0
- package/dist/cli/chunks/chunk-V4HM4QAO.js +24 -0
- package/dist/cli/chunks/chunk-V4U3CTS2.js +180 -0
- package/dist/cli/chunks/chunk-VCCMCFDU.js +2 -0
- package/dist/cli/chunks/chunk-VEWIT6VN.js +4 -0
- package/dist/cli/chunks/chunk-VNYGVG4Y.js +2 -0
- package/dist/cli/chunks/chunk-VO3OVD5D.js +4 -0
- package/dist/cli/chunks/chunk-VY74OMGQ.js +6 -0
- package/dist/cli/chunks/chunk-WDJBGXC2.js +2 -0
- package/dist/cli/chunks/chunk-WDV6TN7E.js +65 -0
- package/dist/cli/chunks/chunk-WLXEDOG4.js +2 -0
- package/dist/cli/chunks/chunk-WXXAAXNS.js +12 -0
- package/dist/cli/chunks/chunk-X4MZYBOU.js +256 -0
- package/dist/cli/chunks/chunk-XE2YAYU5.js +12 -0
- package/dist/cli/chunks/chunk-XP6XKBNW.js +2 -0
- package/dist/cli/chunks/chunk-XPB6ZVQY.js +2 -0
- package/dist/cli/chunks/chunk-XRVUSKQV.js +1 -0
- package/dist/cli/chunks/chunk-XSITQBYB.js +20 -0
- package/dist/cli/chunks/chunk-XTLA4F5Z.js +91 -0
- package/dist/cli/chunks/chunk-XU6L2VJY.js +2 -0
- package/dist/cli/chunks/chunk-XUFHYPZK.js +2 -0
- package/dist/cli/chunks/chunk-Y2ZEDXTV.js +16 -0
- package/dist/cli/chunks/chunk-YQWB4QUP.js +316 -0
- package/dist/cli/chunks/chunk-YUQIXT3G.js +79 -0
- package/dist/cli/chunks/chunk-YYYB2JN5.js +2 -0
- package/dist/cli/chunks/chunk-ZEUVPLGX.js +2 -0
- package/dist/cli/chunks/chunk-ZSRQHJEW.js +3 -0
- package/dist/cli/chunks/ci-N4NTYAAI.js +81 -0
- package/dist/cli/chunks/ci-output-XYR2PSYH.js +2 -0
- package/dist/cli/chunks/claude-flow-setup-FX7PRBJV.js +2 -0
- package/dist/cli/chunks/client-CRRENRK4.js +2 -0
- package/dist/cli/chunks/cline-installer-GTHQOK7U.js +4 -0
- package/dist/cli/chunks/code-4G6ZHVNI.js +38 -0
- package/dist/cli/chunks/code-index-extractor-MKJTP5AK.js +3 -0
- package/dist/cli/chunks/codex-installer-UGS773DT.js +8 -0
- package/dist/cli/chunks/completions-B3BXNXAU.js +1364 -0
- package/dist/cli/chunks/complexity-analyzer-PMN77CUP.js +2 -0
- package/dist/cli/chunks/continuedev-installer-3DYKSIP3.js +14 -0
- package/dist/cli/chunks/copilot-installer-IUC5HDHD.js +3 -0
- package/dist/cli/chunks/cost-tracker-GSGQ7O5T.js +2 -0
- package/dist/cli/chunks/coverage-PO72QC3P.js +27 -0
- package/dist/cli/chunks/cross-domain-router-FSCGJG3B.js +2 -0
- package/dist/cli/chunks/cursor-installer-FK53S3ZL.js +3 -0
- package/dist/cli/chunks/daemon-4UIQTQ73.js +19 -0
- package/dist/cli/chunks/dag-attention-scheduler-ZGIMLECE.js +2 -0
- package/dist/cli/chunks/detect-XXHLTLL7.js +2 -0
- package/dist/cli/chunks/domain-handler-PPGFP7P4.js +25 -0
- package/dist/cli/chunks/domain-transfer-Q5UAE65W.js +2 -0
- package/dist/cli/chunks/dream-PONKQULG.js +2 -0
- package/dist/cli/chunks/esm-node-XLWDJRBX.js +2 -0
- package/dist/cli/chunks/eval-JVJKHSTQ.js +15 -0
- package/dist/cli/chunks/fast-paths-3KX4ZV66.js +2 -0
- package/dist/cli/chunks/feature-flags-2NOVE7DL.js +2 -0
- package/dist/cli/chunks/feature-flags-GKHHG2I2.js +2 -0
- package/dist/cli/chunks/file-discovery-XFSGQNM3.js +2 -0
- package/dist/cli/chunks/fleet-FOIDAXLR.js +43 -0
- package/dist/cli/chunks/gnn-wrapper-HPCQREKP.js +2 -0
- package/dist/cli/chunks/heartbeat-handler-HTR3EFFV.js +48 -0
- package/dist/cli/chunks/heartbeat-scheduler-NZQWN7CH.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-BNA5WUAB.js +2 -0
- package/dist/cli/chunks/hnsw-index-RQIIAE7S.js +2 -0
- package/dist/cli/chunks/hnsw-legacy-bridge-H6OA3AA3.js +2 -0
- package/dist/cli/chunks/hnswlib-node-FF27BDMD.js +2 -0
- package/dist/cli/chunks/hooks-63NZQ7NH.js +101 -0
- package/dist/cli/chunks/hypergraph-engine-XMSLA4XH.js +2 -0
- package/dist/cli/chunks/hypergraph-handler-ID6J6GS2.js +35 -0
- package/dist/cli/chunks/impact-analyzer-FS2UNVP4.js +2 -0
- package/dist/cli/chunks/init-handler-CIKZGGAY.js +68 -0
- package/dist/cli/chunks/init-wizard-TUU5PPY6.js +2 -0
- package/dist/cli/chunks/kernel-XFG42WAG.js +2 -0
- package/dist/cli/chunks/kilocode-installer-N7NLISYY.js +4 -0
- package/dist/cli/chunks/kiro-installer-U6XIPAT3.js +74 -0
- package/dist/cli/chunks/knowledge-graph-XV7FPU2T.js +2 -0
- package/dist/cli/chunks/learning-NKOF7KDJ.js +107 -0
- package/dist/cli/chunks/llm-router-34WHT3PH.js +30 -0
- package/dist/cli/chunks/load-ZW4Z3YLT.js +2 -0
- package/dist/cli/chunks/load-test-F4L7RTXJ.js +2 -0
- package/dist/cli/chunks/mcp-6R7SVGKO.js +2 -0
- package/dist/cli/chunks/memory-OUYCBU4M.js +32 -0
- package/dist/cli/chunks/memory-backend-DTJD2DWF.js +2 -0
- package/dist/cli/chunks/memory-handlers-WNXKZRNM.js +2 -0
- package/dist/cli/chunks/opencode-installer-FR75GHFU.js +3 -0
- package/dist/cli/chunks/orchestrator-AK7ZMVNH.js +371 -0
- package/dist/cli/chunks/pipeline-CFOPG7EM.js +19 -0
- package/dist/cli/chunks/platform-NY3ULBR7.js +2 -0
- package/dist/cli/chunks/plugin-LRANQYUR.js +27 -0
- package/dist/cli/chunks/prime-radiant-advanced-wasm-6KEIU55P.js +2 -0
- package/dist/cli/chunks/protocol-executor-6W4PS2D4.js +2 -0
- package/dist/cli/chunks/protocol-handler-ESSZGJ7R.js +20 -0
- package/dist/cli/chunks/prove-EF2PPY65.js +3 -0
- package/dist/cli/chunks/qe-reasoning-bank-7G3TZLEA.js +2 -0
- package/dist/cli/chunks/quality-AYBXB635.js +7 -0
- package/dist/cli/chunks/queen-coordinator-NFPKGMQN.js +2 -0
- package/dist/cli/chunks/real-embeddings-QPBXE7MA.js +2 -0
- package/dist/cli/chunks/roocode-installer-UF6MMBH6.js +4 -0
- package/dist/cli/chunks/router-F4B7Q66G.js +2 -0
- package/dist/cli/chunks/routing-feedback-5CIDDW7P.js +2 -0
- package/dist/cli/chunks/routing-handler-5TVKFU7V.js +20 -0
- package/dist/cli/chunks/ruvector-commands-E33VXFIA.js +8 -0
- package/dist/cli/chunks/rvf-dual-writer-O3AZKD24.js +2 -0
- package/dist/cli/chunks/rvf-migration-adapter-IKEUZ2HX.js +2 -0
- package/dist/cli/chunks/rvf-migration-coordinator-M4H7W4RN.js +2 -0
- package/dist/cli/chunks/rvf-native-adapter-UX3WAPIP.js +2 -0
- package/dist/cli/chunks/safe-db-QBBNXEVK.js +2 -0
- package/dist/cli/chunks/schedule-GFT4NN6Z.js +2 -0
- package/dist/cli/chunks/scheduler-CQ56T7DB.js +2 -0
- package/dist/cli/chunks/security-ZLWT7IU3.js +14 -0
- package/dist/cli/chunks/shared-rvf-adapter-EXACQ2PT.js +2 -0
- package/dist/cli/chunks/shared-rvf-dual-writer-G43LQDIV.js +2 -0
- package/dist/cli/chunks/sqlite-persistence-JHSUZPAW.js +2 -0
- package/dist/cli/chunks/status-handler-7P23CXUI.js +45 -0
- package/dist/cli/chunks/structural-health-SCNBNL7K.js +2 -0
- package/dist/cli/chunks/sync-BYZBBH65.js +23 -0
- package/dist/cli/chunks/task-handler-DWJQXZ2K.js +49 -0
- package/dist/cli/chunks/task-handlers-35JIXVRW.js +2 -0
- package/dist/cli/chunks/test-2JSS4XW7.js +33 -0
- package/dist/cli/chunks/test-scheduling-TWJ5I7N3.js +15 -0
- package/dist/cli/chunks/token-bootstrap-LLLNJT5V.js +2 -0
- package/dist/cli/chunks/token-usage-EQ4HM4EZ.js +25 -0
- package/dist/cli/chunks/transformers-PBIR5U5S.js +2 -0
- package/dist/cli/chunks/tree-sitter-wasm-parser-X3L2GXUX.js +2 -0
- package/dist/cli/chunks/types-OD43K2NP.js +2 -0
- package/dist/cli/chunks/unified-memory-YPHONR2T.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-HJS4OXWM.js +2 -0
- package/dist/cli/chunks/unified-persistence-EFZRO6AW.js +2 -0
- package/dist/cli/chunks/validate-POMLT2KU.js +21 -0
- package/dist/cli/chunks/validate-swarm-UOC4JGZT.js +14 -0
- package/dist/cli/chunks/vibium-5JF6LAXI.js +2 -0
- package/dist/cli/chunks/visual-security-7KWFLYNB.js +2 -0
- package/dist/cli/chunks/web-tree-sitter-R7WR7J7B.js +2 -0
- package/dist/cli/chunks/windsurf-installer-ZSPEUBKR.js +7 -0
- package/dist/cli/chunks/witness-chain-CFSPCXHG.js +2 -0
- package/dist/cli/chunks/witness-chain-RWU6WT37.js +2 -0
- package/dist/cli/chunks/workflow-YNQT3OW2.js +51 -0
- package/dist/cli/chunks/workflow-orchestrator-Z6TAVMQP.js +2 -0
- package/dist/cli/chunks/wrappers-BP4FODVH.js +2 -0
- package/dist/cli/commands/daemon.d.ts +13 -0
- package/dist/cli/commands/daemon.js +224 -0
- package/dist/cli/commands/hooks-handlers/hooks-shared.js +2 -1
- package/dist/cli/commands/plugin.d.ts +12 -0
- package/dist/cli/commands/plugin.js +135 -0
- package/dist/cli/commands/ruvector-commands.js +14 -2
- package/dist/cli/commands/workflow.d.ts +10 -0
- package/dist/cli/commands/workflow.js +587 -0
- package/dist/cli/handlers/brain-handler.js +13 -8
- package/dist/cli/handlers/heartbeat-handler.d.ts +1 -0
- package/dist/cli/handlers/heartbeat-handler.js +20 -10
- package/dist/cli/handlers/hypergraph-handler.js +3 -3
- package/dist/cli/handlers/init-handler.js +10 -9
- package/dist/cli/handlers/interfaces.d.ts +4 -4
- package/dist/cli/index.js +159 -638
- package/dist/cli/lazy-registry.d.ts +27 -0
- package/dist/cli/lazy-registry.js +70 -0
- package/dist/context/compaction/context-budget.d.ts +71 -0
- package/dist/context/compaction/context-budget.js +120 -0
- package/dist/context/compaction/index.d.ts +96 -0
- package/dist/context/compaction/index.js +259 -0
- package/dist/context/compaction/llm-caller-adapter.d.ts +14 -0
- package/dist/context/compaction/llm-caller-adapter.js +47 -0
- package/dist/context/compaction/tier1-microcompact.d.ts +33 -0
- package/dist/context/compaction/tier1-microcompact.js +47 -0
- package/dist/context/compaction/tier2-session-summary.d.ts +72 -0
- package/dist/context/compaction/tier2-session-summary.js +172 -0
- package/dist/context/compaction/tier3-llm-compact.d.ts +65 -0
- package/dist/context/compaction/tier3-llm-compact.js +166 -0
- package/dist/context/compaction/tier4-reactive.d.ts +54 -0
- package/dist/context/compaction/tier4-reactive.js +129 -0
- package/dist/coordination/agent-memory-branch.d.ts +117 -0
- package/dist/coordination/agent-memory-branch.js +213 -0
- package/dist/coordination/agent-teams/mailbox.d.ts +43 -0
- package/dist/coordination/agent-teams/mailbox.js +130 -4
- package/dist/coordination/consensus/providers/claude-provider.d.ts +1 -0
- package/dist/coordination/consensus/providers/claude-provider.js +23 -3
- package/dist/coordination/handlers/handler-utils.d.ts +1 -0
- package/dist/coordination/handlers/handler-utils.js +9 -2
- package/dist/coordination/handlers/quality-handlers.js +7 -1
- package/dist/domains/contract-testing/coordinator.js +11 -0
- package/dist/domains/quality-assessment/coherence/gate-controller.d.ts +20 -1
- package/dist/domains/quality-assessment/coherence/gate-controller.js +64 -0
- package/dist/domains/quality-assessment/coherence/index.d.ts +3 -3
- package/dist/domains/quality-assessment/coherence/index.js +2 -2
- package/dist/domains/quality-assessment/coherence/types.d.ts +39 -0
- package/dist/domains/quality-assessment/coherence/types.js +11 -0
- package/dist/domains/quality-assessment/coordinator.d.ts +14 -0
- package/dist/domains/quality-assessment/coordinator.js +92 -0
- package/dist/domains/test-execution/coordinator.d.ts +19 -0
- package/dist/domains/test-execution/coordinator.js +102 -5
- package/dist/domains/test-generation/coordinator.js +11 -0
- package/dist/domains/test-generation/interfaces.d.ts +2 -0
- package/dist/domains/test-generation/services/test-generator.d.ts +9 -0
- package/dist/domains/test-generation/services/test-generator.js +37 -0
- package/dist/hooks/cross-phase-hooks.d.ts +11 -0
- package/dist/hooks/cross-phase-hooks.js +73 -9
- package/dist/hooks/security/config-snapshot.d.ts +21 -0
- package/dist/hooks/security/config-snapshot.js +33 -0
- package/dist/hooks/security/exit-codes.d.ts +28 -0
- package/dist/hooks/security/exit-codes.js +33 -0
- package/dist/hooks/security/index.d.ts +15 -0
- package/dist/hooks/security/index.js +15 -0
- package/dist/hooks/security/ssrf-guard.d.ts +25 -0
- package/dist/hooks/security/ssrf-guard.js +69 -0
- package/dist/init/agents-installer.d.ts +5 -3
- package/dist/init/agents-installer.js +17 -43
- package/dist/init/find-package-root.d.ts +22 -0
- package/dist/init/find-package-root.js +46 -0
- package/dist/init/n8n-installer.d.ts +4 -2
- package/dist/init/n8n-installer.js +23 -23
- package/dist/init/opencode-installer.d.ts +0 -5
- package/dist/init/opencode-installer.js +12 -39
- package/dist/init/skills-installer.d.ts +5 -2
- package/dist/init/skills-installer.js +15 -37
- package/dist/integrations/embeddings/index/HNSWIndex.d.ts +9 -2
- package/dist/integrations/embeddings/index/HNSWIndex.js +110 -35
- package/dist/integrations/ruvector/cognitive-routing.d.ts +67 -0
- package/dist/integrations/ruvector/cognitive-routing.js +208 -0
- package/dist/integrations/ruvector/feature-flags.d.ts +84 -0
- package/dist/integrations/ruvector/feature-flags.js +59 -0
- package/dist/integrations/ruvector/hdc-fingerprint.d.ts +76 -0
- package/dist/integrations/ruvector/hdc-fingerprint.js +217 -0
- package/dist/integrations/ruvector/hyperbolic-hnsw.d.ts +59 -0
- package/dist/integrations/ruvector/hyperbolic-hnsw.js +194 -0
- package/dist/integrations/ruvector/index.d.ts +5 -2
- package/dist/integrations/ruvector/index.js +13 -2
- package/dist/integrations/ruvector/shared-rvf-adapter.d.ts +24 -0
- package/dist/integrations/ruvector/shared-rvf-adapter.js +55 -0
- package/dist/integrations/ruvector/shared-rvf-dual-writer.d.ts +6 -0
- package/dist/integrations/ruvector/shared-rvf-dual-writer.js +38 -0
- package/dist/integrations/ruvector/sona-persistence.d.ts +8 -0
- package/dist/integrations/ruvector/sona-persistence.js +10 -0
- package/dist/integrations/ruvector/vector-delta-tracker.d.ts +96 -0
- package/dist/integrations/ruvector/vector-delta-tracker.js +226 -0
- package/dist/kernel/agent-coordinator.d.ts +75 -1
- package/dist/kernel/agent-coordinator.js +250 -1
- package/dist/kernel/hnsw-legacy-bridge.d.ts +38 -0
- package/dist/kernel/hnsw-legacy-bridge.js +88 -0
- package/dist/kernel/hnsw-shadow-validator.d.ts +91 -0
- package/dist/kernel/hnsw-shadow-validator.js +139 -0
- package/dist/kernel/index.d.ts +1 -1
- package/dist/kernel/index.js +1 -1
- package/dist/kernel/interfaces.d.ts +39 -0
- package/dist/kernel/kernel.d.ts +23 -0
- package/dist/kernel/kernel.js +141 -1
- package/dist/kernel/memory-backend.js +3 -1
- package/dist/kernel/unified-memory.d.ts +1 -1
- package/dist/kernel/unified-memory.js +7 -3
- package/dist/learning/aqe-learning-engine.d.ts +65 -0
- package/dist/learning/aqe-learning-engine.js +134 -0
- package/dist/learning/dream/dream-engine.d.ts +6 -1
- package/dist/learning/dream/dream-engine.js +37 -2
- package/dist/learning/dream/dream-scheduler.d.ts +25 -0
- package/dist/learning/dream/dream-scheduler.js +120 -0
- package/dist/learning/dream/rvcow-branch-manager.d.ts +6 -3
- package/dist/learning/dream/rvcow-branch-manager.js +60 -5
- package/dist/learning/experience-capture.d.ts +3 -3
- package/dist/learning/hyperbolic-pattern-index.d.ts +82 -0
- package/dist/learning/hyperbolic-pattern-index.js +142 -0
- package/dist/learning/index.d.ts +3 -3
- package/dist/learning/index.js +1 -1
- package/dist/learning/metrics-tracker.d.ts +44 -0
- package/dist/learning/metrics-tracker.js +37 -0
- package/dist/learning/pattern-promotion.d.ts +3 -3
- package/dist/learning/pattern-store.d.ts +45 -2
- package/dist/learning/pattern-store.js +217 -4
- package/dist/learning/qe-patterns.d.ts +1 -1
- package/dist/learning/qe-reasoning-bank.js +1 -1
- package/dist/learning/rvf-pattern-migration.d.ts +50 -0
- package/dist/learning/rvf-pattern-migration.js +106 -0
- package/dist/learning/rvf-pattern-store.d.ts +66 -0
- package/dist/learning/rvf-pattern-store.js +447 -0
- package/dist/mcp/bundle.js +1937 -1793
- package/dist/mcp/entry.js +132 -77
- package/dist/mcp/handlers/index.d.ts +1 -0
- package/dist/mcp/handlers/index.js +2 -0
- package/dist/mcp/handlers/migration-handlers.d.ts +52 -0
- package/dist/mcp/handlers/migration-handlers.js +85 -0
- package/dist/mcp/middleware/batch-executor.d.ts +46 -0
- package/dist/mcp/middleware/batch-executor.js +150 -0
- package/dist/mcp/middleware/microcompact.d.ts +97 -0
- package/dist/mcp/middleware/microcompact.js +179 -0
- package/dist/mcp/middleware/middleware-chain.d.ts +37 -0
- package/dist/mcp/middleware/middleware-chain.js +60 -0
- package/dist/mcp/protocol-server.d.ts +12 -0
- package/dist/mcp/protocol-server.js +192 -36
- package/dist/mcp/services/session-durability-middleware.d.ts +22 -0
- package/dist/mcp/services/session-durability-middleware.js +64 -0
- package/dist/mcp/services/session-resume.d.ts +29 -0
- package/dist/mcp/services/session-resume.js +221 -0
- package/dist/mcp/services/session-store.d.ts +84 -0
- package/dist/mcp/services/session-store.js +163 -0
- package/dist/mcp/tool-registry.d.ts +9 -0
- package/dist/mcp/tool-registry.js +30 -1
- package/dist/mcp/types.d.ts +2 -1
- package/dist/optimization/early-exit-token-optimizer.d.ts +7 -7
- package/dist/optimization/early-exit-token-optimizer.js +3 -3
- package/dist/persistence/rvf-consistency-validator.d.ts +85 -0
- package/dist/persistence/rvf-consistency-validator.js +182 -0
- package/dist/persistence/rvf-migration-adapter.d.ts +125 -0
- package/dist/persistence/rvf-migration-adapter.js +303 -0
- package/dist/persistence/rvf-migration-coordinator.d.ts +115 -0
- package/dist/persistence/rvf-migration-coordinator.js +224 -0
- package/dist/persistence/rvf-stage-gate.d.ts +70 -0
- package/dist/persistence/rvf-stage-gate.js +163 -0
- package/dist/plugins/cache.d.ts +44 -0
- package/dist/plugins/cache.js +149 -0
- package/dist/plugins/index.d.ts +15 -0
- package/dist/plugins/index.js +15 -0
- package/dist/plugins/lifecycle.d.ts +67 -0
- package/dist/plugins/lifecycle.js +175 -0
- package/dist/plugins/manifest.d.ts +45 -0
- package/dist/plugins/manifest.js +173 -0
- package/dist/plugins/resolver.d.ts +37 -0
- package/dist/plugins/resolver.js +80 -0
- package/dist/plugins/security.d.ts +23 -0
- package/dist/plugins/security.js +125 -0
- package/dist/plugins/sources/github.d.ts +17 -0
- package/dist/plugins/sources/github.js +77 -0
- package/dist/plugins/sources/local.d.ts +20 -0
- package/dist/plugins/sources/local.js +32 -0
- package/dist/plugins/sources/npm.d.ts +18 -0
- package/dist/plugins/sources/npm.js +82 -0
- package/dist/shared/llm/retry.d.ts +5 -2
- package/dist/shared/llm/retry.js +7 -3
- package/dist/shared/prompt-cache-latch.d.ts +41 -0
- package/dist/shared/prompt-cache-latch.js +63 -0
- package/dist/shared/retry-engine.d.ts +77 -0
- package/dist/shared/retry-engine.js +194 -0
- package/dist/workers/daemon.d.ts +8 -0
- package/dist/workers/daemon.js +13 -0
- package/dist/workers/quality-daemon/ci-monitor.d.ts +55 -0
- package/dist/workers/quality-daemon/ci-monitor.js +147 -0
- package/dist/workers/quality-daemon/coverage-delta.d.ts +72 -0
- package/dist/workers/quality-daemon/coverage-delta.js +135 -0
- package/dist/workers/quality-daemon/git-watcher.d.ts +51 -0
- package/dist/workers/quality-daemon/git-watcher.js +209 -0
- package/dist/workers/quality-daemon/index.d.ts +119 -0
- package/dist/workers/quality-daemon/index.js +343 -0
- package/dist/workers/quality-daemon/nightly-consolidation.d.ts +74 -0
- package/dist/workers/quality-daemon/nightly-consolidation.js +136 -0
- package/dist/workers/quality-daemon/notification-service.d.ts +67 -0
- package/dist/workers/quality-daemon/notification-service.js +178 -0
- package/dist/workers/quality-daemon/persistent-memory.d.ts +31 -0
- package/dist/workers/quality-daemon/persistent-memory.js +30 -0
- package/dist/workers/quality-daemon/priority-queue.d.ts +97 -0
- package/dist/workers/quality-daemon/priority-queue.js +126 -0
- package/dist/workers/quality-daemon/test-suggester.d.ts +50 -0
- package/dist/workers/quality-daemon/test-suggester.js +121 -0
- package/dist/workers/worker-manager.js +2 -1
- package/package.json +10 -10
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook Exit Code Semantics
|
|
3
|
+
*
|
|
4
|
+
* Defines exit-code conventions for hook processes so the runtime
|
|
5
|
+
* can distinguish success, user-visible errors, and model-blocking
|
|
6
|
+
* failures that should halt agent execution.
|
|
7
|
+
*
|
|
8
|
+
* @module hooks/security/exit-codes
|
|
9
|
+
* @see IMP-07 Hook Security Hardening
|
|
10
|
+
*/
|
|
11
|
+
export declare const HOOK_EXIT_CODES: {
|
|
12
|
+
/** Hook completed successfully. */
|
|
13
|
+
readonly SUCCESS: 0;
|
|
14
|
+
/** Hook failed with user-visible error (non-blocking). */
|
|
15
|
+
readonly USER_VISIBLE: 1;
|
|
16
|
+
/** Hook failed and must block the model from proceeding. */
|
|
17
|
+
readonly MODEL_BLOCKING: 2;
|
|
18
|
+
};
|
|
19
|
+
export type HookExitCode = typeof HOOK_EXIT_CODES[keyof typeof HOOK_EXIT_CODES];
|
|
20
|
+
/**
|
|
21
|
+
* Classify a numeric process exit code into a semantic category.
|
|
22
|
+
*
|
|
23
|
+
* - 0 -> 'success'
|
|
24
|
+
* - 2 -> 'model_blocking' (halts agent execution)
|
|
25
|
+
* - anything else -> 'user_error' (logged, non-blocking)
|
|
26
|
+
*/
|
|
27
|
+
export declare function classifyHookExit(code: number): 'success' | 'user_error' | 'model_blocking';
|
|
28
|
+
//# sourceMappingURL=exit-codes.d.ts.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook Exit Code Semantics
|
|
3
|
+
*
|
|
4
|
+
* Defines exit-code conventions for hook processes so the runtime
|
|
5
|
+
* can distinguish success, user-visible errors, and model-blocking
|
|
6
|
+
* failures that should halt agent execution.
|
|
7
|
+
*
|
|
8
|
+
* @module hooks/security/exit-codes
|
|
9
|
+
* @see IMP-07 Hook Security Hardening
|
|
10
|
+
*/
|
|
11
|
+
export const HOOK_EXIT_CODES = {
|
|
12
|
+
/** Hook completed successfully. */
|
|
13
|
+
SUCCESS: 0,
|
|
14
|
+
/** Hook failed with user-visible error (non-blocking). */
|
|
15
|
+
USER_VISIBLE: 1,
|
|
16
|
+
/** Hook failed and must block the model from proceeding. */
|
|
17
|
+
MODEL_BLOCKING: 2,
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Classify a numeric process exit code into a semantic category.
|
|
21
|
+
*
|
|
22
|
+
* - 0 -> 'success'
|
|
23
|
+
* - 2 -> 'model_blocking' (halts agent execution)
|
|
24
|
+
* - anything else -> 'user_error' (logged, non-blocking)
|
|
25
|
+
*/
|
|
26
|
+
export function classifyHookExit(code) {
|
|
27
|
+
if (code === 0)
|
|
28
|
+
return 'success';
|
|
29
|
+
if (code === 2)
|
|
30
|
+
return 'model_blocking';
|
|
31
|
+
return 'user_error';
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=exit-codes.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook Security Module
|
|
3
|
+
*
|
|
4
|
+
* Re-exports all security primitives for the hook system:
|
|
5
|
+
* - Config snapshot (deep-freeze at startup)
|
|
6
|
+
* - SSRF guard (private IP / DNS rebinding protection)
|
|
7
|
+
* - Exit code semantics (success / user_error / model_blocking)
|
|
8
|
+
*
|
|
9
|
+
* @module hooks/security
|
|
10
|
+
* @see IMP-07 Hook Security Hardening
|
|
11
|
+
*/
|
|
12
|
+
export { captureHooksConfigSnapshot, deepFreeze } from './config-snapshot.js';
|
|
13
|
+
export { validateHookUrl, isPrivateIp, type SsrfValidationResult } from './ssrf-guard.js';
|
|
14
|
+
export { HOOK_EXIT_CODES, classifyHookExit, type HookExitCode } from './exit-codes.js';
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook Security Module
|
|
3
|
+
*
|
|
4
|
+
* Re-exports all security primitives for the hook system:
|
|
5
|
+
* - Config snapshot (deep-freeze at startup)
|
|
6
|
+
* - SSRF guard (private IP / DNS rebinding protection)
|
|
7
|
+
* - Exit code semantics (success / user_error / model_blocking)
|
|
8
|
+
*
|
|
9
|
+
* @module hooks/security
|
|
10
|
+
* @see IMP-07 Hook Security Hardening
|
|
11
|
+
*/
|
|
12
|
+
export { captureHooksConfigSnapshot, deepFreeze } from './config-snapshot.js';
|
|
13
|
+
export { validateHookUrl, isPrivateIp } from './ssrf-guard.js';
|
|
14
|
+
export { HOOK_EXIT_CODES, classifyHookExit } from './exit-codes.js';
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SSRF Guard for Hook URLs
|
|
3
|
+
*
|
|
4
|
+
* Blocks hooks from hitting private/internal IP ranges.
|
|
5
|
+
* Validates both direct IP addresses and DNS-resolved addresses
|
|
6
|
+
* to prevent DNS rebinding attacks.
|
|
7
|
+
*
|
|
8
|
+
* @module hooks/security/ssrf-guard
|
|
9
|
+
* @see IMP-07 Hook Security Hardening
|
|
10
|
+
*/
|
|
11
|
+
export interface SsrfValidationResult {
|
|
12
|
+
safe: boolean;
|
|
13
|
+
reason?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Check if an IP address is in a private/reserved range.
|
|
17
|
+
*/
|
|
18
|
+
export declare function isPrivateIp(ip: string): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Validate a hook URL for SSRF safety.
|
|
21
|
+
* Blocks private IPs both as direct addresses and via DNS resolution.
|
|
22
|
+
* Disabled via AQE_HOOKS_SSRF_DISABLED=true (dev mode only).
|
|
23
|
+
*/
|
|
24
|
+
export declare function validateHookUrl(url: string): Promise<SsrfValidationResult>;
|
|
25
|
+
//# sourceMappingURL=ssrf-guard.d.ts.map
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SSRF Guard for Hook URLs
|
|
3
|
+
*
|
|
4
|
+
* Blocks hooks from hitting private/internal IP ranges.
|
|
5
|
+
* Validates both direct IP addresses and DNS-resolved addresses
|
|
6
|
+
* to prevent DNS rebinding attacks.
|
|
7
|
+
*
|
|
8
|
+
* @module hooks/security/ssrf-guard
|
|
9
|
+
* @see IMP-07 Hook Security Hardening
|
|
10
|
+
*/
|
|
11
|
+
import { isIP } from 'net';
|
|
12
|
+
import { lookup } from 'dns/promises';
|
|
13
|
+
const PRIVATE_RANGES = [
|
|
14
|
+
/^10\./,
|
|
15
|
+
/^172\.(1[6-9]|2\d|3[01])\./,
|
|
16
|
+
/^192\.168\./,
|
|
17
|
+
/^127\./,
|
|
18
|
+
/^0\./,
|
|
19
|
+
/^169\.254\./,
|
|
20
|
+
/^::1$/,
|
|
21
|
+
/^fc00:/,
|
|
22
|
+
/^fe80:/,
|
|
23
|
+
/^fd[0-9a-f]{2}:/i,
|
|
24
|
+
];
|
|
25
|
+
/**
|
|
26
|
+
* Check if an IP address is in a private/reserved range.
|
|
27
|
+
*/
|
|
28
|
+
export function isPrivateIp(ip) {
|
|
29
|
+
return PRIVATE_RANGES.some(r => r.test(ip));
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Validate a hook URL for SSRF safety.
|
|
33
|
+
* Blocks private IPs both as direct addresses and via DNS resolution.
|
|
34
|
+
* Disabled via AQE_HOOKS_SSRF_DISABLED=true (dev mode only).
|
|
35
|
+
*/
|
|
36
|
+
export async function validateHookUrl(url) {
|
|
37
|
+
if (process.env.AQE_HOOKS_SSRF_DISABLED === 'true') {
|
|
38
|
+
return { safe: true };
|
|
39
|
+
}
|
|
40
|
+
let parsed;
|
|
41
|
+
try {
|
|
42
|
+
parsed = new URL(url);
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
return { safe: false, reason: `Invalid URL: ${url}` };
|
|
46
|
+
}
|
|
47
|
+
// Strip IPv6 brackets — URL.hostname wraps IPv6 as "[::1]" but
|
|
48
|
+
// isIP() and our regex patterns expect the bare address "::1".
|
|
49
|
+
const hostname = parsed.hostname.replace(/^\[|\]$/g, '');
|
|
50
|
+
// Direct IP check
|
|
51
|
+
if (isIP(hostname)) {
|
|
52
|
+
if (isPrivateIp(hostname)) {
|
|
53
|
+
return { safe: false, reason: `Private IP blocked: ${hostname}` };
|
|
54
|
+
}
|
|
55
|
+
return { safe: true };
|
|
56
|
+
}
|
|
57
|
+
// DNS resolution check (prevents DNS rebinding)
|
|
58
|
+
try {
|
|
59
|
+
const resolved = await lookup(hostname);
|
|
60
|
+
if (isPrivateIp(resolved.address)) {
|
|
61
|
+
return { safe: false, reason: `DNS resolves to private IP: ${resolved.address}` };
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
catch (err) {
|
|
65
|
+
return { safe: false, reason: `DNS lookup failed for ${hostname}: ${err.message}` };
|
|
66
|
+
}
|
|
67
|
+
return { safe: true };
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=ssrf-guard.js.map
|
|
@@ -44,9 +44,11 @@ export declare class AgentsInstaller {
|
|
|
44
44
|
private sourceAgentsDir;
|
|
45
45
|
constructor(options: AgentsInstallerOptions);
|
|
46
46
|
/**
|
|
47
|
-
* Find the source agents directory
|
|
48
|
-
*
|
|
49
|
-
*
|
|
47
|
+
* Find the source agents directory.
|
|
48
|
+
*
|
|
49
|
+
* Uses findPackageRoot() to reliably locate the package root regardless
|
|
50
|
+
* of esbuild bundle depth (dist/init/, dist/cli/, dist/cli/chunks/, etc.).
|
|
51
|
+
* Prioritises assets/agents/v3/ (canonical npm source with helpers/) over .claude/agents/v3/.
|
|
50
52
|
*/
|
|
51
53
|
private findSourceAgentsDir;
|
|
52
54
|
/**
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
* Agents are copied from .claude/agents/v3/ to the project's .claude/agents/v3/.
|
|
7
7
|
*/
|
|
8
8
|
import { existsSync, mkdirSync, readdirSync, statSync, readFileSync, writeFileSync, copyFileSync } from 'fs';
|
|
9
|
-
import { join
|
|
10
|
-
import { fileURLToPath } from 'url';
|
|
9
|
+
import { join } from 'path';
|
|
11
10
|
import { toErrorMessage } from '../shared/error-utils.js';
|
|
12
11
|
import { loadOverlays, applyOverlayToContent } from '../agents/overlay-loader.js';
|
|
13
12
|
import { validateFleetMcpDeps } from '../validation/steps/agent-mcp-validator.js';
|
|
13
|
+
import { findPackageRoot } from './find-package-root.js';
|
|
14
14
|
// ============================================================================
|
|
15
15
|
// Helpers
|
|
16
16
|
// ============================================================================
|
|
@@ -147,47 +147,22 @@ export class AgentsInstaller {
|
|
|
147
147
|
this.sourceAgentsDir = this.findSourceAgentsDir();
|
|
148
148
|
}
|
|
149
149
|
/**
|
|
150
|
-
* Find the source agents directory
|
|
151
|
-
*
|
|
152
|
-
*
|
|
150
|
+
* Find the source agents directory.
|
|
151
|
+
*
|
|
152
|
+
* Uses findPackageRoot() to reliably locate the package root regardless
|
|
153
|
+
* of esbuild bundle depth (dist/init/, dist/cli/, dist/cli/chunks/, etc.).
|
|
154
|
+
* Prioritises assets/agents/v3/ (canonical npm source with helpers/) over .claude/agents/v3/.
|
|
153
155
|
*/
|
|
154
156
|
findSourceAgentsDir() {
|
|
155
|
-
|
|
156
|
-
const
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
// This is the canonical source with helpers/ directory
|
|
162
|
-
join(moduleDir, '../../assets/agents/v3'),
|
|
163
|
-
// Development: src/init/ or dist/init/ -> project root .claude/agents/v3
|
|
164
|
-
join(moduleDir, '../../.claude/agents/v3'),
|
|
165
|
-
// Local install: in node_modules
|
|
166
|
-
join(this.projectRoot, 'node_modules/agentic-qe/assets/agents/v3'),
|
|
167
|
-
join(this.projectRoot, 'node_modules/agentic-qe/assets/agents/v3'),
|
|
168
|
-
];
|
|
169
|
-
// For global npm installs, add common global node_modules paths
|
|
170
|
-
// Note: We use platform-based heuristics instead of npm prefix lookup
|
|
171
|
-
// to avoid dynamic require issues in ESM bundles
|
|
172
|
-
const homeDir = process.env.HOME || process.env.USERPROFILE || '';
|
|
173
|
-
const isWindows = process.platform === 'win32';
|
|
174
|
-
if (isWindows) {
|
|
175
|
-
// Windows: npm global is typically in AppData
|
|
176
|
-
const appData = process.env.APPDATA || join(homeDir, 'AppData', 'Roaming');
|
|
177
|
-
possiblePaths.push(join(appData, 'npm/node_modules/agentic-qe/assets/agents/v3'), join(appData, 'npm/node_modules/agentic-qe/.claude/agents/v3'));
|
|
178
|
-
}
|
|
179
|
-
else {
|
|
180
|
-
// Unix/Linux/macOS: common global prefixes
|
|
181
|
-
const globalPrefixes = [
|
|
182
|
-
'/usr/local',
|
|
183
|
-
'/usr',
|
|
184
|
-
join(homeDir, '.npm-global'),
|
|
185
|
-
join(homeDir, '.nvm/versions/node', process.version),
|
|
186
|
-
];
|
|
187
|
-
for (const prefix of globalPrefixes) {
|
|
188
|
-
possiblePaths.push(join(prefix, 'lib/node_modules/agentic-qe/assets/agents/v3'), join(prefix, 'lib/node_modules/agentic-qe/.claude/agents/v3'), join(prefix, 'node_modules/agentic-qe/assets/agents/v3'), join(prefix, 'node_modules/agentic-qe/.claude/agents/v3'));
|
|
189
|
-
}
|
|
157
|
+
const pkgRoot = findPackageRoot(import.meta.url);
|
|
158
|
+
const possiblePaths = [];
|
|
159
|
+
if (pkgRoot) {
|
|
160
|
+
// Canonical npm source — assets/ contains helpers/ directory
|
|
161
|
+
possiblePaths.push(join(pkgRoot, 'assets/agents/v3'));
|
|
162
|
+
possiblePaths.push(join(pkgRoot, '.claude/agents/v3'));
|
|
190
163
|
}
|
|
164
|
+
// Local install: in node_modules
|
|
165
|
+
possiblePaths.push(join(this.projectRoot, 'node_modules/agentic-qe/assets/agents/v3'));
|
|
191
166
|
for (const agentsPath of possiblePaths) {
|
|
192
167
|
if (existsSync(agentsPath)) {
|
|
193
168
|
return agentsPath;
|
|
@@ -209,10 +184,9 @@ export class AgentsInstaller {
|
|
|
209
184
|
const exampleDest = join(overridesDir, '_example.yaml');
|
|
210
185
|
if (!existsSync(exampleDest)) {
|
|
211
186
|
try {
|
|
212
|
-
const
|
|
187
|
+
const pkgRoot = findPackageRoot(import.meta.url);
|
|
213
188
|
const templateSources = [
|
|
214
|
-
|
|
215
|
-
join(moduleDir, '..', 'assets', 'templates', 'agent-override-example.yaml'),
|
|
189
|
+
...(pkgRoot ? [join(pkgRoot, 'assets', 'templates', 'agent-override-example.yaml')] : []),
|
|
216
190
|
join(this.projectRoot, 'node_modules', 'agentic-qe', 'assets', 'templates', 'agent-override-example.yaml'),
|
|
217
191
|
];
|
|
218
192
|
for (const src of templateSources) {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared utility: find the agentic-qe package root directory.
|
|
3
|
+
*
|
|
4
|
+
* When esbuild bundles the CLI with code-splitting, `import.meta.url`
|
|
5
|
+
* resolves to `dist/cli/chunks/chunk-XXX.js` (3+ levels deep) instead
|
|
6
|
+
* of the expected `dist/init/skills-installer.js` (2 levels deep).
|
|
7
|
+
* Fixed `../../` traversals land at `dist/` instead of the package root,
|
|
8
|
+
* so skills/agents/helpers can't be found.
|
|
9
|
+
*
|
|
10
|
+
* This module walks up from the caller's directory until it finds a
|
|
11
|
+
* `package.json` with `name === "agentic-qe"`, which works regardless
|
|
12
|
+
* of how deep the bundle puts the calling file.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Find the agentic-qe package root by walking up from `import.meta.url`.
|
|
16
|
+
*
|
|
17
|
+
* @param callerMetaUrl – pass `import.meta.url` from the calling module
|
|
18
|
+
* @param maxDepth – how many parent directories to check (default 10)
|
|
19
|
+
* @returns absolute path to the package root, or null if not found
|
|
20
|
+
*/
|
|
21
|
+
export declare function findPackageRoot(callerMetaUrl: string, maxDepth?: number): string | null;
|
|
22
|
+
//# sourceMappingURL=find-package-root.d.ts.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared utility: find the agentic-qe package root directory.
|
|
3
|
+
*
|
|
4
|
+
* When esbuild bundles the CLI with code-splitting, `import.meta.url`
|
|
5
|
+
* resolves to `dist/cli/chunks/chunk-XXX.js` (3+ levels deep) instead
|
|
6
|
+
* of the expected `dist/init/skills-installer.js` (2 levels deep).
|
|
7
|
+
* Fixed `../../` traversals land at `dist/` instead of the package root,
|
|
8
|
+
* so skills/agents/helpers can't be found.
|
|
9
|
+
*
|
|
10
|
+
* This module walks up from the caller's directory until it finds a
|
|
11
|
+
* `package.json` with `name === "agentic-qe"`, which works regardless
|
|
12
|
+
* of how deep the bundle puts the calling file.
|
|
13
|
+
*/
|
|
14
|
+
import { existsSync, readFileSync } from 'fs';
|
|
15
|
+
import { join, dirname } from 'path';
|
|
16
|
+
import { fileURLToPath } from 'url';
|
|
17
|
+
/**
|
|
18
|
+
* Find the agentic-qe package root by walking up from `import.meta.url`.
|
|
19
|
+
*
|
|
20
|
+
* @param callerMetaUrl – pass `import.meta.url` from the calling module
|
|
21
|
+
* @param maxDepth – how many parent directories to check (default 10)
|
|
22
|
+
* @returns absolute path to the package root, or null if not found
|
|
23
|
+
*/
|
|
24
|
+
export function findPackageRoot(callerMetaUrl, maxDepth = 10) {
|
|
25
|
+
let dir = dirname(fileURLToPath(callerMetaUrl));
|
|
26
|
+
for (let i = 0; i < maxDepth; i++) {
|
|
27
|
+
const pkgPath = join(dir, 'package.json');
|
|
28
|
+
if (existsSync(pkgPath)) {
|
|
29
|
+
try {
|
|
30
|
+
const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));
|
|
31
|
+
if (pkg.name === 'agentic-qe') {
|
|
32
|
+
return dir;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
// Malformed JSON — keep walking
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
const parent = dirname(dir);
|
|
40
|
+
if (parent === dir)
|
|
41
|
+
break; // filesystem root
|
|
42
|
+
dir = parent;
|
|
43
|
+
}
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=find-package-root.js.map
|
|
@@ -42,11 +42,13 @@ export declare class N8nInstaller {
|
|
|
42
42
|
private sourceSkillsDir;
|
|
43
43
|
constructor(options: N8nInstallerOptions);
|
|
44
44
|
/**
|
|
45
|
-
* Find the source n8n agents directory
|
|
45
|
+
* Find the source n8n agents directory.
|
|
46
|
+
* n8n agents live under .claude/agents/n8n/ in the package root.
|
|
46
47
|
*/
|
|
47
48
|
private findSourceAgentsDir;
|
|
48
49
|
/**
|
|
49
|
-
* Find the source skills directory
|
|
50
|
+
* Find the source skills directory.
|
|
51
|
+
* Skills are in assets/skills/ (canonical npm source).
|
|
50
52
|
*/
|
|
51
53
|
private findSourceSkillsDir;
|
|
52
54
|
/**
|
|
@@ -6,12 +6,9 @@
|
|
|
6
6
|
* Copies agent definitions from .claude/agents/n8n/ and installs n8n-specific skills.
|
|
7
7
|
*/
|
|
8
8
|
import { existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync, copyFileSync, } from 'fs';
|
|
9
|
-
import { join
|
|
10
|
-
import { fileURLToPath } from 'url';
|
|
9
|
+
import { join } from 'path';
|
|
11
10
|
import { toErrorMessage } from '../shared/error-utils.js';
|
|
12
|
-
|
|
13
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
14
|
-
const __dirname = dirname(__filename);
|
|
11
|
+
import { findPackageRoot } from './find-package-root.js';
|
|
15
12
|
// ============================================================================
|
|
16
13
|
// N8n Agent Categories
|
|
17
14
|
// ============================================================================
|
|
@@ -78,40 +75,43 @@ export class N8nInstaller {
|
|
|
78
75
|
// Source Directory Detection
|
|
79
76
|
// ==========================================================================
|
|
80
77
|
/**
|
|
81
|
-
* Find the source n8n agents directory
|
|
78
|
+
* Find the source n8n agents directory.
|
|
79
|
+
* n8n agents live under .claude/agents/n8n/ in the package root.
|
|
82
80
|
*/
|
|
83
81
|
findSourceAgentsDir() {
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
];
|
|
82
|
+
const pkgRoot = findPackageRoot(import.meta.url);
|
|
83
|
+
const possiblePaths = [];
|
|
84
|
+
if (pkgRoot) {
|
|
85
|
+
possiblePaths.push(join(pkgRoot, '.claude/agents/n8n'));
|
|
86
|
+
}
|
|
87
|
+
// Local install: in node_modules
|
|
88
|
+
possiblePaths.push(join(this.projectRoot, 'node_modules/agentic-qe/.claude/agents/n8n'));
|
|
92
89
|
for (const path of possiblePaths) {
|
|
93
90
|
if (existsSync(path)) {
|
|
94
91
|
return path;
|
|
95
92
|
}
|
|
96
93
|
}
|
|
97
|
-
|
|
98
|
-
return join(process.cwd(), '.claude/agents/n8n');
|
|
94
|
+
return possiblePaths[0];
|
|
99
95
|
}
|
|
100
96
|
/**
|
|
101
|
-
* Find the source skills directory
|
|
97
|
+
* Find the source skills directory.
|
|
98
|
+
* Skills are in assets/skills/ (canonical npm source).
|
|
102
99
|
*/
|
|
103
100
|
findSourceSkillsDir() {
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
join(
|
|
108
|
-
|
|
101
|
+
const pkgRoot = findPackageRoot(import.meta.url);
|
|
102
|
+
const possiblePaths = [];
|
|
103
|
+
if (pkgRoot) {
|
|
104
|
+
possiblePaths.push(join(pkgRoot, 'assets/skills'));
|
|
105
|
+
possiblePaths.push(join(pkgRoot, '.claude/skills'));
|
|
106
|
+
}
|
|
107
|
+
// Local install: in node_modules
|
|
108
|
+
possiblePaths.push(join(this.projectRoot, 'node_modules/agentic-qe/assets/skills'));
|
|
109
109
|
for (const path of possiblePaths) {
|
|
110
110
|
if (existsSync(path)) {
|
|
111
111
|
return path;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
return
|
|
114
|
+
return possiblePaths[0];
|
|
115
115
|
}
|
|
116
116
|
// ==========================================================================
|
|
117
117
|
// Installation
|
|
@@ -37,11 +37,6 @@ export declare class OpenCodeInstaller {
|
|
|
37
37
|
* globally-installed and bundled CLI paths all work correctly (#361).
|
|
38
38
|
*/
|
|
39
39
|
private findSourceDir;
|
|
40
|
-
/**
|
|
41
|
-
* Try to find the package root via require.resolve on our own package.json,
|
|
42
|
-
* then return <root>/.opencode. Returns null if resolution fails.
|
|
43
|
-
*/
|
|
44
|
-
private resolveViaPackageJson;
|
|
45
40
|
/**
|
|
46
41
|
* Check if a directory is a valid source for OpenCode assets
|
|
47
42
|
* (must exist and contain at least an agents/ or skills/ subdirectory)
|
|
@@ -5,13 +5,10 @@
|
|
|
5
5
|
* Installs OpenCode agents, skills, tools, and permissions to user projects
|
|
6
6
|
* when --with-opencode flag is used. Follows the N8n installer pattern.
|
|
7
7
|
*/
|
|
8
|
-
import { existsSync, mkdirSync, readdirSync,
|
|
9
|
-
import { join
|
|
10
|
-
import { fileURLToPath } from 'url';
|
|
8
|
+
import { existsSync, mkdirSync, readdirSync, writeFileSync, copyFileSync, } from 'fs';
|
|
9
|
+
import { join } from 'path';
|
|
11
10
|
import { toErrorMessage } from '../shared/error-utils.js';
|
|
12
|
-
|
|
13
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
14
|
-
const __dirname = dirname(__filename);
|
|
11
|
+
import { findPackageRoot } from './find-package-root.js';
|
|
15
12
|
// ============================================================================
|
|
16
13
|
// OpenCode Installer Class
|
|
17
14
|
// ============================================================================
|
|
@@ -40,14 +37,14 @@ export class OpenCodeInstaller {
|
|
|
40
37
|
*/
|
|
41
38
|
findSourceDir() {
|
|
42
39
|
const targetDir = join(this.projectRoot, '.opencode');
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
//
|
|
47
|
-
join(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
40
|
+
const pkgRoot = findPackageRoot(import.meta.url);
|
|
41
|
+
const possiblePaths = [];
|
|
42
|
+
if (pkgRoot) {
|
|
43
|
+
// OpenCode assets live at the package root .opencode/ directory
|
|
44
|
+
possiblePaths.push(join(pkgRoot, '.opencode'));
|
|
45
|
+
}
|
|
46
|
+
// Local install: in node_modules
|
|
47
|
+
possiblePaths.push(join(this.projectRoot, 'node_modules/agentic-qe/.opencode'));
|
|
51
48
|
for (const path of possiblePaths) {
|
|
52
49
|
// Never use the target directory as the source
|
|
53
50
|
if (path === targetDir)
|
|
@@ -57,31 +54,7 @@ export class OpenCodeInstaller {
|
|
|
57
54
|
}
|
|
58
55
|
}
|
|
59
56
|
// Return the first package path even if not found — install() will report the error
|
|
60
|
-
return possiblePaths[0] ?? join(
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Try to find the package root via require.resolve on our own package.json,
|
|
64
|
-
* then return <root>/.opencode. Returns null if resolution fails.
|
|
65
|
-
*/
|
|
66
|
-
resolveViaPackageJson() {
|
|
67
|
-
try {
|
|
68
|
-
// Walk up from __dirname to find the nearest package.json with our name
|
|
69
|
-
let dir = __dirname;
|
|
70
|
-
for (let i = 0; i < 5; i++) {
|
|
71
|
-
const pkgPath = join(dir, 'package.json');
|
|
72
|
-
if (existsSync(pkgPath)) {
|
|
73
|
-
const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));
|
|
74
|
-
if (pkg.name === 'agentic-qe') {
|
|
75
|
-
return join(dir, '.opencode');
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
dir = dirname(dir);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
catch {
|
|
82
|
-
// resolution failed
|
|
83
|
-
}
|
|
84
|
-
return null;
|
|
57
|
+
return possiblePaths[0] ?? join(this.projectRoot, 'node_modules/agentic-qe/.opencode');
|
|
85
58
|
}
|
|
86
59
|
/**
|
|
87
60
|
* Check if a directory is a valid source for OpenCode assets
|
|
@@ -40,8 +40,11 @@ export declare class SkillsInstaller {
|
|
|
40
40
|
private sourceSkillsDir;
|
|
41
41
|
constructor(options: SkillsInstallerOptions);
|
|
42
42
|
/**
|
|
43
|
-
* Find the source skills directory
|
|
44
|
-
*
|
|
43
|
+
* Find the source skills directory.
|
|
44
|
+
*
|
|
45
|
+
* Uses findPackageRoot() to reliably locate the package root regardless
|
|
46
|
+
* of esbuild bundle depth (dist/init/, dist/cli/, dist/cli/chunks/, etc.).
|
|
47
|
+
* Prioritises assets/skills/ (canonical npm source) over .claude/skills/.
|
|
45
48
|
*/
|
|
46
49
|
private findSourceSkillsDir;
|
|
47
50
|
/**
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* Skills are copied from the bundled skills directory to the project's .claude/skills/.
|
|
7
7
|
*/
|
|
8
8
|
import { existsSync, mkdirSync, readdirSync, statSync, readFileSync, writeFileSync, copyFileSync, unlinkSync, rmdirSync } from 'fs';
|
|
9
|
-
import { join
|
|
10
|
-
import { fileURLToPath } from 'url';
|
|
9
|
+
import { join } from 'path';
|
|
11
10
|
import { toErrorMessage } from '../shared/error-utils.js';
|
|
11
|
+
import { findPackageRoot } from './find-package-root.js';
|
|
12
12
|
// ============================================================================
|
|
13
13
|
// Skill Categories (QE Skills Only - Claude Flow skills are managed separately)
|
|
14
14
|
// ============================================================================
|
|
@@ -135,44 +135,22 @@ export class SkillsInstaller {
|
|
|
135
135
|
this.sourceSkillsDir = this.findSourceSkillsDir();
|
|
136
136
|
}
|
|
137
137
|
/**
|
|
138
|
-
* Find the source skills directory
|
|
139
|
-
*
|
|
138
|
+
* Find the source skills directory.
|
|
139
|
+
*
|
|
140
|
+
* Uses findPackageRoot() to reliably locate the package root regardless
|
|
141
|
+
* of esbuild bundle depth (dist/init/, dist/cli/, dist/cli/chunks/, etc.).
|
|
142
|
+
* Prioritises assets/skills/ (canonical npm source) over .claude/skills/.
|
|
140
143
|
*/
|
|
141
144
|
findSourceSkillsDir() {
|
|
142
|
-
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
join(
|
|
148
|
-
// NPM package: assets directory at package root (dist/init -> dist -> package root)
|
|
149
|
-
join(moduleDir, '../../assets/skills'),
|
|
150
|
-
// Local install: in node_modules
|
|
151
|
-
join(this.projectRoot, 'node_modules/agentic-qe/assets/skills'),
|
|
152
|
-
join(this.projectRoot, 'node_modules/agentic-qe/assets/skills'),
|
|
153
|
-
];
|
|
154
|
-
// For global npm installs, add common global node_modules paths
|
|
155
|
-
// Note: We use platform-based heuristics instead of npm prefix lookup
|
|
156
|
-
// to avoid dynamic require issues in ESM bundles
|
|
157
|
-
const homeDir = process.env.HOME || process.env.USERPROFILE || '';
|
|
158
|
-
const isWindows = process.platform === 'win32';
|
|
159
|
-
if (isWindows) {
|
|
160
|
-
// Windows: npm global is typically in AppData
|
|
161
|
-
const appData = process.env.APPDATA || join(homeDir, 'AppData', 'Roaming');
|
|
162
|
-
possiblePaths.push(join(appData, 'npm/node_modules/agentic-qe/assets/skills'), join(appData, 'npm/node_modules/agentic-qe/.claude/skills'));
|
|
163
|
-
}
|
|
164
|
-
else {
|
|
165
|
-
// Unix/Linux/macOS: common global prefixes
|
|
166
|
-
const globalPrefixes = [
|
|
167
|
-
'/usr/local',
|
|
168
|
-
'/usr',
|
|
169
|
-
join(homeDir, '.npm-global'),
|
|
170
|
-
join(homeDir, '.nvm/versions/node', process.version),
|
|
171
|
-
];
|
|
172
|
-
for (const prefix of globalPrefixes) {
|
|
173
|
-
possiblePaths.push(join(prefix, 'lib/node_modules/agentic-qe/assets/skills'), join(prefix, 'lib/node_modules/agentic-qe/.claude/skills'), join(prefix, 'node_modules/agentic-qe/assets/skills'), join(prefix, 'node_modules/agentic-qe/.claude/skills'));
|
|
174
|
-
}
|
|
145
|
+
const pkgRoot = findPackageRoot(import.meta.url);
|
|
146
|
+
const possiblePaths = [];
|
|
147
|
+
if (pkgRoot) {
|
|
148
|
+
// Canonical npm source — assets/ is never a dotfile, always extracted
|
|
149
|
+
possiblePaths.push(join(pkgRoot, 'assets/skills'));
|
|
150
|
+
possiblePaths.push(join(pkgRoot, '.claude/skills'));
|
|
175
151
|
}
|
|
152
|
+
// Local install: in node_modules
|
|
153
|
+
possiblePaths.push(join(this.projectRoot, 'node_modules/agentic-qe/assets/skills'));
|
|
176
154
|
for (const skillsPath of possiblePaths) {
|
|
177
155
|
if (existsSync(skillsPath)) {
|
|
178
156
|
return skillsPath;
|