agentic-qe 3.12.1 → 3.12.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/skills/skills-manifest.json +1 -1
- package/CHANGELOG.md +87 -0
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/cli/bundle.js +5 -5
- package/dist/cli/chunks/adapter-D657MKZY.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-P4VYM5KK.js → agent-booster-wasm-XFAQATTH.js} +2 -2
- package/dist/cli/chunks/{agent-handler-PBQ7L2TO.js → agent-handler-2ZV4CA3U.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-UPWO3X6V.js → agent-memory-branch-6WGP7F5T.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-AFR6OZJK.js +2 -0
- package/dist/cli/chunks/{arena-QYTP3FG6.js → arena-FWX7XZAE.js} +4 -4
- package/dist/cli/chunks/{arena-LEUTILZ7.js → arena-KJUNQK4N.js} +2 -2
- package/dist/cli/chunks/{audit-TB6M2YLK.js → audit-YFUDEOKN.js} +3 -3
- package/dist/cli/chunks/base-K5QRGZWE.js +2 -0
- package/dist/cli/chunks/{hnswlib-node-62RTSHAY.js → better-sqlite3-FE55OGYB.js} +2 -2
- package/dist/cli/chunks/brain-handler-ZCK4WTPK.js +89 -0
- package/dist/cli/chunks/{branch-enumerator-WEIP3DXB.js → branch-enumerator-HTVINRYG.js} +2 -2
- package/dist/cli/chunks/{browser-HY6VLXHZ.js → browser-WUL2B77M.js} +2 -2
- package/dist/cli/chunks/browser-workflow-ZMMKCGYW.js +2 -0
- package/dist/cli/chunks/{chunk-NHRBKOYD.js → chunk-2CPJCXV6.js} +2 -2
- package/dist/cli/chunks/{chunk-D72N5V2S.js → chunk-2HCMRGMO.js} +2 -2
- package/dist/cli/chunks/{chunk-UBPJQKYS.js → chunk-2LNDU7AW.js} +2 -2
- package/dist/cli/chunks/{chunk-ONSNNY6J.js → chunk-2OX74DOO.js} +1 -1
- package/dist/cli/chunks/{chunk-QORWBION.js → chunk-2YDZXFO2.js} +2 -2
- package/dist/cli/chunks/{chunk-QJXUK54J.js → chunk-32L7DKNQ.js} +2 -2
- package/dist/cli/chunks/{chunk-UZXDYT6O.js → chunk-3YC4YUGB.js} +2 -2
- package/dist/cli/chunks/{chunk-NOCPO55P.js → chunk-4EHW4TNA.js} +2 -2
- package/dist/cli/chunks/{chunk-QZBPXJ5C.js → chunk-4HP7N6SP.js} +2 -2
- package/dist/cli/chunks/{chunk-XTAXSKPC.js → chunk-5FAWIIWF.js} +2 -2
- package/dist/cli/chunks/{chunk-YGB3MT3R.js → chunk-67BCEHU5.js} +1 -1
- package/dist/cli/chunks/{chunk-3W2FZXFD.js → chunk-6E47R27C.js} +1 -1
- package/dist/cli/chunks/{chunk-74VIADSJ.js → chunk-6HQDPDN5.js} +2 -2
- package/dist/cli/chunks/chunk-6SQ72FG7.js +2 -0
- package/dist/cli/chunks/{chunk-RJ7TU2MP.js → chunk-6SUSRXXF.js} +1 -1
- package/dist/cli/chunks/{chunk-FFSS3Y6W.js → chunk-72QQDR3Y.js} +2 -2
- package/dist/cli/chunks/{chunk-CP4GSICY.js → chunk-7Q74K3HZ.js} +1 -1
- package/dist/cli/chunks/{chunk-UEC53US3.js → chunk-7WF3TW3G.js} +4 -4
- package/dist/cli/chunks/chunk-7XUM4LBC.js +2 -0
- package/dist/cli/chunks/{chunk-UGPBL7LX.js → chunk-ADQFQBFJ.js} +2 -2
- package/dist/cli/chunks/{chunk-BALFQQB7.js → chunk-AIWRYWK2.js} +2 -2
- package/dist/cli/chunks/{chunk-XJTGLG7G.js → chunk-AZ24ONMX.js} +1 -1
- package/dist/cli/chunks/{chunk-LRWBOJ5Y.js → chunk-BDGKB2PT.js} +2 -2
- package/dist/cli/chunks/{chunk-NK2Z6FGF.js → chunk-BEPP57C2.js} +2 -2
- package/dist/cli/chunks/{chunk-HGKSU4QV.js → chunk-BQ2K4BPD.js} +2 -2
- package/dist/cli/chunks/{chunk-QOAI6ETC.js → chunk-BSNNTOHY.js} +3 -3
- package/dist/cli/chunks/chunk-CHFTHSMM.js +9 -0
- package/dist/cli/chunks/{chunk-IHWWZOHP.js → chunk-CL6SNCFF.js} +1 -1
- package/dist/cli/chunks/{chunk-7N2SCRWJ.js → chunk-CXMOIE7D.js} +2 -2
- package/dist/cli/chunks/{chunk-PZ3Q34OT.js → chunk-CYSBM52D.js} +2 -2
- package/dist/cli/chunks/{chunk-X2CEX4KC.js → chunk-D4GMAUTP.js} +10 -10
- package/dist/cli/chunks/{chunk-JDZIBSMY.js → chunk-DCYBV6HV.js} +1 -1
- package/dist/cli/chunks/chunk-DDYP6FBC.js +2 -0
- package/dist/cli/chunks/{chunk-SFQFBLWQ.js → chunk-DHUZHT5D.js} +1 -1
- package/dist/cli/chunks/{chunk-X2K3BTI4.js → chunk-DMD6WVJ2.js} +2 -2
- package/dist/cli/chunks/{chunk-GW3M7GQH.js → chunk-DTZFZ5M7.js} +2 -2
- package/dist/cli/chunks/{chunk-WBDV4V3H.js → chunk-DW7OI5IF.js} +2 -2
- package/dist/cli/chunks/{chunk-CYYT6YEV.js → chunk-DZ775UGW.js} +2 -2
- package/dist/cli/chunks/{chunk-BNMV5DCM.js → chunk-E2U3LTGM.js} +1 -1
- package/dist/cli/chunks/{chunk-KQV5644J.js → chunk-E53UR2EW.js} +3 -3
- package/dist/cli/chunks/{chunk-XYV6YUWS.js → chunk-EH7TSJPS.js} +2 -2
- package/dist/cli/chunks/{chunk-42GFB7VX.js → chunk-EHO52NKU.js} +2 -2
- package/dist/cli/chunks/{chunk-75AVUS5U.js → chunk-EOUJ6X5H.js} +1 -1
- package/dist/cli/chunks/{chunk-ZNITDSWL.js → chunk-FHHCH7WL.js} +1 -1
- package/dist/cli/chunks/{chunk-PQ4NSXZM.js → chunk-FJACKKRL.js} +2 -2
- package/dist/cli/chunks/{chunk-45QNHMTP.js → chunk-FTM562PF.js} +1 -1
- package/dist/cli/chunks/{chunk-4KI72C2E.js → chunk-FXOOOJQD.js} +1 -1
- package/dist/cli/chunks/chunk-G5OGKVLO.js +2 -0
- package/dist/cli/chunks/{chunk-42PYEEYQ.js → chunk-GGTCD4MA.js} +1 -1
- package/dist/cli/chunks/{chunk-GASACVTU.js → chunk-GMFFMJD6.js} +2 -2
- package/dist/cli/chunks/{chunk-JRNDFC23.js → chunk-GS6G7AVS.js} +2 -2
- package/dist/cli/chunks/{chunk-BKKJEKNT.js → chunk-GV2BS5NC.js} +2 -2
- package/dist/cli/chunks/{chunk-JRHRC2MP.js → chunk-HGJQSTQD.js} +1 -1
- package/dist/cli/chunks/{chunk-M5P5WNXA.js → chunk-HJ2LG5IH.js} +1 -1
- package/dist/cli/chunks/{chunk-UR655D4K.js → chunk-HJ4U64BL.js} +2 -2
- package/dist/cli/chunks/chunk-ILRKO6A5.js +43 -0
- package/dist/cli/chunks/{chunk-LZ6TJ7XL.js → chunk-IWQHQLT6.js} +2 -2
- package/dist/cli/chunks/{chunk-SHKOPOPD.js → chunk-J2RJOJ5Q.js} +1 -1
- package/dist/cli/chunks/{chunk-JIM4VSLF.js → chunk-KA4EAMMQ.js} +3 -3
- package/dist/cli/chunks/{chunk-6432JORM.js → chunk-KE3RK35K.js} +1 -1
- package/dist/cli/chunks/{chunk-VTFYY4SH.js → chunk-KGHSKDC7.js} +2 -2
- package/dist/cli/chunks/{chunk-3I3Z4C5X.js → chunk-KKOFH26C.js} +1 -1
- package/dist/cli/chunks/{chunk-AGWKCY42.js → chunk-KNWBRMLL.js} +2 -2
- package/dist/cli/chunks/{chunk-C7HGYLNF.js → chunk-KRS4KGX5.js} +2 -2
- package/dist/cli/chunks/{chunk-VHJCQBD2.js → chunk-KVHCWH4H.js} +2 -2
- package/dist/cli/chunks/{chunk-N3PSRG6F.js → chunk-KXKACV3E.js} +2 -2
- package/dist/cli/chunks/{chunk-BLU7OLQZ.js → chunk-L2X3BWMN.js} +2 -2
- package/dist/cli/chunks/{chunk-4U5MJX2H.js → chunk-L6GZGEFQ.js} +2 -2
- package/dist/cli/chunks/{chunk-DSNFOX22.js → chunk-LCM7TY76.js} +2 -2
- package/dist/cli/chunks/{chunk-NVXSM7UO.js → chunk-LGYEOYQJ.js} +2 -2
- package/dist/cli/chunks/{chunk-J4IAMQZI.js → chunk-LHAUFY4Y.js} +2 -2
- package/dist/cli/chunks/{chunk-OJORNYN3.js → chunk-LNIHLNW4.js} +3 -3
- package/dist/cli/chunks/{chunk-PRA73XZY.js → chunk-M32DTUZM.js} +2 -2
- package/dist/cli/chunks/{chunk-GGF5FZWS.js → chunk-M7W6VJ65.js} +1 -1
- package/dist/cli/chunks/{chunk-HZGFER4N.js → chunk-MB7TZQW3.js} +3 -3
- package/dist/cli/chunks/{chunk-RIASOMB2.js → chunk-MOX25RZQ.js} +2 -2
- package/dist/cli/chunks/{chunk-BPM7NEHS.js → chunk-MOXKKY5Q.js} +6 -6
- package/dist/cli/chunks/{chunk-UKF4V7LE.js → chunk-MS6VOSPY.js} +5 -5
- package/dist/cli/chunks/{chunk-QXZOUETY.js → chunk-MSDIIRLM.js} +2 -2
- package/dist/cli/chunks/{chunk-BBNQDHGF.js → chunk-MZ7SIO6R.js} +2 -2
- package/dist/cli/chunks/{chunk-HDI3FD4G.js → chunk-N4ML23ZG.js} +1 -1
- package/dist/cli/chunks/{chunk-7KHIOWBN.js → chunk-NAMJGRGC.js} +1 -1
- package/dist/cli/chunks/{chunk-IE6FDICX.js → chunk-NJDLJ3KD.js} +2 -2
- package/dist/cli/chunks/{chunk-4LKQZW2H.js → chunk-NKTLKMUB.js} +1 -1
- package/dist/cli/chunks/{chunk-CXUHD2O5.js → chunk-NLDLUHOF.js} +2 -2
- package/dist/cli/chunks/{chunk-XDRAU3W6.js → chunk-NOSQI2OW.js} +2 -2
- package/dist/cli/chunks/{chunk-ZCDGLNJ7.js → chunk-NT66CT73.js} +2 -2
- package/dist/cli/chunks/{chunk-JWZNWVLG.js → chunk-NX522PRH.js} +2 -2
- package/dist/cli/chunks/{chunk-O65OPAZH.js → chunk-OBL6W4Z5.js} +2 -2
- package/dist/cli/chunks/chunk-OPG2HV2W.js +2 -0
- package/dist/cli/chunks/{chunk-BCBITOMT.js → chunk-PDX7IYTJ.js} +2 -2
- package/dist/cli/chunks/{chunk-IC6SOVGO.js → chunk-PEHEANAM.js} +2 -2
- package/dist/cli/chunks/{chunk-J6ZCULWG.js → chunk-PPUDKQ4X.js} +2 -2
- package/dist/cli/chunks/{chunk-WPEGG6DX.js → chunk-PSDH7CIL.js} +1 -1
- package/dist/cli/chunks/{chunk-NTMN2ZJY.js → chunk-PTPN6HQ7.js} +2 -2
- package/dist/cli/chunks/{chunk-C2K4LQI5.js → chunk-PXCJDB7J.js} +1 -1
- package/dist/cli/chunks/{chunk-WPG5LXR7.js → chunk-QILF6BZH.js} +2 -2
- package/dist/cli/chunks/{chunk-BAHXVVX3.js → chunk-R6WMGSEK.js} +2 -2
- package/dist/cli/chunks/{chunk-2PQ7YADF.js → chunk-RE42RJYR.js} +2 -2
- package/dist/cli/chunks/{chunk-BWNMAXV7.js → chunk-RLBNAB6Y.js} +1 -1
- package/dist/cli/chunks/{chunk-BXIJY6SB.js → chunk-ROFCS47F.js} +1 -1
- package/dist/cli/chunks/{chunk-7KK6XSYK.js → chunk-RSZOCQOL.js} +2 -2
- package/dist/cli/chunks/{chunk-NEXJUTHF.js → chunk-S47YGWXK.js} +2 -2
- package/dist/cli/chunks/{chunk-5H5A74U2.js → chunk-SFS3UHNF.js} +1 -1
- package/dist/cli/chunks/{chunk-U5ITD7ZD.js → chunk-SGMJ277D.js} +1 -1
- package/dist/cli/chunks/{chunk-OXVAGR64.js → chunk-SPI4LUJ6.js} +2 -2
- package/dist/cli/chunks/{chunk-FBYFDD7L.js → chunk-SV7J5FDW.js} +2 -2
- package/dist/cli/chunks/{chunk-S42RFOZJ.js → chunk-TP3UAWMB.js} +2 -2
- package/dist/cli/chunks/{chunk-OEXSBR72.js → chunk-TXLPOXAN.js} +1 -1
- package/dist/cli/chunks/{chunk-R4A6PY5D.js → chunk-UAPUA6OY.js} +2 -2
- package/dist/cli/chunks/{chunk-55MQ2SFP.js → chunk-UGW23T6S.js} +2 -2
- package/dist/cli/chunks/{chunk-774X6OJY.js → chunk-UGXHMQ6P.js} +2 -2
- package/dist/cli/chunks/{chunk-GLO53MUQ.js → chunk-UIHZ34SJ.js} +2 -2
- package/dist/cli/chunks/{chunk-TMPRR3FZ.js → chunk-ULQCEM7K.js} +2 -2
- package/dist/cli/chunks/{chunk-YNXQMJGJ.js → chunk-UZ7FXVH5.js} +1 -1
- package/dist/cli/chunks/{chunk-LAJHHR3Q.js → chunk-VFYMWDSJ.js} +1 -1
- package/dist/cli/chunks/{chunk-XS6BIOPQ.js → chunk-VSD6JE2H.js} +2 -2
- package/dist/cli/chunks/{chunk-MIAY35K6.js → chunk-VUCVSKJC.js} +2 -2
- package/dist/cli/chunks/{chunk-I4BZLVFE.js → chunk-WBZNLFTV.js} +3 -3
- package/dist/cli/chunks/{chunk-PDS5P5QD.js → chunk-WFPGIP4N.js} +2 -2
- package/dist/cli/chunks/{chunk-PZZDAECU.js → chunk-WKE6WL5C.js} +3 -3
- package/dist/cli/chunks/{chunk-VFRWLSQO.js → chunk-WQASUQ5P.js} +1 -1
- package/dist/cli/chunks/{chunk-GXMNCW2M.js → chunk-WUE53ZPH.js} +1 -1
- package/dist/cli/chunks/{chunk-UBWSYDO5.js → chunk-XBOCRCC6.js} +1 -1
- package/dist/cli/chunks/{chunk-HHMTQQUE.js → chunk-XDHGCBTS.js} +2 -2
- package/dist/cli/chunks/chunk-XQ5JT7KM.js +3 -0
- package/dist/cli/chunks/{chunk-USTUWUCE.js → chunk-XUUVAAHV.js} +2 -2
- package/dist/cli/chunks/{chunk-6RX5QZMU.js → chunk-XZGOXLZH.js} +1 -1
- package/dist/cli/chunks/{chunk-DQ3J7ZT6.js → chunk-Y5L37K7X.js} +2 -2
- package/dist/cli/chunks/{chunk-5HMGDB7B.js → chunk-Y625LP6K.js} +3 -3
- package/dist/cli/chunks/{chunk-REJGZP27.js → chunk-Y6XNISHP.js} +2 -2
- package/dist/cli/chunks/{chunk-LF5XOYR7.js → chunk-YDYKFSD2.js} +11 -11
- package/dist/cli/chunks/{chunk-U55X2ZUM.js → chunk-YEC55GO5.js} +2 -2
- package/dist/cli/chunks/{chunk-6ONUCDVL.js → chunk-YOG5KQZF.js} +2 -2
- package/dist/cli/chunks/{chunk-6BCVKCG5.js → chunk-YUDGQZJN.js} +2 -2
- package/dist/cli/chunks/{chunk-EOBZJDJR.js → chunk-Z3SXMYVI.js} +3 -3
- package/dist/cli/chunks/chunk-ZFLE4D4X.js +18 -0
- package/dist/cli/chunks/{chunk-W52R3G22.js → chunk-ZGKQCUPB.js} +2 -2
- package/dist/cli/chunks/{chunk-MCUILJ33.js → chunk-ZTKCGEB6.js} +1 -1
- package/dist/cli/chunks/{ci-IU5HVUL5.js → ci-MMLUV6L6.js} +2 -2
- package/dist/cli/chunks/{ci-output-CLI4A43F.js → ci-output-25GS6RXR.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-ZR5OFMW7.js → circuit-breaker-4OWAN6R6.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-UBMA6ZHJ.js → claude-flow-setup-LR3SRBX6.js} +2 -2
- package/dist/cli/chunks/client-WI7RRUZO.js +2 -0
- package/dist/cli/chunks/{cline-installer-EWYELOBI.js → cline-installer-YSZWRZUI.js} +2 -2
- package/dist/cli/chunks/{code-YSPF4MXN.js → code-UUWUIXI7.js} +2 -2
- package/dist/cli/chunks/{code-index-extractor-WW5OKSTN.js → code-index-extractor-2LSPQORU.js} +2 -2
- package/dist/cli/chunks/{codex-installer-GLADK5PY.js → codex-installer-E5BVXZVA.js} +2 -2
- package/dist/cli/chunks/{completions-2KTWZ3AK.js → completions-YKXBKZSO.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-KMX4OWKB.js → complexity-analyzer-HNT2QRWB.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-4FHU4OEJ.js → continuedev-installer-AW5VCB66.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-AKR4WE7B.js → copilot-installer-B6SVZXQT.js} +2 -2
- package/dist/cli/chunks/core-handlers-T6URR57V.js +2 -0
- package/dist/cli/chunks/{cost-tracker-BUJ6WEWY.js → cost-tracker-POZMBN2V.js} +2 -2
- package/dist/cli/chunks/{coverage-OB6HVQS4.js → coverage-V5BGPN5Q.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-WHTTKHWM.js +2 -0
- package/dist/cli/chunks/{cursor-installer-3AOE4O3Q.js → cursor-installer-EYBI4QVK.js} +2 -2
- package/dist/cli/chunks/{daemon-4RAL5URG.js → daemon-CF6ENQB2.js} +3 -3
- package/dist/cli/chunks/{daemon-JGSPLYGO.js → daemon-HKARXY2W.js} +4 -4
- package/dist/cli/chunks/{dag-attention-scheduler-DSBTHIMH.js → dag-attention-scheduler-XIL5IAP7.js} +2 -2
- package/dist/cli/chunks/{detect-6CVW2VUQ.js → detect-RRX2U2KK.js} +2 -2
- package/dist/cli/chunks/{dist-node-EWPKBTYA.js → dist-node-DOANNRCS.js} +2 -2
- package/dist/cli/chunks/{domain-handler-HLVIJU25.js → domain-handler-QMTJV5OR.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-7Y3BR3YU.js → domain-transfer-FSNH75XW.js} +2 -2
- package/dist/cli/chunks/dream-QUL6SURC.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-ZMJ3263X.js → embed-and-insert-pattern-NI7PGONV.js} +2 -2
- package/dist/cli/chunks/eval-6ZAF2RY3.js +17 -0
- package/dist/cli/chunks/{experience-capture-middleware-OGJ3JOSQ.js → experience-capture-middleware-JMXR7N5G.js} +3 -3
- package/dist/cli/chunks/{fast-paths-5XCY3Y6U.js → fast-paths-YB7XZZ76.js} +2 -2
- package/dist/cli/chunks/{feature-flags-R5V2FRJR.js → feature-flags-2RC4GFC4.js} +2 -2
- package/dist/cli/chunks/{feature-flags-VULQI6KY.js → feature-flags-KJSP7KR6.js} +2 -2
- package/dist/cli/chunks/{file-discovery-HW33C3HC.js → file-discovery-SUPBXFYI.js} +2 -2
- package/dist/cli/chunks/{fleet-NH3XR5OY.js → fleet-KSXFOLFW.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-L3XMLPTG.js → gnn-wrapper-DFZ5KPPK.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-TIQFBT4D.js → heartbeat-handler-G3EADK2H.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-VZNKE33K.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-LGWLDZLC.js +2 -0
- package/dist/cli/chunks/hnsw-index-66FOOI7U.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-YL2SUIPA.js → hnsw-legacy-bridge-MA676GER.js} +2 -2
- package/dist/cli/chunks/{better-sqlite3-IPKCAVLS.js → hnswlib-node-SKTT5KIH.js} +2 -2
- package/dist/cli/chunks/{hooks-UR2ZF54G.js → hooks-HTCPMZNZ.js} +10 -10
- package/dist/cli/chunks/hybrid-router-I5MEVQDF.js +2 -0
- package/dist/cli/chunks/{hypergraph-engine-NX45AOPY.js → hypergraph-engine-QPB3IH4A.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-LUM4YI4K.js → hypergraph-handler-GBFSVD7N.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-K6ANYIY3.js +2 -0
- package/dist/cli/chunks/{init-handler-YTKKNTVV.js → init-handler-XYBTBCPD.js} +6 -6
- package/dist/cli/chunks/init-wizard-URHGXJ32.js +2 -0
- package/dist/cli/chunks/kernel-OKI5ZY5P.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-ZW7DVH7T.js → kilocode-installer-LY6JOBFY.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-IA7INW4N.js → kiro-installer-JF6NXTJL.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-VQQSK7T5.js +2 -0
- package/dist/cli/chunks/{learning-4AZ5PGTT.js → learning-BIISN67N.js} +3 -3
- package/dist/cli/chunks/{llm-router-WQ4E3AOP.js → llm-router-YZUNVZQE.js} +5 -5
- package/dist/cli/chunks/llm-router-service-TISH33SY.js +2 -0
- package/dist/cli/chunks/{load-4FAH7CZO.js → load-MTWNBNLL.js} +2 -2
- package/dist/cli/chunks/load-test-KWKWC4Q7.js +2 -0
- package/dist/cli/chunks/{mcp-KLLHI6DG.js → mcp-37PYMNHQ.js} +2 -2
- package/dist/cli/chunks/{memory-Q5HLIUC6.js → memory-IXUUDCI3.js} +5 -5
- package/dist/cli/chunks/memory-backend-JSQQMXVS.js +2 -0
- package/dist/cli/chunks/memory-handlers-RM2VOFJX.js +2 -0
- package/dist/cli/chunks/{multi-model-executor-ABI73AFV.js → multi-model-executor-RKKS5XYG.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-KRPQ6JOJ.js → opencode-installer-3VXI5MTR.js} +2 -2
- package/dist/cli/chunks/{orchestrator-SUPEONRG.js → orchestrator-UO3ZOGFZ.js} +5 -5
- package/dist/cli/chunks/pattern-null-store-SXBIUKE5.js +2 -0
- package/dist/cli/chunks/{pattern-usage-recorder-R4GKK6RZ.js → pattern-usage-recorder-YJKRL2GI.js} +2 -2
- package/dist/cli/chunks/{pipeline-LCUETNGD.js → pipeline-GJQJKXWX.js} +2 -2
- package/dist/cli/chunks/{platform-WJDIB4X3.js → platform-RHVCZK6C.js} +2 -2
- package/dist/cli/chunks/{plugin-2X5NY2RF.js → plugin-ZKAIW7O6.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-3T665QC6.js → prime-radiant-advanced-wasm-4X3DSKQV.js} +2 -2
- package/dist/cli/chunks/protocol-executor-D3Q5P3WY.js +2 -0
- package/dist/cli/chunks/{protocol-handler-JTXRF7GU.js → protocol-handler-KKYQZMB2.js} +2 -2
- package/dist/cli/chunks/{prove-BFPWWPOC.js → prove-OD6RPKWX.js} +2 -2
- package/dist/cli/chunks/provider-manager-2EIX7E5Q.js +2 -0
- package/dist/cli/chunks/qe-reasoning-bank-ITOW2ZHC.js +2 -0
- package/dist/cli/chunks/{quality-F7UZU4RN.js → quality-ZRWBXCKO.js} +2 -2
- package/dist/cli/chunks/{quality-gate-R5L4UZIX.js → quality-gate-Y6BWQV7J.js} +3 -3
- package/dist/cli/chunks/queen-coordinator-TO5X2EXL.js +2 -0
- package/dist/cli/chunks/{real-embeddings-LZD6HTQF.js → real-embeddings-YYEUO4P2.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-6TTG7VSH.js → roocode-installer-JBCPS3FK.js} +2 -2
- package/dist/cli/chunks/router-GZJQEJU3.js +2 -0
- package/dist/cli/chunks/routing-feedback-CRXSKFNS.js +2 -0
- package/dist/cli/chunks/{routing-handler-SW442GK7.js → routing-handler-KTPJOSBJ.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-CLFGKXMW.js → ruvector-commands-SCZZVRE7.js} +2 -2
- package/dist/cli/chunks/{rvf-dual-writer-EVPPXXXS.js → rvf-dual-writer-IP7GELQJ.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-adapter-NOHDIRIP.js → rvf-migration-adapter-WLFTDARU.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-coordinator-BYJ3M7WZ.js → rvf-migration-coordinator-MGFDQ5WD.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-WHADT5HX.js +2 -0
- package/dist/cli/chunks/rvf-store-integrity-OTOAGT5W.js +2 -0
- package/dist/cli/chunks/safe-db-MIZ2OFWC.js +2 -0
- package/dist/cli/chunks/schedule-XFILYTYC.js +2 -0
- package/dist/cli/chunks/scheduler-EIPJ777A.js +2 -0
- package/dist/cli/chunks/{security-IXDKBPSG.js → security-B2CLZKRB.js} +3 -3
- package/dist/cli/chunks/shared-rvf-adapter-2PMFAQMN.js +2 -0
- package/dist/cli/chunks/{shared-rvf-dual-writer-FFKBKYNL.js → shared-rvf-dual-writer-B6P732AV.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-PFU3GSRD.js +2 -0
- package/dist/cli/chunks/status-handler-M6SN2W2D.js +47 -0
- package/dist/cli/chunks/{structural-health-55X6BTLT.js → structural-health-YCCTGI3K.js} +2 -2
- package/dist/cli/chunks/{sync-BUGDXW3Y.js → sync-3SDMVAIU.js} +2 -2
- package/dist/cli/chunks/{sync-NUG67HGK.js → sync-KSRF77ID.js} +2 -2
- package/dist/cli/chunks/{task-handler-T6ZKXV4S.js → task-handler-MIKRB2SL.js} +2 -2
- package/dist/cli/chunks/{task-handlers-H63TB2UI.js → task-handlers-YXKRUBQ4.js} +3 -3
- package/dist/cli/chunks/{test-VEK76SBT.js → test-MLOLQCB7.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-QZM6PNZH.js → test-scheduling-3KXESUZS.js} +3 -3
- package/dist/cli/chunks/token-bootstrap-6V2PMDBJ.js +2 -0
- package/dist/cli/chunks/{token-usage-OBY6UEUR.js → token-usage-DP6THJ3I.js} +2 -2
- package/dist/cli/chunks/{transformers-EFNY2MRX.js → transformers-QFOBOP2Y.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-EU2S5NVM.js → tree-sitter-wasm-parser-COK2XERS.js} +2 -2
- package/dist/cli/chunks/{types-3DYRKX23.js → types-PYHUCVOZ.js} +2 -2
- package/dist/cli/chunks/unified-memory-OUVCMFGK.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-YGQPOHXB.js +2 -0
- package/dist/cli/chunks/unified-persistence-GFRZVDOW.js +2 -0
- package/dist/cli/chunks/{upgrade-H5V53FRF.js → upgrade-ONP2HNGL.js} +2 -2
- package/dist/cli/chunks/{validate-IL22VB5I.js → validate-NWSICDAY.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-WZKECK3W.js → validate-swarm-KXS5P3U7.js} +2 -2
- package/dist/cli/chunks/{vibium-KKM23OTQ.js → vibium-TZSGZRCQ.js} +2 -2
- package/dist/cli/chunks/visual-security-LVOOYQ64.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-NJM5YBOY.js → web-tree-sitter-V2FADNRA.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-SLP43TVT.js → windsurf-installer-GQM7KWDC.js} +2 -2
- package/dist/cli/chunks/{witness-chain-XBEPT4XD.js → witness-chain-GTITDIA2.js} +2 -2
- package/dist/cli/chunks/witness-chain-QNFPV4UL.js +2 -0
- package/dist/cli/chunks/{witness-key-manager-DAAMNYOW.js → witness-key-manager-AHRM2M52.js} +2 -2
- package/dist/cli/chunks/{workflow-SZOOU6D3.js → workflow-XCGHEL3I.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-MIVBCALG.js +2 -0
- package/dist/cli/chunks/{wrappers-I2CBKWGF.js → wrappers-VGO2GO4J.js} +2 -2
- package/dist/cli/commands/eval.js +73 -3
- package/dist/cli/commands/llm-router.js +2 -0
- package/dist/cli/handlers/status-handler.d.ts +5 -0
- package/dist/cli/handlers/status-handler.js +35 -0
- package/dist/coordination/consensus/providers/index.js +11 -0
- package/dist/integrations/ruvector/brain-rvf-exporter.js +115 -13
- package/dist/integrations/ruvector/rvf-dual-writer.js +20 -3
- package/dist/integrations/ruvector/rvf-store-integrity.d.ts +49 -0
- package/dist/integrations/ruvector/rvf-store-integrity.js +137 -0
- package/dist/integrations/ruvector/shared-rvf-adapter.js +23 -5
- package/dist/learning/pattern-store.js +23 -5
- package/dist/learning/qe-flywheel/platform-signer.d.ts +32 -0
- package/dist/learning/qe-flywheel/platform-signer.js +60 -0
- package/dist/learning/qe-flywheel/receipt.js +9 -2
- package/dist/mcp/bundle.js +425 -406
- package/dist/shared/llm/billing-modes.d.ts +24 -0
- package/dist/shared/llm/billing-modes.js +56 -0
- package/dist/shared/llm/cost-tracker.js +2 -0
- package/dist/shared/llm/interfaces.d.ts +61 -3
- package/dist/shared/llm/provider-manager.d.ts +34 -0
- package/dist/shared/llm/provider-manager.js +152 -3
- package/dist/shared/llm/providers/claude-code.d.ts +57 -0
- package/dist/shared/llm/providers/claude-code.js +312 -0
- package/dist/shared/llm/providers/cognitum.d.ts +64 -0
- package/dist/shared/llm/providers/cognitum.js +369 -0
- package/dist/shared/llm/providers/index.d.ts +2 -0
- package/dist/shared/llm/providers/index.js +2 -0
- package/dist/shared/llm/router/config-store.d.ts +31 -11
- package/dist/shared/llm/router/config-store.js +82 -12
- package/dist/shared/llm/router/hybrid-router.js +16 -0
- package/dist/shared/llm/router/types.js +7 -0
- package/dist/shared/llm/spend-ledger.d.ts +64 -0
- package/dist/shared/llm/spend-ledger.js +115 -0
- package/dist/shared/llm/translation/message-formatter.js +2 -0
- package/dist/shared/llm/translation/prompt-translator.js +2 -0
- package/dist/shared/llm/translation/tool-translator.js +2 -0
- package/dist/validation/index.d.ts +1 -0
- package/dist/validation/index.js +2 -0
- package/dist/validation/provider-llm-executor.d.ts +45 -0
- package/dist/validation/provider-llm-executor.js +98 -0
- package/package.json +2 -2
- package/dist/cli/chunks/adapter-X4UEC6UJ.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-5FG7JCY7.js +0 -2
- package/dist/cli/chunks/base-CWPMFSZG.js +0 -2
- package/dist/cli/chunks/brain-handler-JF3OK35F.js +0 -89
- package/dist/cli/chunks/browser-workflow-A77OFBVY.js +0 -2
- package/dist/cli/chunks/chunk-CDVKFAYP.js +0 -18
- package/dist/cli/chunks/chunk-CJTXZI37.js +0 -2
- package/dist/cli/chunks/chunk-FNMEVLSN.js +0 -2
- package/dist/cli/chunks/chunk-P7G5LGUE.js +0 -3
- package/dist/cli/chunks/chunk-R7XEACKR.js +0 -2
- package/dist/cli/chunks/chunk-RAS7WRN5.js +0 -24
- package/dist/cli/chunks/chunk-TGIKKD43.js +0 -9
- package/dist/cli/chunks/client-KKCFGD7R.js +0 -2
- package/dist/cli/chunks/core-handlers-KRSSJEO5.js +0 -2
- package/dist/cli/chunks/cross-domain-router-27QGWU27.js +0 -2
- package/dist/cli/chunks/dream-M6K47Q4H.js +0 -2
- package/dist/cli/chunks/eval-73XW2WJD.js +0 -15
- package/dist/cli/chunks/heartbeat-scheduler-URXBF5RW.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-WWAGM6HK.js +0 -2
- package/dist/cli/chunks/hnsw-index-UFV2HSZE.js +0 -2
- package/dist/cli/chunks/hybrid-router-3U6Q6OTL.js +0 -2
- package/dist/cli/chunks/impact-analyzer-EUEX6ZRO.js +0 -2
- package/dist/cli/chunks/init-wizard-POKY2LRY.js +0 -2
- package/dist/cli/chunks/kernel-HPAONLZY.js +0 -2
- package/dist/cli/chunks/knowledge-graph-2WCUFG63.js +0 -2
- package/dist/cli/chunks/llm-router-service-D5VMG6SD.js +0 -2
- package/dist/cli/chunks/load-test-DHG26REU.js +0 -2
- package/dist/cli/chunks/memory-backend-GLWQ4DAL.js +0 -2
- package/dist/cli/chunks/memory-handlers-P72I4VV4.js +0 -2
- package/dist/cli/chunks/pattern-null-store-Y2YFTE3V.js +0 -2
- package/dist/cli/chunks/protocol-executor-HNT67NN5.js +0 -2
- package/dist/cli/chunks/provider-manager-5YGPZIEZ.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-Z5UGOA3F.js +0 -2
- package/dist/cli/chunks/queen-coordinator-P5LU5NWI.js +0 -2
- package/dist/cli/chunks/router-CRGHUAVR.js +0 -2
- package/dist/cli/chunks/routing-feedback-BVX5ZBCF.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-FZJSQOJM.js +0 -2
- package/dist/cli/chunks/safe-db-USYNEOC6.js +0 -2
- package/dist/cli/chunks/schedule-KCRCQ3PS.js +0 -2
- package/dist/cli/chunks/scheduler-CX3UHI4U.js +0 -2
- package/dist/cli/chunks/shared-rvf-adapter-VCOK3OVD.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-K23C4TFH.js +0 -2
- package/dist/cli/chunks/status-handler-M5W64S5U.js +0 -46
- package/dist/cli/chunks/token-bootstrap-W5IAMJW4.js +0 -2
- package/dist/cli/chunks/unified-memory-NCDBQLLF.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-T7NSGQ2H.js +0 -2
- package/dist/cli/chunks/unified-persistence-XUAYDCMM.js +0 -2
- package/dist/cli/chunks/visual-security-3TUC4GPP.js +0 -2
- package/dist/cli/chunks/witness-chain-QLOKUZXC.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-6JAYTZ7L.js +0 -2
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RVF store integrity helpers (issue #563).
|
|
3
|
+
*
|
|
4
|
+
* An export that is killed mid-write leaves a store that was created but never
|
|
5
|
+
* completed. Such a file cannot be opened (`RVF error 0x0106: ManifestNotFound`)
|
|
6
|
+
* and cannot be created over either, because the path already exists
|
|
7
|
+
* (`RVF error 0x0303: FsyncFailed`). Both paths fail forever, so the RVF
|
|
8
|
+
* backend stays disabled for the life of the project until someone deletes the
|
|
9
|
+
* file by hand.
|
|
10
|
+
*
|
|
11
|
+
* Recovery has to be evidence-based rather than fingerprint-based. Measured
|
|
12
|
+
* against @ruvector/rvf-node 0.1.8:
|
|
13
|
+
*
|
|
14
|
+
* • A *valid, empty* store is 162 bytes with magic `SFVR` — byte-for-byte
|
|
15
|
+
* the size the issue reports as "truncated: header only". Size and magic
|
|
16
|
+
* therefore cannot distinguish a broken store from a healthy empty one.
|
|
17
|
+
* • `<store>.lock` is a 104-byte record with magic `FLVR` and the owning pid
|
|
18
|
+
* as a little-endian u32 at offset 4. `FLVR` in a lock is the *normal*
|
|
19
|
+
* case — the issue reads it as "RVF store bytes leaked into the lock", but
|
|
20
|
+
* the store magic is `SFVR`; a 104-byte `FLVR` lock is just a live-or-stale
|
|
21
|
+
* lock record.
|
|
22
|
+
*
|
|
23
|
+
* So the only sound trigger is "open failed *and* create failed": at that point
|
|
24
|
+
* the file is provably unusable. The lock's pid is used as a *guard* — if it is
|
|
25
|
+
* held by a live process, the store is presumed healthy and left alone.
|
|
26
|
+
*/
|
|
27
|
+
import { existsSync, openSync, readSync, closeSync, renameSync, unlinkSync } from 'fs';
|
|
28
|
+
/** Magic of a lock record (the store's own magic is `SFVR`). */
|
|
29
|
+
const LOCK_MAGIC = 'FLVR';
|
|
30
|
+
/** Byte offset of the owning pid within a lock record (u32 LE). */
|
|
31
|
+
const LOCK_PID_OFFSET = 4;
|
|
32
|
+
/** Sidecars that belong to a store and must be quarantined alongside it. */
|
|
33
|
+
const STORE_SIDECAR_SUFFIXES = ['', '.idmap.json', '.manifest.json'];
|
|
34
|
+
/** Read the first `n` bytes of a file, or null if unreadable/shorter. */
|
|
35
|
+
function readHead(path, n) {
|
|
36
|
+
let fd;
|
|
37
|
+
try {
|
|
38
|
+
fd = openSync(path, 'r');
|
|
39
|
+
const buf = Buffer.alloc(n);
|
|
40
|
+
if (readSync(fd, buf, 0, n, 0) < n)
|
|
41
|
+
return null;
|
|
42
|
+
return buf;
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
finally {
|
|
48
|
+
if (fd !== undefined) {
|
|
49
|
+
try {
|
|
50
|
+
closeSync(fd);
|
|
51
|
+
}
|
|
52
|
+
catch { /* best-effort */ }
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/** True when a process with `pid` exists (signal 0 probes without delivering). */
|
|
57
|
+
function isPidAlive(pid) {
|
|
58
|
+
try {
|
|
59
|
+
process.kill(pid, 0);
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
catch (err) {
|
|
63
|
+
// EPERM means it exists but belongs to another user — still alive.
|
|
64
|
+
return err.code === 'EPERM';
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/** The pid recorded in `<rvfPath>.lock`, or null if there is no readable lock. */
|
|
68
|
+
export function readLockOwnerPid(rvfPath) {
|
|
69
|
+
const head = readHead(`${rvfPath}.lock`, LOCK_PID_OFFSET + 4);
|
|
70
|
+
if (!head || head.subarray(0, 4).toString('latin1') !== LOCK_MAGIC)
|
|
71
|
+
return null;
|
|
72
|
+
const pid = head.readUInt32LE(LOCK_PID_OFFSET);
|
|
73
|
+
return pid > 0 ? pid : null;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* True when the store's lock is held by a process that is still running.
|
|
77
|
+
*
|
|
78
|
+
* Deliberately conservative: an unreadable or pid-less lock reports false (the
|
|
79
|
+
* caller's open already failed, so there is nothing to protect), while a live
|
|
80
|
+
* pid reports true and blocks recovery. Pid reuse can only produce a false
|
|
81
|
+
* "alive", which fails safe — we leave the store alone.
|
|
82
|
+
*/
|
|
83
|
+
export function isLockHeldByLiveProcess(rvfPath) {
|
|
84
|
+
const pid = readLockOwnerPid(rvfPath);
|
|
85
|
+
if (pid === null)
|
|
86
|
+
return false;
|
|
87
|
+
return pid !== process.pid && isPidAlive(pid);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Move an unusable store and its sidecars aside so the next create succeeds.
|
|
91
|
+
* Returns the quarantine base path, or null if nothing was quarantined.
|
|
92
|
+
*
|
|
93
|
+
* Only call this once open *and* create have both failed — that is the proof
|
|
94
|
+
* the file is unusable. The store is a derived cache, rebuilt from the unified
|
|
95
|
+
* DB, so quarantining is recoverable; we move rather than delete because the
|
|
96
|
+
* bytes may hold writes that never reached SQLite, and they are the only
|
|
97
|
+
* evidence if this recurs.
|
|
98
|
+
*/
|
|
99
|
+
export function quarantineUnusableStore(rvfPath, reason) {
|
|
100
|
+
if (!existsSync(rvfPath))
|
|
101
|
+
return null;
|
|
102
|
+
// Never pull a store out from under a live peer.
|
|
103
|
+
if (isLockHeldByLiveProcess(rvfPath)) {
|
|
104
|
+
console.warn(`[RVF] ${rvfPath} is unusable but its lock is held by a live process — ` +
|
|
105
|
+
'leaving it alone and degrading to SQLite for this run.');
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
// Keyed by pid, not a timestamp: a crash-loop quarantining the same file
|
|
109
|
+
// repeatedly overwrites its own copy instead of filling .agentic-qe/ with
|
|
110
|
+
// one corrupt store per startup.
|
|
111
|
+
const quarantineBase = `${rvfPath}.corrupt-${process.pid}`;
|
|
112
|
+
for (const sidecar of STORE_SIDECAR_SUFFIXES) {
|
|
113
|
+
const from = `${rvfPath}${sidecar}`;
|
|
114
|
+
if (!existsSync(from))
|
|
115
|
+
continue;
|
|
116
|
+
try {
|
|
117
|
+
renameSync(from, `${quarantineBase}${sidecar}`);
|
|
118
|
+
}
|
|
119
|
+
catch {
|
|
120
|
+
// A failed quarantine must not throw and take down the caller; the
|
|
121
|
+
// caller's retry will simply fail again and degrade as before.
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
// The store is gone, so its lock — stale by definition here — goes with it.
|
|
125
|
+
try {
|
|
126
|
+
if (existsSync(`${rvfPath}.lock`))
|
|
127
|
+
unlinkSync(`${rvfPath}.lock`);
|
|
128
|
+
}
|
|
129
|
+
catch {
|
|
130
|
+
// best-effort
|
|
131
|
+
}
|
|
132
|
+
console.warn(`[RVF] Quarantined unusable store ${rvfPath} → ${quarantineBase} (${reason}). ` +
|
|
133
|
+
'It is a derived cache and will be rebuilt from the unified DB. ' +
|
|
134
|
+
'Please report a recurrence with the quarantined files (issue #563).');
|
|
135
|
+
return quarantineBase;
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=rvf-store-integrity.js.map
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
// Issue #516: lightweight, sqlite-free project-root resolver (static import so it
|
|
14
14
|
// resolves under the test runner; avoids pulling unified-memory's sqlite graph).
|
|
15
15
|
import { findProjectRoot } from '../../kernel/project-root.js';
|
|
16
|
+
// Issue #563: static import — this module is fs-only, and a require() here
|
|
17
|
+
// would not resolve under the test runner.
|
|
18
|
+
import { quarantineUnusableStore, isLockHeldByLiveProcess, readLockOwnerPid, } from './rvf-store-integrity.js';
|
|
16
19
|
let sharedAdapter = null;
|
|
17
20
|
let initAttempted = false;
|
|
18
21
|
// ---------------------------------------------------------------------------
|
|
@@ -131,16 +134,23 @@ function openOrCreateRvf(openFn, createFn, rvfPath, dimensions) {
|
|
|
131
134
|
// .lock that subsequent invocations interpret as `LockHeld`. Since AQE
|
|
132
135
|
// CLI is overwhelmingly single-shot serial, the realistic case is "the
|
|
133
136
|
// prior process is dead and the lock is stale". We unlink the .lock and
|
|
134
|
-
// retry open exactly once.
|
|
135
|
-
//
|
|
136
|
-
//
|
|
137
|
-
//
|
|
137
|
+
// retry open exactly once.
|
|
138
|
+
//
|
|
139
|
+
// Issue #563: the lock record turns out to carry its owner's pid (u32 LE at
|
|
140
|
+
// offset 4, after the `FLVR` magic), so "is it stale?" is now a check rather
|
|
141
|
+
// than an assumption. This previously unlinked the lock unconditionally,
|
|
142
|
+
// which breaks a genuinely-live peer — the one case the old comment admitted
|
|
143
|
+
// it could not distinguish.
|
|
138
144
|
if (!opened && isLockHeld(openErr)) {
|
|
139
145
|
try {
|
|
140
146
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
141
147
|
const fs = require('fs');
|
|
142
148
|
const lockPath = `${rvfPath}.lock`;
|
|
143
|
-
if (fs.existsSync(lockPath)) {
|
|
149
|
+
if (fs.existsSync(lockPath) && isLockHeldByLiveProcess(rvfPath)) {
|
|
150
|
+
console.warn(`[RVF] ${rvfPath} is locked by a live process (pid ${readLockOwnerPid(rvfPath)}) — ` +
|
|
151
|
+
'not breaking the lock; degrading to SQLite for this run.');
|
|
152
|
+
}
|
|
153
|
+
else if (fs.existsSync(lockPath)) {
|
|
144
154
|
fs.unlinkSync(lockPath);
|
|
145
155
|
console.warn(`[RVF] Removed stale lock file at ${lockPath} (prior process exited without closing). ` +
|
|
146
156
|
'Retrying open. If you see this repeatedly under live concurrency, file an issue.');
|
|
@@ -187,6 +197,14 @@ function openOrCreateRvf(openFn, createFn, rvfPath, dimensions) {
|
|
|
187
197
|
return reopened;
|
|
188
198
|
}
|
|
189
199
|
catch {
|
|
200
|
+
// Pass 4 (#563): open failed, create failed, re-open failed. The file is
|
|
201
|
+
// provably unusable — the signature of an export killed mid-write, which
|
|
202
|
+
// used to disable the RVF backend permanently. Quarantine it (unless a
|
|
203
|
+
// live process holds its lock) and rebuild the derived cache.
|
|
204
|
+
const quarantined = quarantineUnusableStore(rvfPath, createErr instanceof Error ? createErr.message : String(createErr));
|
|
205
|
+
if (quarantined) {
|
|
206
|
+
return createFn(rvfPath, dimensions);
|
|
207
|
+
}
|
|
190
208
|
// Fall through with the more informative original error.
|
|
191
209
|
throw createErr instanceof Error ? createErr : new Error(String(createErr));
|
|
192
210
|
}
|
|
@@ -11,7 +11,13 @@ import { v4 as uuidv4 } from 'uuid';
|
|
|
11
11
|
import { findProjectRoot } from '../kernel/project-root.js';
|
|
12
12
|
import { ok, err } from '../shared/types/index.js';
|
|
13
13
|
import { RvfPatternStore } from './rvf-pattern-store.js';
|
|
14
|
-
import { createRvfStore as _createRvfStore, isRvfNativeAvailable } from '../integrations/ruvector/rvf-native-adapter.js';
|
|
14
|
+
import { createRvfStore as _createRvfStore, openRvfStore as _openRvfStore, isRvfNativeAvailable, } from '../integrations/ruvector/rvf-native-adapter.js';
|
|
15
|
+
// Issue #563: static imports — a require() of a source module resolves in the
|
|
16
|
+
// esbuild bundle but throws under the test runner, which silently changed which
|
|
17
|
+
// code path tests exercised. Neither module loads the native binding at import
|
|
18
|
+
// time, so this costs nothing at startup.
|
|
19
|
+
import { quarantineUnusableStore } from '../integrations/ruvector/rvf-store-integrity.js';
|
|
20
|
+
import { getSharedRvfAdapter } from '../integrations/ruvector/shared-rvf-adapter.js';
|
|
15
21
|
import { toErrorMessage, toError } from '../shared/error-utils.js';
|
|
16
22
|
import { calculateQualityScore, shouldPromotePattern, validateQEPattern, mapQEDomainToAQE, PROMOTION_THRESHOLD, } from './qe-patterns.js';
|
|
17
23
|
import { applyFilterSync } from '../integrations/ruvector/filter-adapter.js';
|
|
@@ -1419,7 +1425,9 @@ export function createPatternStore(memory, config) {
|
|
|
1419
1425
|
// deadlock on the native lock.
|
|
1420
1426
|
let useSharedAdapter = false;
|
|
1421
1427
|
try {
|
|
1422
|
-
|
|
1428
|
+
// Statically imported (#563): this require() throws "Cannot find
|
|
1429
|
+
// module" under the test runner, so every test silently took the
|
|
1430
|
+
// fallback ladder below instead of this preferred path.
|
|
1423
1431
|
const shared = getSharedRvfAdapter(rvfDir, mergedConfig.embeddingDimension);
|
|
1424
1432
|
if (shared) {
|
|
1425
1433
|
useSharedAdapter = true;
|
|
@@ -1439,11 +1447,13 @@ export function createPatternStore(memory, config) {
|
|
|
1439
1447
|
// open first, fall back to create, retry open on create-race.
|
|
1440
1448
|
// (Jordi #439 / RUFLO P020.)
|
|
1441
1449
|
const store = new RvfPatternStore((path, dim) => {
|
|
1442
|
-
//
|
|
1443
|
-
|
|
1450
|
+
// Statically imported (#563): a require() here resolves in the
|
|
1451
|
+
// esbuild bundle but throws "Cannot find module" under the test
|
|
1452
|
+
// runner, so this ladder — including its corruption recovery —
|
|
1453
|
+
// was unreachable from any test.
|
|
1444
1454
|
const tryOpen = () => {
|
|
1445
1455
|
try {
|
|
1446
|
-
return
|
|
1456
|
+
return _openRvfStore(path);
|
|
1447
1457
|
}
|
|
1448
1458
|
catch {
|
|
1449
1459
|
return null;
|
|
@@ -1467,6 +1477,14 @@ export function createPatternStore(memory, config) {
|
|
|
1467
1477
|
adapter = tryOpen();
|
|
1468
1478
|
if (adapter && adapter.dimension() === dim)
|
|
1469
1479
|
return adapter;
|
|
1480
|
+
// Issue #563: open failed, create failed, re-open failed — the
|
|
1481
|
+
// store is provably unusable (an export killed mid-write leaves
|
|
1482
|
+
// exactly this). Without recovery, RvfPatternStore.initialize()
|
|
1483
|
+
// logs "vector search is DISABLED" and stays that way for the
|
|
1484
|
+
// life of the process.
|
|
1485
|
+
if (quarantineUnusableStore(path, createErr instanceof Error ? createErr.message : String(createErr))) {
|
|
1486
|
+
return _createRvfStore(path, dim);
|
|
1487
|
+
}
|
|
1470
1488
|
throw createErr;
|
|
1471
1489
|
}
|
|
1472
1490
|
}, { rvfPath, base: mergedConfig });
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Witness-key bridge (qe-harness issue #7) — sign flywheel receipts with the ONE
|
|
3
|
+
* Cognitum platform identity instead of a self-generated key, so every QE receipt
|
|
4
|
+
* (engine campaign · flywheel promotion · coherence verdict) chains to the same
|
|
5
|
+
* externally-verifiable key (`QE_WITNESS_PUBLIC_KEYS_JSON` allowlist, fingerprint
|
|
6
|
+
* `f1ac28607da49ec1`).
|
|
7
|
+
*
|
|
8
|
+
* `createSigner` already accepts a 32-byte Ed25519 seed → deterministic keypair.
|
|
9
|
+
* The platform key is delivered as `QE_WITNESS_SIGNING_KEY` — a JSON
|
|
10
|
+
* `{ publicKey, privateKey }` of PEM strings (same shape qe-harness Stage-B reads
|
|
11
|
+
* from Secret Manager). We derive the seed from that private key and hand it to
|
|
12
|
+
* `createSigner`, reproducing the exact platform keypair.
|
|
13
|
+
*
|
|
14
|
+
* Graceful: returns null when the env var is absent/malformed, so the flywheel
|
|
15
|
+
* keeps its self-generated-key behaviour where the platform key isn't provided.
|
|
16
|
+
* Env-reading lives HERE, not in the dependency-free `receipt.ts` core.
|
|
17
|
+
*/
|
|
18
|
+
import { type Signer } from './receipt.js';
|
|
19
|
+
/**
|
|
20
|
+
* Extract the raw 32-byte Ed25519 seed from a PKCS#8 private-key PEM. Throws if the
|
|
21
|
+
* key is not an Ed25519 PKCS#8 key (wrong curve / format).
|
|
22
|
+
*/
|
|
23
|
+
export declare function seedFromPkcs8Pem(privateKeyPem: string): Buffer;
|
|
24
|
+
/**
|
|
25
|
+
* Build a {@link Signer} bound to the Cognitum platform identity from
|
|
26
|
+
* `QE_WITNESS_SIGNING_KEY`, or null when it is unset/malformed (graceful fallback).
|
|
27
|
+
* The returned signer's `keyId` equals the platform witness fingerprint, so a
|
|
28
|
+
* verifier can attribute the receipt to the platform via the same allowlist that
|
|
29
|
+
* accepts qe-harness evidence bundles.
|
|
30
|
+
*/
|
|
31
|
+
export declare function platformSigner(env?: NodeJS.ProcessEnv): Signer | null;
|
|
32
|
+
//# sourceMappingURL=platform-signer.d.ts.map
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Witness-key bridge (qe-harness issue #7) — sign flywheel receipts with the ONE
|
|
3
|
+
* Cognitum platform identity instead of a self-generated key, so every QE receipt
|
|
4
|
+
* (engine campaign · flywheel promotion · coherence verdict) chains to the same
|
|
5
|
+
* externally-verifiable key (`QE_WITNESS_PUBLIC_KEYS_JSON` allowlist, fingerprint
|
|
6
|
+
* `f1ac28607da49ec1`).
|
|
7
|
+
*
|
|
8
|
+
* `createSigner` already accepts a 32-byte Ed25519 seed → deterministic keypair.
|
|
9
|
+
* The platform key is delivered as `QE_WITNESS_SIGNING_KEY` — a JSON
|
|
10
|
+
* `{ publicKey, privateKey }` of PEM strings (same shape qe-harness Stage-B reads
|
|
11
|
+
* from Secret Manager). We derive the seed from that private key and hand it to
|
|
12
|
+
* `createSigner`, reproducing the exact platform keypair.
|
|
13
|
+
*
|
|
14
|
+
* Graceful: returns null when the env var is absent/malformed, so the flywheel
|
|
15
|
+
* keeps its self-generated-key behaviour where the platform key isn't provided.
|
|
16
|
+
* Env-reading lives HERE, not in the dependency-free `receipt.ts` core.
|
|
17
|
+
*/
|
|
18
|
+
import { createPrivateKey } from 'node:crypto';
|
|
19
|
+
import { createSigner } from './receipt.js';
|
|
20
|
+
/** DER prefix of an Ed25519 PKCS#8 private key (16 bytes) preceding the 32-byte seed. */
|
|
21
|
+
const ED25519_PKCS8_PREFIX = '302e020100300506032b657004220420';
|
|
22
|
+
/**
|
|
23
|
+
* Extract the raw 32-byte Ed25519 seed from a PKCS#8 private-key PEM. Throws if the
|
|
24
|
+
* key is not an Ed25519 PKCS#8 key (wrong curve / format).
|
|
25
|
+
*/
|
|
26
|
+
export function seedFromPkcs8Pem(privateKeyPem) {
|
|
27
|
+
const der = createPrivateKey(privateKeyPem).export({ format: 'der', type: 'pkcs8' });
|
|
28
|
+
if (der.length !== 48 || der.subarray(0, 16).toString('hex') !== ED25519_PKCS8_PREFIX) {
|
|
29
|
+
throw new Error('not an Ed25519 PKCS#8 private key (cannot derive a 32-byte seed)');
|
|
30
|
+
}
|
|
31
|
+
return Buffer.from(der.subarray(16, 48));
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Build a {@link Signer} bound to the Cognitum platform identity from
|
|
35
|
+
* `QE_WITNESS_SIGNING_KEY`, or null when it is unset/malformed (graceful fallback).
|
|
36
|
+
* The returned signer's `keyId` equals the platform witness fingerprint, so a
|
|
37
|
+
* verifier can attribute the receipt to the platform via the same allowlist that
|
|
38
|
+
* accepts qe-harness evidence bundles.
|
|
39
|
+
*/
|
|
40
|
+
export function platformSigner(env = process.env) {
|
|
41
|
+
const raw = env.QE_WITNESS_SIGNING_KEY;
|
|
42
|
+
if (!raw)
|
|
43
|
+
return null;
|
|
44
|
+
let key;
|
|
45
|
+
try {
|
|
46
|
+
key = JSON.parse(raw);
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
if (!key.privateKey)
|
|
52
|
+
return null;
|
|
53
|
+
try {
|
|
54
|
+
return createSigner(seedFromPkcs8Pem(key.privateKey));
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
return null; // wrong key type / unparseable — fall back to a self-generated signer
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=platform-signer.js.map
|
|
@@ -10,9 +10,16 @@
|
|
|
10
10
|
* Ed25519 via Node's built-in crypto — dependency-free (ADR-118 §6).
|
|
11
11
|
*/
|
|
12
12
|
import { generateKeyPairSync, createPrivateKey, createPublicKey, sign as edSign, verify as edVerify, createHash, } from 'node:crypto';
|
|
13
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Derive a stable key id from a public key PEM. The PEM is trimmed first so the id
|
|
15
|
+
* is invariant to trailing whitespace (PEM exports carry a trailing newline) AND
|
|
16
|
+
* matches the Cognitum platform witness fingerprint scheme — `sha256(pem.trim())`
|
|
17
|
+
* truncated to 16 hex (qe-harness `witness.ts` / meta-llm `qe-witness.ts`). This lets
|
|
18
|
+
* a flywheel receipt signed with the platform key carry the SAME id the platform
|
|
19
|
+
* allowlist (`QE_WITNESS_PUBLIC_KEYS_JSON`) recognizes. See platform-signer.ts.
|
|
20
|
+
*/
|
|
14
21
|
function keyIdOf(publicKeyPem) {
|
|
15
|
-
return createHash('sha256').update(publicKeyPem).digest('hex').slice(0, 16);
|
|
22
|
+
return createHash('sha256').update(publicKeyPem.trim()).digest('hex').slice(0, 16);
|
|
16
23
|
}
|
|
17
24
|
/**
|
|
18
25
|
* Create an Ed25519 signer. With a 32-byte seed (hex or Buffer) the keypair is
|