@namzu/cli 62.0.1 → 63.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (714) hide show
  1. package/CHANGELOG.md +145 -0
  2. package/dist/bin.js +1 -1
  3. package/dist/checkpoints/manifest.d.ts.map +1 -1
  4. package/dist/checkpoints/store.d.ts.map +1 -1
  5. package/dist/chunks/{acp-XDHKC3S3.js → acp-5UY6W7DP.js} +160 -150
  6. package/dist/chunks/acp-5UY6W7DP.js.map +6 -0
  7. package/dist/chunks/{activity-command-IPUTIWSY.js → activity-command-LKFDX4Y3.js} +16 -15
  8. package/dist/chunks/activity-command-LKFDX4Y3.js.map +6 -0
  9. package/dist/chunks/{add-V25Q5HXG.js → add-RNTXN545.js} +70 -39
  10. package/dist/chunks/add-RNTXN545.js.map +6 -0
  11. package/dist/chunks/{agent-I7EPRW2H.js → agent-RVTT22XL.js} +65 -63
  12. package/dist/chunks/agent-session-SNTV4WJB.js +105 -0
  13. package/dist/chunks/{apply-at-exit-FR464TY4.js → apply-at-exit-4VEPIGG6.js} +8 -7
  14. package/dist/chunks/apply-at-exit-4VEPIGG6.js.map +6 -0
  15. package/dist/chunks/{archive-XXGELXD4.js → archive-SUVDTGMZ.js} +14 -13
  16. package/dist/chunks/archive-SUVDTGMZ.js.map +6 -0
  17. package/dist/chunks/{auth-MPYY5JGI.js → auth-UDHGYPMT.js} +15 -14
  18. package/dist/chunks/auth-UDHGYPMT.js.map +6 -0
  19. package/dist/chunks/{bin-main-XOHYP3G4.js → bin-main-3IIARSC5.js} +11 -10
  20. package/dist/chunks/bin-main-3IIARSC5.js.map +6 -0
  21. package/dist/chunks/{binding-5GGFSURJ.js → binding-AVL54CBF.js} +3 -3
  22. package/dist/chunks/{browser-KGFFFY3K.js → browser-AYBO33ZR.js} +7 -7
  23. package/dist/chunks/{chat-HPKRZNH3.js → chat-A7OAT7GU.js} +19 -18
  24. package/dist/chunks/chat-A7OAT7GU.js.map +6 -0
  25. package/dist/chunks/{chunk-JAN5CCP6.js → chunk-3F5YRA4T.js} +8 -7
  26. package/dist/chunks/chunk-3F5YRA4T.js.map +6 -0
  27. package/dist/chunks/{chunk-PSWUXFIH.js → chunk-3GGLAPPV.js} +6 -6
  28. package/dist/chunks/{chunk-D6D5D6UJ.js → chunk-3GVS745R.js} +2 -2
  29. package/dist/chunks/{chunk-GQGUPWXT.js → chunk-3HHWM67Q.js} +3 -3
  30. package/dist/chunks/{chunk-W2OTZAXB.js → chunk-3HUEBQAN.js} +4 -4
  31. package/dist/chunks/{chunk-WUGXLX6O.js → chunk-3TURVGJT.js} +2 -2
  32. package/dist/chunks/{chunk-YLAWGDZY.js → chunk-43NXEWX4.js} +2 -2
  33. package/dist/chunks/{chunk-ECWJCDCK.js → chunk-47SP3GJ4.js} +2 -2
  34. package/dist/chunks/{chunk-IWVZTMTO.js → chunk-4EDVII4B.js} +3 -3
  35. package/dist/chunks/{chunk-I32DOGZZ.js → chunk-4IBNEQPZ.js} +10 -9
  36. package/dist/chunks/chunk-4IBNEQPZ.js.map +6 -0
  37. package/dist/chunks/{chunk-HNR6STBM.js → chunk-4LMAEQ42.js} +2 -2
  38. package/dist/chunks/{chunk-JBZ4QYXQ.js → chunk-53JCP2MA.js} +3 -3
  39. package/dist/chunks/{chunk-JBZ4QYXQ.js.map → chunk-53JCP2MA.js.map} +1 -1
  40. package/dist/chunks/{chunk-Y7HOTNZR.js → chunk-563QO54Z.js} +2372 -1886
  41. package/dist/chunks/chunk-563QO54Z.js.map +6 -0
  42. package/dist/chunks/{chunk-BLAZEM4K.js → chunk-5BDR52OS.js} +3 -3
  43. package/dist/chunks/{chunk-RNWMX73V.js → chunk-5N55CGZG.js} +2 -2
  44. package/dist/chunks/{chunk-MB5EOUEL.js → chunk-5QUYAINU.js} +5 -4
  45. package/dist/chunks/chunk-5QUYAINU.js.map +6 -0
  46. package/dist/chunks/chunk-5VW3COA7.js +31 -0
  47. package/dist/chunks/chunk-5VW3COA7.js.map +6 -0
  48. package/dist/chunks/{chunk-CFVWDSLP.js → chunk-657OVGTQ.js} +8 -8
  49. package/dist/chunks/{chunk-HHMZIAE7.js → chunk-66ZJ7T5L.js} +2 -2
  50. package/dist/chunks/{chunk-3H4L2VND.js → chunk-6PHA4NAI.js} +4 -4
  51. package/dist/chunks/{chunk-WUS3BMCC.js → chunk-6TTWYQB6.js} +3 -3
  52. package/dist/chunks/{chunk-FLSWKVLP.js → chunk-753XP2BL.js} +97 -31
  53. package/dist/chunks/chunk-753XP2BL.js.map +6 -0
  54. package/dist/chunks/{chunk-WAHSZG2X.js → chunk-75YGSZN7.js} +2 -2
  55. package/dist/chunks/{chunk-VZTSMFNP.js → chunk-7ADQK225.js} +48 -48
  56. package/dist/chunks/{chunk-MHAHZX7U.js → chunk-7CWYOHH6.js} +3 -3
  57. package/dist/chunks/{chunk-TECFNZPY.js → chunk-7NXIEDP2.js} +12 -12
  58. package/dist/chunks/{chunk-HNLFFNCE.js → chunk-7SMNXLWZ.js} +2 -2
  59. package/dist/chunks/{chunk-5CN3PILD.js → chunk-7WXVKMYK.js} +3 -3
  60. package/dist/chunks/{chunk-OFATBCW3.js → chunk-A54JD4WN.js} +3 -3
  61. package/dist/chunks/{chunk-MD6OIFFN.js → chunk-A64DKLIG.js} +15 -11
  62. package/dist/chunks/{chunk-MD6OIFFN.js.map → chunk-A64DKLIG.js.map} +1 -1
  63. package/dist/chunks/{chunk-RFW54PAJ.js → chunk-AHGZMLSO.js} +4 -4
  64. package/dist/chunks/{chunk-JIZVBGOC.js → chunk-BA2RCXPX.js} +4 -4
  65. package/dist/chunks/{chunk-6SQX7MYY.js → chunk-BEXWYA6H.js} +2 -2
  66. package/dist/chunks/{chunk-UYEYPKTN.js → chunk-BM2BFZF4.js} +5 -5
  67. package/dist/chunks/{chunk-Y7GNAKOV.js → chunk-C2YEOD55.js} +7 -4
  68. package/dist/chunks/chunk-C2YEOD55.js.map +6 -0
  69. package/dist/chunks/{chunk-5RAKWCRN.js → chunk-CHH5AZNT.js} +2 -2
  70. package/dist/chunks/{chunk-NP7ZN2MJ.js → chunk-CPTB7QDI.js} +2 -2
  71. package/dist/chunks/{chunk-GI2HAEIZ.js → chunk-CQTOBLCN.js} +3 -3
  72. package/dist/chunks/{chunk-WZPEJ7TC.js → chunk-CROAHDJY.js} +15 -519
  73. package/dist/chunks/chunk-CROAHDJY.js.map +6 -0
  74. package/dist/chunks/{chunk-XFXDGALU.js → chunk-DO3GU4FK.js} +3 -3
  75. package/dist/chunks/{chunk-7AZTWFS7.js → chunk-DOIULYV5.js} +138 -62
  76. package/dist/chunks/chunk-DOIULYV5.js.map +6 -0
  77. package/dist/chunks/{chunk-6VAF56WU.js → chunk-DQ4MBWB3.js} +7 -7
  78. package/dist/chunks/{chunk-NZPMAK4R.js → chunk-EG4HMJEH.js} +2 -2
  79. package/dist/chunks/{chunk-LJSMDUFY.js → chunk-EKSS7K4J.js} +3 -3
  80. package/dist/chunks/{chunk-2Y3AG5SV.js → chunk-EOUCWHCH.js} +6 -5
  81. package/dist/chunks/{chunk-VRZQ35XP.js → chunk-ERVENGWO.js} +5 -5
  82. package/dist/chunks/{chunk-ZM5E5GJM.js → chunk-ESWXVRT2.js} +2 -2
  83. package/dist/chunks/{chunk-2XFMPGZR.js → chunk-EUUBG4H4.js} +68 -27
  84. package/dist/chunks/chunk-EUUBG4H4.js.map +6 -0
  85. package/dist/chunks/{chunk-RJNQRL5C.js → chunk-F2RV4OA4.js} +2 -2
  86. package/dist/chunks/{chunk-DD4YRQRY.js → chunk-F73RCHO5.js} +13 -13
  87. package/dist/chunks/{chunk-K3BICM3T.js → chunk-F7JILDDN.js} +7 -7
  88. package/dist/chunks/{chunk-L55M6CYI.js → chunk-FTGVYRYH.js} +3 -3
  89. package/dist/chunks/{chunk-OT2R6PIV.js → chunk-GDD3DEG5.js} +9 -10
  90. package/dist/chunks/chunk-GDD3DEG5.js.map +6 -0
  91. package/dist/chunks/{chunk-RY4DDC4G.js → chunk-GEIXXTUE.js} +2 -2
  92. package/dist/chunks/{chunk-YC4FEFC6.js → chunk-GH7JRINW.js} +5 -5
  93. package/dist/chunks/{chunk-DVIFMGRP.js → chunk-GRA35IM2.js} +2 -2
  94. package/dist/chunks/{chunk-ODQMMH6C.js → chunk-GSR55RZE.js} +7 -4
  95. package/dist/chunks/chunk-GSR55RZE.js.map +6 -0
  96. package/dist/chunks/chunk-H4TBL7OK.js +19 -0
  97. package/dist/chunks/chunk-H4TBL7OK.js.map +6 -0
  98. package/dist/chunks/{chunk-MHJU6VYG.js → chunk-HBA5EVRI.js} +4 -4
  99. package/dist/chunks/{chunk-FEUHUXWS.js → chunk-HFV342VZ.js} +4 -4
  100. package/dist/chunks/{chunk-YCKZCLQS.js → chunk-HKZWHWOH.js} +6 -6
  101. package/dist/chunks/{chunk-PD3HXBQJ.js → chunk-HOXYIKMC.js} +2 -2
  102. package/dist/chunks/{chunk-KQV475J4.js → chunk-IBCCCCIV.js} +11 -9
  103. package/dist/chunks/chunk-IBCCCCIV.js.map +6 -0
  104. package/dist/chunks/{chunk-5P3DXU4Y.js → chunk-IHER3BWG.js} +2 -2
  105. package/dist/chunks/{chunk-NNFYDBI7.js → chunk-IIIAY4M2.js} +2 -2
  106. package/dist/chunks/{chunk-HIQPFIIA.js → chunk-IL54Z65P.js} +6 -4
  107. package/dist/chunks/chunk-IL54Z65P.js.map +6 -0
  108. package/dist/chunks/{chunk-Q3XC7YNF.js → chunk-IOAXQS7P.js} +2 -2
  109. package/dist/chunks/{chunk-QR5CH34W.js → chunk-IPTMKDPN.js} +21 -21
  110. package/dist/chunks/{chunk-43GB5MUE.js → chunk-J3F7WCZ3.js} +2 -2
  111. package/dist/chunks/{chunk-4UX36WUG.js → chunk-JEQ3CPTD.js} +20 -9
  112. package/dist/chunks/chunk-JEQ3CPTD.js.map +6 -0
  113. package/dist/chunks/{chunk-5ZPOPPZS.js → chunk-JERXIPYY.js} +8 -6
  114. package/dist/chunks/chunk-JERXIPYY.js.map +6 -0
  115. package/dist/chunks/{chunk-OAJIF4BZ.js → chunk-JJ2SALR4.js} +2 -2
  116. package/dist/chunks/{chunk-P65AXQPL.js → chunk-JNPVJV3O.js} +2 -2
  117. package/dist/chunks/{chunk-PPEFN2RU.js → chunk-JSUYTWJF.js} +2 -2
  118. package/dist/chunks/{chunk-6VJLJOXM.js → chunk-JVNRECP6.js} +3 -3
  119. package/dist/chunks/{chunk-Q3JPM2YR.js → chunk-KJ2EUIHQ.js} +3 -3
  120. package/dist/chunks/{chunk-MN7H3I6K.js → chunk-KOULA2IJ.js} +2 -2
  121. package/dist/chunks/{chunk-ZF3PIJU3.js → chunk-L36PRWOF.js} +3 -3
  122. package/dist/chunks/{chunk-DV6W7RWZ.js → chunk-L5CQ7VIP.js} +3 -3
  123. package/dist/chunks/{chunk-JF3HXJFC.js → chunk-LLEAN4PC.js} +2 -2
  124. package/dist/chunks/{chunk-S7LDCBOF.js → chunk-LVXE26A7.js} +3 -3
  125. package/dist/chunks/{chunk-2IK7T634.js → chunk-LWWG6H7T.js} +3 -3
  126. package/dist/chunks/{chunk-SIFGFAJK.js → chunk-MBHWHIID.js} +132 -826
  127. package/dist/chunks/chunk-MBHWHIID.js.map +6 -0
  128. package/dist/chunks/{chunk-3NF6AVW4.js → chunk-MRDJXO22.js} +5 -2
  129. package/dist/chunks/chunk-MRDJXO22.js.map +6 -0
  130. package/dist/chunks/{chunk-6NNRR7U5.js → chunk-NBAKCWV3.js} +26 -5
  131. package/dist/chunks/chunk-NBAKCWV3.js.map +6 -0
  132. package/dist/chunks/{chunk-FRID6OTI.js → chunk-NBS2755S.js} +6 -6
  133. package/dist/chunks/{chunk-HJ7F7C73.js → chunk-NJJ2N524.js} +6 -6
  134. package/dist/chunks/{chunk-L3VPXYCF.js → chunk-NK3MIAYC.js} +4 -4
  135. package/dist/chunks/{chunk-DOENBH7Q.js → chunk-NNWLIZFE.js} +3 -2
  136. package/dist/chunks/chunk-NNWLIZFE.js.map +6 -0
  137. package/dist/chunks/{chunk-ES5JVNIN.js → chunk-NUJZCC2Z.js} +10 -3
  138. package/dist/chunks/{chunk-ES5JVNIN.js.map → chunk-NUJZCC2Z.js.map} +1 -1
  139. package/dist/chunks/{chunk-PJ6IEIKJ.js → chunk-NUSWQJLL.js} +15 -6
  140. package/dist/chunks/chunk-NUSWQJLL.js.map +6 -0
  141. package/dist/chunks/{chunk-YFH6PPLO.js → chunk-O7VPHSES.js} +2 -2
  142. package/dist/chunks/{chunk-IYTFRC6Q.js → chunk-OBBMS3N6.js} +6 -6
  143. package/dist/chunks/{chunk-IYTFRC6Q.js.map → chunk-OBBMS3N6.js.map} +1 -1
  144. package/dist/chunks/{chunk-2PAS45UY.js → chunk-OBK74OZW.js} +2 -2
  145. package/dist/chunks/{chunk-LCF3ZVDZ.js → chunk-OCJ2WBZ4.js} +3 -3
  146. package/dist/chunks/{chunk-AVCIXXYB.js → chunk-OCYOGXXP.js} +5 -5
  147. package/dist/chunks/{chunk-GHYEVNIG.js → chunk-OOOCVY35.js} +16 -11
  148. package/dist/chunks/chunk-OOOCVY35.js.map +6 -0
  149. package/dist/chunks/{chunk-GI7I4Z3C.js → chunk-OUQUYAI2.js} +5 -5
  150. package/dist/chunks/{chunk-NRIXMFMF.js → chunk-OUTD6IWW.js} +3 -3
  151. package/dist/chunks/{chunk-RFCS6LFH.js → chunk-P4BEZ7QW.js} +3 -3
  152. package/dist/chunks/{chunk-W2FQ5ZYB.js → chunk-PBHPPUUI.js} +8 -8
  153. package/dist/chunks/{chunk-ID7UHZRL.js → chunk-PL5IX645.js} +249 -32
  154. package/dist/chunks/chunk-PL5IX645.js.map +6 -0
  155. package/dist/chunks/{chunk-BKVZRD7Z.js → chunk-PQI2WTH5.js} +2 -2
  156. package/dist/chunks/{chunk-F4VM5RP6.js → chunk-PYXKPC7C.js} +2 -2
  157. package/dist/chunks/{chunk-DCGBINKP.js → chunk-QZTC5Q7S.js} +2 -2
  158. package/dist/chunks/{chunk-JCXGOCDK.js → chunk-R3P3IGP2.js} +776 -333
  159. package/dist/chunks/chunk-R3P3IGP2.js.map +6 -0
  160. package/dist/chunks/{chunk-FPVI455T.js → chunk-R63TUS2G.js} +6 -3
  161. package/dist/chunks/chunk-R63TUS2G.js.map +6 -0
  162. package/dist/chunks/{chunk-PM5FTMHH.js → chunk-RECTI7QY.js} +2 -2
  163. package/dist/chunks/chunk-RNOCPBLC.js +24 -0
  164. package/dist/chunks/chunk-RNOCPBLC.js.map +6 -0
  165. package/dist/chunks/chunk-RUGV5FZY.js +595 -0
  166. package/dist/chunks/chunk-RUGV5FZY.js.map +6 -0
  167. package/dist/chunks/{chunk-I3O2GYYO.js → chunk-RVC77FRV.js} +2 -2
  168. package/dist/chunks/{chunk-WMFEVIDC.js → chunk-SCDI2SR6.js} +3 -3
  169. package/dist/chunks/{chunk-6LFX4W7C.js → chunk-SE5YB5OI.js} +9 -6
  170. package/dist/chunks/chunk-SE5YB5OI.js.map +6 -0
  171. package/dist/chunks/{chunk-F3DXPL7W.js → chunk-TPFYLED7.js} +5 -5
  172. package/dist/chunks/{chunk-Z5Y4B2YZ.js → chunk-UAF72QNW.js} +3 -3
  173. package/dist/chunks/{chunk-FHFVXJYD.js → chunk-UEHFBJEE.js} +10 -10
  174. package/dist/chunks/chunk-UH33ZMUF.js +45 -0
  175. package/dist/chunks/chunk-UH33ZMUF.js.map +6 -0
  176. package/dist/chunks/{chunk-3R2WLJTS.js → chunk-UKWCQVKF.js} +3 -3
  177. package/dist/chunks/{chunk-67YA6NCA.js → chunk-UZLUUHOZ.js} +3 -3
  178. package/dist/chunks/{chunk-MAYUNNCO.js → chunk-V4FAKLV3.js} +6 -6
  179. package/dist/chunks/{chunk-X53XISBP.js → chunk-V6SFWKAD.js} +11 -3
  180. package/dist/chunks/{chunk-X53XISBP.js.map → chunk-V6SFWKAD.js.map} +1 -1
  181. package/dist/chunks/{chunk-KXT5I2IA.js → chunk-VAIQQX7N.js} +3 -3
  182. package/dist/chunks/{chunk-54PRSLXD.js → chunk-VAZ2M63R.js} +5 -5
  183. package/dist/chunks/{chunk-Z3334TMV.js → chunk-VBWNQCWH.js} +10 -10
  184. package/dist/chunks/{chunk-E7SV3COW.js → chunk-VH7IAD76.js} +9 -9
  185. package/dist/chunks/{chunk-VR26KRXW.js → chunk-VIV4RAVR.js} +4 -4
  186. package/dist/chunks/{chunk-R3PJX3K2.js → chunk-VSYNI2G3.js} +3 -3
  187. package/dist/chunks/{chunk-J72ATHQJ.js → chunk-VU6GSZ7Z.js} +2840 -1286
  188. package/dist/chunks/chunk-VU6GSZ7Z.js.map +6 -0
  189. package/dist/chunks/{chunk-ZPWHSJZL.js → chunk-VZU6C7BV.js} +41 -167
  190. package/dist/chunks/chunk-VZU6C7BV.js.map +6 -0
  191. package/dist/chunks/{chunk-HOPL46NH.js → chunk-W63W23XF.js} +8 -5
  192. package/dist/chunks/chunk-W63W23XF.js.map +6 -0
  193. package/dist/chunks/{chunk-GL74BFJI.js → chunk-WLKRDSHZ.js} +52 -14
  194. package/dist/chunks/chunk-WLKRDSHZ.js.map +6 -0
  195. package/dist/chunks/{chunk-WDMO2XAW.js → chunk-WNONDNGT.js} +2 -2
  196. package/dist/chunks/{chunk-2DMP56LU.js → chunk-WSH45EZX.js} +4 -4
  197. package/dist/chunks/{chunk-SXLTOS4V.js → chunk-XMNW2HXH.js} +2 -2
  198. package/dist/chunks/{chunk-PPDREHTL.js → chunk-XR6IVMWO.js} +3 -3
  199. package/dist/chunks/{chunk-T6C246EO.js → chunk-XU5FZM42.js} +62 -14
  200. package/dist/chunks/chunk-XU5FZM42.js.map +6 -0
  201. package/dist/chunks/{chunk-GNTKC72Z.js → chunk-XUWIPS3I.js} +2 -2
  202. package/dist/chunks/{chunk-WD362LUZ.js → chunk-YVTWQWWO.js} +3 -3
  203. package/dist/chunks/{chunk-C3JE4IVH.js → chunk-ZG4VG2VM.js} +4 -4
  204. package/dist/chunks/{chunk-4L67MGBK.js → chunk-ZHYHS7RM.js} +24 -9
  205. package/dist/chunks/{chunk-4L67MGBK.js.map → chunk-ZHYHS7RM.js.map} +1 -1
  206. package/dist/chunks/{chunk-7TDOAGVX.js → chunk-ZKNCORQE.js} +105 -105
  207. package/dist/chunks/{chunk-7TDOAGVX.js.map → chunk-ZKNCORQE.js.map} +1 -1
  208. package/dist/chunks/chunk-ZMOQMEJG.js +800 -0
  209. package/dist/chunks/chunk-ZMOQMEJG.js.map +6 -0
  210. package/dist/chunks/{chunk-HWYK5R5V.js → chunk-ZMOVFV2S.js} +5 -4
  211. package/dist/chunks/chunk-ZMOVFV2S.js.map +6 -0
  212. package/dist/chunks/{chunk-5CZ4LVMK.js → chunk-ZNEBRE4R.js} +4 -4
  213. package/dist/chunks/{chunk-ALONJM6J.js → chunk-ZVEFONXX.js} +40 -36
  214. package/dist/chunks/chunk-ZVEFONXX.js.map +6 -0
  215. package/dist/chunks/{chunk-7L5SU6SJ.js → chunk-ZWTW3MCF.js} +15 -9
  216. package/dist/chunks/chunk-ZWTW3MCF.js.map +6 -0
  217. package/dist/chunks/{cli-runtime-O6RCYI3Y.js → cli-runtime-RPIDV2T2.js} +26 -25
  218. package/dist/chunks/cli-runtime-RPIDV2T2.js.map +6 -0
  219. package/dist/chunks/{commands-E5ZM2I2Z.js → commands-6AI3A4MU.js} +6 -6
  220. package/dist/chunks/{computer-AWBPOB3P.js → computer-GABH2PJF.js} +8 -2
  221. package/dist/chunks/computer-GABH2PJF.js.map +6 -0
  222. package/dist/chunks/{config-EBPES6V6.js → config-RG4QEUWC.js} +16 -15
  223. package/dist/chunks/config-RG4QEUWC.js.map +6 -0
  224. package/dist/chunks/{cost-QRWAQ3XB.js → cost-XQXENUFJ.js} +6 -5
  225. package/dist/chunks/{crash-report-ANVLQYLO.js → crash-report-UMVAQVML.js} +6 -6
  226. package/dist/chunks/{debug-KE3MFMW5.js → debug-DX3SZNDB.js} +3 -2
  227. package/dist/chunks/debug-DX3SZNDB.js.map +6 -0
  228. package/dist/chunks/{desktop-host-schedule-tool-RG4EV45N.js → desktop-host-schedule-tool-ETKLWMES.js} +37 -36
  229. package/dist/chunks/desktop-host-schedule-tool-ETKLWMES.js.map +6 -0
  230. package/dist/chunks/{devtools-V6SF7RES.js → devtools-4ANMDCAD.js} +2 -2
  231. package/dist/chunks/{dist-ACZRXAK4.js → dist-47PEKUSC.js} +3 -3
  232. package/dist/chunks/{dist-EKAXB5R5.js → dist-52RJSSLN.js} +2 -2
  233. package/dist/chunks/{dist-FVTPQX57.js → dist-6R46NFFA.js} +2 -2
  234. package/dist/chunks/{dist-CM4LL25P.js → dist-CSDSHVMB.js} +2 -2
  235. package/dist/chunks/{dist-ROGRBORV.js → dist-KP4M7FMR.js} +4 -4
  236. package/dist/chunks/{dist-TEJDPUVZ.js → dist-NWF4I73Q.js} +2 -2
  237. package/dist/chunks/{dist-N32BP5B4.js → dist-S5TPXI7T.js} +36 -2
  238. package/dist/chunks/{dist-Y3CNYMQK.js → dist-X46OQA2D.js} +2 -2
  239. package/dist/chunks/doctor-BNC2BDUE.js +103 -0
  240. package/dist/chunks/{drain-H6TQDCQI.js → drain-XAV6YJMP.js} +24 -23
  241. package/dist/chunks/drain-XAV6YJMP.js.map +6 -0
  242. package/dist/chunks/{entry-4TMEDNAU.js → entry-MV2FROEW.js} +7 -7
  243. package/dist/chunks/{eval-6O2RPJ35.js → eval-S3CYPO3Q.js} +20 -13
  244. package/dist/chunks/eval-S3CYPO3Q.js.map +6 -0
  245. package/dist/chunks/{exec-W5QZD5IX.js → exec-IPMED3LW.js} +104 -94
  246. package/dist/chunks/exec-IPMED3LW.js.map +6 -0
  247. package/dist/chunks/{extension-7PBXYICA.js → extension-7A2DOXFH.js} +6 -6
  248. package/dist/chunks/{feed-FQKHFH3J.js → feed-TCK7FRZT.js} +6 -6
  249. package/dist/chunks/{home-5EQVZ7PU.js → home-5DEGDKXE.js} +3 -3
  250. package/dist/chunks/{homes-IIDNJKRK.js → homes-JINW3ER5.js} +6 -6
  251. package/dist/chunks/{hooks-NDWCMIVN.js → hooks-TLD27EOH.js} +26 -25
  252. package/dist/chunks/hooks-TLD27EOH.js.map +6 -0
  253. package/dist/chunks/{hooks-report-CAWNXYJS.js → hooks-report-QGXYZRZ7.js} +22 -21
  254. package/dist/chunks/{host-HGZEZXLB.js → host-GXJ46HB3.js} +16 -15
  255. package/dist/chunks/host-queries-V4JMMMMA.js +41 -0
  256. package/dist/chunks/{installed-list-OJNSGNIT.js → installed-list-D55C5TLT.js} +4 -4
  257. package/dist/chunks/{launch-NVHWNZSA.js → launch-QCCCQPOH.js} +31 -30
  258. package/dist/chunks/launch-QCCCQPOH.js.map +6 -0
  259. package/dist/chunks/{learn-FLJL53VN.js → learn-OQZQEZ3R.js} +19 -18
  260. package/dist/chunks/learn-OQZQEZ3R.js.map +6 -0
  261. package/dist/chunks/{learn-builtin-XJLP6EZ3.js → learn-builtin-SD4XQYI3.js} +22 -21
  262. package/dist/chunks/learn-builtin-SD4XQYI3.js.map +6 -0
  263. package/dist/chunks/{lifecycle-I5PHIQPV.js → lifecycle-JPDGDRYE.js} +45 -42
  264. package/dist/chunks/{list-BAQT6SDH.js → list-GPE5NJKI.js} +23 -22
  265. package/dist/chunks/live-SPWADZ36.js +102 -0
  266. package/dist/chunks/{load-WSB7ECXC.js → load-2YNIEXSX.js} +13 -12
  267. package/dist/chunks/{logs-WN65RRIX.js → logs-CEPX5RE5.js} +5 -5
  268. package/dist/chunks/{mcp-D3BUCLEX.js → mcp-YDLZXAW7.js} +73 -35
  269. package/dist/chunks/mcp-YDLZXAW7.js.map +6 -0
  270. package/dist/chunks/{mcp-serve-QRXGVK26.js → mcp-serve-7GWX3NPG.js} +21 -20
  271. package/dist/chunks/mcp-serve-7GWX3NPG.js.map +6 -0
  272. package/dist/chunks/{message-command-A4AEJCMT.js → message-command-P5OHIHTN.js} +71 -69
  273. package/dist/chunks/message-command-P5OHIHTN.js.map +6 -0
  274. package/dist/chunks/{open-AOHMCTVP.js → open-CDO3SOA6.js} +9 -8
  275. package/dist/chunks/{operator-tools-LHXXEP4G.js → operator-tools-LLMFGJWF.js} +17 -16
  276. package/dist/chunks/operator-tools-LLMFGJWF.js.map +6 -0
  277. package/dist/chunks/{output-schema-QHSTBSFC.js → output-schema-QEGZNUXU.js} +3 -3
  278. package/dist/chunks/{pal-NI3NH6SX.js → pal-6HU3SIRK.js} +18 -17
  279. package/dist/chunks/pal-6HU3SIRK.js.map +6 -0
  280. package/dist/chunks/{palette-4MBGX2Y6.js → palette-XDUNIBWY.js} +4 -4
  281. package/dist/chunks/{peers-B5TCECUP.js → peers-3HG3Q2UM.js} +23 -22
  282. package/dist/chunks/peers-3HG3Q2UM.js.map +6 -0
  283. package/dist/chunks/{peers-3QLWWGWY.js → peers-6C6C5L7Y.js} +10 -9
  284. package/dist/chunks/{plugin-GUNR5UED.js → plugin-XF2AUQGU.js} +54 -52
  285. package/dist/chunks/plugin-XF2AUQGU.js.map +6 -0
  286. package/dist/chunks/{providers-A6Q444EB.js → providers-3ZDAUZXM.js} +13 -12
  287. package/dist/chunks/{providers-G2UTRKAK.js → providers-XM3A6XKJ.js} +19 -18
  288. package/dist/chunks/providers-XM3A6XKJ.js.map +6 -0
  289. package/dist/chunks/{pty-M4K6JLLS.js → pty-6TGE7IRC.js} +3 -3
  290. package/dist/chunks/resume-Z3AX3TDI.js +28 -0
  291. package/dist/chunks/{resume-command-JUKPZVVL.js → resume-command-2BRKX2ZI.js} +5 -5
  292. package/dist/chunks/{running-ZPS6OB4K.js → running-SNBGNQ3V.js} +5 -4
  293. package/dist/chunks/{schedule-PCKX74XC.js → schedule-2W7QMK6F.js} +31 -13
  294. package/dist/chunks/schedule-2W7QMK6F.js.map +6 -0
  295. package/dist/chunks/{send-6R5NCGY5.js → send-WKTQWKPD.js} +21 -20
  296. package/dist/chunks/send-person-GA6BJ3O5.js +35 -0
  297. package/dist/chunks/{servers-F23WQJDI.js → servers-P2EAWI7V.js} +9 -8
  298. package/dist/chunks/{service-NI642AJQ.js → service-NKDFC3B2.js} +160 -63
  299. package/dist/chunks/service-NKDFC3B2.js.map +6 -0
  300. package/dist/chunks/{session-options-CRFJNFLM.js → session-options-IOWCEDFD.js} +5 -5
  301. package/dist/chunks/{setting-cli-QEUWWR2W.js → setting-cli-5ZGTJ7FY.js} +16 -15
  302. package/dist/chunks/{skills-VDOUBAYU.js → skills-DHTBS74G.js} +30 -29
  303. package/dist/chunks/skills-DHTBS74G.js.map +6 -0
  304. package/dist/chunks/{source-deliveries-VWFHCFRQ.js → source-deliveries-MMJWFEFZ.js} +22 -21
  305. package/dist/chunks/{start-check-K6BTRM72.js → start-check-6ZVFZLFJ.js} +2 -2
  306. package/dist/chunks/{startup-failure-WREVDPC2.js → startup-failure-FVAZ3RNE.js} +2 -2
  307. package/dist/chunks/{state-LJR3IEAF.js → state-AQGQ3OBN.js} +23 -22
  308. package/dist/chunks/state-AQGQ3OBN.js.map +6 -0
  309. package/dist/chunks/{store-C7SEV4YB.js → store-4XNFBA6T.js} +4 -4
  310. package/dist/chunks/{store-L7CJVHD7.js → store-E6HVKQI2.js} +3 -3
  311. package/dist/chunks/{store-T7M3ICIS.js → store-EQF6SI3V.js} +10 -9
  312. package/dist/chunks/{store-U5LOY365.js → store-PBAF2V3P.js} +14 -13
  313. package/dist/chunks/{tui-5YVBMPEE.js → tui-MB4LQWG5.js} +377 -153
  314. package/dist/chunks/tui-MB4LQWG5.js.map +6 -0
  315. package/dist/chunks/{update-RO3UZBFM.js → update-XWSTXMX4.js} +9 -8
  316. package/dist/chunks/update-XWSTXMX4.js.map +6 -0
  317. package/dist/chunks/{watch-4CX3QMDL.js → watch-2WWQKUBG.js} +121 -117
  318. package/dist/chunks/watch-2WWQKUBG.js.map +6 -0
  319. package/dist/chunks/{windows-home-WVGVXCRL.js → windows-home-7N24MLWN.js} +6 -5
  320. package/dist/chunks/{workspaces-B46MHVPJ.js → workspaces-HZXB4D7R.js} +21 -20
  321. package/dist/chunks/workspaces-HZXB4D7R.js.map +6 -0
  322. package/dist/chunks/{worktree-57C3ECED.js → worktree-TQNJ24GP.js} +31 -30
  323. package/dist/chunks/worktree-TQNJ24GP.js.map +6 -0
  324. package/dist/chunks/{wrapper-XHVFM6KS.js → wrapper-7A4PWBS7.js} +2 -2
  325. package/dist/commands/actions/schedule.d.ts.map +1 -1
  326. package/dist/commands/desktop-host-memory.d.ts.map +1 -1
  327. package/dist/commands/desktop-host.d.ts +4 -4
  328. package/dist/commands/eval.d.ts.map +1 -1
  329. package/dist/commands/exec-json.d.ts.map +1 -1
  330. package/dist/commands/exec.d.ts.map +1 -1
  331. package/dist/commands/mcp.d.ts.map +1 -1
  332. package/dist/commands/schedule.d.ts.map +1 -1
  333. package/dist/computer/sentences.d.ts.map +1 -1
  334. package/dist/config/hook-common-shape.d.ts.map +1 -1
  335. package/dist/config/hooks-report.d.ts +1 -1
  336. package/dist/config/hooks-report.d.ts.map +1 -1
  337. package/dist/config/load.d.ts.map +1 -1
  338. package/dist/config/user-config.d.ts.map +1 -1
  339. package/dist/index.js +55 -51
  340. package/dist/integrations/auto-update/state.d.ts.map +1 -1
  341. package/dist/integrations/harness/model-cache.d.ts.map +1 -1
  342. package/dist/integrations/learning/generator-state.d.ts.map +1 -1
  343. package/dist/integrations/mcp/project-file.d.ts.map +1 -1
  344. package/dist/integrations/mcp/servers.d.ts +13 -0
  345. package/dist/integrations/mcp/servers.d.ts.map +1 -1
  346. package/dist/integrations/network/control.d.ts.map +1 -1
  347. package/dist/integrations/network/role-store.d.ts.map +1 -1
  348. package/dist/integrations/notifications/sound.d.ts.map +1 -1
  349. package/dist/integrations/plugins/fetch/git.d.ts +12 -0
  350. package/dist/integrations/plugins/fetch/git.d.ts.map +1 -1
  351. package/dist/integrations/plugins/fetch/url.d.ts.map +1 -1
  352. package/dist/integrations/plugins/hook-entries.d.ts.map +1 -1
  353. package/dist/integrations/plugins/install.d.ts.map +1 -1
  354. package/dist/integrations/plugins/remote-marketplace.d.ts +12 -0
  355. package/dist/integrations/plugins/remote-marketplace.d.ts.map +1 -1
  356. package/dist/integrations/plugins/runtime.d.ts +7 -2
  357. package/dist/integrations/plugins/runtime.d.ts.map +1 -1
  358. package/dist/integrations/plugins/surface.d.ts +2 -2
  359. package/dist/integrations/plugins/surface.d.ts.map +1 -1
  360. package/dist/integrations/providers/codex-account.d.ts.map +1 -1
  361. package/dist/integrations/providers/credential-store.d.ts.map +1 -1
  362. package/dist/integrations/providers/harness-credentials.d.ts.map +1 -1
  363. package/dist/integrations/providers/windows-home.d.ts.map +1 -1
  364. package/dist/integrations/sessions/prompt-history.d.ts.map +1 -1
  365. package/dist/integrations/sessions/store.d.ts +6 -0
  366. package/dist/integrations/sessions/store.d.ts.map +1 -1
  367. package/dist/integrations/state/project-lookup.d.ts.map +1 -1
  368. package/dist/integrations/subagents/agent-hooks.d.ts.map +1 -1
  369. package/dist/integrations/subagents/hard-stop.d.ts +12 -0
  370. package/dist/integrations/subagents/hard-stop.d.ts.map +1 -0
  371. package/dist/integrations/subagents/helper-providers.d.ts +25 -0
  372. package/dist/integrations/subagents/helper-providers.d.ts.map +1 -0
  373. package/dist/integrations/subagents/replay.d.ts.map +1 -1
  374. package/dist/integrations/subagents/runtime.d.ts +18 -0
  375. package/dist/integrations/subagents/runtime.d.ts.map +1 -1
  376. package/dist/integrations/subagents/worktree-driver.d.ts +52 -0
  377. package/dist/integrations/subagents/worktree-driver.d.ts.map +1 -1
  378. package/dist/integrations/teams/enabled.d.ts +12 -3
  379. package/dist/integrations/teams/enabled.d.ts.map +1 -1
  380. package/dist/integrations/teams/host.d.ts +10 -2
  381. package/dist/integrations/teams/host.d.ts.map +1 -1
  382. package/dist/integrations/teams/runner.d.ts +6 -1
  383. package/dist/integrations/teams/runner.d.ts.map +1 -1
  384. package/dist/integrations/teams/unattended.d.ts +19 -0
  385. package/dist/integrations/teams/unattended.d.ts.map +1 -0
  386. package/dist/integrations/trust/folder-grants.d.ts.map +1 -1
  387. package/dist/integrations/workflows/guidance.d.ts.map +1 -1
  388. package/dist/integrations/worktrees/managed.d.ts +49 -2
  389. package/dist/integrations/worktrees/managed.d.ts.map +1 -1
  390. package/dist/memory/curation-runtime.d.ts +15 -2
  391. package/dist/memory/curation-runtime.d.ts.map +1 -1
  392. package/dist/memory/curator.d.ts +10 -4
  393. package/dist/memory/curator.d.ts.map +1 -1
  394. package/dist/memory/inbox.d.ts +17 -0
  395. package/dist/memory/inbox.d.ts.map +1 -1
  396. package/dist/memory/presentation.d.ts +5 -0
  397. package/dist/memory/presentation.d.ts.map +1 -1
  398. package/dist/pals/desktop-communication.d.ts +4 -4
  399. package/dist/pals/desktop-communication.d.ts.map +1 -1
  400. package/dist/pals/guest-mcp-transport.d.ts +3 -25
  401. package/dist/pals/guest-mcp-transport.d.ts.map +1 -1
  402. package/dist/permissions/local-settings.d.ts.map +1 -1
  403. package/dist/schedule/build.d.ts +11 -0
  404. package/dist/schedule/build.d.ts.map +1 -1
  405. package/dist/schedule/commands/add.d.ts +8 -1
  406. package/dist/schedule/commands/add.d.ts.map +1 -1
  407. package/dist/schedule/commands/lifecycle.d.ts.map +1 -1
  408. package/dist/schedule/commands/list.d.ts.map +1 -1
  409. package/dist/schedule/commands/service.d.ts.map +1 -1
  410. package/dist/schedule/daemon/daemon.d.ts +8 -1
  411. package/dist/schedule/daemon/daemon.d.ts.map +1 -1
  412. package/dist/schedule/daemon/pinned.d.ts +48 -0
  413. package/dist/schedule/daemon/pinned.d.ts.map +1 -0
  414. package/dist/schedule/fire/fire.d.ts +11 -1
  415. package/dist/schedule/fire/fire.d.ts.map +1 -1
  416. package/dist/schedule/service/index.d.ts.map +1 -1
  417. package/dist/schedule/store/jobs.d.ts.map +1 -1
  418. package/dist/schedule/store/state.d.ts +6 -0
  419. package/dist/schedule/store/state.d.ts.map +1 -1
  420. package/dist/schedule/types.d.ts +16 -0
  421. package/dist/schedule/types.d.ts.map +1 -1
  422. package/dist/sdk-peer.js +35 -1
  423. package/dist/skills/skill-hooks.d.ts.map +1 -1
  424. package/dist/startup-record.d.ts.map +1 -1
  425. package/dist/temp-name.d.ts +11 -0
  426. package/dist/temp-name.d.ts.map +1 -0
  427. package/dist/tui/App.d.ts +0 -12
  428. package/dist/tui/App.d.ts.map +1 -1
  429. package/dist/tui/ArmedWord.d.ts +30 -0
  430. package/dist/tui/ArmedWord.d.ts.map +1 -0
  431. package/dist/tui/Composer.d.ts.map +1 -1
  432. package/dist/tui/QuestionDialog.d.ts +8 -6
  433. package/dist/tui/QuestionDialog.d.ts.map +1 -1
  434. package/dist/tui/StatusBar.d.ts +7 -1
  435. package/dist/tui/StatusBar.d.ts.map +1 -1
  436. package/dist/tui/agent-transcript-rows.d.ts +7 -2
  437. package/dist/tui/agent-transcript-rows.d.ts.map +1 -1
  438. package/dist/tui/agent.d.ts +53 -2
  439. package/dist/tui/agent.d.ts.map +1 -1
  440. package/dist/tui/answered-questions.d.ts +34 -0
  441. package/dist/tui/answered-questions.d.ts.map +1 -0
  442. package/dist/tui/attachment-rows.d.ts.map +1 -1
  443. package/dist/tui/away-recap.d.ts +10 -4
  444. package/dist/tui/away-recap.d.ts.map +1 -1
  445. package/dist/tui/background-eviction.d.ts +46 -0
  446. package/dist/tui/background-eviction.d.ts.map +1 -0
  447. package/dist/tui/cross-session-history.d.ts +3 -1
  448. package/dist/tui/cross-session-history.d.ts.map +1 -1
  449. package/dist/tui/early-input.d.ts +37 -22
  450. package/dist/tui/early-input.d.ts.map +1 -1
  451. package/dist/tui/hypermode.d.ts +1 -1
  452. package/dist/tui/hypermode.d.ts.map +1 -1
  453. package/dist/tui/index.d.ts.map +1 -1
  454. package/dist/tui/paint/cursor-report.d.ts +42 -0
  455. package/dist/tui/paint/cursor-report.d.ts.map +1 -0
  456. package/dist/tui/paint/live-paint.d.ts +25 -9
  457. package/dist/tui/paint/live-paint.d.ts.map +1 -1
  458. package/dist/tui/question-dialog.d.ts +2 -7
  459. package/dist/tui/question-dialog.d.ts.map +1 -1
  460. package/dist/tui/restored-rows.d.ts.map +1 -1
  461. package/dist/tui/schedule/host-commands.d.ts.map +1 -1
  462. package/dist/tui/schedule/tool-host.d.ts.map +1 -1
  463. package/dist/tui/skills/suggestion-ledger.d.ts.map +1 -1
  464. package/dist/tui/slashCommands.d.ts.map +1 -1
  465. package/dist/tui/status-line/run-command.d.ts +5 -1
  466. package/dist/tui/status-line/run-command.d.ts.map +1 -1
  467. package/dist/tui/terminal-reply-filter.d.ts +2 -0
  468. package/dist/tui/terminal-reply-filter.d.ts.map +1 -1
  469. package/dist/tui/theme-palettes.d.ts +13 -3
  470. package/dist/tui/theme-palettes.d.ts.map +1 -1
  471. package/dist/tui/tool-end-rows.d.ts +3 -0
  472. package/dist/tui/tool-end-rows.d.ts.map +1 -1
  473. package/dist/tui/triggers/detect.d.ts +11 -4
  474. package/dist/tui/triggers/detect.d.ts.map +1 -1
  475. package/dist/tui/triggers/registry.d.ts +8 -0
  476. package/dist/tui/triggers/registry.d.ts.map +1 -1
  477. package/dist/tui/typed-answer.d.ts +44 -0
  478. package/dist/tui/typed-answer.d.ts.map +1 -0
  479. package/dist/tui/zoom/gesture.d.ts +9 -1
  480. package/dist/tui/zoom/gesture.d.ts.map +1 -1
  481. package/package.json +7 -7
  482. package/skills/workflow-authoring/SKILL.md +16 -1
  483. package/dist/chunks/acp-XDHKC3S3.js.map +0 -6
  484. package/dist/chunks/activity-command-IPUTIWSY.js.map +0 -6
  485. package/dist/chunks/add-V25Q5HXG.js.map +0 -6
  486. package/dist/chunks/agent-session-KUU5HEMJ.js +0 -103
  487. package/dist/chunks/apply-at-exit-FR464TY4.js.map +0 -6
  488. package/dist/chunks/archive-XXGELXD4.js.map +0 -6
  489. package/dist/chunks/auth-MPYY5JGI.js.map +0 -6
  490. package/dist/chunks/bin-main-XOHYP3G4.js.map +0 -6
  491. package/dist/chunks/chat-HPKRZNH3.js.map +0 -6
  492. package/dist/chunks/chunk-2XFMPGZR.js.map +0 -6
  493. package/dist/chunks/chunk-3NF6AVW4.js.map +0 -6
  494. package/dist/chunks/chunk-4UX36WUG.js.map +0 -6
  495. package/dist/chunks/chunk-5ZPOPPZS.js.map +0 -6
  496. package/dist/chunks/chunk-6LFX4W7C.js.map +0 -6
  497. package/dist/chunks/chunk-6NNRR7U5.js.map +0 -6
  498. package/dist/chunks/chunk-7AZTWFS7.js.map +0 -6
  499. package/dist/chunks/chunk-7L5SU6SJ.js.map +0 -6
  500. package/dist/chunks/chunk-ALONJM6J.js.map +0 -6
  501. package/dist/chunks/chunk-BBTPD3DU.js +0 -19
  502. package/dist/chunks/chunk-BBTPD3DU.js.map +0 -6
  503. package/dist/chunks/chunk-DOENBH7Q.js.map +0 -6
  504. package/dist/chunks/chunk-FLSWKVLP.js.map +0 -6
  505. package/dist/chunks/chunk-FPVI455T.js.map +0 -6
  506. package/dist/chunks/chunk-GHYEVNIG.js.map +0 -6
  507. package/dist/chunks/chunk-GL74BFJI.js.map +0 -6
  508. package/dist/chunks/chunk-HIQPFIIA.js.map +0 -6
  509. package/dist/chunks/chunk-HOPL46NH.js.map +0 -6
  510. package/dist/chunks/chunk-HWYK5R5V.js.map +0 -6
  511. package/dist/chunks/chunk-I32DOGZZ.js.map +0 -6
  512. package/dist/chunks/chunk-ID7UHZRL.js.map +0 -6
  513. package/dist/chunks/chunk-J72ATHQJ.js.map +0 -6
  514. package/dist/chunks/chunk-JAN5CCP6.js.map +0 -6
  515. package/dist/chunks/chunk-JCXGOCDK.js.map +0 -6
  516. package/dist/chunks/chunk-KQV475J4.js.map +0 -6
  517. package/dist/chunks/chunk-MB5EOUEL.js.map +0 -6
  518. package/dist/chunks/chunk-ODQMMH6C.js.map +0 -6
  519. package/dist/chunks/chunk-OT2R6PIV.js.map +0 -6
  520. package/dist/chunks/chunk-PJ6IEIKJ.js.map +0 -6
  521. package/dist/chunks/chunk-SIFGFAJK.js.map +0 -6
  522. package/dist/chunks/chunk-T6C246EO.js.map +0 -6
  523. package/dist/chunks/chunk-WZPEJ7TC.js.map +0 -6
  524. package/dist/chunks/chunk-Y7GNAKOV.js.map +0 -6
  525. package/dist/chunks/chunk-Y7HOTNZR.js.map +0 -6
  526. package/dist/chunks/chunk-ZPWHSJZL.js.map +0 -6
  527. package/dist/chunks/cli-runtime-O6RCYI3Y.js.map +0 -6
  528. package/dist/chunks/computer-AWBPOB3P.js.map +0 -6
  529. package/dist/chunks/config-EBPES6V6.js.map +0 -6
  530. package/dist/chunks/debug-KE3MFMW5.js.map +0 -6
  531. package/dist/chunks/desktop-host-schedule-tool-RG4EV45N.js.map +0 -6
  532. package/dist/chunks/doctor-Y6STEUN5.js +0 -99
  533. package/dist/chunks/drain-H6TQDCQI.js.map +0 -6
  534. package/dist/chunks/eval-6O2RPJ35.js.map +0 -6
  535. package/dist/chunks/exec-W5QZD5IX.js.map +0 -6
  536. package/dist/chunks/hooks-NDWCMIVN.js.map +0 -6
  537. package/dist/chunks/host-queries-DOXYXFOD.js +0 -40
  538. package/dist/chunks/launch-NVHWNZSA.js.map +0 -6
  539. package/dist/chunks/learn-FLJL53VN.js.map +0 -6
  540. package/dist/chunks/learn-builtin-XJLP6EZ3.js.map +0 -6
  541. package/dist/chunks/live-UXV3V4JM.js +0 -97
  542. package/dist/chunks/mcp-D3BUCLEX.js.map +0 -6
  543. package/dist/chunks/mcp-serve-QRXGVK26.js.map +0 -6
  544. package/dist/chunks/message-command-A4AEJCMT.js.map +0 -6
  545. package/dist/chunks/operator-tools-LHXXEP4G.js.map +0 -6
  546. package/dist/chunks/pal-NI3NH6SX.js.map +0 -6
  547. package/dist/chunks/peers-B5TCECUP.js.map +0 -6
  548. package/dist/chunks/plugin-GUNR5UED.js.map +0 -6
  549. package/dist/chunks/providers-G2UTRKAK.js.map +0 -6
  550. package/dist/chunks/resume-RXOBUAEA.js +0 -27
  551. package/dist/chunks/schedule-PCKX74XC.js.map +0 -6
  552. package/dist/chunks/send-person-I7B6Y2V3.js +0 -34
  553. package/dist/chunks/service-NI642AJQ.js.map +0 -6
  554. package/dist/chunks/skills-VDOUBAYU.js.map +0 -6
  555. package/dist/chunks/state-LJR3IEAF.js.map +0 -6
  556. package/dist/chunks/tui-5YVBMPEE.js.map +0 -6
  557. package/dist/chunks/update-RO3UZBFM.js.map +0 -6
  558. package/dist/chunks/watch-4CX3QMDL.js.map +0 -6
  559. package/dist/chunks/workspaces-B46MHVPJ.js.map +0 -6
  560. package/dist/chunks/worktree-57C3ECED.js.map +0 -6
  561. /package/dist/chunks/{agent-I7EPRW2H.js.map → agent-RVTT22XL.js.map} +0 -0
  562. /package/dist/chunks/{agent-session-KUU5HEMJ.js.map → agent-session-SNTV4WJB.js.map} +0 -0
  563. /package/dist/chunks/{binding-5GGFSURJ.js.map → binding-AVL54CBF.js.map} +0 -0
  564. /package/dist/chunks/{browser-KGFFFY3K.js.map → browser-AYBO33ZR.js.map} +0 -0
  565. /package/dist/chunks/{chunk-PSWUXFIH.js.map → chunk-3GGLAPPV.js.map} +0 -0
  566. /package/dist/chunks/{chunk-D6D5D6UJ.js.map → chunk-3GVS745R.js.map} +0 -0
  567. /package/dist/chunks/{chunk-GQGUPWXT.js.map → chunk-3HHWM67Q.js.map} +0 -0
  568. /package/dist/chunks/{chunk-W2OTZAXB.js.map → chunk-3HUEBQAN.js.map} +0 -0
  569. /package/dist/chunks/{chunk-WUGXLX6O.js.map → chunk-3TURVGJT.js.map} +0 -0
  570. /package/dist/chunks/{chunk-YLAWGDZY.js.map → chunk-43NXEWX4.js.map} +0 -0
  571. /package/dist/chunks/{chunk-ECWJCDCK.js.map → chunk-47SP3GJ4.js.map} +0 -0
  572. /package/dist/chunks/{chunk-IWVZTMTO.js.map → chunk-4EDVII4B.js.map} +0 -0
  573. /package/dist/chunks/{chunk-HNR6STBM.js.map → chunk-4LMAEQ42.js.map} +0 -0
  574. /package/dist/chunks/{chunk-BLAZEM4K.js.map → chunk-5BDR52OS.js.map} +0 -0
  575. /package/dist/chunks/{chunk-RNWMX73V.js.map → chunk-5N55CGZG.js.map} +0 -0
  576. /package/dist/chunks/{chunk-CFVWDSLP.js.map → chunk-657OVGTQ.js.map} +0 -0
  577. /package/dist/chunks/{chunk-HHMZIAE7.js.map → chunk-66ZJ7T5L.js.map} +0 -0
  578. /package/dist/chunks/{chunk-3H4L2VND.js.map → chunk-6PHA4NAI.js.map} +0 -0
  579. /package/dist/chunks/{chunk-WUS3BMCC.js.map → chunk-6TTWYQB6.js.map} +0 -0
  580. /package/dist/chunks/{chunk-WAHSZG2X.js.map → chunk-75YGSZN7.js.map} +0 -0
  581. /package/dist/chunks/{chunk-VZTSMFNP.js.map → chunk-7ADQK225.js.map} +0 -0
  582. /package/dist/chunks/{chunk-MHAHZX7U.js.map → chunk-7CWYOHH6.js.map} +0 -0
  583. /package/dist/chunks/{chunk-TECFNZPY.js.map → chunk-7NXIEDP2.js.map} +0 -0
  584. /package/dist/chunks/{chunk-HNLFFNCE.js.map → chunk-7SMNXLWZ.js.map} +0 -0
  585. /package/dist/chunks/{chunk-5CN3PILD.js.map → chunk-7WXVKMYK.js.map} +0 -0
  586. /package/dist/chunks/{chunk-OFATBCW3.js.map → chunk-A54JD4WN.js.map} +0 -0
  587. /package/dist/chunks/{chunk-RFW54PAJ.js.map → chunk-AHGZMLSO.js.map} +0 -0
  588. /package/dist/chunks/{chunk-JIZVBGOC.js.map → chunk-BA2RCXPX.js.map} +0 -0
  589. /package/dist/chunks/{chunk-6SQX7MYY.js.map → chunk-BEXWYA6H.js.map} +0 -0
  590. /package/dist/chunks/{chunk-UYEYPKTN.js.map → chunk-BM2BFZF4.js.map} +0 -0
  591. /package/dist/chunks/{chunk-5RAKWCRN.js.map → chunk-CHH5AZNT.js.map} +0 -0
  592. /package/dist/chunks/{chunk-NP7ZN2MJ.js.map → chunk-CPTB7QDI.js.map} +0 -0
  593. /package/dist/chunks/{chunk-GI2HAEIZ.js.map → chunk-CQTOBLCN.js.map} +0 -0
  594. /package/dist/chunks/{chunk-XFXDGALU.js.map → chunk-DO3GU4FK.js.map} +0 -0
  595. /package/dist/chunks/{chunk-6VAF56WU.js.map → chunk-DQ4MBWB3.js.map} +0 -0
  596. /package/dist/chunks/{chunk-NZPMAK4R.js.map → chunk-EG4HMJEH.js.map} +0 -0
  597. /package/dist/chunks/{chunk-LJSMDUFY.js.map → chunk-EKSS7K4J.js.map} +0 -0
  598. /package/dist/chunks/{chunk-2Y3AG5SV.js.map → chunk-EOUCWHCH.js.map} +0 -0
  599. /package/dist/chunks/{chunk-VRZQ35XP.js.map → chunk-ERVENGWO.js.map} +0 -0
  600. /package/dist/chunks/{chunk-ZM5E5GJM.js.map → chunk-ESWXVRT2.js.map} +0 -0
  601. /package/dist/chunks/{chunk-RJNQRL5C.js.map → chunk-F2RV4OA4.js.map} +0 -0
  602. /package/dist/chunks/{chunk-DD4YRQRY.js.map → chunk-F73RCHO5.js.map} +0 -0
  603. /package/dist/chunks/{chunk-K3BICM3T.js.map → chunk-F7JILDDN.js.map} +0 -0
  604. /package/dist/chunks/{chunk-L55M6CYI.js.map → chunk-FTGVYRYH.js.map} +0 -0
  605. /package/dist/chunks/{chunk-RY4DDC4G.js.map → chunk-GEIXXTUE.js.map} +0 -0
  606. /package/dist/chunks/{chunk-YC4FEFC6.js.map → chunk-GH7JRINW.js.map} +0 -0
  607. /package/dist/chunks/{chunk-DVIFMGRP.js.map → chunk-GRA35IM2.js.map} +0 -0
  608. /package/dist/chunks/{chunk-MHJU6VYG.js.map → chunk-HBA5EVRI.js.map} +0 -0
  609. /package/dist/chunks/{chunk-FEUHUXWS.js.map → chunk-HFV342VZ.js.map} +0 -0
  610. /package/dist/chunks/{chunk-YCKZCLQS.js.map → chunk-HKZWHWOH.js.map} +0 -0
  611. /package/dist/chunks/{chunk-PD3HXBQJ.js.map → chunk-HOXYIKMC.js.map} +0 -0
  612. /package/dist/chunks/{chunk-5P3DXU4Y.js.map → chunk-IHER3BWG.js.map} +0 -0
  613. /package/dist/chunks/{chunk-NNFYDBI7.js.map → chunk-IIIAY4M2.js.map} +0 -0
  614. /package/dist/chunks/{chunk-Q3XC7YNF.js.map → chunk-IOAXQS7P.js.map} +0 -0
  615. /package/dist/chunks/{chunk-QR5CH34W.js.map → chunk-IPTMKDPN.js.map} +0 -0
  616. /package/dist/chunks/{chunk-43GB5MUE.js.map → chunk-J3F7WCZ3.js.map} +0 -0
  617. /package/dist/chunks/{chunk-OAJIF4BZ.js.map → chunk-JJ2SALR4.js.map} +0 -0
  618. /package/dist/chunks/{chunk-P65AXQPL.js.map → chunk-JNPVJV3O.js.map} +0 -0
  619. /package/dist/chunks/{chunk-PPEFN2RU.js.map → chunk-JSUYTWJF.js.map} +0 -0
  620. /package/dist/chunks/{chunk-6VJLJOXM.js.map → chunk-JVNRECP6.js.map} +0 -0
  621. /package/dist/chunks/{chunk-Q3JPM2YR.js.map → chunk-KJ2EUIHQ.js.map} +0 -0
  622. /package/dist/chunks/{chunk-MN7H3I6K.js.map → chunk-KOULA2IJ.js.map} +0 -0
  623. /package/dist/chunks/{chunk-ZF3PIJU3.js.map → chunk-L36PRWOF.js.map} +0 -0
  624. /package/dist/chunks/{chunk-DV6W7RWZ.js.map → chunk-L5CQ7VIP.js.map} +0 -0
  625. /package/dist/chunks/{chunk-JF3HXJFC.js.map → chunk-LLEAN4PC.js.map} +0 -0
  626. /package/dist/chunks/{chunk-S7LDCBOF.js.map → chunk-LVXE26A7.js.map} +0 -0
  627. /package/dist/chunks/{chunk-2IK7T634.js.map → chunk-LWWG6H7T.js.map} +0 -0
  628. /package/dist/chunks/{chunk-FRID6OTI.js.map → chunk-NBS2755S.js.map} +0 -0
  629. /package/dist/chunks/{chunk-HJ7F7C73.js.map → chunk-NJJ2N524.js.map} +0 -0
  630. /package/dist/chunks/{chunk-L3VPXYCF.js.map → chunk-NK3MIAYC.js.map} +0 -0
  631. /package/dist/chunks/{chunk-YFH6PPLO.js.map → chunk-O7VPHSES.js.map} +0 -0
  632. /package/dist/chunks/{chunk-2PAS45UY.js.map → chunk-OBK74OZW.js.map} +0 -0
  633. /package/dist/chunks/{chunk-LCF3ZVDZ.js.map → chunk-OCJ2WBZ4.js.map} +0 -0
  634. /package/dist/chunks/{chunk-AVCIXXYB.js.map → chunk-OCYOGXXP.js.map} +0 -0
  635. /package/dist/chunks/{chunk-GI7I4Z3C.js.map → chunk-OUQUYAI2.js.map} +0 -0
  636. /package/dist/chunks/{chunk-NRIXMFMF.js.map → chunk-OUTD6IWW.js.map} +0 -0
  637. /package/dist/chunks/{chunk-RFCS6LFH.js.map → chunk-P4BEZ7QW.js.map} +0 -0
  638. /package/dist/chunks/{chunk-W2FQ5ZYB.js.map → chunk-PBHPPUUI.js.map} +0 -0
  639. /package/dist/chunks/{chunk-BKVZRD7Z.js.map → chunk-PQI2WTH5.js.map} +0 -0
  640. /package/dist/chunks/{chunk-F4VM5RP6.js.map → chunk-PYXKPC7C.js.map} +0 -0
  641. /package/dist/chunks/{chunk-DCGBINKP.js.map → chunk-QZTC5Q7S.js.map} +0 -0
  642. /package/dist/chunks/{chunk-PM5FTMHH.js.map → chunk-RECTI7QY.js.map} +0 -0
  643. /package/dist/chunks/{chunk-I3O2GYYO.js.map → chunk-RVC77FRV.js.map} +0 -0
  644. /package/dist/chunks/{chunk-WMFEVIDC.js.map → chunk-SCDI2SR6.js.map} +0 -0
  645. /package/dist/chunks/{chunk-F3DXPL7W.js.map → chunk-TPFYLED7.js.map} +0 -0
  646. /package/dist/chunks/{chunk-Z5Y4B2YZ.js.map → chunk-UAF72QNW.js.map} +0 -0
  647. /package/dist/chunks/{chunk-FHFVXJYD.js.map → chunk-UEHFBJEE.js.map} +0 -0
  648. /package/dist/chunks/{chunk-3R2WLJTS.js.map → chunk-UKWCQVKF.js.map} +0 -0
  649. /package/dist/chunks/{chunk-67YA6NCA.js.map → chunk-UZLUUHOZ.js.map} +0 -0
  650. /package/dist/chunks/{chunk-MAYUNNCO.js.map → chunk-V4FAKLV3.js.map} +0 -0
  651. /package/dist/chunks/{chunk-KXT5I2IA.js.map → chunk-VAIQQX7N.js.map} +0 -0
  652. /package/dist/chunks/{chunk-54PRSLXD.js.map → chunk-VAZ2M63R.js.map} +0 -0
  653. /package/dist/chunks/{chunk-Z3334TMV.js.map → chunk-VBWNQCWH.js.map} +0 -0
  654. /package/dist/chunks/{chunk-E7SV3COW.js.map → chunk-VH7IAD76.js.map} +0 -0
  655. /package/dist/chunks/{chunk-VR26KRXW.js.map → chunk-VIV4RAVR.js.map} +0 -0
  656. /package/dist/chunks/{chunk-R3PJX3K2.js.map → chunk-VSYNI2G3.js.map} +0 -0
  657. /package/dist/chunks/{chunk-WDMO2XAW.js.map → chunk-WNONDNGT.js.map} +0 -0
  658. /package/dist/chunks/{chunk-2DMP56LU.js.map → chunk-WSH45EZX.js.map} +0 -0
  659. /package/dist/chunks/{chunk-SXLTOS4V.js.map → chunk-XMNW2HXH.js.map} +0 -0
  660. /package/dist/chunks/{chunk-PPDREHTL.js.map → chunk-XR6IVMWO.js.map} +0 -0
  661. /package/dist/chunks/{chunk-GNTKC72Z.js.map → chunk-XUWIPS3I.js.map} +0 -0
  662. /package/dist/chunks/{chunk-WD362LUZ.js.map → chunk-YVTWQWWO.js.map} +0 -0
  663. /package/dist/chunks/{chunk-C3JE4IVH.js.map → chunk-ZG4VG2VM.js.map} +0 -0
  664. /package/dist/chunks/{chunk-5CZ4LVMK.js.map → chunk-ZNEBRE4R.js.map} +0 -0
  665. /package/dist/chunks/{commands-E5ZM2I2Z.js.map → commands-6AI3A4MU.js.map} +0 -0
  666. /package/dist/chunks/{cost-QRWAQ3XB.js.map → cost-XQXENUFJ.js.map} +0 -0
  667. /package/dist/chunks/{crash-report-ANVLQYLO.js.map → crash-report-UMVAQVML.js.map} +0 -0
  668. /package/dist/chunks/{devtools-V6SF7RES.js.map → devtools-4ANMDCAD.js.map} +0 -0
  669. /package/dist/chunks/{dist-ACZRXAK4.js.map → dist-47PEKUSC.js.map} +0 -0
  670. /package/dist/chunks/{dist-EKAXB5R5.js.map → dist-52RJSSLN.js.map} +0 -0
  671. /package/dist/chunks/{dist-FVTPQX57.js.map → dist-6R46NFFA.js.map} +0 -0
  672. /package/dist/chunks/{dist-CM4LL25P.js.map → dist-CSDSHVMB.js.map} +0 -0
  673. /package/dist/chunks/{dist-N32BP5B4.js.map → dist-KP4M7FMR.js.map} +0 -0
  674. /package/dist/chunks/{dist-TEJDPUVZ.js.map → dist-NWF4I73Q.js.map} +0 -0
  675. /package/dist/chunks/{dist-ROGRBORV.js.map → dist-S5TPXI7T.js.map} +0 -0
  676. /package/dist/chunks/{dist-Y3CNYMQK.js.map → dist-X46OQA2D.js.map} +0 -0
  677. /package/dist/chunks/{doctor-Y6STEUN5.js.map → doctor-BNC2BDUE.js.map} +0 -0
  678. /package/dist/chunks/{entry-4TMEDNAU.js.map → entry-MV2FROEW.js.map} +0 -0
  679. /package/dist/chunks/{extension-7PBXYICA.js.map → extension-7A2DOXFH.js.map} +0 -0
  680. /package/dist/chunks/{feed-FQKHFH3J.js.map → feed-TCK7FRZT.js.map} +0 -0
  681. /package/dist/chunks/{home-5EQVZ7PU.js.map → home-5DEGDKXE.js.map} +0 -0
  682. /package/dist/chunks/{homes-IIDNJKRK.js.map → homes-JINW3ER5.js.map} +0 -0
  683. /package/dist/chunks/{hooks-report-CAWNXYJS.js.map → hooks-report-QGXYZRZ7.js.map} +0 -0
  684. /package/dist/chunks/{host-HGZEZXLB.js.map → host-GXJ46HB3.js.map} +0 -0
  685. /package/dist/chunks/{host-queries-DOXYXFOD.js.map → host-queries-V4JMMMMA.js.map} +0 -0
  686. /package/dist/chunks/{installed-list-OJNSGNIT.js.map → installed-list-D55C5TLT.js.map} +0 -0
  687. /package/dist/chunks/{lifecycle-I5PHIQPV.js.map → lifecycle-JPDGDRYE.js.map} +0 -0
  688. /package/dist/chunks/{list-BAQT6SDH.js.map → list-GPE5NJKI.js.map} +0 -0
  689. /package/dist/chunks/{live-UXV3V4JM.js.map → live-SPWADZ36.js.map} +0 -0
  690. /package/dist/chunks/{load-WSB7ECXC.js.map → load-2YNIEXSX.js.map} +0 -0
  691. /package/dist/chunks/{logs-WN65RRIX.js.map → logs-CEPX5RE5.js.map} +0 -0
  692. /package/dist/chunks/{open-AOHMCTVP.js.map → open-CDO3SOA6.js.map} +0 -0
  693. /package/dist/chunks/{output-schema-QHSTBSFC.js.map → output-schema-QEGZNUXU.js.map} +0 -0
  694. /package/dist/chunks/{palette-4MBGX2Y6.js.map → palette-XDUNIBWY.js.map} +0 -0
  695. /package/dist/chunks/{peers-3QLWWGWY.js.map → peers-6C6C5L7Y.js.map} +0 -0
  696. /package/dist/chunks/{providers-A6Q444EB.js.map → providers-3ZDAUZXM.js.map} +0 -0
  697. /package/dist/chunks/{pty-M4K6JLLS.js.map → pty-6TGE7IRC.js.map} +0 -0
  698. /package/dist/chunks/{resume-RXOBUAEA.js.map → resume-Z3AX3TDI.js.map} +0 -0
  699. /package/dist/chunks/{resume-command-JUKPZVVL.js.map → resume-command-2BRKX2ZI.js.map} +0 -0
  700. /package/dist/chunks/{running-ZPS6OB4K.js.map → running-SNBGNQ3V.js.map} +0 -0
  701. /package/dist/chunks/{send-6R5NCGY5.js.map → send-WKTQWKPD.js.map} +0 -0
  702. /package/dist/chunks/{send-person-I7B6Y2V3.js.map → send-person-GA6BJ3O5.js.map} +0 -0
  703. /package/dist/chunks/{servers-F23WQJDI.js.map → servers-P2EAWI7V.js.map} +0 -0
  704. /package/dist/chunks/{session-options-CRFJNFLM.js.map → session-options-IOWCEDFD.js.map} +0 -0
  705. /package/dist/chunks/{setting-cli-QEUWWR2W.js.map → setting-cli-5ZGTJ7FY.js.map} +0 -0
  706. /package/dist/chunks/{source-deliveries-VWFHCFRQ.js.map → source-deliveries-MMJWFEFZ.js.map} +0 -0
  707. /package/dist/chunks/{start-check-K6BTRM72.js.map → start-check-6ZVFZLFJ.js.map} +0 -0
  708. /package/dist/chunks/{startup-failure-WREVDPC2.js.map → startup-failure-FVAZ3RNE.js.map} +0 -0
  709. /package/dist/chunks/{store-C7SEV4YB.js.map → store-4XNFBA6T.js.map} +0 -0
  710. /package/dist/chunks/{store-L7CJVHD7.js.map → store-E6HVKQI2.js.map} +0 -0
  711. /package/dist/chunks/{store-T7M3ICIS.js.map → store-EQF6SI3V.js.map} +0 -0
  712. /package/dist/chunks/{store-U5LOY365.js.map → store-PBAF2V3P.js.map} +0 -0
  713. /package/dist/chunks/{windows-home-WVGVXCRL.js.map → windows-home-7N24MLWN.js.map} +0 -0
  714. /package/dist/chunks/{wrapper-XHVFM6KS.js.map → wrapper-7A4PWBS7.js.map} +0 -0
