agentic-qe 3.15.9 → 3.15.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (668) hide show
  1. package/.claude/skills/skills-manifest.json +1 -1
  2. package/CHANGELOG.md +365 -0
  3. package/README.md +8 -0
  4. package/assets/skills/skills-manifest.json +1 -1
  5. package/dist/adapters/a2a/agent-cards/generator.js +6 -3
  6. package/dist/adapters/a2a/tasks/task-router.js +3 -1
  7. package/dist/adapters/a2ui/catalog/component-schemas.js +2 -1
  8. package/dist/adapters/a2ui/data/json-pointer-resolver.js +10 -5
  9. package/dist/adapters/a2ui/integration/agui-sync.js +10 -6
  10. package/dist/adapters/a2ui/integration/surface-state-bridge.js +9 -5
  11. package/dist/adapters/ag-ui/json-patch.js +10 -6
  12. package/dist/adapters/trajectory-adapter.js +1 -1
  13. package/dist/agents/claim-verifier/verifiers/output-verifier.d.ts +3 -1
  14. package/dist/agents/claim-verifier/verifiers/output-verifier.js +31 -2
  15. package/dist/agents/overlay-loader.js +26 -21
  16. package/dist/audit/witness-chain.d.ts +1 -1
  17. package/dist/cli/bundle.js +6 -6
  18. package/dist/cli/chunks/adapter-V4GSGOOK.js +2 -0
  19. package/dist/cli/chunks/agent-booster-wasm-TIDSQ3ZK.js +2 -0
  20. package/dist/cli/chunks/{agent-handler-RIYHTHVZ.js → agent-handler-G3EPBVA7.js} +2 -2
  21. package/dist/cli/chunks/{agent-memory-branch-WSUCUHOO.js → agent-memory-branch-ARC5C7GW.js} +2 -2
  22. package/dist/cli/chunks/aqe-learning-engine-6WQTM5YR.js +2 -0
  23. package/dist/cli/chunks/{arena-YAJZX6MC.js → arena-36DTATJV.js} +4 -4
  24. package/dist/cli/chunks/{arena-KRIBMIXX.js → arena-K4I4QDXB.js} +2 -2
  25. package/dist/cli/chunks/{audit-7ZNOXWP3.js → audit-WQSJSJZF.js} +3 -3
  26. package/dist/cli/chunks/base-AK7BXBX2.js +2 -0
  27. package/dist/cli/chunks/{better-sqlite3-ZQAT4I6H.js → better-sqlite3-BB4K67MT.js} +2 -2
  28. package/dist/cli/chunks/{brain-handler-452WCPZC.js → brain-handler-CU3GOIU3.js} +3 -3
  29. package/dist/cli/chunks/{branch-enumerator-IJFXJRPN.js → branch-enumerator-NJQX7ZNB.js} +2 -2
  30. package/dist/cli/chunks/browser-6YJF4FQW.js +4 -0
  31. package/dist/cli/chunks/browser-workflow-VTDFBW7T.js +2 -0
  32. package/dist/cli/chunks/{chunk-LMU5DUDK.js → chunk-25P77WA5.js} +1 -1
  33. package/dist/cli/chunks/chunk-2CW7VRPH.js +141 -0
  34. package/dist/cli/chunks/chunk-2DTX7YAZ.js +6 -0
  35. package/dist/cli/chunks/{chunk-4JCY45KV.js → chunk-2KFFEKSI.js} +2 -2
  36. package/dist/cli/chunks/chunk-2VLYUF7U.js +2 -0
  37. package/dist/cli/chunks/{chunk-55HRSNGN.js → chunk-325QCVDI.js} +2 -2
  38. package/dist/cli/chunks/{chunk-2TDIS6YK.js → chunk-35M2X3C5.js} +2 -2
  39. package/dist/cli/chunks/{chunk-J5KNRVXR.js → chunk-3RHOPP7A.js} +1 -1
  40. package/dist/cli/chunks/{chunk-NTAD5UX4.js → chunk-4HJKQIX5.js} +2 -2
  41. package/dist/cli/chunks/chunk-4MUBW4RT.js +7 -0
  42. package/dist/cli/chunks/{chunk-VQHVHVSF.js → chunk-4RAQ7PJA.js} +8 -8
  43. package/dist/cli/chunks/{chunk-JWGRWMZP.js → chunk-4RH5I24Q.js} +2 -2
  44. package/dist/cli/chunks/{chunk-QQ5SZH4D.js → chunk-4UBVAJFO.js} +3 -3
  45. package/dist/cli/chunks/{chunk-ZBDRLF43.js → chunk-4UX35V7P.js} +2 -2
  46. package/dist/cli/chunks/{chunk-ZANDSVCK.js → chunk-4X4MWMHB.js} +2 -2
  47. package/dist/cli/chunks/{chunk-47TYABPD.js → chunk-55CH76ZO.js} +3 -3
  48. package/dist/cli/chunks/{chunk-LEAKYZ37.js → chunk-57LNKSW7.js} +2 -2
  49. package/dist/cli/chunks/chunk-5ERFHEEE.js +14 -0
  50. package/dist/cli/chunks/{chunk-HGTWAZWU.js → chunk-5HQP4SLM.js} +2 -2
  51. package/dist/cli/chunks/{chunk-XYCKHYBM.js → chunk-5MNASJOH.js} +2 -2
  52. package/dist/cli/chunks/{chunk-2HL3UM5P.js → chunk-5MTWCCZJ.js} +2 -2
  53. package/dist/cli/chunks/{chunk-4SUOVLJ6.js → chunk-5N25I53C.js} +2 -2
  54. package/dist/cli/chunks/{chunk-XOVNZT7F.js → chunk-5WYZHDIZ.js} +1 -1
  55. package/dist/cli/chunks/{chunk-J3DTDJDT.js → chunk-5YLOLACR.js} +2 -2
  56. package/dist/cli/chunks/{chunk-TSYQDRNK.js → chunk-672XOJDG.js} +2 -2
  57. package/dist/cli/chunks/{chunk-KLGYIEJK.js → chunk-6NA3KZZT.js} +10 -10
  58. package/dist/cli/chunks/chunk-72ZBJD2E.js +3 -0
  59. package/dist/cli/chunks/{chunk-2I2UPJS7.js → chunk-76SNL7GU.js} +2 -2
  60. package/dist/cli/chunks/{chunk-F3PQZX44.js → chunk-7HEMJHPP.js} +2 -2
  61. package/dist/cli/chunks/{chunk-FV7VAG74.js → chunk-7R5HC56U.js} +1 -1
  62. package/dist/cli/chunks/{chunk-L42JPFCC.js → chunk-AFFN6E6Q.js} +2 -2
  63. package/dist/cli/chunks/{chunk-NDKLQW6N.js → chunk-AMZKAJLJ.js} +2 -2
  64. package/dist/cli/chunks/{chunk-K5DJXMAA.js → chunk-AP3ADWDK.js} +2 -2
  65. package/dist/cli/chunks/{chunk-BHKXMIWX.js → chunk-APPZATXA.js} +2 -2
  66. package/dist/cli/chunks/{chunk-XDBD4GXO.js → chunk-AUUJBXWX.js} +25 -20
  67. package/dist/cli/chunks/{chunk-AJ4YDSOI.js → chunk-BTVWA35P.js} +2 -2
  68. package/dist/cli/chunks/{chunk-WGDR2KIR.js → chunk-BZPE3LDO.js} +2 -2
  69. package/dist/cli/chunks/{chunk-HZ5NC6U5.js → chunk-CFWGGRE7.js} +1 -1
  70. package/dist/cli/chunks/{chunk-UYLYMWV5.js → chunk-CIAL4YRY.js} +2 -2
  71. package/dist/cli/chunks/{chunk-D6XVGFTI.js → chunk-CO3DX2AX.js} +2 -2
  72. package/dist/cli/chunks/{chunk-N3KEY4XJ.js → chunk-DDEOZPWJ.js} +2 -2
  73. package/dist/cli/chunks/{chunk-XWIUFYM3.js → chunk-DOBZPSKE.js} +1 -1
  74. package/dist/cli/chunks/{chunk-PX2B5TS2.js → chunk-DOFREOPQ.js} +2 -2
  75. package/dist/cli/chunks/{chunk-47V7FQGX.js → chunk-E44NNCEU.js} +2 -2
  76. package/dist/cli/chunks/{chunk-I6S35FRO.js → chunk-E6PF35JZ.js} +2 -2
  77. package/dist/cli/chunks/chunk-EBPJY4DI.js +3 -0
  78. package/dist/cli/chunks/{chunk-4V27J6YN.js → chunk-EH2S6AOR.js} +2 -2
  79. package/dist/cli/chunks/{chunk-AQTVVLNP.js → chunk-EIDJNT5C.js} +1 -1
  80. package/dist/cli/chunks/{chunk-SVHUYVUR.js → chunk-EJPK7OTR.js} +2 -2
  81. package/dist/cli/chunks/{chunk-HAROIAJE.js → chunk-EK5GMOSO.js} +1 -1
  82. package/dist/cli/chunks/{chunk-LCJTEUDC.js → chunk-ERN43HOX.js} +430 -433
  83. package/dist/cli/chunks/chunk-ETVAYGCB.js +180 -0
  84. package/dist/cli/chunks/chunk-EWPUQCN4.js +2 -0
  85. package/dist/cli/chunks/{chunk-AOFO4N32.js → chunk-FL32MTKT.js} +2 -2
  86. package/dist/cli/chunks/chunk-FLU5FDSC.js +742 -0
  87. package/dist/cli/chunks/{chunk-KR3M44CF.js → chunk-FUYOOKTH.js} +5 -5
  88. package/dist/cli/chunks/chunk-FWSGPE3V.js +12 -0
  89. package/dist/cli/chunks/chunk-FZHSG75I.js +3 -0
  90. package/dist/cli/chunks/{chunk-5D2I7JUP.js → chunk-G2IJFNZS.js} +2 -2
  91. package/dist/cli/chunks/{chunk-ABFDB4X3.js → chunk-G4CKPWF6.js} +1 -1
  92. package/dist/cli/chunks/{chunk-ETG7O5E5.js → chunk-G4FAPO57.js} +5 -5
  93. package/dist/cli/chunks/{chunk-W32YU3VI.js → chunk-G77MLBDF.js} +2 -2
  94. package/dist/cli/chunks/{chunk-5JWGCIQW.js → chunk-GBFUANTC.js} +1 -1
  95. package/dist/cli/chunks/{chunk-UOWHE77F.js → chunk-GVKVJJQX.js} +2 -2
  96. package/dist/cli/chunks/{chunk-2YH62JCN.js → chunk-GWJWSLDA.js} +2 -2
  97. package/dist/cli/chunks/{chunk-FLASM2XB.js → chunk-H43AFUKL.js} +2 -2
  98. package/dist/cli/chunks/chunk-H7BLYMNU.js +59 -0
  99. package/dist/cli/chunks/{chunk-5NS3USRW.js → chunk-HDJUYAZG.js} +1 -1
  100. package/dist/cli/chunks/{chunk-A6YIH4C4.js → chunk-HDNWSKHA.js} +2 -2
  101. package/dist/cli/chunks/{chunk-763SUL4B.js → chunk-HFFPYC4G.js} +2 -2
  102. package/dist/cli/chunks/{chunk-DGTLJNJH.js → chunk-HJ3XNTTJ.js} +2 -2
  103. package/dist/cli/chunks/{chunk-GBUIG3FS.js → chunk-HYXUN7BW.js} +1 -1
  104. package/dist/cli/chunks/{chunk-3LYU7BLY.js → chunk-I36CRDHF.js} +2 -2
  105. package/dist/cli/chunks/{chunk-GII5WVAK.js → chunk-I4K2HTQU.js} +1 -1
  106. package/dist/cli/chunks/chunk-IENZSO3K.js +4 -0
  107. package/dist/cli/chunks/chunk-IO5537OM.js +2 -0
  108. package/dist/cli/chunks/{chunk-AVB5QY2Q.js → chunk-IOZRKXR5.js} +2 -2
  109. package/dist/cli/chunks/chunk-ITL3IN2E.js +3 -0
  110. package/dist/cli/chunks/{chunk-YRBBBUJX.js → chunk-ITPGWGQS.js} +14 -14
  111. package/dist/cli/chunks/{chunk-JNNZK7KH.js → chunk-IW6WDGHM.js} +1 -1
  112. package/dist/cli/chunks/{chunk-SNBYYO6F.js → chunk-J4JMCZVA.js} +2 -2
  113. package/dist/cli/chunks/{chunk-PVIA2FPD.js → chunk-JFLU7L3W.js} +2 -2
  114. package/dist/cli/chunks/{chunk-GCWSX2NY.js → chunk-JGJXXAS6.js} +4 -4
  115. package/dist/cli/chunks/{chunk-KFUUIAR4.js → chunk-JUMICXM6.js} +2 -2
  116. package/dist/cli/chunks/{chunk-A4RU67VX.js → chunk-K2HBNYAZ.js} +2 -2
  117. package/dist/cli/chunks/{chunk-CTZJUV5I.js → chunk-K7V2WZNF.js} +1 -1
  118. package/dist/cli/chunks/{chunk-VRGCKBF7.js → chunk-KDI5JOYZ.js} +2 -2
  119. package/dist/cli/chunks/{chunk-C6RTMTEH.js → chunk-KJCIMNHS.js} +1 -1
  120. package/dist/cli/chunks/{chunk-N3NP6PTT.js → chunk-KKYO2NKV.js} +2 -2
  121. package/dist/cli/chunks/{chunk-XQ3DDY7X.js → chunk-KSE5TDM5.js} +2 -2
  122. package/dist/cli/chunks/{chunk-YZGSJG34.js → chunk-KSLLHFVY.js} +1 -1
  123. package/dist/cli/chunks/{chunk-VCMINU7K.js → chunk-KXS3Y2AX.js} +2 -2
  124. package/dist/cli/chunks/{chunk-REUFWGMA.js → chunk-LBX7M4LW.js} +2 -2
  125. package/dist/cli/chunks/{chunk-HCYQHWI2.js → chunk-LCVEEII4.js} +2 -2
  126. package/dist/cli/chunks/{chunk-OCESWNAZ.js → chunk-LD5CFK53.js} +54 -33
  127. package/dist/cli/chunks/{chunk-XOLDMK23.js → chunk-LPU6PAJE.js} +2 -2
  128. package/dist/cli/chunks/{chunk-KVBEGOJE.js → chunk-LQ4NUC6Q.js} +2 -2
  129. package/dist/cli/chunks/chunk-LRL56ZYL.js +21 -0
  130. package/dist/cli/chunks/{chunk-FL3OYGCS.js → chunk-LXQ3B4RY.js} +2 -2
  131. package/dist/cli/chunks/{chunk-PMCRCEW5.js → chunk-M5RQ6U3G.js} +2 -2
  132. package/dist/cli/chunks/{chunk-EFBLP43U.js → chunk-M5XYIQYZ.js} +2 -2
  133. package/dist/cli/chunks/chunk-M7XFBSIK.js +2 -0
  134. package/dist/cli/chunks/{chunk-Q3JVJRVJ.js → chunk-MIK4RBEH.js} +1 -1
  135. package/dist/cli/chunks/{chunk-NHZIWIQZ.js → chunk-NC6K7SCQ.js} +2 -2
  136. package/dist/cli/chunks/{chunk-TUYJ53V4.js → chunk-NKTWKYHB.js} +2 -2
  137. package/dist/cli/chunks/{chunk-2URBI52G.js → chunk-NPZOBSAN.js} +2 -2
  138. package/dist/cli/chunks/{chunk-7KII4CQG.js → chunk-NQZNMCZU.js} +2 -2
  139. package/dist/cli/chunks/{chunk-7JKB3Q7O.js → chunk-NT7JRHMH.js} +1 -1
  140. package/dist/cli/chunks/{chunk-MZS32SYS.js → chunk-NTB342NJ.js} +1 -1
  141. package/dist/cli/chunks/{chunk-ZVSLCEVC.js → chunk-O4JAKWWM.js} +13 -13
  142. package/dist/cli/chunks/chunk-OD5D4LSZ.js +2 -0
  143. package/dist/cli/chunks/{chunk-HWK5L7IJ.js → chunk-OH5V5EJW.js} +2 -2
  144. package/dist/cli/chunks/{chunk-7QTB5VJZ.js → chunk-OHR7C777.js} +2 -2
  145. package/dist/cli/chunks/{chunk-JAV5WPSY.js → chunk-OURITHFV.js} +2 -2
  146. package/dist/cli/chunks/{chunk-3CJCROMW.js → chunk-OV5RPLKV.js} +2 -2
  147. package/dist/cli/chunks/{chunk-ZXBCCO2H.js → chunk-OYJC3YON.js} +2 -2
  148. package/dist/cli/chunks/{chunk-2BA45H64.js → chunk-QDESWOZP.js} +2 -2
  149. package/dist/cli/chunks/chunk-R5GRABPQ.js +2 -0
  150. package/dist/cli/chunks/{chunk-GKPQ2GRR.js → chunk-R5LGV6GZ.js} +2 -2
  151. package/dist/cli/chunks/chunk-RBZCA7SD.js +12 -0
  152. package/dist/cli/chunks/chunk-RQMCZQN2.js +2 -0
  153. package/dist/cli/chunks/chunk-RTFKTKSO.js +4 -0
  154. package/dist/cli/chunks/{chunk-IFEIY3NQ.js → chunk-RTY7VSZB.js} +2 -2
  155. package/dist/cli/chunks/{chunk-UOJBR4J3.js → chunk-S6IYEBAI.js} +2 -2
  156. package/dist/cli/chunks/{chunk-JP4P3P3D.js → chunk-SMVVAVN2.js} +2 -2
  157. package/dist/cli/chunks/{chunk-TNMQVG4A.js → chunk-T5KHJ3J7.js} +5 -5
  158. package/dist/cli/chunks/{chunk-7QGYJ5OY.js → chunk-TCYSBC7Y.js} +1 -1
  159. package/dist/cli/chunks/{chunk-WRRCQ2UE.js → chunk-TFW7CCKS.js} +1 -1
  160. package/dist/cli/chunks/chunk-TL6OFMXF.js +6 -0
  161. package/dist/cli/chunks/{chunk-UNUTC6TX.js → chunk-U3LJNNVJ.js} +5 -5
  162. package/dist/cli/chunks/chunk-UKKYMW3S.js +3 -0
  163. package/dist/cli/chunks/{chunk-HTZJSQ3C.js → chunk-UMVSWQNB.js} +2 -2
  164. package/dist/cli/chunks/{chunk-PBZI2ZPV.js → chunk-UTTSH4NH.js} +3 -3
  165. package/dist/cli/chunks/{chunk-DDPPSSHW.js → chunk-V5AADCBC.js} +1 -1
  166. package/dist/cli/chunks/{chunk-OXTFSIGN.js → chunk-V7DA4HAK.js} +1 -1
  167. package/dist/cli/chunks/{chunk-32UTLDNY.js → chunk-VBK2YAYY.js} +2 -2
  168. package/dist/cli/chunks/{chunk-F4JYIRW2.js → chunk-VEEYL2CZ.js} +2 -2
  169. package/dist/cli/chunks/{chunk-BXO536GT.js → chunk-VLD7Z2ED.js} +3 -3
  170. package/dist/cli/chunks/chunk-VO3DRK4P.js +3 -0
  171. package/dist/cli/chunks/{chunk-6EPHNJTL.js → chunk-VWUZSNVC.js} +1 -1
  172. package/dist/cli/chunks/{chunk-XUIA5KMS.js → chunk-VYTILW4R.js} +2 -2
  173. package/dist/cli/chunks/{chunk-YZYDTABJ.js → chunk-WCAVIJ64.js} +1 -1
  174. package/dist/cli/chunks/{chunk-KIKWJM6J.js → chunk-WCVCOT4E.js} +2 -2
  175. package/dist/cli/chunks/{chunk-OG2UI6A3.js → chunk-WM3SRRA6.js} +2 -2
  176. package/dist/cli/chunks/chunk-X3PZCXWG.js +2 -0
  177. package/dist/cli/chunks/{chunk-P73W2K7T.js → chunk-X4J73KP3.js} +1 -1
  178. package/dist/cli/chunks/{chunk-37BIGMJI.js → chunk-XDI5X3FR.js} +1 -1
  179. package/dist/cli/chunks/{chunk-V5PXQSFS.js → chunk-XGBU3KEM.js} +2 -2
  180. package/dist/cli/chunks/{chunk-ICP2ORGI.js → chunk-XGPTZUKQ.js} +2 -2
  181. package/dist/cli/chunks/{chunk-6OOYIO3W.js → chunk-XJKZ7FTR.js} +2 -2
  182. package/dist/cli/chunks/{chunk-H3KBIWTO.js → chunk-XNLIWQYE.js} +2 -2
  183. package/dist/cli/chunks/{chunk-4W4DYVSH.js → chunk-XS2XF3YG.js} +6 -5
  184. package/dist/cli/chunks/chunk-Y7B5EUIJ.js +180 -0
  185. package/dist/cli/chunks/{chunk-QTVWUQTB.js → chunk-YBBT3YYG.js} +1 -1
  186. package/dist/cli/chunks/{chunk-7X2Y727E.js → chunk-YNOCQ2SL.js} +1 -1
  187. package/dist/cli/chunks/{chunk-DINZR5CF.js → chunk-YOCULVHR.js} +1 -1
  188. package/dist/cli/chunks/{chunk-KIXYKUCI.js → chunk-YPX2TV3M.js} +1 -1
  189. package/dist/cli/chunks/{chunk-OXZLKP6C.js → chunk-Z2EA7A4Z.js} +1 -1
  190. package/dist/cli/chunks/{chunk-W5VJRDDG.js → chunk-ZMC543GI.js} +2 -2
  191. package/dist/cli/chunks/chunk-ZMHCMJ4J.js +2 -0
  192. package/dist/cli/chunks/{chunk-72AMFDC7.js → chunk-ZP75ASUU.js} +1 -1
  193. package/dist/cli/chunks/{chunk-JUVHZG7I.js → chunk-ZQHDA4O7.js} +1 -1
  194. package/dist/cli/chunks/{ci-7SGRCFPS.js → ci-6GUFAZMJ.js} +2 -2
  195. package/dist/cli/chunks/{ci-config-MX3URPZA.js → ci-config-J665XNOX.js} +2 -2
  196. package/dist/cli/chunks/{ci-output-M47NJY6D.js → ci-output-PEQQQWVD.js} +2 -2
  197. package/dist/cli/chunks/{circuit-breaker-5GAK45SW.js → circuit-breaker-HHB2JSKH.js} +2 -2
  198. package/dist/cli/chunks/{claude-flow-setup-YXYSRH4Y.js → claude-flow-setup-JKUJRWPN.js} +2 -2
  199. package/dist/cli/chunks/client-HL2COSFM.js +2 -0
  200. package/dist/cli/chunks/{cline-installer-DLJ5QD5N.js → cline-installer-Y77BWTAN.js} +2 -2
  201. package/dist/cli/chunks/{code-ONKLMVQ2.js → code-LV2HAGJY.js} +3 -3
  202. package/dist/cli/chunks/{code-index-extractor-2232LGZN.js → code-index-extractor-4GKKSETB.js} +2 -2
  203. package/dist/cli/chunks/{codex-installer-UOWLYCMH.js → codex-installer-WMKBYE5Y.js} +2 -2
  204. package/dist/cli/chunks/{completions-MHX7GCC7.js → completions-SBGFAOIJ.js} +2 -2
  205. package/dist/cli/chunks/{complexity-analyzer-43ZUJKZU.js → complexity-analyzer-AQHFIJXC.js} +2 -2
  206. package/dist/cli/chunks/{continuedev-installer-6Q5JR4FF.js → continuedev-installer-26AYFS2E.js} +2 -2
  207. package/dist/cli/chunks/{copilot-installer-CZUMVHSI.js → copilot-installer-4UD3DK55.js} +2 -2
  208. package/dist/cli/chunks/core-handlers-IX7ATLM6.js +2 -0
  209. package/dist/cli/chunks/{cost-tracker-VS5ZW3XN.js → cost-tracker-TP4NZCG4.js} +2 -2
  210. package/dist/cli/chunks/{coverage-VWKTWZ6D.js → coverage-B2KIXHAI.js} +3 -3
  211. package/dist/cli/chunks/cross-domain-router-YYKLAPJO.js +2 -0
  212. package/dist/cli/chunks/{cursor-installer-YIFEMORH.js → cursor-installer-AVZEQZ4W.js} +2 -2
  213. package/dist/cli/chunks/daemon-P574WWBW.js +18 -0
  214. package/dist/cli/chunks/{daemon-SHWJSJW5.js → daemon-XM2A7LQU.js} +3 -3
  215. package/dist/cli/chunks/{dag-attention-scheduler-TCC2WM46.js → dag-attention-scheduler-MIWOZ6ET.js} +2 -2
  216. package/dist/cli/chunks/{detect-IGTWSQMA.js → detect-TYR7HT23.js} +2 -2
  217. package/dist/cli/chunks/{dist-node-TCOTJVQX.js → dist-node-2DGVQGLS.js} +2 -2
  218. package/dist/cli/chunks/{domain-handler-55ZVYODR.js → domain-handler-RRA4ZOMF.js} +2 -2
  219. package/dist/cli/chunks/{domain-plugins-GJRWOHQP.js → domain-plugins-IVZEZ5RB.js} +2 -2
  220. package/dist/cli/chunks/domain-transfer-DOBI67K6.js +2 -0
  221. package/dist/cli/chunks/dream-T6EP7B3F.js +2 -0
  222. package/dist/cli/chunks/{embed-and-insert-pattern-XAMNIKQL.js → embed-and-insert-pattern-VNIEOVPO.js} +2 -2
  223. package/dist/cli/chunks/{eval-GO22R4OZ.js → eval-QV4LVPUF.js} +2 -2
  224. package/dist/cli/chunks/{experience-capture-middleware-F2BRMJ3Y.js → experience-capture-middleware-DAPKT763.js} +3 -3
  225. package/dist/cli/chunks/{fast-paths-6RGPYALD.js → fast-paths-WVRFPHX7.js} +2 -2
  226. package/dist/cli/chunks/{feature-flags-ZGS3KLPH.js → feature-flags-DEFTUIYT.js} +2 -2
  227. package/dist/cli/chunks/{feature-flags-MIWQIOHU.js → feature-flags-O7ZXDDCD.js} +2 -2
  228. package/dist/cli/chunks/file-discovery-JYMVTDMU.js +2 -0
  229. package/dist/cli/chunks/fleet-FVAUMKUT.js +46 -0
  230. package/dist/cli/chunks/{gnn-wrapper-ALBJVW6T.js → gnn-wrapper-LS4LZJDR.js} +2 -2
  231. package/dist/cli/chunks/{heartbeat-handler-ZMM53NDY.js → heartbeat-handler-RFTERD4K.js} +4 -4
  232. package/dist/cli/chunks/heartbeat-scheduler-4N5MUJ7S.js +2 -0
  233. package/dist/cli/chunks/hnsw-adapter-ZPAJDSLR.js +2 -0
  234. package/dist/cli/chunks/hnsw-index-4CTH6RHB.js +2 -0
  235. package/dist/cli/chunks/{hnsw-legacy-bridge-RYUJPA7B.js → hnsw-legacy-bridge-GPKGFFHY.js} +2 -2
  236. package/dist/cli/chunks/{hnswlib-node-XM6XF3YV.js → hnswlib-node-PHL3F2PR.js} +2 -2
  237. package/dist/cli/chunks/{hooks-X62O7TJO.js → hooks-GYJ6D4QM.js} +36 -36
  238. package/dist/cli/chunks/hybrid-backend-AW6UTXQS.js +2 -0
  239. package/dist/cli/chunks/{hypergraph-engine-ZBWUPTVD.js → hypergraph-engine-YGEQPCKJ.js} +2 -2
  240. package/dist/cli/chunks/{hypergraph-handler-DUMF6SJV.js → hypergraph-handler-ZIMM647V.js} +3 -3
  241. package/dist/cli/chunks/impact-analyzer-MZK3JMSV.js +2 -0
  242. package/dist/cli/chunks/{init-guard-S4I2R46S.js → init-guard-VOMBXJXG.js} +2 -2
  243. package/dist/cli/chunks/{init-handler-L4KJHVWS.js → init-handler-PSMUBWK5.js} +26 -25
  244. package/dist/cli/chunks/init-wizard-FUC7KDVX.js +2 -0
  245. package/dist/cli/chunks/kernel-ZCPMCVMW.js +2 -0
  246. package/dist/cli/chunks/{kilocode-installer-GNNB5FCZ.js → kilocode-installer-2YNTFBWJ.js} +2 -2
  247. package/dist/cli/chunks/{kiro-installer-HR6ZAH7T.js → kiro-installer-XHJDPVAZ.js} +2 -2
  248. package/dist/cli/chunks/knowledge-graph-NUJKEDNF.js +2 -0
  249. package/dist/cli/chunks/{learning-4IEEOHJS.js → learning-GNSIDRNG.js} +24 -24
  250. package/dist/cli/chunks/{llm-router-ZFMORP36.js → llm-router-LQDM7IU2.js} +4 -4
  251. package/dist/cli/chunks/llm-router-service-B2BFBQ76.js +2 -0
  252. package/dist/cli/chunks/{load-ZM43WGDO.js → load-YATHI72E.js} +2 -2
  253. package/dist/cli/chunks/load-test-ZHQ2MUGO.js +2 -0
  254. package/dist/cli/chunks/mcp-4Y6GDLYK.js +2 -0
  255. package/dist/cli/chunks/{memory-W5FZGVAD.js → memory-OUW3L7H2.js} +5 -5
  256. package/dist/cli/chunks/memory-backend-AAMQG6WH.js +2 -0
  257. package/dist/cli/chunks/memory-handlers-G3LFF53U.js +2 -0
  258. package/dist/cli/chunks/{multi-model-executor-SXXGAQ2G.js → multi-model-executor-UBZJXAD2.js} +2 -2
  259. package/dist/cli/chunks/{opencode-installer-PIRBUAB5.js → opencode-installer-AMMNWVH5.js} +2 -2
  260. package/dist/cli/chunks/{orchestrator-H5SQCQTB.js → orchestrator-Y44WDOER.js} +69 -25
  261. package/dist/cli/chunks/pattern-null-store-RFNVA46O.js +2 -0
  262. package/dist/cli/chunks/{pattern-usage-recorder-XZTWDI2T.js → pattern-usage-recorder-ESR42RME.js} +2 -2
  263. package/dist/cli/chunks/pipeline-EDTS6OSC.js +19 -0
  264. package/dist/cli/chunks/{platform-KJDABL5C.js → platform-5WONJSUX.js} +2 -2
  265. package/dist/cli/chunks/{plugin-V4KSBVVM.js → plugin-IJXPCLD4.js} +2 -2
  266. package/dist/cli/chunks/{prime-radiant-advanced-wasm-JDHTKQAT.js → prime-radiant-advanced-wasm-5ECKGZK6.js} +2 -2
  267. package/dist/cli/chunks/project-root-7QL4KP5C.js +2 -0
  268. package/dist/cli/chunks/protocol-executor-2NW5BD4R.js +2 -0
  269. package/dist/cli/chunks/{protocol-handler-BNRONTQV.js → protocol-handler-DRD3GVNW.js} +2 -2
  270. package/dist/cli/chunks/{prove-ELLL6XMX.js → prove-KTGW2HMJ.js} +2 -2
  271. package/dist/cli/chunks/qe-reasoning-bank-G2JZOGKD.js +2 -0
  272. package/dist/cli/chunks/{quality-NH2QA4D4.js → quality-DV2WPRRS.js} +2 -2
  273. package/dist/cli/chunks/{quality-gate-JTKLF7GW.js → quality-gate-HFUAFVZC.js} +3 -3
  274. package/dist/cli/chunks/queen-coordinator-GRG5FT2A.js +2 -0
  275. package/dist/cli/chunks/{real-embeddings-J3KCKLPB.js → real-embeddings-RQRVOKVM.js} +2 -2
  276. package/dist/cli/chunks/{ref-validation-HNXQRP4F.js → ref-validation-QWSKS5OY.js} +2 -2
  277. package/dist/cli/chunks/{roocode-installer-COJ6CX6S.js → roocode-installer-RBAYRCHX.js} +2 -2
  278. package/dist/cli/chunks/router-LQB5SWAF.js +2 -0
  279. package/dist/cli/chunks/routing-feedback-OEEXA55N.js +2 -0
  280. package/dist/cli/chunks/{routing-handler-WM33ZILE.js → routing-handler-FMPP3XKO.js} +2 -2
  281. package/dist/cli/chunks/{ruvector-commands-BBLXEA7A.js → ruvector-commands-KZZT4HWF.js} +2 -2
  282. package/dist/cli/chunks/rvf-dual-writer-BZK4M7BO.js +2 -0
  283. package/dist/cli/chunks/rvf-migration-adapter-EZZUJL2E.js +2 -0
  284. package/dist/cli/chunks/{rvf-migration-coordinator-P7H6HCAG.js → rvf-migration-coordinator-7CHEV35N.js} +2 -2
  285. package/dist/cli/chunks/rvf-native-adapter-6COXTQZ3.js +2 -0
  286. package/dist/cli/chunks/{rvf-store-integrity-R5SPVRFP.js → rvf-store-integrity-Q2TH52SN.js} +2 -2
  287. package/dist/cli/chunks/safe-db-PE6G3L55.js +2 -0
  288. package/dist/cli/chunks/schedule-OLKQ6QYW.js +2 -0
  289. package/dist/cli/chunks/scheduler-LSGBDFAT.js +2 -0
  290. package/dist/cli/chunks/{security-AUDTRX3I.js → security-CUEA3UIM.js} +3 -3
  291. package/dist/cli/chunks/{shared-rvf-adapter-PVDGBGI2.js → shared-rvf-adapter-DROMBRV2.js} +2 -2
  292. package/dist/cli/chunks/{shared-rvf-dual-writer-LZ2GMSS2.js → shared-rvf-dual-writer-DBNABOP7.js} +2 -2
  293. package/dist/cli/chunks/sqlite-persistence-HH4DNTYH.js +2 -0
  294. package/dist/cli/chunks/{standalone-memory-XNOAI4G4.js → standalone-memory-IAHA3M6B.js} +2 -2
  295. package/dist/cli/chunks/{status-handler-K72XZE4T.js → status-handler-AFUCASTX.js} +2 -2
  296. package/dist/cli/chunks/{structural-health-NF3YY7U5.js → structural-health-AQRV6JJ6.js} +2 -2
  297. package/dist/cli/chunks/{sync-VBD5Y3E2.js → sync-GX7FMJHL.js} +2 -2
  298. package/dist/cli/chunks/sync-XW5TLZ7M.js +2 -0
  299. package/dist/cli/chunks/{task-handler-24S3WFVJ.js → task-handler-TFKVUTNF.js} +2 -2
  300. package/dist/cli/chunks/task-handlers-SS4ZDXNF.js +9 -0
  301. package/dist/cli/chunks/{test-XFSGQELD.js → test-D2XDJNDX.js} +17 -17
  302. package/dist/cli/chunks/test-runner-process-PSSBNNGR.js +2 -0
  303. package/dist/cli/chunks/{test-scheduling-VYUQ4CDE.js → test-scheduling-TS6I2PR7.js} +3 -3
  304. package/dist/cli/chunks/token-bootstrap-HBBLPCZ3.js +2 -0
  305. package/dist/cli/chunks/{token-usage-VLQ6WO2L.js → token-usage-3MBUX4PR.js} +2 -2
  306. package/dist/cli/chunks/{transformers-TOFMWWNM.js → transformers-ZWMQO3L2.js} +2 -2
  307. package/dist/cli/chunks/tree-sitter-wasm-parser-TYRQRJ2W.js +2 -0
  308. package/dist/cli/chunks/{types-JTWLBAZJ.js → types-5YEMGPSQ.js} +2 -2
  309. package/dist/cli/chunks/unified-memory-AGDZQ5XD.js +2 -0
  310. package/dist/cli/chunks/unified-memory-hnsw-X5TJ3JDE.js +2 -0
  311. package/dist/cli/chunks/unified-persistence-UCV7YETW.js +2 -0
  312. package/dist/cli/chunks/{upgrade-4ABM72T4.js → upgrade-2TPBKIHI.js} +2 -2
  313. package/dist/cli/chunks/{validate-UDJCWKXI.js → validate-XRAXXFW6.js} +2 -2
  314. package/dist/cli/chunks/{validate-swarm-TODOUWNN.js → validate-swarm-IYSCS3BZ.js} +2 -2
  315. package/dist/cli/chunks/visual-security-ZLXRIQZV.js +2 -0
  316. package/dist/cli/chunks/{web-tree-sitter-WBMAJPM5.js → web-tree-sitter-PZQ3ZG2P.js} +2 -2
  317. package/dist/cli/chunks/{windsurf-installer-BTT53TUL.js → windsurf-installer-U6XWFRVT.js} +2 -2
  318. package/dist/cli/chunks/witness-chain-CVIWYTD2.js +2 -0
  319. package/dist/cli/chunks/witness-chain-VBKORKOX.js +2 -0
  320. package/dist/cli/chunks/witness-chain-repair-K7YX2AO6.js +2 -0
  321. package/dist/cli/chunks/{witness-chain-verifier-FRY3LMGH.js → witness-chain-verifier-GUTC3W7N.js} +2 -2
  322. package/dist/cli/chunks/{witness-key-manager-X7QHQQWL.js → witness-key-manager-YBNKMOP6.js} +2 -2
  323. package/dist/cli/chunks/{workflow-QMZPAWQW.js → workflow-UAJUILFQ.js} +4 -4
  324. package/dist/cli/chunks/workflow-orchestrator-3ZN7MVCE.js +2 -0
  325. package/dist/cli/chunks/wrappers-AVZ3GPAL.js +2 -0
  326. package/dist/cli/commands/fleet.js +23 -13
  327. package/dist/cli/commands/hooks-handlers/hooks-dream-learning.js +9 -2
  328. package/dist/cli/commands/hooks-handlers/session-hooks.js +2 -2
  329. package/dist/cli/commands/hooks-handlers/stats-hooks.js +3 -2
  330. package/dist/cli/commands/hooks-handlers/tool-loop-guardrail.js +11 -6
  331. package/dist/cli/commands/learning.js +5 -3
  332. package/dist/cli/commands/ruvector-commands.js +2 -1
  333. package/dist/cli/commands/test.js +11 -2
  334. package/dist/cli/handlers/init-handler.d.ts +12 -0
  335. package/dist/cli/handlers/init-handler.js +27 -12
  336. package/dist/cli/utils/ci-output.d.ts +11 -0
  337. package/dist/cli/utils/ci-output.js +2 -0
  338. package/dist/cli/utils/fleet-operation.d.ts +32 -0
  339. package/dist/cli/utils/fleet-operation.js +71 -0
  340. package/dist/cli/utils/fleet-result.d.ts +31 -0
  341. package/dist/cli/utils/fleet-result.js +124 -0
  342. package/dist/cli/utils/progress.d.ts +16 -2
  343. package/dist/cli/utils/progress.js +31 -14
  344. package/dist/context/sources/git-source.js +6 -2
  345. package/dist/coordination/consensus/consensus-engine.js +3 -1
  346. package/dist/coordination/handlers/code-intelligence-handlers.js +63 -7
  347. package/dist/coordination/handlers/coverage-collection.js +3 -1
  348. package/dist/coordination/handlers/coverage-handlers.js +10 -1
  349. package/dist/coordination/handlers/coverage-runner.d.ts +3 -8
  350. package/dist/coordination/handlers/coverage-runner.js +6 -22
  351. package/dist/coordination/handlers/coverage-stderr.d.ts +23 -0
  352. package/dist/coordination/handlers/coverage-stderr.js +39 -0
  353. package/dist/coordination/handlers/coverage-target.js +6 -3
  354. package/dist/coordination/handlers/handler-utils.js +3 -1
  355. package/dist/coordination/handlers/requirements-handlers.js +18 -3
  356. package/dist/coordination/handlers/security-handlers.js +45 -21
  357. package/dist/coordination/handlers/test-execution-handlers.js +25 -7
  358. package/dist/coordination/mincut/queen-integration.d.ts +39 -1
  359. package/dist/coordination/mincut/queen-integration.js +83 -6
  360. package/dist/coordination/protocols/learning-consolidation-archive.d.ts +2 -6
  361. package/dist/coordination/protocols/learning-consolidation-archive.js +4 -27
  362. package/dist/coordination/protocols/learning-consolidation.d.ts +24 -0
  363. package/dist/coordination/protocols/learning-consolidation.js +71 -22
  364. package/dist/coordination/queen-coordinator.d.ts +1 -1
  365. package/dist/coordination/queen-coordinator.js +27 -10
  366. package/dist/coordination/queen-event-handlers.js +13 -0
  367. package/dist/coordination/queen-task-management.d.ts +18 -24
  368. package/dist/coordination/queen-task-management.js +62 -168
  369. package/dist/coordination/queen-task-queue.d.ts +41 -0
  370. package/dist/coordination/queen-task-queue.js +194 -0
  371. package/dist/coordination/queen-types.d.ts +1 -1
  372. package/dist/coordination/queen-work-stealing.d.ts +6 -1
  373. package/dist/coordination/queen-work-stealing.js +7 -4
  374. package/dist/coordination/result-saver-adapters.d.ts +15 -0
  375. package/dist/coordination/result-saver-adapters.js +57 -0
  376. package/dist/coordination/result-saver.d.ts +1 -1
  377. package/dist/coordination/result-saver.js +8 -5
  378. package/dist/coordination/task-executability.d.ts +12 -0
  379. package/dist/coordination/task-executability.js +27 -0
  380. package/dist/coordination/workflow-orchestrator.d.ts +6 -0
  381. package/dist/coordination/workflow-orchestrator.js +22 -8
  382. package/dist/coordination/yaml-pipeline-loader.js +5 -2
  383. package/dist/domains/code-intelligence/index-path-guard.d.ts +5 -2
  384. package/dist/domains/code-intelligence/index-path-guard.js +20 -50
  385. package/dist/domains/code-intelligence/plugin.js +5 -1
  386. package/dist/domains/code-intelligence/services/metric-collector/index.d.ts +2 -2
  387. package/dist/domains/code-intelligence/services/metric-collector/index.js +2 -3
  388. package/dist/domains/code-intelligence/services/metric-collector/loc-counter.d.ts +1 -1
  389. package/dist/domains/code-intelligence/services/metric-collector/loc-counter.js +11 -36
  390. package/dist/domains/code-intelligence/services/metric-collector/test-counter.d.ts +1 -1
  391. package/dist/domains/code-intelligence/services/metric-collector/test-counter.js +45 -103
  392. package/dist/domains/code-intelligence/services/product-factors-bridge.js +7 -4
  393. package/dist/domains/contract-testing/services/api-compatibility.js +7 -6
  394. package/dist/domains/contract-testing/services/contract-validator.js +6 -4
  395. package/dist/domains/contract-testing/services/schema-validator.js +8 -5
  396. package/dist/domains/coverage-analysis/services/coverage-parser.js +19 -10
  397. package/dist/domains/defect-intelligence/interfaces.d.ts +2 -0
  398. package/dist/domains/defect-intelligence/plugin.js +11 -2
  399. package/dist/domains/defect-intelligence/prediction-history.d.ts +27 -0
  400. package/dist/domains/defect-intelligence/prediction-history.js +68 -0
  401. package/dist/domains/defect-intelligence/services/defect-predictor.js +25 -10
  402. package/dist/domains/enterprise-integration/services/message-broker-service.js +3 -2
  403. package/dist/domains/enterprise-integration/services/odata-service.js +2 -1
  404. package/dist/domains/enterprise-integration/services/sap-integration-service.js +3 -2
  405. package/dist/domains/learning-optimization/active-patterns.d.ts +2 -2
  406. package/dist/domains/learning-optimization/active-patterns.js +2 -2
  407. package/dist/domains/learning-optimization/coordinator.js +9 -5
  408. package/dist/domains/learning-optimization/interfaces.d.ts +8 -2
  409. package/dist/domains/learning-optimization/pattern-archive.d.ts +31 -0
  410. package/dist/domains/learning-optimization/pattern-archive.js +56 -0
  411. package/dist/domains/learning-optimization/pattern-consolidation.d.ts +12 -0
  412. package/dist/domains/learning-optimization/pattern-consolidation.js +41 -0
  413. package/dist/domains/learning-optimization/reward-source.d.ts +13 -0
  414. package/dist/domains/learning-optimization/reward-source.js +8 -1
  415. package/dist/domains/learning-optimization/services/learning-coordinator.d.ts +5 -3
  416. package/dist/domains/learning-optimization/services/learning-coordinator.js +47 -59
  417. package/dist/domains/learning-optimization/services/metrics-optimizer.js +14 -4
  418. package/dist/domains/learning-optimization/services/production-intel.js +3 -1
  419. package/dist/domains/security-compliance/generic-finding-dedup.d.ts +40 -0
  420. package/dist/domains/security-compliance/generic-finding-dedup.js +63 -0
  421. package/dist/domains/security-compliance/plugin.js +17 -3
  422. package/dist/domains/security-compliance/sast-path-guard.d.ts +9 -0
  423. package/dist/domains/security-compliance/sast-path-guard.js +17 -0
  424. package/dist/domains/security-compliance/services/scanners/dast-auth-testing.js +46 -56
  425. package/dist/domains/security-compliance/services/scanners/dast-helpers.js +76 -91
  426. package/dist/domains/security-compliance/services/scanners/dast-injection-testing.js +52 -62
  427. package/dist/domains/security-compliance/services/scanners/dast-scanner.d.ts +21 -1
  428. package/dist/domains/security-compliance/services/scanners/dast-scanner.js +29 -24
  429. package/dist/domains/security-compliance/services/scanners/dependency-resolver.js +14 -6
  430. package/dist/domains/security-compliance/services/scanners/sast-scanner.js +4 -2
  431. package/dist/domains/security-compliance/services/scanners/scanner-orchestrator.js +4 -1
  432. package/dist/domains/security-compliance/services/security-auditor-sast.js +2 -2
  433. package/dist/domains/security-compliance/services/security-auditor-secrets.js +2 -2
  434. package/dist/domains/security-compliance/services/security-auditor.js +3 -2
  435. package/dist/domains/test-execution/coordinator.d.ts +6 -0
  436. package/dist/domains/test-execution/coordinator.js +28 -22
  437. package/dist/domains/test-execution/interfaces.d.ts +36 -1
  438. package/dist/domains/test-execution/plugin.js +19 -4
  439. package/dist/domains/test-execution/services/flaky-detector.js +9 -7
  440. package/dist/domains/test-execution/services/retry-handler.js +46 -7
  441. package/dist/domains/test-execution/services/retry-outcome.d.ts +18 -0
  442. package/dist/domains/test-execution/services/retry-outcome.js +53 -0
  443. package/dist/domains/test-execution/services/runner-test-cases.d.ts +11 -0
  444. package/dist/domains/test-execution/services/runner-test-cases.js +20 -2
  445. package/dist/domains/test-execution/services/test-executor.js +8 -8
  446. package/dist/domains/test-generation/coordinator.js +2 -2
  447. package/dist/domains/test-generation/plugin.js +7 -2
  448. package/dist/domains/test-generation/services/pattern-matcher.js +4 -4
  449. package/dist/domains/test-generation/services/test-data-generator.js +3 -1
  450. package/dist/domains/test-generation/services/test-generator.js +2 -2
  451. package/dist/domains/visual-accessibility/services/axe-core-audit.js +1 -1
  452. package/dist/governance/evolution-pipeline-integration.js +3 -1
  453. package/dist/hooks/cross-phase-hooks.js +5 -2
  454. package/dist/init/init-wizard-steps.js +5 -1
  455. package/dist/init/phases/04-database.js +7 -0
  456. package/dist/init/phases/10-workers.js +50 -6
  457. package/dist/init/phases/12-verification.js +14 -4
  458. package/dist/init/settings-merge.js +7 -4
  459. package/dist/integrations/agentic-flow/reasoning-bank/experience-replay.d.ts +7 -0
  460. package/dist/integrations/agentic-flow/reasoning-bank/experience-replay.js +31 -2
  461. package/dist/integrations/agentic-flow/reasoning-bank/index.d.ts +3 -1
  462. package/dist/integrations/agentic-flow/reasoning-bank/index.js +5 -0
  463. package/dist/integrations/browser/agent-browser/client.js +37 -52
  464. package/dist/integrations/browser/agent-browser/command-executor.d.ts +33 -27
  465. package/dist/integrations/browser/agent-browser/command-executor.js +53 -54
  466. package/dist/integrations/browser/agent-browser/session-manager.d.ts +1 -1
  467. package/dist/integrations/browser/agent-browser/session-manager.js +8 -9
  468. package/dist/integrations/browser/web-content-fetcher.js +9 -3
  469. package/dist/integrations/ruvector/filter-adapter.js +2 -1
  470. package/dist/integrations/vibium/client.js +2 -2
  471. package/dist/integrations/vibium/runtime.d.ts +1 -1
  472. package/dist/integrations/vibium/runtime.js +14 -11
  473. package/dist/kernel/unified-memory-schemas.d.ts +3 -2
  474. package/dist/kernel/unified-memory-schemas.js +3 -2
  475. package/dist/kernel/unified-memory.js +25 -6
  476. package/dist/learning/dream/dream-commit.d.ts +65 -0
  477. package/dist/learning/dream/dream-commit.js +104 -0
  478. package/dist/learning/dream/dream-engine.d.ts +81 -31
  479. package/dist/learning/dream/dream-engine.js +225 -168
  480. package/dist/learning/dream/dream-insights-pruner.d.ts +9 -3
  481. package/dist/learning/dream/dream-insights-pruner.js +16 -30
  482. package/dist/learning/dream/index.d.ts +3 -2
  483. package/dist/learning/dream/index.js +3 -1
  484. package/dist/learning/dream/insight-generator.js +5 -4
  485. package/dist/learning/dream/rvcow-branch-manager.d.ts +8 -1
  486. package/dist/learning/dream/rvcow-branch-manager.js +8 -1
  487. package/dist/learning/dream/speculative-dreamer.d.ts +50 -74
  488. package/dist/learning/dream/speculative-dreamer.js +64 -111
  489. package/dist/learning/dream/spreading-activation.d.ts +2 -1
  490. package/dist/learning/dream/spreading-activation.js +15 -6
  491. package/dist/learning/experience-capture.d.ts +9 -0
  492. package/dist/learning/experience-capture.js +18 -4
  493. package/dist/learning/memory-auditor.js +3 -1
  494. package/dist/learning/qe-patterns.js +2 -1
  495. package/dist/learning/qe-reasoning-bank-types.d.ts +17 -2
  496. package/dist/learning/qe-reasoning-bank.js +22 -11
  497. package/dist/learning/real-qe-reasoning-bank.d.ts +19 -0
  498. package/dist/learning/real-qe-reasoning-bank.js +70 -38
  499. package/dist/learning/sqlite-persistence.d.ts +6 -0
  500. package/dist/learning/sqlite-persistence.js +16 -2
  501. package/dist/learning/usage-outcome.d.ts +68 -0
  502. package/dist/learning/usage-outcome.js +84 -0
  503. package/dist/mcp/background-workers.d.ts +13 -1
  504. package/dist/mcp/background-workers.js +17 -3
  505. package/dist/mcp/bundle.js +612 -580
  506. package/dist/mcp/handlers/core-handlers.js +11 -0
  507. package/dist/mcp/handlers/domain-handler-configs.d.ts +7 -0
  508. package/dist/mcp/handlers/domain-handler-configs.js +19 -5
  509. package/dist/mcp/handlers/handler-factory.d.ts +2 -1
  510. package/dist/mcp/handlers/handler-factory.js +36 -15
  511. package/dist/mcp/handlers/orchestrate-routes.d.ts +36 -0
  512. package/dist/mcp/handlers/orchestrate-routes.js +88 -0
  513. package/dist/mcp/handlers/task-handlers.d.ts +16 -0
  514. package/dist/mcp/handlers/task-handlers.js +77 -24
  515. package/dist/mcp/handlers/validation-pipeline-handler.js +14 -10
  516. package/dist/mcp/protocol-server.js +10 -8
  517. package/dist/mcp/qe-tool-bridge.js +3 -0
  518. package/dist/mcp/security/schema-validator.js +3 -2
  519. package/dist/mcp/services/reasoning-bank-service.d.ts +3 -1
  520. package/dist/mcp/services/reasoning-bank-service.js +4 -0
  521. package/dist/mcp/tool-annotations.js +4 -1
  522. package/dist/mcp/tools/code-intelligence/c4.js +11 -1
  523. package/dist/mcp/tools/coherence/check.js +1 -0
  524. package/dist/mcp/tools/coherence/consensus.js +4 -2
  525. package/dist/mcp/tools/coverage-analysis/index.js +31 -2
  526. package/dist/mcp/tools/learning-optimization/dream.d.ts +8 -8
  527. package/dist/mcp/tools/learning-optimization/dream.js +38 -34
  528. package/dist/mcp/tools/learning-optimization/optimize.d.ts +18 -2
  529. package/dist/mcp/tools/learning-optimization/optimize.js +59 -12
  530. package/dist/mcp/tools/mincut/index.js +3 -0
  531. package/dist/mcp/tools/quality-assessment/gate.js +19 -1
  532. package/dist/mcp/tools/qx-analysis/analyze.js +1 -0
  533. package/dist/mcp/tools/requirements-validation/quality-criteria.js +17 -3
  534. package/dist/mcp/tools/security-compliance/scan.js +4 -2
  535. package/dist/mcp/tools/test-execution/e2e-execute.js +2 -2
  536. package/dist/mcp/tools/test-execution/execute.js +3 -2
  537. package/dist/memory/crdt/crdt-store.js +5 -0
  538. package/dist/memory/crdt/lww-register.js +12 -2
  539. package/dist/migration/agent-compat.js +7 -5
  540. package/dist/migrations/20261018_add_dream_insights_archive.d.ts +27 -0
  541. package/dist/migrations/20261018_add_dream_insights_archive.js +57 -0
  542. package/dist/optimization/early-exit-token-optimizer.js +3 -1
  543. package/dist/planning/goap-planner.js +5 -0
  544. package/dist/planning/plan-executor.js +5 -0
  545. package/dist/shared/git/git-analyzer.d.ts +49 -0
  546. package/dist/shared/git/git-analyzer.js +159 -319
  547. package/dist/shared/git/git-process.d.ts +22 -0
  548. package/dist/shared/git/git-process.js +37 -0
  549. package/dist/shared/git/index.d.ts +1 -0
  550. package/dist/shared/git/index.js +1 -0
  551. package/dist/shared/io/confined-read.d.ts +74 -0
  552. package/dist/shared/io/confined-read.js +256 -0
  553. package/dist/shared/io/file-reader.d.ts +6 -6
  554. package/dist/shared/io/file-reader.js +16 -42
  555. package/dist/shared/io/payload-path-guard.d.ts +75 -0
  556. package/dist/shared/io/payload-path-guard.js +190 -0
  557. package/dist/shared/llm/providers/claude-code.js +4 -1
  558. package/dist/shared/llm/router/agent-router-config.js +2 -1
  559. package/dist/shared/llm/translation/tool-translator.js +2 -1
  560. package/dist/shared/native-module-errors.d.ts +51 -0
  561. package/dist/shared/native-module-errors.js +129 -0
  562. package/dist/shared/safe-db.js +14 -4
  563. package/dist/shared/security/osv-client.js +4 -1
  564. package/dist/shared/test-runner-args.d.ts +5 -0
  565. package/dist/shared/test-runner-args.js +6 -1
  566. package/dist/shared/test-runner-process.d.ts +6 -0
  567. package/dist/shared/test-runner-process.js +14 -0
  568. package/dist/shared/test-runner-verdict.d.ts +9 -1
  569. package/dist/shared/test-runner-verdict.js +15 -4
  570. package/dist/shared/types/test-frameworks.js +2 -2
  571. package/dist/shared/utils/namespaced-search.d.ts +14 -0
  572. package/dist/shared/utils/namespaced-search.js +19 -1
  573. package/dist/shared/utils/safe-expression-evaluator.js +4 -3
  574. package/dist/strange-loop/infra-healing/recovery-playbook.js +13 -3
  575. package/dist/sync/readers/json-reader.js +2 -1
  576. package/dist/validation/anchor-set.d.ts +6 -0
  577. package/dist/validation/anchor-set.js +9 -1
  578. package/dist/validation/gate-reexecute.js +7 -4
  579. package/dist/validation/quality-gate-runner.d.ts +7 -1
  580. package/dist/validation/quality-gate-runner.js +3 -3
  581. package/dist/workers/daemon.js +13 -1
  582. package/dist/workers/quality-daemon/git-watcher.js +9 -9
  583. package/dist/workers/workers/defect-predictor.d.ts +8 -3
  584. package/dist/workers/workers/defect-predictor.js +48 -49
  585. package/dist/workers/workers/learning-consolidation.d.ts +2 -0
  586. package/dist/workers/workers/learning-consolidation.js +12 -1
  587. package/dist/workflows/browser/workflow-loader.js +8 -5
  588. package/package.json +1 -1
  589. package/dist/cli/chunks/adapter-R2Q4QGXQ.js +0 -2
  590. package/dist/cli/chunks/agent-booster-wasm-427FRKWG.js +0 -2
  591. package/dist/cli/chunks/aqe-learning-engine-3RENLQWP.js +0 -2
  592. package/dist/cli/chunks/base-67DXSAYM.js +0 -2
  593. package/dist/cli/chunks/browser-CT3MTV6G.js +0 -4
  594. package/dist/cli/chunks/browser-workflow-NDXRROWZ.js +0 -2
  595. package/dist/cli/chunks/chunk-2XITOPYV.js +0 -6
  596. package/dist/cli/chunks/chunk-4URT6JO2.js +0 -2
  597. package/dist/cli/chunks/chunk-5LAAZLUC.js +0 -4
  598. package/dist/cli/chunks/chunk-6PXA2BQJ.js +0 -742
  599. package/dist/cli/chunks/chunk-6YL6JOQB.js +0 -4
  600. package/dist/cli/chunks/chunk-7DMA5NYL.js +0 -4
  601. package/dist/cli/chunks/chunk-AR2E4B7K.js +0 -6
  602. package/dist/cli/chunks/chunk-F2SQPP6U.js +0 -4
  603. package/dist/cli/chunks/chunk-FJ4VTLLK.js +0 -2
  604. package/dist/cli/chunks/chunk-FV3NHVC7.js +0 -59
  605. package/dist/cli/chunks/chunk-G3BKZNFL.js +0 -120
  606. package/dist/cli/chunks/chunk-GR3JYE5A.js +0 -2
  607. package/dist/cli/chunks/chunk-J3WGK22W.js +0 -2
  608. package/dist/cli/chunks/chunk-JEP4ULR6.js +0 -21
  609. package/dist/cli/chunks/chunk-JK2ME6IT.js +0 -2
  610. package/dist/cli/chunks/chunk-KHSRIPBP.js +0 -180
  611. package/dist/cli/chunks/chunk-KTSLTZSG.js +0 -2
  612. package/dist/cli/chunks/chunk-N5PDFGCQ.js +0 -180
  613. package/dist/cli/chunks/chunk-O3JLOVZX.js +0 -4
  614. package/dist/cli/chunks/chunk-P2CXVNKK.js +0 -4
  615. package/dist/cli/chunks/chunk-THAY7WHO.js +0 -12
  616. package/dist/cli/chunks/chunk-VU2EL424.js +0 -14
  617. package/dist/cli/chunks/chunk-VXZJOKOX.js +0 -2
  618. package/dist/cli/chunks/chunk-VYLM2YV5.js +0 -12
  619. package/dist/cli/chunks/chunk-XZJ2O3VC.js +0 -2
  620. package/dist/cli/chunks/client-ZP3CTVRF.js +0 -2
  621. package/dist/cli/chunks/core-handlers-JSRXQWPE.js +0 -2
  622. package/dist/cli/chunks/cross-domain-router-7UKODQWG.js +0 -2
  623. package/dist/cli/chunks/daemon-YIFT46FH.js +0 -34
  624. package/dist/cli/chunks/domain-transfer-6EF75EKU.js +0 -2
  625. package/dist/cli/chunks/dream-UDLM6M55.js +0 -2
  626. package/dist/cli/chunks/file-discovery-THWOUQ7Z.js +0 -2
  627. package/dist/cli/chunks/fleet-ADL57COA.js +0 -44
  628. package/dist/cli/chunks/heartbeat-scheduler-HGOC5KH3.js +0 -2
  629. package/dist/cli/chunks/hnsw-adapter-EPSA6AP7.js +0 -2
  630. package/dist/cli/chunks/hnsw-index-RMFOPYGY.js +0 -2
  631. package/dist/cli/chunks/hybrid-backend-NZ3G4WBX.js +0 -2
  632. package/dist/cli/chunks/impact-analyzer-WZC6NHFP.js +0 -2
  633. package/dist/cli/chunks/init-wizard-422UZYQ5.js +0 -2
  634. package/dist/cli/chunks/kernel-N7PJ6FCE.js +0 -2
  635. package/dist/cli/chunks/knowledge-graph-SZCVQF37.js +0 -2
  636. package/dist/cli/chunks/llm-router-service-4DE5WDUZ.js +0 -2
  637. package/dist/cli/chunks/load-test-POMIF4Q4.js +0 -2
  638. package/dist/cli/chunks/mcp-CRZKZE37.js +0 -2
  639. package/dist/cli/chunks/memory-backend-4P6AHSOY.js +0 -2
  640. package/dist/cli/chunks/memory-handlers-NK6NV3GE.js +0 -2
  641. package/dist/cli/chunks/pattern-null-store-CCHQHGQG.js +0 -2
  642. package/dist/cli/chunks/pipeline-5LMLBIJ7.js +0 -19
  643. package/dist/cli/chunks/project-root-X72FSM2F.js +0 -2
  644. package/dist/cli/chunks/protocol-executor-QW6XN6QN.js +0 -2
  645. package/dist/cli/chunks/qe-reasoning-bank-ZD3WF647.js +0 -2
  646. package/dist/cli/chunks/queen-coordinator-S4U4MKK2.js +0 -2
  647. package/dist/cli/chunks/router-CXZKOOTR.js +0 -2
  648. package/dist/cli/chunks/routing-feedback-IYFANYY5.js +0 -2
  649. package/dist/cli/chunks/rvf-dual-writer-HCLQ5WUQ.js +0 -2
  650. package/dist/cli/chunks/rvf-migration-adapter-XCLUWOO3.js +0 -2
  651. package/dist/cli/chunks/rvf-native-adapter-MRT5H3IP.js +0 -2
  652. package/dist/cli/chunks/safe-db-WFODRGVZ.js +0 -2
  653. package/dist/cli/chunks/schedule-RO55OQXG.js +0 -2
  654. package/dist/cli/chunks/scheduler-XXMJCH24.js +0 -2
  655. package/dist/cli/chunks/sqlite-persistence-AWRIS4MK.js +0 -2
  656. package/dist/cli/chunks/sync-UVXA6CT2.js +0 -2
  657. package/dist/cli/chunks/task-handlers-GUYW2EPJ.js +0 -9
  658. package/dist/cli/chunks/token-bootstrap-EDK6FNQ3.js +0 -2
  659. package/dist/cli/chunks/tree-sitter-wasm-parser-MI3NZKUD.js +0 -2
  660. package/dist/cli/chunks/unified-memory-6JWHV6EF.js +0 -2
  661. package/dist/cli/chunks/unified-memory-hnsw-4UANU6NU.js +0 -2
  662. package/dist/cli/chunks/unified-persistence-KGGNA46H.js +0 -2
  663. package/dist/cli/chunks/visual-security-6VZNQLH7.js +0 -2
  664. package/dist/cli/chunks/witness-chain-AKKHWEWU.js +0 -2
  665. package/dist/cli/chunks/witness-chain-TATPXQRK.js +0 -2
  666. package/dist/cli/chunks/witness-chain-repair-2HGJGE7O.js +0 -2
  667. package/dist/cli/chunks/workflow-orchestrator-4GAW7HNZ.js +0 -2
  668. package/dist/cli/chunks/wrappers-ZD5NBHYI.js +0 -2
