agentic-qe 3.9.7 → 3.9.8
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 +2 -2
- package/CHANGELOG.md +26 -0
- package/dist/cli/bundle.js +5 -5
- package/dist/cli/chunks/adapter-D4XQUIJD.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-MXTWTD4D.js → agent-booster-wasm-LAE4NTVX.js} +2 -2
- package/dist/cli/chunks/{agent-handler-6NEP2BOA.js → agent-handler-FVXHR6XN.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-SAPEIGE2.js → agent-memory-branch-Q7LLBA7C.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-CGIWYLIP.js +2 -0
- package/dist/cli/chunks/{audit-53LCI6R3.js → audit-YRLKHJLX.js} +2 -2
- package/dist/cli/chunks/base-BYVP2STR.js +2 -0
- package/dist/cli/chunks/{better-sqlite3-UZSKFGCK.js → better-sqlite3-XFGOGICB.js} +2 -2
- package/dist/cli/chunks/{brain-handler-67NDDXVO.js → brain-handler-KIUSNVSS.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-IUIGYEK5.js → branch-enumerator-VKZ4L3FH.js} +2 -2
- package/dist/cli/chunks/{browser-UFUF65LQ.js → browser-GZVIYFIB.js} +2 -2
- package/dist/cli/chunks/browser-workflow-PC4N5TKL.js +2 -0
- package/dist/cli/chunks/{chunk-QI5VGEKC.js → chunk-237NNDKL.js} +2 -2
- package/dist/cli/chunks/{chunk-CDFYF33M.js → chunk-266SKKFM.js} +2 -2
- package/dist/cli/chunks/{chunk-7OPVTN5W.js → chunk-2K3DJ3EK.js} +2 -2
- package/dist/cli/chunks/{chunk-IQLFWO5U.js → chunk-2QI5RYVR.js} +2 -2
- package/dist/cli/chunks/{chunk-TD2WOW75.js → chunk-2V5VKOJ2.js} +2 -2
- package/dist/cli/chunks/{chunk-DS3XAGGL.js → chunk-3WOQMFTD.js} +2 -2
- package/dist/cli/chunks/{chunk-KZSZHP32.js → chunk-3ZAGYTEC.js} +2 -2
- package/dist/cli/chunks/{chunk-6ULPQTIE.js → chunk-4EAAHMVM.js} +2 -2
- package/dist/cli/chunks/{chunk-52MUZGZF.js → chunk-4GMV6Z7Y.js} +2 -2
- package/dist/cli/chunks/{chunk-FBVEHGNE.js → chunk-4KX6TMKB.js} +3 -3
- package/dist/cli/chunks/{chunk-HFPT7QXQ.js → chunk-5TGK7VTS.js} +2 -2
- package/dist/cli/chunks/{chunk-D2C4XNF5.js → chunk-66DCG6RO.js} +4 -4
- package/dist/cli/chunks/{chunk-W4Y4GFRB.js → chunk-677V67MR.js} +1 -1
- package/dist/cli/chunks/{chunk-6MMRZYYS.js → chunk-6A4FEIE2.js} +3 -3
- package/dist/cli/chunks/{chunk-YR5ZNQT2.js → chunk-6DBYVKGA.js} +2 -2
- package/dist/cli/chunks/{chunk-EL2WLSUI.js → chunk-6KWX7A3R.js} +2 -2
- package/dist/cli/chunks/{chunk-YTF5G3RQ.js → chunk-6ZMM7MXA.js} +2 -2
- package/dist/cli/chunks/{chunk-XY5FMZRA.js → chunk-76UL224Z.js} +2 -2
- package/dist/cli/chunks/{chunk-KLLHSXIC.js → chunk-7CFEGUEH.js} +2 -2
- package/dist/cli/chunks/{chunk-OURDPRGM.js → chunk-7L64UC5U.js} +1 -1
- package/dist/cli/chunks/{chunk-BPYWDM2Y.js → chunk-7PHNHFZI.js} +3 -3
- package/dist/cli/chunks/{chunk-SURZYSSL.js → chunk-A2QLTNN5.js} +1 -1
- package/dist/cli/chunks/{chunk-NJ5IC6ZR.js → chunk-A4DJMFDM.js} +1 -1
- package/dist/cli/chunks/{chunk-RGJ4RMUR.js → chunk-AVKDT3UL.js} +8 -8
- package/dist/cli/chunks/{chunk-AHB2F42G.js → chunk-AYKMWP7F.js} +1 -1
- package/dist/cli/chunks/{chunk-BTZEKSWH.js → chunk-BXMIQRF3.js} +2 -2
- package/dist/cli/chunks/{chunk-JRHKFRUB.js → chunk-BZB5D4BO.js} +2 -2
- package/dist/cli/chunks/{chunk-6OKXGDT3.js → chunk-CG3HIYF4.js} +2 -2
- package/dist/cli/chunks/{chunk-PFTR6XAO.js → chunk-DDDEGBBJ.js} +2 -2
- package/dist/cli/chunks/{chunk-3KX7CQEM.js → chunk-DLKRK2GU.js} +1 -1
- package/dist/cli/chunks/{chunk-UEFAPTBV.js → chunk-E4D36LGH.js} +1 -1
- package/dist/cli/chunks/{chunk-ZWAJV4SN.js → chunk-ECYDMBDA.js} +2 -2
- package/dist/cli/chunks/{chunk-LPLCT2HH.js → chunk-EKDFIYV5.js} +2 -2
- package/dist/cli/chunks/{chunk-LHGZRKPO.js → chunk-ELZ5SKEN.js} +2 -2
- package/dist/cli/chunks/{chunk-A5VULTCD.js → chunk-ETXK25IY.js} +1 -1
- package/dist/cli/chunks/{chunk-ZLQYGO6N.js → chunk-F5VLJFVU.js} +1 -1
- package/dist/cli/chunks/{chunk-UXCEJ3AV.js → chunk-FKODRXOU.js} +2 -2
- package/dist/cli/chunks/{chunk-TLTRL32T.js → chunk-GHJRX7PV.js} +1 -1
- package/dist/cli/chunks/{chunk-7GPYOMVY.js → chunk-GOPE5OB5.js} +1 -1
- package/dist/cli/chunks/{chunk-YIVZ5Z4V.js → chunk-HE2NWYHK.js} +1 -1
- package/dist/cli/chunks/{chunk-2SJQ3CYN.js → chunk-HN7HYUW6.js} +9 -9
- package/dist/cli/chunks/{chunk-SP3X35XC.js → chunk-HTL2WT64.js} +1 -1
- package/dist/cli/chunks/{chunk-STASZVMY.js → chunk-HYACMUUR.js} +2 -2
- package/dist/cli/chunks/{chunk-4NHE7AJE.js → chunk-I25KIHQE.js} +1 -1
- package/dist/cli/chunks/{chunk-YHZWNT45.js → chunk-I7OH6RAC.js} +2 -2
- package/dist/cli/chunks/{chunk-FOCGOVIM.js → chunk-IFIYNCT2.js} +2 -2
- package/dist/cli/chunks/{chunk-QKJ4LUAM.js → chunk-IHJXFWUL.js} +2 -2
- package/dist/cli/chunks/{chunk-KHEAWN23.js → chunk-IIYXSWJN.js} +2 -2
- package/dist/cli/chunks/{chunk-SMKRBNO7.js → chunk-IP2Z4Z6X.js} +1 -1
- package/dist/cli/chunks/{chunk-W4HUWBPK.js → chunk-IZTUAI5T.js} +2 -2
- package/dist/cli/chunks/{chunk-BJKRAFS2.js → chunk-JBQ4WGB4.js} +2 -2
- package/dist/cli/chunks/{chunk-ZV7FGZNJ.js → chunk-JCROLOP6.js} +2 -2
- package/dist/cli/chunks/{chunk-KO5HO6MY.js → chunk-JD3GH47Z.js} +2 -2
- package/dist/cli/chunks/{chunk-2TRWUJWG.js → chunk-JK6JBNGL.js} +2 -2
- package/dist/cli/chunks/{chunk-T7R5NXJW.js → chunk-JNJYWWBG.js} +2 -2
- package/dist/cli/chunks/{chunk-EIGXGMOR.js → chunk-JVH7753D.js} +1 -1
- package/dist/cli/chunks/{chunk-HE5VY2BI.js → chunk-KJZU3E5G.js} +2 -2
- package/dist/cli/chunks/{chunk-JJSJSQNJ.js → chunk-KMGAJRQ6.js} +1 -1
- package/dist/cli/chunks/{chunk-ECRYU5XG.js → chunk-LFEBTWFS.js} +2 -2
- package/dist/cli/chunks/{chunk-GOG6L2F7.js → chunk-LOANEFGZ.js} +2 -2
- package/dist/cli/chunks/{chunk-XD4UFF2Y.js → chunk-LPRHYSXN.js} +1 -1
- package/dist/cli/chunks/{chunk-WS4OVAWU.js → chunk-M2JBQVBP.js} +2 -2
- package/dist/cli/chunks/{chunk-4B5IYFKE.js → chunk-MGX2BZWE.js} +2 -2
- package/dist/cli/chunks/{chunk-GGPGY5QT.js → chunk-MVW7AACO.js} +2 -2
- package/dist/cli/chunks/{chunk-HWDE4RB3.js → chunk-N2L7RWNX.js} +2 -2
- package/dist/cli/chunks/{chunk-FHBIJBZ3.js → chunk-NCXVOOA7.js} +2 -2
- package/dist/cli/chunks/{chunk-XB2GVTY6.js → chunk-NHXFAXEV.js} +1 -1
- package/dist/cli/chunks/{chunk-SIIYQLKH.js → chunk-OGFGNAKQ.js} +2 -2
- package/dist/cli/chunks/chunk-OT4JADWW.js +2 -0
- package/dist/cli/chunks/{chunk-BWNH22V2.js → chunk-OZTSMI7P.js} +1 -1
- package/dist/cli/chunks/{chunk-APPVAGD5.js → chunk-P2H5ARHM.js} +1 -1
- package/dist/cli/chunks/{chunk-HEENVPYF.js → chunk-P7APAQD6.js} +3 -3
- package/dist/cli/chunks/{chunk-5EOM3W6Q.js → chunk-PBPOSPTY.js} +2 -2
- package/dist/cli/chunks/{chunk-MR7V7QVL.js → chunk-PG7CZ6Q4.js} +2 -2
- package/dist/cli/chunks/{chunk-DKBXIBRS.js → chunk-Q5PARJC6.js} +2 -2
- package/dist/cli/chunks/{chunk-YV2PVXJE.js → chunk-QVGSD25D.js} +1 -1
- package/dist/cli/chunks/{chunk-ZSXSUUBS.js → chunk-R2LWLZ3Y.js} +1 -1
- package/dist/cli/chunks/{chunk-VMWLVRJO.js → chunk-R4VOIXJQ.js} +2 -2
- package/dist/cli/chunks/{chunk-PHBE2VBN.js → chunk-RGCCSAHI.js} +2 -2
- package/dist/cli/chunks/{chunk-URBXUDY3.js → chunk-S72TSJS4.js} +2 -2
- package/dist/cli/chunks/{chunk-WAP7ROO5.js → chunk-SDMGF3KD.js} +2 -2
- package/dist/cli/chunks/{chunk-PMZJ54WX.js → chunk-SP3ZBJ63.js} +3 -3
- package/dist/cli/chunks/{chunk-HVJXXGB4.js → chunk-SQ6XZGR4.js} +4 -4
- package/dist/cli/chunks/{chunk-UDBSEFUT.js → chunk-SSURIMCL.js} +2 -2
- package/dist/cli/chunks/{chunk-KHH5UJXY.js → chunk-TDPHLQ2M.js} +2 -2
- package/dist/cli/chunks/{chunk-FKJ4XZ6E.js → chunk-TN72MXLI.js} +2 -2
- package/dist/cli/chunks/{chunk-AT6LBLUV.js → chunk-TSDTRJOG.js} +2 -2
- package/dist/cli/chunks/{chunk-MUEFXLGX.js → chunk-TWDWDKOI.js} +1 -1
- package/dist/cli/chunks/{chunk-WV3R5JFE.js → chunk-TZMKO6PC.js} +2 -2
- package/dist/cli/chunks/{chunk-XOHRM3M7.js → chunk-U62WL3WZ.js} +3 -3
- package/dist/cli/chunks/{chunk-ZEFDSMF4.js → chunk-UAI5NPPQ.js} +2 -2
- package/dist/cli/chunks/{chunk-7TKZ6LK6.js → chunk-UGJNR52C.js} +1 -1
- package/dist/cli/chunks/{chunk-JNEG6DKU.js → chunk-UOSKMAAY.js} +1 -1
- package/dist/cli/chunks/{chunk-SQZ3H6WR.js → chunk-VHZ653XS.js} +3 -3
- package/dist/cli/chunks/{chunk-WLYSZV5U.js → chunk-VVNR4R22.js} +2 -2
- package/dist/cli/chunks/{chunk-EFHR7LML.js → chunk-W45FANJG.js} +2 -2
- package/dist/cli/chunks/{chunk-TT2YXNHH.js → chunk-W4IRWGGR.js} +4 -4
- package/dist/cli/chunks/{chunk-DL46KSFX.js → chunk-WJDOOT2M.js} +2 -2
- package/dist/cli/chunks/{chunk-LP6EQI2P.js → chunk-WUCWFDBE.js} +2 -2
- package/dist/cli/chunks/{chunk-FJEIX3IS.js → chunk-WXEDVKJS.js} +2 -2
- package/dist/cli/chunks/{chunk-426OO3RH.js → chunk-X66IXWSO.js} +2 -2
- package/dist/cli/chunks/{chunk-D3KORDD5.js → chunk-XPL3BXLM.js} +1 -1
- package/dist/cli/chunks/{chunk-JZYCZMHN.js → chunk-XVXSQOQG.js} +2 -2
- package/dist/cli/chunks/{chunk-INJPS7RF.js → chunk-Y67OXEUM.js} +1 -1
- package/dist/cli/chunks/{chunk-ZETZATNY.js → chunk-YDW522M7.js} +2 -2
- package/dist/cli/chunks/{chunk-VAKJOTGU.js → chunk-YIJDCZVX.js} +2 -2
- package/dist/cli/chunks/{chunk-LZ34CKYE.js → chunk-YOKRSFGA.js} +2 -2
- package/dist/cli/chunks/{chunk-NKX2Z546.js → chunk-YSUMQBMY.js} +1 -1
- package/dist/cli/chunks/{chunk-3DXO5CWI.js → chunk-ZCKNGICX.js} +1 -1
- package/dist/cli/chunks/{chunk-SQQ57TSJ.js → chunk-ZJ4PMOIZ.js} +2 -2
- package/dist/cli/chunks/{ci-F4F3SDHP.js → ci-A5ZXOEC4.js} +2 -2
- package/dist/cli/chunks/{ci-output-4SUMOQGO.js → ci-output-S47BMRYC.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-NKXPDFMJ.js → claude-flow-setup-F5WBEBVK.js} +2 -2
- package/dist/cli/chunks/client-56BU3GAX.js +2 -0
- package/dist/cli/chunks/{cline-installer-3FMNXEKM.js → cline-installer-HLKR4QDR.js} +2 -2
- package/dist/cli/chunks/{code-5QEDZNKI.js → code-MTZWS6JT.js} +2 -2
- package/dist/cli/chunks/{code-index-extractor-RD5EAOLE.js → code-index-extractor-BALTZ2WQ.js} +2 -2
- package/dist/cli/chunks/{codex-installer-UU4O2FIE.js → codex-installer-LI2VIGET.js} +2 -2
- package/dist/cli/chunks/{completions-CS6RJLYZ.js → completions-TOF4GTNF.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-U4DE2QTP.js → complexity-analyzer-IPFXIT6T.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-E55EG2TB.js → continuedev-installer-KWI66RBI.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-TVJUX3AZ.js → copilot-installer-REFOE6UF.js} +2 -2
- package/dist/cli/chunks/{cost-tracker-IAKDLDJH.js → cost-tracker-M2MZQXCN.js} +2 -2
- package/dist/cli/chunks/{coverage-LX7UIEKV.js → coverage-UR2XSJCR.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-XQT52BTB.js +2 -0
- package/dist/cli/chunks/{cursor-installer-2NJ7MK23.js → cursor-installer-X4PXCVYH.js} +2 -2
- package/dist/cli/chunks/{daemon-T4CPOFHM.js → daemon-5R6ZEEBB.js} +3 -3
- package/dist/cli/chunks/{dag-attention-scheduler-GAPYYUHZ.js → dag-attention-scheduler-RUY2RJZA.js} +2 -2
- package/dist/cli/chunks/{detect-RU5LBCCI.js → detect-PX2AYBHM.js} +2 -2
- package/dist/cli/chunks/{domain-handler-LKPDVPF6.js → domain-handler-5JXWEO3E.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-Q76ITWBK.js → domain-transfer-6M2YLBJY.js} +2 -2
- package/dist/cli/chunks/dream-LFZCN5WK.js +2 -0
- package/dist/cli/chunks/esm-node-EBDIEPKS.js +2 -0
- package/dist/cli/chunks/{eval-TFFIZGTW.js → eval-L6ZBG462.js} +2 -2
- package/dist/cli/chunks/{fast-paths-V6KA3VWH.js → fast-paths-WIFDALFK.js} +2 -2
- package/dist/cli/chunks/{feature-flags-DWS4XL2P.js → feature-flags-GRHF5MTK.js} +2 -2
- package/dist/cli/chunks/{feature-flags-MYSY53UU.js → feature-flags-YLBXFUCN.js} +2 -2
- package/dist/cli/chunks/{file-discovery-AMKZRFLT.js → file-discovery-4HXUB4HN.js} +2 -2
- package/dist/cli/chunks/{fleet-B2BJFKEV.js → fleet-RPLJXOEP.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-SOJHQ7VC.js → gnn-wrapper-2D5IOGAT.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-O7FF6NRE.js → heartbeat-handler-D5SWZZGA.js} +4 -4
- package/dist/cli/chunks/{heartbeat-scheduler-WOGW5R7J.js → heartbeat-scheduler-WSG4Y3M2.js} +2 -2
- package/dist/cli/chunks/hnsw-adapter-BMXTVGZB.js +2 -0
- package/dist/cli/chunks/hnsw-index-YX6XLICT.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-CC5YS47X.js → hnsw-legacy-bridge-UH6RWE74.js} +2 -2
- package/dist/cli/chunks/{hnswlib-node-FTWYRETS.js → hnswlib-node-BJ4ZJPMP.js} +2 -2
- package/dist/cli/chunks/{hooks-ETOFFBMV.js → hooks-KGDQNB5T.js} +6 -6
- package/dist/cli/chunks/{hypergraph-engine-FGAHFWFO.js → hypergraph-engine-LARQCK7V.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-GNWJD7E3.js → hypergraph-handler-RACF4AOX.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-MGSI2WBK.js +2 -0
- package/dist/cli/chunks/{init-handler-BEYOLKQO.js → init-handler-64AOFMJD.js} +6 -6
- package/dist/cli/chunks/init-wizard-TBDWRRMC.js +2 -0
- package/dist/cli/chunks/kernel-NV7TO2FK.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-ED6LYSEM.js → kilocode-installer-4ICIP6QN.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-NG77T5YR.js → kiro-installer-J2GOV2OB.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-7REGYH6A.js +2 -0
- package/dist/cli/chunks/{learning-P3WY3LTI.js → learning-QD4JVH3K.js} +3 -3
- package/dist/cli/chunks/{llm-router-ETSFMOWS.js → llm-router-4K4IT2PQ.js} +2 -2
- package/dist/cli/chunks/{load-PP3GVQT7.js → load-EXKUJMBK.js} +2 -2
- package/dist/cli/chunks/load-test-RYQK44TT.js +2 -0
- package/dist/cli/chunks/{mcp-B2VX7EKL.js → mcp-NSNDZSMH.js} +2 -2
- package/dist/cli/chunks/{memory-SBZQ6MZ4.js → memory-63JTNVZN.js} +5 -5
- package/dist/cli/chunks/memory-backend-3EBE2DEX.js +2 -0
- package/dist/cli/chunks/{memory-handlers-5RMGG2CR.js → memory-handlers-2335MVQJ.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-PIDIFO2L.js → opencode-installer-244LFSPN.js} +2 -2
- package/dist/cli/chunks/{orchestrator-FSGUODZI.js → orchestrator-TZB457J6.js} +5 -5
- package/dist/cli/chunks/{pipeline-BQ5MWZPT.js → pipeline-YLBD2Z5Q.js} +2 -2
- package/dist/cli/chunks/{platform-6EJK4QMD.js → platform-53PWFZSE.js} +2 -2
- package/dist/cli/chunks/{plugin-EDGOMUJY.js → plugin-6GUQEFJU.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-4S6FYKPP.js → prime-radiant-advanced-wasm-VCOK7FV5.js} +2 -2
- package/dist/cli/chunks/protocol-executor-MR37S7GX.js +2 -0
- package/dist/cli/chunks/{protocol-handler-ETM7PMQU.js → protocol-handler-25UEGTE2.js} +2 -2
- package/dist/cli/chunks/{prove-YUBORZAP.js → prove-CTOU5F6G.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-DANGLPTH.js +2 -0
- package/dist/cli/chunks/{quality-XPZDC5FJ.js → quality-PB7H5UEF.js} +2 -2
- package/dist/cli/chunks/queen-coordinator-4YJPYF5F.js +2 -0
- package/dist/cli/chunks/{real-embeddings-KTDUTUJL.js → real-embeddings-RWWYCIE5.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-WADVKI3P.js → roocode-installer-U4AGYVKL.js} +2 -2
- package/dist/cli/chunks/router-F4IPY4RQ.js +2 -0
- package/dist/cli/chunks/routing-feedback-VGHFIJ5S.js +2 -0
- package/dist/cli/chunks/{routing-handler-OOPOYHEV.js → routing-handler-NTDKDEBE.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-UPEZL4OK.js → ruvector-commands-RQKOLQSW.js} +2 -2
- package/dist/cli/chunks/{rvf-dual-writer-TOBBCJ7K.js → rvf-dual-writer-6EZ7S7OG.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-adapter-U7UM2U36.js → rvf-migration-adapter-EBTV6FV2.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-coordinator-CUX3EU2X.js → rvf-migration-coordinator-MERU7VLY.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-2P75WF5A.js +2 -0
- package/dist/cli/chunks/safe-db-47NEO2RS.js +2 -0
- package/dist/cli/chunks/schedule-L5GJW25Z.js +2 -0
- package/dist/cli/chunks/scheduler-NGGGSZMO.js +2 -0
- package/dist/cli/chunks/{security-AQ4N5YKV.js → security-JPDLGHMC.js} +3 -3
- package/dist/cli/chunks/shared-rvf-adapter-NKNTYGHO.js +2 -0
- package/dist/cli/chunks/{shared-rvf-dual-writer-OKRIHVSY.js → shared-rvf-dual-writer-7OGLQE5Y.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-TE2ZRHKA.js +2 -0
- package/dist/cli/chunks/{status-handler-HSJLJPNG.js → status-handler-3TI3DHEL.js} +2 -2
- package/dist/cli/chunks/{structural-health-KWZAS7ON.js → structural-health-WCZKXVWS.js} +2 -2
- package/dist/cli/chunks/{sync-6L5Z4IWH.js → sync-AM5T4GYO.js} +2 -2
- package/dist/cli/chunks/{task-handler-KEAIPB6G.js → task-handler-VHDTXPVP.js} +2 -2
- package/dist/cli/chunks/{task-handlers-BPDN6OSM.js → task-handlers-GEJ36WNB.js} +2 -2
- package/dist/cli/chunks/{test-PICO6RLU.js → test-G6P5XGHM.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-BI3R3DX5.js → test-scheduling-37RBUN4E.js} +3 -3
- package/dist/cli/chunks/{token-bootstrap-KMQC6ALU.js → token-bootstrap-JPE3LWXQ.js} +2 -2
- package/dist/cli/chunks/{token-usage-QGDX7MLB.js → token-usage-5XGVBLFR.js} +2 -2
- package/dist/cli/chunks/{transformers-UNRYJSIU.js → transformers-JTKWAZJU.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-U22JYPOG.js → tree-sitter-wasm-parser-KW2GWIIQ.js} +2 -2
- package/dist/cli/chunks/{types-CYXAGOY5.js → types-7R72BACI.js} +2 -2
- package/dist/cli/chunks/unified-memory-KSBLUZT4.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-V3EOMQIZ.js +2 -0
- package/dist/cli/chunks/unified-persistence-URIRJ4BM.js +2 -0
- package/dist/cli/chunks/{validate-IUY5BWAV.js → validate-TYB4ZTUL.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-FXFKSEOI.js → validate-swarm-3TFI6PLT.js} +2 -2
- package/dist/cli/chunks/{vibium-DKZ64NR3.js → vibium-3YELURJT.js} +2 -2
- package/dist/cli/chunks/visual-security-DJOOVCBZ.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-WQDTN5CV.js → web-tree-sitter-7Q77A27Y.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-O5WOBFOQ.js → windsurf-installer-ASARRM2X.js} +2 -2
- package/dist/cli/chunks/{witness-chain-F7WXEVJA.js → witness-chain-WZ6PNXEY.js} +2 -2
- package/dist/cli/chunks/witness-chain-ZWJUCXCJ.js +2 -0
- package/dist/cli/chunks/{workflow-47524I5G.js → workflow-JDTEE6TY.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-5CKA6Q74.js +2 -0
- package/dist/cli/chunks/{wrappers-MP2HWQD7.js → wrappers-X7WZLBZD.js} +2 -2
- package/dist/mcp/bundle.js +1 -1
- package/package.json +1 -1
- package/dist/cli/chunks/adapter-GE3RSG32.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-IYL6TK6E.js +0 -2
- package/dist/cli/chunks/base-L3G3GEZY.js +0 -2
- package/dist/cli/chunks/browser-workflow-7KTCY5FI.js +0 -2
- package/dist/cli/chunks/chunk-N5SLJOBK.js +0 -2
- package/dist/cli/chunks/client-3DPPDO2H.js +0 -2
- package/dist/cli/chunks/cross-domain-router-JOYTUBFT.js +0 -2
- package/dist/cli/chunks/dream-IF2HCRW4.js +0 -2
- package/dist/cli/chunks/esm-node-LNRP5BNU.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-UPX4AXOQ.js +0 -2
- package/dist/cli/chunks/hnsw-index-CSI2EXXR.js +0 -2
- package/dist/cli/chunks/impact-analyzer-2YVBHMES.js +0 -2
- package/dist/cli/chunks/init-wizard-V6GZQMMR.js +0 -2
- package/dist/cli/chunks/kernel-EHJ4SP2Y.js +0 -2
- package/dist/cli/chunks/knowledge-graph-ZYXBWGKL.js +0 -2
- package/dist/cli/chunks/load-test-VDZEYGKV.js +0 -2
- package/dist/cli/chunks/memory-backend-IB3BU4VM.js +0 -2
- package/dist/cli/chunks/protocol-executor-H2ZG7JBJ.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-ZCSHSKZU.js +0 -2
- package/dist/cli/chunks/queen-coordinator-NEC373VS.js +0 -2
- package/dist/cli/chunks/router-3PP5XRTD.js +0 -2
- package/dist/cli/chunks/routing-feedback-JNUFV2X3.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-PTOZXG4W.js +0 -2
- package/dist/cli/chunks/safe-db-CGYNYUES.js +0 -2
- package/dist/cli/chunks/schedule-NRN4WOHX.js +0 -2
- package/dist/cli/chunks/scheduler-DRAQGYLL.js +0 -2
- package/dist/cli/chunks/shared-rvf-adapter-6UVVDOHK.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-3WG7PBPL.js +0 -2
- package/dist/cli/chunks/unified-memory-EXRANFUS.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-GB752D44.js +0 -2
- package/dist/cli/chunks/unified-persistence-V2B3YWFD.js +0 -2
- package/dist/cli/chunks/visual-security-YMPI7X7V.js +0 -2
- package/dist/cli/chunks/witness-chain-7LIPUVMI.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-QPIAR4LI.js +0 -2
|
@@ -932,9 +932,9 @@
|
|
|
932
932
|
},
|
|
933
933
|
"metadata": {
|
|
934
934
|
"generatedBy": "Agentic QE Fleet",
|
|
935
|
-
"fleetVersion": "3.9.
|
|
935
|
+
"fleetVersion": "3.9.8",
|
|
936
936
|
"manifestVersion": "1.3.0",
|
|
937
|
-
"lastUpdated": "2026-
|
|
937
|
+
"lastUpdated": "2026-04-08T00:00:00.000Z",
|
|
938
938
|
"contributors": [
|
|
939
939
|
{
|
|
940
940
|
"name": "@fndlalit",
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,32 @@ All notable changes to the Agentic QE project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [3.9.8] - 2026-04-08
|
|
9
|
+
|
|
10
|
+
This is a release-process release. **No source code changes** — every commit since v3.9.7 lands in CI, fixtures, scripts, or docs. The published package is functionally identical to v3.9.7 except for a refreshed lockfile with two transitive security patches.
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **Mirror init-corpus tarballs to GitHub Releases** ([#411](https://github.com/proffesor-for-testing/agentic-qe/issues/411), [#415](https://github.com/proffesor-for-testing/agentic-qe/pull/415)) — Insurance against `codeload.github.com` regenerating its `git archive` output (has happened in 2023 and 2024). The release-gate's `setup.sh` now falls back to a self-hosted mirror at the [`init-corpus-v1`](https://github.com/proffesor-for-testing/agentic-qe/releases/tag/init-corpus-v1) release on primary-URL sha256 mismatch and emits a loud `WARNING: using mirror for <id>` line so CI surfaces drift even on green runs. New `scripts/upload-init-corpus-mirror.sh` for the maintainer (idempotent, refuses to upload bytes that don't match `MANIFEST.json`). New `.github/workflows/init-corpus-mirror-test.yml` exercises both the reachability path (`AQE_CORPUS_FORCE_MIRROR=1`) and the fallback-on-drift path (local `python3 -m http.server` serving bogus bytes) on every PR touching the corpus and weekly on Mondays.
|
|
15
|
+
|
|
16
|
+
- **PR template CI enforcement** ([#408](https://github.com/proffesor-for-testing/agentic-qe/issues/408), [#416](https://github.com/proffesor-for-testing/agentic-qe/pull/416)) — Replaces the honor-system #401 failure-modes checkbox with a real CI parser. `.github/workflows/pr-template-check.yml` runs on every PR and hard-fails when (a) the load-bearing checkbox is unchecked or its template section is deleted, or (b) the PR body contains dismissal phrases like "I believe it's unlikely" or "highly unlikely" without a same-paragraph tracking issue reference. 11 forbidden-phrase patterns covered. `dependabot[bot]` allowlisted via job-level `if:` so machine-generated PRs don't fail the check. The parser is `scripts/check-pr-body.cjs` (zero deps, ESM-safe via `.cjs` extension). 11 fixtures under `tests/fixtures/pr-body/` cover valid bodies, invalid bodies, multi-violation bodies, and the actual v3.9.3 PR body (which fails on missing section) plus a synthetic body quoting #401's exact postmortem reference. A `self-test` job runs the parser against every fixture in CI to catch parser regressions.
|
|
17
|
+
|
|
18
|
+
- **Weekly init chaos workflow** ([#410](https://github.com/proffesor-for-testing/agentic-qe/issues/410), [#417](https://github.com/proffesor-for-testing/agentic-qe/pull/417)) — Adversarial-rare coverage to complement the everyday-real release gate. `.github/workflows/init-chaos.yml` runs Sundays 05:00 UTC. `tests/fixtures/init-chaos/generate.sh` produces 6 pathological project shapes at runtime: UTF-16LE source with BOM, mixed line endings, mutual symlink loop, PNG bytes saved as `.ts`, ~256 KB single-line minified bundle, and source files with embedded NUL/ESC sequences. For each shape the workflow runs `timeout 60 aqe init --auto --json` and asserts the exit code is anything except 124 (the timeout's signal that init hung). The watchdog is the load-bearing thing under test, not init's ability to make sense of garbage input.
|
|
19
|
+
|
|
20
|
+
- **`docs/VERIFICATION.md`** ([#409](https://github.com/proffesor-for-testing/agentic-qe/issues/409), [#417](https://github.com/proffesor-for-testing/agentic-qe/pull/417)) — Maintainer-facing entry point for the post-#401 release verification layer. Architecture diagram, how to interpret a failed gate, how to add a fixture, how to embed the verification matrix into a release notes file. Linked from `CONTRIBUTING.md` Documentation section.
|
|
21
|
+
|
|
22
|
+
- **`scripts/embed-verification-matrix.sh`** ([#409](https://github.com/proffesor-for-testing/agentic-qe/issues/409), [#417](https://github.com/proffesor-for-testing/agentic-qe/pull/417)) — Status-only matrix script. Given a workflow run ID, downloads the `init-corpus-logs` artifact via `gh run download`, parses `summary.txt`, and emits a markdown table. Used by maintainers when writing per-version release notes.
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
|
|
26
|
+
- **`docs/policies/release-verification.md` rewritten around the automated gate** ([#409](https://github.com/proffesor-for-testing/agentic-qe/issues/409)) — The pre-#401 manual `aqe init` checklist is removed; the gate now does what it tried to do, with 22 assertions per fixture. The Version Update Policy + Workflow sections are preserved intact — they cover the one class of pre-release error the gate cannot catch.
|
|
27
|
+
|
|
28
|
+
- **`tests/fixtures/init-corpus/setup.sh`** restructured around a `download_and_verify` helper to support the primary→mirror fallback path, with proper `set -e` exemption via `if func; then ... else rc=$? ... fi` so the fallback can actually fire. Added `AQE_CORPUS_MANIFEST_PATH` and `AQE_CORPUS_FORCE_MIRROR` env overrides for the mirror-test workflow.
|
|
29
|
+
|
|
30
|
+
### Security
|
|
31
|
+
|
|
32
|
+
- **Transitive dependency bumps** ([#414](https://github.com/proffesor-for-testing/agentic-qe/pull/414)) — `hono` 4.12.9→4.12.12 and `@hono/node-server` 1.19.11→1.19.13 (both indirect, lockfile-only). Picked up by dependabot's `npm_and_yarn` security group.
|
|
33
|
+
|
|
8
34
|
## [3.9.7] - 2026-04-07
|
|
9
35
|
|
|
10
36
|
### Added
|
package/dist/cli/bundle.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
3
|
-
import{a as y}from"./chunks/chunk-
|
|
2
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.8");process.exit(0)}
|
|
3
|
+
import{a as y}from"./chunks/chunk-R2LWLZ3Y.js";import{a as f,c as A}from"./chunks/chunk-PG7CZ6Q4.js";import"./chunks/chunk-E4D36LGH.js";A();import{Command as P}from"commander";import m from"chalk";function h(e,i,a,s){let l=e.command(i).description(a);if(s)for(let u of s)l.alias(u);return l.helpOption(!1),l.allowUnknownOption(!0),l.allowExcessArguments(!0),l}function w(e,i){let a=e.commands,s=a.indexOf(i);s>=0&&a.splice(s,1)}function r(e,i){let a=h(e,i.name,i.description,i.aliases);a.action(async()=>{try{let s=await i.factory();w(e,a),e.addCommand(s),await e.parseAsync(process.argv)}catch(s){console.error(`Failed to load command '${i.name}':`,s instanceof Error?s.message:s),process.exit(1)}})}function d(e,i,a,s,l,u){let g=h(e,i,a,u);g.action(async()=>{try{let p=await s();w(e,g),p.register(e,l),await e.parseAsync(process.argv)}catch(p){console.error(`Failed to load command '${i}':`,p instanceof Error?p.message:p),process.exit(1)}})}var S=["[UnifiedMemory]","[HybridBackend]","[UnifiedPersistence]","[PersistentSONAEngine]","[QueenGovernance]","[QueenCoordinator]","[Queen]","[QUEEN]","[DomainBreakerRegistry]","[RealEmbeddings]","[HNSWIndex]","[PatternStore]","[TestGenerationCoordinator]","[CodeIntelligence]","[ProductFactorsBridge]","[LearningOptimizationCoordinator]","[DreamEngine]","[DreamScheduler]","[SecurityCompliance]","[Providers]","[GNN]","[test-generation]","[test-execution]","[coverage-analysis]","[quality-assessment]","[defect-intelligence]","[requirements-validation]","[code-intelligence]","[security-compliance]","[contract-testing]","[visual-accessibility]","[chaos-resilience]","[learning-optimization]","[enterprise-integration]","[coordination]","[PatternLearnerService]","[RequirementsValidation]","[ParserRegistry]","[AdversarialDefense]","[ContinueGateIntegration]","[ContinueGate]","[SQLitePatternStore]","[TokenTracking]","[InfraHealing]","[ExperienceCapture]"],I=/^\[\d{2}:\d{2}:\d{2}\.\d{3}\]\s+\[/,b=console.log.bind(console);console.log=(...e)=>{let a=(typeof e[0]=="string"?e[0]:"").trimStart();if(S.some(s=>a.startsWith(s))||I.test(a)){process.stderr.write(e.map(String).join(" ")+`
|
|
4
4
|
`);return}b(...e)};var O=console.info.bind(console);console.info=(...e)=>{process.stderr.write(e.map(String).join(" ")+`
|
|
5
|
-
`)};var t={kernel:null,queen:null,router:null,workflowOrchestrator:null,scheduledWorkflows:new Map,persistentScheduler:null,initialized:!1};function C(e,i){let a=e.getDomainAPI("visual-accessibility");if(a?.registerWorkflowActions)try{a.registerWorkflowActions(i)}catch(l){console.error(m.yellow(` Warning: Could not register visual-accessibility workflow actions: ${f(l)}`))}let s=e.getDomainAPI("requirements-validation");if(s?.registerWorkflowActions)try{s.registerWorkflowActions(i)}catch(l){console.error(m.yellow(` Warning: Could not register requirements-validation workflow actions: ${f(l)}`))}}async function D(){let{QEKernelImpl:e}=await import("./chunks/kernel-
|
|
5
|
+
`)};var t={kernel:null,queen:null,router:null,workflowOrchestrator:null,scheduledWorkflows:new Map,persistentScheduler:null,initialized:!1};function C(e,i){let a=e.getDomainAPI("visual-accessibility");if(a?.registerWorkflowActions)try{a.registerWorkflowActions(i)}catch(l){console.error(m.yellow(` Warning: Could not register visual-accessibility workflow actions: ${f(l)}`))}let s=e.getDomainAPI("requirements-validation");if(s?.registerWorkflowActions)try{s.registerWorkflowActions(i)}catch(l){console.error(m.yellow(` Warning: Could not register requirements-validation workflow actions: ${f(l)}`))}}async function D(){let{QEKernelImpl:e}=await import("./chunks/kernel-NV7TO2FK.js"),{CrossDomainEventRouter:i}=await import("./chunks/cross-domain-router-XQT52BTB.js"),{DefaultProtocolExecutor:a}=await import("./chunks/protocol-executor-MR37S7GX.js"),{WorkflowOrchestrator:s}=await import("./chunks/workflow-orchestrator-5CKA6Q74.js"),{createQueenCoordinator:l}=await import("./chunks/queen-coordinator-4YJPYF5F.js"),{createPersistentScheduler:u}=await import("./chunks/scheduler-NGGGSZMO.js");t.kernel=new e({maxConcurrentAgents:15,memoryBackend:"sqlite",hnswEnabled:!0,lazyLoading:!0,enabledDomains:[...y]}),await t.kernel.initialize(),t.router=new i(t.kernel.eventBus),await t.router.initialize();let g=E=>t.kernel.getDomainAPI(E),p=new a(t.kernel.eventBus,t.kernel.memory,g);t.workflowOrchestrator=new s(t.kernel.eventBus,t.kernel.memory,t.kernel.coordinator),await t.workflowOrchestrator.initialize(),C(t.kernel,t.workflowOrchestrator),t.persistentScheduler=u(),t.queen=l(t.kernel,t.router,p,void 0),await t.queen.initialize(),t.initialized=!0}async function k(){if(t.initialized&&t.kernel&&t.queen)return!0;let e=await import("fs"),a=(await import("path")).resolve(".agentic-qe");return e.existsSync(a)?c():(console.error(m.red(`
|
|
6
6
|
Error: AQE system not initialized in this directory.`)),console.log(m.yellow("Run `aqe init` first to set up this project.\n")),!1)}async function c(){if(t.initialized&&t.kernel&&t.queen)return!0;process.stderr.write(m.gray("Auto-initializing v3 system...")+`
|
|
7
7
|
`);let e=3e4,i=new Promise((a,s)=>{setTimeout(()=>s(new Error("Initialization timeout after 30 seconds")),e)});try{return await Promise.race([D(),i]),process.stderr.write(m.green("System ready")+`
|
|
8
8
|
|
|
9
|
-
`),!0}catch(a){return a.message.includes("timeout")?(console.error(m.red("Initialization timed out after 30 seconds.")),console.log(m.yellow("Try running `aqe init` manually."))):(console.error(m.red("Failed to auto-initialize:"),a),console.log(m.yellow("Try running `aqe init` manually."))),!1}}async function o(e=0){try{t.workflowOrchestrator&&t.workflowOrchestrator.dispose().catch(()=>{}),t.queen&&t.queen.dispose().catch(()=>{}),t.router&&t.router.dispose().catch(()=>{}),t.kernel&&t.kernel.dispose().catch(()=>{})}catch{}process.exit(e)}var n=new P,v="3.9.
|
|
9
|
+
`),!0}catch(a){return a.message.includes("timeout")?(console.error(m.red("Initialization timed out after 30 seconds.")),console.log(m.yellow("Try running `aqe init` manually."))):(console.error(m.red("Failed to auto-initialize:"),a),console.log(m.yellow("Try running `aqe init` manually."))),!1}}async function o(e=0){try{t.workflowOrchestrator&&t.workflowOrchestrator.dispose().catch(()=>{}),t.queen&&t.queen.dispose().catch(()=>{}),t.router&&t.router.dispose().catch(()=>{}),t.kernel&&t.kernel.dispose().catch(()=>{})}catch{}process.exit(e)}var n=new P,v="3.9.8";n.name("aqe").description("Agentic QE - Domain-Driven Quality Engineering").version(v);d(n,"init","Initialize the AQE v3 system",()=>import("./chunks/init-handler-64AOFMJD.js").then(e=>e.createInitHandler(o)),t);d(n,"status","Show system status",()=>import("./chunks/status-handler-3TI3DHEL.js").then(e=>e.createStatusHandler(o,k)),t);d(n,"health","Check system health",()=>import("./chunks/status-handler-3TI3DHEL.js").then(e=>e.createHealthHandler(o,k)),t);d(n,"task","Manage QE tasks",()=>import("./chunks/task-handler-VHDTXPVP.js").then(e=>e.createTaskHandler(o,c)),t);d(n,"agent","Manage QE agents",()=>import("./chunks/agent-handler-FVXHR6XN.js").then(e=>e.createAgentHandler(o,c)),t);d(n,"domain","Domain operations",()=>import("./chunks/domain-handler-5JXWEO3E.js").then(e=>e.createDomainHandler(o,c)),t);d(n,"protocol","Execute coordination protocols",()=>import("./chunks/protocol-handler-25UEGTE2.js").then(e=>e.createProtocolHandler(o,c)),t);d(n,"brain","Export, import, and inspect QE brain state",()=>import("./chunks/brain-handler-KIUSNVSS.js").then(e=>e.createBrainHandler(o,c)),t);d(n,"hypergraph","Query the code knowledge hypergraph",()=>import("./chunks/hypergraph-handler-RACF4AOX.js").then(e=>e.createHypergraphHandler(o,c)),t,["hg"]);d(n,"heartbeat","Manage the token-free heartbeat scheduler",()=>import("./chunks/heartbeat-handler-D5SWZZGA.js").then(e=>e.createHeartbeatHandler(o)),t);d(n,"routing","View routing performance, economics, and accuracy",()=>import("./chunks/routing-handler-NTDKDEBE.js").then(e=>e.createRoutingHandler(o)),t);r(n,{name:"workflow",description:"Manage QE workflows and pipelines (ADR-041)",factory:()=>import("./chunks/workflow-JDTEE6TY.js").then(e=>e.createWorkflowCommand(t,o,c))});r(n,{name:"test",description:"Test generation, execution, scheduling, and load testing",factory:()=>import("./chunks/test-G6P5XGHM.js").then(e=>e.createTestCommand(t,o,c))});r(n,{name:"coverage",description:"Coverage analysis shortcut",factory:()=>import("./chunks/coverage-UR2XSJCR.js").then(e=>e.createCoverageCommand(t,o,c))});r(n,{name:"quality",description:"Quality assessment shortcut",factory:()=>import("./chunks/quality-PB7H5UEF.js").then(e=>e.createQualityCommand(t,o,c))});r(n,{name:"security",description:"Security scanning and URL validation",factory:()=>import("./chunks/security-JPDLGHMC.js").then(e=>e.createSecurityCommand(t,o,c))});r(n,{name:"code",description:"Code intelligence analysis",factory:()=>import("./chunks/code-MTZWS6JT.js").then(e=>e.createCodeCommand(t,o,c))});r(n,{name:"completions",description:"Generate shell completions for aqe",factory:()=>import("./chunks/completions-TOF4GTNF.js").then(e=>e.createCompletionsCommand(o))});r(n,{name:"fleet",description:"Fleet operations with multi-agent progress tracking",factory:()=>import("./chunks/fleet-RPLJXOEP.js").then(e=>e.createFleetCommand(t,o,c,C))});r(n,{name:"validate",description:"Validation commands for skills and agents",factory:()=>import("./chunks/validate-swarm-3TFI6PLT.js").then(e=>e.createValidateSwarmCommand(t,o,c))});r(n,{name:"skill",description:"Skill validation and reporting (ADR-056)",factory:()=>import("./chunks/validate-TYB4ZTUL.js").then(e=>e.createValidateCommand(t,o,c))});r(n,{name:"eval",description:"Run skill evaluation suites in parallel",factory:()=>import("./chunks/eval-L6ZBG462.js").then(e=>e.createEvalCommand())});r(n,{name:"ci",description:"CI/CD pipeline orchestration",factory:()=>import("./chunks/ci-A5ZXOEC4.js").then(e=>e.createCICommand(t,o,c))});r(n,{name:"token-usage",description:"View and analyze token consumption metrics (ADR-042)",factory:()=>import("./chunks/token-usage-5XGVBLFR.js").then(e=>e.createTokenUsageCommand())});r(n,{name:"llm",description:"LLM Router management (ADR-043)",factory:()=>import("./chunks/llm-router-4K4IT2PQ.js").then(e=>e.createLLMRouterCommand())});r(n,{name:"sync",description:"Sync local learning data to cloud PostgreSQL",factory:()=>import("./chunks/sync-AM5T4GYO.js").then(e=>e.createSyncCommands())});r(n,{name:"hooks",description:"Self-learning QE hooks for pattern recognition and guidance",factory:()=>import("./chunks/hooks-KGDQNB5T.js").then(e=>e.createHooksCommand())});r(n,{name:"learning",description:"AQE self-learning system management (standalone, no claude-flow required)",factory:()=>import("./chunks/learning-QD4JVH3K.js").then(e=>e.createLearningCommand())});r(n,{name:"memory",description:"Memory store, retrieve, search, and delete operations",factory:()=>import("./chunks/memory-63JTNVZN.js").then(e=>e.createMemoryCommand(t,o,c))});r(n,{name:"mcp",description:"Start the MCP protocol server for Claude Code integration",factory:()=>import("./chunks/mcp-NSNDZSMH.js").then(e=>e.createMcpCommand())});r(n,{name:"platform",description:"Manage coding agent platform configurations",factory:()=>import("./chunks/platform-53PWFZSE.js").then(e=>e.createPlatformCommand())});r(n,{name:"prove",description:"Generate a verifiable Proof-of-Quality attestation",factory:()=>import("./chunks/prove-CTOU5F6G.js").then(e=>e.createProveCommand(t,o,c))});r(n,{name:"ruvector",description:"RuVector integration management",factory:()=>import("./chunks/ruvector-commands-RQKOLQSW.js").then(e=>e.createRuVectorCommand())});r(n,{name:"audit",description:"Witness chain audit trail management",factory:()=>import("./chunks/audit-YRLKHJLX.js").then(e=>e.createAuditCommand(t,o,c))});r(n,{name:"pipeline",description:"Manage YAML deterministic pipelines (Imp-9)",factory:()=>import("./chunks/pipeline-YLBD2Z5Q.js").then(e=>e.createPipelineCommand(t,o,c))});r(n,{name:"plugin",description:"Manage external QE domain plugins",factory:()=>import("./chunks/plugin-6GUQEFJU.js").then(e=>e.createPluginCommand())});r(n,{name:"daemon",description:"Manage the QE Quality Daemon",factory:()=>import("./chunks/daemon-5R6ZEEBB.js").then(e=>e.createDaemonCommand())});process.on("SIGINT",async()=>{console.log(m.yellow(`
|
|
10
10
|
|
|
11
11
|
Shutting down...`)),console.log(m.green(`Shutdown complete
|
|
12
12
|
`)),await o(0)});process.on("SIGTERM",async()=>{console.log(m.yellow(`
|
|
13
|
-
Received SIGTERM, shutting down gracefully...`)),await o(0)});async function z(){let{isVersionFastPath:e}=await import("./chunks/fast-paths-
|
|
13
|
+
Received SIGTERM, shutting down gracefully...`)),await o(0)});async function z(){let{isVersionFastPath:e}=await import("./chunks/fast-paths-WIFDALFK.js");e(process.argv)&&(console.log(v),process.exit(0));let{bootstrapTokenTracking:i}=await import("./chunks/token-bootstrap-JPE3LWXQ.js");await i({enableOptimization:!0,enablePersistence:!0,verbose:process.env.AQE_VERBOSE==="true"}),await n.parseAsync(),await o(0)}z().catch(async e=>{console.error(m.red("Fatal error:"),e),await o(1)});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.8");process.exit(0)}
|
|
2
|
+
import{a,b,c}from"./chunk-4KX6TMKB.js";import"./chunk-6KWX7A3R.js";import"./chunk-UOSKMAAY.js";import"./chunk-VVNR4R22.js";import"./chunk-PG7CZ6Q4.js";import"./chunk-E4D36LGH.js";export{a as AgentBoosterAdapter,b as createAgentBoosterAdapter,c as createAgentBoosterAdapterSync};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a as x}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.8");process.exit(0)}
|
|
2
|
+
import{a as x}from"./chunk-OT4JADWW.js";import{c as f}from"./chunk-CG3HIYF4.js";import"./chunk-E4D36LGH.js";x();import{createRequire as w}from"module";var S=f.create("agent-booster-wasm"),t={JavaScript:0,TypeScript:1,Python:2,Rust:3,Go:4,Java:5,C:6,Cpp:7},l={ExactReplace:0,FuzzyReplace:1,InsertAfter:2,InsertBefore:3,Append:4},v={0:"JavaScript",1:"TypeScript",2:"Python",3:"Rust",4:"Go",5:"Java",6:"C",7:"Cpp"},a=null,u=null,p=null;async function g(){if(a)return!0;if(p)return!1;try{if(a=w(import.meta.url)("./agent_booster_wasm.js"),!a)throw new Error("WASM module loaded but is null");return u=new a.AgentBoosterWasm,!0}catch(e){return p=e,console.warn("[AgentBoosterWASM] Failed to load WASM module:",e),!1}}function A(e){return{".js":t.JavaScript,".mjs":t.JavaScript,".cjs":t.JavaScript,".jsx":t.JavaScript,".ts":t.TypeScript,".tsx":t.TypeScript,".mts":t.TypeScript,".cts":t.TypeScript,".py":t.Python,".rs":t.Rust,".go":t.Go,".java":t.Java,".c":t.C,".h":t.C,".cpp":t.Cpp,".cc":t.Cpp,".cxx":t.Cpp,".hpp":t.Cpp}[e.toLowerCase()]??t.JavaScript}var M=[{name:"var-to-const",detect:(e,r)=>e.includes("var ")&&r.includes("const "),apply:(e,r)=>e.replace(/\bvar\s+/g,"const ")},{name:"var-to-let",detect:(e,r)=>e.includes("var ")&&r.includes("let "),apply:(e,r)=>e.replace(/\bvar\s+/g,"let ")},{name:"add-types-function",detect:(e,r)=>e.includes("function")&&!e.includes(":")&&r.includes(":"),apply:(e,r)=>r},{name:"async-wrapper",detect:(e,r)=>!e.includes("async")&&r.includes("async")&&r.includes("await"),apply:(e,r)=>r},{name:"try-catch-wrapper",detect:(e,r)=>!e.includes("try {")&&r.includes("try {"),apply:(e,r)=>r},{name:"null-check",detect:(e,r)=>!e.includes("if (!")&&!e.includes("if (!")&&(r.includes("if (!")||r.includes("?.")),apply:(e,r)=>r},{name:"test-assertion",detect:(e,r)=>e.includes("test(")&&!e.includes("expect(")&&r.includes("expect("),apply:(e,r)=>r}];function y(e,r){for(let n of M)if(n.detect(e,r))try{return{success:!0,code:n.apply(e,r),pattern:n.name}}catch(s){S.debug("Pattern transform failed, trying next",{pattern:n.name,error:s instanceof Error?s.message:String(s)});continue}return{success:!1,code:r}}async function b(e,r,n,s={}){let o=performance.now(),{confidenceThreshold:T=.5,allowFallback:d=!0}=s;if(!e.trim())return{success:!0,mergedCode:r,confidence:1,strategy:l.Append,syntaxValid:!0,source:"fallback",latencyMs:performance.now()-o};if(await g()&&u&&a)try{let c=a.WasmLanguage[v[n]],i=u.apply_edit(e,r,c);return{success:!0,mergedCode:i.merged_code,confidence:i.confidence,strategy:i.strategy,syntaxValid:i.syntax_valid,source:"wasm",latencyMs:performance.now()-o}}catch(c){let i=c;if(d){let m=y(e,r);if(m.success)return{success:!0,mergedCode:m.code,confidence:.7,strategy:l.FuzzyReplace,syntaxValid:!0,source:"pattern",latencyMs:performance.now()-o}}return{success:!1,mergedCode:r,confidence:0,strategy:l.Append,syntaxValid:!1,source:"fallback",latencyMs:performance.now()-o,error:i.message}}if(d){let c=y(e,r);return{success:c.success,mergedCode:c.code,confidence:c.success?.7:0,strategy:l.FuzzyReplace,syntaxValid:!0,source:"pattern",latencyMs:performance.now()-o}}return{success:!1,mergedCode:r,confidence:0,strategy:l.Append,syntaxValid:!1,source:"fallback",latencyMs:performance.now()-o,error:p?.message??"WASM not available"}}async function W(e,r={}){return Promise.all(e.map(({original:n,edit:s,language:o})=>b(n,s,o,r)))}async function C(){return g()}async function L(){return await g()&&a?a.AgentBoosterWasm.version():"unavailable"}async function R(){if(await g(),u&&a)try{u.apply_edit("function x() {}","function x() {}",a.WasmLanguage.JavaScript)}catch(e){console.debug("[AgentBoosterWASM] Warmup error:",e instanceof Error?e.message:e)}}var _={transform:b,batchTransform:W,isWasmAvailable:C,getVersion:L,warmup:R,Language:t,MergeStrategy:l,languageFromExtension:A};export{t as Language,l as MergeStrategy,W as batchTransform,_ as default,L as getVersion,C as isWasmAvailable,A as languageFromExtension,b as transform,R as warmup};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{b as p}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.8");process.exit(0)}
|
|
2
|
+
import{b as p}from"./chunk-SDMGF3KD.js";import{a as g}from"./chunk-KMGAJRQ6.js";import"./chunk-VVNR4R22.js";import"./chunk-E4D36LGH.js";import s from"chalk";var l=class{name="agent";description="Manage QE agents";cleanupAndExit;ensureInitialized;constructor(n,t){this.cleanupAndExit=n,this.ensureInitialized=t}register(n,t){let a=n.command("agent").description(this.description);a.command("list").description("List all agents").option("-d, --domain <domain>","Filter by domain").option("-s, --status <status>","Filter by status").action(async e=>{await this.executeList(e,t)}),a.command("spawn <domain>").description("Spawn an agent in a domain").option("-t, --type <type>","Agent type","worker").option("-c, --capabilities <caps>","Comma-separated capabilities","general").option("--no-progress","Disable progress indicator").action(async(e,o)=>{await this.executeSpawn(e,o,t)})}async executeList(n,t){if(await this.ensureInitialized())try{let a=n.domain?t.queen.getAgentsByDomain(n.domain):t.queen.listAllAgents();if(n.status&&(a=a.filter(e=>e.status===n.status)),console.log(s.blue(`
|
|
3
3
|
Agents (${a.length})
|
|
4
4
|
`)),a.length===0)console.log(s.gray(" No agents found"));else{let e=new Map;for(let i of a)e.has(i.domain)||e.set(i.domain,[]),e.get(i.domain).push(i);let o=Array.from(e.entries());for(let[i,m]of o){console.log(s.cyan(` ${i}:`));for(let r of m)console.log(` ${r.id}`),console.log(` Type: ${r.type}`),console.log(` Status: ${g(r.status)}`),r.startedAt&&console.log(s.gray(` Started: ${r.startedAt.toISOString()}`));console.log("")}}}catch(a){console.error(s.red(`
|
|
5
5
|
Failed to list agents:`),a),await this.cleanupAndExit(1)}}async executeSpawn(n,t,a){if(await this.ensureInitialized())try{let e=t.capabilities.split(",");console.log(s.blue(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.8");process.exit(0)}
|
|
2
|
+
import"./chunk-E4D36LGH.js";import{existsSync as i,mkdirSync as d,unlinkSync as s,readdirSync as p,statSync as f}from"fs";import{join as o,basename as l}from"path";var v={branchDir:".agentic-qe/branches",defaultStrategy:"child-wins",orphanMaxAgeMs:36e5},g=class{config;parentAdapter;activeBranches=new Map;witnessChain=null;constructor(t,e){this.parentAdapter=t,this.config={...v,...e}}setWitnessChain(t){this.witnessChain=t}createBranch(t){if(this.activeBranches.has(t))throw new Error(`Branch already exists for agent ${t}`);i(this.config.branchDir)||d(this.config.branchDir,{recursive:!0});let e=o(this.config.branchDir,`${t}.rvf`),r=this.parentAdapter.path(),n=this.parentAdapter.derive(e),a={agentId:t,childPath:e,parentPath:r,childAdapter:n,createdAt:Date.now(),ingestLog:[]};return this.activeBranches.set(t,a),a}recordIngest(t,e){let r=this.activeBranches.get(t);if(r)for(let n of e)r.ingestLog.push({id:n.id,vector:n.vector})}async mergeBranch(t,e){let r=e??this.config.defaultStrategy,n=performance.now(),a=0;if(r==="child-wins"&&t.ingestLog.length>0)try{a=this.parentAdapter.ingest(t.ingestLog).accepted}catch(c){console.warn(`[AgentMemoryBranch] Merge replay failed for ${t.agentId}:`,c)}return this.witnessChain?.append("BRANCH_MERGE",{agentId:t.agentId,strategy:r,vectorsMerged:a,branchPath:t.childPath},`agent-${t.agentId}`),this.cleanupBranchFile(t),this.activeBranches.delete(t.agentId),{vectorsMerged:a,strategy:r,durationMs:performance.now()-n}}discardBranch(t){this.witnessChain?.append("BRANCH_DISCARD",{agentId:t.agentId,action:"discard",branchPath:t.childPath},`agent-${t.agentId}`),this.cleanupBranchFile(t),this.activeBranches.delete(t.agentId)}getBranch(t){return this.activeBranches.get(t)}getActiveBranches(){return Array.from(this.activeBranches.values())}listBranchFiles(){return i(this.config.branchDir)?p(this.config.branchDir).filter(e=>e.endsWith(".rvf")).map(e=>{let r=o(this.config.branchDir,e),n=f(r);return{agentId:l(e,".rvf"),path:r,sizeBytes:n.size,modifiedAt:n.mtime}}):[]}cleanupOrphans(t){let e=t??this.config.orphanMaxAgeMs,r=Date.now(),n=0;for(let a of this.listBranchFiles())if(r-a.modifiedAt.getTime()>e&&!this.activeBranches.has(a.agentId))try{s(a.path);let h=`${a.path}.idmap.json`;i(h)&&s(h),n++}catch{}return n}cleanupBranchFile(t){try{t.childAdapter.close()}catch{}try{i(t.childPath)&&s(t.childPath);let e=`${t.childPath}.idmap.json`;i(e)&&s(e)}catch{}}};export{g as AgentMemoryBranch};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.8");process.exit(0)}
|
|
2
|
+
import{a,b,c,d,e,f}from"./chunk-7PHNHFZI.js";import"./chunk-SSURIMCL.js";import"./chunk-6A4FEIE2.js";import"./chunk-66DCG6RO.js";import"./chunk-ZCKNGICX.js";import"./chunk-P2H5ARHM.js";import"./chunk-UGJNR52C.js";import"./chunk-LOANEFGZ.js";import"./chunk-NCXVOOA7.js";import"./chunk-WJDOOT2M.js";import"./chunk-TN72MXLI.js";import"./chunk-3WOQMFTD.js";import"./chunk-X66IXWSO.js";import"./chunk-BZB5D4BO.js";import"./chunk-LFEBTWFS.js";import"./chunk-OT4JADWW.js";import"./chunk-CG3HIYF4.js";import"./chunk-VVNR4R22.js";import"./chunk-R2LWLZ3Y.js";import"./chunk-PG7CZ6Q4.js";import"./chunk-IP2Z4Z6X.js";import"./chunk-2V5VKOJ2.js";import"./chunk-HYACMUUR.js";import"./chunk-YOKRSFGA.js";import"./chunk-IHJXFWUL.js";import"./chunk-6DBYVKGA.js";import"./chunk-XVXSQOQG.js";import"./chunk-KJZU3E5G.js";import"./chunk-MVW7AACO.js";import"./chunk-TZMKO6PC.js";import"./chunk-E4D36LGH.js";export{b as AQELearningEngine,a as DEFAULT_ENGINE_CONFIG,c as DEFAULT_META_LEARNING_CONFIG,d as MetaLearningEngine,e as createAQELearningEngine,f as createDefaultLearningEngine};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{f as s,o as p}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.8");process.exit(0)}
|
|
2
|
+
import{f as s,o as p}from"./chunk-BZB5D4BO.js";import"./chunk-LFEBTWFS.js";import{d as c,e as u,f as h,g as m}from"./chunk-WXEDVKJS.js";import"./chunk-OT4JADWW.js";import"./chunk-CG3HIYF4.js";import"./chunk-VVNR4R22.js";import"./chunk-PG7CZ6Q4.js";import"./chunk-2V5VKOJ2.js";import{p as l,q as d}from"./chunk-HYACMUUR.js";import"./chunk-YOKRSFGA.js";import"./chunk-IHJXFWUL.js";import"./chunk-6DBYVKGA.js";import"./chunk-XVXSQOQG.js";import"./chunk-KJZU3E5G.js";import"./chunk-MVW7AACO.js";import"./chunk-TZMKO6PC.js";import{g as f}from"./chunk-E4D36LGH.js";import{Command as g}from"commander";import a from"chalk";p();import{existsSync as y}from"node:fs";import b from"node:path";function C(n,i){let t=[];t.push(a.bold("Witness Chain Audit Verification")),t.push("");let e=i?a.green("ENABLED"):a.yellow("DISABLED");t.push(` Feature Flag: ${e}`),t.push(` Chain Length: ${n.length} receipts`);let r=n.valid?a.green("VALID"):a.red("BROKEN");return t.push(` Integrity: ${r}`),n.length>0&&t.push(` Last Hash: ${n.lastHash.slice(0,16)}...`),!n.valid&&n.brokenAt>=0&&(t.push(""),t.push(a.red(` Break detected at index ${n.brokenAt}`)),t.push(a.red(` ${n.message}`))),t.push(""),t.join(`
|
|
3
3
|
`)}function x(){try{let n=s(),i=b.join(n,".agentic-qe","memory.db");if(!y(i))return null;let t=(d(),f(l)),e=new t(i),r=c(e),o=h(r);return e.close(),o}catch{return null}}async function A(n){let i=m(),e=(x()??u()).verifyChain(),r={featureEnabled:i,chainLength:e.length,integrity:e.valid,brokenAt:e.brokenAt,lastHash:e.lastHash,message:e.message};return n.format==="json"?console.log(JSON.stringify(r,null,2)):console.log(C(e,i)),r}function v(n,i,t){let e=new g("audit").description("Witness chain audit trail management");return e.command("verify").description("Verify witness chain integrity").option("-F, --format <format>","Output format (json|text)","text").action(async r=>{try{await A({format:r.format}),await i(0)}catch(o){console.error("Failed to verify witness chain:",o),await i(1)}}),e}export{v as createAuditCommand,C as formatVerificationText,A as handleAuditVerify};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.8");process.exit(0)}
|
|
2
|
+
import{a,b,c,d,e,f}from"./chunk-Q5PARJC6.js";import"./chunk-TDPHLQ2M.js";import"./chunk-BZB5D4BO.js";import"./chunk-LFEBTWFS.js";import"./chunk-OT4JADWW.js";import"./chunk-CG3HIYF4.js";import"./chunk-VVNR4R22.js";import"./chunk-PG7CZ6Q4.js";import"./chunk-IP2Z4Z6X.js";import"./chunk-2V5VKOJ2.js";import"./chunk-HYACMUUR.js";import"./chunk-YOKRSFGA.js";import"./chunk-IHJXFWUL.js";import"./chunk-6DBYVKGA.js";import"./chunk-XVXSQOQG.js";import"./chunk-KJZU3E5G.js";import"./chunk-MVW7AACO.js";import"./chunk-TZMKO6PC.js";import"./chunk-E4D36LGH.js";export{f as MCPToolBase,e as defaultToolLogger,d as getMemoryBackend,b as getSharedMemoryBackend,a as registerRvfResetFn,c as resetSharedMemoryBackend};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,q as p}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.8");process.exit(0)}
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,q as p}from"./chunk-HYACMUUR.js";import"./chunk-E4D36LGH.js";p();export{i as DotProductAttention,h as FlashAttention,k as HyperbolicAttention,l as LinearAttention,m as MoEAttention,j as MultiHeadAttention,b as RuvectorLayer,n as SonaEngine,c as TensorCompress,a as default,d as differentiableSearch,f as getCompressionLevel,e as hierarchicalForward,g as init,o as pipeline};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a as $,b as M,c as L,d as v,e as H,f as k,g as F,h as _,i as P,j as G,k as V,l as ce,m as q,n as Q,o as de,p as Y,q as j,r as W,s as U}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.8");process.exit(0)}
|
|
2
|
+
import{a as $,b as M,c as L,d as v,e as H,f as k,g as F,h as _,i as P,j as G,k as V,l as ce,m as q,n as Q,o as de,p as Y,q as j,r as W,s as U}from"./chunk-WUCWFDBE.js";import{h as ae}from"./chunk-TN72MXLI.js";import{a as se,b as ie,c as le,d as O,f as Ne}from"./chunk-3WOQMFTD.js";import"./chunk-BZB5D4BO.js";import"./chunk-LFEBTWFS.js";import"./chunk-OT4JADWW.js";import"./chunk-CG3HIYF4.js";import{b as N,d as Be}from"./chunk-VVNR4R22.js";import"./chunk-PG7CZ6Q4.js";import{a as S,b as Ie}from"./chunk-2V5VKOJ2.js";import"./chunk-HYACMUUR.js";import"./chunk-YOKRSFGA.js";import"./chunk-IHJXFWUL.js";import"./chunk-6DBYVKGA.js";import"./chunk-XVXSQOQG.js";import"./chunk-KJZU3E5G.js";import"./chunk-MVW7AACO.js";import"./chunk-TZMKO6PC.js";import"./chunk-E4D36LGH.js";import T from"path";import r from"chalk";Ie();Be();import{existsSync as z,mkdirSync as Oe,writeFileSync as ke,readFileSync as X}from"fs";import{join as E,resolve as Z}from"path";var qe={rl_q_values:"includeQValues",dream_insights:"includeDreamInsights",dream_cycles:"includeDreamInsights",witness_chain:"includeWitnessChain",vectors:"includeVectors"};function Te(n,t){let o=qe[n.tableName];return!(o&&t[o]===!1)}var Ae=1e4;function De(n,t,o,e){if(!Te(t,o))return Q(E(e,t.fileName),[]),{count:0,rows:[]};let[s,i]=t.domainColumn?q(o.domains,t.domainColumn):[void 0,[]];if(G(n,t.tableName,s,i)>=Ae){let d=t.blobColumns,f=d&&d.length>0?p=>k(p,d):void 0;return{count:de(E(e,t.fileName),ce(n,t.tableName,s,i),f)}}let a=V(n,t.tableName,s,i);return t.blobColumns&&t.blobColumns.length>0&&(a=a.map(d=>k(d,t.blobColumns))),Q(E(e,t.fileName),a),{count:a.length,rows:a}}function me(n){let t=[];for(let o of v){let e=E(n,o.fileName);z(e)?t.push(_(X(e,"utf-8"))):t.push(_(""))}return _(t.join(":"))}function fe(n,t,o="memory.db"){let e=Z(t.outputPath);z(e)||Oe(e,{recursive:!0});let s=0,i={},c=new Set;for(let u of v){let p=De(n,u,t,e);if(i[u.tableName]=p.count,s+=p.count,u.tableName==="qe_patterns"){if(p.rows)for(let l of p.rows)l.qe_domain&&c.add(l.qe_domain);else if(p.count>0){let[l,h]=u.domainColumn?q(t.domains,u.domainColumn):[void 0,[]],b=`SELECT DISTINCT qe_domain FROM qe_patterns ${l?`WHERE ${l} AND qe_domain IS NOT NULL`:"WHERE qe_domain IS NOT NULL"}`;try{let y=n.prepare(b).all(...h||[]);for(let R of y)c.add(R.qe_domain)}catch{}}}}let a=t.includeVectors!==!1?G(n,"vectors"):0,d=me(e),f={version:"3.0",exportedAt:new Date().toISOString(),sourceDb:o,stats:{patternCount:i.qe_patterns||0,vectorCount:a,qValueCount:i.rl_q_values||0,dreamInsightCount:i.dream_insights||0,witnessChainLength:i.witness_chain||0,totalRecords:s},domains:[...c].sort(),checksum:d,tableRecordCounts:i};return ke(E(e,"manifest.json"),JSON.stringify(f,null,2),"utf-8"),f}var $e=new Set(["qe_patterns","rl_q_values","dream_insights","witness_chain"]);function Me(n){return n==="1.0"?v.filter(t=>$e.has(t.tableName)):n==="3.0"?v:(console.warn(`[brain-import] Unknown manifest version '${n}'. Attempting full import \u2014 some files may be missing.`),v)}function ue(n,t,o){let e=Z(t),s=E(e,"manifest.json");if(!z(s))throw new Error(`Manifest not found at ${s}`);let i=N(X(s,"utf-8")),c=me(e);if(c!==i.checksum)throw new Error(`Checksum mismatch: expected ${i.checksum}, got ${c}. The export may have been tampered with or corrupted.`);let a=Me(i.version);if(o.dryRun){let l=0;for(let h of a){let m=Y(E(e,h.fileName),N);l+=m.length}return{imported:l,skipped:0,conflicts:0}}U(n);let d=0,f=0,u=0;return n.transaction(()=>{for(let l of a){let h=E(e,l.fileName),m=Y(h,N);l.blobColumns&&l.blobColumns.length>0&&(m=m.map(b=>F(b,l.blobColumns)));for(let b of m){let y;if(l.dedupColumns&&l.dedupColumns.length>0)y=W(n,l.tableName,b,l.dedupColumns);else{let R=$[l.tableName]||"id",C=L[l.tableName],x=M[l.tableName];y=j(n,l.tableName,b,R,o.mergeStrategy,C,x)}d+=y.imported,f+=y.skipped,u+=y.conflicts}}})(),{imported:d,skipped:f,conflicts:u}}function pe(n){let t=Z(n),o=E(t,"manifest.json");if(!z(o))throw new Error(`Manifest not found at ${o}`);return N(X(o,"utf-8"))}Ne();import{existsSync as K,statSync as Le,unlinkSync as ge,writeFileSync as Fe}from"fs";import{resolve as ee}from"path";function be(n,t,o="memory.db"){if(!O())throw new Error("@ruvector/rvf-node is not available. Install it or use --format jsonl instead.");let e=ee(t.outputPath),s=t.dimension??384;K(e)&&ge(e);let i=`${e}.idmap.json`;K(i)&&ge(i);let c=se(e,s);try{let a={},d=new Set,f=0;for(let w of v){let[g,oe]=w.domainColumn?q(t.domains,w.domainColumn):[void 0,[]],B=V(n,w.tableName,g,oe);if(w.tableName==="qe_patterns")for(let D of B)D.qe_domain&&d.add(D.qe_domain);let J=H[w.tableName];J&&J.length>0&&(B=B.map(D=>k(D,J))),a[w.tableName]=B,f+=B.length}let u=0,p=[];if(P(n,"qe_pattern_embeddings")){let w=n.prepare("SELECT pattern_id, embedding, dimension FROM qe_pattern_embeddings").all();for(let g of w)g.embedding&&g.dimension===s&&p.push({id:`pe:${g.pattern_id}`,vector:new Float32Array(g.embedding.buffer,g.embedding.byteOffset,s),metadata:{tableName:"qe_pattern_embeddings"}})}if(P(n,"captured_experiences")){let w=n.prepare("SELECT id, embedding, embedding_dimension, domain, quality FROM captured_experiences WHERE embedding IS NOT NULL").all();for(let g of w)g.embedding_dimension===s&&p.push({id:`exp:${g.id}`,vector:new Float32Array(g.embedding.buffer,g.embedding.byteOffset,s),metadata:{tableName:"captured_experiences",domain:g.domain,confidence:g.quality}})}if(P(n,"sona_patterns")){let w=n.prepare("SELECT id, state_embedding, domain, confidence FROM sona_patterns WHERE state_embedding IS NOT NULL").all();for(let g of w)g.state_embedding.byteLength/4===s&&p.push({id:`sona:${g.id}`,vector:new Float32Array(g.state_embedding.buffer,g.state_embedding.byteOffset,s),metadata:{tableName:"sona_patterns",domain:g.domain,confidence:g.confidence}})}p.length>0&&(u=c.ingest(p).accepted);let l={version:"3.0",format:"rvf",exportedAt:new Date().toISOString(),sourceDb:o,domains:[...d].sort(),tables:a},h=JSON.stringify(l),m=_(h),b=Buffer.from(h);c.embedKernel(b);let y=t.sign?c.sign(b)??void 0:void 0,R=y?t.signerKeyId??"default":void 0,C=c.fileId(),x=C?{fileId:C,parentId:c.parentId(),lineageDepth:c.lineageDepth()}:void 0,I=c.status(),A={version:"3.0",format:"rvf",exportedAt:l.exportedAt,sourceDb:o,stats:{patternCount:(a.qe_patterns||[]).length,embeddingCount:u,qValueCount:(a.rl_q_values||[]).length,dreamInsightCount:(a.dream_insights||[]).length,witnessChainLength:(a.witness_chain||[]).length,totalRecords:f},domains:l.domains,checksum:m,rvfStatus:{totalVectors:I.totalVectors,totalSegments:I.totalSegments,fileSizeBytes:I.fileSizeBytes},...y?{signature:y,signerKeyId:R}:{},...x?{lineage:x}:{}};if(y)try{c.freeze()}catch{}let Se=`${e}.manifest.json`;return Fe(Se,JSON.stringify(A,null,2),"utf-8"),A}finally{c.close()}}var Pe={patterns:"qe_patterns",qValues:"rl_q_values",dreamInsights:"dream_insights",witnessChain:"witness_chain"};function ye(n,t,o){if(!O())throw new Error("@ruvector/rvf-node is not available. Install it or use JSONL format.");let e=ee(t);if(!K(e))throw new Error(`RVF file not found: ${e}`);let s=ie(e);try{let i=s.verifyWitness();if(!i.valid&&(i.totalEntries>0||i.errors.length>0)){let m=i.errors.length>0?i.errors.join("; "):"unknown integrity error";throw new Error(`RVF witness verification failed: ${m}`)}let c=s.extractKernel();if(!c||!c.image)throw new Error("No brain data found in RVF file (missing kernel segment)");let a;try{a=JSON.parse(c.image.toString("utf-8"))}catch(m){throw new Error(`Failed to parse brain kernel data as JSON: ${m instanceof Error?m.message:m}`)}if(o.dryRun){let m=0;if(a.tables)for(let b of Object.values(a.tables))m+=b?.length??0;else m=(a.patterns?.length??0)+(a.qValues?.length??0)+(a.dreamInsights?.length??0)+(a.witnessChain?.length??0);return{imported:m,skipped:0,conflicts:0,embeddingsRestored:0}}U(n);let d=0,f=0,u=0,p=0,l={};if(a.tables)Object.assign(l,a.tables);else for(let[m,b]of Object.entries(Pe)){let y=a[m];Array.isArray(y)&&(l[b]=y)}if(n.transaction(()=>{for(let m of v){let b=l[m.tableName];if(!b||!Array.isArray(b))continue;let y=H[m.tableName];if(y&&y.length>0){b=b.map(R=>F(R,y));for(let R of b)for(let C of y)R[C]instanceof Buffer&&p++}for(let R of b){let C;if(m.dedupColumns&&m.dedupColumns.length>0)C=W(n,m.tableName,R,m.dedupColumns);else{let x=$[m.tableName]||"id",I=L[m.tableName],A=M[m.tableName];C=j(n,m.tableName,R,x,o.mergeStrategy,I,A)}d+=C.imported,f+=C.skipped,u+=C.conflicts}}})(),u>0)try{s.compact()}catch{}return{imported:d,skipped:f,conflicts:u,embeddingsRestored:p}}finally{s.close()}}function he(n){if(!O())throw new Error("@ruvector/rvf-node is not available.");let t=ee(n);if(!K(t))throw new Error(`RVF file not found: ${t}`);let o=le(t);try{let e=o.extractKernel();if(!e||!e.image)throw new Error("No brain data found in RVF file");let s=e.image.toString("utf-8"),i;try{i=JSON.parse(s)}catch(h){throw new Error(`Failed to parse brain kernel data as JSON: ${h instanceof Error?h.message:h}`)}let c=o.status(),a=Le(t).size,d=i.tables,f=d?d.qe_patterns?.length??0:i.patterns?.length??0,u=d?d.rl_q_values?.length??0:i.qValues?.length??0,p=d?d.dream_insights?.length??0:i.dreamInsights?.length??0,l=d?d.witness_chain?.length??0:i.witnessChain?.length??0;return{version:"3.0",format:"rvf",exportedAt:i.exportedAt??"unknown",sourceDb:i.sourceDb??"unknown",stats:{patternCount:f,embeddingCount:c.totalVectors,qValueCount:u,dreamInsightCount:p,witnessChainLength:l},domains:i.domains??[],checksum:_(s),rvfStatus:{totalVectors:c.totalVectors,totalSegments:c.totalSegments,fileSizeBytes:a}}}finally{o.close()}}function te(){return O()}function we(n,t){if(!n.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='qe_patterns'").get())return{created:0,skipped:0};n.exec(`
|
|
3
3
|
CREATE TEMP TABLE IF NOT EXISTS _covered_patterns (
|
|
4
4
|
pattern_id TEXT PRIMARY KEY
|
|
5
5
|
)
|
|
@@ -65,4 +65,4 @@ Examples:
|
|
|
65
65
|
aqe brain import -i .agentic-qe/brain.rvf --strategy latest-wins
|
|
66
66
|
aqe brain import -i .agentic-qe/brain.rvf --dry-run
|
|
67
67
|
aqe brain info -i .agentic-qe/brain.rvf
|
|
68
|
-
`}};async function ne(n){if(n)return n;let{findProjectRoot:t}=await import("./unified-memory-
|
|
68
|
+
`}};async function ne(n){if(n)return n;let{findProjectRoot:t}=await import("./unified-memory-KSBLUZT4.js");return T.join(t(),".agentic-qe","memory.db")}function xe(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/(1024*1024)).toFixed(1)} MB`}function lt(n,t){return new re(n,t)}export{re as BrainHandler,lt as createBrainHandler};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.8");process.exit(0)}
|
|
2
|
+
import"./chunk-E4D36LGH.js";var f=class{language;constructor(e="typescript"){this.language=e}enumerate(e,s){let r=[],n=e.split(`
|
|
3
3
|
`),l=!1;for(let i=0;i<n.length;i++){let d=n[i],t=d.trim(),c=i+1,u=d.length-d.trimStart().length+1;if(l){t.includes("*/")&&(l=!1);continue}if(t.startsWith("/*")){l=!t.includes("*/");continue}if(t.startsWith("//"))continue;if(/^\s*if\s*\(/.test(d)&&(this.findMatchingElse(n,i)||r.push({file:s,line:c,column:u,language:this.language,construct:"if-without-else",triggerCondition:"when condition is false",currentHandling:"falls through \u2014 no else branch",suggestedGuard:"Add else branch or document why falsy path is safe",severity:"medium"})),/^\s*switch\s*\(/.test(d)){let a=this.extractBlock(n,i);if(a&&!a.includes("default:")&&!a.includes("default :")&&r.push({file:s,line:c,column:u,language:this.language,construct:"switch-no-default",triggerCondition:"when value matches no case",currentHandling:"falls through \u2014 no default case",suggestedGuard:"Add default case with error handling or exhaustive check",severity:"high"}),a){let g=a.match(/case\s+[^:]+:/g)||[],h=a.match(/\b(break|return|throw|continue)\b/g)||[];g.length>0&&h.length<g.length&&r.push({file:s,line:c,column:u,language:this.language,construct:"switch-missing-break",triggerCondition:"when case falls through to next case",currentHandling:"fall-through \u2014 may execute unintended cases",suggestedGuard:"Add break/return to each case or add explicit // falls through comment",severity:"medium"})}}if(/\bcatch\s*\(/.test(t)||/\bcatch\s*\{/.test(t)){let a=this.extractBlock(n,i);if(a!==null){let g=a.replace(/[{}]/g,"").trim();(g.length===0||/^\s*\/\//.test(g))&&r.push({file:s,line:c,column:u,language:this.language,construct:"try-empty-catch",triggerCondition:"when exception is thrown",currentHandling:"exception silently swallowed",suggestedGuard:"Log the error or rethrow with context",severity:"high"})}}if(/\btry\s*\{/.test(t)&&this.extractBlock(n,i)&&(n.slice(i,Math.min(i+30,n.length)).join(`
|
|
4
4
|
`).includes("finally")||r.push({file:s,line:c,column:u,language:this.language,construct:"try-no-finally",triggerCondition:"when cleanup is needed regardless of success/failure",currentHandling:"no finally block \u2014 cleanup may be skipped on exception",suggestedGuard:"Add finally block for resource cleanup if applicable",severity:"low"})),t.includes("?.")){let a=t.match(/(\w+(?:\.\w+)*)\?\./g)||[];for(let g of a)if(!t.includes("??")&&!t.includes("|| ")&&!t.includes("if")){r.push({file:s,line:c,column:u,language:this.language,construct:"optional-chaining-null-path",triggerCondition:`when ${g.replace("?.","")} is null/undefined`,currentHandling:"returns undefined \u2014 may propagate",suggestedGuard:"Add ?? fallback or explicit null check",severity:"low"});break}}if(t.includes("??")&&!t.includes("?.")&&r.push({file:s,line:c,column:u,language:this.language,construct:"nullish-coalescing-fallback",triggerCondition:"when left side is null/undefined",currentHandling:"uses fallback value",suggestedGuard:"Verify fallback value is appropriate for all null cases",severity:"low"}),/\.\s*then\s*\(/.test(t)&&!t.includes(".catch")&&!t.includes("await")){let a=n.slice(i,Math.min(i+5,n.length)).join(" ");!a.includes(".catch")&&!a.includes("try")&&r.push({file:s,line:c,column:u,language:this.language,construct:"promise-no-catch",triggerCondition:"when promise rejects",currentHandling:"unhandled rejection \u2014 may crash process",suggestedGuard:"Add .catch() handler or use try/catch with await",severity:"high"})}let p=["map","filter","reduce","forEach","find","some","every","flatMap"];for(let a of p)if(new RegExp(`\\.${a}\\s*\\(`).test(t)){let h=n.slice(Math.max(0,i-3),i).join(" ");if(!h.includes(".length")&&!h.includes("if (")&&!h.includes("?.")){r.push({file:s,line:c,column:u,language:this.language,construct:"array-callback-empty",triggerCondition:`when array is empty before .${a}()`,currentHandling:a==="reduce"?"may throw without initial value":"returns empty result \u2014 may cause downstream issues",suggestedGuard:a==="reduce"?"Provide initial value or check array length":"Check array length or handle empty result",severity:a==="reduce"?"high":"low"});break}}/\|\|\s*['"`\d]/.test(t)&&!t.includes("??")&&r.push({file:s,line:c,column:u,language:this.language,construct:"logical-or-falsy",triggerCondition:'when left side is falsy (0, "", false, null, undefined)',currentHandling:'uses fallback \u2014 may unintentionally override 0, "", or false',suggestedGuard:"Use ?? instead of || if only null/undefined should trigger fallback",severity:"medium"}),/&&\s*\w+\s*\(/.test(t)&&!t.includes("if")&&!t.includes("while")&&r.push({file:s,line:c,column:u,language:this.language,construct:"logical-and-short-circuit",triggerCondition:"when left side is falsy \u2014 right side never executes",currentHandling:"short-circuits \u2014 function call skipped silently",suggestedGuard:"Use explicit if-statement for clarity when side effects matter",severity:"low"}),(t.match(/\?/g)||[]).length>=2&&t.includes(":")&&r.push({file:s,line:c,column:u,language:this.language,construct:"ternary-complex",triggerCondition:"when nested ternary conditions interact",currentHandling:"nested ternary \u2014 hard to read and maintain",suggestedGuard:"Refactor to if/else or switch for readability",severity:"medium"}),(/\btypeof\s+\w+\s*===?\s*['"]/.test(t)||/\binstanceof\b/.test(t))&&!t.includes("else")&&!this.findMatchingElse(n,i)&&r.push({file:s,line:c,column:u,language:this.language,construct:"type-guard-unhandled",triggerCondition:"when value does not match the guarded type",currentHandling:"unguarded type path \u2014 may cause runtime type errors",suggestedGuard:"Add else branch or exhaustive type checking",severity:"medium"})}return r}findMatchingElse(e,s){let r={depth:0};for(let n=s;n<Math.min(s+30,e.length);n++){let l=e[n];for(let i of l)i==="{"&&r.depth++,i==="}"&&r.depth--;if(r.depth===0&&n>s){if((e[n+1]?.trim()||"").startsWith("else")||e[n].trim().endsWith("else")||e[n].trim().endsWith("else {")||e[n].includes("} else"))return!0;break}}return!1}extractBlock(e,s){let r=0,n=!1,l=[];for(let i=s;i<Math.min(s+50,e.length);i++){let d=e[i];for(let t of d)t==="{"&&(r++,n=!0),t==="}"&&r--;if(n&&(l.push(d),r===0))return l.join(`
|
|
5
5
|
`)}return null}};function y(o,e,s){let r=Date.now(),n=s||(e.endsWith(".ts")||e.endsWith(".tsx")?"typescript":"javascript"),i=new f(n).enumerate(o,e);return{file:e,language:n,branches:i,totalConstructs:i.length,unhandledCount:i.length,duration:Date.now()-r}}function b(o){let e=[];if(e.push(`# Branch Enumeration Report: ${o.file}`),e.push(""),e.push(`**Language**: ${o.language} | **Branches**: ${o.unhandledCount} | **Duration**: ${o.duration}ms`),e.push(""),o.branches.length===0)return e.push("No unhandled branches detected."),e.join(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a as p}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.8");process.exit(0)}
|
|
2
|
+
import{a as p}from"./chunk-AYKMWP7F.js";import"./chunk-E4D36LGH.js";import{readFile as m,readdir as k}from"fs/promises";import{join as c,basename as y}from"path";import{parse as d}from"yaml";var l=class{templatesDir;cache=new Map;constructor(r){this.templatesDir=r||c(__dirname,"templates")}async load(r){if(this.cache.has(r))return this.cache.get(r);try{let e=c(this.templatesDir,`${r}.yaml`),n=await m(e,"utf-8"),o=d(n),i=await this.validate(o);if(!i.valid)throw new Error(`Invalid workflow template ${r}:
|
|
3
3
|
${i.errors.join(`
|
|
4
4
|
`)}`);return this.cache.set(r,o),o}catch(e){throw e.code==="ENOENT"?new Error(`Workflow template not found: ${r}`):e}}async list(){try{return(await k(this.templatesDir)).filter(e=>e.endsWith(".yaml")||e.endsWith(".yml")).map(e=>y(e,e.endsWith(".yaml")?".yaml":".yml")).sort()}catch(r){if(r.code==="ENOENT")return[];throw r}}async validate(r){let e=[],n=[];if(r.name||e.push("Workflow must have a name"),r.version||e.push("Workflow must have a version"),r.description||n.push("Workflow should have a description"),Array.isArray(r.variables)?r.variables.forEach((o,i)=>{o.name||e.push(`Variable at index ${i} must have a name`),o.type||e.push(`Variable ${o.name} must have a type`),o.required===void 0&&n.push(`Variable ${o.name} should specify if it's required`)}):e.push("Workflow must have a variables array"),!Array.isArray(r.steps))e.push("Workflow must have a steps array");else if(r.steps.length===0)e.push("Workflow must have at least one step");else{r.steps.forEach((t,s)=>{t.name||e.push(`Step at index ${s} must have a name`),t.action||e.push(`Step ${t.name||s} must have an action`),(!t.config||typeof t.config!="object")&&e.push(`Step ${t.name||s} must have a config object`),t.assertions&&Array.isArray(t.assertions)&&t.assertions.forEach((f,u)=>{f.condition||e.push(`Assertion ${u} in step ${t.name||s} must have a condition`),f.message||n.push(`Assertion ${u} in step ${t.name||s} should have a message`)})});let o=r.steps.map(t=>t.name),i=o.filter((t,s)=>o.indexOf(t)!==s);i.length>0&&e.push(`Duplicate step names found: ${i.join(", ")}`)}return{valid:e.length===0,errors:e,warnings:n}}async createContext(r,e){let n=await this.load(r),o=n.variables.filter(t=>t.required&&!(t.name in e)).map(t=>t.name);if(o.length>0)throw new Error(`Missing required variables: ${o.join(", ")}`);let i={};return n.variables.forEach(t=>{t.name in e?i[t.name]=e[t.name]:"default"in t&&(i[t.name]=t.default)}),{variables:i,results:new Map,metadata:{startTime:Date.now(),workflow:n.name,templateName:r}}}async getMetadata(r){try{let e=c(this.templatesDir,`${r}.yaml`),n=await m(e,"utf-8"),o=d(n);return{name:o.name,version:o.version,description:o.description}}catch(e){throw e.code==="ENOENT"?new Error(`Workflow template not found: ${r}`):e}}clearCache(){this.cache.clear()}async reload(r){return this.cache.delete(r),this.load(r)}},W=new l;function w(a,r){return a.replace(/\{\{([^}]+)\}\}/g,(e,n)=>{let i=n.trim().split("."),t=r;for(let s of i)if(t&&typeof t=="object"&&s in t)t=t[s];else return e;return t!=null?String(t):e})}function v(a,r){let e={...r.variables,result:r.results.get("__last_result__")},n=w(a,e);return p(n,e,!1)}var g=["login-flow","oauth-flow","scraping-workflow","visual-regression","form-validation","navigation-flow","api-integration","performance-audit","accessibility-audit"],b={"login-flow":"Authentication testing workflow for login forms with credential validation","oauth-flow":"OAuth2/OIDC authentication testing workflow with provider integration","scraping-workflow":"Data extraction workflow for web scraping with pagination and structured output","visual-regression":"Screenshot comparison workflow for visual regression testing across breakpoints","form-validation":"Input validation testing workflow for form fields with error handling","navigation-flow":"Multi-page navigation workflow for testing user journeys and state persistence","api-integration":"Browser-API hybrid testing workflow for validating frontend-backend integration","performance-audit":"Lighthouse-style performance audit workflow with Core Web Vitals","accessibility-audit":"WCAG 2.1 Level AA compliance audit workflow with automated accessibility testing"},h={authentication:["login-flow","oauth-flow"],testing:["form-validation","navigation-flow","api-integration"],quality:["visual-regression","performance-audit","accessibility-audit"],automation:["scraping-workflow"]};function R(a){return h[a]}function S(a){return g.includes(a)}function $(){return g.map(a=>{let r=Object.entries(h).find(([e,n])=>n.includes(a))?.[0]||"other";return{name:a,description:b[a],category:r}})}export{h as WORKFLOW_CATEGORIES,b as WORKFLOW_DESCRIPTIONS,g as WORKFLOW_TEMPLATES,l as WorkflowLoader,W as defaultWorkflowLoader,v as evaluateCondition,$ as getAllWorkflowTemplates,R as getWorkflowsByCategory,w as interpolateVariables,S as isValidWorkflowTemplate};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.8");process.exit(0)}
|
|
2
|
+
import{a}from"./chunk-237NNDKL.js";import"./chunk-Q5PARJC6.js";import"./chunk-TDPHLQ2M.js";import"./chunk-BZB5D4BO.js";import"./chunk-LFEBTWFS.js";import"./chunk-OT4JADWW.js";import"./chunk-CG3HIYF4.js";import"./chunk-VVNR4R22.js";import"./chunk-PG7CZ6Q4.js";import"./chunk-IP2Z4Z6X.js";import"./chunk-2V5VKOJ2.js";import"./chunk-HYACMUUR.js";import"./chunk-YOKRSFGA.js";import"./chunk-IHJXFWUL.js";import"./chunk-6DBYVKGA.js";import"./chunk-XVXSQOQG.js";import"./chunk-KJZU3E5G.js";import"./chunk-MVW7AACO.js";import"./chunk-TZMKO6PC.js";import"./chunk-E4D36LGH.js";export{a as BrowserWorkflowTool};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{f as p}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.8");process.exit(0)}
|
|
2
|
+
import{f as p}from"./chunk-Q5PARJC6.js";import{a as f,c as R}from"./chunk-PG7CZ6Q4.js";R();var u=class extends p{config={name:"qe/workflows/browser-load",description:"Load, validate, and prepare browser automation workflows from inline YAML or built-in templates. Returns the resolved workflow with steps and variable bindings, ready for browser execution. Templates: login-flow, form-validation, visual-regression, oauth-flow, etc.",domain:"test-execution",schema:this.buildSchema()};buildSchema(){return{type:"object",properties:{workflowYaml:{type:"string",description:"Inline YAML workflow definition. Mutually exclusive with templateName."},templateName:{type:"string",description:"Built-in template name to load.",enum:["login-flow","oauth-flow","scraping-workflow","visual-regression","form-validation","navigation-flow","api-integration","performance-audit","accessibility-audit"]},variables:{type:"object",description:'Runtime variable overrides (e.g., { "baseUrl": "https://example.com" })'}}}}async execute(r,C){try{let{WorkflowLoader:n,WORKFLOW_TEMPLATES:g,WORKFLOW_DESCRIPTIONS:v,interpolateVariables:b}=await import("./browser-GZVIYFIB.js"),{parse:k}=await import("yaml"),d=new n,l=[...g],y=v;if(!r.workflowYaml&&!r.templateName)return{success:!0,data:{workflowName:"none",description:"No workflow specified. Use templateName or workflowYaml.",source:"none",templateUsed:null,steps:[],variables:{defined:[],provided:{}},validation:{valid:!0,errors:[],warnings:[]},availableTemplates:l,summary:`Available templates: ${l.join(", ")}`}};let e,i,t=null;r.workflowYaml?(i="inline-yaml",e=k(r.workflowYaml)):(i="template",t=r.templateName,e=await d.load(r.templateName));let a=await d.validate(e),w=(e.steps??[]).map(o=>{let s=o.config;if(r.variables){let c={};for(let[h,m]of Object.entries(s))c[h]=typeof m=="string"?b(m,r.variables):m;s=c}return{name:o.name,action:o.action,config:s,optional:o.optional??!1,assertionCount:o.assertions?.length??0}});return{success:!0,data:{workflowName:e.name||t||"custom",description:e.description||t&&y[t]||"",source:i,templateUsed:t,steps:w,variables:{defined:(e.variables??[]).map(o=>({name:o.name,type:o.type,required:o.required,hasDefault:o.default!==void 0})),provided:r.variables||{}},validation:{valid:a.valid,errors:a.errors,warnings:a.warnings},availableTemplates:l,summary:a.valid?`Workflow "${e.name}" loaded (${i}): ${w.length} steps, ${(e.variables??[]).length} variables`:`Workflow "${e.name}" has validation errors: ${a.errors.join("; ")}`}}}catch(n){return{success:!1,error:f(n)}}}};export{u as a};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a as h}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.8");process.exit(0)}
|
|
2
|
+
import{a as h}from"./chunk-UOSKMAAY.js";import{a as C,f as x}from"./chunk-QVGSD25D.js";var d={mechanical:["convert var to const","add types","remove console","convert to async","convert to esm","arrow function","rename variable","format code"],simple:["fix typo","update comment","fix simple bug","add documentation","format","rename","simple refactor","basic test"],moderate:["implement feature","implement","refactor","complex refactor","performance optimization","optimize","test generation","generate test","error handling","validation logic","api integration","code index","coverage analysis","quality assessment","defect prediction","predict defect","analyze coverage","analyze","assess","scan","detect"],complex:["multi-file refactor","orchestrate","coordinate","large codebase","migration","cross-domain","workflow","system design","analyze security","security scan","security analysis","vulnerability scan","chaos test","resilience test","contract validation"],critical:["architecture","security audit","critical bug","algorithm design","system-wide","vulnerability","cryptography","performance critical","hardcoded secret","cve","owasp","penetration test","exploit"]},f={architecture:/\b(architect|design|system design|overall structure|component design)\b/i,security:/\b(security|vulnerability|audit|xss|sql injection|csrf|encryption|auth|authentication|authorization)\b/i,multiStep:/\b(orchestrate|coordinate|workflow|pipeline|multi[- ]step)\b/i,crossDomain:/\b(cross[- ]domain|across (domains|modules)|integrate|coordination)\b/i},m=class{config;agentBoosterAdapter;constructor(e,t){this.config=e,this.agentBoosterAdapter=t}async collectSignals(e){let t=e.task.toLowerCase(),r=await this.checkAgentBoosterEligibility(e),o={simple:this.findKeywordMatches(t,d.simple),moderate:this.findKeywordMatches(t,d.moderate),complex:this.findKeywordMatches(t,d.complex),critical:this.findKeywordMatches(t,d.critical)},c=e.codeContext?e.codeContext.split(`
|
|
3
3
|
`).length:void 0,n=e.filePaths?e.filePaths.length:void 0,i=f.architecture.test(t),a=f.security.test(t),l=f.multiStep.test(t),g=f.crossDomain.test(t),b=this.detectCreativityRequirement(t),S=this.estimateLanguageComplexity(e.codeContext,e.filePaths),T=e.codeContext?this.estimateCyclomaticComplexity(e.codeContext):void 0;return{linesOfCode:c,fileCount:n,hasArchitectureScope:i,hasSecurityScope:a,requiresMultiStepReasoning:l,requiresCrossDomainCoordination:g,isMechanicalTransform:r.eligible,languageComplexity:S,cyclomaticComplexity:T,dependencyCount:this.countDependencies(e.codeContext),requiresCreativity:b,detectedTransformType:r.transformType,keywordMatches:o}}async checkAgentBoosterEligibility(e){if(!this.config.enableAgentBooster)return{eligible:!1,confidence:0,reason:"Agent Booster is disabled"};let t=e.task.toLowerCase(),r,o=0;for(let n of h){let i=this.getTransformKeywords(n),a=0;for(let l of i)t.includes(l.toLowerCase())&&(a=a===0?.5:a+.25);for(let l of d.mechanical)t.includes(l.toLowerCase())&&(a=Math.max(a,.6));a>o&&(o=a,r=n)}if(e.codeContext&&r&&this.agentBoosterAdapter)try{let i=(await this.agentBoosterAdapter.detectTransformOpportunities(e.codeContext)).opportunities.find(a=>a.type===r);if(i)return{eligible:i.confidence>=this.config.agentBoosterThreshold,transformType:r,confidence:i.confidence,reason:i.reason}}catch(n){console.debug("[SignalCollector] WASM analysis error:",n instanceof Error?n.message:n)}let c=o>=this.config.agentBoosterThreshold&&r!==void 0;return{eligible:c,transformType:r,confidence:Math.min(o,1),reason:c?`Detected ${r} transform pattern`:"No mechanical transform pattern detected"}}findKeywordMatches(e,t){let r=[];for(let o of t)e.includes(o.toLowerCase())&&r.push(o);return r}detectCreativityRequirement(e){return e.includes("design")||e.includes("creative")||e.includes("innovative")||e.includes("novel")}estimateLanguageComplexity(e,t){if(!e&&(!t||t.length===0))return;let r=[".ts",".tsx",".rs",".cpp",".c",".go"],o=[".js",".jsx",".py",".java"],c=[".json",".yaml",".md",".txt",".css",".html"];if(t){for(let n of t)if(r.some(i=>n.endsWith(i)))return"high";for(let n of t)if(o.some(i=>n.endsWith(i)))return"medium";for(let n of t)if(c.some(i=>n.endsWith(i)))return"low"}if(e){let n=/<[A-Z][^>]*>/.test(e),i=/\b(async|await)\b/.test(e),a=/\b(interface|type|class)\b/.test(e);return n&&a?"high":i||a?"medium":"low"}return"medium"}estimateCyclomaticComplexity(e){let t=[/\bif\b/g,/\bfor\b/g,/\bwhile\b/g,/\bcase\b/g,/\bcatch\b/g,/&&/g,/\|\|/g,/\?/g],r=1;for(let o of t){let c=e.match(o);c&&(r+=c.length)}return r}countDependencies(e){if(!e)return;let t=e.match(/\b(import|require|from)\b.*['"].*['"]/g);return t?t.length:0}getTransformKeywords(e){return{"var-to-const":["var to const","convert var","var declaration","var to let","convert var to const","change var to const"],"add-types":["add types","add type","typescript types","type annotations","type annotation","add type annotations"],"remove-console":["remove console","delete console","console.log","remove console.log","strip console"],"promise-to-async":["promise to async","async await",".then to async","convert to async","convert function to async"],"cjs-to-esm":["commonjs to esm","require to import","convert to esm","cjs to esm","module conversion"],"func-to-arrow":["arrow function","function to arrow","convert to arrow","convert function to arrow"]}[e]||[]}};function v(s,e){return new m(s,e)}var u=class{calculateCodeComplexity(e){let t=0;return t+=this.calculateLinesOfCodeContribution(e.linesOfCode),t+=this.calculateFileCountContribution(e.fileCount),t+=this.calculateCyclomaticContribution(e.cyclomaticComplexity),t+=this.calculateLanguageContribution(e.languageComplexity),Math.min(t,100)}calculateReasoningComplexity(e){let t=0;return t+=this.calculateKeywordScore(e.keywordMatches),e.requiresMultiStepReasoning&&(t+=20),e.requiresCreativity&&(t+=20),Math.min(t,100)}calculateScopeComplexity(e){let t=0;return e.hasArchitectureScope&&(t+=40),e.hasSecurityScope&&(t+=30),e.requiresCrossDomainCoordination&&(t+=20),t+=this.calculateDependencyContribution(e.dependencyCount),Math.min(t,100)}calculateOverallComplexity(e,t,r,o){if(o.isMechanicalTransform&&!o.hasSecurityScope&&!o.hasArchitectureScope&&!o.requiresMultiStepReasoning&&!o.requiresCrossDomainCoordination&&e===0&&t===0&&r===0)return 5;let c=e*.3+t*.4+r*.3,n=0;return o.hasSecurityScope&&(n=Math.max(n,50)),o.hasArchitectureScope&&(n=Math.max(n,55)),o.requiresCrossDomainCoordination&&(n=Math.max(n,35)),o.requiresMultiStepReasoning&&(n=Math.max(n,30)),o.keywordMatches.simple.length+o.keywordMatches.moderate.length+o.keywordMatches.complex.length+o.keywordMatches.critical.length===0&&!o.isMechanicalTransform&&c<15&&(n=Math.max(n,15)),Math.min(Math.max(Math.round(c),n),100)}calculateConfidence(e,t){let r=.5;return t.codeContext&&(r+=.2),t.filePaths&&t.filePaths.length>0&&(r+=.1),r+=this.calculateKeywordConfidenceBoost(e.keywordMatches),e.isMechanicalTransform&&(r+=.15),Math.min(r,1)}calculateLinesOfCodeContribution(e){return e===void 0||e<10?0:e<50?10:e<200?20:30}calculateFileCountContribution(e){return e===void 0||e===1?0:e<5?10:20}calculateCyclomaticContribution(e){return e===void 0||e<5?0:e<10?10:e<20?20:30}calculateLanguageContribution(e){return e==="low"?0:e==="medium"?10:e==="high"?20:0}calculateKeywordScore(e){let t=e.simple.length*5+e.moderate.length*15+e.complex.length*25+e.critical.length*35;return Math.min(t,60)}calculateDependencyContribution(e){return e===void 0||e<3?0:e<10?5:10}calculateKeywordConfidenceBoost(e){let t=e.simple.length+e.moderate.length+e.complex.length+e.critical.length;return t>=3?.1:t>=1?.05:0}};function M(){return new u}var p=class{getRecommendedTier(e){for(let t of[0,1,2,3,4]){let[r,o]=C[t].complexityRange;if(e>=r&&e<=o)return t}return 2}findAlternateTiers(e,t){let r=[];return t>0&&r.push(t-1),t<4&&r.push(t+1),t<3&&!r.includes(4)&&r.push(4),r}generateExplanation(e,t,r){let o=[];return o.push(`Complexity score: ${e}/100 (Tier ${t})`),r.isMechanicalTransform&&o.push(this.formatMechanicalTransformInfo(r.detectedTransformType)),o.push(...this.formatScopeExplanations(r)),o.push(...this.formatCodeMetricsExplanations(r)),o.join(". ")}formatMechanicalTransformInfo(e){return`Detected mechanical transform: ${e}`}formatScopeExplanations(e){let t=[];return e.hasArchitectureScope&&t.push("Architecture scope detected"),e.hasSecurityScope&&t.push("Security scope detected"),e.requiresMultiStepReasoning&&t.push("Multi-step reasoning required"),e.requiresCrossDomainCoordination&&t.push("Cross-domain coordination required"),t}formatCodeMetricsExplanations(e){let t=[];return e.linesOfCode!==void 0&&e.linesOfCode>100&&t.push(`Large code change: ${e.linesOfCode} lines`),e.fileCount!==void 0&&e.fileCount>3&&t.push(`Multi-file change: ${e.fileCount} files`),t}};function w(){return new p}var y=class{config;signalCollector;scoreCalculator;tierRecommender;constructor(e,t,r,o){this.config=e,this.signalCollector=t,this.scoreCalculator=r,this.tierRecommender=o}async analyze(e){try{let t=await this.signalCollector.collectSignals(e),r=this.scoreCalculator.calculateCodeComplexity(t),o=this.scoreCalculator.calculateReasoningComplexity(t),c=this.scoreCalculator.calculateScopeComplexity(t),n=this.scoreCalculator.calculateOverallComplexity(r,o,c,t),i=this.tierRecommender.getRecommendedTier(n),a=this.tierRecommender.findAlternateTiers(n,i),l=this.scoreCalculator.calculateConfidence(t,e),g=this.tierRecommender.generateExplanation(n,i,t);return{overall:n,codeComplexity:r,reasoningComplexity:o,scopeComplexity:c,confidence:l,signals:t,recommendedTier:i,alternateTiers:a,explanation:g}}catch(t){throw new x(`Failed to analyze task complexity: ${t instanceof Error?t.message:"Unknown error"}`,t instanceof Error?t:void 0)}}async checkAgentBoosterEligibility(e){return this.signalCollector.checkAgentBoosterEligibility(e)}getRecommendedTier(e){return this.tierRecommender.getRecommendedTier(e)}};function L(s,e){let t=new m(s,e),r=new u,o=new p;return new y(s,t,r,o)}function z(s,e,t,r){return new y(s,e,t,r)}export{m as a,v as b,u as c,M as d,p as e,w as f,y as g,L as h,z as i};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a as A}from"./chunk-D2C4XNF5.js";import{a as z}from"./chunk-7TKZ6LK6.js";import{k as _,n as Q,o as U}from"./chunk-JRHKFRUB.js";import{d as P,e as B}from"./chunk-6OKXGDT3.js";import{b as w,d as K}from"./chunk-WLYSZV5U.js";import{a as p,c as R}from"./chunk-MR7V7QVL.js";import{g as N}from"./chunk-UEFAPTBV.js";U();R();K();B();import{randomUUID as I}from"crypto";var D=P("TokenTracker"),O={costPerInputToken:.003/1e3,costPerOutputToken:.015/1e3},j={filePath:".agentic-qe/token-metrics.json",autoSaveIntervalMs:6e4,maxMetricsInMemory:1e4},S=class c{taskMetrics=[];agentMetrics=new Map;domainMetrics=new Map;sessionId;sessionStartTime;costConfig;cacheHits=0;earlyExits=0;totalTokensSaved=0;totalPatternsReused=0;initialized=!1;persistenceConfig=j;autoSaveTimer=null;isDirty=!1;db=null;kvPersistCount=0;static KV_NAMESPACE="token-usage-metrics";static KV_KEY="token-tracker-snapshot";static KV_TTL=604800;static KV_PERSIST_INTERVAL=10;constructor(){this.sessionId=`session-${Date.now()}-${I().substring(0,8)}`,this.sessionStartTime=Date.now(),this.costConfig=O}initialize(e){this.initialized||(this.initialized=!0,e&&(this.costConfig={...O,...e}),this.initializeDb().catch(t=>{D.warn("DB initialization failed",{error:t instanceof Error?t.message:String(t)})}),this.startAutoSave())}setCostConfig(e){this.costConfig={...this.costConfig,...e}}recordTokenUsage(e,t,n,i,s,o){this.ensureInitialized();let l,u,r,a,m,d;typeof t=="object"?(l="default",u="unknown",r="unknown",a=t,m=!1,d=0):(l=t,u=n??"unknown",r=i??"unknown",a=s,m=o?.patternReused??!1,d=o?.tokensSaved??0),a.estimatedCostUsd===void 0&&(a.estimatedCostUsd=this.calculateCost(a));let h={taskId:e,agentId:l,domain:u,operation:r,timestamp:Date.now(),usage:a,patternReused:m,tokensSaved:d};this.taskMetrics.push(h),this.updateAgentMetrics(l,a,m,d),this.updateDomainMetrics(u,a),m&&this.totalPatternsReused++,d>0&&(this.totalTokensSaved+=d),this.isDirty=!0,this.maybePersistToKv()}recordPatternReuse(e,t){this.ensureInitialized(),this.totalPatternsReused++,this.totalTokensSaved+=t;let n={taskId:e,agentId:"pattern-cache",domain:"optimization",operation:"pattern-reuse",timestamp:Date.now(),usage:{inputTokens:0,outputTokens:0,totalTokens:0,estimatedCostUsd:0},patternReused:!0,tokensSaved:t};this.taskMetrics.push(n),this.isDirty=!0}recordCacheHit(e){this.cacheHits++,this.totalTokensSaved+=e,this.isDirty=!0}recordEarlyExit(e){this.earlyExits++,this.totalTokensSaved+=e,this.isDirty=!0}getSessionSummary(e){this.ensureInitialized();let t=this.filterByTimeframe(this.taskMetrics,e),n=this.aggregateTokenUsage(t),i=new Map;for(let r of t){let a=i.get(r.agentId);a?(a.totalInputTokens+=r.usage.inputTokens,a.totalOutputTokens+=r.usage.outputTokens,a.totalTokens+=r.usage.totalTokens,a.totalCost+=r.usage.estimatedCostUsd||0,a.tasksExecuted++,r.patternReused&&a.patternsReused++,a.estimatedTokensSaved+=r.tokensSaved||0):i.set(r.agentId,{agentId:r.agentId,totalInputTokens:r.usage.inputTokens,totalOutputTokens:r.usage.outputTokens,totalTokens:r.usage.totalTokens,totalCost:r.usage.estimatedCostUsd||0,tasksExecuted:1,patternsReused:r.patternReused?1:0,estimatedTokensSaved:r.tokensSaved||0})}let s=new Map;for(let r of t){let a=s.get(r.domain);a?(a.inputTokens+=r.usage.inputTokens,a.outputTokens+=r.usage.outputTokens,a.totalTokens+=r.usage.totalTokens,a.estimatedCostUsd=(a.estimatedCostUsd||0)+(r.usage.estimatedCostUsd||0)):s.set(r.domain,{...r.usage})}let o=n.totalTokens,l=this.totalTokensSaved,u=o+l>0?l/(o+l)*100:0;return{sessionId:this.sessionId,startTime:this.sessionStartTime,endTime:Date.now(),byAgent:i,byDomain:s,totalUsage:n,optimizationStats:{patternsReused:this.totalPatternsReused,cacheHits:this.cacheHits,earlyExits:this.earlyExits,tokensSaved:this.totalTokensSaved,savingsPercentage:Math.round(u*100)/100}}}getAgentMetrics(e,t){this.ensureInitialized();let n=this.filterByTimeframe(this.taskMetrics,t);if(e){let s=n.filter(o=>o.agentId===e);return this.aggregateAgentMetrics(e,s)}let i=new Map;for(let s of n){let o=i.get(s.agentId)||[];o.push(s),i.set(s.agentId,o)}return Array.from(i.entries()).map(([s,o])=>this.aggregateAgentMetrics(s,o))}getDomainMetrics(e,t){this.ensureInitialized();let n=this.filterByTimeframe(this.taskMetrics,t);if(e){let s=n.filter(o=>o.domain===e);return this.aggregateTokenUsage(s)}let i=new Map;for(let s of n){let o=i.get(s.domain);o?(o.inputTokens+=s.usage.inputTokens,o.outputTokens+=s.usage.outputTokens,o.totalTokens+=s.usage.totalTokens,o.estimatedCostUsd=(o.estimatedCostUsd||0)+(s.usage.estimatedCostUsd||0)):i.set(s.domain,{...s.usage})}return i}getTaskMetrics(e){return this.ensureInitialized(),this.filterByTimeframe(this.taskMetrics,e)}getEfficiencyReport(e){return this.getTokenEfficiency(e)}getTokenEfficiency(e){this.ensureInitialized();let t=this.filterByTimeframe(this.taskMetrics,e),i=this.aggregateTokenUsage(t).totalTokens,s=this.totalTokensSaved,o=i+s>0?s/(i+s)*100:0,l=t.length,u=l>0?t.filter(m=>m.patternReused).length/l:0,r=l>0?i/l:0,a=this.generateRecommendations(t);return{totalTokensUsed:i,totalTokensSaved:s,savingsPercentage:Math.round(o*100)/100,patternReuseRate:Math.round(u*100)/100,averageTokensPerTask:Math.round(r),recommendations:a}}reset(){this.stopAutoSave(),this.taskMetrics=[],this.agentMetrics.clear(),this.domainMetrics.clear(),this.sessionId=`session-${Date.now()}-${I().substring(0,8)}`,this.sessionStartTime=Date.now(),this.cacheHits=0,this.earlyExits=0,this.totalTokensSaved=0,this.totalPatternsReused=0,this.isDirty=!1}configurePersistence(e){this.persistenceConfig={...this.persistenceConfig,...e},e.autoSaveIntervalMs!==void 0&&(this.stopAutoSave(),e.autoSaveIntervalMs>0&&this.startAutoSave())}startAutoSave(){this.autoSaveTimer||this.persistenceConfig.autoSaveIntervalMs>0&&(this.autoSaveTimer=setInterval(()=>{this.isDirty&&this.save().catch(e=>{console.warn("[TokenMetricsCollector] Auto-save failed:",e)})},this.persistenceConfig.autoSaveIntervalMs))}stopAutoSave(){this.autoSaveTimer&&(clearInterval(this.autoSaveTimer),this.autoSaveTimer=null)}async save(){let e=await import("fs"),t=await import("path"),n={version:"1.0.0",sessionId:this.sessionId,sessionStartTime:this.sessionStartTime,taskMetrics:this.taskMetrics.slice(-this.persistenceConfig.maxMetricsInMemory),optimizationStats:{cacheHits:this.cacheHits,earlyExits:this.earlyExits,totalTokensSaved:this.totalTokensSaved,totalPatternsReused:this.totalPatternsReused},lastSavedAt:Date.now()},i=t.resolve(this.persistenceConfig.filePath),s=t.dirname(i);e.existsSync(s)||e.mkdirSync(s,{recursive:!0}),e.writeFileSync(i,JSON.stringify(n,null,2)),this.isDirty=!1}async load(){let e=await import("fs"),n=(await import("path")).resolve(this.persistenceConfig.filePath);if(!e.existsSync(n))return!1;try{let i=e.readFileSync(n,"utf-8"),s=w(i);if(!s.version||!s.version.startsWith("1."))return console.warn("[TokenMetricsCollector] Incompatible data version, skipping load"),!1;let o=s.taskMetrics||[];this.taskMetrics=[...o,...this.taskMetrics],this.cacheHits+=s.optimizationStats?.cacheHits||0,this.earlyExits+=s.optimizationStats?.earlyExits||0,this.totalTokensSaved+=s.optimizationStats?.totalTokensSaved||0,this.totalPatternsReused+=s.optimizationStats?.totalPatternsReused||0;for(let l of o)this.updateAgentMetrics(l.agentId,l.usage,l.patternReused,l.tokensSaved||0),this.updateDomainMetrics(l.domain,l.usage);return this.taskMetrics.length>this.persistenceConfig.maxMetricsInMemory&&(this.taskMetrics=this.taskMetrics.slice(-this.persistenceConfig.maxMetricsInMemory)),!0}catch(i){return console.warn("[TokenMetricsCollector] Failed to load persisted data:",i),!1}}getPersistenceFilePath(){return this.persistenceConfig.filePath}hasUnsavedChanges(){return this.isDirty}async initializeDb(){try{this.db=_(),this.db.isInitialized()||await this.db.initialize(),await this.loadFromKv()}catch(e){console.warn("[TokenMetricsCollector] DB init failed, using memory-only:",p(e)),this.db=null}}async persistToKv(){if(!this.db)return;let e={version:"1.0.0",sessionId:this.sessionId,sessionStartTime:this.sessionStartTime,taskMetrics:this.taskMetrics.slice(-this.persistenceConfig.maxMetricsInMemory),optimizationStats:{cacheHits:this.cacheHits,earlyExits:this.earlyExits,totalTokensSaved:this.totalTokensSaved,totalPatternsReused:this.totalPatternsReused},lastSavedAt:Date.now()};await this.db.kvSet(c.KV_KEY,e,c.KV_NAMESPACE,c.KV_TTL)}async loadFromKv(){if(!this.db)return!1;let e=await this.db.kvGet(c.KV_KEY,c.KV_NAMESPACE);if(!e)return!1;if(!e.version||!e.version.startsWith("1."))return console.warn("[TokenMetricsCollector] Incompatible kv_store data version, skipping load"),!1;let t=e.taskMetrics||[];this.taskMetrics=[...t,...this.taskMetrics],this.cacheHits+=e.optimizationStats?.cacheHits||0,this.earlyExits+=e.optimizationStats?.earlyExits||0,this.totalTokensSaved+=e.optimizationStats?.totalTokensSaved||0,this.totalPatternsReused+=e.optimizationStats?.totalPatternsReused||0;for(let n of t)this.updateAgentMetrics(n.agentId,n.usage,n.patternReused,n.tokensSaved||0),this.updateDomainMetrics(n.domain,n.usage);return this.taskMetrics.length>this.persistenceConfig.maxMetricsInMemory&&(this.taskMetrics=this.taskMetrics.slice(-this.persistenceConfig.maxMetricsInMemory)),!0}maybePersistToKv(){this.kvPersistCount++,this.kvPersistCount>=c.KV_PERSIST_INTERVAL&&(this.kvPersistCount=0,this.persistToKv().catch(e=>{D.warn("KV persist failed",{error:e instanceof Error?e.message:String(e)})}))}ensureInitialized(){this.initialized||this.initialize()}calculateCost(e){let t=e.inputTokens*this.costConfig.costPerInputToken,n=e.outputTokens*this.costConfig.costPerOutputToken;return Math.round((t+n)*1e5)/1e5}filterByTimeframe(e,t){if(!t)return e;let n=Date.now(),i;switch(t){case"1h":i=n-3600*1e3;break;case"24h":i=n-1440*60*1e3;break;case"7d":i=n-10080*60*1e3;break;case"30d":i=n-720*60*60*1e3;break;default:return e}return e.filter(s=>s.timestamp>=i)}aggregateTokenUsage(e){let t=0,n=0,i=0,s=0;for(let o of e)t+=o.usage.inputTokens,n+=o.usage.outputTokens,i+=o.usage.totalTokens,s+=o.usage.estimatedCostUsd||0;return{inputTokens:t,outputTokens:n,totalTokens:i,estimatedCostUsd:Math.round(s*1e5)/1e5}}aggregateAgentMetrics(e,t){let n=0,i=0,s=0,o=0,l=0,u=0;for(let r of t)n+=r.usage.inputTokens,i+=r.usage.outputTokens,s+=r.usage.totalTokens,o+=r.usage.estimatedCostUsd||0,r.patternReused&&l++,u+=r.tokensSaved||0;return{agentId:e,totalInputTokens:n,totalOutputTokens:i,totalTokens:s,totalCost:Math.round(o*1e5)/1e5,tasksExecuted:t.length,patternsReused:l,estimatedTokensSaved:u}}updateAgentMetrics(e,t,n,i){let s=this.agentMetrics.get(e);s?(s.totalInputTokens+=t.inputTokens,s.totalOutputTokens+=t.outputTokens,s.totalTokens+=t.totalTokens,s.totalCost+=t.estimatedCostUsd||0,s.tasksExecuted++,n&&s.patternsReused++,s.estimatedTokensSaved+=i):this.agentMetrics.set(e,{agentId:e,totalInputTokens:t.inputTokens,totalOutputTokens:t.outputTokens,totalTokens:t.totalTokens,totalCost:t.estimatedCostUsd||0,tasksExecuted:1,patternsReused:n?1:0,estimatedTokensSaved:i})}updateDomainMetrics(e,t){let n=this.domainMetrics.get(e);n?(n.inputTokens+=t.inputTokens,n.outputTokens+=t.outputTokens,n.totalTokens+=t.totalTokens,n.estimatedCostUsd=(n.estimatedCostUsd||0)+(t.estimatedCostUsd||0)):this.domainMetrics.set(e,{...t})}generateRecommendations(e){let t=[];if(e.length===0)return["No token usage data available yet. Start executing tasks to track consumption."];let n=e.filter(r=>r.patternReused).length/e.length;n<.2?t.push("Low pattern reuse rate detected. Consider enabling pattern caching for similar tasks."):n>.5&&t.push("Good pattern reuse rate. Continue leveraging cached patterns for token savings.");let i=new Map;for(let r of e){let a=i.get(r.domain)||0;i.set(r.domain,a+r.usage.totalTokens)}let s=Array.from(i.entries()).sort((r,a)=>a[1]-r[1]);if(s.length>0){let r=s[0];t.push(`Highest token consumer: ${r[0]} (${r[1].toLocaleString()} tokens). Consider optimizing prompts or increasing caching.`)}let o=e.reduce((r,a)=>r+a.usage.inputTokens,0);return e.reduce((r,a)=>r+a.usage.outputTokens,0)/(o||1)>2&&t.push("High output-to-input token ratio. Consider requesting more concise responses."),this.cacheHits===0&&e.length>10&&t.push("No cache hits detected. Enable response caching to reduce duplicate API calls."),this.earlyExits===0&&e.length>20&&t.push("Early exit optimization not utilized. Enable high-confidence pattern matching to skip unnecessary LLM calls."),t}};function F(c){return c.toLocaleString("en-US")}function $(c){if(process.env.AQE_TOKEN_DASHBOARD_ENABLED==="false")return"Token dashboard disabled (AQE_TOKEN_DASHBOARD_ENABLED=false)";if(!c){let u=g.getSessionSummary(),r=u.totalUsage.totalTokens,a=u.totalUsage.estimatedCostUsd??0,m=u.optimizationStats.tokensSaved,d=r>0?a/r:0,h=m*d;c={totalTokens:r,totalCostUsd:a,savedTokens:m,savedCostUsd:h}}let e=c.totalTokens??0,t=c.totalCostUsd??0,n=c.savedTokens??0,i=c.savedCostUsd??0,s=c.budgetLimitUsd;if(e===0&&n===0)return"Token Dashboard: No data available";let o=`Token Usage: ${F(e)} tokens ($${t.toFixed(2)})`;n>0&&(o+=` | Saved: ${F(n)} tokens ($${i.toFixed(2)}) via pattern reuse`);let l=[];if(s!==void 0&&s>0){let u=Math.round(t/s*100);l.push(`Budget: $${t.toFixed(2)} / $${s.toFixed(2)} (${u}%)`)}if(c.tierSplit&&Object.keys(c.tierSplit).length>0){let u=Object.entries(c.tierSplit).sort((r,a)=>a[1]-r[1]).map(([r,a])=>`${r} ${a}%`);l.push(`Tier split: ${u.join(" | ")}`)}return l.length===0?o:`${o}
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.8");process.exit(0)}
|
|
2
|
+
import{a as A}from"./chunk-66DCG6RO.js";import{a as z}from"./chunk-UGJNR52C.js";import{k as _,n as Q,o as U}from"./chunk-BZB5D4BO.js";import{d as P,e as B}from"./chunk-CG3HIYF4.js";import{b as w,d as K}from"./chunk-VVNR4R22.js";import{a as p,c as R}from"./chunk-PG7CZ6Q4.js";import{g as N}from"./chunk-E4D36LGH.js";U();R();K();B();import{randomUUID as I}from"crypto";var D=P("TokenTracker"),O={costPerInputToken:.003/1e3,costPerOutputToken:.015/1e3},j={filePath:".agentic-qe/token-metrics.json",autoSaveIntervalMs:6e4,maxMetricsInMemory:1e4},S=class c{taskMetrics=[];agentMetrics=new Map;domainMetrics=new Map;sessionId;sessionStartTime;costConfig;cacheHits=0;earlyExits=0;totalTokensSaved=0;totalPatternsReused=0;initialized=!1;persistenceConfig=j;autoSaveTimer=null;isDirty=!1;db=null;kvPersistCount=0;static KV_NAMESPACE="token-usage-metrics";static KV_KEY="token-tracker-snapshot";static KV_TTL=604800;static KV_PERSIST_INTERVAL=10;constructor(){this.sessionId=`session-${Date.now()}-${I().substring(0,8)}`,this.sessionStartTime=Date.now(),this.costConfig=O}initialize(e){this.initialized||(this.initialized=!0,e&&(this.costConfig={...O,...e}),this.initializeDb().catch(t=>{D.warn("DB initialization failed",{error:t instanceof Error?t.message:String(t)})}),this.startAutoSave())}setCostConfig(e){this.costConfig={...this.costConfig,...e}}recordTokenUsage(e,t,n,i,s,o){this.ensureInitialized();let l,u,r,a,m,d;typeof t=="object"?(l="default",u="unknown",r="unknown",a=t,m=!1,d=0):(l=t,u=n??"unknown",r=i??"unknown",a=s,m=o?.patternReused??!1,d=o?.tokensSaved??0),a.estimatedCostUsd===void 0&&(a.estimatedCostUsd=this.calculateCost(a));let h={taskId:e,agentId:l,domain:u,operation:r,timestamp:Date.now(),usage:a,patternReused:m,tokensSaved:d};this.taskMetrics.push(h),this.updateAgentMetrics(l,a,m,d),this.updateDomainMetrics(u,a),m&&this.totalPatternsReused++,d>0&&(this.totalTokensSaved+=d),this.isDirty=!0,this.maybePersistToKv()}recordPatternReuse(e,t){this.ensureInitialized(),this.totalPatternsReused++,this.totalTokensSaved+=t;let n={taskId:e,agentId:"pattern-cache",domain:"optimization",operation:"pattern-reuse",timestamp:Date.now(),usage:{inputTokens:0,outputTokens:0,totalTokens:0,estimatedCostUsd:0},patternReused:!0,tokensSaved:t};this.taskMetrics.push(n),this.isDirty=!0}recordCacheHit(e){this.cacheHits++,this.totalTokensSaved+=e,this.isDirty=!0}recordEarlyExit(e){this.earlyExits++,this.totalTokensSaved+=e,this.isDirty=!0}getSessionSummary(e){this.ensureInitialized();let t=this.filterByTimeframe(this.taskMetrics,e),n=this.aggregateTokenUsage(t),i=new Map;for(let r of t){let a=i.get(r.agentId);a?(a.totalInputTokens+=r.usage.inputTokens,a.totalOutputTokens+=r.usage.outputTokens,a.totalTokens+=r.usage.totalTokens,a.totalCost+=r.usage.estimatedCostUsd||0,a.tasksExecuted++,r.patternReused&&a.patternsReused++,a.estimatedTokensSaved+=r.tokensSaved||0):i.set(r.agentId,{agentId:r.agentId,totalInputTokens:r.usage.inputTokens,totalOutputTokens:r.usage.outputTokens,totalTokens:r.usage.totalTokens,totalCost:r.usage.estimatedCostUsd||0,tasksExecuted:1,patternsReused:r.patternReused?1:0,estimatedTokensSaved:r.tokensSaved||0})}let s=new Map;for(let r of t){let a=s.get(r.domain);a?(a.inputTokens+=r.usage.inputTokens,a.outputTokens+=r.usage.outputTokens,a.totalTokens+=r.usage.totalTokens,a.estimatedCostUsd=(a.estimatedCostUsd||0)+(r.usage.estimatedCostUsd||0)):s.set(r.domain,{...r.usage})}let o=n.totalTokens,l=this.totalTokensSaved,u=o+l>0?l/(o+l)*100:0;return{sessionId:this.sessionId,startTime:this.sessionStartTime,endTime:Date.now(),byAgent:i,byDomain:s,totalUsage:n,optimizationStats:{patternsReused:this.totalPatternsReused,cacheHits:this.cacheHits,earlyExits:this.earlyExits,tokensSaved:this.totalTokensSaved,savingsPercentage:Math.round(u*100)/100}}}getAgentMetrics(e,t){this.ensureInitialized();let n=this.filterByTimeframe(this.taskMetrics,t);if(e){let s=n.filter(o=>o.agentId===e);return this.aggregateAgentMetrics(e,s)}let i=new Map;for(let s of n){let o=i.get(s.agentId)||[];o.push(s),i.set(s.agentId,o)}return Array.from(i.entries()).map(([s,o])=>this.aggregateAgentMetrics(s,o))}getDomainMetrics(e,t){this.ensureInitialized();let n=this.filterByTimeframe(this.taskMetrics,t);if(e){let s=n.filter(o=>o.domain===e);return this.aggregateTokenUsage(s)}let i=new Map;for(let s of n){let o=i.get(s.domain);o?(o.inputTokens+=s.usage.inputTokens,o.outputTokens+=s.usage.outputTokens,o.totalTokens+=s.usage.totalTokens,o.estimatedCostUsd=(o.estimatedCostUsd||0)+(s.usage.estimatedCostUsd||0)):i.set(s.domain,{...s.usage})}return i}getTaskMetrics(e){return this.ensureInitialized(),this.filterByTimeframe(this.taskMetrics,e)}getEfficiencyReport(e){return this.getTokenEfficiency(e)}getTokenEfficiency(e){this.ensureInitialized();let t=this.filterByTimeframe(this.taskMetrics,e),i=this.aggregateTokenUsage(t).totalTokens,s=this.totalTokensSaved,o=i+s>0?s/(i+s)*100:0,l=t.length,u=l>0?t.filter(m=>m.patternReused).length/l:0,r=l>0?i/l:0,a=this.generateRecommendations(t);return{totalTokensUsed:i,totalTokensSaved:s,savingsPercentage:Math.round(o*100)/100,patternReuseRate:Math.round(u*100)/100,averageTokensPerTask:Math.round(r),recommendations:a}}reset(){this.stopAutoSave(),this.taskMetrics=[],this.agentMetrics.clear(),this.domainMetrics.clear(),this.sessionId=`session-${Date.now()}-${I().substring(0,8)}`,this.sessionStartTime=Date.now(),this.cacheHits=0,this.earlyExits=0,this.totalTokensSaved=0,this.totalPatternsReused=0,this.isDirty=!1}configurePersistence(e){this.persistenceConfig={...this.persistenceConfig,...e},e.autoSaveIntervalMs!==void 0&&(this.stopAutoSave(),e.autoSaveIntervalMs>0&&this.startAutoSave())}startAutoSave(){this.autoSaveTimer||this.persistenceConfig.autoSaveIntervalMs>0&&(this.autoSaveTimer=setInterval(()=>{this.isDirty&&this.save().catch(e=>{console.warn("[TokenMetricsCollector] Auto-save failed:",e)})},this.persistenceConfig.autoSaveIntervalMs))}stopAutoSave(){this.autoSaveTimer&&(clearInterval(this.autoSaveTimer),this.autoSaveTimer=null)}async save(){let e=await import("fs"),t=await import("path"),n={version:"1.0.0",sessionId:this.sessionId,sessionStartTime:this.sessionStartTime,taskMetrics:this.taskMetrics.slice(-this.persistenceConfig.maxMetricsInMemory),optimizationStats:{cacheHits:this.cacheHits,earlyExits:this.earlyExits,totalTokensSaved:this.totalTokensSaved,totalPatternsReused:this.totalPatternsReused},lastSavedAt:Date.now()},i=t.resolve(this.persistenceConfig.filePath),s=t.dirname(i);e.existsSync(s)||e.mkdirSync(s,{recursive:!0}),e.writeFileSync(i,JSON.stringify(n,null,2)),this.isDirty=!1}async load(){let e=await import("fs"),n=(await import("path")).resolve(this.persistenceConfig.filePath);if(!e.existsSync(n))return!1;try{let i=e.readFileSync(n,"utf-8"),s=w(i);if(!s.version||!s.version.startsWith("1."))return console.warn("[TokenMetricsCollector] Incompatible data version, skipping load"),!1;let o=s.taskMetrics||[];this.taskMetrics=[...o,...this.taskMetrics],this.cacheHits+=s.optimizationStats?.cacheHits||0,this.earlyExits+=s.optimizationStats?.earlyExits||0,this.totalTokensSaved+=s.optimizationStats?.totalTokensSaved||0,this.totalPatternsReused+=s.optimizationStats?.totalPatternsReused||0;for(let l of o)this.updateAgentMetrics(l.agentId,l.usage,l.patternReused,l.tokensSaved||0),this.updateDomainMetrics(l.domain,l.usage);return this.taskMetrics.length>this.persistenceConfig.maxMetricsInMemory&&(this.taskMetrics=this.taskMetrics.slice(-this.persistenceConfig.maxMetricsInMemory)),!0}catch(i){return console.warn("[TokenMetricsCollector] Failed to load persisted data:",i),!1}}getPersistenceFilePath(){return this.persistenceConfig.filePath}hasUnsavedChanges(){return this.isDirty}async initializeDb(){try{this.db=_(),this.db.isInitialized()||await this.db.initialize(),await this.loadFromKv()}catch(e){console.warn("[TokenMetricsCollector] DB init failed, using memory-only:",p(e)),this.db=null}}async persistToKv(){if(!this.db)return;let e={version:"1.0.0",sessionId:this.sessionId,sessionStartTime:this.sessionStartTime,taskMetrics:this.taskMetrics.slice(-this.persistenceConfig.maxMetricsInMemory),optimizationStats:{cacheHits:this.cacheHits,earlyExits:this.earlyExits,totalTokensSaved:this.totalTokensSaved,totalPatternsReused:this.totalPatternsReused},lastSavedAt:Date.now()};await this.db.kvSet(c.KV_KEY,e,c.KV_NAMESPACE,c.KV_TTL)}async loadFromKv(){if(!this.db)return!1;let e=await this.db.kvGet(c.KV_KEY,c.KV_NAMESPACE);if(!e)return!1;if(!e.version||!e.version.startsWith("1."))return console.warn("[TokenMetricsCollector] Incompatible kv_store data version, skipping load"),!1;let t=e.taskMetrics||[];this.taskMetrics=[...t,...this.taskMetrics],this.cacheHits+=e.optimizationStats?.cacheHits||0,this.earlyExits+=e.optimizationStats?.earlyExits||0,this.totalTokensSaved+=e.optimizationStats?.totalTokensSaved||0,this.totalPatternsReused+=e.optimizationStats?.totalPatternsReused||0;for(let n of t)this.updateAgentMetrics(n.agentId,n.usage,n.patternReused,n.tokensSaved||0),this.updateDomainMetrics(n.domain,n.usage);return this.taskMetrics.length>this.persistenceConfig.maxMetricsInMemory&&(this.taskMetrics=this.taskMetrics.slice(-this.persistenceConfig.maxMetricsInMemory)),!0}maybePersistToKv(){this.kvPersistCount++,this.kvPersistCount>=c.KV_PERSIST_INTERVAL&&(this.kvPersistCount=0,this.persistToKv().catch(e=>{D.warn("KV persist failed",{error:e instanceof Error?e.message:String(e)})}))}ensureInitialized(){this.initialized||this.initialize()}calculateCost(e){let t=e.inputTokens*this.costConfig.costPerInputToken,n=e.outputTokens*this.costConfig.costPerOutputToken;return Math.round((t+n)*1e5)/1e5}filterByTimeframe(e,t){if(!t)return e;let n=Date.now(),i;switch(t){case"1h":i=n-3600*1e3;break;case"24h":i=n-1440*60*1e3;break;case"7d":i=n-10080*60*1e3;break;case"30d":i=n-720*60*60*1e3;break;default:return e}return e.filter(s=>s.timestamp>=i)}aggregateTokenUsage(e){let t=0,n=0,i=0,s=0;for(let o of e)t+=o.usage.inputTokens,n+=o.usage.outputTokens,i+=o.usage.totalTokens,s+=o.usage.estimatedCostUsd||0;return{inputTokens:t,outputTokens:n,totalTokens:i,estimatedCostUsd:Math.round(s*1e5)/1e5}}aggregateAgentMetrics(e,t){let n=0,i=0,s=0,o=0,l=0,u=0;for(let r of t)n+=r.usage.inputTokens,i+=r.usage.outputTokens,s+=r.usage.totalTokens,o+=r.usage.estimatedCostUsd||0,r.patternReused&&l++,u+=r.tokensSaved||0;return{agentId:e,totalInputTokens:n,totalOutputTokens:i,totalTokens:s,totalCost:Math.round(o*1e5)/1e5,tasksExecuted:t.length,patternsReused:l,estimatedTokensSaved:u}}updateAgentMetrics(e,t,n,i){let s=this.agentMetrics.get(e);s?(s.totalInputTokens+=t.inputTokens,s.totalOutputTokens+=t.outputTokens,s.totalTokens+=t.totalTokens,s.totalCost+=t.estimatedCostUsd||0,s.tasksExecuted++,n&&s.patternsReused++,s.estimatedTokensSaved+=i):this.agentMetrics.set(e,{agentId:e,totalInputTokens:t.inputTokens,totalOutputTokens:t.outputTokens,totalTokens:t.totalTokens,totalCost:t.estimatedCostUsd||0,tasksExecuted:1,patternsReused:n?1:0,estimatedTokensSaved:i})}updateDomainMetrics(e,t){let n=this.domainMetrics.get(e);n?(n.inputTokens+=t.inputTokens,n.outputTokens+=t.outputTokens,n.totalTokens+=t.totalTokens,n.estimatedCostUsd=(n.estimatedCostUsd||0)+(t.estimatedCostUsd||0)):this.domainMetrics.set(e,{...t})}generateRecommendations(e){let t=[];if(e.length===0)return["No token usage data available yet. Start executing tasks to track consumption."];let n=e.filter(r=>r.patternReused).length/e.length;n<.2?t.push("Low pattern reuse rate detected. Consider enabling pattern caching for similar tasks."):n>.5&&t.push("Good pattern reuse rate. Continue leveraging cached patterns for token savings.");let i=new Map;for(let r of e){let a=i.get(r.domain)||0;i.set(r.domain,a+r.usage.totalTokens)}let s=Array.from(i.entries()).sort((r,a)=>a[1]-r[1]);if(s.length>0){let r=s[0];t.push(`Highest token consumer: ${r[0]} (${r[1].toLocaleString()} tokens). Consider optimizing prompts or increasing caching.`)}let o=e.reduce((r,a)=>r+a.usage.inputTokens,0);return e.reduce((r,a)=>r+a.usage.outputTokens,0)/(o||1)>2&&t.push("High output-to-input token ratio. Consider requesting more concise responses."),this.cacheHits===0&&e.length>10&&t.push("No cache hits detected. Enable response caching to reduce duplicate API calls."),this.earlyExits===0&&e.length>20&&t.push("Early exit optimization not utilized. Enable high-confidence pattern matching to skip unnecessary LLM calls."),t}};function F(c){return c.toLocaleString("en-US")}function $(c){if(process.env.AQE_TOKEN_DASHBOARD_ENABLED==="false")return"Token dashboard disabled (AQE_TOKEN_DASHBOARD_ENABLED=false)";if(!c){let u=g.getSessionSummary(),r=u.totalUsage.totalTokens,a=u.totalUsage.estimatedCostUsd??0,m=u.optimizationStats.tokensSaved,d=r>0?a/r:0,h=m*d;c={totalTokens:r,totalCostUsd:a,savedTokens:m,savedCostUsd:h}}let e=c.totalTokens??0,t=c.totalCostUsd??0,n=c.savedTokens??0,i=c.savedCostUsd??0,s=c.budgetLimitUsd;if(e===0&&n===0)return"Token Dashboard: No data available";let o=`Token Usage: ${F(e)} tokens ($${t.toFixed(2)})`;n>0&&(o+=` | Saved: ${F(n)} tokens ($${i.toFixed(2)}) via pattern reuse`);let l=[];if(s!==void 0&&s>0){let u=Math.round(t/s*100);l.push(`Budget: $${t.toFixed(2)} / $${s.toFixed(2)} (${u}%)`)}if(c.tierSplit&&Object.keys(c.tierSplit).length>0){let u=Object.entries(c.tierSplit).sort((r,a)=>a[1]-r[1]).map(([r,a])=>`${r} ${a}%`);l.push(`Tier split: ${u.join(" | ")}`)}return l.length===0?o:`${o}
|
|
3
3
|
${l.join(" | ")}`}var g=new S;function te(c){return`$${c.toFixed(2)}`}import{createHash as V}from"crypto";var G={enabled:!0,maxEntries:500,ttlMs:3600*1e3,persistToDb:!0};function E(c){if(c==null||typeof c!="object")return JSON.stringify(c);if(Array.isArray(c))return"["+c.map(i=>E(i)).join(",")+"]";let e=c;return"{"+Object.keys(e).sort().map(i=>JSON.stringify(i)+":"+E(e[i])).join(",")+"}"}var b=class{cache=new Map;config;hits=0;misses=0;constructor(e){this.config={...G,...e}}computeFingerprint(e,t,n){let i=E({action:t,domain:e,input:n});return V("sha256").update(i).digest("hex").slice(0,16)}get(e){if(!this.config.enabled)return null;let t=this.cache.get(e);return t?Date.now()-t.cachedAt>this.config.ttlMs?(this.cache.delete(e),this.misses++,null):(t.hitCount++,t.lastHitAt=Date.now(),this.hits++,t):(this.misses++,null)}set(e,t,n,i,s){if(!this.config.enabled)return;this.cache.size>=this.config.maxEntries&&this.evictOldest();let o={fingerprint:e,domain:t,action:n,result:i,tokensSaved:s,cachedAt:Date.now(),hitCount:0,lastHitAt:0};this.cache.set(e,o),this.config.persistToDb&&this.persistEntry(o)}loadFromDb(){try{let e=H();if(!e)return;let t=Date.now()-this.config.ttlMs,n=e.prepare(`SELECT key, value FROM kv_store
|
|
4
4
|
WHERE namespace = 'session_cache'
|
|
5
5
|
AND created_at > ?
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a as x,c as N}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.8");process.exit(0)}
|
|
2
|
+
import{a as x,c as N}from"./chunk-PG7CZ6Q4.js";import{b as w,c as P,d as O}from"./chunk-IHJXFWUL.js";N();O();import*as k from"fs";import*as T from"path";import*as L from"yaml";var D=5,F=4,U=3e4,W=".claude/skills",G=5e3,$=500,A=100,V=1e3,I=500,H=.8,Q=.2,K=.1,v=.1,q=.1,B=.1,z=.1,X=200,j=500,Y=300,J=1,Z=.9,M={maxWorkers:D,batchSize:F,retryFailedTests:!0,timeout:U,skillsDir:W,progressIntervalMs:G},R=class{async execute(e,s,t){let r=P(A,$+A);return await new Promise(i=>setTimeout(i,r)),{output:this.generateMockResponse(e),tokensUsed:w(I,V+I),durationMs:r}}generateMockResponse(e){let s=[];return e.includes("alt")&&s.push("alt","1.1.1","perceivable"),e.includes("contrast")&&s.push("contrast","1.4.3","4.5:1"),e.includes("keyboard")&&s.push("keyboard","2.1.1","operable","button"),e.includes("label")&&s.push("label","3.3.2","understandable"),e.includes("ARIA")&&s.push("ARIA","4.1.2","robust"),e.includes("focus")&&s.push("focus","2.4.7","outline"),e.includes("lang")&&s.push("lang","3.1.1","language"),e.includes("caption")&&s.push("caption","1.2.2","track"),e.includes("accessible")&&s.push("accessible","compliant"),s.length===0&&s.push("accessibility","WCAG","finding"),`Analysis complete. Found issues related to: ${s.join(", ")}.
|
|
3
3
|
Recommendations: Implement proper ${s[0]} attributes for better accessibility.
|
|
4
4
|
Severity: ${e.includes("critical")?"critical":"serious"}`}},y=class{constructor(e,s,t){this.executor=s;this.config=t;this.id=e}id;status="idle";tasksCompleted=0;tasksFailed=0;lastHeartbeat=Date.now();async executeBatch(e){this.status="running";let s=[];for(let t of e){this.lastHeartbeat=Date.now();try{let r=await this.executeTestCase(t);if(s.push(r),r.passed)this.tasksCompleted++;else if(this.tasksFailed++,this.config.retryFailedTests&&!r.passed){let a=await this.executeTestCase(t,!0);a.passed&&(s[s.length-1]=a,this.tasksCompleted++,this.tasksFailed--)}}catch(r){this.tasksFailed++,s.push({testId:t.testCaseId,passed:!1,expectedPatterns:t.testCase.expected_output.must_contain||[],actualPatterns:[],reasoningQuality:0,category:t.testCase.category,priority:t.testCase.priority,error:x(r)})}}return this.status="idle",s}async executeTestCase(e,s=!1){let t=Date.now(),r=this.buildPrompt(e),a=await this.executor.execute(r,e.model,{timeout:this.config.timeout}),i=this.validateResponse(a.output,e.testCase.expected_output,e.testCase.validation);return{testId:e.testCaseId,passed:i.passed,expectedPatterns:e.testCase.expected_output.must_contain||[],actualPatterns:i.foundPatterns,reasoningQuality:i.reasoningQuality,executionTimeMs:Date.now()-t,category:e.testCase.category,priority:e.testCase.priority,error:i.error}}buildPrompt(e){let{testCase:s}=e,t=s.input.context;return`Analyze the following ${t.language||"HTML"} code for accessibility issues.
|
|
5
5
|
Context: ${t.description||s.description}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a as t,q as r}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.8");process.exit(0)}
|
|
2
|
+
import{a as t,q as r}from"./chunk-HYACMUUR.js";import{c as l}from"./chunk-E4D36LGH.js";function m(s,e){let o=e?.readonly??!1,n=e?.fileMustExist??!1,i=e?.busyTimeout??5e3,b=e?.walMode??!o,a=new t(s,{readonly:o,fileMustExist:n});return a.pragma(`busy_timeout = ${i}`),b&&a.pragma("journal_mode = WAL"),a}var u=l(()=>{r()});export{m as a,u as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{c as b,e as v,g as T}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.8");process.exit(0)}
|
|
2
|
+
import{c as b,e as v,g as T}from"./chunk-E4D36LGH.js";var y={};v(y,{DotProductAttention:()=>z,FlashAttention:()=>k,HyperbolicAttention:()=>W,LinearAttention:()=>j,MoEAttention:()=>K,MultiHeadAttention:()=>F,RuvectorLayer:()=>_,SonaEngine:()=>q,TensorCompress:()=>E,default:()=>O,differentiableSearch:()=>L,getCompressionLevel:()=>B,hierarchicalForward:()=>V,init:()=>D,pipeline:()=>J});import{createRequire as A}from"module";var I,g,O,_,E,L,V,B,D,k,z,F,W,j,K,q,J,S=b(()=>{I=A(import.meta.url),g=I("@ruvector/rvf-node"),O=g,{RuvectorLayer:_,TensorCompress:E,differentiableSearch:L,hierarchicalForward:V,getCompressionLevel:B,init:D,FlashAttention:k,DotProductAttention:z,MultiHeadAttention:F,HyperbolicAttention:W,LinearAttention:j,MoEAttention:K,SonaEngine:q,pipeline:J}=g||{}});var Z={};v(Z,{createRvfStore:()=>Q,isRvfNativeAvailable:()=>Y,openRvfStore:()=>U,openRvfStoreReadonly:()=>X});import{readFileSync as C,writeFileSync as H,copyFileSync as $,existsSync as G}from"fs";function l(){if(R)return f;R=!0;try{let i=(S(),T(y));!i.RvfDatabase&&i.default&&i.default.RvfDatabase&&(i=i.default),f=i}catch{f=null}return f}function w(i){return`${i}.idmap.json`}function N(i){let e=w(i),t=new Map,n=new Map,s=1;if(G(e))try{let r=JSON.parse(C(e,"utf-8"));s=r.nextLabel;for(let[a,m]of r.entries)t.set(a,m),n.set(m,a)}catch{}return{strToNum:t,numToStr:n,nextLabel:s}}function h(i,e,t){let n={nextLabel:t,entries:Array.from(e.entries())};H(w(i),JSON.stringify(n),"utf-8")}function Q(i,e){let t=l();if(!t)throw new Error("@ruvector/rvf-node is not available \u2014 install the package or check platform compatibility");let n=t.RvfDatabase.create(i,{dimension:e}),s=n.dimension();return new d(n,i,s,new Map,new Map,1)}function U(i){let e=l();if(!e)throw new Error("@ruvector/rvf-node is not available \u2014 install the package or check platform compatibility");let t=e.RvfDatabase.open(i),n=t.dimension(),{strToNum:s,numToStr:r,nextLabel:a}=N(i);return new d(t,i,n,s,r,a)}function X(i){let e=l();if(!e)throw new Error("@ruvector/rvf-node is not available \u2014 install the package or check platform compatibility");let t=e.RvfDatabase.openReadonly(i),n=t.dimension(),{strToNum:s,numToStr:r,nextLabel:a}=N(i);return new d(t,i,n,s,r,a)}function Y(){return l()!==null}var f,R,d,P=b(()=>{f=null,R=!1;d=class i{db;_path;_dimension;strToNum;numToStr;nextLabel;_open;constructor(e,t,n,s,r,a){this.db=e,this._path=t,this._dimension=n,this.strToNum=s,this.numToStr=r,this.nextLabel=a,this._open=!0}ingest(e){if(this.ensureOpen(),e.length===0)return{accepted:0,rejected:0};let t=this._dimension,n=new Float32Array(e.length*t),s=[],r=[];for(let o=0;o<e.length;o++){let{id:u,vector:p,metadata:x}=e[o],c=this.strToNum.get(u);c===void 0&&(c=this.nextLabel++,this.strToNum.set(u,c),this.numToStr.set(c,u)),s.push(c),r.push(x);let M=p instanceof Float32Array?p:new Float32Array(p);n.set(M.subarray(0,t),o*t)}let a;if(r.some(o=>o!==void 0)&&typeof this.db.ingestBatchWithMetadata=="function"){let o=r.map(u=>u?JSON.stringify(u):"");a=this.db.ingestBatchWithMetadata(n,s,o)}else a=this.db.ingestBatch(n,s);return this.persistIdMap(),{accepted:a.accepted,rejected:a.rejected}}search(e,t){this.ensureOpen();let n=e instanceof Float32Array?e:new Float32Array(e);return this.db.query(n,t).map(r=>{let a=this.numToStr.get(r.id);return a===void 0?null:{id:a,distance:r.distance,score:1/(1+r.distance)}}).filter(r=>r!==null)}delete(e){this.ensureOpen();let t=[];for(let s of e){let r=this.strToNum.get(s);r!==void 0&&t.push(r)}if(t.length===0)return 0;let n=this.db.delete(t);for(let s of e){let r=this.strToNum.get(s);r!==void 0&&(this.strToNum.delete(s),this.numToStr.delete(r))}return this.persistIdMap(),n.deleted}fork(e){this.ensureOpen(),$(this._path,e);let t=new Map(this.strToNum),n=new Map(this.numToStr);h(e,t,this.nextLabel);let r=l().RvfDatabase.open(e);return new i(r,e,this._dimension,t,n,this.nextLabel)}status(){this.ensureOpen();let e=this.db.status(),n=this.db.segments().filter(s=>s.segType==="witness");return{totalVectors:e.totalVectors,totalSegments:e.totalSegments,fileSizeBytes:e.fileSize,epoch:e.currentEpoch,witnessValid:n.length>0,witnessEntries:n.length}}dimension(){return this._dimension}size(){return this.ensureOpen(),this.db.status().totalVectors}compact(){this.ensureOpen(),this.db.compact()}close(){this._open&&(this.db.close(),this._open=!1)}isOpen(){return this._open}path(){return this._path}embedKernel(e){return this.ensureOpen(),this.db.embedKernel(0,99,0,e,0,"")}extractKernel(){return this.ensureOpen(),this.db.extractKernel()}verifyWitness(){this.ensureOpen();let e=this.tryNative("verifyWitness");return e?{valid:e.valid??!0,totalEntries:e.totalEntries??0,errors:Array.isArray(e.errors)?e.errors:[]}:{valid:!0,totalEntries:0,errors:[]}}sign(e){this.ensureOpen();let t=this.tryNative("sign",e);return typeof t=="string"?t:null}fileId(){this.ensureOpen();let e=this.tryNative("fileId");return typeof e=="string"?e:null}parentId(){this.ensureOpen();let e=this.tryNative("parentId");return typeof e=="string"?e:null}lineageDepth(){this.ensureOpen();let e=this.tryNative("lineageDepth");return typeof e=="number"?e:0}indexStats(){let e=this.status();return{totalVectors:e.totalVectors,dimension:this._dimension,totalSegments:e.totalSegments,fileSizeBytes:e.fileSizeBytes,epoch:e.epoch,witnessValid:e.witnessValid,witnessEntries:e.witnessEntries,idMapSize:this.strToNum.size}}freeze(){this.ensureOpen();let e=this.tryNative("freeze");return typeof e=="number"?e:0}derive(e){this.ensureOpen();let t=l();if(typeof this.db.derive=="function")try{let n=this.db.derive(e),s=new Map(this.strToNum),r=new Map(this.numToStr);return h(e,s,this.nextLabel),new i(n,e,this._dimension,s,r,this.nextLabel)}catch{}return this.fork(e)}ensureOpen(){if(!this._open)throw new Error("RVF database is closed")}tryNative(e,...t){if(typeof this.db[e]!="function")return null;try{return this.db[e](...t)}catch{return null}}persistIdMap(){h(this._path,this.strToNum,this.nextLabel)}}});export{Q as a,U as b,X as c,Y as d,Z as e,P as f};
|