agentic-qe 3.13.10 → 3.13.11
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/helpers/.helpers-version +1 -1
- package/.claude/helpers/auto-memory-hook.mjs +1 -1
- package/.claude/helpers/helpers.manifest.json +6 -6
- package/.claude/helpers/hook-handler.cjs +30 -0
- package/.claude/helpers/intelligence.cjs +121 -10
- package/.claude/helpers/statusline.cjs +737 -8
- package/CHANGELOG.md +38 -0
- package/README.md +1 -0
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/agents/claim-verifier/claim-verifier-service.js +4 -4
- package/dist/agents/claim-verifier/index.js +6 -6
- package/dist/agents/claim-verifier/verifiers/file-verifier.js +1 -1
- package/dist/agents/claim-verifier/verifiers/index.js +3 -3
- package/dist/agents/claim-verifier/verifiers/output-verifier.js +1 -1
- package/dist/causal-discovery/causal-graph.js +2 -2
- package/dist/causal-discovery/discovery-engine.js +2 -2
- package/dist/causal-discovery/weight-matrix.js +2 -2
- package/dist/cli/bundle.js +5 -5
- package/dist/cli/chunks/adapter-YBSKQFQ4.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-AWNQ6KB3.js → agent-booster-wasm-5ARDZYNO.js} +2 -2
- package/dist/cli/chunks/{agent-handler-RSHQZHPS.js → agent-handler-SVKEPF7B.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-FU7Y3TQ3.js → agent-memory-branch-QDL7OVHC.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-3H7DRDD4.js +2 -0
- package/dist/cli/chunks/{arena-LOK2WYHC.js → arena-7OCKBN6O.js} +2 -2
- package/dist/cli/chunks/{arena-XQOCNKB6.js → arena-HQLSNQZ3.js} +4 -4
- package/dist/cli/chunks/{audit-6ZS4EAD2.js → audit-2EQJW5UE.js} +3 -3
- package/dist/cli/chunks/base-ZTD6PFD7.js +2 -0
- package/dist/cli/chunks/{better-sqlite3-IMBCIZK3.js → better-sqlite3-OBFNNE4T.js} +2 -2
- package/dist/cli/chunks/{brain-handler-3U6BH4EO.js → brain-handler-FV2AJZ4A.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-CJBPVBXM.js → branch-enumerator-6B4L5O3D.js} +2 -2
- package/dist/cli/chunks/{browser-M4VW3KJY.js → browser-VDMGBWNK.js} +2 -2
- package/dist/cli/chunks/browser-workflow-GKWDM25H.js +2 -0
- package/dist/cli/chunks/{chunk-Q7QKJY6Y.js → chunk-23E37MDA.js} +2 -2
- package/dist/cli/chunks/{chunk-SWZUMHIQ.js → chunk-24XW7KUX.js} +2 -2
- package/dist/cli/chunks/{chunk-DZNK4EM7.js → chunk-2BDTZYQN.js} +3 -3
- package/dist/cli/chunks/{chunk-UNXPBIX5.js → chunk-2CBEQV6R.js} +2 -2
- package/dist/cli/chunks/{chunk-GSN4QIDI.js → chunk-2D7SBOZ4.js} +2 -2
- package/dist/cli/chunks/chunk-2E2QCIGR.js +12 -0
- package/dist/cli/chunks/{chunk-U5WFVIKL.js → chunk-2E3PRDEX.js} +2 -2
- package/dist/cli/chunks/{chunk-35CHBX6K.js → chunk-2HT5HRAA.js} +2 -2
- package/dist/cli/chunks/{chunk-37GWETSW.js → chunk-2Y3PW5EJ.js} +2 -2
- package/dist/cli/chunks/{chunk-K6SXDKWV.js → chunk-36ONUM43.js} +1 -1
- package/dist/cli/chunks/{chunk-LPVHYZAE.js → chunk-3SPYI7TS.js} +1 -1
- package/dist/cli/chunks/{chunk-KBOGA4GA.js → chunk-4CTKRLRX.js} +2 -2
- package/dist/cli/chunks/{chunk-7XWFAPPI.js → chunk-4DTBGQWA.js} +2 -2
- package/dist/cli/chunks/{chunk-WK5MKY45.js → chunk-4TJJU5Y2.js} +3 -3
- package/dist/cli/chunks/{chunk-2FPHM356.js → chunk-4TUGQESL.js} +2 -2
- package/dist/cli/chunks/{chunk-H633BGA7.js → chunk-4X4GTEQY.js} +1 -1
- package/dist/cli/chunks/{chunk-YALYPHSG.js → chunk-4ZQOJ7Q2.js} +2 -2
- package/dist/cli/chunks/{chunk-HEY2ZRL7.js → chunk-5364DBZG.js} +2 -2
- package/dist/cli/chunks/{chunk-U6YDS37V.js → chunk-76NSSNB3.js} +2 -2
- package/dist/cli/chunks/{chunk-Q26QKZYI.js → chunk-7HTYM6XY.js} +2 -2
- package/dist/cli/chunks/{chunk-J6H2LUBM.js → chunk-7YL7P5XG.js} +2 -2
- package/dist/cli/chunks/{chunk-BTG5UFMA.js → chunk-AAPJG3WI.js} +2 -2
- package/dist/cli/chunks/{chunk-YC5UJVV3.js → chunk-AFXMTSO3.js} +1 -1
- package/dist/cli/chunks/{chunk-WIB6KRFJ.js → chunk-AHG2O5HT.js} +2 -2
- package/dist/cli/chunks/{chunk-U562TIMO.js → chunk-ATRUE6CT.js} +2 -2
- package/dist/cli/chunks/{chunk-YHAUBZ4H.js → chunk-AZVV7POX.js} +3 -3
- package/dist/cli/chunks/{chunk-GRTU5QOT.js → chunk-B646CE3C.js} +2 -2
- package/dist/cli/chunks/{chunk-7JK57AI2.js → chunk-BL5BHBXR.js} +1 -1
- package/dist/cli/chunks/{chunk-JMF3FMAO.js → chunk-BPPEN7SS.js} +2 -2
- package/dist/cli/chunks/{chunk-FC47FRFI.js → chunk-BVKFBJX6.js} +4 -4
- package/dist/cli/chunks/{chunk-6SM74KJI.js → chunk-CK7ZLMD2.js} +1 -1
- package/dist/cli/chunks/{chunk-OZO2JUEK.js → chunk-CTS545BF.js} +1 -1
- package/dist/cli/chunks/chunk-CYQRZ645.js +2 -0
- package/dist/cli/chunks/{chunk-C5CP66K5.js → chunk-DLL3AJH7.js} +1 -1
- package/dist/cli/chunks/{chunk-IHNPXNFG.js → chunk-DMHQ4ZUZ.js} +2 -2
- package/dist/cli/chunks/{chunk-2HMBDTSI.js → chunk-DPZ4AU6W.js} +2 -2
- package/dist/cli/chunks/{chunk-UL6PT654.js → chunk-DXQMVATY.js} +2 -2
- package/dist/cli/chunks/{chunk-IJ3HHUSD.js → chunk-E54QUKAD.js} +2 -2
- package/dist/cli/chunks/{chunk-6C5WRBGZ.js → chunk-EHZQIXH6.js} +3 -3
- package/dist/cli/chunks/{chunk-G427QR5W.js → chunk-EI4KYBNI.js} +2 -2
- package/dist/cli/chunks/{chunk-PVGOOKBF.js → chunk-EKFKQGIT.js} +1 -1
- package/dist/cli/chunks/{chunk-YO63NTJV.js → chunk-EN36AFRJ.js} +1 -1
- package/dist/cli/chunks/{chunk-ATSVI6T4.js → chunk-EWH7PFV6.js} +1 -1
- package/dist/cli/chunks/{chunk-2LGQNT6Q.js → chunk-FBASWZ7G.js} +1 -1
- package/dist/cli/chunks/{chunk-HZIT42TM.js → chunk-FPX4JSFH.js} +2 -2
- package/dist/cli/chunks/{chunk-A233TTUX.js → chunk-FXKOHZBN.js} +1 -1
- package/dist/cli/chunks/{chunk-2E35LWYJ.js → chunk-GJTGHVAX.js} +4 -4
- package/dist/cli/chunks/{chunk-4EWKERKV.js → chunk-GP5QBJVO.js} +2 -2
- package/dist/cli/chunks/{chunk-JPDJARGR.js → chunk-GPJDZFFV.js} +2 -2
- package/dist/cli/chunks/{chunk-T7OS4CB4.js → chunk-GWTGBQ6X.js} +2 -2
- package/dist/cli/chunks/{chunk-FOWBKCRK.js → chunk-H3AKF2HS.js} +10 -10
- package/dist/cli/chunks/{chunk-PGJHCCR6.js → chunk-H3BHOIT6.js} +3 -3
- package/dist/cli/chunks/{chunk-BB4LWAAH.js → chunk-H5DS7S4B.js} +2 -2
- package/dist/cli/chunks/{chunk-2CLM53W2.js → chunk-H7QWOJF2.js} +2 -2
- package/dist/cli/chunks/{chunk-66BUC3JG.js → chunk-HGPMS6JL.js} +2 -2
- package/dist/cli/chunks/{chunk-3E3YLEHB.js → chunk-HHEWINDL.js} +1 -1
- package/dist/cli/chunks/{chunk-EKZNA6HW.js → chunk-HV6LJ57R.js} +1 -1
- package/dist/cli/chunks/{chunk-WFEHOEYP.js → chunk-HZR4G6I3.js} +1 -1
- package/dist/cli/chunks/{chunk-CPXZC7LF.js → chunk-IGW5L7YM.js} +1 -1
- package/dist/cli/chunks/{chunk-74QKFILD.js → chunk-IYMV4CU5.js} +2 -2
- package/dist/cli/chunks/{chunk-HL5RC5YB.js → chunk-IZF3VLNW.js} +1 -1
- package/dist/cli/chunks/{chunk-JUVW4DOU.js → chunk-IZOWGVTU.js} +2 -2
- package/dist/cli/chunks/{chunk-XPUPST5T.js → chunk-JGXP67BP.js} +1 -1
- package/dist/cli/chunks/{chunk-IYLSML27.js → chunk-JK6ENS3J.js} +2 -2
- package/dist/cli/chunks/{chunk-OSWAQX4G.js → chunk-JKP2BUF5.js} +2 -2
- package/dist/cli/chunks/{chunk-PSBQRTNF.js → chunk-JKPMV5VB.js} +5 -5
- package/dist/cli/chunks/{chunk-NCX4W65B.js → chunk-JTQSXU6V.js} +6 -6
- package/dist/cli/chunks/{chunk-4PRQMFVO.js → chunk-JWT675RM.js} +2 -2
- package/dist/cli/chunks/{chunk-AJQGNQ3W.js → chunk-K652SCBA.js} +2 -2
- package/dist/cli/chunks/{chunk-C5HYQTD7.js → chunk-LIGDJP6H.js} +1 -1
- package/dist/cli/chunks/{chunk-BM5BSYPW.js → chunk-LLP3UW62.js} +2 -2
- package/dist/cli/chunks/{chunk-VWZ743HH.js → chunk-LM727BVL.js} +4 -4
- package/dist/cli/chunks/{chunk-7XCRPSSU.js → chunk-LPDT27EC.js} +2 -2
- package/dist/cli/chunks/{chunk-KQVTTP2S.js → chunk-LREIHR2A.js} +2 -2
- package/dist/cli/chunks/{chunk-W3DCBOLL.js → chunk-LUAXQB57.js} +1 -1
- package/dist/cli/chunks/{chunk-CCAY7Q56.js → chunk-M3MRFZKD.js} +1 -1
- package/dist/cli/chunks/{chunk-RQTXQ6C7.js → chunk-MS5CAEPA.js} +2 -2
- package/dist/cli/chunks/chunk-MUAW4AJ6.js +21 -0
- package/dist/cli/chunks/{chunk-UHHWEWDA.js → chunk-MWTFFGU3.js} +2 -2
- package/dist/cli/chunks/{chunk-JWV5ZM2S.js → chunk-NC7HTDH5.js} +2 -2
- package/dist/cli/chunks/{chunk-VUCCPPQ6.js → chunk-NHL37QAZ.js} +2 -2
- package/dist/cli/chunks/{chunk-EP2HOAEB.js → chunk-OJUI65TR.js} +2 -2
- package/dist/cli/chunks/{chunk-FOPLJRWL.js → chunk-OLPJGYO5.js} +2 -2
- package/dist/cli/chunks/{chunk-2HEHM2KV.js → chunk-OQWG7GOD.js} +2 -2
- package/dist/cli/chunks/{chunk-BFX3N7KU.js → chunk-P736OKQN.js} +1 -1
- package/dist/cli/chunks/{chunk-O5QZB2AP.js → chunk-PADCR4LY.js} +2 -2
- package/dist/cli/chunks/{chunk-6L36EHM2.js → chunk-PBJ5I2NS.js} +2 -2
- package/dist/cli/chunks/{chunk-4TSLLWE7.js → chunk-PJNIDDER.js} +1 -1
- package/dist/cli/chunks/{chunk-EJRDL5W5.js → chunk-PT6U3IIK.js} +2 -2
- package/dist/cli/chunks/{chunk-JGXU5FUZ.js → chunk-PZHAPI47.js} +3 -3
- package/dist/cli/chunks/{chunk-DR4V75BF.js → chunk-QYHRDBKI.js} +2 -2
- package/dist/cli/chunks/{chunk-ZAEUW3Q4.js → chunk-RAV2NJNX.js} +1 -1
- package/dist/cli/chunks/{chunk-NRD76M7A.js → chunk-RGUKQXKL.js} +2 -2
- package/dist/cli/chunks/{chunk-EE55ALFK.js → chunk-S3FNAHNC.js} +2 -2
- package/dist/cli/chunks/{chunk-F3AHUNWH.js → chunk-SJJFU7KK.js} +2 -2
- package/dist/cli/chunks/{chunk-MFGKSD44.js → chunk-SW56PB22.js} +2 -2
- package/dist/cli/chunks/{chunk-2FFCL4BK.js → chunk-T5M4TZRB.js} +3 -3
- package/dist/cli/chunks/{chunk-7QSGUJE2.js → chunk-TBO64O56.js} +1 -1
- package/dist/cli/chunks/{chunk-OLETDPH2.js → chunk-TCVEXQLL.js} +2 -2
- package/dist/cli/chunks/{chunk-PIV3QHGJ.js → chunk-TJ67B7S7.js} +2 -2
- package/dist/cli/chunks/{chunk-EZY3DAIX.js → chunk-TMY2Y7SC.js} +4 -4
- package/dist/cli/chunks/{chunk-7GZJMPTD.js → chunk-TU4BYSXR.js} +2 -2
- package/dist/cli/chunks/{chunk-GQ6H37RN.js → chunk-TZA45FI7.js} +2 -2
- package/dist/cli/chunks/{chunk-QHRMZP6J.js → chunk-U6G6RUFI.js} +1 -1
- package/dist/cli/chunks/{chunk-NL3KX4NE.js → chunk-UDFTDQ6C.js} +34 -29
- package/dist/cli/chunks/{chunk-4NXABNLF.js → chunk-UDSNWQQI.js} +1 -1
- package/dist/cli/chunks/{chunk-G7YD3BR3.js → chunk-UGFHEVG4.js} +2 -2
- package/dist/cli/chunks/{chunk-ZH3MVVXO.js → chunk-UJ2NRIAS.js} +2 -2
- package/dist/cli/chunks/{chunk-7NDJW2DU.js → chunk-UPMQHCC2.js} +1 -1
- package/dist/cli/chunks/{chunk-7BZUNNWC.js → chunk-UX5SM2PW.js} +1 -1
- package/dist/cli/chunks/{chunk-I3SBXWF2.js → chunk-UZ7OWJ75.js} +1 -1
- package/dist/cli/chunks/{chunk-KBJYXZI7.js → chunk-V7QZMOG3.js} +2 -2
- package/dist/cli/chunks/{chunk-PLJ72A3I.js → chunk-VC77SDNH.js} +2 -2
- package/dist/cli/chunks/{chunk-6FIWTBR5.js → chunk-VHNAN7E2.js} +1 -1
- package/dist/cli/chunks/{chunk-OZLMIEJC.js → chunk-VLW63UA2.js} +2 -2
- package/dist/cli/chunks/{chunk-QZOAU2N5.js → chunk-VNVGCJCS.js} +1 -1
- package/dist/cli/chunks/{chunk-KITVDY4T.js → chunk-VU3ARH4S.js} +1 -1
- package/dist/cli/chunks/{chunk-UHSIP4DJ.js → chunk-W2NQDAJZ.js} +2 -2
- package/dist/cli/chunks/{chunk-WKE2FUCP.js → chunk-W2T36CS5.js} +1 -1
- package/dist/cli/chunks/{chunk-H7AACUYS.js → chunk-W7BB4XLP.js} +2 -2
- package/dist/cli/chunks/{chunk-TIGBPVPZ.js → chunk-WINYWMQP.js} +1 -1
- package/dist/cli/chunks/{chunk-PUN3KZ6N.js → chunk-WJB6YYMJ.js} +2 -2
- package/dist/cli/chunks/{chunk-RCXC4YGL.js → chunk-WRMJWQUI.js} +1 -1
- package/dist/cli/chunks/{chunk-NZRKWUBM.js → chunk-WRZ5WZG3.js} +2 -2
- package/dist/cli/chunks/{chunk-RYHOV4E3.js → chunk-WVNLNXXI.js} +2 -2
- package/dist/cli/chunks/{chunk-WSPEAYPG.js → chunk-WYQM7GXW.js} +2 -2
- package/dist/cli/chunks/{chunk-54RIPGMC.js → chunk-XDK2TPI5.js} +1 -1
- package/dist/cli/chunks/{chunk-2SS2SSNZ.js → chunk-XEUUWOSS.js} +3 -3
- package/dist/cli/chunks/{chunk-IR7FZYPO.js → chunk-XVFSZLRS.js} +1 -1
- package/dist/cli/chunks/{chunk-MMA6Q6NF.js → chunk-XZI4QXJJ.js} +2 -2
- package/dist/cli/chunks/{chunk-MGJPS2YV.js → chunk-Y2S6SS7M.js} +2 -2
- package/dist/cli/chunks/{chunk-FBJUNJ2A.js → chunk-YDEYB6Z2.js} +1 -1
- package/dist/cli/chunks/{chunk-7QNN4GQU.js → chunk-YEPJS4AM.js} +2 -2
- package/dist/cli/chunks/{chunk-NBUBGYLE.js → chunk-YRCNWQBO.js} +2 -2
- package/dist/cli/chunks/{chunk-C656WHED.js → chunk-YRV45WDT.js} +2 -2
- package/dist/cli/chunks/{chunk-3I5ZTLFY.js → chunk-YXUFGDGS.js} +1 -1
- package/dist/cli/chunks/{chunk-JALFKAAD.js → chunk-YYAJEPRD.js} +1 -1
- package/dist/cli/chunks/{chunk-MMRORLMM.js → chunk-Z5ARI4XT.js} +2 -2
- package/dist/cli/chunks/{chunk-U5NKLMF4.js → chunk-ZNGFSR5M.js} +2 -2
- package/dist/cli/chunks/{ci-7QW7234M.js → ci-M6WYL2XY.js} +2 -2
- package/dist/cli/chunks/{ci-output-WGP4YKPQ.js → ci-output-JFC3WOHX.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-AOHSCJYO.js → circuit-breaker-IMVBU6WP.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-CIZ3TWR7.js → claude-flow-setup-M5T5ZUXX.js} +2 -2
- package/dist/cli/chunks/client-4Q5JE7RY.js +2 -0
- package/dist/cli/chunks/{cline-installer-J2QVGPJY.js → cline-installer-LSFAUHXC.js} +2 -2
- package/dist/cli/chunks/{code-WH26MFMB.js → code-N3SWJ3XL.js} +2 -2
- package/dist/cli/chunks/{code-index-extractor-DBOYEFZ4.js → code-index-extractor-WPGRG36B.js} +2 -2
- package/dist/cli/chunks/{codex-installer-MWYVGZC4.js → codex-installer-LKRCSDU5.js} +2 -2
- package/dist/cli/chunks/{completions-LNBHGWUS.js → completions-E5TBZ5AB.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-AMYCTQG2.js → complexity-analyzer-3FOSOELK.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-73EQPP37.js → continuedev-installer-ZSVFWMQB.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-JWSY2272.js → copilot-installer-POSKHPZM.js} +2 -2
- package/dist/cli/chunks/core-handlers-4GKEYGPS.js +2 -0
- package/dist/cli/chunks/{cost-tracker-XQVIORRZ.js → cost-tracker-3UWDCNGC.js} +2 -2
- package/dist/cli/chunks/{coverage-HYGJIQ25.js → coverage-HPBO67JF.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-PBJ2ZGPJ.js +2 -0
- package/dist/cli/chunks/{cursor-installer-DNPNJGZM.js → cursor-installer-DSW3L62X.js} +2 -2
- package/dist/cli/chunks/{daemon-GSOGO6L3.js → daemon-2622ZCMJ.js} +3 -3
- package/dist/cli/chunks/{daemon-6JNNBU33.js → daemon-33KTKDUM.js} +6 -6
- package/dist/cli/chunks/{dag-attention-scheduler-7SGPLKGI.js → dag-attention-scheduler-YFT5JMM6.js} +2 -2
- package/dist/cli/chunks/{detect-IXD77HG4.js → detect-COR3Q6BE.js} +2 -2
- package/dist/cli/chunks/{dist-node-ARTYK2HL.js → dist-node-5TRNTNWI.js} +2 -2
- package/dist/cli/chunks/{domain-handler-X4BOFLMY.js → domain-handler-TZC4GCF6.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-7JBEXLFL.js → domain-transfer-D2TENM3Y.js} +2 -2
- package/dist/cli/chunks/dream-4EXVFHUJ.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-VSOLKM3Y.js → embed-and-insert-pattern-COAZZGS6.js} +2 -2
- package/dist/cli/chunks/{eval-HS2QQW42.js → eval-5ID5D77H.js} +2 -2
- package/dist/cli/chunks/{experience-capture-middleware-MWEPZYBT.js → experience-capture-middleware-MT4Z74TD.js} +3 -3
- package/dist/cli/chunks/{fast-paths-RONNJ6AC.js → fast-paths-MACRZGSE.js} +2 -2
- package/dist/cli/chunks/{feature-flags-CLW4K2HN.js → feature-flags-JZX6ZBUX.js} +2 -2
- package/dist/cli/chunks/{feature-flags-4YE5A6XG.js → feature-flags-LFNL6BHS.js} +2 -2
- package/dist/cli/chunks/{file-discovery-56C2FW4V.js → file-discovery-DA5BEAO2.js} +2 -2
- package/dist/cli/chunks/{fleet-KMB6RM3R.js → fleet-35I4F7D2.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-R2OMDND4.js → gnn-wrapper-2W3HM3ZI.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-FP3CIA2V.js → heartbeat-handler-6O2D2FU2.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-UNEYR3WR.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-JQG66H4L.js +2 -0
- package/dist/cli/chunks/hnsw-index-2NOROILM.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-EQKXBLRX.js → hnsw-legacy-bridge-GWBXEMQR.js} +2 -2
- package/dist/cli/chunks/{hnswlib-node-JG3WOXKM.js → hnswlib-node-TZ4VLARU.js} +2 -2
- package/dist/cli/chunks/{hooks-6QZYELUZ.js → hooks-723GPTQ4.js} +40 -40
- package/dist/cli/chunks/hybrid-router-FXTAJATE.js +2 -0
- package/dist/cli/chunks/{hypergraph-engine-5HGNZFDH.js → hypergraph-engine-ILRYFJM5.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-LO2ODOYD.js → hypergraph-handler-523TSK4P.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-VHZSBWMT.js +2 -0
- package/dist/cli/chunks/{init-handler-E346YK6H.js → init-handler-RBDYIXNV.js} +6 -6
- package/dist/cli/chunks/init-wizard-EML4OET2.js +2 -0
- package/dist/cli/chunks/kernel-TMRJOEO2.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-ZBJNB6N4.js → kilocode-installer-E2QSX7Z7.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-3TWFO4QZ.js → kiro-installer-EZZLT2R5.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-FMKVCMJQ.js +2 -0
- package/dist/cli/chunks/{learning-3MLFLTM2.js → learning-II2U3EV2.js} +3 -3
- package/dist/cli/chunks/{llm-router-XCBGZRKA.js → llm-router-WC66OXZH.js} +4 -4
- package/dist/cli/chunks/llm-router-service-GOSVGMKM.js +2 -0
- package/dist/cli/chunks/{load-P6XC2P74.js → load-QFQ3YOBQ.js} +2 -2
- package/dist/cli/chunks/load-test-WIRGDZIA.js +2 -0
- package/dist/cli/chunks/{mcp-XEND7FPN.js → mcp-FPBBJJFY.js} +2 -2
- package/dist/cli/chunks/{memory-HZ2WSMWW.js → memory-RKN6KV75.js} +5 -5
- package/dist/cli/chunks/memory-backend-XBBIXDZU.js +2 -0
- package/dist/cli/chunks/{memory-handlers-EA5UFT4G.js → memory-handlers-SQHNK3DK.js} +2 -2
- package/dist/cli/chunks/{multi-model-executor-IYEHZP73.js → multi-model-executor-OUNW3JM5.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-GH3VVBM2.js → opencode-installer-FXETYGGY.js} +2 -2
- package/dist/cli/chunks/{orchestrator-GOKIBTQG.js → orchestrator-35UTVXSP.js} +5 -5
- package/dist/cli/chunks/pattern-null-store-PFLKHRVU.js +2 -0
- package/dist/cli/chunks/{pattern-usage-recorder-J2X4DD5S.js → pattern-usage-recorder-YEQDS7DN.js} +2 -2
- package/dist/cli/chunks/{pipeline-ELINTMVF.js → pipeline-YDJMWCAR.js} +2 -2
- package/dist/cli/chunks/{platform-PIPUB3LU.js → platform-L3LPNVKT.js} +2 -2
- package/dist/cli/chunks/{plugin-DXDNI6ZV.js → plugin-55EYFJH5.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-K6WWURGX.js → prime-radiant-advanced-wasm-SUZT6RTM.js} +2 -2
- package/dist/cli/chunks/protocol-executor-GAMNY2JB.js +2 -0
- package/dist/cli/chunks/{protocol-handler-NMO7VI64.js → protocol-handler-QNBFRJNY.js} +2 -2
- package/dist/cli/chunks/{prove-4BLOE4SC.js → prove-3X5NQP4L.js} +2 -2
- package/dist/cli/chunks/provider-manager-VTIG5AKU.js +2 -0
- package/dist/cli/chunks/qe-reasoning-bank-KAX63PXV.js +2 -0
- package/dist/cli/chunks/{quality-MYXBP3GX.js → quality-5ZONTNA6.js} +2 -2
- package/dist/cli/chunks/{quality-gate-AXPBK3MT.js → quality-gate-JPNREEVR.js} +3 -3
- package/dist/cli/chunks/queen-coordinator-UYW2MDKI.js +2 -0
- package/dist/cli/chunks/{real-embeddings-4AKAVZIY.js → real-embeddings-HHR75AR5.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-JE36LP4T.js → roocode-installer-ZK73O2GD.js} +2 -2
- package/dist/cli/chunks/router-NVDU7IIA.js +2 -0
- package/dist/cli/chunks/routing-feedback-KHR3J2J3.js +2 -0
- package/dist/cli/chunks/{routing-handler-LOJUJCVV.js → routing-handler-2UN5GRHJ.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-6PNDYF32.js → ruvector-commands-EQQUEVWN.js} +2 -2
- package/dist/cli/chunks/{rvf-dual-writer-GSTQPRNA.js → rvf-dual-writer-43L75WLF.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-adapter-Z2DSEG3E.js → rvf-migration-adapter-Y5OVCYTO.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-coordinator-XRNODDH4.js → rvf-migration-coordinator-NEPDFB3N.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-PQ4IOTZU.js +2 -0
- package/dist/cli/chunks/{rvf-store-integrity-LVEFIUUW.js → rvf-store-integrity-66FEC3MD.js} +2 -2
- package/dist/cli/chunks/safe-db-QHSFV63M.js +2 -0
- package/dist/cli/chunks/schedule-JGZFHJGM.js +2 -0
- package/dist/cli/chunks/scheduler-NGCDQIW5.js +2 -0
- package/dist/cli/chunks/{security-A2FK2DER.js → security-H7PEUUCV.js} +3 -3
- package/dist/cli/chunks/{shared-rvf-adapter-V7IBEGQQ.js → shared-rvf-adapter-XETNK4ID.js} +2 -2
- package/dist/cli/chunks/{shared-rvf-dual-writer-SMGECN2K.js → shared-rvf-dual-writer-PXD54BWJ.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-3JSNWL6I.js +2 -0
- package/dist/cli/chunks/{status-handler-UHY36LOR.js → status-handler-CTXOH3FX.js} +2 -2
- package/dist/cli/chunks/{structural-health-6BRP74EW.js → structural-health-EIFBDCRI.js} +2 -2
- package/dist/cli/chunks/{sync-4PDTGP34.js → sync-3SU4H6R3.js} +2 -2
- package/dist/cli/chunks/{sync-KI573HOR.js → sync-PECWQ64K.js} +2 -2
- package/dist/cli/chunks/{task-handler-QQGSAK6T.js → task-handler-ZTUAT6YF.js} +2 -2
- package/dist/cli/chunks/{task-handlers-VUPCDYTI.js → task-handlers-4RIO7LJJ.js} +3 -3
- package/dist/cli/chunks/{test-CJLXBSRH.js → test-EV7BSUTI.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-IKPQPQUB.js → test-scheduling-4WVI5DLE.js} +3 -3
- package/dist/cli/chunks/{token-bootstrap-FHLC3SHC.js → token-bootstrap-3P22AYZ4.js} +2 -2
- package/dist/cli/chunks/{token-usage-NCXAK7TB.js → token-usage-FR3JOWYB.js} +2 -2
- package/dist/cli/chunks/{transformers-SZFBEILB.js → transformers-FENO33LA.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-LFGJRML7.js → tree-sitter-wasm-parser-YFGJLSMB.js} +2 -2
- package/dist/cli/chunks/{types-NKXH7VTP.js → types-N3Y565RZ.js} +2 -2
- package/dist/cli/chunks/unified-memory-4VO5KSHP.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-ZR2FZXOB.js +2 -0
- package/dist/cli/chunks/unified-persistence-VFPW5MFM.js +2 -0
- package/dist/cli/chunks/{upgrade-PFCFH6M5.js → upgrade-33ZVVZFW.js} +2 -2
- package/dist/cli/chunks/{validate-YEBJRWQM.js → validate-CS5PXGDF.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-TD2NA6QF.js → validate-swarm-GRZPWYNM.js} +2 -2
- package/dist/cli/chunks/{vibium-ACC4GIOT.js → vibium-IO7N4VEE.js} +2 -2
- package/dist/cli/chunks/visual-security-SNADRUPR.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-IWVW5FIE.js → web-tree-sitter-UQXR5HHR.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-5PVGLJ3T.js → windsurf-installer-BCKLSLZT.js} +2 -2
- package/dist/cli/chunks/witness-chain-2TXUTEJE.js +2 -0
- package/dist/cli/chunks/{witness-chain-VZB4LJOJ.js → witness-chain-R3V26QWL.js} +2 -2
- package/dist/cli/chunks/{witness-key-manager-X632AZTN.js → witness-key-manager-Y36HMPEM.js} +2 -2
- package/dist/cli/chunks/{workflow-VNAYFUVY.js → workflow-4TCIUUFQ.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-ON6UYRVE.js +2 -0
- package/dist/cli/chunks/{wrappers-KO3QXNZP.js → wrappers-MD4JRHJH.js} +2 -2
- package/dist/cli/commands/daemon.js +3 -3
- package/dist/cli/commands/hooks-handlers/hooks-dream-learning.js +2 -2
- package/dist/cli/commands/hooks-handlers/routing-hooks.js +7 -0
- package/dist/cli/commands/plugin.js +4 -4
- package/dist/cli/commands/quality-gate.js +5 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/utils/index.js +2 -2
- package/dist/context/compaction/index.js +11 -11
- package/dist/context/compaction/tier1-microcompact.js +1 -1
- package/dist/context/compaction/tier2-session-summary.js +1 -1
- package/dist/context/compaction/tier3-llm-compact.js +1 -1
- package/dist/context/compaction/tier4-reactive.js +1 -1
- package/dist/coordination/claims/index.js +8 -8
- package/dist/coordination/consensus/consensus-engine.js +4 -4
- package/dist/coordination/consensus/factory.js +4 -4
- package/dist/coordination/consensus/index.js +8 -8
- package/dist/coordination/consensus/providers/claude-provider.js +1 -1
- package/dist/coordination/consensus/providers/gemini-provider.js +1 -1
- package/dist/coordination/consensus/providers/index.js +7 -7
- package/dist/coordination/consensus/providers/native-learning-provider.js +1 -1
- package/dist/coordination/consensus/providers/ollama-provider.js +1 -1
- package/dist/coordination/consensus/providers/openai-provider.js +1 -1
- package/dist/coordination/consensus/providers/openrouter-provider.js +1 -1
- package/dist/coordination/consensus/strategies/index.js +3 -3
- package/dist/coordination/cross-domain-router.js +2 -2
- package/dist/coordination/dynamic-scaling/dynamic-scaler.js +1 -1
- package/dist/coordination/dynamic-scaling/index.js +2 -2
- package/dist/coordination/fleet-tiers/index.js +3 -3
- package/dist/coordination/fleet-tiers/tier-selector.js +2 -2
- package/dist/coordination/handlers/code-intelligence-handlers.js +2 -2
- package/dist/coordination/handlers/coverage-collection.js +1 -1
- package/dist/coordination/handlers/coverage-handlers.js +3 -3
- package/dist/coordination/handlers/index.js +7 -7
- package/dist/coordination/handlers/misc-handlers.js +1 -1
- package/dist/coordination/handlers/quality-handlers.js +2 -2
- package/dist/coordination/handlers/requirements-handlers.js +2 -2
- package/dist/coordination/handlers/security-handlers.js +2 -2
- package/dist/coordination/handlers/test-execution-handlers.js +1 -1
- package/dist/coordination/index.js +20 -20
- package/dist/coordination/mincut/dream-integration.js +1 -1
- package/dist/coordination/mincut/index.js +14 -14
- package/dist/coordination/mincut/mincut-health-monitor.js +2 -2
- package/dist/coordination/mincut/mincut-persistence.js +1 -1
- package/dist/coordination/mincut/morphogenetic-growth.js +1 -1
- package/dist/coordination/mincut/neural-goap.js +1 -1
- package/dist/coordination/mincut/queen-integration.js +5 -5
- package/dist/coordination/mincut/shared-singleton.js +3 -3
- package/dist/coordination/mincut/strange-loop.js +1 -1
- package/dist/coordination/mincut/time-crystal.js +8 -8
- package/dist/coordination/mixins/consensus-enabled-domain.js +2 -2
- package/dist/coordination/mixins/index.js +3 -3
- package/dist/coordination/protocol-executor.js +2 -2
- package/dist/coordination/protocols/code-intelligence-index.js +4 -4
- package/dist/coordination/protocols/defect-investigation.js +2 -2
- package/dist/coordination/protocols/morning-sync.js +1 -1
- package/dist/coordination/protocols/quality-gate.js +2 -2
- package/dist/coordination/queen-coordinator.js +4 -4
- package/dist/coordination/queen-task-management.js +1 -1
- package/dist/coordination/services/index.js +1 -1
- package/dist/coordination/task-executor.js +6 -6
- package/dist/domains/chaos-resilience/coordinator.js +6 -6
- package/dist/domains/chaos-resilience/index.js +5 -5
- package/dist/domains/chaos-resilience/plugin.js +6 -6
- package/dist/domains/chaos-resilience/services/chaos-engineer.js +3 -3
- package/dist/domains/chaos-resilience/services/index.js +3 -3
- package/dist/domains/chaos-resilience/services/load-tester.js +2 -2
- package/dist/domains/chaos-resilience/services/performance-profiler.js +2 -2
- package/dist/domains/code-intelligence/coordinator-consensus.js +1 -1
- package/dist/domains/code-intelligence/coordinator-gnn.js +1 -1
- package/dist/domains/code-intelligence/coordinator-hypergraph.js +2 -2
- package/dist/domains/code-intelligence/coordinator.js +9 -9
- package/dist/domains/code-intelligence/index.js +7 -7
- package/dist/domains/code-intelligence/plugin.js +6 -6
- package/dist/domains/code-intelligence/services/c4-model/index.js +3 -3
- package/dist/domains/code-intelligence/services/impact-analyzer.js +2 -2
- package/dist/domains/code-intelligence/services/index.js +6 -6
- package/dist/domains/code-intelligence/services/knowledge-graph.js +4 -4
- package/dist/domains/code-intelligence/services/metric-collector/loc-counter.js +1 -1
- package/dist/domains/code-intelligence/services/metric-collector/test-counter.js +1 -1
- package/dist/domains/code-intelligence/services/product-factors-bridge.js +5 -5
- package/dist/domains/code-intelligence/services/semantic-analyzer.js +2 -2
- package/dist/domains/coverage-analysis/coordinator.js +9 -9
- package/dist/domains/coverage-analysis/index.js +10 -10
- package/dist/domains/coverage-analysis/plugin.js +4 -4
- package/dist/domains/coverage-analysis/services/coverage-analyzer.js +1 -1
- package/dist/domains/coverage-analysis/services/gap-detector.js +1 -1
- package/dist/domains/coverage-analysis/services/ghost-coverage-analyzer.js +1 -1
- package/dist/domains/coverage-analysis/services/index.js +7 -7
- package/dist/domains/coverage-analysis/services/risk-scorer.js +1 -1
- package/dist/domains/coverage-analysis/services/sublinear-analyzer.js +3 -3
- package/dist/domains/defect-intelligence/coordinator.js +5 -5
- package/dist/domains/defect-intelligence/index.js +5 -5
- package/dist/domains/defect-intelligence/plugin.js +6 -6
- package/dist/domains/defect-intelligence/services/causal-root-cause-analyzer.js +2 -2
- package/dist/domains/defect-intelligence/services/defect-predictor.js +4 -4
- package/dist/domains/defect-intelligence/services/index.js +4 -4
- package/dist/domains/defect-intelligence/services/pattern-learner.js +2 -2
- package/dist/domains/defect-intelligence/services/root-cause-analyzer.js +1 -1
- package/dist/domains/domain-interface.js +1 -1
- package/dist/domains/index.js +14 -14
- package/dist/domains/learning-optimization/coordinator.d.ts +3 -0
- package/dist/domains/learning-optimization/coordinator.js +6 -0
- package/dist/domains/learning-optimization/interfaces.d.ts +2 -0
- package/dist/domains/learning-optimization/plugin.d.ts +3 -0
- package/dist/domains/learning-optimization/plugin.js +5 -0
- package/dist/domains/quality-assessment/coherence/gate-controller.js +2 -2
- package/dist/domains/quality-assessment/coherence/lambda-calculator.js +1 -1
- package/dist/domains/quality-assessment/coherence/partition-detector.js +1 -1
- package/dist/domains/quality-assessment/coordinator-gate-evaluation.js +1 -1
- package/dist/domains/quality-assessment/coordinator-reports.js +1 -1
- package/dist/domains/quality-assessment/coordinator-rl-integration.js +2 -2
- package/dist/domains/quality-assessment/coordinator.js +5 -5
- package/dist/domains/quality-assessment/index.js +9 -9
- package/dist/domains/quality-assessment/plugin.js +6 -6
- package/dist/domains/quality-assessment/services/coherence-gate.js +6 -6
- package/dist/domains/quality-assessment/services/deployment-advisor.js +1 -1
- package/dist/domains/quality-assessment/services/index.js +4 -4
- package/dist/domains/quality-assessment/services/quality-analyzer.js +2 -2
- package/dist/domains/quality-assessment/services/quality-gate.js +1 -1
- package/dist/domains/requirements-validation/services/product-factors-assessment/analyzers/brutal-honesty-analyzer.js +2 -2
- package/dist/domains/requirements-validation/services/product-factors-assessment/analyzers/sfdipot-analyzer.js +2 -2
- package/dist/domains/requirements-validation/services/product-factors-assessment/code-intelligence/codebase-analyzer.js +1 -1
- package/dist/domains/requirements-validation/services/product-factors-assessment/formatters/gherkin-formatter.js +1 -1
- package/dist/domains/requirements-validation/services/product-factors-assessment/formatters/html-formatter.js +2 -2
- package/dist/domains/requirements-validation/services/product-factors-assessment/formatters/markdown-formatter.js +1 -1
- package/dist/domains/requirements-validation/services/product-factors-assessment/generators/question-generator.js +3 -3
- package/dist/domains/requirements-validation/services/product-factors-assessment/generators/test-idea-generator.js +3 -3
- package/dist/domains/requirements-validation/services/product-factors-assessment/patterns/domain-registry.js +1 -1
- package/dist/domains/requirements-validation/services/product-factors-assessment/patterns/index.js +1 -1
- package/dist/domains/requirements-validation/services/product-factors-assessment/skills/skill-integration.js +1 -1
- package/dist/domains/security-compliance/coordinator.js +1 -1
- package/dist/domains/security-compliance/index.js +1 -1
- package/dist/domains/security-compliance/services/compliance-validator.js +1 -1
- package/dist/domains/security-compliance/services/scanners/dast-helpers.js +1 -1
- package/dist/domains/security-compliance/services/scanners/dast-scanner.js +2 -2
- package/dist/domains/security-compliance/services/scanners/dependency-scanner.js +4 -4
- package/dist/domains/security-compliance/services/scanners/sast-scanner.js +3 -3
- package/dist/domains/security-compliance/services/scanners/scanner-orchestrator.js +2 -2
- package/dist/domains/test-execution/coordinator.js +8 -8
- package/dist/domains/test-execution/index.js +9 -9
- package/dist/domains/test-execution/interfaces.js +1 -1
- package/dist/domains/test-execution/plugin.js +3 -3
- package/dist/domains/test-execution/services/e2e/adaptive-locator-service.js +1 -1
- package/dist/domains/test-execution/services/e2e/assertion-handlers.js +2 -2
- package/dist/domains/test-execution/services/e2e/browser-orchestrator.js +3 -3
- package/dist/domains/test-execution/services/e2e/e2e-coordinator.js +7 -7
- package/dist/domains/test-execution/services/e2e/index.js +10 -10
- package/dist/domains/test-execution/services/e2e/step-executors.js +6 -6
- package/dist/domains/test-execution/services/e2e/step-retry-handler.js +3 -3
- package/dist/domains/test-execution/services/e2e/wait-condition-handler.js +1 -1
- package/dist/domains/test-execution/services/e2e-runner.js +6 -6
- package/dist/domains/test-execution/services/flaky-detector.js +1 -1
- package/dist/domains/test-execution/services/index.js +9 -9
- package/dist/domains/test-execution/services/retry-handler.js +1 -1
- package/dist/domains/test-execution/services/test-executor.js +1 -1
- package/dist/domains/test-execution/services/test-prioritizer.js +3 -3
- package/dist/domains/test-execution/services/user-flow-generator.js +3 -3
- package/dist/domains/test-execution/test-prioritization-types.js +1 -1
- package/dist/domains/test-execution/types/index.js +3 -3
- package/dist/domains/test-generation/coordinator.js +5 -5
- package/dist/domains/test-generation/factories/index.js +1 -1
- package/dist/domains/test-generation/factories/test-generator-factory.js +1 -1
- package/dist/domains/test-generation/generators/base-test-generator.js +1 -1
- package/dist/domains/test-generation/generators/go-test-generator.js +2 -2
- package/dist/domains/test-generation/generators/index.js +13 -13
- package/dist/domains/test-generation/generators/jest-vitest-generator.js +1 -1
- package/dist/domains/test-generation/generators/junit5-generator.js +2 -2
- package/dist/domains/test-generation/generators/kotlin-junit-generator.js +2 -2
- package/dist/domains/test-generation/generators/mocha-generator.js +1 -1
- package/dist/domains/test-generation/generators/node-test-generator.js +1 -1
- package/dist/domains/test-generation/generators/pytest-generator.js +2 -2
- package/dist/domains/test-generation/generators/rust-test-generator.js +3 -3
- package/dist/domains/test-generation/generators/swift-testing-generator.js +2 -2
- package/dist/domains/test-generation/generators/xunit-generator.js +2 -2
- package/dist/domains/test-generation/index.js +7 -7
- package/dist/domains/test-generation/interfaces/index.js +1 -1
- package/dist/domains/test-generation/plugin.js +5 -5
- package/dist/domains/test-generation/services/code-transform-integration.js +1 -1
- package/dist/domains/test-generation/services/index.js +10 -10
- package/dist/domains/test-generation/services/pattern-matcher.js +2 -2
- package/dist/domains/test-generation/services/test-generator.js +5 -5
- package/dist/domains/visual-accessibility/coordinator.js +1 -1
- package/dist/early-exit/early-exit-controller.js +4 -4
- package/dist/early-exit/early-exit-decision.js +2 -2
- package/dist/early-exit/index.js +5 -5
- package/dist/early-exit/quality-signal.js +1 -1
- package/dist/early-exit/speculative-executor.js +1 -1
- package/dist/index.js +18 -18
- package/dist/integrations/agentic-flow/agent-booster/adapter.js +4 -4
- package/dist/integrations/agentic-flow/agent-booster/index.js +10 -10
- package/dist/integrations/agentic-flow/index.js +6 -6
- package/dist/integrations/agentic-flow/metrics/index.js +3 -3
- package/dist/integrations/agentic-flow/metrics/metrics-tracker.js +2 -2
- package/dist/integrations/agentic-flow/metrics/pattern-updater.js +1 -1
- package/dist/integrations/agentic-flow/model-router/budget-enforcer.js +1 -1
- package/dist/integrations/agentic-flow/model-router/complexity-analyzer.js +7 -7
- package/dist/integrations/agentic-flow/model-router/example.js +1 -1
- package/dist/integrations/agentic-flow/model-router/index.js +16 -16
- package/dist/integrations/agentic-flow/model-router/router.js +6 -6
- package/dist/integrations/agentic-flow/model-router/signal-collector.js +1 -1
- package/dist/integrations/agentic-flow/model-router/tier-recommender.js +1 -1
- package/dist/integrations/agentic-flow/reasoning-bank/pattern-evolution.js +11 -6
- package/dist/integrations/browser/agent-browser/client.js +4 -4
- package/dist/integrations/browser/agent-browser/index.js +4 -4
- package/dist/integrations/browser/agent-browser/session-manager.js +1 -1
- package/dist/integrations/browser/client-factory.js +3 -3
- package/dist/integrations/browser/index.js +8 -8
- package/dist/integrations/browser/page-pool.js +1 -1
- package/dist/integrations/browser/stealth/index.js +2 -2
- package/dist/integrations/browser/stealth/stealth-client.js +3 -3
- package/dist/integrations/browser/web-content-fetcher.js +1 -1
- package/dist/integrations/coherence/coherence-service.js +2 -2
- package/dist/integrations/coherence/engines/category-adapter.js +1 -1
- package/dist/integrations/coherence/engines/causal-adapter.js +1 -1
- package/dist/integrations/coherence/engines/cohomology-adapter.js +1 -1
- package/dist/integrations/coherence/engines/homotopy-adapter.js +1 -1
- package/dist/integrations/coherence/engines/index.js +6 -6
- package/dist/integrations/coherence/engines/spectral-adapter.js +1 -1
- package/dist/integrations/coherence/engines/witness-adapter.js +1 -1
- package/dist/integrations/coherence/index.js +7 -7
- package/dist/integrations/coherence/threshold-tuner.js +1 -1
- package/dist/integrations/coherence/wasm-loader.js +2 -2
- package/dist/integrations/rl-suite/algorithms/a2c.js +2 -2
- package/dist/integrations/rl-suite/algorithms/actor-critic.js +2 -2
- package/dist/integrations/rl-suite/algorithms/ddpg.js +1 -1
- package/dist/integrations/rl-suite/algorithms/decision-transformer.js +1 -1
- package/dist/integrations/rl-suite/algorithms/dqn.js +2 -2
- package/dist/integrations/rl-suite/algorithms/eprop.js +2 -2
- package/dist/integrations/rl-suite/algorithms/index.js +10 -10
- package/dist/integrations/rl-suite/algorithms/policy-gradient.js +2 -2
- package/dist/integrations/rl-suite/algorithms/ppo.js +2 -2
- package/dist/integrations/rl-suite/algorithms/q-learning.js +3 -3
- package/dist/integrations/rl-suite/algorithms/sarsa.js +2 -2
- package/dist/integrations/rl-suite/base-algorithm.js +1 -1
- package/dist/integrations/rl-suite/index.js +6 -6
- package/dist/integrations/rl-suite/neural/index.js +2 -2
- package/dist/integrations/rl-suite/orchestrator.js +11 -11
- package/dist/integrations/ruvector/ast-complexity.js +1 -1
- package/dist/integrations/ruvector/coverage-router.js +1 -1
- package/dist/integrations/ruvector/diff-risk-classifier.js +1 -1
- package/dist/integrations/ruvector/graph-boundaries.js +1 -1
- package/dist/integrations/ruvector/hypergraph-engine.js +1 -1
- package/dist/integrations/ruvector/hypergraph-schema.js +1 -1
- package/dist/integrations/ruvector/index.js +52 -52
- package/dist/integrations/ruvector/persistent-q-router.js +2 -2
- package/dist/integrations/ruvector/q-learning-router.js +1 -1
- package/dist/integrations/ruvector/solver-adapter.js +1 -1
- package/dist/integrations/ruvector/sona-persistence.d.ts +13 -11
- package/dist/integrations/ruvector/sona-persistence.js +1 -1
- package/dist/integrations/vibium/client.js +3 -3
- package/dist/integrations/vibium/fallback.js +2 -2
- package/dist/integrations/vibium/index.js +9 -9
- package/dist/kernel/agent-coordinator.js +1 -1
- package/dist/kernel/event-bus.js +1 -1
- package/dist/kernel/hybrid-backend.js +1 -1
- package/dist/kernel/index.js +11 -11
- package/dist/kernel/kernel.js +27 -27
- package/dist/kernel/memory-factory.js +2 -2
- package/dist/kernel/unified-persistence.js +1 -1
- package/dist/learning/aqe-learning-engine.d.ts +0 -1
- package/dist/learning/aqe-learning-engine.js +2 -36
- package/dist/learning/pattern-lifecycle.js +1 -1
- package/dist/learning/pattern-routing-guidance.d.ts +16 -0
- package/dist/learning/pattern-routing-guidance.js +34 -0
- package/dist/learning/qe-reasoning-bank-types.d.ts +2 -0
- package/dist/learning/qe-reasoning-bank.js +2 -1
- package/dist/learning/real-qe-reasoning-bank.d.ts +2 -0
- package/dist/learning/real-qe-reasoning-bank.js +4 -2
- package/dist/learning/token-tracker.js +1 -1
- package/dist/logging/index.js +1 -1
- package/dist/logging/logger-factory.js +1 -1
- package/dist/mcp/bundle.js +395 -390
- package/dist/mcp/entry.js +1 -1
- package/dist/mcp/handlers/agent-handlers.js +2 -2
- package/dist/mcp/handlers/core-handlers.js +9 -9
- package/dist/mcp/handlers/domain-handler-configs.js +2 -2
- package/dist/mcp/handlers/domain-handlers.js +2 -2
- package/dist/mcp/handlers/handler-factory.js +3 -3
- package/dist/mcp/handlers/index.js +7 -7
- package/dist/mcp/handlers/memory-handlers.js +1 -1
- package/dist/mcp/handlers/task-handlers.js +3 -3
- package/dist/mcp/handlers/team-handlers.js +1 -1
- package/dist/mcp/index.js +11 -11
- package/dist/mcp/metrics/index.js +1 -1
- package/dist/mcp/protocol-server.js +13 -13
- package/dist/mcp/security/cve-prevention.js +23 -23
- package/dist/mcp/security/index.js +9 -9
- package/dist/mcp/security/validators/index.js +6 -6
- package/dist/mcp/services/index.js +1 -1
- package/dist/mcp/services/task-router.js +1 -1
- package/dist/mcp/tool-registry.js +4 -4
- package/dist/mcp/tools/base.js +1 -1
- package/dist/mcp/tools/code-intelligence/analyze.js +4 -4
- package/dist/mcp/tools/code-intelligence/c4.js +6 -6
- package/dist/mcp/tools/coverage-analysis/index.js +4 -4
- package/dist/mcp/tools/defect-intelligence/predict.js +2 -2
- package/dist/mcp/tools/embeddings/embedding.js +2 -2
- package/dist/mcp/tools/embeddings/index.js +1 -1
- package/dist/mcp/tools/index.js +20 -20
- package/dist/mcp/tools/learning-optimization/optimize.d.ts +11 -0
- package/dist/mcp/tools/learning-optimization/optimize.js +21 -0
- package/dist/mcp/tools/mincut/index.js +2 -2
- package/dist/mcp/tools/quality-assessment/evaluate.js +1 -1
- package/dist/mcp/tools/quality-assessment/gate.js +5 -2
- package/dist/mcp/tools/qx-analysis/analyze.js +5 -5
- package/dist/mcp/tools/qx-analysis/heuristics-engine.js +1 -1
- package/dist/mcp/tools/qx-analysis/index.js +6 -6
- package/dist/mcp/tools/registry.js +25 -25
- package/dist/mcp/tools/requirements-validation/quality-criteria.js +1 -1
- package/dist/mcp/tools/requirements-validation/validate.js +1 -1
- package/dist/mcp/tools/security-compliance/scan.js +1 -1
- package/dist/mcp/tools/test-execution/e2e-execute.js +3 -3
- package/dist/mcp/tools/test-execution/execute.js +1 -1
- package/dist/mcp/tools/test-execution/index.js +2 -2
- package/dist/mcp/tools/test-generation/generate.js +3 -3
- package/dist/mcp/tools/visual-accessibility/index.js +3 -3
- package/dist/plugins/index.js +8 -8
- package/dist/plugins/lifecycle.js +5 -5
- package/dist/plugins/sources/github.js +1 -1
- package/dist/plugins/sources/local.js +1 -1
- package/dist/plugins/sources/npm.js +1 -1
- package/dist/shared/base-domain-plugin.js +1 -1
- package/dist/shared/c4-model/index.js +1 -1
- package/dist/shared/embeddings/index.js +4 -4
- package/dist/shared/embeddings/nomic-embedder.js +3 -3
- package/dist/shared/embeddings/ollama-client.js +1 -1
- package/dist/shared/entities/agent.js +1 -1
- package/dist/shared/entities/index.js +2 -2
- package/dist/shared/events/index.js +1 -1
- package/dist/shared/git/index.js +1 -1
- package/dist/shared/http/http-client.js +1 -1
- package/dist/shared/http/index.js +1 -1
- package/dist/shared/index.js +15 -15
- package/dist/shared/io/file-reader.js +1 -1
- package/dist/shared/io/index.js +1 -1
- package/dist/shared/llm/circuit-breaker.js +1 -1
- package/dist/shared/llm/index.js +11 -11
- package/dist/shared/llm/metrics/cost-metrics.js +2 -2
- package/dist/shared/llm/metrics/index.js +2 -2
- package/dist/shared/llm/metrics/router-metrics.js +1 -1
- package/dist/shared/llm/model-registry.js +1 -1
- package/dist/shared/llm/provider-manager.js +16 -16
- package/dist/shared/llm/providers/azure-openai.js +2 -2
- package/dist/shared/llm/providers/bedrock.js +2 -2
- package/dist/shared/llm/providers/claude-code.js +1 -1
- package/dist/shared/llm/providers/claude.js +4 -4
- package/dist/shared/llm/providers/codex.js +1 -1
- package/dist/shared/llm/providers/cognitum.js +1 -1
- package/dist/shared/llm/providers/gemini.js +1 -1
- package/dist/shared/llm/providers/index.js +10 -10
- package/dist/shared/llm/providers/ollama.js +2 -2
- package/dist/shared/llm/providers/openai.js +2 -2
- package/dist/shared/llm/providers/openrouter.js +1 -1
- package/dist/shared/llm/router/hybrid-router.js +7 -7
- package/dist/shared/llm/router/index.js +4 -4
- package/dist/shared/llm/router/routing-rules.js +1 -1
- package/dist/shared/llm/translation/index.js +3 -3
- package/dist/shared/llm/translation/prompt-translator.js +2 -2
- package/dist/shared/metrics/code-metrics.js +2 -2
- package/dist/shared/metrics/index.js +2 -2
- package/dist/shared/parsers/index.js +3 -3
- package/dist/shared/security/compliance-patterns.js +1 -1
- package/dist/shared/security/index.js +8 -8
- package/dist/shared/security/osv-client.js +1 -1
- package/dist/test-scheduling/index.js +9 -9
- package/dist/test-scheduling/phase-scheduler.js +1 -1
- package/dist/test-scheduling/pipeline.js +9 -9
- package/dist/validation/provider-llm-executor.js +5 -5
- package/dist/workers/daemon.js +3 -3
- package/dist/workers/index.js +5 -5
- package/dist/workers/quality-daemon/index.js +15 -15
- package/dist/workers/workers/compliance-checker.js +2 -2
- package/dist/workers/workers/coverage-tracker.js +1 -1
- package/dist/workers/workers/defect-predictor.js +1 -1
- package/dist/workers/workers/flaky-detector.js +1 -1
- package/dist/workers/workers/learning-consolidation.js +4 -4
- package/dist/workers/workers/performance-baseline.js +1 -1
- package/dist/workers/workers/quality-gate.js +1 -1
- package/dist/workers/workers/regression-monitor.js +1 -1
- package/dist/workers/workers/security-scan.js +1 -1
- package/dist/workers/workers/test-health.js +1 -1
- package/dist/workflows/browser/index.js +1 -1
- package/package.json +4 -3
- package/dist/cli/chunks/adapter-6CNMDJVJ.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-JGHHNSFX.js +0 -2
- package/dist/cli/chunks/base-ND3KAA2L.js +0 -2
- package/dist/cli/chunks/browser-workflow-EBSNGTSH.js +0 -2
- package/dist/cli/chunks/chunk-A6V5NZCV.js +0 -21
- package/dist/cli/chunks/chunk-QR6NVCRT.js +0 -12
- package/dist/cli/chunks/chunk-TL5FMEKW.js +0 -2
- package/dist/cli/chunks/client-NEGGUFEM.js +0 -2
- package/dist/cli/chunks/core-handlers-Q2XPFYQ5.js +0 -2
- package/dist/cli/chunks/cross-domain-router-WNZMUQ3G.js +0 -2
- package/dist/cli/chunks/dream-OL5XLAYS.js +0 -2
- package/dist/cli/chunks/heartbeat-scheduler-XUAW3I3Q.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-EDK2YUZJ.js +0 -2
- package/dist/cli/chunks/hnsw-index-RDMT66NM.js +0 -2
- package/dist/cli/chunks/hybrid-router-BALMPXND.js +0 -2
- package/dist/cli/chunks/impact-analyzer-P6XLP3QX.js +0 -2
- package/dist/cli/chunks/init-wizard-HMU5OPKQ.js +0 -2
- package/dist/cli/chunks/kernel-HMSENQ6R.js +0 -2
- package/dist/cli/chunks/knowledge-graph-G7W72UC5.js +0 -2
- package/dist/cli/chunks/llm-router-service-VCM7LAGO.js +0 -2
- package/dist/cli/chunks/load-test-H5FATYS2.js +0 -2
- package/dist/cli/chunks/memory-backend-OPHD5UCR.js +0 -2
- package/dist/cli/chunks/pattern-null-store-XJOXEDQO.js +0 -2
- package/dist/cli/chunks/protocol-executor-XVN7GTLL.js +0 -2
- package/dist/cli/chunks/provider-manager-NQICCJZZ.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-SVCH233Z.js +0 -2
- package/dist/cli/chunks/queen-coordinator-Z3PBE4EH.js +0 -2
- package/dist/cli/chunks/router-HMWZW2SF.js +0 -2
- package/dist/cli/chunks/routing-feedback-ZZYHE2CL.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-ZPT4RLBE.js +0 -2
- package/dist/cli/chunks/safe-db-VMYUKPV6.js +0 -2
- package/dist/cli/chunks/schedule-DOQ4X4MH.js +0 -2
- package/dist/cli/chunks/scheduler-FE2DH224.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-TKCACSFQ.js +0 -2
- package/dist/cli/chunks/unified-memory-2PA3CIQT.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-W43H4ZKY.js +0 -2
- package/dist/cli/chunks/unified-persistence-SOW7AAZL.js +0 -2
- package/dist/cli/chunks/visual-security-R6BVIOYU.js +0 -2
- package/dist/cli/chunks/witness-chain-GSJW7VDF.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-TXEMI5DD.js +0 -2
|
@@ -1,4 +1,570 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
/* ruflo-seg:BEGIN */
|
|
3
|
+
function rufloActivationSegments(cwd){
|
|
4
|
+
try {
|
|
5
|
+
var fs = require("fs"), path = require("path"), cp = require("child_process");
|
|
6
|
+
var RED = "\x1b[1;31m"; // alarm-only segments (aidefence OFF) — matches ruflo's own brightRed
|
|
7
|
+
var DIM = "[2m", G = "[1;32m", Y = "[1;33m", C = "[1;36m", R = "[0m";
|
|
8
|
+
// execFileSync (no shell) — db path / sql are passed as argv, never interpolated into a command line.
|
|
9
|
+
function q(db, sql){ try { return cp.execFileSync("sqlite3", [db, sql], {stdio:["ignore","pipe","ignore"], timeout:1500}).toString().trim(); } catch(e){ return ""; } }
|
|
10
|
+
function bar(n, max){ n = Math.max(0, Math.min(max, n)); return "[" + "●".repeat(n) + "○".repeat(max - n) + "]"; }
|
|
11
|
+
// ── self-learning (SONA): own line with a volume bar (patterns/traj/HNSW) plus a
|
|
12
|
+
// LIVE micro-LoRA adaptation field (Δ‖W‖, appended further below). The Δ‖W‖ tracker
|
|
13
|
+
// is maintained inline in this same function — see the "micro-LoRA LIVE adaptation"
|
|
14
|
+
// block after the route-Q segment.
|
|
15
|
+
var learn = "";
|
|
16
|
+
try {
|
|
17
|
+
var sp = path.join(cwd, ".claude-flow", "neural", "stats.json");
|
|
18
|
+
if (fs.existsSync(sp)) {
|
|
19
|
+
var s = JSON.parse(fs.readFileSync(sp, "utf8"));
|
|
20
|
+
var pn = s.patternsLearned || 0, tj = s.trajectoriesRecorded || 0, parts = [];
|
|
21
|
+
if (pn > 0 || tj > 0) {
|
|
22
|
+
if (pn > 0) parts.push(pn + " patterns");
|
|
23
|
+
if (tj > 0) parts.push(tj + " traj");
|
|
24
|
+
if (fs.existsSync(path.join(cwd, ".swarm", "hnsw.index"))) parts.push(G + "⚡ HNSW" + R);
|
|
25
|
+
var dots = Math.max(0, Math.min(5, Math.round(pn / 10))); // volume gauge: ~10 patterns per dot
|
|
26
|
+
learn = C + "🧠 SONA" + R + " " + DIM + bar(dots, 5) + R + " " + parts.join(DIM + " · " + R);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
} catch(e){}
|
|
30
|
+
// ── micro-LoRA LIVE adaptation: Δ‖W‖<cum> +<session> <trend> n<count> ──
|
|
31
|
+
// Shows the model ACTUALLY ADAPTING FROM YOUR WORK, live. ruflo's own micro-LoRA is
|
|
32
|
+
// per-process scratch ("resets per process", intelligence.js) — every hook reinits it
|
|
33
|
+
// (random A, B=0), applies that call's signals, then DISCARDS the weights; only
|
|
34
|
+
// patterns.json / stats.json persist. So the kit persists what ruflo throws away: a
|
|
35
|
+
// single cumulative micro-LoRA in lora-live.json, advanced HERE (inline, mtime+TTL
|
|
36
|
+
// gated) by feeding each NEW distilled pattern ruflo has learned from your work
|
|
37
|
+
// (.claude-flow/neural/patterns.json) through the genuine @ruvector/ruvllm 2.5.6
|
|
38
|
+
// gradient path (real since F4 fixed), weighted by ruflo's OWN per-pattern confidence
|
|
39
|
+
// (no fabricated reward). The init RNG is seeded and weights are restored each tick, so
|
|
40
|
+
// the result is DETERMINISTIC (no 41%-CV random-init noise) and cumulative.
|
|
41
|
+
// Δ‖W‖ = ‖scaling·(A·B)‖_F (federated-LoRA's standard adaptation-magnitude monitor)
|
|
42
|
+
// +<session> = growth since this session began (the live "from your work" signal)
|
|
43
|
+
// n = distinct patterns fed (REINFORCE updates). Gate: cum norm > 0.
|
|
44
|
+
// Honest scope: a kit-persisted MIRROR of ruflo's discarded adapter, fed ruflo's real
|
|
45
|
+
// confidence-weighted patterns. NOT shown: amplification factor (no frozen base W) and
|
|
46
|
+
// a live reward curve (neural-train's WASM path records trajectories, not signals → 0).
|
|
47
|
+
try {
|
|
48
|
+
var nd = path.join(cwd, ".claude-flow", "neural");
|
|
49
|
+
var pPath = path.join(nd, "patterns.json"), sPath = path.join(nd, "lora-live.json");
|
|
50
|
+
if (fs.existsSync(pPath)) {
|
|
51
|
+
var st = null; try { st = JSON.parse(fs.readFileSync(sPath, "utf8")); } catch(e){}
|
|
52
|
+
var nowS = Math.floor(Date.now() / 1000);
|
|
53
|
+
var pMtimeMs = fs.statSync(pPath).mtimeMs; // ms precision: same-second writes still detected
|
|
54
|
+
var TTL = Number(process.env.RUFLO_LORA_TTL_S || 60);
|
|
55
|
+
// Session boundary: prefer Claude Code's real session_id (piped on stdin) so the
|
|
56
|
+
// +<session> delta resets exactly when YOU start a new session — not on a clock.
|
|
57
|
+
// getStdinData() is the host statusline's cached single-read of that JSON; guard the
|
|
58
|
+
// call so the segment still works on a template that lacks it, or run standalone.
|
|
59
|
+
var sid = "";
|
|
60
|
+
try { if (typeof getStdinData === "function") { var _sd = getStdinData(); sid = (_sd && (_sd.session_id || _sd.sessionId)) || ""; } } catch(e){}
|
|
61
|
+
// Refresh when: no state yet, the session changed (reset the +session baseline even
|
|
62
|
+
// with no new patterns), or patterns changed and the TTL has elapsed.
|
|
63
|
+
var sidChanged = !!(sid && st && (st.sessionId || "") !== sid);
|
|
64
|
+
var stale = !st || sidChanged || (pMtimeMs > (st.pms || 0) && (nowS - (st.ts || 0)) >= TTL);
|
|
65
|
+
if (stale) {
|
|
66
|
+
// Resolve the installed ruvllm SonaCoordinator (same global layout as the version probe).
|
|
67
|
+
var SC = null;
|
|
68
|
+
try {
|
|
69
|
+
var sj = path.join(path.dirname(process.execPath), "..", "lib", "node_modules", "ruflo",
|
|
70
|
+
"node_modules", "@ruvector", "ruvllm", "dist", "cjs", "sona.js");
|
|
71
|
+
if (fs.existsSync(sj)) SC = require(sj).SonaCoordinator;
|
|
72
|
+
} catch(e){}
|
|
73
|
+
if (SC) {
|
|
74
|
+
var pats = JSON.parse(fs.readFileSync(pPath, "utf8"));
|
|
75
|
+
// Seed Math.random so the first-ever loraA init is deterministic; restore after ctor.
|
|
76
|
+
var seed = 0x9e3779b9, orig = Math.random;
|
|
77
|
+
Math.random = function(){ seed = (seed * 1103515245 + 12345) & 0x7fffffff; return seed / 0x7fffffff; };
|
|
78
|
+
var coord = new SC({ backgroundLoopEnabled: false });
|
|
79
|
+
Math.random = orig;
|
|
80
|
+
var applied = new Set((st && st.appliedIds) || []);
|
|
81
|
+
var n = (st && st.n) || 0;
|
|
82
|
+
if (st && st.loraA) { try { coord.microLora.setWeights({ loraA: st.loraA, loraB: st.loraB, scaling: st.scaling }); } catch(e){} }
|
|
83
|
+
var prevSid = st ? (st.sessionId || "") : "";
|
|
84
|
+
var newSession;
|
|
85
|
+
if (sid) {
|
|
86
|
+
newSession = !st || prevSid !== sid; // real per-session boundary
|
|
87
|
+
} else {
|
|
88
|
+
newSession = !st || (nowS - (st.ts || 0) > 1800); // no id (manual run): idle fallback
|
|
89
|
+
sid = prevSid; // preserve the session we're in
|
|
90
|
+
}
|
|
91
|
+
var sessionBase = newSession ? (st ? (st.deltaNorm || 0) : 0) : (st.sessionBase || 0);
|
|
92
|
+
var sessionTs = newSession ? nowS : (st.sessionTs || nowS);
|
|
93
|
+
for (var i = 0; i < (Array.isArray(pats) ? pats.length : 0); i++) {
|
|
94
|
+
var p = pats[i], id = String(p.id || i);
|
|
95
|
+
if (applied.has(id)) continue;
|
|
96
|
+
var conf = (typeof p.confidence === "number") ? p.confidence : Number(p.confidence);
|
|
97
|
+
coord.recordSignal({ requestId: id, type: p.type || "pattern",
|
|
98
|
+
quality: (conf >= 0 && conf <= 1) ? conf : 0.7, correction: String(p.content || id) });
|
|
99
|
+
applied.add(id); n++;
|
|
100
|
+
}
|
|
101
|
+
var w = coord.microLora.getWeights(), nm = coord.stats().microLora.deltaNorm;
|
|
102
|
+
var rec = { loraA: w.loraA, loraB: w.loraB, scaling: w.scaling, appliedIds: Array.from(applied),
|
|
103
|
+
n: n, deltaNorm: nm, sessionBase: sessionBase, sessionTs: sessionTs, sessionId: sid,
|
|
104
|
+
pms: pMtimeMs, ts: nowS };
|
|
105
|
+
try { var tmp = sPath + ".tmp"; fs.writeFileSync(tmp, JSON.stringify(rec)); fs.renameSync(tmp, sPath); } catch(e){}
|
|
106
|
+
st = rec;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
if (st && typeof st.deltaNorm === "number" && st.deltaNorm > 0) {
|
|
110
|
+
var sess = st.deltaNorm - (st.sessionBase || 0);
|
|
111
|
+
var trend = "";
|
|
112
|
+
if (Math.abs(sess) / st.deltaNorm < 0.005) trend = DIM + "→" + R;
|
|
113
|
+
else trend = sess > 0 ? (G + "▲" + R) : (Y + "▼" + R);
|
|
114
|
+
var sessStr = (Math.abs(sess) / st.deltaNorm >= 0.005)
|
|
115
|
+
? (" " + (sess > 0 ? G : Y) + (sess > 0 ? "+" : "") + sess.toFixed(4) + R) : "";
|
|
116
|
+
var dseg = C + "Δ‖W‖" + st.deltaNorm.toFixed(4) + R + sessStr + trend + DIM + " n" + st.n + R;
|
|
117
|
+
if (learn) { learn += DIM + " · " + R + dseg; }
|
|
118
|
+
else { learn = C + "🧠 Δ LoRA" + R + " " + dseg; }
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
} catch(e){}
|
|
122
|
+
// ── route Q-learner (📈 RL): live agent-routing metrics, fs-only, honesty-gated ──
|
|
123
|
+
// F3 (ruvnet/ruflo#2239) is fixed in ruflo 3.10.11 (FNV-1a lossless fold) — the
|
|
124
|
+
// state encoder no longer collapses keyword-distinct tasks, so |Q| is a
|
|
125
|
+
// real task-diversity count. Source the persisted Q-model directly; never the broken
|
|
126
|
+
// `route stats` CLI. Gate hard: render ONLY when the learner has actually run
|
|
127
|
+
// (updateCount>0), else emit nothing — no zero-state noise.
|
|
128
|
+
var route = "";
|
|
129
|
+
try {
|
|
130
|
+
var qp = path.join(cwd, ".swarm", "q-learning-model.json");
|
|
131
|
+
if (fs.existsSync(qp)) {
|
|
132
|
+
var qm = JSON.parse(fs.readFileSync(qp, "utf8"));
|
|
133
|
+
var st = qm.stats || {};
|
|
134
|
+
var upd = st.updateCount || 0;
|
|
135
|
+
if (upd > 0) {
|
|
136
|
+
var eps = typeof st.epsilon === "number" ? st.epsilon : null;
|
|
137
|
+
var td = typeof st.avgTDError === "number" ? st.avgTDError : null;
|
|
138
|
+
var qn = qm.qTable && typeof qm.qTable === "object" ? Object.keys(qm.qTable).length : 0;
|
|
139
|
+
var rp = [];
|
|
140
|
+
if (eps !== null) rp.push("ε" + eps.toFixed(2) + DIM + "↓" + R);
|
|
141
|
+
if (td !== null) rp.push("δ̄" + td.toFixed(3) + DIM + "↓" + R);
|
|
142
|
+
if (qn > 0) rp.push("|Q|" + qn);
|
|
143
|
+
rp.push("upd" + upd);
|
|
144
|
+
route = C + "📈 RL" + R + " " + rp.join(DIM + " · " + R);
|
|
145
|
+
}
|
|
146
|
+
} else {
|
|
147
|
+
// Fallback: ruflo's metrics surface (no broken route-stats CLI). Only when it
|
|
148
|
+
// reflects real routing decisions.
|
|
149
|
+
var lp = path.join(cwd, ".claude-flow", "metrics", "learning.json");
|
|
150
|
+
if (fs.existsSync(lp)) {
|
|
151
|
+
var lj = JSON.parse(fs.readFileSync(lp, "utf8"));
|
|
152
|
+
var rt = lj.routing || {};
|
|
153
|
+
if ((rt.decisions || 0) > 0) {
|
|
154
|
+
var rp2 = [];
|
|
155
|
+
if (typeof rt.accuracy === "number") rp2.push("acc" + Math.round(rt.accuracy * 100) + "%");
|
|
156
|
+
rp2.push("dec" + rt.decisions);
|
|
157
|
+
route = C + "📈 RL" + R + " " + rp2.join(DIM + " · " + R);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
} catch(e){}
|
|
162
|
+
// ── proof verdict (self-improvement eval): ALARM-ONLY, fs-only ──
|
|
163
|
+
// Sources the most recent ruflo-improvement-eval run (.claude-flow/improvement.json):
|
|
164
|
+
// a pre-registered causal test (one-sided permutation p + Cohen's d + above-chance)
|
|
165
|
+
// that the route Q-learner self-improves vs a no-learning ablation. It is a SYNTHETIC
|
|
166
|
+
// proof-of-mechanism (its own reward env), NOT a live measure of real routing — that
|
|
167
|
+
// is what the 📈 RL line above is. So PASS is the expected state and is rendered
|
|
168
|
+
// SILENTLY; only a FAIL (a real regression worth a look) surfaces, as ◷ proof FAIL.
|
|
169
|
+
// The run age (im.ts) is appended so a stale FAIL reads honestly. Never a fabricated
|
|
170
|
+
// source. Fields per #8: Δpp · CI · p · d · age. (#8 — alarm-only per user decision.)
|
|
171
|
+
var proof = "";
|
|
172
|
+
try {
|
|
173
|
+
var ip = path.join(cwd, ".claude-flow", "improvement.json");
|
|
174
|
+
if (fs.existsSync(ip)) {
|
|
175
|
+
var im = JSON.parse(fs.readFileSync(ip, "utf8"));
|
|
176
|
+
if (im && im.verdict === "FAIL") {
|
|
177
|
+
var pp = [];
|
|
178
|
+
if (typeof im.deltaPP === "number") pp.push("Δ" + (im.deltaPP >= 0 ? "+" : "") + im.deltaPP + "pp");
|
|
179
|
+
if (typeof im.ci95 === "number") pp.push("CI±" + im.ci95);
|
|
180
|
+
if (typeof im.pValue === "number") pp.push("p" + (im.pValue < 0.001 ? "<.001" : "=" + im.pValue.toFixed(3)));
|
|
181
|
+
if (typeof im.cohensD === "number") pp.push("d" + (im.cohensD >= 999 ? "∞" : im.cohensD));
|
|
182
|
+
if (typeof im.ts === "number") {
|
|
183
|
+
var ageSec = Math.floor(Date.now() / 1000) - im.ts;
|
|
184
|
+
if (ageSec >= 86400) pp.push(Math.floor(ageSec / 86400) + "d ago");
|
|
185
|
+
else if (ageSec >= 3600) pp.push(Math.floor(ageSec / 3600) + "h ago");
|
|
186
|
+
}
|
|
187
|
+
proof = Y + "◷ proof FAIL" + R + (pp.length ? " " + DIM + pp.join(" · ") + R : "");
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
} catch(e){}
|
|
191
|
+
// ── AI defense (AIMDS) — ALARM-ONLY: renders only when it is MISSING ────────
|
|
192
|
+
// Was a permanent green "🛡 aidefence on". Two reasons it inverted:
|
|
193
|
+
// 1. Issue #8's rule, already law for the proof segment below: the expected state
|
|
194
|
+
// is rendered SILENTLY, only a regression surfaces, no static green badge. A
|
|
195
|
+
// constant "on" carries no information after the first glance — unlike SONA/QE,
|
|
196
|
+
// whose counts move — so it was the one pure binary badge in this footer.
|
|
197
|
+
// 2. Glyph collision: ruflo's line 2 uses 🛡 for the SCAN state, a different
|
|
198
|
+
// concern entirely (`security scan` audits your SOURCE; this is `security
|
|
199
|
+
// defend` / AIMDS screening PROMPTS for injection, jailbreak and PII). Two
|
|
200
|
+
// shields meaning different things read as one duplicated thing. The alarm
|
|
201
|
+
// carries no 🛡 at all, so it can never be confused with the scan shield.
|
|
202
|
+
//
|
|
203
|
+
// Still load-bearing, not decoration: @claude-flow/aidefence is NOT a declared
|
|
204
|
+
// dependency of ruflo or @claude-flow/cli (verified still true on 3.32.0) while
|
|
205
|
+
// `security defend` imports it (ruvnet/ruflo#2670). It is present ONLY because the
|
|
206
|
+
// kit's healAidefence npm-installs it into rufloRoot(). A plain `npm i -g ruflo`
|
|
207
|
+
// can therefore silently remove your injection defense — and under the old polarity
|
|
208
|
+
// that catastrophe was signalled by a line quietly VANISHING, which is ambiguous
|
|
209
|
+
// (off? probe threw? forgot to look?). Now the dangerous state is the loud one.
|
|
210
|
+
//
|
|
211
|
+
// FAIL-SAFE POLARITY (the reason for the two-step probe): alarm only on POSITIVE
|
|
212
|
+
// evidence of absence — we located a ruflo install AND aidefence is not inside it.
|
|
213
|
+
// If ruflo itself cannot be found (custom npm prefix, or the statusline running
|
|
214
|
+
// under a different node than the one that installed it), we cannot know, so we say
|
|
215
|
+
// NOTHING. Inverting a signal also inverts its failure mode: a probe miss used to
|
|
216
|
+
// fail silent, and would now fail LOUD and WRONG. Claiming "your defense is off"
|
|
217
|
+
// when it is on is the same crime as the fabricated CVE counter overlaid above.
|
|
218
|
+
// Probe + verdict live in rufloAidefenceState/rufloFindRufloRoot (below) so the
|
|
219
|
+
// three-state logic is unit-testable against fixture trees — it cannot be exercised
|
|
220
|
+
// from here, where it depends on the real process.execPath.
|
|
221
|
+
var sec = "";
|
|
222
|
+
try {
|
|
223
|
+
if (rufloAidefenceState(rufloFindRufloRoot()) === "off") {
|
|
224
|
+
sec = RED + "⚠ aidefence OFF" + R + DIM + " — no prompt-injection defense · ak sync restores it" + R;
|
|
225
|
+
}
|
|
226
|
+
} catch(e){}
|
|
227
|
+
// ── daemon visibility (⚙): GLOBAL count of running ruflo daemons, so no daemon
|
|
228
|
+
// is ever invisible (token-burn incident lesson). Machine-global, not per-project,
|
|
229
|
+
// so it is cached in tmpdir and shared across every project's statusline — one
|
|
230
|
+
// pgrep per TTL window, not per render. Daemons are default-on (local-only
|
|
231
|
+
// workers, budget-governed AI workers) since the 3.28 baseline, so one per active
|
|
232
|
+
// project is the EXPECTED steady state: dim up to 3, YELLOW at >=4 (more daemons
|
|
233
|
+
// than you're plausibly working projects — ruflo-daemon-gc to inspect; upstream
|
|
234
|
+
// TTL + kit auto-reap will also converge it). Opt out: RUFLO_DAEMON_STATUSLINE=0.
|
|
235
|
+
var daemon = "";
|
|
236
|
+
try {
|
|
237
|
+
if (process.env.RUFLO_DAEMON_STATUSLINE !== "0") {
|
|
238
|
+
var os = require("os");
|
|
239
|
+
var dCache = path.join(os.tmpdir(), "ruflo-daemon-count.json");
|
|
240
|
+
var dTtl = Number(process.env.RUFLO_DAEMON_STATUSLINE_TTL_MS || 30000);
|
|
241
|
+
var dCount = null;
|
|
242
|
+
try { var dc = JSON.parse(fs.readFileSync(dCache, "utf8")); if (dc && typeof dc.n === "number" && dTtl > 0 && (Date.now() - dc.ts) < dTtl) dCount = dc.n; } catch(e){}
|
|
243
|
+
if (dCount === null) {
|
|
244
|
+
try {
|
|
245
|
+
var pg = cp.execFileSync("pgrep", ["-f", "cli.js daemon start"], {stdio:["ignore","pipe","ignore"], timeout:1500}).toString().trim();
|
|
246
|
+
dCount = pg ? pg.split("\n").filter(Boolean).length : 0;
|
|
247
|
+
} catch(e){ dCount = 0; } // pgrep exits 1 (=> throws) when nothing matches
|
|
248
|
+
try { fs.writeFileSync(dCache, JSON.stringify({ts: Date.now(), n: dCount})); } catch(e){}
|
|
249
|
+
}
|
|
250
|
+
if (dCount > 0) {
|
|
251
|
+
var dCol = dCount >= 4 ? Y : DIM;
|
|
252
|
+
daemon = dCol + "⚙ " + dCount + " ruflo daemon" + (dCount === 1 ? "" : "s") + R
|
|
253
|
+
+ (dCount >= 4 ? DIM + " — ruflo-daemon-gc to inspect" + R : "");
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
} catch(e){}
|
|
257
|
+
// ── RuvNet Brain (🧿): offline rUv-stack knowledge base — honesty-gated, fs-only ──
|
|
258
|
+
// The brain is NOT an npm package — `npx github:stuinfla/ruvnet-brain` drops a
|
|
259
|
+
// ~2GB offline knowledge base at ~/.cache/ruvnet-brain/kb (honors RUVNET_BRAIN_KB)
|
|
260
|
+
// and wires a user-scope Claude Code plugin. Presence probe MIRRORS
|
|
261
|
+
// src/lib/ruvnet-brain.mjs exactly: existence of the KB's forge-mcp-all.mjs
|
|
262
|
+
// entrypoint. Render NOTHING when absent — never a fabricated row. The KB is a flat
|
|
263
|
+
// dir of data files, so the true size is a shallow sum of its top-level files
|
|
264
|
+
// (the __MACOSX zip-artifact dir is a directory, so isFile() correctly excludes it);
|
|
265
|
+
// that sum is TTL-cached machine-globally in tmpdir (like the ⚙ daemon / 🎓 QE
|
|
266
|
+
// chips) so ~600 stat() calls run at most once per window, not per render. The 💾
|
|
267
|
+
// chip reuses the QE size formatting. The plugin semver (marketplace manifest,
|
|
268
|
+
// best-effort) rides next to the label like "RuFlo V<x>" / "Agentic QE V<x>".
|
|
269
|
+
var brain = "";
|
|
270
|
+
try {
|
|
271
|
+
var os2 = require("os");
|
|
272
|
+
var kbDir = process.env.RUVNET_BRAIN_KB || path.join(os2.homedir(), ".cache", "ruvnet-brain", "kb");
|
|
273
|
+
if (fs.existsSync(path.join(kbDir, "forge-mcp-all.mjs"))) {
|
|
274
|
+
// Version — best-effort, empty on any failure (never blocks the row).
|
|
275
|
+
// RELEASE-tag namespace (what `ak status` shows, e.g. 3.3.1), never the
|
|
276
|
+
// plugin.json SEMVER (e.g. 0.5.0-dev) — different namespaces for the same
|
|
277
|
+
// install; showing the semver here confused users (it disagreed with
|
|
278
|
+
// `ak status`). Three-namespace gotcha; see MAINTAINER.md. Resolution
|
|
279
|
+
// order MIRRORS drift() in src/lib/ruvnet-brain.mjs so this row and
|
|
280
|
+
// `ak status` can never disagree:
|
|
281
|
+
// 1) the bundle's own on-disk stamp (SOURCE.json.releaseTag) — ground
|
|
282
|
+
// truth, current even when the KB changed outside ak (e.g. a manual
|
|
283
|
+
// forge-update.mjs run);
|
|
284
|
+
// 2) ak's kit.json record of the release it last installed;
|
|
285
|
+
// 3) plugin semver — last resort for manual/pre-stamping installs.
|
|
286
|
+
var bver = "";
|
|
287
|
+
try {
|
|
288
|
+
var relTag = null;
|
|
289
|
+
try {
|
|
290
|
+
var srcJ = JSON.parse(fs.readFileSync(path.join(kbDir, "SOURCE.json"), "utf8"));
|
|
291
|
+
var rawTag = String(srcJ.releaseTag || "");
|
|
292
|
+
if (/^[A-Za-z0-9._-]{1,32}$/.test(rawTag)) relTag = rawTag;
|
|
293
|
+
} catch(e){}
|
|
294
|
+
if (!relTag) try {
|
|
295
|
+
var kitCfg = path.join(os2.homedir(), ".config", "agentic-kit", "kit.json");
|
|
296
|
+
var kj = JSON.parse(fs.readFileSync(kitCfg, "utf8"));
|
|
297
|
+
if (kj && kj.versionCheck && kj.versionCheck.ruvnetBrain) relTag = kj.versionCheck.ruvnetBrain.installedRelease;
|
|
298
|
+
} catch(e){}
|
|
299
|
+
if (relTag) {
|
|
300
|
+
bver = " V" + String(relTag).replace(/^v/, "");
|
|
301
|
+
} else {
|
|
302
|
+
var bpkg = path.join(os2.homedir(), ".claude", "plugins", "marketplaces",
|
|
303
|
+
"ruvnet-brain", "plugin", ".claude-plugin", "plugin.json");
|
|
304
|
+
var bv = JSON.parse(fs.readFileSync(bpkg, "utf8")).version;
|
|
305
|
+
if (bv) bver = " V" + String(bv).replace(/^v/, "");
|
|
306
|
+
}
|
|
307
|
+
} catch(e){}
|
|
308
|
+
// KB size — TTL-cached shallow sum of top-level files, keyed on kbDir so an
|
|
309
|
+
// env-overridden path (or a moved KB) never serves a stale foreign size.
|
|
310
|
+
var bBytes = null;
|
|
311
|
+
try {
|
|
312
|
+
var bCache = path.join(os2.tmpdir(), "ruvnet-brain-kb-size.json");
|
|
313
|
+
var bTtl = Number(process.env.RUVNET_BRAIN_KB_TTL_MS || 300000);
|
|
314
|
+
try {
|
|
315
|
+
var bc = JSON.parse(fs.readFileSync(bCache, "utf8"));
|
|
316
|
+
if (bc && bc.dir === kbDir && typeof bc.bytes === "number" && bTtl > 0 && (Date.now() - bc.ts) < bTtl) bBytes = bc.bytes;
|
|
317
|
+
} catch(e){}
|
|
318
|
+
if (bBytes === null) {
|
|
319
|
+
var sum = 0;
|
|
320
|
+
fs.readdirSync(kbDir).forEach(function(f){
|
|
321
|
+
try { var s = fs.statSync(path.join(kbDir, f)); if (s.isFile()) sum += s.size; } catch(e){}
|
|
322
|
+
});
|
|
323
|
+
bBytes = sum;
|
|
324
|
+
try { fs.writeFileSync(bCache, JSON.stringify({ts: Date.now(), dir: kbDir, bytes: sum})); } catch(e){}
|
|
325
|
+
}
|
|
326
|
+
} catch(e){}
|
|
327
|
+
var bp = [];
|
|
328
|
+
if (bBytes && bBytes > 0) {
|
|
329
|
+
var bkb = Math.round(bBytes / 1024);
|
|
330
|
+
bp.push("💾 " + (bkb >= 1024 ? (bkb/1024).toFixed(1) + "MB" : bkb + "KB"));
|
|
331
|
+
}
|
|
332
|
+
brain = C + "🧿 RuvNet Brain" + bver + R + " " + (bp.length ? bp.join(DIM + " · " + R) : G + "✓" + R);
|
|
333
|
+
}
|
|
334
|
+
} catch(e){}
|
|
335
|
+
// ── agentic-qe — TTL-cached; one sqlite3 spawn only on a cache miss (issue #3) ──
|
|
336
|
+
var qe = "";
|
|
337
|
+
try {
|
|
338
|
+
var db = path.join(cwd, ".agentic-qe", "memory.db");
|
|
339
|
+
if (fs.existsSync(db)) {
|
|
340
|
+
var cacheDir = path.join(cwd, ".claude-flow", "cache");
|
|
341
|
+
var cacheFile = path.join(cacheDir, "qe-statusline.json");
|
|
342
|
+
var ttl = Number(process.env.RUFLO_QE_STATUSLINE_TTL_MS || 60000);
|
|
343
|
+
var cachedLine = null;
|
|
344
|
+
try {
|
|
345
|
+
var cc = JSON.parse(fs.readFileSync(cacheFile, "utf8"));
|
|
346
|
+
if (cc && typeof cc.line === "string" && ttl > 0 && (Date.now() - cc.ts) < ttl) cachedLine = cc.line;
|
|
347
|
+
} catch(e){}
|
|
348
|
+
if (cachedLine !== null) {
|
|
349
|
+
qe = cachedLine; // hit: zero sqlite3 spawns
|
|
350
|
+
} else {
|
|
351
|
+
// miss: ONE sqlite3 call. SQL on stdin + ".bail off" so a missing vector
|
|
352
|
+
// table (name varies by aqe version) doesn't abort the batch. sqlite3 still
|
|
353
|
+
// exits non-zero on the error, so execFileSync throws — recover e.stdout.
|
|
354
|
+
var sql = ".bail off\n"
|
|
355
|
+
+ "SELECT 'pat',COUNT(*) FROM qe_patterns;\n"
|
|
356
|
+
+ "SELECT 'vec',COUNT(*) FROM qe_pattern_embeddings;\n"
|
|
357
|
+
+ "SELECT 'vec',COUNT(*) FROM vectors;\n"
|
|
358
|
+
+ "SELECT 'vec',COUNT(*) FROM embeddings;\n"
|
|
359
|
+
+ "SELECT 'traj',COUNT(*) FROM qe_trajectories;\n";
|
|
360
|
+
var raw = "";
|
|
361
|
+
try { raw = cp.execFileSync("sqlite3", [db], {input: sql, stdio:["pipe","pipe","ignore"], timeout:1500}).toString(); }
|
|
362
|
+
catch(e){ raw = (e && e.stdout) ? e.stdout.toString() : ""; }
|
|
363
|
+
var pat = 0, qtj = 0, qv = 0;
|
|
364
|
+
raw.split("\n").forEach(function(ln){
|
|
365
|
+
var i = ln.indexOf("|"); if (i < 0) return;
|
|
366
|
+
var k = ln.slice(0, i), v = Number(ln.slice(i + 1)) || 0;
|
|
367
|
+
if (k === "pat") pat = v; else if (k === "traj") qtj = v; else if (k === "vec" && qv === 0) qv = v;
|
|
368
|
+
});
|
|
369
|
+
var qp = [];
|
|
370
|
+
if (pat > 0) qp.push("🎓 " + pat + " patterns");
|
|
371
|
+
if (qtj > 0) qp.push("🧭 " + qtj + " traj");
|
|
372
|
+
if (qv > 0) qp.push("🧬 " + qv + " vec" + G + "⚡" + R);
|
|
373
|
+
try { var kb = Math.round(fs.statSync(db).size / 1024); qp.push("💾 " + (kb >= 1024 ? (kb/1024).toFixed(1) + "MB" : kb + "KB")); } catch(e){}
|
|
374
|
+
// Installed agentic-qe version — shown next to the label, mirroring "RuFlo V<x>"
|
|
375
|
+
// in ruflo's native header. Prefer the global install (matches the aidefence
|
|
376
|
+
// probe above); fall back to a project-local node_modules copy.
|
|
377
|
+
var qver = "";
|
|
378
|
+
try {
|
|
379
|
+
var qpkg = path.join(path.dirname(process.execPath), "..", "lib", "node_modules", "agentic-qe", "package.json");
|
|
380
|
+
if (!fs.existsSync(qpkg)) qpkg = path.join(cwd, "node_modules", "agentic-qe", "package.json");
|
|
381
|
+
var qv2 = JSON.parse(fs.readFileSync(qpkg, "utf8")).version;
|
|
382
|
+
if (qv2) qver = " V" + qv2;
|
|
383
|
+
} catch(e){}
|
|
384
|
+
qe = Y + "🎓 Agentic QE" + qver + R + " " + (qp.length ? qp.join(DIM + " · " + R) : "on");
|
|
385
|
+
try { fs.mkdirSync(cacheDir, {recursive:true}); fs.writeFileSync(cacheFile, JSON.stringify({ts: Date.now(), line: qe})); } catch(e){}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
} catch(e){}
|
|
389
|
+
// ── assemble: one ruflo feature per line (SONA, 📈 RL, ◷ proof FAIL alarm,
|
|
390
|
+
// ⚠ aidefence OFF alarm), then a divider, then the agentic-qe line. The two alarms
|
|
391
|
+
// are silent in the healthy case, so a well-configured machine shows only the live
|
|
392
|
+
// metrics. Each segment renders on its
|
|
393
|
+
// OWN line so the live route metrics and the security state are individually scannable
|
|
394
|
+
// and don't wrap. No rule above the SONA line — these are ruflo features and sit flush
|
|
395
|
+
// under ruflo's native lines. The divider matches ruflo's native header width
|
|
396
|
+
// ('─'.repeat(53) in statusline.cjs) so the two rules line up.
|
|
397
|
+
var out = [];
|
|
398
|
+
if (learn) out.push(learn);
|
|
399
|
+
if (route) out.push(route);
|
|
400
|
+
if (proof) out.push(proof);
|
|
401
|
+
if (sec) out.push(sec);
|
|
402
|
+
if (daemon) out.push(daemon);
|
|
403
|
+
if (brain) out.push(brain);
|
|
404
|
+
if (out.length && qe) out.push(DIM + "─".repeat(53) + R);
|
|
405
|
+
if (qe) out.push(qe);
|
|
406
|
+
if (!out.length) return "";
|
|
407
|
+
return "\n" + out.join("\n");
|
|
408
|
+
} catch(e){ return ""; }
|
|
409
|
+
}
|
|
410
|
+
// ── AI-defense probe (companion to the alarm-only segment above) ─────────────
|
|
411
|
+
// Locates the global ruflo install WITHOUT spawning npm (this runs on every render).
|
|
412
|
+
// Returns "" when no candidate resolves — the caller must treat that as "unknown",
|
|
413
|
+
// never as "off".
|
|
414
|
+
function rufloFindRufloRoot(){
|
|
415
|
+
try {
|
|
416
|
+
var fs = require("fs"), path = require("path"), os = require("os");
|
|
417
|
+
var binDir = path.dirname(process.execPath);
|
|
418
|
+
var cands = [
|
|
419
|
+
path.join(binDir, "..", "lib", "node_modules", "ruflo"), // nvm / mise layout
|
|
420
|
+
path.join(binDir, "node_modules", "ruflo"), // Windows layout
|
|
421
|
+
];
|
|
422
|
+
// A custom npm prefix (~/.npm-global, npm_config_prefix) is decoupled from the node
|
|
423
|
+
// binary, so the execPath-derived probes above all miss it — same gap as upstream #2221.
|
|
424
|
+
var prefixes = [process.env.npm_config_prefix, process.env.PREFIX, path.join(os.homedir(), ".npm-global")];
|
|
425
|
+
for (var pi = 0; pi < prefixes.length; pi++) {
|
|
426
|
+
if (prefixes[pi]) cands.push(path.join(prefixes[pi], "lib", "node_modules", "ruflo"));
|
|
427
|
+
}
|
|
428
|
+
for (var ci = 0; ci < cands.length; ci++) {
|
|
429
|
+
if (fs.existsSync(path.join(cands[ci], "package.json"))) return cands[ci];
|
|
430
|
+
}
|
|
431
|
+
return "";
|
|
432
|
+
} catch(e){ return ""; }
|
|
433
|
+
}
|
|
434
|
+
// ── real CLI bins (companion to the ruflo-bin wrapper) ──────────────────────
|
|
435
|
+
// Upstream's resolveCliBinCandidates looks for `ruflo/bin/cli.js`, but the ruflo
|
|
436
|
+
// package ships `bin/ruflo.js` (package.json bin: {"ruflo": "bin/ruflo.js"}) —
|
|
437
|
+
// a filename that never exists. @claude-flow/cli DOES ship bin/cli.js, but it is
|
|
438
|
+
// ruflo's nested dependency, not a global top-level install, so that candidate
|
|
439
|
+
// misses too. Every candidate therefore fails and the statusline silently falls
|
|
440
|
+
// through to `npx --prefer-offline @claude-flow/cli`, which serves whatever stale
|
|
441
|
+
// version happens to sit in the npx cache — that is how a machine running a fixed
|
|
442
|
+
// ruflo 3.32.2 still rendered the FABRICATED "⚠ 1 CVE" from a cached 3.28.0.
|
|
443
|
+
// Returns only paths that exist; [] means "nothing found", never a guess.
|
|
444
|
+
function rufloRealCliBins(cwd){
|
|
445
|
+
try {
|
|
446
|
+
var fs = require("fs"), path = require("path");
|
|
447
|
+
var roots = [], out = [];
|
|
448
|
+
var g = rufloFindRufloRoot();
|
|
449
|
+
if (g) roots.push(g);
|
|
450
|
+
if (cwd) roots.push(path.join(cwd, "node_modules", "ruflo"));
|
|
451
|
+
for (var i = 0; i < roots.length; i++) {
|
|
452
|
+
out.push(path.join(roots[i], "bin", "ruflo.js"));
|
|
453
|
+
out.push(path.join(roots[i], "node_modules", "@claude-flow", "cli", "bin", "cli.js"));
|
|
454
|
+
}
|
|
455
|
+
return out.filter(function(p){ try { return fs.existsSync(p); } catch(e){ return false; } });
|
|
456
|
+
} catch(e){ return []; }
|
|
457
|
+
}
|
|
458
|
+
// Three states, not two — the distinction IS the fail-safe. "off" is asserted only on
|
|
459
|
+
// positive evidence: a real ruflo install that does not contain aidefence. Anything we
|
|
460
|
+
// cannot verify is "unknown" and stays silent, because a false "your injection defense
|
|
461
|
+
// is off" would be exactly the fabricated-alarm bug this footer exists to correct.
|
|
462
|
+
// @claude-flow/security is auth/validation primitives, not detection — probing it
|
|
463
|
+
// instead would overstate, so only aidefence counts.
|
|
464
|
+
function rufloAidefenceState(rufloRoot){
|
|
465
|
+
try {
|
|
466
|
+
var fs = require("fs"), path = require("path");
|
|
467
|
+
if (!rufloRoot || !fs.existsSync(path.join(rufloRoot, "package.json"))) return "unknown";
|
|
468
|
+
var ad = path.join(rufloRoot, "node_modules", "@claude-flow", "aidefence", "package.json");
|
|
469
|
+
return fs.existsSync(ad) ? "on" : "off";
|
|
470
|
+
} catch(e){ return "unknown"; }
|
|
471
|
+
}
|
|
472
|
+
// ── security overlay: replaces ruflo's FABRICATED CVE counter with the real scan ──
|
|
473
|
+
// Upstream (@claude-flow/cli dist/src/funnel/local-signals.js, getSecurityStatus) does:
|
|
474
|
+
// let cvesFixed = 0; const totalCves = 3;
|
|
475
|
+
// cvesFixed = Math.min(totalCves, scans.length); // counts FILES, not findings
|
|
476
|
+
// Two independent defects. (1) `totalCves = 3` is a hardcoded constant referring to
|
|
477
|
+
// ruflo's OWN v3 remediation roadmap — CVE-1/2/3 in .claude/agents/v3/v3-security-architect.md
|
|
478
|
+
// are an outdated @anthropic-ai/claude-code dep + SHA-256 hashing + hardcoded creds in
|
|
479
|
+
// THEIR api/auth-service.ts. They are not public CVE IDs and have nothing to do with the
|
|
480
|
+
// project being rendered, so every clean repo is told it has 3 CVEs. (2) `cvesFixed`
|
|
481
|
+
// counts .json files in .claude/security-scans/, so running the very scan the warning
|
|
482
|
+
// tells you to run "fixes" a CVE by writing a file. The counter converges to CLEAN
|
|
483
|
+
// without anything being scanned, let alone fixed. Upstream: ruvnet/ruflo#2694.
|
|
484
|
+
//
|
|
485
|
+
// This overlay reports what the newest scan ACTUALLY found, and never invents a CVE:
|
|
486
|
+
// totalCves/cvesFixed are pinned to 0 so the "⚠ N CVEs" branch can never fire again;
|
|
487
|
+
// real state is carried in `status`, which ruflo's own renderer prints verbatim.
|
|
488
|
+
// no scan yet → PENDING → "🛡 scan pending" (honest unknown, not green)
|
|
489
|
+
// findings > 0 → "N ISSUES" → red "🛡 n issues" (real count from the scan)
|
|
490
|
+
// clean + fresh → CLEAN → "🛡 ✓"
|
|
491
|
+
// clean + stale >7d → STALE → "🛡 scan stale"
|
|
492
|
+
// Returns `upstream` untouched on any unexpected error — a wrong overlay would be worse
|
|
493
|
+
// than the bug, so the failure mode is "no worse than ruflo".
|
|
494
|
+
function rufloLocalSecurity(cwd, upstream){
|
|
495
|
+
try {
|
|
496
|
+
var fs = require("fs"), path = require("path");
|
|
497
|
+
var dir = path.join(cwd, ".claude", "security-scans");
|
|
498
|
+
var newest = null;
|
|
499
|
+
try {
|
|
500
|
+
fs.readdirSync(dir).forEach(function(f){
|
|
501
|
+
if (f.slice(-5) !== ".json") return;
|
|
502
|
+
try {
|
|
503
|
+
var j = JSON.parse(fs.readFileSync(path.join(dir, f), "utf8"));
|
|
504
|
+
// Prefer the scan's own timestamp; fall back to mtime so a hand-written or
|
|
505
|
+
// older-format scan file still orders correctly instead of sorting to epoch 0.
|
|
506
|
+
var t = Date.parse(j && j.timestamp);
|
|
507
|
+
if (!t) { try { t = fs.statSync(path.join(dir, f)).mtimeMs; } catch(e){ t = 0; } }
|
|
508
|
+
if (!newest || t > newest.t) newest = { t: t, j: j };
|
|
509
|
+
} catch(e){} // unreadable/!JSON scan file: ignore, never let it break the render
|
|
510
|
+
});
|
|
511
|
+
} catch(e){} // no directory => never scanned
|
|
512
|
+
if (!newest) return { status: "PENDING", cvesFixed: 0, totalCves: 0 };
|
|
513
|
+
var s = newest.j.summary || {};
|
|
514
|
+
var n = typeof s.total === "number" ? s.total
|
|
515
|
+
: (Array.isArray(newest.j.findings) ? newest.j.findings.length : 0);
|
|
516
|
+
if (n > 0) return { status: n + " ISSUE" + (n === 1 ? "" : "S"), cvesFixed: 0, totalCves: 0 };
|
|
517
|
+
var staleMs = Number(process.env.RUFLO_SCAN_STALE_MS || 7 * 24 * 3600 * 1000);
|
|
518
|
+
if (staleMs > 0 && newest.t && (Date.now() - newest.t) > staleMs) {
|
|
519
|
+
return { status: "STALE", cvesFixed: 0, totalCves: 0 };
|
|
520
|
+
}
|
|
521
|
+
return { status: "CLEAN", cvesFixed: 0, totalCves: 0 };
|
|
522
|
+
} catch(e){ return upstream; }
|
|
523
|
+
}
|
|
524
|
+
// ── insight-row companion to rufloLocalSecurity ──────────────────────────────
|
|
525
|
+
// The fabricated count reaches the render through a SECOND, independent path: the
|
|
526
|
+
// CLI builds the line-3 insight itself (funnel/insights.js securityInsight →
|
|
527
|
+
// `pending = s.totalCves - s.cvesFixed`) and ships it as pre-rendered promo TEXT.
|
|
528
|
+
// Overlaying data.security cannot fix that — the sentence is already baked, so a
|
|
529
|
+
// repo with a clean scan still gets "⚠ 1 CVE pending". This rebuilds that one
|
|
530
|
+
// sentence from the real scan, or drops it when there is nothing to say.
|
|
531
|
+
// Matched on TEXT, not id: promo.js reduces the insight to {text, kind} and throws
|
|
532
|
+
// the id away, so `insight-cves-pending` is not observable by the time we see it.
|
|
533
|
+
// Only ever touches a CVE-worded insight — every other insight/tip/promo passes
|
|
534
|
+
// through untouched, so the funnel rotation is preserved.
|
|
535
|
+
function rufloHonestInsight(promo, sec){
|
|
536
|
+
try {
|
|
537
|
+
if (!promo || promo.kind !== "insight" || typeof promo.text !== "string") return promo;
|
|
538
|
+
if (!/\bCVEs?\b/.test(promo.text)) return promo; // a different insight — not ours to touch
|
|
539
|
+
if (!sec) return null;
|
|
540
|
+
if (sec.status === "PENDING") return { text: "🛡 Security scan pending — Run ruflo security scan --depth full", kind: "insight" };
|
|
541
|
+
if (sec.status === "STALE") return { text: "🛡 Security scan stale — Run ruflo security scan --depth full", kind: "insight" };
|
|
542
|
+
var m = /^(\d+) ISSUE/.exec(sec.status || "");
|
|
543
|
+
if (m) {
|
|
544
|
+
var n = Number(m[1]);
|
|
545
|
+
return { text: "⚠ " + n + " security issue" + (n === 1 ? "" : "s") + " found — see .claude/security-scans", kind: "insight" };
|
|
546
|
+
}
|
|
547
|
+
return null; // CLEAN: say nothing. The slot falls blank rather than nagging about a lie.
|
|
548
|
+
} catch(e){ return promo; }
|
|
549
|
+
}
|
|
550
|
+
/* ruflo-seg:END */
|
|
551
|
+
/* ruflo-bin:BEGIN */
|
|
552
|
+
try {
|
|
553
|
+
if (typeof resolveCliBinCandidates === "function") {
|
|
554
|
+
var _rufloOrigResolveCliBins = resolveCliBinCandidates;
|
|
555
|
+
resolveCliBinCandidates = function(){
|
|
556
|
+
var orig = [];
|
|
557
|
+
try { orig = _rufloOrigResolveCliBins.apply(this, arguments) || []; } catch(e){}
|
|
558
|
+
try {
|
|
559
|
+
var cwd = process.cwd();
|
|
560
|
+
try { if (typeof CWD === "string" && CWD) cwd = CWD; } catch(e){}
|
|
561
|
+
var real = (typeof rufloRealCliBins === "function") ? rufloRealCliBins(cwd) : [];
|
|
562
|
+
return real.concat(orig.filter(function(p){ return real.indexOf(p) === -1; }));
|
|
563
|
+
} catch(e){ return orig; }
|
|
564
|
+
};
|
|
565
|
+
}
|
|
566
|
+
} catch(e){}
|
|
567
|
+
/* ruflo-bin:END */
|
|
2
568
|
/**
|
|
3
569
|
* RuFlo V3 Statusline — delegation build (#2195)
|
|
4
570
|
*
|
|
@@ -42,7 +608,11 @@ const CONFIG = {
|
|
|
42
608
|
hideCost: /^(1|true|yes|on)$/i.test(process.env.RUFLO_STATUSLINE_HIDE_COST || ''),
|
|
43
609
|
};
|
|
44
610
|
|
|
45
|
-
const CWD = process.cwd();
|
|
611
|
+
const CWD = process.env.CLAUDE_PROJECT_DIR || process.cwd();
|
|
612
|
+
// Replaced by statusline-generator with the package root of the CLI that
|
|
613
|
+
// installed this helper. This survives custom npm prefixes and bundled Node
|
|
614
|
+
// runtimes whose process.execPath belongs to a different tree (#2811).
|
|
615
|
+
const BAKED_INSTALL_ROOT = "";
|
|
46
616
|
|
|
47
617
|
// ─── Delegation cache ───────────────────────────────────────────
|
|
48
618
|
// Cache the CLI JSON result so rapid prompt re-renders (Claude Code
|
|
@@ -404,6 +974,154 @@ function getLocalIntegration() {
|
|
|
404
974
|
return integration;
|
|
405
975
|
}
|
|
406
976
|
|
|
977
|
+
// ─── Security freshness overlay (ruvnet/ruflo#2776) ──────────────
|
|
978
|
+
// The shipped CLI producer (dist/src/funnel/local-signals.js getSecurityStatus)
|
|
979
|
+
// only ever emits PENDING / CLEAN / ISSUES — it captures `scannedAt` but never
|
|
980
|
+
// inspects it, so a year-old scan renders 🛡 ✓ forever and the renderer's
|
|
981
|
+
// STALE / IN_PROGRESS branches are unreachable. Worse, when CLI delegation
|
|
982
|
+
// fails, the stale-while-revalidate cache (readCache() below) keeps serving
|
|
983
|
+
// the pre-scan PENDING pill indefinitely, so a user who runs the advertised
|
|
984
|
+
// `ruflo security scan` sees no change — the pill freezes at "scan pending".
|
|
985
|
+
//
|
|
986
|
+
// This overlay recomputes the security block from disk on EVERY render (same
|
|
987
|
+
// pattern as adrs/agentdb/tests/hooks above), which:
|
|
988
|
+
// 1) Makes STALE reachable — when the newest scan is older than
|
|
989
|
+
// RUFLO_SCAN_STALE_HOURS (default 24h — matches the CVE feed refresh
|
|
990
|
+
// cadence), report STALE regardless of what the cached CLI JSON says.
|
|
991
|
+
// 2) Makes IN_PROGRESS reachable — when a `scan-in-progress` marker file
|
|
992
|
+
// exists and is younger than SECURITY_IN_PROGRESS_MAX_MIN (guards against
|
|
993
|
+
// a crashed scan leaving the marker behind).
|
|
994
|
+
// 3) Caps the "scan pending" display window — if PENDING has been shown for
|
|
995
|
+
// >RUFLO_SCAN_PENDING_CAP_MIN (default 30) without a completion write,
|
|
996
|
+
// switch to STALE and stop rendering the yellow indicator. The tracker
|
|
997
|
+
// lives in ~/.ruflo/statusline-scan-pending-since.json, keyed by CWD
|
|
998
|
+
// hash so multiple project checkouts don't collide.
|
|
999
|
+
// 4) Since this runs AFTER readCache() serves stale data, it bypasses the
|
|
1000
|
+
// "pill freezes at PENDING" freeze in defect 2 — the overlay reads
|
|
1001
|
+
// fresh disk state even when the CLI delegation is broken.
|
|
1002
|
+
const SECURITY_STALE_HOURS = Math.max(1, parseInt(process.env.RUFLO_SCAN_STALE_HOURS || '24', 10) || 24);
|
|
1003
|
+
const SECURITY_PENDING_CAP_MIN = Math.max(1, parseInt(process.env.RUFLO_SCAN_PENDING_CAP_MIN || '30', 10) || 30);
|
|
1004
|
+
const SECURITY_IN_PROGRESS_MAX_MIN = 30; // marker older than this = crashed scan; treat as absent
|
|
1005
|
+
const PENDING_TRACK_FILE = path.join(os.homedir(), '.ruflo', 'statusline-scan-pending-since.json');
|
|
1006
|
+
const CWD_KEY = require('crypto').createHash('md5').update(CWD).digest('hex').slice(0, 12);
|
|
1007
|
+
|
|
1008
|
+
function readPendingSince() {
|
|
1009
|
+
try {
|
|
1010
|
+
if (!fs.existsSync(PENDING_TRACK_FILE)) return null;
|
|
1011
|
+
const raw = JSON.parse(fs.readFileSync(PENDING_TRACK_FILE, 'utf-8'));
|
|
1012
|
+
if (raw && typeof raw === 'object' && typeof raw[CWD_KEY] === 'number') return raw[CWD_KEY];
|
|
1013
|
+
} catch { /* ignore */ }
|
|
1014
|
+
return null;
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
function writePendingSince(ts) {
|
|
1018
|
+
try {
|
|
1019
|
+
let obj = {};
|
|
1020
|
+
if (fs.existsSync(PENDING_TRACK_FILE)) {
|
|
1021
|
+
try { obj = JSON.parse(fs.readFileSync(PENDING_TRACK_FILE, 'utf-8')) || {}; } catch { obj = {}; }
|
|
1022
|
+
}
|
|
1023
|
+
if (ts === null) { delete obj[CWD_KEY]; } else { obj[CWD_KEY] = ts; }
|
|
1024
|
+
fs.mkdirSync(path.dirname(PENDING_TRACK_FILE), { recursive: true, mode: 0o700 });
|
|
1025
|
+
fs.writeFileSync(PENDING_TRACK_FILE, JSON.stringify(obj), { encoding: 'utf-8', mode: 0o600 });
|
|
1026
|
+
} catch { /* ignore */ }
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
function getLocalSecurity(cliSecurity) {
|
|
1030
|
+
const base = (cliSecurity && typeof cliSecurity === 'object')
|
|
1031
|
+
? Object.assign({}, cliSecurity)
|
|
1032
|
+
: { status: 'NONE', findings: 0, cvesFixed: 0, totalCves: 0 };
|
|
1033
|
+
base.findings = Math.max(0, base.findings || 0);
|
|
1034
|
+
|
|
1035
|
+
const scanDir = path.join(CWD, '.claude', 'security-scans');
|
|
1036
|
+
|
|
1037
|
+
// Detect a live in-progress marker (writer opts-in by writing this file).
|
|
1038
|
+
let inProgress = false;
|
|
1039
|
+
try {
|
|
1040
|
+
const marker = path.join(scanDir, 'scan-in-progress');
|
|
1041
|
+
if (fs.existsSync(marker)) {
|
|
1042
|
+
const ageMin = (Date.now() - fs.statSync(marker).mtimeMs) / 60000;
|
|
1043
|
+
if (ageMin < SECURITY_IN_PROGRESS_MAX_MIN) inProgress = true;
|
|
1044
|
+
}
|
|
1045
|
+
} catch { /* ignore */ }
|
|
1046
|
+
|
|
1047
|
+
// Find newest scan-*.json by mtime and read its findings/timestamp.
|
|
1048
|
+
let newestPath = null;
|
|
1049
|
+
let newestMtime = 0;
|
|
1050
|
+
try {
|
|
1051
|
+
if (fs.existsSync(scanDir)) {
|
|
1052
|
+
for (const name of fs.readdirSync(scanDir)) {
|
|
1053
|
+
if (!name.startsWith('scan-') || !name.endsWith('.json')) continue;
|
|
1054
|
+
try {
|
|
1055
|
+
const st = fs.statSync(path.join(scanDir, name));
|
|
1056
|
+
if (st.mtimeMs > newestMtime) { newestMtime = st.mtimeMs; newestPath = path.join(scanDir, name); }
|
|
1057
|
+
} catch { /* ignore */ }
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
} catch { /* ignore */ }
|
|
1061
|
+
|
|
1062
|
+
if (newestPath) {
|
|
1063
|
+
// We have a scan on disk — the never-scanned pending tracker is no longer
|
|
1064
|
+
// relevant. Clear it so a re-created directory can start a fresh window.
|
|
1065
|
+
writePendingSince(null);
|
|
1066
|
+
|
|
1067
|
+
let scannedAtMs = newestMtime;
|
|
1068
|
+
let findings = base.findings;
|
|
1069
|
+
try {
|
|
1070
|
+
const j = JSON.parse(fs.readFileSync(newestPath, 'utf-8'));
|
|
1071
|
+
// scannedAt (CLI producer's field name) OR timestamp (writer's field name).
|
|
1072
|
+
const isoStr = (j && (j.scannedAt || j.timestamp)) || null;
|
|
1073
|
+
if (isoStr) {
|
|
1074
|
+
const t = Date.parse(isoStr);
|
|
1075
|
+
if (!isNaN(t)) scannedAtMs = t;
|
|
1076
|
+
}
|
|
1077
|
+
// findings may be a number, an array, or nested in summary.total.
|
|
1078
|
+
if (j) {
|
|
1079
|
+
if (typeof j.findings === 'number') findings = j.findings;
|
|
1080
|
+
else if (Array.isArray(j.findings)) findings = j.findings.length;
|
|
1081
|
+
else if (j.summary && typeof j.summary.total === 'number') findings = j.summary.total;
|
|
1082
|
+
}
|
|
1083
|
+
} catch { /* ignore parse — fall back to mtime + cached findings */ }
|
|
1084
|
+
|
|
1085
|
+
base.findings = Math.max(0, findings || 0);
|
|
1086
|
+
base.scannedAt = new Date(scannedAtMs).toISOString();
|
|
1087
|
+
|
|
1088
|
+
const ageHours = (Date.now() - scannedAtMs) / 3600000;
|
|
1089
|
+
if (ageHours >= SECURITY_STALE_HOURS) {
|
|
1090
|
+
// Stale but findings still render red (a year-old ISSUES scan is still bad).
|
|
1091
|
+
base.status = 'STALE';
|
|
1092
|
+
} else if (inProgress) {
|
|
1093
|
+
base.status = 'IN_PROGRESS';
|
|
1094
|
+
} else if (base.findings > 0) {
|
|
1095
|
+
base.status = 'ISSUES';
|
|
1096
|
+
} else {
|
|
1097
|
+
base.status = 'CLEAN';
|
|
1098
|
+
}
|
|
1099
|
+
return base;
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
// No scan file. If a live marker exists, we're mid-scan.
|
|
1103
|
+
if (inProgress) {
|
|
1104
|
+
base.status = 'IN_PROGRESS';
|
|
1105
|
+
// Reset the pending tracker so, if the scan crashes mid-flight, the next
|
|
1106
|
+
// render starts a fresh N-minute pending window instead of an already-expired one.
|
|
1107
|
+
writePendingSince(null);
|
|
1108
|
+
return base;
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
// Truly never-scanned: track how long we've shown PENDING. After the cap,
|
|
1112
|
+
// escalate to STALE with the dim/gray glyph so the pill visibly stops
|
|
1113
|
+
// shouting for attention — the user has either ignored it for 30 min or
|
|
1114
|
+
// the scan is silently failing to write.
|
|
1115
|
+
let pendingSince = readPendingSince();
|
|
1116
|
+
if (pendingSince === null || typeof pendingSince !== 'number') {
|
|
1117
|
+
pendingSince = Date.now();
|
|
1118
|
+
writePendingSince(pendingSince);
|
|
1119
|
+
}
|
|
1120
|
+
const pendingAgeMin = (Date.now() - pendingSince) / 60000;
|
|
1121
|
+
base.status = (pendingAgeMin >= SECURITY_PENDING_CAP_MIN) ? 'STALE' : 'PENDING';
|
|
1122
|
+
return base;
|
|
1123
|
+
}
|
|
1124
|
+
|
|
407
1125
|
// Overlay every locally-derived block onto the CLI data (mutates in place).
|
|
408
1126
|
function applyLocalOverlays(data) {
|
|
409
1127
|
data.adrs = getLocalADRCount();
|
|
@@ -411,6 +1129,9 @@ function applyLocalOverlays(data) {
|
|
|
411
1129
|
data.tests = getLocalTests();
|
|
412
1130
|
data.hooks = getLocalHooks();
|
|
413
1131
|
data.integration = getLocalIntegration();
|
|
1132
|
+
// Security overlay: recompute freshness from disk on every render so cached
|
|
1133
|
+
// CLI JSON can never freeze the pill at PENDING. See getLocalSecurity() above.
|
|
1134
|
+
data.security = getLocalSecurity(data.security);
|
|
414
1135
|
return data;
|
|
415
1136
|
}
|
|
416
1137
|
|
|
@@ -681,10 +1402,11 @@ function getPkgVersion() {
|
|
|
681
1402
|
// version (see generateStatuslineScript()'s doc comment) — correct even
|
|
682
1403
|
// when this renders via a pure npx invocation with no local install for
|
|
683
1404
|
// the candidate scan below to find.
|
|
684
|
-
let ver = "3.
|
|
1405
|
+
let ver = "3.38.8";
|
|
685
1406
|
try {
|
|
686
1407
|
const home = os.homedir();
|
|
687
1408
|
const pkgPaths = [
|
|
1409
|
+
...(BAKED_INSTALL_ROOT ? [path.join(BAKED_INSTALL_ROOT, 'package.json')] : []),
|
|
688
1410
|
path.join(home, '.claude', 'plugins', 'marketplaces', 'ruflo', 'package.json'),
|
|
689
1411
|
path.join(CWD, 'node_modules', '@claude-flow', 'cli', 'package.json'),
|
|
690
1412
|
path.join(CWD, 'node_modules', 'ruflo', 'package.json'),
|
|
@@ -712,7 +1434,12 @@ function getPkgVersion() {
|
|
|
712
1434
|
// #2221 follow-up: a custom npm prefix (e.g. ~/.npm-global) is decoupled from
|
|
713
1435
|
// the node binary location, so the binDir-derived probes above all miss. Also
|
|
714
1436
|
// probe the npm prefix from the environment and the common ~/.npm-global default.
|
|
715
|
-
for (const prefix of [
|
|
1437
|
+
for (const prefix of [
|
|
1438
|
+
process.env.npm_config_prefix,
|
|
1439
|
+
process.env.PREFIX,
|
|
1440
|
+
path.join(home, '.local'),
|
|
1441
|
+
path.join(home, '.npm-global'),
|
|
1442
|
+
]) {
|
|
716
1443
|
if (prefix) globalModuleDirs.push(path.join(prefix, 'lib', 'node_modules'));
|
|
717
1444
|
}
|
|
718
1445
|
for (const gm of globalModuleDirs) {
|
|
@@ -731,14 +1458,12 @@ function getPkgVersion() {
|
|
|
731
1458
|
// right after a publish). Taking the first EXISTING candidate meant the
|
|
732
1459
|
// header could show a stale version even when a newer install (e.g.
|
|
733
1460
|
// node_modules/@claude-flow/cli from a plain npm install) was sitting right there.
|
|
734
|
-
let found = false;
|
|
735
1461
|
for (const p of pkgPaths) {
|
|
736
1462
|
if (!fs.existsSync(p)) continue;
|
|
737
1463
|
try {
|
|
738
1464
|
const pkg = JSON.parse(fs.readFileSync(p, 'utf-8'));
|
|
739
1465
|
if (pkg && typeof pkg.version === 'string' && pkg.version.length > 0) {
|
|
740
|
-
if (
|
|
741
|
-
found = true;
|
|
1466
|
+
if (compareVersions(pkg.version, ver) > 0) ver = pkg.version;
|
|
742
1467
|
}
|
|
743
1468
|
} catch { /* ignore */ }
|
|
744
1469
|
}
|
|
@@ -851,10 +1576,14 @@ function generateStatusline() {
|
|
|
851
1576
|
if (healthAllGreen) {
|
|
852
1577
|
opsParts.push(c.brightGreen + '🛡 ✓' + c.reset);
|
|
853
1578
|
} else {
|
|
1579
|
+
// #2776: STALE gets dim/gray (distinct from the actionable yellow of
|
|
1580
|
+
// PENDING/IN_PROGRESS) so a stale pill visibly stops shouting for
|
|
1581
|
+
// attention — the user can act on the "run ruflo security scan" prompt or
|
|
1582
|
+
// ignore it without a permanently-yellow indicator.
|
|
854
1583
|
if (secStatus === 'PENDING') opsParts.push(c.brightYellow + '🛡 scan pending' + c.reset);
|
|
855
1584
|
else if (secStatus === 'IN_PROGRESS') opsParts.push(c.brightYellow + '🛡 scanning…' + c.reset);
|
|
856
1585
|
else if (secStatus === 'ISSUES') opsParts.push(c.brightRed + '🛡 findings' + c.reset);
|
|
857
|
-
else if (secStatus === 'STALE') opsParts.push(c.
|
|
1586
|
+
else if (secStatus === 'STALE') opsParts.push(c.dim + '🛡 scan stale' + c.reset);
|
|
858
1587
|
else if (secStatus !== 'NONE' && secStatus !== 'CLEAN') opsParts.push(c.brightRed + '🛡 ' + secStatus.toLowerCase() + c.reset);
|
|
859
1588
|
if (findings > 0) {
|
|
860
1589
|
opsParts.push(c.brightRed + '⚠ ' + findings + ' finding' + (findings === 1 ? '' : 's') + c.reset);
|
|
@@ -1056,5 +1785,5 @@ if (process.argv.includes('--json')) {
|
|
|
1056
1785
|
} else if (process.argv.includes('--compact')) {
|
|
1057
1786
|
console.log(JSON.stringify(generateJSON()));
|
|
1058
1787
|
} else {
|
|
1059
|
-
console.log(generateStatusline());
|
|
1788
|
+
console.log(generateStatusline() + rufloActivationSegments(process.cwd()));
|
|
1060
1789
|
}
|