agentic-qe 3.10.2 → 3.10.4

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.
Files changed (418) hide show
  1. package/.claude/skills/release/SKILL.md +10 -10
  2. package/.claude/skills/skills-manifest.json +1 -1
  3. package/CHANGELOG.md +88 -0
  4. package/assets/grammars/tree-sitter-c_sharp.wasm +0 -0
  5. package/assets/grammars/tree-sitter-java.wasm +0 -0
  6. package/assets/grammars/tree-sitter-javascript.wasm +0 -0
  7. package/assets/grammars/tree-sitter-python.wasm +0 -0
  8. package/assets/grammars/tree-sitter-rust.wasm +0 -0
  9. package/assets/grammars/tree-sitter-swift.wasm +0 -0
  10. package/assets/grammars/tree-sitter-tsx.wasm +0 -0
  11. package/assets/grammars/tree-sitter-typescript.wasm +0 -0
  12. package/assets/skills/skills-manifest.json +1 -1
  13. package/dist/agents/claim-verifier/claim-verifier-service.js +4 -2
  14. package/dist/agents/claim-verifier/verifiers/test-verifier.js +31 -23
  15. package/dist/agents/devils-advocate/agent.js +1 -1
  16. package/dist/cli/bundle.js +5 -5
  17. package/dist/cli/chunks/adapter-A62ETL5C.js +2 -0
  18. package/dist/cli/chunks/{agent-booster-wasm-DHSIPFTH.js → agent-booster-wasm-EJPDSWON.js} +2 -2
  19. package/dist/cli/chunks/{agent-handler-FPQVHGGT.js → agent-handler-2DZB7LGI.js} +2 -2
  20. package/dist/cli/chunks/{agent-memory-branch-OLOF5ZHV.js → agent-memory-branch-SSFYAVIK.js} +2 -2
  21. package/dist/cli/chunks/aqe-learning-engine-MTCRAV6N.js +2 -0
  22. package/dist/cli/chunks/audit-42XG5JFB.js +3 -0
  23. package/dist/cli/chunks/base-KKEBUHZC.js +2 -0
  24. package/dist/cli/chunks/{hnswlib-node-ZGSUMHDC.js → better-sqlite3-PX5JM3DG.js} +2 -2
  25. package/dist/cli/chunks/{brain-handler-ROZUHCOT.js → brain-handler-LFHX2TYP.js} +3 -3
  26. package/dist/cli/chunks/{branch-enumerator-VK7G4NKJ.js → branch-enumerator-AX7DKGV7.js} +2 -2
  27. package/dist/cli/chunks/{browser-Q2S75M2F.js → browser-4NYLZ7FA.js} +2 -2
  28. package/dist/cli/chunks/browser-workflow-XHYAJUB6.js +2 -0
  29. package/dist/cli/chunks/{chunk-XPCNUX2U.js → chunk-2B6ETC7C.js} +2 -2
  30. package/dist/cli/chunks/{chunk-YI6GNRQM.js → chunk-2G2PVVQG.js} +2 -2
  31. package/dist/cli/chunks/{chunk-2244IFZA.js → chunk-2L5VFVCG.js} +1 -1
  32. package/dist/cli/chunks/{chunk-EVCOCGVJ.js → chunk-2TYO4VZH.js} +4 -4
  33. package/dist/cli/chunks/{chunk-U3EUH6LX.js → chunk-3ISX5B77.js} +2 -2
  34. package/dist/cli/chunks/{chunk-WZJUMJ2S.js → chunk-3UGUX34A.js} +1 -1
  35. package/dist/cli/chunks/{chunk-6ZFHIKQG.js → chunk-4BX72XG4.js} +3 -3
  36. package/dist/cli/chunks/{chunk-UUFOHMUG.js → chunk-4FTLYIMW.js} +2 -2
  37. package/dist/cli/chunks/{chunk-XDU624HU.js → chunk-5FNNCVXR.js} +1 -1
  38. package/dist/cli/chunks/{chunk-7Z46RDDV.js → chunk-5Q3L4QEE.js} +3 -3
  39. package/dist/cli/chunks/{chunk-AH7FXNFE.js → chunk-5T2HDET6.js} +3 -3
  40. package/dist/cli/chunks/{chunk-24LUQICS.js → chunk-5T4J3IPG.js} +2 -2
  41. package/dist/cli/chunks/{chunk-HHCYSAH3.js → chunk-6OLHPWSN.js} +2 -2
  42. package/dist/cli/chunks/{chunk-5PRFFHFV.js → chunk-6SCIX2W2.js} +2 -2
  43. package/dist/cli/chunks/{chunk-2JDLQWSV.js → chunk-6WF2MOQB.js} +2 -2
  44. package/dist/cli/chunks/{chunk-YNNOY3XN.js → chunk-7BQXEYRV.js} +2 -2
  45. package/dist/cli/chunks/{chunk-MMIQ5DMA.js → chunk-7VO5IEJ2.js} +2 -2
  46. package/dist/cli/chunks/{chunk-XDSA7YUQ.js → chunk-AIBE3J4A.js} +1 -1
  47. package/dist/cli/chunks/{chunk-AV7KYE5P.js → chunk-AMW27FSS.js} +5 -5
  48. package/dist/cli/chunks/{chunk-22D6VBPD.js → chunk-AZJYDM2K.js} +2 -2
  49. package/dist/cli/chunks/{chunk-PYIHZXCI.js → chunk-B6CT4ILU.js} +4 -4
  50. package/dist/cli/chunks/{chunk-ZK2BH23O.js → chunk-BEFRQOLH.js} +2 -2
  51. package/dist/cli/chunks/{chunk-CIRPP7RQ.js → chunk-C2446H7G.js} +2 -2
  52. package/dist/cli/chunks/{chunk-ON4D4TJ4.js → chunk-D7IWGQTW.js} +2 -2
  53. package/dist/cli/chunks/{chunk-6KSCXPPL.js → chunk-D7PI4CYZ.js} +2 -2
  54. package/dist/cli/chunks/{chunk-BQCSCAUC.js → chunk-DAIM72HV.js} +2 -2
  55. package/dist/cli/chunks/{chunk-XMJTTF5N.js → chunk-DPKECIKN.js} +3 -3
  56. package/dist/cli/chunks/{chunk-DZZEHPSJ.js → chunk-E6CGBOZY.js} +3 -3
  57. package/dist/cli/chunks/{chunk-OIRZJCZY.js → chunk-EGTOSQZK.js} +2 -2
  58. package/dist/cli/chunks/{chunk-WDMPJ2M2.js → chunk-EMZ3DXMG.js} +2 -2
  59. package/dist/cli/chunks/{chunk-QBRHKTFT.js → chunk-EWI37TJA.js} +1 -1
  60. package/dist/cli/chunks/{chunk-A5RMQG4N.js → chunk-F34OO2Q7.js} +3 -3
  61. package/dist/cli/chunks/{chunk-7SWD3D6Y.js → chunk-F6QPAVWS.js} +2 -2
  62. package/dist/cli/chunks/chunk-F77X5DAF.js +2 -0
  63. package/dist/cli/chunks/{chunk-Y63MBMOV.js → chunk-FDFJJFQT.js} +2 -2
  64. package/dist/cli/chunks/{chunk-YWZHMXTO.js → chunk-FQ7I4JBQ.js} +2 -2
  65. package/dist/cli/chunks/{chunk-S3ZO7JXS.js → chunk-G5FPWH5O.js} +4 -4
  66. package/dist/cli/chunks/{chunk-QSE67XJO.js → chunk-GDMH7NPV.js} +2 -2
  67. package/dist/cli/chunks/{chunk-MEY43PIQ.js → chunk-GILL32E2.js} +2 -2
  68. package/dist/cli/chunks/{chunk-LQTWPSYL.js → chunk-GLMDRGJD.js} +1 -1
  69. package/dist/cli/chunks/{chunk-MNV3E5KY.js → chunk-GS33ZRJH.js} +4 -4
  70. package/dist/cli/chunks/chunk-HPYGMKZF.js +2 -0
  71. package/dist/cli/chunks/{chunk-EQBEGDTG.js → chunk-HTLAPMTK.js} +1 -1
  72. package/dist/cli/chunks/{chunk-C2M74HCN.js → chunk-IAK76TIZ.js} +1 -1
  73. package/dist/cli/chunks/{chunk-2EDWGHDA.js → chunk-ICF5RPQU.js} +2 -2
  74. package/dist/cli/chunks/{chunk-ZXTO4C7R.js → chunk-IPAQ4HVX.js} +2 -2
  75. package/dist/cli/chunks/{chunk-RLXTBL3H.js → chunk-ISRTT4I7.js} +22 -22
  76. package/dist/cli/chunks/{chunk-SW4OKUTC.js → chunk-IYFMDIYZ.js} +2 -2
  77. package/dist/cli/chunks/{chunk-7IZ2OPC2.js → chunk-JRBGHWAM.js} +2 -2
  78. package/dist/cli/chunks/{chunk-QJ2EHLJ2.js → chunk-JYR3X4OC.js} +1 -1
  79. package/dist/cli/chunks/{chunk-5QHSLWLP.js → chunk-K72J52JO.js} +2 -2
  80. package/dist/cli/chunks/{chunk-PIZYRPMT.js → chunk-K7CW2X6U.js} +2 -2
  81. package/dist/cli/chunks/{chunk-3Z4FHA2E.js → chunk-K7K4TFJM.js} +4 -4
  82. package/dist/cli/chunks/{chunk-5HB54RUS.js → chunk-KCXE2LZU.js} +2 -2
  83. package/dist/cli/chunks/{chunk-THRTUW4Z.js → chunk-KGPAWNNR.js} +1 -1
  84. package/dist/cli/chunks/{chunk-MYWQTCS4.js → chunk-KJ56OXH4.js} +1 -1
  85. package/dist/cli/chunks/{chunk-ZDHMZPSL.js → chunk-KUFC4DBX.js} +1 -1
  86. package/dist/cli/chunks/{chunk-CV2SBMBW.js → chunk-KWZEBHAP.js} +2 -2
  87. package/dist/cli/chunks/{chunk-X2VAOIUY.js → chunk-L6VNEEN6.js} +1 -1
  88. package/dist/cli/chunks/{chunk-S3OZ7XSY.js → chunk-LHPR7ROV.js} +1 -1
  89. package/dist/cli/chunks/{chunk-HO37VP4O.js → chunk-LKK3NIHC.js} +1 -1
  90. package/dist/cli/chunks/{chunk-XRJECWZE.js → chunk-LOFA3U4X.js} +1 -1
  91. package/dist/cli/chunks/{chunk-AWFIEGR3.js → chunk-LYKSIOOT.js} +2 -2
  92. package/dist/cli/chunks/chunk-M2PSXKTG.js +2 -0
  93. package/dist/cli/chunks/{chunk-CMACGG4Z.js → chunk-M3MKP5VN.js} +1 -1
  94. package/dist/cli/chunks/{chunk-UYYBPWU3.js → chunk-M4ARHDY4.js} +1 -1
  95. package/dist/cli/chunks/chunk-M5DBKHM4.js +2 -0
  96. package/dist/cli/chunks/{chunk-7IVQ6OVR.js → chunk-MDWJXSBA.js} +2 -2
  97. package/dist/cli/chunks/{chunk-IICTTDAA.js → chunk-MFWWPRBV.js} +2 -2
  98. package/dist/cli/chunks/{chunk-4BXGVM2C.js → chunk-MHWYQHGN.js} +1 -1
  99. package/dist/cli/chunks/{chunk-HJME6G5M.js → chunk-MIQBRVK2.js} +1 -1
  100. package/dist/cli/chunks/{chunk-FY3CUPNN.js → chunk-MKZQBBCU.js} +2 -2
  101. package/dist/cli/chunks/{chunk-MCOFJHSJ.js → chunk-MQ5WMWUK.js} +5 -5
  102. package/dist/cli/chunks/chunk-MQIAN57O.js +2 -0
  103. package/dist/cli/chunks/{chunk-6NZHEM4V.js → chunk-MU4P4P4E.js} +3 -3
  104. package/dist/cli/chunks/{chunk-ETN5563K.js → chunk-MWV4KPOB.js} +2 -2
  105. package/dist/cli/chunks/{chunk-XTCUN36Z.js → chunk-N244P4MM.js} +2 -2
  106. package/dist/cli/chunks/{chunk-DRWGK3YO.js → chunk-N3MM4Z33.js} +2 -2
  107. package/dist/cli/chunks/{chunk-QQNCSEZG.js → chunk-N4CXUGXE.js} +2 -2
  108. package/dist/cli/chunks/{chunk-PEK6NGVJ.js → chunk-ND6YSW5N.js} +1 -1
  109. package/dist/cli/chunks/{chunk-7V5UHLNY.js → chunk-NJYI7HX7.js} +3 -3
  110. package/dist/cli/chunks/{chunk-YACT5WFC.js → chunk-NSRDP7RD.js} +2 -2
  111. package/dist/cli/chunks/{chunk-L7VIX22Y.js → chunk-NZGLDOU4.js} +15 -15
  112. package/dist/cli/chunks/{chunk-MNUTRAUV.js → chunk-O3SG32PS.js} +1 -1
  113. package/dist/cli/chunks/{chunk-ZGNZJJFF.js → chunk-OIFJH7TF.js} +1 -1
  114. package/dist/cli/chunks/{chunk-LZCBSFAU.js → chunk-OKKTDHHF.js} +6 -6
  115. package/dist/cli/chunks/{chunk-3RHHKYUR.js → chunk-OO7KJ34Y.js} +2 -2
  116. package/dist/cli/chunks/{chunk-STEGWLH5.js → chunk-OV4BLIKJ.js} +2 -2
  117. package/dist/cli/chunks/{chunk-AOI67HA3.js → chunk-PISW5HUX.js} +1 -1
  118. package/dist/cli/chunks/{chunk-SJH3HYNC.js → chunk-PLD4IGDL.js} +2 -2
  119. package/dist/cli/chunks/{chunk-2OH3ALYB.js → chunk-PMWWWYUM.js} +1 -1
  120. package/dist/cli/chunks/{chunk-EA7ZSN3V.js → chunk-PWJZZCHJ.js} +1 -1
  121. package/dist/cli/chunks/{chunk-HA63NBFK.js → chunk-PZ4PRZXN.js} +37 -37
  122. package/dist/cli/chunks/chunk-PZCSJZVJ.js +2 -0
  123. package/dist/cli/chunks/{chunk-CTDLI2ON.js → chunk-Q53M4LI7.js} +1 -1
  124. package/dist/cli/chunks/{chunk-WSVUSIAZ.js → chunk-QPMAXDJ2.js} +2 -2
  125. package/dist/cli/chunks/{chunk-MCZHKXB4.js → chunk-RJKYPWFD.js} +2 -2
  126. package/dist/cli/chunks/{chunk-7QRMARM7.js → chunk-RUC3FCRK.js} +2 -2
  127. package/dist/cli/chunks/{chunk-5PL7WTCU.js → chunk-SC6UFGJ6.js} +2 -2
  128. package/dist/cli/chunks/{chunk-FO43SQXP.js → chunk-SJC7OKF3.js} +2 -2
  129. package/dist/cli/chunks/{chunk-R2O6OKT2.js → chunk-STMMZXS6.js} +1 -1
  130. package/dist/cli/chunks/{chunk-ORF2UKQH.js → chunk-SVILIQQQ.js} +1 -1
  131. package/dist/cli/chunks/{chunk-UVU7XLJY.js → chunk-SXMGNMFL.js} +5 -5
  132. package/dist/cli/chunks/{chunk-OIEQF7PG.js → chunk-SZKFT6CD.js} +2 -2
  133. package/dist/cli/chunks/{chunk-G5U6Q42D.js → chunk-TBJ566KV.js} +2 -2
  134. package/dist/cli/chunks/{chunk-SVYTN2GT.js → chunk-TCV5DASI.js} +2 -2
  135. package/dist/cli/chunks/chunk-TWAWEP4X.js +59 -0
  136. package/dist/cli/chunks/chunk-U27GVYXA.js +2 -0
  137. package/dist/cli/chunks/{chunk-FPAW77XV.js → chunk-UFKVKNAA.js} +1 -1
  138. package/dist/cli/chunks/{chunk-HJORBNXW.js → chunk-USB7GCIC.js} +1 -1
  139. package/dist/cli/chunks/{chunk-4GTDW2XL.js → chunk-UW3ZSFFB.js} +2 -2
  140. package/dist/cli/chunks/{chunk-OXCEUR5F.js → chunk-UWAUYDW4.js} +2 -2
  141. package/dist/cli/chunks/{chunk-4F3ZTXHP.js → chunk-UXJVR323.js} +2 -2
  142. package/dist/cli/chunks/{chunk-AIUSZC6K.js → chunk-V5G3SMAJ.js} +2 -2
  143. package/dist/cli/chunks/{chunk-DMQPO43S.js → chunk-VDKMBOUK.js} +1 -1
  144. package/dist/cli/chunks/{chunk-5WJ3FWL4.js → chunk-VJ2D6FST.js} +24 -24
  145. package/dist/cli/chunks/chunk-VJOPNK2L.js +2 -0
  146. package/dist/cli/chunks/{chunk-JF53LRBL.js → chunk-VRE2EBFI.js} +2 -2
  147. package/dist/cli/chunks/{chunk-WNR2KAUH.js → chunk-WI5WXYIS.js} +2 -2
  148. package/dist/cli/chunks/{chunk-OWQ6HEYI.js → chunk-WIYWDON4.js} +2 -2
  149. package/dist/cli/chunks/{chunk-KB5L5TTF.js → chunk-WYMQ6FZR.js} +5 -5
  150. package/dist/cli/chunks/{chunk-TJKDATEU.js → chunk-XBFEHVBO.js} +2 -2
  151. package/dist/cli/chunks/{chunk-7SJX4CFK.js → chunk-XDZXLEJK.js} +1 -1
  152. package/dist/cli/chunks/{chunk-QEPFXY6G.js → chunk-XJXCSCCP.js} +1 -1
  153. package/dist/cli/chunks/{chunk-OPFN5LFT.js → chunk-XVA56PXZ.js} +4 -4
  154. package/dist/cli/chunks/{chunk-PXTDEO65.js → chunk-Y2EDDV5U.js} +2 -2
  155. package/dist/cli/chunks/{chunk-VSUTI4G6.js → chunk-YSLE6NNG.js} +2 -2
  156. package/dist/cli/chunks/{chunk-XGBAHAGC.js → chunk-Z4BTPQLG.js} +4 -4
  157. package/dist/cli/chunks/{chunk-NZO4WUSO.js → chunk-ZM4QGYGK.js} +3 -3
  158. package/dist/cli/chunks/{ci-PYCRCL7G.js → ci-2BLMQNX3.js} +6 -6
  159. package/dist/cli/chunks/{ci-output-EKQQFE2D.js → ci-output-XK4PPSN7.js} +2 -2
  160. package/dist/cli/chunks/{circuit-breaker-RH3Q2MJO.js → circuit-breaker-W7X4NPFE.js} +2 -2
  161. package/dist/cli/chunks/{claude-flow-setup-DUDXB4VV.js → claude-flow-setup-GLBLSYNJ.js} +2 -2
  162. package/dist/cli/chunks/client-C6CJOCRN.js +2 -0
  163. package/dist/cli/chunks/{cline-installer-3Q4WIWUG.js → cline-installer-7WX7DBGI.js} +2 -2
  164. package/dist/cli/chunks/{code-E4Q6DGOO.js → code-SP3HAQWG.js} +20 -19
  165. package/dist/cli/chunks/{code-index-extractor-2PCISUOW.js → code-index-extractor-44HH36UG.js} +2 -2
  166. package/dist/cli/chunks/{codex-installer-YNNNOLJ6.js → codex-installer-LMXRWLPU.js} +2 -2
  167. package/dist/cli/chunks/{completions-2F7TUFBD.js → completions-GL5FTZAN.js} +2 -2
  168. package/dist/cli/chunks/{complexity-analyzer-2B6MHO7W.js → complexity-analyzer-CQMYGETL.js} +2 -2
  169. package/dist/cli/chunks/{continuedev-installer-ENOKRU5M.js → continuedev-installer-CYVYS5B7.js} +2 -2
  170. package/dist/cli/chunks/{copilot-installer-6YD2KM5F.js → copilot-installer-M7XVII2A.js} +2 -2
  171. package/dist/cli/chunks/{cost-tracker-FCH4QOEA.js → cost-tracker-S4ET4FH3.js} +2 -2
  172. package/dist/cli/chunks/{coverage-JTOXZE3T.js → coverage-DFVSSQ4A.js} +3 -3
  173. package/dist/cli/chunks/cross-domain-router-I3GEA5G6.js +2 -0
  174. package/dist/cli/chunks/{cursor-installer-QZFBUGLQ.js → cursor-installer-KWDSQPQC.js} +2 -2
  175. package/dist/cli/chunks/{daemon-K4QFB5FQ.js → daemon-2HD54QVO.js} +3 -3
  176. package/dist/cli/chunks/daemon-CRX46BBO.js +10 -0
  177. package/dist/cli/chunks/{dag-attention-scheduler-BXAAW33V.js → dag-attention-scheduler-SCP6WPZB.js} +2 -2
  178. package/dist/cli/chunks/{detect-UGSWIOAD.js → detect-XS2GDCEX.js} +2 -2
  179. package/dist/cli/chunks/{dist-node-FN3HX3OK.js → dist-node-U43MVQ3F.js} +2 -2
  180. package/dist/cli/chunks/{domain-handler-7PP7VYA7.js → domain-handler-HITMDULH.js} +2 -2
  181. package/dist/cli/chunks/{domain-transfer-XZM44W7I.js → domain-transfer-TJF7DNI4.js} +2 -2
  182. package/dist/cli/chunks/dream-JCQMG2RL.js +2 -0
  183. package/dist/cli/chunks/{embed-and-insert-pattern-JZVERJ5L.js → embed-and-insert-pattern-JKG33YZK.js} +2 -2
  184. package/dist/cli/chunks/{eval-466NFF2D.js → eval-NF5Y4W37.js} +3 -3
  185. package/dist/cli/chunks/{experience-capture-middleware-I7IQCC7V.js → experience-capture-middleware-VMMFYJ4D.js} +3 -3
  186. package/dist/cli/chunks/{fast-paths-34OICNZA.js → fast-paths-W2Q53IR2.js} +2 -2
  187. package/dist/cli/chunks/{feature-flags-6UBIVTAD.js → feature-flags-B4PBMQJO.js} +2 -2
  188. package/dist/cli/chunks/{feature-flags-X5WBBWSO.js → feature-flags-PVI7A4RE.js} +2 -2
  189. package/dist/cli/chunks/{file-discovery-NLMDBWXX.js → file-discovery-E4L3I33I.js} +2 -2
  190. package/dist/cli/chunks/{fleet-W7CYCHDI.js → fleet-LE5SHVLK.js} +3 -3
  191. package/dist/cli/chunks/{gnn-wrapper-K4VTAG5X.js → gnn-wrapper-MWWJBLOH.js} +2 -2
  192. package/dist/cli/chunks/{heartbeat-handler-ZGKF2Z6T.js → heartbeat-handler-XOUVNPQK.js} +4 -4
  193. package/dist/cli/chunks/heartbeat-scheduler-FBHE4ZWH.js +2 -0
  194. package/dist/cli/chunks/hnsw-adapter-EOOA4WXD.js +2 -0
  195. package/dist/cli/chunks/hnsw-index-TD3KRPND.js +2 -0
  196. package/dist/cli/chunks/{hnsw-legacy-bridge-ELDRLKK5.js → hnsw-legacy-bridge-W3T5ZDDP.js} +2 -2
  197. package/dist/cli/chunks/{better-sqlite3-5BT5FO64.js → hnswlib-node-3TZFES5I.js} +2 -2
  198. package/dist/cli/chunks/hooks-RUPQVIUM.js +250 -0
  199. package/dist/cli/chunks/hybrid-router-64O6PXZ2.js +2 -0
  200. package/dist/cli/chunks/{hypergraph-engine-UWFW3XP5.js → hypergraph-engine-VDFK3JYH.js} +2 -2
  201. package/dist/cli/chunks/{hypergraph-handler-PK2BI46K.js → hypergraph-handler-EUDGEF25.js} +3 -3
  202. package/dist/cli/chunks/impact-analyzer-ITQHXGTM.js +2 -0
  203. package/dist/cli/chunks/{init-handler-HNG6KJOU.js → init-handler-MZEAJOZK.js} +6 -6
  204. package/dist/cli/chunks/init-wizard-DZ4IKGQI.js +2 -0
  205. package/dist/cli/chunks/kernel-HSVY4ZYK.js +2 -0
  206. package/dist/cli/chunks/{kilocode-installer-25V7FEJ4.js → kilocode-installer-ECBYWT6M.js} +2 -2
  207. package/dist/cli/chunks/{kiro-installer-7RMTTCQB.js → kiro-installer-KYFCSYTG.js} +2 -2
  208. package/dist/cli/chunks/knowledge-graph-H32TXXX4.js +2 -0
  209. package/dist/cli/chunks/{learning-XQC2MG2R.js → learning-4RAFMDSB.js} +3 -3
  210. package/dist/cli/chunks/{llm-router-6KTTONH4.js → llm-router-JHBNLYP3.js} +12 -12
  211. package/dist/cli/chunks/llm-router-service-3FKESBUX.js +2 -0
  212. package/dist/cli/chunks/{load-BV64P3AL.js → load-4DVQML7P.js} +2 -2
  213. package/dist/cli/chunks/load-test-LKHURZGZ.js +2 -0
  214. package/dist/cli/chunks/{mcp-U5ZN77TA.js → mcp-LCWMU4GZ.js} +2 -2
  215. package/dist/cli/chunks/{memory-WB5BNBK7.js → memory-3DTJAURT.js} +5 -5
  216. package/dist/cli/chunks/memory-backend-XRJRZ6CK.js +2 -0
  217. package/dist/cli/chunks/memory-handlers-BL6E3XAK.js +2 -0
  218. package/dist/cli/chunks/{multi-model-executor-3X3W3UTY.js → multi-model-executor-AVR5SZOO.js} +2 -2
  219. package/dist/cli/chunks/{opencode-installer-TTTMG7ZZ.js → opencode-installer-DW2426QM.js} +3 -3
  220. package/dist/cli/chunks/{orchestrator-BLCGSHMZ.js → orchestrator-AHF4W5GS.js} +8 -8
  221. package/dist/cli/chunks/{pipeline-DZPGMRG7.js → pipeline-N6THEWYE.js} +2 -2
  222. package/dist/cli/chunks/{platform-EVMZAUNV.js → platform-MRCFQF7X.js} +2 -2
  223. package/dist/cli/chunks/{plugin-OR55K4HT.js → plugin-6YKUN5QM.js} +2 -2
  224. package/dist/cli/chunks/{prime-radiant-advanced-wasm-4ODV27HD.js → prime-radiant-advanced-wasm-2YPAHSVS.js} +2 -2
  225. package/dist/cli/chunks/protocol-executor-KABPB6PQ.js +2 -0
  226. package/dist/cli/chunks/{protocol-handler-ZOTI5PID.js → protocol-handler-Y2NMUKWQ.js} +2 -2
  227. package/dist/cli/chunks/{prove-DIMBYJ7V.js → prove-DZUNWBFD.js} +2 -2
  228. package/dist/cli/chunks/provider-manager-U7EBM3FA.js +2 -0
  229. package/dist/cli/chunks/qe-reasoning-bank-64O2OQIW.js +2 -0
  230. package/dist/cli/chunks/{quality-7MX4VL6M.js → quality-AIFQMGUV.js} +2 -2
  231. package/dist/cli/chunks/queen-coordinator-SV3COGIL.js +2 -0
  232. package/dist/cli/chunks/{real-embeddings-YPUHWRN2.js → real-embeddings-5XL4LOG2.js} +2 -2
  233. package/dist/cli/chunks/{roocode-installer-WG5AU4QM.js → roocode-installer-LV3WONT5.js} +2 -2
  234. package/dist/cli/chunks/router-QARRPMED.js +2 -0
  235. package/dist/cli/chunks/routing-feedback-KD2JFTPK.js +2 -0
  236. package/dist/cli/chunks/{routing-handler-LZB4MN2K.js → routing-handler-WSMUILGD.js} +2 -2
  237. package/dist/cli/chunks/{ruvector-commands-YE4ADBMC.js → ruvector-commands-BCEIDTW3.js} +2 -2
  238. package/dist/cli/chunks/{rvf-dual-writer-QS5ATW4C.js → rvf-dual-writer-LRSPC6H3.js} +2 -2
  239. package/dist/cli/chunks/{rvf-migration-adapter-YIGKSBD3.js → rvf-migration-adapter-QHNX6353.js} +2 -2
  240. package/dist/cli/chunks/{rvf-migration-coordinator-2NDCWP7F.js → rvf-migration-coordinator-SLNB3XPW.js} +2 -2
  241. package/dist/cli/chunks/rvf-native-adapter-4LLGF5AY.js +2 -0
  242. package/dist/cli/chunks/safe-db-RAX3H2P7.js +2 -0
  243. package/dist/cli/chunks/schedule-RQZGLLUY.js +2 -0
  244. package/dist/cli/chunks/scheduler-ACWTN4LN.js +2 -0
  245. package/dist/cli/chunks/{security-HT4SUT24.js → security-CYY6TECQ.js} +3 -3
  246. package/dist/cli/chunks/shared-rvf-adapter-U6JE4O6A.js +2 -0
  247. package/dist/cli/chunks/{shared-rvf-dual-writer-ZKFO7CBY.js → shared-rvf-dual-writer-PJBSNBRV.js} +2 -2
  248. package/dist/cli/chunks/sqlite-persistence-SWNBO257.js +2 -0
  249. package/dist/cli/chunks/{status-handler-AMEMKBI4.js → status-handler-W723LXX5.js} +2 -2
  250. package/dist/cli/chunks/{structural-health-RBADRLC3.js → structural-health-WZUPZBB5.js} +2 -2
  251. package/dist/cli/chunks/{sync-PCB23M4K.js → sync-UA22CKUS.js} +2 -2
  252. package/dist/cli/chunks/sync-ZLMF53TB.js +2 -0
  253. package/dist/cli/chunks/{task-handler-J26FSCH5.js → task-handler-SENTEEXZ.js} +2 -2
  254. package/dist/cli/chunks/{task-handlers-AQRLR6BL.js → task-handlers-FGVUZOCC.js} +3 -3
  255. package/dist/cli/chunks/{test-YXWSIOSB.js → test-Q37C3WI2.js} +4 -4
  256. package/dist/cli/chunks/{test-scheduling-XY532GI4.js → test-scheduling-E6SPIBTH.js} +4 -4
  257. package/dist/cli/chunks/token-bootstrap-HQFFMZUF.js +2 -0
  258. package/dist/cli/chunks/{token-usage-2MJVE4DT.js → token-usage-JHNWTZ7L.js} +3 -3
  259. package/dist/cli/chunks/{transformers-QSNTOD2Z.js → transformers-TEXDUVNI.js} +2 -2
  260. package/dist/cli/chunks/tree-sitter-wasm-parser-MWSS52H6.js +2 -0
  261. package/dist/cli/chunks/{types-RNKRSYMO.js → types-YQRKHYH3.js} +2 -2
  262. package/dist/cli/chunks/unified-memory-QG3FDRKR.js +2 -0
  263. package/dist/cli/chunks/unified-memory-hnsw-KOR4EOIG.js +2 -0
  264. package/dist/cli/chunks/unified-persistence-J6NIRYKM.js +2 -0
  265. package/dist/cli/chunks/{upgrade-EKJHIFWP.js → upgrade-JKMEDURI.js} +2 -2
  266. package/dist/cli/chunks/{validate-KS4T7LWC.js → validate-URO7G6OE.js} +4 -4
  267. package/dist/cli/chunks/validate-swarm-VZVJ56Z5.js +14 -0
  268. package/dist/cli/chunks/{vibium-FLUQO4IF.js → vibium-G5WZILL6.js} +2 -2
  269. package/dist/cli/chunks/visual-security-RAWV6YLN.js +2 -0
  270. package/dist/cli/chunks/{web-tree-sitter-UMC63DWD.js → web-tree-sitter-LECH5T6H.js} +2 -2
  271. package/dist/cli/chunks/{windsurf-installer-V3FQGJIQ.js → windsurf-installer-2NPLC2YW.js} +2 -2
  272. package/dist/cli/chunks/{witness-chain-GE74TLSO.js → witness-chain-X347C36A.js} +2 -2
  273. package/dist/cli/chunks/witness-chain-ZO7FIM35.js +2 -0
  274. package/dist/cli/chunks/{workflow-4YZ2RPWA.js → workflow-V4ALYZ73.js} +4 -4
  275. package/dist/cli/chunks/workflow-orchestrator-7SKITNIJ.js +2 -0
  276. package/dist/cli/chunks/wrappers-QXOPRPR4.js +2 -0
  277. package/dist/cli/commands/code.js +6 -0
  278. package/dist/cli/commands/hooks-handlers/task-hooks.js +50 -0
  279. package/dist/cli/commands/learning.js +5 -5
  280. package/dist/cli/commands/llm-router.js +1 -1
  281. package/dist/cli/commands/workflow.js +1 -0
  282. package/dist/coordination/consensus/providers/native-learning-provider.d.ts +1 -1
  283. package/dist/coordination/consensus/providers/ollama-provider.d.ts +1 -1
  284. package/dist/coordination/consensus/providers/openrouter-provider.d.ts +1 -1
  285. package/dist/coordination/handlers/code-intelligence-handlers.js +6 -0
  286. package/dist/coordination/mincut/neural-goap.js +24 -20
  287. package/dist/coordination/protocols/code-intelligence-index.js +31 -25
  288. package/dist/coordination/queen-coordinator.js +4 -0
  289. package/dist/coordination/queen-work-stealing.js +1 -2
  290. package/dist/domains/chaos-resilience/coordinator.js +19 -15
  291. package/dist/domains/chaos-resilience/services/chaos-engineer.js +5 -2
  292. package/dist/domains/chaos-resilience/services/load-tester.js +15 -11
  293. package/dist/domains/code-intelligence/interfaces.d.ts +5 -0
  294. package/dist/domains/code-intelligence/services/c4-model/index.js +12 -6
  295. package/dist/domains/code-intelligence/services/impact-analyzer.js +6 -2
  296. package/dist/domains/code-intelligence/services/knowledge-graph.d.ts +42 -0
  297. package/dist/domains/code-intelligence/services/knowledge-graph.js +278 -93
  298. package/dist/domains/code-intelligence/services/semantic-analyzer.js +8 -2
  299. package/dist/domains/contract-testing/coordinator.js +1 -1
  300. package/dist/domains/coverage-analysis/coordinator.js +4 -2
  301. package/dist/domains/learning-optimization/coordinator.js +1 -0
  302. package/dist/domains/quality-assessment/coherence/gate-controller.js +32 -26
  303. package/dist/domains/requirements-validation/coordinator.js +1 -0
  304. package/dist/domains/test-execution/services/e2e/wait-condition-handler.js +1 -1
  305. package/dist/domains/test-execution/services/retry-handler.js +18 -12
  306. package/dist/domains/test-generation/coordinator.js +1 -1
  307. package/dist/domains/test-generation/services/pattern-matcher.js +7 -5
  308. package/dist/domains/test-generation/services/test-generator.js +3 -2
  309. package/dist/domains/visual-accessibility/coordinator.js +24 -20
  310. package/dist/index.d.ts +2 -2
  311. package/dist/index.js +2 -2
  312. package/dist/init/phases/12-verification.js +3 -3
  313. package/dist/integrations/agentic-flow/model-router/router.js +1 -1
  314. package/dist/integrations/embeddings/base/EmbeddingGenerator.js +11 -7
  315. package/dist/integrations/ruvector/hypergraph-engine.js +2 -2
  316. package/dist/integrations/ruvector/shared-rvf-adapter.js +12 -1
  317. package/dist/integrations/ruvector/shared-rvf-dual-writer.js +6 -2
  318. package/dist/integrations/ruvector/spectral-math.js +2 -2
  319. package/dist/integrations/ruvector/spectral-sparsifier.js +1 -1
  320. package/dist/kernel/kernel.js +1 -1
  321. package/dist/kernel/project-root.d.ts +33 -0
  322. package/dist/kernel/project-root.js +86 -0
  323. package/dist/kernel/unified-memory-hnsw.js +1 -0
  324. package/dist/kernel/unified-memory.d.ts +2 -19
  325. package/dist/kernel/unified-memory.js +8 -64
  326. package/dist/learning/experience-capture.js +1 -1
  327. package/dist/learning/local-judge-client.d.ts +55 -0
  328. package/dist/learning/local-judge-client.js +127 -0
  329. package/dist/learning/nagual-client.d.ts +73 -0
  330. package/dist/learning/nagual-client.js +150 -0
  331. package/dist/learning/pattern-store.js +10 -3
  332. package/dist/learning/qe-reasoning-bank.js +9 -1
  333. package/dist/learning/qe-unified-memory.js +8 -6
  334. package/dist/mcp/bundle.js +405 -403
  335. package/dist/mcp/entry.js +44 -33
  336. package/dist/mcp/handlers/core-handlers.js +2 -2
  337. package/dist/mcp/handlers/cross-phase-handlers.js +5 -3
  338. package/dist/mcp/handlers/handler-factory.d.ts +5 -0
  339. package/dist/mcp/handlers/handler-factory.js +44 -4
  340. package/dist/mcp/http-server.js +1 -0
  341. package/dist/mcp/protocol-server.js +2 -2
  342. package/dist/mcp/tools/code-intelligence/analyze.js +1 -1
  343. package/dist/mcp/tools/learning-optimization/optimize.js +1 -1
  344. package/dist/mcp/tools/qx-analysis/heuristics-engine.js +195 -173
  345. package/dist/mcp/tools/visual-accessibility/index.js +1 -1
  346. package/dist/mcp/transport/stdio.d.ts +7 -0
  347. package/dist/mcp/transport/stdio.js +39 -2
  348. package/dist/mcp/transport/websocket/websocket-transport.js +1 -0
  349. package/dist/optimization/auto-tuner.js +1 -1
  350. package/dist/planning/goap-planner.js +1 -0
  351. package/dist/routing/agent-dependency-graph.js +4 -1
  352. package/dist/shared/llm/router/config-store.js +1 -1
  353. package/dist/shared/metrics/system-metrics.js +6 -4
  354. package/dist/shared/parsers/tree-sitter-wasm-parser.d.ts +12 -0
  355. package/dist/shared/parsers/tree-sitter-wasm-parser.js +35 -0
  356. package/dist/shared/parsers/treesitter-ts-extractor.d.ts +39 -0
  357. package/dist/shared/parsers/treesitter-ts-extractor.js +196 -0
  358. package/dist/shared/utils/safe-expression-evaluator.js +8 -5
  359. package/dist/sync/cloud/postgres-writer.js +2 -0
  360. package/dist/sync/readers/json-reader.js +1 -1
  361. package/dist/test-scheduling/git-aware/test-selector.js +1 -1
  362. package/dist/workers/daemon.js +2 -0
  363. package/dist/workers/quality-daemon/git-watcher.js +2 -0
  364. package/dist/workers/quality-daemon/index.js +28 -24
  365. package/dist/workers/worker-manager.js +4 -0
  366. package/package.json +5 -4
  367. package/dist/cli/chunks/adapter-CR6J5C76.js +0 -2
  368. package/dist/cli/chunks/aqe-learning-engine-2MNTHMB6.js +0 -2
  369. package/dist/cli/chunks/audit-ALRYPHGP.js +0 -3
  370. package/dist/cli/chunks/base-AOQNGMTL.js +0 -2
  371. package/dist/cli/chunks/browser-workflow-UJ4A2ZXO.js +0 -2
  372. package/dist/cli/chunks/chunk-7DKYCVJI.js +0 -2
  373. package/dist/cli/chunks/chunk-FO73PZVU.js +0 -2
  374. package/dist/cli/chunks/chunk-I677W5BT.js +0 -59
  375. package/dist/cli/chunks/chunk-IAZEDWRX.js +0 -2
  376. package/dist/cli/chunks/chunk-RNREAOY4.js +0 -2
  377. package/dist/cli/chunks/chunk-UWXH2UQK.js +0 -2
  378. package/dist/cli/chunks/chunk-ZQUXNG5X.js +0 -2
  379. package/dist/cli/chunks/client-RDPWGOSA.js +0 -2
  380. package/dist/cli/chunks/cross-domain-router-4K5ZVZEZ.js +0 -2
  381. package/dist/cli/chunks/daemon-M422U3ZA.js +0 -10
  382. package/dist/cli/chunks/dream-RPNWM7VS.js +0 -2
  383. package/dist/cli/chunks/heartbeat-scheduler-JBCXMMZO.js +0 -2
  384. package/dist/cli/chunks/hnsw-adapter-3SC2HZIG.js +0 -2
  385. package/dist/cli/chunks/hnsw-index-FQORAR6K.js +0 -2
  386. package/dist/cli/chunks/hooks-T4CBINAV.js +0 -248
  387. package/dist/cli/chunks/hybrid-router-6CBFDXPR.js +0 -2
  388. package/dist/cli/chunks/impact-analyzer-SOEFVZWG.js +0 -2
  389. package/dist/cli/chunks/init-wizard-3E4IU5M4.js +0 -2
  390. package/dist/cli/chunks/kernel-GFZP4G5J.js +0 -2
  391. package/dist/cli/chunks/knowledge-graph-BKRKBU26.js +0 -2
  392. package/dist/cli/chunks/llm-router-service-KE4IGZPP.js +0 -2
  393. package/dist/cli/chunks/load-test-VSYJV2AO.js +0 -2
  394. package/dist/cli/chunks/memory-backend-B72RGHRF.js +0 -2
  395. package/dist/cli/chunks/memory-handlers-NWCH7AUO.js +0 -2
  396. package/dist/cli/chunks/protocol-executor-V3F37FPO.js +0 -2
  397. package/dist/cli/chunks/provider-manager-2PN72TT6.js +0 -2
  398. package/dist/cli/chunks/qe-reasoning-bank-P665QNIR.js +0 -2
  399. package/dist/cli/chunks/queen-coordinator-XD4F7BGB.js +0 -2
  400. package/dist/cli/chunks/router-4SSNWDJC.js +0 -2
  401. package/dist/cli/chunks/routing-feedback-O2JSIBW6.js +0 -2
  402. package/dist/cli/chunks/rvf-native-adapter-WIUHYXRB.js +0 -2
  403. package/dist/cli/chunks/safe-db-WL5Y7ZNS.js +0 -2
  404. package/dist/cli/chunks/schedule-U7QDGU5A.js +0 -2
  405. package/dist/cli/chunks/scheduler-LXKGQYXA.js +0 -2
  406. package/dist/cli/chunks/shared-rvf-adapter-4IZOJL33.js +0 -2
  407. package/dist/cli/chunks/sqlite-persistence-4KFO3SEB.js +0 -2
  408. package/dist/cli/chunks/sync-ARDDLQBS.js +0 -2
  409. package/dist/cli/chunks/token-bootstrap-KL2QIQ36.js +0 -2
  410. package/dist/cli/chunks/tree-sitter-wasm-parser-QJOKHOIW.js +0 -2
  411. package/dist/cli/chunks/unified-memory-7AS4LIEF.js +0 -2
  412. package/dist/cli/chunks/unified-memory-hnsw-GREESNJX.js +0 -2
  413. package/dist/cli/chunks/unified-persistence-BPJOMZOA.js +0 -2
  414. package/dist/cli/chunks/validate-swarm-SKKWRP2H.js +0 -14
  415. package/dist/cli/chunks/visual-security-BW662FHQ.js +0 -2
  416. package/dist/cli/chunks/witness-chain-OXVDLNVT.js +0 -2
  417. package/dist/cli/chunks/workflow-orchestrator-KKNR46XV.js +0 -2
  418. package/dist/cli/chunks/wrappers-37NLMKPE.js +0 -2
