agentic-qe 3.15.12 → 3.15.13

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 (467) hide show
  1. package/.claude/skills/skills-manifest.json +1 -1
  2. package/CHANGELOG.md +118 -0
  3. package/assets/skills/skills-manifest.json +1 -1
  4. package/dist/cli/bundle.js +6 -6
  5. package/dist/cli/chunks/adapter-KCQDVYY2.js +2 -0
  6. package/dist/cli/chunks/{agent-booster-wasm-5VZCKTIJ.js → agent-booster-wasm-6RRQWMNE.js} +2 -2
  7. package/dist/cli/chunks/{agent-handler-K3C6CQCD.js → agent-handler-AOH6TV7W.js} +2 -2
  8. package/dist/cli/chunks/{agent-memory-branch-NVFQ25WS.js → agent-memory-branch-2P54SF5N.js} +2 -2
  9. package/dist/cli/chunks/aqe-learning-engine-SAQOHSGN.js +2 -0
  10. package/dist/cli/chunks/{arena-QGWIJADQ.js → arena-NSVFCAF5.js} +2 -2
  11. package/dist/cli/chunks/{arena-TSZVDSXS.js → arena-X6MOGQHA.js} +4 -4
  12. package/dist/cli/chunks/{audit-KIEE2SHJ.js → audit-27DJLQNM.js} +3 -3
  13. package/dist/cli/chunks/base-WCACU3FN.js +2 -0
  14. package/dist/cli/chunks/{better-sqlite3-BNB32NW3.js → better-sqlite3-BU5GXILS.js} +2 -2
  15. package/dist/cli/chunks/{brain-handler-MPC5SPYI.js → brain-handler-GTQNHHZS.js} +3 -3
  16. package/dist/cli/chunks/{branch-enumerator-LZ7UXKAY.js → branch-enumerator-5CLULOCU.js} +2 -2
  17. package/dist/cli/chunks/{browser-VDHAW4RK.js → browser-R4DMU3LN.js} +2 -2
  18. package/dist/cli/chunks/browser-workflow-G6IASEAP.js +2 -0
  19. package/dist/cli/chunks/{chunk-QUJJYTJH.js → chunk-2G7TVT6W.js} +2 -2
  20. package/dist/cli/chunks/{chunk-FAGKBOX2.js → chunk-32ZMWEP3.js} +2 -2
  21. package/dist/cli/chunks/{chunk-FNUFTWEO.js → chunk-3AN5TNGD.js} +3 -3
  22. package/dist/cli/chunks/{chunk-JOWUS2X5.js → chunk-3LJ7LQMV.js} +1 -1
  23. package/dist/cli/chunks/{chunk-O4QJMANM.js → chunk-3QZEGE67.js} +1 -1
  24. package/dist/cli/chunks/{chunk-ICKUINKD.js → chunk-3RZV5DGO.js} +2 -2
  25. package/dist/cli/chunks/{chunk-W4II6SIH.js → chunk-3Y2ROSCL.js} +2 -2
  26. package/dist/cli/chunks/{chunk-L7NGKANW.js → chunk-3Y7TJFHU.js} +2 -2
  27. package/dist/cli/chunks/{chunk-UUZZXHUF.js → chunk-3YNLWPBF.js} +2 -2
  28. package/dist/cli/chunks/{chunk-JR6CUKAI.js → chunk-42J34YG4.js} +2 -2
  29. package/dist/cli/chunks/{chunk-65TH6RPD.js → chunk-4OVC4RIL.js} +1 -1
  30. package/dist/cli/chunks/{chunk-DRCBRUGN.js → chunk-526QYFJU.js} +2 -2
  31. package/dist/cli/chunks/{chunk-MCPXNUDK.js → chunk-5FKWCZNF.js} +2 -2
  32. package/dist/cli/chunks/{chunk-NX4BCSOZ.js → chunk-5K26BEYB.js} +2 -2
  33. package/dist/cli/chunks/{chunk-MCPEC6OO.js → chunk-5MDERQH3.js} +1 -1
  34. package/dist/cli/chunks/{chunk-7JFDLL2F.js → chunk-5VMAV6T6.js} +1 -1
  35. package/dist/cli/chunks/{chunk-5TAEW5OV.js → chunk-5ZGM3RMH.js} +1 -1
  36. package/dist/cli/chunks/{chunk-SG2TX72G.js → chunk-6KATY3KS.js} +2 -2
  37. package/dist/cli/chunks/{chunk-KA5SHLMW.js → chunk-6Z7PRBSG.js} +2 -2
  38. package/dist/cli/chunks/{chunk-LFBA735S.js → chunk-72ASBE35.js} +3 -3
  39. package/dist/cli/chunks/{chunk-TOWOJGEI.js → chunk-756CGMEH.js} +1 -1
  40. package/dist/cli/chunks/{chunk-IVTQF55W.js → chunk-75RDHBAX.js} +3 -3
  41. package/dist/cli/chunks/{chunk-66PXR3NI.js → chunk-7CMTY45A.js} +2 -2
  42. package/dist/cli/chunks/{chunk-WLRU6ESI.js → chunk-7JUC2MVZ.js} +2 -2
  43. package/dist/cli/chunks/{chunk-SBHM5X2S.js → chunk-7NA7JXNB.js} +2 -2
  44. package/dist/cli/chunks/{chunk-HZBXJFGN.js → chunk-7PLIEBY7.js} +2 -2
  45. package/dist/cli/chunks/{chunk-2ASQRBK2.js → chunk-7YTGHGK4.js} +2 -2
  46. package/dist/cli/chunks/{chunk-SQVZ3TRU.js → chunk-A64JFBWI.js} +2 -2
  47. package/dist/cli/chunks/{chunk-2PPSS4JD.js → chunk-AL6FBH3E.js} +2 -2
  48. package/dist/cli/chunks/{chunk-3IU4LDZR.js → chunk-AQSVJNEH.js} +2 -2
  49. package/dist/cli/chunks/{chunk-C74M4WUI.js → chunk-ARJW4I2O.js} +2 -2
  50. package/dist/cli/chunks/{chunk-VF7FTD64.js → chunk-ASQYASNV.js} +1 -1
  51. package/dist/cli/chunks/{chunk-HLGFHHWV.js → chunk-BEGR4D6N.js} +2 -2
  52. package/dist/cli/chunks/{chunk-EN7GRVEQ.js → chunk-BK577VL7.js} +2 -2
  53. package/dist/cli/chunks/{chunk-KGA7VAI4.js → chunk-BLSLEVDI.js} +2 -2
  54. package/dist/cli/chunks/{chunk-HM3LSFTY.js → chunk-BTVEYBW2.js} +2 -2
  55. package/dist/cli/chunks/{chunk-J7Y7ZBIT.js → chunk-C6JTLKG7.js} +5 -5
  56. package/dist/cli/chunks/{chunk-PTBOLBM4.js → chunk-C7JM7CD3.js} +2 -2
  57. package/dist/cli/chunks/{chunk-IL7GQNNE.js → chunk-CCMKSHAT.js} +2 -2
  58. package/dist/cli/chunks/{chunk-23PQF7NN.js → chunk-CE7B5LU7.js} +1 -1
  59. package/dist/cli/chunks/{chunk-BMG2JLSQ.js → chunk-CM4LSLKR.js} +2 -2
  60. package/dist/cli/chunks/chunk-CRWPZT74.js +62 -0
  61. package/dist/cli/chunks/{chunk-4HWUECVD.js → chunk-CT6SAVXQ.js} +2 -2
  62. package/dist/cli/chunks/chunk-CV77DMDQ.js +2 -0
  63. package/dist/cli/chunks/{chunk-CU36D7TN.js → chunk-DFUASIKA.js} +2 -2
  64. package/dist/cli/chunks/{chunk-T4EN5VVK.js → chunk-DLD7RUZ4.js} +2 -2
  65. package/dist/cli/chunks/{chunk-IA55PFLG.js → chunk-DNDL7SOS.js} +2 -2
  66. package/dist/cli/chunks/{chunk-6QRI3JVE.js → chunk-DVGRPK7A.js} +2 -2
  67. package/dist/cli/chunks/{chunk-UREDS662.js → chunk-E56B6IDX.js} +2 -2
  68. package/dist/cli/chunks/{chunk-ZGROHCOW.js → chunk-E7CLYGS7.js} +1 -1
  69. package/dist/cli/chunks/{chunk-YNVEDFPQ.js → chunk-EXGMJFAT.js} +1 -1
  70. package/dist/cli/chunks/{chunk-JRYWLOBD.js → chunk-F3YS57NF.js} +2 -2
  71. package/dist/cli/chunks/{chunk-ZYOYR3UR.js → chunk-FZ76G4QJ.js} +1 -1
  72. package/dist/cli/chunks/{chunk-UIKQPO4Y.js → chunk-G2Q66Z23.js} +2 -2
  73. package/dist/cli/chunks/{chunk-5S4UIDFK.js → chunk-G6WDYBLQ.js} +1 -1
  74. package/dist/cli/chunks/{chunk-4SA7M34P.js → chunk-G77ERMUD.js} +1 -1
  75. package/dist/cli/chunks/{chunk-ADUAJIAU.js → chunk-GB6HBNH2.js} +2 -2
  76. package/dist/cli/chunks/{chunk-IETBWYHW.js → chunk-GHM6MQNK.js} +2 -2
  77. package/dist/cli/chunks/{chunk-QWG3SILX.js → chunk-GHY6Z6KO.js} +5 -5
  78. package/dist/cli/chunks/{chunk-AJEXPFAB.js → chunk-GII6UM3F.js} +1 -1
  79. package/dist/cli/chunks/{chunk-SDRJJUPO.js → chunk-GU5HNCWI.js} +1 -1
  80. package/dist/cli/chunks/{chunk-ULCW6IVQ.js → chunk-H4GG2NLO.js} +2 -2
  81. package/dist/cli/chunks/{chunk-7TA5MUPW.js → chunk-H4H2YSFH.js} +1 -1
  82. package/dist/cli/chunks/{chunk-5A66EGEW.js → chunk-HD7YIFOI.js} +2 -2
  83. package/dist/cli/chunks/{chunk-CDA5Z74H.js → chunk-HOAJUIBQ.js} +2 -2
  84. package/dist/cli/chunks/{chunk-4KUOYDY2.js → chunk-HQZGPJYG.js} +2 -2
  85. package/dist/cli/chunks/{chunk-G3AABG4Q.js → chunk-HZ5NXFXH.js} +2 -2
  86. package/dist/cli/chunks/{chunk-U6IXYQO4.js → chunk-I3C7JOXC.js} +2 -2
  87. package/dist/cli/chunks/{chunk-MAJXZYGK.js → chunk-IC3TQEOA.js} +1 -1
  88. package/dist/cli/chunks/{chunk-RYHG3I7J.js → chunk-IJUHSJ2U.js} +2 -2
  89. package/dist/cli/chunks/{chunk-DZGPUGUG.js → chunk-J2ZIFFM6.js} +2 -2
  90. package/dist/cli/chunks/{chunk-NA3F6FEO.js → chunk-JGZ722G3.js} +2 -2
  91. package/dist/cli/chunks/{chunk-PX5OPXY6.js → chunk-JQGMW45H.js} +1 -1
  92. package/dist/cli/chunks/{chunk-WGTEZT7G.js → chunk-JRRXCODW.js} +2 -2
  93. package/dist/cli/chunks/{chunk-4Y6OEBJZ.js → chunk-K3TLLJMX.js} +1 -1
  94. package/dist/cli/chunks/{chunk-RCOLPF3B.js → chunk-K4CZA77U.js} +2 -2
  95. package/dist/cli/chunks/{chunk-YIDAXOUX.js → chunk-K65CGKLD.js} +2 -2
  96. package/dist/cli/chunks/{chunk-5ADXFUMO.js → chunk-KADFXPPN.js} +2 -2
  97. package/dist/cli/chunks/{chunk-P5E26N2X.js → chunk-KB56CPU4.js} +2 -2
  98. package/dist/cli/chunks/{chunk-YLKIXEPP.js → chunk-KCW47QR5.js} +1 -1
  99. package/dist/cli/chunks/{chunk-SPC4RBLF.js → chunk-KDNJ4F3P.js} +2 -2
  100. package/dist/cli/chunks/{chunk-P7UFJ6DO.js → chunk-KDVZND5Q.js} +1 -1
  101. package/dist/cli/chunks/{chunk-TLRHAMX5.js → chunk-KUAKV3IW.js} +1 -1
  102. package/dist/cli/chunks/{chunk-ZROAMFX2.js → chunk-KV4T4MXK.js} +2 -2
  103. package/dist/cli/chunks/{chunk-UZED4YZ5.js → chunk-KWYH3FI4.js} +1 -1
  104. package/dist/cli/chunks/{chunk-33I2ZP6E.js → chunk-LFJALJOA.js} +2 -2
  105. package/dist/cli/chunks/{chunk-TXEUVUMO.js → chunk-LL7LDPXS.js} +1 -1
  106. package/dist/cli/chunks/{chunk-W5HQIYQU.js → chunk-LUZNKJE6.js} +3 -3
  107. package/dist/cli/chunks/{chunk-GKFV6CUD.js → chunk-LWR3FV3Y.js} +2 -2
  108. package/dist/cli/chunks/{chunk-TVA5GRIU.js → chunk-LZYQHVD4.js} +2 -2
  109. package/dist/cli/chunks/{chunk-2JYUA27M.js → chunk-M6AAGIG7.js} +1 -1
  110. package/dist/cli/chunks/{chunk-PT2NXS43.js → chunk-MAMQA43L.js} +1 -1
  111. package/dist/cli/chunks/chunk-MB46UBGY.js +3 -0
  112. package/dist/cli/chunks/{chunk-ZPVGX4DI.js → chunk-MFW5HSG4.js} +2 -2
  113. package/dist/cli/chunks/{chunk-47RMGDG4.js → chunk-MGZ5FJUW.js} +2 -2
  114. package/dist/cli/chunks/{chunk-G24SWTAX.js → chunk-MVVB7C2E.js} +410 -410
  115. package/dist/cli/chunks/{chunk-XZOYKB22.js → chunk-N4CYAKOX.js} +2 -2
  116. package/dist/cli/chunks/{chunk-QCPVUNN3.js → chunk-NT4DBXSX.js} +2 -2
  117. package/dist/cli/chunks/{chunk-3EWQN37E.js → chunk-NU3W5WFT.js} +2 -2
  118. package/dist/cli/chunks/{chunk-VZBC6DP7.js → chunk-NURIILUB.js} +1 -1
  119. package/dist/cli/chunks/{chunk-6E6HB4N4.js → chunk-NW7IBHJA.js} +4 -4
  120. package/dist/cli/chunks/{chunk-K3A3NWT3.js → chunk-NZ3GUMB2.js} +2 -2
  121. package/dist/cli/chunks/{chunk-GJKZ7UQO.js → chunk-NZD4DPSU.js} +2 -2
  122. package/dist/cli/chunks/{chunk-7QEUHNKO.js → chunk-O6FGXMHD.js} +1 -1
  123. package/dist/cli/chunks/{chunk-YVJEUX3I.js → chunk-OCAEXYFA.js} +2 -2
  124. package/dist/cli/chunks/{chunk-BOSMELJX.js → chunk-OFACHK5O.js} +2 -2
  125. package/dist/cli/chunks/{chunk-PGSJBXTD.js → chunk-P7A4NKTZ.js} +2 -2
  126. package/dist/cli/chunks/{chunk-HSA5IGGW.js → chunk-PB6J6HAA.js} +2 -2
  127. package/dist/cli/chunks/{chunk-TGMXUZZC.js → chunk-PHP5UBT4.js} +2 -2
  128. package/dist/cli/chunks/{chunk-NV74SICL.js → chunk-PIDQVU3L.js} +2 -2
  129. package/dist/cli/chunks/{chunk-TSOQ2QLT.js → chunk-PSFSPGUD.js} +2 -2
  130. package/dist/cli/chunks/{chunk-4A76VPU4.js → chunk-PT4FMJPQ.js} +2 -2
  131. package/dist/cli/chunks/{chunk-U7ZHDGXG.js → chunk-Q3UDLV5Z.js} +1 -1
  132. package/dist/cli/chunks/{chunk-BYRCB5JT.js → chunk-QDEJ4CI2.js} +2 -2
  133. package/dist/cli/chunks/{chunk-CA5UNWQF.js → chunk-QPNG5ZN2.js} +2 -2
  134. package/dist/cli/chunks/{chunk-W7H55PY4.js → chunk-R7SYRCRP.js} +1 -1
  135. package/dist/cli/chunks/{chunk-4LWMAAWK.js → chunk-RF7HWBHN.js} +2 -2
  136. package/dist/cli/chunks/{chunk-MMEALJ4D.js → chunk-RFNW2LGD.js} +2 -2
  137. package/dist/cli/chunks/{chunk-UCSK2RMI.js → chunk-S5AZCIZS.js} +2 -2
  138. package/dist/cli/chunks/{chunk-JW5PDJ5O.js → chunk-SE4VNN4I.js} +3 -3
  139. package/dist/cli/chunks/{chunk-URSTP3WI.js → chunk-SG3NX7QE.js} +2 -2
  140. package/dist/cli/chunks/{chunk-N7O3PF6Y.js → chunk-SSU73QAX.js} +2 -2
  141. package/dist/cli/chunks/{chunk-7DNR4KKR.js → chunk-SVLQRAMF.js} +1 -1
  142. package/dist/cli/chunks/{chunk-BC4T6SCV.js → chunk-SYV2V3PL.js} +4 -4
  143. package/dist/cli/chunks/{chunk-4CB3QPZM.js → chunk-T3PGQFDI.js} +2 -2
  144. package/dist/cli/chunks/{chunk-OHVYINGM.js → chunk-TCBBNUBP.js} +3 -3
  145. package/dist/cli/chunks/{chunk-YWWMNTBF.js → chunk-TOQWL2ZF.js} +2 -2
  146. package/dist/cli/chunks/{chunk-SITL5YZV.js → chunk-TSQC2KKZ.js} +2 -2
  147. package/dist/cli/chunks/{chunk-YUA6ZKKY.js → chunk-TWDW32W2.js} +2 -2
  148. package/dist/cli/chunks/{chunk-SUX5XB2Z.js → chunk-TWJTK4CC.js} +2 -2
  149. package/dist/cli/chunks/{chunk-32UTHIY5.js → chunk-U2FUXDDJ.js} +3 -3
  150. package/dist/cli/chunks/{chunk-ENGL7FIJ.js → chunk-UDQSYWVF.js} +1 -1
  151. package/dist/cli/chunks/{chunk-7OEFBWAG.js → chunk-UOC3O6RP.js} +2 -2
  152. package/dist/cli/chunks/chunk-UT2VZ33P.js +2 -0
  153. package/dist/cli/chunks/{chunk-MYF5CNGV.js → chunk-UTRV7T2N.js} +2 -2
  154. package/dist/cli/chunks/{chunk-KJDI5CHX.js → chunk-UXZSUMEA.js} +2 -2
  155. package/dist/cli/chunks/{chunk-DAUEK66C.js → chunk-VRHRBAEM.js} +1 -1
  156. package/dist/cli/chunks/{chunk-FZJCBSN4.js → chunk-VRVMIPTM.js} +2 -2
  157. package/dist/cli/chunks/{chunk-26672ISV.js → chunk-VTDFVFST.js} +2 -2
  158. package/dist/cli/chunks/{chunk-WTAUF6O4.js → chunk-VTOBUZL6.js} +2 -2
  159. package/dist/cli/chunks/{chunk-4PU5GTZW.js → chunk-VU5TBX2V.js} +2 -2
  160. package/dist/cli/chunks/{chunk-C3YOVASQ.js → chunk-W26B7ERY.js} +1 -1
  161. package/dist/cli/chunks/{chunk-CPIBIR3X.js → chunk-W2QWSQVE.js} +2 -2
  162. package/dist/cli/chunks/{chunk-L3PV7VXK.js → chunk-W3INMZZ6.js} +1 -1
  163. package/dist/cli/chunks/{chunk-5Z23ZMXZ.js → chunk-W3PPFHI5.js} +54 -54
  164. package/dist/cli/chunks/{chunk-NVRYELCY.js → chunk-WKGTGOYS.js} +3 -3
  165. package/dist/cli/chunks/{chunk-35NW676P.js → chunk-WNQS4WTS.js} +2 -2
  166. package/dist/cli/chunks/{chunk-O3IM4WRZ.js → chunk-WO274FRI.js} +2 -2
  167. package/dist/cli/chunks/{chunk-35MIUSXQ.js → chunk-WOCGL4QP.js} +2 -2
  168. package/dist/cli/chunks/{chunk-EF6OERRR.js → chunk-WQL7WCIZ.js} +1 -1
  169. package/dist/cli/chunks/{chunk-INZARYUD.js → chunk-X2Z7F4EU.js} +2 -2
  170. package/dist/cli/chunks/{chunk-2E2QO44T.js → chunk-X7N2JF2X.js} +2 -2
  171. package/dist/cli/chunks/{chunk-2IVE5AR3.js → chunk-XEAEYC6Y.js} +1 -1
  172. package/dist/cli/chunks/{chunk-IPA7K556.js → chunk-XNBOGCF3.js} +2 -2
  173. package/dist/cli/chunks/{chunk-A2JCRXTK.js → chunk-XPRVF4YE.js} +2 -2
  174. package/dist/cli/chunks/{chunk-VUR5THML.js → chunk-YBQH2VOP.js} +2 -2
  175. package/dist/cli/chunks/{chunk-A5Y7DAVQ.js → chunk-YQFLQE53.js} +2 -2
  176. package/dist/cli/chunks/{chunk-JGIJPDGD.js → chunk-YSZ5OE3Z.js} +2 -2
  177. package/dist/cli/chunks/{chunk-JNXK47OL.js → chunk-YXRASAPI.js} +2 -2
  178. package/dist/cli/chunks/{chunk-MYUMJ2ZI.js → chunk-YZEXYO4W.js} +1 -1
  179. package/dist/cli/chunks/{chunk-NNBQZR73.js → chunk-YZWBNBTW.js} +2 -2
  180. package/dist/cli/chunks/{chunk-WDEXOLK2.js → chunk-ZAKQLAHT.js} +1 -1
  181. package/dist/cli/chunks/{ci-BZNWW3I3.js → ci-ENOASTYB.js} +2 -2
  182. package/dist/cli/chunks/{ci-config-LOHNXOKV.js → ci-config-B26OXHQM.js} +2 -2
  183. package/dist/cli/chunks/{ci-output-LCOQBSJL.js → ci-output-JTCLLNOQ.js} +2 -2
  184. package/dist/cli/chunks/{circuit-breaker-7LRXTLFE.js → circuit-breaker-23JMFNM5.js} +2 -2
  185. package/dist/cli/chunks/{claude-flow-setup-HBU4VWC3.js → claude-flow-setup-ON6L462G.js} +2 -2
  186. package/dist/cli/chunks/client-TV3V2YZ5.js +2 -0
  187. package/dist/cli/chunks/{cline-installer-CO6MLH6X.js → cline-installer-OWQ4D2FQ.js} +2 -2
  188. package/dist/cli/chunks/{code-SIXBS6JM.js → code-2ZRL7SEU.js} +19 -18
  189. package/dist/cli/chunks/{code-index-extractor-GWJKZ2IQ.js → code-index-extractor-JXSQVM67.js} +2 -2
  190. package/dist/cli/chunks/{codex-installer-6NINVWXJ.js → codex-installer-7LXZYBSQ.js} +2 -2
  191. package/dist/cli/chunks/{completions-7VIX3GML.js → completions-C2LR623C.js} +2 -2
  192. package/dist/cli/chunks/{complexity-analyzer-FBQR6ZP2.js → complexity-analyzer-TGQLHCYJ.js} +2 -2
  193. package/dist/cli/chunks/{continuedev-installer-VA7RIXW5.js → continuedev-installer-RUGD24D2.js} +2 -2
  194. package/dist/cli/chunks/{copilot-installer-4QEBC4MU.js → copilot-installer-ZLFVLEJP.js} +2 -2
  195. package/dist/cli/chunks/core-handlers-PZT4OLWR.js +2 -0
  196. package/dist/cli/chunks/{cost-tracker-GRYKHPWL.js → cost-tracker-RT4QL745.js} +2 -2
  197. package/dist/cli/chunks/{coverage-USPMNKOU.js → coverage-NV3C4IMM.js} +3 -3
  198. package/dist/cli/chunks/cross-domain-router-QOFCZ7G4.js +2 -0
  199. package/dist/cli/chunks/{cursor-installer-ZXIPSZVH.js → cursor-installer-LJKLNFF6.js} +2 -2
  200. package/dist/cli/chunks/{daemon-D7F3RGI5.js → daemon-BMDXCQT5.js} +3 -3
  201. package/dist/cli/chunks/{daemon-N2VRHPSJ.js → daemon-FBH3IRYN.js} +4 -4
  202. package/dist/cli/chunks/{dag-attention-scheduler-NL6BA7BY.js → dag-attention-scheduler-JGDED55I.js} +2 -2
  203. package/dist/cli/chunks/{detect-XC2HCIIT.js → detect-SZIHIVCJ.js} +2 -2
  204. package/dist/cli/chunks/{dist-node-A3Y26MEI.js → dist-node-FV3KWXQ6.js} +2 -2
  205. package/dist/cli/chunks/{domain-handler-WV6SFXRB.js → domain-handler-GI5JWQOV.js} +2 -2
  206. package/dist/cli/chunks/{domain-plugins-KJIF6Z2B.js → domain-plugins-BUWY36TL.js} +2 -2
  207. package/dist/cli/chunks/domain-transfer-GCY7W5DA.js +2 -0
  208. package/dist/cli/chunks/dream-TRFBGDSQ.js +2 -0
  209. package/dist/cli/chunks/{embed-and-insert-pattern-PA3Y4KGO.js → embed-and-insert-pattern-GPRR3ZGD.js} +2 -2
  210. package/dist/cli/chunks/{eval-YGEZNUVE.js → eval-XPB3IGAP.js} +2 -2
  211. package/dist/cli/chunks/{experience-capture-middleware-D4T7NW6B.js → experience-capture-middleware-2E554UB3.js} +3 -3
  212. package/dist/cli/chunks/{fast-paths-6JYK7RYQ.js → fast-paths-ZSMWZPUC.js} +2 -2
  213. package/dist/cli/chunks/{feature-flags-RBH2GDSR.js → feature-flags-GIWVDVVC.js} +2 -2
  214. package/dist/cli/chunks/{feature-flags-DKXMDVPE.js → feature-flags-N7EOGE5P.js} +2 -2
  215. package/dist/cli/chunks/file-discovery-WCKGMSPZ.js +2 -0
  216. package/dist/cli/chunks/fleet-HCHDOUCX.js +44 -0
  217. package/dist/cli/chunks/{gnn-wrapper-MV54UC4C.js → gnn-wrapper-CZNCNXXZ.js} +2 -2
  218. package/dist/cli/chunks/{heartbeat-handler-7DKMVQQH.js → heartbeat-handler-6YUIF2YQ.js} +4 -4
  219. package/dist/cli/chunks/heartbeat-scheduler-P44A2OX3.js +2 -0
  220. package/dist/cli/chunks/hnsw-adapter-ZJQIQJKC.js +2 -0
  221. package/dist/cli/chunks/hnsw-index-HMG2GH3Z.js +2 -0
  222. package/dist/cli/chunks/{hnsw-legacy-bridge-6IWREDQC.js → hnsw-legacy-bridge-J3M3IK24.js} +2 -2
  223. package/dist/cli/chunks/{hnswlib-node-5BIESSCK.js → hnswlib-node-ULGTGDZW.js} +2 -2
  224. package/dist/cli/chunks/{hooks-3EETRM62.js → hooks-C4BUGYUQ.js} +10 -10
  225. package/dist/cli/chunks/hybrid-backend-B7M74PZG.js +2 -0
  226. package/dist/cli/chunks/{hypergraph-engine-RSWCB2D3.js → hypergraph-engine-WINGVMPG.js} +2 -2
  227. package/dist/cli/chunks/{hypergraph-handler-552LXKL3.js → hypergraph-handler-GADMWKAU.js} +3 -3
  228. package/dist/cli/chunks/impact-analyzer-PZYOVKQO.js +2 -0
  229. package/dist/cli/chunks/{init-guard-OTDBJ5HD.js → init-guard-K2T4QWAO.js} +2 -2
  230. package/dist/cli/chunks/{init-handler-3FK3TKEA.js → init-handler-PCZTDZYI.js} +6 -6
  231. package/dist/cli/chunks/init-wizard-TZDJQK3U.js +2 -0
  232. package/dist/cli/chunks/kernel-Y6RRIOKW.js +2 -0
  233. package/dist/cli/chunks/{kilocode-installer-KZ2O4LF3.js → kilocode-installer-XENXNEIU.js} +2 -2
  234. package/dist/cli/chunks/{kiro-installer-MLCCXRF7.js → kiro-installer-3PG2TJ67.js} +2 -2
  235. package/dist/cli/chunks/knowledge-graph-BVD5Z66M.js +2 -0
  236. package/dist/cli/chunks/{learning-QUCMBD77.js → learning-6KDH7FK4.js} +3 -3
  237. package/dist/cli/chunks/{llm-router-PDEV3UP2.js → llm-router-RKVDEWU2.js} +4 -4
  238. package/dist/cli/chunks/llm-router-service-KHCAMSUU.js +2 -0
  239. package/dist/cli/chunks/{load-XFVVLO7E.js → load-ITHC564X.js} +2 -2
  240. package/dist/cli/chunks/load-test-RUF7DZA5.js +2 -0
  241. package/dist/cli/chunks/{mcp-74G3CL2S.js → mcp-TCL5UW3N.js} +2 -2
  242. package/dist/cli/chunks/{memory-XIFM6JNX.js → memory-BKDAY2N2.js} +5 -5
  243. package/dist/cli/chunks/memory-backend-7ZLFOVGG.js +2 -0
  244. package/dist/cli/chunks/{memory-handlers-ZCKURV6S.js → memory-handlers-WN4FXFOA.js} +2 -2
  245. package/dist/cli/chunks/{multi-model-executor-7L4W3O2Q.js → multi-model-executor-VHAT7ZPF.js} +2 -2
  246. package/dist/cli/chunks/{opencode-installer-BPG422LF.js → opencode-installer-E3VM3EEY.js} +2 -2
  247. package/dist/cli/chunks/{orchestrator-OEAFLAEV.js → orchestrator-BMQ6X762.js} +5 -5
  248. package/dist/cli/chunks/pattern-null-store-RY6CVYHP.js +2 -0
  249. package/dist/cli/chunks/{pattern-usage-recorder-LOPNCULT.js → pattern-usage-recorder-GOOR2BV5.js} +2 -2
  250. package/dist/cli/chunks/{pipeline-VWTYUZB7.js → pipeline-5NSFQQIX.js} +2 -2
  251. package/dist/cli/chunks/{platform-WFJJ3X2E.js → platform-SQM34J5G.js} +2 -2
  252. package/dist/cli/chunks/{plugin-744TPUSG.js → plugin-UQJZRMZG.js} +2 -2
  253. package/dist/cli/chunks/{prime-radiant-advanced-wasm-BD5BLNDR.js → prime-radiant-advanced-wasm-WMDJOL4S.js} +2 -2
  254. package/dist/cli/chunks/project-root-IO5KRNGL.js +2 -0
  255. package/dist/cli/chunks/protocol-executor-U2CUDWDE.js +2 -0
  256. package/dist/cli/chunks/{protocol-handler-JIBILI74.js → protocol-handler-OBDCVY6X.js} +2 -2
  257. package/dist/cli/chunks/{prove-MNOL5FYW.js → prove-XDC7I4XT.js} +2 -2
  258. package/dist/cli/chunks/qe-reasoning-bank-DQSSX2IP.js +2 -0
  259. package/dist/cli/chunks/{quality-JEGBDGGX.js → quality-L4GQ6WX4.js} +2 -2
  260. package/dist/cli/chunks/{quality-gate-SYJ6ROMI.js → quality-gate-MJG66LKN.js} +3 -3
  261. package/dist/cli/chunks/queen-coordinator-6FN4BZIX.js +2 -0
  262. package/dist/cli/chunks/{real-embeddings-ZWXS5ZFV.js → real-embeddings-HW4G2LWL.js} +2 -2
  263. package/dist/cli/chunks/{ref-validation-RRHUFW2N.js → ref-validation-FC7JOJ2C.js} +2 -2
  264. package/dist/cli/chunks/{roocode-installer-XFO6JSVN.js → roocode-installer-KWS4CEIC.js} +2 -2
  265. package/dist/cli/chunks/router-YUO3I7RU.js +2 -0
  266. package/dist/cli/chunks/routing-feedback-36SLQGJE.js +2 -0
  267. package/dist/cli/chunks/{routing-handler-L2K3JASE.js → routing-handler-QF4WVB2S.js} +2 -2
  268. package/dist/cli/chunks/{ruvector-commands-A6CINHGM.js → ruvector-commands-2MTCOUK6.js} +2 -2
  269. package/dist/cli/chunks/rvf-dual-writer-FRYZH3WZ.js +2 -0
  270. package/dist/cli/chunks/rvf-migration-adapter-XXNITL5I.js +2 -0
  271. package/dist/cli/chunks/{rvf-migration-coordinator-T4RY7L53.js → rvf-migration-coordinator-BREJCXWN.js} +2 -2
  272. package/dist/cli/chunks/rvf-native-adapter-D2WWKJIV.js +2 -0
  273. package/dist/cli/chunks/{rvf-store-integrity-IR33TGQS.js → rvf-store-integrity-KKC6HOJD.js} +2 -2
  274. package/dist/cli/chunks/safe-db-4RRIGRXD.js +2 -0
  275. package/dist/cli/chunks/schedule-25RTO4DQ.js +2 -0
  276. package/dist/cli/chunks/scheduler-BPIOJZ5P.js +2 -0
  277. package/dist/cli/chunks/{security-Z5GDE2IH.js → security-OSAE7VAP.js} +3 -3
  278. package/dist/cli/chunks/{shared-rvf-adapter-SIZMEHPM.js → shared-rvf-adapter-COUOS665.js} +2 -2
  279. package/dist/cli/chunks/{shared-rvf-dual-writer-HLM65RDS.js → shared-rvf-dual-writer-YXMPZKQE.js} +2 -2
  280. package/dist/cli/chunks/sqlite-persistence-EDF47DDX.js +2 -0
  281. package/dist/cli/chunks/{standalone-memory-SKSZG7P5.js → standalone-memory-E6JBMOIL.js} +2 -2
  282. package/dist/cli/chunks/{status-handler-766YOOMJ.js → status-handler-AFTCIYIX.js} +2 -2
  283. package/dist/cli/chunks/{structural-health-M45FNOLT.js → structural-health-2FROCEI4.js} +2 -2
  284. package/dist/cli/chunks/{sync-B2U366I3.js → sync-VAYTOWDC.js} +2 -2
  285. package/dist/cli/chunks/{sync-6CJ24B5T.js → sync-YIQYOFGW.js} +2 -2
  286. package/dist/cli/chunks/task-handler-KVQHDEX3.js +62 -0
  287. package/dist/cli/chunks/task-handlers-MVVECQA6.js +9 -0
  288. package/dist/cli/chunks/{test-TODH7KRF.js → test-5JSVTOMY.js} +4 -4
  289. package/dist/cli/chunks/test-runner-process-LEPF2OSS.js +2 -0
  290. package/dist/cli/chunks/{test-scheduling-VMVMVRHT.js → test-scheduling-HBOHVLI3.js} +3 -3
  291. package/dist/cli/chunks/{token-bootstrap-XQW7BMCK.js → token-bootstrap-5VEPTPFA.js} +2 -2
  292. package/dist/cli/chunks/{token-usage-JCZEIRKO.js → token-usage-TBJHDLY6.js} +2 -2
  293. package/dist/cli/chunks/{transformers-U2ML3OHE.js → transformers-VAWYMHMZ.js} +2 -2
  294. package/dist/cli/chunks/tree-sitter-wasm-parser-TSZTCMFV.js +2 -0
  295. package/dist/cli/chunks/{types-GGEPCHP6.js → types-R5SDZU2E.js} +2 -2
  296. package/dist/cli/chunks/unified-memory-TLGSSLMI.js +2 -0
  297. package/dist/cli/chunks/unified-memory-hnsw-MSUR7ZOO.js +2 -0
  298. package/dist/cli/chunks/unified-persistence-VFFOTWK7.js +2 -0
  299. package/dist/cli/chunks/{upgrade-T5GRM7HS.js → upgrade-K5PIHXRB.js} +2 -2
  300. package/dist/cli/chunks/{validate-XMUJPLP3.js → validate-RPTS7RYJ.js} +2 -2
  301. package/dist/cli/chunks/{validate-swarm-KJLF7JEH.js → validate-swarm-B2ZL556X.js} +2 -2
  302. package/dist/cli/chunks/visual-security-6Q44XNLB.js +2 -0
  303. package/dist/cli/chunks/{web-tree-sitter-LOHVZ7G5.js → web-tree-sitter-K4DUJC32.js} +2 -2
  304. package/dist/cli/chunks/{windsurf-installer-33FBTXJU.js → windsurf-installer-OK2AJN35.js} +2 -2
  305. package/dist/cli/chunks/witness-chain-KDOMXDQX.js +2 -0
  306. package/dist/cli/chunks/witness-chain-N3OY2RMH.js +2 -0
  307. package/dist/cli/chunks/{witness-chain-repair-VWBO4NXE.js → witness-chain-repair-L6Y5RFXR.js} +2 -2
  308. package/dist/cli/chunks/{witness-chain-verifier-BHJ3ZAEK.js → witness-chain-verifier-N4CW7FZX.js} +2 -2
  309. package/dist/cli/chunks/{witness-key-manager-WNVPH2Z3.js → witness-key-manager-TDNPS3WD.js} +2 -2
  310. package/dist/cli/chunks/{workflow-6QR5MQTO.js → workflow-XRZA3YCY.js} +4 -4
  311. package/dist/cli/chunks/workflow-orchestrator-CVNNT2RJ.js +2 -0
  312. package/dist/cli/chunks/{wrappers-EHOL62TS.js → wrappers-5JIFWKN6.js} +2 -2
  313. package/dist/cli/commands/code.js +6 -0
  314. package/dist/cli/commands/fleet-run.d.ts +12 -0
  315. package/dist/cli/commands/fleet-run.js +175 -0
  316. package/dist/cli/commands/fleet.js +2 -117
  317. package/dist/cli/handlers/task-handler.d.ts +5 -0
  318. package/dist/cli/handlers/task-handler.js +20 -0
  319. package/dist/cli/utils/fleet-operation.d.ts +5 -2
  320. package/dist/cli/utils/fleet-operation.js +13 -2
  321. package/dist/cli/utils/fleet-result.d.ts +16 -2
  322. package/dist/cli/utils/fleet-result.js +26 -21
  323. package/dist/cli/utils/fleet-shard.d.ts +36 -0
  324. package/dist/cli/utils/fleet-shard.js +110 -0
  325. package/dist/coordination/handlers/code-intelligence-handlers.js +21 -1
  326. package/dist/coordination/handlers/handler-types.d.ts +2 -2
  327. package/dist/coordination/handlers/handler-utils.d.ts +6 -0
  328. package/dist/coordination/handlers/handler-utils.js +14 -4
  329. package/dist/coordination/handlers/misc-handlers.js +5 -2
  330. package/dist/coordination/handlers/quality-handlers.js +2 -2
  331. package/dist/coordination/handlers/security-handlers.js +12 -2
  332. package/dist/coordination/protocols/security-audit.js +11 -1
  333. package/dist/coordination/task-executor.js +7 -2
  334. package/dist/domains/code-intelligence/coordinator-gnn.d.ts +2 -16
  335. package/dist/domains/code-intelligence/coordinator-gnn.js +1 -62
  336. package/dist/domains/code-intelligence/coordinator.d.ts +12 -6
  337. package/dist/domains/code-intelligence/coordinator.js +24 -27
  338. package/dist/domains/code-intelligence/interfaces.d.ts +9 -0
  339. package/dist/domains/code-intelligence/services/semantic-analyzer.d.ts +43 -5
  340. package/dist/domains/code-intelligence/services/semantic-analyzer.js +134 -71
  341. package/dist/domains/coverage-analysis/collected-metrics.d.ts +10 -0
  342. package/dist/domains/coverage-analysis/collected-metrics.js +29 -0
  343. package/dist/domains/coverage-analysis/services/coverage-analyzer.js +11 -3
  344. package/dist/domains/coverage-analysis/services/coverage-parser.d.ts +2 -0
  345. package/dist/domains/coverage-analysis/services/coverage-parser.js +18 -2
  346. package/dist/domains/quality-assessment/coherence/gate-controller.js +16 -4
  347. package/dist/domains/quality-assessment/coherence/lambda-calculator.d.ts +8 -0
  348. package/dist/domains/quality-assessment/coherence/lambda-calculator.js +57 -14
  349. package/dist/domains/quality-assessment/coherence/types.d.ts +12 -7
  350. package/dist/domains/quality-assessment/coordinator-gate-evaluation.js +3 -1
  351. package/dist/domains/quality-assessment/coordinator-reports.d.ts +30 -10
  352. package/dist/domains/quality-assessment/coordinator-reports.js +93 -57
  353. package/dist/domains/quality-assessment/coordinator.d.ts +14 -40
  354. package/dist/domains/quality-assessment/coordinator.js +10 -4
  355. package/dist/domains/quality-assessment/interfaces.d.ts +2 -0
  356. package/dist/domains/quality-assessment/services/coherence-gate.js +15 -2
  357. package/dist/domains/quality-assessment/services/quality-gate.js +6 -4
  358. package/dist/domains/security-compliance/index.d.ts +1 -1
  359. package/dist/domains/security-compliance/interfaces.d.ts +46 -5
  360. package/dist/domains/security-compliance/services/scanners/dast-auth-testing.d.ts +3 -3
  361. package/dist/domains/security-compliance/services/scanners/dast-auth-testing.js +15 -14
  362. package/dist/domains/security-compliance/services/scanners/dast-helpers.d.ts +8 -9
  363. package/dist/domains/security-compliance/services/scanners/dast-helpers.js +19 -44
  364. package/dist/domains/security-compliance/services/scanners/dast-injection-testing.d.ts +3 -3
  365. package/dist/domains/security-compliance/services/scanners/dast-injection-testing.js +13 -9
  366. package/dist/domains/security-compliance/services/scanners/dast-requests.d.ts +54 -0
  367. package/dist/domains/security-compliance/services/scanners/dast-requests.js +125 -0
  368. package/dist/domains/security-compliance/services/scanners/dast-scanner.d.ts +5 -1
  369. package/dist/domains/security-compliance/services/scanners/dast-scanner.js +125 -155
  370. package/dist/domains/security-compliance/services/scanners/index.d.ts +1 -1
  371. package/dist/domains/security-compliance/services/scanners/index.js +1 -1
  372. package/dist/domains/security-compliance/services/scanners/scanner-types.d.ts +2 -2
  373. package/dist/domains/security-compliance/services/security-auditor-dast.js +183 -212
  374. package/dist/domains/security-compliance/services/security-auditor-reports.js +5 -1
  375. package/dist/domains/security-compliance/services/security-auditor.d.ts +11 -3
  376. package/dist/domains/security-compliance/services/security-auditor.js +106 -65
  377. package/dist/domains/test-execution/coordinator.d.ts +2 -1
  378. package/dist/domains/test-execution/coordinator.js +33 -27
  379. package/dist/domains/test-execution/interfaces.d.ts +5 -0
  380. package/dist/domains/test-execution/services/test-executor.d.ts +6 -0
  381. package/dist/domains/test-execution/services/test-executor.js +16 -4
  382. package/dist/domains/visual-accessibility/coordinator.js +34 -9
  383. package/dist/domains/visual-accessibility/interfaces.d.ts +27 -0
  384. package/dist/domains/visual-accessibility/plugin.js +5 -0
  385. package/dist/domains/visual-accessibility/services/accessibility-tester-heuristics.d.ts +13 -21
  386. package/dist/domains/visual-accessibility/services/accessibility-tester-heuristics.js +13 -297
  387. package/dist/domains/visual-accessibility/services/accessibility-tester.d.ts +13 -5
  388. package/dist/domains/visual-accessibility/services/accessibility-tester.js +96 -73
  389. package/dist/integrations/embeddings/index/HNSWIndex.js +8 -4
  390. package/dist/integrations/ruvector/transfer-coherence-stub.js +5 -10
  391. package/dist/mcp/bundle.js +480 -480
  392. package/dist/mcp/handlers/domain-handler-configs.d.ts +8 -0
  393. package/dist/mcp/handlers/domain-handler-configs.js +9 -2
  394. package/dist/mcp/handlers/handler-factory.js +3 -0
  395. package/dist/mcp/handlers/model-route-handlers.d.ts +107 -0
  396. package/dist/mcp/handlers/model-route-handlers.js +139 -0
  397. package/dist/mcp/handlers/orchestrate-routes.js +41 -3
  398. package/dist/mcp/handlers/task-handlers.d.ts +3 -251
  399. package/dist/mcp/handlers/task-handlers.js +6 -828
  400. package/dist/mcp/handlers/task-inference.d.ts +26 -0
  401. package/dist/mcp/handlers/task-inference.js +156 -0
  402. package/dist/mcp/handlers/task-learning-handlers.d.ts +92 -0
  403. package/dist/mcp/handlers/task-learning-handlers.js +230 -0
  404. package/dist/mcp/handlers/task-orchestrate-handler.d.ts +73 -0
  405. package/dist/mcp/handlers/task-orchestrate-handler.js +361 -0
  406. package/dist/mcp/protocol-server.js +12 -2
  407. package/dist/mcp/tools/code-intelligence/analyze.js +3 -6
  408. package/dist/mcp/tools/coverage-analysis/index.d.ts +4 -0
  409. package/dist/mcp/tools/coverage-analysis/index.js +8 -2
  410. package/dist/mcp/tools/visual-accessibility/index.d.ts +7 -0
  411. package/dist/mcp/tools/visual-accessibility/index.js +29 -13
  412. package/dist/shared/events/domain-events.d.ts +2 -0
  413. package/dist/shared/metrics/code-metrics.js +21 -3
  414. package/dist/shared/parsers/typescript-parser.d.ts +6 -0
  415. package/dist/shared/parsers/typescript-parser.js +13 -1
  416. package/package.json +1 -1
  417. package/dist/cli/chunks/adapter-HL7MOCQN.js +0 -2
  418. package/dist/cli/chunks/aqe-learning-engine-OZ2DXB4G.js +0 -2
  419. package/dist/cli/chunks/base-WIM7G3HC.js +0 -2
  420. package/dist/cli/chunks/browser-workflow-QRKCFVR3.js +0 -2
  421. package/dist/cli/chunks/chunk-QSGEBCDB.js +0 -62
  422. package/dist/cli/chunks/chunk-UJNGGFGX.js +0 -2
  423. package/dist/cli/chunks/chunk-VXVTFKRA.js +0 -2
  424. package/dist/cli/chunks/chunk-XCNSGSKV.js +0 -3
  425. package/dist/cli/chunks/client-4PNYDFYS.js +0 -2
  426. package/dist/cli/chunks/core-handlers-ODO6LUWQ.js +0 -2
  427. package/dist/cli/chunks/cross-domain-router-DT4MHJKK.js +0 -2
  428. package/dist/cli/chunks/domain-transfer-L3F6AES2.js +0 -2
  429. package/dist/cli/chunks/dream-QOB3JCOM.js +0 -2
  430. package/dist/cli/chunks/file-discovery-BN76S2PR.js +0 -2
  431. package/dist/cli/chunks/fleet-43YMXACN.js +0 -46
  432. package/dist/cli/chunks/heartbeat-scheduler-3NNP4WCP.js +0 -2
  433. package/dist/cli/chunks/hnsw-adapter-MZR7Y4WF.js +0 -2
  434. package/dist/cli/chunks/hnsw-index-HE4AX22U.js +0 -2
  435. package/dist/cli/chunks/hybrid-backend-IHUHB3Y2.js +0 -2
  436. package/dist/cli/chunks/impact-analyzer-FI6GI6PD.js +0 -2
  437. package/dist/cli/chunks/init-wizard-WLQKH5Y5.js +0 -2
  438. package/dist/cli/chunks/kernel-2WZOQEZS.js +0 -2
  439. package/dist/cli/chunks/knowledge-graph-G3LVKK6P.js +0 -2
  440. package/dist/cli/chunks/llm-router-service-MM75HKWJ.js +0 -2
  441. package/dist/cli/chunks/load-test-BEWEE44J.js +0 -2
  442. package/dist/cli/chunks/memory-backend-NYKBBKZR.js +0 -2
  443. package/dist/cli/chunks/pattern-null-store-QGPUIV6M.js +0 -2
  444. package/dist/cli/chunks/project-root-C7ELXZRK.js +0 -2
  445. package/dist/cli/chunks/protocol-executor-SUVE33BM.js +0 -2
  446. package/dist/cli/chunks/qe-reasoning-bank-YWZMMGJB.js +0 -2
  447. package/dist/cli/chunks/queen-coordinator-ZFAKXRN7.js +0 -2
  448. package/dist/cli/chunks/router-4FTAVYLJ.js +0 -2
  449. package/dist/cli/chunks/routing-feedback-IO2KOWMJ.js +0 -2
  450. package/dist/cli/chunks/rvf-dual-writer-KCIRNE7C.js +0 -2
  451. package/dist/cli/chunks/rvf-migration-adapter-MFC5WTJU.js +0 -2
  452. package/dist/cli/chunks/rvf-native-adapter-I3KWHE7X.js +0 -2
  453. package/dist/cli/chunks/safe-db-QXDZ6QY3.js +0 -2
  454. package/dist/cli/chunks/schedule-CZKD6RIY.js +0 -2
  455. package/dist/cli/chunks/scheduler-BLA3Q4CH.js +0 -2
  456. package/dist/cli/chunks/sqlite-persistence-XIUYDJC4.js +0 -2
  457. package/dist/cli/chunks/task-handler-P6IFLCKP.js +0 -62
  458. package/dist/cli/chunks/task-handlers-DPWMUKFC.js +0 -9
  459. package/dist/cli/chunks/test-runner-process-46IPK3GH.js +0 -2
  460. package/dist/cli/chunks/tree-sitter-wasm-parser-MOI2WWNJ.js +0 -2
  461. package/dist/cli/chunks/unified-memory-FL26RTV3.js +0 -2
  462. package/dist/cli/chunks/unified-memory-hnsw-E2BPTH3U.js +0 -2
  463. package/dist/cli/chunks/unified-persistence-5ZOUPKHF.js +0 -2
  464. package/dist/cli/chunks/visual-security-IJVPO5FA.js +0 -2
  465. package/dist/cli/chunks/witness-chain-5FAFCQKP.js +0 -2
  466. package/dist/cli/chunks/witness-chain-V2M32W5D.js +0 -2
  467. package/dist/cli/chunks/workflow-orchestrator-3JLF3IX7.js +0 -2