@@ -1,37 +1,33 @@
1
1
  import { createRequire as __namzuCreateRequire } from 'node:module';
2
2
  const require = __namzuCreateRequire(import.meta.url);
3
3
  import {
4
- createCliPluginRuntime,
5
- openManagedWorktrees
6
- } from "./chunk-WZPEJ7TC.js";
7
- import {
8
- readPluginFileSources
9
- } from "./chunk-7L5SU6SJ.js";
4
+ createCliPluginRuntime
5
+ } from "./chunk-CROAHDJY.js";
10
6
  import {
11
7
  createSessionSkillCatalog
12
- } from "./chunk-NRIXMFMF.js";
8
+ } from "./chunk-OUTD6IWW.js";
13
9
  import {
14
10
  describeLegacyExclude,
15
11
  excludeProjectLegacy
16
- } from "./chunk-2DMP56LU.js";
12
+ } from "./chunk-WSH45EZX.js";
17
13
  import {
18
14
  runGeneratorCycle
19
- } from "./chunk-ODQMMH6C.js";
15
+ } from "./chunk-GSR55RZE.js";
20
16
  import {
21
17
  createSessionLearningFeed,
22
18
  openLearningTarget,
23
19
  readProjectGuidance,
24
20
  withSessionLearningFeed
25
- } from "./chunk-GI7I4Z3C.js";
21
+ } from "./chunk-OUQUYAI2.js";
26
22
  import {
27
23
  cliGate
28
- } from "./chunk-5RAKWCRN.js";
24
+ } from "./chunk-CHH5AZNT.js";
29
25
  import {
30
26
  createPluginRemoteHost
31
- } from "./chunk-W2FQ5ZYB.js";
27
+ } from "./chunk-PBHPPUUI.js";
32
28
  import {
33
29
  openInBrowser
34
- } from "./chunk-SXLTOS4V.js";
30
+ } from "./chunk-XMNW2HXH.js";
35
31
  import {
36
32
  KEY_MISMATCH_MESSAGE,
37
33
  MAX_SCRIPT_BYTES,
@@ -55,34 +51,41 @@ import {
55
51
  viewFromJournal,
56
52
  workflowJournalKey,
57
53
  writeEditableCopy
58
- } from "./chunk-5CN3PILD.js";
54
+ } from "./chunk-7WXVKMYK.js";
55
+ import {
56
+ openManagedWorktrees
57
+ } from "./chunk-RUGV5FZY.js";
59
58
  import {
60
59
  toolOnOffer
61
- } from "./chunk-5P3DXU4Y.js";
60
+ } from "./chunk-IHER3BWG.js";
62
61
  import {
63
62
  accountProductName
64
63
  } from "./chunk-YOWYTBJS.js";