@@ -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.10.2");process.exit(0)}
2
- import{a as v}from"./chunk-IAZEDWRX.js";import{c as l}from"./chunk-JF53LRBL.js";import{S as R,b as g}from"./chunk-ON4D4TJ4.js";v();R();import{createHash as m,randomUUID as f}from"crypto";var a=l.create("witness-chain"),p=class{logLikelihoodRatio=0;upperBound;lowerBound;observations=0;constructor(t=.05,e=.05){this.upperBound=Math.log(1/t),this.lowerBound=Math.log(e)}addWeightedEvidence(t,e){return this.logLikelihoodRatio+=t?e:-e,this.observations++,this.logLikelihoodRatio>=this.upperBound?"PASS":this.logLikelihoodRatio<=this.lowerBound?"FAIL":"INCONCLUSIVE"}addEvidence(t){return this.addWeightedEvidence(t,.5)}getRatio(){return this.logLikelihoodRatio}getObservations(){return this.observations}getBounds(){return{upper:this.upperBound,lower:this.lowerBound}}reset(){this.logLikelihoodRatio=0,this.observations=0}},c="0".repeat(64),h=class{receipts=[];lastHash=c;sprtAccumulators=new Map;appendWitness(t){let e=f(),i=Date.now(),s=this.receipts.length,n=this.lastHash+JSON.stringify(t)+i,o=m("sha256").update(n).digest("hex"),u={id:e,timestamp:i,previousHash:this.lastHash,hash:o,decision:t,chainIndex:s};return this.receipts.push(u),this.lastHash=o,this.updateSPRT(t),a.debug("Witness appended",{chainIndex:s,type:t.type,decision:t.decision,hash:o.slice(0,16)+"..."}),u}verifyChain(){if(this.receipts.length===0)return{valid:!0,length:0,brokenAt:-1,message:"Chain is empty (valid)",lastHash:c};let t=c;for(let e=0;e<this.receipts.length;e++){let i=this.receipts[e];if(i.previousHash!==t)return{valid:!1,length:this.receipts.length,brokenAt:e,message:`Chain broken at index ${e}: previousHash mismatch`,lastHash:this.lastHash};let s=i.previousHash+JSON.stringify(i.decision)+i.timestamp,n=m("sha256").update(s).digest("hex");if(i.hash!==n)return{valid:!1,length:this.receipts.length,brokenAt:e,message:`Chain broken at index ${e}: hash mismatch (tamper detected)`,lastHash:this.lastHash};t=i.hash}return{valid:!0,length:this.receipts.length,brokenAt:-1,message:`Chain valid (${this.receipts.length} receipts)`,lastHash:this.lastHash}}getChain(t){return t!==void 0&&t>0?[...this.receipts.slice(-t)]:[...this.receipts]}getChainLength(){return this.receipts.length}getLastHash(){return this.lastHash}exportChain(){let t={version:"1.0.0",exportedAt:Date.now(),length:this.receipts.length,receipts:this.receipts};return JSON.stringify(t,null,2)}importChain(t){try{let e=JSON.parse(t);if(!e||e.version!=="1.0.0"||!Array.isArray(e.receipts))return a.warn("Import failed: invalid format"),!1;let i=this.receipts,s=this.lastHash;this.receipts=e.receipts,this.lastHash=e.receipts.length>0?e.receipts[e.receipts.length-1].hash:c;let n=this.verifyChain();return n.valid?(a.info("Chain imported successfully",{length:e.receipts.length}),!0):(this.receipts=i,this.lastHash=s,a.warn("Import failed: chain integrity check failed",{message:n.message}),!1)}catch(e){return a.warn("Import failed: parse error",{error:e instanceof Error?e.message:String(e)}),!1}}getSPRT(t,e,i){return this.sprtAccumulators.has(t)||this.sprtAccumulators.set(t,new p(e,i)),this.sprtAccumulators.get(t)}getReceipt(t){return this.receipts[t]}updateSPRT(t){let e=t.decision==="PASS"||t.decision==="PERMIT";this.getSPRT(t.type).addEvidence(e)}},d=class extends h{persistence;constructor(t){super(),this.persistence=t;let e=t.loadAllReceipts();if(e.length>0){let i={version:"1.0.0",exportedAt:Date.now(),length:e.length,receipts:e};this.importChain(JSON.stringify(i))?a.info("Witness chain restored from SQLite",{receipts:e.length}):a.warn("Failed to restore witness chain from SQLite \u2014 starting fresh")}}appendWitness(t){let e=super.appendWitness(t);try{this.persistence.insertReceipt(e)}catch(i){a.warn("Failed to persist witness receipt to SQLite",{chainIndex:e.chainIndex,error:i instanceof Error?i.message:String(i)})}return e}};function C(r){r.exec(`
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.4");process.exit(0)}
2
+ import{a as v}from"./chunk-HPYGMKZF.js";import{c as l}from"./chunk-VRE2EBFI.js";import{S as R,b as g}from"./chunk-D7IWGQTW.js";v();R();import{createHash as m,randomUUID as f}from"crypto";var a=l.create("witness-chain"),p=class{logLikelihoodRatio=0;upperBound;lowerBound;observations=0;constructor(t=.05,e=.05){this.upperBound=Math.log(1/t),this.lowerBound=Math.log(e)}addWeightedEvidence(t,e){return this.logLikelihoodRatio+=t?e:-e,this.observations++,this.logLikelihoodRatio>=this.upperBound?"PASS":this.logLikelihoodRatio<=this.lowerBound?"FAIL":"INCONCLUSIVE"}addEvidence(t){return this.addWeightedEvidence(t,.5)}getRatio(){return this.logLikelihoodRatio}getObservations(){return this.observations}getBounds(){return{upper:this.upperBound,lower:this.lowerBound}}reset(){this.logLikelihoodRatio=0,this.observations=0}},c="0".repeat(64),h=class{receipts=[];lastHash=c;sprtAccumulators=new Map;appendWitness(t){let e=f(),i=Date.now(),s=this.receipts.length,n=this.lastHash+JSON.stringify(t)+i,o=m("sha256").update(n).digest("hex"),u={id:e,timestamp:i,previousHash:this.lastHash,hash:o,decision:t,chainIndex:s};return this.receipts.push(u),this.lastHash=o,this.updateSPRT(t),a.debug("Witness appended",{chainIndex:s,type:t.type,decision:t.decision,hash:o.slice(0,16)+"..."}),u}verifyChain(){if(this.receipts.length===0)return{valid:!0,length:0,brokenAt:-1,message:"Chain is empty (valid)",lastHash:c};let t=c;for(let e=0;e<this.receipts.length;e++){let i=this.receipts[e];if(i.previousHash!==t)return{valid:!1,length:this.receipts.length,brokenAt:e,message:`Chain broken at index ${e}: previousHash mismatch`,lastHash:this.lastHash};let s=i.previousHash+JSON.stringify(i.decision)+i.timestamp,n=m("sha256").update(s).digest("hex");if(i.hash!==n)return{valid:!1,length:this.receipts.length,brokenAt:e,message:`Chain broken at index ${e}: hash mismatch (tamper detected)`,lastHash:this.lastHash};t=i.hash}return{valid:!0,length:this.receipts.length,brokenAt:-1,message:`Chain valid (${this.receipts.length} receipts)`,lastHash:this.lastHash}}getChain(t){return t!==void 0&&t>0?[...this.receipts.slice(-t)]:[...this.receipts]}getChainLength(){return this.receipts.length}getLastHash(){return this.lastHash}exportChain(){let t={version:"1.0.0",exportedAt:Date.now(),length:this.receipts.length,receipts:this.receipts};return JSON.stringify(t,null,2)}importChain(t){try{let e=JSON.parse(t);if(!e||e.version!=="1.0.0"||!Array.isArray(e.receipts))return a.warn("Import failed: invalid format"),!1;let i=this.receipts,s=this.lastHash;this.receipts=e.receipts,this.lastHash=e.receipts.length>0?e.receipts[e.receipts.length-1].hash:c;let n=this.verifyChain();return n.valid?(a.info("Chain imported successfully",{length:e.receipts.length}),!0):(this.receipts=i,this.lastHash=s,a.warn("Import failed: chain integrity check failed",{message:n.message}),!1)}catch(e){return a.warn("Import failed: parse error",{error:e instanceof Error?e.message:String(e)}),!1}}getSPRT(t,e,i){return this.sprtAccumulators.has(t)||this.sprtAccumulators.set(t,new p(e,i)),this.sprtAccumulators.get(t)}getReceipt(t){return this.receipts[t]}updateSPRT(t){let e=t.decision==="PASS"||t.decision==="PERMIT";this.getSPRT(t.type).addEvidence(e)}},d=class extends h{persistence;constructor(t){super(),this.persistence=t;let e=t.loadAllReceipts();if(e.length>0){let i={version:"1.0.0",exportedAt:Date.now(),length:e.length,receipts:e};this.importChain(JSON.stringify(i))?a.info("Witness chain restored from SQLite",{receipts:e.length}):a.warn("Failed to restore witness chain from SQLite \u2014 starting fresh")}}appendWitness(t){let e=super.appendWitness(t);try{this.persistence.insertReceipt(e)}catch(i){a.warn("Failed to persist witness receipt to SQLite",{chainIndex:e.chainIndex,error:i instanceof Error?i.message:String(i)})}return e}};function C(r){r.exec(`
3
3
  CREATE TABLE IF NOT EXISTS witness_chain_receipts (
4
4
  id TEXT PRIMARY KEY,
5
5
  chain_index INTEGER NOT NULL,
@@ -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.10.2");process.exit(0)}
2
- import{a as N,d as P}from"./chunk-DRWGK3YO.js";import{b,e as k}from"./chunk-HHCYSAH3.js";import{a as p,d as F}from"./chunk-WNR2KAUH.js";import{a as T,c as E}from"./chunk-WDMPJ2M2.js";import{a as H,b as O}from"./chunk-IICTTDAA.js";import{c as z,g as S}from"./chunk-ORF2UKQH.js";function x(l){let e=0;for(let t=0;t<l.length;t++)e+=l[t]*l[t];return Math.sqrt(e)}function C(l,e,t,s){let n=t*s;if(n===0)return 0;let o=0;for(let r=0;r<l.length;r++)o+=l[r]*e[r];return o/n}function U(l={}){let{name:e="default",...t}=l;return new M(e,t)}var f,w,v,I,A,M,D=z(()=>{F();P();k();E();f=null,w=null;try{let l=(O(),S(H));f=l.differentiableSearch,w=l.init}catch{}v=class{data=[];compareFn;constructor(e){this.compareFn=e}push(e){this.data.push(e),this.bubbleUp(this.data.length-1)}pop(){if(this.data.length===0)return;let e=this.data[0],t=this.data.pop();return this.data.length>0&&(this.data[0]=t,this.sinkDown(0)),e}peek(){return this.data[0]}size(){return this.data.length}bubbleUp(e){for(;e>0;){let t=e-1>>1;if(this.compareFn(this.data[e],this.data[t])<0)[this.data[e],this.data[t]]=[this.data[t],this.data[e]],e=t;else break}}sinkDown(e){let t=this.data.length;for(;;){let s=e,n=2*e+1,o=2*e+2;if(n<t&&this.compareFn(this.data[n],this.data[s])<0&&(s=n),o<t&&this.compareFn(this.data[o],this.data[s])<0&&(s=o),s!==e)[this.data[e],this.data[s]]=[this.data[s],this.data[e]],e=s;else break}}},I=class{nodes=new Map;M=b.M_CONNECTIONS;Mmax0=b.M_CONNECTIONS*2;efConstruction=b.EF_CONSTRUCTION;efSearch=b.EF_SEARCH;mL=1/Math.log(b.M_CONNECTIONS);maxLevel=16;entryPoint=null;currentMaxLevel=-1;randomLevel(){return Math.min(Math.floor(-Math.log(N())*this.mL),this.maxLevel)}similarity(e,t){let s=this.nodes.get(t);return s?p(e,s.embedding):-1}searchLayer(e,t,s){let n=t,o=this.similarity(e,n),r=!0;for(;r;){r=!1;let a=this.nodes.get(n);if(!a)break;let h=a.neighbors.get(s)??[];for(let d of h){if(!this.nodes.has(d))continue;let i=this.similarity(e,d);i>o&&(n=d,o=i,r=!0)}}return n}searchLayerBeam(e,t,s,n){let o=new Set(t),r=t.filter(i=>this.nodes.has(i)).map(i=>({id:i,score:this.similarity(e,i)})),a=new v((i,c)=>c.score-i.score),h=new v((i,c)=>i.score-c.score);for(let i of r)a.push(i),h.push(i);for(;a.size()>0;){let i=a.pop();if(h.size()>=n&&i.score<h.peek().score)break;let c=this.nodes.get(i.id);if(!c)continue;let u=c.neighbors.get(s)??[];for(let m of u){if(o.has(m)||(o.add(m),!this.nodes.has(m)))continue;let g=this.similarity(e,m),y=h.size()>=n?h.peek().score:-1/0;if(h.size()<n||g>y){let L={id:m,score:g};a.push(L),h.push(L),h.size()>n&&h.pop()}}}let d=[];for(;h.size()>0;)d.push(h.pop());return d.reverse(),d}selectNeighbors(e,t,s){return t.sort((n,o)=>o.score-n.score).slice(0,s).map(n=>n.id)}getMaxConnections(e){return e===0?this.Mmax0:this.M}add(e,t){this.nodes.has(e)&&this.remove(e);let s=this.randomLevel(),n={id:e,embedding:t,neighbors:new Map};for(let r=0;r<=s;r++)n.neighbors.set(r,[]);if(this.nodes.set(e,n),this.entryPoint===null){this.entryPoint=e,this.currentMaxLevel=s;return}let o=this.entryPoint;for(let r=this.currentMaxLevel;r>s;r--)o=this.searchLayer(t,o,r);for(let r=Math.min(s,this.currentMaxLevel);r>=0;r--){let a=this.getMaxConnections(r),h=this.searchLayerBeam(t,[o],r,this.efConstruction),d=this.selectNeighbors(t,h,a);n.neighbors.set(r,[...d]);for(let i of d){let c=this.nodes.get(i);if(!c)continue;let u=c.neighbors.get(r)??[];if(u.push(e),u.length>a){let m=u.filter(g=>this.nodes.has(g)).map(g=>({id:g,score:p(c.embedding,this.nodes.get(g).embedding)}));m.sort((g,y)=>y.score-g.score),c.neighbors.set(r,m.slice(0,a).map(g=>g.id))}else c.neighbors.set(r,u)}h.length>0&&(o=h[0].id)}s>this.currentMaxLevel&&(this.entryPoint=e,this.currentMaxLevel=s)}remove(e){let t=this.nodes.get(e);if(!t)return!1;for(let[s,n]of t.neighbors.entries())for(let o of n){let r=this.nodes.get(o);if(!r)continue;let a=r.neighbors.get(s);if(!a)continue;let h=a.indexOf(e);h!==-1&&a.splice(h,1);let d=this.getMaxConnections(s);if(a.length<d){for(let i of n)if(i!==o&&i!==e&&this.nodes.has(i)&&!a.includes(i)){a.push(i);let c=this.nodes.get(i);if(c){let u=c.neighbors.get(s)??[];!u.includes(o)&&u.length<d&&(u.push(o),c.neighbors.set(s,u))}if(a.length>=d)break}}r.neighbors.set(s,a)}if(this.nodes.delete(e),this.entryPoint===e)if(this.nodes.size===0)this.entryPoint=null,this.currentMaxLevel=-1;else{let s=null,n=-1;for(let[o,r]of this.nodes.entries()){let a=-1;for(let h of r.neighbors.keys())h>a&&(a=h);a>n&&(n=a,s=o)}this.entryPoint=s,this.currentMaxLevel=n}return!0}search(e,t){if(this.nodes.size===0||this.entryPoint===null)return[];if(this.nodes.size===1){let r=this.nodes.get(this.entryPoint);return[{id:r.id,score:p(e,r.embedding)}]}let s=this.entryPoint;for(let r=this.currentMaxLevel;r>0;r--)s=this.searchLayer(e,s,r);let n=Math.max(this.efSearch,t);return this.searchLayerBeam(e,[s],0,n).slice(0,t)}size(){return this.nodes.size}clear(){this.nodes.clear(),this.entryPoint=null,this.currentMaxLevel=-1}};A=class{ids=[];vectors=[];norms=[];idToIndex=new Map;initialized=!1;constructor(){if(w&&!this.initialized)try{w(),this.initialized=!0}catch{this.initialized=f!==null}}add(e,t){let s=new Float32Array(t),n=x(s);if(this.idToIndex.has(e)){let r=this.idToIndex.get(e);this.vectors[r]=s,this.norms[r]=n;return}let o=this.ids.length;this.ids.push(e),this.vectors.push(s),this.norms.push(n),this.idToIndex.set(e,o)}search(e,t){if(this.ids.length===0)return[];let s=Math.min(t,this.ids.length),n=this.vectors.length>0?this.vectors[0].length:0,o=e.length,r=n===o;if(f&&this.vectors.length>0&&r){let i=new Float32Array(e),c=x(i);return f(i,this.vectors,s,1).indices.map(m=>({id:this.ids[m],score:C(i,this.vectors[m],c,this.norms[m])}))}let a=new Float32Array(e),h=x(a),d=[];for(let i=0;i<this.ids.length;i++){let c=this.vectors[i];if(c.length!==a.length){i===0&&console.warn(`[RuvectorFlatIndex] Dimension mismatch: query=${a.length}, stored=${c.length}. Skipping ${this.ids.length} mismatched vectors. Re-index with correct dimensions.`);continue}else d.push({id:this.ids[i],score:C(a,c,h,this.norms[i])})}return d.sort((i,c)=>c.score-i.score),d.slice(0,s)}remove(e){let t=this.idToIndex.get(e);if(t===void 0)return!1;let s=this.ids.length-1;if(t!==s){let n=this.ids[s];this.ids[t]=n,this.vectors[t]=this.vectors[s],this.norms[t]=this.norms[s],this.idToIndex.set(n,t)}return this.ids.pop(),this.vectors.pop(),this.norms.pop(),this.idToIndex.delete(e),!0}clear(){this.ids=[],this.vectors=[],this.norms=[],this.idToIndex.clear()}size(){return this.ids.length}},M=class{adapter;constructor(e,t){this.adapter=T.create(e,t)}add(e,t){this.adapter.addByStringId(e,t)}search(e,t){return this.adapter.searchByArray(e,t)}remove(e){return this.adapter.removeByStringId(e)}clear(){this.adapter.clear()}size(){return this.adapter.size()}recall(){return this.adapter.recall()}getProvider(){return this.adapter}}});export{v as a,I as b,A as c,M as d,U as e,D as f};
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.10.4");process.exit(0)}
2
+ import{a as N,d as P}from"./chunk-N3MM4Z33.js";import{b,e as k}from"./chunk-6OLHPWSN.js";import{a as p,d as F}from"./chunk-WI5WXYIS.js";import{a as T,c as E}from"./chunk-EMZ3DXMG.js";import{a as H,b as O}from"./chunk-MFWWPRBV.js";import{c as z,g as S}from"./chunk-SVILIQQQ.js";function x(l){let e=0;for(let t=0;t<l.length;t++)e+=l[t]*l[t];return Math.sqrt(e)}function C(l,e,t,s){let n=t*s;if(n===0)return 0;let o=0;for(let r=0;r<l.length;r++)o+=l[r]*e[r];return o/n}function U(l={}){let{name:e="default",...t}=l;return new M(e,t)}var f,w,v,I,A,M,D=z(()=>{F();P();k();E();f=null,w=null;try{let l=(O(),S(H));f=l.differentiableSearch,w=l.init}catch{}v=class{data=[];compareFn;constructor(e){this.compareFn=e}push(e){this.data.push(e),this.bubbleUp(this.data.length-1)}pop(){if(this.data.length===0)return;let e=this.data[0],t=this.data.pop();return this.data.length>0&&(this.data[0]=t,this.sinkDown(0)),e}peek(){return this.data[0]}size(){return this.data.length}bubbleUp(e){for(;e>0;){let t=e-1>>1;if(this.compareFn(this.data[e],this.data[t])<0)[this.data[e],this.data[t]]=[this.data[t],this.data[e]],e=t;else break}}sinkDown(e){let t=this.data.length;for(;;){let s=e,n=2*e+1,o=2*e+2;if(n<t&&this.compareFn(this.data[n],this.data[s])<0&&(s=n),o<t&&this.compareFn(this.data[o],this.data[s])<0&&(s=o),s!==e)[this.data[e],this.data[s]]=[this.data[s],this.data[e]],e=s;else break}}},I=class{nodes=new Map;M=b.M_CONNECTIONS;Mmax0=b.M_CONNECTIONS*2;efConstruction=b.EF_CONSTRUCTION;efSearch=b.EF_SEARCH;mL=1/Math.log(b.M_CONNECTIONS);maxLevel=16;entryPoint=null;currentMaxLevel=-1;randomLevel(){return Math.min(Math.floor(-Math.log(N())*this.mL),this.maxLevel)}similarity(e,t){let s=this.nodes.get(t);return s?p(e,s.embedding):-1}searchLayer(e,t,s){let n=t,o=this.similarity(e,n),r=!0;for(;r;){r=!1;let a=this.nodes.get(n);if(!a)break;let h=a.neighbors.get(s)??[];for(let d of h){if(!this.nodes.has(d))continue;let i=this.similarity(e,d);i>o&&(n=d,o=i,r=!0)}}return n}searchLayerBeam(e,t,s,n){let o=new Set(t),r=t.filter(i=>this.nodes.has(i)).map(i=>({id:i,score:this.similarity(e,i)})),a=new v((i,c)=>c.score-i.score),h=new v((i,c)=>i.score-c.score);for(let i of r)a.push(i),h.push(i);for(;a.size()>0;){let i=a.pop();if(h.size()>=n&&i.score<h.peek().score)break;let c=this.nodes.get(i.id);if(!c)continue;let u=c.neighbors.get(s)??[];for(let m of u){if(o.has(m)||(o.add(m),!this.nodes.has(m)))continue;let g=this.similarity(e,m),y=h.size()>=n?h.peek().score:-1/0;if(h.size()<n||g>y){let L={id:m,score:g};a.push(L),h.push(L),h.size()>n&&h.pop()}}}let d=[];for(;h.size()>0;)d.push(h.pop());return d.reverse(),d}selectNeighbors(e,t,s){return t.sort((n,o)=>o.score-n.score).slice(0,s).map(n=>n.id)}getMaxConnections(e){return e===0?this.Mmax0:this.M}add(e,t){this.nodes.has(e)&&this.remove(e);let s=this.randomLevel(),n={id:e,embedding:t,neighbors:new Map};for(let r=0;r<=s;r++)n.neighbors.set(r,[]);if(this.nodes.set(e,n),this.entryPoint===null){this.entryPoint=e,this.currentMaxLevel=s;return}let o=this.entryPoint;for(let r=this.currentMaxLevel;r>s;r--)o=this.searchLayer(t,o,r);for(let r=Math.min(s,this.currentMaxLevel);r>=0;r--){let a=this.getMaxConnections(r),h=this.searchLayerBeam(t,[o],r,this.efConstruction),d=this.selectNeighbors(t,h,a);n.neighbors.set(r,[...d]);for(let i of d){let c=this.nodes.get(i);if(!c)continue;let u=c.neighbors.get(r)??[];if(u.push(e),u.length>a){let m=u.filter(g=>this.nodes.has(g)).map(g=>({id:g,score:p(c.embedding,this.nodes.get(g).embedding)}));m.sort((g,y)=>y.score-g.score),c.neighbors.set(r,m.slice(0,a).map(g=>g.id))}else c.neighbors.set(r,u)}h.length>0&&(o=h[0].id)}s>this.currentMaxLevel&&(this.entryPoint=e,this.currentMaxLevel=s)}remove(e){let t=this.nodes.get(e);if(!t)return!1;for(let[s,n]of t.neighbors.entries())for(let o of n){let r=this.nodes.get(o);if(!r)continue;let a=r.neighbors.get(s);if(!a)continue;let h=a.indexOf(e);h!==-1&&a.splice(h,1);let d=this.getMaxConnections(s);if(a.length<d){for(let i of n)if(i!==o&&i!==e&&this.nodes.has(i)&&!a.includes(i)){a.push(i);let c=this.nodes.get(i);if(c){let u=c.neighbors.get(s)??[];!u.includes(o)&&u.length<d&&(u.push(o),c.neighbors.set(s,u))}if(a.length>=d)break}}r.neighbors.set(s,a)}if(this.nodes.delete(e),this.entryPoint===e)if(this.nodes.size===0)this.entryPoint=null,this.currentMaxLevel=-1;else{let s=null,n=-1;for(let[o,r]of this.nodes.entries()){let a=-1;for(let h of r.neighbors.keys())h>a&&(a=h);a>n&&(n=a,s=o)}this.entryPoint=s,this.currentMaxLevel=n}return!0}search(e,t){if(this.nodes.size===0||this.entryPoint===null)return[];if(this.nodes.size===1){let r=this.nodes.get(this.entryPoint);return[{id:r.id,score:p(e,r.embedding)}]}let s=this.entryPoint;for(let r=this.currentMaxLevel;r>0;r--)s=this.searchLayer(e,s,r);let n=Math.max(this.efSearch,t);return this.searchLayerBeam(e,[s],0,n).slice(0,t)}size(){return this.nodes.size}clear(){this.nodes.clear(),this.entryPoint=null,this.currentMaxLevel=-1}};A=class{ids=[];vectors=[];norms=[];idToIndex=new Map;initialized=!1;constructor(){if(w&&!this.initialized)try{w(),this.initialized=!0}catch{this.initialized=f!==null}}add(e,t){let s=new Float32Array(t),n=x(s);if(this.idToIndex.has(e)){let r=this.idToIndex.get(e);this.vectors[r]=s,this.norms[r]=n;return}let o=this.ids.length;this.ids.push(e),this.vectors.push(s),this.norms.push(n),this.idToIndex.set(e,o)}search(e,t){if(this.ids.length===0)return[];let s=Math.min(t,this.ids.length),n=this.vectors.length>0?this.vectors[0].length:0,o=e.length,r=n===o;if(f&&this.vectors.length>0&&r){let i=new Float32Array(e),c=x(i);return f(i,this.vectors,s,1).indices.map(m=>({id:this.ids[m],score:C(i,this.vectors[m],c,this.norms[m])}))}let a=new Float32Array(e),h=x(a),d=[];for(let i=0;i<this.ids.length;i++){let c=this.vectors[i];if(c.length!==a.length){i===0&&console.warn(`[RuvectorFlatIndex] Dimension mismatch: query=${a.length}, stored=${c.length}. Skipping ${this.ids.length} mismatched vectors. Re-index with correct dimensions.`);continue}else d.push({id:this.ids[i],score:C(a,c,h,this.norms[i])})}return d.sort((i,c)=>c.score-i.score),d.slice(0,s)}remove(e){let t=this.idToIndex.get(e);if(t===void 0)return!1;let s=this.ids.length-1;if(t!==s){let n=this.ids[s];this.ids[t]=n,this.vectors[t]=this.vectors[s],this.norms[t]=this.norms[s],this.idToIndex.set(n,t)}return this.ids.pop(),this.vectors.pop(),this.norms.pop(),this.idToIndex.delete(e),!0}clear(){this.ids=[],this.vectors=[],this.norms=[],this.idToIndex.clear()}size(){return this.ids.length}},M=class{adapter;constructor(e,t){this.adapter=T.create(e,t)}add(e,t){this.adapter.addByStringId(e,t)}search(e,t){return this.adapter.searchByArray(e,t)}remove(e){return this.adapter.removeByStringId(e)}clear(){this.adapter.clear()}size(){return this.adapter.size()}recall(){return this.adapter.recall()}getProvider(){return this.adapter}}});export{v as a,I as b,A as c,M as d,U as e,D as f};
@@ -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.10.2");process.exit(0)}
2
- import{j as p}from"./chunk-UWXH2UQK.js";import{a as f,c as R}from"./chunk-XPCNUX2U.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-Q2S75M2F.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
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.4");process.exit(0)}
2
+ import{j as p}from"./chunk-F77X5DAF.js";import{a as f,c as R}from"./chunk-2B6ETC7C.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-4NYLZ7FA.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.10.2");process.exit(0)}
2
- import{a,b as u}from"./chunk-4BXGVM2C.js";import{f as p,o as P}from"./chunk-L7VIX22Y.js";P();import*as i from"fs";import*as d from"path";var v="llm-config.json",f={claude:["ANTHROPIC_API_KEY","CLAUDE_API_KEY"],openai:["OPENAI_API_KEY"],ollama:[],openrouter:["OPENROUTER_API_KEY"],gemini:["GOOGLE_AI_API_KEY","GEMINI_API_KEY","GOOGLE_API_KEY"],"azure-openai":["AZURE_OPENAI_API_KEY"],bedrock:["AWS_ACCESS_KEY_ID"],onnx:[]},R=new Set(["claude","openai","ollama","openrouter","gemini","azure-openai","bedrock"]);function E(e){let r=e??p();return d.join(r,".agentic-qe",v)}function _(e=process.env){let r=new Set;for(let n of a){if(!R.has(n))continue;let o=f[n];if(o.length===0){r.add(n);continue}o.some(t=>(e[t]??"").trim().length>0)&&r.add(n)}return r}function g(e){let r=E(e);if(!i.existsSync(r))return{};let n=i.readFileSync(r,"utf8");if(!n.trim())return{};let o=JSON.parse(n);if(typeof o!="object"||o===null)throw new Error(`Invalid ${v}: expected object, got ${typeof o}`);return o}function C(e,r){let n=E(r),o=d.dirname(n);i.existsSync(o)||i.mkdirSync(o,{recursive:!0});let t=y(e),s=JSON.stringify(t,null,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.10.4");process.exit(0)}
2
+ import{a,b as u}from"./chunk-MHWYQHGN.js";import{m as P}from"./chunk-NZGLDOU4.js";import{b as p}from"./chunk-U27GVYXA.js";P();import*as i from"fs";import*as d from"path";var v="llm-config.json",f={claude:["ANTHROPIC_API_KEY","CLAUDE_API_KEY"],openai:["OPENAI_API_KEY"],ollama:[],openrouter:["OPENROUTER_API_KEY"],gemini:["GOOGLE_AI_API_KEY","GEMINI_API_KEY","GOOGLE_API_KEY"],"azure-openai":["AZURE_OPENAI_API_KEY"],bedrock:["AWS_ACCESS_KEY_ID"],onnx:[]},R=new Set(["claude","openai","ollama","openrouter","gemini","azure-openai","bedrock"]);function E(e){let r=e??p();return d.join(r,".agentic-qe",v)}function _(e=process.env){let r=new Set;for(let n of a){if(!R.has(n))continue;let o=f[n];if(o.length===0){r.add(n);continue}o.some(t=>(e[t]??"").trim().length>0)&&r.add(n)}return r}function g(e){let r=E(e);if(!i.existsSync(r))return{};let n=i.readFileSync(r,"utf8");if(!n.trim())return{};let o=JSON.parse(n);if(typeof o!="object"||o===null)throw new Error(`Invalid ${v}: expected object, got ${typeof o}`);return o}function C(e,r){let n=E(r),o=d.dirname(n);i.existsSync(o)||i.mkdirSync(o,{recursive:!0});let t=y(e),s=JSON.stringify(t,null,2)+`
3
3
  `,c=n+".tmp-"+process.pid;i.writeFileSync(c,s,{encoding:"utf8",mode:384}),i.renameSync(c,n)}function y(e){if(!e.providers)return JSON.parse(JSON.stringify(e));let r=JSON.parse(JSON.stringify(e)),n=[];if(r.providers)for(let o of Object.keys(r.providers)){let t=r.providers[o];t&&"apiKey"in t&&t.apiKey&&(delete t.apiKey,n.push(o))}return n.length>0&&console.warn(`[router-config] Refused to persist apiKey for: ${n.join(", ")}. API keys belong in environment variables (e.g. ANTHROPIC_API_KEY, GEMINI_API_KEY, OPENAI_API_KEY, OPENROUTER_API_KEY), NOT in .agentic-qe/llm-config.json which may be checked into source control.`),r}function l(e,r){let n={...e,...r,providers:{...e.providers??{}}};if(r.providers)for(let[o,t]of Object.entries(r.providers)){if(!t)continue;let s=o;n.providers[s]={...e.providers?.[s]??{},...t}}return n}function m(e,r=process.env){let n=_(r),o={...e,providers:{...e.providers??{}}};for(let t of n){if(f[t].length===0)continue;let c=o.providers[t]??{enabled:!1};c.enabled||(o.providers[t]={...c,enabled:!0})}return o}function A(e={}){let r=g(e.projectRoot),n=l(u,r),o=m(n,e.env);return e.override?l(o,e.override):o}function S(e={}){let r=e.env??process.env;for(let o of a){let t=f[o];if(t.length!==0&&t.some(s=>(r[s]??"").trim().length>0))return!0}let n=g(e.projectRoot);if(n.providers){for(let o of Object.values(n.providers))if(o?.enabled)return!0}return!1}export{_ as a,C as b,A as c,S as d};
@@ -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.10.2");process.exit(0)}
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.10.4");process.exit(0)}
2
2
  var l=class m{vertices=new Map;edges=new Map;adjacencyList=new Map;totalWeight=0;addVertex(e){if(this.vertices.has(e.id)){this.vertices.set(e.id,e);return}this.vertices.set(e.id,e),this.adjacencyList.set(e.id,[])}removeVertex(e){if(!this.vertices.has(e))return!1;let t=this.adjacencyList.get(e)||[];for(let r of t)this.removeEdge(e,r.neighborId);for(let[,r]of this.adjacencyList){let n=r.findIndex(i=>i.neighborId===e);n!==-1&&(this.totalWeight-=r[n].weight,r.splice(n,1))}return this.vertices.delete(e),this.adjacencyList.delete(e),!0}getVertex(e){return this.vertices.get(e)}hasVertex(e){return this.vertices.has(e)}getVertices(){return Array.from(this.vertices.values())}getVertexIds(){return Array.from(this.vertices.keys())}getVerticesByDomain(e){return this.getVertices().filter(t=>t.domain===e)}getVerticesByType(e){return this.getVertices().filter(t=>t.type===e)}addEdge(e){if(!this.vertices.has(e.source))throw new Error(`Source vertex ${e.source} does not exist`);if(!this.vertices.has(e.target))throw new Error(`Target vertex ${e.target} does not exist`);let t=this.edgeKey(e.source,e.target);if(this.edges.has(t)){let r=this.edges.get(t);this.totalWeight-=r.weight,this.removeFromAdjacency(e.source,e.target),r.bidirectional&&this.removeFromAdjacency(e.target,e.source)}this.edges.set(t,e),this.totalWeight+=e.weight,this.addToAdjacency(e.source,e.target,e.weight,e),e.bidirectional&&this.addToAdjacency(e.target,e.source,e.weight,e)}removeEdge(e,t){let r=this.edgeKey(e,t),n=this.edges.get(r);return n?(this.totalWeight-=n.weight,this.edges.delete(r),this.removeFromAdjacency(e,t),n.bidirectional&&this.removeFromAdjacency(t,e),!0):!1}getEdge(e,t){return this.edges.get(this.edgeKey(e,t))}hasEdge(e,t){return this.edges.has(this.edgeKey(e,t))}getEdges(){return Array.from(this.edges.values())}getEdgesForVertex(e){return(this.adjacencyList.get(e)||[]).map(r=>r.edge)}degree(e){return this.adjacencyList.get(e)?.length||0}weightedDegree(e){let t=this.adjacencyList.get(e);return t?t.reduce((r,n)=>r+n.weight,0):0}neighbors(e){return(this.adjacencyList.get(e)||[]).map(r=>({vertex:this.vertices.get(r.neighborId),weight:r.weight})).filter(r=>r.vertex!==void 0)}neighborIds(e){return(this.adjacencyList.get(e)||[]).map(r=>r.neighborId)}getStats(){let e=this.vertices.size,t=this.edges.size,r=0;for(let[,s]of this.adjacencyList)r+=s.length;let n=e>0?r/e:0,i=e>1?e*(e-1)/2:0,a=i>0?t/i:0,o=this.countConnectedComponents(),c=o===1&&e>0;return{vertexCount:e,edgeCount:t,totalWeight:this.totalWeight,averageDegree:n,density:a,isConnected:c,componentCount:o}}countConnectedComponents(){let e=new Set,t=0;for(let r of this.vertices.keys())e.has(r)||(this.dfs(r,e),t++);return t}dfs(e,t){t.add(e);let r=this.adjacencyList.get(e)||[];for(let n of r)t.has(n.neighborId)||this.dfs(n.neighborId,t)}isConnected(){if(this.vertices.size===0||this.vertices.size===1)return!0;let e=new Set,t=this.vertices.keys().next().value;return t===void 0?!0:(this.dfs(t,e),e.size===this.vertices.size)}getConnectedComponent(e){if(!this.vertices.has(e))return[];let t=new Set;return this.dfs(e,t),Array.from(t)}snapshot(){return{timestamp:new Date,vertices:this.getVertices(),edges:this.getEdges(),stats:this.getStats()}}clone(){let e=new m;for(let t of this.vertices.values())e.addVertex({...t});for(let t of this.edges.values())e.addEdge({...t});return e}static fromSnapshot(e){let t=new m;for(let r of e.vertices)t.addVertex(r);for(let r of e.edges)t.addEdge(r);return t}clear(){this.vertices.clear(),this.edges.clear(),this.adjacencyList.clear(),this.totalWeight=0}get vertexCount(){return this.vertices.size}get edgeCount(){return this.edges.size}isEmpty(){return this.vertices.size===0}edgeKey(e,t){return e<t?`${e}:${t}`:`${t}:${e}`}addToAdjacency(e,t,r,n){let i=this.adjacencyList.get(e);i&&(i.find(o=>o.neighborId===t)||i.push({neighborId:t,weight:r,edge:n}))}removeFromAdjacency(e,t){let r=this.adjacencyList.get(e);if(r){let n=r.findIndex(i=>i.neighborId===t);n!==-1&&r.splice(n,1)}}};function p(){return new l}var f=class{approxMinCut(e){let t=Date.now();if(e.isEmpty())return this.emptyResult(t,"weighted-degree");let r=e.getVertexIds(),n=1/0,i=null;for(let o of r){let c=e.weightedDegree(o);c<n&&(n=c,i=o)}if(i===null||r.length===1)return this.emptyResult(t,"weighted-degree");let a=e.getEdgesForVertex(i);return{value:n,sourceSide:[i],targetSide:r.filter(o=>o!==i),cutEdges:a,calculatedAt:new Date,algorithm:"weighted-degree",durationMs:Date.now()-t}}findWeakVertices(e,t){if(e.isEmpty())return[];let r=e.getVertices(),n=[],i=new Map,a=0;for(let g of r){let h=e.weightedDegree(g.id);i.set(g.id,h),a+=h}let o=a/r.length,c=0;for(let g of i.values())c+=(g-o)**2;let s=Math.sqrt(c/r.length),d=1/0;for(let g of i.values())g<d&&(d=g);let u=t??o-s;for(let g of r){let h=i.get(g.id);if(h<=u){let w=this.calculateRiskScore(h,o,s,d),y=this.determineWeakReason(g,h,o,e),v=this.generateStrengtheningActions(g,e,h);n.push({vertexId:g.id,vertex:g,weightedDegree:h,riskScore:w,reason:y,suggestions:v})}}return n.sort((g,h)=>h.riskScore-g.riskScore),n}getMinCutValue(e){if(e.isEmpty())return 0;let t=1/0;for(let r of e.getVertexIds()){let n=e.weightedDegree(r);n<t&&(t=n)}return t===1/0?0:t}isConnectivityCritical(e,t){return this.getMinCutValue(e)<t}getMinDegreeVertex(e){if(e.isEmpty())return null;let t=1/0,r=null;for(let n of e.getVertexIds()){let i=e.weightedDegree(n);i<t&&(t=i,r=n)}return r?{vertexId:r,degree:t}:null}getLocalMinCut(e,t){return e.hasVertex(t)?e.weightedDegree(t):0}findPartitioningPoints(e){if(e.isEmpty()||e.vertexCount<2)return[];let t=this.findArticulationPoints(e),r=[];for(let n of e.getVertices()){let i=this.getLocalMinCut(e,n.id);r.push({vertexId:n.id,localMinCut:i,wouldDisconnect:t.has(n.id)&&e.vertexCount>2})}return r.sort((n,i)=>n.localMinCut-i.localMinCut),r}findArticulationPoints(e){let t=new Map,r=new Map,n=new Map,i=new Set,a=0,o=e.getVertexIds();for(let s of o)t.set(s,-1),r.set(s,-1),n.set(s,null);let c=s=>{let d=0;t.set(s,a),r.set(s,a),a++;for(let u of e.neighborIds(s))t.get(u)===-1?(d++,n.set(u,s),c(u),r.set(s,Math.min(r.get(s),r.get(u))),n.get(s)===null&&d>1&&i.add(s),n.get(s)!==null&&r.get(u)>=t.get(s)&&i.add(s)):u!==n.get(s)&&r.set(s,Math.min(r.get(s),t.get(u)))};for(let s of o)t.get(s)===-1&&c(s);return i}suggestEdgeAdditions(e,t){let r=this.findWeakVertices(e),n=[],i=0,a=e.getVertices().map(o=>({vertex:o,degree:e.weightedDegree(o.id)})).sort((o,c)=>c.degree-o.degree);for(let o of r){if(i>=t)break;let c=new Set(e.neighborIds(o.vertexId));for(let{vertex:s}of a){if(s.id===o.vertexId||c.has(s.id))continue;let d={source:o.vertexId,target:s.id,weight:1,type:"coordination",bidirectional:!0};n.push(d),i+=1;break}}return n}emptyResult(e,t){return{value:0,sourceSide:[],targetSide:[],cutEdges:[],calculatedAt:new Date,algorithm:t,durationMs:Date.now()-e}}calculateRiskScore(e,t,r,n){if(r===0)return .5;let i=(t-e)/r,a=1/(1+Math.exp(-i)),o=n>0?n/e:1;return Math.min(1,a*o)}determineWeakReason(e,t,r,n){return t===0?"Isolated vertex with no connections":n.degree(e.id)===1?"Single connection point (leaf node)":t<r*.5?`Low connectivity (${(t/r*100).toFixed(0)}% of average)`:"Below average connectivity threshold"}generateStrengtheningActions(e,t,r){let n=[],i=new Set(t.neighborIds(e.id)),a=t.getStats().averageDegree,o=Math.max(a,3),c=Math.ceil(o-r),s=t.getVertices().filter(d=>d.id!==e.id&&!i.has(d.id)).sort((d,u)=>t.weightedDegree(u.id)-t.weightedDegree(d.id)).slice(0,c);for(let d of s)n.push({type:"add_edge",targetVertex:d.id,priority:"high",estimatedImprovement:1});return e.type==="agent"&&e.domain&&r<1&&n.push({type:"spawn_agent",domain:e.domain,priority:"critical",estimatedImprovement:2}),i.size>0&&i.size<3&&n.push({type:"increase_weight",weightDelta:.5,priority:"medium",estimatedImprovement:.5*i.size}),n}};function x(){return new f}export{l as a,p as b,f as c,x as d};
@@ -1,16 +1,16 @@
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.10.2");process.exit(0)}
2
- import{a as te,b as ne}from"./chunk-QJ2EHLJ2.js";import{b as ee}from"./chunk-2244IFZA.js";import{a as k}from"./chunk-EA7ZSN3V.js";import{b as E,d as fe}from"./chunk-SW4OKUTC.js";import{a as b,c as T}from"./chunk-XPCNUX2U.js";var he={M:16,efConstruction:200,efSearch:100},P={enabled:!0,pretrainedPatterns:!0,hnswConfig:he,promotionThreshold:3,qualityThreshold:.7,embeddingModel:"auto"},_={mode:"hybrid",confidenceThreshold:.7,feedbackEnabled:!0,cacheEnabled:!0,cacheTTLMs:300*1e3},F={enabled:["pattern-consolidator","coverage-gap-scanner","flaky-test-detector","routing-accuracy-monitor"],intervals:{"pattern-consolidator":1800*1e3,"coverage-gap-scanner":3600*1e3,"flaky-test-detector":7200*1e3,"routing-accuracy-monitor":900*1e3},maxConcurrent:4,daemonAutoStart:!0},N={claudeCode:!0,preCommit:!1,ciIntegration:!1},$={install:!0,installV2:!0,installV3:!0,overwrite:!1},O={enabled:!0,parameters:["hnsw.efSearch","routing.confidenceThreshold","pattern.promotionThreshold","testGen.complexityLimit"],tuningIntervalMs:10080*60*1e3,evaluationPeriodMs:5e3};var L=["test-generation","test-execution","coverage-analysis","quality-assessment","defect-intelligence","requirements-validation","code-intelligence","security-compliance","contract-testing","visual-accessibility","chaos-resilience","learning-optimization","enterprise-integration"];function M(){return"3.10.2"}function Fe(i,e){return{version:M(),project:{name:i,root:e,type:"single"},learning:P,routing:_,workers:F,hooks:N,skills:$,autoTuning:O,domains:{enabled:L,disabled:[]},agents:{maxConcurrent:15,defaultTimeout:6e4}}}fe();import{readFileSync as w,existsSync as p,statSync as ye,readdirSync as ve}from"fs";import{join as u,basename as ie,extname as re,relative as V}from"path";var be=[{name:"jest",detect:i=>{let e=["jest.config.js","jest.config.ts","jest.config.mjs","jest.config.cjs"];for(let n of e)if(p(u(i,n)))return{name:"jest",version:A(i,"jest"),configFile:n,confidence:1};let t=S(i);return t?.jest?{name:"jest",version:A(i,"jest"),configFile:"package.json",confidence:.9}:t?.devDependencies?.jest||t?.dependencies?.jest?{name:"jest",version:t.devDependencies?.jest||t.dependencies?.jest,confidence:.7}:null}},{name:"vitest",detect:i=>{let e=["vitest.config.ts","vitest.config.js","vitest.config.mts","vite.config.ts"];for(let n of e)if(p(u(i,n)))return{name:"vitest",version:A(i,"vitest"),configFile:n,confidence:1};let t=S(i);return t?.devDependencies?.vitest||t?.dependencies?.vitest?{name:"vitest",version:t.devDependencies?.vitest,confidence:.8}:null}},{name:"mocha",detect:i=>{let e=[".mocharc.js",".mocharc.json",".mocharc.yaml",".mocharc.yml"];for(let n of e)if(p(u(i,n)))return{name:"mocha",version:A(i,"mocha"),configFile:n,confidence:1};let t=S(i);return t?.devDependencies?.mocha?{name:"mocha",version:t.devDependencies?.mocha,confidence:.8}:null}},{name:"pytest",detect:i=>{let e=["pytest.ini","pyproject.toml","setup.cfg"];for(let n of e){let r=u(i,n);if(p(r))try{let s=w(r,"utf-8");if(s.includes("[pytest]")||s.includes("[tool.pytest]"))return{name:"pytest",configFile:n,confidence:1}}catch(s){console.debug("[ProjectAnalyzer] Config read failed:",s instanceof Error?s.message:s)}}let t=u(i,"requirements.txt");if(p(t))try{if(w(t,"utf-8").includes("pytest"))return{name:"pytest",configFile:"requirements.txt",confidence:.8}}catch(n){console.debug("[ProjectAnalyzer] requirements.txt read failed:",n instanceof Error?n.message:n)}return null}},{name:"playwright",detect:i=>{let e=["playwright.config.ts","playwright.config.js"];for(let n of e)if(p(u(i,n)))return{name:"playwright",version:A(i,"@playwright/test"),configFile:n,confidence:1};let t=S(i);return t?.devDependencies?.["@playwright/test"]?{name:"playwright",version:t.devDependencies["@playwright/test"],confidence:.8}:null}},{name:"cypress",detect:i=>{let e=["cypress.config.ts","cypress.config.js","cypress.json"];for(let t of e)if(p(u(i,t)))return{name:"cypress",version:A(i,"cypress"),configFile:t,confidence:1};return p(u(i,"cypress"))?{name:"cypress",configFile:"cypress/",confidence:.9}:null}}],ke=[{name:"typescript",extensions:[".ts",".tsx",".mts",".cts"]},{name:"javascript",extensions:[".js",".jsx",".mjs",".cjs"]},{name:"python",extensions:[".py",".pyw"]},{name:"java",extensions:[".java"]},{name:"go",extensions:[".go"]},{name:"rust",extensions:[".rs"]},{name:"csharp",extensions:[".cs"]},{name:"ruby",extensions:[".rb"]},{name:"php",extensions:[".php"]},{name:"kotlin",extensions:[".kt",".kts"]},{name:"swift",extensions:[".swift"]}];function S(i){let e=u(i,"package.json");if(!p(e))return null;try{return E(w(e,"utf-8"))}catch{return null}}function A(i,e){let t=S(i);if(t)return t.devDependencies?.[e]||t.dependencies?.[e]}function Q(i,e,t={}){let{maxDepth:n=10,exclude:r=["node_modules",".git","dist","build","coverage",".next","__pycache__"]}=t;function s(o,a){if(a>n)return;let l;try{l=ve(o)}catch{return}for(let g of l){if(r.includes(g))continue;let c=u(o,g),x;try{x=ye(c)}catch{continue}x.isDirectory()?s(c,a+1):x.isFile()&&e(c)}}s(i,0)}var W=class{projectRoot;constructor(e){this.projectRoot=e}async analyze(){let e=Date.now(),[t,n,r,s,o]=await Promise.all([this.detectFrameworks(),this.detectLanguages(),this.detectExistingTests(),this.analyzeComplexity(),this.measureCoverage()]);return{projectName:S(this.projectRoot)?.name||ie(this.projectRoot),projectRoot:this.projectRoot,projectType:this.detectProjectType(),frameworks:t,languages:n,existingTests:r,codeComplexity:s,coverage:o,packageManager:this.detectPackageManager(),hasTypeScript:p(u(this.projectRoot,"tsconfig.json")),hasCIConfig:this.detectCIConfig(),ciProvider:this.detectCIProvider(),analysisTimestamp:new Date,analysisDurationMs:Date.now()-e}}async detectFrameworks(){let e=[];for(let t of be){let n=t.detect(this.projectRoot);n&&e.push(n)}return e.sort((t,n)=>n.confidence-t.confidence)}async detectLanguages(){let e=new Map,t=0;Q(this.projectRoot,r=>{let s=re(r).toLowerCase();if(s){for(let o of ke)if(o.extensions.includes(s)){let a=e.get(o.name)||{count:0,extensions:new Set};a.count++,a.extensions.add(s),e.set(o.name,a),t++;break}}});let n=[];for(let[r,s]of e)n.push({name:r,percentage:t>0?Math.round(s.count/t*100):0,fileCount:s.count,extensions:Array.from(s.extensions)});return n.sort((r,s)=>s.fileCount-r.fileCount)}async detectExistingTests(){let e={totalCount:0,byFramework:{},byType:{unit:0,integration:0,e2e:0,unknown:0},directories:[]},t=new Set,n=[/\.test\.[jt]sx?$/,/\.spec\.[jt]sx?$/,/_test\.[jt]sx?$/,/test_.*\.py$/,/.*_test\.py$/,/.*_test\.go$/,/.*Test\.java$/];return Q(this.projectRoot,r=>{let s=ie(r);if(n.some(a=>a.test(s))){e.totalCount++;let a=V(this.projectRoot,r).toLowerCase();a.includes("e2e")||a.includes("cypress")||a.includes("playwright")?e.byType.e2e++:a.includes("integration")||a.includes("int-test")?e.byType.integration++:a.includes("unit")||a.includes("__tests__")||a.includes("test/")?e.byType.unit++:e.byType.unknown++;let l=V(this.projectRoot,u(r,".."));t.add(l)}}),e.directories=Array.from(t).slice(0,10),e}async analyzeComplexity(){let e=[],t=[],n=0,r=0;Q(this.projectRoot,a=>{let l=re(a);if([".ts",".tsx",".js",".jsx",".py",".java",".go"].includes(l))try{let g=w(a,"utf-8"),c=this.calculateFileComplexity(g,l);t.push(...c.functionComplexities),c.maxComplexity>n&&(n=c.maxComplexity),r++,c.maxComplexity>10&&e.push(V(this.projectRoot,a))}catch(g){console.debug("[ProjectAnalyzer] Complexity analysis read failed:",g instanceof Error?g.message:g)}});let s=t.reduce((a,l)=>a+l,0),o=t.length>0?s/t.length:0;return{averageCyclomatic:Math.round(o*10)/10,maxCyclomatic:n,totalFiles:r,complexFiles:e.slice(0,20),recommendation:o<5?"simple":o<15?"medium":"complex"}}calculateFileComplexity(e,t){let n=this.stripCommentsAndStrings(e,t),r=this.calculateComplexity(n);return{functionComplexities:[r],maxComplexity:r}}removeDelimitedBlocks(e,t,n){let r="",s=0;for(;s<e.length;){let o=e.indexOf(t,s);if(o===-1){r+=e.slice(s);break}r+=e.slice(s,o);let a=e.indexOf(n,o+t.length);if(a===-1)break;s=a+n.length}return r}stripCommentsAndStrings(e,t){let n=e;return[".ts",".tsx",".js",".jsx",".java",".go"].includes(t)?(n=n.split(`
3
- `).map(r=>{let s=r.indexOf("//");return s>=0?r.slice(0,s):r}).join(`
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.10.4");process.exit(0)}
2
+ import{a as te,b as ne}from"./chunk-JYR3X4OC.js";import{b as ee}from"./chunk-2L5VFVCG.js";import{a as k}from"./chunk-PWJZZCHJ.js";import{b as E,d as fe}from"./chunk-IYFMDIYZ.js";import{a as b,c as T}from"./chunk-2B6ETC7C.js";var he={M:16,efConstruction:200,efSearch:100},P={enabled:!0,pretrainedPatterns:!0,hnswConfig:he,promotionThreshold:3,qualityThreshold:.7,embeddingModel:"auto"},_={mode:"hybrid",confidenceThreshold:.7,feedbackEnabled:!0,cacheEnabled:!0,cacheTTLMs:300*1e3},F={enabled:["pattern-consolidator","coverage-gap-scanner","flaky-test-detector","routing-accuracy-monitor"],intervals:{"pattern-consolidator":1800*1e3,"coverage-gap-scanner":3600*1e3,"flaky-test-detector":7200*1e3,"routing-accuracy-monitor":900*1e3},maxConcurrent:4,daemonAutoStart:!0},N={claudeCode:!0,preCommit:!1,ciIntegration:!1},$={install:!0,installV2:!0,installV3:!0,overwrite:!1},O={enabled:!0,parameters:["hnsw.efSearch","routing.confidenceThreshold","pattern.promotionThreshold","testGen.complexityLimit"],tuningIntervalMs:10080*60*1e3,evaluationPeriodMs:5e3};var L=["test-generation","test-execution","coverage-analysis","quality-assessment","defect-intelligence","requirements-validation","code-intelligence","security-compliance","contract-testing","visual-accessibility","chaos-resilience","learning-optimization","enterprise-integration"];function M(){return"3.10.4"}function Fe(r,e){return{version:M(),project:{name:r,root:e,type:"single"},learning:P,routing:_,workers:F,hooks:N,skills:$,autoTuning:O,domains:{enabled:L,disabled:[]},agents:{maxConcurrent:15,defaultTimeout:6e4}}}fe();import{readFileSync as w,existsSync as p,statSync as ye,readdirSync as ve}from"fs";import{join as u,basename as re,extname as ie,relative as V}from"path";var be=[{name:"jest",detect:r=>{let e=["jest.config.js","jest.config.ts","jest.config.mjs","jest.config.cjs"];for(let n of e)if(p(u(r,n)))return{name:"jest",version:A(r,"jest"),configFile:n,confidence:1};let t=S(r);return t?.jest?{name:"jest",version:A(r,"jest"),configFile:"package.json",confidence:.9}:t?.devDependencies?.jest||t?.dependencies?.jest?{name:"jest",version:t.devDependencies?.jest||t.dependencies?.jest,confidence:.7}:null}},{name:"vitest",detect:r=>{let e=["vitest.config.ts","vitest.config.js","vitest.config.mts","vite.config.ts"];for(let n of e)if(p(u(r,n)))return{name:"vitest",version:A(r,"vitest"),configFile:n,confidence:1};let t=S(r);return t?.devDependencies?.vitest||t?.dependencies?.vitest?{name:"vitest",version:t.devDependencies?.vitest,confidence:.8}:null}},{name:"mocha",detect:r=>{let e=[".mocharc.js",".mocharc.json",".mocharc.yaml",".mocharc.yml"];for(let n of e)if(p(u(r,n)))return{name:"mocha",version:A(r,"mocha"),configFile:n,confidence:1};let t=S(r);return t?.devDependencies?.mocha?{name:"mocha",version:t.devDependencies?.mocha,confidence:.8}:null}},{name:"pytest",detect:r=>{let e=["pytest.ini","pyproject.toml","setup.cfg"];for(let n of e){let i=u(r,n);if(p(i))try{let s=w(i,"utf-8");if(s.includes("[pytest]")||s.includes("[tool.pytest]"))return{name:"pytest",configFile:n,confidence:1}}catch(s){console.debug("[ProjectAnalyzer] Config read failed:",s instanceof Error?s.message:s)}}let t=u(r,"requirements.txt");if(p(t))try{if(w(t,"utf-8").includes("pytest"))return{name:"pytest",configFile:"requirements.txt",confidence:.8}}catch(n){console.debug("[ProjectAnalyzer] requirements.txt read failed:",n instanceof Error?n.message:n)}return null}},{name:"playwright",detect:r=>{let e=["playwright.config.ts","playwright.config.js"];for(let n of e)if(p(u(r,n)))return{name:"playwright",version:A(r,"@playwright/test"),configFile:n,confidence:1};let t=S(r);return t?.devDependencies?.["@playwright/test"]?{name:"playwright",version:t.devDependencies["@playwright/test"],confidence:.8}:null}},{name:"cypress",detect:r=>{let e=["cypress.config.ts","cypress.config.js","cypress.json"];for(let t of e)if(p(u(r,t)))return{name:"cypress",version:A(r,"cypress"),configFile:t,confidence:1};return p(u(r,"cypress"))?{name:"cypress",configFile:"cypress/",confidence:.9}:null}}],ke=[{name:"typescript",extensions:[".ts",".tsx",".mts",".cts"]},{name:"javascript",extensions:[".js",".jsx",".mjs",".cjs"]},{name:"python",extensions:[".py",".pyw"]},{name:"java",extensions:[".java"]},{name:"go",extensions:[".go"]},{name:"rust",extensions:[".rs"]},{name:"csharp",extensions:[".cs"]},{name:"ruby",extensions:[".rb"]},{name:"php",extensions:[".php"]},{name:"kotlin",extensions:[".kt",".kts"]},{name:"swift",extensions:[".swift"]}];function S(r){let e=u(r,"package.json");if(!p(e))return null;try{return E(w(e,"utf-8"))}catch{return null}}function A(r,e){let t=S(r);if(t)return t.devDependencies?.[e]||t.dependencies?.[e]}function Q(r,e,t={}){let{maxDepth:n=10,exclude:i=["node_modules",".git","dist","build","coverage",".next","__pycache__"]}=t;function s(o,a){if(a>n)return;let l;try{l=ve(o)}catch{return}for(let g of l){if(i.includes(g))continue;let c=u(o,g),x;try{x=ye(c)}catch{continue}x.isDirectory()?s(c,a+1):x.isFile()&&e(c)}}s(r,0)}var W=class{projectRoot;constructor(e){this.projectRoot=e}async analyze(){let e=Date.now(),[t,n,i,s,o]=await Promise.all([this.detectFrameworks(),this.detectLanguages(),this.detectExistingTests(),this.analyzeComplexity(),this.measureCoverage()]);return{projectName:S(this.projectRoot)?.name||re(this.projectRoot),projectRoot:this.projectRoot,projectType:this.detectProjectType(),frameworks:t,languages:n,existingTests:i,codeComplexity:s,coverage:o,packageManager:this.detectPackageManager(),hasTypeScript:p(u(this.projectRoot,"tsconfig.json")),hasCIConfig:this.detectCIConfig(),ciProvider:this.detectCIProvider(),analysisTimestamp:new Date,analysisDurationMs:Date.now()-e}}async detectFrameworks(){let e=[];for(let t of be){let n=t.detect(this.projectRoot);n&&e.push(n)}return e.sort((t,n)=>n.confidence-t.confidence)}async detectLanguages(){let e=new Map,t=0;Q(this.projectRoot,i=>{let s=ie(i).toLowerCase();if(s){for(let o of ke)if(o.extensions.includes(s)){let a=e.get(o.name)||{count:0,extensions:new Set};a.count++,a.extensions.add(s),e.set(o.name,a),t++;break}}});let n=[];for(let[i,s]of e)n.push({name:i,percentage:t>0?Math.round(s.count/t*100):0,fileCount:s.count,extensions:Array.from(s.extensions)});return n.sort((i,s)=>s.fileCount-i.fileCount)}async detectExistingTests(){let e={totalCount:0,byFramework:{},byType:{unit:0,integration:0,e2e:0,unknown:0},directories:[]},t=new Set,n=[/\.test\.[jt]sx?$/,/\.spec\.[jt]sx?$/,/_test\.[jt]sx?$/,/test_.*\.py$/,/.*_test\.py$/,/.*_test\.go$/,/.*Test\.java$/];return Q(this.projectRoot,i=>{let s=re(i);if(n.some(a=>a.test(s))){e.totalCount++;let a=V(this.projectRoot,i).toLowerCase();a.includes("e2e")||a.includes("cypress")||a.includes("playwright")?e.byType.e2e++:a.includes("integration")||a.includes("int-test")?e.byType.integration++:a.includes("unit")||a.includes("__tests__")||a.includes("test/")?e.byType.unit++:e.byType.unknown++;let l=V(this.projectRoot,u(i,".."));t.add(l)}}),e.directories=Array.from(t).slice(0,10),e}async analyzeComplexity(){let e=[],t=[],n=0,i=0;Q(this.projectRoot,a=>{let l=ie(a);if([".ts",".tsx",".js",".jsx",".py",".java",".go"].includes(l))try{let g=w(a,"utf-8"),c=this.calculateFileComplexity(g,l);t.push(...c.functionComplexities),c.maxComplexity>n&&(n=c.maxComplexity),i++,c.maxComplexity>10&&e.push(V(this.projectRoot,a))}catch(g){console.debug("[ProjectAnalyzer] Complexity analysis read failed:",g instanceof Error?g.message:g)}});let s=t.reduce((a,l)=>a+l,0),o=t.length>0?s/t.length:0;return{averageCyclomatic:Math.round(o*10)/10,maxCyclomatic:n,totalFiles:i,complexFiles:e.slice(0,20),recommendation:o<5?"simple":o<15?"medium":"complex"}}calculateFileComplexity(e,t){let n=this.stripCommentsAndStrings(e,t),i=this.calculateComplexity(n);return{functionComplexities:[i],maxComplexity:i}}removeDelimitedBlocks(e,t,n){let i="",s=0;for(;s<e.length;){let o=e.indexOf(t,s);if(o===-1){i+=e.slice(s);break}i+=e.slice(s,o);let a=e.indexOf(n,o+t.length);if(a===-1)break;s=a+n.length}return i}stripCommentsAndStrings(e,t){let n=e;return[".ts",".tsx",".js",".jsx",".java",".go"].includes(t)?(n=n.split(`
3
+ `).map(i=>{let s=i.indexOf("//");return s>=0?i.slice(0,s):i}).join(`
4
4
  `),n=this.removeDelimitedBlocks(n,"/*","*/"),n=this.removeDelimitedBlocks(n,"`","`"),n=this.removeDelimitedBlocks(n,'"','"'),n=this.removeDelimitedBlocks(n,"'","'")):t===".py"&&(n=n.split(`
5
- `).map(r=>{let s=r.indexOf("#");return s>=0?r.slice(0,s):r}).join(`
6
- `),n=this.removeDelimitedBlocks(n,'"""','"""'),n=this.removeDelimitedBlocks(n,"'''","'''"),n=this.removeDelimitedBlocks(n,'"','"'),n=this.removeDelimitedBlocks(n,"'","'")),n}calculateComplexity(e){let t=1,n=[{pattern:/(?<![a-zA-Z])if\s*\(/g,name:"if"},{pattern:/\bfor\s*\(/g,name:"for"},{pattern:/\bwhile\s*\(/g,name:"while"},{pattern:/\bcase\s+[^:]+:/g,name:"case"},{pattern:/\bcatch\s*\(/g,name:"catch"},{pattern:/&&/g,name:"&&"},{pattern:/\|\|/g,name:"||"},{pattern:/\?[^?:]+:/g,name:"ternary"},{pattern:/\belif\s+/g,name:"elif"},{pattern:/\bexcept\s*(?:\w+)?:/g,name:"except"},{pattern:/\bfor\s+\w+\s+in\s+/g,name:"for-in"},{pattern:/\bselect\s*\{/g,name:"select"}];for(let{pattern:r}of n){let s=e.match(r);s&&(t+=s.length)}return t}async measureCoverage(){let e=["coverage/lcov-report/index.html","coverage/coverage-summary.json","coverage/clover.xml","coverage/lcov.info","htmlcov/index.html"];for(let t of e){let n=u(this.projectRoot,t);if(p(n)){if(t.endsWith(".json"))try{let s=E(w(n,"utf-8")).total||{};return{lines:s.lines?.pct||0,branches:s.branches?.pct||0,functions:s.functions?.pct||0,statements:s.statements?.pct||0,hasReport:!0,reportPath:t}}catch(r){console.debug("[ProjectAnalyzer] Coverage report parse failed:",r instanceof Error?r.message:r)}return{lines:0,branches:0,functions:0,statements:0,hasReport:!0,reportPath:t}}}return{lines:0,branches:0,functions:0,statements:0,hasReport:!1}}detectProjectType(){if(p(u(this.projectRoot,"lerna.json"))||p(u(this.projectRoot,"pnpm-workspace.yaml"))||p(u(this.projectRoot,"packages")))return"monorepo";let e=S(this.projectRoot);return e?.workspaces?"monorepo":e?.main||e?.module||e?.exports?"library":"single"}detectPackageManager(){return p(u(this.projectRoot,"bun.lockb"))?"bun":p(u(this.projectRoot,"pnpm-lock.yaml"))?"pnpm":p(u(this.projectRoot,"yarn.lock"))?"yarn":p(u(this.projectRoot,"package-lock.json"))?"npm":"unknown"}detectCIConfig(){return[".github/workflows",".gitlab-ci.yml","Jenkinsfile",".circleci/config.yml",".travis.yml","azure-pipelines.yml"].some(t=>p(u(this.projectRoot,t)))}detectCIProvider(){if(p(u(this.projectRoot,".github/workflows")))return"github-actions";if(p(u(this.projectRoot,".gitlab-ci.yml")))return"gitlab-ci";if(p(u(this.projectRoot,"Jenkinsfile")))return"jenkins";if(p(u(this.projectRoot,".circleci/config.yml")))return"circleci";if(this.detectCIConfig())return"other"}};function Me(i){return new W(i)}var se=[{name:"typescript-vitest",condition:i=>i.hasTypeScript&&i.frameworks.some(e=>e.name==="vitest"),apply:i=>{i.learning.embeddingModel="transformer",i.routing.confidenceThreshold=.75}},{name:"large-codebase",condition:i=>i.codeComplexity.totalFiles>500,apply:i=>{i.learning.hnswConfig.M=32,i.learning.hnswConfig.efConstruction=400,i.learning.hnswConfig.efSearch=200,i.agents.maxConcurrent=15}},{name:"small-project",condition:i=>i.codeComplexity.totalFiles<50,apply:i=>{i.learning.hnswConfig.M=8,i.learning.hnswConfig.efConstruction=100,i.workers.enabled=["pattern-consolidator","routing-accuracy-monitor"],i.workers.maxConcurrent=2,i.agents.maxConcurrent=5}},{name:"high-complexity",condition:i=>i.codeComplexity.recommendation==="complex",apply:i=>{i.autoTuning.parameters.push("complexity.analysisDepth"),i.domains.enabled=L}},{name:"low-coverage",condition:i=>i.coverage.hasReport&&i.coverage.lines<50,apply:i=>{i.workers.enabled.push("coverage-gap-scanner"),i.workers.intervals["coverage-gap-scanner"]=1800*1e3}},{name:"monorepo",condition:i=>i.projectType==="monorepo",apply:i=>{i.agents.maxConcurrent=15,i.workers.maxConcurrent=6,i.domains.enabled=[...new Set([...i.domains.enabled,"code-intelligence"])]}},{name:"has-e2e",condition:i=>i.frameworks.some(e=>["playwright","cypress"].includes(e.name))||i.existingTests.byType.e2e>0,apply:i=>{i.domains.enabled=[...new Set([...i.domains.enabled,"visual-accessibility","chaos-resilience"])]}},{name:"has-ci",condition:i=>i.hasCIConfig,apply:i=>{i.hooks.ciIntegration=!0,i.domains.enabled=[...new Set([...i.domains.enabled,"quality-assessment"])]}},{name:"github-actions",condition:i=>i.ciProvider==="github-actions",apply:i=>{i.hooks.ciIntegration=!0,i.hooks.claudeCode=!0}},{name:"python-project",condition:i=>i.languages.some(e=>e.name==="python"&&e.percentage>30),apply:i=>{i.routing.mode="hybrid",i.domains.enabled=[...new Set([...i.domains.enabled,"security-compliance"])]}},{name:"java-project",condition:i=>i.languages.some(e=>e.name==="java"&&e.percentage>30),apply:i=>{i.agents.defaultTimeout=12e4}},{name:"no-tests",condition:i=>i.existingTests.totalCount===0,apply:i=>{i.workers.enabled=["pattern-consolidator"],i.learning.qualityThreshold=.5,i.learning.promotionThreshold=2}},{name:"many-tests",condition:i=>i.existingTests.totalCount>500,apply:i=>{i.workers.enabled=[...new Set([...i.workers.enabled,"flaky-test-detector"])],i.domains.enabled=[...new Set([...i.domains.enabled,"test-execution"])]}},{name:"security-focus",condition:i=>i.codeComplexity.totalFiles>100,apply:i=>{i.domains.enabled=[...new Set([...i.domains.enabled,"security-compliance"])]}}],z=class{rules;constructor(e={}){this.rules=e.minimal?se.filter(t=>["typescript-vitest","large-codebase","small-project"].includes(t.name)):[...se,...e.customRules||[]]}recommend(e){let t={version:M(),project:{name:e.projectName,root:e.projectRoot,type:e.projectType==="unknown"?"single":e.projectType},learning:this.recommendLearning(e),routing:this.recommendRouting(e),workers:this.recommendWorkers(e),hooks:this.recommendHooks(e),skills:this.recommendSkills(e),autoTuning:this.recommendAutoTuning(e),domains:{enabled:this.recommendDomains(e),disabled:[]},agents:{maxConcurrent:this.recommendMaxAgents(e),defaultTimeout:6e4}},n=[];for(let r of this.rules)r.condition(e)&&(r.apply(t,e),n.push(r.name));return t.domains.enabled=[...new Set(t.domains.enabled)],t.workers.enabled=[...new Set(t.workers.enabled)],t}getApplicableRules(e){return this.rules.filter(t=>t.condition(e)).map(t=>t.name)}recommendLearning(e){let t={...P};return e.codeComplexity.totalFiles>1e3?t.hnswConfig={M:32,efConstruction:400,efSearch:200}:e.codeComplexity.totalFiles<100&&(t.hnswConfig={M:8,efConstruction:100,efSearch:50}),e.languages.some(n=>["typescript","javascript"].includes(n.name))&&(t.embeddingModel="transformer"),t}recommendRouting(e){let t={..._};return e.codeComplexity.recommendation==="simple"?t.mode="rules":e.codeComplexity.recommendation==="complex"?t.mode="ml":t.mode="hybrid",t}recommendWorkers(e){let t={...F},n=new Set(["pattern-consolidator","routing-accuracy-monitor"]);return(!e.coverage.hasReport||e.coverage.lines<70)&&n.add("coverage-gap-scanner"),e.existingTests.totalCount>100&&n.add("flaky-test-detector"),t.enabled=Array.from(n),e.codeComplexity.totalFiles>500?t.maxConcurrent=6:e.codeComplexity.totalFiles<50&&(t.maxConcurrent=2),t}recommendHooks(e){let t={...N};return t.ciIntegration=e.hasCIConfig,t.preCommit=e.existingTests.totalCount>50,t}recommendSkills(e){let t={...$};return t.install=!0,t.installV2=!0,t.installV3=!0,t}recommendAutoTuning(e){let t={...O};return e.codeComplexity.totalFiles<20&&(t.enabled=!1),t}recommendDomains(e){return["test-generation","test-execution","coverage-analysis","quality-assessment","defect-intelligence","requirements-validation","code-intelligence","security-compliance","contract-testing","visual-accessibility","chaos-resilience","learning-optimization"]}recommendMaxAgents(e){return e.projectType==="monorepo"?15:e.codeComplexity.totalFiles>500?12:e.codeComplexity.totalFiles>100?8:5}};function ze(i){return new z(i)}var xe=[/\baqe\b/i,/\bagentic-qe\b/i,/\bnpx\s+agentic-qe\b/i,/\bnpx\s+@anthropics\/agentic-qe\b/i,/brain-checkpoint\.cjs/i,/\.claude\/helpers\//i,/\bruflo\b/i,/dist\/cli\/bundle\.js/i];function Se(i){let e=i;return!e?.hooks||!Array.isArray(e.hooks)?!1:e.hooks.some(t=>!t.command||typeof t.command!="string"?!1:xe.some(n=>n.test(t.command)))}function Ue(i,e){let t={};for(let[n,r]of Object.entries(e)){let s=i[n]||[],o=Array.isArray(s)?s.filter(a=>!Se(a)):[];t[n]=[...r,...o]}for(let[n,r]of Object.entries(i))t[n]||(t[n]=r);return t}function He(i){let e=i.domains?.enabled||[];return{AQE_MEMORY_PATH:".agentic-qe/memory.db",AQE_MEMORY_ENABLED:"true",AQE_LEARNING_ENABLED:i.learning?.enabled?"true":"false",AQE_V3_MODE:"true",AQE_V3_DDD_ENABLED:"true",AQE_V3_DOMAINS:e.join(","),AQE_V3_SWARM_SIZE:String(i.agents?.maxConcurrent??15),AQE_V3_TOPOLOGY:"hierarchical",AQE_V3_SUBLINEAR_ENABLED:"true",AQE_V3_HNSW_ENABLED:i.learning?.hnswConfig?"true":"false",AQE_V3_HOOKS_ENABLED:"true",AQE_V3_AISP_ENABLED:"true",AQE_V3_REASONING_BANK:".agentic-qe/memory.db",AQE_V3_PATTERN_PROMOTION_THRESHOLD:String(i.learning?.promotionThreshold??3),AQE_V3_SUCCESS_RATE_THRESHOLD:String(i.learning?.qualityThreshold??.7)}}function Be(i,e){let t=i.domains?.enabled||[];return{aqe:{version:i.version??"3.0.0",initialized:new Date().toISOString(),hooksConfigured:!0},statusLine:{type:"command",command:`sh -c 'node "\${CLAUDE_PROJECT_DIR:-.}/.claude/helpers/statusline-v3.cjs" 2>/dev/null || echo "\u258A Agentic QE v3"'`,refreshMs:5e3,enabled:!0},_aqePermissions:["Bash(npx agentic-qe:*)","Bash(npx @anthropics/agentic-qe:*)","mcp__agentic-qe__*"],includeCoAuthoredBy:!0,v3Configuration:{domains:{total:t.length,names:t},swarm:{totalAgents:i.agents?.maxConcurrent??15,topology:"hierarchical",coordination:"queen-led"}},v3Learning:{enabled:i.learning?.enabled??!0,reasoningBank:{dbPath:".agentic-qe/memory.db",enableHNSW:!!i.learning?.hnswConfig},patternPromotion:{threshold:i.learning?.promotionThreshold??3,successRateMin:i.learning?.qualityThreshold??.7}}}}T();import{existsSync as h,mkdirSync as j,readdirSync as R,statSync as G,readFileSync as Ae,writeFileSync as Ce,copyFileSync as we,unlinkSync as De,rmdirSync as je}from"fs";import{join as m}from"path";var U=["qe-test-generation","qe-test-execution","qe-coverage-analysis","qe-quality-assessment","qe-defect-intelligence","qe-requirements-validation","qe-code-intelligence","qe-browser","pentest-validation","qe-visual-accessibility","qe-chaos-resilience","qe-learning-optimization","qe-iterative-loop","strict-tdd","no-skip","coverage-guard","freeze-tests","security-watch","skill-stats","test-failure-investigator","coverage-drop-investigator","e2e-flow-verifier","test-metrics-dashboard"],H=["v3-core-implementation","v3-cli-modernization","v3-ddd-architecture","v3-integration-deep","v3-mcp-optimization","v3-memory-unification","v3-performance-optimization","v3-security-overhaul","v3-swarm-coordination","v3-qe-core-implementation","v3-qe-ddd-architecture","v3-qe-cli","v3-qe-memory-system","v3-qe-performance","v3-qe-security","v3-qe-mcp","v3-qe-mcp-optimization","v3-qe-memory-unification","v3-qe-integration","v3-qe-agentic-flow-integration","v3-qe-fleet-coordination","agentdb-advanced","agentdb-learning","agentdb-memory-patterns","agentdb-optimization","agentdb-vector-search","github-code-review","github-multi-repo","github-project-management","github-release-management","github-workflow-automation","flow-nexus-neural","flow-nexus-platform","flow-nexus-swarm","reasoningbank-agentdb","reasoningbank-intelligence","swarm-orchestration","swarm-advanced","sparc-methodology","hooks-automation","hive-mind-advanced","stream-chain","agentic-jujutsu","iterative-loop","performance-analysis","skill-builder","qe-agentic-flow-integration","release"],Re=["qe-contract-testing","qe-security-compliance","aqe-v2-v3-migration"],B=class{projectRoot;options;sourceSkillsDir;constructor(e){this.projectRoot=e.projectRoot,this.options={installV2Skills:!0,installV3Skills:!0,overwrite:!1,exclude:[],include:void 0,...e},this.sourceSkillsDir=this.findSourceSkillsDir()}findSourceSkillsDir(){let e=k(import.meta.url),t=[];e&&(t.push(m(e,"assets/skills")),t.push(m(e,".claude/skills"))),t.push(m(this.projectRoot,"node_modules/agentic-qe/assets/skills"));for(let n of t)if(h(n))return n;return t[0]}async install(){let e={installed:[],skipped:[],removed:[],errors:[],totalCount:0,skillsDir:m(this.projectRoot,".claude","skills"),validationInstalled:!1};if(!h(this.sourceSkillsDir))return e.errors.push(`Source skills directory not found: ${this.sourceSkillsDir}`),e;let t=m(this.projectRoot,".claude","skills");h(t)||j(t,{recursive:!0});let n=this.getAvailableSkills();e.totalCount=n.length;let r=this.filterSkills(n);for(let s of r)try{let o=await this.installSkill(s,t);o?e.installed.push(o):e.skipped.push(s)}catch(o){e.errors.push(`Failed to install ${s}: ${b(o)}`)}return this.options.overwrite&&(e.removed=this.removeDeprecatedSkills(t)),e.validationInstalled=this.installValidationInfrastructure(t),await this.createSkillsIndex(t,e.installed),e}installValidationInfrastructure(e){let t=m(this.sourceSkillsDir,".validation"),n=m(e,".validation");if(!h(t))return console.debug("[SkillsInstaller] Validation infrastructure not found in source"),!1;if(h(n)&&!this.options.overwrite)return console.debug("[SkillsInstaller] Validation infrastructure already exists, skipping"),!0;try{return h(n)||j(n,{recursive:!0}),this.copyDirectoryRecursive(t,n),console.debug("[SkillsInstaller] Validation infrastructure installed successfully"),!0}catch(r){return console.error("[SkillsInstaller] Failed to install validation infrastructure:",r instanceof Error?r.message:r),!1}}removeDeprecatedSkills(e){let t=[];for(let n of Re){let r=m(e,n);if(h(r))try{this.removeDirectoryRecursive(r),t.push(n)}catch(s){console.error(`[SkillsInstaller] Failed to remove deprecated skill ${n}:`,s instanceof Error?s.message:s)}}return t.length>0&&console.debug(`[SkillsInstaller] Removed ${t.length} deprecated skills: ${t.join(", ")}`),t}removeDirectoryRecursive(e){let t=R(e,{withFileTypes:!0});for(let n of t){let r=m(e,n.name);n.isDirectory()?this.removeDirectoryRecursive(r):De(r)}je(e)}getAvailableSkills(){try{return R(this.sourceSkillsDir).filter(t=>{let n=m(this.sourceSkillsDir,t);return G(n).isDirectory()&&!t.startsWith(".")})}catch{return[]}}filterSkills(e){let t=e;return t=t.filter(n=>!H.includes(n)),this.options.include&&this.options.include.length>0&&(t=t.filter(n=>this.options.include.includes(n))),this.options.exclude&&this.options.exclude.length>0&&(t=t.filter(n=>!this.options.exclude.some(r=>n.includes(r)||n.match(new RegExp(r))))),this.options.installV3Skills||(t=t.filter(n=>!U.includes(n))),this.options.installV2Skills||(t=t.filter(n=>U.includes(n))),t}async installSkill(e,t){let n=m(this.sourceSkillsDir,e),r=m(t,e);if(h(r)&&!this.options.overwrite)return null;h(r)||j(r,{recursive:!0}),this.copyDirectoryRecursive(n,r);let s=this.getSkillType(e),o=this.getSkillDescription(r),a=h(m(r,"resources"));return{name:e,type:s,description:o,hasResources:a}}copyDirectoryRecursive(e,t){let n=R(e);for(let r of n){let s=m(e,r),o=m(t,r);G(s).isDirectory()?(h(o)||j(o,{recursive:!0}),this.copyDirectoryRecursive(s,o)):we(s,o)}}getSkillType(e){return U.includes(e)?"v3-domain":"v2-methodology"}getSkillDescription(e){let t=m(e,"SKILL.md");if(h(t))try{let n=Ae(t,"utf-8"),r=n.match(/description:\s*["']?([^"'\n]+)["']?/i);if(r)return r[1].trim();let s=n.split(`
7
- `);for(let o of s){let a=o.trim();if(a&&!a.startsWith("#")&&!a.startsWith("-")&&!a.startsWith("```"))return a.slice(0,100)+(a.length>100?"...":"")}}catch(n){console.debug("[SkillsInstaller] Failed to read skill description:",n instanceof Error?n.message:n)}}async createSkillsIndex(e,t){let n=this.scanSkillsDirectory(e),r=n.filter(c=>!H.includes(c.name)),s=r.filter(c=>c.type==="v2-methodology"),o=r.filter(c=>c.type==="v3-domain"),a=n.filter(c=>H.includes(c.name)),l=h(m(e,".validation")),g=`# AQE Skills Index
5
+ `).map(i=>{let s=i.indexOf("#");return s>=0?i.slice(0,s):i}).join(`
6
+ `),n=this.removeDelimitedBlocks(n,'"""','"""'),n=this.removeDelimitedBlocks(n,"'''","'''"),n=this.removeDelimitedBlocks(n,'"','"'),n=this.removeDelimitedBlocks(n,"'","'")),n}calculateComplexity(e){let t=1,n=[{pattern:/(?<![a-zA-Z])if\s*\(/g,name:"if"},{pattern:/\bfor\s*\(/g,name:"for"},{pattern:/\bwhile\s*\(/g,name:"while"},{pattern:/\bcase\s+[^:]+:/g,name:"case"},{pattern:/\bcatch\s*\(/g,name:"catch"},{pattern:/&&/g,name:"&&"},{pattern:/\|\|/g,name:"||"},{pattern:/\?[^?:]+:/g,name:"ternary"},{pattern:/\belif\s+/g,name:"elif"},{pattern:/\bexcept\s*(?:\w+)?:/g,name:"except"},{pattern:/\bfor\s+\w+\s+in\s+/g,name:"for-in"},{pattern:/\bselect\s*\{/g,name:"select"}];for(let{pattern:i}of n){let s=e.match(i);s&&(t+=s.length)}return t}async measureCoverage(){let e=["coverage/lcov-report/index.html","coverage/coverage-summary.json","coverage/clover.xml","coverage/lcov.info","htmlcov/index.html"];for(let t of e){let n=u(this.projectRoot,t);if(p(n)){if(t.endsWith(".json"))try{let s=E(w(n,"utf-8")).total||{};return{lines:s.lines?.pct||0,branches:s.branches?.pct||0,functions:s.functions?.pct||0,statements:s.statements?.pct||0,hasReport:!0,reportPath:t}}catch(i){console.debug("[ProjectAnalyzer] Coverage report parse failed:",i instanceof Error?i.message:i)}return{lines:0,branches:0,functions:0,statements:0,hasReport:!0,reportPath:t}}}return{lines:0,branches:0,functions:0,statements:0,hasReport:!1}}detectProjectType(){if(p(u(this.projectRoot,"lerna.json"))||p(u(this.projectRoot,"pnpm-workspace.yaml"))||p(u(this.projectRoot,"packages")))return"monorepo";let e=S(this.projectRoot);return e?.workspaces?"monorepo":e?.main||e?.module||e?.exports?"library":"single"}detectPackageManager(){return p(u(this.projectRoot,"bun.lockb"))?"bun":p(u(this.projectRoot,"pnpm-lock.yaml"))?"pnpm":p(u(this.projectRoot,"yarn.lock"))?"yarn":p(u(this.projectRoot,"package-lock.json"))?"npm":"unknown"}detectCIConfig(){return[".github/workflows",".gitlab-ci.yml","Jenkinsfile",".circleci/config.yml",".travis.yml","azure-pipelines.yml"].some(t=>p(u(this.projectRoot,t)))}detectCIProvider(){if(p(u(this.projectRoot,".github/workflows")))return"github-actions";if(p(u(this.projectRoot,".gitlab-ci.yml")))return"gitlab-ci";if(p(u(this.projectRoot,"Jenkinsfile")))return"jenkins";if(p(u(this.projectRoot,".circleci/config.yml")))return"circleci";if(this.detectCIConfig())return"other"}};function Me(r){return new W(r)}var se=[{name:"typescript-vitest",condition:r=>r.hasTypeScript&&r.frameworks.some(e=>e.name==="vitest"),apply:r=>{r.learning.embeddingModel="transformer",r.routing.confidenceThreshold=.75}},{name:"large-codebase",condition:r=>r.codeComplexity.totalFiles>500,apply:r=>{r.learning.hnswConfig.M=32,r.learning.hnswConfig.efConstruction=400,r.learning.hnswConfig.efSearch=200,r.agents.maxConcurrent=15}},{name:"small-project",condition:r=>r.codeComplexity.totalFiles<50,apply:r=>{r.learning.hnswConfig.M=8,r.learning.hnswConfig.efConstruction=100,r.workers.enabled=["pattern-consolidator","routing-accuracy-monitor"],r.workers.maxConcurrent=2,r.agents.maxConcurrent=5}},{name:"high-complexity",condition:r=>r.codeComplexity.recommendation==="complex",apply:r=>{r.autoTuning.parameters.push("complexity.analysisDepth"),r.domains.enabled=L}},{name:"low-coverage",condition:r=>r.coverage.hasReport&&r.coverage.lines<50,apply:r=>{r.workers.enabled.push("coverage-gap-scanner"),r.workers.intervals["coverage-gap-scanner"]=1800*1e3}},{name:"monorepo",condition:r=>r.projectType==="monorepo",apply:r=>{r.agents.maxConcurrent=15,r.workers.maxConcurrent=6,r.domains.enabled=[...new Set([...r.domains.enabled,"code-intelligence"])]}},{name:"has-e2e",condition:r=>r.frameworks.some(e=>["playwright","cypress"].includes(e.name))||r.existingTests.byType.e2e>0,apply:r=>{r.domains.enabled=[...new Set([...r.domains.enabled,"visual-accessibility","chaos-resilience"])]}},{name:"has-ci",condition:r=>r.hasCIConfig,apply:r=>{r.hooks.ciIntegration=!0,r.domains.enabled=[...new Set([...r.domains.enabled,"quality-assessment"])]}},{name:"github-actions",condition:r=>r.ciProvider==="github-actions",apply:r=>{r.hooks.ciIntegration=!0,r.hooks.claudeCode=!0}},{name:"python-project",condition:r=>r.languages.some(e=>e.name==="python"&&e.percentage>30),apply:r=>{r.routing.mode="hybrid",r.domains.enabled=[...new Set([...r.domains.enabled,"security-compliance"])]}},{name:"java-project",condition:r=>r.languages.some(e=>e.name==="java"&&e.percentage>30),apply:r=>{r.agents.defaultTimeout=12e4}},{name:"no-tests",condition:r=>r.existingTests.totalCount===0,apply:r=>{r.workers.enabled=["pattern-consolidator"],r.learning.qualityThreshold=.5,r.learning.promotionThreshold=2}},{name:"many-tests",condition:r=>r.existingTests.totalCount>500,apply:r=>{r.workers.enabled=[...new Set([...r.workers.enabled,"flaky-test-detector"])],r.domains.enabled=[...new Set([...r.domains.enabled,"test-execution"])]}},{name:"security-focus",condition:r=>r.codeComplexity.totalFiles>100,apply:r=>{r.domains.enabled=[...new Set([...r.domains.enabled,"security-compliance"])]}}],z=class{rules;constructor(e={}){this.rules=e.minimal?se.filter(t=>["typescript-vitest","large-codebase","small-project"].includes(t.name)):[...se,...e.customRules||[]]}recommend(e){let t={version:M(),project:{name:e.projectName,root:e.projectRoot,type:e.projectType==="unknown"?"single":e.projectType},learning:this.recommendLearning(e),routing:this.recommendRouting(e),workers:this.recommendWorkers(e),hooks:this.recommendHooks(e),skills:this.recommendSkills(e),autoTuning:this.recommendAutoTuning(e),domains:{enabled:this.recommendDomains(e),disabled:[]},agents:{maxConcurrent:this.recommendMaxAgents(e),defaultTimeout:6e4}},n=[];for(let i of this.rules)i.condition(e)&&(i.apply(t,e),n.push(i.name));return t.domains.enabled=[...new Set(t.domains.enabled)],t.workers.enabled=[...new Set(t.workers.enabled)],t}getApplicableRules(e){return this.rules.filter(t=>t.condition(e)).map(t=>t.name)}recommendLearning(e){let t={...P};return e.codeComplexity.totalFiles>1e3?t.hnswConfig={M:32,efConstruction:400,efSearch:200}:e.codeComplexity.totalFiles<100&&(t.hnswConfig={M:8,efConstruction:100,efSearch:50}),e.languages.some(n=>["typescript","javascript"].includes(n.name))&&(t.embeddingModel="transformer"),t}recommendRouting(e){let t={..._};return e.codeComplexity.recommendation==="simple"?t.mode="rules":e.codeComplexity.recommendation==="complex"?t.mode="ml":t.mode="hybrid",t}recommendWorkers(e){let t={...F},n=new Set(["pattern-consolidator","routing-accuracy-monitor"]);return(!e.coverage.hasReport||e.coverage.lines<70)&&n.add("coverage-gap-scanner"),e.existingTests.totalCount>100&&n.add("flaky-test-detector"),t.enabled=Array.from(n),e.codeComplexity.totalFiles>500?t.maxConcurrent=6:e.codeComplexity.totalFiles<50&&(t.maxConcurrent=2),t}recommendHooks(e){let t={...N};return t.ciIntegration=e.hasCIConfig,t.preCommit=e.existingTests.totalCount>50,t}recommendSkills(e){let t={...$};return t.install=!0,t.installV2=!0,t.installV3=!0,t}recommendAutoTuning(e){let t={...O};return e.codeComplexity.totalFiles<20&&(t.enabled=!1),t}recommendDomains(e){return["test-generation","test-execution","coverage-analysis","quality-assessment","defect-intelligence","requirements-validation","code-intelligence","security-compliance","contract-testing","visual-accessibility","chaos-resilience","learning-optimization"]}recommendMaxAgents(e){return e.projectType==="monorepo"?15:e.codeComplexity.totalFiles>500?12:e.codeComplexity.totalFiles>100?8:5}};function We(r){return new z(r)}var xe=[/\baqe\b/i,/\bagentic-qe\b/i,/\bnpx\s+agentic-qe\b/i,/\bnpx\s+@anthropics\/agentic-qe\b/i,/brain-checkpoint\.cjs/i,/\.claude\/helpers\//i,/\bruflo\b/i,/dist\/cli\/bundle\.js/i];function Se(r){let e=r;return!e?.hooks||!Array.isArray(e.hooks)?!1:e.hooks.some(t=>!t.command||typeof t.command!="string"?!1:xe.some(n=>n.test(t.command)))}function Ge(r,e){let t={};for(let[n,i]of Object.entries(e)){let s=r[n]||[],o=Array.isArray(s)?s.filter(a=>!Se(a)):[];t[n]=[...i,...o]}for(let[n,i]of Object.entries(r))t[n]||(t[n]=i);return t}function Ue(r){let e=r.domains?.enabled||[];return{AQE_MEMORY_PATH:".agentic-qe/memory.db",AQE_MEMORY_ENABLED:"true",AQE_LEARNING_ENABLED:r.learning?.enabled?"true":"false",AQE_V3_MODE:"true",AQE_V3_DDD_ENABLED:"true",AQE_V3_DOMAINS:e.join(","),AQE_V3_SWARM_SIZE:String(r.agents?.maxConcurrent??15),AQE_V3_TOPOLOGY:"hierarchical",AQE_V3_SUBLINEAR_ENABLED:"true",AQE_V3_HNSW_ENABLED:r.learning?.hnswConfig?"true":"false",AQE_V3_HOOKS_ENABLED:"true",AQE_V3_AISP_ENABLED:"true",AQE_V3_REASONING_BANK:".agentic-qe/memory.db",AQE_V3_PATTERN_PROMOTION_THRESHOLD:String(r.learning?.promotionThreshold??3),AQE_V3_SUCCESS_RATE_THRESHOLD:String(r.learning?.qualityThreshold??.7)}}function He(r,e){let t=r.domains?.enabled||[];return{aqe:{version:r.version??"3.0.0",initialized:new Date().toISOString(),hooksConfigured:!0},statusLine:{type:"command",command:`sh -c 'node "\${CLAUDE_PROJECT_DIR:-.}/.claude/helpers/statusline-v3.cjs" 2>/dev/null || echo "\u258A Agentic QE v3"'`,refreshMs:5e3,enabled:!0},_aqePermissions:["Bash(npx agentic-qe:*)","Bash(npx @anthropics/agentic-qe:*)","mcp__agentic-qe__*"],includeCoAuthoredBy:!0,v3Configuration:{domains:{total:t.length,names:t},swarm:{totalAgents:r.agents?.maxConcurrent??15,topology:"hierarchical",coordination:"queen-led"}},v3Learning:{enabled:r.learning?.enabled??!0,reasoningBank:{dbPath:".agentic-qe/memory.db",enableHNSW:!!r.learning?.hnswConfig},patternPromotion:{threshold:r.learning?.promotionThreshold??3,successRateMin:r.learning?.qualityThreshold??.7}}}}T();import{existsSync as h,mkdirSync as j,readdirSync as R,statSync as G,readFileSync as Ae,writeFileSync as Ce,copyFileSync as we,unlinkSync as De,rmdirSync as je}from"fs";import{join as m}from"path";var U=["qe-test-generation","qe-test-execution","qe-coverage-analysis","qe-quality-assessment","qe-defect-intelligence","qe-requirements-validation","qe-code-intelligence","qe-browser","pentest-validation","qe-visual-accessibility","qe-chaos-resilience","qe-learning-optimization","qe-iterative-loop","strict-tdd","no-skip","coverage-guard","freeze-tests","security-watch","skill-stats","test-failure-investigator","coverage-drop-investigator","e2e-flow-verifier","test-metrics-dashboard"],H=["v3-core-implementation","v3-cli-modernization","v3-ddd-architecture","v3-integration-deep","v3-mcp-optimization","v3-memory-unification","v3-performance-optimization","v3-security-overhaul","v3-swarm-coordination","v3-qe-core-implementation","v3-qe-ddd-architecture","v3-qe-cli","v3-qe-memory-system","v3-qe-performance","v3-qe-security","v3-qe-mcp","v3-qe-mcp-optimization","v3-qe-memory-unification","v3-qe-integration","v3-qe-agentic-flow-integration","v3-qe-fleet-coordination","agentdb-advanced","agentdb-learning","agentdb-memory-patterns","agentdb-optimization","agentdb-vector-search","github-code-review","github-multi-repo","github-project-management","github-release-management","github-workflow-automation","flow-nexus-neural","flow-nexus-platform","flow-nexus-swarm","reasoningbank-agentdb","reasoningbank-intelligence","swarm-orchestration","swarm-advanced","sparc-methodology","hooks-automation","hive-mind-advanced","stream-chain","agentic-jujutsu","iterative-loop","performance-analysis","skill-builder","qe-agentic-flow-integration","release"],Re=["qe-contract-testing","qe-security-compliance","aqe-v2-v3-migration"],B=class{projectRoot;options;sourceSkillsDir;constructor(e){this.projectRoot=e.projectRoot,this.options={installV2Skills:!0,installV3Skills:!0,overwrite:!1,exclude:[],include:void 0,...e},this.sourceSkillsDir=this.findSourceSkillsDir()}findSourceSkillsDir(){let e=k(import.meta.url),t=[];e&&(t.push(m(e,"assets/skills")),t.push(m(e,".claude/skills"))),t.push(m(this.projectRoot,"node_modules/agentic-qe/assets/skills"));for(let n of t)if(h(n))return n;return t[0]}async install(){let e={installed:[],skipped:[],removed:[],errors:[],totalCount:0,skillsDir:m(this.projectRoot,".claude","skills"),validationInstalled:!1};if(!h(this.sourceSkillsDir))return e.errors.push(`Source skills directory not found: ${this.sourceSkillsDir}`),e;let t=m(this.projectRoot,".claude","skills");h(t)||j(t,{recursive:!0});let n=this.getAvailableSkills();e.totalCount=n.length;let i=this.filterSkills(n);for(let s of i)try{let o=await this.installSkill(s,t);o?e.installed.push(o):e.skipped.push(s)}catch(o){e.errors.push(`Failed to install ${s}: ${b(o)}`)}return this.options.overwrite&&(e.removed=this.removeDeprecatedSkills(t)),e.validationInstalled=this.installValidationInfrastructure(t),await this.createSkillsIndex(t,e.installed),e}installValidationInfrastructure(e){let t=m(this.sourceSkillsDir,".validation"),n=m(e,".validation");if(!h(t))return console.debug("[SkillsInstaller] Validation infrastructure not found in source"),!1;if(h(n)&&!this.options.overwrite)return console.debug("[SkillsInstaller] Validation infrastructure already exists, skipping"),!0;try{return h(n)||j(n,{recursive:!0}),this.copyDirectoryRecursive(t,n),console.debug("[SkillsInstaller] Validation infrastructure installed successfully"),!0}catch(i){return console.error("[SkillsInstaller] Failed to install validation infrastructure:",i instanceof Error?i.message:i),!1}}removeDeprecatedSkills(e){let t=[];for(let n of Re){let i=m(e,n);if(h(i))try{this.removeDirectoryRecursive(i),t.push(n)}catch(s){console.error(`[SkillsInstaller] Failed to remove deprecated skill ${n}:`,s instanceof Error?s.message:s)}}return t.length>0&&console.debug(`[SkillsInstaller] Removed ${t.length} deprecated skills: ${t.join(", ")}`),t}removeDirectoryRecursive(e){let t=R(e,{withFileTypes:!0});for(let n of t){let i=m(e,n.name);n.isDirectory()?this.removeDirectoryRecursive(i):De(i)}je(e)}getAvailableSkills(){try{return R(this.sourceSkillsDir).filter(t=>{let n=m(this.sourceSkillsDir,t);return G(n).isDirectory()&&!t.startsWith(".")})}catch{return[]}}filterSkills(e){let t=e;return t=t.filter(n=>!H.includes(n)),this.options.include&&this.options.include.length>0&&(t=t.filter(n=>this.options.include.includes(n))),this.options.exclude&&this.options.exclude.length>0&&(t=t.filter(n=>!this.options.exclude.some(i=>n.includes(i)||n.match(new RegExp(i))))),this.options.installV3Skills||(t=t.filter(n=>!U.includes(n))),this.options.installV2Skills||(t=t.filter(n=>U.includes(n))),t}async installSkill(e,t){let n=m(this.sourceSkillsDir,e),i=m(t,e);if(h(i)&&!this.options.overwrite)return null;h(i)||j(i,{recursive:!0}),this.copyDirectoryRecursive(n,i);let s=this.getSkillType(e),o=this.getSkillDescription(i),a=h(m(i,"resources"));return{name:e,type:s,description:o,hasResources:a}}copyDirectoryRecursive(e,t){let n=R(e);for(let i of n){let s=m(e,i),o=m(t,i);G(s).isDirectory()?(h(o)||j(o,{recursive:!0}),this.copyDirectoryRecursive(s,o)):we(s,o)}}getSkillType(e){return U.includes(e)?"v3-domain":"v2-methodology"}getSkillDescription(e){let t=m(e,"SKILL.md");if(h(t))try{let n=Ae(t,"utf-8"),i=n.match(/description:\s*["']?([^"'\n]+)["']?/i);if(i)return i[1].trim();let s=n.split(`
7
+ `);for(let o of s){let a=o.trim();if(a&&!a.startsWith("#")&&!a.startsWith("-")&&!a.startsWith("```"))return a.slice(0,100)+(a.length>100?"...":"")}}catch(n){console.debug("[SkillsInstaller] Failed to read skill description:",n instanceof Error?n.message:n)}}async createSkillsIndex(e,t){let n=this.scanSkillsDirectory(e),i=n.filter(c=>!H.includes(c.name)),s=i.filter(c=>c.type==="v2-methodology"),o=i.filter(c=>c.type==="v3-domain"),a=n.filter(c=>H.includes(c.name)),l=h(m(e,".validation")),g=`# AQE Skills Index
8
8
 
9
9
  This directory contains Quality Engineering skills managed by Agentic QE.
10
10
 
11
11
  ## Summary
12
12
 
13
- - **Total QE Skills**: ${r.length}
13
+ - **Total QE Skills**: ${i.length}
14
14
  - **V2 Methodology Skills**: ${s.length}
15
15
  - **V3 Domain Skills**: ${o.length}
16
16
  - **Platform Skills**: ${a.length} (Claude Flow managed)
@@ -54,12 +54,12 @@ See \`.validation/README.md\` for usage instructions.
54
54
  ---
55
55
 
56
56
  *Generated by AQE v3 init on ${new Date().toISOString()}*
57
- `;Ce(m(e,"README.md"),g,"utf-8")}scanSkillsDirectory(e){let t=[];try{let n=R(e);for(let r of n){if(r.startsWith("."))continue;let s=m(e,r);if(!G(s).isDirectory())continue;let o=m(s,"SKILL.md");if(!h(o))continue;let a=this.getSkillType(r),l=this.getSkillDescription(s),g=h(m(s,"resources"));t.push({name:r,type:a,description:l,hasResources:g})}}catch(n){console.debug("[SkillsInstaller] Failed to scan skills directory:",n instanceof Error?n.message:n)}return t.sort((n,r)=>n.name.localeCompare(r.name))}};function et(i){return new B(i)}T();import{existsSync as f,mkdirSync as D,readdirSync as K,statSync as oe,readFileSync as ae,writeFileSync as le,copyFileSync as J}from"fs";import{join as d}from"path";function Ie(i){let e=new Date().toISOString().slice(0,10),t=i.match(/^---\n([\s\S]*?)\n---/);if(!t)return i;let n=t[1],r;return/^updated:/m.test(n)?r=n.replace(/^updated:.*$/m,`updated: ${e}`):/^created:/m.test(n)?r=n.replace(/^(created:.*$)/m,`$1
58
- updated: ${e}`):r=n+`
59
- updated: ${e}`,i.replace(/^---\n[\s\S]*?\n---/,`---
60
- ${r}
61
- ---`)}var qe=["qe-test-architect","qe-bdd-generator","qe-property-tester","qe-mutation-tester","qe-test-idea-rewriter","qe-quality-criteria-recommender","qe-parallel-executor","qe-flaky-hunter","qe-retry-handler","qe-coverage-specialist","qe-gap-detector","qe-quality-gate","qe-code-complexity","qe-deployment-advisor","qe-risk-assessor","qe-defect-predictor","qe-regression-analyzer","qe-root-cause-analyzer","qe-impact-analyzer","qe-requirements-validator","qe-qx-partner","qe-product-factors-assessor","qe-code-intelligence","qe-kg-builder","qe-dependency-mapper","qe-security-scanner","qe-security-auditor","qe-pentest-validator","qe-contract-validator","qe-graphql-tester","qe-visual-tester","qe-accessibility-auditor","qe-responsive-tester","qe-chaos-engineer","qe-load-tester","qe-performance-tester","qe-learning-coordinator","qe-pattern-learner","qe-metrics-optimizer","qe-transfer-specialist","qe-soap-tester","qe-sap-rfc-tester","qe-sap-idoc-tester","qe-odata-contract-tester","qe-middleware-validator","qe-message-broker-tester","qe-sod-analyzer","qe-fleet-commander","qe-queen-coordinator","qe-tdd-specialist","qe-integration-tester","qe-integration-architect"],Te=["qe-code-reviewer","qe-integration-reviewer","qe-performance-reviewer","qe-security-reviewer","qe-tdd-red","qe-tdd-green","qe-tdd-refactor"],Y=class{projectRoot;options;sourceAgentsDir;constructor(e){this.projectRoot=e.projectRoot,this.options={installQEAgents:!0,installSubagents:!0,overwrite:!1,exclude:[],include:void 0,...e},this.sourceAgentsDir=this.findSourceAgentsDir()}findSourceAgentsDir(){let e=k(import.meta.url),t=[];e&&(t.push(d(e,"assets/agents/v3")),t.push(d(e,".claude/agents/v3"))),t.push(d(this.projectRoot,"node_modules/agentic-qe/assets/agents/v3"));for(let n of t)if(f(n))return n;return t[0]}preserveOverridesDir(){let e=d(this.projectRoot,".claude","agent-overrides");f(e)||D(e,{recursive:!0});let t=d(e,"_example.yaml");if(!f(t))try{let n=k(import.meta.url),r=[...n?[d(n,"assets","templates","agent-override-example.yaml")]:[],d(this.projectRoot,"node_modules","agentic-qe","assets","templates","agent-override-example.yaml")];for(let s of r)if(f(s)){J(s,t);break}}catch{}}async install(){let e={installed:[],skipped:[],errors:[],totalCount:0,agentsDir:d(this.projectRoot,".claude","agents","v3"),overlaysApplied:[],overlayWarnings:[]};if(this.preserveOverridesDir(),!f(this.sourceAgentsDir))return e.errors.push(`Source agents directory not found: ${this.sourceAgentsDir}`),e;let t=d(this.projectRoot,".claude","agents","v3");f(t)||D(t,{recursive:!0});let n=d(t,"subagents");f(n)||D(n,{recursive:!0}),await this.copyHelpersDirectory(t),await this.copyTemplatesDirectory(t);let r=this.getAvailableAgents();e.totalCount=r.length;let s=this.filterAgents(r);for(let l of s)try{let g=await this.installAgent(l,t,n);g?e.installed.push(g):e.skipped.push(l)}catch(g){e.errors.push(`Failed to install ${l}: ${b(g)}`)}let o=te(this.projectRoot);if(o.warnings.length>0){e.overlayWarnings=o.warnings;for(let l of o.warnings)console.error(`[AgentsInstaller] Overlay warning: ${l}`)}if(o.errors.length>0)for(let l of o.errors)e.errors.push(`Overlay error: ${l}`);for(let l of o.overlays){let g=l.agent,x=Te.includes(g)?d(n,`${g}.md`):d(t,`${g}.md`);if(!f(x)){e.overlayWarnings.push(`Overlay for "${g}" found but agent file does not exist. Skipping.`);continue}try{let I=ae(x,"utf-8"),{content:de,applied:q}=ne(I,l),pe=Ie(de);le(x,pe,"utf-8"),e.overlaysApplied.push(g);let me=[...q.replacedFields.map(C=>`replaced:${C}`),...q.appendedFields.map(C=>`appended:${C}`),...q.configOverrides.map(C=>`config:${C}`)];console.error(`[AgentsInstaller] Applied overlay for ${g}: ${me.join(", ")}`)}catch(I){e.overlayWarnings.push(`Failed to apply overlay for "${g}": ${b(I)}`)}}e.overlaysApplied.length>0&&console.error(`[AgentsInstaller] Applied ${e.overlaysApplied.length} agent overlay(s): ${e.overlaysApplied.join(", ")}`);let a=ee(t,this.projectRoot);if(e.mcpValidationWarnings=a.warnings,a.warnings.length>0){console.error(`[AgentsInstaller] MCP dependency warnings (${a.agentsWithMissingDeps.length} agents affected):`);for(let l of a.warnings.slice(0,10))console.error(` ${l}`);a.warnings.length>10&&console.error(` ... and ${a.warnings.length-10} more warnings`)}return await this.createAgentsIndex(t,e.installed),e}getAvailableAgents(){let e=[];try{let t=K(this.sourceAgentsDir);for(let n of t){let r=d(this.sourceAgentsDir,n),s=oe(r);if(s.isFile()&&n.endsWith(".md"))e.push(n.replace(".md",""));else if(s.isDirectory()&&n==="subagents"){let o=K(r);for(let a of o)a.endsWith(".md")&&e.push(`subagents/${a.replace(".md","")}`)}}}catch{return[]}return e}filterAgents(e){let t=e.filter(n=>(n.includes("/")?n.split("/")[1]:n).startsWith("qe-"));return this.options.include&&this.options.include.length>0&&(t=t.filter(n=>{let r=n.includes("/")?n.split("/")[1]:n;return this.options.include.includes(r)})),this.options.exclude&&this.options.exclude.length>0&&(t=t.filter(n=>{let r=n.includes("/")?n.split("/")[1]:n;return!this.options.exclude.some(s=>r.includes(s)||r.match(new RegExp(s)))})),this.options.installQEAgents||(t=t.filter(n=>{let r=n.includes("/")?n.split("/")[1]:n;return!qe.includes(r)})),this.options.installSubagents||(t=t.filter(n=>!n.startsWith("subagents/"))),t}async installAgent(e,t,n){let r=e.startsWith("subagents/"),s=r?e.split("/")[1]:e,o=d(this.sourceAgentsDir,`${e}.md`),a=r?d(n,`${s}.md`):d(t,`${s}.md`);if(f(a)&&!this.options.overwrite)return null;if(f(o))J(o,a);else throw new Error(`Source file not found: ${o}`);let l=this.getAgentType(s,r),g=this.getAgentDescription(a),c=this.getAgentDomain(s);return{name:s,type:l,description:g,domain:c}}getAgentType(e,t){return t?"v3-subagent":"v3-qe"}copyDirectoryRecursive(e,t){if(!f(e))return;f(t)||D(t,{recursive:!0});let n=K(e);for(let r of n){let s=d(e,r),o=d(t,r);oe(s).isDirectory()?this.copyDirectoryRecursive(s,o):(!f(o)||this.options.overwrite)&&J(s,o)}}async copyHelpersDirectory(e){let t=d(this.sourceAgentsDir,"helpers"),n=d(this.projectRoot,".claude","helpers","v3");f(t)?this.copyDirectoryRecursive(t,n):console.error(`[AgentsInstaller] Helpers source not found: ${t}`)}async copyTemplatesDirectory(e){let t=d(this.sourceAgentsDir,"templates"),n=d(e,"templates");f(t)?this.copyDirectoryRecursive(t,n):console.error(`[AgentsInstaller] Templates source not found: ${t}`)}getAgentDescription(e){if(f(e))try{let t=ae(e,"utf-8"),n=t.match(/description:\s*["']?([^"'\n]+)["']?/i);if(n)return n[1].trim();let r=t.split(`
62
- `);for(let s of r){let o=s.trim();if(o&&!o.startsWith("#")&&!o.startsWith("-")&&!o.startsWith("```")&&!o.startsWith("---"))return o.slice(0,100)+(o.length>100?"...":"")}}catch(t){console.debug("[AgentsInstaller] Failed to read agent description:",t instanceof Error?t.message:t)}}getAgentDomain(e){let t={"test-architect":"test-generation","bdd-generator":"test-generation","property-tester":"test-generation","mutation-tester":"test-generation","parallel-executor":"test-execution","flaky-hunter":"test-execution","retry-handler":"test-execution","coverage-specialist":"coverage-analysis","gap-detector":"coverage-analysis","quality-gate":"quality-assessment","code-complexity":"quality-assessment","deployment-advisor":"quality-assessment","risk-assessor":"quality-assessment","defect-predictor":"defect-intelligence","regression-analyzer":"defect-intelligence","root-cause-analyzer":"defect-intelligence","impact-analyzer":"defect-intelligence","requirements-validator":"requirements-validation","qx-partner":"requirements-validation","product-factors-assessor":"requirements-validation","quality-criteria-recommender":"requirements-validation","test-idea-rewriter":"test-generation","code-intelligence":"code-intelligence","kg-builder":"code-intelligence","dependency-mapper":"code-intelligence","security-scanner":"security-compliance","security-auditor":"security-compliance","pentest-validator":"security-compliance","contract-validator":"contract-testing","graphql-tester":"contract-testing","visual-tester":"visual-accessibility","accessibility-auditor":"visual-accessibility","responsive-tester":"visual-accessibility","chaos-engineer":"chaos-resilience","load-tester":"chaos-resilience","performance-tester":"chaos-resilience","learning-coordinator":"learning-optimization","pattern-learner":"learning-optimization","metrics-optimizer":"learning-optimization","transfer-specialist":"learning-optimization","soap-tester":"enterprise-integration","sap-rfc-tester":"enterprise-integration","sap-idoc-tester":"enterprise-integration","odata-contract-tester":"enterprise-integration","middleware-validator":"enterprise-integration","message-broker-tester":"enterprise-integration","sod-analyzer":"enterprise-integration"},n=e.replace(/^(v3-)?qe-/,"");return t[n]}async createAgentsIndex(e,t){let n=t.filter(l=>l.type==="v3-qe"),r=t.filter(l=>l.type==="v3-subagent"),s=new Map;for(let l of n){let g=l.domain||"general";s.has(g)||s.set(g,[]),s.get(g).push(l)}let o=`# AQE V3 Agents Index
57
+ `;Ce(m(e,"README.md"),g,"utf-8")}scanSkillsDirectory(e){let t=[];try{let n=R(e);for(let i of n){if(i.startsWith("."))continue;let s=m(e,i);if(!G(s).isDirectory())continue;let o=m(s,"SKILL.md");if(!h(o))continue;let a=this.getSkillType(i),l=this.getSkillDescription(s),g=h(m(s,"resources"));t.push({name:i,type:a,description:l,hasResources:g})}}catch(n){console.debug("[SkillsInstaller] Failed to scan skills directory:",n instanceof Error?n.message:n)}return t.sort((n,i)=>n.name.localeCompare(i.name))}};function Xe(r){return new B(r)}T();import{existsSync as f,mkdirSync as D,readdirSync as K,statSync as oe,readFileSync as ae,writeFileSync as le,copyFileSync as J}from"fs";import{join as d}from"path";function Ie(r){let e=new Date().toISOString().slice(0,10),t=r.match(/^---\n([\s\S]*?)\n---/);if(!t)return r;let n=t[1],i;return/^updated:/m.test(n)?i=n.replace(/^updated:.*$/m,`updated: ${e}`):/^created:/m.test(n)?i=n.replace(/^(created:.*$)/m,`$1
58
+ updated: ${e}`):i=n+`
59
+ updated: ${e}`,r.replace(/^---\n[\s\S]*?\n---/,`---
60
+ ${i}
61
+ ---`)}var qe=["qe-test-architect","qe-bdd-generator","qe-property-tester","qe-mutation-tester","qe-test-idea-rewriter","qe-quality-criteria-recommender","qe-parallel-executor","qe-flaky-hunter","qe-retry-handler","qe-coverage-specialist","qe-gap-detector","qe-quality-gate","qe-code-complexity","qe-deployment-advisor","qe-risk-assessor","qe-defect-predictor","qe-regression-analyzer","qe-root-cause-analyzer","qe-impact-analyzer","qe-requirements-validator","qe-qx-partner","qe-product-factors-assessor","qe-code-intelligence","qe-kg-builder","qe-dependency-mapper","qe-security-scanner","qe-security-auditor","qe-pentest-validator","qe-contract-validator","qe-graphql-tester","qe-visual-tester","qe-accessibility-auditor","qe-responsive-tester","qe-chaos-engineer","qe-load-tester","qe-performance-tester","qe-learning-coordinator","qe-pattern-learner","qe-metrics-optimizer","qe-transfer-specialist","qe-soap-tester","qe-sap-rfc-tester","qe-sap-idoc-tester","qe-odata-contract-tester","qe-middleware-validator","qe-message-broker-tester","qe-sod-analyzer","qe-fleet-commander","qe-queen-coordinator","qe-tdd-specialist","qe-integration-tester","qe-integration-architect"],Te=["qe-code-reviewer","qe-integration-reviewer","qe-performance-reviewer","qe-security-reviewer","qe-tdd-red","qe-tdd-green","qe-tdd-refactor"],Y=class{projectRoot;options;sourceAgentsDir;constructor(e){this.projectRoot=e.projectRoot,this.options={installQEAgents:!0,installSubagents:!0,overwrite:!1,exclude:[],include:void 0,...e},this.sourceAgentsDir=this.findSourceAgentsDir()}findSourceAgentsDir(){let e=k(import.meta.url),t=[];e&&(t.push(d(e,"assets/agents/v3")),t.push(d(e,".claude/agents/v3"))),t.push(d(this.projectRoot,"node_modules/agentic-qe/assets/agents/v3"));for(let n of t)if(f(n))return n;return t[0]}preserveOverridesDir(){let e=d(this.projectRoot,".claude","agent-overrides");f(e)||D(e,{recursive:!0});let t=d(e,"_example.yaml");if(!f(t))try{let n=k(import.meta.url),i=[...n?[d(n,"assets","templates","agent-override-example.yaml")]:[],d(this.projectRoot,"node_modules","agentic-qe","assets","templates","agent-override-example.yaml")];for(let s of i)if(f(s)){J(s,t);break}}catch{}}async install(){let e={installed:[],skipped:[],errors:[],totalCount:0,agentsDir:d(this.projectRoot,".claude","agents","v3"),overlaysApplied:[],overlayWarnings:[]};if(this.preserveOverridesDir(),!f(this.sourceAgentsDir))return e.errors.push(`Source agents directory not found: ${this.sourceAgentsDir}`),e;let t=d(this.projectRoot,".claude","agents","v3");f(t)||D(t,{recursive:!0});let n=d(t,"subagents");f(n)||D(n,{recursive:!0}),await this.copyHelpersDirectory(t),await this.copyTemplatesDirectory(t);let i=this.getAvailableAgents();e.totalCount=i.length;let s=this.filterAgents(i);for(let l of s)try{let g=await this.installAgent(l,t,n);g?e.installed.push(g):e.skipped.push(l)}catch(g){e.errors.push(`Failed to install ${l}: ${b(g)}`)}let o=te(this.projectRoot);if(o.warnings.length>0){e.overlayWarnings=o.warnings;for(let l of o.warnings)console.error(`[AgentsInstaller] Overlay warning: ${l}`)}if(o.errors.length>0)for(let l of o.errors)e.errors.push(`Overlay error: ${l}`);for(let l of o.overlays){let g=l.agent,x=Te.includes(g)?d(n,`${g}.md`):d(t,`${g}.md`);if(!f(x)){e.overlayWarnings.push(`Overlay for "${g}" found but agent file does not exist. Skipping.`);continue}try{let I=ae(x,"utf-8"),{content:de,applied:q}=ne(I,l),pe=Ie(de);le(x,pe,"utf-8"),e.overlaysApplied.push(g);let me=[...q.replacedFields.map(C=>`replaced:${C}`),...q.appendedFields.map(C=>`appended:${C}`),...q.configOverrides.map(C=>`config:${C}`)];console.error(`[AgentsInstaller] Applied overlay for ${g}: ${me.join(", ")}`)}catch(I){e.overlayWarnings.push(`Failed to apply overlay for "${g}": ${b(I)}`)}}e.overlaysApplied.length>0&&console.error(`[AgentsInstaller] Applied ${e.overlaysApplied.length} agent overlay(s): ${e.overlaysApplied.join(", ")}`);let a=ee(t,this.projectRoot);if(e.mcpValidationWarnings=a.warnings,a.warnings.length>0){console.error(`[AgentsInstaller] MCP dependency warnings (${a.agentsWithMissingDeps.length} agents affected):`);for(let l of a.warnings.slice(0,10))console.error(` ${l}`);a.warnings.length>10&&console.error(` ... and ${a.warnings.length-10} more warnings`)}return await this.createAgentsIndex(t,e.installed),e}getAvailableAgents(){let e=[];try{let t=K(this.sourceAgentsDir);for(let n of t){let i=d(this.sourceAgentsDir,n),s=oe(i);if(s.isFile()&&n.endsWith(".md"))e.push(n.replace(".md",""));else if(s.isDirectory()&&n==="subagents"){let o=K(i);for(let a of o)a.endsWith(".md")&&e.push(`subagents/${a.replace(".md","")}`)}}}catch{return[]}return e}filterAgents(e){let t=e.filter(n=>(n.includes("/")?n.split("/")[1]:n).startsWith("qe-"));return this.options.include&&this.options.include.length>0&&(t=t.filter(n=>{let i=n.includes("/")?n.split("/")[1]:n;return this.options.include.includes(i)})),this.options.exclude&&this.options.exclude.length>0&&(t=t.filter(n=>{let i=n.includes("/")?n.split("/")[1]:n;return!this.options.exclude.some(s=>i.includes(s)||i.match(new RegExp(s)))})),this.options.installQEAgents||(t=t.filter(n=>{let i=n.includes("/")?n.split("/")[1]:n;return!qe.includes(i)})),this.options.installSubagents||(t=t.filter(n=>!n.startsWith("subagents/"))),t}async installAgent(e,t,n){let i=e.startsWith("subagents/"),s=i?e.split("/")[1]:e,o=d(this.sourceAgentsDir,`${e}.md`),a=i?d(n,`${s}.md`):d(t,`${s}.md`);if(f(a)&&!this.options.overwrite)return null;if(f(o))J(o,a);else throw new Error(`Source file not found: ${o}`);let l=this.getAgentType(s,i),g=this.getAgentDescription(a),c=this.getAgentDomain(s);return{name:s,type:l,description:g,domain:c}}getAgentType(e,t){return t?"v3-subagent":"v3-qe"}copyDirectoryRecursive(e,t){if(!f(e))return;f(t)||D(t,{recursive:!0});let n=K(e);for(let i of n){let s=d(e,i),o=d(t,i);oe(s).isDirectory()?this.copyDirectoryRecursive(s,o):(!f(o)||this.options.overwrite)&&J(s,o)}}async copyHelpersDirectory(e){let t=d(this.sourceAgentsDir,"helpers"),n=d(this.projectRoot,".claude","helpers","v3");f(t)?this.copyDirectoryRecursive(t,n):console.error(`[AgentsInstaller] Helpers source not found: ${t}`)}async copyTemplatesDirectory(e){let t=d(this.sourceAgentsDir,"templates"),n=d(e,"templates");f(t)?this.copyDirectoryRecursive(t,n):console.error(`[AgentsInstaller] Templates source not found: ${t}`)}getAgentDescription(e){if(f(e))try{let t=ae(e,"utf-8"),n=t.match(/description:\s*["']?([^"'\n]+)["']?/i);if(n)return n[1].trim();let i=t.split(`
62
+ `);for(let s of i){let o=s.trim();if(o&&!o.startsWith("#")&&!o.startsWith("-")&&!o.startsWith("```")&&!o.startsWith("---"))return o.slice(0,100)+(o.length>100?"...":"")}}catch(t){console.debug("[AgentsInstaller] Failed to read agent description:",t instanceof Error?t.message:t)}}getAgentDomain(e){let t={"test-architect":"test-generation","bdd-generator":"test-generation","property-tester":"test-generation","mutation-tester":"test-generation","parallel-executor":"test-execution","flaky-hunter":"test-execution","retry-handler":"test-execution","coverage-specialist":"coverage-analysis","gap-detector":"coverage-analysis","quality-gate":"quality-assessment","code-complexity":"quality-assessment","deployment-advisor":"quality-assessment","risk-assessor":"quality-assessment","defect-predictor":"defect-intelligence","regression-analyzer":"defect-intelligence","root-cause-analyzer":"defect-intelligence","impact-analyzer":"defect-intelligence","requirements-validator":"requirements-validation","qx-partner":"requirements-validation","product-factors-assessor":"requirements-validation","quality-criteria-recommender":"requirements-validation","test-idea-rewriter":"test-generation","code-intelligence":"code-intelligence","kg-builder":"code-intelligence","dependency-mapper":"code-intelligence","security-scanner":"security-compliance","security-auditor":"security-compliance","pentest-validator":"security-compliance","contract-validator":"contract-testing","graphql-tester":"contract-testing","visual-tester":"visual-accessibility","accessibility-auditor":"visual-accessibility","responsive-tester":"visual-accessibility","chaos-engineer":"chaos-resilience","load-tester":"chaos-resilience","performance-tester":"chaos-resilience","learning-coordinator":"learning-optimization","pattern-learner":"learning-optimization","metrics-optimizer":"learning-optimization","transfer-specialist":"learning-optimization","soap-tester":"enterprise-integration","sap-rfc-tester":"enterprise-integration","sap-idoc-tester":"enterprise-integration","odata-contract-tester":"enterprise-integration","middleware-validator":"enterprise-integration","message-broker-tester":"enterprise-integration","sod-analyzer":"enterprise-integration"},n=e.replace(/^(v3-)?qe-/,"");return t[n]}async createAgentsIndex(e,t){let n=t.filter(l=>l.type==="v3-qe"),i=t.filter(l=>l.type==="v3-subagent"),s=new Map;for(let l of n){let g=l.domain||"general";s.has(g)||s.set(g,[]),s.get(g).push(l)}let o=`# AQE V3 Agents Index
63
63
 
64
64
  This directory contains V3 QE agents installed by \`aqe init\`.
65
65
 
@@ -71,7 +71,7 @@ This directory contains V3 QE agents installed by \`aqe init\`.
71
71
 
72
72
  - **Total Agents**: ${t.length}
73
73
  - **V3 QE Domain Agents**: ${n.length}
74
- - **V3 Subagents**: ${r.length}
74
+ - **V3 Subagents**: ${i.length}
75
75
 
76
76
  ## Usage
77
77
 
@@ -95,17 +95,17 @@ ${g.map(c=>`- **${c.name}**${c.description?`: ${c.description}`:""}`).join(`
95
95
  `).join(`
96
96
  `)}
97
97
 
98
- ## V3 Subagents (${r.length})
98
+ ## V3 Subagents (${i.length})
99
99
 
100
100
  Specialized sub-task agents for TDD and code review.
101
101
 
102
- ${r.map(l=>`- **${l.name}**${l.description?`: ${l.description}`:""}`).join(`
102
+ ${i.map(l=>`- **${l.name}**${l.description?`: ${l.description}`:""}`).join(`
103
103
  `)}
104
104
 
105
105
  ---
106
106
 
107
107
  *Generated by AQE v3 init on ${new Date().toISOString()}*
108
- `,a=d(this.projectRoot,".claude","docs");f(a)||D(a,{recursive:!0}),le(d(a,"v3-agents-index.md"),o,"utf-8")}};function gt(i){return new Y(i)}T();import{existsSync as v,mkdirSync as Z,readdirSync as ce,readFileSync as Ee,writeFileSync as Pe,copyFileSync as ge}from"fs";import{join as y}from"path";var ue={core:[{name:"workflow-executor",filename:"n8n-workflow-executor.md",category:"core"},{name:"node-validator",filename:"n8n-node-validator.md",category:"core"},{name:"trigger-test",filename:"n8n-trigger-test.md",category:"core"},{name:"expression-validator",filename:"n8n-expression-validator.md",category:"core"},{name:"integration-test",filename:"n8n-integration-test.md",category:"core"},{name:"security-auditor",filename:"n8n-security-auditor.md",category:"core"}],advanced:[{name:"unit-tester",filename:"n8n-unit-tester.md",category:"advanced"},{name:"performance-tester",filename:"n8n-performance-tester.md",category:"advanced"},{name:"ci-orchestrator",filename:"n8n-ci-orchestrator.md",category:"advanced"}],quality:[{name:"version-comparator",filename:"n8n-version-comparator.md",category:"quality"},{name:"bdd-scenario-tester",filename:"n8n-bdd-scenario-tester.md",category:"quality"},{name:"monitoring-validator",filename:"n8n-monitoring-validator.md",category:"quality"}],enterprise:[{name:"compliance-validator",filename:"n8n-compliance-validator.md",category:"enterprise"},{name:"chaos-tester",filename:"n8n-chaos-tester.md",category:"enterprise"}],reliability:[{name:"base-agent",filename:"n8n-base-agent.md",category:"reliability"}]},_e=["n8n-expression-testing","n8n-integration-testing-patterns","n8n-security-testing","n8n-trigger-testing-strategies","n8n-workflow-testing-fundamentals"],X=class{projectRoot;options;sourceAgentsDir;sourceSkillsDir;constructor(e){this.projectRoot=e.projectRoot,this.options={installAgents:!0,installSkills:!0,overwrite:!1,...e},this.sourceAgentsDir=this.findSourceAgentsDir(),this.sourceSkillsDir=this.findSourceSkillsDir()}findSourceAgentsDir(){let e=k(import.meta.url),t=[];e&&t.push(y(e,".claude/agents/n8n")),t.push(y(this.projectRoot,"node_modules/agentic-qe/.claude/agents/n8n"));for(let n of t)if(v(n))return n;return t[0]}findSourceSkillsDir(){let e=k(import.meta.url),t=[];e&&(t.push(y(e,"assets/skills")),t.push(y(e,".claude/skills"))),t.push(y(this.projectRoot,"node_modules/agentic-qe/assets/skills"));for(let n of t)if(v(n))return n;return t[0]}async install(){let e={success:!0,agentsInstalled:[],skillsInstalled:[],configGenerated:!1,errors:[],agentsDir:y(this.projectRoot,".claude/agents/n8n"),skillsDir:y(this.projectRoot,".claude/skills")};try{if(this.options.installAgents){let t=await this.installAgents(e.agentsDir);e.agentsInstalled=t.installed,e.errors.push(...t.errors)}if(this.options.installSkills){let t=await this.installSkills(e.skillsDir);e.skillsInstalled=t.installed,e.errors.push(...t.errors)}this.options.n8nApiConfig&&(e.configGenerated=!0),e.agentsInstalled.length>0&&this.createAgentsIndex(e.agentsDir,e.agentsInstalled)}catch(t){e.success=!1,e.errors.push(`Installation failed: ${b(t)}`)}return e}async installAgents(e){let t=[],n=[];if(v(e)||Z(e,{recursive:!0}),!v(this.sourceAgentsDir))return n.push(`Source agents directory not found: ${this.sourceAgentsDir}`),{installed:t,errors:n};let r=ce(this.sourceAgentsDir).filter(s=>s.endsWith(".md"));for(let s of Object.keys(ue))for(let o of ue[s]){let a=y(this.sourceAgentsDir,o.filename),l=y(e,o.filename);if(r.includes(o.filename)&&!(v(l)&&!this.options.overwrite))try{ge(a,l);let c=Ee(a,"utf-8").match(/description:\s*["']?(.+?)["']?\n/);o.description=c?.[1]||`n8n ${o.name} agent`,t.push(o)}catch(g){n.push(`Failed to install ${o.name}: ${b(g)}`)}}return{installed:t,errors:n}}async installSkills(e){let t=[],n=[];if(v(e)||Z(e,{recursive:!0}),!v(this.sourceSkillsDir))return n.push(`Source skills directory not found: ${this.sourceSkillsDir}`),{installed:t,errors:n};for(let r of _e){let s=y(this.sourceSkillsDir,r),o=y(e,r);if(v(s)&&!(v(o)&&!this.options.overwrite))try{this.copyDirectory(s,o),t.push(r)}catch(a){n.push(`Failed to install skill ${r}: ${b(a)}`)}}return{installed:t,errors:n}}copyDirectory(e,t){v(t)||Z(t,{recursive:!0});let n=ce(e,{withFileTypes:!0});for(let r of n){let s=y(e,r.name),o=y(t,r.name);r.isDirectory()?this.copyDirectory(s,o):ge(s,o)}}createAgentsIndex(e,t){let n=y(e,"README.md"),r={core:t.filter(o=>o.category==="core"),advanced:t.filter(o=>o.category==="advanced"),quality:t.filter(o=>o.category==="quality"),enterprise:t.filter(o=>o.category==="enterprise"),reliability:t.filter(o=>o.category==="reliability")},s=`# N8n Testing Agents
108
+ `,a=d(this.projectRoot,".claude","docs");f(a)||D(a,{recursive:!0}),le(d(a,"v3-agents-index.md"),o,"utf-8")}};function at(r){return new Y(r)}T();import{existsSync as v,mkdirSync as Z,readdirSync as ce,readFileSync as Ee,writeFileSync as Pe,copyFileSync as ge}from"fs";import{join as y}from"path";var ue={core:[{name:"workflow-executor",filename:"n8n-workflow-executor.md",category:"core"},{name:"node-validator",filename:"n8n-node-validator.md",category:"core"},{name:"trigger-test",filename:"n8n-trigger-test.md",category:"core"},{name:"expression-validator",filename:"n8n-expression-validator.md",category:"core"},{name:"integration-test",filename:"n8n-integration-test.md",category:"core"},{name:"security-auditor",filename:"n8n-security-auditor.md",category:"core"}],advanced:[{name:"unit-tester",filename:"n8n-unit-tester.md",category:"advanced"},{name:"performance-tester",filename:"n8n-performance-tester.md",category:"advanced"},{name:"ci-orchestrator",filename:"n8n-ci-orchestrator.md",category:"advanced"}],quality:[{name:"version-comparator",filename:"n8n-version-comparator.md",category:"quality"},{name:"bdd-scenario-tester",filename:"n8n-bdd-scenario-tester.md",category:"quality"},{name:"monitoring-validator",filename:"n8n-monitoring-validator.md",category:"quality"}],enterprise:[{name:"compliance-validator",filename:"n8n-compliance-validator.md",category:"enterprise"},{name:"chaos-tester",filename:"n8n-chaos-tester.md",category:"enterprise"}],reliability:[{name:"base-agent",filename:"n8n-base-agent.md",category:"reliability"}]},_e=["n8n-expression-testing","n8n-integration-testing-patterns","n8n-security-testing","n8n-trigger-testing-strategies","n8n-workflow-testing-fundamentals"],X=class{projectRoot;options;sourceAgentsDir;sourceSkillsDir;constructor(e){this.projectRoot=e.projectRoot,this.options={installAgents:!0,installSkills:!0,overwrite:!1,...e},this.sourceAgentsDir=this.findSourceAgentsDir(),this.sourceSkillsDir=this.findSourceSkillsDir()}findSourceAgentsDir(){let e=k(import.meta.url),t=[];e&&t.push(y(e,".claude/agents/n8n")),t.push(y(this.projectRoot,"node_modules/agentic-qe/.claude/agents/n8n"));for(let n of t)if(v(n))return n;return t[0]}findSourceSkillsDir(){let e=k(import.meta.url),t=[];e&&(t.push(y(e,"assets/skills")),t.push(y(e,".claude/skills"))),t.push(y(this.projectRoot,"node_modules/agentic-qe/assets/skills"));for(let n of t)if(v(n))return n;return t[0]}async install(){let e={success:!0,agentsInstalled:[],skillsInstalled:[],configGenerated:!1,errors:[],agentsDir:y(this.projectRoot,".claude/agents/n8n"),skillsDir:y(this.projectRoot,".claude/skills")};try{if(this.options.installAgents){let t=await this.installAgents(e.agentsDir);e.agentsInstalled=t.installed,e.errors.push(...t.errors)}if(this.options.installSkills){let t=await this.installSkills(e.skillsDir);e.skillsInstalled=t.installed,e.errors.push(...t.errors)}this.options.n8nApiConfig&&(e.configGenerated=!0),e.agentsInstalled.length>0&&this.createAgentsIndex(e.agentsDir,e.agentsInstalled)}catch(t){e.success=!1,e.errors.push(`Installation failed: ${b(t)}`)}return e}async installAgents(e){let t=[],n=[];if(v(e)||Z(e,{recursive:!0}),!v(this.sourceAgentsDir))return n.push(`Source agents directory not found: ${this.sourceAgentsDir}`),{installed:t,errors:n};let i=ce(this.sourceAgentsDir).filter(s=>s.endsWith(".md"));for(let s of Object.keys(ue))for(let o of ue[s]){let a=y(this.sourceAgentsDir,o.filename),l=y(e,o.filename);if(i.includes(o.filename)&&!(v(l)&&!this.options.overwrite))try{ge(a,l);let c=Ee(a,"utf-8").match(/description:\s*["']?(.+?)["']?\n/);o.description=c?.[1]||`n8n ${o.name} agent`,t.push(o)}catch(g){n.push(`Failed to install ${o.name}: ${b(g)}`)}}return{installed:t,errors:n}}async installSkills(e){let t=[],n=[];if(v(e)||Z(e,{recursive:!0}),!v(this.sourceSkillsDir))return n.push(`Source skills directory not found: ${this.sourceSkillsDir}`),{installed:t,errors:n};for(let i of _e){let s=y(this.sourceSkillsDir,i),o=y(e,i);if(v(s)&&!(v(o)&&!this.options.overwrite))try{this.copyDirectory(s,o),t.push(i)}catch(a){n.push(`Failed to install skill ${i}: ${b(a)}`)}}return{installed:t,errors:n}}copyDirectory(e,t){v(t)||Z(t,{recursive:!0});let n=ce(e,{withFileTypes:!0});for(let i of n){let s=y(e,i.name),o=y(t,i.name);i.isDirectory()?this.copyDirectory(s,o):ge(s,o)}}createAgentsIndex(e,t){let n=y(e,"README.md"),i={core:t.filter(o=>o.category==="core"),advanced:t.filter(o=>o.category==="advanced"),quality:t.filter(o=>o.category==="quality"),enterprise:t.filter(o=>o.category==="enterprise"),reliability:t.filter(o=>o.category==="reliability")},s=`# N8n Testing Agents
109
109
 
110
110
  > Auto-generated by \`aqe init --with-n8n\`
111
111
 
@@ -115,11 +115,11 @@ These agents provide comprehensive testing capabilities for n8n workflow automat
115
115
 
116
116
  | Category | Count |
117
117
  |----------|-------|
118
- | Core | ${r.core.length} |
119
- | Advanced | ${r.advanced.length} |
120
- | Quality | ${r.quality.length} |
121
- | Enterprise | ${r.enterprise.length} |
122
- | Reliability | ${r.reliability.length} |
118
+ | Core | ${i.core.length} |
119
+ | Advanced | ${i.advanced.length} |
120
+ | Quality | ${i.quality.length} |
121
+ | Enterprise | ${i.enterprise.length} |
122
+ | Reliability | ${i.reliability.length} |
123
123
  | **Total** | **${t.length}** |
124
124
 
125
125
  ## Usage with Claude Code
@@ -132,7 +132,7 @@ Task("Run security audit on workflow", "n8n-security-auditor")
132
132
 
133
133
  ## Agent Categories
134
134
 
135
- `;for(let[o,a]of Object.entries(r))if(a.length!==0){s+=`### ${o.charAt(0).toUpperCase()+o.slice(1)}
135
+ `;for(let[o,a]of Object.entries(i))if(a.length!==0){s+=`### ${o.charAt(0).toUpperCase()+o.slice(1)}
136
136
 
137
137
  `;for(let l of a)s+=`- **${l.name}**: ${l.description||"N8n testing agent"}
138
138
  `;s+=`
@@ -177,4 +177,4 @@ N8n agents map to v3 domains:
177
177
  - Compliance agents \u2192 security-compliance domain
178
178
  - Chaos agents \u2192 chaos-resilience domain
179
179
 
180
- `}};function yt(i){return new X(i)}export{M as a,Fe as b,Me as c,ze as d,Se as e,Ue as f,He as g,Be as h,et as i,gt as j,yt as k};
180
+ `}};function pt(r){return new X(r)}export{M as a,Fe as b,Me as c,We as d,Se as e,Ge as f,Ue as g,He as h,Xe as i,at as j,pt as k};
@@ -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.10.4");process.exit(0)}
2
+ import{d as D,e as V}from"./chunk-VRE2EBFI.js";V();import*as A from"node:fs";import B from"node:module";import*as N from"node:path";import{fileURLToPath as J}from"node:url";var b=D("TreeSitterWASM"),O={python:{wasmFile:"tree-sitter-python.wasm",nodeTypes:{functionDecl:["function_definition"],classDecl:["class_definition"],importDecl:["import_statement","import_from_statement"]}},java:{wasmFile:"tree-sitter-java.wasm",nodeTypes:{functionDecl:["method_declaration","constructor_declaration"],classDecl:["class_declaration","interface_declaration"],importDecl:["import_declaration"]}},csharp:{wasmFile:"tree-sitter-c_sharp.wasm",nodeTypes:{functionDecl:["method_declaration","constructor_declaration"],classDecl:["class_declaration","interface_declaration"],importDecl:["using_directive"]}},rust:{wasmFile:"tree-sitter-rust.wasm",nodeTypes:{functionDecl:["function_item"],classDecl:[],importDecl:["use_declaration"],implBlock:"impl_item",structDecl:"struct_item"}},swift:{wasmFile:"tree-sitter-swift.wasm",nodeTypes:{functionDecl:["function_declaration"],classDecl:["class_declaration"],importDecl:["import_declaration"],structDecl:"struct_declaration",protocolDecl:"protocol_declaration"}}},y=null,g=null,F=0,P=3,w=new Map;function I(i){let e=J(new URL(".",import.meta.url)),t=[N.resolve(e,"..","..","..","assets","grammars",i),N.resolve(e,"..","..","assets","grammars",i),N.resolve(process.cwd(),"assets","grammars",i),N.resolve(e,"..","assets","grammars",i)];for(let n of t)if(A.existsSync(n))return n;throw new Error(`Grammar file ${i} not found. Searched: ${t.join(", ")}`)}async function E(){if(F>=P)throw new Error(`web-tree-sitter failed to initialize after ${P} attempts`);if(!y)return g||(g=(async()=>{try{let i=await import("./web-tree-sitter-LECH5T6H.js"),e=i.default??i;await(e.Parser?.init??e.init).call(e.Parser??e),y=e,F=0,b.info("web-tree-sitter WASM runtime initialized")}catch(i){F++,g=null;let e=i instanceof Error?i.message:String(i);throw b.warn(`web-tree-sitter WASM init failed (attempt ${F}/${P}): ${e}. `+(F<P?"Will retry on next parse.":"Falling back to regex permanently.")),i}})()),g}async function X(i){let e=w.get(i);if(e)return e;await E();let t=O[i];if(!t)throw new Error(`No WASM grammar config for ${i}`);try{let n=I(t.wasmFile),s=await y.Language.load(n);return w.set(i,s),b.info(`Loaded tree-sitter WASM grammar for ${i}`),s}catch(n){let s=n instanceof Error?n.message:String(n);throw b.warn(`Failed to load WASM grammar for ${i}: ${s}. Falling back to regex parser.`),n}}function u(i,e){let t=[];for(let n=0;n<i.childCount;n++){let s=i.child(n);e.includes(s.type)&&t.push(s)}return t}function h(i,e,t=10){let n=[];function s(r,o){if(!(o>t))for(let a=0;a<r.childCount;a++){let c=r.child(a);e.includes(c.type)&&n.push(c),s(c,o+1)}}return s(i,0),n}function x(i){let e=[];for(let t=0;t<i.childCount;t++){let n=i.child(t);(n.type==="modifiers"||n.type==="modifier"||n.type==="visibility_modifier")&&e.push(n.text.trim())}return e}function C(i,e){return x(i).some(t=>t.includes(e))}var Y=new Set(["if_statement","if_expression","if_let_statement","while_statement","while_expression","for_statement","for_in_statement","for_expression","enhanced_for_statement","match_expression","switch_statement","switch_expression","case_clause","match_arm","switch_entry","catch_clause","except_clause","catch_block","binary_expression","conditional_expression","ternary_expression"]),q=new Set(["&&","||","and","or"]);function _(i){if(!i)return 1;let e=1;function t(n){if(Y.has(n.type))if(n.type==="binary_expression"){let s=n.childForFieldName("operator");s&&q.has(s.text)&&e++}else e++;for(let s=0;s<n.childCount;s++)t(n.child(s))}return t(i),e}function S(i,e){if(!i)return[];let t=[];for(let n=0;n<i.childCount;n++){let s=i.child(n);switch(e){case"java":if(s.type==="field_declaration"){let r=x(s),o=s.childForFieldName("type")?.text?.trim(),a=s.childForFieldName("declarator"),c=a?.childForFieldName("name")?.text??a?.text?.split(/[=;]/)[0]?.trim()??"";c&&t.push({name:c,type:o||void 0,isPublic:r.some(l=>l.includes("public")),isReadonly:r.some(l=>l.includes("final"))})}break;case"csharp":if(s.type==="field_declaration"||s.type==="property_declaration"){let r=x(s),o=s.childForFieldName("type")?.text?.trim(),a=s.childForFieldName("name")?.text??"";a&&t.push({name:a,type:o||void 0,isPublic:r.some(c=>c.includes("public")),isReadonly:r.some(c=>c.includes("readonly"))})}break;case"rust":if(s.type==="field_declaration"){let r=s.childForFieldName("name")?.text??"",o=s.childForFieldName("type")?.text?.trim(),a=C(s,"pub");r&&t.push({name:r,type:o||void 0,isPublic:a,isReadonly:!1})}break;case"swift":if(s.type==="property_declaration"){let r=L(s),o=s.childForFieldName("name")?.text??"",a=s.childForFieldName("type")?.text?.trim(),c=r.includes("public")||r.includes("open"),l=s.text.includes("let ");o&&t.push({name:o,type:a||void 0,isPublic:c,isReadonly:l})}break;case"python":if(s.type==="expression_statement"){let r=s.child(0);if(r?.type==="assignment"){let o=r.childForFieldName("left");if(o?.type==="attribute"||o?.type==="identifier"){let a=o.text.replace("self.","");t.push({name:a,type:void 0,isPublic:!a.startsWith("_"),isReadonly:!1})}}}break}}return t}function k(i){return i.map(e=>{let t=e.childForFieldName("name")?.text??"",n=e.childForFieldName("parameters"),s=e.childForFieldName("return_type"),r=e.childForFieldName("body"),o=e.text.trimStart().startsWith("async"),a=W(e);return{name:t,parameters:z(n),returnType:s?.text?.trim()||void 0,isAsync:o,isPublic:!t.startsWith("_"),complexity:_(r),decorators:a,genericParams:[],startLine:e.startPosition.row+1,endLine:e.endPosition.row+1}})}function z(i){if(!i)return[];let e=[];for(let t=0;t<i.childCount;t++){let n=i.child(t);if(n.type==="identifier"){let s=n.text;if(s==="self"||s==="cls")continue;e.push({name:s,type:void 0,isOptional:!1,defaultValue:void 0})}else if(n.type==="typed_parameter"){let s=n.child(0)?.text??"";if(s==="self"||s==="cls")continue;let r=n.childForFieldName("type")?.text?.trim();e.push({name:s,type:r||void 0,isOptional:!1,defaultValue:void 0})}else if(n.type==="default_parameter"||n.type==="typed_default_parameter"){let s=n.childForFieldName("name")?.text??n.child(0)?.text??"";if(s==="self"||s==="cls")continue;let r=n.childForFieldName("type")?.text?.trim(),o=n.childForFieldName("value")?.text?.trim();e.push({name:s,type:r||void 0,isOptional:!0,defaultValue:o||void 0})}else if(n.type==="list_splat_pattern"||n.type==="dictionary_splat_pattern"){let s=n.text;e.push({name:s,type:void 0,isOptional:!0,defaultValue:void 0})}}return e}function W(i){let e=[],t=i.parent;if(!t)return e;if(t.type==="decorated_definition")for(let n=0;n<t.childCount;n++){let s=t.child(n);s.type==="decorator"&&e.push(s.text.trim())}return e}function Q(i){return i.map(e=>{let t=e.childForFieldName("name")?.text??"",n=e.childForFieldName("body"),s=e.childForFieldName("superclasses"),r=[];if(s)for(let l=0;l<s.childCount;l++){let d=s.child(l);d.isNamed&&r.push(d.text)}let o=n?h(n,["function_definition"],2):[],a=k(o),c=W(e);return{name:t,methods:a,properties:S(n,"python"),isPublic:!t.startsWith("_"),implements:[],extends:r[0]||void 0,decorators:c,startLine:e.startPosition.row+1,endLine:e.endPosition.row+1}})}function H(i){return i.map(e=>{if(e.type==="import_from_statement"){let n=e.childForFieldName("module_name")?.text??"",s=[];for(let r=0;r<e.childCount;r++){let o=e.child(r);e.fieldNameForChild(r)==="name"&&o.isNamed&&s.push(o.text)}return{module:n,namedImports:s,isTypeOnly:!1}}return{module:e.childForFieldName("name")?.text??"",namedImports:[],isTypeOnly:!1}})}function T(i){return i.map(e=>{let t=e.childForFieldName("name")?.text??"",n=e.childForFieldName("type"),s=e.childForFieldName("parameters"),r=e.childForFieldName("body"),a=x(e).some(d=>d.includes("public")),c=n?.text?.includes("CompletableFuture")??!1,l=M(e);return{name:t,parameters:K(s),returnType:n?.text==="void"?void 0:n?.text?.trim(),isAsync:c,isPublic:a,complexity:_(r),decorators:l,genericParams:[],startLine:e.startPosition.row+1,endLine:e.endPosition.row+1}})}function K(i){if(!i)return[];let e=[];for(let t=0;t<i.childCount;t++){let n=i.child(t);if(n.type==="formal_parameter"||n.type==="spread_parameter"){let s=n.childForFieldName("name")?.text??"",r=n.childForFieldName("type")?.text?.trim();e.push({name:s,type:r||void 0,isOptional:!1,defaultValue:void 0})}}return e}function M(i){let e=[];for(let t=0;t<i.childCount;t++){let n=i.child(t);if(n.type==="modifiers")for(let s=0;s<n.childCount;s++){let r=n.child(s);(r.type==="marker_annotation"||r.type==="annotation")&&e.push(r.text.trim())}}return e}function Z(i){return i.map(e=>{let t=e.childForFieldName("name")?.text??"",n=e.childForFieldName("body"),r=x(e).some(p=>p.includes("public")),o=e.childForFieldName("superclass")?.text,a=e.childForFieldName("interfaces"),c=[];if(a)for(let p=0;p<a.childCount;p++){let f=a.child(p);f.isNamed&&c.push(f.text)}let l=n?u(n,["method_declaration","constructor_declaration"]):[],d=T(l),m=M(e);return{name:t,methods:d,properties:S(n,"java"),isPublic:r,implements:c,extends:o||void 0,decorators:m,startLine:e.startPosition.row+1,endLine:e.endPosition.row+1}})}function ee(i){return i.map(e=>{let t=e.text.replace(/^\s*import\s+(static\s+)?/,"").replace(/;\s*$/,"").trim(),n=t.split("."),s=n[n.length-1];return{module:t,namedImports:s==="*"?[]:[s],isTypeOnly:!1}})}function te(i){return h(i,["method_declaration","constructor_declaration"]).map(t=>{let n=t.childForFieldName("name")?.text??"",s=t.childForFieldName("type"),r=t.childForFieldName("parameters"),o=x(t),a=o.some(d=>d.includes("public")),c=o.some(d=>d.includes("async"))||s?.text?.includes("Task")||!1,l=j(t);return{name:n,parameters:ne(r),returnType:s?.text==="void"?void 0:s?.text?.trim(),isAsync:c,isPublic:a,complexity:_(t.childForFieldName("body")),decorators:l,genericParams:[],startLine:t.startPosition.row+1,endLine:t.endPosition.row+1}})}function ne(i){if(!i)return[];let e=[];for(let t=0;t<i.childCount;t++){let n=i.child(t);if(n.type==="parameter"){let s=n.childForFieldName("name")?.text??"",r=n.childForFieldName("type")?.text?.trim();e.push({name:s,type:r||void 0,isOptional:r?.endsWith("?")||!1,defaultValue:void 0})}}return e}function j(i){let e=[];for(let t=0;t<i.childCount;t++){let n=i.child(t);n.type==="attribute_list"&&e.push(n.text.trim())}return e}function se(i){return h(i,["class_declaration","interface_declaration"]).map(t=>{let n=t.childForFieldName("name")?.text??"",s=t.childForFieldName("body"),o=x(t).some(p=>p.includes("public")),a=t.childForFieldName("bases"),c=[];if(a)for(let p=0;p<a.childCount;p++){let f=a.child(p);f.isNamed&&c.push(f.text)}let l=s?u(s,["method_declaration","constructor_declaration"]):[],d=T(l),m=j(t);return{name:n,methods:d,properties:S(s,"csharp"),isPublic:o,implements:c.slice(1),extends:c[0]||void 0,decorators:m,startLine:t.startPosition.row+1,endLine:t.endPosition.row+1}})}function ie(i){return h(i,["using_directive"]).map(t=>({module:t.text.replace(/^\s*using\s+(static\s+)?/,"").replace(/;\s*$/,"").trim(),namedImports:[],isTypeOnly:!1}))}function re(i,e){let t=[],n=u(i,e.nodeTypes.functionDecl);if(t.push(...n.map(U)),e.nodeTypes.implBlock){let s=u(i,[e.nodeTypes.implBlock]);for(let r of s){let o=r.childForFieldName("body");if(o){let a=u(o,e.nodeTypes.functionDecl);t.push(...a.map(U))}}}return t}function U(i){let e=i.childForFieldName("name")?.text??"",t=i.childForFieldName("parameters"),n=i.childForFieldName("return_type"),s=i.childForFieldName("body"),r=C(i,"pub"),o=i.text.trimStart().startsWith("pub async")||i.text.trimStart().startsWith("async"),a=G(i);return{name:e,parameters:oe(t),returnType:n?.text?.trim()||void 0,isAsync:o,isPublic:r,complexity:_(s),decorators:a,genericParams:[],startLine:i.startPosition.row+1,endLine:i.endPosition.row+1}}function oe(i){if(!i)return[];let e=[];for(let t=0;t<i.childCount;t++){let n=i.child(t);if(n.type==="parameter"){let s=n.childForFieldName("pattern"),r=n.childForFieldName("type"),o=s?.text??"",a=r?.text?.trim();e.push({name:o,type:a||void 0,isOptional:!1,defaultValue:void 0})}else if(n.type==="self_parameter")continue}return e}function G(i){let e=[],t=i.previousNamedSibling;for(;t&&t.type==="attribute_item";)e.unshift(t.text.trim()),t=t.previousNamedSibling;return e}function ae(i){let e=[],t=u(i,["struct_item","enum_item","trait_item"]);for(let n of t){let s=n.childForFieldName("name")?.text??"",r=C(n,"pub"),o=G(n),a=n.childForFieldName("body");e.push({name:s,methods:[],properties:S(a,"rust"),isPublic:r,implements:[],extends:void 0,decorators:o,startLine:n.startPosition.row+1,endLine:n.endPosition.row+1})}return e}function ce(i){return u(i,["use_declaration"]).map(t=>({module:t.childForFieldName("argument")?.text??t.text.replace(/^\s*use\s+/,"").replace(/;\s*$/,"").trim(),namedImports:[],isTypeOnly:!1}))}function $(i){return i.map(e=>{let t="",n=[],s,r=L(e),o=r.includes("public")||r.includes("open"),a=!1;for(let l=0;l<e.childCount;l++){let d=e.child(l);e.fieldNameForChild(l)==="name"&&(d.type==="simple_identifier"?t=d.text:t||(s=d.text)),d.type==="parameter"&&n.push(d),(d.type==="async"||d.text==="async")&&(a=!0)}if(!t){for(let l=0;l<e.childCount;l++)if(e.child(l).type==="simple_identifier"){t=e.child(l).text;break}}let c=null;for(let l=0;l<e.childCount;l++)if(e.child(l).type==="function_body"){c=e.child(l);break}return{name:t,parameters:le(n),returnType:s,isAsync:a,isPublic:o,complexity:_(c),decorators:[],genericParams:[],startLine:e.startPosition.row+1,endLine:e.endPosition.row+1}})}function L(i){let e=[];for(let t=0;t<i.childCount;t++){let n=i.child(t);if(n.type==="modifiers")for(let s=0;s<n.childCount;s++)e.push(n.child(s).text.trim())}return e}function le(i){return i.map(e=>{let n=e.text.split(":"),s=n[0]?.trim().split(/\s+/)??[],r=s[s.length-1]||"",o=n.slice(1).join(":").trim()||void 0;return{name:r,type:o,isOptional:o?.endsWith("?")||!1,defaultValue:void 0}})}function de(i){return u(i,["class_declaration","struct_declaration","protocol_declaration"]).map(n=>{let s=n.childForFieldName("name"),r=s?.text??"",o=L(n),a=o.includes("public")||o.includes("open"),c=[];for(let p=0;p<n.childCount;p++){let f=n.child(p);f.type==="type_identifier"&&f!==s&&c.push(f.text),(f.type==="inheritance_specifier"||f.type==="user_type")&&c.push(f.text)}let l=n.childForFieldName("body"),d=l?h(l,["function_declaration"],2):[],m=$(d);return{name:r,methods:m,properties:S(l,"swift"),isPublic:a,implements:c.slice(1),extends:c[0]||void 0,decorators:[],startLine:n.startPosition.row+1,endLine:n.endPosition.row+1}})}function ue(i){return u(i,["import_declaration"]).map(t=>{let n="";for(let s=0;s<t.childCount;s++){let r=t.child(s);(r.type==="identifier"||r.type==="simple_identifier")&&(n=r.text)}return{module:n,namedImports:[],isTypeOnly:!1}})}var v=class{language;supportedExtensions;constructor(e,t){this.language=e,this.supportedExtensions=t}async parseFile(e,t){let n=await X(this.language),s=y.Parser??y,r=new s;r.setLanguage(n);let o=r.parse(e),a=o.rootNode;try{return{...this.extractFromAST(a),language:this.language,filePath:t}}finally{o.delete(),r.delete()}}extractFromAST(e){let t=O[this.language];switch(this.language){case"python":{let n=u(e,t.nodeTypes.functionDecl),s=u(e,["decorated_definition"]).map(d=>{for(let m=0;m<d.childCount;m++)if(t.nodeTypes.functionDecl.includes(d.child(m).type))return d.child(m);return null}).filter(Boolean),r=[...n,...s],o=u(e,t.nodeTypes.classDecl),a=u(e,["decorated_definition"]).map(d=>{for(let m=0;m<d.childCount;m++)if(t.nodeTypes.classDecl.includes(d.child(m).type))return d.child(m);return null}).filter(Boolean),c=[...o,...a],l=u(e,t.nodeTypes.importDecl);return{functions:k(r),classes:Q(c),imports:H(l)}}case"java":{let n=h(e,t.nodeTypes.classDecl),s=u(e,t.nodeTypes.importDecl),o=[...u(e,t.nodeTypes.functionDecl)];for(let a of n){let c=a.childForFieldName("body");c&&o.push(...u(c,t.nodeTypes.functionDecl))}return{functions:T(o),classes:Z(n),imports:ee(s)}}case"csharp":return{functions:te(e),classes:se(e),imports:ie(e)};case"rust":return{functions:re(e,t),classes:ae(e),imports:ce(e)};case"swift":{let n=h(e,t.nodeTypes.functionDecl);return{functions:$(n),classes:de(e),imports:ue(e)}}default:return{functions:[],classes:[],imports:[]}}}},me={python:[".py"],java:[".java"],csharp:[".cs"],rust:[".rs"],swift:[".swift"]};function xe(){let i=new Map;for(let[e,t]of Object.entries(me))i.set(e,new v(e,t));return i}function pe(){if(process.env.AQE_PARSER_REGEX_ONLY==="1"||process.env.AQE_PARSER_REGEX_ONLY==="true")return!1;try{let{createRequire:i}=B;return i(import.meta.url).resolve("web-tree-sitter"),I("tree-sitter-python.wasm"),!0}catch{return!1}}var R=new Map;async function Fe(i){if(!pe())return null;try{await E();let e=R.get(i);return e||(e=await y.Language.load(I(i)),R.set(i,e)),{parse:t=>{let n=y.Parser??y,s=new n;s.setLanguage(e);let r=s.parse(t);return s.delete?.(),r}}}catch{return null}}function Ne(){y=null,g=null,F=0,w.clear()}export{v as a,xe as b,pe as c,Fe as d,Ne as e};
@@ -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.10.2");process.exit(0)}
2
- import{c}from"./chunk-ORF2UKQH.js";function u(r){switch(r.toUpperCase()){case"DEBUG":return 0;case"INFO":return 1;case"WARN":case"WARNING":return 2;case"ERROR":return 3;case"SILENT":case"NONE":case"OFF":return 4;default:return 1}}var f,l=c(()=>{"use strict";f={0:"DEBUG",1:"INFO",2:"WARN",3:"ERROR",4:"SILENT"}});var a,s,g,d=c(()=>{"use strict";l();a={includeTimestamp:!0,includeLevel:!0,timestampFormat:"short",prettyPrint:!1,maxContextDepth:3},s=class r{domain;level;config;inheritedContext;constructor(e,n=1,o={},t={}){this.domain=e,this.level=n,this.config={...a,...o},this.inheritedContext=t}debug(e,n){this.level<=0&&this.output(0,e,n)}info(e,n){this.level<=1&&this.output(1,e,n)}warn(e,n){this.level<=2&&this.output(2,e,n)}error(e,n,o){if(this.level<=3){let t={...o};if(n){t.errorName=n.name,t.errorMessage=n.message,n.stack&&(t.stack=n.stack);let i=n;i.cause!==void 0&&(t.cause=String(i.cause))}this.output(3,e,t)}}isEnabled(e){return this.level<=e}getDomain(){return this.domain}child(e){return new r(this.domain,this.level,this.config,{...this.inheritedContext,...e})}output(e,n,o){let t=this.format(e,n,o);switch(e){case 0:console.debug(t);break;case 1:console.info(t);break;case 2:console.warn(t);break;case 3:console.error(t);break}}format(e,n,o){let t=[];this.config.includeTimestamp&&t.push(this.formatTimestamp()),this.config.includeLevel&&t.push(this.formatLevel(e)),t.push(`[${this.domain}]`),t.push(n);let i=this.mergeContext(o);return i&&Object.keys(i).length>0&&t.push(this.formatContext(i)),t.join(" ")}formatTimestamp(){let e=new Date;if(this.config.timestampFormat==="iso")return`[${e.toISOString()}]`;let n=String(e.getHours()).padStart(2,"0"),o=String(e.getMinutes()).padStart(2,"0"),t=String(e.getSeconds()).padStart(2,"0"),i=String(e.getMilliseconds()).padStart(3,"0");return`[${n}:${o}:${t}.${i}]`}formatLevel(e){return`[${f[e].padEnd(5)}]`}mergeContext(e){if(!(!e&&Object.keys(this.inheritedContext).length===0))return{...this.inheritedContext,...e}}formatContext(e){try{return this.config.prettyPrint?`
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.10.4");process.exit(0)}
2
+ import{c}from"./chunk-SVILIQQQ.js";function u(r){switch(r.toUpperCase()){case"DEBUG":return 0;case"INFO":return 1;case"WARN":case"WARNING":return 2;case"ERROR":return 3;case"SILENT":case"NONE":case"OFF":return 4;default:return 1}}var f,l=c(()=>{"use strict";f={0:"DEBUG",1:"INFO",2:"WARN",3:"ERROR",4:"SILENT"}});var a,s,g,d=c(()=>{"use strict";l();a={includeTimestamp:!0,includeLevel:!0,timestampFormat:"short",prettyPrint:!1,maxContextDepth:3},s=class r{domain;level;config;inheritedContext;constructor(e,n=1,o={},t={}){this.domain=e,this.level=n,this.config={...a,...o},this.inheritedContext=t}debug(e,n){this.level<=0&&this.output(0,e,n)}info(e,n){this.level<=1&&this.output(1,e,n)}warn(e,n){this.level<=2&&this.output(2,e,n)}error(e,n,o){if(this.level<=3){let t={...o};if(n){t.errorName=n.name,t.errorMessage=n.message,n.stack&&(t.stack=n.stack);let i=n;i.cause!==void 0&&(t.cause=String(i.cause))}this.output(3,e,t)}}isEnabled(e){return this.level<=e}getDomain(){return this.domain}child(e){return new r(this.domain,this.level,this.config,{...this.inheritedContext,...e})}output(e,n,o){let t=this.format(e,n,o);switch(e){case 0:console.debug(t);break;case 1:console.info(t);break;case 2:console.warn(t);break;case 3:console.error(t);break}}format(e,n,o){let t=[];this.config.includeTimestamp&&t.push(this.formatTimestamp()),this.config.includeLevel&&t.push(this.formatLevel(e)),t.push(`[${this.domain}]`),t.push(n);let i=this.mergeContext(o);return i&&Object.keys(i).length>0&&t.push(this.formatContext(i)),t.join(" ")}formatTimestamp(){let e=new Date;if(this.config.timestampFormat==="iso")return`[${e.toISOString()}]`;let n=String(e.getHours()).padStart(2,"0"),o=String(e.getMinutes()).padStart(2,"0"),t=String(e.getSeconds()).padStart(2,"0"),i=String(e.getMilliseconds()).padStart(3,"0");return`[${n}:${o}:${t}.${i}]`}formatLevel(e){return`[${f[e].padEnd(5)}]`}mergeContext(e){if(!(!e&&Object.keys(this.inheritedContext).length===0))return{...this.inheritedContext,...e}}formatContext(e){try{return this.config.prettyPrint?`
3
3
  `+JSON.stringify(e,this.createReplacer(),2):JSON.stringify(e,this.createReplacer())}catch{return"[unserializable context]"}}createReplacer(){let e=new WeakSet,n=0;return(o,t)=>{if(typeof t=="object"&&t!==null){if(n>=this.config.maxContextDepth)return"[object]";if(e.has(t))return"[circular]";e.add(t),n++}return t instanceof Error?{name:t.name,message:t.message,stack:t.stack}:typeof t=="bigint"?t.toString():typeof t=="function"?"[function]":typeof t=="symbol"?t.toString():t}}},g=class{domain;constructor(e="null"){this.domain=e}debug(e,n){}info(e,n){}warn(e,n){}error(e,n,o){}isEnabled(e){return!1}getDomain(){return this.domain}child(e){return this}}});function F(r,e){return L.create(r,e)}var v,L,m=c(()=>{"use strict";l();d();v={defaultLevel:1,domainLevels:new Map,consoleConfig:a,silent:!1},L=class{static config={...v};static customProvider=null;static instances=new Map;static setLevel(e){this.config.defaultLevel=e,this.instances.clear()}static setLevelFromString(e){this.setLevel(u(e))}static getLevel(){return this.config.defaultLevel}static setDomainLevel(e,n){this.config.domainLevels.set(e,n),this.instances.delete(e)}static getDomainLevel(e){return this.config.domainLevels.get(e)??this.config.defaultLevel}static clearDomainLevel(e){this.config.domainLevels.delete(e),this.instances.delete(e)}static configure(e){this.config.consoleConfig={...this.config.consoleConfig,...e},this.instances.clear()}static setSilent(e){this.config.silent=e,this.instances.clear()}static isSilent(){return this.config.silent}static setProvider(e){this.customProvider=e,this.instances.clear()}static create(e,n){if(!n&&this.instances.has(e))return this.instances.get(e);let o=this.getDomainLevel(e),t;return this.config.silent?t=new g(e):this.customProvider?t=this.customProvider(e,o,n):t=new s(e,o,this.config.consoleConfig,n),n||this.instances.set(e,t),t}static getLogger(e,n){return this.create(e,n)}static reset(){this.config={defaultLevel:1,domainLevels:new Map,consoleConfig:{...a},silent:!1},this.customProvider=null,this.instances.clear()}static initFromEnv(){let e=process.env.LOG_LEVEL;e&&this.setLevelFromString(e);let n=process.env.LOG_TIMESTAMP;n!==void 0&&this.configure({includeTimestamp:n.toLowerCase()==="true"});let o=process.env.LOG_PRETTY;o!==void 0&&this.configure({prettyPrint:o.toLowerCase()==="true"})}static getStats(){return{cachedLoggers:this.instances.size,domains:Array.from(this.instances.keys()),domainOverrides:this.config.domainLevels.size,currentLevel:this.config.defaultLevel,silent:this.config.silent}}}});export{l as a,d as b,L as c,F as d,m as e};
@@ -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.10.2");process.exit(0)}
2
- import{c as h}from"./chunk-ORF2UKQH.js";function i(t,r){if(t.length!==r.length)throw new Error(`Vector length mismatch: ${t.length} vs ${r.length}`);let e=0,o=0,l=0;for(let n=0;n<t.length;n++)e+=t[n]*r[n],o+=t[n]*t[n],l+=r[n]*r[n];let u=Math.sqrt(o)*Math.sqrt(l);return u===0?0:e/u}function c(t){let r=Math.sqrt(t.reduce((e,o)=>e+o*o,0));return r===0?t.slice():t.map(e=>e/r)}function g(t){let r=0;for(let e=0;e<t.length;e++)r+=t[e]*t[e];return Math.sqrt(r)}var m=h(()=>{"use strict"});export{i as a,c as b,g as c,m as d};
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.10.4");process.exit(0)}
2
+ import{c as h}from"./chunk-SVILIQQQ.js";function i(t,r){if(t.length!==r.length)throw new Error(`Vector length mismatch: ${t.length} vs ${r.length}`);let e=0,o=0,l=0;for(let n=0;n<t.length;n++)e+=t[n]*r[n],o+=t[n]*t[n],l+=r[n]*r[n];let u=Math.sqrt(o)*Math.sqrt(l);return u===0?0:e/u}function c(t){let r=Math.sqrt(t.reduce((e,o)=>e+o*o,0));return r===0?t.slice():t.map(e=>e/r)}function g(t){let r=0;for(let e=0;e<t.length;e++)r+=t[e]*t[e];return Math.sqrt(r)}var m=h(()=>{"use strict"});export{i as a,c as b,g as c,m as d};
@@ -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.10.2");process.exit(0)}
2
- import{d as s}from"./chunk-SW4OKUTC.js";s();
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.10.4");process.exit(0)}
2
+ import{d as s}from"./chunk-IYFMDIYZ.js";s();