@visorcraft/idlehands 4.1.0 → 4.2.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.
- package/CHANGELOG.md +6 -0
- package/dist/{accounts-DsVN0UNw.js → accounts-3HS_UAhJ.js} +1 -1
- package/dist/{accounts-B8cGzkjD.js → accounts-BDVs8LTu.js} +1 -1
- package/dist/{accounts-D5tB_lO0.js → accounts-CIvVRRHb.js} +1 -1
- package/dist/{accounts-D-hQsUw-.js → accounts-DLTODa_Z.js} +1 -1
- package/dist/{accounts-D87a1Y_K.js → accounts-DgbTKQoW.js} +1 -1
- package/dist/{accounts-BQC_GRUB.js → accounts-Dk8mJIrQ.js} +6 -6
- package/dist/{acp-cli-BEHYc8ty.js → acp-cli-BEpWQbqb.js} +7 -7
- package/dist/{agent-scope-Bxq1eWbA.js → agent-scope-DyP_tr7s.js} +4 -4
- package/dist/{agent-scope-Bn39ugK4.js → agent-scope-RA0zXRpu.js} +18 -18
- package/dist/{agent-via-gateway-igDg7ko6.js → agent-via-gateway-C42kkKZI.js} +2 -2
- package/dist/{agent-via-gateway-CM7X6sKJ.js → agent-via-gateway-CUtzJXBE.js} +60 -60
- package/dist/{agent-via-gateway-B03q92bw.js → agent-via-gateway-CldlRczJ.js} +1 -1
- package/dist/{agent-via-gateway-bS6seBwg.js → agent-via-gateway-oMn0WfUq.js} +4 -4
- package/dist/{agents-DdTECKDf.js → agents-BfnnMO1i.js} +4 -4
- package/dist/{agents.config-D2EbQiOx.js → agents.config-BFfVBZMA.js} +1 -1
- package/dist/{agents.config-CPUPtcKt.js → agents.config-bWtpv0jP.js} +2 -2
- package/dist/{anton-ONYQUE8F.js → anton-CgpWkf5P.js} +32 -17
- package/dist/{anton-C7-Qxyij.js → anton-CoGaJdTU.js} +36 -21
- package/dist/{anton-D4vpCj_q.js → anton-DSS3RNo7.js} +32 -17
- package/dist/anton-DXL8jrY_.js +792 -0
- package/dist/{api-key-rotation-nXQVJErE.js → api-key-rotation-B-FTJm5p.js} +1 -1
- package/dist/{audio-preflight-qkU2lsDn.js → audio-preflight-CW8IH1lU.js} +35 -35
- package/dist/{audio-preflight-DzjXupNO.js → audio-preflight-Dl1TO10w.js} +31 -31
- package/dist/{audit-C5VPFgbJ.js → audit-CKeZnjft.js} +22 -22
- package/dist/{auth-choice-DVoPuwEs.js → auth-choice-BNofPyTK.js} +1 -1
- package/dist/{auth-choice-BDndThZZ.js → auth-choice-D12Wsf7w.js} +12 -12
- package/dist/{auth-choice-CQqV1VIf.js → auth-choice-Z7nPFxhP.js} +10 -10
- package/dist/{auth-choice.apply-helpers-pTqMTYmi.js → auth-choice.apply-helpers-CGcniL1T.js} +1 -1
- package/dist/{auth-store-CMyrmmSF.js → auth-store-DDzIMy8_.js} +7 -7
- package/dist/{auth-store-Bb4aajHu.js → auth-store-DXT-l7fO.js} +12 -12
- package/dist/{auth-token-fKt_cHOj.js → auth-token-BJq87X3o.js} +1 -1
- package/dist/{banner-CFKoGAzN.js → banner-B1-kj-GW.js} +1 -1
- package/dist/{bindings-DZjkLUU_.js → bindings-B59Q7nsk.js} +1 -1
- package/dist/{bindings-CLZIJ0Eo.js → bindings-D3b5Fmc9.js} +2 -2
- package/dist/{browser-cli-qU0I-Gla.js → browser-cli-Ci6DpTnS.js} +11 -11
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +60 -60
- package/dist/bundled/bootstrap-extra-files/handler.js +5 -5
- package/dist/bundled/command-logger/handler.js +3 -3
- package/dist/bundled/session-memory/handler.js +60 -60
- package/dist/{call-Du-oBD99.js → call-BpWhjuOg.js} +9 -9
- package/dist/{channel-account-context-B4nJPU2N.js → channel-account-context-CDbY5AIr.js} +5 -5
- package/dist/{channel-activity-DdL3RAv_.js → channel-activity-D_TMOGQ0.js} +3 -3
- package/dist/{channel-options-BU0E7BdU.js → channel-options-C5Iz9bes.js} +1 -1
- package/dist/{channel-options-B1cfZ5uQ.js → channel-options-CUP3A4VX.js} +3 -3
- package/dist/{channel-selection-3jUl-PyW.js → channel-selection-ZxRkxpuF.js} +1 -1
- package/dist/{channel-web-BDytDCrG.js → channel-web-CGXl1PnB.js} +2 -2
- package/dist/{channel-web-CzrJ-6X4.js → channel-web-CsUiKxQo.js} +22 -22
- package/dist/{channels-cli-DWaQsKP8.js → channels-cli-DK7TRLqX.js} +7 -7
- package/dist/{channels-cli-B4o-qohk.js → channels-cli-DmHSajZy.js} +88 -88
- package/dist/{channels-status-issues-hgASw9UA.js → channels-status-issues-CDpWjdI3.js} +1 -1
- package/dist/{chrome-CT_a9OgI.js → chrome-BcJB6PcM.js} +17 -17
- package/dist/{chrome-YguTEaLx.js → chrome-VBsQfIrt.js} +2 -2
- package/dist/{chunk-Djk-9JeT.js → chunk-CMpX7Jaz.js} +1 -1
- package/dist/{clawbot-cli-C5cDal-5.js → clawbot-cli-uFgYrysW.js} +5 -5
- package/dist/{cli-Hplv9sD1.js → cli-6eMKeewY.js} +2 -2
- package/dist/{cli-DXyOlvH2.js → cli-DEE_ketW.js} +70 -70
- package/dist/{client-Dl5EAvfO.js → client-DtnD-ee9.js} +1 -1
- package/dist/{command-registry-esizscE2.js → command-registry-BFTlzx6d.js} +10 -10
- package/dist/{commands-D3BU_t7G.js → commands-Dj5LalLo.js} +1 -1
- package/dist/{commands-registry-Cj4D_1tw.js → commands-registry-CURlRZQJ.js} +3 -3
- package/dist/{commands-registry-_TBHHpvt.js → commands-registry-j4vAzcF2.js} +5 -5
- package/dist/{completion-cli-c4blaZPQ.js → completion-cli-BbXgtvGY.js} +2 -2
- package/dist/{completion-cli-CXDILt8-.js → completion-cli-PBfCNWhv.js} +12 -12
- package/dist/{config-cli-D_mH5-FH.js → config-cli-BVJRkNhX.js} +6 -6
- package/dist/{config-cli-98ASrAou.js → config-cli-Q934shK6.js} +1 -1
- package/dist/{config-guard-DnAyuF6T.js → config-guard-BdsOumqh.js} +17 -17
- package/dist/{config-validation-DIomLMwH.js → config-validation-BvKX6fPw.js} +2 -2
- package/dist/{configure-PKG58EzI.js → configure-85ttW_lD.js} +16 -16
- package/dist/{configure-CKspMrI1.js → configure-BGAvA5a4.js} +3 -3
- package/dist/{control-ui-assets-CiaCDBvZ.js → control-ui-assets-C7ZpN9hN.js} +1 -1
- package/dist/{cron-cli-BIfVPc5K.js → cron-cli-DQsnGQKs.js} +12 -12
- package/dist/{daemon-cli-DpyQu0Dp.js → daemon-cli-DUg-s4LG.js} +11 -11
- package/dist/{daemon-install-DeqQiAad.js → daemon-install-CYPo4M1M.js} +4 -4
- package/dist/{daemon-install-helpers-Bug_GYuy.js → daemon-install-helpers-BZY9-jNW.js} +9 -9
- package/dist/{deliver-yTpXc5sv.js → deliver--kttnrER.js} +7 -7
- package/dist/{deliver-Db2xqgLg.js → deliver-BUiQ-9fE.js} +20 -20
- package/dist/{deps-CjWcQwlX.js → deps-AEDT3iDX.js} +1 -1
- package/dist/{deps-CC5E5LXB.js → deps-B4J8H6nI.js} +6 -6
- package/dist/{deps-BotXja4Z.js → deps-Bq7jJLyN.js} +6 -6
- package/dist/{deps-DR1eh_L_.js → deps-Ch6bZ8PI.js} +1 -1
- package/dist/{devices-cli-B7fkQKei.js → devices-cli-DKK65S9Z.js} +7 -7
- package/dist/{diagnostic-BvlZ0Sot.js → diagnostic-4owMk4vH.js} +1 -1
- package/dist/{diagnostics-CdUgLS0N.js → diagnostics-DmZbQ8Nc.js} +5 -5
- package/dist/{directory-cli-BAMS8f9U.js → directory-cli-Dz9iXeut.js} +9 -9
- package/dist/{dns-cli-BdxBk-k_.js → dns-cli-DD6hWsdc.js} +4 -4
- package/dist/{dock-ejUetwTC.js → dock-BgOmHcbh.js} +6 -6
- package/dist/{dock-CzF5XYGd.js → dock-Y96MzKuM.js} +4 -4
- package/dist/{docs-cli-SF7es4Zs.js → docs-cli-cHkrTB2e.js} +4 -4
- package/dist/{doctor-completion-Co_xszXC.js → doctor-completion-CN5Zujsa.js} +2 -2
- package/dist/{doctor-completion-DFr8_h-z.js → doctor-completion-Clh5CNUd.js} +1 -1
- package/dist/{doctor-config-flow-8qXzBx09.js → doctor-config-flow-Ck4oCjfl.js} +14 -14
- package/dist/{emergency-stop-ChBe32HN.js → emergency-stop-2v4bhRCE.js} +2 -2
- package/dist/{emergency-stop-DtVFxCO1.js → emergency-stop-BtasjDnU.js} +70 -70
- package/dist/emergency-stop-CVO75pTD.js +113 -0
- package/dist/{emergency-stop-CDozqde9.js → emergency-stop-D_bTOufu.js} +2 -2
- package/dist/{enable-DaA_orGN.js → enable-o_s6PBsC.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/{env-q-PhWbb_.js → env-B5G1qwGc.js} +1 -1
- package/dist/{errors-C4SHjIZK.js → errors-C_0nm4TJ.js} +1 -1
- package/dist/{exec-approvals-allowlist-8AkOwwIr.js → exec-approvals-allowlist-Co2tJSEo.js} +1 -1
- package/dist/{exec-approvals-cli-CbcJzCt0.js → exec-approvals-cli-D6XUzs4j.js} +15 -15
- package/dist/{exec-safe-bin-runtime-policy-DYXuBKqH.js → exec-safe-bin-runtime-policy-DaoU9-ni.js} +2 -2
- package/dist/extensionAPI.js +2 -2
- package/dist/{fetch-guard-CcfDZXe9.js → fetch-guard-iuQsIjqN.js} +1 -1
- package/dist/{frontmatter-pTUG4Sx_.js → frontmatter-BOudmHMS.js} +2 -2
- package/dist/{fs-safe-2l05hI1Y.js → fs-safe-CYUaAFO9.js} +2 -2
- package/dist/{fs-safe-DNFrxDS-.js → fs-safe-_JQUGpZf.js} +15 -15
- package/dist/{gateway-cli-DjCBMnUT.js → gateway-cli-Cl7cEsHE.js} +9 -9
- package/dist/{gateway-cli-poVGdgAz.js → gateway-cli-DJm73Wou.js} +148 -148
- package/dist/{gateway-rpc-IpZymG6F.js → gateway-rpc-BBFG1T-M.js} +1 -1
- package/dist/{gemini-auth-DLSGffQK.js → gemini-auth-CIyaa44H.js} +2 -2
- package/dist/{github-copilot-token-BjmEQcmi.js → github-copilot-token-Dgt6cnsM.js} +7 -7
- package/dist/{health-lZsCLX6p.js → health-C6_Sa_ef.js} +13 -13
- package/dist/{health-HEN6Wk9G.js → health-D-b3jdnU.js} +1 -1
- package/dist/{hooks-cli-DFrttZGb.js → hooks-cli-BB25FyuN.js} +3 -3
- package/dist/{hooks-cli-EbzkZ1Xh.js → hooks-cli-BC3n8UYQ.js} +84 -84
- package/dist/{hooks-status-CPIWc_bx.js → hooks-status-DNGo2G8Q.js} +1 -1
- package/dist/{idlehands-root-DFL2GrNW.js → idlehands-root-B8cUs-5M.js} +8 -8
- package/dist/{image-Dlu13Ebx.js → image-D8b_rlQC.js} +6 -6
- package/dist/{image-C2JZiK-6.js → image-DSDEbSiO.js} +5 -5
- package/dist/{image-ops-J8P5zOFm.js → image-ops-BU-VdLZu.js} +2 -2
- package/dist/{image-ops-BkoEFRYH.js → image-ops-D1KtygWz.js} +11 -11
- package/dist/index.js +80 -80
- package/dist/{inspect-Dg16DMLn.js → inspect-ISQZuNM5.js} +4 -4
- package/dist/{install-safe-path-CNNMzJl9.js → install-safe-path-ChNR9pl6.js} +19 -19
- package/dist/{installs-ST3UaUVJ.js → installs-CNubze2L.js} +9 -9
- package/dist/{ir-BT5aAdU9.js → ir-B7IBoKLy.js} +5 -5
- package/dist/{ir-DV0Hszc8.js → ir-VncGpwA1.js} +6 -6
- package/dist/{lifecycle-core-DOScNyOv.js → lifecycle-core-B6UoqYTJ.js} +5 -5
- package/dist/llm-slug-generator.js +60 -60
- package/dist/{local-roots-d4y0lvs2.js → local-roots-KN4Hp1yZ.js} +5 -5
- package/dist/{local-roots-Cco87A2_.js → local-roots-q0xbefkf.js} +2 -2
- package/dist/{login-C2X0In6m.js → login-CFr5vJmR.js} +6 -6
- package/dist/{login-Dl_lsEHS.js → login-CfUhrgWT.js} +4 -4
- package/dist/{login-qr-C17PY0rr.js → login-qr-CFFFOjOl.js} +11 -11
- package/dist/{login-qr-B68cBRH0.js → login-qr-DBMsUxgL.js} +7 -7
- package/dist/{logs-cli-DHCG25JA.js → logs-cli-4VQ9Iwiw.js} +8 -8
- package/dist/{manager-CgzA1hKo.js → manager-BE_76jWB.js} +15 -15
- package/dist/{manager-BBeTPO2h.js → manager-BMAFgXyU.js} +13 -13
- package/dist/{manifest-registry-RfRn8HJx.js → manifest-registry-Bak1x76G.js} +1 -1
- package/dist/{markdown-tables-R8VTpfE9.js → markdown-tables-CzsockiZ.js} +1 -1
- package/dist/{markdown-tables-C5hTDqNm.js → markdown-tables-DZClqsNo.js} +1 -1
- package/dist/{memory-cli-4wfelGdK.js → memory-cli-CUGwnVIY.js} +12 -12
- package/dist/{message-channel-ZdI1-uUh.js → message-channel-C8QtrwEU.js} +1 -1
- package/dist/{model-Bd-05WpB.js → model-C-icShH2.js} +2 -2
- package/dist/{model-catalog-BCsDrrvq.js → model-catalog-D9no0CH2.js} +3 -3
- package/dist/{model-picker-D3U0wJCO.js → model-picker-BkXoTOiA.js} +4 -4
- package/dist/{model-selection-CSn9tUuH.js → model-selection-0dGxYGp8.js} +16 -16
- package/dist/{model-selection-C5hI1dum.js → model-selection-1MMYqY6M.js} +41 -41
- package/dist/{models-tZYpgts_.js → models-C1_Tdc1Q.js} +2 -2
- package/dist/{models-cli-umEUn4Xu.js → models-cli-B9yw60gV.js} +79 -79
- package/dist/{models-cli-DVAyIZ63.js → models-cli-Bs5ZNSbk.js} +4 -4
- package/dist/{models-config-lQpqp472.js → models-config-C5A1wDWh.js} +6 -6
- package/dist/{node-cli-7gQ7xfOh.js → node-cli-BYzjxmUY.js} +32 -32
- package/dist/{node-service-GpI0jzKr.js → node-service-C3vyxHLA.js} +1 -1
- package/dist/{nodes-cli-CDXLGCox.js → nodes-cli-kNOtp0U0.js} +14 -14
- package/dist/{nodes-screen-CIAn0wXq.js → nodes-screen-CcpPaFxa.js} +4 -4
- package/dist/{npm-registry-spec-BfeHLbIQ.js → npm-registry-spec-BCbbfIhX.js} +16 -16
- package/dist/{npm-resolution-By6en78P.js → npm-resolution-BMDipaRX.js} +3 -3
- package/dist/{npm-resolution-By6bZkA-.js → npm-resolution-yXJbqHHn.js} +1 -1
- package/dist/{onboard-Dw-URWpt.js → onboard-CYRoDnOI.js} +2 -2
- package/dist/{onboard-BmDmDXYf.js → onboard-DjbHK18p.js} +6 -6
- package/dist/{onboard-channels-DCDhpz9s.js → onboard-channels-CNQt2jFU.js} +20 -20
- package/dist/{onboard-channels-JPltbNGL.js → onboard-channels-CkxvodmR.js} +1 -1
- package/dist/{onboard-custom-D2sCP3_S.js → onboard-custom-DUbzMMu7.js} +4 -4
- package/dist/{onboard-helpers-CdzbIhrm.js → onboard-helpers-mzy38DiC.js} +8 -8
- package/dist/{onboard-hooks-_1Jgimeu.js → onboard-hooks-D9teGxfH.js} +4 -4
- package/dist/{onboard-remote-pCRaL_Ey.js → onboard-remote-LCBHijVE.js} +1 -1
- package/dist/{onboard-skills-DvwRvBvj.js → onboard-skills-jFY9gaOu.js} +4 -4
- package/dist/{onboarding-DIorhVOJ.js → onboarding-BEDOWI9h.js} +3 -3
- package/dist/{onboarding-Cf3JxJxY.js → onboarding-D9AZJlDK.js} +13 -13
- package/dist/{onboarding.finalize-BCmAqhLV.js → onboarding.finalize-D4hW1yTd.js} +7 -7
- package/dist/{onboarding.finalize-BH4WHo75.js → onboarding.finalize-DJxMkD2g.js} +82 -82
- package/dist/{onboarding.gateway-config-Sj7zQKsE.js → onboarding.gateway-config-Btu2gzgr.js} +16 -16
- package/dist/{openai-model-default-OPCCNNS0.js → openai-model-default-7J6cw1rA.js} +2 -2
- package/dist/{outbound-CdY_AskB.js → outbound-BNh6PpQb.js} +6 -6
- package/dist/{outbound-CG19kl0w.js → outbound-DPTxwchq.js} +4 -4
- package/dist/{outbound-attachment-jYdMgCml.js → outbound-attachment-3I6GzwDe.js} +2 -2
- package/dist/{outbound-attachment-IfeZJAKk.js → outbound-attachment-Bot3bRnK.js} +2 -2
- package/dist/{pairing-cli-QJYYDcIK.js → pairing-cli-jwx6hMsM.js} +10 -10
- package/dist/{pairing-labels-DuZ7ih-T.js → pairing-labels-ChQJzbS9.js} +1 -1
- package/dist/{pairing-store-qvpPoWL_.js → pairing-store-CPpEEQJO.js} +2 -2
- package/dist/{pairing-token-3hoCgQqp.js → pairing-token-lKXTMQ_M.js} +7 -7
- package/dist/{path-alias-guards-BZmt6hFb.js → path-alias-guards-Cu1nXNMM.js} +1 -1
- package/dist/{path-alias-guards-BCskHdfJ.js → path-alias-guards-FXBVVTLw.js} +3 -3
- package/dist/{path-safety-C1Y004P_.js → path-safety-DwibX65n.js} +1 -1
- package/dist/{paths-Bt0fZexW.js → paths-B-CLQ5RT.js} +9 -9
- package/dist/{paths-DQpv9a3Q.js → paths-BYNVLNi_.js} +5 -5
- package/dist/{paths-D3p7ZvM6.js → paths-D_qUel1T.js} +3 -3
- package/dist/{pi-embedded-mKozULng.js → pi-embedded-C6RDRgJM.js} +179 -179
- package/dist/{pi-embedded-helpers-BkzrQ5bZ.js → pi-embedded-helpers-BCsfqpDt.js} +6 -6
- package/dist/{pi-embedded-helpers-B3ceCcxm.js → pi-embedded-helpers-CghCLoPo.js} +24 -24
- package/dist/{pi-embedded-DMx6rHVL.js → pi-embedded-o6Xj8V4C.js} +11 -11
- package/dist/{pi-model-discovery-Bt79ifyi.js → pi-model-discovery-BIP3RjXl.js} +1 -1
- package/dist/{pi-model-discovery-Dlx4RLWo.js → pi-model-discovery-Bb__OY-j.js} +7 -7
- package/dist/{pi-tools.policy-B_ME3yF6.js → pi-tools.policy-DfITIKZj.js} +5 -5
- package/dist/{plugin-auto-enable-BMuSi4aV.js → plugin-auto-enable-7DUxMy6A.js} +3 -3
- package/dist/{plugin-registry-BY85d-vE.js → plugin-registry-6C1sgAm1.js} +1 -1
- package/dist/{plugin-registry-BIoGoN5y.js → plugin-registry-DIK-5KI9.js} +3 -3
- package/dist/plugin-sdk/{agent-via-gateway-CXtWg-qx.js → agent-via-gateway-DmQMFWNE.js} +2 -2
- package/dist/plugin-sdk/{anton-CGYTy9vy.js → anton-CrjFisFZ.js} +32 -17
- package/dist/plugin-sdk/{channel-web-EFRSObCG.js → channel-web-vQgHbtCG.js} +2 -2
- package/dist/plugin-sdk/{deps-qZxPlSgp.js → deps-DfyALwFG.js} +1 -1
- package/dist/plugin-sdk/{emergency-stop-CxcBz-aQ.js → emergency-stop-0ZrbH3D4.js} +2 -2
- package/dist/plugin-sdk/index.js +3 -3
- package/dist/plugin-sdk/{reply-nUO1aM3T.js → reply-BfdVf3fw.js} +11 -11
- package/dist/plugin-sdk/{web-CEtAvhaI.js → web-DwDLI7GP.js} +3 -3
- package/dist/{plugins-DYr-HHj0.js → plugins-CRB60mCJ.js} +10 -10
- package/dist/{plugins-B4hASNc2.js → plugins-D46VZh7u.js} +2 -2
- package/dist/{plugins-cli-Dlb8QO-K.js → plugins-cli-B1kN2Xze.js} +80 -80
- package/dist/{plugins-cli-RFXGkaxP.js → plugins-cli-DFUxLQbB.js} +3 -3
- package/dist/{ports-B07M55Gr.js → ports-B2o0FSFD.js} +1 -1
- package/dist/{ports-DWJO5S52.js → ports-SQy1d-RL.js} +2 -2
- package/dist/{program-context-B_byBfwR.js → program-context-CjyGlgVG.js} +43 -43
- package/dist/{program-Do2-I4y3.js → program-mmjp27H4.js} +8 -8
- package/dist/{prompt-select-styled-VWGHu3e1.js → prompt-select-styled-04TKk_r3.js} +4 -4
- package/dist/{prompt-select-styled-CBF_I30O.js → prompt-select-styled-FskTiqWw.js} +37 -37
- package/dist/{provider-auth-helpers-BCc5UtUa.js → provider-auth-helpers-9IcvdTst.js} +1 -1
- package/dist/{provider-auth-helpers-BGGSUXOH.js → provider-auth-helpers-BI7MVWjD.js} +5 -5
- package/dist/{push-apns-CHmvuoMu.js → push-apns-Bh0u21Bh.js} +1 -1
- package/dist/{push-apns-CuwLAoXk.js → push-apns-DvSYSWvk.js} +5 -5
- package/dist/{pw-ai-BGALvhDi.js → pw-ai-7i9eGnLh.js} +11 -11
- package/dist/{pw-ai-DIV4PcIo.js → pw-ai-CfYaR1K2.js} +13 -13
- package/dist/{qmd-manager-CVcPfkhL.js → qmd-manager-B-qeywfQ.js} +19 -19
- package/dist/{qmd-manager-BRvg3Rx2.js → qmd-manager-B_GgyQQ0.js} +8 -8
- package/dist/{qr-cli-D2Oh8f0U.js → qr-cli-CSt5ihwG.js} +1 -1
- package/dist/{query-expansion-i5I3yavb.js → query-expansion-Clts_AGz.js} +12 -12
- package/dist/{query-expansion-DHuNyU-_.js → query-expansion-DEq020GG.js} +5 -5
- package/dist/{redact-1Y0KPNtr.js → redact-Bvpf-ATQ.js} +1 -1
- package/dist/{redact-snapshot-KMo22a85.js → redact-snapshot-BbEVKv0k.js} +1 -1
- package/dist/{register.agent-Dx7ULz49.js → register.agent-B3zUfhl9.js} +9 -9
- package/dist/{register.agent-CDcuj79y.js → register.agent-BSe92Zxh.js} +95 -95
- package/dist/register.configure-DZ9OCp0V.js +168 -0
- package/dist/{register.configure-BctHAiWh.js → register.configure-N4JG5hVe.js} +8 -8
- package/dist/{register.maintenance-BcFR1fGQ.js → register.maintenance-BjhkxF3o.js} +9 -9
- package/dist/{register.maintenance-wv8PzmVy.js → register.maintenance-DxauQqK_.js} +90 -90
- package/dist/{register.message-DUAiI9J7.js → register.message-BsMpRFVr.js} +71 -71
- package/dist/{register.message-BLScF2fV.js → register.message-DoZ5i1Pn.js} +3 -3
- package/dist/{register.onboard-BMNBXD29.js → register.onboard-Cw3wNQRm.js} +2 -2
- package/dist/{register.onboard-F09brfSb.js → register.onboard-Hxi3l9IA.js} +18 -18
- package/dist/{register.orchestrator-anton-CGhKIDjJ.js → register.orchestrator-anton-BqQfw2JX.js} +14 -14
- package/dist/{register.orchestrator-anton-Tn_RaMLq.js → register.orchestrator-anton-DOByOKzU.js} +2 -2
- package/dist/{register.setup-jzek547p.js → register.setup-dazD7bl3.js} +21 -21
- package/dist/{register.setup-DqbGSLoJ.js → register.setup-r5Xy4nv4.js} +2 -2
- package/dist/{register.status-health-sessions-ByfydR_f.js → register.status-health-sessions-3zjBM0m6.js} +82 -82
- package/dist/{register.status-health-sessions-wbopjGL-.js → register.status-health-sessions-DobZ2G2u.js} +4 -4
- package/dist/{register.subclis-CuNL7Zgu.js → register.subclis-CGJxYP3h.js} +9 -9
- package/dist/{replies-2C16fnBP.js → replies-6_GxvQYe.js} +3 -3
- package/dist/{replies-Czp4hvpS.js → replies-hSFVxL4h.js} +1 -1
- package/dist/{reply-CdFdL9nL.js → reply-BDr-UY9O.js} +153 -153
- package/dist/{reply-prefix-DCljZiIB.js → reply-prefix-BUgeSN2R.js} +1 -1
- package/dist/{reply-prefix-BMEdvSpA.js → reply-prefix-C3y4zpTl.js} +1 -1
- package/dist/{resolve-route-Ef_Yt2Dw.js → resolve-route-D_AbcmD6.js} +2 -2
- package/dist/{resolve-route-ClcifpKn.js → resolve-route-DuttYY7A.js} +4 -4
- package/dist/{retry-CG6cMRDQ.js → retry-BeB9WenR.js} +1 -1
- package/dist/{rpc-CNqnw2FL.js → rpc-Cf9OK5Yk.js} +1 -1
- package/dist/{run-main-9A7FdIR1.js → run-main-BDEztzfx.js} +15 -15
- package/dist/{runner-BFG54hnb.js → runner-DzszLzI4.js} +20 -20
- package/dist/{runner-BkCU-kqs.js → runner-PgRFPYUj.js} +11 -11
- package/dist/{runtime-DEmy759r.js → runtime-XmXLaHNk.js} +2 -2
- package/dist/{sandbox-CfPbhDY_.js → sandbox-DcUw5h3p.js} +20 -20
- package/dist/{sandbox-cli-B4wLJr21.js → sandbox-cli-DGvJ7Eeq.js} +22 -22
- package/dist/{secrets-cli-DP718vNZ.js → secrets-cli-CR3h2TBy.js} +9 -9
- package/dist/{security-cli-CG2_SV7b.js → security-cli-B9_LV2po.js} +39 -39
- package/dist/{send-DDMaLJAQ.js → send--lzpNy4f.js} +7 -7
- package/dist/{send-DZa8fWSm.js → send-BeIZJuy4.js} +7 -7
- package/dist/{send-Y1hD4tQ1.js → send-C1hvd3bt.js} +6 -6
- package/dist/{send-BCPkAE2k.js → send-C4v0Leny.js} +6 -6
- package/dist/{send-BOxJ4QXF.js → send-D4bMycQu.js} +7 -7
- package/dist/{send-CEavqqEz.js → send-DQiw_nGD.js} +6 -6
- package/dist/{send-FLdrx-oF.js → send-Dfa3sn6r.js} +24 -24
- package/dist/{send-IlPMLAH-.js → send-DmLC7aEF.js} +10 -10
- package/dist/{send-BPwTl4-K.js → send-DuwdEkLw.js} +4 -4
- package/dist/{send-CVIXqubC.js → send-DwdHiC7_.js} +13 -13
- package/dist/{server-BpSbZAwg.js → server-D6MltJIF.js} +14 -14
- package/dist/{server-context-BxNSTpH6.js → server-context-DI0W_H7R.js} +10 -10
- package/dist/{server-lifecycle-CGKrGrhM.js → server-lifecycle-B5PlrlbG.js} +2 -2
- package/dist/{server-node-events-CbVkqOtV.js → server-node-events-BL1dTBEr.js} +3 -3
- package/dist/{server-node-events-BSPxvn7O.js → server-node-events-C69TPlKW.js} +71 -71
- package/dist/{service-Bj2oSfpw.js → service-C8NMS3m_.js} +15 -15
- package/dist/{session-BKVySI8q.js → session-CdnrRhb4.js} +1 -1
- package/dist/{session-nUPBXeEa.js → session-F_YDS_1V.js} +7 -7
- package/dist/{sessions-DRA4oaxz.js → sessions-3ioSeOA1.js} +41 -41
- package/dist/{sessions-BqWocozB.js → sessions-BtPXimXQ.js} +14 -14
- package/dist/{shared-DnQ4iyXk.js → shared-CpDPo3hJ.js} +2 -2
- package/dist/{shared-Jzrx8DfN.js → shared-DpLSpJIl.js} +1 -1
- package/dist/{skill-commands-BwIRWSCI.js → skill-commands-BFzmZAfo.js} +5 -5
- package/dist/{skill-commands-BHTBXXVn.js → skill-commands-Ck3flWX7.js} +9 -9
- package/dist/{skill-scanner-B4Ftsbd2.js → skill-scanner-D7mzXRXd.js} +5 -5
- package/dist/{skills-umlGvChF.js → skills-CnAPWfca.js} +22 -22
- package/dist/{skills-TIyQDZx7.js → skills-DlvDyK8L.js} +3 -3
- package/dist/{skills-cli-5lbXi4Lh.js → skills-cli-BhKGhjbO.js} +5 -5
- package/dist/{skills-install-D0JHP5uM.js → skills-install-tr6wRWZj.js} +4 -4
- package/dist/{skills-status-Q9skQExW.js → skills-status-qjQ8XP0h.js} +1 -1
- package/dist/{status-ClMOrHdT.js → status-AEwcpHsu.js} +2 -2
- package/dist/{status-YWasgjym.js → status-B8z0RCPf.js} +24 -24
- package/dist/{status.update-C3uRz7W6.js → status.update-CTi6vuWj.js} +2 -2
- package/dist/{store-D-ZicQeo.js → store-CvMgrKWx.js} +2 -2
- package/dist/{store-CLNuI8-G.js → store-kH9wHHbO.js} +5 -5
- package/dist/{subagent-registry-BH5O1rxK.js → subagent-registry-Dclk-Ews.js} +11 -11
- package/dist/{subsystem-D7ZepYT1.js → subsystem-tzu-rIAJ.js} +1 -1
- package/dist/{system-cli-BfjZ6QvH.js → system-cli-DyVZ5udc.js} +8 -8
- package/dist/{system-run-approval-context-xZVoE4nS.js → system-run-approval-context-CISBXlNw.js} +1 -1
- package/dist/{system-run-command-BIhrK3OI.js → system-run-command-qJdgzxLp.js} +1 -1
- package/dist/{systemd-DyrVLTI0.js → systemd-CaCR5CyM.js} +9 -9
- package/dist/{systemd-hints-BoKKzRI_.js → systemd-hints-DHu-HVFx.js} +6 -6
- package/dist/{systemd-linger-DrhGd61G.js → systemd-linger-B7XlUHk_.js} +1 -1
- package/dist/{tables-Co_R_WKs.js → tables-5k-zOZ-s.js} +1 -1
- package/dist/{tables-CZSD889r.js → tables-g9xkflht.js} +1 -1
- package/dist/{target-errors-B1mcM4WR.js → target-errors-BPfQrPim.js} +2 -2
- package/dist/{target-errors-BYuWhuLU.js → target-errors-bLIVFsbF.js} +4 -4
- package/dist/{tokens-DGajj8M9.js → tokens-BRLyURxW.js} +1 -1
- package/dist/{tool-images-DZHrc4pq.js → tool-images-CHqepyF_.js} +1 -1
- package/dist/{tool-images-Duuqr4bN.js → tool-images-CcGZpzmq.js} +2 -2
- package/dist/{tool-loop-detection-CjWRg_4q.js → tool-loop-detection-BNGetx3Z.js} +3 -3
- package/dist/{tui-B2bAseIB.js → tui-Bne3YNiw.js} +6 -6
- package/dist/{tui-cli-cewAjqAk.js → tui-cli-D0Z-rcUe.js} +30 -30
- package/dist/{update-la2AdLf3.js → update-D79ppbMQ.js} +3 -3
- package/dist/{update-cli-D7gDHoEE.js → update-cli-8Tk6PCmD.js} +99 -99
- package/dist/{update-cli-Cxp_mYOH.js → update-cli-Bobm67f-.js} +9 -9
- package/dist/{update-runner-DRglQgXe.js → update-runner-B4xzPa4-.js} +15 -15
- package/dist/{update-runner-tu2Aiphu.js → update-runner-C4NjVy9-.js} +1 -1
- package/dist/{upgrade-command-28wRHZZ2.js → upgrade-command-909a7QUc.js} +3 -3
- package/dist/{utils-D9wGoiU9.js → utils-CTFLl_ji.js} +18 -18
- package/dist/{web-aRaB-CvF.js → web-9J12F46d.js} +3 -3
- package/dist/{web-BxegDO-S.js → web-DPSpgc_K.js} +3 -3
- package/dist/web-Dqy4kqC9.js +123 -0
- package/dist/{web-BuIXrrsp.js → web-NzOJcvWO.js} +66 -66
- package/dist/{webhooks-cli-BnmVPYkU.js → webhooks-cli-2N03q0iY.js} +6 -6
- package/dist/{whatsapp-actions-D2mBFzmK.js → whatsapp-actions-Cms8wQM1.js} +18 -18
- package/dist/{whatsapp-actions-BJ6kVDXi.js → whatsapp-actions-DbPcN6JQ.js} +25 -25
- package/dist/{with-timeout-BodPmGCY.js → with-timeout-DEdycYxq.js} +3 -3
- package/dist/{workspace-CDw87aZG.js → workspace-D3pARwoB.js} +1 -1
- package/dist/{workspace-tAtkoD_r.js → workspace-DBFSzT6O.js} +18 -18
- package/dist/{workspace-dirs-D3bousoX.js → workspace-dirs-SsExQ3Bz.js} +1 -1
- package/dist/{wsl-CgXDjE09.js → wsl-BJW8nTyL.js} +2 -2
- package/extensions/acpx/package.json +1 -1
- package/extensions/bluebubbles/package.json +1 -1
- package/extensions/copilot-proxy/package.json +1 -1
- package/extensions/diagnostics-otel/package.json +1 -1
- package/extensions/discord/package.json +1 -1
- package/extensions/feishu/package.json +1 -1
- package/extensions/google-gemini-cli-auth/package.json +1 -1
- package/extensions/googlechat/package.json +1 -1
- package/extensions/hand/package.json +1 -1
- package/extensions/imessage/package.json +1 -1
- package/extensions/irc/package.json +1 -1
- package/extensions/line/package.json +1 -1
- package/extensions/llm-task/package.json +1 -1
- package/extensions/matrix/CHANGELOG.md +6 -0
- package/extensions/matrix/package.json +1 -1
- package/extensions/mattermost/package.json +1 -1
- package/extensions/memory-core/package.json +1 -1
- package/extensions/memory-lancedb/package.json +1 -1
- package/extensions/minimax-portal-auth/package.json +1 -1
- package/extensions/msteams/CHANGELOG.md +6 -0
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/CHANGELOG.md +6 -0
- package/extensions/nostr/package.json +1 -1
- package/extensions/open-prose/package.json +1 -1
- package/extensions/signal/package.json +1 -1
- package/extensions/slack/package.json +1 -1
- package/extensions/synology-chat/package.json +1 -1
- package/extensions/telegram/package.json +1 -1
- package/extensions/tlon/package.json +1 -1
- package/extensions/twitch/CHANGELOG.md +6 -0
- package/extensions/twitch/package.json +1 -1
- package/extensions/voice-call/CHANGELOG.md +6 -0
- package/extensions/voice-call/package.json +1 -1
- package/extensions/whatsapp/package.json +1 -1
- package/extensions/zalo/CHANGELOG.md +6 -0
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/CHANGELOG.md +6 -0
- package/extensions/zalouser/package.json +1 -1
- package/package.json +1 -1
- package/dist/anton-D9tZAGaj.js +0 -777
- package/dist/emergency-stop-DyQna_P0.js +0 -113
- package/dist/register.configure-CxwdWRSG.js +0 -168
- package/dist/web-DESq0zCM.js +0 -123
|
@@ -0,0 +1,792 @@
|
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
+
import { t as CONFIG_DIR } from "./utils-CXzXXV2o.js";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { promisify } from "node:util";
|
|
5
|
+
import fs from "node:fs/promises";
|
|
6
|
+
import { execFile } from "node:child_process";
|
|
7
|
+
|
|
8
|
+
//#region src/commands/anton.ts
|
|
9
|
+
var anton_exports = /* @__PURE__ */ __exportAll({
|
|
10
|
+
antonStatus: () => antonStatus,
|
|
11
|
+
antonStop: () => antonStop,
|
|
12
|
+
formatProgressMessage: () => formatProgressMessage,
|
|
13
|
+
runAnton: () => runAnton
|
|
14
|
+
});
|
|
15
|
+
const ANTON_STATE_PATH = path.join(CONFIG_DIR, "anton.state.json");
|
|
16
|
+
const ANTON_LOCK_PATH = path.join(CONFIG_DIR, "anton.lock");
|
|
17
|
+
const execFile$1 = promisify(execFile);
|
|
18
|
+
async function ensureStateDir() {
|
|
19
|
+
await fs.mkdir(CONFIG_DIR, { recursive: true });
|
|
20
|
+
}
|
|
21
|
+
async function readState() {
|
|
22
|
+
try {
|
|
23
|
+
return JSON.parse(await fs.readFile(ANTON_STATE_PATH, "utf8"));
|
|
24
|
+
} catch {
|
|
25
|
+
return { running: false };
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
async function writeState(state) {
|
|
29
|
+
await ensureStateDir();
|
|
30
|
+
await fs.writeFile(ANTON_STATE_PATH, `${JSON.stringify({
|
|
31
|
+
...state,
|
|
32
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
33
|
+
}, null, 2)}\n`, "utf8");
|
|
34
|
+
}
|
|
35
|
+
async function acquireLock(force = false) {
|
|
36
|
+
await ensureStateDir();
|
|
37
|
+
try {
|
|
38
|
+
await fs.writeFile(ANTON_LOCK_PATH, JSON.stringify({
|
|
39
|
+
pid: process.pid,
|
|
40
|
+
startedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
41
|
+
}), {
|
|
42
|
+
encoding: "utf8",
|
|
43
|
+
flag: "wx"
|
|
44
|
+
});
|
|
45
|
+
} catch {
|
|
46
|
+
if (!force) throw new Error("Anton is already running (lock held)");
|
|
47
|
+
await fs.rm(ANTON_LOCK_PATH, { force: true });
|
|
48
|
+
await fs.writeFile(ANTON_LOCK_PATH, JSON.stringify({
|
|
49
|
+
pid: process.pid,
|
|
50
|
+
startedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
51
|
+
force: true
|
|
52
|
+
}), {
|
|
53
|
+
encoding: "utf8",
|
|
54
|
+
flag: "wx"
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
async function releaseLock() {
|
|
59
|
+
await fs.rm(ANTON_LOCK_PATH, { force: true });
|
|
60
|
+
}
|
|
61
|
+
async function shouldStop() {
|
|
62
|
+
const s = await readState();
|
|
63
|
+
return Boolean(s.stopRequested);
|
|
64
|
+
}
|
|
65
|
+
function parsePendingTasks(markdown) {
|
|
66
|
+
const lines = markdown.split(/\r?\n/);
|
|
67
|
+
const tasks = [];
|
|
68
|
+
for (let i = 0; i < lines.length; i++) {
|
|
69
|
+
const m = (lines[i] ?? "").match(/^(\s*)- \[ \] (.+)$/);
|
|
70
|
+
if (!m) continue;
|
|
71
|
+
tasks.push({
|
|
72
|
+
line: i + 1,
|
|
73
|
+
indent: m[1] ?? "",
|
|
74
|
+
text: (m[2] ?? "").trim()
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
return tasks;
|
|
78
|
+
}
|
|
79
|
+
function markTaskDone(markdown, lineNo) {
|
|
80
|
+
const lines = markdown.split(/\r?\n/);
|
|
81
|
+
const idx = lineNo - 1;
|
|
82
|
+
if (idx < 0 || idx >= lines.length) return markdown;
|
|
83
|
+
lines[idx] = (lines[idx] ?? "").replace(/^(\s*)- \[ \] /, "$1- [x] ");
|
|
84
|
+
return `${lines.join("\n")}\n`;
|
|
85
|
+
}
|
|
86
|
+
function buildDirectTaskPrompt(task) {
|
|
87
|
+
return [
|
|
88
|
+
"You are executing one item from a managed checklist.",
|
|
89
|
+
`Task: ${task}`,
|
|
90
|
+
"Rules:",
|
|
91
|
+
"1) Make the minimal code changes required for this task.",
|
|
92
|
+
"2) Run targeted tests for your change.",
|
|
93
|
+
"3) Return a concise completion summary."
|
|
94
|
+
].join("\n");
|
|
95
|
+
}
|
|
96
|
+
function buildDiscoveryPrompt(task, taskFile, planFilePath) {
|
|
97
|
+
return `You are running PRE-FLIGHT for an autonomous coding orchestrator.
|
|
98
|
+
|
|
99
|
+
## RULES
|
|
100
|
+
- DO NOT implement code changes. DO NOT modify source files.
|
|
101
|
+
- You may ONLY write to the plan file specified below.
|
|
102
|
+
- Read the codebase to understand what needs to change.
|
|
103
|
+
|
|
104
|
+
## TASK
|
|
105
|
+
From task file: ${taskFile}
|
|
106
|
+
Task: ${task}
|
|
107
|
+
|
|
108
|
+
## DECISION FLOW
|
|
109
|
+
|
|
110
|
+
**If task is ALREADY COMPLETE** (you are CERTAIN it's done after checking with tools):
|
|
111
|
+
→ Return ONLY: {"status":"complete","filename":""}
|
|
112
|
+
|
|
113
|
+
**If task is INCOMPLETE or UNCERTAIN**:
|
|
114
|
+
1. Read relevant source files to understand the current state
|
|
115
|
+
2. Write a detailed implementation plan to: ${planFilePath}
|
|
116
|
+
3. The plan MUST include:
|
|
117
|
+
- Task description (verbatim from above)
|
|
118
|
+
- What needs to change and why
|
|
119
|
+
- Implementation approach with specific steps
|
|
120
|
+
- Files to modify/create
|
|
121
|
+
- How to verify (test commands)
|
|
122
|
+
4. Verify the file exists and is non-empty
|
|
123
|
+
5. Return ONLY: {"status":"incomplete","filename":"${planFilePath}"}
|
|
124
|
+
|
|
125
|
+
## OUTPUT
|
|
126
|
+
Return ONLY the JSON object. No markdown fences. No explanation.`;
|
|
127
|
+
}
|
|
128
|
+
function buildReviewPrompt(planFilePath) {
|
|
129
|
+
return `Review this implementation plan and improve it:
|
|
130
|
+
${planFilePath}
|
|
131
|
+
|
|
132
|
+
Treat it as written by a junior developer. Look for:
|
|
133
|
+
- Missing edge cases
|
|
134
|
+
- Opportunities to reuse existing code
|
|
135
|
+
- Unclear or ambiguous steps
|
|
136
|
+
- Missing test scenarios
|
|
137
|
+
|
|
138
|
+
Update the SAME file in-place with your improvements.
|
|
139
|
+
|
|
140
|
+
After review, return ONLY:
|
|
141
|
+
{"status":"ready","filename":"${planFilePath}"}
|
|
142
|
+
|
|
143
|
+
Do not return status=ready unless the file exists and has content.
|
|
144
|
+
Return JSON only. No markdown fences. No commentary.`;
|
|
145
|
+
}
|
|
146
|
+
function buildImplementationPrompt(task, planFilePath) {
|
|
147
|
+
return [
|
|
148
|
+
"You are implementing a task from a managed checklist.",
|
|
149
|
+
"A planning agent has already analyzed the codebase and written a detailed spec.",
|
|
150
|
+
"",
|
|
151
|
+
`Task: ${task}`,
|
|
152
|
+
"",
|
|
153
|
+
`Implementation plan: ${planFilePath}`,
|
|
154
|
+
"",
|
|
155
|
+
"Rules:",
|
|
156
|
+
"1) Read the plan file FIRST — it contains the implementation approach.",
|
|
157
|
+
"2) Follow the plan precisely. Make the code changes specified.",
|
|
158
|
+
"3) Run the verification steps from the plan.",
|
|
159
|
+
"4) Return a concise completion summary.",
|
|
160
|
+
"",
|
|
161
|
+
"Do not deviate from the plan unless you find a clear error in it."
|
|
162
|
+
].join("\n");
|
|
163
|
+
}
|
|
164
|
+
function formatDuration(ms) {
|
|
165
|
+
const seconds = Math.floor(ms / 1e3);
|
|
166
|
+
if (seconds < 60) return `${seconds}s`;
|
|
167
|
+
const minutes = Math.floor(seconds / 60);
|
|
168
|
+
const secs = seconds % 60;
|
|
169
|
+
if (minutes < 60) return `${minutes}m ${secs}s`;
|
|
170
|
+
return `${Math.floor(minutes / 60)}h ${minutes % 60}m`;
|
|
171
|
+
}
|
|
172
|
+
function formatProgressMessage(event) {
|
|
173
|
+
switch (event.phase) {
|
|
174
|
+
case "start": return `🤚 **Anton activated**\n📄 Task file: \`${path.basename(event.taskFile)}\`\n📋 ${event.totalTasks} task${event.totalTasks === 1 ? "" : "s"} pending`;
|
|
175
|
+
case "task_start": return `\n🔪 **Task ${event.index}/${event.total}**: ${event.task}`;
|
|
176
|
+
case "discovery_start": return `🔎 Discovery: analyzing codebase for task ${event.index}/${event.total}...`;
|
|
177
|
+
case "discovery_complete": return `📝 Plan written: \`${path.basename(event.planFile)}\``;
|
|
178
|
+
case "discovery_failed": return `⚠️ Discovery failed: ${event.error}\n└ Falling back to direct execution`;
|
|
179
|
+
case "discovery_already_complete": return `✅ Discovery says task already complete — skipping implementation`;
|
|
180
|
+
case "review_start": return `🧪 Reviewing plan: \`${path.basename(event.planFile)}\`...`;
|
|
181
|
+
case "review_complete": return `✅ Plan reviewed and refined`;
|
|
182
|
+
case "review_failed": return `⚠️ Review failed: ${event.error}\n└ Proceeding with unreviewed plan`;
|
|
183
|
+
case "implementation_start": return event.planFile ? `🛠️ Implementation: following spec \`${path.basename(event.planFile)}\`` : `🛠️ Implementation: direct execution`;
|
|
184
|
+
case "task_agent_spawned": return `🤖 Agent spawned (session: \`${event.sessionId}\`)`;
|
|
185
|
+
case "task_complete": return `✅ **Task ${event.index}/${event.total} complete**: ${event.task}`;
|
|
186
|
+
case "task_failed": return `❌ **Task ${event.index}/${event.total} failed**: ${event.task}\n└ ${event.error}`;
|
|
187
|
+
case "task_skipped": return `⏭️ **Task ${event.index}/${event.total} skipped**: ${event.task}\n└ ${event.reason}`;
|
|
188
|
+
case "stopped": return `🛑 **Anton stopped** (${event.completedSoFar}/${event.total} completed before stop)`;
|
|
189
|
+
case "finish": return [
|
|
190
|
+
`\n🏁 **Anton finished**`,
|
|
191
|
+
`✅ Completed: ${event.completed}/${event.total}`,
|
|
192
|
+
event.skipped > 0 ? `⏭️ Skipped: ${event.skipped}` : null,
|
|
193
|
+
`⏱️ Duration: ${formatDuration(event.durationMs)}`
|
|
194
|
+
].filter(Boolean).join("\n");
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
async function antonStatus(runtime) {
|
|
198
|
+
const s = await readState();
|
|
199
|
+
if (!s.running) {
|
|
200
|
+
runtime.log("Anton is idle.");
|
|
201
|
+
if (s.lastSummary) runtime.log(s.lastSummary);
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
runtime.log(`Anton running: ${s.completed ?? 0}/${s.total ?? 0} complete` + (s.taskFile ? ` | file=${s.taskFile}` : "") + (typeof s.currentIndex === "number" ? ` | current=${s.currentIndex + 1}` : ""));
|
|
205
|
+
}
|
|
206
|
+
async function antonStop(runtime) {
|
|
207
|
+
const s = await readState();
|
|
208
|
+
if (!s.running) {
|
|
209
|
+
runtime.log("Anton is not running.");
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
await writeState({
|
|
213
|
+
...s,
|
|
214
|
+
stopRequested: true
|
|
215
|
+
});
|
|
216
|
+
runtime.log("Anton stop requested. It will stop after current task.");
|
|
217
|
+
}
|
|
218
|
+
/** Load Anton config from the IdleHands config file. */
|
|
219
|
+
async function loadAntonConfig() {
|
|
220
|
+
try {
|
|
221
|
+
const { loadConfig } = await import("./model-selection-0dGxYGp8.js").then((n) => n.Mt);
|
|
222
|
+
return loadConfig().anton ?? {};
|
|
223
|
+
} catch {
|
|
224
|
+
return {};
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
async function runAgentTask(args) {
|
|
228
|
+
const { agentCliCommand } = await import("./agent-via-gateway-oMn0WfUq.js").then((n) => n.n);
|
|
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
|
+
const result = await agentCliCommand({
|
|
231
|
+
message: args.message,
|
|
232
|
+
agent: args.agent,
|
|
233
|
+
to: args.to,
|
|
234
|
+
sessionId: args.sessionId,
|
|
235
|
+
timeout: args.timeout,
|
|
236
|
+
json: true,
|
|
237
|
+
deliver: false,
|
|
238
|
+
extraSystemPrompt,
|
|
239
|
+
workspaceDir: args.workspaceDir
|
|
240
|
+
}, args.runtime, args.deps);
|
|
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() };
|
|
242
|
+
}
|
|
243
|
+
function makePlanFilePath(planDir, taskIndex) {
|
|
244
|
+
return path.join(planDir, `task-${taskIndex}-${Date.now()}.md`);
|
|
245
|
+
}
|
|
246
|
+
async function ensurePlanDir(planDir) {
|
|
247
|
+
await fs.mkdir(planDir, { recursive: true });
|
|
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
|
+
}
|
|
266
|
+
async function isPlanFileValid(filePath) {
|
|
267
|
+
try {
|
|
268
|
+
const stat = await fs.stat(filePath);
|
|
269
|
+
if (!stat.isFile() || stat.size < 20) return false;
|
|
270
|
+
return isUsefulPlanText(await fs.readFile(filePath, "utf8"));
|
|
271
|
+
} catch {
|
|
272
|
+
return false;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
async function getGitChangedFileCount(cwd, ignorePaths = []) {
|
|
276
|
+
try {
|
|
277
|
+
const { stdout } = await execFile$1("git", ["status", "--porcelain"], { cwd });
|
|
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;
|
|
287
|
+
} catch {
|
|
288
|
+
return null;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
function extractJsonObject(text) {
|
|
292
|
+
const trimmed = text.trim();
|
|
293
|
+
if (!trimmed) return null;
|
|
294
|
+
const tryParse = (candidate) => {
|
|
295
|
+
try {
|
|
296
|
+
const parsed = JSON.parse(candidate);
|
|
297
|
+
if (!parsed || typeof parsed !== "object") return null;
|
|
298
|
+
return parsed;
|
|
299
|
+
} catch {
|
|
300
|
+
return null;
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
const direct = tryParse(trimmed);
|
|
304
|
+
if (direct) return direct;
|
|
305
|
+
const fencedMatch = trimmed.match(/```(?:json)?\s*([\s\S]*?)```/i);
|
|
306
|
+
if (fencedMatch?.[1]) {
|
|
307
|
+
const fenced = tryParse(fencedMatch[1].trim());
|
|
308
|
+
if (fenced) return fenced;
|
|
309
|
+
}
|
|
310
|
+
const first = trimmed.indexOf("{");
|
|
311
|
+
const last = trimmed.lastIndexOf("}");
|
|
312
|
+
if (first >= 0 && last > first) {
|
|
313
|
+
const sliced = tryParse(trimmed.slice(first, last + 1));
|
|
314
|
+
if (sliced) return sliced;
|
|
315
|
+
}
|
|
316
|
+
return null;
|
|
317
|
+
}
|
|
318
|
+
function extractPlanMarkdownFromText(text) {
|
|
319
|
+
const candidate = text.match(/```(?:markdown|md)?\s*([\s\S]*?)```/i)?.[1]?.trim() ?? text.trim();
|
|
320
|
+
if (!isUsefulPlanText(candidate)) return;
|
|
321
|
+
return candidate;
|
|
322
|
+
}
|
|
323
|
+
function normalizeDiscoveryFilename(filename, expectedPlanFile) {
|
|
324
|
+
const trimmed = filename?.trim();
|
|
325
|
+
if (!trimmed) return expectedPlanFile;
|
|
326
|
+
return path.resolve(trimmed);
|
|
327
|
+
}
|
|
328
|
+
function buildDiscoveryRepairPrompt(task, taskFile, planFilePath) {
|
|
329
|
+
return `RETRY: your previous preflight response did not produce a valid plan file.
|
|
330
|
+
|
|
331
|
+
You MUST complete these steps exactly:
|
|
332
|
+
1) Write the implementation plan to: ${planFilePath}
|
|
333
|
+
2) Verify the file exists and is non-empty
|
|
334
|
+
3) Return ONLY strict JSON: {"status":"incomplete","filename":"${planFilePath}"}
|
|
335
|
+
|
|
336
|
+
If task is already complete, return ONLY: {"status":"complete","filename":""}
|
|
337
|
+
|
|
338
|
+
Do not include THOUGHT, markdown fences, or extra commentary.
|
|
339
|
+
Task file: ${taskFile}
|
|
340
|
+
Task: ${task}`;
|
|
341
|
+
}
|
|
342
|
+
async function tryPersistPlanFallback(params) {
|
|
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();
|
|
344
|
+
if (!isUsefulPlanText(planText)) return false;
|
|
345
|
+
await fs.writeFile(params.planFile, `${planText}\n`, "utf8");
|
|
346
|
+
return await isPlanFileValid(params.planFile);
|
|
347
|
+
}
|
|
348
|
+
async function writeDeterministicPlanFallback(params) {
|
|
349
|
+
const plan = `# Task\n\n${params.taskText}\n\n## What needs to change\n- Implement the task exactly as described in the checklist item.\n- Keep changes scoped to files directly related to this task.\n\n## Implementation approach\n1. Inspect existing CI/workflow/config files relevant to this task.\n2. Apply minimal edits needed to satisfy the task requirements.\n3. Keep behavior/style consistent with adjacent repository conventions.\n\n## Files to modify\n- Determine from ${params.taskFile} and related source/config files.\n\n## Verification\n- Run targeted tests for touched areas.\n- Run repository checks required by this project (for example: pnpm test / pnpm check) as appropriate.\n- Confirm git diff contains only task-relevant changes.\n`;
|
|
350
|
+
await fs.writeFile(params.planFile, plan, "utf8");
|
|
351
|
+
return await isPlanFileValid(params.planFile);
|
|
352
|
+
}
|
|
353
|
+
async function runDiscoveryPhase(args) {
|
|
354
|
+
const planFile = makePlanFilePath(args.planDir, args.taskNum);
|
|
355
|
+
await ensurePlanDir(args.planDir);
|
|
356
|
+
await args.notify({
|
|
357
|
+
phase: "discovery_start",
|
|
358
|
+
index: args.taskNum,
|
|
359
|
+
total: args.total,
|
|
360
|
+
task: args.task.text
|
|
361
|
+
});
|
|
362
|
+
for (let attempt = 0; attempt <= args.maxRetries; attempt++) {
|
|
363
|
+
const sessionId = `anton-discovery-${Date.now()}-${args.taskNum}-${attempt}`;
|
|
364
|
+
try {
|
|
365
|
+
await args.notify({
|
|
366
|
+
phase: "task_agent_spawned",
|
|
367
|
+
index: args.taskNum,
|
|
368
|
+
total: args.total,
|
|
369
|
+
task: `Discovery (attempt ${attempt + 1})`,
|
|
370
|
+
sessionId
|
|
371
|
+
});
|
|
372
|
+
const firstPass = await runAgentTask({
|
|
373
|
+
message: buildDiscoveryPrompt(args.task.text, args.taskFile, planFile),
|
|
374
|
+
sessionId,
|
|
375
|
+
timeout: args.timeout,
|
|
376
|
+
agent: args.agent,
|
|
377
|
+
to: args.to,
|
|
378
|
+
runtime: args.runtime,
|
|
379
|
+
deps: args.deps,
|
|
380
|
+
workspaceDir: args.workspaceDir
|
|
381
|
+
});
|
|
382
|
+
const firstParsed = extractJsonObject(firstPass.text);
|
|
383
|
+
const declaredPlanFile = normalizeDiscoveryFilename(firstParsed?.filename, planFile);
|
|
384
|
+
if (await isPlanFileValid(planFile)) {
|
|
385
|
+
await args.notify({
|
|
386
|
+
phase: "discovery_complete",
|
|
387
|
+
index: args.taskNum,
|
|
388
|
+
total: args.total,
|
|
389
|
+
task: args.task.text,
|
|
390
|
+
planFile
|
|
391
|
+
});
|
|
392
|
+
return {
|
|
393
|
+
status: "plan_ready",
|
|
394
|
+
planFile
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
if (declaredPlanFile !== planFile && await isPlanFileValid(declaredPlanFile)) {
|
|
398
|
+
await args.notify({
|
|
399
|
+
phase: "discovery_complete",
|
|
400
|
+
index: args.taskNum,
|
|
401
|
+
total: args.total,
|
|
402
|
+
task: args.task.text,
|
|
403
|
+
planFile: declaredPlanFile
|
|
404
|
+
});
|
|
405
|
+
return {
|
|
406
|
+
status: "plan_ready",
|
|
407
|
+
planFile: declaredPlanFile
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
if ((firstParsed?.status ?? "").toLowerCase() === "incomplete") {
|
|
411
|
+
if (await tryPersistPlanFallback({
|
|
412
|
+
planFile: declaredPlanFile,
|
|
413
|
+
parsed: firstParsed,
|
|
414
|
+
rawText: firstPass.text
|
|
415
|
+
}) || await writeDeterministicPlanFallback({
|
|
416
|
+
planFile: declaredPlanFile,
|
|
417
|
+
taskText: args.task.text,
|
|
418
|
+
taskFile: args.taskFile
|
|
419
|
+
})) {
|
|
420
|
+
await args.notify({
|
|
421
|
+
phase: "discovery_complete",
|
|
422
|
+
index: args.taskNum,
|
|
423
|
+
total: args.total,
|
|
424
|
+
task: args.task.text,
|
|
425
|
+
planFile: declaredPlanFile
|
|
426
|
+
});
|
|
427
|
+
return {
|
|
428
|
+
status: "plan_ready",
|
|
429
|
+
planFile: declaredPlanFile
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
const repairSessionId = `anton-discovery-repair-${Date.now()}-${args.taskNum}-${attempt}`;
|
|
434
|
+
await args.notify({
|
|
435
|
+
phase: "task_agent_spawned",
|
|
436
|
+
index: args.taskNum,
|
|
437
|
+
total: args.total,
|
|
438
|
+
task: `Discovery repair (attempt ${attempt + 1})`,
|
|
439
|
+
sessionId: repairSessionId
|
|
440
|
+
});
|
|
441
|
+
const repairPass = await runAgentTask({
|
|
442
|
+
message: buildDiscoveryRepairPrompt(args.task.text, args.taskFile, declaredPlanFile),
|
|
443
|
+
sessionId: repairSessionId,
|
|
444
|
+
timeout: args.timeout,
|
|
445
|
+
agent: args.agent,
|
|
446
|
+
to: args.to,
|
|
447
|
+
runtime: args.runtime,
|
|
448
|
+
deps: args.deps,
|
|
449
|
+
workspaceDir: args.workspaceDir
|
|
450
|
+
});
|
|
451
|
+
const repairParsed = extractJsonObject(repairPass.text);
|
|
452
|
+
if (await isPlanFileValid(declaredPlanFile)) {
|
|
453
|
+
await args.notify({
|
|
454
|
+
phase: "discovery_complete",
|
|
455
|
+
index: args.taskNum,
|
|
456
|
+
total: args.total,
|
|
457
|
+
task: args.task.text,
|
|
458
|
+
planFile: declaredPlanFile
|
|
459
|
+
});
|
|
460
|
+
return {
|
|
461
|
+
status: "plan_ready",
|
|
462
|
+
planFile: declaredPlanFile
|
|
463
|
+
};
|
|
464
|
+
}
|
|
465
|
+
const repairPlanFile = normalizeDiscoveryFilename(repairParsed?.filename, declaredPlanFile);
|
|
466
|
+
if (await isPlanFileValid(repairPlanFile) || await tryPersistPlanFallback({
|
|
467
|
+
planFile: repairPlanFile,
|
|
468
|
+
parsed: repairParsed,
|
|
469
|
+
rawText: repairPass.text
|
|
470
|
+
}) || (repairParsed?.status ?? "").toLowerCase() === "incomplete" && await writeDeterministicPlanFallback({
|
|
471
|
+
planFile: repairPlanFile,
|
|
472
|
+
taskText: args.task.text,
|
|
473
|
+
taskFile: args.taskFile
|
|
474
|
+
})) {
|
|
475
|
+
await args.notify({
|
|
476
|
+
phase: "discovery_complete",
|
|
477
|
+
index: args.taskNum,
|
|
478
|
+
total: args.total,
|
|
479
|
+
task: args.task.text,
|
|
480
|
+
planFile: repairPlanFile
|
|
481
|
+
});
|
|
482
|
+
return {
|
|
483
|
+
status: "plan_ready",
|
|
484
|
+
planFile: repairPlanFile
|
|
485
|
+
};
|
|
486
|
+
}
|
|
487
|
+
if (attempt === args.maxRetries) {
|
|
488
|
+
const reason = "Discovery did not produce a valid plan file after primary + repair passes";
|
|
489
|
+
await args.notify({
|
|
490
|
+
phase: "discovery_failed",
|
|
491
|
+
index: args.taskNum,
|
|
492
|
+
total: args.total,
|
|
493
|
+
task: args.task.text,
|
|
494
|
+
error: reason
|
|
495
|
+
});
|
|
496
|
+
return {
|
|
497
|
+
status: "failed",
|
|
498
|
+
error: reason
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
} catch (err) {
|
|
502
|
+
const errorMsg = err instanceof Error ? err.message : String(err);
|
|
503
|
+
if (attempt === args.maxRetries) {
|
|
504
|
+
await args.notify({
|
|
505
|
+
phase: "discovery_failed",
|
|
506
|
+
index: args.taskNum,
|
|
507
|
+
total: args.total,
|
|
508
|
+
task: args.task.text,
|
|
509
|
+
error: errorMsg
|
|
510
|
+
});
|
|
511
|
+
return {
|
|
512
|
+
status: "failed",
|
|
513
|
+
error: errorMsg
|
|
514
|
+
};
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
return {
|
|
519
|
+
status: "failed",
|
|
520
|
+
error: "Discovery exhausted retries"
|
|
521
|
+
};
|
|
522
|
+
}
|
|
523
|
+
async function runReviewPhase(args) {
|
|
524
|
+
await args.notify({
|
|
525
|
+
phase: "review_start",
|
|
526
|
+
index: args.taskNum,
|
|
527
|
+
total: args.total,
|
|
528
|
+
task: args.task.text,
|
|
529
|
+
planFile: args.planFile
|
|
530
|
+
});
|
|
531
|
+
const sessionId = `anton-review-${Date.now()}-${args.taskNum}`;
|
|
532
|
+
try {
|
|
533
|
+
await args.notify({
|
|
534
|
+
phase: "task_agent_spawned",
|
|
535
|
+
index: args.taskNum,
|
|
536
|
+
total: args.total,
|
|
537
|
+
task: "Requirements review",
|
|
538
|
+
sessionId
|
|
539
|
+
});
|
|
540
|
+
await runAgentTask({
|
|
541
|
+
message: buildReviewPrompt(args.planFile),
|
|
542
|
+
sessionId,
|
|
543
|
+
timeout: args.timeout,
|
|
544
|
+
agent: args.agent,
|
|
545
|
+
to: args.to,
|
|
546
|
+
runtime: args.runtime,
|
|
547
|
+
deps: args.deps,
|
|
548
|
+
workspaceDir: args.workspaceDir
|
|
549
|
+
});
|
|
550
|
+
await args.notify({
|
|
551
|
+
phase: "review_complete",
|
|
552
|
+
index: args.taskNum,
|
|
553
|
+
total: args.total,
|
|
554
|
+
task: args.task.text,
|
|
555
|
+
planFile: args.planFile
|
|
556
|
+
});
|
|
557
|
+
return { success: true };
|
|
558
|
+
} catch (err) {
|
|
559
|
+
const errorMsg = err instanceof Error ? err.message : String(err);
|
|
560
|
+
await args.notify({
|
|
561
|
+
phase: "review_failed",
|
|
562
|
+
index: args.taskNum,
|
|
563
|
+
total: args.total,
|
|
564
|
+
task: args.task.text,
|
|
565
|
+
error: errorMsg
|
|
566
|
+
});
|
|
567
|
+
return {
|
|
568
|
+
success: false,
|
|
569
|
+
error: errorMsg
|
|
570
|
+
};
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
async function runAnton(args) {
|
|
574
|
+
const filePath = path.resolve(args.taskFile);
|
|
575
|
+
const pending = parsePendingTasks(await fs.readFile(filePath, "utf8"));
|
|
576
|
+
const notify = args.onProgress ?? (async () => {});
|
|
577
|
+
if (args.dryRun) {
|
|
578
|
+
args.runtime.log(`Dry run: ${pending.length} pending task(s)`);
|
|
579
|
+
for (const t of pending) args.runtime.log(`- [ ] ${t.text}`);
|
|
580
|
+
return;
|
|
581
|
+
}
|
|
582
|
+
if (pending.length === 0) {
|
|
583
|
+
args.runtime.log("No pending tasks.");
|
|
584
|
+
await notify({
|
|
585
|
+
phase: "finish",
|
|
586
|
+
completed: 0,
|
|
587
|
+
skipped: 0,
|
|
588
|
+
total: 0,
|
|
589
|
+
durationMs: 0
|
|
590
|
+
});
|
|
591
|
+
return;
|
|
592
|
+
}
|
|
593
|
+
const antonCfg = await loadAntonConfig();
|
|
594
|
+
const mode = args.mode ?? antonCfg.mode ?? "direct";
|
|
595
|
+
const requirementsReview = antonCfg.requirementsReview ?? false;
|
|
596
|
+
const taskTimeout = antonCfg.taskTimeoutSec ?? 1200;
|
|
597
|
+
const discoveryTimeout = antonCfg.discoveryTimeoutSec ?? taskTimeout;
|
|
598
|
+
const reviewTimeout = antonCfg.reviewTimeoutSec ?? taskTimeout;
|
|
599
|
+
const preflightMaxRetries = antonCfg.preflightMaxRetries ?? 2;
|
|
600
|
+
const planDir = antonCfg.planDir ? path.resolve(antonCfg.planDir) : path.resolve(path.dirname(filePath), ".agents", "tasks");
|
|
601
|
+
const { loadConfig } = await import("./model-selection-0dGxYGp8.js").then((n) => n.Mt);
|
|
602
|
+
const cfg = loadConfig();
|
|
603
|
+
const defaultTimeout = String(Number.isFinite(args.timeoutSec) && (args.timeoutSec ?? 0) > 0 ? args.timeoutSec : cfg.agents?.defaults?.timeoutSeconds ?? taskTimeout);
|
|
604
|
+
await acquireLock(Boolean(args.force));
|
|
605
|
+
const startedAt = Date.now();
|
|
606
|
+
await writeState({
|
|
607
|
+
running: true,
|
|
608
|
+
taskFile: filePath,
|
|
609
|
+
startedAt: new Date(startedAt).toISOString(),
|
|
610
|
+
currentIndex: 0,
|
|
611
|
+
total: pending.length,
|
|
612
|
+
completed: 0,
|
|
613
|
+
skipped: 0,
|
|
614
|
+
stopRequested: false
|
|
615
|
+
});
|
|
616
|
+
await notify({
|
|
617
|
+
phase: "start",
|
|
618
|
+
taskFile: filePath,
|
|
619
|
+
totalTasks: pending.length
|
|
620
|
+
});
|
|
621
|
+
args.runtime.log(`[Anton] Mode: ${mode}${mode === "preflight" ? requirementsReview ? " (with review)" : " (discovery → implementation)" : ""}`);
|
|
622
|
+
let completed = 0;
|
|
623
|
+
let skipped = 0;
|
|
624
|
+
try {
|
|
625
|
+
for (let i = 0; i < pending.length; i++) {
|
|
626
|
+
if (await shouldStop()) {
|
|
627
|
+
args.runtime.log("Anton stop acknowledged.");
|
|
628
|
+
await notify({
|
|
629
|
+
phase: "stopped",
|
|
630
|
+
completedSoFar: completed,
|
|
631
|
+
total: pending.length
|
|
632
|
+
});
|
|
633
|
+
break;
|
|
634
|
+
}
|
|
635
|
+
const task = pending[i];
|
|
636
|
+
if (!task) continue;
|
|
637
|
+
const taskNum = i + 1;
|
|
638
|
+
await writeState({
|
|
639
|
+
running: true,
|
|
640
|
+
taskFile: filePath,
|
|
641
|
+
startedAt: new Date(startedAt).toISOString(),
|
|
642
|
+
currentIndex: i,
|
|
643
|
+
total: pending.length,
|
|
644
|
+
completed,
|
|
645
|
+
skipped,
|
|
646
|
+
stopRequested: false
|
|
647
|
+
});
|
|
648
|
+
args.runtime.log(`\n[Anton] Task ${taskNum}/${pending.length}: ${task.text}`);
|
|
649
|
+
await notify({
|
|
650
|
+
phase: "task_start",
|
|
651
|
+
index: taskNum,
|
|
652
|
+
total: pending.length,
|
|
653
|
+
task: task.text
|
|
654
|
+
});
|
|
655
|
+
try {
|
|
656
|
+
let planFile;
|
|
657
|
+
const gitCwdForBaseline = args.workspaceDir ? path.resolve(args.workspaceDir) : path.dirname(filePath);
|
|
658
|
+
const taskFileRelForBaseline = path.relative(gitCwdForBaseline, filePath).replace(/\\/g, "/");
|
|
659
|
+
const changedBeforeTask = await getGitChangedFileCount(gitCwdForBaseline, taskFileRelForBaseline.startsWith("..") ? [] : [taskFileRelForBaseline]);
|
|
660
|
+
if (mode === "preflight") {
|
|
661
|
+
const discoveryResult = await runDiscoveryPhase({
|
|
662
|
+
task,
|
|
663
|
+
taskNum,
|
|
664
|
+
total: pending.length,
|
|
665
|
+
taskFile: filePath,
|
|
666
|
+
planDir,
|
|
667
|
+
timeout: String(discoveryTimeout),
|
|
668
|
+
maxRetries: preflightMaxRetries,
|
|
669
|
+
agent: args.agent,
|
|
670
|
+
to: args.to,
|
|
671
|
+
runtime: args.runtime,
|
|
672
|
+
deps: args.deps,
|
|
673
|
+
notify,
|
|
674
|
+
workspaceDir: args.workspaceDir
|
|
675
|
+
});
|
|
676
|
+
if (discoveryResult.status === "complete") {
|
|
677
|
+
await notify({
|
|
678
|
+
phase: "discovery_already_complete",
|
|
679
|
+
index: taskNum,
|
|
680
|
+
total: pending.length,
|
|
681
|
+
task: task.text
|
|
682
|
+
});
|
|
683
|
+
const updated = markTaskDone(await fs.readFile(filePath, "utf8"), task.line);
|
|
684
|
+
await fs.writeFile(filePath, updated, "utf8");
|
|
685
|
+
completed += 1;
|
|
686
|
+
await notify({
|
|
687
|
+
phase: "task_complete",
|
|
688
|
+
index: taskNum,
|
|
689
|
+
total: pending.length,
|
|
690
|
+
task: task.text
|
|
691
|
+
});
|
|
692
|
+
continue;
|
|
693
|
+
}
|
|
694
|
+
if (discoveryResult.status === "plan_ready" && discoveryResult.planFile) {
|
|
695
|
+
planFile = discoveryResult.planFile;
|
|
696
|
+
if (requirementsReview) await runReviewPhase({
|
|
697
|
+
task,
|
|
698
|
+
taskNum,
|
|
699
|
+
total: pending.length,
|
|
700
|
+
planFile,
|
|
701
|
+
timeout: String(reviewTimeout),
|
|
702
|
+
agent: args.agent,
|
|
703
|
+
to: args.to,
|
|
704
|
+
runtime: args.runtime,
|
|
705
|
+
deps: args.deps,
|
|
706
|
+
notify,
|
|
707
|
+
workspaceDir: args.workspaceDir
|
|
708
|
+
});
|
|
709
|
+
}
|
|
710
|
+
if (!planFile) throw new Error("Preflight discovery did not produce a verified plan file; refusing direct implementation fallback");
|
|
711
|
+
}
|
|
712
|
+
await notify({
|
|
713
|
+
phase: "implementation_start",
|
|
714
|
+
index: taskNum,
|
|
715
|
+
total: pending.length,
|
|
716
|
+
task: task.text,
|
|
717
|
+
planFile
|
|
718
|
+
});
|
|
719
|
+
const implSessionId = `anton-impl-${Date.now()}-${taskNum}`;
|
|
720
|
+
await notify({
|
|
721
|
+
phase: "task_agent_spawned",
|
|
722
|
+
index: taskNum,
|
|
723
|
+
total: pending.length,
|
|
724
|
+
task: task.text,
|
|
725
|
+
sessionId: implSessionId
|
|
726
|
+
});
|
|
727
|
+
const implPrompt = planFile ? buildImplementationPrompt(task.text, planFile) : buildDirectTaskPrompt(task.text);
|
|
728
|
+
const gitCwd = args.workspaceDir ? path.resolve(args.workspaceDir) : path.dirname(filePath);
|
|
729
|
+
const taskFileRel = path.relative(gitCwd, filePath).replace(/\\/g, "/");
|
|
730
|
+
const changeIgnores = taskFileRel.startsWith("..") ? [] : [taskFileRel];
|
|
731
|
+
await runAgentTask({
|
|
732
|
+
message: implPrompt,
|
|
733
|
+
sessionId: implSessionId,
|
|
734
|
+
timeout: defaultTimeout,
|
|
735
|
+
agent: args.agent,
|
|
736
|
+
to: args.to,
|
|
737
|
+
runtime: args.runtime,
|
|
738
|
+
deps: args.deps,
|
|
739
|
+
workspaceDir: args.workspaceDir
|
|
740
|
+
});
|
|
741
|
+
const changedAfter = await getGitChangedFileCount(gitCwd, changeIgnores);
|
|
742
|
+
if (mode === "preflight" && changedBeforeTask !== null && changedAfter !== null && changedAfter <= changedBeforeTask) throw new Error("Implementation made no repository changes; refusing to mark task complete");
|
|
743
|
+
const updated = markTaskDone(await fs.readFile(filePath, "utf8"), task.line);
|
|
744
|
+
await fs.writeFile(filePath, updated, "utf8");
|
|
745
|
+
completed += 1;
|
|
746
|
+
await notify({
|
|
747
|
+
phase: "task_complete",
|
|
748
|
+
index: taskNum,
|
|
749
|
+
total: pending.length,
|
|
750
|
+
task: task.text
|
|
751
|
+
});
|
|
752
|
+
} catch (err) {
|
|
753
|
+
skipped += 1;
|
|
754
|
+
const errorMsg = err instanceof Error ? err.message : String(err);
|
|
755
|
+
args.runtime.error(`[Anton] Task failed and was skipped: ${task.text}`);
|
|
756
|
+
args.runtime.error(errorMsg);
|
|
757
|
+
await notify({
|
|
758
|
+
phase: "task_failed",
|
|
759
|
+
index: taskNum,
|
|
760
|
+
total: pending.length,
|
|
761
|
+
task: task.text,
|
|
762
|
+
error: errorMsg
|
|
763
|
+
});
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
const durationMs = Date.now() - startedAt;
|
|
767
|
+
const summary = `Anton finished: completed=${completed}, skipped=${skipped}, total=${pending.length}, duration=${formatDuration(durationMs)}`;
|
|
768
|
+
await writeState({
|
|
769
|
+
running: false,
|
|
770
|
+
taskFile: filePath,
|
|
771
|
+
startedAt: new Date(startedAt).toISOString(),
|
|
772
|
+
total: pending.length,
|
|
773
|
+
completed,
|
|
774
|
+
skipped,
|
|
775
|
+
lastSummary: summary,
|
|
776
|
+
stopRequested: false
|
|
777
|
+
});
|
|
778
|
+
args.runtime.log(`\n${summary}`);
|
|
779
|
+
await notify({
|
|
780
|
+
phase: "finish",
|
|
781
|
+
completed,
|
|
782
|
+
skipped,
|
|
783
|
+
total: pending.length,
|
|
784
|
+
durationMs
|
|
785
|
+
});
|
|
786
|
+
} finally {
|
|
787
|
+
await releaseLock();
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
//#endregion
|
|
792
|
+
export { runAnton as i, antonStop as n, anton_exports as r, antonStatus as t };
|