@@ -1,152 +1,16 @@
1
1
  /**
2
2
  * Agentic QE v3 - Queen Task Management
3
3
  * Extracted from queen-coordinator.ts - Task assignment, domain routing,
4
- * TinyDancer integration, queue operations, and domain plugin execution.
4
+ * TinyDancer integration, and domain plugin execution. Queue operations and
5
+ * the drain live in queen-task-queue.ts.
5
6
  */
6
7
  import { ok, err } from '../shared/types/index.js';
7
- import { binaryInsert, createdAtComparator } from '../shared/utils/index.js';
8
+ import { toError } from '../shared/error-utils.js';
8
9
  import { getTaskDomains } from './queen-types.js';
9
10
  import { settleCancelledTask } from './cancelled-task-settlement.js';
10
11
  import { findDomainsWithoutHandler, describeMissingHandler } from './task-executability.js';
11
- // ============================================================================
12
- // Task comparator for priority queue binary insertion
13
- // ============================================================================
14
- /**
15
- * PERF-001 FIX: Comparator for tasks - sorted by createdAt ascending (oldest first / FIFO within priority)
16
- */
17
- export const taskComparator = createdAtComparator();
18
- // ============================================================================
19
- // Queue operations
20
- // ============================================================================
21
- /**
22
- * PERF-001 FIX: Use binary insertion O(log n) instead of sort O(n log n)
23
- */
24
- export function enqueueTask(taskQueue, domainQueues, task) {
25
- const priorityQueue = taskQueue.get(task.priority);
26
- if (priorityQueue) {
27
- binaryInsert(priorityQueue, task, taskComparator);
28
- }
29
- // Also add to domain-specific queues (unsorted - just for load tracking)
30
- for (const domain of task.targetDomains) {
31
- const domainQueue = domainQueues.get(domain);
32
- if (domainQueue) {
33
- domainQueue.push(task);
34
- }
35
- }
36
- }
37
- /**
38
- * Remove a task from all queues.
39
- * PERF-008: Only iterate the task's targetDomains instead of ALL_DOMAINS.
40
- */
41
- export function removeFromQueues(taskQueue, domainQueues, task) {
42
- const priorityQueue = taskQueue.get(task.priority);
43
- if (priorityQueue) {
44
- const idx = priorityQueue.findIndex(t => t.id === task.id);
45
- if (idx !== -1) {
46
- priorityQueue.splice(idx, 1);
47
- }
48
- }
49
- for (const domain of task.targetDomains) {
50
- const domainQueue = domainQueues.get(domain);
51
- if (domainQueue) {
52
- const idx = domainQueue.findIndex(t => t.id === task.id);
53
- if (idx !== -1) {
54
- domainQueue.splice(idx, 1);
55
- }
56
- }
57
- }
58
- }
59
- /**
60
- * Get the position of a task within the priority queues.
61
- */
62
- export function getQueuePosition(taskQueue, task) {
63
- let position = 0;
64
- for (const p of ['p0', 'p1', 'p2', 'p3']) {
65
- const queue = taskQueue.get(p);
66
- if (queue) {
67
- if (p === task.priority) {
68
- position += queue.findIndex(t => t.id === task.id);
69
- break;
70
- }
71
- position += queue.length;
72
- }
73
- }
74
- return position;
75
- }
76
- /**
77
- * Process the queue: dequeue highest-priority tasks and assign them.
78
- * CC-002 FIX: Uses atomic counter for capacity check.
79
- */
80
- export async function processQueue(ctx) {
81
- if (ctx.runningTaskCounter >= ctx.config.maxConcurrentTasks) {
82
- return;
83
- }
84
- // #1081: while this drain runs, a task failed at dispatch frees its slot
85
- // here instead of starting a nested drain (one stack frame per failed task).
86
- drainDepth.set(ctx.tasks, (drainDepth.get(ctx.tasks) ?? 0) + 1);
87
- try {
88
- for (const priority of ['p0', 'p1', 'p2', 'p3']) {
89
- const queue = ctx.taskQueue.get(priority);
90
- if (!queue || queue.length === 0)
91
- continue;
92
- let task = shiftDispatchableTask(ctx, queue);
93
- while (task) {
94
- removeFromQueues(ctx.taskQueue, ctx.domainQueues, task);
95
- // CC-002 FIX: Increment counter before assigning queued task
96
- ctx.runningTaskCounter++;
97
- let assigned;
98
- try {
99
- assigned = await assignTask(ctx, task);
100
- }
101
- catch (error) {
102
- ctx.runningTaskCounter = Math.max(0, ctx.runningTaskCounter - 1);
103
- throw error;
104
- }
105
- // #1081: a queued task that cannot be assigned (no healthy domain, open
106
- // breaker) has no caller waiting on the result. Fail it with the reason
107
- // rather than leave it queued forever on a held slot.
108
- if (!assigned.success && (ctx.tasks.get(task.id)?.status ?? 'queued') === 'queued') {
109
- settleFailedBeforeRun(ctx, task, undefined, assigned.error.message);
110
- }
111
- if (ctx.runningTaskCounter >= ctx.config.maxConcurrentTasks) {
112
- return;
113
- }
114
- // A task that failed without starting gave its slot back; let the
115
- // next task of this priority have it.
116
- task = ctx.tasks.get(task.id)?.status === 'failed' ? shiftDispatchableTask(ctx, queue) : undefined;
117
- }
118
- }
119
- }
120
- finally {
121
- const depth = (drainDepth.get(ctx.tasks) ?? 1) - 1;
122
- if (depth > 0)
123
- drainDepth.set(ctx.tasks, depth);
124
- else
125
- drainDepth.delete(ctx.tasks);
126
- }
127
- }
128
- /**
129
- * Drains in progress per Queen, keyed by its task map (the task context
130
- * object is rebuilt for every call).
131
- */
132
- const drainDepth = new WeakMap();
133
- /**
134
- * Take the next task that is still waiting to run. A queued task can reach a
135
- * terminal state without being dequeued, e.g. when its caller executes it
136
- * directly (#1070). Dispatching it again would flip it back to running and
137
- * leak a capacity slot, so such entries are dropped from the queues instead.
138
- */
139
- function shiftDispatchableTask(ctx, queue) {
140
- let task = queue.shift();
141
- while (task) {
142
- const status = ctx.tasks.get(task.id)?.status;
143
- if (status === undefined || status === 'queued')
144
- return task;
145
- removeFromQueues(ctx.taskQueue, ctx.domainQueues, task);
146
- task = queue.shift();
147
- }
148
- return undefined;
149
- }
12
+ import { processQueue, releaseSlot, settleFailedBeforeRun } from './queen-task-queue.js';
13
+ export { taskComparator, enqueueTask, removeFromQueues, getQueuePosition, processQueue, } from './queen-task-queue.js';
150
14
  // ============================================================================
