@visorcraft/idlehands 4.0.16 → 4.0.18

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 (231) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/{accounts-Dk8mJIrQ.js → accounts-CRDMZUcg.js} +6 -6
  3. package/dist/{accounts-BDVs8LTu.js → accounts-upx5iuke.js} +1 -1
  4. package/dist/{accounts-CIvVRRHb.js → accounts-yD5yI-jP.js} +1 -1
  5. package/dist/{agent-scope-DyP_tr7s.js → agent-scope-BVeQuh5x.js} +4 -4
  6. package/dist/{agent-via-gateway-Ceb_VeXS.js → agent-via-gateway-CC37LlPd.js} +3 -2
  7. package/dist/{agent-via-gateway-DIfwOe7Y.js → agent-via-gateway-Cl2YwlXJ.js} +2 -1
  8. package/dist/{agent-via-gateway-F1Zu0slF.js → agent-via-gateway-ClQrLbgo.js} +2 -1
  9. package/dist/{agent-via-gateway-7SDhvcBa.js → agent-via-gateway-pMCfUzW-.js} +61 -60
  10. package/dist/{agents-idaLog48.js → agents-DrnGQroU.js} +4 -4
  11. package/dist/{agents.config-w0ZcfpyW.js → agents.config-BZPnYIMF.js} +1 -1
  12. package/dist/{agents.config-DP_bqTwg.js → agents.config-DfWZrbXn.js} +1 -1
  13. package/dist/{anton-CzWIEEiT.js → anton-B-I7rEtn.js} +44 -15
  14. package/dist/{anton-B7VZSQo-.js → anton-BfrX2FMd.js} +40 -11
  15. package/dist/{anton-Cs1JPzv4.js → anton-BgKjig3B.js} +40 -11
  16. package/dist/{anton-BomwkDBv.js → anton-BrY-bWgq.js} +40 -11
  17. package/dist/{audio-preflight-BSlR2jEq.js → audio-preflight-aBtF0cRI.js} +35 -35
  18. package/dist/{auth-choice-D-TtZtMR.js → auth-choice-DtvI4epn.js} +1 -1
  19. package/dist/{auth-choice-C49o8owq.js → auth-choice-_C22dz9o.js} +1 -1
  20. package/dist/{auth-store-DXT-l7fO.js → auth-store-DQAd4LSE.js} +12 -12
  21. package/dist/{banner-DmFqQvFd.js → banner-B-UYZG8d.js} +1 -1
  22. package/dist/{bindings-D3b5Fmc9.js → bindings-B9L4cqmm.js} +2 -2
  23. package/dist/build-info.json +3 -3
  24. package/dist/bundled/boot-md/handler.js +60 -60
  25. package/dist/bundled/bootstrap-extra-files/handler.js +5 -5
  26. package/dist/bundled/command-logger/handler.js +3 -3
  27. package/dist/bundled/session-memory/handler.js +60 -60
  28. package/dist/{channel-activity-D_TMOGQ0.js → channel-activity-DOLX-uK1.js} +3 -3
  29. package/dist/{channel-options-CsEgIwgu.js → channel-options-BbwNg4q_.js} +1 -1
  30. package/dist/{channel-options-1Dqo0zkg.js → channel-options-C0iwLcfC.js} +1 -1
  31. package/dist/{channel-web-BicbbO9_.js → channel-web-BLxKeCXF.js} +2 -2
  32. package/dist/{channel-web-C7s5QLXL.js → channel-web-q6Ugfiks.js} +2 -2
  33. package/dist/{channels-cli-CWb-B8BT.js → channels-cli-BtL1XuuK.js} +7 -7
  34. package/dist/{channels-cli-REwO9h_a.js → channels-cli-DaRR8vAs.js} +7 -7
  35. package/dist/{chrome-_2tzVjVl.js → chrome-D_SXDetO.js} +17 -17
  36. package/dist/{chunk-CMpX7Jaz.js → chunk-BgScV6uo.js} +1 -1
  37. package/dist/{cli-B9ARC6CF.js → cli-BjhrdeVd.js} +2 -2
  38. package/dist/{cli-B4rP4MXJ.js → cli-CrUoGRuS.js} +2 -2
  39. package/dist/{command-registry-0e5VHciB.js → command-registry-BZNlvfaM.js} +10 -10
  40. package/dist/{commands-registry-j4vAzcF2.js → commands-registry-CK7aj_ri.js} +5 -5
  41. package/dist/{completion-cli-C1StqVUs.js → completion-cli-BIabgt7h.js} +1 -1
  42. package/dist/{completion-cli-BTtvgatl.js → completion-cli-p9W-g1Pe.js} +2 -2
  43. package/dist/{config-cli-C3As38Z_.js → config-cli-B4nNEjK9.js} +1 -1
  44. package/dist/{config-cli-B-yirt2T.js → config-cli-u4zbdm-e.js} +1 -1
  45. package/dist/{configure-Cw6aeqBy.js → configure-BbDbMd5G.js} +3 -3
  46. package/dist/{configure-BEd8nUOe.js → configure-Dj1JdeEI.js} +3 -3
  47. package/dist/{deliver-CVTXl0Cv.js → deliver-CJaM2zRY.js} +20 -20
  48. package/dist/{deps-C28cWNmF.js → deps-BMWq0kjy.js} +1 -1
  49. package/dist/{deps-Cn32rOjf.js → deps-BuRud-p8.js} +1 -1
  50. package/dist/{deps-CVb-kfIX.js → deps-CQzDLqTz.js} +6 -6
  51. package/dist/{deps-CYAKIzhf.js → deps-Dr9GpASq.js} +1 -1
  52. package/dist/{diagnostic-4owMk4vH.js → diagnostic-lz5wKsEe.js} +1 -1
  53. package/dist/{dock-BgOmHcbh.js → dock-6MgvdSqu.js} +6 -6
  54. package/dist/{doctor-completion-o6QBkVYG.js → doctor-completion-BLRGmusD.js} +1 -1
  55. package/dist/{doctor-completion-T5sq7t8L.js → doctor-completion-BeZMlZPb.js} +1 -1
  56. package/dist/{emergency-stop-CMeSxuEg.js → emergency-stop-BEsjWvQL.js} +2 -2
  57. package/dist/{emergency-stop-h5_WOPZT.js → emergency-stop-BU-Vbk3V.js} +2 -2
  58. package/dist/{emergency-stop-D-dp9zCO.js → emergency-stop-CSSPAKHr.js} +2 -2
  59. package/dist/emergency-stop-JXB5jZyK.js +113 -0
  60. package/dist/entry.js +1 -1
  61. package/dist/{env-B5G1qwGc.js → env-B7b7MKfk.js} +1 -1
  62. package/dist/{errors-C_0nm4TJ.js → errors--Eb33_ji.js} +1 -1
  63. package/dist/extensionAPI.js +2 -2
  64. package/dist/{fetch-guard-iuQsIjqN.js → fetch-guard-OZ_PCUyr.js} +1 -1
  65. package/dist/{frontmatter-BOudmHMS.js → frontmatter-p8nPDprK.js} +2 -2
  66. package/dist/{fs-safe-CYUaAFO9.js → fs-safe-BEl8T_Vc.js} +2 -2
  67. package/dist/{gateway-cli-Dxoh3sSC.js → gateway-cli-BCHdAJHS.js} +9 -9
  68. package/dist/{gateway-cli-bZXsaQkU.js → gateway-cli-Dumy2IVU.js} +9 -9
  69. package/dist/{gemini-auth-CIyaa44H.js → gemini-auth-CA0K3QXj.js} +2 -2
  70. package/dist/{github-copilot-token-Dgt6cnsM.js → github-copilot-token-DCg9Q9Ll.js} +7 -7
  71. package/dist/{health-dLZas7f8.js → health-B3kk7l82.js} +1 -1
  72. package/dist/{health-OvNY74XL.js → health-CqdQAURH.js} +1 -1
  73. package/dist/{hooks-cli-DZr1MB1B.js → hooks-cli-Ba4woLl0.js} +3 -3
  74. package/dist/{hooks-cli-DOH-i33b.js → hooks-cli-jMG5GST1.js} +3 -3
  75. package/dist/{image-COw__ACq.js → image-BQ3RQWD8.js} +6 -6
  76. package/dist/{image-ops-D1KtygWz.js → image-ops-ZNtLhD4c.js} +1 -1
  77. package/dist/index.js +7 -7
  78. package/dist/{ir-B7IBoKLy.js → ir-DnyYtX4H.js} +5 -5
  79. package/dist/llm-slug-generator.js +60 -60
  80. package/dist/{local-roots-KN4Hp1yZ.js → local-roots-C9CA2f0R.js} +5 -5
  81. package/dist/{login-CFr5vJmR.js → login-Cn1vc1bn.js} +6 -6
  82. package/dist/{login-qr-CFFFOjOl.js → login-qr-Dj0NmRdg.js} +11 -11
  83. package/dist/{manager-BE_76jWB.js → manager-DBd_2F6j.js} +15 -15
  84. package/dist/{markdown-tables-CzsockiZ.js → markdown-tables-CsrsXS80.js} +1 -1
  85. package/dist/{message-channel-C8QtrwEU.js → message-channel-Cg9KtLfy.js} +1 -1
  86. package/dist/{model-selection-1MMYqY6M.js → model-selection-Vtu6d5Um.js} +41 -41
  87. package/dist/{models-Dvyot3-o.js → models-C6GypzZ1.js} +2 -2
  88. package/dist/{models-cli-Dtzht0md.js → models-cli-BaR1RccY.js} +4 -4
  89. package/dist/{models-cli-CKRL4j3x.js → models-cli-iLP9BnPA.js} +3 -3
  90. package/dist/{npm-resolution-BpruvRIr.js → npm-resolution-CWxaTTrT.js} +1 -1
  91. package/dist/{npm-resolution-iEXmU1Ol.js → npm-resolution-DYUWHUe5.js} +1 -1
  92. package/dist/{onboard-CS6IQorr.js → onboard-CinZ4CuY.js} +2 -2
  93. package/dist/{onboard-Ck4SwhZB.js → onboard-DdBsJgzg.js} +2 -2
  94. package/dist/{onboard-channels-CM4puuWQ.js → onboard-channels-9XAEsgO-.js} +1 -1
  95. package/dist/{onboard-channels-DzNjXM6f.js → onboard-channels-Bnwwq6TK.js} +1 -1
  96. package/dist/{onboarding-DMEJRAg4.js → onboarding-C4oujn63.js} +3 -3
  97. package/dist/{onboarding-0Pop0Cex.js → onboarding-DFvHWFqL.js} +3 -3
  98. package/dist/{onboarding.finalize-f2qChM_N.js → onboarding.finalize-BDWHPpyn.js} +6 -6
  99. package/dist/{onboarding.finalize-BZW1kZw7.js → onboarding.finalize-DMhdDTvo.js} +7 -7
  100. package/dist/{outbound-BNh6PpQb.js → outbound-BYm4JJli.js} +6 -6
  101. package/dist/{outbound-attachment-3I6GzwDe.js → outbound-attachment-DwaqvYNG.js} +2 -2
  102. package/dist/{path-alias-guards-Cu1nXNMM.js → path-alias-guards-BnjbJzIQ.js} +1 -1
  103. package/dist/{paths-D_qUel1T.js → paths-0fcEvxu4.js} +3 -3
  104. package/dist/{paths-BYNVLNi_.js → paths-CkTEyLTV.js} +5 -5
  105. package/dist/{pi-embedded-Oto02Ard.js → pi-embedded-BDp9JsrM.js} +175 -175
  106. package/dist/{pi-embedded-BKTKQn_9.js → pi-embedded-Dap1HAGA.js} +11 -11
  107. package/dist/{pi-embedded-helpers-CyTpDKo5.js → pi-embedded-helpers-B1CKQ81Y.js} +24 -24
  108. package/dist/{pi-model-discovery-Bb__OY-j.js → pi-model-discovery-DBHbwKOo.js} +7 -7
  109. package/dist/{plugin-registry-BfNJBiAr.js → plugin-registry-CGFy1ugt.js} +1 -1
  110. package/dist/{plugin-registry-PcN7mK-d.js → plugin-registry-LYzfPk35.js} +1 -1
  111. package/dist/plugin-sdk/{agent-via-gateway-l3LvRB7r.js → agent-via-gateway-De4e2_-W.js} +3 -2
  112. package/dist/plugin-sdk/{anton-DJn2RPpW.js → anton-BO16dWNw.js} +40 -11
  113. package/dist/plugin-sdk/{channel-web-DvztgyXI.js → channel-web-Cd-eamYe.js} +2 -2
  114. package/dist/plugin-sdk/commands/agent-via-gateway.d.ts +1 -0
  115. package/dist/plugin-sdk/{deps-B1DxdYuU.js → deps-D6VWIdk7.js} +1 -1
  116. package/dist/plugin-sdk/{emergency-stop-CVZuzTM7.js → emergency-stop-w-HD2bz4.js} +2 -2
  117. package/dist/plugin-sdk/index.js +3 -3
  118. package/dist/plugin-sdk/{reply-BhGucE6k.js → reply-BqAPyIsz.js} +11 -11
  119. package/dist/plugin-sdk/{web-BzmXmmAo.js → web-Dj_tThNQ.js} +3 -3
  120. package/dist/{plugins-CRB60mCJ.js → plugins-Bb6_uisJ.js} +10 -10
  121. package/dist/{plugins-cli-DOTZBHc7.js → plugins-cli-BCAcCeRZ.js} +3 -3
  122. package/dist/{plugins-cli-s1bEnfMn.js → plugins-cli-BQKfJ9aF.js} +3 -3
  123. package/dist/{program-Blak4A0H.js → program-Df-zk5RB.js} +8 -8
  124. package/dist/{program-context-DtHO30yM.js → program-context-DBOEyhi4.js} +18 -18
  125. package/dist/{prompt-select-styled-DuHE5c_O.js → prompt-select-styled-B0FsbRWb.js} +4 -4
  126. package/dist/{prompt-select-styled-D8vDTRY8.js → prompt-select-styled-DJVZSK4X.js} +4 -4
  127. package/dist/{provider-auth-helpers-PdlgGx1Z.js → provider-auth-helpers-Aojd4jNn.js} +1 -1
  128. package/dist/{provider-auth-helpers-CnqcE5__.js → provider-auth-helpers-D0cQmJkF.js} +1 -1
  129. package/dist/{push-apns-DkGS3lmo.js → push-apns-BtI9tV7C.js} +1 -1
  130. package/dist/{push-apns-CNVtKEbW.js → push-apns-qzriU6TC.js} +1 -1
  131. package/dist/{pw-ai-CowTfhOG.js → pw-ai-BKPa5DlF.js} +13 -13
  132. package/dist/{qmd-manager-B_GgyQQ0.js → qmd-manager-DEJVRLvM.js} +8 -8
  133. package/dist/{query-expansion-DEq020GG.js → query-expansion-CW7PqIXL.js} +5 -5
  134. package/dist/{redact-Bvpf-ATQ.js → redact-D1Ebz_iR.js} +1 -1
  135. package/dist/{register.agent-BGs6wEo-.js → register.agent-ButiRGeg.js} +9 -9
  136. package/dist/{register.agent-DliuXWG0.js → register.agent-Xdy9Gu3H.js} +8 -8
  137. package/dist/{register.configure-D9bNPRml.js → register.configure-f4xr9iKB.js} +8 -8
  138. package/dist/{register.configure-DJsShg2l.js → register.configure-m5qhbCOO.js} +8 -8
  139. package/dist/{register.maintenance-B-36Avrl.js → register.maintenance-BA4e0HDc.js} +8 -8
  140. package/dist/{register.maintenance-B7ZM7NqF.js → register.maintenance-N55abUee.js} +9 -9
  141. package/dist/{register.message-CmEzaYEw.js → register.message-DaVB6EYW.js} +3 -3
  142. package/dist/{register.message-Cm5P_dls.js → register.message-Zta0bYh0.js} +3 -3
  143. package/dist/{register.onboard-ByUSn1hy.js → register.onboard-BHKf5Emm.js} +2 -2
  144. package/dist/{register.onboard-cB-UkXhL.js → register.onboard-BikBO9Gs.js} +2 -2
  145. package/dist/{register.orchestrator-anton-D_mAceTk.js → register.orchestrator-anton-DtPFOV9F.js} +2 -2
  146. package/dist/{register.orchestrator-anton-CADua5Nr.js → register.orchestrator-anton-x3yGok7b.js} +2 -2
  147. package/dist/{register.setup-CA3WwC1V.js → register.setup-BeRMjZaz.js} +2 -2
  148. package/dist/{register.setup-DOnWysTP.js → register.setup-DCIPrpG0.js} +2 -2
  149. package/dist/{register.status-health-sessions-DgR30NBl.js → register.status-health-sessions-CA5wMwpi.js} +4 -4
  150. package/dist/{register.status-health-sessions-Dsvbkrhh.js → register.status-health-sessions-I0YSjY_V.js} +4 -4
  151. package/dist/{register.subclis-CvN5J3oh.js → register.subclis-DZkq_g35.js} +9 -9
  152. package/dist/{replies-6_GxvQYe.js → replies-CXcxPRWk.js} +3 -3
  153. package/dist/{reply-D6y5faqD.js → reply-DlS9HBVo.js} +11 -11
  154. package/dist/{reply-prefix-BUgeSN2R.js → reply-prefix-49q2WQ2B.js} +1 -1
  155. package/dist/{resolve-route-DuttYY7A.js → resolve-route-Dr-fqH39.js} +4 -4
  156. package/dist/{retry-BeB9WenR.js → retry-DWN-e4ja.js} +1 -1
  157. package/dist/{run-main-BBYeikWD.js → run-main-B75ak_hb.js} +15 -15
  158. package/dist/{runner-BzNdfqDz.js → runner-DO528Ump.js} +11 -11
  159. package/dist/{send-BeIZJuy4.js → send-BspIjWIY.js} +7 -7
  160. package/dist/{send-DmLC7aEF.js → send-BypmtKl1.js} +10 -10
  161. package/dist/{send-D4bMycQu.js → send-CRnMBrJ2.js} +7 -7
  162. package/dist/{send-Dfa3sn6r.js → send-De8xTUIV.js} +24 -24
  163. package/dist/{send-C1hvd3bt.js → send-szC_vYk_.js} +6 -6
  164. package/dist/{server-node-events-CcAiA2an.js → server-node-events-B1RPoseF.js} +3 -3
  165. package/dist/{server-node-events-DeBYOK05.js → server-node-events-CufCnFp4.js} +3 -3
  166. package/dist/{session-F_YDS_1V.js → session-CKiIT4OY.js} +7 -7
  167. package/dist/{sessions-3ioSeOA1.js → sessions-BgxmLQuf.js} +41 -41
  168. package/dist/{skill-commands-Ck3flWX7.js → skill-commands-BOUMR5De.js} +9 -9
  169. package/dist/{skills-CnAPWfca.js → skills-OsjsCf_S.js} +22 -22
  170. package/dist/{status-Dd0rJBTD.js → status-ERmEJYw1.js} +2 -2
  171. package/dist/{status-BW8aF7xu.js → status-hXjECVBh.js} +2 -2
  172. package/dist/{store-CvMgrKWx.js → store-B4rHJvSg.js} +2 -2
  173. package/dist/{subagent-registry-DeXWDNty.js → subagent-registry-CcxZYIwL.js} +11 -11
  174. package/dist/{subsystem-tzu-rIAJ.js → subsystem-B98oWbbO.js} +1 -1
  175. package/dist/{tables-5k-zOZ-s.js → tables-DuOExt0S.js} +1 -1
  176. package/dist/{target-errors-BPfQrPim.js → target-errors-CWZr3RMI.js} +2 -2
  177. package/dist/{tokens-BRLyURxW.js → tokens-B9ArFCMX.js} +1 -1
  178. package/dist/{tool-images-CcGZpzmq.js → tool-images-DLiBUCZb.js} +2 -2
  179. package/dist/{tool-loop-detection-BNGetx3Z.js → tool-loop-detection-j48jLTrr.js} +3 -3
  180. package/dist/{update-cli-C97163Ne.js → update-cli-DROtjWg7.js} +9 -9
  181. package/dist/{update-cli-DLWAR9u6.js → update-cli-Rnv68OR6.js} +8 -8
  182. package/dist/{update-runner-Cft2lh5r.js → update-runner-BWxBVG9j.js} +1 -1
  183. package/dist/{update-runner-BV9LWTCG.js → update-runner-CqeNDbPD.js} +1 -1
  184. package/dist/{utils-CTFLl_ji.js → utils-ChNzRVsg.js} +18 -18
  185. package/dist/{web-BwZ1OGaX.js → web-5ddwA0bs.js} +66 -66
  186. package/dist/{web-D8zB-Qkg.js → web-BMSzFWiF.js} +3 -3
  187. package/dist/{web-DGPTqAhk.js → web-BQLIquZA.js} +3 -3
  188. package/dist/{web-Da_aB4Vm.js → web-CnzKMZK0.js} +3 -3
  189. package/dist/{whatsapp-actions-DbPcN6JQ.js → whatsapp-actions-CYraflBZ.js} +25 -25
  190. package/dist/{workspace-DBFSzT6O.js → workspace-AM44PzIs.js} +18 -18
  191. package/extensions/acpx/package.json +1 -1
  192. package/extensions/bluebubbles/package.json +1 -1
  193. package/extensions/copilot-proxy/package.json +1 -1
  194. package/extensions/diagnostics-otel/package.json +1 -1
  195. package/extensions/discord/package.json +1 -1
  196. package/extensions/feishu/package.json +1 -1
  197. package/extensions/google-gemini-cli-auth/package.json +1 -1
  198. package/extensions/googlechat/package.json +1 -1
  199. package/extensions/hand/package.json +1 -1
  200. package/extensions/imessage/package.json +1 -1
  201. package/extensions/irc/package.json +1 -1
  202. package/extensions/line/package.json +1 -1
  203. package/extensions/llm-task/package.json +1 -1
  204. package/extensions/matrix/CHANGELOG.md +12 -0
  205. package/extensions/matrix/package.json +1 -1
  206. package/extensions/mattermost/package.json +1 -1
  207. package/extensions/memory-core/package.json +1 -1
  208. package/extensions/memory-lancedb/package.json +1 -1
  209. package/extensions/minimax-portal-auth/package.json +1 -1
  210. package/extensions/msteams/CHANGELOG.md +12 -0
  211. package/extensions/msteams/package.json +1 -1
  212. package/extensions/nextcloud-talk/package.json +1 -1
  213. package/extensions/nostr/CHANGELOG.md +12 -0
  214. package/extensions/nostr/package.json +1 -1
  215. package/extensions/open-prose/package.json +1 -1
  216. package/extensions/signal/package.json +1 -1
  217. package/extensions/slack/package.json +1 -1
  218. package/extensions/synology-chat/package.json +1 -1
  219. package/extensions/telegram/package.json +1 -1
  220. package/extensions/tlon/package.json +1 -1
  221. package/extensions/twitch/CHANGELOG.md +12 -0
  222. package/extensions/twitch/package.json +1 -1
  223. package/extensions/voice-call/CHANGELOG.md +12 -0
  224. package/extensions/voice-call/package.json +1 -1
  225. package/extensions/whatsapp/package.json +1 -1
  226. package/extensions/zalo/CHANGELOG.md +12 -0
  227. package/extensions/zalo/package.json +1 -1
  228. package/extensions/zalouser/CHANGELOG.md +12 -0
  229. package/extensions/zalouser/package.json +1 -1
  230. package/package.json +1 -1
  231. package/dist/emergency-stop-w0AyIMs7.js +0 -113
