@visorcraft/idlehands 4.2.7 → 4.4.0

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 (375) hide show
  1. package/dist/{acp-cli-B3uwVAGD.js → acp-cli-CVrBJF6U.js} +2 -2
  2. package/dist/{acp-cli-BEpWQbqb.js → acp-cli-Do_gQG1E.js} +2 -2
  3. package/dist/{agent-via-gateway-CZLe7Ijx.js → agent-via-gateway-CPvgY5VA.js} +3 -3
  4. package/dist/{agent-via-gateway-CW7FhqaW.js → agent-via-gateway-CTti0dK7.js} +21 -21
  5. package/dist/{agent-via-gateway-D8QBXTZL.js → agent-via-gateway-DvLTdMBj.js} +3 -3
  6. package/dist/{agent-via-gateway-BMsMjnWe.js → agent-via-gateway-OzQZlQpB.js} +21 -21
  7. package/dist/{agents-C1x5jDIo.js → agents-BEuHL8Zr.js} +7 -7
  8. package/dist/{agents.config-B_McnvK1.js → agents.config-BDQ4Bu0B.js} +1 -1
  9. package/dist/{agents.config-4ilUlWts.js → agents.config-BjMP6yqX.js} +1 -1
  10. package/dist/{anton-C33_8bVg.js → anton-C8SARtai.js} +190 -7
  11. package/dist/{anton-BDDjbZ5H.js → anton-DCJl8crN.js} +190 -7
  12. package/dist/{anton-D4a5lMjo.js → anton-Dwp3KlQs.js} +190 -7
  13. package/dist/{anton-0pF0zqOs.js → anton-F-OwKPyb.js} +190 -7
  14. package/dist/{api-key-rotation-B-FTJm5p.js → api-key-rotation-YdGMPTz0.js} +1 -1
  15. package/dist/{audio-preflight-jTgcbu-I.js → audio-preflight-CQPmCwiT.js} +12 -12
  16. package/dist/{audio-preflight-Dl1TO10w.js → audio-preflight-CcY9w5EV.js} +12 -12
  17. package/dist/{audio-preflight-BSlR2jEq.js → audio-preflight-DdYPJah_.js} +9 -9
  18. package/dist/{audio-preflight-vD3mDc6w.js → audio-preflight-Dl_bdO0l.js} +9 -9
  19. package/dist/{audit-C9PrbHng.js → audit-CdwW3NUX.js} +7 -7
  20. package/dist/{audit-CKeZnjft.js → audit-k9xjNToB.js} +7 -7
  21. package/dist/{auth-choice-JcCIJBlD.js → auth-choice-BHISFUGz.js} +9 -9
  22. package/dist/{auth-choice-BhfFkY6h.js → auth-choice-Dam79K-y.js} +9 -9
  23. package/dist/{auth-choice-Di-agX2j.js → auth-choice-Dv5Gualg.js} +9 -9
  24. package/dist/{auth-choice-D12Wsf7w.js → auth-choice-uVYQA-Gd.js} +9 -9
  25. package/dist/{auth-choice.apply-helpers-CGcniL1T.js → auth-choice.apply-helpers-CTCJdL4X.js} +1 -1
  26. package/dist/{auth-choice.apply-helpers-Bj-Y-Sar.js → auth-choice.apply-helpers-CdAketGR.js} +1 -1
  27. package/dist/{auth-profiles-Baj5ImDJ.js → auth-profiles-02PVCKaE.js} +17 -0
  28. package/dist/{auth-token-BJq87X3o.js → auth-token-Bry7XspO.js} +1 -1
  29. package/dist/{auth-token-BQ_ECwH7.js → auth-token-Dg9vclI_.js} +1 -1
  30. package/dist/{banner-DfFhVf3q.js → banner-ascZEgmt.js} +1 -1
  31. package/dist/{browser-cli-Ci6DpTnS.js → browser-cli-1ud7ySUv.js} +3 -3
  32. package/dist/{browser-cli-Brb82I5e.js → browser-cli-CkVBAsAn.js} +3 -3
  33. package/dist/build-info.json +3 -3
  34. package/dist/bundled/boot-md/handler.js +21 -21
  35. package/dist/bundled/session-memory/handler.js +21 -21
  36. package/dist/{call-C82rD2Wn.js → call-B9uIa0hd.js} +1 -1
  37. package/dist/{call-BpWhjuOg.js → call-C8V5ivtz.js} +1 -1
  38. package/dist/{channel-options-9SPtt4MW.js → channel-options-BdjtX9_O.js} +2 -2
  39. package/dist/{channel-options-CUviKu-7.js → channel-options-CAfv1NVr.js} +2 -2
  40. package/dist/{channel-web-C6dFy-1o.js → channel-web-B23k1s4A.js} +10 -10
  41. package/dist/{channel-web-CFn6Nsja.js → channel-web-BZe8v7Di.js} +10 -10
  42. package/dist/{channels-cli-B2da56zV.js → channels-cli-Bfz9P0IR.js} +47 -47
  43. package/dist/{channels-cli-DGfqgSUL.js → channels-cli-v8qMY1yM.js} +46 -46
  44. package/dist/{chrome-DEnkfZ9p.js → chrome-Bip_1c2e.js} +1 -1
  45. package/dist/{chrome-RxW7_mFf.js → chrome-DuNAHpiu.js} +1 -1
  46. package/dist/{chrome-_2tzVjVl.js → chrome-RZ6-DZcL.js} +10 -10
  47. package/dist/{chrome-VBsQfIrt.js → chrome-rWfyHiLu.js} +1 -1
  48. package/dist/{clawbot-cli-Qy95Qdb2.js → clawbot-cli-CYibHquq.js} +2 -2
  49. package/dist/{clawbot-cli-uFgYrysW.js → clawbot-cli-DisIVsMj.js} +2 -2
  50. package/dist/cli/daemon-cli.js +1 -1
  51. package/dist/{cli-FOBK-XcZ.js → cli-DyId4irC.js} +37 -37
  52. package/dist/{cli-DmnwiKz9.js → cli-HkluaDt1.js} +38 -38
  53. package/dist/{command-registry-DacWRRgz.js → command-registry-Bs5y1F2v.js} +12 -12
  54. package/dist/{commands-registry-CAIz7Mb4.js → commands-registry-BCKEmgO-.js} +1 -1
  55. package/dist/{commands-registry-CURlRZQJ.js → commands-registry-CWCNmH14.js} +1 -1
  56. package/dist/{commands-registry-j4vAzcF2.js → commands-registry-C_zNi-Ou.js} +1 -1
  57. package/dist/{commands-registry-1-Rv2-IS.js → commands-registry-DBT-IMwk.js} +1 -1
  58. package/dist/{completion-cli-DydUIkNr.js → completion-cli-BmHAqqY4.js} +2 -2
  59. package/dist/{completion-cli-NMyMglwl.js → completion-cli-CGXtQf6t.js} +1 -1
  60. package/dist/{config-cli-C_DUmmo_.js → config-cli-BdJDJv0a.js} +3 -3
  61. package/dist/{config-cli-B4fFlFK0.js → config-cli-CEehCZa0.js} +3 -3
  62. package/dist/{config-guard-BdsOumqh.js → config-guard-Bgh7thxy.js} +7 -7
  63. package/dist/{config-guard-7CCnD0lc.js → config-guard-CWaCycDU.js} +2 -2
  64. package/dist/{config-validation-BvKX6fPw.js → config-validation-Bvnac3cR.js} +1 -1
  65. package/dist/{config-validation-BgKexeQb.js → config-validation-Cs3OgfGw.js} +1 -1
  66. package/dist/{configure-BRK8DqNR.js → configure-C44gmCt3.js} +9 -9
  67. package/dist/{configure-k0XQkt_5.js → configure-C5087mSP.js} +9 -9
  68. package/dist/{cron-cli-DQsnGQKs.js → cron-cli-Bax20v2h.js} +3 -3
  69. package/dist/{cron-cli-DXZzPHDQ.js → cron-cli-DJM56JHM.js} +3 -3
  70. package/dist/{daemon-cli-DUg-s4LG.js → daemon-cli-Bcl3Y7NQ.js} +4 -4
  71. package/dist/{daemon-cli-DOG5Mivy.js → daemon-cli-D-vzzB6U.js} +4 -4
  72. package/dist/daemon-cli.js +17 -0
  73. package/dist/{deliver-CVTXl0Cv.js → deliver-BQeDhZSa.js} +3 -3
  74. package/dist/{deliver--kttnrER.js → deliver-C8qc5JkL.js} +3 -3
  75. package/dist/{deliver-5FLCa6tB.js → deliver-CO1v69YA.js} +3 -3
  76. package/dist/{deliver-UdfAQA1U.js → deliver-CaD3Q14j.js} +3 -3
  77. package/dist/{deps-Bp-zobQ9.js → deps-CchkM1ea.js} +6 -6
  78. package/dist/{deps-C8gMsatU.js → deps-CfQJK6WP.js} +6 -6
  79. package/dist/{deps-CC9rj6VE.js → deps-SgroTRjf.js} +6 -6
  80. package/dist/{deps-k7zLO-No.js → deps-UTcCCmJ6.js} +6 -6
  81. package/dist/{devices-cli-aiEJxYcN.js → devices-cli-CsQqv6sS.js} +2 -2
  82. package/dist/{devices-cli-DKK65S9Z.js → devices-cli-rPhob90f.js} +2 -2
  83. package/dist/{directory-cli-CIxpmqpa.js → directory-cli-DiwMaika.js} +1 -1
  84. package/dist/{directory-cli-Dz9iXeut.js → directory-cli-xx6Syvau.js} +1 -1
  85. package/dist/{dns-cli-zksPYxgB.js → dns-cli-BQHewbRE.js} +1 -1
  86. package/dist/{dns-cli-DD6hWsdc.js → dns-cli-BdO35Dqj.js} +1 -1
  87. package/dist/{doctor-completion-CtkKGYq1.js → doctor-completion-Cgl5S3K0.js} +1 -1
  88. package/dist/{doctor-completion-T65otQPW.js → doctor-completion-DsaJMlSu.js} +1 -1
  89. package/dist/{doctor-config-flow-Ck4oCjfl.js → doctor-config-flow-DTOp7CF2.js} +5 -5
  90. package/dist/{doctor-config-flow-BvGvt5rT.js → doctor-config-flow-PE4yVE_b.js} +5 -5
  91. package/dist/{emergency-stop-CHHSptxF.js → emergency-stop-B2KUQyt8.js} +21 -21
  92. package/dist/{emergency-stop-B1WGLPIl.js → emergency-stop-BCRW03p2.js} +38 -38
  93. package/dist/{emergency-stop-Bqex5qoB.js → emergency-stop-CjVqAFw-.js} +21 -21
  94. package/dist/{emergency-stop-C0olMHR9.js → emergency-stop-DjURYr3Z.js} +37 -37
  95. package/dist/{enable-o_s6PBsC.js → enable-BTAmDMjv.js} +1 -1
  96. package/dist/{enable-CMXupNXl.js → enable-VKkQFfeD.js} +1 -1
  97. package/dist/entry.js +1 -1
  98. package/dist/{exec-approvals-allowlist-Co2tJSEo.js → exec-approvals-allowlist-8sJfUTLW.js} +1 -1
  99. package/dist/{exec-approvals-allowlist-B5d4ftdY.js → exec-approvals-allowlist-BZ4flSrM.js} +1 -1
  100. package/dist/{exec-approvals-cli-D6XUzs4j.js → exec-approvals-cli-DM3bIMTH.js} +5 -5
  101. package/dist/{exec-approvals-cli-DRoaRYPn.js → exec-approvals-cli-DQeALLeZ.js} +5 -5
  102. package/dist/{exec-safe-bin-runtime-policy-Ozk71zDl.js → exec-safe-bin-runtime-policy-BcZ1Ocjd.js} +2 -2
  103. package/dist/{exec-safe-bin-runtime-policy-DaoU9-ni.js → exec-safe-bin-runtime-policy-BrbwOxsh.js} +2 -2
  104. package/dist/extensionAPI.js +21 -21
  105. package/dist/{gateway-cli-B4fOuxUC.js → gateway-cli-BmwR5tHy.js} +52 -52
  106. package/dist/{gateway-cli-LuvH-d8m.js → gateway-cli-Cx3sGYvO.js} +53 -53
  107. package/dist/{gateway-rpc-5PTvwEfj.js → gateway-rpc-CTDQY6yE.js} +1 -1
  108. package/dist/{gateway-rpc-BBFG1T-M.js → gateway-rpc-Cu66JjIW.js} +1 -1
  109. package/dist/{gemini-auth-D8Wg8hYo.js → gemini-auth-BsD1tapx.js} +1 -1
  110. package/dist/{gemini-auth-CIyaa44H.js → gemini-auth-DwwgHLvI.js} +1 -1
  111. package/dist/{gemini-auth-m2hi6OmF.js → gemini-auth-G-whJIrc.js} +1 -1
  112. package/dist/{health-BFXk0LFk.js → health-DXbufVL-.js} +5 -5
  113. package/dist/{health-CpPRbWHn.js → health-F0lUmHT3.js} +5 -5
  114. package/dist/{hooks-cli-q_ukCmeC.js → hooks-cli-6t3DpWin.js} +38 -38
  115. package/dist/{hooks-cli-RL3GbGUT.js → hooks-cli-CsWYWkar.js} +39 -39
  116. package/dist/{image-COw__ACq.js → image-4HTajysw.js} +3 -3
  117. package/dist/{image-DSDEbSiO.js → image-B-32uaKt.js} +4 -4
  118. package/dist/{image-Wzw26f_Y.js → image-BhFGtZNf.js} +4 -4
  119. package/dist/{image-C_aN5P6-.js → image-Cu288YpA.js} +3 -3
  120. package/dist/index.js +45 -45
  121. package/dist/{lifecycle-core-DxExA9d3.js → lifecycle-core-WMoTalaq.js} +1 -1
  122. package/dist/{lifecycle-core-B6UoqYTJ.js → lifecycle-core-dd6-ntqw.js} +1 -1
  123. package/dist/llm-slug-generator.js +21 -21
  124. package/dist/{login-CFr5vJmR.js → login-B8EuUm6R.js} +2 -2
  125. package/dist/{login-BaXwiEpr.js → login-BjVdIGIS.js} +1 -1
  126. package/dist/{login-Cnp8mhAl.js → login-DOM8Tu1s.js} +2 -2
  127. package/dist/{login-CfUhrgWT.js → login-DR5g-xWe.js} +1 -1
  128. package/dist/{login-qr-DBMsUxgL.js → login-qr-BInnno1O.js} +1 -1
  129. package/dist/{login-qr-1DsqAd7J.js → login-qr-BQX3hP6m.js} +1 -1
  130. package/dist/{login-qr-CFFFOjOl.js → login-qr-DS_9MrMo.js} +2 -2
  131. package/dist/{login-qr-DgMNOMI6.js → login-qr-KexvdOYq.js} +2 -2
  132. package/dist/{logs-cli-u0WmYxx7.js → logs-cli-DAtuiQLS.js} +3 -3
  133. package/dist/{logs-cli-4VQ9Iwiw.js → logs-cli-NBTxZMvY.js} +3 -3
  134. package/dist/{manager-DYOflU5p.js → manager-B9Q7jxHQ.js} +2 -2
  135. package/dist/{manager-BE_76jWB.js → manager-CaFxh6F8.js} +2 -2
  136. package/dist/{manager-KsO7drKq.js → manager-Dt6uRdqZ.js} +2 -2
  137. package/dist/{manager-BMAFgXyU.js → manager-DvKWYP8R.js} +2 -2
  138. package/dist/{memory-cli-CUGwnVIY.js → memory-cli-CVzU_J-C.js} +3 -3
  139. package/dist/{memory-cli-C_qWFNVQ.js → memory-cli-CpcWRUgi.js} +3 -3
  140. package/dist/{model-CZMeWx-m.js → model-CJrOUPDY.js} +2 -2
  141. package/dist/{model-C-icShH2.js → model-CMWITe66.js} +2 -2
  142. package/dist/{model-catalog-DYWymzg_.js → model-catalog-DhBQWADs.js} +3 -3
  143. package/dist/{model-catalog-D9no0CH2.js → model-catalog-DqObBjh3.js} +3 -3
  144. package/dist/{model-picker-D_yngXMe.js → model-picker-6G4lLHXK.js} +3 -3
  145. package/dist/{model-picker-BkXoTOiA.js → model-picker-CDFxd1-T.js} +3 -3
  146. package/dist/{model-selection-D3Jhcvg-.js → model-selection-BCfCq125.js} +17 -0
  147. package/dist/{model-selection-0dGxYGp8.js → model-selection-BzMkl275.js} +17 -0
  148. package/dist/{model-selection-1MMYqY6M.js → model-selection-D5g8tXIY.js} +17 -0
  149. package/dist/{models-DToiZ2jp.js → models-awPyoUpk.js} +13 -13
  150. package/dist/{models-cli-8wuQnOxc.js → models-cli-CsA9GN5G.js} +43 -43
  151. package/dist/{models-cli-C8tnFvU6.js → models-cli-D_PfTekq.js} +42 -42
  152. package/dist/{models-config-fDNEH4C5.js → models-config-BXEhHPnv.js} +1 -1
  153. package/dist/{models-config-C5A1wDWh.js → models-config-CKIP_s6b.js} +1 -1
  154. package/dist/{node-cli-BYzjxmUY.js → node-cli-5iXUaDT9.js} +9 -9
  155. package/dist/{node-cli-CgeiQGbv.js → node-cli-DSUpeTtk.js} +9 -9
  156. package/dist/{nodes-cli-DaE0WsOH.js → nodes-cli-CL3fJ2QY.js} +6 -6
  157. package/dist/{nodes-cli-kNOtp0U0.js → nodes-cli-mEb-ibX8.js} +6 -6
  158. package/dist/{npm-resolution-Dz95V6fj.js → npm-resolution-BKPKKKLt.js} +2 -2
  159. package/dist/{npm-resolution-CPEoaDTw.js → npm-resolution-BpQ2o-Eh.js} +2 -2
  160. package/dist/{onboard-Dx-J8Bes.js → onboard-BiT3YReS.js} +5 -5
  161. package/dist/{onboard-DnGowokw.js → onboard-C9KRYbrH.js} +5 -5
  162. package/dist/{onboard-channels-rnRb5koA.js → onboard-channels-C6b-o1TK.js} +7 -7
  163. package/dist/{onboard-channels-CU5VwTMC.js → onboard-channels-_XLjSBKm.js} +7 -7
  164. package/dist/{onboard-custom-BjUK6yP5.js → onboard-custom-Cm5FRAaS.js} +4 -4
  165. package/dist/{onboard-custom-DUbzMMu7.js → onboard-custom-wmVFQd-a.js} +4 -4
  166. package/dist/{onboard-helpers-mzy38DiC.js → onboard-helpers-Blxjx6R6.js} +2 -2
  167. package/dist/{onboard-helpers-DWivfzcc.js → onboard-helpers-_Uk9P3FF.js} +2 -2
  168. package/dist/{onboard-remote-LCBHijVE.js → onboard-remote-DJBcK1iW.js} +1 -1
  169. package/dist/{onboard-remote-BMo2C9Ae.js → onboard-remote-TrgT7-d-.js} +1 -1
  170. package/dist/{onboard-skills-jFY9gaOu.js → onboard-skills-0BoJ3j2d.js} +2 -2
  171. package/dist/{onboard-skills-BrqATIYg.js → onboard-skills-B4JdKnJU.js} +2 -2
  172. package/dist/{onboarding-5FnIgrWy.js → onboarding-BfAhtIYl.js} +11 -11
  173. package/dist/{onboarding-ztl5snrV.js → onboarding-By12Oyni.js} +11 -11
  174. package/dist/{onboarding.finalize-DpwZIBVH.js → onboarding.finalize-CAgcobAs.js} +44 -44
  175. package/dist/{onboarding.finalize-CvJCdPZc.js → onboarding.finalize-yL217Gdr.js} +42 -42
  176. package/dist/{onboarding.gateway-config-Btu2gzgr.js → onboarding.gateway-config-B4ylwYxq.js} +4 -4
  177. package/dist/{onboarding.gateway-config-w3C9Yj3B.js → onboarding.gateway-config-BLI76ix9.js} +4 -4
  178. package/dist/{openai-model-default-DTIibBxa.js → openai-model-default-BbYlCp0u.js} +2 -2
  179. package/dist/{openai-model-default-7J6cw1rA.js → openai-model-default-DE2XxWXP.js} +2 -2
  180. package/dist/{outbound-DsfWfy-l.js → outbound-DCyvX0Zh.js} +1 -1
  181. package/dist/{outbound-B8NhUGIW.js → outbound-DQ6Daf8g.js} +1 -1
  182. package/dist/{outbound-BNh6PpQb.js → outbound-Dq9yoBDJ.js} +1 -1
  183. package/dist/{outbound-DPTxwchq.js → outbound-ND4beS15.js} +1 -1
  184. package/dist/{pairing-cli-C3wlSGJS.js → pairing-cli-DIao23uO.js} +3 -3
  185. package/dist/{pairing-cli-jwx6hMsM.js → pairing-cli-xrJSpYpo.js} +3 -3
  186. package/dist/{pairing-labels-ChQJzbS9.js → pairing-labels-CLdV_RlM.js} +1 -1
  187. package/dist/{pairing-labels-D7xcHkxi.js → pairing-labels-DWdqhnXA.js} +1 -1
  188. package/dist/{pairing-store-CPpEEQJO.js → pairing-store-5ej7ieCd.js} +1 -1
  189. package/dist/{pairing-store-DvJNQFGP.js → pairing-store-tS6wAx5_.js} +1 -1
  190. package/dist/{pi-embedded-BYtUxbhJ.js → pi-embedded-BfPWx2YM.js} +48 -48
  191. package/dist/{pi-embedded-helpers-BcqMIiDW.js → pi-embedded-helpers-CuaLvLFa.js} +1 -1
  192. package/dist/{pi-embedded-helpers-CyTpDKo5.js → pi-embedded-helpers-DBkYJKhY.js} +7 -7
  193. package/dist/{pi-embedded-helpers-BCsfqpDt.js → pi-embedded-helpers-DYnSUWtr.js} +1 -1
  194. package/dist/{pi-embedded-helpers-C2j0LfJC.js → pi-embedded-helpers-Ts8Hdurw.js} +7 -7
  195. package/dist/{pi-embedded-CIJj8Clt.js → pi-embedded-tWfE4dVB.js} +53 -53
  196. package/dist/{pi-model-discovery-Bb__OY-j.js → pi-model-discovery-BMRRgVlz.js} +1 -1
  197. package/dist/{pi-model-discovery-Dic-M5qw.js → pi-model-discovery-BwF_em5R.js} +1 -1
  198. package/dist/{pi-model-discovery-BIP3RjXl.js → pi-model-discovery-CjpIIOVJ.js} +1 -1
  199. package/dist/{pi-model-discovery-DM-7bLbH.js → pi-model-discovery-DSGYVXZ_.js} +1 -1
  200. package/dist/{pi-tools.policy-DfITIKZj.js → pi-tools.policy-BYXViqHJ.js} +3 -3
  201. package/dist/{pi-tools.policy-J6sS49Ac.js → pi-tools.policy-DfRwnwaU.js} +3 -3
  202. package/dist/{plugin-auto-enable-dpNitoNd.js → plugin-auto-enable-Bqk5Vib2.js} +1 -1
  203. package/dist/{plugin-auto-enable-7DUxMy6A.js → plugin-auto-enable-DyNeRjEL.js} +1 -1
  204. package/dist/{plugin-registry-BCBZDFZm.js → plugin-registry-7DC8-ZZJ.js} +2 -2
  205. package/dist/{plugin-registry-CY9YBaxv.js → plugin-registry-ZgC7HA0z.js} +2 -2
  206. package/dist/plugin-sdk/{agent-via-gateway-RUSmiQPF.js → agent-via-gateway-C9v2r0O2.js} +21 -21
  207. package/dist/plugin-sdk/{anton-BluQsLu2.js → anton-7I_gkw4v.js} +190 -7
  208. package/dist/plugin-sdk/{api-key-rotation-D6nK54XH.js → api-key-rotation-BUIqfXnG.js} +1 -1
  209. package/dist/plugin-sdk/{audio-preflight-CKqqN8ty.js → audio-preflight-URcQAxhH.js} +9 -9
  210. package/dist/plugin-sdk/{channel-web-Dn0OzSFP.js → channel-web-B7qyJbrs.js} +9 -9
  211. package/dist/plugin-sdk/{chrome-Cb9FgiCI.js → chrome-CPVAOm0b.js} +1 -1
  212. package/dist/plugin-sdk/commands/anton.d.ts +30 -0
  213. package/dist/plugin-sdk/{commands-registry-B5m2EsHz.js → commands-registry-DQCQbF8W.js} +1 -1
  214. package/dist/plugin-sdk/config/types.anton.d.ts +15 -0
  215. package/dist/plugin-sdk/config/zod-schema.d.ts +8 -0
  216. package/dist/plugin-sdk/{config-CEgzwk0J.js → config-04otsq-i.js} +17 -0
  217. package/dist/plugin-sdk/{deliver-BNfMF0Nb.js → deliver-DfopPK17.js} +3 -3
  218. package/dist/plugin-sdk/{deps-C8qACokW.js → deps-Gj9jRY77.js} +6 -6
  219. package/dist/plugin-sdk/{emergency-stop-DylRK_E8.js → emergency-stop-B7_VgSkO.js} +21 -21
  220. package/dist/plugin-sdk/{image-C_1tftC8.js → image-B-gM6mxU.js} +3 -3
  221. package/dist/plugin-sdk/index.js +25 -25
  222. package/dist/plugin-sdk/{login-DIwO5D5Y.js → login-Bpe2s20d.js} +2 -2
  223. package/dist/plugin-sdk/{login-qr-CpCAJuvT.js → login-qr-C9ndp3tg.js} +2 -2
  224. package/dist/plugin-sdk/{manager-Dox9r7og.js → manager-CBBlTnh3.js} +2 -2
  225. package/dist/plugin-sdk/{outbound-Dx_q6JAI.js → outbound-D6g6crrp.js} +1 -1
  226. package/dist/plugin-sdk/{pi-embedded-helpers-B68z4sHq.js → pi-embedded-helpers-D48bhP-9.js} +7 -7
  227. package/dist/plugin-sdk/{pi-model-discovery-Dt6899be.js → pi-model-discovery-DCBTaRzI.js} +1 -1
  228. package/dist/plugin-sdk/{pw-ai-Dk2PTZzq.js → pw-ai-YGZXROMl.js} +2 -2
  229. package/dist/plugin-sdk/{replies-ZovJp-3F.js → replies-DXdzWcMN.js} +1 -1
  230. package/dist/plugin-sdk/{reply-DhycbFxW.js → reply-nvcQV3Q_.js} +48 -48
  231. package/dist/plugin-sdk/{runner-CZz1tOIR.js → runner-C2xaoYAR.js} +4 -4
  232. package/dist/plugin-sdk/{send-0EVlThEG.js → send-BgTqMJLI.js} +1 -1
  233. package/dist/plugin-sdk/{send-Cb5NIN8s.js → send-CFkuTXvq.js} +1 -1
  234. package/dist/plugin-sdk/{send-B26cNPqY.js → send-CKQ89Lq9.js} +1 -1
  235. package/dist/plugin-sdk/{send-BCjVQhp3.js → send-CRhcec-_.js} +1 -1
  236. package/dist/plugin-sdk/{send-CHUGIZs9.js → send-dmYAtUT5.js} +1 -1
  237. package/dist/plugin-sdk/{session-DdJj6_DW.js → session-OpE6SSAs.js} +1 -1
  238. package/dist/plugin-sdk/{sessions-DNx9c2O2.js → sessions-CG-k8Acv.js} +1 -1
  239. package/dist/plugin-sdk/{skill-commands-DorIK8kn.js → skill-commands-BHBpmuX9.js} +2 -2
  240. package/dist/plugin-sdk/{skills-Dh_Cf2PA.js → skills-33Wy6_4b.js} +1 -1
  241. package/dist/plugin-sdk/{web-yryYzFPs.js → web-BzOC1x6m.js} +25 -25
  242. package/dist/plugin-sdk/{whatsapp-actions-B5g-Rywy.js → whatsapp-actions-Cp6vXAA8.js} +2 -2
  243. package/dist/{plugins-cli-c-YfMlpn.js → plugins-cli-DACLE21S.js} +39 -39
  244. package/dist/{plugins-cli-BLcXY9sR.js → plugins-cli-kePQvJ9L.js} +40 -40
  245. package/dist/{program-IXAxx4y-.js → program-VV9u5uPU.js} +45 -45
  246. package/dist/{program-context-lbXboD45.js → program-context-j94K3IXR.js} +41 -41
  247. package/dist/{prompt-select-styled-D1foahBO.js → prompt-select-styled-BH51ROGD.js} +14 -14
  248. package/dist/{prompt-select-styled-C9ZBkTHU.js → prompt-select-styled-BSqCn36X.js} +14 -14
  249. package/dist/{provider-auth-helpers-CKJG35W4.js → provider-auth-helpers-BAB3PaaB.js} +4 -4
  250. package/dist/{provider-auth-helpers-Q2ZCYpBX.js → provider-auth-helpers-DMSF8Mhq.js} +4 -4
  251. package/dist/{push-apns-DM5pSWEU.js → push-apns-CGUwMKT-.js} +1 -1
  252. package/dist/{push-apns-DbZAasNF.js → push-apns-Cou7KeCj.js} +1 -1
  253. package/dist/{pw-ai-CowTfhOG.js → pw-ai-5GRjEp4v.js} +2 -2
  254. package/dist/{pw-ai--4qz5XUT.js → pw-ai-7Rl1yyuE.js} +2 -2
  255. package/dist/{pw-ai-7i9eGnLh.js → pw-ai-BWOU9Pu8.js} +2 -2
  256. package/dist/{pw-ai-DjmrIQle.js → pw-ai-YklTVbF6.js} +2 -2
  257. package/dist/{qr-cli-BfDlL102.js → qr-cli-4S9V14XL.js} +1 -1
  258. package/dist/{qr-cli-CSt5ihwG.js → qr-cli-DW6okXOt.js} +1 -1
  259. package/dist/{redact-snapshot-K5EFkIbD.js → redact-snapshot-BE1mpVLb.js} +1 -1
  260. package/dist/{redact-snapshot-BbEVKv0k.js → redact-snapshot-Dz__XA1n.js} +1 -1
  261. package/dist/{register.agent-BObt1WS1.js → register.agent-ColbJEk3.js} +52 -52
  262. package/dist/{register.agent-CMgUOruT.js → register.agent-YCGBKv-d.js} +54 -54
  263. package/dist/{register.configure-BSoAZhfz.js → register.configure-C5g7670Q.js} +55 -55
  264. package/dist/{register.configure-B3lElmGa.js → register.configure-CfUo6nvs.js} +54 -54
  265. package/dist/{register.maintenance-0PNfXeOc.js → register.maintenance-53FGiO0K.js} +44 -44
  266. package/dist/{register.maintenance-mxkecZ9A.js → register.maintenance-CBNoQia-.js} +46 -46
  267. package/dist/{register.message-D7VHunA0.js → register.message-0nKlUSrH.js} +39 -39
  268. package/dist/{register.message-Dr4UBjNt.js → register.message-CaFp4DAP.js} +38 -38
  269. package/dist/{register.onboard-Xh9xW0hH.js → register.onboard-B3NgvEwe.js} +6 -6
  270. package/dist/{register.onboard-BvDwJMC5.js → register.onboard-B9IJ3wUe.js} +6 -6
  271. package/dist/{register.orchestrator-anton-DShH4ce_.js → register.orchestrator-anton-Cxnh52UP.js} +5 -3
  272. package/dist/{register.orchestrator-anton-CObXxmuY.js → register.orchestrator-anton-HIi6nBvo.js} +5 -3
  273. package/dist/{register.setup-d2XyhTY9.js → register.setup-DyxAeyO2.js} +6 -6
  274. package/dist/{register.setup-BxsKZdfB.js → register.setup-y7C2w79N.js} +6 -6
  275. package/dist/{register.status-health-sessions-CADZZQMe.js → register.status-health-sessions-5wREP3Tq.js} +40 -40
  276. package/dist/{register.status-health-sessions-wyNUhSbK.js → register.status-health-sessions-DbzCxLhd.js} +42 -42
  277. package/dist/{register.subclis-Bh3Lakik.js → register.subclis-BEDdoF6M.js} +30 -30
  278. package/dist/{replies-CqYEEgmA.js → replies-B7WhS1HA.js} +1 -1
  279. package/dist/{replies-hSFVxL4h.js → replies-Bt95GAew.js} +1 -1
  280. package/dist/{replies-DSfpze17.js → replies-CmTF3tWU.js} +1 -1
  281. package/dist/{replies-6_GxvQYe.js → replies-uBXwI7WM.js} +1 -1
  282. package/dist/{reply-AI4n5V-o.js → reply-vDM22Gez.js} +61 -61
  283. package/dist/{rpc-DVTovtI3.js → rpc-CMNAfygK.js} +1 -1
  284. package/dist/{rpc-Cf9OK5Yk.js → rpc-CMsWQyaU.js} +1 -1
  285. package/dist/{run-main-DNLZvSB0.js → run-main-BKjpcqq8.js} +56 -56
  286. package/dist/{runner-DzszLzI4.js → runner-B4uTxrBK.js} +4 -4
  287. package/dist/{runner-BzNdfqDz.js → runner-Cy6GWdoL.js} +4 -4
  288. package/dist/{runner-D5gs_QqR.js → runner-SFVMFRne.js} +4 -4
  289. package/dist/{runner-CZW_eyf2.js → runner-upvvkv9R.js} +4 -4
  290. package/dist/{runtime-XmXLaHNk.js → runtime-DkR7DBA9.js} +1 -1
  291. package/dist/{runtime-BsH_IMcC.js → runtime-jH9YW2Qo.js} +1 -1
  292. package/dist/{sandbox-DcUw5h3p.js → sandbox-DK406zbE.js} +4 -4
  293. package/dist/{sandbox-BQ8eMycK.js → sandbox-R6BNCb8U.js} +4 -4
  294. package/dist/{sandbox-cli-DGvJ7Eeq.js → sandbox-cli-B10NHfQH.js} +5 -5
  295. package/dist/{sandbox-cli-wADF8Onf.js → sandbox-cli-CSgvIBt_.js} +5 -5
  296. package/dist/{secrets-cli-CR3h2TBy.js → secrets-cli-Cokf0tpp.js} +4 -4
  297. package/dist/{secrets-cli-C4UBK_LV.js → secrets-cli-D5Bfk0F1.js} +4 -4
  298. package/dist/{security-cli-an5u-5Jb.js → security-cli-Cv8B8hpq.js} +11 -11
  299. package/dist/{security-cli-B9_LV2po.js → security-cli-DUiv53se.js} +11 -11
  300. package/dist/{send-JuOIPWeK.js → send-B2Zs7YK0.js} +1 -1
  301. package/dist/{send-DQiw_nGD.js → send-Bn6Z3ngH.js} +1 -1
  302. package/dist/{send-BeIZJuy4.js → send-BskvGZej.js} +1 -1
  303. package/dist/{send-DmLC7aEF.js → send-C4z2HAbE.js} +1 -1
  304. package/dist/{send-D8lazhp4.js → send-C6jLYg5Y.js} +1 -1
  305. package/dist/{send-Cn2wvd3W.js → send-CIr3q6Nq.js} +1 -1
  306. package/dist/{send-C4v0Leny.js → send-CcZKZfWf.js} +1 -1
  307. package/dist/{send-D4bMycQu.js → send-Ce_lAnef.js} +1 -1
  308. package/dist/{send-DwdHiC7_.js → send-CkbYe0pP.js} +1 -1
  309. package/dist/{send-DLZt92Da.js → send-Cro3WBC4.js} +1 -1
  310. package/dist/{send-Dd4xdAHf.js → send-CtNJPR6u.js} +1 -1
  311. package/dist/{send-m4lQkQcY.js → send-CuXAB8LA.js} +1 -1
  312. package/dist/{send-PtDa6Pf-.js → send-D2eoLkFV.js} +2 -2
  313. package/dist/{send-YcXS-UZJ.js → send-Df8cWzZN.js} +1 -1
  314. package/dist/{send-C1hvd3bt.js → send-DvjrOg1z.js} +1 -1
  315. package/dist/{send-DuwdEkLw.js → send-WkuVWNS6.js} +1 -1
  316. package/dist/{send--lzpNy4f.js → send-gOQxsu3X.js} +2 -2
  317. package/dist/{send-CCiDIuX4.js → send-lf9ld4To.js} +1 -1
  318. package/dist/{send-J10cQN4A.js → send-p_pDuU90.js} +1 -1
  319. package/dist/{send-Dfa3sn6r.js → send-rp8dzIy4.js} +1 -1
  320. package/dist/{server-D6MltJIF.js → server-CTZVIJFZ.js} +5 -5
  321. package/dist/{server-Bur-9ZhI.js → server-DbXkrhq1.js} +5 -5
  322. package/dist/{server-context-DI0W_H7R.js → server-context-CSswoHXT.js} +5 -5
  323. package/dist/{server-context-ti-OcXbo.js → server-context-DhxP9N-Q.js} +5 -5
  324. package/dist/{server-lifecycle-B5PlrlbG.js → server-lifecycle-D0GRRDF1.js} +2 -2
  325. package/dist/{server-lifecycle-YVb_AavG.js → server-lifecycle-DMOhxIYC.js} +2 -2
  326. package/dist/{server-node-events-B9rufyZR.js → server-node-events-B7IQ1nzZ.js} +39 -39
  327. package/dist/{server-node-events-DPeIs1oo.js → server-node-events-CraqSZJR.js} +38 -38
  328. package/dist/{session-F_YDS_1V.js → session-BbwP0jac.js} +1 -1
  329. package/dist/{session-DRN3VnUX.js → session-BsR-Pdqr.js} +1 -1
  330. package/dist/{session-utils-D-GIguA5.js → session-utils-CXqvJ-FS.js} +4 -4
  331. package/dist/{sessions-CMPLp2Qo.js → sessions-BX54QvHf.js} +3 -3
  332. package/dist/{sessions-BoqJKVEs.js → sessions-C1PbgPkg.js} +1 -1
  333. package/dist/{sessions-3ioSeOA1.js → sessions-DA2oWrdb.js} +1 -1
  334. package/dist/{sessions-BtPXimXQ.js → sessions-DUD0izIj.js} +1 -1
  335. package/dist/{sessions-B7gFq6Ia.js → sessions-DantNdwl.js} +1 -1
  336. package/dist/{shared-j17RyGsM.js → shared-DuAKpPuv.js} +1 -1
  337. package/dist/{shared-CpDPo3hJ.js → shared-MZ5J3-zw.js} +1 -1
  338. package/dist/{skill-commands-BFzmZAfo.js → skill-commands-23SP2OFQ.js} +1 -1
  339. package/dist/{skill-commands-Ck3flWX7.js → skill-commands-AySApC-2.js} +2 -2
  340. package/dist/{skill-commands-BUc0PzZG.js → skill-commands-DVNT_9nw.js} +1 -1
  341. package/dist/{skill-commands-CHpRgsOw.js → skill-commands-rG2AXHaN.js} +2 -2
  342. package/dist/{skills-CnAPWfca.js → skills-B3wf7ZnA.js} +1 -1
  343. package/dist/{skills-nQcWk6Z6.js → skills-BRqZp2IE.js} +1 -1
  344. package/dist/{skills-cli-BhKGhjbO.js → skills-cli-CMAkGI9B.js} +1 -1
  345. package/dist/{skills-cli-CTNGo2bb.js → skills-cli-DwBtXdc8.js} +1 -1
  346. package/dist/{status-CvtDDIW9.js → status-D9fTji6b.js} +10 -10
  347. package/dist/{status-rvywYmZR.js → status-ZUnD4Pgf.js} +9 -9
  348. package/dist/{subagent-registry-D7Dwl-dH.js → subagent-registry-l7V3IoLe.js} +61 -61
  349. package/dist/{system-cli-Dd-gBN0t.js → system-cli-BVicV25o.js} +3 -3
  350. package/dist/{system-cli-DyVZ5udc.js → system-cli-zDsDLfs_.js} +3 -3
  351. package/dist/{system-run-approval-context-CISBXlNw.js → system-run-approval-context-C5Al8NNk.js} +1 -1
  352. package/dist/{system-run-approval-context-DkX3cprL.js → system-run-approval-context-Cyc2bPHL.js} +1 -1
  353. package/dist/{system-run-command-BdQDLhIq.js → system-run-command-DlUQw1Ts.js} +1 -1
  354. package/dist/{system-run-command-qJdgzxLp.js → system-run-command-P86Xjnl8.js} +1 -1
  355. package/dist/{tui-Bne3YNiw.js → tui-CgvwVqsn.js} +4 -4
  356. package/dist/{tui-cli-BWnIeq57.js → tui-cli-DhfifWta.js} +9 -9
  357. package/dist/{tui-cli-D0Z-rcUe.js → tui-cli-DvGkY-0r.js} +9 -9
  358. package/dist/{tui-2u2ZDhHV.js → tui-vyXW-Y-w.js} +4 -4
  359. package/dist/{update-cli-Bofvelva.js → update-cli-CMn89gww.js} +46 -46
  360. package/dist/{update-cli-DaGTiqso.js → update-cli-D02DhEE9.js} +48 -48
  361. package/dist/{update-runner-4txNUERu.js → update-runner-BSsZSlwa.js} +1 -1
  362. package/dist/{update-runner-B9mGXrK4.js → update-runner-C44em-38.js} +1 -1
  363. package/dist/{web-D3gEaA39.js → web-CiVRDtta.js} +40 -40
  364. package/dist/{web-BsIp9miY.js → web-DLIXLq_L.js} +26 -26
  365. package/dist/{web-JPsGpVZ5.js → web-Dkl33QN0.js} +26 -26
  366. package/dist/{web-DhiwmDh8.js → web-bCfwH31U.js} +41 -41
  367. package/dist/{webhooks-cli-2N03q0iY.js → webhooks-cli-Dwaws-Cr.js} +1 -1
  368. package/dist/{webhooks-cli-B1Q17vgO.js → webhooks-cli-yxfejvro.js} +1 -1
  369. package/dist/{whatsapp-actions-B6ywlSWe.js → whatsapp-actions-BLJFRb_Y.js} +2 -2
  370. package/dist/{whatsapp-actions-SxRgcoE4.js → whatsapp-actions-CYf59nMi.js} +2 -2
  371. package/dist/{whatsapp-actions-DbPcN6JQ.js → whatsapp-actions-C_BWc4tJ.js} +2 -2
  372. package/dist/{whatsapp-actions-Cms8wQM1.js → whatsapp-actions-jkbTRdcs.js} +2 -2
  373. package/dist/{with-timeout-DEdycYxq.js → with-timeout-DCVS-tFj.js} +3 -3
  374. package/dist/{with-timeout-B-p7asBh.js → with-timeout-qsZTfZ5k.js} +3 -3
  375. package/package.json +1 -1