151
15
  // Task filtering
152
16
  // ============================================================================
@@ -268,13 +132,13 @@ export async function assignTaskToDomain(ctx, task, domain) {
268
132
  // preamble can instruct it to call `aqe llm advise` before substantive work
269
133
  ...(routeDecision?.triggerMultiModel ? ['advisor:triggerMultiModel'] : []),
270
134
  ];
271
- const spawnResult = await ctx.requestAgentSpawn(domain, agentType, spawnCapabilities);
135
+ const spawnResult = await ctx.requestAgentSpawn(domain, agentType, spawnCapabilities, task.id);
272
136
  // A queued task can be cancelled while routing or agent spawn is awaiting.
273
137
  // Do not recreate it as running or dispatch its plugin afterward.
274
138
  if (ctx.tasks.get(task.id)?.status === 'cancelled') {
275
139
  if (spawnResult.success)
276
140
  await ctx.agentCoordinator.stop(spawnResult.value);
277
- ctx.runningTaskCounter = Math.max(0, ctx.runningTaskCounter - 1);
141
+ await releaseSlot(ctx);
278
142
  return ok(task.id);
279
143
  }
280
144
  const agentIds = [];
@@ -317,25 +181,36 @@ export async function assignTaskToDomain(ctx, task, domain) {
317
181
  timeout: task.timeout,
318
182
  correlationId: task.correlationId,
319
183
  };