@@ -6,24 +6,14 @@
6
6
  * Issue #206: Workflow auto-execution for task types with associated workflows
7
7
  */
8
8
  import { getFleetState, isFleetInitialized } from './core-handlers.js';
9
- import { getTaskRouter, } from '../services/task-router.js';
10
- import { getReasoningBankService, startTaskTrajectory, endTaskTrajectory, } from '../services/reasoning-bank-service.js';
11
- import { scoreUnjudgedTrajectories } from './trajectory-judge.js';
12
9
  import { toErrorMessage } from '../../shared/error-utils.js';
13
10
  import { ALL_DOMAINS, invalidPriorityMessage, isDomainName, isPriority } from '../../shared/types/index.js';
14
- import { validateIndexPaths, validateIndexTaskPayload } from '../../domains/code-intelligence/index-path-guard.js';
15
- import { routeInferredTask } from './orchestrate-routes.js';
16
- import { getTaskExecutor } from './handler-factory.js';
17
- // ============================================================================
18
- // Task Type to Workflow Mapping (Issue #206)
19
- // Maps TaskTypes to their associated workflow IDs for auto-execution
20
- // ============================================================================
21
- const TASK_WORKFLOW_MAP = {
22
- 'ideation-assessment': 'qcsd-ideation-swarm',
23
- // Add more mappings as workflows are created:
24
- // 'generate-tests': 'comprehensive-testing',
25
- // 'test-accessibility': 'visual-accessibility-workflow',
26
- };
11
+ import { validateIndexTaskPayload } from '../../domains/code-intelligence/index-path-guard.js';
12
+ // #1146: task_orchestrate, model routing and the learning handlers live in
13
+ // their own modules; they are re-exported so existing imports keep working.
14
+ export * from './task-orchestrate-handler.js';
15
+ export * from './model-route-handlers.js';
16
+ export * from './task-learning-handlers.js';
27
17
  // ============================================================================
