@visorcraft/idlehands 4.3.0 → 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-Ih08lAge.js → agent-via-gateway-CPvgY5VA.js} +3 -3
  4. package/dist/{agent-via-gateway-5HMmToLM.js → agent-via-gateway-CTti0dK7.js} +21 -21
  5. package/dist/{agent-via-gateway-DuSua_3v.js → agent-via-gateway-DvLTdMBj.js} +3 -3
  6. package/dist/{agent-via-gateway-DK7QU0ZB.js → agent-via-gateway-OzQZlQpB.js} +21 -21
  7. package/dist/{agents-8uPgUCg3.js → agents-BEuHL8Zr.js} +7 -7
  8. package/dist/{agents.config-BY5PHIXx.js → agents.config-BDQ4Bu0B.js} +1 -1
  9. package/dist/{agents.config-Cu9n1FMm.js → agents.config-BjMP6yqX.js} +1 -1
  10. package/dist/{anton-Bjc-IcaK.js → anton-C8SARtai.js} +184 -6
  11. package/dist/{anton-Bt6ydJCr.js → anton-DCJl8crN.js} +184 -6
  12. package/dist/{anton-C_wi0iYv.js → anton-Dwp3KlQs.js} +184 -6
  13. package/dist/{anton-BaqnItPF.js → anton-F-OwKPyb.js} +184 -6
  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-CSSlgO89.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-BoUnFAMl.js → auth-choice-BHISFUGz.js} +9 -9
  22. package/dist/{auth-choice-D42CcQbk.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-CAJFhe0V.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-QLsqu186.js → channel-options-BdjtX9_O.js} +2 -2
  39. package/dist/{channel-options-RDfj2qi-.js → channel-options-CAfv1NVr.js} +2 -2
  40. package/dist/{channel-web-BvrfLtDO.js → channel-web-B23k1s4A.js} +10 -10
  41. package/dist/{channel-web-DvYjLJh2.js → channel-web-BZe8v7Di.js} +10 -10
  42. package/dist/{channels-cli-DVn5Wbfs.js → channels-cli-Bfz9P0IR.js} +47 -47
  43. package/dist/{channels-cli-CYqk8Loa.js → channels-cli-v8qMY1yM.js} +46 -46
  44. package/dist/{chrome-_2tzVjVl.js → chrome-Bip_1c2e.js} +9 -9
  45. package/dist/{chrome-RxW7_mFf.js → chrome-DuNAHpiu.js} +1 -1
  46. package/dist/{chrome-Do5potHV.js → chrome-RZ6-DZcL.js} +9 -9
  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-B4pRZl5k.js → cli-DyId4irC.js} +37 -37
  52. package/dist/{cli-DR1Zb2OI.js → cli-HkluaDt1.js} +38 -38
  53. package/dist/{command-registry-Dqwv1YG5.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-CQ0-FJEw.js → completion-cli-BmHAqqY4.js} +2 -2
  59. package/dist/{completion-cli-CAyvr4IW.js → completion-cli-CGXtQf6t.js} +1 -1
  60. package/dist/{config-cli-D8dwxw4Z.js → config-cli-BdJDJv0a.js} +3 -3
  61. package/dist/{config-cli-De18kDZ_.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-D1TVK9Qv.js → configure-C44gmCt3.js} +9 -9
  67. package/dist/{configure-Dsvr7YAc.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-whAbSPLk.js → deliver-CO1v69YA.js} +3 -3
  76. package/dist/{deliver-UdfAQA1U.js → deliver-CaD3Q14j.js} +3 -3
  77. package/dist/{deps-Bskg_V0q.js → deps-CchkM1ea.js} +6 -6
  78. package/dist/{deps-aEUIKhtw.js → deps-CfQJK6WP.js} +6 -6
  79. package/dist/{deps-CtU2Pokt.js → deps-SgroTRjf.js} +6 -6
  80. package/dist/{plugin-sdk/deps-BBg-c9uJ.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-C80MEGkY.js → doctor-completion-Cgl5S3K0.js} +1 -1
  88. package/dist/{doctor-completion-BPRo3jvp.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-C6ouCWSC.js → emergency-stop-B2KUQyt8.js} +21 -21
  92. package/dist/{emergency-stop-DFDofFHA.js → emergency-stop-BCRW03p2.js} +38 -38
  93. package/dist/{emergency-stop-BZerYBmV.js → emergency-stop-CjVqAFw-.js} +21 -21
  94. package/dist/{emergency-stop-taOrr160.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-CQmvl7sG.js → gateway-cli-BmwR5tHy.js} +52 -52
  106. package/dist/{gateway-cli-BaZbmOxF.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-DydHrawb.js → health-DXbufVL-.js} +5 -5
  113. package/dist/{health-j-IZ4-9x.js → health-F0lUmHT3.js} +5 -5
  114. package/dist/{hooks-cli-BY3Ws0Y6.js → hooks-cli-6t3DpWin.js} +38 -38
  115. package/dist/{hooks-cli-uldIB0Gg.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-BAsQlUqT.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-2nPE3Det.js → models-awPyoUpk.js} +13 -13
  150. package/dist/{models-cli-BuM5uWMi.js → models-cli-CsA9GN5G.js} +43 -43
  151. package/dist/{models-cli-BFU-p0aB.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-Dl636Mf7.js → npm-resolution-BKPKKKLt.js} +2 -2
  159. package/dist/{npm-resolution-CjsmlVY6.js → npm-resolution-BpQ2o-Eh.js} +2 -2
  160. package/dist/{onboard-BgwjeUOg.js → onboard-BiT3YReS.js} +5 -5
  161. package/dist/{onboard-BX33pzc1.js → onboard-C9KRYbrH.js} +5 -5
  162. package/dist/{onboard-channels-DtU2SSQ4.js → onboard-channels-C6b-o1TK.js} +7 -7
  163. package/dist/{onboard-channels-Ber55DUK.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-DH5sux_u.js → onboarding-BfAhtIYl.js} +11 -11
  173. package/dist/{onboarding-KoIrYKty.js → onboarding-By12Oyni.js} +11 -11
  174. package/dist/{onboarding.finalize-KbhTSwlL.js → onboarding.finalize-CAgcobAs.js} +44 -44
  175. package/dist/{onboarding.finalize-D3EFovPs.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-CK-jSu4T.js → pi-embedded-BfPWx2YM.js} +53 -53
  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-Ct2rwp-P.js → pi-embedded-helpers-Ts8Hdurw.js} +7 -7
  195. package/dist/{pi-embedded-PsA_MErm.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-BVOVWX9b.js → plugin-registry-7DC8-ZZJ.js} +2 -2
  205. package/dist/{plugin-registry-CgGd-8sR.js → plugin-registry-ZgC7HA0z.js} +2 -2
  206. package/dist/plugin-sdk/{agent-via-gateway-xY1dCxZI.js → agent-via-gateway-C9v2r0O2.js} +21 -21
  207. package/dist/plugin-sdk/{anton-H8HwVBdI.js → anton-7I_gkw4v.js} +184 -6
  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-BQhRtgZf.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/{deps-DZro-zkP.js → plugin-sdk/deps-Gj9jRY77.js} +6 -6
  219. package/dist/plugin-sdk/{emergency-stop-DbWWdmqc.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-DrJONWCw.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-BknW_M58.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-yBP6Z5vo.js → plugins-cli-DACLE21S.js} +39 -39
  244. package/dist/{plugins-cli-3FP5PzJN.js → plugins-cli-kePQvJ9L.js} +40 -40
  245. package/dist/{program-Dx-tntwb.js → program-VV9u5uPU.js} +45 -45
  246. package/dist/{program-context-DNGnEncX.js → program-context-j94K3IXR.js} +41 -41
  247. package/dist/{prompt-select-styled-BEfacfzJ.js → prompt-select-styled-BH51ROGD.js} +14 -14
  248. package/dist/{prompt-select-styled-CZ5tVK0d.js → prompt-select-styled-BSqCn36X.js} +14 -14
  249. package/dist/{provider-auth-helpers-9KbSl6wC.js → provider-auth-helpers-BAB3PaaB.js} +4 -4
  250. package/dist/{provider-auth-helpers-BjhDlZPy.js → provider-auth-helpers-DMSF8Mhq.js} +4 -4
  251. package/dist/{push-apns-DQ2zaRjy.js → push-apns-CGUwMKT-.js} +1 -1
  252. package/dist/{push-apns-DKEkqP3i.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-yrIWfcWX.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-CHq9Q2Z8.js → register.agent-ColbJEk3.js} +52 -52
  262. package/dist/{register.agent-DwAHrjFg.js → register.agent-YCGBKv-d.js} +54 -54
  263. package/dist/{register.configure-1UTeGz1q.js → register.configure-C5g7670Q.js} +55 -55
  264. package/dist/{register.configure-CN1cT56c.js → register.configure-CfUo6nvs.js} +54 -54
  265. package/dist/{register.maintenance-DZedYvuG.js → register.maintenance-53FGiO0K.js} +44 -44
  266. package/dist/{register.maintenance-D9bJRVwH.js → register.maintenance-CBNoQia-.js} +46 -46
  267. package/dist/{register.message-D6xDTLi2.js → register.message-0nKlUSrH.js} +39 -39
  268. package/dist/{register.message-D1Ik7PHN.js → register.message-CaFp4DAP.js} +38 -38
  269. package/dist/{register.onboard-CrxqSKpx.js → register.onboard-B3NgvEwe.js} +6 -6
  270. package/dist/{register.onboard-CvfydQEo.js → register.onboard-B9IJ3wUe.js} +6 -6
  271. package/dist/{register.orchestrator-anton-NJ6Ar5xd.js → register.orchestrator-anton-Cxnh52UP.js} +5 -3
  272. package/dist/{register.orchestrator-anton-CT6MrNmP.js → register.orchestrator-anton-HIi6nBvo.js} +5 -3
  273. package/dist/{register.setup-TO__GMMH.js → register.setup-DyxAeyO2.js} +6 -6
  274. package/dist/{register.setup-DlCW2QXX.js → register.setup-y7C2w79N.js} +6 -6
  275. package/dist/{register.status-health-sessions-B3DKk0EE.js → register.status-health-sessions-5wREP3Tq.js} +40 -40
  276. package/dist/{register.status-health-sessions-7SBSa4mh.js → register.status-health-sessions-DbzCxLhd.js} +42 -42
  277. package/dist/{register.subclis-BW98Fvgs.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-FU1dcyha.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-CdkhxjJp.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-Bv_BA3vd.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-Ds9lI_7v.js → server-node-events-B7IQ1nzZ.js} +39 -39
  327. package/dist/{server-node-events-D67Czp49.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-Dej3rSxN.js → status-D9fTji6b.js} +10 -10
  347. package/dist/{status-C80KAfkh.js → status-ZUnD4Pgf.js} +9 -9
  348. package/dist/{subagent-registry-dBsIIN3w.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-Da33HUfk.js → update-cli-CMn89gww.js} +46 -46
  360. package/dist/{update-cli-C56OuDKi.js → update-cli-D02DhEE9.js} +48 -48
  361. package/dist/{update-runner-BNnvswc6.js → update-runner-BSsZSlwa.js} +1 -1
  362. package/dist/{update-runner-ba7IRoZC.js → update-runner-C44em-38.js} +1 -1
  363. package/dist/{web-6k8rkBnj.js → web-CiVRDtta.js} +40 -40
  364. package/dist/{web--lehtsgF.js → web-DLIXLq_L.js} +26 -26
  365. package/dist/{web-CLdGEolQ.js → web-Dkl33QN0.js} +26 -26
  366. package/dist/{web-PGsByQEq.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";
@@ -321,9 +322,146 @@ function buildImplementationRetryPrompt(task, planFilePath, opts) {
321
322
  "If you only provide analysis/diff text without edit/write tool calls, this attempt fails."
322
323
  ].join("\n");
323
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
+ }
324
460
  function resolveAntonExecutionConfig(params) {
325
461
  const antonCfg = params.config ?? {};
326
462
  const preflightCfg = antonCfg.preflight ?? {};
463
+ const thinkingCfg = antonCfg.thinking ?? {};
464
+ const preflightThinkingCfg = thinkingCfg.preflight ?? {};
327
465
  const requestedMode = params.modeOverride ?? antonCfg.mode ?? "direct";
328
466
  const mode = requestedMode === "preflight" && preflightCfg.enabled === false ? "direct" : requestedMode;
329
467
  const taskTimeoutSec = antonCfg.taskTimeoutSec ?? 1200;
@@ -333,7 +471,11 @@ function resolveAntonExecutionConfig(params) {
333
471
  taskTimeoutSec,
334
472
  discoveryTimeoutSec: antonCfg.discoveryTimeoutSec ?? preflightCfg.discoveryTimeoutSec ?? taskTimeoutSec,
335
473
  reviewTimeoutSec: antonCfg.reviewTimeoutSec ?? preflightCfg.reviewTimeoutSec ?? taskTimeoutSec,
336
- 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
337
479
  };
338
480
  }