64
+ import {
65
+ hardStopWasRaised,
66
+ isHardStop
67
+ } from "./chunk-5VW3COA7.js";
65
68
  import {
66
69
  createBrowserControl
67
- } from "./chunk-BKVZRD7Z.js";
70
+ } from "./chunk-PQI2WTH5.js";
68
71
  import {
69
72
  openCliAccounts,
70
73
  storedAccountSignedIn
71
- } from "./chunk-OT2R6PIV.js";
74
+ } from "./chunk-GDD3DEG5.js";
72
75
  import {
73
76
  connectMcpServers,
74
77
  startMcpServers
75
- } from "./chunk-6NNRR7U5.js";
78
+ } from "./chunk-NBAKCWV3.js";
76
79
  import {
77
80
  CODEX_IMAGE_LIMIT_IDS,
78
81
  CODEX_IMAGE_MAX_BYTES,
79
82
  CodexImagesError,
80
83
  requestCodexImage
81
- } from "./chunk-MB5EOUEL.js";
84
+ } from "./chunk-5QUYAINU.js";
82
85
  import {
83
86
  retireDuplicateStartupKeys,
84
87
  retirementNotice
85
- } from "./chunk-RFW54PAJ.js";
88
+ } from "./chunk-AHGZMLSO.js";
86
89
  import {
87
90
  CredentialRefreshRejectedError,
88
91
  CredentialWithdrawnError as CredentialWithdrawnError2,
@@ -90,7 +93,7 @@ import {
90
93
  ensureFreshStoredCodexCredential,
91
94
  readSubscriptionCredential,
92
95
  sameOAuthCredential
93
- } from "./chunk-2IK7T634.js";
96
+ } from "./chunk-LWWG6H7T.js";
94
97
  import {
95
98
  conversationLogPath,
96
99
  displayTitleOf,
@@ -99,7 +102,7 @@ import {
99
102
  readConversationFacts,
100
103
  readConversationRecords,
101
104
  recordAccountBound
102
- } from "./chunk-4UX36WUG.js";
105
+ } from "./chunk-JEQ3CPTD.js";
103
106
  import {
104
107
  INSTRUCTIONS_FILENAME,
105
108
  MAX_CHARS_PER_FILE,
@@ -108,21 +111,21 @@ import {
108
111
  isContainedBy,
109
112
  readIdentity,
110
113
  readInstructionAt
111
- } from "./chunk-6VJLJOXM.js";
114
+ } from "./chunk-JVNRECP6.js";
112
115
  import {
113
116
  isDefaultAccountId
114
- } from "./chunk-PPEFN2RU.js";
117
+ } from "./chunk-JSUYTWJF.js";
115
118
  import {
116
119
  LogFolder,
117
120
  ModelTable,
118
121
  READ_CHUNK_BYTES,
119
122
  conversationTotals
120
- } from "./chunk-HIQPFIIA.js";
123
+ } from "./chunk-IL54Z65P.js";
121
124
  import {
122
125
  createLazyCodeAnalysis,
123
126
  promptCacheTtl,
124
127
  setPromptCacheTtl
125
- } from "./chunk-PPDREHTL.js";
128
+ } from "./chunk-XR6IVMWO.js";
126
129
  import {
127
130
  AFTER_TURN_COMMANDS,
128
131
  DEFAULT_MAX_HOOK_REFUSALS,
@@ -152,13 +155,14 @@ import {
152
155
  withoutCdToCwd,
153
156
  workflowRefusal,
154
157
  workflowToolDescription
155
- } from "./chunk-4L67MGBK.js";
158
+ } from "./chunk-ZHYHS7RM.js";
156
159
  import {
157
- CHECK_HINT
158
- } from "./chunk-BBTPD3DU.js";
160
+ CHECK_HINT,
161
+ readPluginFileSources
162
+ } from "./chunk-ZWTW3MCF.js";
159
163
  import {
160
164
  SAVE_SKILL_TOOL_NAME
161
- } from "./chunk-BLAZEM4K.js";
165
+ } from "./chunk-5BDR52OS.js";
162
166
  import {
163
167
  DEFAULT_AGENT_WORKFLOW,
164
168
  MAX_AGENT_ACTIVITY_LABEL_CODE_UNITS,
@@ -168,39 +172,39 @@ import {
168
172
  SubagentActivityMonitor,
169
173
  WORKFLOW_STEP_ASSIGNMENT,
170
174
  plainChildFailure
171
- } from "./chunk-GNTKC72Z.js";
175
+ } from "./chunk-XUWIPS3I.js";
172
176
  import {
173
177
  settleLocalSettings
174
- } from "./chunk-JAN5CCP6.js";
178
+ } from "./chunk-3F5YRA4T.js";
175
179
  import {
176
180
  explainFailure,
177
181
  workingDirectoryProblem
178
- } from "./chunk-43GB5MUE.js";
182
+ } from "./chunk-J3F7WCZ3.js";
179
183
  import {
180
184
  conversationInUseSentence,
181
185
  minutesUntilFree
182
- } from "./chunk-WUS3BMCC.js";
186
+ } from "./chunk-6TTWYQB6.js";
183
187
  import {
184
188
  debugRequested
185
189
  } from "./chunk-GNBMKISG.js";