320
- const execResult = await plugin.executeTask(request, (result) => handleTaskCompletionCallback(ctx, result));
184
+ // #1140: a plugin that throws is treated like one that returns err, so
185
+ // the task is settled here instead of left running on a released slot.
186
+ let execResult;
187
+ try {
188
+ execResult = await plugin.executeTask(request, (result) => handleTaskCompletionCallback(ctx, result));
189
+ }
190
+ catch (error) {
191
+ execResult = err(toError(error));
192
+ }
321
193
  if (!execResult.success) {
322
194
  const cancelled = settleCancelledTask(ctx.tasks, task.id);
323
195
  if (cancelled.ignored) {
324
- if (cancelled.settledNow) {
325
- ctx.runningTaskCounter = Math.max(0, ctx.runningTaskCounter - 1);
326
- await processQueue(ctx);
327
- }
196
+ if (cancelled.settledNow)
197
+ await releaseSlot(ctx);
328
198
  return ok(task.id);
329
199
  }
200
+ // #1140: the plugin already reported this task through onComplete,
201
+ // which settled it and released its slot.
202
+ if (ctx.tasks.get(task.id)?.status !== 'running')
203
+ return err(execResult.error);
330
204
  ctx.tasks.set(task.id, {
331
205
  ...execution,
332
206
  status: 'failed',
333
207
  error: execResult.error.message,
334
208
  completedAt: new Date(),
335
209
  });
336
- ctx.runningTaskCounter = Math.max(0, ctx.runningTaskCounter - 1);
337
210
  ctx.tasksFailed++;
338
211
  ctx.auditLogger.logFail(task.id, agentIds[0], execResult.error.message);
212
+ await ctx.publishEvent('TaskFailed', { taskId: task.id, domain, error: execResult.error.message });
213
+ await releaseSlot(ctx);
339
214
  return err(execResult.error);
340
215
  }