package/CHANGELOG.md CHANGED
@@ -2,6 +2,21 @@
2
2
 
3
3
  Docs: https://docs.idlehands.ai
4
4
 
5
+ ## 4.0.18
6
+
7
+ ### Fixes
8
+
9
+ - Anton workspace propagation: spawned discovery/repair/implementation agents now pass `workspaceDir` through gateway invocation, so preflight and implementation run in the active target workspace instead of silently falling back to the default workspace.
10
+ - Anton preflight integrity: reject unverified `status=complete` discovery claims (no auto-complete from discovery), requiring verifiable plan artifacts.
11
+ - Anton completion guard hardening: repository-change validation now ignores Anton bookkeeping files (`TASKS*.md` task-list state and `.agents/tasks/*`) so bookkeeping edits cannot falsely count as implementation success.
12
+
13
+ ## 4.0.17
14
+
15
+ ### Fixes
16
+
17
+ - Anton preflight plan validation: reject discovery artifacts that contain only status JSON (for example `{"status":"incomplete","filename":"..."}`) and require meaningful implementation-plan content before marking a plan as valid.
18
+ - Anton preflight fallback hardening: prevent JSON-only discovery output from being persisted as a plan file during recovery; retry/repair continues until a real plan is produced or the task is skipped.
19
+
5
20
  ## 4.0.16