186
190
  import {
187
191
  diffColors,
188
192
  theme
189
- } from "./chunk-P65AXQPL.js";
193
+ } from "./chunk-JNPVJV3O.js";
190
194
  import {
191
195
  probeCapabilities
192
196
  } from "./chunk-OH6TB27S.js";
193
197
  import {
194
198
  discoverAgentDefinitions
195
- } from "./chunk-F3DXPL7W.js";
199
+ } from "./chunk-TPFYLED7.js";
196
200
  import {
197
201
  createAgentHooksHost
198
- } from "./chunk-HWYK5R5V.js";
202
+ } from "./chunk-ZMOVFV2S.js";
199
203
  import {
200
204
  readSkillHooks,
201
205
  withoutConversationEvents,
202
206
  withoutSessionStart
203
- } from "./chunk-ZF3PIJU3.js";
207
+ } from "./chunk-L36PRWOF.js";
204
208
  import {
205
209
  chainCapabilityDisagreements,
206
210
  chainPositionName,
@@ -212,7 +216,7 @@ import {
212
216
  readPreferences,
213
217
  resolveChainCapabilities,
214
218
  unresolvedMembers
215
- } from "./chunk-DD4YRQRY.js";
219
+ } from "./chunk-F73RCHO5.js";
216
220
  import {
217
221
  canSelectModel,
218
222
  createGeminiAccessTokenResolver,
@@ -220,12 +224,12 @@ import {
220
224
  findDetected,
221
225
  hasApiCredential,
222
226
  requiresCredentialForModel
223
- } from "./chunk-54PRSLXD.js";
227
+ } from "./chunk-VAZ2M63R.js";
224
228
  import {
225
229
  startupNow,
226
230
  startupSpan,
227
231
  startupTime
228
- } from "./chunk-3NF6AVW4.js";
232
+ } from "./chunk-MRDJXO22.js";
229
233
  import {
230
234
  activeZenCatalogue,
231
235
  isOfferableModel
@@ -240,10 +244,10 @@ import {
240
244
  readSettings,
241
245
  valueWords,
242
246
  writeSetting
243
- } from "./chunk-YCKZCLQS.js";
247
+ } from "./chunk-HKZWHWOH.js";
244
248
  import {
245
249
  setUserConfigValue
246
- } from "./chunk-5ZPOPPZS.js";
250
+ } from "./chunk-JERXIPYY.js";
247
251
  import {
248
252
  autoCompactOverride,
249
253
  configuredPassthroughTools,
@@ -259,7 +263,7 @@ import {
259
263
  unmatchedPassthroughTools,
260
264
  verdictOf,
261
265
  workflowTokenCeiling
262
- } from "./chunk-T6C246EO.js";
266
+ } from "./chunk-XU5FZM42.js";
263
267
  import {
264
268
  resolveGeneratorSettings
265
269
  } from "./chunk-LCGXWCVU.js";
@@ -273,7 +277,7 @@ import {
273
277
  } from "./chunk-GMUWAUKQ.js";
274
278
  import {
275
279
  cliLogger
276
- } from "./chunk-RJNQRL5C.js";
280
+ } from "./chunk-F2RV4OA4.js";
277
281
  import {
278
282
  PROVIDER_REGISTRY,
279
283
  missingCredentialMessage,
@@ -282,33 +286,36 @@ import {
282
286
  import {
283
287
  parseSkillMarkdown,
284
288
  systemSkillsDir
285
- } from "./chunk-MHAHZX7U.js";
289
+ } from "./chunk-7CWYOHH6.js";
286
290
  import {
287
291
  customisationLocked
288
292
  } from "./chunk-N25X3QTA.js";
289
293
  import {
290
294
  ensurePrivateStateDirectory
291
- } from "./chunk-HHMZIAE7.js";
295
+ } from "./chunk-66ZJ7T5L.js";
292
296
  import {
293
297
  isTrusted
294
- } from "./chunk-S7LDCBOF.js";
298
+ } from "./chunk-LVXE26A7.js";
295
299
  import {
296
300
  codexPlanType,
297
301
  readCodexCredentialFile
298
- } from "./chunk-ALONJM6J.js";
302
+ } from "./chunk-ZVEFONXX.js";
299
303
  import {
300
304
  composeEnvironmentPrompt,
301
305
  detectWsl,
302
306
  environmentFactLines,
303
307
  permissionSentence,
304
308
  readEnvironmentFacts
305
- } from "./chunk-ECWJCDCK.js";
309
+ } from "./chunk-47SP3GJ4.js";
306
310
  import {
307
311
  applyPromptSettingsFromOptions
308
312
  } from "./chunk-SZGYBYWB.js";
313
+ import {
314
+ temporaryNameFor
315
+ } from "./chunk-H4TBL7OK.js";
309
316
  import {
310
317
  namzuHomePath
311
- } from "./chunk-RY4DDC4G.js";
318
+ } from "./chunk-GEIXXTUE.js";
312
319
  import {
313
320
  stringWidth
314
321
  } from "./chunk-U5UV2YRE.js";