339
481
  function formatDuration(ms) {
@@ -346,6 +488,9 @@ function formatDuration(ms) {
346
488
  }
347
489
  function formatProgressMessage(event) {
348
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`;
349
494
  case "start": return `🤚 **Anton activated**\n📄 Task file: \`${path.basename(event.taskFile)}\`\n📋 ${event.totalTasks} task${event.totalTasks === 1 ? "" : "s"} pending`;
350
495
  case "task_start": return `\n🔪 **Task ${event.index}/${event.total}**: ${event.task}`;
351
496
  case "discovery_start": return `🔎 Discovery: analyzing codebase for task ${event.index}/${event.total}...`;
@@ -393,20 +538,21 @@ async function antonStop(runtime) {
393
538
  /** Load Anton config from the IdleHands config file. */
394
539
  async function loadAntonConfig() {
395
540
  try {
396
- 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);
397
542
  return loadConfig().anton ?? {};
398
543
  } catch {
399
544
  return {};
400
545
  }
401
546
  }
402
547
  async function runAgentTask(args) {
403
- const { agentCliCommand } = await import("./agent-via-gateway-DK7QU0ZB.js");
548
+ const { agentCliCommand } = await import("./agent-via-gateway-OzQZlQpB.js");
404
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;
405
550
  const result = await agentCliCommand({
406
551
  message: args.message,
407
552
  agent: args.agent,
408
553
  to: args.to,
409
554
  sessionId: args.sessionId,
555
+ thinking: args.thinking,
410
556
  timeout: args.timeout,
411
557
  json: true,
412
558
  deliver: false,
@@ -571,9 +717,10 @@ async function runDiscoveryPhase(args) {
571
717
  await hardCleanRepo(discoveryRepoCwd);
572
718
  await ensureRepoCleanOrThrow(discoveryRepoCwd);
573
719
  const firstPass = await runAgentTask({
574
- 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),
575
721
  sessionId,
576
722
  timeout: args.timeout,
723
+ thinking: args.thinking,
577
724
  agent: args.agent,
578
725
  to: args.to,
579
726
  runtime: args.runtime,
@@ -645,6 +792,7 @@ async function runDiscoveryPhase(args) {
645
792
  message: buildDiscoveryRepairPrompt(formatTaskForPrompt(args.task), args.taskFile, declaredPlanFile),
646
793
  sessionId: repairSessionId,
647
794
  timeout: args.timeout,
795
+ thinking: args.thinking,
648
796
  agent: args.agent,
649
797
  to: args.to,
650
798
  runtime: args.runtime,
@@ -747,6 +895,7 @@ async function runReviewPhase(args) {
747
895
  message: buildReviewPrompt(args.planFile),
748
896
  sessionId,
749
897
  timeout: args.timeout,
898
+ thinking: args.thinking,
750
899
  agent: args.agent,
751
900
  to: args.to,
752
901
  runtime: args.runtime,
@@ -812,14 +961,20 @@ async function runAnton(args) {
812
961
  config: antonCfg,
813
962
  modeOverride: args.mode
814
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.");
815
966
  const mode = execution.mode;
816
967
  const requirementsReview = execution.requirementsReview;
817
968
  const taskTimeout = execution.taskTimeoutSec;
818
969
  const discoveryTimeout = execution.discoveryTimeoutSec;
819
970
  const reviewTimeout = execution.reviewTimeoutSec;
820
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;
821
976
  const planDir = antonCfg.planDir ? path.resolve(antonCfg.planDir) : path.resolve(path.dirname(filePath), ".agents", "tasks");
822
- 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);
823
978
  const cfg = loadConfig();
824
979
  const defaultTimeout = String(Number.isFinite(args.timeoutSec) && (args.timeoutSec ?? 0) > 0 ? args.timeoutSec : cfg.agents?.defaults?.timeoutSeconds ?? taskTimeout);
825
980
  const repoCwd = args.workspaceDir ? path.resolve(args.workspaceDir) : path.dirname(filePath);
@@ -844,7 +999,24 @@ async function runAnton(args) {
844
999
  args.runtime.log(`[Anton] Mode: ${mode}${mode === "preflight" ? requirementsReview ? " (with review)" : " (discovery → implementation)" : ""}`);
845
1000
  let completed = 0;
846
1001
  let skipped = 0;
1002
+ let codebaseContext;
847
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
+ }
848
1020
  for (let i = 0; i < pending.length; i++) {
849
1021
  if (await shouldStop()) {
850
1022
  args.runtime.log("Anton stop acknowledged.");
@@ -895,13 +1067,15 @@ async function runAnton(args) {
895
1067
  taskFile: filePath,
896
1068
  planDir,
897
1069
  timeout: String(discoveryTimeout),
1070
+ thinking: preflightPhase1ThinkLevel,
898
1071
  maxRetries: preflightMaxRetries,
899
1072
  agent: args.agent,
900
1073
  to: args.to,
901
1074
  runtime: args.runtime,
902
1075
  deps: args.deps,
903
1076
  notify,
904
- workspaceDir: args.workspaceDir
1077
+ workspaceDir: args.workspaceDir,
1078
+ codebaseContext
905
1079
  });
906
1080
  if (discoveryResult.status === "complete") {
907
1081
  await notify({
@@ -938,6 +1112,7 @@ async function runAnton(args) {
938
1112
  total: pending.length,
939
1113
  planFile,
940
1114
  timeout: String(reviewTimeout),
1115
+ thinking: preflightPhase1ThinkLevel,
941
1116
  agent: args.agent,
942
1117
  to: args.to,
943
1118
  runtime: args.runtime,
@@ -964,6 +1139,7 @@ async function runAnton(args) {
964
1139
  sessionId: implSessionId
965
1140
  });
966
1141
  const implPrompt = planFile ? buildImplementationPrompt(taskPromptText, planFile, { skipTests }) : buildDirectTaskPrompt(taskPromptText, { skipTests });
1142
+ const implementationThinkLevel = mode === "preflight" ? preflightPhase2ThinkLevel : directThinkLevel;
967
1143
  const gitCwd = args.workspaceDir ? path.resolve(args.workspaceDir) : path.dirname(filePath);
968
1144
  const taskFileRel = path.relative(gitCwd, filePath).replace(/\\/g, "/");
969
1145
  const changeIgnores = taskFileRel.startsWith("..") ? [] : [taskFileRel];
@@ -973,6 +1149,7 @@ async function runAnton(args) {
973
1149
  message: implPrompt,
974
1150
  sessionId: implSessionId,
975
1151
  timeout: defaultTimeout,
1152
+ thinking: implementationThinkLevel,
976
1153
  agent: args.agent,
977
1154
  to: args.to,
978
1155
  runtime: args.runtime,
@@ -999,6 +1176,7 @@ async function runAnton(args) {
999
1176
  message: buildImplementationRetryPrompt(taskPromptText, planFile ?? "", { skipTests }),
1000
1177
  sessionId: retrySessionId,
1001
1178
  timeout: defaultTimeout,
1179
+ thinking: implementationThinkLevel,
1002
1180
  agent: args.agent,
1003
1181
  to: args.to,
1004
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";
@@ -328,9 +329,146 @@ function buildImplementationRetryPrompt(task, planFilePath, opts) {
328
329
  "If you only provide analysis/diff text without edit/write tool calls, this attempt fails."
329
330
  ].join("\n");
330
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
+ }
331
467
  function resolveAntonExecutionConfig(params) {
332
468
  const antonCfg = params.config ?? {};
333
469
  const preflightCfg = antonCfg.preflight ?? {};
470
+ const thinkingCfg = antonCfg.thinking ?? {};
471
+ const preflightThinkingCfg = thinkingCfg.preflight ?? {};
334
472
  const requestedMode = params.modeOverride ?? antonCfg.mode ?? "direct";
335
473
  const mode = requestedMode === "preflight" && preflightCfg.enabled === false ? "direct" : requestedMode;
336
474
  const taskTimeoutSec = antonCfg.taskTimeoutSec ?? 1200;
@@ -340,7 +478,11 @@ function resolveAntonExecutionConfig(params) {
340
478
  taskTimeoutSec,
341
479
  discoveryTimeoutSec: antonCfg.discoveryTimeoutSec ?? preflightCfg.discoveryTimeoutSec ?? taskTimeoutSec,
342
480
  reviewTimeoutSec: antonCfg.reviewTimeoutSec ?? preflightCfg.reviewTimeoutSec ?? taskTimeoutSec,
343
- 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
344
486
  };
345
487
  }
346
488
  function formatDuration(ms) {
@@ -353,6 +495,9 @@ function formatDuration(ms) {
353
495
  }
354
496
  function formatProgressMessage(event) {
355
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`;
356
501
  case "start": return `🤚 **Anton activated**\n📄 Task file: \`${path.basename(event.taskFile)}\`\n📋 ${event.totalTasks} task${event.totalTasks === 1 ? "" : "s"} pending`;
357
502
  case "task_start": return `\n🔪 **Task ${event.index}/${event.total}**: ${event.task}`;
358
503
  case "discovery_start": return `🔎 Discovery: analyzing codebase for task ${event.index}/${event.total}...`;
@@ -400,20 +545,21 @@ async function antonStop(runtime) {
400
545
  /** Load Anton config from the IdleHands config file. */
401
546
  async function loadAntonConfig() {
402
547
  try {
403
- 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);
404
549
  return loadConfig().anton ?? {};
405
550
  } catch {
406
551
  return {};
407
552
  }
408
553
  }
409
554
  async function runAgentTask(args) {
410
- const { agentCliCommand } = await import("./agent-via-gateway-DuSua_3v.js").then((n) => n.n);
555
+ const { agentCliCommand } = await import("./agent-via-gateway-DvLTdMBj.js").then((n) => n.n);
411
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;
412
557
  const result = await agentCliCommand({
413
558
  message: args.message,
414
559
  agent: args.agent,
415
560
  to: args.to,
416
561
  sessionId: args.sessionId,
562
+ thinking: args.thinking,
417
563
  timeout: args.timeout,
418
564
  json: true,
419
565
  deliver: false,
@@ -578,9 +724,10 @@ async function runDiscoveryPhase(args) {
578
724
  await hardCleanRepo(discoveryRepoCwd);
579
725
  await ensureRepoCleanOrThrow(discoveryRepoCwd);
580
726
  const firstPass = await runAgentTask({
581
- 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),
582
728
  sessionId,
583
729
  timeout: args.timeout,
730
+ thinking: args.thinking,
584
731
  agent: args.agent,
585
732
  to: args.to,
586
733
  runtime: args.runtime,
@@ -652,6 +799,7 @@ async function runDiscoveryPhase(args) {
652
799
  message: buildDiscoveryRepairPrompt(formatTaskForPrompt(args.task), args.taskFile, declaredPlanFile),
653
800
  sessionId: repairSessionId,
654
801
  timeout: args.timeout,
802
+ thinking: args.thinking,
655
803
  agent: args.agent,
656
804
  to: args.to,
657
805
  runtime: args.runtime,
@@ -754,6 +902,7 @@ async function runReviewPhase(args) {
754
902
  message: buildReviewPrompt(args.planFile),
755
903
  sessionId,
756
904
  timeout: args.timeout,
905
+ thinking: args.thinking,
757
906
  agent: args.agent,
758
907
  to: args.to,
759
908
  runtime: args.runtime,
@@ -819,14 +968,20 @@ async function runAnton(args) {
819
968
  config: antonCfg,
820
969
  modeOverride: args.mode
821
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.");
822
973
  const mode = execution.mode;
823
974
  const requirementsReview = execution.requirementsReview;
824
975
  const taskTimeout = execution.taskTimeoutSec;
825
976
  const discoveryTimeout = execution.discoveryTimeoutSec;
826
977
  const reviewTimeout = execution.reviewTimeoutSec;
827
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;
828
983
  const planDir = antonCfg.planDir ? path.resolve(antonCfg.planDir) : path.resolve(path.dirname(filePath), ".agents", "tasks");
829
- 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);
830
985
  const cfg = loadConfig();
831
986
  const defaultTimeout = String(Number.isFinite(args.timeoutSec) && (args.timeoutSec ?? 0) > 0 ? args.timeoutSec : cfg.agents?.defaults?.timeoutSeconds ?? taskTimeout);
832
987
  const repoCwd = args.workspaceDir ? path.resolve(args.workspaceDir) : path.dirname(filePath);
@@ -851,7 +1006,24 @@ async function runAnton(args) {
851
1006
  args.runtime.log(`[Anton] Mode: ${mode}${mode === "preflight" ? requirementsReview ? " (with review)" : " (discovery → implementation)" : ""}`);
852
1007
  let completed = 0;
853
1008
  let skipped = 0;
1009
+ let codebaseContext;
854
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
+ }
855
1027
  for (let i = 0; i < pending.length; i++) {
856
1028
  if (await shouldStop()) {
857
1029
  args.runtime.log("Anton stop acknowledged.");
@@ -902,13 +1074,15 @@ async function runAnton(args) {
902
1074
  taskFile: filePath,
903
1075
  planDir,
904
1076
  timeout: String(discoveryTimeout),
1077
+ thinking: preflightPhase1ThinkLevel,
905
1078
  maxRetries: preflightMaxRetries,
906
1079
  agent: args.agent,
907
1080
  to: args.to,
908
1081
  runtime: args.runtime,
909
1082
  deps: args.deps,
910
1083
  notify,
911
- workspaceDir: args.workspaceDir
1084
+ workspaceDir: args.workspaceDir,
1085
+ codebaseContext
912
1086
  });
913
1087
  if (discoveryResult.status === "complete") {
914
1088
  await notify({
@@ -945,6 +1119,7 @@ async function runAnton(args) {
945
1119
  total: pending.length,
946
1120
  planFile,
947
1121
  timeout: String(reviewTimeout),
1122
+ thinking: preflightPhase1ThinkLevel,
948
1123
  agent: args.agent,
949
1124
  to: args.to,
950
1125
  runtime: args.runtime,
@@ -971,6 +1146,7 @@ async function runAnton(args) {
971
1146
  sessionId: implSessionId
972
1147
  });
973
1148
  const implPrompt = planFile ? buildImplementationPrompt(taskPromptText, planFile, { skipTests }) : buildDirectTaskPrompt(taskPromptText, { skipTests });
1149
+ const implementationThinkLevel = mode === "preflight" ? preflightPhase2ThinkLevel : directThinkLevel;
974
1150
  const gitCwd = args.workspaceDir ? path.resolve(args.workspaceDir) : path.dirname(filePath);
975
1151
  const taskFileRel = path.relative(gitCwd, filePath).replace(/\\/g, "/");
976
1152
  const changeIgnores = taskFileRel.startsWith("..") ? [] : [taskFileRel];
@@ -980,6 +1156,7 @@ async function runAnton(args) {
980
1156
  message: implPrompt,
981
1157
  sessionId: implSessionId,
982
1158
  timeout: defaultTimeout,
1159
+ thinking: implementationThinkLevel,
983
1160
  agent: args.agent,
984
1161
  to: args.to,
985
1162
  runtime: args.runtime,
@@ -1006,6 +1183,7 @@ async function runAnton(args) {
1006
1183
  message: buildImplementationRetryPrompt(taskPromptText, planFile ?? "", { skipTests }),
1007
1184
  sessionId: retrySessionId,
1008
1185
  timeout: defaultTimeout,
1186
+ thinking: implementationThinkLevel,
1009
1187
  agent: args.agent,
1010
1188
  to: args.to,
1011
1189
  runtime: args.runtime,