28
18
  // Task Submit Handler
29
19
  // ============================================================================
@@ -238,816 +228,4 @@ export async function handleTaskCancel(params) {
238
228
  };
239
229
  }
240
230
  }
241
- /**
242
- * #1022: gather experience guidance and pattern hints for task_orchestrate.
243
- * Learned guidance is optional: a missing embedder, or a ReasoningBank that
244
- * cannot start, must not fail the orchestration. The returned status says
245
- * which kind of matching produced the hints.
246
- */
247
- async function getOrchestrateLearningContext(task, guidanceDomain, patternDomain) {
248
- let service;
249
- try {
250
- service = await getReasoningBankService();
251
- }
252
- catch (error) {
253
- return {
254
- experienceGuidance: null,
255
- patternHintMatches: [],
256
- learning: { patternSearch: 'unavailable', reason: toErrorMessage(error) },
257
- };
258
- }
259
- // #1204: a background embedder retry can finish while this call runs.
260
- // Report vector matching only if the embedder was usable for the whole
261
- // call, so hints found by text alone are never labelled vector.
262
- const patternStatusBefore = service.getPatternSearchStatus();
263
- const experienceStatusBefore = service.getExperienceGuidanceStatus();
264
- const experienceGuidance = await service.getExperienceGuidance(task, guidanceDomain);
265
- // Bring HNSW A (qe_patterns) into the routing decision alongside HNSW C
266
- // (experienceGuidance). Without this, only past trajectories influenced
267
- // routing — the catalog of consolidated long-term patterns was never
268
- // consulted for new tasks. Fail-soft: empty array on error.
269
- const patternHintMatches = await service
270
- .searchPatternMatches(task, { limit: 5, domain: patternDomain })
271
- .catch(() => []);
272
- const status = notVectorIfEither(patternStatusBefore, service.getPatternSearchStatus());
273
- const experienceStatusAfter = service.getExperienceGuidanceStatus();
274
- const experienceStatus = experienceStatusBefore && experienceStatusAfter
275
- ? notVectorIfEither(experienceStatusBefore, experienceStatusAfter)
276
- : experienceStatusAfter;
277
- return {
278
- experienceGuidance,
279
- patternHintMatches,
280
- learning: {
281
- patternSearch: status.mode,
282
- ...(status.reason ? { reason: status.reason } : {}),
283
- ...(experienceStatus ? { experienceGuidance: experienceStatus } : {}),
284
- },
285
- };
286
- }
287
- /** #1204: the status before the call unless it was vector; otherwise the one after. */
288
- function notVectorIfEither(before, after) {
289
- return before.mode === 'vector' ? after : before;
290
- }
291
- export async function handleTaskOrchestrate(params) {
292
- if (!isFleetInitialized()) {
293
- return {
294
- success: false,
295
- error: 'Fleet not initialized. Call fleet_init first.',
296
- };
297
- }
298
- // #1096: filePaths feeds task payloads (sourceFiles, index paths), so a
299
- // non-array value is rejected up front with a clear message.
300
- if (params.filePaths !== undefined) {
301
- const filePaths = validateIndexPaths(params.filePaths, 'filePaths', 'Invalid task_orchestrate params');
302
- if (!filePaths.success) {
303
- return { success: false, error: filePaths.error.message };
304
- }
305
- }
306
- // #1117: an unrecognised priority used to fall through to p1 (and a
307
- // requested p0 was downgraded). Reject it up front, as task_submit does.
308
- if (params.priority !== undefined && mapPriority(params.priority) === undefined) {
309
- return { success: false, error: invalidOrchestratePriorityMessage(params.priority) };
310
- }
311
- const { queen, workflowOrchestrator } = getFleetState();
312
- try {
313
- // ADR-051: Route task to optimal model tier BEFORE execution
314
- // Fix #282: Enrich routing input with inferred domain (same as handleModelRoute)
315
- const inferredDomain = params.context?.project || inferDomainFromDescription(params.task);
316
- const inferredIsCritical = params.priority === 'critical' ||
317
- /\b(security|vulnerability|cve|owasp|critical|production|exploit)\b/i.test(params.task);
318
- const router = await getTaskRouter();
319
- const routingResult = await router.routeTask({
320
- task: params.task,
321
- codeContext: params.codeContext,
322
- filePaths: params.filePaths,
323
- manualTier: params.manualTier,
324
- isCritical: inferredIsCritical,
325
- agentType: `qe-${inferredDomain}`,
326
- domain: inferredDomain,
327
- metadata: {
328
- inferredDomain,
329
- hasCodeContext: !!params.codeContext,
330
- fileCount: params.filePaths?.length,
331
- },
332
- });
333
- // INTEGRATION FIX: Get ReasoningBank guidance for the task
334
- const { experienceGuidance, patternHintMatches, learning } = await getOrchestrateLearningContext(params.task, params.context?.project, params.context?.project ?? inferredDomain);
335
- // Parse task description to determine task type
336
- const taskType = inferTaskType(params.task);
337
- const priority = mapPriority(params.priority ?? 'medium') ?? 'p2';
338
- // Issue #206: Check if this task type has an associated workflow
339
- const workflowId = TASK_WORKFLOW_MAP[taskType];
340
- if (workflowId && workflowOrchestrator) {
341
- // Execute the associated workflow directly
342
- console.log(`[TaskOrchestrate] Task type '${taskType}' has workflow '${workflowId}' - executing workflow`);
343
- // Detect URL in task description for live website analysis
344
- const urlMatch = params.task.match(/https?:\/\/[^\s]+/i);
345
- const detectedUrl = urlMatch ? urlMatch[0] : undefined;
346
- if (detectedUrl) {
347
- console.log(`[TaskOrchestrate] Detected URL for analysis: ${detectedUrl}`);
348
- }
349
- // Build workflow input from task params and context
350
- const workflowInput = {
351
- // Pass through context fields as workflow input
352
- targetId: params.context?.project || detectedUrl || `task-${Date.now()}`,
353
- targetType: detectedUrl ? 'website' : 'epic',
354
- description: params.task,
355
- acceptanceCriteria: params.context?.requirements || [],
356
- // Pass URL if detected (enables website content extraction)
357
- url: detectedUrl,
358
- // Include routing info for downstream processing
359
- routing: {
360
- tier: routingResult.decision.tier,
361
- modelId: routingResult.modelId,
362
- executionStrategy: routingResult.executionStrategy,
363
- complexity: routingResult.decision.complexityAnalysis.overall,
364
- },
365
- // HNSW A pattern hints (mirrors the submitTask payload below); the
366
- // workflow branch routes through executeWorkflow, so the same catalog
367
- // of consolidated long-term patterns should reach it.
368
- patternHints: patternHintMatches.length > 0
369
- ? patternHintMatches.map(({ pattern: p, similarity, score, matchType, canReuse }) => ({
370
- patternId: p.id,
371
- name: p.name,
372
- description: p.description,
373
- confidence: p.confidence,
374
- similarity,
375
- score,
376
- matchType,
377
- canReuse,
378
- }))
379
- : undefined,
380
- };
381
- const workflowResult = await workflowOrchestrator.executeWorkflow(workflowId, workflowInput);
382
- if (!workflowResult.success) {
383
- return {
384
- success: false,
385
- error: `Workflow execution failed: ${workflowResult.error.message}`,
386
- };
387
- }
388
- return {
389
- success: true,
390
- data: {
391
- taskId: workflowResult.value, // This is the workflow execution ID
392
- type: taskType,
393
- priority,
394
- strategy: params.strategy || 'adaptive',
395
- status: 'workflow-started',
396
- message: `Workflow '${workflowId}' started for task: ${params.task}`,
397
- routing: {
398
- tier: routingResult.decision.tier,
399
- tierName: routingResult.tierInfo.name,
400
- modelId: routingResult.modelId,
401
- executionStrategy: routingResult.executionStrategy,
402
- complexity: routingResult.decision.complexityAnalysis.overall,
403
- confidence: routingResult.decision.confidence,
404
- useAgentBooster: routingResult.useAgentBooster,
405
- rationale: routingResult.decision.rationale,
406
- decisionTimeMs: routingResult.decision.metadata.decisionTimeMs,
407
- },
408
- learning,
409
- },
410
- };
411
- }
412
- // No workflow - submit as a regular task.
413
- // #1125: an inferred type without a handler of its own runs the domain's
414
- // concrete handler, with a payload built only from the request, or is
415
- // refused with the input it needs.
416
- const route = await routeInferredTask(taskType, params);
417
- if (route.kind === 'needs-input') {
418
- return { success: false, error: route.error };
419
- }
420
- const submitType = route.kind === 'route' ? route.type : taskType;
421
- const targetDomains = route.kind === 'route' ? [route.domain] : [];
422
- // #1200: a caller-owned task runs through the MCP task executor, as the
423
- // domain's own tool does; the Queen does not dispatch it.
424
- const callerExecutor = route.kind === 'route' && route.executionOwner === 'caller' ? getTaskExecutor() : null;
425
- // #1081: the type must have a domain handler. Otherwise the Queen can
426
- // only fail the task at dispatch, so reject it here with the reason.
427
- const executable = queen.validateTaskExecutable(submitType, targetDomains);
428
- if (!executable.success) {
429
- return {
430
- success: false,
431
- error: `${executable.error.message}. task_orchestrate inferred '${taskType}' from the description; ` +
432
- 'use task_submit with a supported type and its payload, or the domain\'s MCP tool.',
433
- };
434
- }
435
- // Issue N2: Build domain-appropriate payload.
436
- // Forward caller-provided filePaths/codeContext into the payload fields
437
- // that domain plugins expect, so generate-tests doesn't reject with
438
- // "missing sourceFiles" when called via task_orchestrate.
439
- const taskPayload = {
440
- description: params.task,
441
- strategy: params.strategy || 'adaptive',
442
- maxAgents: params.maxAgents,
443
- context: params.context,
444
- };
445
- if (taskType === 'generate-tests') {
446
- taskPayload.sourceFiles = params.filePaths || [];
447
- taskPayload.sourceCode = params.codeContext || '';
448
- taskPayload.language = taskPayload.language || 'typescript';
449
- taskPayload.testType = taskPayload.testType || 'unit';
450
- }
451
- if (taskType === 'index-code') {
452
- taskPayload.paths = params.filePaths || [];
453
- }
454
- if (route.kind === 'route')
455
- Object.assign(taskPayload, route.payload);
456
- const result = await queen.submitTask({
457
- type: submitType,
458
- ...(callerExecutor ? { executionOwner: 'caller' } : {}),
459
- priority,
460
- targetDomains,
461
- payload: {
462
- ...taskPayload,
463
- // ADR-051: Include routing decision in payload for downstream processing
464
- routing: {
465
- tier: routingResult.decision.tier,
466
- modelId: routingResult.modelId,
467
- executionStrategy: routingResult.executionStrategy,
468
- useAgentBooster: routingResult.useAgentBooster,
469
- agentBoosterTransform: routingResult.decision.agentBoosterTransform,
470
- complexity: routingResult.decision.complexityAnalysis.overall,
471
- confidence: routingResult.decision.confidence,
472
- },
473
- // INTEGRATION FIX: Include experience guidance if available
474
- experienceGuidance: experienceGuidance ? {
475
- strategy: experienceGuidance.recommendedStrategy,
476
- actions: experienceGuidance.suggestedActions,
477
- confidence: experienceGuidance.confidence,
478
- tokenSavings: experienceGuidance.estimatedTokenSavings,
479
- } : undefined,
480
- // HNSW A pattern hints for the executing agent
481
- patternHints: patternHintMatches.length > 0
482
- ? patternHintMatches.map(({ pattern: p, similarity, score, matchType, canReuse }) => ({
483
- patternId: p.id,
484
- name: p.name,
485
- description: p.description,
486
- confidence: p.confidence,
487
- similarity,
488
- score,
489
- matchType,
490
- canReuse,
491
- }))
492
- : undefined,
493
- },
494
- timeout: 600000, // 10 minutes for orchestrated tasks
495
- });
496
- if (!result.success) {
497
- return {
498
- success: false,
499
- error: result.error.message,
500
- };
501
- }
502
- // INTEGRATION FIX: Start trajectory tracking for learning
503
- const taskId = result.value;
504
- if (learning.patternSearch !== 'unavailable') {
505
- await startTaskTrajectory(taskId, params.task, {
506
- agent: 'queen-coordinator',
507
- domain: params.context?.project,
508
- });
509
- }
510
- // Issue N1: Trajectory auto-close is handled by subscribeTrajectoryEvents(),
511
- // which listens for TaskCompleted/TaskFailed on the event router.
512
- // No per-task polling needed.
513
- // #1200: run a caller-owned task after its trajectory started, without
514
- // waiting: the executor's TaskCompleted / TaskFailed settle it for task_status.
515
- const execution = callerExecutor ? queen.getTaskStatus(taskId) : undefined;
516
- if (callerExecutor && execution) {
517
- void callerExecutor.execute(execution.task).catch(error => {
518
- console.error(`[TaskOrchestrate] Task ${taskId} failed to execute: ${toErrorMessage(error)}`);
519
- });
520
- }
521
- // Trajectory judge: opt-in LLM scoring of recent unscored trajectories.
522
- // Hook-created rows in qe_trajectories never receive feedback unless
523
- // something goes back and judges them. This catches up by scoring ≤5
524
- // rows per task_orchestrate call. Opt-in (AQE_TRAJECTORY_JUDGE=1)
525
- // because it makes paid LLM calls.
526
- if (process.env.AQE_TRAJECTORY_JUDGE === '1' && process.env.ANTHROPIC_API_KEY) {
527
- void scoreUnjudgedTrajectories().catch(err => {
528
- console.warn('[TrajectoryJudge] failed:', err instanceof Error ? err.message : err);
529
- });
530
- }
531
- return {
532
- success: true,
533
- data: {
534
- taskId,
535
- type: submitType,
536
- ...(submitType !== taskType ? { inferredType: taskType } : {}),
537
- priority,
538
- strategy: params.strategy || 'adaptive',
539
- status: 'submitted',
540
- message: `Task orchestrated: ${params.task}${experienceGuidance ? ' (with experience guidance)' : ''}`,
541
- // ADR-051: Include routing info in response
542
- routing: {
543
- tier: routingResult.decision.tier,
544
- tierName: routingResult.tierInfo.name,
545
- modelId: routingResult.modelId,
546
- executionStrategy: routingResult.executionStrategy,
547
- complexity: routingResult.decision.complexityAnalysis.overall,
548
- confidence: routingResult.decision.confidence,
549
- useAgentBooster: routingResult.useAgentBooster,
550
- rationale: routingResult.decision.rationale,
551
- decisionTimeMs: routingResult.decision.metadata.decisionTimeMs,
552
- },
553
- learning,
554
- },
555
- };
556
- }
557
- catch (error) {
558
- return {
559
- success: false,
560
- error: `Failed to orchestrate task: ${toErrorMessage(error)}`,
561
- };
562
- }
563
- }
564
- /**
565
- * Handle model routing query - returns routing decision without submitting task
566
- */
567
- export async function handleModelRoute(params) {
568
- try {
569
- const router = await getTaskRouter();
570
- // Enrich routing input: infer domain and metadata from task description
571
- // when the caller doesn't provide them explicitly
572
- const inferredDomain = params.domain || inferDomainFromDescription(params.task);
573
- const inferredIsCritical = params.isCritical ??
574
- /\b(security|vulnerability|cve|owasp|critical|production|exploit)\b/i.test(params.task);
575
- const result = await router.routeTask({
576
- task: params.task,
577
- codeContext: params.codeContext,
578
- filePaths: params.filePaths,
579
- manualTier: params.manualTier,
580
- isCritical: inferredIsCritical,
581
- agentType: params.agentType || `qe-${inferredDomain}`,
582
- domain: inferredDomain,
583
- // Pass metadata to help the complexity analyzer
584
- metadata: {
585
- inferredDomain,
586
- hasCodeContext: !!params.codeContext,
587
- fileCount: params.filePaths?.length,
588
- },
589
- });
590
- return {
591
- success: true,
592
- data: {
593
- tier: result.decision.tier,
594
- tierName: result.tierInfo.name,
595
- modelId: result.modelId,
596
- executionStrategy: result.executionStrategy,
597
- useAgentBooster: result.useAgentBooster,
598
- agentBoosterTransform: result.decision.agentBoosterTransform,
599
- complexity: {
600
- overall: result.decision.complexityAnalysis.overall,
601
- code: result.decision.complexityAnalysis.codeComplexity,
602
- reasoning: result.decision.complexityAnalysis.reasoningComplexity,
603
- scope: result.decision.complexityAnalysis.scopeComplexity,
604
- },
605
- confidence: result.decision.confidence,
606
- rationale: result.decision.rationale,
607
- warnings: result.decision.warnings,
608
- budget: {
609
- allowed: result.decision.budgetDecision.allowed,
610
- wasDowngraded: result.decision.budgetDecision.wasDowngraded,
611
- estimatedCostUsd: result.decision.budgetDecision.estimatedCostUsd,
612
- },
613
- decisionTimeMs: result.decision.metadata.decisionTimeMs,
614
- },
615
- };
616
- }
617
- catch (error) {
618
- return {
619
- success: false,
620
- error: `Failed to route task: ${toErrorMessage(error)}`,
621
- };
622
- }
623
- }
624
- /**
625
- * Handle routing metrics query
626
- */
627
- export async function handleRoutingMetrics(params) {
628
- try {
629
- const router = await getTaskRouter();
630
- const stats = router.getRoutingStats();
631
- const metrics = router.getMetrics();
632
- const result = {
633
- stats,
634
- modelRouterMetrics: {
635
- totalDecisions: metrics.totalDecisions,
636
- avgDecisionTimeMs: metrics.avgDecisionTimeMs,
637
- agentBoosterStats: metrics.agentBoosterStats,
638
- budgetStats: metrics.budgetStats,
639
- },
640
- };
641
- if (params.includeLog) {
642
- result.log = router.getRoutingLog(params.logLimit || 100);
643
- }
644
- return {
645
- success: true,
646
- data: result,
647
- };
648
- }
649
- catch (error) {
650
- return {
651
- success: false,
652
- error: `Failed to get routing metrics: ${toErrorMessage(error)}`,
653
- };
654
- }
655
- }
656
- /**
657
- * Handle economic routing report query
658
- */
659
- export async function handleRoutingEconomics(params) {
660
- try {
661
- const { createRoutingFeedbackCollector } = await import('../../routing/routing-feedback.js');
662
- const { getGlobalCostTracker } = await import('../../shared/llm/cost-tracker.js');
663
- // Create collector, initialize to load persisted state from DB, then enable economic routing
664
- const collector = createRoutingFeedbackCollector(100);
665
- await collector.initialize();
666
- collector.enableEconomicRouting({ ...(params.taskComplexity != null ? {} : {}) }, getGlobalCostTracker());
667
- const report = collector.getEconomicReport();
668
- if (!report) {
669
- return { success: false, error: 'Economic routing is not available' };
670
- }
671
- // Convert Infinity to string for JSON serialization
672
- const tierEfficiency = report.tierEfficiency.map(t => ({
673
- ...t,
674
- qualityPerDollar: isFinite(t.qualityPerDollar) ? t.qualityPerDollar : 'Infinity',
675
- }));
676
- return {
677
- success: true,
678
- data: {
679
- tierEfficiency,
680
- currentHourlyCostUsd: report.currentHourlyCostUsd,
681
- currentDailyCostUsd: report.currentDailyCostUsd,
682
- budgetRemaining: report.budgetRemaining,
683
- recommendation: report.recommendation,
684
- savingsOpportunity: report.savingsOpportunity,
685
- },
686
- };
687
- }
688
- catch (error) {
689
- return {
690
- success: false,
691
- error: `Failed to get economic routing report: ${toErrorMessage(error)}`,
692
- };
693
- }
694
- }
695
- // ============================================================================
696
- // Helper Functions
697
- // ============================================================================
698
- /**
699
- * Infer domain from task description for routing enrichment
700
- * Maps task descriptions to QE domains so the complexity analyzer
701
- * can apply domain-specific scoring (e.g., security → complex domain)
702
- */
703
- function inferDomainFromDescription(description) {
704
- const lower = description.toLowerCase();
705
- if (/\b(security|vulnerabilit|cve|owasp|secret|credential|injection|xss|csrf)\b/.test(lower)) {
706
- return 'security-compliance';
707
- }
708
- if (/\b(chaos|resilience|fault.?inject|disaster|failover)\b/.test(lower)) {
709
- return 'chaos-resilience';
710
- }
711
- if (/\b(defect|bug.?predict|risk.?assess|mutation)\b/.test(lower)) {
712
- return 'defect-intelligence';
713
- }
714
- if (/\b(coverage|uncovered|gap.?analy)\b/.test(lower)) {
715
- return 'coverage-analysis';
716
- }
717
- if (/\b(quality|code.?review|maintain|tech.?debt)\b/.test(lower)) {
718
- return 'quality-assessment';
719
- }
720
- if (/\b(contract|api.?compat|breaking.?change|pact)\b/.test(lower)) {
721
- return 'contract-testing';
722
- }
723
- if (/\b(index|knowledge.?graph|semantic|code.?intel)\b/.test(lower)) {
724
- return 'code-intelligence';
725
- }
726
- if (/\b(accessib|a11y|wcag|screen.?read)\b/.test(lower)) {
727
- return 'visual-accessibility';
728
- }
729
- if (/\b(requirement|bdd|acceptance|user.?stor)\b/.test(lower)) {
730
- return 'requirements-validation';
731
- }
732
- if (/\b(generat.*test|test.*generat|write.*test|create.*test)\b/.test(lower)) {
733
- return 'test-generation';
734
- }
735
- if (/\b(run.*test|execut.*test)\b/.test(lower)) {
736
- return 'test-execution';
737
- }
738
- return 'test-generation'; // Default
739
- }
740
- /**
741
- * Infer task type from description
742
- */
743
- // #1130: chaos named as the activity of a test run. The lookaheads keep a
744
- // path segment or file name (resilience tests/unit/…, src/fault-injection/…,
745
- // fault-injection.ts) from counting, and "fault injector" names a component.
746
- const CHAOS_ACTIVITY = new RegExp([
747
- String.raw `\b(?:chaos|resilience)\s+(?:\w+\s+)?(?:tests?|testing|experiments?)\b(?![./\w])`,
748
- String.raw `\bfault[\s-]?inject(?:ion|ing)\b(?![./\w])`,
749
- String.raw `\binject(?:s|ing)?\s+(?:\w+\s+)?faults?\b(?![./\w])`,
750
- ].join('|'));
751
- function inferTaskType(description) {
752
- const lower = description.toLowerCase();
753
- // Check execution first (more specific patterns)
754
- if (/run\s+(?:\w+\s+)*tests?/.test(lower) ||
755
- /execute\s+(?:\w+\s+)*tests?/.test(lower) ||
756
- lower.includes('run tests') ||
757
- lower.includes('execute tests')) {
758
- // #1130: "run chaos resilience testing" names a chaos run, not a test run.
759
- // Only a run whose activity is chaos counts; every other description keeps
760
- // the order below, where chaos wording is the last resort.
761
- return CHAOS_ACTIVITY.test(lower) ? 'run-chaos' : 'execute-tests';
762
- }
763
- // Then check generation
764
- if (lower.includes('generate test') || lower.includes('create test') || lower.includes('write test')) {
765
- return 'generate-tests';
766
- }
767
- if (lower.includes('coverage') || lower.includes('uncovered')) {
768
- return 'analyze-coverage';
769
- }
770
- if (lower.includes('quality') || lower.includes('code quality')) {
771
- return 'assess-quality';
772
- }
773
- if (lower.includes('defect') || lower.includes('bug') || lower.includes('predict')) {
774
- return 'predict-defects';
775
- }
776
- if (lower.includes('requirement') || lower.includes('bdd') || lower.includes('acceptance')) {
777
- return 'validate-requirements';
778
- }
779
- if (lower.includes('index') || lower.includes('knowledge graph') || lower.includes('semantic')) {
780
- return 'index-code';
781
- }
782
- if (lower.includes('security') || lower.includes('vulnerability') || lower.includes('owasp')) {
783
- return 'scan-security';
784
- }
785
- if (lower.includes('contract') || lower.includes('api contract') || lower.includes('pact')) {
786
- return 'validate-contracts';
787
- }
788
- if (lower.includes('accessibility') || lower.includes('a11y') || lower.includes('wcag')) {
789
- return 'test-accessibility';
790
- }
791
- if (lower.includes('chaos') || lower.includes('resilience') || lower.includes('fault')) {
792
- return 'run-chaos';
793
- }
794
- if (lower.includes('learn') || lower.includes('optimize') || lower.includes('improve')) {
795
- return 'optimize-learning';
796
- }
797
- // QCSD Ideation phase - quality criteria, testability, risk assessment
798
- if (lower.includes('ideation') ||
799
- lower.includes('quality criteria') ||
800
- lower.includes('htsm') ||
801
- lower.includes('qcsd') ||
802
- lower.includes('testability') ||
803
- lower.includes('pi planning') ||
804
- lower.includes('sprint planning')) {
805
- return 'ideation-assessment';
806
- }
807
- // Default to test generation
808
- return 'generate-tests';
809
- }
810
- /**
811
- * Map a task_orchestrate priority to the canonical Priority type.
812
- * Accepts the named levels and the canonical p0-p3 values; returns
813
- * undefined for anything else so the caller can reject it (#1117).
814
- */
815
- function mapPriority(priority) {
816
- switch (priority) {
817
- case 'critical':
818
- return 'p0';
819
- case 'high':
820
- return 'p1';
821
- case 'medium':
822
- return 'p2';
823
- case 'low':
824
- return 'p3';
825
- default:
826
- return isPriority(priority) ? priority : undefined;
827
- }
828
- }
829
- function invalidOrchestratePriorityMessage(value) {
830
- return `${invalidPriorityMessage(value)} (or critical, high, medium, low)`;
831
- }
832
- /**
833
- * Record a task outcome for ReasoningBank learning
834
- * ADR-051: Enables cross-session learning from task execution
835
- */
836
- export async function handleTaskOutcomeRecord(params) {
837
- try {
838
- const service = await getReasoningBankService();
839
- const outcome = {
840
- taskId: params.taskId,
841
- task: params.task,
842
- taskType: params.taskType,
843
- success: params.success,
844
- executionTimeMs: params.executionTimeMs,
845
- agentId: params.agentId,
846
- domain: params.domain,
847
- modelTier: params.modelTier,
848
- qualityScore: params.qualityScore,
849
- error: params.error,
850
- metrics: params.metrics,
851
- };
852
- await service.recordTaskOutcome(outcome);
853
- const patternStored = params.success && (params.qualityScore || 0.5) >= 0.6;
854
- return {
855
- success: true,
856
- data: {
857
- recorded: true,
858
- patternStored,
859
- message: patternStored
860
- ? `Outcome recorded and pattern stored for task ${params.taskId}`
861
- : `Outcome recorded for task ${params.taskId}`,
862
- },
863
- };
864
- }
865
- catch (error) {
866
- return {
867
- success: false,
868
- error: `Failed to record task outcome: ${toErrorMessage(error)}`,
869
- };
870
- }
871
- }
872
- /**
873
- * Get ReasoningBank statistics
874
- * ADR-051: Provides visibility into learning system
875
- */
876
- export async function handleReasoningBankStats() {
877
- try {
878
- const service = await getReasoningBankService();
879
- const stats = await service.getStats();
880
- return {
881
- success: true,
882
- data: {
883
- service: stats.service,
884
- patterns: {
885
- totalPatterns: stats.reasoningBank.totalPatterns,
886
- byDomain: stats.reasoningBank.byDomain,
887
- byTier: stats.reasoningBank.byTier,
888
- learningOutcomes: stats.reasoningBank.learningOutcomes,
889
- patternSuccessRate: stats.reasoningBank.patternSuccessRate,
890
- },
891
- embeddings: {
892
- cacheSize: stats.reasoningBank.embeddingCacheSize,
893
- dimension: stats.reasoningBank.embeddingDimension,
894
- transformerAvailable: stats.reasoningBank.transformerAvailable,
895
- },
896
- performance: {
897
- avgRoutingLatencyMs: stats.reasoningBank.avgRoutingLatencyMs,
898
- p95RoutingLatencyMs: stats.reasoningBank.p95RoutingLatencyMs,
899
- },
900
- },
901
- };
902
- }
903
- catch (error) {
904
- return {
905
- success: false,
906
- error: `Failed to get ReasoningBank stats: ${toErrorMessage(error)}`,
907
- };
908
- }
909
- }
910
- // ============================================================================
911
- // Task Complete Handler with Learning
912
- // Records outcome when task status is queried and complete
913
- // ============================================================================
914
- // Track tasks we've already recorded to avoid duplicates
915
- const recordedTasks = new Set();
916
- /**
917
- * Enhanced task status that records outcomes for learning
918
- * ADR-051: Automatically records completed task outcomes
919
- * INTEGRATION FIX: Now synchronous to ensure learning occurs
920
- */
921
- export async function handleTaskStatusWithLearning(params) {
922
- if (!isFleetInitialized()) {
923
- return {
924
- success: false,
925
- error: 'Fleet not initialized. Call fleet_init first.',
926
- };
927
- }
928
- const { queen } = getFleetState();
929
- try {
930
- const execution = queen.getTaskStatus(params.taskId);
931
- if (!execution) {
932
- return {
933
- success: false,
934
- error: `Task not found: ${params.taskId}`,
935
- };
936
- }
937
- const result = {
938
- taskId: execution.taskId,
939
- type: execution.task.type,
940
- status: execution.status,
941
- cancellationResultPending: execution.cancellationResultPending,
942
- priority: execution.task.priority,
943
- assignedDomain: execution.assignedDomain,
944
- assignedAgents: execution.assignedAgents,
945
- result: params.detailed ? execution.result : undefined,
946
- error: execution.error,
947
- createdAt: execution.task.createdAt.toISOString(),
948
- startedAt: execution.startedAt?.toISOString(),
949
- completedAt: execution.completedAt?.toISOString(),
950
- duration: execution.completedAt && execution.startedAt
951
- ? execution.completedAt.getTime() - execution.startedAt.getTime()
952
- : undefined,
953
- };
954
- // INTEGRATION FIX: Record outcome for completed tasks synchronously (only once)
955
- if ((execution.status === 'completed' || execution.status === 'failed') &&
956
- !recordedTasks.has(params.taskId)) {
957
- recordedTasks.add(params.taskId);
958
- try {
959
- const service = await getReasoningBankService();
960
- const duration = result.duration || 0;
961
- const success = execution.status === 'completed';
962
- // Safely extract payload properties (typed as Record<string, unknown>)
963
- const payload = execution.task.payload || {};
964
- const taskDescription = typeof payload.description === 'string'
965
- ? payload.description
966
- : execution.task.type;
967
- const routing = payload.routing;
968
- // INTEGRATION FIX: End trajectory tracking first
969
- const trajectory = await endTaskTrajectory(params.taskId, success, execution.error);
970
- // Calculate quality score from trajectory if available
971
- const qualityScore = trajectory?.metrics.averageQuality ?? (success ? 0.7 : 0.3);
972
- // INTEGRATION FIX: Record outcome synchronously (await to ensure learning)
973
- await service.recordTaskOutcome({
974
- taskId: params.taskId,
975
- task: taskDescription,
976
- taskType: execution.task.type,
977
- success,
978
- executionTimeMs: duration,
979
- agentId: execution.assignedAgents?.[0],
980
- domain: execution.assignedDomain,
981
- modelTier: routing?.tier,
982
- qualityScore,
983
- error: execution.error,
984
- metrics: {
985
- // Extract any metrics from result if available
986
- testsGenerated: typeof execution.result === 'object' && execution.result
987
- ? execution.result.testsGenerated
988
- : undefined,
989
- testsPassed: typeof execution.result === 'object' && execution.result
990
- ? execution.result.testsPassed
991
- : undefined,
992
- },
993
- });
994
- console.error(`[TaskHandler] Recorded learning outcome: task=${params.taskId} ` +
995
- `success=${success} quality=${qualityScore.toFixed(2)} ` +
996
- `trajectorySteps=${trajectory?.steps.length ?? 0}`);
997
- }
998
- catch (err) {
999
- // Log but don't fail the response - learning is important but not blocking
1000
- console.error('[TaskHandler] Failed to record outcome:', err);
1001
- }
1002
- }
1003
- return {
1004
- success: true,
1005
- data: result,
1006
- };
1007
- }
1008
- catch (error) {
1009
- return {
1010
- success: false,
1011
- error: `Failed to get task status: ${toErrorMessage(error)}`,
1012
- };
1013
- }
1014
- }
1015
- // ============================================================================
1016
- // Issue N1: Event-driven trajectory auto-close
1017
- // Subscribe to TaskCompleted/TaskFailed events so trajectories are closed
1018
- // by the event system, not by per-task polling loops.
1019
- // Called once during fleet init.
1020
- // ============================================================================
1021
- /** Subscription IDs for cleanup on fleet dispose */
1022
- let trajectorySubscriptionIds = [];
1023
- /**
1024
- * Subscribe to task lifecycle events to auto-close trajectories.
1025
- * Must be called after the CrossDomainEventRouter is initialized.
1026
- */
1027
- export function subscribeTrajectoryEvents(router) {
1028
- // Unsubscribe any previous subscriptions (idempotent)
1029
- unsubscribeTrajectoryEvents(router);
1030
- const completedId = router.subscribeToEventType('TaskCompleted', async (event) => {
1031
- const { taskId } = event.payload;
1032
- if (taskId && getFleetState().queen?.getTaskStatus(taskId)?.status !== 'cancelled') {
1033
- await endTaskTrajectory(taskId, true).catch(() => { });
1034
- }
1035
- });
1036
- const failedId = router.subscribeToEventType('TaskFailed', async (event) => {
1037
- const { taskId, error: errorMsg } = event.payload;
1038
- if (taskId && getFleetState().queen?.getTaskStatus(taskId)?.status !== 'cancelled') {
1039
- await endTaskTrajectory(taskId, false, errorMsg).catch(() => { });
1040
- }
1041
- });
1042
- trajectorySubscriptionIds = [completedId, failedId];
1043
- }
1044
- /**
1045
- * Unsubscribe trajectory event listeners. Called during fleet dispose.
1046
- */
1047
- export function unsubscribeTrajectoryEvents(router) {
1048
- for (const id of trajectorySubscriptionIds) {
1049
- router.unsubscribe(id);
1050
- }
1051
- trajectorySubscriptionIds = [];
1052
- }
1053
231
  //# sourceMappingURL=task-handlers.js.map