@@ -318,7 +325,7 @@ import {
318
325
  import {
319
326
  isPermissionMode,
320
327
  permissionModeLabel
321
- } from "./chunk-YFH6PPLO.js";
328
+ } from "./chunk-O7VPHSES.js";
322
329
  import {
323
330
  AgentManager,
324
331
  AgentRegistry,
@@ -533,7 +540,7 @@ import {
533
540
  withProviderFallback,
534
541
  worktreeHookHost,
535
542
  wrapUntrusted
536
- } from "./chunk-J72ATHQJ.js";
543
+ } from "./chunk-VU6GSZ7Z.js";
537
544
  import {
538
545
  __name,
539
546
  __toESM
@@ -931,16 +938,16 @@ function createGenerateImageTool(options) {
931
938
  throw error;
932
939
  }
933
940
  context.abortSignal.throwIfAborted();
934
- const access3 = await options.access(context.abortSignal);
935
- if (!access3)
941
+ const access4 = await options.access(context.abortSignal);
942
+ if (!access4)
936
943
  return failure("no plan sign-in is connected. Sign in with the OpenAI subscription first.");
937
944
  let result;
938
945
  try {
939
946
  result = await requestCodexImage(
940
947
  {
941
- accessToken: access3.accessToken,
942
- accountId: access3.accountId,
943
- ...access3.baseURL ? { baseURL: access3.baseURL } : {},
948
+ accessToken: access4.accessToken,
949
+ accountId: access4.accountId,
950
+ ...access4.baseURL ? { baseURL: access4.baseURL } : {},
944
951
  ...options.fetch ? { fetch: options.fetch } : {},
945
952
  ...options.timeoutMs !== void 0 ? { timeoutMs: options.timeoutMs } : {}
946
953
  },
@@ -2618,7 +2625,7 @@ import {
2618
2625
  import { basename, dirname, isAbsolute as isAbsolute2, join as join3, relative, resolve as resolve2, sep } from "node:path";
2619
2626
 
2620
2627
  // src/checkpoints/manifest.ts
2621
- import { createHash, randomBytes } from "node:crypto";
2628
+ import { createHash } from "node:crypto";
2622
2629
  import { createReadStream } from "node:fs";
2623
2630
  import { link, mkdir as mkdir2, open as open2, readFile as readFile2, readdir, rename, rm, stat as stat2, unlink } from "node:fs/promises";
2624
2631
  import { join as join2 } from "node:path";
@@ -2644,8 +2651,7 @@ function hashFile(path) {
2644
2651
  });
2645
2652
  }
2646
2653
  __name(hashFile, "hashFile");
2647
- var tempCounter = 0;
2648
- var tempName = /* @__PURE__ */ __name((path) => `${path}.${process.pid}.${tempCounter++}.${randomBytes(3).toString("hex")}.tmp`, "tempName");
2654
+ var tempName = temporaryNameFor;
2649
2655
  var HISTORY_FILE_MODE = 384;
2650
2656
  var HISTORY_DIRECTORY_MODE = 448;
2651
2657
  async function writeDurable(path, data) {
@@ -3843,7 +3849,6 @@ var FileCheckpointStore = class {
3843
3849
  for (const root of roots) await rm2(root, { recursive: true, force: true });
3844
3850
  }
3845
3851
  };
3846
- var tempCounter2 = 0;
3847
3852
  function fileKey(p) {
3848
3853
  return process.platform === "win32" ? p.toLowerCase() : p;
3849
3854
  }
@@ -3875,7 +3880,7 @@ async function realExisting(path) {
3875
3880
  }
3876
3881
  __name(realExisting, "realExisting");
3877
3882
  async function writeAtomic(path, data, mode) {
3878
- const temp = `${path}.${process.pid}.${tempCounter2++}.namzu-restore.tmp`;
3883
+ const temp = temporaryNameFor(path);
3879
3884
  try {
3880
3885
  await writeFile(temp, data, mode === null ? void 0 : { mode });
3881
3886
  if (mode !== null) await chmod(temp, mode);
@@ -5285,7 +5290,7 @@ function sandboxResolvedSeverity(sandbox) {
5285
5290
  __name(sandboxResolvedSeverity, "sandboxResolvedSeverity");
5286
5291
 
5287
5292
  // src/integrations/sessions/conversation-search.ts
5288
- import { randomBytes as randomBytes2 } from "node:crypto";
5293
+ import { randomBytes } from "node:crypto";
5289
5294
  import { resolve as resolve7 } from "node:path";
5290
5295
 
5291
5296
  // src/integrations/sessions/evidence-page-validation.ts
@@ -5397,7 +5402,7 @@ var cursors = /* @__PURE__ */ new Map();
5397
5402
  function encodeCursor(cursor) {
5398
5403
  for (const [key, value] of cursors) if (value.expires < Date.now()) cursors.delete(key);
5399
5404
  while (cursors.size >= 128) cursors.delete(cursors.keys().next().value);
5400
- const token = randomBytes2(24).toString("hex");
5405
+ const token = randomBytes(24).toString("hex");
5401
5406
  cursors.set(token, structuredClone(cursor));
5402
5407
  return token;
5403
5408
  }
@@ -7802,7 +7807,7 @@ ${lead}` : lead : void 0)
7802
7807
  );
7803
7808
  if (signal.aborted) return { action: "cancel" };
7804
7809
  if (answer.kind === "abort") return { action: "cancel" };
7805
- if (answer.kind === "skip") return { action: "decline" };
7810
+ if (answer.kind === "skip" || answer.kind === "discuss") return { action: "decline" };
7806
7811
  const given = collect(answer);
7807
7812
  const content = {};
7808
7813
  problem = void 0;
@@ -9913,6 +9918,23 @@ __name(buildSessionCostTool, "buildSessionCostTool");
9913
9918
  // src/integrations/state/retention.ts
9914
9919
  var CLI_CHECKPOINT_RETENTION = 10;
9915
9920
 
9921
+ // src/integrations/subagents/helper-providers.ts
9922
+ function helperProviderRefusal(policy, ownProvider, requested) {
9923
+ const id = requested?.trim();
9924
+ if (!id || id === ownProvider) return void 0;
9925
+ if (policy.unsigned.includes(id)) {
9926
+ return `The job "${policy.jobName}" lets its helpers use ${id}, but no credential for ${id} was found in the job's home. Run namzu auth login ${id} with that home, or put its key in ${policy.credentialFile}.`;
9927
+ }
9928
+ if (policy.named.includes(id)) return void 0;
9929
+ const allowed = [ownProvider, ...policy.named].join(", ");
9930
+ return `A helper of the job "${policy.jobName}" asked for the provider ${id}, which the job does not name. Its helpers can use ${allowed}. To allow ${id}, run namzu schedule edit ${policy.jobName} --child-provider ${id}.`;
9931
+ }
9932
+ __name(helperProviderRefusal, "helperProviderRefusal");
9933
+ function pinHelperProvider(request, ownProvider) {
9934
+ return request.provider?.trim() ? request : { ...request, provider: ownProvider };
9935
+ }
9936
+ __name(pinHelperProvider, "pinHelperProvider");
9937
+
9916
9938
  // src/integrations/subagents/model-effort.ts
9917
9939
  async function prepareDelegatedEffort(provider, model, signal) {
9918
9940
  if ((provider.reasoningEffortLevelsFor?.(model) ?? provider.effortLevelsFor?.(model)) !== void 0)
@@ -10065,7 +10087,7 @@ async function resolveSubagentParent(scope2, cwd, records) {
10065
10087
  __name(resolveSubagentParent, "resolveSubagentParent");
10066
10088
 
10067
10089
  // src/integrations/subagents/replay.ts
10068
- import { readFile as readFile5 } from "node:fs/promises";
10090
+ import { access, readFile as readFile5 } from "node:fs/promises";
10069
10091
  var MAX_REPLAYED_CHILDREN = 80;
10070
10092
  async function readSavedChildren(scope2, limit) {
10071
10093
  return (await readSavedChildrenPage(scope2, limit)).children;
@@ -10073,10 +10095,16 @@ async function readSavedChildren(scope2, limit) {
10073
10095
  __name(readSavedChildren, "readSavedChildren");
10074
10096
  async function readSavedChildrenPage(scope2, limit) {
10075
10097
  const sessionId = asSessionId(scope2.session.sessionId);
10098
+ const logPath = scope2.paths.sessionLog(scope2.session);
10099
+ if (await access(logPath).then(
10100
+ () => false,
10101
+ () => true
10102
+ ))
10103
+ return { children: [], total: 0 };
10076
10104
  try {
10077
10105
  await scope2.index.refresh({
10078
10106
  slug: scope2.paths.slug,
10079
- logPath: scope2.paths.sessionLog(scope2.session),
10107
+ logPath,
10080
10108
  sessionId
10081
10109
  });
10082
10110
  } catch (error) {
@@ -10291,7 +10319,7 @@ __name(errorMessage, "errorMessage");
10291
10319
 
10292
10320
  // src/integrations/subagents/runtime.ts
10293
10321
  import { randomUUID as randomUUID4 } from "node:crypto";
10294
- import { existsSync as existsSync2 } from "node:fs";
10322
+ import { existsSync as existsSync3 } from "node:fs";
10295
10323
  import { appendFile as appendFile2, mkdir as mkdir5 } from "node:fs/promises";
10296
10324
  import { join as join12 } from "node:path";
10297
10325
 
@@ -10460,7 +10488,7 @@ __name(waitResultLabel, "waitResultLabel");
10460
10488
 
10461
10489
  // src/memory/typed.ts
10462
10490
  import { createHash as createHash3 } from "node:crypto";
10463
- import { access, readFile as readFile6, rename as rename3, writeFile as writeFile2 } from "node:fs/promises";
10491
+ import { access as access2, readFile as readFile6, rename as rename3, writeFile as writeFile2 } from "node:fs/promises";
10464
10492
  import { join as join11 } from "node:path";
10465
10493
 
10466
10494
  // src/memory/io.ts
@@ -10862,7 +10890,7 @@ async function markCuratedFile(directory, path, state) {
10862
10890
  __name(markCuratedFile, "markCuratedFile");
10863
10891
  async function exists(path) {
10864
10892
  try {
10865
- await access(path);
10893
+ await access2(path);
10866
10894
  return true;
10867
10895
  } catch {
10868
10896
  return false;
@@ -11150,13 +11178,13 @@ function teamNameFor(leadSessionId) {
11150
11178
  return `team-${tail2.length > 0 ? tail2 : "lead"}`;
11151
11179
  }
11152
11180
  __name(teamNameFor, "teamNameFor");
11153
- function teammateAppendix(name, team) {
11181
+ function teammateAppendix(name, team, where = {}) {
11154
11182
  return [
11155
11183
  `You are "${name}", a teammate in the team ${team}. The main conversation (the "lead") and the other teammates work beside you, each in their own context.`,
11156
11184
  'What you write as plain text is not seen by anyone else in the team and not by the person. To tell someone something, call send_message with to set to their name, or to "lead" for the main conversation, and a short summary. The person talks mainly to the lead.',
11157
11185
  "The team shares one task list. Use task_list to see it and task_get to read a task before you change it. Take a task that is pending, has no owner and is not blocked, preferring the lowest id, by moving it to in_progress with task_update; mark it completed when it is done, then look for the next one. Do not edit another member\u2019s task.",
11158
- "You never ask the person yourself: when a call needs a yes, the person is asked in the lead's conversation with your name on it, and you wait for the answer. To have a plan approved before you change anything, call exit_plan_mode with the plan; the person reads it and answers, and you wait.",
11159
- "When your work is done, answer in a few lines and stop; you will be woken when there is mail or a task for you."
11186
+ where.unattended ? "Nobody is at this run to answer you. When a call needs a yes, the job\u2019s permission set decides it at once: allowed, refused, or held for later. A refusal is final: do not try the same call again by another route, do something that is allowed or say what you could not do. There is no plan to send for approval." : "You never ask the person yourself: when a call needs a yes, the person is asked in the lead's conversation with your name on it, and you wait for the answer. To have a plan approved before you change anything, call exit_plan_mode with the plan; the person reads it and answers, and you wait.",
11187
+ where.worktree ? "You work in a checkout of your own, on a branch of your own, and nobody else writes there. Commit what you finish (a work-in-progress commit is fine) before you stop: the checkout is removed when you end if you changed nothing, and kept for the lead if you did. This is one piece of work: when you stop you leave the team and are not woken again." : "When your work is done, answer in a few lines and stop; you will be woken when there is mail or a task for you."
11160
11188
  ].join("\n\n");
11161
11189
  }
11162
11190
  __name(teammateAppendix, "teammateAppendix");
@@ -11307,6 +11335,7 @@ var TeamRunner = class {
11307
11335
  },
11308
11336
  async (reserved) => {
11309
11337
  tracked = this.track(input.leadSessionId, team, reserved);
11338
+ tracked.oneShot = input.oneShot === true;
11310
11339
  await this.backend.start({
11311
11340
  team,
11312
11341
  member: reserved,
@@ -11376,7 +11405,8 @@ var TeamRunner = class {
11376
11405
  shutdown: void 0,
11377
11406
  hookKept: 0,
11378
11407
  stopFired: false,
11379
- lastMessage: void 0
11408
+ lastMessage: void 0,
11409
+ oneShot: false
11380
11410
  };
11381
11411
  let byName = this.members.get(team);
11382
11412
  if (!byName) {
@@ -11439,6 +11469,10 @@ var TeamRunner = class {
11439
11469
  else this.finish(tracked, "stopped");
11440
11470
  return;
11441
11471
  }
11472
+ if (tracked.oneShot) {
11473
+ this.retire(tracked);
11474
+ return;
11475
+ }
11442
11476
  if (this.hooks && outcome.state === "completed") {
11443
11477
  void this.askIdleHook(tracked, outcome);
11444
11478
  return;
@@ -12452,10 +12486,16 @@ __name(taskActivityOutput, "taskActivityOutput");
12452
12486
 
12453
12487
  // src/integrations/subagents/worktree-driver.ts
12454
12488
  import { execFile as execFile3 } from "node:child_process";
12455
- import { mkdir as mkdir4, realpath as realpath3 } from "node:fs/promises";
12489
+ import { existsSync as existsSync2 } from "node:fs";
12490
+ import { mkdir as mkdir4, realpath as realpath3, writeFile as writeFile3 } from "node:fs/promises";
12456
12491
  import { isAbsolute as isAbsolute8, relative as relative6, resolve as resolve11, sep as sep5 } from "node:path";
12457
12492
  import { promisify as promisify2 } from "node:util";
12458
12493
  var runFile = promisify2(execFile3);
12494
+ var WORKTREE_OWNER_FILE = "namzu-owner.json";
12495
+ function worktreeNameProblem(name) {
12496
+ return /^[a-z0-9][a-z0-9-]{0,63}$/.test(name) ? void 0 : "A worktree branch name must use 1\u201364 lowercase letters, digits or hyphens, and start with a letter or digit. The configured branch prefix is put in front of it.";
12497
+ }
12498
+ __name(worktreeNameProblem, "worktreeNameProblem");
12459
12499
  var DelegatedWorktreeDriver = class {
12460
12500
  constructor(cwd, stateRoot, hooks) {
12461
12501
  this.cwd = cwd;
@@ -12469,6 +12509,8 @@ var DelegatedWorktreeDriver = class {
12469
12509
  __name(this, "DelegatedWorktreeDriver");
12470
12510
  }
12471
12511
  kind = "git-worktree";
12512
+ /** What this process's children have open, released when a child's checkout ends. */
12513
+ holding = /* @__PURE__ */ new Map();
12472
12514
  ready;
12473
12515
  async open() {
12474
12516
  this.ready ??= openManagedWorktrees(this.cwd, {
@@ -12486,7 +12528,9 @@ var DelegatedWorktreeDriver = class {
12486
12528
  worktreesDir: managed.worktreesDir,
12487
12529
  // Hooks first, the kernel's Git logic otherwise: one driver for both.
12488
12530
  driver: managed.workspaceDriver,
12489
- isGit: managed.isGit
12531
+ isGit: managed.isGit,
12532
+ managed,
12533
+ hold: /* @__PURE__ */ __name((label, holder, folder) => managed.hold(label, holder, folder), "hold")
12490
12534
  };
12491
12535
  }).catch((error) => {
12492
12536
  this.ready = void 0;
@@ -12500,17 +12544,112 @@ var DelegatedWorktreeDriver = class {
12500
12544
  this.hooks.onNotice(cause.message);
12501
12545
  }
12502
12546
  }
12547
+ /**
12548
+ * The commit a new worktree starts from, checked now so a spawn that names a bad ref stops with
12549
+ * a plain sentence before anything is made. `undefined` means the folder's own HEAD, as before.
12550
+ */
12551
+ async resolveStart(start) {
12552
+ const { sourceRoot, managed, isGit } = await this.open();
12553
+ if (!isGit) return void 0;
12554
+ const named = start.baseRef?.trim();
12555
+ if (named && named !== "default") {
12556
+ if (named.startsWith("-"))
12557
+ throw new Error(`base_ref ${JSON.stringify(named)} is not a branch, tag or commit.`);
12558
+ try {
12559
+ const { stdout } = await runFile(
12560
+ "git",
12561
+ ["-C", sourceRoot, "rev-parse", "--verify", "--quiet", `${named}^{commit}`],
12562
+ { env: hostGitEnv() }
12563
+ );
12564
+ return stdout.trim();
12565
+ } catch {
12566
+ throw new Error(
12567
+ `base_ref ${JSON.stringify(named)} is not a branch, tag or commit in this repository. Fetch it first, or name one that exists.`
12568
+ );
12569
+ }
12570
+ }
12571
+ if (named === "default" || start.defaultBranch) {
12572
+ const point = await managed.defaultStartingPoint({ offline: start.offline === true });
12573
+ if (point.fromHead)
12574
+ throw new Error(
12575
+ "This repository has no default branch to start from (no origin, or its default branch could not be read here). Name base_ref to say what the worktree starts from."
12576
+ );
12577
+ return point.commit;
12578
+ }
12579
+ return void 0;
12580
+ }
12581
+ /**
12582
+ * A name for a checkout is free when no folder and no branch of that name exists. The kernel's driver
12583
+ * would take a finished checkout that already carries the branch for the one it just made, and two
12584
+ * teammates would share a folder; so a name in use is refused here, before anything is made.
12585
+ */
12586
+ async assertNameFree(label) {
12587
+ const { sourceRoot, worktreesDir, managed, isGit } = await this.open();
12588
+ if (!isGit) return;
12589
+ const branch = managed.branchName(label);
12590
+ const folder = resolve11(worktreesDir, label);
12591
+ let branchExists = false;
12592
+ try {
12593
+ await runFile(
12594
+ "git",
12595
+ ["-C", sourceRoot, "show-ref", "--verify", "--quiet", `refs/heads/${branch}`],
12596
+ { env: hostGitEnv() }
12597
+ );
12598
+ branchExists = true;
12599
+ } catch {
12600
+ }
12601
+ if (branchExists || existsSync2(folder))
12602
+ throw new Error(
12603
+ `The name ${JSON.stringify(label)} is already used by a worktree or branch (${branch}). Pick another branch name, or leave it out for a generated one.`
12604
+ );
12605
+ }
12606
+ /** The worktree's owner record: written where Git keeps the worktree's private files, so it never dirties the checkout and goes when the checkout does. */
12607
+ async recordOwner(ref, owner) {
12608
+ try {
12609
+ const { stdout } = await runFile(
12610
+ "git",
12611
+ ["-C", ref.meta.worktreePath, "rev-parse", "--absolute-git-dir"],
12612
+ { env: hostGitEnv() }
12613
+ );
12614
+ const file = resolve11(stdout.trim(), WORKTREE_OWNER_FILE);
12615
+ await writeFile3(
12616
+ file,
12617
+ `${JSON.stringify(
12618
+ {
12619
+ ...owner,
12620
+ branch: ref.meta.branch,
12621
+ worktree: ref.meta.worktreePath,
12622
+ pid: process.pid,
12623
+ createdAt: (/* @__PURE__ */ new Date()).toISOString()
12624
+ },
12625
+ null,
12626
+ 2
12627
+ )}
12628
+ `,
12629
+ { mode: 384 }
12630
+ );
12631
+ return file;
12632
+ } catch {
12633
+ return void 0;
12634
+ }
12635
+ }
12503
12636
  /** Preserve the selected cwd beneath its checkout root for child execution. */
12504
12637
  async selectedSubdirectory() {
12505
12638
  return (await this.open()).subdirectory || void 0;
12506
12639
  }
12507
12640
  async create(params) {
12508
- const { sourceRoot, worktreesDir, driver, isGit } = await this.open();
12641
+ const { sourceRoot, worktreesDir, driver, isGit, hold } = await this.open();
12509
12642
  const head = isGit ? (await runFile("git", ["-C", sourceRoot, "rev-parse", "HEAD"], { env: hostGitEnv() })).stdout.trim() : void 0;
12510
12643
  await mkdir4(worktreesDir, { recursive: true, mode: 448 });
12511
12644
  const baseRef = params.baseRef ?? head;
12512
12645
  try {
12513
- return await driver.create({ ...params, ...baseRef !== void 0 ? { baseRef } : {} });
12646
+ const ref = await driver.create({ ...params, ...baseRef !== void 0 ? { baseRef } : {} });
12647
+ try {
12648
+ const label = relative6(worktreesDir, ref.meta.worktreePath).split(sep5).join("/");
12649
+ this.holding.set(ref.id, await hold(label, `subagent:${label}`, ref.meta.worktreePath));
12650
+ } catch {
12651
+ }
12652
+ return ref;
12514
12653
  } catch (cause) {
12515
12654
  this.say(cause);
12516
12655
  throw cause;
@@ -12522,8 +12661,22 @@ var DelegatedWorktreeDriver = class {
12522
12661
  async inspect(ref) {
12523
12662
  return (await this.open()).driver.inspect(ref);
12524
12663
  }
12664
+ /**
12665
+ * The child that worked in a checkout has ended.
12666
+ *
12667
+ * Called whether or not the checkout is kept, so a checkout kept for review
12668
+ * stops saying a subagent is working in it. Without this it would go on being
12669
+ * refused by its own parent's holding — naming a `subagent:` that finished —
12670
+ * for as long as this process lives, and the entry here would never be let go.
12671
+ */
12672
+ async release(ref) {
12673
+ const release = this.holding.get(ref.id);
12674
+ this.holding.delete(ref.id);
12675
+ if (release) await release().catch(() => void 0);
12676
+ }
12525
12677
  async dispose(ref) {
12526
12678
  try {
12679
+ await this.release(ref);
12527
12680
  return await (await this.open()).driver.dispose(ref);
12528
12681
  } catch (cause) {
12529
12682
  this.say(cause);
@@ -12578,6 +12731,7 @@ var SUBAGENT_PROMPT = [
12578
12731
  // is where a blocker goes. The working rules above already say it per rule.
12579
12732
  "You have no one to ask, and your parent cannot answer while you work. Finish whatever is safe, leave a risky step undone, and name the blocker or the assumption in your final summary, so your parent can decide."
12580
12733
  ].join("\n");
12734
+ var SAVE_NOTICE = "This run is about to end and you will be stopped shortly. Save your work now: commit what you have in your working directory (a work-in-progress commit is fine) or write it to a file, then end your turn with a one-line report of what is saved and what is not. Start nothing new.";
12581
12735
  var WORKFLOW_RUN_GROUP_PREFIX = "wf:";
12582
12736
  var ParentTaskScheduler = class extends LocalTaskScheduler {
12583
12737
  constructor(manager, context, onEvent, validateParent, validateContinuation = validateParent, childTaskStore) {
@@ -12620,6 +12774,21 @@ var ParentTaskScheduler = class extends LocalTaskScheduler {
12620
12774
  await this.validateContinuation();
12621
12775
  await super.continueTask(taskId, message);
12622
12776
  }
12777
+ /**
12778
+ * Say one thing to every child still running, as the turn closes. The turn no longer answers
12779
+ * for the delegation, so the usual check of the invoking turn is not made: these children are
12780
+ * this scheduler's own, and the message only asks them to save. A child that has just ended
12781
+ * is skipped.
12782
+ */
12783
+ async notifyRunning(message) {
12784
+ await Promise.all(
12785
+ super.listTasks().filter((task) => !isTerminalAgentTaskState(task.state) && !this.told.has(task.taskId)).map((task) => {
12786
+ this.told.add(task.taskId);
12787
+ return super.continueTask(task.taskId, message).catch(() => void 0);
12788
+ })
12789
+ );
12790
+ }
12791
+ told = /* @__PURE__ */ new Set();
12623
12792
  };
12624
12793
  var refuseUnownedChildReview = /* @__PURE__ */ __name(async () => ({
12625
12794
  action: "abort",
@@ -12915,6 +13084,7 @@ async function createSubagentRuntime(input) {
12915
13084
  gatewayMessage,
12916
13085
  opts.childTaskStore?.()
12917
13086
  );
13087
+ const turnLimits = resolveTurnGuards(opts, opts.resolveLimits?.(turnId));
12918
13088
  const completionInbox = new CompletionInbox(void 0, {
12919
13089
  holdsTurnOpen: opts.backgroundByDefault !== true
12920
13090
  });
@@ -12925,7 +13095,10 @@ async function createSubagentRuntime(input) {
12925
13095
  budget,
12926
13096
  parentSessionId: String(parent.sessionId),
12927
13097
  parentKey: sessionKey(parent),
13098
+ startedAt: Math.min(Date.now(), opts.resolveTurnStartedAt?.(turnId) ?? Date.now()),
13099
+ timeoutMs: turnLimits.timeoutMs,
12928
13100
  retired: false,
13101
+ notifyRunning: /* @__PURE__ */ __name((message) => gateway.notifyRunning(message), "notifyRunning"),
12929
13102
  close() {
12930
13103
  if (released) return;
12931
13104
  released = true;
@@ -13022,6 +13195,7 @@ async function createSubagentRuntime(input) {
13022
13195
  const runtime = await pending.catch(() => void 0);
13023
13196
  if (runtime === void 0) return;
13024
13197
  if (runtime.retired) {
13198
+ if (closed) await saveBeforeCancel(runtime);
13025
13199
  parents.set(turnId, pending);
13026
13200
  return;
13027
13201
  }
@@ -13029,8 +13203,26 @@ async function createSubagentRuntime(input) {
13029
13203
  parents.set(turnId, pending);
13030
13204
  return;
13031
13205
  }
13206
+ await saveBeforeCancel(runtime);
13032
13207
  runtime.close();
13033
13208
  }, "releaseTurn");
13209
+ const saveBeforeCancel = /* @__PURE__ */ __name(async (runtime) => {
13210
+ const grace = opts.saveGraceMs ?? 0;
13211
+ if (grace <= 0) return;
13212
+ if (hardStopWasRaised()) return;
13213
+ const running = runtime.gateway.listTasks().filter((task) => !isTerminalAgentTaskState(task.state));
13214
+ if (running.length === 0) return;
13215
+ await runtime.notifyRunning(SAVE_NOTICE);
13216
+ await new Promise((resolve17) => {
13217
+ const timer = setTimeout(resolve17, grace);
13218
+ void Promise.allSettled(running.map((task) => runtime.gateway.waitForTask(task.taskId))).then(
13219
+ () => {
13220
+ clearTimeout(timer);
13221
+ resolve17();
13222
+ }
13223
+ );
13224
+ });
13225
+ }, "saveBeforeCancel");
13034
13226
  const retireWithRunningTasks = /* @__PURE__ */ __name((turnId, runtime) => {
13035
13227
  const running = runtime.gateway.listTasks().filter((task) => !isTerminalAgentTaskState(task.state));
13036
13228
  const unheard = runtime.completionInbox.drain();
@@ -13213,6 +13405,56 @@ async function createSubagentRuntime(input) {
13213
13405
  systemPrompt
13214
13406
  };
13215
13407
  }, "forkStart");
13408
+ const childLimitsFor = /* @__PURE__ */ __name((input2, runtime) => {
13409
+ const out = {};
13410
+ if (input2.token_budget !== void 0) {
13411
+ const asked = input2.token_budget;
13412
+ if (!Number.isSafeInteger(asked) || asked <= 0)
13413
+ return "token_budget must be a whole number of tokens above zero.";
13414
+ const left = runtime.budget.remaining;
13415
+ if (Number.isFinite(left) && asked > left)
13416
+ return `This helper cannot get ${asked} tokens: you have ${Math.max(0, Math.floor(left))} left. Ask for ${Math.max(0, Math.floor(left))} or fewer, or do the work yourself.`;
13417
+ out.tokenBudget = asked;
13418
+ }
13419
+ if (input2.timeout_ms !== void 0) {
13420
+ const asked = input2.timeout_ms;
13421
+ if (!Number.isSafeInteger(asked) || asked <= 0 || asked > 2147483647)
13422
+ return "timeout_ms must be a whole number of milliseconds above zero.";
13423
+ if (runtime.timeoutMs > 0) {
13424
+ const left = runtime.timeoutMs - (Date.now() - runtime.startedAt);
13425
+ if (asked > left)
13426
+ return `This helper cannot run for ${asked} ms: your turn has ${Math.max(0, Math.floor(left))} ms left. Ask for less, or do the work yourself.`;
13427
+ }
13428
+ out.timeoutMs = asked;
13429
+ }
13430
+ return out;
13431
+ }, "childLimitsFor");
13432
+ const saveGraceSignal = /* @__PURE__ */ __name((source, runtime) => {
13433
+ const grace = opts.saveGraceMs ?? 0;
13434
+ if (grace <= 0 || runtime === void 0) return { signal: source, dispose: /* @__PURE__ */ __name(() => {
13435
+ }, "dispose") };
13436
+ const held2 = new AbortController();
13437
+ let timer;
13438
+ const onAbort = /* @__PURE__ */ __name(() => {
13439
+ if (isHardStop(source.reason)) {
13440
+ held2.abort(source.reason);
13441
+ return;
13442
+ }
13443
+ void runtime.notifyRunning(SAVE_NOTICE).finally(() => {
13444
+ if (held2.signal.aborted) return;
13445
+ timer = setTimeout(() => held2.abort(source.reason), grace);
13446
+ });
13447
+ }, "onAbort");
13448
+ if (source.aborted) onAbort();
13449
+ else source.addEventListener("abort", onAbort, { once: true });
13450
+ return {
13451
+ signal: held2.signal,
13452
+ dispose: /* @__PURE__ */ __name(() => {
13453
+ source.removeEventListener("abort", onAbort);
13454
+ if (timer !== void 0) clearTimeout(timer);
13455
+ }, "dispose")
13456
+ };
13457
+ }, "saveGraceSignal");
13216
13458
  const launchChild = /* @__PURE__ */ __name(async (input2, context, hooks = {}) => {
13217
13459
  const {
13218
13460
  description,
@@ -13232,6 +13474,12 @@ async function createSubagentRuntime(input) {
13232
13474
  throw new Error("Supply model when selecting a child provider or effort.");
13233
13475
  const refusedFile = subagent_type !== void 0 && !fileAgents.has(subagent_type) ? refusedAgents.get(subagent_type) : void 0;
13234
13476
  if (refusedFile) throw new Error(refusedFile.line);
13477
+ if ((input2.base_ref !== void 0 || input2.branch !== void 0) && (input2.workspace ?? (fileAgents.get(subagent_type ?? "")?.isolation === "worktree" ? "worktree" : void 0)) !== "worktree")
13478
+ throw new Error('base_ref and branch go with workspace "worktree"; leave them out otherwise.');
13479
+ if (input2.branch !== void 0) {
13480
+ const problem = worktreeNameProblem(input2.branch.trim());
13481
+ if (problem) throw new Error(problem);
13482
+ }
13235
13483
  const agentName = typeof input2.name === "string" ? input2.name.trim() : "";
13236
13484
  if (agentName.length > 0) {
13237
13485
  const problem = agentNameProblem(agentName, { team: hooks.teammate !== void 0 });
@@ -13321,6 +13569,8 @@ async function createSubagentRuntime(input) {
13321
13569
  ...review.reviewAllowedCalls ? { reviewAllowedCalls: review.reviewAllowedCalls } : {}
13322
13570
  };
13323
13571
  let taskOwnsCleanup = false;
13572
+ let cleanupSignal;
13573
+ let ownerWritten;
13324
13574
  let retained;
13325
13575
  const cleanupDefinition = /* @__PURE__ */ __name(() => {
13326
13576
  if (dynamic && !retained) registry.unregister(agentId);
@@ -13329,11 +13579,26 @@ async function createSubagentRuntime(input) {
13329
13579
  const gatewayTurn = hooks.teammate?.turnId ?? context.turnId;
13330
13580
  const parentKey = sessionKey(await resolveParent(gatewayTurn));
13331
13581
  const gateway = await gatewayForTurn(gatewayTurn);
13582
+ const gatewayPending = parents.get(gatewayTurn);
13583
+ const gatewayRuntime = gatewayPending ? readyParents.get(gatewayPending) : void 0;
13584
+ const childLimits = gatewayRuntime && (input2.token_budget !== void 0 || input2.timeout_ms !== void 0) ? childLimitsFor(input2, gatewayRuntime) : {};
13585
+ if (typeof childLimits === "string") throw new Error(childLimits);
13332
13586
  const completionInbox = await completionInboxForTurn(gatewayTurn);
13587
+ const childSignal = saveGraceSignal(context.abortSignal, gatewayRuntime);
13588
+ cleanupSignal = childSignal.dispose;
13333
13589
  const subdirectory = workspace === "worktree" ? await worktreeDriver.selectedSubdirectory() : void 0;
13590
+ const worktreeBase = workspace === "worktree" ? await worktreeDriver.resolveStart({
13591
+ ...input2.base_ref !== void 0 ? { baseRef: input2.base_ref } : {},
13592
+ defaultBranch: hooks.teammate !== void 0,
13593
+ // A run with nobody at it never reaches the remote on its own: the job's rules do not cover git.
13594
+ ...opts.unattendedTeams ? { offline: true } : {}
13595
+ }) : void 0;
13596
+ const worktreeLabel = input2.branch?.trim() || void 0;
13597
+ if (workspace === "worktree" && worktreeLabel !== void 0)
13598
+ await worktreeDriver.assertNameFree(worktreeLabel);
13334
13599
  const outcome = await runBlockingAgentTask({
13335
13600
  gateway,
13336
- signal: context.abortSignal,
13601
+ signal: childSignal.signal,
13337
13602
  waitForInbound: opts.resolveWaitForInbound?.(context.turnId),
13338
13603
  background: run_in_background === true,
13339
13604
  ...hooks.cancelCause ? { cancelCause: hooks.cancelCause } : {},
@@ -13362,6 +13627,16 @@ async function createSubagentRuntime(input) {
13362
13627
  ...hooks.teammate ? { teammate: hooks.teammate } : {}
13363
13628
  };
13364
13629
  conversations.set(tracker.viewId, retained);
13630
+ if (task.workspace && gatewayRuntime)
13631
+ ownerWritten = worktreeDriver.recordOwner(task.workspace, {
13632
+ kind: hooks.teammate ? "teammate" : "subagent",
13633
+ leadSessionId: gatewayRuntime.parentSessionId,
13634
+ turnId: String(gatewayTurn),
13635
+ taskId: String(task.taskId),
13636
+ agentId,
13637
+ ...hooks.teammate ? { name: hooks.teammate.name, team: hooks.teammate.team } : {},
13638
+ ...task.workspace.meta.baseCommit ? { base: task.workspace.meta.baseCommit } : {}
13639
+ });
13365
13640
  taskViews.set(String(task.taskId), tracker.viewId);
13366
13641
  if (agentName.length > 0) agentNames.register(agentName, String(task.taskId), parentKey);
13367
13642
  const visible = new Set(activity.getSnapshot().map((value) => value.viewId));
@@ -13412,6 +13687,8 @@ async function createSubagentRuntime(input) {
13412
13687
  mode: "isolated",
13413
13688
  backend: "git-worktree",
13414
13689
  retention: "retain-changed",
13690
+ ...worktreeBase !== void 0 ? { baseRef: worktreeBase } : {},
13691
+ ...worktreeLabel !== void 0 ? { label: worktreeLabel } : {},
13415
13692
  ...subdirectory ? { subdirectory } : {}
13416
13693
  } : { mode: "shared" },
13417
13694
  // The same labels the monitor was seeded with, sent down so the
@@ -13430,7 +13707,7 @@ async function createSubagentRuntime(input) {
13430
13707
  // a delegation trace exists to record — who dispatched whom
13431
13708
  // — is the thing that goes missing.
13432
13709
  ...context.parentSpan ? { parentSpan: context.parentSpan } : {},
13433
- configOverrides,
13710
+ configOverrides: { ...configOverrides, ...childLimits },
13434
13711
  onEvent: hooks.onEvent ? (event) => {
13435
13712
  tracker.onEvent(event);
13436
13713
  hooks.onEvent?.(event);
@@ -13439,12 +13716,14 @@ async function createSubagentRuntime(input) {
13439
13716
  });
13440
13717
  if (outcome.kind === "yielded" && run_in_background !== true)
13441
13718
  activity.markReleased(tracker.viewId);
13719
+ await ownerWritten;
13442
13720
  return { outcome, agentId };
13443
13721
  } catch (error) {
13444
13722
  tracker.fail(error);
13445
13723
  throw error;
13446
13724
  } finally {
13447
13725
  if (!taskOwnsCleanup) cleanupDefinition();
13726
+ cleanupSignal?.();
13448
13727
  }
13449
13728
  }, "launchChild");
13450
13729
  const childReview = /* @__PURE__ */ __name((turnId, declared) => {
@@ -13454,7 +13733,11 @@ async function createSubagentRuntime(input) {
13454
13733
  const teammateOpts = {
13455
13734
  ...opts,
13456
13735
  childExtraTools: /* @__PURE__ */ __name(() => [
13457
- toolset("team:message", [teammateMessageTool, teammateShutdownTool, teammatePlanTool])
13736
+ toolset(
13737
+ "team:message",
13738
+ // Nobody at an unattended run could approve a plan, so a teammate there is not offered one.
13739
+ opts.unattendedTeams ? [teammateMessageTool, teammateShutdownTool] : [teammateMessageTool, teammateShutdownTool, teammatePlanTool]
13740
+ )
13458
13741
  ], "childExtraTools")
13459
13742
  };
13460
13743
  const registerSpecialist = /* @__PURE__ */ __name((input2) => {
@@ -13486,7 +13769,7 @@ ${persona}` : persona || (readOnlyType !== void 0 ? READ_ONLY_PROMPTS.get(readOn
13486
13769
  'Pick `subagent_type: "plan"` when you need a design before changing code \u2014 it reads the code the same way and returns a step plan with the files to change and the risks, and cannot edit anything.',
13487
13770
  'Use the default "general-purpose" when the task must change files or run commands.',
13488
13771
  'Pick `subagent_type: "fork"` for a side task whose intermediate output you will not need again, such as an open-ended survey or a long search. A fork starts from this conversation, runs on your model with your instructions and the sub-agent tools, and returns one report like any other child, so its `prompt` is only the directive: what to do and where its scope ends. Do not re-explain the background, do not pass model, provider, effort or role, and never write or guess what a fork will find before its report arrives. A fork cannot start forks of its own.',
13489
- 'Set `workspace: "worktree"` when the child needs its own Git checkout. It starts from this checkout\'s committed HEAD; uncommitted parent changes are absent. A checkout where the child changed nothing is removed when it ends; one with changes or commits stays, and its path and branch come back in the result, so report them to the operator.',
13772
+ 'Set `workspace: "worktree"` when the child needs its own Git checkout. A plain sub-agent starts from this checkout\'s committed HEAD (or `base_ref`); uncommitted parent changes are absent. A checkout where the child changed nothing is removed when it ends; one with changes or commits stays, and its path and branch come back in the result, so report them to the operator.',
13490
13773
  "Define a specialist inline with `role` \u2014 a system prompt describing who the sub-agent is and how to behave (e.g.",
13491
13774
  '"You are a security auditor; flag vulnerabilities and rate severity"); with `subagent_type: "explore"` or `"plan"` the role keeps the read-only roster.',
13492
13775
  "Omit `role` for the plain sub-agent.",
@@ -13496,7 +13779,8 @@ ${persona}` : persona || (readOnlyType !== void 0 ? READ_ONLY_PROMPTS.get(readOn
13496
13779
  "These fields are display annotations only; they do not create dependencies, barriers, or serial execution.",
13497
13780
  fileAgentSummary.length > 0 ? `Project-defined types: ${fileAgentSummary}.` : "",
13498
13781
  // Said only to a session that started with teammates on; the call itself is decided at each call.
13499
- opts.teams?.enabled().enabled === true ? "Teammates are on: a call that gives `name` starts a teammate, not a one-shot sub-agent. A teammate is a long-lived helper with its own conversation that shares a task list with you and the other teammates, goes idle between pieces of work and is woken by send_message or a task; use it for parallel work that needs several turns and talking to each other, and a plain unnamed sub-agent for a single self-contained job. A team has a small cap, so start only what the work needs." : ""
13782
+ opts.teams?.enabled().enabled === true ? "Teammates are on: a call that gives `name` starts a teammate, not a one-shot sub-agent. A teammate is a long-lived helper with its own conversation that shares a task list with you and the other teammates, goes idle between pieces of work and is woken by send_message or a task; use it for parallel work that needs several turns and talking to each other, and a plain unnamed sub-agent for a single self-contained job. A team has a small cap, so start only what the work needs." : "",
13783
+ opts.teams?.enabled().enabled === true && opts.unattendedTeams === true ? `Nobody is at this run: a teammate's ask for a yes is decided by the run's permission set (allowed, refused, or held), never by a person, and no plan is sent for approval. Give each teammate that writes files its own checkout with workspace "worktree" (it starts from the repository's default branch unless base_ref says otherwise, on a branch named by branch or generated): it does one piece of work, commits it, and leaves the team. Wait for each with wait_for_task, then read its branch and path from the result. Your token budget and time limit are the teammates' too: pass token_budget and timeout_ms to give each its own share, and stop spawning when your own time is short.` : ""
13500
13784
  ].filter((part) => part.length > 0).join(" "),
13501
13785
  inputSchema: mcpJsonSchemaToZod({
13502
13786
  type: "object",
@@ -13523,11 +13807,30 @@ ${persona}` : persona || (readOnlyType !== void 0 ? READ_ONLY_PROMPTS.get(readOn
13523
13807
  enum: ["shared", "worktree"],
13524
13808
  description: "Use a separate Git worktree for this child; defaults to shared. It is removed when the child ends with no changes and kept otherwise."
13525
13809
  },
13810
+ base_ref: {
13811
+ type: "string",
13812
+ description: `Only with workspace "worktree": what the checkout starts from, a branch, tag or commit of this repository, or "default" for the remote's default branch. Omit it and a plain sub-agent starts from this checkout's committed HEAD, while a teammate (a call with name, when teammates are on) starts from the default branch.`
13813
+ },
13814
+ branch: {
13815
+ type: "string",
13816
+ maxLength: 64,
13817
+ description: 'Only with workspace "worktree": a name for the checkout and its branch, 1 to 64 lowercase letters, digits or hyphens. The branch is that name below the configured branch prefix (namzu/<name> unless the worktree.branchPrefix setting says otherwise). Omit it for a generated name. A name already in use is refused.'
13818
+ },
13526
13819
  subagent_type: {
13527
13820
  type: "string",
13528
13821
  enum: [...agentTypeIds, ...refusedTypeIds],
13529
13822
  description: `"explore" for read-only lookups (find, search, explain); "plan" for a read-only step plan before a change; "general-purpose" (default) when the task changes files or runs commands; "fork" to continue this conversation in a side task.${fileAgentSummary.length > 0 ? ` This project also defines: ${fileAgentSummary}. Prefer a project-defined type when its description fits the task.` : ""}${refusedTypeIds.length > 0 ? ` Not available (their files cannot be loaded; starting one is refused): ${refusedTypeIds.join(", ")}.` : ""}`
13530
13823
  },
13824
+ token_budget: {
13825
+ type: "integer",
13826
+ minimum: 1,
13827
+ description: "Optional cap on the tokens this child may spend. It cannot be more than your own remaining token budget, and a call that asks for more is refused. Its spend still counts in yours. The child never gets more than its fair share of what is left, so with several helpers running the cap can be lower than asked. Omit to give it that share."
13828
+ },
13829
+ timeout_ms: {
13830
+ type: "integer",
13831
+ minimum: 1,
13832
+ description: "Optional cap on how long this child may run, in milliseconds. It cannot be longer than the time your own turn has left, and a call that asks for more is refused. Omit to give it your turn's limit."
13833
+ },
13531
13834
  model: {
13532
13835
  type: "string",
13533
13836
  description: "Exact child model ID. Omit to inherit the session model. Use agent_models to discover available IDs; do not search repository files."
@@ -14719,6 +15022,10 @@ ${message}` : message;
14719
15022
  const teamTurnByLead = /* @__PURE__ */ new Map();
14720
15023
  const teamTurnFor = /* @__PURE__ */ __name(async (context) => {
14721
15024
  const parent = await resolveParent(context.turnId);
15025
+ if (opts.unattendedTeams) {
15026
+ teamTurnByLead.set(String(parent.sessionId), context.turnId);
15027
+ return context.turnId;
15028
+ }
14722
15029
  const key = sessionKey(parent);
14723
15030
  let turn = teamTurnIds.get(key);
14724
15031
  if (turn === void 0) {
@@ -14796,7 +15103,10 @@ ${message}` : message;
14796
15103
  name: spec.member.name,
14797
15104
  prompt: `${spec.prompt}
14798
15105
 
14799
- ${teammateAppendix(spec.member.name, spec.team)}`,
15106
+ ${teammateAppendix(spec.member.name, spec.team, {
15107
+ ...opts.unattendedTeams ? { unattended: true } : {},
15108
+ ...pending.call.workspace === "worktree" ? { worktree: true } : {}
15109
+ })}`,
14800
15110
  run_in_background: true
14801
15111
  },
14802
15112
  pending.context,
@@ -15009,6 +15319,14 @@ ${planText}`
15009
15319
  notifyTeam();
15010
15320
  }
15011
15321
  const allowed = decision.action === "approve_tools" || decision.action === "modify_tools";
15322
+ if (decision.action === "pause") {
15323
+ const refusal = {
15324
+ action: "reject_tools",
15325
+ feedback: "This call needs approval and cannot be approved in this run, so it was not made. Do not retry it; do the rest of your work another way, or report that it was held."
15326
+ };
15327
+ teamRunner?.noteAnswer(target.team, target.name, { callIds, allow: false });
15328
+ return refusal;
15329
+ }
15012
15330
  teamRunner?.noteAnswer(target.team, target.name, {
15013
15331
  callIds,
15014
15332
  allow: allowed,
@@ -15036,10 +15354,7 @@ ${planText}`
15036
15354
  return fail2(
15037
15355
  "A teammate keeps a conversation of its own, so it cannot be a fork of this one. Pick another subagent_type, or leave it out and put what it needs in the prompt."
15038
15356
  );
15039
- if (call.workspace === "worktree")
15040
- return fail2(
15041
- "A teammate works in the same checkout as you for now, so that it can be woken for more work. Leave out workspace, and give teammates files that do not overlap."
15042
- );
15357
+ const inWorktree = call.workspace === "worktree";
15043
15358
  const problem = agentNameProblem(name, { team: true });
15044
15359
  if (problem) return fail2(problem);
15045
15360
  const parent = await resolveParent(context.turnId);
@@ -15053,12 +15368,13 @@ ${planText}`
15053
15368
  prompt: call.prompt,
15054
15369
  cwd: opts.cwd,
15055
15370
  ...call.subagent_type !== void 0 ? { agentType: call.subagent_type } : {},
15056
- ...call.model !== void 0 ? { model: call.model } : {}
15371
+ ...call.model !== void 0 ? { model: call.model } : {},
15372
+ ...inWorktree ? { oneShot: true } : {}
15057
15373
  });
15058
15374
  const started = handover.started;
15059
15375
  return {
15060
15376
  success: true,
15061
- output: `Teammate ${JSON.stringify(name)} started in team ${team} and is working in the background. It keeps its own conversation, shares the team's task list with you, and goes idle between pieces of work. Give it more with send_message (to ${JSON.stringify(name)}); what it says and when it goes idle reach you as notifications. Teammates share your checkout: give them files that do not overlap.`,
15377
+ output: inWorktree ? `Teammate ${JSON.stringify(name)} started in team ${team} and is working in the background, in a Git checkout of its own. It shares the team's task list with you. This is one piece of work: when it finishes it leaves the team, and the checkout is removed if it changed nothing and kept (path and branch come back when it ends) if it did. Wait for it with wait_for_task (to ${JSON.stringify(name)}); what it says reaches you as notifications.` : `Teammate ${JSON.stringify(name)} started in team ${team} and is working in the background. It keeps its own conversation, shares the team's task list with you, and goes idle between pieces of work. Give it more with send_message (to ${JSON.stringify(name)}); what it says and when it goes idle reach you as notifications. Teammates share your checkout: give them files that do not overlap, or start one with workspace "worktree" for a checkout of its own.`,
15062
15378
  data: {
15063
15379
  teammate: member.name,
15064
15380
  team,
@@ -15233,11 +15549,25 @@ ${planText}`
15233
15549
  };
15234
15550
  }
15235
15551
  });
15552
+ const saveTeammatesBeforeStop = /* @__PURE__ */ __name(async () => {
15553
+ if ((opts.saveGraceMs ?? 0) <= 0) return;
15554
+ const gateways = /* @__PURE__ */ new Set();
15555
+ for (const owned of conversations.values()) {
15556
+ if (!owned.teammate) continue;
15557
+ const current = owned.gateway.getTask(owned.task.taskId) ?? owned.task;
15558
+ if (isTerminalAgentTaskState(current.state)) continue;
15559
+ const pending = parents.get(owned.teammate.turnId);
15560
+ const runtime = pending ? readyParents.get(pending) : void 0;
15561
+ if (runtime) gateways.add(runtime);
15562
+ }
15563
+ await Promise.all([...gateways].map((runtime) => saveBeforeCancel(runtime)));
15564
+ }, "saveTeammatesBeforeStop");
15236
15565
  let closePromise;
15237
15566
  const close = /* @__PURE__ */ __name(() => {
15238
15567
  if (closePromise) return closePromise;
15239
15568
  closed = true;
15240
15569
  closePromise = (async () => {
15570
+ await saveTeammatesBeforeStop();
15241
15571
  teamRunner?.close();
15242
15572
  for (const off of hookedLists.values()) off();
15243
15573
  hookedLists.clear();
@@ -15464,12 +15794,12 @@ function agentTaskOutcome(task) {
15464
15794
  __name(agentTaskOutcome, "agentTaskOutcome");
15465
15795
  function workspaceData(task) {
15466
15796
  const meta = task.workspace?.meta;
15467
- return meta?.backend === "git-worktree" && existsSync2(meta.worktreePath) ? { workspace_path: meta.worktreePath, workspace_branch: meta.branch } : {};
15797
+ return meta?.backend === "git-worktree" && existsSync3(meta.worktreePath) ? { workspace_path: meta.worktreePath, workspace_branch: meta.branch } : {};
15468
15798
  }
15469
15799
  __name(workspaceData, "workspaceData");
15470
15800
  function workspaceRemoved(task) {
15471
15801
  const meta = task.workspace?.meta;
15472
- return meta?.backend === "git-worktree" && !existsSync2(meta.worktreePath);
15802
+ return meta?.backend === "git-worktree" && !existsSync3(meta.worktreePath);
15473
15803
  }
15474
15804
  __name(workspaceRemoved, "workspaceRemoved");
15475
15805
  function workspaceNote(task) {
@@ -15662,12 +15992,16 @@ function decideTeams(input) {
15662
15992
  reason: "env-off",
15663
15993
  text: `Teammates are off: ${TEAMS_ENV} is set to ${word2}.`
15664
15994
  };
15665
- if (!input.interactive)
15666
- return {
15667
- enabled: false,
15668
- reason: "headless",
15669
- text: "Teammates run only in a conversation with a person at it, not in a one-shot or scheduled run."
15670
- };
15995
+ if (!input.interactive) {
15996
+ if (input.unattended === void 0)
15997
+ return {
15998
+ enabled: false,
15999
+ reason: "headless",
16000
+ text: "Teammates run only in a conversation with a person at it, or in a run whose permission set decides their asks (exec, print mode, a scheduled job). Not here."
16001
+ };
16002
+ if (input.unattended.refusal !== void 0)
16003
+ return { enabled: false, reason: "not-allowed", text: input.unattended.refusal };
16004
+ }
15671
16005
  if (word2 !== void 0 && ON_WORDS.has(word2)) return { enabled: true, source: "env" };
15672
16006
  if (input.config()?.enabled === true) return { enabled: true, source: "setting" };
15673
16007
  return {
@@ -15693,7 +16027,8 @@ function createTeamsHost(source, overrides = {}) {
15693
16027
  enabled: /* @__PURE__ */ __name(() => decideTeams({
15694
16028
  config: source.config,
15695
16029
  env: source.env ?? (() => process.env),
15696
- interactive: true
16030
+ interactive: source.unattended === void 0,
16031
+ ...source.unattended ? { unattended: source.unattended } : {}
15697
16032
  }), "enabled"),
15698
16033
  limits: /* @__PURE__ */ __name(() => teamsLimits(source.config()), "limits"),
15699
16034
  store: new TeamStore(),
@@ -15758,14 +16093,14 @@ async function listWorkflowRuns(runsDirectory) {
15758
16093
  __name(listWorkflowRuns, "listWorkflowRuns");
15759
16094
 
15760
16095
  // src/integrations/workflows/host.ts
15761
- import { randomBytes as randomBytes3 } from "node:crypto";
15762
- import { existsSync as existsSync4 } from "node:fs";
16096
+ import { randomBytes as randomBytes2 } from "node:crypto";
16097
+ import { existsSync as existsSync5 } from "node:fs";
15763
16098
  import { readFile as readFile9 } from "node:fs/promises";
15764
16099
  import { join as join15 } from "node:path";
15765
16100
 
15766
16101
  // src/integrations/workflows/orphans.ts
15767
- import { existsSync as existsSync3, mkdirSync as mkdirSync2, writeFileSync } from "node:fs";
15768
- import { readFile as readFile8, readdir as readdir3, writeFile as writeFile3 } from "node:fs/promises";
16102
+ import { existsSync as existsSync4, mkdirSync as mkdirSync2, writeFileSync } from "node:fs";
16103
+ import { readFile as readFile8, readdir as readdir3, writeFile as writeFile4 } from "node:fs/promises";
15769
16104
  import { dirname as dirname4, join as join14 } from "node:path";
15770
16105
  var NOTICE_FILE = "orphan-notice.json";
15771
16106
  var MAX_ORPHAN_NOTICES = 20;
@@ -15902,7 +16237,7 @@ async function recoverUnfinishedWorkflows(options) {
15902
16237
  (key) => !state.results.has(key) && !state.failed.has(key)
15903
16238
  ).length;
15904
16239
  const copy = editableCopyPath(options.runsDirectory, name, runId);
15905
- const script = started.scriptPath ?? (existsSync3(copy) ? copy : void 0);
16240
+ const script = started.scriptPath ?? (existsSync4(copy) ? copy : void 0);
15906
16241
  text2 = [
15907
16242
  `Background workflow ${quotedName(name)} (run ${runId}) didn't finish before the previous session ended.`,
15908
16243
  `No finish record was found for it, so the process most likely exited while it ran. ${words(state.results.size, "agent")} had finished and saved their results; ${unfinished} had started and not finished.`,
@@ -15968,7 +16303,7 @@ async function keyMismatchOf(dir, runId, key) {
15968
16303
  __name(keyMismatchOf, "keyMismatchOf");
15969
16304
  async function storeNotice(runsDirectory, notice2, replace) {
15970
16305
  try {
15971
- await writeFile3(noticePath(runsDirectory, notice2.runId), JSON.stringify(notice2), {
16306
+ await writeFile4(noticePath(runsDirectory, notice2.runId), JSON.stringify(notice2), {
15972
16307
  mode: 384,
15973
16308
  flag: replace ? "w" : "wx"
15974
16309
  });
@@ -15982,7 +16317,7 @@ async function markOrphanNoticesDelivered(runsDirectory, runIds) {
15982
16317
  for (const runId of runIds) {
15983
16318
  const stored = await readStored(runsDirectory, runId);
15984
16319
  if (!stored || stored.delivered) continue;
15985
- await writeFile3(
16320
+ await writeFile4(
15986
16321
  noticePath(runsDirectory, runId),
15987
16322
  JSON.stringify({ ...stored, delivered: true }),
15988
16323
  {
@@ -16217,7 +16552,7 @@ function createWorkflowRunId(isTaken = () => false) {
16217
16552
  for (; ; ) {
16218
16553
  let body2 = "";
16219
16554
  while (body2.length < 8) {
16220
- for (const byte of randomBytes3(16)) {
16555
+ for (const byte of randomBytes2(16)) {
16221
16556
  if (byte >= 252) continue;
16222
16557
  body2 += ALPHABET[byte % 36];
16223
16558
  if (body2.length === 8) break;
@@ -16483,7 +16818,7 @@ function createWorkflowHost(options) {
16483
16818
  if (state === "ended") registry.discard(runId);
16484
16819
  } else {
16485
16820
  runId = createWorkflowRunId(
16486
- (id) => registry.get(id) !== void 0 || runs !== void 0 && existsSync4(join15(runs, id))
16821
+ (id) => registry.get(id) !== void 0 || runs !== void 0 && existsSync5(join15(runs, id))
16487
16822
  );
16488
16823
  }
16489
16824
  const turn = options.openRunTurn(context.turnId, runId);
@@ -16809,8 +17144,8 @@ function createAnchorCaution(deps) {
16809
17144
  __name(createAnchorCaution, "createAnchorCaution");
16810
17145
 
16811
17146
  // src/memory/curation-runtime.ts
16812
- import { appendFile as appendFile3, mkdir as mkdir6 } from "node:fs/promises";
16813
- import { dirname as dirname5 } from "node:path";
17147
+ import { appendFile as appendFile4, mkdir as mkdir7 } from "node:fs/promises";
17148
+ import { dirname as dirname6 } from "node:path";
16814
17149
 
16815
17150
  // src/memory/curator.ts
16816
17151
  import { createHash as createHash5 } from "node:crypto";
@@ -16900,6 +17235,12 @@ ${preview(derived.text, directory)}`
16900
17235
  return sections.length > 0 ? sections.join("\n\n") : null;
16901
17236
  }
16902
17237
  __name(renderStoredMemorySection, "renderStoredMemorySection");
17238
+ function renderWaitingClaims(count2, reason) {
17239
+ const claims2 = count2 === 1 ? "1 claim" : `${count2} claims`;
17240
+ const why = reason === "no side model" ? "no small model is set" : "the small model route would be the conversation\u2019s own model";
17241
+ return `${claims2} learned in recent turns ${count2 === 1 ? "is" : "are"} waiting for a small model (${why}). Nothing is written from them until one is named: name one with the smallModel setting (a provider/model, also NAMZU_SMALL_MODEL), and they are curated on the next drain.`;
17242
+ }
17243
+ __name(renderWaitingClaims, "renderWaitingClaims");
16903
17244
 
16904
17245
  // src/memory/sweep.ts
16905
17246
  var DEFAULT_RETIRE_AFTER_DAYS = 21;
@@ -17726,6 +18067,7 @@ var MemoryCurator = class {
17726
18067
  }
17727
18068
  #deps;
17728
18069
  #now;
18070
+ #waitLogged = false;
17729
18071
  constructor(deps) {
17730
18072
  this.#deps = deps;
17731
18073
  this.#now = deps.now ?? Date.now;
@@ -17733,6 +18075,21 @@ var MemoryCurator = class {
17733
18075
  #log(entry) {
17734
18076
  this.#deps.log?.({ at: this.#now(), ...entry });
17735
18077
  }
18078
+ /** Claims that cannot be curated yet. Written nowhere; the first time in a process it is logged. */
18079
+ #wait(reason, started) {
18080
+ if (!this.#waitLogged) {
18081
+ this.#waitLogged = true;
18082
+ this.#log({
18083
+ op: "wait",
18084
+ ids: [],
18085
+ reason,
18086
+ engine: "fallback",
18087
+ latencyMs: Math.max(0, this.#now() - started),
18088
+ outcome: "skipped"
18089
+ });
18090
+ }
18091
+ return { lines: [], engine: "fallback", waiting: reason };
18092
+ }
17736
18093
  /** Write each claim set as the screened promoter would. */
17737
18094
  async #fallback(candidates, reason, started, indexes) {
17738
18095
  for (const [index, candidate] of candidates.entries()) {
@@ -17782,10 +18139,7 @@ var MemoryCurator = class {
17782
18139
  const usable = candidates.filter(holdsClaims2);
17783
18140
  if (usable.length === 0) return { lines: [], engine: "fallback" };
17784
18141
  const side = this.#deps.sideModel();
17785
- if (!side) {
17786
- await this.#fallback(usable, "no side model", started);
17787
- return { lines: [], engine: "fallback" };
17788
- }
18142
+ if (!side) return this.#wait("no side model", started);
17789
18143
  const controller = new AbortController();
17790
18144
  let timedOut = false;
17791
18145
  const onAbort = /* @__PURE__ */ __name(() => controller.abort(context.signal?.reason), "onAbort");
@@ -17803,6 +18157,7 @@ var MemoryCurator = class {
17803
18157
  let reply;
17804
18158
  let neighbours = [];
17805
18159
  let fallback;
18160
+ let waiting;
17806
18161
  try {
17807
18162
  const work = (async () => {
17808
18163
  const route = await side.route(context.sessionId, controller.signal);
@@ -17821,7 +18176,7 @@ var MemoryCurator = class {
17821
18176
  work.catch(() => {
17822
18177
  });
17823
18178
  const outcome = await Promise.race([work, deadline]);
17824
- if (outcome === "main route") fallback = "main route";
18179
+ if (outcome === "main route") waiting = "main route";
17825
18180
  else if (outcome === "deadline" || timedOut) fallback = "timeout";
17826
18181
  else if (outcome === void 0) fallback = "error";
17827
18182
  else reply = outcome;
@@ -17831,6 +18186,7 @@ var MemoryCurator = class {
17831
18186
  if (timer) clearTimeout(timer);
17832
18187
  context.signal?.removeEventListener("abort", onAbort);
17833
18188
  }
18189
+ if (waiting !== void 0) return this.#wait(waiting, started);
17834
18190
  const ops = reply === void 0 ? void 0 : parseOps(reply, usable.length);
17835
18191
  if (fallback === void 0 && ops === void 0) fallback = "invalid";
17836
18192
  if (fallback !== void 0 || ops === void 0) {
@@ -18079,206 +18435,38 @@ ${op.content}`,
18079
18435
  }
18080
18436
  };
18081
18437
 
18082
- // src/memory/curation-runtime.ts
18083
- var CURATION_IDLE_MS = 15e3;
18084
- var CURATION_DISPOSE_MS = 8e3;
18085
- var CurationRuntime = class {
18086
- static {
18087
- __name(this, "CurationRuntime");
18088
- }
18089
- #deps;
18090
- #timer = null;
18091
- #disposed = false;
18092
- #draining = 0;
18093
- /** A turn is between its start and its settling: no drain begins meanwhile. */
18094
- #turnRunning = false;
18095
- /** A drain was asked for while a turn ran; it is armed when the turn settles. */
18096
- #deferred = false;
18097
- constructor(deps) {
18098
- this.#deps = deps;
18099
- }
18100
- /** Whether a drain is in flight right now. */
18101
- get draining() {
18102
- return this.#draining > 0;
18103
- }
18104
- #cancel() {
18105
- if (this.#timer === null) return;
18106
- this.#deps.clearTimer(this.#timer);
18107
- this.#timer = null;
18108
- }
18109
- /** A turn appended to the inbox as it settled: arm the idle drain. */
18110
- appended() {
18111
- if (this.#disposed) return;
18112
- this.#cancel();
18113
- if (this.#turnRunning) {
18114
- this.#deferred = true;
18115
- return;
18116
- }
18117
- this.#armIdle();
18118
- }
18119
- #armIdle() {
18120
- this.#cancel();
18121
- this.#timer = this.#deps.setTimer(() => {
18122
- this.#timer = null;
18123
- if (this.#turnRunning) {
18124
- this.#deferred = true;
18125
- return;
18126
- }
18127
- if (this.#deps.isBusy?.() === true) {
18128
- this.#deps.report?.("idle", "skipped");
18129
- this.#armIdle();
18130
- return;
18131
- }
18132
- void this.drain("idle");
18133
- }, this.#deps.idleMs ?? CURATION_IDLE_MS);
18134
- }
18135
- /**
18136
- * A turn is starting. Nothing is drained while it runs, so curation never
18137
- * competes with a streaming reply or a running tool and the turn's first
18138
- * request never waits for it. What was waiting drains after the turn
18139
- * settles. A drain already in flight is neither waited for nor stopped: it
18140
- * is one bounded side-model call (`CURATE_DEADLINE_MS`) that finishes by
18141
- * itself, and stopping it would throw its work away. It starts no new one.
18142
- */
18143
- turnStarted() {
18144
- if (this.#disposed) return;
18145
- this.#turnRunning = true;
18146
- this.#deferred = true;
18147
- this.#cancel();
18148
- }
18149
- /** The turn settled: the quiet pause begins, and what waited drains at its end. */
18150
- turnSettled() {
18151
- if (this.#disposed || !this.#turnRunning) return;
18152
- this.#turnRunning = false;
18153
- if (!this.#deferred) return;
18154
- this.#deferred = false;
18155
- this.#armIdle();
18156
- }
18157
- /** The session opened. Drains now when a turn can carry the cost, else leaves it for the first turn. */
18158
- start() {
18159
- if (this.#disposed) return;
18160
- void this.drain("start");
18161
- }
18162
- /** Drain for the last time. Nothing is armed afterwards. */
18163
- async dispose() {
18164
- if (this.#disposed) return;
18165
- this.#disposed = true;
18166
- this.#cancel();
18167
- const closing = new AbortController();
18168
- const timer = this.#deps.setTimer(
18169
- () => closing.abort(new Error("Memory curation did not finish while closing.")),
18170
- CURATION_DISPOSE_MS
18171
- );
18172
- try {
18173
- await this.drain("dispose", closing.signal);
18174
- } finally {
18175
- this.#deps.clearTimer(timer);
18176
- }
18177
- }
18178
- /** Empty the inbox once. Never rejects. */
18179
- async drain(reason, signal) {
18180
- const { inbox, curator } = this.#deps;
18181
- if (this.#turnRunning && reason !== "dispose") {
18182
- this.#deferred = true;
18183
- this.#deps.report?.(reason, "skipped");
18184
- return void 0;
18185
- }
18186
- const turn = this.#deps.turn();
18187
- if (turn === void 0 && this.#deps.hasSideModel()) {
18188
- this.#deps.report?.(reason, "skipped");
18189
- return void 0;
18190
- }
18191
- this.#draining += 1;
18192
- try {
18193
- const lines = [];
18194
- const result = await inbox.drain(async (entries) => {
18195
- const out = await curator.curate(
18196
- entries.map((entry) => entry.candidate),
18197
- {
18198
- // Without a side model nothing is charged, so these are never read.
18199
- sessionId: turn?.sessionId ?? "",
18200
- turnId: turn?.turnId ?? "",
18201
- ...signal ? { signal } : {}
18202
- }
18203
- );
18204
- lines.push(...out.lines);
18205
- });
18206
- this.#deps.report?.(reason, result);
18207
- if (lines.length > 0) this.#deps.onChange?.(lines);
18208
- return result;
18209
- } catch {
18210
- this.#deps.report?.(reason, "failed");
18211
- return void 0;
18212
- } finally {
18213
- this.#draining -= 1;
18214
- }
18215
- }
18216
- };
18217
- function createCurationLog(file) {
18218
- let tail2;
18219
- const write = /* @__PURE__ */ __name((entry) => {
18220
- const line = `${JSON.stringify(entry)}
18221
- `;
18222
- tail2 ??= mkdir6(dirname5(file), { recursive: true, mode: 448 }).then(
18223
- () => void 0,
18224
- () => void 0
18225
- );
18226
- tail2 = tail2.then(() => appendFile3(file, line, { mode: 384 })).catch(() => {
18227
- });
18228
- }, "write");
18229
- return Object.assign(write, { settled: /* @__PURE__ */ __name(() => tail2 ?? Promise.resolve(), "settled") });
18230
- }
18231
- __name(createCurationLog, "createCurationLog");
18232
- function inboxPromotion(options) {
18233
- return async (candidate) => {
18234
- if (!holdsClaims2(candidate)) return;
18235
- try {
18236
- await options.inbox.append(candidate);
18237
- } catch {
18238
- await options.fallback(candidate);
18239
- return;
18240
- }
18241
- options.appended();
18242
- };
18243
- }
18244
- __name(inboxPromotion, "inboxPromotion");
18245
- function composeMemoryPromotion(options) {
18246
- const { curation } = options;
18247
- if (!curation) return options.gate(options.written);
18248
- return options.screen(
18249
- options.gate(
18250
- inboxPromotion({
18251
- inbox: options.inbox,
18252
- fallback: options.written,
18253
- appended: /* @__PURE__ */ __name(() => curation.appended(), "appended")
18254
- })
18255
- )
18256
- );
18257
- }
18258
- __name(composeMemoryPromotion, "composeMemoryPromotion");
18259
-
18260
18438
  // src/memory/inbox.ts
18261
18439
  import { randomUUID as randomUUID5 } from "node:crypto";
18262
18440
  import {
18263
- appendFile as appendFile4,
18264
- mkdir as mkdir7,
18441
+ appendFile as appendFile3,
18442
+ mkdir as mkdir6,
18265
18443
  open as open4,
18266
18444
  readFile as readFile11,
18267
18445
  readdir as readdir4,
18268
18446
  rename as rename4,
18269
18447
  stat as stat6,
18270
18448
  unlink as unlink3,
18271
- writeFile as writeFile4
18449
+ writeFile as writeFile5
18272
18450
  } from "node:fs/promises";
18273
- import { basename as basename4, dirname as dirname6, join as join17 } from "node:path";
18451
+ import { basename as basename4, dirname as dirname5, join as join17 } from "node:path";
18274
18452
  var INBOX_BATCH_SIZE = 8;
18275
18453
  var INBOX_MAX_BATCHES = 3;
18276
18454
  var INBOX_CLAIM_STALE_MS = 12e4;
18455
+ var INBOX_MAX_ENTRIES = 200;
18277
18456
  var INBOX_MAX_ATTEMPTS = 3;
18278
18457
  var APPEND_ATTEMPTS = 5;
18279
18458
  var CLAIM_PATTERN = /\.claim-(\d+)-[0-9a-f-]+\.jsonl$/u;
18280
18459
  var CLAIM_FILE_MODE = 384;
18281
18460
  var DIRECTORY_MODE = 448;
18461
+ var InboxHold = class extends Error {
18462
+ static {
18463
+ __name(this, "InboxHold");
18464
+ }
18465
+ constructor() {
18466
+ super("Claims are held until a small model can be asked.");
18467
+ this.name = "InboxHold";
18468
+ }
18469
+ };
18282
18470
  function parseLines(text2) {
18283
18471
  const out = [];
18284
18472
  for (const line of text2.split("\n")) {
@@ -18330,7 +18518,7 @@ var MemoryInbox = class {
18330
18518
  return this.#file;
18331
18519
  }
18332
18520
  async #ensureDirectory() {
18333
- await mkdir7(dirname6(this.#file), { recursive: true, mode: DIRECTORY_MODE });
18521
+ await mkdir6(dirname5(this.#file), { recursive: true, mode: DIRECTORY_MODE });
18334
18522
  }
18335
18523
  /** Append one candidate. One write of one line, so a concurrent append never interleaves. */
18336
18524
  async append(candidate) {
@@ -18366,14 +18554,14 @@ var MemoryInbox = class {
18366
18554
  }
18367
18555
  #newClaimPath(now) {
18368
18556
  return join17(
18369
- dirname6(this.#file),
18557
+ dirname5(this.#file),
18370
18558
  `${basename4(this.#file, ".jsonl")}.claim-${now}-${this.#newId()}.jsonl`
18371
18559
  );
18372
18560
  }
18373
18561
  async #claimFiles() {
18374
18562
  let names;
18375
18563
  try {
18376
- names = await readdir4(dirname6(this.#file));
18564
+ names = await readdir4(dirname5(this.#file));
18377
18565
  } catch (error) {
18378
18566
  if (error.code === "ENOENT") return [];
18379
18567
  throw error;
@@ -18384,7 +18572,7 @@ var MemoryInbox = class {
18384
18572
  if (!name.startsWith(prefix)) continue;
18385
18573
  const match = CLAIM_PATTERN.exec(name);
18386
18574
  if (!match) continue;
18387
- out.push({ path: join17(dirname6(this.#file), name), at: Number(match[1]) });
18575
+ out.push({ path: join17(dirname5(this.#file), name), at: Number(match[1]) });
18388
18576
  }
18389
18577
  return out.sort((a, b) => a.at - b.at);
18390
18578
  }
@@ -18450,13 +18638,18 @@ var MemoryInbox = class {
18450
18638
  let dropped = 0;
18451
18639
  const failed = [];
18452
18640
  let batches = 0;
18641
+ let held2 = false;
18453
18642
  while (pending.length > 0 && batches < maxBatches) {
18454
18643
  const batch = pending.slice(0, batchSize);
18455
18644
  batches += 1;
18456
18645
  try {
18457
18646
  await handle(batch);
18458
18647
  applied += batch.length;
18459
- } catch {
18648
+ } catch (error) {
18649
+ if (error instanceof InboxHold) {
18650
+ held2 = true;
18651
+ break;
18652
+ }
18460
18653
  for (const entry of batch) {
18461
18654
  const next = { ...entry, attempts: entry.attempts + 1 };
18462
18655
  if (next.attempts >= INBOX_MAX_ATTEMPTS) dropped += 1;
@@ -18466,14 +18659,18 @@ var MemoryInbox = class {
18466
18659
  pending = pending.slice(batch.length);
18467
18660
  await atomicWrite(claimPath, serialize([...failed, ...pending]));
18468
18661
  }
18469
- const keep = [...failed, ...pending];
18662
+ let keep = [...failed, ...pending];
18663
+ if (held2 && keep.length > INBOX_MAX_ENTRIES) {
18664
+ dropped += keep.length - INBOX_MAX_ENTRIES;
18665
+ keep = [...keep].sort((a, b) => a.at - b.at).slice(-INBOX_MAX_ENTRIES);
18666
+ }
18470
18667
  if (keep.length > 0) {
18471
18668
  await this.#ensureDirectory();
18472
- await appendFile4(this.#file, serialize(keep), { mode: CLAIM_FILE_MODE });
18669
+ await appendFile3(this.#file, serialize(keep), { mode: CLAIM_FILE_MODE });
18473
18670
  }
18474
18671
  await unlink3(claimPath).catch(() => {
18475
18672
  });
18476
- return { applied, kept: keep.length, dropped };
18673
+ return { applied, kept: keep.length, dropped, ...held2 ? { held: keep.length } : {} };
18477
18674
  }
18478
18675
  };
18479
18676
  function dedupe(entries) {
@@ -18489,11 +18686,220 @@ function dedupe(entries) {
18489
18686
  __name(dedupe, "dedupe");
18490
18687
  async function atomicWrite(path, text2) {
18491
18688
  const temp = `${path}.${randomUUID5()}.tmp`;
18492
- await writeFile4(temp, text2, { mode: CLAIM_FILE_MODE });
18689
+ await writeFile5(temp, text2, { mode: CLAIM_FILE_MODE });
18493
18690
  await rename4(temp, path);
18494
18691
  }
18495
18692
  __name(atomicWrite, "atomicWrite");
18496
18693
 
18694
+ // src/memory/curation-runtime.ts
18695
+ var CURATION_IDLE_MS = 15e3;
18696
+ var CURATION_DISPOSE_MS = 8e3;
18697
+ var CurationRuntime = class {
18698
+ static {
18699
+ __name(this, "CurationRuntime");
18700
+ }
18701
+ #deps;
18702
+ #timer = null;
18703
+ #disposed = false;
18704
+ #draining = 0;
18705
+ /** Why the last drain held its claims, until a drain curates again. */
18706
+ #waiting;
18707
+ /** A turn is between its start and its settling: no drain begins meanwhile. */
18708
+ #turnRunning = false;
18709
+ /** A drain was asked for while a turn ran; it is armed when the turn settles. */
18710
+ #deferred = false;
18711
+ constructor(deps) {
18712
+ this.#deps = deps;
18713
+ }
18714
+ /** Whether a drain is in flight right now. */
18715
+ get draining() {
18716
+ return this.#draining > 0;
18717
+ }
18718
+ /**
18719
+ * Why claims are waiting in the inbox for a small model, or undefined when
18720
+ * the last drain did not hold any. The count is the inbox's own.
18721
+ */
18722
+ get waiting() {
18723
+ return this.#waiting;
18724
+ }
18725
+ #cancel() {
18726
+ if (this.#timer === null) return;
18727
+ this.#deps.clearTimer(this.#timer);
18728
+ this.#timer = null;
18729
+ }
18730
+ /** A turn appended to the inbox as it settled: arm the idle drain. */
18731
+ appended() {
18732
+ if (this.#disposed) return;
18733
+ this.#cancel();
18734
+ if (this.#turnRunning) {
18735
+ this.#deferred = true;
18736
+ return;
18737
+ }
18738
+ this.#armIdle();
18739
+ }
18740
+ #armIdle() {
18741
+ this.#cancel();
18742
+ this.#timer = this.#deps.setTimer(() => {
18743
+ this.#timer = null;
18744
+ if (this.#turnRunning) {
18745
+ this.#deferred = true;
18746
+ return;
18747
+ }
18748
+ if (this.#deps.isBusy?.() === true) {
18749
+ this.#deps.report?.("idle", "skipped");
18750
+ this.#armIdle();
18751
+ return;
18752
+ }
18753
+ void this.drain("idle");
18754
+ }, this.#deps.idleMs ?? CURATION_IDLE_MS);
18755
+ }
18756
+ /**
18757
+ * A turn is starting. Nothing is drained while it runs, so curation never
18758
+ * competes with a streaming reply or a running tool and the turn's first
18759
+ * request never waits for it. What was waiting drains after the turn
18760
+ * settles. A drain already in flight is neither waited for nor stopped: it
18761
+ * is one bounded side-model call (`CURATE_DEADLINE_MS`) that finishes by
18762
+ * itself, and stopping it would throw its work away. It starts no new one.
18763
+ */
18764
+ turnStarted() {
18765
+ if (this.#disposed) return;
18766
+ this.#turnRunning = true;
18767
+ this.#deferred = true;
18768
+ this.#cancel();
18769
+ }
18770
+ /** The turn settled: the quiet pause begins, and what waited drains at its end. */
18771
+ turnSettled() {
18772
+ if (this.#disposed || !this.#turnRunning) return;
18773
+ this.#turnRunning = false;
18774
+ if (!this.#deferred) return;
18775
+ this.#deferred = false;
18776
+ this.#armIdle();
18777
+ }
18778
+ /** The session opened. Drains now when a turn can carry the cost, else leaves it for the first turn. */
18779
+ start() {
18780
+ if (this.#disposed) return;
18781
+ void this.drain("start");
18782
+ }
18783
+ /** Drain for the last time. Nothing is armed afterwards. */
18784
+ async dispose() {
18785
+ if (this.#disposed) return;
18786
+ this.#disposed = true;
18787
+ this.#cancel();
18788
+ const closing = new AbortController();
18789
+ const timer = this.#deps.setTimer(
18790
+ () => closing.abort(new Error("Memory curation did not finish while closing.")),
18791
+ CURATION_DISPOSE_MS
18792
+ );
18793
+ try {
18794
+ await this.drain("dispose", closing.signal);
18795
+ } finally {
18796
+ this.#deps.clearTimer(timer);
18797
+ }
18798
+ }
18799
+ /** Empty the inbox once. Never rejects. */
18800
+ async drain(reason, signal) {
18801
+ const { inbox, curator } = this.#deps;
18802
+ if (this.#turnRunning && reason !== "dispose") {
18803
+ this.#deferred = true;
18804
+ this.#deps.report?.(reason, "skipped");
18805
+ return void 0;
18806
+ }
18807
+ const turn = this.#deps.turn();
18808
+ if (turn === void 0 && this.#deps.hasSideModel()) {
18809
+ this.#deps.report?.(reason, "skipped");
18810
+ return void 0;
18811
+ }
18812
+ this.#draining += 1;
18813
+ try {
18814
+ const lines = [];
18815
+ const result = await inbox.drain(async (entries) => {
18816
+ const out = await curator.curate(
18817
+ entries.map((entry) => entry.candidate),
18818
+ {
18819
+ // Without a side model nothing is charged, so these are never read.
18820
+ sessionId: turn?.sessionId ?? "",
18821
+ turnId: turn?.turnId ?? "",
18822
+ ...signal ? { signal } : {}
18823
+ }
18824
+ );
18825
+ if (out.waiting !== void 0) {
18826
+ this.#waiting = out.waiting;
18827
+ throw new InboxHold();
18828
+ }
18829
+ this.#waiting = void 0;
18830
+ lines.push(...out.lines);
18831
+ });
18832
+ if (result.held === void 0) this.#waiting = void 0;
18833
+ this.#deps.report?.(reason, result);
18834
+ if (lines.length > 0) this.#deps.onChange?.(lines);
18835
+ return result;
18836
+ } catch {
18837
+ this.#deps.report?.(reason, "failed");
18838
+ return void 0;
18839
+ } finally {
18840
+ this.#draining -= 1;
18841
+ }
18842
+ }
18843
+ };
18844
+ function createCurationLog(file) {
18845
+ let tail2;
18846
+ const write = /* @__PURE__ */ __name((entry) => {
18847
+ const line = `${JSON.stringify(entry)}
18848
+ `;
18849
+ tail2 ??= mkdir7(dirname6(file), { recursive: true, mode: 448 }).then(
18850
+ () => void 0,
18851
+ () => void 0
18852
+ );
18853
+ tail2 = tail2.then(() => appendFile4(file, line, { mode: 384 })).catch(() => {
18854
+ });
18855
+ }, "write");
18856
+ return Object.assign(write, { settled: /* @__PURE__ */ __name(() => tail2 ?? Promise.resolve(), "settled") });
18857
+ }
18858
+ __name(createCurationLog, "createCurationLog");
18859
+ function inboxPromotion(options) {
18860
+ return async (candidate) => {
18861
+ if (!holdsClaims2(candidate)) return;
18862
+ try {
18863
+ await options.inbox.append(candidate);
18864
+ } catch {
18865
+ await options.fallback(candidate);
18866
+ return;
18867
+ }
18868
+ options.appended();
18869
+ };
18870
+ }
18871
+ __name(inboxPromotion, "inboxPromotion");
18872
+ function offerTaskAsClaim(promote) {
18873
+ const offered = /* @__PURE__ */ new Set();
18874
+ return async (candidate) => {
18875
+ const task = candidate.task.trim();
18876
+ if (task === "" || offered.has(candidate.sessionId)) return promote(candidate);
18877
+ offered.add(candidate.sessionId);
18878
+ const withTask = {
18879
+ ...candidate,
18880
+ userRequirements: candidate.userRequirements.includes(task) ? candidate.userRequirements : [task, ...candidate.userRequirements]
18881
+ };
18882
+ return promote(withTask);
18883
+ };
18884
+ }
18885
+ __name(offerTaskAsClaim, "offerTaskAsClaim");
18886
+ function composeMemoryPromotion(options) {
18887
+ const { curation } = options;
18888
+ if (!curation) return options.gate(options.written);
18889
+ return offerTaskAsClaim(
18890
+ options.screen(
18891
+ options.gate(
18892
+ inboxPromotion({
18893
+ inbox: options.inbox,
18894
+ fallback: options.written,
18895
+ appended: /* @__PURE__ */ __name(() => curation.appended(), "appended")
18896
+ })
18897
+ )
18898
+ )
18899
+ );
18900
+ }
18901
+ __name(composeMemoryPromotion, "composeMemoryPromotion");
18902
+
18497
18903
  // src/memory/lifecycle.ts
18498
18904
  var SWEEP_IDLE_MS = 15e3;
18499
18905
  var SWEEP_MIN_GAP_MS = 6 * 36e5;
@@ -18665,7 +19071,7 @@ var MemoryLifecycle = class {
18665
19071
  };
18666
19072
 
18667
19073
  // src/memory/screen-archive.ts
18668
- import { access as access2, writeFile as writeFile5 } from "node:fs/promises";
19074
+ import { access as access3, writeFile as writeFile6 } from "node:fs/promises";
18669
19075
  import { join as join18 } from "node:path";
18670
19076
  var SCREEN_MARKER_FILE = ".derived-screen-v1";
18671
19077
  var HEADINGS = {
@@ -18728,7 +19134,7 @@ async function archiveUnscreenedRecords(options) {
18728
19134
  if (options.disabled) return { ran: false, archived: 0, skipped: 0 };
18729
19135
  const marker = join18(directory, SCREEN_MARKER_FILE);
18730
19136
  try {
18731
- if (await access2(marker).then(
19137
+ if (await access3(marker).then(
18732
19138
  () => true,
18733
19139
  () => false
18734
19140
  )) {
@@ -18755,7 +19161,7 @@ async function archiveUnscreenedRecords(options) {
18755
19161
  skipped += 1;
18756
19162
  }
18757
19163
  }
18758
- await writeFile5(marker, "", { flag: "w" });
19164
+ await writeFile6(marker, "", { flag: "w" });
18759
19165
  log.info("memory screen pass finished", {
18760
19166
  "namzu.memory.screen.archived_count": archived,
18761
19167
  "namzu.memory.screen.skipped_count": skipped
@@ -18908,12 +19314,12 @@ __name(memorySelectionOptions, "memorySelectionOptions");
18908
19314
 
18909
19315
  // src/memory/usage.ts
18910
19316
  import { randomUUID as randomUUID6 } from "node:crypto";
18911
- import { mkdir as mkdir8, readFile as readFile12, rename as rename5, rm as rm3, writeFile as writeFile6 } from "node:fs/promises";
19317
+ import { mkdir as mkdir8, readFile as readFile12, rename as rename5, rm as rm3, writeFile as writeFile7 } from "node:fs/promises";
18912
19318
  import { dirname as dirname7 } from "node:path";
18913
19319
  var VERSION = 1;
18914
19320
  var nodeUsageFs = {
18915
19321
  readFile: /* @__PURE__ */ __name((path) => readFile12(path, "utf8"), "readFile"),
18916
- writeFile: /* @__PURE__ */ __name((path, data) => writeFile6(path, data, { mode: 384 }), "writeFile"),
19322
+ writeFile: /* @__PURE__ */ __name((path, data) => writeFile7(path, data, { mode: 384 }), "writeFile"),
18917
19323
  rename: rename5,
18918
19324
  mkdir: /* @__PURE__ */ __name(async (path) => {
18919
19325
  await mkdir8(path, { recursive: true, mode: 448 });
@@ -19652,7 +20058,7 @@ function terminalProviderRetry(restartableOutput) {
19652
20058
  __name(terminalProviderRetry, "terminalProviderRetry");
19653
20059
 
19654
20060
  // src/reminders/index.ts
19655
- import { existsSync as existsSync5 } from "node:fs";
20061
+ import { existsSync as existsSync6 } from "node:fs";
19656
20062
 
19657
20063
  // src/reminders/changed-files.ts
19658
20064
  import { open as open5, stat as stat7 } from "node:fs/promises";
@@ -19930,9 +20336,9 @@ __name(environmentReminders, "environmentReminders");
19930
20336
 
19931
20337
  // src/reminders/hypermode.ts
19932
20338
  var HYPERMODE_REMINDER_EVERY = 10;
19933
- var FULL_WITH_TOOL = "Hypermode is on: optimize for the most exhaustive, correct answer, not the fastest or cheapest. Use the `workflow` tool on every substantive task; token cost is not a constraint. Pick from the quality patterns in the workflow guidance (adversarial verify, judge panel, loop until dry, completeness critic). Delegate only independent scopes that you will not read yourself; once a scope is delegated, do not do the same work yourself, wait for or use the result. Do not start a workflow that designs or reviews code this same turn is about to write, and do not start one with fewer than two independent units (work inline and say so). For a find-all or audit job, count the candidates per area first and size the split from the counts; have agents return structured records and merge them in code; fan out one cheap verifier per candidate when the answer lists items with evidence; return the full records, not excerpts. If a result arrives late, say in the answer what you applied and what you dropped. Solo only on conversational or trivial turns; on an unclear request, ask one question before a large fan-out. More agents are not a goal: stop a run with stop_task when its result can no longer change your answer.";
19934
- var FULL_WITHOUT_TOOL = "Hypermode is on: optimize for the most exhaustive, correct answer, not the fastest or cheapest. The `workflow` tool is not available in this run, so delegate every substantive task to parallel agents with the `Agent` tool and have their findings verified; token cost is not a constraint. Delegate only independent scopes that you will not read yourself; once a scope is delegated, do not do the same work yourself, wait for or use the result. If a result arrives late, say in the answer what you applied and what you dropped. Solo only on conversational or trivial turns; on an unclear request, ask one question before a large fan-out. More agents are not a goal: stop an agent with stop_task when its result can no longer change your answer.";
19935
- var SPARSE_WITH_TOOL = "Hypermode is still on: use the `workflow` tool for substantive work, on independent scopes only; never repeat delegated work yourself, and reconcile late results in the answer. More agents are not a goal: stop a run with stop_task when its result can no longer change your answer.";
20339
+ var FULL_WITH_TOOL = "Hypermode is on: optimize for the most exhaustive, correct answer, not the fastest or cheapest. Use the `workflow` tool on every substantive task; token cost is not a constraint. See the Hypermode section and the quality patterns in the workflow authoring guidance. Solo only on conversational or trivial turns. More agents are not a goal: stop a run with stop_task when its result can no longer change your answer.";
20340
+ var FULL_WITHOUT_TOOL = "Hypermode is on: optimize for the most exhaustive, correct answer, not the fastest or cheapest. The `workflow` tool is not available in this run, so delegate every substantive task to parallel agents with the `Agent` tool and have their findings verified; token cost is not a constraint. Delegate only independent scopes that you will not read yourself; once a scope is delegated, do not do the same work yourself, wait for or use the result. If a result arrives late, say in the answer what you applied and what you dropped. Solo only on conversational or trivial turns. More agents are not a goal: stop an agent with stop_task when its result can no longer change your answer.";
20341
+ var SPARSE_WITH_TOOL = "Hypermode is still on: use the `workflow` tool on every substantive task; see the Hypermode section of the workflow authoring guidance. More agents are not a goal: stop a run with stop_task when its result can no longer change your answer.";
19936
20342
  var SPARSE_WITHOUT_TOOL = "Hypermode is still on: delegate substantive work to parallel agents with the `Agent` tool, on independent scopes only; never repeat delegated work yourself, and reconcile late results in the answer. More agents are not a goal: stop an agent with stop_task when its result can no longer change your answer.";
19937
20343
  var EXIT = "Hypermode is off: the `workflow` tool's standard opt-in rule applies again.";
19938
20344
  function scan(messages) {
@@ -20569,7 +20975,7 @@ function createCliReminderSource(options) {
20569
20975
  messages,
20570
20976
  mode: options.mode(),
20571
20977
  planPath,
20572
- planExists: (options.planExists ?? existsSync5)(planPath),
20978
+ planExists: (options.planExists ?? existsSync6)(planPath),
20573
20979
  canAsk: options.canAsk === true
20574
20980
  })
20575
20981
  );
@@ -20754,7 +21160,7 @@ function skillHookEnv(skillRoot) {
20754
21160
  }
20755
21161
  __name(skillHookEnv, "skillHookEnv");
20756
21162
  function withSkillRoot(entry, skillRoot) {
20757
- if (entry.type === "http" || entry.type === "prompt") return entry;
21163
+ if (entry.type === "http" || entry.type === "prompt" || entry.type === "mcp_tool") return entry;
20758
21164
  const put = /* @__PURE__ */ __name((text2) => text2.split("${NAMZU_SKILL_ROOT}").join(skillRoot), "put");
20759
21165
  return {
20760
21166
  ...entry,
@@ -20767,6 +21173,7 @@ var MAX_NOTICE_CHARS = 600;
20767
21173
  function describeRuns(entry) {
20768
21174
  if (entry.type === "http") return `POST ${entry.url}`;
20769
21175
  if (entry.type === "prompt") return `ask: ${entry.prompt.replace(/\s+/g, " ").slice(0, 60)}`;
21176
+ if (entry.type === "mcp_tool") return `mcp: ${entry.server}/${entry.tool}`;
20770
21177
  return [entry.command, ...entry.args ?? []].join(" ");
20771
21178
  }
20772
21179
  __name(describeRuns, "describeRuns");
@@ -22948,7 +23355,7 @@ function eagerToolsWithDelegation(eager, delegationOffered) {
22948
23355
  }
22949
23356
  __name(eagerToolsWithDelegation, "eagerToolsWithDelegation");
22950
23357
  function delegationIsBusy(state) {
22951
- return state.hypermode || state.liveAgents > 0 || state.runningWorkflows > 0;
23358
+ return state.hypermode || state.keyword === true || state.liveAgents > 0 || state.runningWorkflows > 0;
22952
23359
  }
22953
23360
  __name(delegationIsBusy, "delegationIsBusy");
22954
23361
  function eagerToolsFor(opts) {
@@ -23053,13 +23460,13 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
23053
23460
  const modelEnvironment = readModelLaunchEnvironment();
23054
23461
  const toolLoadingDeferred = resolveToolLoading(options.toolLoading) === "deferred";
23055
23462
  if (options.palEnvironment) {
23056
- const { createPalAgentSession } = await import("./agent-session-KUU5HEMJ.js");
23463
+ const { createPalAgentSession } = await import("./agent-session-SNTV4WJB.js");
23057
23464
  return createPalAgentSession(prefs, detectedProviders, options);
23058
23465
  }
23059
23466
  let detected = detectedProviders;
23060
23467
  const { palAtWorkspace } = await startupTime(
23061
23468
  "session_build.pal_store",
23062
- () => import("./store-T7M3ICIS.js")
23469
+ () => import("./store-EQF6SI3V.js")
23063
23470
  );
23064
23471
  if (palAtWorkspace(options.cwd ?? process.cwd()))
23065
23472
  throw new Error("This Pal requires its owned virtual computer. Open it with namzu pal chat.");
@@ -23972,6 +24379,7 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
23972
24379
  const delegationScopes = /* @__PURE__ */ new Map();
23973
24380
  let latestTurn;
23974
24381
  const delegationLimits = /* @__PURE__ */ new Map();
24382
+ const delegationStartedAt = /* @__PURE__ */ new Map();
23975
24383
  const workflowTokenTargets = /* @__PURE__ */ new Map();
23976
24384
  const delegationModels = /* @__PURE__ */ new Map();
23977
24385
  const delegatedInputWaiters = /* @__PURE__ */ new Map();
@@ -24076,9 +24484,10 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
24076
24484
  );
24077
24485
  for (const problem of pluginFiles.problems) cliLogger().warn(problem);
24078
24486
  let subagentRuntime;
24079
- const teamsHost = options.teams && options.askUser ? createTeamsHost({
24487
+ const teamsHost = options.teams && (options.askUser || options.teams.unattended !== void 0) ? createTeamsHost({
24080
24488
  config: options.teams.config,
24081
- ...options.teams.env ? { env: options.teams.env } : {}
24489
+ ...options.teams.env ? { env: options.teams.env } : {},
24490
+ ...!options.askUser && options.teams.unattended ? { unattended: options.teams.unattended } : {}
24082
24491
  }) : void 0;
24083
24492
  let allowedAgentIds = [];
24084
24493
  const agentHooks = createAgentHooksHost({
@@ -24129,6 +24538,7 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
24129
24538
  },
24130
24539
  ...options.ephemeral ? { ephemeral: true } : {},
24131
24540
  ...teamsHost ? { teams: teamsHost } : {},
24541
+ ...teamsHost && !options.askUser && options.teams?.unattended ? { unattendedTeams: true } : {},
24132
24542
  // An operator is watching: agents run in the background by default and
24133
24543
  // the turn ends without waiting for them.
24134
24544
  ...options.askUser ? { backgroundByDefault: true } : {},
@@ -24150,8 +24560,10 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
24150
24560
  maxIterations: options.limits?.maxIterations,
24151
24561
  maxResponseTokens: options.limits?.maxResponseTokens,
24152
24562
  resolveLimits: /* @__PURE__ */ __name((turnId) => delegationLimits.get(turnId), "resolveLimits"),
24563
+ resolveTurnStartedAt: /* @__PURE__ */ __name((turnId) => delegationStartedAt.get(turnId), "resolveTurnStartedAt"),
24153
24564
  resolveTurnModel: /* @__PURE__ */ __name((turnId) => delegationModels.get(turnId), "resolveTurnModel"),
24154
24565
  timeoutMs: options.limits?.timeoutMs,
24566
+ ...options.saveGraceMs ? { saveGraceMs: options.saveGraceMs } : {},
24155
24567
  definitions: discovered.definitions,
24156
24568
  agentHooks,
24157
24569
  refusedDefinitions: discovered.refused,
@@ -24221,12 +24633,17 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
24221
24633
  }), "readEnvironment"),
24222
24634
  // Each child has its own provider instance, never the parent's fallback cursor.
24223
24635
  resolveModel: /* @__PURE__ */ __name(async (request, signal) => {
24224
- const resolution = await resolveModelSwitch(request, {
24225
- currentProvider: primary.id,
24226
- detected,
24227
- describeModels: describeProviderModels,
24228
- signal
24229
- });
24636
+ const refusal = options.helperProviders ? helperProviderRefusal(options.helperProviders, primary.id, request.provider) : void 0;
24637
+ if (refusal) throw new Error(refusal);
24638
+ const resolution = await resolveModelSwitch(
24639
+ options.helperProviders ? pinHelperProvider(request, primary.id) : request,
24640
+ {
24641
+ currentProvider: primary.id,
24642
+ detected,
24643
+ describeModels: describeProviderModels,
24644
+ signal
24645
+ }
24646
+ );
24230
24647
  if (resolution.kind === "rejected")
24231
24648
  throw new Error(`${resolution.reason} ${JSON.stringify(resolution.choices ?? [])}`);
24232
24649
  const selection = resolution.selection;
@@ -24399,6 +24816,7 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
24399
24816
  runTurnId,
24400
24817
  delegationLimits.get(originTurnId) ?? resolveTurnGuards(options.limits, void 0)
24401
24818
  );
24819
+ delegationStartedAt.set(runTurnId, delegationStartedAt.get(originTurnId) ?? Date.now());
24402
24820
  delegatedResumeHandlers.set(runTurnId, control.handler);
24403
24821
  delegatedReviewAllowedCalls.set(runTurnId, control.reviewAllowedCalls);
24404
24822
  delegatedModeControls.set(runTurnId, control);
@@ -24412,6 +24830,7 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
24412
24830
  liveModeControls.delete(control);
24413
24831
  delegationScopes.delete(runTurnId);
24414
24832
  delegationLimits.delete(runTurnId);
24833
+ delegationStartedAt.delete(runTurnId);
24415
24834
  delegatedResumeHandlers.delete(runTurnId);
24416
24835
  delegatedReviewAllowedCalls.delete(runTurnId);
24417
24836
  delegatedModeControls.delete(runTurnId);
@@ -24534,7 +24953,7 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
24534
24953
  if (request.type !== "user_question") return { action: "continue" };
24535
24954
  const ask = currentOnQuestion;
24536
24955
  if (!ask) return { action: "continue" };
24537
- const answer = await ask(request.question);
24956
+ const answer = await ask({ ...request.question, discussable: true });
24538
24957
  switch (answer.kind) {
24539
24958
  case "answer":
24540
24959
  return {
@@ -24552,6 +24971,13 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
24552
24971
  };
24553
24972
  case "abort":
24554
24973
  return { action: "abort", reason: "The user declined to answer." };
24974
+ case "discuss":
24975
+ return {
24976
+ action: "answer_question",
24977
+ selectedOptionIds: [],
24978
+ discuss: true,
24979
+ questionId: request.question.questionId
24980
+ };
24555
24981
  default:
24556
24982
  return { action: "continue" };
24557
24983
  }
@@ -24647,7 +25073,7 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
24647
25073
  );
24648
25074
  toolsets.push(options.toolLoading === "eager" ? settingsToolset : deferred(settingsToolset));
24649
25075
  }
24650
- const operatorPals = await import("./operator-tools-LHXXEP4G.js");
25076
+ const operatorPals = await import("./operator-tools-LLMFGJWF.js");
24651
25077
  toolsets.push(
24652
25078
  readyWhen(
24653
25079
  toolset(
@@ -24834,7 +25260,11 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
24834
25260
  maxTokens: 300,
24835
25261
  signal: request.signal,
24836
25262
  timing: "beside-turn"
24837
- }), "judge")
25263
+ }), "judge"),
25264
+ // An `mcp_tool` hook calls a tool on one of this session's own
25265
+ // servers; the server's allow and deny lists still decide what
25266
+ // may be called, and a server that asks for approval is not called.
25267
+ mcpToolCall: /* @__PURE__ */ __name((request) => mcp.callTool(request.server, request.tool, { ...request.arguments }, request.signal), "mcpToolCall")
24838
25268
  },
24839
25269
  {
24840
25270
  // The same switch plugin entries obey; none of the hooks attach under it.
@@ -25323,6 +25753,7 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
25323
25753
  curation?.turnStarted();
25324
25754
  memoryLifecycle.turnStarted();
25325
25755
  delegationLimits.set(entry2.turnId, resumedLimits);
25756
+ delegationStartedAt.set(entry2.turnId, Date.now());
25326
25757
  if (route && pinned)
25327
25758
  delegationModels.set(entry2.turnId, {
25328
25759
  provider: pinned.provider,
@@ -25465,6 +25896,7 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
25465
25896
  delegatedModeControls.delete(entry2.turnId);
25466
25897
  delegationScopes.delete(entry2.turnId);
25467
25898
  delegationLimits.delete(entry2.turnId);
25899
+ delegationStartedAt.delete(entry2.turnId);
25468
25900
  delegationModels.delete(entry2.turnId);
25469
25901
  await subagentRuntime?.releaseTurn(entry2.turnId);
25470
25902
  }
@@ -25933,6 +26365,12 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
25933
26365
  progressNotices: /* @__PURE__ */ __name(() => progressNotices.look({ ...outstandingFacts(scope2.sessionId), now: Date.now() }), "progressNotices"),
25934
26366
  ...sideModel ? { sideModel } : {},
25935
26367
  ...curation ? {
26368
+ memoryWaiting: /* @__PURE__ */ __name(async () => {
26369
+ const reason = curation.waiting;
26370
+ if (reason === void 0) return void 0;
26371
+ const count2 = (await memoryInbox.pending()).length;
26372
+ return count2 > 0 ? { count: count2, reason } : void 0;
26373
+ }, "memoryWaiting"),
25936
26374
  memoryCuration: {
25937
26375
  subscribe: /* @__PURE__ */ __name((listener) => {
25938
26376
  curationListeners.add(listener);
@@ -25990,6 +26428,7 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
25990
26428
  curation?.turnStarted();
25991
26429
  memoryLifecycle.turnStarted();
25992
26430
  delegationLimits.set(turnId, resolveTurnGuards(options.limits, opts?.limits));
26431
+ delegationStartedAt.set(turnId, Date.now());
25993
26432
  delegatedResumeHandlers.set(turnId, control.handler);
25994
26433
  delegatedReviewAllowedCalls.set(turnId, control.reviewAllowedCalls);
25995
26434
  delegatedModeControls.set(turnId, control);
@@ -26001,6 +26440,7 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
26001
26440
  liveModeControls.delete(control);
26002
26441
  delegationScopes.delete(turnId);
26003
26442
  delegationLimits.delete(turnId);
26443
+ delegationStartedAt.delete(turnId);
26004
26444
  delegatedResumeHandlers.delete(turnId);
26005
26445
  delegatedReviewAllowedCalls.delete(turnId);
26006
26446
  delegatedModeControls.delete(turnId);
@@ -26285,6 +26725,7 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
26285
26725
  let runManager = manager;
26286
26726
  const delegationBusy = delegationIsBusy({
26287
26727
  hypermode: opts?.hypermode === true,
26728
+ keyword: opts?.workflow === true || opts?.workflowGuidance === true,
26288
26729
  liveAgents: subagentRuntime?.liveChildSessionIds().size ?? 0,
26289
26730
  // Owners are read against every run (ownedBy forgets a run the
26290
26731
  // registry no longer holds), then narrowed to the ones still running.
@@ -27949,6 +28390,7 @@ function toAgentEvent(event, presenter, readsOnly, cwd) {
27949
28390
  ...tidy?.shell ? { shell: tidy.shell } : {},
27950
28391
  ...event.isError && (unknownTool !== void 0 || event.facts?.kind === "failure" && event.facts.reason === "unknown_tool") ? { unknownTool: true } : {},
27951
28392
  ...event.durationMs !== void 0 ? { durationMs: event.durationMs } : {},
28393
+ ...event.facts?.kind === "questions" ? { questions: event.facts } : {},
27952
28394
  ...view.kind === "generic" && view.visibility === "hidden" ? { hidden: true } : {},
27953
28395
  ...event.isError && view.kind === "generic" && view.outcome === "cancelled" ? { cancelled: true } : {},
27954
28396
  ...view.kind === "generic" && view.declined ? { declined: view.declined } : {},
@@ -28521,6 +28963,7 @@ export {
28521
28963
  renderNoteNotSaved,
28522
28964
  renderTypedNoteResult,
28523
28965
  renderStoredMemorySection,
28966
+ renderWaitingClaims,
28524
28967
  loadManagedMemories,
28525
28968
  originLabel,
28526
28969
  ageLabel,
@@ -28601,4 +29044,4 @@ export {
28601
29044
  pathSummary,
28602
29045
  computerUseStartState
28603
29046
  };
28604
- //# sourceMappingURL=chunk-JCXGOCDK.js.map
29047
+ //# sourceMappingURL=chunk-R3P3IGP2.js.map