6
21
 
7
22
  ### Fixes
@@ -1,10 +1,10 @@
1
- import { l as resolveOAuthDir } from "./paths-BYNVLNi_.js";
2
- import { h as resolveUserPath } from "./utils-CTFLl_ji.js";
1
+ import { l as resolveOAuthDir } from "./paths-CkTEyLTV.js";
2
+ import { h as resolveUserPath } from "./utils-ChNzRVsg.js";
3
3
  import { f as DEFAULT_ACCOUNT_ID, p as normalizeAccountId } from "./session-key-CuLPSMu_.js";
4
4
  import { t as resolveAccountEntry } from "./account-lookup-DlMshWZ_.js";
5
- import { r as hasWebCredsSync } from "./auth-store-DXT-l7fO.js";
5
+ import { r as hasWebCredsSync } from "./auth-store-DQAd4LSE.js";
6
6
  import path from "node:path";
7
- import syncFs from "node:fs";
7
+ import fsSync from "node:fs";
8
8
 
9
9
  //#region src/channels/plugins/account-helpers.ts
10
10
  function createAccountListHelpers(channelKey) {
@@ -44,7 +44,7 @@ function listWhatsAppAuthDirs(cfg) {
44
44
  accountId
45
45
  }).authDir);
46
46
  try {
47
- const entries = syncFs.readdirSync(whatsappDir, { withFileTypes: true });
47
+ const entries = fsSync.readdirSync(whatsappDir, { withFileTypes: true });
48
48
  for (const entry of entries) {
49
49
  if (!entry.isDirectory()) continue;
50
50
  authDirs.add(path.join(whatsappDir, entry.name));
@@ -66,7 +66,7 @@ function resolveLegacyAuthDir() {
66
66
  }
67
67
  function legacyAuthExists(authDir) {
68
68
  try {
69
- return syncFs.existsSync(path.join(authDir, "creds.json"));
69
+ return fsSync.existsSync(path.join(authDir, "creds.json"));
70
70
  } catch {
71
71
  return false;
72
72
  }
@@ -1,5 +1,5 @@
1
1
  import { p as normalizeAccountId } from "./session-key-CuLPSMu_.js";
2
- import { r as createAccountListHelpers } from "./accounts-Dk8mJIrQ.js";
2
+ import { r as createAccountListHelpers } from "./accounts-CRDMZUcg.js";
3
3
  import { t as resolveAccountEntry } from "./account-lookup-DlMshWZ_.js";
4
4
 
5
5
  //#region src/signal/accounts.ts
@@ -1,5 +1,5 @@
1
1
  import { p as normalizeAccountId } from "./session-key-CuLPSMu_.js";
2
- import { r as createAccountListHelpers } from "./accounts-Dk8mJIrQ.js";
2
+ import { r as createAccountListHelpers } from "./accounts-CRDMZUcg.js";
3
3
  import { t as resolveAccountEntry } from "./account-lookup-DlMshWZ_.js";
4
4
 
5
5
  //#region src/imessage/accounts.ts
@@ -1,8 +1,8 @@
1
- import { d as resolveStateDir } from "./paths-BYNVLNi_.js";
2
- import { t as createSubsystemLogger } from "./subsystem-tzu-rIAJ.js";
3
- import { h as resolveUserPath } from "./utils-CTFLl_ji.js";
1
+ import { d as resolveStateDir } from "./paths-CkTEyLTV.js";
2
+ import { t as createSubsystemLogger } from "./subsystem-B98oWbbO.js";
3
+ import { h as resolveUserPath } from "./utils-ChNzRVsg.js";
4
4
  import { l as resolveAgentIdFromSessionKey, s as normalizeAgentId, t as DEFAULT_AGENT_ID, x as parseAgentSessionKey } from "./session-key-CuLPSMu_.js";
5
- import { p as resolveDefaultAgentWorkspaceDir } from "./workspace-DBFSzT6O.js";
5
+ import { p as resolveDefaultAgentWorkspaceDir } from "./workspace-AM44PzIs.js";
6
6
  import path from "node:path";
7
7
 
8
8
  //#region src/config/model-input.ts
@@ -11,7 +11,7 @@ import { t as formatCliCommand } from "./command-format-BAxx4PW5.js";
11
11
  import "./env-BpvqFD5n.js";
12
12
  import "./dock-QcCdS4qA.js";
13
13
  import "./tokens-Cg4XNE3H.js";
14
- import { H as callGateway, U as randomIdempotencyKey, a as agentCommand, o as resolveSessionKeyForRequest, v as withProgress } from "./pi-embedded-BKTKQn_9.js";
14
+ import { H as callGateway, U as randomIdempotencyKey, a as agentCommand, o as resolveSessionKeyForRequest, v as withProgress } from "./pi-embedded-Dap1HAGA.js";
15
15
  import "./plugins-D-_jp4FO.js";
16
16
  import "./accounts-BwrguHMw.js";
17
17
  import "./bindings-hT7SPhiA.js";
@@ -64,7 +64,7 @@ import "./send-Cn2wvd3W.js";
64
64
  import "./resolve-route-BI3VjtwE.js";
65
65
  import "./proxy-CNZpb4NE.js";
66
66
  import "./replies-CqYEEgmA.js";
67
- import "./deps-C28cWNmF.js";
67
+ import "./deps-BMWq0kjy.js";
68
68
 
69
69
  //#region src/commands/agent-via-gateway.ts
70
70
  const NO_GATEWAY_TIMEOUT_MS = 2147e6;
@@ -126,6 +126,7 @@ async function agentViaGatewayCommand(opts, runtime) {
126
126
  timeout: timeoutSeconds,
127
127
  lane: opts.lane,
128
128
  extraSystemPrompt: opts.extraSystemPrompt,
129
+ workspaceDir: opts.workspaceDir,
129
130
  idempotencyKey
130
131
  },
131
132
  expectFinal: true,
@@ -4,7 +4,7 @@ import { t as formatCliCommand } from "./command-format-CPa5ksO_.js";
4
4
  import { r as listAgentIds } from "./agent-scope-mLXQGQde.js";
5
5
  import { s as normalizeAgentId } from "./session-key-B9ePuoPx.js";
6
6
  import { h as GATEWAY_CLIENT_NAMES, l as normalizeMessageChannel, m as GATEWAY_CLIENT_MODES } from "./message-channel-Qpj4ExtQ.js";
7
- import { D as resolveSessionKeyForRequest, E as agentCommand } from "./subagent-registry-DeXWDNty.js";
7
+ import { D as resolveSessionKeyForRequest, E as agentCommand } from "./subagent-registry-CcxZYIwL.js";
8
8
  import { a as randomIdempotencyKey, n as callGateway } from "./call-DuNslqj2.js";
9
9
  import { n as withProgress } from "./progress-B76RkFx7.js";
10
10
 
@@ -72,6 +72,7 @@ async function agentViaGatewayCommand(opts, runtime) {
72
72
  timeout: timeoutSeconds,
73
73
  lane: opts.lane,
74
74
  extraSystemPrompt: opts.extraSystemPrompt,
75
+ workspaceDir: opts.workspaceDir,
75
76
  idempotencyKey
76
77
  },
77
78
  expectFinal: true,
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { Mt as resolveSessionKeyForRequest, jt as agentCommand } from "./reply-D6y5faqD.js";
2
+ import { Mt as resolveSessionKeyForRequest, jt as agentCommand } from "./reply-DlS9HBVo.js";
3
3
  import { r as listAgentIds } from "./agent-scope-RA0zXRpu.js";
4
4
  import { s as normalizeAgentId } from "./session-key-Cuihcz_O.js";
5
5
  import { It as loadConfig } from "./model-selection-0dGxYGp8.js";
@@ -72,6 +72,7 @@ async function agentViaGatewayCommand(opts, runtime) {
72
72
  timeout: timeoutSeconds,
73
73
  lane: opts.lane,
74
74
  extraSystemPrompt: opts.extraSystemPrompt,
75
+ workspaceDir: opts.workspaceDir,
75
76
  idempotencyKey
76
77
  },
77
78
  expectFinal: true,
@@ -1,73 +1,73 @@
1
- import { n as listAgentIds } from "./agent-scope-DyP_tr7s.js";
2
- import "./paths-BYNVLNi_.js";
3
- import "./subsystem-tzu-rIAJ.js";
4
- import "./utils-CTFLl_ji.js";
1
+ import { n as listAgentIds } from "./agent-scope-BVeQuh5x.js";
2
+ import "./paths-CkTEyLTV.js";
3
+ import "./subsystem-B98oWbbO.js";
4
+ import "./utils-ChNzRVsg.js";
5
5
  import "./runtime-8mi3mpYB.js";
6
6
  import { s as normalizeAgentId } from "./session-key-CuLPSMu_.js";
7
- import "./workspace-DBFSzT6O.js";
8
- import { R as loadConfig } from "./model-selection-1MMYqY6M.js";
9
- import "./github-copilot-token-Dgt6cnsM.js";
7
+ import "./workspace-AM44PzIs.js";
8
+ import { R as loadConfig } from "./model-selection-Vtu6d5Um.js";
9
+ import "./github-copilot-token-DCg9Q9Ll.js";
10
10
  import { t as formatCliCommand } from "./command-format-BAxx4PW5.js";
11
11
  import "./boolean-CE7i9tBR.js";
12
- import "./env-B5G1qwGc.js";
13
- import "./dock-BgOmHcbh.js";
14
- import "./tokens-BRLyURxW.js";
15
- import { H as randomIdempotencyKey, V as callGateway, a as agentCommand, o as resolveSessionKeyForRequest, v as withProgress } from "./pi-embedded-Oto02Ard.js";
16
- import "./plugins-CRB60mCJ.js";
17
- import "./accounts-Dk8mJIrQ.js";
18
- import "./bindings-D3b5Fmc9.js";
19
- import "./auth-store-DXT-l7fO.js";
20
- import "./send-BeIZJuy4.js";
21
- import "./send-DmLC7aEF.js";
22
- import "./deliver-CVTXl0Cv.js";
23
- import "./diagnostic-4owMk4vH.js";
12
+ import "./env-B7b7MKfk.js";
13
+ import "./dock-6MgvdSqu.js";
14
+ import "./tokens-B9ArFCMX.js";
15
+ import { H as randomIdempotencyKey, V as callGateway, a as agentCommand, o as resolveSessionKeyForRequest, v as withProgress } from "./pi-embedded-BDp9JsrM.js";
16
+ import "./plugins-Bb6_uisJ.js";
17
+ import "./accounts-CRDMZUcg.js";
18
+ import "./bindings-B9L4cqmm.js";
19
+ import "./auth-store-DQAd4LSE.js";
20
+ import "./send-BspIjWIY.js";
21
+ import "./send-BypmtKl1.js";
22
+ import "./deliver-CJaM2zRY.js";
23
+ import "./diagnostic-lz5wKsEe.js";
24
24
  import "./diagnostic-session-state-BGF2r-kt.js";
25
- import "./accounts-BDVs8LTu.js";
26
- import "./send-Dfa3sn6r.js";
27
- import "./image-ops-D1KtygWz.js";
28
- import "./pi-model-discovery-Bb__OY-j.js";
29
- import { d as GATEWAY_CLIENT_MODES, f as GATEWAY_CLIENT_NAMES, s as normalizeMessageChannel } from "./message-channel-C8QtrwEU.js";
30
- import "./pi-embedded-helpers-CyTpDKo5.js";
31
- import "./chrome-_2tzVjVl.js";
25
+ import "./accounts-upx5iuke.js";
26
+ import "./send-De8xTUIV.js";
27
+ import "./image-ops-ZNtLhD4c.js";
28
+ import "./pi-model-discovery-DBHbwKOo.js";
29
+ import { d as GATEWAY_CLIENT_MODES, f as GATEWAY_CLIENT_NAMES, s as normalizeMessageChannel } from "./message-channel-Cg9KtLfy.js";
30
+ import "./pi-embedded-helpers-B1CKQ81Y.js";
31
+ import "./chrome-D_SXDetO.js";
32
32
  import "./ssrf-CZeHDwVZ.js";
33
- import "./frontmatter-BOudmHMS.js";
34
- import "./skills-CnAPWfca.js";
35
- import "./path-alias-guards-Cu1nXNMM.js";
36
- import "./redact-Bvpf-ATQ.js";
37
- import "./errors-C_0nm4TJ.js";
38
- import "./fs-safe-CYUaAFO9.js";
39
- import "./store-CvMgrKWx.js";
40
- import "./sessions-3ioSeOA1.js";
41
- import "./accounts-CIvVRRHb.js";
42
- import "./paths-D_qUel1T.js";
43
- import "./tool-images-CcGZpzmq.js";
33
+ import "./frontmatter-p8nPDprK.js";
34
+ import "./skills-OsjsCf_S.js";
35
+ import "./path-alias-guards-BnjbJzIQ.js";
36
+ import "./redact-D1Ebz_iR.js";
37
+ import "./errors--Eb33_ji.js";
38
+ import "./fs-safe-BEl8T_Vc.js";
39
+ import "./store-B4rHJvSg.js";
40
+ import "./sessions-BgxmLQuf.js";
41
+ import "./accounts-yD5yI-jP.js";
42
+ import "./paths-0fcEvxu4.js";
43
+ import "./tool-images-DLiBUCZb.js";
44
44
  import "./thinking-z4_linel.js";
45
- import "./image-COw__ACq.js";
46
- import "./reply-prefix-BUgeSN2R.js";
47
- import "./manager-BE_76jWB.js";
48
- import "./gemini-auth-CIyaa44H.js";
49
- import "./fetch-guard-iuQsIjqN.js";
50
- import "./query-expansion-DEq020GG.js";
51
- import "./retry-BeB9WenR.js";
52
- import "./target-errors-BPfQrPim.js";
53
- import "./chunk-CMpX7Jaz.js";
54
- import "./markdown-tables-CzsockiZ.js";
55
- import "./local-roots-KN4Hp1yZ.js";
56
- import "./ir-B7IBoKLy.js";
45
+ import "./image-BQ3RQWD8.js";
46
+ import "./reply-prefix-49q2WQ2B.js";
47
+ import "./manager-DBd_2F6j.js";
48
+ import "./gemini-auth-CA0K3QXj.js";
49
+ import "./fetch-guard-OZ_PCUyr.js";
50
+ import "./query-expansion-CW7PqIXL.js";
51
+ import "./retry-DWN-e4ja.js";
52
+ import "./target-errors-CWZr3RMI.js";
53
+ import "./chunk-BgScV6uo.js";
54
+ import "./markdown-tables-CsrsXS80.js";
55
+ import "./local-roots-C9CA2f0R.js";
56
+ import "./ir-DnyYtX4H.js";
57
57
  import "./render-MTSxc7LK.js";
58
- import "./commands-registry-j4vAzcF2.js";
59
- import "./skill-commands-Ck3flWX7.js";
60
- import "./runner-BzNdfqDz.js";
58
+ import "./commands-registry-CK7aj_ri.js";
59
+ import "./skill-commands-BOUMR5De.js";
60
+ import "./runner-DO528Ump.js";
61
61
  import "./fetch-CsfR_943.js";
62
- import "./channel-activity-D_TMOGQ0.js";
63
- import "./tables-5k-zOZ-s.js";
64
- import "./send-C1hvd3bt.js";
65
- import "./outbound-attachment-3I6GzwDe.js";
66
- import "./send-D4bMycQu.js";
67
- import "./resolve-route-DuttYY7A.js";
62
+ import "./channel-activity-DOLX-uK1.js";
63
+ import "./tables-DuOExt0S.js";
64
+ import "./send-szC_vYk_.js";
65
+ import "./outbound-attachment-DwaqvYNG.js";
66
+ import "./send-CRnMBrJ2.js";
67
+ import "./resolve-route-Dr-fqH39.js";
68
68
  import "./proxy-CRB9oCP5.js";
69
- import "./replies-6_GxvQYe.js";
70
- import "./deps-CVb-kfIX.js";
69
+ import "./replies-CXcxPRWk.js";
70
+ import "./deps-CQzDLqTz.js";
71
71
 
72
72
  //#region src/commands/agent-via-gateway.ts
73
73
  const NO_GATEWAY_TIMEOUT_MS = 2147e6;
@@ -129,6 +129,7 @@ async function agentViaGatewayCommand(opts, runtime) {
129
129
  timeout: timeoutSeconds,
130
130
  lane: opts.lane,
131
131
  extraSystemPrompt: opts.extraSystemPrompt,
132
+ workspaceDir: opts.workspaceDir,
132
133
  idempotencyKey
133
134
  },
134
135
  expectFinal: true,
@@ -6,18 +6,18 @@ import { t as formatCliCommand } from "./command-format-CPa5ksO_.js";
6
6
  import { a as resolveAgentDir, b as DEFAULT_IDENTITY_FILENAME, d as resolveDefaultAgentId, n as listAgentEntries, u as resolveAgentWorkspaceDir } from "./agent-scope-mLXQGQde.js";
7
7
  import { m as DEFAULT_ACCOUNT_ID, s as normalizeAgentId, t as DEFAULT_AGENT_ID } from "./session-key-B9ePuoPx.js";
8
8
  import { n as listChannelPlugins, r as normalizeChannelId, t as getChannelPlugin } from "./plugins-CCrfZ49T.js";
9
- import { M as identityHasValues, P as parseIdentityMarkdown } from "./subagent-registry-DeXWDNty.js";
9
+ import { M as identityHasValues, P as parseIdentityMarkdown } from "./subagent-registry-CcxZYIwL.js";
10
10
  import { l as resolveSessionTranscriptsDirForAgent } from "./paths-CC17i2eK.js";
11
11
  import { a as ensureWorkspaceAndSessions, l as moveToTrash } from "./onboard-helpers-Dp6wXNs7.js";
12
12
  import { t as WizardCancelledError } from "./prompts-D3HHe1ZZ.js";
13
13
  import { t as createClackPrompter } from "./clack-prompter-Bo7vS5xP.js";
14
14
  import { t as resolveChannelDefaultAccountId } from "./helpers-CIyuenBU.js";
15
15
  import { a as parseBindingSpecs, i as describeBinding, n as applyAgentBindings, o as removeAgentBindings, r as buildChannelBindings, t as requireValidConfigSnapshot } from "./config-validation-BgKexeQb.js";
16
- import { a as pruneAgentConfig, i as loadAgentIdentity, n as buildAgentSummaries, r as findAgentEntryIndex, t as applyAgentConfig } from "./agents.config-DP_bqTwg.js";
17
- import { r as setupChannels } from "./onboard-channels-CM4puuWQ.js";
16
+ import { a as pruneAgentConfig, i as loadAgentIdentity, n as buildAgentSummaries, r as findAgentEntryIndex, t as applyAgentConfig } from "./agents.config-DfWZrbXn.js";
17
+ import { r as setupChannels } from "./onboard-channels-9XAEsgO-.js";
18
18
  import { n as logConfigUpdated } from "./logging-MF6Thoxk.js";
19
19
  import { n as promptAuthChoiceGrouped } from "./auth-choice-prompt-kycZqH8q.js";
20
- import { i as applyAuthChoice, r as warnIfModelConfigLooksOff } from "./auth-choice-D-TtZtMR.js";
20
+ import { i as applyAuthChoice, r as warnIfModelConfigLooksOff } from "./auth-choice-DtvI4epn.js";
21
21
  import path from "node:path";
22
22
  import fs from "node:fs/promises";
23
23
 
@@ -1,4 +1,4 @@
1
- import { en as identityHasValues, tn as loadAgentIdentityFromWorkspace } from "./reply-D6y5faqD.js";
1
+ import { en as identityHasValues, tn as loadAgentIdentityFromWorkspace } from "./reply-DlS9HBVo.js";
2
2
  import { a as resolveAgentDir, d as resolveDefaultAgentId, n as listAgentEntries, u as resolveAgentWorkspaceDir } from "./agent-scope-RA0zXRpu.js";
3
3
  import { s as normalizeAgentId } from "./session-key-Cuihcz_O.js";
4
4
 
@@ -1,6 +1,6 @@
1
1
  import { a as resolveAgentDir, d as resolveDefaultAgentId, n as listAgentEntries, u as resolveAgentWorkspaceDir } from "./agent-scope-mLXQGQde.js";
2
2
  import { s as normalizeAgentId } from "./session-key-B9ePuoPx.js";
3
- import { M as identityHasValues, N as loadAgentIdentityFromWorkspace } from "./subagent-registry-DeXWDNty.js";
3
+ import { M as identityHasValues, N as loadAgentIdentityFromWorkspace } from "./subagent-registry-CcxZYIwL.js";
4
4
 
5
5
  //#region src/commands/agents.config.ts
6
6
  function findAgentEntryIndex(list, agentId) {
@@ -1,5 +1,5 @@
1
- import "./paths-BYNVLNi_.js";
2
- import { t as CONFIG_DIR } from "./utils-CTFLl_ji.js";
1
+ import "./paths-CkTEyLTV.js";
2
+ import { t as CONFIG_DIR } from "./utils-ChNzRVsg.js";
3
3
  import fs from "node:fs/promises";
4
4
  import path from "node:path";
5
5
  import { promisify } from "node:util";
@@ -212,14 +212,14 @@ async function antonStop(runtime) {
212
212
  /** Load Anton config from the IdleHands config file. */
213
213
  async function loadAntonConfig() {
214
214
  try {
215
- const { loadConfig } = await import("./model-selection-1MMYqY6M.js").then((n) => n.I);
215
+ const { loadConfig } = await import("./model-selection-Vtu6d5Um.js").then((n) => n.I);
216
216
  return loadConfig().anton ?? {};
217
217
  } catch {
218
218
  return {};
219
219
  }
220
220
  }
221
221
  async function runAgentTask(args) {
222
- const { agentCliCommand } = await import("./agent-via-gateway-7SDhvcBa.js");
222
+ const { agentCliCommand } = await import("./agent-via-gateway-pMCfUzW-.js");
223
223
  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;
224
224
  const result = await agentCliCommand({
225
225
  message: args.message,
@@ -229,7 +229,8 @@ async function runAgentTask(args) {
229
229
  timeout: args.timeout,
230
230
  json: true,
231
231
  deliver: false,
232
- extraSystemPrompt
232
+ extraSystemPrompt,
233
+ workspaceDir: args.workspaceDir
233
234
  }, args.runtime, args.deps);
234
235
  return { text: (result && typeof result === "object" && "result" in result ? result.result?.payloads ?? [] : []).map((p) => typeof p?.text === "string" ? p.text.trim() : "").filter(Boolean).join("\n\n").trim() };
235
236
  }
@@ -239,18 +240,44 @@ function makePlanFilePath(planDir, taskIndex) {
239
240
  async function ensurePlanDir(planDir) {
240
241
  await fs.mkdir(planDir, { recursive: true });
241
242
  }
243
+ function looksLikeStatusJsonOnly(text) {
244
+ const trimmed = text.trim();
245
+ if (!trimmed.startsWith("{") || !trimmed.endsWith("}")) return false;
246
+ try {
247
+ const parsed = JSON.parse(trimmed);
248
+ const keys = Object.keys(parsed).toSorted();
249
+ return keys.length <= 3 && keys.includes("status") && keys.includes("filename");
250
+ } catch {
251
+ return false;
252
+ }
253
+ }
254
+ function isUsefulPlanText(text) {
255
+ const trimmed = text.trim();
256
+ if (trimmed.length < 120) return false;
257
+ if (looksLikeStatusJsonOnly(trimmed)) return false;
258
+ return /^#\s+/m.test(trimmed) || /\b(Implementation approach|What needs to change|Files to modify|How to verify)\b/i.test(trimmed);
259
+ }
242
260
  async function isPlanFileValid(filePath) {
243
261
  try {
244
262
  const stat = await fs.stat(filePath);
245
- return stat.isFile() && stat.size > 10;
263
+ if (!stat.isFile() || stat.size < 20) return false;
264
+ return isUsefulPlanText(await fs.readFile(filePath, "utf8"));
246
265
  } catch {
247
266
  return false;
248
267
  }
249
268
  }
250
- async function getGitChangedFileCount(cwd) {
269
+ async function getGitChangedFileCount(cwd, ignorePaths = []) {
251
270
  try {
252
271
  const { stdout } = await execFile$1("git", ["status", "--porcelain"], { cwd });
253
- return stdout.split(/\r?\n/).map((line) => line.trim()).filter(Boolean).length;
272
+ const ignores = ignorePaths.map((p) => p.replace(/\\/g, "/").replace(/^\.\//, "")).filter(Boolean);
273
+ return stdout.split(/\r?\n/).map((line) => line.trimEnd()).filter(Boolean).map((line) => {
274
+ const raw = line.slice(3).trim();
275
+ return (raw.includes(" -> ") ? raw.split(" -> ").at(-1) ?? raw : raw).replace(/\\/g, "/").replace(/^\.\//, "");
276
+ }).filter((file) => {
277
+ if (!file) return false;
278
+ if (file.startsWith(".agents/tasks/")) return false;
279
+ return !ignores.some((ignore) => file === ignore || file.startsWith(`${ignore}/`));
280
+ }).length;
254
281
  } catch {
255
282
  return null;
256
283
  }
@@ -284,7 +311,7 @@ function extractJsonObject(text) {
284
311
  }
285
312
  function extractPlanMarkdownFromText(text) {
286
313
  const candidate = text.match(/```(?:markdown|md)?\s*([\s\S]*?)```/i)?.[1]?.trim() ?? text.trim();
287
- if (candidate.length < 60) return;
314
+ if (!isUsefulPlanText(candidate)) return;
288
315
  return candidate;
289
316
  }
290
317
  function normalizeDiscoveryFilename(filename, expectedPlanFile) {
@@ -308,7 +335,7 @@ Task: ${task}`;
308
335
  }
309
336
  async function tryPersistPlanFallback(params) {
310
337
  const planText = (((typeof params.parsed?.planMarkdown === "string" ? params.parsed.planMarkdown : void 0) ?? (typeof params.parsed?.plan === "string" ? params.parsed.plan : void 0))?.trim() || extractPlanMarkdownFromText(params.rawText) || "").trim();
311
- if (planText.length < 60) return false;
338
+ if (!isUsefulPlanText(planText)) return false;
312
339
  await fs.writeFile(params.planFile, `${planText}\n`, "utf8");
313
340
  return await isPlanFileValid(params.planFile);
314
341
  }
@@ -342,7 +369,7 @@ async function runDiscoveryPhase(args) {
342
369
  workspaceDir: args.workspaceDir
343
370
  });
344
371
  const firstParsed = extractJsonObject(firstPass.text);
345
- if ((firstParsed?.status ?? "").toLowerCase() === "complete") return { status: "complete" };
372
+ if ((firstParsed?.status ?? "").toLowerCase() === "complete") throw new Error("Discovery claimed task already complete without a verifiable plan artifact; refusing auto-complete");
346
373
  const declaredPlanFile = normalizeDiscoveryFilename(firstParsed?.filename, planFile);
347
374
  if (await isPlanFileValid(declaredPlanFile)) {
348
375
  await args.notify({
@@ -393,7 +420,7 @@ async function runDiscoveryPhase(args) {
393
420
  workspaceDir: args.workspaceDir
394
421
  });
395
422
  const repairParsed = extractJsonObject(repairPass.text);
396
- if ((repairParsed?.status ?? "").toLowerCase() === "complete") return { status: "complete" };
423
+ if ((repairParsed?.status ?? "").toLowerCase() === "complete") throw new Error("Discovery repair claimed task complete without a verifiable plan artifact; refusing auto-complete");
397
424
  const repairPlanFile = normalizeDiscoveryFilename(repairParsed?.filename, declaredPlanFile);
398
425
  if (await isPlanFileValid(repairPlanFile) || await tryPersistPlanFallback({
399
426
  planFile: repairPlanFile,
@@ -526,7 +553,7 @@ async function runAnton(args) {
526
553
  const reviewTimeout = antonCfg.reviewTimeoutSec ?? taskTimeout;
527
554
  const preflightMaxRetries = antonCfg.preflightMaxRetries ?? 2;
528
555
  const planDir = antonCfg.planDir ? path.resolve(antonCfg.planDir) : path.resolve(path.dirname(filePath), ".agents", "tasks");
529
- const { loadConfig } = await import("./model-selection-1MMYqY6M.js").then((n) => n.I);
556
+ const { loadConfig } = await import("./model-selection-Vtu6d5Um.js").then((n) => n.I);
530
557
  const cfg = loadConfig();
531
558
  const defaultTimeout = String(Number.isFinite(args.timeoutSec) && (args.timeoutSec ?? 0) > 0 ? args.timeoutSec : cfg.agents?.defaults?.timeoutSeconds ?? taskTimeout);
532
559
  await acquireLock(Boolean(args.force));
@@ -651,7 +678,9 @@ async function runAnton(args) {
651
678
  });
652
679
  const implPrompt = planFile ? buildImplementationPrompt(task.text, planFile) : buildDirectTaskPrompt(task.text);
653
680
  const gitCwd = args.workspaceDir ? path.resolve(args.workspaceDir) : path.dirname(filePath);
654
- const changedBefore = await getGitChangedFileCount(gitCwd);
681
+ const taskFileRel = path.relative(gitCwd, filePath).replace(/\\/g, "/");
682
+ const changeIgnores = taskFileRel.startsWith("..") ? [] : [taskFileRel];
683
+ const changedBefore = await getGitChangedFileCount(gitCwd, changeIgnores);
655
684
  await runAgentTask({
656
685
  message: implPrompt,
657
686
  sessionId: implSessionId,
@@ -662,7 +691,7 @@ async function runAnton(args) {
662
691
  deps: args.deps,
663
692
  workspaceDir: args.workspaceDir
664
693
  });
665
- const changedAfter = await getGitChangedFileCount(gitCwd);
694
+ const changedAfter = await getGitChangedFileCount(gitCwd, changeIgnores);
666
695
  if (mode === "preflight" && changedBefore !== null && changedAfter !== null && changedAfter <= changedBefore) throw new Error("Implementation made no repository changes; refusing to mark task complete");
667
696
  const updated = markTaskDone(await fs.readFile(filePath, "utf8"), task.line);
668
697
  await fs.writeFile(filePath, updated, "utf8");
@@ -225,7 +225,7 @@ async function loadAntonConfig() {
225
225
  }
226
226
  }
227
227
  async function runAgentTask(args) {
228
- const { agentCliCommand } = await import("./agent-via-gateway-DIfwOe7Y.js").then((n) => n.n);
228
+ const { agentCliCommand } = await import("./agent-via-gateway-Cl2YwlXJ.js").then((n) => n.n);
229
229
  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;
230
230
  const result = await agentCliCommand({
231
231
  message: args.message,
@@ -235,7 +235,8 @@ async function runAgentTask(args) {
235
235
  timeout: args.timeout,
236
236
  json: true,
237
237
  deliver: false,
238
- extraSystemPrompt
238
+ extraSystemPrompt,
239
+ workspaceDir: args.workspaceDir
239
240
  }, args.runtime, args.deps);
240
241
  return { text: (result && typeof result === "object" && "result" in result ? result.result?.payloads ?? [] : []).map((p) => typeof p?.text === "string" ? p.text.trim() : "").filter(Boolean).join("\n\n").trim() };
241
242
  }
@@ -245,18 +246,44 @@ function makePlanFilePath(planDir, taskIndex) {
245
246
  async function ensurePlanDir(planDir) {
246
247
  await fs.mkdir(planDir, { recursive: true });
247
248
  }
249
+ function looksLikeStatusJsonOnly(text) {
250
+ const trimmed = text.trim();
251
+ if (!trimmed.startsWith("{") || !trimmed.endsWith("}")) return false;
252
+ try {
253
+ const parsed = JSON.parse(trimmed);
254
+ const keys = Object.keys(parsed).toSorted();
255
+ return keys.length <= 3 && keys.includes("status") && keys.includes("filename");
256
+ } catch {
257
+ return false;
258
+ }
259
+ }
260
+ function isUsefulPlanText(text) {
261
+ const trimmed = text.trim();
262
+ if (trimmed.length < 120) return false;
263
+ if (looksLikeStatusJsonOnly(trimmed)) return false;
264
+ return /^#\s+/m.test(trimmed) || /\b(Implementation approach|What needs to change|Files to modify|How to verify)\b/i.test(trimmed);
265
+ }
248
266
  async function isPlanFileValid(filePath) {
249
267
  try {
250
268
  const stat = await fs.stat(filePath);
251
- return stat.isFile() && stat.size > 10;
269
+ if (!stat.isFile() || stat.size < 20) return false;
270
+ return isUsefulPlanText(await fs.readFile(filePath, "utf8"));
252
271
  } catch {
253
272
  return false;
254
273
  }
255
274
  }
256
- async function getGitChangedFileCount(cwd) {
275
+ async function getGitChangedFileCount(cwd, ignorePaths = []) {
257
276
  try {
258
277
  const { stdout } = await execFile$1("git", ["status", "--porcelain"], { cwd });
259
- return stdout.split(/\r?\n/).map((line) => line.trim()).filter(Boolean).length;
278
+ const ignores = ignorePaths.map((p) => p.replace(/\\/g, "/").replace(/^\.\//, "")).filter(Boolean);
279
+ return stdout.split(/\r?\n/).map((line) => line.trimEnd()).filter(Boolean).map((line) => {
280
+ const raw = line.slice(3).trim();
281
+ return (raw.includes(" -> ") ? raw.split(" -> ").at(-1) ?? raw : raw).replace(/\\/g, "/").replace(/^\.\//, "");
282
+ }).filter((file) => {
283
+ if (!file) return false;
284
+ if (file.startsWith(".agents/tasks/")) return false;
285
+ return !ignores.some((ignore) => file === ignore || file.startsWith(`${ignore}/`));
286
+ }).length;
260
287
  } catch {
261
288
  return null;
262
289
  }
@@ -290,7 +317,7 @@ function extractJsonObject(text) {
290
317
  }
291
318
  function extractPlanMarkdownFromText(text) {
292
319
  const candidate = text.match(/```(?:markdown|md)?\s*([\s\S]*?)```/i)?.[1]?.trim() ?? text.trim();
293
- if (candidate.length < 60) return;
320
+ if (!isUsefulPlanText(candidate)) return;
294
321
  return candidate;
295
322
  }
296
323
  function normalizeDiscoveryFilename(filename, expectedPlanFile) {
@@ -314,7 +341,7 @@ Task: ${task}`;
314
341
  }
315
342
  async function tryPersistPlanFallback(params) {
316
343
  const planText = (((typeof params.parsed?.planMarkdown === "string" ? params.parsed.planMarkdown : void 0) ?? (typeof params.parsed?.plan === "string" ? params.parsed.plan : void 0))?.trim() || extractPlanMarkdownFromText(params.rawText) || "").trim();
317
- if (planText.length < 60) return false;
344
+ if (!isUsefulPlanText(planText)) return false;
318
345
  await fs.writeFile(params.planFile, `${planText}\n`, "utf8");
319
346
  return await isPlanFileValid(params.planFile);
320
347
  }
@@ -348,7 +375,7 @@ async function runDiscoveryPhase(args) {
348
375
  workspaceDir: args.workspaceDir
349
376
  });
350
377
  const firstParsed = extractJsonObject(firstPass.text);
351
- if ((firstParsed?.status ?? "").toLowerCase() === "complete") return { status: "complete" };
378
+ if ((firstParsed?.status ?? "").toLowerCase() === "complete") throw new Error("Discovery claimed task already complete without a verifiable plan artifact; refusing auto-complete");
352
379
  const declaredPlanFile = normalizeDiscoveryFilename(firstParsed?.filename, planFile);
353
380
  if (await isPlanFileValid(declaredPlanFile)) {
354
381
  await args.notify({
@@ -399,7 +426,7 @@ async function runDiscoveryPhase(args) {
399
426
  workspaceDir: args.workspaceDir
400
427
  });
401
428
  const repairParsed = extractJsonObject(repairPass.text);
402
- if ((repairParsed?.status ?? "").toLowerCase() === "complete") return { status: "complete" };
429
+ if ((repairParsed?.status ?? "").toLowerCase() === "complete") throw new Error("Discovery repair claimed task complete without a verifiable plan artifact; refusing auto-complete");
403
430
  const repairPlanFile = normalizeDiscoveryFilename(repairParsed?.filename, declaredPlanFile);
404
431
  if (await isPlanFileValid(repairPlanFile) || await tryPersistPlanFallback({
405
432
  planFile: repairPlanFile,
@@ -657,7 +684,9 @@ async function runAnton(args) {
657
684
  });
658
685
  const implPrompt = planFile ? buildImplementationPrompt(task.text, planFile) : buildDirectTaskPrompt(task.text);
659
686
  const gitCwd = args.workspaceDir ? path.resolve(args.workspaceDir) : path.dirname(filePath);
660
- const changedBefore = await getGitChangedFileCount(gitCwd);
687
+ const taskFileRel = path.relative(gitCwd, filePath).replace(/\\/g, "/");
688
+ const changeIgnores = taskFileRel.startsWith("..") ? [] : [taskFileRel];
689
+ const changedBefore = await getGitChangedFileCount(gitCwd, changeIgnores);
661
690
  await runAgentTask({
662
691
  message: implPrompt,
663
692
  sessionId: implSessionId,
@@ -668,7 +697,7 @@ async function runAnton(args) {
668
697
  deps: args.deps,
669
698
  workspaceDir: args.workspaceDir
670
699
  });
671
- const changedAfter = await getGitChangedFileCount(gitCwd);
700
+ const changedAfter = await getGitChangedFileCount(gitCwd, changeIgnores);
672
701
  if (mode === "preflight" && changedBefore !== null && changedAfter !== null && changedAfter <= changedBefore) throw new Error("Implementation made no repository changes; refusing to mark task complete");
673
702
  const updated = markTaskDone(await fs.readFile(filePath, "utf8"), task.line);
674
703
  await fs.writeFile(filePath, updated, "utf8");