@@ -1,5 +1,6 @@
1
1
  import "./paths-BQL7-SbN.js";
2
2
  import { t as CONFIG_DIR } from "./utils-DWJR1fcE.js";
3
+ import { o as normalizeThinkLevel } from "./thinking-BFsWfunr.js";
3
4
  import path from "node:path";
4
5
  import { promisify } from "node:util";
5
6
  import fs from "node:fs/promises";
@@ -142,7 +143,12 @@ function parsePendingTasksFromJson(jsonText) {
142
143
  jsonPath
143
144
  });
144
145
  };
145
- if (data && typeof data === "object") {
146
+ if (Array.isArray(data)) for (let i = 0; i < data.length; i++) {
147
+ const task = data[i];
148
+ if (!task || typeof task !== "object") continue;
149
+ pushTask([i], task);
150
+ }
151
+ else if (data && typeof data === "object") {
146
152
  const root = data;
147
153
  const tasks = root.tasks;
148
154
  if (Array.isArray(tasks)) for (let i = 0; i < tasks.length; i++) {
@@ -316,9 +322,146 @@ function buildImplementationRetryPrompt(task, planFilePath, opts) {
316
322
  "If you only provide analysis/diff text without edit/write tool calls, this attempt fails."
317
323
  ].join("\n");
318
324
  }
325
+ const CODEBASE_CONTEXT_FILENAME = "CODEBASE_CONTEXT.md";
326
+ function buildCodebaseAnalysisPrompt(workspaceDir, outputFile) {
327
+ return `You are analyzing a codebase to create a context document for other agents.
328
+
329
+ ## YOUR JOB
330
+ Create a comprehensive codebase context file that other agents can use to understand
331
+ the project without re-reading the same files repeatedly.
332
+
333
+ ## OUTPUT
334
+ Write to: ${outputFile}
335
+
336
+ ## WHAT TO INCLUDE
337
+ 1. **Project Type & Framework** - Examine package.json, composer.json, Cargo.toml, etc.
338
+ 2. **Directory Structure** - Key folders only (src/, app/, tests/, etc.)
339
+ 3. **Testing Patterns** - Examine 2-3 existing test files to understand conventions:
340
+ - Test file naming and location
341
+ - Common imports and setup
342
+ - Assertion patterns
343
+ - How to run tests
344
+ 4. **Code Patterns** - Common patterns used in the codebase
345
+ 5. **Key Files Reference** - Map controllers/modules to their test files
346
+ 6. **API Routes** (if applicable) - Summary of endpoints
347
+
348
+ ## HOW TO DO IT
349
+ 1. Use exec to explore: \`find . -type f -name "*.php" | head -30\` (adjust extension as needed)
350
+ 2. Read 2-3 representative test files to understand patterns
351
+ 3. Read the main routes/config file
352
+ 4. Synthesize into a clean markdown document
353
+
354
+ ## CONSTRAINTS
355
+ - Keep output under 1500 lines
356
+ - Focus on PATTERNS, not exhaustive file listings
357
+ - Include actual code snippets for test patterns (they help other agents write consistent tests)
358
+ - Do NOT include node_modules, vendor, or other dependency directories
359
+
360
+ After writing the file, return: {"status":"complete","filename":"${outputFile}"}`;
361
+ }
362
+ function buildDiscoveryPromptWithContext(task, taskFile, planFilePath, codebaseContext) {
363
+ return `You are a coding assistant running discovery for a task orchestrator.
364
+
365
+ ${codebaseContext ? `## CODEBASE CONTEXT (pre-analyzed)
366
+ The following context was pre-computed to save you time. Use it instead of re-reading files.
367
+
368
+ ${codebaseContext}
369
+
370
+ ---
371
+
372
+ ` : ""}## YOUR JOB
373
+ Analyze the codebase and write a detailed implementation plan to a file.
374
+ You will NOT implement anything yourself — a separate agent will do that using your plan.
375
+
376
+ ## TASK
377
+ From task file: ${taskFile}
378
+ Task: ${task}
379
+
380
+ ## WHAT YOU MUST DO
381
+
382
+ ${codebaseContext ? "1. Use the context above — only read additional files if the context is missing specific information you need." : "1. Use the read tool to examine relevant source files, configs, tests, and docs."}
383
+ 2. Understand what currently exists and what needs to change.
384
+ 3. Use the write tool to create the plan file at: ${planFilePath}
385
+
386
+ The plan file MUST contain:
387
+ - The task description
388
+ - What currently exists (files you read, current behavior)
389
+ - What specifically needs to change and why
390
+ - Step-by-step implementation instructions (specific enough that another agent can follow them)
391
+ - Which files to modify or create, with the exact changes needed
392
+ - How to verify the changes work (test commands, expected output)
393
+
394
+ 4. After writing the plan file, return ONLY this JSON:
395
+ {"status":"incomplete","filename":"${planFilePath}"}
396
+
397
+ If you are CERTAIN the task is already complete (you verified with tools), return:
398
+ {"status":"complete","filename":""}
399
+
400
+ ## IMPORTANT
401
+ - You MUST use tools (read, exec, write). Do not skip straight to returning JSON.
402
+ - Do not modify any source files other than the plan file above.
403
+ - The quality of your plan directly determines whether the task succeeds.`;
404
+ }
405
+ async function runCodebaseAnalysis(args) {
406
+ const contextFile = path.join(args.planDir, CODEBASE_CONTEXT_FILENAME);
407
+ await ensurePlanDir(args.planDir);
408
+ const startTime = Date.now();
409
+ await args.notify({ phase: "codebase_analysis_start" });
410
+ const sessionId = `anton-codebase-analysis-${Date.now()}`;
411
+ try {
412
+ await runAgentTask({
413
+ message: buildCodebaseAnalysisPrompt(args.workspaceDir, contextFile),
414
+ sessionId,
415
+ timeout: args.timeout,
416
+ agent: args.agent,
417
+ to: args.to,
418
+ runtime: args.runtime,
419
+ deps: args.deps,
420
+ workspaceDir: args.workspaceDir
421
+ });
422
+ try {
423
+ const stat = await fs.stat(contextFile);
424
+ if (stat.isFile() && stat.size > 100) {
425
+ const context = await fs.readFile(contextFile, "utf8");
426
+ const durationMs = Date.now() - startTime;
427
+ await args.notify({
428
+ phase: "codebase_analysis_complete",
429
+ contextFile,
430
+ durationMs
431
+ });
432
+ return {
433
+ success: true,
434
+ contextFile,
435
+ context
436
+ };
437
+ }
438
+ } catch {}
439
+ const error = "Codebase analysis did not produce a valid context file";
440
+ await args.notify({
441
+ phase: "codebase_analysis_failed",
442
+ error
443
+ });
444
+ return {
445
+ success: false,
446
+ error
447
+ };
448
+ } catch (err) {
449
+ const error = err instanceof Error ? err.message : String(err);
450
+ await args.notify({
451
+ phase: "codebase_analysis_failed",
452
+ error
453
+ });
454
+ return {
455
+ success: false,
456
+ error
457
+ };
458
+ }
459
+ }
319
460
  function resolveAntonExecutionConfig(params) {
320
461
  const antonCfg = params.config ?? {};
321
462
  const preflightCfg = antonCfg.preflight ?? {};
463
+ const thinkingCfg = antonCfg.thinking ?? {};
464
+ const preflightThinkingCfg = thinkingCfg.preflight ?? {};
322
465
  const requestedMode = params.modeOverride ?? antonCfg.mode ?? "direct";
323
466
  const mode = requestedMode === "preflight" && preflightCfg.enabled === false ? "direct" : requestedMode;
324
467
  const taskTimeoutSec = antonCfg.taskTimeoutSec ?? 1200;
@@ -328,7 +471,11 @@ function resolveAntonExecutionConfig(params) {
328
471
  taskTimeoutSec,
329
472
  discoveryTimeoutSec: antonCfg.discoveryTimeoutSec ?? preflightCfg.discoveryTimeoutSec ?? taskTimeoutSec,
330
473
  reviewTimeoutSec: antonCfg.reviewTimeoutSec ?? preflightCfg.reviewTimeoutSec ?? taskTimeoutSec,
331
- preflightMaxRetries: antonCfg.preflightMaxRetries ?? preflightCfg.maxRetries ?? 2
474
+ preflightMaxRetries: antonCfg.preflightMaxRetries ?? preflightCfg.maxRetries ?? 2,
475
+ directThinkLevel: thinkingCfg.direct,
476
+ preflightPhase1ThinkLevel: preflightThinkingCfg.phase1,
477
+ preflightPhase2ThinkLevel: preflightThinkingCfg.phase2,
478
+ codebaseSnapshot: preflightCfg.codebaseSnapshot ?? true
332
479
  };
333
480
  }
334
481
  function formatDuration(ms) {
@@ -341,6 +488,9 @@ function formatDuration(ms) {
341
488
  }
342
489
  function formatProgressMessage(event) {
343
490
  switch (event.phase) {
491
+ case "codebase_analysis_start": return "🔬 **Analyzing codebase** — building context for faster discovery...";
492
+ case "codebase_analysis_complete": return `📚 Codebase context ready (\`${path.basename(event.contextFile)}\`, ${formatDuration(event.durationMs)})`;
493
+ case "codebase_analysis_failed": return `⚠️ Codebase analysis failed: ${event.error}\n└ Falling back to per-task discovery`;
344
494
  case "start": return `🤚 **Anton activated**\n📄 Task file: \`${path.basename(event.taskFile)}\`\n📋 ${event.totalTasks} task${event.totalTasks === 1 ? "" : "s"} pending`;
345
495
  case "task_start": return `\n🔪 **Task ${event.index}/${event.total}**: ${event.task}`;
346
496
  case "discovery_start": return `🔎 Discovery: analyzing codebase for task ${event.index}/${event.total}...`;
@@ -388,20 +538,21 @@ async function antonStop(runtime) {
388
538
  /** Load Anton config from the IdleHands config file. */
389
539
  async function loadAntonConfig() {
390
540
  try {
391
- const { loadConfig } = await import("./model-selection-D3Jhcvg-.js").then((n) => n.F);
541
+ const { loadConfig } = await import("./model-selection-BCfCq125.js").then((n) => n.F);
392
542
  return loadConfig().anton ?? {};
393
543
  } catch {
394
544
  return {};
395
545
  }
396
546
  }
397
547
  async function runAgentTask(args) {
398
- const { agentCliCommand } = await import("./agent-via-gateway-BMsMjnWe.js");
548
+ const { agentCliCommand } = await import("./agent-via-gateway-OzQZlQpB.js");
399
549
  const extraSystemPrompt = args.workspaceDir ? `Your working directory is: ${args.workspaceDir}\nAll file paths are relative to this directory. Use this as your cwd for all operations.` : void 0;
400
550
  const result = await agentCliCommand({
401
551
  message: args.message,
402
552
  agent: args.agent,
403
553
  to: args.to,
404
554
  sessionId: args.sessionId,
555
+ thinking: args.thinking,
405
556
  timeout: args.timeout,
406
557
  json: true,
407
558
  deliver: false,
@@ -566,9 +717,10 @@ async function runDiscoveryPhase(args) {
566
717
  await hardCleanRepo(discoveryRepoCwd);
567
718
  await ensureRepoCleanOrThrow(discoveryRepoCwd);
568
719
  const firstPass = await runAgentTask({
569
- message: buildDiscoveryPrompt(formatTaskForPrompt(args.task), args.taskFile, planFile),
720
+ message: args.codebaseContext ? buildDiscoveryPromptWithContext(formatTaskForPrompt(args.task), args.taskFile, planFile, args.codebaseContext) : buildDiscoveryPrompt(formatTaskForPrompt(args.task), args.taskFile, planFile),
570
721
  sessionId,
571
722
  timeout: args.timeout,
723
+ thinking: args.thinking,
572
724
  agent: args.agent,
573
725
  to: args.to,
574
726
  runtime: args.runtime,
@@ -640,6 +792,7 @@ async function runDiscoveryPhase(args) {
640
792
  message: buildDiscoveryRepairPrompt(formatTaskForPrompt(args.task), args.taskFile, declaredPlanFile),
641
793
  sessionId: repairSessionId,
642
794
  timeout: args.timeout,
795
+ thinking: args.thinking,
643
796
  agent: args.agent,
644
797
  to: args.to,
645
798
  runtime: args.runtime,
@@ -742,6 +895,7 @@ async function runReviewPhase(args) {
742
895
  message: buildReviewPrompt(args.planFile),
743
896
  sessionId,
744
897
  timeout: args.timeout,
898
+ thinking: args.thinking,
745
899
  agent: args.agent,
746
900
  to: args.to,
747
901
  runtime: args.runtime,
@@ -807,14 +961,20 @@ async function runAnton(args) {
807
961
  config: antonCfg,
808
962
  modeOverride: args.mode
809
963
  });
964
+ const cliThinkingOverride = normalizeThinkLevel(args.thinking);
965
+ if (args.thinking && !cliThinkingOverride) throw new Error("Invalid --thinking level. Use one of: off, minimal, low, medium, high, xhigh.");
810
966
  const mode = execution.mode;
811
967
  const requirementsReview = execution.requirementsReview;
812
968
  const taskTimeout = execution.taskTimeoutSec;
813
969
  const discoveryTimeout = execution.discoveryTimeoutSec;
814
970
  const reviewTimeout = execution.reviewTimeoutSec;
815
971
  const preflightMaxRetries = execution.preflightMaxRetries;
972
+ const directThinkLevel = cliThinkingOverride ?? execution.directThinkLevel;
973
+ const preflightPhase1ThinkLevel = cliThinkingOverride ?? execution.preflightPhase1ThinkLevel;
974
+ const preflightPhase2ThinkLevel = cliThinkingOverride ?? execution.preflightPhase2ThinkLevel;
975
+ const codebaseSnapshot = execution.codebaseSnapshot;
816
976
  const planDir = antonCfg.planDir ? path.resolve(antonCfg.planDir) : path.resolve(path.dirname(filePath), ".agents", "tasks");
817
- const { loadConfig } = await import("./model-selection-D3Jhcvg-.js").then((n) => n.F);
977
+ const { loadConfig } = await import("./model-selection-BCfCq125.js").then((n) => n.F);
818
978
  const cfg = loadConfig();
819
979
  const defaultTimeout = String(Number.isFinite(args.timeoutSec) && (args.timeoutSec ?? 0) > 0 ? args.timeoutSec : cfg.agents?.defaults?.timeoutSeconds ?? taskTimeout);
820
980
  const repoCwd = args.workspaceDir ? path.resolve(args.workspaceDir) : path.dirname(filePath);
@@ -839,7 +999,24 @@ async function runAnton(args) {
839
999
  args.runtime.log(`[Anton] Mode: ${mode}${mode === "preflight" ? requirementsReview ? " (with review)" : " (discovery → implementation)" : ""}`);
840
1000
  let completed = 0;
841
1001
  let skipped = 0;
1002
+ let codebaseContext;
842
1003
  try {
1004
+ if (mode === "preflight" && codebaseSnapshot) {
1005
+ const analysisResult = await runCodebaseAnalysis({
1006
+ workspaceDir: repoCwd,
1007
+ planDir,
1008
+ timeout: String(discoveryTimeout),
1009
+ agent: args.agent,
1010
+ to: args.to,
1011
+ runtime: args.runtime,
1012
+ deps: args.deps,
1013
+ notify
1014
+ });
1015
+ if (analysisResult.success && analysisResult.context) {
1016
+ codebaseContext = analysisResult.context;
1017
+ args.runtime.log(`[Anton] Codebase context loaded (${analysisResult.context.length} chars)`);
1018
+ } else args.runtime.log("[Anton] Codebase analysis skipped or failed, continuing without context");
1019
+ }
843
1020
  for (let i = 0; i < pending.length; i++) {
844
1021
  if (await shouldStop()) {
845
1022
  args.runtime.log("Anton stop acknowledged.");
@@ -890,13 +1067,15 @@ async function runAnton(args) {
890
1067
  taskFile: filePath,
891
1068
  planDir,
892
1069
  timeout: String(discoveryTimeout),
1070
+ thinking: preflightPhase1ThinkLevel,
893
1071
  maxRetries: preflightMaxRetries,
894
1072
  agent: args.agent,
895
1073
  to: args.to,
896
1074
  runtime: args.runtime,
897
1075
  deps: args.deps,
898
1076
  notify,
899
- workspaceDir: args.workspaceDir
1077
+ workspaceDir: args.workspaceDir,
1078
+ codebaseContext
900
1079
  });
901
1080
  if (discoveryResult.status === "complete") {
902
1081
  await notify({
@@ -933,6 +1112,7 @@ async function runAnton(args) {
933
1112
  total: pending.length,
934
1113
  planFile,
935
1114
  timeout: String(reviewTimeout),
1115
+ thinking: preflightPhase1ThinkLevel,
936
1116
  agent: args.agent,
937
1117
  to: args.to,
938
1118
  runtime: args.runtime,
@@ -959,6 +1139,7 @@ async function runAnton(args) {
959
1139
  sessionId: implSessionId
960
1140
  });
961
1141
  const implPrompt = planFile ? buildImplementationPrompt(taskPromptText, planFile, { skipTests }) : buildDirectTaskPrompt(taskPromptText, { skipTests });
1142
+ const implementationThinkLevel = mode === "preflight" ? preflightPhase2ThinkLevel : directThinkLevel;
962
1143
  const gitCwd = args.workspaceDir ? path.resolve(args.workspaceDir) : path.dirname(filePath);
963
1144
  const taskFileRel = path.relative(gitCwd, filePath).replace(/\\/g, "/");
964
1145
  const changeIgnores = taskFileRel.startsWith("..") ? [] : [taskFileRel];
@@ -968,6 +1149,7 @@ async function runAnton(args) {
968
1149
  message: implPrompt,
969
1150
  sessionId: implSessionId,
970
1151
  timeout: defaultTimeout,
1152
+ thinking: implementationThinkLevel,
971
1153
  agent: args.agent,
972
1154
  to: args.to,
973
1155
  runtime: args.runtime,
@@ -994,6 +1176,7 @@ async function runAnton(args) {
994
1176
  message: buildImplementationRetryPrompt(taskPromptText, planFile ?? "", { skipTests }),
995
1177
  sessionId: retrySessionId,
996
1178
  timeout: defaultTimeout,
1179
+ thinking: implementationThinkLevel,
997
1180
  agent: args.agent,
998
1181
  to: args.to,
999
1182
  runtime: args.runtime,
@@ -1,5 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
2
  import { t as CONFIG_DIR } from "./utils-CXzXXV2o.js";
3
+ import { s as normalizeThinkLevel } from "./thinking-EAliFiVK.js";
3
4
  import path from "node:path";
4
5
  import { promisify } from "node:util";
5
6
  import fs from "node:fs/promises";
@@ -149,7 +150,12 @@ function parsePendingTasksFromJson(jsonText) {
149
150
  jsonPath
150
151
  });
151
152
  };
152
- if (data && typeof data === "object") {
153
+ if (Array.isArray(data)) for (let i = 0; i < data.length; i++) {
154
+ const task = data[i];
155
+ if (!task || typeof task !== "object") continue;
156
+ pushTask([i], task);
157
+ }
158
+ else if (data && typeof data === "object") {
153
159
  const root = data;
154
160
  const tasks = root.tasks;
155
161
  if (Array.isArray(tasks)) for (let i = 0; i < tasks.length; i++) {
@@ -323,9 +329,146 @@ function buildImplementationRetryPrompt(task, planFilePath, opts) {
323
329
  "If you only provide analysis/diff text without edit/write tool calls, this attempt fails."
324
330
  ].join("\n");
325
331
  }
332
+ const CODEBASE_CONTEXT_FILENAME = "CODEBASE_CONTEXT.md";
333
+ function buildCodebaseAnalysisPrompt(workspaceDir, outputFile) {
334
+ return `You are analyzing a codebase to create a context document for other agents.
335
+
336
+ ## YOUR JOB
337
+ Create a comprehensive codebase context file that other agents can use to understand
338
+ the project without re-reading the same files repeatedly.
339
+
340
+ ## OUTPUT
341
+ Write to: ${outputFile}
342
+
343
+ ## WHAT TO INCLUDE
344
+ 1. **Project Type & Framework** - Examine package.json, composer.json, Cargo.toml, etc.
345
+ 2. **Directory Structure** - Key folders only (src/, app/, tests/, etc.)
346
+ 3. **Testing Patterns** - Examine 2-3 existing test files to understand conventions:
347
+ - Test file naming and location
348
+ - Common imports and setup
349
+ - Assertion patterns
350
+ - How to run tests
351
+ 4. **Code Patterns** - Common patterns used in the codebase
352
+ 5. **Key Files Reference** - Map controllers/modules to their test files
353
+ 6. **API Routes** (if applicable) - Summary of endpoints
354
+
355
+ ## HOW TO DO IT
356
+ 1. Use exec to explore: \`find . -type f -name "*.php" | head -30\` (adjust extension as needed)
357
+ 2. Read 2-3 representative test files to understand patterns
358
+ 3. Read the main routes/config file
359
+ 4. Synthesize into a clean markdown document
360
+
361
+ ## CONSTRAINTS
362
+ - Keep output under 1500 lines
363
+ - Focus on PATTERNS, not exhaustive file listings
364
+ - Include actual code snippets for test patterns (they help other agents write consistent tests)
365
+ - Do NOT include node_modules, vendor, or other dependency directories
366
+
367
+ After writing the file, return: {"status":"complete","filename":"${outputFile}"}`;
368
+ }
369
+ function buildDiscoveryPromptWithContext(task, taskFile, planFilePath, codebaseContext) {
370
+ return `You are a coding assistant running discovery for a task orchestrator.
371
+
372
+ ${codebaseContext ? `## CODEBASE CONTEXT (pre-analyzed)
373
+ The following context was pre-computed to save you time. Use it instead of re-reading files.
374
+
375
+ ${codebaseContext}
376
+
377
+ ---
378
+
379
+ ` : ""}## YOUR JOB
380
+ Analyze the codebase and write a detailed implementation plan to a file.
381
+ You will NOT implement anything yourself — a separate agent will do that using your plan.
382
+
383
+ ## TASK
384
+ From task file: ${taskFile}
385
+ Task: ${task}
386
+
387
+ ## WHAT YOU MUST DO
388
+
389
+ ${codebaseContext ? "1. Use the context above — only read additional files if the context is missing specific information you need." : "1. Use the read tool to examine relevant source files, configs, tests, and docs."}
390
+ 2. Understand what currently exists and what needs to change.
391
+ 3. Use the write tool to create the plan file at: ${planFilePath}
392
+
393
+ The plan file MUST contain:
394
+ - The task description
395
+ - What currently exists (files you read, current behavior)
396
+ - What specifically needs to change and why
397
+ - Step-by-step implementation instructions (specific enough that another agent can follow them)
398
+ - Which files to modify or create, with the exact changes needed
399
+ - How to verify the changes work (test commands, expected output)
400
+
401
+ 4. After writing the plan file, return ONLY this JSON:
402
+ {"status":"incomplete","filename":"${planFilePath}"}
403
+
404
+ If you are CERTAIN the task is already complete (you verified with tools), return:
405
+ {"status":"complete","filename":""}
406
+
407
+ ## IMPORTANT
408
+ - You MUST use tools (read, exec, write). Do not skip straight to returning JSON.
409
+ - Do not modify any source files other than the plan file above.
410
+ - The quality of your plan directly determines whether the task succeeds.`;
411
+ }
412
+ async function runCodebaseAnalysis(args) {
413
+ const contextFile = path.join(args.planDir, CODEBASE_CONTEXT_FILENAME);
414
+ await ensurePlanDir(args.planDir);
415
+ const startTime = Date.now();
416
+ await args.notify({ phase: "codebase_analysis_start" });
417
+ const sessionId = `anton-codebase-analysis-${Date.now()}`;
418
+ try {
419
+ await runAgentTask({
420
+ message: buildCodebaseAnalysisPrompt(args.workspaceDir, contextFile),
421
+ sessionId,
422
+ timeout: args.timeout,
423
+ agent: args.agent,
424
+ to: args.to,
425
+ runtime: args.runtime,
426
+ deps: args.deps,
427
+ workspaceDir: args.workspaceDir
428
+ });
429
+ try {
430
+ const stat = await fs.stat(contextFile);
431
+ if (stat.isFile() && stat.size > 100) {
432
+ const context = await fs.readFile(contextFile, "utf8");
433
+ const durationMs = Date.now() - startTime;
434
+ await args.notify({
435
+ phase: "codebase_analysis_complete",
436
+ contextFile,
437
+ durationMs
438
+ });
439
+ return {
440
+ success: true,
441
+ contextFile,
442
+ context
443
+ };
444
+ }
445
+ } catch {}
446
+ const error = "Codebase analysis did not produce a valid context file";
447
+ await args.notify({
448
+ phase: "codebase_analysis_failed",
449
+ error
450
+ });
451
+ return {
452
+ success: false,
453
+ error
454
+ };
455
+ } catch (err) {
456
+ const error = err instanceof Error ? err.message : String(err);
457
+ await args.notify({
458
+ phase: "codebase_analysis_failed",
459
+ error
460
+ });
461
+ return {
462
+ success: false,
463
+ error
464
+ };
465
+ }
466
+ }
326
467
  function resolveAntonExecutionConfig(params) {
327
468
  const antonCfg = params.config ?? {};
328
469
  const preflightCfg = antonCfg.preflight ?? {};
470
+ const thinkingCfg = antonCfg.thinking ?? {};
471
+ const preflightThinkingCfg = thinkingCfg.preflight ?? {};
329
472
  const requestedMode = params.modeOverride ?? antonCfg.mode ?? "direct";
330
473
  const mode = requestedMode === "preflight" && preflightCfg.enabled === false ? "direct" : requestedMode;
331
474
  const taskTimeoutSec = antonCfg.taskTimeoutSec ?? 1200;
@@ -335,7 +478,11 @@ function resolveAntonExecutionConfig(params) {
335
478
  taskTimeoutSec,
336
479
  discoveryTimeoutSec: antonCfg.discoveryTimeoutSec ?? preflightCfg.discoveryTimeoutSec ?? taskTimeoutSec,
337
480
  reviewTimeoutSec: antonCfg.reviewTimeoutSec ?? preflightCfg.reviewTimeoutSec ?? taskTimeoutSec,
338
- preflightMaxRetries: antonCfg.preflightMaxRetries ?? preflightCfg.maxRetries ?? 2
481
+ preflightMaxRetries: antonCfg.preflightMaxRetries ?? preflightCfg.maxRetries ?? 2,
482
+ directThinkLevel: thinkingCfg.direct,
483
+ preflightPhase1ThinkLevel: preflightThinkingCfg.phase1,
484
+ preflightPhase2ThinkLevel: preflightThinkingCfg.phase2,
485
+ codebaseSnapshot: preflightCfg.codebaseSnapshot ?? true
339
486
  };
340
487
  }
341
488
  function formatDuration(ms) {
@@ -348,6 +495,9 @@ function formatDuration(ms) {
348
495
  }
349
496
  function formatProgressMessage(event) {
350
497
  switch (event.phase) {
498
+ case "codebase_analysis_start": return "🔬 **Analyzing codebase** — building context for faster discovery...";
499
+ case "codebase_analysis_complete": return `📚 Codebase context ready (\`${path.basename(event.contextFile)}\`, ${formatDuration(event.durationMs)})`;
500
+ case "codebase_analysis_failed": return `⚠️ Codebase analysis failed: ${event.error}\n└ Falling back to per-task discovery`;
351
501
  case "start": return `🤚 **Anton activated**\n📄 Task file: \`${path.basename(event.taskFile)}\`\n📋 ${event.totalTasks} task${event.totalTasks === 1 ? "" : "s"} pending`;
352
502
  case "task_start": return `\n🔪 **Task ${event.index}/${event.total}**: ${event.task}`;
353
503
  case "discovery_start": return `🔎 Discovery: analyzing codebase for task ${event.index}/${event.total}...`;
@@ -395,20 +545,21 @@ async function antonStop(runtime) {
395
545
  /** Load Anton config from the IdleHands config file. */
396
546
  async function loadAntonConfig() {
397
547
  try {
398
- const { loadConfig } = await import("./model-selection-0dGxYGp8.js").then((n) => n.Mt);
548
+ const { loadConfig } = await import("./model-selection-BzMkl275.js").then((n) => n.Mt);
399
549
  return loadConfig().anton ?? {};
400
550
  } catch {
401
551
  return {};
402
552
  }
403
553
  }
404
554
  async function runAgentTask(args) {
405
- const { agentCliCommand } = await import("./agent-via-gateway-D8QBXTZL.js").then((n) => n.n);
555
+ const { agentCliCommand } = await import("./agent-via-gateway-DvLTdMBj.js").then((n) => n.n);
406
556
  const extraSystemPrompt = args.workspaceDir ? `Your working directory is: ${args.workspaceDir}\nAll file paths are relative to this directory. Use this as your cwd for all operations.` : void 0;
407
557
  const result = await agentCliCommand({
408
558
  message: args.message,
409
559
  agent: args.agent,
410
560
  to: args.to,
411
561
  sessionId: args.sessionId,
562
+ thinking: args.thinking,
412
563
  timeout: args.timeout,
413
564
  json: true,
414
565
  deliver: false,
@@ -573,9 +724,10 @@ async function runDiscoveryPhase(args) {
573
724
  await hardCleanRepo(discoveryRepoCwd);
574
725
  await ensureRepoCleanOrThrow(discoveryRepoCwd);
575
726
  const firstPass = await runAgentTask({
576
- message: buildDiscoveryPrompt(formatTaskForPrompt(args.task), args.taskFile, planFile),
727
+ message: args.codebaseContext ? buildDiscoveryPromptWithContext(formatTaskForPrompt(args.task), args.taskFile, planFile, args.codebaseContext) : buildDiscoveryPrompt(formatTaskForPrompt(args.task), args.taskFile, planFile),
577
728
  sessionId,
578
729
  timeout: args.timeout,
730
+ thinking: args.thinking,
579
731
  agent: args.agent,
580
732
  to: args.to,
581
733
  runtime: args.runtime,
@@ -647,6 +799,7 @@ async function runDiscoveryPhase(args) {
647
799
  message: buildDiscoveryRepairPrompt(formatTaskForPrompt(args.task), args.taskFile, declaredPlanFile),
648
800
  sessionId: repairSessionId,
649
801
  timeout: args.timeout,
802
+ thinking: args.thinking,
650
803
  agent: args.agent,
651
804
  to: args.to,
652
805
  runtime: args.runtime,
@@ -749,6 +902,7 @@ async function runReviewPhase(args) {
749
902
  message: buildReviewPrompt(args.planFile),
750
903
  sessionId,
751
904
  timeout: args.timeout,
905
+ thinking: args.thinking,
752
906
  agent: args.agent,
753
907
  to: args.to,
754
908
  runtime: args.runtime,
@@ -814,14 +968,20 @@ async function runAnton(args) {
814
968
  config: antonCfg,
815
969
  modeOverride: args.mode
816
970
  });
971
+ const cliThinkingOverride = normalizeThinkLevel(args.thinking);
972
+ if (args.thinking && !cliThinkingOverride) throw new Error("Invalid --thinking level. Use one of: off, minimal, low, medium, high, xhigh.");
817
973
  const mode = execution.mode;
818
974
  const requirementsReview = execution.requirementsReview;
819
975
  const taskTimeout = execution.taskTimeoutSec;
820
976
  const discoveryTimeout = execution.discoveryTimeoutSec;
821
977
  const reviewTimeout = execution.reviewTimeoutSec;
822
978
  const preflightMaxRetries = execution.preflightMaxRetries;
979
+ const directThinkLevel = cliThinkingOverride ?? execution.directThinkLevel;
980
+ const preflightPhase1ThinkLevel = cliThinkingOverride ?? execution.preflightPhase1ThinkLevel;
981
+ const preflightPhase2ThinkLevel = cliThinkingOverride ?? execution.preflightPhase2ThinkLevel;
982
+ const codebaseSnapshot = execution.codebaseSnapshot;
823
983
  const planDir = antonCfg.planDir ? path.resolve(antonCfg.planDir) : path.resolve(path.dirname(filePath), ".agents", "tasks");
824
- const { loadConfig } = await import("./model-selection-0dGxYGp8.js").then((n) => n.Mt);
984
+ const { loadConfig } = await import("./model-selection-BzMkl275.js").then((n) => n.Mt);
825
985
  const cfg = loadConfig();
826
986
  const defaultTimeout = String(Number.isFinite(args.timeoutSec) && (args.timeoutSec ?? 0) > 0 ? args.timeoutSec : cfg.agents?.defaults?.timeoutSeconds ?? taskTimeout);
827
987
  const repoCwd = args.workspaceDir ? path.resolve(args.workspaceDir) : path.dirname(filePath);
@@ -846,7 +1006,24 @@ async function runAnton(args) {
846
1006
  args.runtime.log(`[Anton] Mode: ${mode}${mode === "preflight" ? requirementsReview ? " (with review)" : " (discovery → implementation)" : ""}`);
847
1007
  let completed = 0;
848
1008
  let skipped = 0;
1009
+ let codebaseContext;
849
1010
  try {
1011
+ if (mode === "preflight" && codebaseSnapshot) {
1012
+ const analysisResult = await runCodebaseAnalysis({
1013
+ workspaceDir: repoCwd,
1014
+ planDir,
1015
+ timeout: String(discoveryTimeout),
1016
+ agent: args.agent,
1017
+ to: args.to,
1018
+ runtime: args.runtime,
1019
+ deps: args.deps,
1020
+ notify
1021
+ });
1022
+ if (analysisResult.success && analysisResult.context) {
1023
+ codebaseContext = analysisResult.context;
1024
+ args.runtime.log(`[Anton] Codebase context loaded (${analysisResult.context.length} chars)`);
1025
+ } else args.runtime.log("[Anton] Codebase analysis skipped or failed, continuing without context");
1026
+ }
850
1027
  for (let i = 0; i < pending.length; i++) {
851
1028
  if (await shouldStop()) {
852
1029
  args.runtime.log("Anton stop acknowledged.");
@@ -897,13 +1074,15 @@ async function runAnton(args) {
897
1074
  taskFile: filePath,
898
1075
  planDir,
899
1076
  timeout: String(discoveryTimeout),
1077
+ thinking: preflightPhase1ThinkLevel,
900
1078
  maxRetries: preflightMaxRetries,
901
1079
  agent: args.agent,
902
1080
  to: args.to,
903
1081
  runtime: args.runtime,
904
1082
  deps: args.deps,
905
1083
  notify,
906
- workspaceDir: args.workspaceDir
1084
+ workspaceDir: args.workspaceDir,
1085
+ codebaseContext
907
1086
  });
908
1087
  if (discoveryResult.status === "complete") {
909
1088
  await notify({
@@ -940,6 +1119,7 @@ async function runAnton(args) {
940
1119
  total: pending.length,
941
1120
  planFile,
942
1121
  timeout: String(reviewTimeout),
1122
+ thinking: preflightPhase1ThinkLevel,
943
1123
  agent: args.agent,
944
1124
  to: args.to,
945
1125
  runtime: args.runtime,
@@ -966,6 +1146,7 @@ async function runAnton(args) {
966
1146
  sessionId: implSessionId
967
1147
  });
968
1148
  const implPrompt = planFile ? buildImplementationPrompt(taskPromptText, planFile, { skipTests }) : buildDirectTaskPrompt(taskPromptText, { skipTests });
1149
+ const implementationThinkLevel = mode === "preflight" ? preflightPhase2ThinkLevel : directThinkLevel;
969
1150
  const gitCwd = args.workspaceDir ? path.resolve(args.workspaceDir) : path.dirname(filePath);
970
1151
  const taskFileRel = path.relative(gitCwd, filePath).replace(/\\/g, "/");
971
1152
  const changeIgnores = taskFileRel.startsWith("..") ? [] : [taskFileRel];
@@ -975,6 +1156,7 @@ async function runAnton(args) {
975
1156
  message: implPrompt,
976
1157
  sessionId: implSessionId,
977
1158
  timeout: defaultTimeout,
1159
+ thinking: implementationThinkLevel,
978
1160
  agent: args.agent,
979
1161
  to: args.to,
980
1162
  runtime: args.runtime,
@@ -1001,6 +1183,7 @@ async function runAnton(args) {
1001
1183
  message: buildImplementationRetryPrompt(taskPromptText, planFile ?? "", { skipTests }),
1002
1184
  sessionId: retrySessionId,
1003
1185
  timeout: defaultTimeout,
1186
+ thinking: implementationThinkLevel,
1004
1187
  agent: args.agent,
1005
1188
  to: args.to,
1006
1189
  runtime: args.runtime,