341
216
  return ok(task.id);
@@ -348,32 +223,40 @@ export async function assignTaskToDomain(ctx, task, domain) {
348
223
  * failed with the reason, its slot is released and the queue moves on.
349
224
  */
350
225
  async function failUnexecutableTask(ctx, task, domain, reason) {
351
- settleFailedBeforeRun(ctx, task, domain, reason);
352
226
  const traceCtx = ctx.taskTraceContexts.get(task.id);
353
227
  if (ctx.traceCollector && traceCtx) {
354
228
  ctx.traceCollector.failSpan(traceCtx.spanId, reason);
355
229
  ctx.taskTraceContexts.delete(task.id);
356
230
  }
357
- // Inside a drain, the drain itself hands the freed slot on.
358
- if (!drainDepth.has(ctx.tasks))
359
- await processQueue(ctx);
231
+ await settleFailedBeforeRun(ctx, task, domain, reason);
360
232
  return ok(task.id);
361
233
  }
362
- /** Mark a task that never started as failed and release the slot it held. */
363
- function settleFailedBeforeRun(ctx, task, domain, reason) {
364
- ctx.tasks.set(task.id, {
365
- taskId: task.id,
366
- task,
367
- status: 'failed',
368
- assignedDomain: domain,
369
- assignedAgents: [],
370
- retryCount: ctx.tasks.get(task.id)?.retryCount ?? 0,
371
- error: reason,
372
- completedAt: new Date(),
373
- });
374
- ctx.runningTaskCounter = Math.max(0, ctx.runningTaskCounter - 1);
375
- ctx.tasksFailed++;
376
- ctx.auditLogger.logFail(task.id, undefined, reason);
234
+ /**
235
+ * Work stealing: dispatch a queued task to another domain. It takes a slot
236
+ * like any dispatched task, so its settle leaves the counter balanced, and it
237
+ * is failed with the reason if it cannot be assigned (#1124).
238
+ *
239
+ * Returns whether the task is now running in `domain`. An entry that reached a
240
+ * terminal state while still queued (#1070) is not dispatched at all.
241
+ */
242
+ export async function dispatchStolenTask(ctx, task, domain) {
243
+ const status = ctx.tasks.get(task.id)?.status;
244
+ if (status !== undefined && status !== 'queued')
245
+ return false;
246
+ ctx.runningTaskCounter++;
247
+ let assigned;
248
+ try {
249
+ assigned = await assignTaskToDomain(ctx, task, domain);
250
+ }
251
+ catch (error) {
252
+ ctx.runningTaskCounter = Math.max(0, ctx.runningTaskCounter - 1);
253
+ throw error;
254
+ }
255
+ if (!assigned.success && (ctx.tasks.get(task.id)?.status ?? 'queued') === 'queued') {
256
+ await settleFailedBeforeRun(ctx, task, domain, assigned.error.message);
257
+ }
258
+ const after = ctx.tasks.get(task.id);
259
+ return after?.assignedDomain === domain && (after.status === 'running' || after.status === 'completed');
377
260
  }
378
261
  // ============================================================================
379
262
  // Task completion callback (from domain plugin)
@@ -445,4 +328,15 @@ export function canDomainHandleTask(domain, task) {
445
328
  const compatibleDomains = getTaskDomains(task.type);
446
329
  return compatibleDomains.includes(domain);
447
330
  }
331
+ /**
332
+ * #1124: whether a task can run in a domain, i.e. the domain is configured for
333
+ * its type and, for a Queen-owned task, the domain's plugin has a handler.
334
+ */
335
+ export function canDomainExecuteTask(domainPlugins, domain, task) {
336
+ if (!canDomainHandleTask(domain, task))
337
+ return false;
338
+ if (task.executionOwner === 'caller' || !domainPlugins)
339
+ return true;
340
+ return findDomainsWithoutHandler(domainPlugins, task.type, [domain]).length === 0;
341
+ }
448
342
  //# sourceMappingURL=queen-task-management.js.map
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Agentic QE v3 - Queen Task Queue
3
+ * Extracted from queen-task-management.ts - priority queue operations, the
4
+ * queue drain, and handing a released slot back to the queue.
5
+ */
6
+ import type { DomainName, Priority } from '../shared/types';
7
+ import type { QueenTask } from './queen-types.js';
8
+ import { type QueenTaskContext } from './queen-task-management.js';
9
+ /**
10
+ * PERF-001 FIX: Comparator for tasks - sorted by createdAt ascending (oldest first / FIFO within priority)
11
+ */
12
+ export declare const taskComparator: import("../shared/utils/binary-insert").Comparator<QueenTask>;
13
+ /**
14
+ * PERF-001 FIX: Use binary insertion O(log n) instead of sort O(n log n)
15
+ */
16
+ export declare function enqueueTask(taskQueue: Map<Priority, QueenTask[]>, domainQueues: Map<DomainName, QueenTask[]>, task: QueenTask): void;
17
+ /**
18
+ * Remove a task from all queues.
19
+ * PERF-008: Only iterate the task's targetDomains instead of ALL_DOMAINS.
20
+ */
21
+ export declare function removeFromQueues(taskQueue: Map<Priority, QueenTask[]>, domainQueues: Map<DomainName, QueenTask[]>, task: QueenTask): void;
22
+ /**
23
+ * Get the position of a task within the priority queues.
24
+ */
25
+ export declare function getQueuePosition(taskQueue: Map<Priority, QueenTask[]>, task: QueenTask): number;
26
+ /**
27
+ * Process the queue: dequeue highest-priority tasks and assign them.
28
+ * CC-002 FIX: Uses atomic counter for capacity check.
29
+ */
30
+ export declare function processQueue(ctx: QueenTaskContext): Promise<void>;
31
+ /**
32
+ * Give back the slot a task held and hand it to the queue: a running drain
33
+ * picks it up on its next scan, otherwise a new drain starts.
34
+ */
35
+ export declare function releaseSlot(ctx: QueenTaskContext): Promise<void>;
36
+ /**
37
+ * Mark a task that never started as failed, publish QueenTaskFailed (#1124)
38
+ * and hand the slot it held to the queue.
39
+ */
40
+ export declare function settleFailedBeforeRun(ctx: QueenTaskContext, task: QueenTask, domain: DomainName | undefined, reason: string): Promise<void>;
41
+ //# sourceMappingURL=queen-task-queue.d.ts.map
@@ -0,0 +1,194 @@
1
+ /**
2
+ * Agentic QE v3 - Queen Task Queue
3
+ * Extracted from queen-task-management.ts - priority queue operations, the
4
+ * queue drain, and handing a released slot back to the queue.
5
+ */
6
+ import { binaryInsert, createdAtComparator } from '../shared/utils/index.js';
7
+ import { toErrorMessage } from '../shared/error-utils.js';
8
+ import { assignTask } from './queen-task-management.js';
9
+ // ============================================================================
10
+ // Task comparator for priority queue binary insertion
11
+ // ============================================================================
12
+ /**
13
+ * PERF-001 FIX: Comparator for tasks - sorted by createdAt ascending (oldest first / FIFO within priority)
14
+ */
15
+ export const taskComparator = createdAtComparator();
16
+ // ============================================================================
17
+ // Queue operations
18
+ // ============================================================================
19
+ /**
20
+ * PERF-001 FIX: Use binary insertion O(log n) instead of sort O(n log n)
21
+ */
22
+ export function enqueueTask(taskQueue, domainQueues, task) {
23
+ const priorityQueue = taskQueue.get(task.priority);
24
+ if (priorityQueue) {
25
+ binaryInsert(priorityQueue, task, taskComparator);
26
+ }
27
+ // Also add to domain-specific queues (unsorted - just for load tracking)
28
+ for (const domain of task.targetDomains) {
29
+ const domainQueue = domainQueues.get(domain);
30
+ if (domainQueue) {
31
+ domainQueue.push(task);
32
+ }
33
+ }
34
+ }
35
+ /**
36
+ * Remove a task from all queues.
37
+ * PERF-008: Only iterate the task's targetDomains instead of ALL_DOMAINS.
38
+ */
39
+ export function removeFromQueues(taskQueue, domainQueues, task) {
40
+ const priorityQueue = taskQueue.get(task.priority);
41
+ if (priorityQueue) {
42
+ const idx = priorityQueue.findIndex(t => t.id === task.id);
43
+ if (idx !== -1) {
44
+ priorityQueue.splice(idx, 1);
45
+ }
46
+ }
47
+ for (const domain of task.targetDomains) {
48
+ const domainQueue = domainQueues.get(domain);
49
+ if (domainQueue) {
50
+ const idx = domainQueue.findIndex(t => t.id === task.id);
51
+ if (idx !== -1) {
52
+ domainQueue.splice(idx, 1);
53
+ }
54
+ }
55
+ }
56
+ }
57
+ /**
58
+ * Get the position of a task within the priority queues.
59
+ */
60
+ export function getQueuePosition(taskQueue, task) {
61
+ let position = 0;
62
+ for (const p of ['p0', 'p1', 'p2', 'p3']) {
63
+ const queue = taskQueue.get(p);
64
+ if (queue) {
65
+ if (p === task.priority) {
66
+ position += queue.findIndex(t => t.id === task.id);
67
+ break;
68
+ }
69
+ position += queue.length;
70
+ }
71
+ }
72
+ return position;
73
+ }
74
+ /**
75
+ * Process the queue: dequeue highest-priority tasks and assign them.
76
+ * CC-002 FIX: Uses atomic counter for capacity check.
77
+ */
78
+ export async function processQueue(ctx) {
79
+ if (ctx.runningTaskCounter >= ctx.config.maxConcurrentTasks) {
80
+ return;
81
+ }
82
+ // #1081: while this drain runs, a task failed at dispatch frees its slot
83
+ // here instead of starting a nested drain (one stack frame per failed task).
84
+ drainDepth.set(ctx.tasks, (drainDepth.get(ctx.tasks) ?? 0) + 1);
85
+ try {
86
+ // #1127: a slot released elsewhere while this drain awaits marks it dirty,
87
+ // so it scans again from p0 rather than leaving the slot unused.
88
+ do {
89
+ drainDirty.delete(ctx.tasks);
90
+ for (const priority of ['p0', 'p1', 'p2', 'p3']) {
91
+ const queue = ctx.taskQueue.get(priority);
92
+ if (!queue || queue.length === 0)
93
+ continue;
94
+ let task = shiftDispatchableTask(ctx, queue);
95
+ while (task) {
96
+ removeFromQueues(ctx.taskQueue, ctx.domainQueues, task);
97
+ // CC-002 FIX: Increment counter before assigning queued task
98
+ ctx.runningTaskCounter++;
99
+ let assigned;
100
+ try {
101
+ assigned = await assignTask(ctx, task);
102
+ }
103
+ catch (error) {
104
+ ctx.runningTaskCounter = Math.max(0, ctx.runningTaskCounter - 1);
105
+ throw error;
106
+ }
107
+ // #1081: a queued task that cannot be assigned (no healthy domain, open
108
+ // breaker) has no caller waiting on the result. Fail it with the reason
109
+ // rather than leave it queued forever on a held slot.
110
+ if (!assigned.success && (ctx.tasks.get(task.id)?.status ?? 'queued') === 'queued') {
111
+ await settleFailedBeforeRun(ctx, task, undefined, assigned.error.message);
112
+ }
113
+ if (ctx.runningTaskCounter >= ctx.config.maxConcurrentTasks) {
114
+ return;
115
+ }
116
+ // #1127: fill every free slot, whether this task started, failed
117
+ // before running or was cancelled while it was being assigned.
118
+ task = shiftDispatchableTask(ctx, queue);
119
+ }
120
+ }
121
+ } while (drainDirty.has(ctx.tasks) && ctx.runningTaskCounter < ctx.config.maxConcurrentTasks);
122
+ }
123
+ finally {
124
+ const depth = (drainDepth.get(ctx.tasks) ?? 1) - 1;
125
+ if (depth > 0)
126
+ drainDepth.set(ctx.tasks, depth);
127
+ else {
128
+ drainDepth.delete(ctx.tasks);
129
+ drainDirty.delete(ctx.tasks);
130
+ }
131
+ }
132
+ }
133
+ /**
134
+ * Drains in progress per Queen, keyed by its task map (the task context
135
+ * object is rebuilt for every call).
136
+ */
137
+ const drainDepth = new WeakMap();
138
+ /** #1127: Queens with a slot released while a drain was running. */
139
+ const drainDirty = new WeakSet();
140
+ /**
141
+ * Give back the slot a task held and hand it to the queue: a running drain
142
+ * picks it up on its next scan, otherwise a new drain starts.
143
+ */
144
+ export async function releaseSlot(ctx) {
145
+ ctx.runningTaskCounter = Math.max(0, ctx.runningTaskCounter - 1);
146
+ if (drainDepth.has(ctx.tasks)) {
147
+ drainDirty.add(ctx.tasks);
148
+ return;
149
+ }
150
+ // The drain dispatches other tasks. The caller whose task released this
151
+ // slot does not wait for it (#1140), and its failure belongs to none of
152
+ // them, so it must not reach that caller.
153
+ void processQueue(ctx).catch(error => {
154
+ console.warn('[Queen] Queue drain after a released slot failed:', toErrorMessage(error));
155
+ });
156
+ }
157
+ /**
158
+ * Take the next task that is still waiting to run. A queued task can reach a
159
+ * terminal state without being dequeued, e.g. when its caller executes it
160
+ * directly (#1070). Dispatching it again would flip it back to running and
161
+ * leak a capacity slot, so such entries are dropped from the queues instead.
162
+ */
163
+ function shiftDispatchableTask(ctx, queue) {
164
+ let task = queue.shift();
165
+ while (task) {
166
+ const status = ctx.tasks.get(task.id)?.status;
167
+ if (status === undefined || status === 'queued')
168
+ return task;
169
+ removeFromQueues(ctx.taskQueue, ctx.domainQueues, task);
170
+ task = queue.shift();
171
+ }
172
+ return undefined;
173
+ }
174
+ /**
175
+ * Mark a task that never started as failed, publish QueenTaskFailed (#1124)
176
+ * and hand the slot it held to the queue.
177
+ */
178
+ export async function settleFailedBeforeRun(ctx, task, domain, reason) {
179
+ ctx.tasks.set(task.id, {
180
+ taskId: task.id,
181
+ task,
182
+ status: 'failed',
183
+ assignedDomain: domain,
184
+ assignedAgents: [],
185
+ retryCount: ctx.tasks.get(task.id)?.retryCount ?? 0,
186
+ error: reason,
187
+ completedAt: new Date(),
188
+ });
189
+ ctx.tasksFailed++;
190
+ ctx.auditLogger.logFail(task.id, undefined, reason);
191
+ await ctx.publishEvent('TaskFailed', { taskId: task.id, domain, error: reason });
192
+ await releaseSlot(ctx);
193
+ }
194
+ //# sourceMappingURL=queen-task-queue.js.map
@@ -151,7 +151,7 @@ export interface IQueenCoordinator {
151
151
  triggerWorkStealing(): Promise<number>;
152
152
  listAllAgents(): AgentInfo[];
153
153
  getAgentsByDomain(domain: DomainName): AgentInfo[];
154
- requestAgentSpawn(domain: DomainName, type: string, capabilities: string[]): Promise<Result<string, Error>>;
154
+ requestAgentSpawn(domain: DomainName, type: string, capabilities: string[], taskId?: string): Promise<Result<string, Error>>;
155
155
  getHealth(): QueenHealth;
156
156
  getMetrics(): QueenMetrics;
157
157
  executeProtocol(protocolId: string, params?: Record<string, unknown>): Promise<Result<string, Error>>;
@@ -14,8 +14,13 @@ export interface QueenWorkStealingContext {
14
14
  getIdleDomains(): DomainName[];
15
15
  getBusyDomains(): DomainName[];
16
16
  getDomainLoad(domain: DomainName): number;
17
+ /** #1140: free Queen slots; a steal starts a task, so it needs one */
18
+ availableSlots(): number;
19
+ /** #1124: the domain is configured for the task and its plugin can execute it */
20
+ canExecuteInDomain(domain: DomainName, task: QueenTask): boolean;
17
21
  removeFromQueues(task: QueenTask): void;
18
- assignTaskToDomain(task: QueenTask, domain: DomainName): Promise<void>;
22
+ /** Dispatch a stolen task; resolves whether it now runs in `domain`. */
23
+ assignTaskToDomain(task: QueenTask, domain: DomainName): Promise<boolean>;
19
24
  publishEvent(type: string, payload: Record<string, unknown>): Promise<void>;
20
25
  }
21
26
  /**
@@ -4,7 +4,6 @@
4
4
  * exponential backoff and automatic disable on repeated failures.
5
5
  */
6
6
  import { toErrorMessage } from '../shared/error-utils.js';
7
- import { canDomainHandleTask } from './queen-task-management.js';
8
7
  // ============================================================================
9
8
  // Work stealing algorithm
10
9
  // ============================================================================
@@ -26,14 +25,18 @@ export async function triggerWorkStealing(ctx) {
26
25
  break;
27
26
  const queue = ctx.domainQueues.get(busyDomain) || [];
28
27
  const stealCount = Math.min(queue.length, ctx.config.workStealing.stealBatchSize);
29
- for (let i = 0; i < stealCount && idleDomains.length > 0; i++) {
30
- const task = queue.find(t => canDomainHandleTask(idleDomains[0], t));
28
+ // #1140: each steal takes a slot, so stop when none is free.
29
+ for (let i = 0; i < stealCount && idleDomains.length > 0 && ctx.availableSlots() > 0; i++) {
30
+ const task = queue.find(t => ctx.canExecuteInDomain(idleDomains[0], t));
31
31
  if (task) {
32
32
  const stealerDomain = idleDomains.shift();
33
33
  ctx.removeFromQueues(task);
34
+ // #1124: a task that is not running afterwards (already terminal, or
35
+ // failed at assignment) was not stolen.
36
+ if (!await ctx.assignTaskToDomain(task, stealerDomain))
37
+ continue;
34
38
  // SEC-003 Simplified: Log work stealing for observability
35
39
  ctx.auditLogger.logSteal(task.id, busyDomain, stealerDomain);
36
- await ctx.assignTaskToDomain(task, stealerDomain);
37
40
  stolenCount++;
38
41
  ctx.tasksStolen++;
39
42
  await ctx.publishEvent('TaskStolen', {
@@ -0,0 +1,15 @@
1
+ /**
2
+ * #1125 review: task_orchestrate and `aqe fleet run` now submit the domains'
3
+ * concrete handler types (sast-scan, analyze-quality) for the abstract types
4
+ * scan-security and assess-quality. These adapters map those handler results
5
+ * onto the report shapes ResultSaver already writes, so they are saved by the
6
+ * security and quality savers rather than as generic JSON. Nothing missing
7
+ * from a result is filled in: absent values stay absent.
8
+ */
9
+ import type { TaskType } from './queen-types.js';
10
+ /** The saver type and report for a task result; other types pass through. */
11
+ export declare function resultForSaver(taskType: string, result: unknown): {
12
+ saveType: TaskType;
13
+ report: unknown;
14
+ };
15
+ //# sourceMappingURL=result-saver-adapters.d.ts.map
@@ -0,0 +1,57 @@
1
+ const asRecord = (value) => value !== null && typeof value === 'object' ? value : {};
2
+ /** sast-scan's SASTResult -> the scan-security report shape. */
3
+ function securityReport(result) {
4
+ const data = asRecord(result);
5
+ const summary = asRecord(data.summary);
6
+ const findings = Array.isArray(data.vulnerabilities) ? data.vulnerabilities : [];
7
+ const count = (severity) => typeof summary[severity] === 'number' ? summary[severity] : 0;
8
+ return {
9
+ vulnerabilities: findings.length,
10
+ critical: count('critical'),
11
+ high: count('high'),
12
+ medium: count('medium'),
13
+ low: count('low'),
14
+ topVulnerabilities: findings.slice(0, 10).map(f => ({
15
+ type: f.title ?? f.category ?? 'finding',
16
+ severity: f.severity ?? 'unknown',
17
+ file: f.location?.file ?? '',
18
+ line: f.location?.line ?? 0,
19
+ })),
20
+ findings: findings.map(f => ({
21
+ title: f.title, type: f.category, severity: f.severity ?? 'unknown', location: f.location?.file
22
+ ? { file: f.location.file, line: f.location.line } : undefined, description: f.description,
23
+ })),
24
+ recommendations: [],
25
+ evidence: data.evidence,
26
+ coverage: data.coverage,
27
+ analysisDepth: 'sast-patterns',
28
+ };
29
+ }
30
+ /** analyze-quality's analysis -> the assess-quality report shape. No gate runs. */
31
+ function qualityReport(result) {
32
+ const data = asRecord(result);
33
+ const score = asRecord(data.score);
34
+ const metrics = Array.isArray(data.metrics) ? data.metrics : [];
35
+ const unmeasured = Array.isArray(data.unmeasured)
36
+ ? data.unmeasured.map(u => u.metric).filter((m) => !!m)
37
+ : [];
38
+ return {
39
+ ...(typeof score.overall === 'number' ? { qualityScore: score.overall } : {}),
40
+ passed: false,
41
+ gateEvaluated: false,
42
+ metrics: Object.fromEntries(metrics.filter(m => m.name && typeof m.value === 'number').map(m => [m.name, m.value])),
43
+ recommendations: Array.isArray(data.recommendations) ? data.recommendations : [],
44
+ unmeasured,
45
+ evidenceStatus: unmeasured.length > 0 ? 'insufficient-evidence' : 'measured',
46
+ scoreBasis: metrics.map(m => m.name).filter((m) => !!m),
47
+ };
48
+ }
49
+ /** The saver type and report for a task result; other types pass through. */
50
+ export function resultForSaver(taskType, result) {
51
+ switch (taskType) {
52
+ case 'sast-scan': return { saveType: 'scan-security', report: securityReport(result) };
53
+ case 'analyze-quality': return { saveType: 'assess-quality', report: qualityReport(result) };
54
+ default: return { saveType: taskType, report: result };
55
+ }
56
+ }
57
+ //# sourceMappingURL=result-saver-adapters.js.map
@@ -58,7 +58,7 @@ export declare class ResultSaver {
58
58
  /**
59
59
  * Save task result in appropriate format(s)
60
60
  */
61
- save(taskId: string, taskType: TaskType, result: unknown, options?: SaveOptions): Promise<SavedResult>;
61
+ save(taskId: string, taskType: TaskType, taskResult: unknown, options?: SaveOptions): Promise<SavedResult>;
62
62
  private saveTestGeneration;
63
63
  private saveCoverage;
64
64
  private saveSecurityScan;