@namzu/cli 62.1.0 → 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 (687) hide show
  1. package/CHANGELOG.md +83 -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-6CGBHCQA.js → acp-5UY6W7DP.js} +111 -103
  6. package/dist/chunks/acp-5UY6W7DP.js.map +6 -0
  7. package/dist/chunks/{activity-command-LBFSBUTO.js → activity-command-LKFDX4Y3.js} +16 -15
  8. package/dist/chunks/activity-command-LKFDX4Y3.js.map +6 -0
  9. package/dist/chunks/{add-QKYYI3YT.js → add-RNTXN545.js} +70 -39
  10. package/dist/chunks/add-RNTXN545.js.map +6 -0
  11. package/dist/chunks/{agent-JIYXK5JR.js → agent-RVTT22XL.js} +65 -63
  12. package/dist/chunks/agent-session-SNTV4WJB.js +105 -0
  13. package/dist/chunks/{apply-at-exit-7RHQBQPY.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-J4ZUAJ2G.js → archive-SUVDTGMZ.js} +14 -13
  16. package/dist/chunks/archive-SUVDTGMZ.js.map +6 -0
  17. package/dist/chunks/{auth-UJVEA47C.js → auth-UDHGYPMT.js} +15 -14
  18. package/dist/chunks/auth-UDHGYPMT.js.map +6 -0
  19. package/dist/chunks/{bin-main-ZH7BZUOM.js → bin-main-3IIARSC5.js} +11 -10
  20. package/dist/chunks/bin-main-3IIARSC5.js.map +6 -0
  21. package/dist/chunks/{binding-3PCEKVOO.js → binding-AVL54CBF.js} +3 -3
  22. package/dist/chunks/{browser-A67ROZXW.js → browser-AYBO33ZR.js} +7 -7
  23. package/dist/chunks/{chat-UU23NM3Q.js → chat-A7OAT7GU.js} +19 -18
  24. package/dist/chunks/chat-A7OAT7GU.js.map +6 -0
  25. package/dist/chunks/{chunk-5HRR6OQX.js → chunk-3F5YRA4T.js} +8 -7
  26. package/dist/chunks/chunk-3F5YRA4T.js.map +6 -0
  27. package/dist/chunks/{chunk-73QLEKJH.js → chunk-3GGLAPPV.js} +6 -6
  28. package/dist/chunks/{chunk-XGEW2R3P.js → chunk-3GVS745R.js} +2 -2
  29. package/dist/chunks/{chunk-H3763MSH.js → chunk-3HHWM67Q.js} +3 -3
  30. package/dist/chunks/{chunk-ODPKECHM.js → chunk-3HUEBQAN.js} +4 -4
  31. package/dist/chunks/{chunk-TIXLIDHF.js → chunk-3TURVGJT.js} +2 -2
  32. package/dist/chunks/{chunk-VPWFFR5J.js → chunk-43NXEWX4.js} +2 -2
  33. package/dist/chunks/{chunk-T7LGBJ3Y.js → chunk-47SP3GJ4.js} +2 -2
  34. package/dist/chunks/{chunk-UP77FF2W.js → chunk-4EDVII4B.js} +3 -3
  35. package/dist/chunks/{chunk-PH2VOYXI.js → chunk-4IBNEQPZ.js} +9 -9
  36. package/dist/chunks/{chunk-ONKMPBPP.js → chunk-4LMAEQ42.js} +2 -2
  37. package/dist/chunks/{chunk-JBZ4QYXQ.js → chunk-53JCP2MA.js} +3 -3
  38. package/dist/chunks/{chunk-JBZ4QYXQ.js.map → chunk-53JCP2MA.js.map} +1 -1
  39. package/dist/chunks/{chunk-33U2WYBU.js → chunk-563QO54Z.js} +2355 -1880
  40. package/dist/chunks/chunk-563QO54Z.js.map +6 -0
  41. package/dist/chunks/{chunk-4EL7KEYZ.js → chunk-5BDR52OS.js} +3 -3
  42. package/dist/chunks/{chunk-4LHHK42J.js → chunk-5N55CGZG.js} +2 -2
  43. package/dist/chunks/{chunk-KK6CWJFZ.js → chunk-5QUYAINU.js} +5 -4
  44. package/dist/chunks/chunk-5QUYAINU.js.map +6 -0
  45. package/dist/chunks/chunk-5VW3COA7.js +31 -0
  46. package/dist/chunks/chunk-5VW3COA7.js.map +6 -0
  47. package/dist/chunks/{chunk-OT6WAUFD.js → chunk-657OVGTQ.js} +8 -8
  48. package/dist/chunks/{chunk-JWZLFRII.js → chunk-66ZJ7T5L.js} +2 -2
  49. package/dist/chunks/{chunk-L4QIJVNX.js → chunk-6PHA4NAI.js} +4 -4
  50. package/dist/chunks/{chunk-25VC6FKF.js → chunk-6TTWYQB6.js} +3 -3
  51. package/dist/chunks/{chunk-LPYA4GW7.js → chunk-753XP2BL.js} +97 -31
  52. package/dist/chunks/chunk-753XP2BL.js.map +6 -0
  53. package/dist/chunks/{chunk-TQGVEISD.js → chunk-75YGSZN7.js} +2 -2
  54. package/dist/chunks/{chunk-OICFYPUQ.js → chunk-7ADQK225.js} +48 -48
  55. package/dist/chunks/{chunk-46VWCTBU.js → chunk-7CWYOHH6.js} +3 -3
  56. package/dist/chunks/{chunk-VQN7GC3B.js → chunk-7NXIEDP2.js} +12 -12
  57. package/dist/chunks/{chunk-N7BCFEJJ.js → chunk-7SMNXLWZ.js} +2 -2
  58. package/dist/chunks/{chunk-MNSSDI5Y.js → chunk-7WXVKMYK.js} +3 -3
  59. package/dist/chunks/{chunk-FSY26KLI.js → chunk-A54JD4WN.js} +3 -3
  60. package/dist/chunks/{chunk-YFIKYLOB.js → chunk-A64DKLIG.js} +15 -11
  61. package/dist/chunks/{chunk-YFIKYLOB.js.map → chunk-A64DKLIG.js.map} +1 -1
  62. package/dist/chunks/{chunk-G3R447P4.js → chunk-AHGZMLSO.js} +4 -4
  63. package/dist/chunks/{chunk-3T2SSK3Z.js → chunk-BA2RCXPX.js} +4 -4
  64. package/dist/chunks/{chunk-J3BP3W2N.js → chunk-BEXWYA6H.js} +2 -2
  65. package/dist/chunks/{chunk-IX4KSPGQ.js → chunk-BM2BFZF4.js} +5 -5
  66. package/dist/chunks/{chunk-LUH7N5AG.js → chunk-C2YEOD55.js} +7 -4
  67. package/dist/chunks/chunk-C2YEOD55.js.map +6 -0
  68. package/dist/chunks/{chunk-P72VIXPI.js → chunk-CHH5AZNT.js} +2 -2
  69. package/dist/chunks/{chunk-SOFHWWJH.js → chunk-CPTB7QDI.js} +2 -2
  70. package/dist/chunks/{chunk-E6BMB5D4.js → chunk-CQTOBLCN.js} +3 -3
  71. package/dist/chunks/{chunk-MAFRPAQY.js → chunk-CROAHDJY.js} +12 -11
  72. package/dist/chunks/chunk-CROAHDJY.js.map +6 -0
  73. package/dist/chunks/{chunk-3LZDJBR4.js → chunk-DO3GU4FK.js} +3 -3
  74. package/dist/chunks/{chunk-7AZTWFS7.js → chunk-DOIULYV5.js} +138 -62
  75. package/dist/chunks/chunk-DOIULYV5.js.map +6 -0
  76. package/dist/chunks/{chunk-Q4LY4V73.js → chunk-DQ4MBWB3.js} +7 -7
  77. package/dist/chunks/{chunk-AHFKN3F5.js → chunk-EG4HMJEH.js} +2 -2
  78. package/dist/chunks/{chunk-S3MI73RJ.js → chunk-EKSS7K4J.js} +3 -3
  79. package/dist/chunks/{chunk-ST23JVRU.js → chunk-EOUCWHCH.js} +6 -5
  80. package/dist/chunks/{chunk-EE4ROHCL.js → chunk-ERVENGWO.js} +5 -5
  81. package/dist/chunks/{chunk-LWBPCNGV.js → chunk-ESWXVRT2.js} +2 -2
  82. package/dist/chunks/{chunk-QK3MI3SB.js → chunk-EUUBG4H4.js} +39 -28
  83. package/dist/chunks/{chunk-QK3MI3SB.js.map → chunk-EUUBG4H4.js.map} +1 -1
  84. package/dist/chunks/{chunk-LO7LBC5T.js → chunk-F2RV4OA4.js} +2 -2
  85. package/dist/chunks/{chunk-S4O2YFPC.js → chunk-F73RCHO5.js} +13 -13
  86. package/dist/chunks/{chunk-WSPWJYLQ.js → chunk-F7JILDDN.js} +3 -3
  87. package/dist/chunks/{chunk-ZACF6CVM.js → chunk-FTGVYRYH.js} +3 -3
  88. package/dist/chunks/{chunk-MZWFJMIM.js → chunk-GDD3DEG5.js} +9 -10
  89. package/dist/chunks/chunk-GDD3DEG5.js.map +6 -0
  90. package/dist/chunks/{chunk-6RDYLP52.js → chunk-GEIXXTUE.js} +2 -2
  91. package/dist/chunks/{chunk-OFUZHNUY.js → chunk-GH7JRINW.js} +5 -5
  92. package/dist/chunks/{chunk-MYSCS3LD.js → chunk-GRA35IM2.js} +2 -2
  93. package/dist/chunks/{chunk-PPXMVZZM.js → chunk-GSR55RZE.js} +7 -4
  94. package/dist/chunks/chunk-GSR55RZE.js.map +6 -0
  95. package/dist/chunks/chunk-H4TBL7OK.js +19 -0
  96. package/dist/chunks/chunk-H4TBL7OK.js.map +6 -0
  97. package/dist/chunks/{chunk-7BZZGFKW.js → chunk-HBA5EVRI.js} +4 -4
  98. package/dist/chunks/{chunk-VISMRN4J.js → chunk-HFV342VZ.js} +4 -4
  99. package/dist/chunks/{chunk-H2FQ4QLS.js → chunk-HKZWHWOH.js} +6 -6
  100. package/dist/chunks/{chunk-7ENFV3XO.js → chunk-HOXYIKMC.js} +2 -2
  101. package/dist/chunks/{chunk-K3PXRK3Z.js → chunk-IBCCCCIV.js} +11 -9
  102. package/dist/chunks/chunk-IBCCCCIV.js.map +6 -0
  103. package/dist/chunks/{chunk-MGU27EKU.js → chunk-IHER3BWG.js} +2 -2
  104. package/dist/chunks/{chunk-NE2J7UOC.js → chunk-IIIAY4M2.js} +2 -2
  105. package/dist/chunks/{chunk-35JUKJRN.js → chunk-IL54Z65P.js} +6 -4
  106. package/dist/chunks/chunk-IL54Z65P.js.map +6 -0
  107. package/dist/chunks/{chunk-47HEFQUP.js → chunk-IOAXQS7P.js} +2 -2
  108. package/dist/chunks/{chunk-5CS5WG6N.js → chunk-IPTMKDPN.js} +21 -21
  109. package/dist/chunks/{chunk-LYTU6DQ7.js → chunk-J3F7WCZ3.js} +2 -2
  110. package/dist/chunks/{chunk-AV3WM4TM.js → chunk-JEQ3CPTD.js} +9 -8
  111. package/dist/chunks/chunk-JEQ3CPTD.js.map +6 -0
  112. package/dist/chunks/{chunk-FHR5FWGS.js → chunk-JERXIPYY.js} +8 -6
  113. package/dist/chunks/chunk-JERXIPYY.js.map +6 -0
  114. package/dist/chunks/{chunk-RAD42QX6.js → chunk-JJ2SALR4.js} +2 -2
  115. package/dist/chunks/{chunk-P65AXQPL.js → chunk-JNPVJV3O.js} +2 -2
  116. package/dist/chunks/{chunk-SOUXHV54.js → chunk-JSUYTWJF.js} +2 -2
  117. package/dist/chunks/{chunk-J6XAYUON.js → chunk-JVNRECP6.js} +3 -3
  118. package/dist/chunks/{chunk-AD7Z5UEB.js → chunk-KJ2EUIHQ.js} +3 -3
  119. package/dist/chunks/{chunk-MN7H3I6K.js → chunk-KOULA2IJ.js} +2 -2
  120. package/dist/chunks/{chunk-E2LKNISN.js → chunk-L36PRWOF.js} +3 -3
  121. package/dist/chunks/{chunk-SVQV6RXR.js → chunk-L5CQ7VIP.js} +3 -3
  122. package/dist/chunks/{chunk-XVKQQTVV.js → chunk-LLEAN4PC.js} +2 -2
  123. package/dist/chunks/{chunk-K6M4OTHF.js → chunk-LVXE26A7.js} +3 -3
  124. package/dist/chunks/{chunk-7ZEX6QP7.js → chunk-LWWG6H7T.js} +3 -3
  125. package/dist/chunks/{chunk-LIX2TWWW.js → chunk-MBHWHIID.js} +78 -38
  126. package/dist/chunks/chunk-MBHWHIID.js.map +6 -0
  127. package/dist/chunks/{chunk-3NF6AVW4.js → chunk-MRDJXO22.js} +5 -2
  128. package/dist/chunks/chunk-MRDJXO22.js.map +6 -0
  129. package/dist/chunks/{chunk-NEAH7HVP.js → chunk-NBAKCWV3.js} +5 -5
  130. package/dist/chunks/{chunk-DHRN4HVT.js → chunk-NBS2755S.js} +6 -6
  131. package/dist/chunks/{chunk-UI7QTTM2.js → chunk-NJJ2N524.js} +6 -6
  132. package/dist/chunks/{chunk-2AMVNSDK.js → chunk-NK3MIAYC.js} +4 -4
  133. package/dist/chunks/{chunk-DOENBH7Q.js → chunk-NNWLIZFE.js} +3 -2
  134. package/dist/chunks/chunk-NNWLIZFE.js.map +6 -0
  135. package/dist/chunks/{chunk-BXO7FXUF.js → chunk-NUJZCC2Z.js} +10 -3
  136. package/dist/chunks/{chunk-BXO7FXUF.js.map → chunk-NUJZCC2Z.js.map} +1 -1
  137. package/dist/chunks/{chunk-PJ6IEIKJ.js → chunk-NUSWQJLL.js} +15 -6
  138. package/dist/chunks/chunk-NUSWQJLL.js.map +6 -0
  139. package/dist/chunks/{chunk-KID2I7VD.js → chunk-O7VPHSES.js} +2 -2
  140. package/dist/chunks/{chunk-PR3MVT6X.js → chunk-OBBMS3N6.js} +6 -6
  141. package/dist/chunks/{chunk-WSB2MCTI.js → chunk-OBK74OZW.js} +2 -2
  142. package/dist/chunks/{chunk-Y24UJ26G.js → chunk-OCJ2WBZ4.js} +3 -3
  143. package/dist/chunks/{chunk-KXGVJ55A.js → chunk-OCYOGXXP.js} +5 -5
  144. package/dist/chunks/{chunk-SUR4OMA6.js → chunk-OOOCVY35.js} +16 -11
  145. package/dist/chunks/chunk-OOOCVY35.js.map +6 -0
  146. package/dist/chunks/{chunk-RF6XIV7O.js → chunk-OUQUYAI2.js} +5 -5
  147. package/dist/chunks/{chunk-KKFKXDT4.js → chunk-OUTD6IWW.js} +3 -3
  148. package/dist/chunks/{chunk-YXQG466V.js → chunk-P4BEZ7QW.js} +3 -3
  149. package/dist/chunks/{chunk-GQU2MHNZ.js → chunk-PBHPPUUI.js} +6 -6
  150. package/dist/chunks/{chunk-OTVNG2RH.js → chunk-PL5IX645.js} +249 -32
  151. package/dist/chunks/chunk-PL5IX645.js.map +6 -0
  152. package/dist/chunks/{chunk-J35W6BKJ.js → chunk-PQI2WTH5.js} +2 -2
  153. package/dist/chunks/{chunk-IWPDMUHJ.js → chunk-PYXKPC7C.js} +2 -2
  154. package/dist/chunks/{chunk-EV7PYTOP.js → chunk-QZTC5Q7S.js} +2 -2
  155. package/dist/chunks/{chunk-O4WK5FUN.js → chunk-R3P3IGP2.js} +738 -323
  156. package/dist/chunks/chunk-R3P3IGP2.js.map +6 -0
  157. package/dist/chunks/{chunk-CNTMRBQT.js → chunk-R63TUS2G.js} +6 -3
  158. package/dist/chunks/chunk-R63TUS2G.js.map +6 -0
  159. package/dist/chunks/{chunk-72VCA33E.js → chunk-RECTI7QY.js} +2 -2
  160. package/dist/chunks/chunk-RNOCPBLC.js +24 -0
  161. package/dist/chunks/chunk-RNOCPBLC.js.map +6 -0
  162. package/dist/chunks/{chunk-M3Z7V3DJ.js → chunk-RUGV5FZY.js} +57 -30
  163. package/dist/chunks/{chunk-M3Z7V3DJ.js.map → chunk-RUGV5FZY.js.map} +1 -1
  164. package/dist/chunks/{chunk-7WU6QNGO.js → chunk-RVC77FRV.js} +2 -2
  165. package/dist/chunks/{chunk-UOX7WH3J.js → chunk-SCDI2SR6.js} +3 -3
  166. package/dist/chunks/{chunk-ON7XQGDA.js → chunk-SE5YB5OI.js} +9 -6
  167. package/dist/chunks/chunk-SE5YB5OI.js.map +6 -0
  168. package/dist/chunks/{chunk-CN4W3FVM.js → chunk-TPFYLED7.js} +5 -5
  169. package/dist/chunks/{chunk-224LDNU5.js → chunk-UAF72QNW.js} +3 -3
  170. package/dist/chunks/{chunk-LJWCYIQV.js → chunk-UEHFBJEE.js} +7 -7
  171. package/dist/chunks/chunk-UH33ZMUF.js +45 -0
  172. package/dist/chunks/chunk-UH33ZMUF.js.map +6 -0
  173. package/dist/chunks/{chunk-3L5ICOUV.js → chunk-UKWCQVKF.js} +3 -3
  174. package/dist/chunks/{chunk-QH55BL6G.js → chunk-UZLUUHOZ.js} +3 -3
  175. package/dist/chunks/{chunk-3FYZVHC5.js → chunk-V4FAKLV3.js} +6 -6
  176. package/dist/chunks/{chunk-ENKSNZTO.js → chunk-V6SFWKAD.js} +2 -2
  177. package/dist/chunks/{chunk-FPKL3N3J.js → chunk-VAIQQX7N.js} +3 -3
  178. package/dist/chunks/{chunk-Q3ZCXNLT.js → chunk-VAZ2M63R.js} +5 -5
  179. package/dist/chunks/{chunk-C56SXFLU.js → chunk-VBWNQCWH.js} +10 -10
  180. package/dist/chunks/{chunk-SRY4THD4.js → chunk-VH7IAD76.js} +9 -9
  181. package/dist/chunks/{chunk-DCNCIL5A.js → chunk-VIV4RAVR.js} +4 -4
  182. package/dist/chunks/{chunk-6MT5PLKV.js → chunk-VSYNI2G3.js} +3 -3
  183. package/dist/chunks/{chunk-S5XNNB36.js → chunk-VU6GSZ7Z.js} +1726 -841
  184. package/dist/chunks/chunk-VU6GSZ7Z.js.map +6 -0
  185. package/dist/chunks/{chunk-KCEVJCGE.js → chunk-VZU6C7BV.js} +41 -167
  186. package/dist/chunks/chunk-VZU6C7BV.js.map +6 -0
  187. package/dist/chunks/{chunk-NGGXYIAN.js → chunk-W63W23XF.js} +8 -5
  188. package/dist/chunks/chunk-W63W23XF.js.map +6 -0
  189. package/dist/chunks/{chunk-TJVM2KTD.js → chunk-WLKRDSHZ.js} +52 -14
  190. package/dist/chunks/chunk-WLKRDSHZ.js.map +6 -0
  191. package/dist/chunks/{chunk-XXXJOYTQ.js → chunk-WNONDNGT.js} +2 -2
  192. package/dist/chunks/{chunk-RLT3CQPF.js → chunk-WSH45EZX.js} +4 -4
  193. package/dist/chunks/{chunk-T7WRPQ65.js → chunk-XMNW2HXH.js} +2 -2
  194. package/dist/chunks/{chunk-SIJ5UTXM.js → chunk-XR6IVMWO.js} +3 -3
  195. package/dist/chunks/{chunk-37ZR2RAN.js → chunk-XU5FZM42.js} +8 -8
  196. package/dist/chunks/{chunk-UM3XWJVJ.js → chunk-XUWIPS3I.js} +2 -2
  197. package/dist/chunks/{chunk-GPYNBNZV.js → chunk-YVTWQWWO.js} +3 -3
  198. package/dist/chunks/{chunk-W7XW3NXA.js → chunk-ZG4VG2VM.js} +4 -4
  199. package/dist/chunks/{chunk-QS3W6PHW.js → chunk-ZHYHS7RM.js} +24 -9
  200. package/dist/chunks/{chunk-QS3W6PHW.js.map → chunk-ZHYHS7RM.js.map} +1 -1
  201. package/dist/chunks/{chunk-7TDOAGVX.js → chunk-ZKNCORQE.js} +105 -105
  202. package/dist/chunks/{chunk-7TDOAGVX.js.map → chunk-ZKNCORQE.js.map} +1 -1
  203. package/dist/chunks/{chunk-SJIDADHD.js → chunk-ZMOQMEJG.js} +8 -8
  204. package/dist/chunks/{chunk-LAU4ESKV.js → chunk-ZMOVFV2S.js} +4 -4
  205. package/dist/chunks/{chunk-7P4QN2RO.js → chunk-ZNEBRE4R.js} +4 -4
  206. package/dist/chunks/{chunk-NV3AX3OX.js → chunk-ZVEFONXX.js} +40 -36
  207. package/dist/chunks/chunk-ZVEFONXX.js.map +6 -0
  208. package/dist/chunks/{chunk-6W6ILBXE.js → chunk-ZWTW3MCF.js} +6 -6
  209. package/dist/chunks/{cli-runtime-RAHU2FF7.js → cli-runtime-RPIDV2T2.js} +26 -25
  210. package/dist/chunks/cli-runtime-RPIDV2T2.js.map +6 -0
  211. package/dist/chunks/{commands-252QNZKK.js → commands-6AI3A4MU.js} +6 -6
  212. package/dist/chunks/{computer-AWBPOB3P.js → computer-GABH2PJF.js} +8 -2
  213. package/dist/chunks/computer-GABH2PJF.js.map +6 -0
  214. package/dist/chunks/{config-CX6PRTEY.js → config-RG4QEUWC.js} +16 -15
  215. package/dist/chunks/config-RG4QEUWC.js.map +6 -0
  216. package/dist/chunks/{cost-L3RROPK6.js → cost-XQXENUFJ.js} +6 -5
  217. package/dist/chunks/{crash-report-NND4WWJA.js → crash-report-UMVAQVML.js} +6 -6
  218. package/dist/chunks/{debug-KE3MFMW5.js → debug-DX3SZNDB.js} +3 -2
  219. package/dist/chunks/debug-DX3SZNDB.js.map +6 -0
  220. package/dist/chunks/{desktop-host-schedule-tool-IKWEHI4H.js → desktop-host-schedule-tool-ETKLWMES.js} +37 -36
  221. package/dist/chunks/desktop-host-schedule-tool-ETKLWMES.js.map +6 -0
  222. package/dist/chunks/{devtools-V6SF7RES.js → devtools-4ANMDCAD.js} +2 -2
  223. package/dist/chunks/{dist-YXOQEPCZ.js → dist-47PEKUSC.js} +3 -3
  224. package/dist/chunks/{dist-MFWZVDSA.js → dist-52RJSSLN.js} +2 -2
  225. package/dist/chunks/{dist-7TMA3NQ7.js → dist-6R46NFFA.js} +2 -2
  226. package/dist/chunks/{dist-TH2HM2GH.js → dist-CSDSHVMB.js} +2 -2
  227. package/dist/chunks/{dist-3DMPFVGW.js → dist-KP4M7FMR.js} +4 -4
  228. package/dist/chunks/{dist-DFKDXC5Q.js → dist-NWF4I73Q.js} +2 -2
  229. package/dist/chunks/{dist-2MHNJVOM.js → dist-S5TPXI7T.js} +24 -2
  230. package/dist/chunks/{dist-UAUXP4UC.js → dist-X46OQA2D.js} +2 -2
  231. package/dist/chunks/doctor-BNC2BDUE.js +103 -0
  232. package/dist/chunks/{drain-LUUO4FI3.js → drain-XAV6YJMP.js} +24 -23
  233. package/dist/chunks/drain-XAV6YJMP.js.map +6 -0
  234. package/dist/chunks/{entry-XPFYPIDS.js → entry-MV2FROEW.js} +7 -7
  235. package/dist/chunks/{eval-V4HUXXC2.js → eval-S3CYPO3Q.js} +13 -12
  236. package/dist/chunks/eval-S3CYPO3Q.js.map +6 -0
  237. package/dist/chunks/{exec-QYZKP6RS.js → exec-IPMED3LW.js} +91 -99
  238. package/dist/chunks/exec-IPMED3LW.js.map +6 -0
  239. package/dist/chunks/{extension-AVJ2LV2G.js → extension-7A2DOXFH.js} +5 -5
  240. package/dist/chunks/{feed-UKN7XNCC.js → feed-TCK7FRZT.js} +6 -6
  241. package/dist/chunks/{home-A7434CUG.js → home-5DEGDKXE.js} +3 -3
  242. package/dist/chunks/{homes-U4IALPDB.js → homes-JINW3ER5.js} +6 -6
  243. package/dist/chunks/{hooks-TQ7KEIX5.js → hooks-TLD27EOH.js} +26 -25
  244. package/dist/chunks/hooks-TLD27EOH.js.map +6 -0
  245. package/dist/chunks/{hooks-report-R6KBKZOI.js → hooks-report-QGXYZRZ7.js} +22 -21
  246. package/dist/chunks/{host-S2OSQNIF.js → host-GXJ46HB3.js} +16 -15
  247. package/dist/chunks/host-queries-V4JMMMMA.js +41 -0
  248. package/dist/chunks/{installed-list-VGP7FMFB.js → installed-list-D55C5TLT.js} +4 -4
  249. package/dist/chunks/{launch-LWAQXYIA.js → launch-QCCCQPOH.js} +31 -30
  250. package/dist/chunks/launch-QCCCQPOH.js.map +6 -0
  251. package/dist/chunks/{learn-GIKQBJN5.js → learn-OQZQEZ3R.js} +19 -18
  252. package/dist/chunks/learn-OQZQEZ3R.js.map +6 -0
  253. package/dist/chunks/{learn-builtin-HOFMWHQP.js → learn-builtin-SD4XQYI3.js} +22 -21
  254. package/dist/chunks/learn-builtin-SD4XQYI3.js.map +6 -0
  255. package/dist/chunks/{lifecycle-4OBW7B42.js → lifecycle-JPDGDRYE.js} +45 -42
  256. package/dist/chunks/{list-O2I3ECME.js → list-GPE5NJKI.js} +23 -22
  257. package/dist/chunks/live-SPWADZ36.js +102 -0
  258. package/dist/chunks/{load-LHCKRZFB.js → load-2YNIEXSX.js} +13 -12
  259. package/dist/chunks/{logs-UMD7HBUO.js → logs-CEPX5RE5.js} +5 -5
  260. package/dist/chunks/{mcp-35NTHODS.js → mcp-YDLZXAW7.js} +73 -35
  261. package/dist/chunks/mcp-YDLZXAW7.js.map +6 -0
  262. package/dist/chunks/{mcp-serve-PCEC55MI.js → mcp-serve-7GWX3NPG.js} +21 -20
  263. package/dist/chunks/mcp-serve-7GWX3NPG.js.map +6 -0
  264. package/dist/chunks/{message-command-34BVXT5R.js → message-command-P5OHIHTN.js} +71 -69
  265. package/dist/chunks/message-command-P5OHIHTN.js.map +6 -0
  266. package/dist/chunks/{open-DK276PG4.js → open-CDO3SOA6.js} +9 -8
  267. package/dist/chunks/{operator-tools-RG247DOI.js → operator-tools-LLMFGJWF.js} +17 -16
  268. package/dist/chunks/operator-tools-LLMFGJWF.js.map +6 -0
  269. package/dist/chunks/{output-schema-WBFGDY7D.js → output-schema-QEGZNUXU.js} +3 -3
  270. package/dist/chunks/{pal-OBXTNMGX.js → pal-6HU3SIRK.js} +18 -17
  271. package/dist/chunks/pal-6HU3SIRK.js.map +6 -0
  272. package/dist/chunks/{palette-4MBGX2Y6.js → palette-XDUNIBWY.js} +4 -4
  273. package/dist/chunks/{peers-ZSKWVLA4.js → peers-3HG3Q2UM.js} +23 -22
  274. package/dist/chunks/peers-3HG3Q2UM.js.map +6 -0
  275. package/dist/chunks/{peers-RBR7QYPG.js → peers-6C6C5L7Y.js} +10 -9
  276. package/dist/chunks/{plugin-PBIAJSYH.js → plugin-XF2AUQGU.js} +30 -29
  277. package/dist/chunks/plugin-XF2AUQGU.js.map +6 -0
  278. package/dist/chunks/{providers-EW4LE5AZ.js → providers-3ZDAUZXM.js} +13 -12
  279. package/dist/chunks/{providers-V4MMZ7X5.js → providers-XM3A6XKJ.js} +19 -18
  280. package/dist/chunks/providers-XM3A6XKJ.js.map +6 -0
  281. package/dist/chunks/{pty-XV7IOHGX.js → pty-6TGE7IRC.js} +3 -3
  282. package/dist/chunks/resume-Z3AX3TDI.js +28 -0
  283. package/dist/chunks/{resume-command-VABS2KGI.js → resume-command-2BRKX2ZI.js} +5 -5
  284. package/dist/chunks/{running-LDQLXUGW.js → running-SNBGNQ3V.js} +5 -4
  285. package/dist/chunks/{schedule-L5AAS4JQ.js → schedule-2W7QMK6F.js} +31 -13
  286. package/dist/chunks/schedule-2W7QMK6F.js.map +6 -0
  287. package/dist/chunks/{send-2KB5VRUT.js → send-WKTQWKPD.js} +21 -20
  288. package/dist/chunks/send-person-GA6BJ3O5.js +35 -0
  289. package/dist/chunks/{servers-WIKRFBKU.js → servers-P2EAWI7V.js} +9 -8
  290. package/dist/chunks/{service-LXQA5RI7.js → service-NKDFC3B2.js} +160 -63
  291. package/dist/chunks/service-NKDFC3B2.js.map +6 -0
  292. package/dist/chunks/{session-options-2LDJWGYZ.js → session-options-IOWCEDFD.js} +5 -5
  293. package/dist/chunks/{setting-cli-6T6H6TJ7.js → setting-cli-5ZGTJ7FY.js} +16 -15
  294. package/dist/chunks/{skills-YAIICRGB.js → skills-DHTBS74G.js} +29 -28
  295. package/dist/chunks/skills-DHTBS74G.js.map +6 -0
  296. package/dist/chunks/{source-deliveries-VB4F2DV5.js → source-deliveries-MMJWFEFZ.js} +22 -21
  297. package/dist/chunks/{start-check-TE3CE7NZ.js → start-check-6ZVFZLFJ.js} +2 -2
  298. package/dist/chunks/{startup-failure-PBWJF4DV.js → startup-failure-FVAZ3RNE.js} +2 -2
  299. package/dist/chunks/{state-UGZ334GT.js → state-AQGQ3OBN.js} +23 -22
  300. package/dist/chunks/state-AQGQ3OBN.js.map +6 -0
  301. package/dist/chunks/{store-RV6QGLU2.js → store-4XNFBA6T.js} +4 -4
  302. package/dist/chunks/{store-VQ5OTKXT.js → store-E6HVKQI2.js} +3 -3
  303. package/dist/chunks/{store-3REZKYH5.js → store-EQF6SI3V.js} +10 -9
  304. package/dist/chunks/{store-75XB557Z.js → store-PBAF2V3P.js} +14 -13
  305. package/dist/chunks/{tui-IEPKJA46.js → tui-MB4LQWG5.js} +372 -154
  306. package/dist/chunks/tui-MB4LQWG5.js.map +6 -0
  307. package/dist/chunks/{update-NPWMEWAL.js → update-XWSTXMX4.js} +9 -8
  308. package/dist/chunks/update-XWSTXMX4.js.map +6 -0
  309. package/dist/chunks/{watch-SI7TFFVA.js → watch-2WWQKUBG.js} +120 -117
  310. package/dist/chunks/watch-2WWQKUBG.js.map +6 -0
  311. package/dist/chunks/{windows-home-4XSPGUOR.js → windows-home-7N24MLWN.js} +6 -5
  312. package/dist/chunks/{workspaces-UB6NF7LY.js → workspaces-HZXB4D7R.js} +21 -20
  313. package/dist/chunks/workspaces-HZXB4D7R.js.map +6 -0
  314. package/dist/chunks/{worktree-QCSW5VQC.js → worktree-TQNJ24GP.js} +31 -30
  315. package/dist/chunks/worktree-TQNJ24GP.js.map +6 -0
  316. package/dist/chunks/{wrapper-XHVFM6KS.js → wrapper-7A4PWBS7.js} +2 -2
  317. package/dist/commands/actions/schedule.d.ts.map +1 -1
  318. package/dist/commands/desktop-host-memory.d.ts.map +1 -1
  319. package/dist/commands/desktop-host.d.ts +4 -4
  320. package/dist/commands/exec-json.d.ts.map +1 -1
  321. package/dist/commands/exec.d.ts.map +1 -1
  322. package/dist/commands/mcp.d.ts.map +1 -1
  323. package/dist/commands/schedule.d.ts.map +1 -1
  324. package/dist/computer/sentences.d.ts.map +1 -1
  325. package/dist/config/user-config.d.ts.map +1 -1
  326. package/dist/index.js +54 -53
  327. package/dist/integrations/auto-update/state.d.ts.map +1 -1
  328. package/dist/integrations/harness/model-cache.d.ts.map +1 -1
  329. package/dist/integrations/learning/generator-state.d.ts.map +1 -1
  330. package/dist/integrations/mcp/project-file.d.ts.map +1 -1
  331. package/dist/integrations/network/control.d.ts.map +1 -1
  332. package/dist/integrations/network/role-store.d.ts.map +1 -1
  333. package/dist/integrations/notifications/sound.d.ts.map +1 -1
  334. package/dist/integrations/plugins/fetch/git.d.ts +12 -0
  335. package/dist/integrations/plugins/fetch/git.d.ts.map +1 -1
  336. package/dist/integrations/plugins/fetch/url.d.ts.map +1 -1
  337. package/dist/integrations/plugins/install.d.ts.map +1 -1
  338. package/dist/integrations/plugins/runtime.d.ts +7 -2
  339. package/dist/integrations/plugins/runtime.d.ts.map +1 -1
  340. package/dist/integrations/providers/codex-account.d.ts.map +1 -1
  341. package/dist/integrations/providers/credential-store.d.ts.map +1 -1
  342. package/dist/integrations/providers/harness-credentials.d.ts.map +1 -1
  343. package/dist/integrations/providers/windows-home.d.ts.map +1 -1
  344. package/dist/integrations/sessions/prompt-history.d.ts.map +1 -1
  345. package/dist/integrations/sessions/store.d.ts +6 -0
  346. package/dist/integrations/sessions/store.d.ts.map +1 -1
  347. package/dist/integrations/subagents/hard-stop.d.ts +12 -0
  348. package/dist/integrations/subagents/hard-stop.d.ts.map +1 -0
  349. package/dist/integrations/subagents/helper-providers.d.ts +25 -0
  350. package/dist/integrations/subagents/helper-providers.d.ts.map +1 -0
  351. package/dist/integrations/subagents/replay.d.ts.map +1 -1
  352. package/dist/integrations/subagents/runtime.d.ts +18 -0
  353. package/dist/integrations/subagents/runtime.d.ts.map +1 -1
  354. package/dist/integrations/subagents/worktree-driver.d.ts +41 -0
  355. package/dist/integrations/subagents/worktree-driver.d.ts.map +1 -1
  356. package/dist/integrations/teams/enabled.d.ts +12 -3
  357. package/dist/integrations/teams/enabled.d.ts.map +1 -1
  358. package/dist/integrations/teams/host.d.ts +10 -2
  359. package/dist/integrations/teams/host.d.ts.map +1 -1
  360. package/dist/integrations/teams/runner.d.ts +6 -1
  361. package/dist/integrations/teams/runner.d.ts.map +1 -1
  362. package/dist/integrations/teams/unattended.d.ts +19 -0
  363. package/dist/integrations/teams/unattended.d.ts.map +1 -0
  364. package/dist/integrations/workflows/guidance.d.ts.map +1 -1
  365. package/dist/integrations/worktrees/managed.d.ts +14 -0
  366. package/dist/integrations/worktrees/managed.d.ts.map +1 -1
  367. package/dist/memory/curation-runtime.d.ts +15 -2
  368. package/dist/memory/curation-runtime.d.ts.map +1 -1
  369. package/dist/memory/curator.d.ts +10 -4
  370. package/dist/memory/curator.d.ts.map +1 -1
  371. package/dist/memory/inbox.d.ts +17 -0
  372. package/dist/memory/inbox.d.ts.map +1 -1
  373. package/dist/memory/presentation.d.ts +5 -0
  374. package/dist/memory/presentation.d.ts.map +1 -1
  375. package/dist/pals/desktop-communication.d.ts +4 -4
  376. package/dist/pals/desktop-communication.d.ts.map +1 -1
  377. package/dist/pals/guest-mcp-transport.d.ts +3 -25
  378. package/dist/pals/guest-mcp-transport.d.ts.map +1 -1
  379. package/dist/permissions/local-settings.d.ts.map +1 -1
  380. package/dist/schedule/build.d.ts +11 -0
  381. package/dist/schedule/build.d.ts.map +1 -1
  382. package/dist/schedule/commands/add.d.ts +8 -1
  383. package/dist/schedule/commands/add.d.ts.map +1 -1
  384. package/dist/schedule/commands/lifecycle.d.ts.map +1 -1
  385. package/dist/schedule/commands/list.d.ts.map +1 -1
  386. package/dist/schedule/commands/service.d.ts.map +1 -1
  387. package/dist/schedule/daemon/daemon.d.ts +8 -1
  388. package/dist/schedule/daemon/daemon.d.ts.map +1 -1
  389. package/dist/schedule/daemon/pinned.d.ts +48 -0
  390. package/dist/schedule/daemon/pinned.d.ts.map +1 -0
  391. package/dist/schedule/fire/fire.d.ts +11 -1
  392. package/dist/schedule/fire/fire.d.ts.map +1 -1
  393. package/dist/schedule/service/index.d.ts.map +1 -1
  394. package/dist/schedule/store/jobs.d.ts.map +1 -1
  395. package/dist/schedule/store/state.d.ts +6 -0
  396. package/dist/schedule/store/state.d.ts.map +1 -1
  397. package/dist/schedule/types.d.ts +16 -0
  398. package/dist/schedule/types.d.ts.map +1 -1
  399. package/dist/sdk-peer.js +23 -1
  400. package/dist/startup-record.d.ts.map +1 -1
  401. package/dist/temp-name.d.ts +11 -0
  402. package/dist/temp-name.d.ts.map +1 -0
  403. package/dist/tui/App.d.ts +0 -12
  404. package/dist/tui/App.d.ts.map +1 -1
  405. package/dist/tui/ArmedWord.d.ts +30 -0
  406. package/dist/tui/ArmedWord.d.ts.map +1 -0
  407. package/dist/tui/Composer.d.ts.map +1 -1
  408. package/dist/tui/QuestionDialog.d.ts +8 -6
  409. package/dist/tui/QuestionDialog.d.ts.map +1 -1
  410. package/dist/tui/StatusBar.d.ts +7 -1
  411. package/dist/tui/StatusBar.d.ts.map +1 -1
  412. package/dist/tui/agent-transcript-rows.d.ts +7 -2
  413. package/dist/tui/agent-transcript-rows.d.ts.map +1 -1
  414. package/dist/tui/agent.d.ts +53 -2
  415. package/dist/tui/agent.d.ts.map +1 -1
  416. package/dist/tui/answered-questions.d.ts +34 -0
  417. package/dist/tui/answered-questions.d.ts.map +1 -0
  418. package/dist/tui/attachment-rows.d.ts.map +1 -1
  419. package/dist/tui/away-recap.d.ts +10 -4
  420. package/dist/tui/away-recap.d.ts.map +1 -1
  421. package/dist/tui/background-eviction.d.ts +46 -0
  422. package/dist/tui/background-eviction.d.ts.map +1 -0
  423. package/dist/tui/cross-session-history.d.ts +3 -1
  424. package/dist/tui/cross-session-history.d.ts.map +1 -1
  425. package/dist/tui/early-input.d.ts +37 -22
  426. package/dist/tui/early-input.d.ts.map +1 -1
  427. package/dist/tui/hypermode.d.ts +1 -1
  428. package/dist/tui/hypermode.d.ts.map +1 -1
  429. package/dist/tui/index.d.ts.map +1 -1
  430. package/dist/tui/paint/cursor-report.d.ts +42 -0
  431. package/dist/tui/paint/cursor-report.d.ts.map +1 -0
  432. package/dist/tui/paint/live-paint.d.ts +25 -9
  433. package/dist/tui/paint/live-paint.d.ts.map +1 -1
  434. package/dist/tui/question-dialog.d.ts +2 -7
  435. package/dist/tui/question-dialog.d.ts.map +1 -1
  436. package/dist/tui/restored-rows.d.ts.map +1 -1
  437. package/dist/tui/schedule/host-commands.d.ts.map +1 -1
  438. package/dist/tui/schedule/tool-host.d.ts.map +1 -1
  439. package/dist/tui/skills/suggestion-ledger.d.ts.map +1 -1
  440. package/dist/tui/terminal-reply-filter.d.ts +2 -0
  441. package/dist/tui/terminal-reply-filter.d.ts.map +1 -1
  442. package/dist/tui/theme-palettes.d.ts +13 -3
  443. package/dist/tui/theme-palettes.d.ts.map +1 -1
  444. package/dist/tui/tool-end-rows.d.ts +3 -0
  445. package/dist/tui/tool-end-rows.d.ts.map +1 -1
  446. package/dist/tui/triggers/detect.d.ts +11 -4
  447. package/dist/tui/triggers/detect.d.ts.map +1 -1
  448. package/dist/tui/triggers/registry.d.ts +8 -0
  449. package/dist/tui/triggers/registry.d.ts.map +1 -1
  450. package/dist/tui/typed-answer.d.ts +44 -0
  451. package/dist/tui/typed-answer.d.ts.map +1 -0
  452. package/dist/tui/zoom/gesture.d.ts +9 -1
  453. package/dist/tui/zoom/gesture.d.ts.map +1 -1
  454. package/package.json +7 -7
  455. package/skills/workflow-authoring/SKILL.md +16 -1
  456. package/dist/chunks/acp-6CGBHCQA.js.map +0 -6
  457. package/dist/chunks/activity-command-LBFSBUTO.js.map +0 -6
  458. package/dist/chunks/add-QKYYI3YT.js.map +0 -6
  459. package/dist/chunks/agent-session-NMIKA55B.js +0 -103
  460. package/dist/chunks/apply-at-exit-7RHQBQPY.js.map +0 -6
  461. package/dist/chunks/archive-J4ZUAJ2G.js.map +0 -6
  462. package/dist/chunks/auth-UJVEA47C.js.map +0 -6
  463. package/dist/chunks/bin-main-ZH7BZUOM.js.map +0 -6
  464. package/dist/chunks/chat-UU23NM3Q.js.map +0 -6
  465. package/dist/chunks/chunk-33U2WYBU.js.map +0 -6
  466. package/dist/chunks/chunk-35JUKJRN.js.map +0 -6
  467. package/dist/chunks/chunk-3NF6AVW4.js.map +0 -6
  468. package/dist/chunks/chunk-5HRR6OQX.js.map +0 -6
  469. package/dist/chunks/chunk-7AZTWFS7.js.map +0 -6
  470. package/dist/chunks/chunk-AV3WM4TM.js.map +0 -6
  471. package/dist/chunks/chunk-CNTMRBQT.js.map +0 -6
  472. package/dist/chunks/chunk-DOENBH7Q.js.map +0 -6
  473. package/dist/chunks/chunk-FHR5FWGS.js.map +0 -6
  474. package/dist/chunks/chunk-K3PXRK3Z.js.map +0 -6
  475. package/dist/chunks/chunk-KCEVJCGE.js.map +0 -6
  476. package/dist/chunks/chunk-KK6CWJFZ.js.map +0 -6
  477. package/dist/chunks/chunk-LIX2TWWW.js.map +0 -6
  478. package/dist/chunks/chunk-LPYA4GW7.js.map +0 -6
  479. package/dist/chunks/chunk-LUH7N5AG.js.map +0 -6
  480. package/dist/chunks/chunk-MAFRPAQY.js.map +0 -6
  481. package/dist/chunks/chunk-MZWFJMIM.js.map +0 -6
  482. package/dist/chunks/chunk-NGGXYIAN.js.map +0 -6
  483. package/dist/chunks/chunk-NV3AX3OX.js.map +0 -6
  484. package/dist/chunks/chunk-O4WK5FUN.js.map +0 -6
  485. package/dist/chunks/chunk-ON7XQGDA.js.map +0 -6
  486. package/dist/chunks/chunk-OTVNG2RH.js.map +0 -6
  487. package/dist/chunks/chunk-PJ6IEIKJ.js.map +0 -6
  488. package/dist/chunks/chunk-PPXMVZZM.js.map +0 -6
  489. package/dist/chunks/chunk-S5XNNB36.js.map +0 -6
  490. package/dist/chunks/chunk-SUR4OMA6.js.map +0 -6
  491. package/dist/chunks/chunk-TJVM2KTD.js.map +0 -6
  492. package/dist/chunks/cli-runtime-RAHU2FF7.js.map +0 -6
  493. package/dist/chunks/computer-AWBPOB3P.js.map +0 -6
  494. package/dist/chunks/config-CX6PRTEY.js.map +0 -6
  495. package/dist/chunks/debug-KE3MFMW5.js.map +0 -6
  496. package/dist/chunks/desktop-host-schedule-tool-IKWEHI4H.js.map +0 -6
  497. package/dist/chunks/doctor-O5OZR6YG.js +0 -102
  498. package/dist/chunks/drain-LUUO4FI3.js.map +0 -6
  499. package/dist/chunks/eval-V4HUXXC2.js.map +0 -6
  500. package/dist/chunks/exec-QYZKP6RS.js.map +0 -6
  501. package/dist/chunks/hooks-TQ7KEIX5.js.map +0 -6
  502. package/dist/chunks/host-queries-VKIZCSD3.js +0 -40
  503. package/dist/chunks/launch-LWAQXYIA.js.map +0 -6
  504. package/dist/chunks/learn-GIKQBJN5.js.map +0 -6
  505. package/dist/chunks/learn-builtin-HOFMWHQP.js.map +0 -6
  506. package/dist/chunks/live-DCRF5F6P.js +0 -101
  507. package/dist/chunks/mcp-35NTHODS.js.map +0 -6
  508. package/dist/chunks/mcp-serve-PCEC55MI.js.map +0 -6
  509. package/dist/chunks/message-command-34BVXT5R.js.map +0 -6
  510. package/dist/chunks/operator-tools-RG247DOI.js.map +0 -6
  511. package/dist/chunks/pal-OBXTNMGX.js.map +0 -6
  512. package/dist/chunks/peers-ZSKWVLA4.js.map +0 -6
  513. package/dist/chunks/plugin-PBIAJSYH.js.map +0 -6
  514. package/dist/chunks/providers-V4MMZ7X5.js.map +0 -6
  515. package/dist/chunks/resume-GA7INROY.js +0 -27
  516. package/dist/chunks/schedule-L5AAS4JQ.js.map +0 -6
  517. package/dist/chunks/send-person-EFHYG2GX.js +0 -34
  518. package/dist/chunks/service-LXQA5RI7.js.map +0 -6
  519. package/dist/chunks/skills-YAIICRGB.js.map +0 -6
  520. package/dist/chunks/state-UGZ334GT.js.map +0 -6
  521. package/dist/chunks/tui-IEPKJA46.js.map +0 -6
  522. package/dist/chunks/update-NPWMEWAL.js.map +0 -6
  523. package/dist/chunks/watch-SI7TFFVA.js.map +0 -6
  524. package/dist/chunks/workspaces-UB6NF7LY.js.map +0 -6
  525. package/dist/chunks/worktree-QCSW5VQC.js.map +0 -6
  526. /package/dist/chunks/{agent-JIYXK5JR.js.map → agent-RVTT22XL.js.map} +0 -0
  527. /package/dist/chunks/{agent-session-NMIKA55B.js.map → agent-session-SNTV4WJB.js.map} +0 -0
  528. /package/dist/chunks/{binding-3PCEKVOO.js.map → binding-AVL54CBF.js.map} +0 -0
  529. /package/dist/chunks/{browser-A67ROZXW.js.map → browser-AYBO33ZR.js.map} +0 -0
  530. /package/dist/chunks/{chunk-73QLEKJH.js.map → chunk-3GGLAPPV.js.map} +0 -0
  531. /package/dist/chunks/{chunk-XGEW2R3P.js.map → chunk-3GVS745R.js.map} +0 -0
  532. /package/dist/chunks/{chunk-H3763MSH.js.map → chunk-3HHWM67Q.js.map} +0 -0
  533. /package/dist/chunks/{chunk-ODPKECHM.js.map → chunk-3HUEBQAN.js.map} +0 -0
  534. /package/dist/chunks/{chunk-TIXLIDHF.js.map → chunk-3TURVGJT.js.map} +0 -0
  535. /package/dist/chunks/{chunk-VPWFFR5J.js.map → chunk-43NXEWX4.js.map} +0 -0
  536. /package/dist/chunks/{chunk-T7LGBJ3Y.js.map → chunk-47SP3GJ4.js.map} +0 -0
  537. /package/dist/chunks/{chunk-UP77FF2W.js.map → chunk-4EDVII4B.js.map} +0 -0
  538. /package/dist/chunks/{chunk-PH2VOYXI.js.map → chunk-4IBNEQPZ.js.map} +0 -0
  539. /package/dist/chunks/{chunk-ONKMPBPP.js.map → chunk-4LMAEQ42.js.map} +0 -0
  540. /package/dist/chunks/{chunk-4EL7KEYZ.js.map → chunk-5BDR52OS.js.map} +0 -0
  541. /package/dist/chunks/{chunk-4LHHK42J.js.map → chunk-5N55CGZG.js.map} +0 -0
  542. /package/dist/chunks/{chunk-OT6WAUFD.js.map → chunk-657OVGTQ.js.map} +0 -0
  543. /package/dist/chunks/{chunk-JWZLFRII.js.map → chunk-66ZJ7T5L.js.map} +0 -0
  544. /package/dist/chunks/{chunk-L4QIJVNX.js.map → chunk-6PHA4NAI.js.map} +0 -0
  545. /package/dist/chunks/{chunk-25VC6FKF.js.map → chunk-6TTWYQB6.js.map} +0 -0
  546. /package/dist/chunks/{chunk-TQGVEISD.js.map → chunk-75YGSZN7.js.map} +0 -0
  547. /package/dist/chunks/{chunk-OICFYPUQ.js.map → chunk-7ADQK225.js.map} +0 -0
  548. /package/dist/chunks/{chunk-46VWCTBU.js.map → chunk-7CWYOHH6.js.map} +0 -0
  549. /package/dist/chunks/{chunk-VQN7GC3B.js.map → chunk-7NXIEDP2.js.map} +0 -0
  550. /package/dist/chunks/{chunk-N7BCFEJJ.js.map → chunk-7SMNXLWZ.js.map} +0 -0
  551. /package/dist/chunks/{chunk-MNSSDI5Y.js.map → chunk-7WXVKMYK.js.map} +0 -0
  552. /package/dist/chunks/{chunk-FSY26KLI.js.map → chunk-A54JD4WN.js.map} +0 -0
  553. /package/dist/chunks/{chunk-G3R447P4.js.map → chunk-AHGZMLSO.js.map} +0 -0
  554. /package/dist/chunks/{chunk-3T2SSK3Z.js.map → chunk-BA2RCXPX.js.map} +0 -0
  555. /package/dist/chunks/{chunk-J3BP3W2N.js.map → chunk-BEXWYA6H.js.map} +0 -0
  556. /package/dist/chunks/{chunk-IX4KSPGQ.js.map → chunk-BM2BFZF4.js.map} +0 -0
  557. /package/dist/chunks/{chunk-P72VIXPI.js.map → chunk-CHH5AZNT.js.map} +0 -0
  558. /package/dist/chunks/{chunk-SOFHWWJH.js.map → chunk-CPTB7QDI.js.map} +0 -0
  559. /package/dist/chunks/{chunk-E6BMB5D4.js.map → chunk-CQTOBLCN.js.map} +0 -0
  560. /package/dist/chunks/{chunk-3LZDJBR4.js.map → chunk-DO3GU4FK.js.map} +0 -0
  561. /package/dist/chunks/{chunk-Q4LY4V73.js.map → chunk-DQ4MBWB3.js.map} +0 -0
  562. /package/dist/chunks/{chunk-AHFKN3F5.js.map → chunk-EG4HMJEH.js.map} +0 -0
  563. /package/dist/chunks/{chunk-S3MI73RJ.js.map → chunk-EKSS7K4J.js.map} +0 -0
  564. /package/dist/chunks/{chunk-ST23JVRU.js.map → chunk-EOUCWHCH.js.map} +0 -0
  565. /package/dist/chunks/{chunk-EE4ROHCL.js.map → chunk-ERVENGWO.js.map} +0 -0
  566. /package/dist/chunks/{chunk-LWBPCNGV.js.map → chunk-ESWXVRT2.js.map} +0 -0
  567. /package/dist/chunks/{chunk-LO7LBC5T.js.map → chunk-F2RV4OA4.js.map} +0 -0
  568. /package/dist/chunks/{chunk-S4O2YFPC.js.map → chunk-F73RCHO5.js.map} +0 -0
  569. /package/dist/chunks/{chunk-WSPWJYLQ.js.map → chunk-F7JILDDN.js.map} +0 -0
  570. /package/dist/chunks/{chunk-ZACF6CVM.js.map → chunk-FTGVYRYH.js.map} +0 -0
  571. /package/dist/chunks/{chunk-6RDYLP52.js.map → chunk-GEIXXTUE.js.map} +0 -0
  572. /package/dist/chunks/{chunk-OFUZHNUY.js.map → chunk-GH7JRINW.js.map} +0 -0
  573. /package/dist/chunks/{chunk-MYSCS3LD.js.map → chunk-GRA35IM2.js.map} +0 -0
  574. /package/dist/chunks/{chunk-7BZZGFKW.js.map → chunk-HBA5EVRI.js.map} +0 -0
  575. /package/dist/chunks/{chunk-VISMRN4J.js.map → chunk-HFV342VZ.js.map} +0 -0
  576. /package/dist/chunks/{chunk-H2FQ4QLS.js.map → chunk-HKZWHWOH.js.map} +0 -0
  577. /package/dist/chunks/{chunk-7ENFV3XO.js.map → chunk-HOXYIKMC.js.map} +0 -0
  578. /package/dist/chunks/{chunk-MGU27EKU.js.map → chunk-IHER3BWG.js.map} +0 -0
  579. /package/dist/chunks/{chunk-NE2J7UOC.js.map → chunk-IIIAY4M2.js.map} +0 -0
  580. /package/dist/chunks/{chunk-47HEFQUP.js.map → chunk-IOAXQS7P.js.map} +0 -0
  581. /package/dist/chunks/{chunk-5CS5WG6N.js.map → chunk-IPTMKDPN.js.map} +0 -0
  582. /package/dist/chunks/{chunk-LYTU6DQ7.js.map → chunk-J3F7WCZ3.js.map} +0 -0
  583. /package/dist/chunks/{chunk-RAD42QX6.js.map → chunk-JJ2SALR4.js.map} +0 -0
  584. /package/dist/chunks/{chunk-P65AXQPL.js.map → chunk-JNPVJV3O.js.map} +0 -0
  585. /package/dist/chunks/{chunk-SOUXHV54.js.map → chunk-JSUYTWJF.js.map} +0 -0
  586. /package/dist/chunks/{chunk-J6XAYUON.js.map → chunk-JVNRECP6.js.map} +0 -0
  587. /package/dist/chunks/{chunk-AD7Z5UEB.js.map → chunk-KJ2EUIHQ.js.map} +0 -0
  588. /package/dist/chunks/{chunk-MN7H3I6K.js.map → chunk-KOULA2IJ.js.map} +0 -0
  589. /package/dist/chunks/{chunk-E2LKNISN.js.map → chunk-L36PRWOF.js.map} +0 -0
  590. /package/dist/chunks/{chunk-SVQV6RXR.js.map → chunk-L5CQ7VIP.js.map} +0 -0
  591. /package/dist/chunks/{chunk-XVKQQTVV.js.map → chunk-LLEAN4PC.js.map} +0 -0
  592. /package/dist/chunks/{chunk-K6M4OTHF.js.map → chunk-LVXE26A7.js.map} +0 -0
  593. /package/dist/chunks/{chunk-7ZEX6QP7.js.map → chunk-LWWG6H7T.js.map} +0 -0
  594. /package/dist/chunks/{chunk-NEAH7HVP.js.map → chunk-NBAKCWV3.js.map} +0 -0
  595. /package/dist/chunks/{chunk-DHRN4HVT.js.map → chunk-NBS2755S.js.map} +0 -0
  596. /package/dist/chunks/{chunk-UI7QTTM2.js.map → chunk-NJJ2N524.js.map} +0 -0
  597. /package/dist/chunks/{chunk-2AMVNSDK.js.map → chunk-NK3MIAYC.js.map} +0 -0
  598. /package/dist/chunks/{chunk-KID2I7VD.js.map → chunk-O7VPHSES.js.map} +0 -0
  599. /package/dist/chunks/{chunk-PR3MVT6X.js.map → chunk-OBBMS3N6.js.map} +0 -0
  600. /package/dist/chunks/{chunk-WSB2MCTI.js.map → chunk-OBK74OZW.js.map} +0 -0
  601. /package/dist/chunks/{chunk-Y24UJ26G.js.map → chunk-OCJ2WBZ4.js.map} +0 -0
  602. /package/dist/chunks/{chunk-KXGVJ55A.js.map → chunk-OCYOGXXP.js.map} +0 -0
  603. /package/dist/chunks/{chunk-RF6XIV7O.js.map → chunk-OUQUYAI2.js.map} +0 -0
  604. /package/dist/chunks/{chunk-KKFKXDT4.js.map → chunk-OUTD6IWW.js.map} +0 -0
  605. /package/dist/chunks/{chunk-YXQG466V.js.map → chunk-P4BEZ7QW.js.map} +0 -0
  606. /package/dist/chunks/{chunk-GQU2MHNZ.js.map → chunk-PBHPPUUI.js.map} +0 -0
  607. /package/dist/chunks/{chunk-J35W6BKJ.js.map → chunk-PQI2WTH5.js.map} +0 -0
  608. /package/dist/chunks/{chunk-IWPDMUHJ.js.map → chunk-PYXKPC7C.js.map} +0 -0
  609. /package/dist/chunks/{chunk-EV7PYTOP.js.map → chunk-QZTC5Q7S.js.map} +0 -0
  610. /package/dist/chunks/{chunk-72VCA33E.js.map → chunk-RECTI7QY.js.map} +0 -0
  611. /package/dist/chunks/{chunk-7WU6QNGO.js.map → chunk-RVC77FRV.js.map} +0 -0
  612. /package/dist/chunks/{chunk-UOX7WH3J.js.map → chunk-SCDI2SR6.js.map} +0 -0
  613. /package/dist/chunks/{chunk-CN4W3FVM.js.map → chunk-TPFYLED7.js.map} +0 -0
  614. /package/dist/chunks/{chunk-224LDNU5.js.map → chunk-UAF72QNW.js.map} +0 -0
  615. /package/dist/chunks/{chunk-LJWCYIQV.js.map → chunk-UEHFBJEE.js.map} +0 -0
  616. /package/dist/chunks/{chunk-3L5ICOUV.js.map → chunk-UKWCQVKF.js.map} +0 -0
  617. /package/dist/chunks/{chunk-QH55BL6G.js.map → chunk-UZLUUHOZ.js.map} +0 -0
  618. /package/dist/chunks/{chunk-3FYZVHC5.js.map → chunk-V4FAKLV3.js.map} +0 -0
  619. /package/dist/chunks/{chunk-ENKSNZTO.js.map → chunk-V6SFWKAD.js.map} +0 -0
  620. /package/dist/chunks/{chunk-FPKL3N3J.js.map → chunk-VAIQQX7N.js.map} +0 -0
  621. /package/dist/chunks/{chunk-Q3ZCXNLT.js.map → chunk-VAZ2M63R.js.map} +0 -0
  622. /package/dist/chunks/{chunk-C56SXFLU.js.map → chunk-VBWNQCWH.js.map} +0 -0
  623. /package/dist/chunks/{chunk-SRY4THD4.js.map → chunk-VH7IAD76.js.map} +0 -0
  624. /package/dist/chunks/{chunk-DCNCIL5A.js.map → chunk-VIV4RAVR.js.map} +0 -0
  625. /package/dist/chunks/{chunk-6MT5PLKV.js.map → chunk-VSYNI2G3.js.map} +0 -0
  626. /package/dist/chunks/{chunk-XXXJOYTQ.js.map → chunk-WNONDNGT.js.map} +0 -0
  627. /package/dist/chunks/{chunk-RLT3CQPF.js.map → chunk-WSH45EZX.js.map} +0 -0
  628. /package/dist/chunks/{chunk-T7WRPQ65.js.map → chunk-XMNW2HXH.js.map} +0 -0
  629. /package/dist/chunks/{chunk-SIJ5UTXM.js.map → chunk-XR6IVMWO.js.map} +0 -0
  630. /package/dist/chunks/{chunk-37ZR2RAN.js.map → chunk-XU5FZM42.js.map} +0 -0
  631. /package/dist/chunks/{chunk-UM3XWJVJ.js.map → chunk-XUWIPS3I.js.map} +0 -0
  632. /package/dist/chunks/{chunk-GPYNBNZV.js.map → chunk-YVTWQWWO.js.map} +0 -0
  633. /package/dist/chunks/{chunk-W7XW3NXA.js.map → chunk-ZG4VG2VM.js.map} +0 -0
  634. /package/dist/chunks/{chunk-SJIDADHD.js.map → chunk-ZMOQMEJG.js.map} +0 -0
  635. /package/dist/chunks/{chunk-LAU4ESKV.js.map → chunk-ZMOVFV2S.js.map} +0 -0
  636. /package/dist/chunks/{chunk-7P4QN2RO.js.map → chunk-ZNEBRE4R.js.map} +0 -0
  637. /package/dist/chunks/{chunk-6W6ILBXE.js.map → chunk-ZWTW3MCF.js.map} +0 -0
  638. /package/dist/chunks/{commands-252QNZKK.js.map → commands-6AI3A4MU.js.map} +0 -0
  639. /package/dist/chunks/{cost-L3RROPK6.js.map → cost-XQXENUFJ.js.map} +0 -0
  640. /package/dist/chunks/{crash-report-NND4WWJA.js.map → crash-report-UMVAQVML.js.map} +0 -0
  641. /package/dist/chunks/{devtools-V6SF7RES.js.map → devtools-4ANMDCAD.js.map} +0 -0
  642. /package/dist/chunks/{dist-YXOQEPCZ.js.map → dist-47PEKUSC.js.map} +0 -0
  643. /package/dist/chunks/{dist-MFWZVDSA.js.map → dist-52RJSSLN.js.map} +0 -0
  644. /package/dist/chunks/{dist-7TMA3NQ7.js.map → dist-6R46NFFA.js.map} +0 -0
  645. /package/dist/chunks/{dist-TH2HM2GH.js.map → dist-CSDSHVMB.js.map} +0 -0
  646. /package/dist/chunks/{dist-2MHNJVOM.js.map → dist-KP4M7FMR.js.map} +0 -0
  647. /package/dist/chunks/{dist-DFKDXC5Q.js.map → dist-NWF4I73Q.js.map} +0 -0
  648. /package/dist/chunks/{dist-3DMPFVGW.js.map → dist-S5TPXI7T.js.map} +0 -0
  649. /package/dist/chunks/{dist-UAUXP4UC.js.map → dist-X46OQA2D.js.map} +0 -0
  650. /package/dist/chunks/{doctor-O5OZR6YG.js.map → doctor-BNC2BDUE.js.map} +0 -0
  651. /package/dist/chunks/{entry-XPFYPIDS.js.map → entry-MV2FROEW.js.map} +0 -0
  652. /package/dist/chunks/{extension-AVJ2LV2G.js.map → extension-7A2DOXFH.js.map} +0 -0
  653. /package/dist/chunks/{feed-UKN7XNCC.js.map → feed-TCK7FRZT.js.map} +0 -0
  654. /package/dist/chunks/{home-A7434CUG.js.map → home-5DEGDKXE.js.map} +0 -0
  655. /package/dist/chunks/{homes-U4IALPDB.js.map → homes-JINW3ER5.js.map} +0 -0
  656. /package/dist/chunks/{hooks-report-R6KBKZOI.js.map → hooks-report-QGXYZRZ7.js.map} +0 -0
  657. /package/dist/chunks/{host-S2OSQNIF.js.map → host-GXJ46HB3.js.map} +0 -0
  658. /package/dist/chunks/{host-queries-VKIZCSD3.js.map → host-queries-V4JMMMMA.js.map} +0 -0
  659. /package/dist/chunks/{installed-list-VGP7FMFB.js.map → installed-list-D55C5TLT.js.map} +0 -0
  660. /package/dist/chunks/{lifecycle-4OBW7B42.js.map → lifecycle-JPDGDRYE.js.map} +0 -0
  661. /package/dist/chunks/{list-O2I3ECME.js.map → list-GPE5NJKI.js.map} +0 -0
  662. /package/dist/chunks/{live-DCRF5F6P.js.map → live-SPWADZ36.js.map} +0 -0
  663. /package/dist/chunks/{load-LHCKRZFB.js.map → load-2YNIEXSX.js.map} +0 -0
  664. /package/dist/chunks/{logs-UMD7HBUO.js.map → logs-CEPX5RE5.js.map} +0 -0
  665. /package/dist/chunks/{open-DK276PG4.js.map → open-CDO3SOA6.js.map} +0 -0
  666. /package/dist/chunks/{output-schema-WBFGDY7D.js.map → output-schema-QEGZNUXU.js.map} +0 -0
  667. /package/dist/chunks/{palette-4MBGX2Y6.js.map → palette-XDUNIBWY.js.map} +0 -0
  668. /package/dist/chunks/{peers-RBR7QYPG.js.map → peers-6C6C5L7Y.js.map} +0 -0
  669. /package/dist/chunks/{providers-EW4LE5AZ.js.map → providers-3ZDAUZXM.js.map} +0 -0
  670. /package/dist/chunks/{pty-XV7IOHGX.js.map → pty-6TGE7IRC.js.map} +0 -0
  671. /package/dist/chunks/{resume-GA7INROY.js.map → resume-Z3AX3TDI.js.map} +0 -0
  672. /package/dist/chunks/{resume-command-VABS2KGI.js.map → resume-command-2BRKX2ZI.js.map} +0 -0
  673. /package/dist/chunks/{running-LDQLXUGW.js.map → running-SNBGNQ3V.js.map} +0 -0
  674. /package/dist/chunks/{send-2KB5VRUT.js.map → send-WKTQWKPD.js.map} +0 -0
  675. /package/dist/chunks/{send-person-EFHYG2GX.js.map → send-person-GA6BJ3O5.js.map} +0 -0
  676. /package/dist/chunks/{servers-WIKRFBKU.js.map → servers-P2EAWI7V.js.map} +0 -0
  677. /package/dist/chunks/{session-options-2LDJWGYZ.js.map → session-options-IOWCEDFD.js.map} +0 -0
  678. /package/dist/chunks/{setting-cli-6T6H6TJ7.js.map → setting-cli-5ZGTJ7FY.js.map} +0 -0
  679. /package/dist/chunks/{source-deliveries-VB4F2DV5.js.map → source-deliveries-MMJWFEFZ.js.map} +0 -0
  680. /package/dist/chunks/{start-check-TE3CE7NZ.js.map → start-check-6ZVFZLFJ.js.map} +0 -0
  681. /package/dist/chunks/{startup-failure-PBWJF4DV.js.map → startup-failure-FVAZ3RNE.js.map} +0 -0
  682. /package/dist/chunks/{store-3REZKYH5.js.map → store-4XNFBA6T.js.map} +0 -0
  683. /package/dist/chunks/{store-75XB557Z.js.map → store-E6HVKQI2.js.map} +0 -0
  684. /package/dist/chunks/{store-RV6QGLU2.js.map → store-EQF6SI3V.js.map} +0 -0
  685. /package/dist/chunks/{store-VQ5OTKXT.js.map → store-PBAF2V3P.js.map} +0 -0
  686. /package/dist/chunks/{windows-home-4XSPGUOR.js.map → windows-home-7N24MLWN.js.map} +0 -0
  687. /package/dist/chunks/{wrapper-XHVFM6KS.js.map → wrapper-7A4PWBS7.js.map} +0 -0
@@ -2,32 +2,32 @@ import { createRequire as __namzuCreateRequire } from 'node:module';
2
2
  const require = __namzuCreateRequire(import.meta.url);
3
3
  import {
4
4
  createCliPluginRuntime
5
- } from "./chunk-MAFRPAQY.js";
5
+ } from "./chunk-CROAHDJY.js";
6
6
  import {
7
7
  createSessionSkillCatalog
8
- } from "./chunk-KKFKXDT4.js";
8
+ } from "./chunk-OUTD6IWW.js";
9
9
  import {
10
10
  describeLegacyExclude,
11
11
  excludeProjectLegacy
12
- } from "./chunk-RLT3CQPF.js";
12
+ } from "./chunk-WSH45EZX.js";
13
13
  import {
14
14
  runGeneratorCycle
15
- } from "./chunk-PPXMVZZM.js";
15
+ } from "./chunk-GSR55RZE.js";
16
16
  import {
17
17
  createSessionLearningFeed,
18
18
  openLearningTarget,
19
19
  readProjectGuidance,
20
20
  withSessionLearningFeed
21
- } from "./chunk-RF6XIV7O.js";
21
+ } from "./chunk-OUQUYAI2.js";
22
22
  import {
23
23
  cliGate
24
- } from "./chunk-P72VIXPI.js";
24
+ } from "./chunk-CHH5AZNT.js";
25
25
  import {
26
26
  createPluginRemoteHost
27
- } from "./chunk-GQU2MHNZ.js";
27
+ } from "./chunk-PBHPPUUI.js";
28
28
  import {
29
29
  openInBrowser
30
- } from "./chunk-T7WRPQ65.js";
30
+ } from "./chunk-XMNW2HXH.js";
31
31
  import {
32
32
  KEY_MISMATCH_MESSAGE,
33
33
  MAX_SCRIPT_BYTES,
@@ -51,37 +51,41 @@ import {
51
51
  viewFromJournal,
52
52
  workflowJournalKey,
53
53
  writeEditableCopy
54
- } from "./chunk-MNSSDI5Y.js";
54
+ } from "./chunk-7WXVKMYK.js";
55
55
  import {
56
56
  openManagedWorktrees
57
- } from "./chunk-M3Z7V3DJ.js";
57
+ } from "./chunk-RUGV5FZY.js";
58
58
  import {
59
59
  toolOnOffer
60
- } from "./chunk-MGU27EKU.js";
60
+ } from "./chunk-IHER3BWG.js";
61
61
  import {
62
62
  accountProductName
63
63
  } from "./chunk-YOWYTBJS.js";
64
+ import {
65
+ hardStopWasRaised,
66
+ isHardStop
67
+ } from "./chunk-5VW3COA7.js";
64
68
  import {
65
69
  createBrowserControl
66
- } from "./chunk-J35W6BKJ.js";
70
+ } from "./chunk-PQI2WTH5.js";
67
71
  import {
68
72
  openCliAccounts,
69
73
  storedAccountSignedIn
70
- } from "./chunk-MZWFJMIM.js";
74
+ } from "./chunk-GDD3DEG5.js";
71
75
  import {
72
76
  connectMcpServers,
73
77
  startMcpServers
74
- } from "./chunk-NEAH7HVP.js";
78
+ } from "./chunk-NBAKCWV3.js";
75
79
  import {
76
80
  CODEX_IMAGE_LIMIT_IDS,
77
81
  CODEX_IMAGE_MAX_BYTES,
78
82
  CodexImagesError,
79
83
  requestCodexImage
80
- } from "./chunk-KK6CWJFZ.js";
84
+ } from "./chunk-5QUYAINU.js";
81
85
  import {
82
86
  retireDuplicateStartupKeys,
83
87
  retirementNotice
84
- } from "./chunk-G3R447P4.js";
88
+ } from "./chunk-AHGZMLSO.js";
85
89
  import {
86
90
  CredentialRefreshRejectedError,
87
91
  CredentialWithdrawnError as CredentialWithdrawnError2,
@@ -89,7 +93,7 @@ import {
89
93
  ensureFreshStoredCodexCredential,
90
94
  readSubscriptionCredential,
91
95
  sameOAuthCredential
92
- } from "./chunk-7ZEX6QP7.js";
96
+ } from "./chunk-LWWG6H7T.js";
93
97
  import {
94
98
  conversationLogPath,
95
99
  displayTitleOf,
@@ -98,7 +102,7 @@ import {
98
102
  readConversationFacts,
99
103
  readConversationRecords,
100
104
  recordAccountBound
101
- } from "./chunk-AV3WM4TM.js";
105
+ } from "./chunk-JEQ3CPTD.js";
102
106
  import {
103
107
  INSTRUCTIONS_FILENAME,
104
108
  MAX_CHARS_PER_FILE,
@@ -107,21 +111,21 @@ import {
107
111
  isContainedBy,
108
112
  readIdentity,
109
113
  readInstructionAt
110
- } from "./chunk-J6XAYUON.js";
114
+ } from "./chunk-JVNRECP6.js";
111
115
  import {
112
116
  isDefaultAccountId
113
- } from "./chunk-SOUXHV54.js";
117
+ } from "./chunk-JSUYTWJF.js";
114
118
  import {
115
119
  LogFolder,
116
120
  ModelTable,
117
121
  READ_CHUNK_BYTES,
118
122
  conversationTotals
119
- } from "./chunk-35JUKJRN.js";
123
+ } from "./chunk-IL54Z65P.js";
120
124
  import {
121
125
  createLazyCodeAnalysis,
122
126
  promptCacheTtl,
123
127
  setPromptCacheTtl
124
- } from "./chunk-SIJ5UTXM.js";
128
+ } from "./chunk-XR6IVMWO.js";
125
129
  import {
126
130
  AFTER_TURN_COMMANDS,
127
131
  DEFAULT_MAX_HOOK_REFUSALS,
@@ -151,14 +155,14 @@ import {
151
155
  withoutCdToCwd,
152
156
  workflowRefusal,
153
157
  workflowToolDescription
154
- } from "./chunk-QS3W6PHW.js";
158
+ } from "./chunk-ZHYHS7RM.js";
155
159
  import {
156
160
  CHECK_HINT,
157
161
  readPluginFileSources
158
- } from "./chunk-6W6ILBXE.js";
162
+ } from "./chunk-ZWTW3MCF.js";
159
163
  import {
160
164
  SAVE_SKILL_TOOL_NAME
161
- } from "./chunk-4EL7KEYZ.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-UM3XWJVJ.js";
175
+ } from "./chunk-XUWIPS3I.js";
172
176
  import {
173
177
  settleLocalSettings
174
- } from "./chunk-5HRR6OQX.js";
178
+ } from "./chunk-3F5YRA4T.js";
175
179
  import {
176
180
  explainFailure,
177
181
  workingDirectoryProblem
178
- } from "./chunk-LYTU6DQ7.js";
182
+ } from "./chunk-J3F7WCZ3.js";
179
183
  import {
180
184
  conversationInUseSentence,
181
185
  minutesUntilFree
182
- } from "./chunk-25VC6FKF.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-CN4W3FVM.js";
199
+ } from "./chunk-TPFYLED7.js";
196
200
  import {
197
201
  createAgentHooksHost
198
- } from "./chunk-LAU4ESKV.js";
202
+ } from "./chunk-ZMOVFV2S.js";
199
203
  import {
200
204
  readSkillHooks,
201
205
  withoutConversationEvents,
202
206
  withoutSessionStart
203
- } from "./chunk-E2LKNISN.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-S4O2YFPC.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-Q3ZCXNLT.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-H2FQ4QLS.js";
247
+ } from "./chunk-HKZWHWOH.js";
244
248
  import {
245
249
  setUserConfigValue
246
- } from "./chunk-FHR5FWGS.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-37ZR2RAN.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-LO7LBC5T.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-46VWCTBU.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-JWZLFRII.js";
295
+ } from "./chunk-66ZJ7T5L.js";
292
296
  import {
293
297
  isTrusted
294
- } from "./chunk-K6M4OTHF.js";
298
+ } from "./chunk-LVXE26A7.js";
295
299
  import {
296
300
  codexPlanType,
297
301
  readCodexCredentialFile
298
- } from "./chunk-NV3AX3OX.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-T7LGBJ3Y.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-6RDYLP52.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-KID2I7VD.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-S5XNNB36.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;
@@ -12489,6 +12529,7 @@ var DelegatedWorktreeDriver = class {
12489
12529
  // Hooks first, the kernel's Git logic otherwise: one driver for both.
12490
12530
  driver: managed.workspaceDriver,
12491
12531
  isGit: managed.isGit,
12532
+ managed,
12492
12533
  hold: /* @__PURE__ */ __name((label, holder, folder) => managed.hold(label, holder, folder), "hold")
12493
12534
  };
12494
12535
  }).catch((error) => {
@@ -12503,6 +12544,95 @@ var DelegatedWorktreeDriver = class {
12503
12544
  this.hooks.onNotice(cause.message);
12504
12545
  }
12505
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
+ }
12506
12636
  /** Preserve the selected cwd beneath its checkout root for child execution. */
12507
12637
  async selectedSubdirectory() {
12508
12638
  return (await this.open()).subdirectory || void 0;
@@ -12601,6 +12731,7 @@ var SUBAGENT_PROMPT = [
12601
12731
  // is where a blocker goes. The working rules above already say it per rule.
12602
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."
12603
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.";
12604
12735
  var WORKFLOW_RUN_GROUP_PREFIX = "wf:";
12605
12736
  var ParentTaskScheduler = class extends LocalTaskScheduler {
12606
12737
  constructor(manager, context, onEvent, validateParent, validateContinuation = validateParent, childTaskStore) {
@@ -12643,6 +12774,21 @@ var ParentTaskScheduler = class extends LocalTaskScheduler {
12643
12774
  await this.validateContinuation();
12644
12775
  await super.continueTask(taskId, message);
12645
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();
12646
12792
  };
12647
12793
  var refuseUnownedChildReview = /* @__PURE__ */ __name(async () => ({
12648
12794
  action: "abort",
@@ -12938,6 +13084,7 @@ async function createSubagentRuntime(input) {
12938
13084
  gatewayMessage,
12939
13085
  opts.childTaskStore?.()
12940
13086
  );
13087
+ const turnLimits = resolveTurnGuards(opts, opts.resolveLimits?.(turnId));
12941
13088
  const completionInbox = new CompletionInbox(void 0, {
12942
13089
  holdsTurnOpen: opts.backgroundByDefault !== true
12943
13090
  });
@@ -12948,7 +13095,10 @@ async function createSubagentRuntime(input) {
12948
13095
  budget,
12949
13096
  parentSessionId: String(parent.sessionId),
12950
13097
  parentKey: sessionKey(parent),
13098
+ startedAt: Math.min(Date.now(), opts.resolveTurnStartedAt?.(turnId) ?? Date.now()),
13099
+ timeoutMs: turnLimits.timeoutMs,
12951
13100
  retired: false,
13101
+ notifyRunning: /* @__PURE__ */ __name((message) => gateway.notifyRunning(message), "notifyRunning"),
12952
13102
  close() {
12953
13103
  if (released) return;
12954
13104
  released = true;
@@ -13045,6 +13195,7 @@ async function createSubagentRuntime(input) {
13045
13195
  const runtime = await pending.catch(() => void 0);
13046
13196
  if (runtime === void 0) return;
13047
13197
  if (runtime.retired) {
13198
+ if (closed) await saveBeforeCancel(runtime);
13048
13199
  parents.set(turnId, pending);
13049
13200
  return;
13050
13201
  }
@@ -13052,8 +13203,26 @@ async function createSubagentRuntime(input) {
13052
13203
  parents.set(turnId, pending);
13053
13204
  return;
13054
13205
  }
13206
+ await saveBeforeCancel(runtime);
13055
13207
  runtime.close();
13056
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");
13057
13226
  const retireWithRunningTasks = /* @__PURE__ */ __name((turnId, runtime) => {
13058
13227
  const running = runtime.gateway.listTasks().filter((task) => !isTerminalAgentTaskState(task.state));
13059
13228
  const unheard = runtime.completionInbox.drain();
@@ -13236,6 +13405,56 @@ async function createSubagentRuntime(input) {
13236
13405
  systemPrompt
13237
13406
  };
13238
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");
13239
13458
  const launchChild = /* @__PURE__ */ __name(async (input2, context, hooks = {}) => {
13240
13459
  const {
13241
13460
  description,
@@ -13255,6 +13474,12 @@ async function createSubagentRuntime(input) {
13255
13474
  throw new Error("Supply model when selecting a child provider or effort.");
13256
13475
  const refusedFile = subagent_type !== void 0 && !fileAgents.has(subagent_type) ? refusedAgents.get(subagent_type) : void 0;
13257
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
+ }
13258
13483
  const agentName = typeof input2.name === "string" ? input2.name.trim() : "";
13259
13484
  if (agentName.length > 0) {
13260
13485
  const problem = agentNameProblem(agentName, { team: hooks.teammate !== void 0 });
@@ -13344,6 +13569,8 @@ async function createSubagentRuntime(input) {
13344
13569
  ...review.reviewAllowedCalls ? { reviewAllowedCalls: review.reviewAllowedCalls } : {}
13345
13570
  };
13346
13571
  let taskOwnsCleanup = false;
13572
+ let cleanupSignal;
13573
+ let ownerWritten;
13347
13574
  let retained;
13348
13575
  const cleanupDefinition = /* @__PURE__ */ __name(() => {
13349
13576
  if (dynamic && !retained) registry.unregister(agentId);
@@ -13352,11 +13579,26 @@ async function createSubagentRuntime(input) {
13352
13579
  const gatewayTurn = hooks.teammate?.turnId ?? context.turnId;
13353
13580
  const parentKey = sessionKey(await resolveParent(gatewayTurn));
13354
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);
13355
13586
  const completionInbox = await completionInboxForTurn(gatewayTurn);
13587
+ const childSignal = saveGraceSignal(context.abortSignal, gatewayRuntime);
13588
+ cleanupSignal = childSignal.dispose;
13356
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);
13357
13599
  const outcome = await runBlockingAgentTask({
13358
13600
  gateway,
13359
- signal: context.abortSignal,
13601
+ signal: childSignal.signal,
13360
13602
  waitForInbound: opts.resolveWaitForInbound?.(context.turnId),
13361
13603
  background: run_in_background === true,
13362
13604
  ...hooks.cancelCause ? { cancelCause: hooks.cancelCause } : {},
@@ -13385,6 +13627,16 @@ async function createSubagentRuntime(input) {
13385
13627
  ...hooks.teammate ? { teammate: hooks.teammate } : {}
13386
13628
  };
13387
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
+ });
13388
13640
  taskViews.set(String(task.taskId), tracker.viewId);
13389
13641
  if (agentName.length > 0) agentNames.register(agentName, String(task.taskId), parentKey);
13390
13642
  const visible = new Set(activity.getSnapshot().map((value) => value.viewId));
@@ -13435,6 +13687,8 @@ async function createSubagentRuntime(input) {
13435
13687
  mode: "isolated",
13436
13688
  backend: "git-worktree",
13437
13689
  retention: "retain-changed",
13690
+ ...worktreeBase !== void 0 ? { baseRef: worktreeBase } : {},
13691
+ ...worktreeLabel !== void 0 ? { label: worktreeLabel } : {},
13438
13692
  ...subdirectory ? { subdirectory } : {}
13439
13693
  } : { mode: "shared" },
13440
13694
  // The same labels the monitor was seeded with, sent down so the
@@ -13453,7 +13707,7 @@ async function createSubagentRuntime(input) {
13453
13707
  // a delegation trace exists to record — who dispatched whom
13454
13708
  // — is the thing that goes missing.
13455
13709
  ...context.parentSpan ? { parentSpan: context.parentSpan } : {},
13456
- configOverrides,
13710
+ configOverrides: { ...configOverrides, ...childLimits },
13457
13711
  onEvent: hooks.onEvent ? (event) => {
13458
13712
  tracker.onEvent(event);
13459
13713
  hooks.onEvent?.(event);
@@ -13462,12 +13716,14 @@ async function createSubagentRuntime(input) {
13462
13716
  });
13463
13717
  if (outcome.kind === "yielded" && run_in_background !== true)
13464
13718
  activity.markReleased(tracker.viewId);
13719
+ await ownerWritten;
13465
13720
  return { outcome, agentId };
13466
13721
  } catch (error) {
13467
13722
  tracker.fail(error);
13468
13723
  throw error;
13469
13724
  } finally {
13470
13725
  if (!taskOwnsCleanup) cleanupDefinition();
13726
+ cleanupSignal?.();
13471
13727
  }
13472
13728
  }, "launchChild");
13473
13729
  const childReview = /* @__PURE__ */ __name((turnId, declared) => {
@@ -13477,7 +13733,11 @@ async function createSubagentRuntime(input) {
13477
13733
  const teammateOpts = {
13478
13734
  ...opts,
13479
13735
  childExtraTools: /* @__PURE__ */ __name(() => [
13480
- 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
+ )
13481
13741
  ], "childExtraTools")
13482
13742
  };
13483
13743
  const registerSpecialist = /* @__PURE__ */ __name((input2) => {
@@ -13509,7 +13769,7 @@ ${persona}` : persona || (readOnlyType !== void 0 ? READ_ONLY_PROMPTS.get(readOn
13509
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.',
13510
13770
  'Use the default "general-purpose" when the task must change files or run commands.',
13511
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.',
13512
- '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.',
13513
13773
  "Define a specialist inline with `role` \u2014 a system prompt describing who the sub-agent is and how to behave (e.g.",
13514
13774
  '"You are a security auditor; flag vulnerabilities and rate severity"); with `subagent_type: "explore"` or `"plan"` the role keeps the read-only roster.',
13515
13775
  "Omit `role` for the plain sub-agent.",
@@ -13519,7 +13779,8 @@ ${persona}` : persona || (readOnlyType !== void 0 ? READ_ONLY_PROMPTS.get(readOn
13519
13779
  "These fields are display annotations only; they do not create dependencies, barriers, or serial execution.",
13520
13780
  fileAgentSummary.length > 0 ? `Project-defined types: ${fileAgentSummary}.` : "",
13521
13781
  // Said only to a session that started with teammates on; the call itself is decided at each call.
13522
- 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.` : ""
13523
13784
  ].filter((part) => part.length > 0).join(" "),
13524
13785
  inputSchema: mcpJsonSchemaToZod({
13525
13786
  type: "object",
@@ -13546,11 +13807,30 @@ ${persona}` : persona || (readOnlyType !== void 0 ? READ_ONLY_PROMPTS.get(readOn
13546
13807
  enum: ["shared", "worktree"],
13547
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."
13548
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
+ },
13549
13819
  subagent_type: {
13550
13820
  type: "string",
13551
13821
  enum: [...agentTypeIds, ...refusedTypeIds],
13552
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(", ")}.` : ""}`
13553
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
+ },
13554
13834
  model: {
13555
13835
  type: "string",
13556
13836
  description: "Exact child model ID. Omit to inherit the session model. Use agent_models to discover available IDs; do not search repository files."
@@ -14742,6 +15022,10 @@ ${message}` : message;
14742
15022
  const teamTurnByLead = /* @__PURE__ */ new Map();
14743
15023
  const teamTurnFor = /* @__PURE__ */ __name(async (context) => {
14744
15024
  const parent = await resolveParent(context.turnId);
15025
+ if (opts.unattendedTeams) {
15026
+ teamTurnByLead.set(String(parent.sessionId), context.turnId);
15027
+ return context.turnId;
15028
+ }
14745
15029
  const key = sessionKey(parent);
14746
15030
  let turn = teamTurnIds.get(key);
14747
15031
  if (turn === void 0) {
@@ -14819,7 +15103,10 @@ ${message}` : message;
14819
15103
  name: spec.member.name,
14820
15104
  prompt: `${spec.prompt}
14821
15105
 
14822
- ${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
+ })}`,
14823
15110
  run_in_background: true
14824
15111
  },
14825
15112
  pending.context,
@@ -15032,6 +15319,14 @@ ${planText}`
15032
15319
  notifyTeam();
15033
15320
  }
15034
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
+ }
15035
15330
  teamRunner?.noteAnswer(target.team, target.name, {
15036
15331
  callIds,
15037
15332
  allow: allowed,
@@ -15059,10 +15354,7 @@ ${planText}`
15059
15354
  return fail2(
15060
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."
15061
15356
  );
15062
- if (call.workspace === "worktree")
15063
- return fail2(
15064
- "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."
15065
- );
15357
+ const inWorktree = call.workspace === "worktree";
15066
15358
  const problem = agentNameProblem(name, { team: true });
15067
15359
  if (problem) return fail2(problem);
15068
15360
  const parent = await resolveParent(context.turnId);
@@ -15076,12 +15368,13 @@ ${planText}`
15076
15368
  prompt: call.prompt,
15077
15369
  cwd: opts.cwd,
15078
15370
  ...call.subagent_type !== void 0 ? { agentType: call.subagent_type } : {},
15079
- ...call.model !== void 0 ? { model: call.model } : {}
15371
+ ...call.model !== void 0 ? { model: call.model } : {},
15372
+ ...inWorktree ? { oneShot: true } : {}
15080
15373
  });
15081
15374
  const started = handover.started;
15082
15375
  return {
15083
15376
  success: true,
15084
- 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.`,
15085
15378
  data: {
15086
15379
  teammate: member.name,
15087
15380
  team,
@@ -15256,11 +15549,25 @@ ${planText}`
15256
15549
  };
15257
15550
  }
15258
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");
15259
15565
  let closePromise;
15260
15566
  const close = /* @__PURE__ */ __name(() => {
15261
15567
  if (closePromise) return closePromise;
15262
15568
  closed = true;
15263
15569
  closePromise = (async () => {
15570
+ await saveTeammatesBeforeStop();
15264
15571
  teamRunner?.close();
15265
15572
  for (const off of hookedLists.values()) off();
15266
15573
  hookedLists.clear();
@@ -15487,12 +15794,12 @@ function agentTaskOutcome(task) {
15487
15794
  __name(agentTaskOutcome, "agentTaskOutcome");
15488
15795
  function workspaceData(task) {
15489
15796
  const meta = task.workspace?.meta;
15490
- 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 } : {};
15491
15798
  }
15492
15799
  __name(workspaceData, "workspaceData");
15493
15800
  function workspaceRemoved(task) {
15494
15801
  const meta = task.workspace?.meta;
15495
- return meta?.backend === "git-worktree" && !existsSync2(meta.worktreePath);
15802
+ return meta?.backend === "git-worktree" && !existsSync3(meta.worktreePath);
15496
15803
  }
15497
15804
  __name(workspaceRemoved, "workspaceRemoved");
15498
15805
  function workspaceNote(task) {
@@ -15685,12 +15992,16 @@ function decideTeams(input) {
15685
15992
  reason: "env-off",
15686
15993
  text: `Teammates are off: ${TEAMS_ENV} is set to ${word2}.`
15687
15994
  };
15688
- if (!input.interactive)
15689
- return {
15690
- enabled: false,
15691
- reason: "headless",
15692
- text: "Teammates run only in a conversation with a person at it, not in a one-shot or scheduled run."
15693
- };
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
+ }
15694
16005
  if (word2 !== void 0 && ON_WORDS.has(word2)) return { enabled: true, source: "env" };
15695
16006
  if (input.config()?.enabled === true) return { enabled: true, source: "setting" };
15696
16007
  return {
@@ -15716,7 +16027,8 @@ function createTeamsHost(source, overrides = {}) {
15716
16027
  enabled: /* @__PURE__ */ __name(() => decideTeams({
15717
16028
  config: source.config,
15718
16029
  env: source.env ?? (() => process.env),
15719
- interactive: true
16030
+ interactive: source.unattended === void 0,
16031
+ ...source.unattended ? { unattended: source.unattended } : {}
15720
16032
  }), "enabled"),
15721
16033
  limits: /* @__PURE__ */ __name(() => teamsLimits(source.config()), "limits"),
15722
16034
  store: new TeamStore(),
@@ -15781,14 +16093,14 @@ async function listWorkflowRuns(runsDirectory) {
15781
16093
  __name(listWorkflowRuns, "listWorkflowRuns");
15782
16094
 
15783
16095
  // src/integrations/workflows/host.ts
15784
- import { randomBytes as randomBytes3 } from "node:crypto";
15785
- import { existsSync as existsSync4 } from "node:fs";
16096
+ import { randomBytes as randomBytes2 } from "node:crypto";
16097
+ import { existsSync as existsSync5 } from "node:fs";
15786
16098
  import { readFile as readFile9 } from "node:fs/promises";
15787
16099
  import { join as join15 } from "node:path";
15788
16100
 
15789
16101
  // src/integrations/workflows/orphans.ts
15790
- import { existsSync as existsSync3, mkdirSync as mkdirSync2, writeFileSync } from "node:fs";
15791
- 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";
15792
16104
  import { dirname as dirname4, join as join14 } from "node:path";
15793
16105
  var NOTICE_FILE = "orphan-notice.json";
15794
16106
  var MAX_ORPHAN_NOTICES = 20;
@@ -15925,7 +16237,7 @@ async function recoverUnfinishedWorkflows(options) {
15925
16237
  (key) => !state.results.has(key) && !state.failed.has(key)
15926
16238
  ).length;
15927
16239
  const copy = editableCopyPath(options.runsDirectory, name, runId);
15928
- const script = started.scriptPath ?? (existsSync3(copy) ? copy : void 0);
16240
+ const script = started.scriptPath ?? (existsSync4(copy) ? copy : void 0);
15929
16241
  text2 = [
15930
16242
  `Background workflow ${quotedName(name)} (run ${runId}) didn't finish before the previous session ended.`,
15931
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.`,
@@ -15991,7 +16303,7 @@ async function keyMismatchOf(dir, runId, key) {
15991
16303
  __name(keyMismatchOf, "keyMismatchOf");
15992
16304
  async function storeNotice(runsDirectory, notice2, replace) {
15993
16305
  try {
15994
- await writeFile3(noticePath(runsDirectory, notice2.runId), JSON.stringify(notice2), {
16306
+ await writeFile4(noticePath(runsDirectory, notice2.runId), JSON.stringify(notice2), {
15995
16307
  mode: 384,
15996
16308
  flag: replace ? "w" : "wx"
15997
16309
  });
@@ -16005,7 +16317,7 @@ async function markOrphanNoticesDelivered(runsDirectory, runIds) {
16005
16317
  for (const runId of runIds) {
16006
16318
  const stored = await readStored(runsDirectory, runId);
16007
16319
  if (!stored || stored.delivered) continue;
16008
- await writeFile3(
16320
+ await writeFile4(
16009
16321
  noticePath(runsDirectory, runId),
16010
16322
  JSON.stringify({ ...stored, delivered: true }),
16011
16323
  {
@@ -16240,7 +16552,7 @@ function createWorkflowRunId(isTaken = () => false) {
16240
16552
  for (; ; ) {
16241
16553
  let body2 = "";
16242
16554
  while (body2.length < 8) {
16243
- for (const byte of randomBytes3(16)) {
16555
+ for (const byte of randomBytes2(16)) {
16244
16556
  if (byte >= 252) continue;
16245
16557
  body2 += ALPHABET[byte % 36];
16246
16558
  if (body2.length === 8) break;
@@ -16506,7 +16818,7 @@ function createWorkflowHost(options) {
16506
16818
  if (state === "ended") registry.discard(runId);
16507
16819
  } else {
16508
16820
  runId = createWorkflowRunId(
16509
- (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))
16510
16822
  );
16511
16823
  }
16512
16824
  const turn = options.openRunTurn(context.turnId, runId);
@@ -16832,8 +17144,8 @@ function createAnchorCaution(deps) {
16832
17144
  __name(createAnchorCaution, "createAnchorCaution");
16833
17145
 
16834
17146
  // src/memory/curation-runtime.ts
16835
- import { appendFile as appendFile3, mkdir as mkdir6 } from "node:fs/promises";
16836
- 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";
16837
17149
 
16838
17150
  // src/memory/curator.ts
16839
17151
  import { createHash as createHash5 } from "node:crypto";
@@ -16923,6 +17235,12 @@ ${preview(derived.text, directory)}`
16923
17235
  return sections.length > 0 ? sections.join("\n\n") : null;
16924
17236
  }
16925
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");
16926
17244
 
16927
17245
  // src/memory/sweep.ts
16928
17246
  var DEFAULT_RETIRE_AFTER_DAYS = 21;
@@ -17749,6 +18067,7 @@ var MemoryCurator = class {
17749
18067
  }
17750
18068
  #deps;
17751
18069
  #now;
18070
+ #waitLogged = false;
17752
18071
  constructor(deps) {
17753
18072
  this.#deps = deps;
17754
18073
  this.#now = deps.now ?? Date.now;
@@ -17756,6 +18075,21 @@ var MemoryCurator = class {
17756
18075
  #log(entry) {
17757
18076
  this.#deps.log?.({ at: this.#now(), ...entry });
17758
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
+ }
17759
18093
  /** Write each claim set as the screened promoter would. */
17760
18094
  async #fallback(candidates, reason, started, indexes) {
17761
18095
  for (const [index, candidate] of candidates.entries()) {
@@ -17805,10 +18139,7 @@ var MemoryCurator = class {
17805
18139
  const usable = candidates.filter(holdsClaims2);
17806
18140
  if (usable.length === 0) return { lines: [], engine: "fallback" };
17807
18141
  const side = this.#deps.sideModel();
17808
- if (!side) {
17809
- await this.#fallback(usable, "no side model", started);
17810
- return { lines: [], engine: "fallback" };
17811
- }
18142
+ if (!side) return this.#wait("no side model", started);
17812
18143
  const controller = new AbortController();
17813
18144
  let timedOut = false;
17814
18145
  const onAbort = /* @__PURE__ */ __name(() => controller.abort(context.signal?.reason), "onAbort");
@@ -17826,6 +18157,7 @@ var MemoryCurator = class {
17826
18157
  let reply;
17827
18158
  let neighbours = [];
17828
18159
  let fallback;
18160
+ let waiting;
17829
18161
  try {
17830
18162
  const work = (async () => {
17831
18163
  const route = await side.route(context.sessionId, controller.signal);
@@ -17844,7 +18176,7 @@ var MemoryCurator = class {
17844
18176
  work.catch(() => {
17845
18177
  });
17846
18178
  const outcome = await Promise.race([work, deadline]);
17847
- if (outcome === "main route") fallback = "main route";
18179
+ if (outcome === "main route") waiting = "main route";
17848
18180
  else if (outcome === "deadline" || timedOut) fallback = "timeout";
17849
18181
  else if (outcome === void 0) fallback = "error";
17850
18182
  else reply = outcome;
@@ -17854,6 +18186,7 @@ var MemoryCurator = class {
17854
18186
  if (timer) clearTimeout(timer);
17855
18187
  context.signal?.removeEventListener("abort", onAbort);
17856
18188
  }
18189
+ if (waiting !== void 0) return this.#wait(waiting, started);
17857
18190
  const ops = reply === void 0 ? void 0 : parseOps(reply, usable.length);
17858
18191
  if (fallback === void 0 && ops === void 0) fallback = "invalid";
17859
18192
  if (fallback !== void 0 || ops === void 0) {
@@ -18102,206 +18435,38 @@ ${op.content}`,
18102
18435
  }
18103
18436
  };
18104
18437
 
18105
- // src/memory/curation-runtime.ts
18106
- var CURATION_IDLE_MS = 15e3;
18107
- var CURATION_DISPOSE_MS = 8e3;
18108
- var CurationRuntime = class {
18109
- static {
18110
- __name(this, "CurationRuntime");
18111
- }
18112
- #deps;
18113
- #timer = null;
18114
- #disposed = false;
18115
- #draining = 0;
18116
- /** A turn is between its start and its settling: no drain begins meanwhile. */
18117
- #turnRunning = false;
18118
- /** A drain was asked for while a turn ran; it is armed when the turn settles. */
18119
- #deferred = false;
18120
- constructor(deps) {
18121
- this.#deps = deps;
18122
- }
18123
- /** Whether a drain is in flight right now. */
18124
- get draining() {
18125
- return this.#draining > 0;
18126
- }
18127
- #cancel() {
18128
- if (this.#timer === null) return;
18129
- this.#deps.clearTimer(this.#timer);
18130
- this.#timer = null;
18131
- }
18132
- /** A turn appended to the inbox as it settled: arm the idle drain. */
18133
- appended() {
18134
- if (this.#disposed) return;
18135
- this.#cancel();
18136
- if (this.#turnRunning) {
18137
- this.#deferred = true;
18138
- return;
18139
- }
18140
- this.#armIdle();
18141
- }
18142
- #armIdle() {
18143
- this.#cancel();
18144
- this.#timer = this.#deps.setTimer(() => {
18145
- this.#timer = null;
18146
- if (this.#turnRunning) {
18147
- this.#deferred = true;
18148
- return;
18149
- }
18150
- if (this.#deps.isBusy?.() === true) {
18151
- this.#deps.report?.("idle", "skipped");
18152
- this.#armIdle();
18153
- return;
18154
- }
18155
- void this.drain("idle");
18156
- }, this.#deps.idleMs ?? CURATION_IDLE_MS);
18157
- }
18158
- /**
18159
- * A turn is starting. Nothing is drained while it runs, so curation never
18160
- * competes with a streaming reply or a running tool and the turn's first
18161
- * request never waits for it. What was waiting drains after the turn
18162
- * settles. A drain already in flight is neither waited for nor stopped: it
18163
- * is one bounded side-model call (`CURATE_DEADLINE_MS`) that finishes by
18164
- * itself, and stopping it would throw its work away. It starts no new one.
18165
- */
18166
- turnStarted() {
18167
- if (this.#disposed) return;
18168
- this.#turnRunning = true;
18169
- this.#deferred = true;
18170
- this.#cancel();
18171
- }
18172
- /** The turn settled: the quiet pause begins, and what waited drains at its end. */
18173
- turnSettled() {
18174
- if (this.#disposed || !this.#turnRunning) return;
18175
- this.#turnRunning = false;
18176
- if (!this.#deferred) return;
18177
- this.#deferred = false;
18178
- this.#armIdle();
18179
- }
18180
- /** The session opened. Drains now when a turn can carry the cost, else leaves it for the first turn. */
18181
- start() {
18182
- if (this.#disposed) return;
18183
- void this.drain("start");
18184
- }
18185
- /** Drain for the last time. Nothing is armed afterwards. */
18186
- async dispose() {
18187
- if (this.#disposed) return;
18188
- this.#disposed = true;
18189
- this.#cancel();
18190
- const closing = new AbortController();
18191
- const timer = this.#deps.setTimer(
18192
- () => closing.abort(new Error("Memory curation did not finish while closing.")),
18193
- CURATION_DISPOSE_MS
18194
- );
18195
- try {
18196
- await this.drain("dispose", closing.signal);
18197
- } finally {
18198
- this.#deps.clearTimer(timer);
18199
- }
18200
- }
18201
- /** Empty the inbox once. Never rejects. */
18202
- async drain(reason, signal) {
18203
- const { inbox, curator } = this.#deps;
18204
- if (this.#turnRunning && reason !== "dispose") {
18205
- this.#deferred = true;
18206
- this.#deps.report?.(reason, "skipped");
18207
- return void 0;
18208
- }
18209
- const turn = this.#deps.turn();
18210
- if (turn === void 0 && this.#deps.hasSideModel()) {
18211
- this.#deps.report?.(reason, "skipped");
18212
- return void 0;
18213
- }
18214
- this.#draining += 1;
18215
- try {
18216
- const lines = [];
18217
- const result = await inbox.drain(async (entries) => {
18218
- const out = await curator.curate(
18219
- entries.map((entry) => entry.candidate),
18220
- {
18221
- // Without a side model nothing is charged, so these are never read.
18222
- sessionId: turn?.sessionId ?? "",
18223
- turnId: turn?.turnId ?? "",
18224
- ...signal ? { signal } : {}
18225
- }
18226
- );
18227
- lines.push(...out.lines);
18228
- });
18229
- this.#deps.report?.(reason, result);
18230
- if (lines.length > 0) this.#deps.onChange?.(lines);
18231
- return result;
18232
- } catch {
18233
- this.#deps.report?.(reason, "failed");
18234
- return void 0;
18235
- } finally {
18236
- this.#draining -= 1;
18237
- }
18238
- }
18239
- };
18240
- function createCurationLog(file) {
18241
- let tail2;
18242
- const write = /* @__PURE__ */ __name((entry) => {
18243
- const line = `${JSON.stringify(entry)}
18244
- `;
18245
- tail2 ??= mkdir6(dirname5(file), { recursive: true, mode: 448 }).then(
18246
- () => void 0,
18247
- () => void 0
18248
- );
18249
- tail2 = tail2.then(() => appendFile3(file, line, { mode: 384 })).catch(() => {
18250
- });
18251
- }, "write");
18252
- return Object.assign(write, { settled: /* @__PURE__ */ __name(() => tail2 ?? Promise.resolve(), "settled") });
18253
- }
18254
- __name(createCurationLog, "createCurationLog");
18255
- function inboxPromotion(options) {
18256
- return async (candidate) => {
18257
- if (!holdsClaims2(candidate)) return;
18258
- try {
18259
- await options.inbox.append(candidate);
18260
- } catch {
18261
- await options.fallback(candidate);
18262
- return;
18263
- }
18264
- options.appended();
18265
- };
18266
- }
18267
- __name(inboxPromotion, "inboxPromotion");
18268
- function composeMemoryPromotion(options) {
18269
- const { curation } = options;
18270
- if (!curation) return options.gate(options.written);
18271
- return options.screen(
18272
- options.gate(
18273
- inboxPromotion({
18274
- inbox: options.inbox,
18275
- fallback: options.written,
18276
- appended: /* @__PURE__ */ __name(() => curation.appended(), "appended")
18277
- })
18278
- )
18279
- );
18280
- }
18281
- __name(composeMemoryPromotion, "composeMemoryPromotion");
18282
-
18283
18438
  // src/memory/inbox.ts
18284
18439
  import { randomUUID as randomUUID5 } from "node:crypto";
18285
18440
  import {
18286
- appendFile as appendFile4,
18287
- mkdir as mkdir7,
18441
+ appendFile as appendFile3,
18442
+ mkdir as mkdir6,
18288
18443
  open as open4,
18289
18444
  readFile as readFile11,
18290
18445
  readdir as readdir4,
18291
18446
  rename as rename4,
18292
18447
  stat as stat6,
18293
18448
  unlink as unlink3,
18294
- writeFile as writeFile4
18449
+ writeFile as writeFile5
18295
18450
  } from "node:fs/promises";
18296
- 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";
18297
18452
  var INBOX_BATCH_SIZE = 8;
18298
18453
  var INBOX_MAX_BATCHES = 3;
18299
18454
  var INBOX_CLAIM_STALE_MS = 12e4;
18455
+ var INBOX_MAX_ENTRIES = 200;
18300
18456
  var INBOX_MAX_ATTEMPTS = 3;
18301
18457
  var APPEND_ATTEMPTS = 5;
18302
18458
  var CLAIM_PATTERN = /\.claim-(\d+)-[0-9a-f-]+\.jsonl$/u;
18303
18459
  var CLAIM_FILE_MODE = 384;
18304
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
+ };
18305
18470
  function parseLines(text2) {
18306
18471
  const out = [];
18307
18472
  for (const line of text2.split("\n")) {
@@ -18353,7 +18518,7 @@ var MemoryInbox = class {
18353
18518
  return this.#file;
18354
18519
  }
18355
18520
  async #ensureDirectory() {
18356
- await mkdir7(dirname6(this.#file), { recursive: true, mode: DIRECTORY_MODE });
18521
+ await mkdir6(dirname5(this.#file), { recursive: true, mode: DIRECTORY_MODE });
18357
18522
  }
18358
18523
  /** Append one candidate. One write of one line, so a concurrent append never interleaves. */
18359
18524
  async append(candidate) {
@@ -18389,14 +18554,14 @@ var MemoryInbox = class {
18389
18554
  }
18390
18555
  #newClaimPath(now) {
18391
18556
  return join17(
18392
- dirname6(this.#file),
18557
+ dirname5(this.#file),
18393
18558
  `${basename4(this.#file, ".jsonl")}.claim-${now}-${this.#newId()}.jsonl`
18394
18559
  );
18395
18560
  }
18396
18561
  async #claimFiles() {
18397
18562
  let names;
18398
18563
  try {
18399
- names = await readdir4(dirname6(this.#file));
18564
+ names = await readdir4(dirname5(this.#file));
18400
18565
  } catch (error) {
18401
18566
  if (error.code === "ENOENT") return [];
18402
18567
  throw error;
@@ -18407,7 +18572,7 @@ var MemoryInbox = class {
18407
18572
  if (!name.startsWith(prefix)) continue;
18408
18573
  const match = CLAIM_PATTERN.exec(name);
18409
18574
  if (!match) continue;
18410
- 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]) });
18411
18576
  }
18412
18577
  return out.sort((a, b) => a.at - b.at);
18413
18578
  }
@@ -18473,13 +18638,18 @@ var MemoryInbox = class {
18473
18638
  let dropped = 0;
18474
18639
  const failed = [];
18475
18640
  let batches = 0;
18641
+ let held2 = false;
18476
18642
  while (pending.length > 0 && batches < maxBatches) {
18477
18643
  const batch = pending.slice(0, batchSize);
18478
18644
  batches += 1;
18479
18645
  try {
18480
18646
  await handle(batch);
18481
18647
  applied += batch.length;
18482
- } catch {
18648
+ } catch (error) {
18649
+ if (error instanceof InboxHold) {
18650
+ held2 = true;
18651
+ break;
18652
+ }
18483
18653
  for (const entry of batch) {
18484
18654
  const next = { ...entry, attempts: entry.attempts + 1 };
18485
18655
  if (next.attempts >= INBOX_MAX_ATTEMPTS) dropped += 1;
@@ -18489,14 +18659,18 @@ var MemoryInbox = class {
18489
18659
  pending = pending.slice(batch.length);
18490
18660
  await atomicWrite(claimPath, serialize([...failed, ...pending]));
18491
18661
  }
18492
- 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
+ }
18493
18667
  if (keep.length > 0) {
18494
18668
  await this.#ensureDirectory();
18495
- await appendFile4(this.#file, serialize(keep), { mode: CLAIM_FILE_MODE });
18669
+ await appendFile3(this.#file, serialize(keep), { mode: CLAIM_FILE_MODE });
18496
18670
  }
18497
18671
  await unlink3(claimPath).catch(() => {
18498
18672
  });
18499
- return { applied, kept: keep.length, dropped };
18673
+ return { applied, kept: keep.length, dropped, ...held2 ? { held: keep.length } : {} };
18500
18674
  }
18501
18675
  };
18502
18676
  function dedupe(entries) {
@@ -18512,11 +18686,220 @@ function dedupe(entries) {
18512
18686
  __name(dedupe, "dedupe");
18513
18687
  async function atomicWrite(path, text2) {
18514
18688
  const temp = `${path}.${randomUUID5()}.tmp`;
18515
- await writeFile4(temp, text2, { mode: CLAIM_FILE_MODE });
18689
+ await writeFile5(temp, text2, { mode: CLAIM_FILE_MODE });
18516
18690
  await rename4(temp, path);
18517
18691
  }
18518
18692
  __name(atomicWrite, "atomicWrite");
18519
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
+
18520
18903
  // src/memory/lifecycle.ts
18521
18904
  var SWEEP_IDLE_MS = 15e3;
18522
18905
  var SWEEP_MIN_GAP_MS = 6 * 36e5;
@@ -18688,7 +19071,7 @@ var MemoryLifecycle = class {
18688
19071
  };
18689
19072
 
18690
19073
  // src/memory/screen-archive.ts
18691
- import { access as access2, writeFile as writeFile5 } from "node:fs/promises";
19074
+ import { access as access3, writeFile as writeFile6 } from "node:fs/promises";
18692
19075
  import { join as join18 } from "node:path";
18693
19076
  var SCREEN_MARKER_FILE = ".derived-screen-v1";
18694
19077
  var HEADINGS = {
@@ -18751,7 +19134,7 @@ async function archiveUnscreenedRecords(options) {
18751
19134
  if (options.disabled) return { ran: false, archived: 0, skipped: 0 };
18752
19135
  const marker = join18(directory, SCREEN_MARKER_FILE);
18753
19136
  try {
18754
- if (await access2(marker).then(
19137
+ if (await access3(marker).then(
18755
19138
  () => true,
18756
19139
  () => false
18757
19140
  )) {
@@ -18778,7 +19161,7 @@ async function archiveUnscreenedRecords(options) {
18778
19161
  skipped += 1;
18779
19162
  }
18780
19163
  }
18781
- await writeFile5(marker, "", { flag: "w" });
19164
+ await writeFile6(marker, "", { flag: "w" });
18782
19165
  log.info("memory screen pass finished", {
18783
19166
  "namzu.memory.screen.archived_count": archived,
18784
19167
  "namzu.memory.screen.skipped_count": skipped
@@ -18931,12 +19314,12 @@ __name(memorySelectionOptions, "memorySelectionOptions");
18931
19314
 
18932
19315
  // src/memory/usage.ts
18933
19316
  import { randomUUID as randomUUID6 } from "node:crypto";
18934
- 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";
18935
19318
  import { dirname as dirname7 } from "node:path";
18936
19319
  var VERSION = 1;
18937
19320
  var nodeUsageFs = {
18938
19321
  readFile: /* @__PURE__ */ __name((path) => readFile12(path, "utf8"), "readFile"),
18939
- writeFile: /* @__PURE__ */ __name((path, data) => writeFile6(path, data, { mode: 384 }), "writeFile"),
19322
+ writeFile: /* @__PURE__ */ __name((path, data) => writeFile7(path, data, { mode: 384 }), "writeFile"),
18940
19323
  rename: rename5,
18941
19324
  mkdir: /* @__PURE__ */ __name(async (path) => {
18942
19325
  await mkdir8(path, { recursive: true, mode: 448 });
@@ -19675,7 +20058,7 @@ function terminalProviderRetry(restartableOutput) {
19675
20058
  __name(terminalProviderRetry, "terminalProviderRetry");
19676
20059
 
19677
20060
  // src/reminders/index.ts
19678
- import { existsSync as existsSync5 } from "node:fs";
20061
+ import { existsSync as existsSync6 } from "node:fs";
19679
20062
 
19680
20063
  // src/reminders/changed-files.ts
19681
20064
  import { open as open5, stat as stat7 } from "node:fs/promises";
@@ -19953,9 +20336,9 @@ __name(environmentReminders, "environmentReminders");
19953
20336
 
19954
20337
  // src/reminders/hypermode.ts
19955
20338
  var HYPERMODE_REMINDER_EVERY = 10;
19956
- 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.";
19957
- 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.";
19958
- 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.";
19959
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.";
19960
20343
  var EXIT = "Hypermode is off: the `workflow` tool's standard opt-in rule applies again.";
19961
20344
  function scan(messages) {
@@ -20592,7 +20975,7 @@ function createCliReminderSource(options) {
20592
20975
  messages,
20593
20976
  mode: options.mode(),
20594
20977
  planPath,
20595
- planExists: (options.planExists ?? existsSync5)(planPath),
20978
+ planExists: (options.planExists ?? existsSync6)(planPath),
20596
20979
  canAsk: options.canAsk === true
20597
20980
  })
20598
20981
  );
@@ -22972,7 +23355,7 @@ function eagerToolsWithDelegation(eager, delegationOffered) {
22972
23355
  }
22973
23356
  __name(eagerToolsWithDelegation, "eagerToolsWithDelegation");
22974
23357
  function delegationIsBusy(state) {
22975
- return state.hypermode || state.liveAgents > 0 || state.runningWorkflows > 0;
23358
+ return state.hypermode || state.keyword === true || state.liveAgents > 0 || state.runningWorkflows > 0;
22976
23359
  }
22977
23360
  __name(delegationIsBusy, "delegationIsBusy");
22978
23361
  function eagerToolsFor(opts) {
@@ -23077,13 +23460,13 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
23077
23460
  const modelEnvironment = readModelLaunchEnvironment();
23078
23461
  const toolLoadingDeferred = resolveToolLoading(options.toolLoading) === "deferred";
23079
23462
  if (options.palEnvironment) {
23080
- const { createPalAgentSession } = await import("./agent-session-NMIKA55B.js");
23463
+ const { createPalAgentSession } = await import("./agent-session-SNTV4WJB.js");
23081
23464
  return createPalAgentSession(prefs, detectedProviders, options);
23082
23465
  }
23083
23466
  let detected = detectedProviders;
23084
23467
  const { palAtWorkspace } = await startupTime(
23085
23468
  "session_build.pal_store",
23086
- () => import("./store-3REZKYH5.js")
23469
+ () => import("./store-EQF6SI3V.js")
23087
23470
  );
23088
23471
  if (palAtWorkspace(options.cwd ?? process.cwd()))
23089
23472
  throw new Error("This Pal requires its owned virtual computer. Open it with namzu pal chat.");
@@ -23996,6 +24379,7 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
23996
24379
  const delegationScopes = /* @__PURE__ */ new Map();
23997
24380
  let latestTurn;
23998
24381
  const delegationLimits = /* @__PURE__ */ new Map();
24382
+ const delegationStartedAt = /* @__PURE__ */ new Map();
23999
24383
  const workflowTokenTargets = /* @__PURE__ */ new Map();
24000
24384
  const delegationModels = /* @__PURE__ */ new Map();
24001
24385
  const delegatedInputWaiters = /* @__PURE__ */ new Map();
@@ -24100,9 +24484,10 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
24100
24484
  );
24101
24485
  for (const problem of pluginFiles.problems) cliLogger().warn(problem);
24102
24486
  let subagentRuntime;
24103
- const teamsHost = options.teams && options.askUser ? createTeamsHost({
24487
+ const teamsHost = options.teams && (options.askUser || options.teams.unattended !== void 0) ? createTeamsHost({
24104
24488
  config: options.teams.config,
24105
- ...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 } : {}
24106
24491
  }) : void 0;
24107
24492
  let allowedAgentIds = [];
24108
24493
  const agentHooks = createAgentHooksHost({
@@ -24153,6 +24538,7 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
24153
24538
  },
24154
24539
  ...options.ephemeral ? { ephemeral: true } : {},
24155
24540
  ...teamsHost ? { teams: teamsHost } : {},
24541
+ ...teamsHost && !options.askUser && options.teams?.unattended ? { unattendedTeams: true } : {},
24156
24542
  // An operator is watching: agents run in the background by default and
24157
24543
  // the turn ends without waiting for them.
24158
24544
  ...options.askUser ? { backgroundByDefault: true } : {},
@@ -24174,8 +24560,10 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
24174
24560
  maxIterations: options.limits?.maxIterations,
24175
24561
  maxResponseTokens: options.limits?.maxResponseTokens,
24176
24562
  resolveLimits: /* @__PURE__ */ __name((turnId) => delegationLimits.get(turnId), "resolveLimits"),
24563
+ resolveTurnStartedAt: /* @__PURE__ */ __name((turnId) => delegationStartedAt.get(turnId), "resolveTurnStartedAt"),
24177
24564
  resolveTurnModel: /* @__PURE__ */ __name((turnId) => delegationModels.get(turnId), "resolveTurnModel"),
24178
24565
  timeoutMs: options.limits?.timeoutMs,
24566
+ ...options.saveGraceMs ? { saveGraceMs: options.saveGraceMs } : {},
24179
24567
  definitions: discovered.definitions,
24180
24568
  agentHooks,
24181
24569
  refusedDefinitions: discovered.refused,
@@ -24245,12 +24633,17 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
24245
24633
  }), "readEnvironment"),
24246
24634
  // Each child has its own provider instance, never the parent's fallback cursor.
24247
24635
  resolveModel: /* @__PURE__ */ __name(async (request, signal) => {
24248
- const resolution = await resolveModelSwitch(request, {
24249
- currentProvider: primary.id,
24250
- detected,
24251
- describeModels: describeProviderModels,
24252
- signal
24253
- });
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
+ );
24254
24647
  if (resolution.kind === "rejected")
24255
24648
  throw new Error(`${resolution.reason} ${JSON.stringify(resolution.choices ?? [])}`);
24256
24649
  const selection = resolution.selection;
@@ -24423,6 +24816,7 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
24423
24816
  runTurnId,
24424
24817
  delegationLimits.get(originTurnId) ?? resolveTurnGuards(options.limits, void 0)
24425
24818
  );
24819
+ delegationStartedAt.set(runTurnId, delegationStartedAt.get(originTurnId) ?? Date.now());
24426
24820
  delegatedResumeHandlers.set(runTurnId, control.handler);
24427
24821
  delegatedReviewAllowedCalls.set(runTurnId, control.reviewAllowedCalls);
24428
24822
  delegatedModeControls.set(runTurnId, control);
@@ -24436,6 +24830,7 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
24436
24830
  liveModeControls.delete(control);
24437
24831
  delegationScopes.delete(runTurnId);
24438
24832
  delegationLimits.delete(runTurnId);
24833
+ delegationStartedAt.delete(runTurnId);
24439
24834
  delegatedResumeHandlers.delete(runTurnId);
24440
24835
  delegatedReviewAllowedCalls.delete(runTurnId);
24441
24836
  delegatedModeControls.delete(runTurnId);
@@ -24558,7 +24953,7 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
24558
24953
  if (request.type !== "user_question") return { action: "continue" };
24559
24954
  const ask = currentOnQuestion;
24560
24955
  if (!ask) return { action: "continue" };
24561
- const answer = await ask(request.question);
24956
+ const answer = await ask({ ...request.question, discussable: true });
24562
24957
  switch (answer.kind) {
24563
24958
  case "answer":
24564
24959
  return {
@@ -24576,6 +24971,13 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
24576
24971
  };
24577
24972
  case "abort":
24578
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
+ };
24579
24981
  default:
24580
24982
  return { action: "continue" };
24581
24983
  }
@@ -24671,7 +25073,7 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
24671
25073
  );
24672
25074
  toolsets.push(options.toolLoading === "eager" ? settingsToolset : deferred(settingsToolset));
24673
25075
  }
24674
- const operatorPals = await import("./operator-tools-RG247DOI.js");
25076
+ const operatorPals = await import("./operator-tools-LLMFGJWF.js");
24675
25077
  toolsets.push(
24676
25078
  readyWhen(
24677
25079
  toolset(
@@ -25351,6 +25753,7 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
25351
25753
  curation?.turnStarted();
25352
25754
  memoryLifecycle.turnStarted();
25353
25755
  delegationLimits.set(entry2.turnId, resumedLimits);
25756
+ delegationStartedAt.set(entry2.turnId, Date.now());
25354
25757
  if (route && pinned)
25355
25758
  delegationModels.set(entry2.turnId, {
25356
25759
  provider: pinned.provider,
@@ -25493,6 +25896,7 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
25493
25896
  delegatedModeControls.delete(entry2.turnId);
25494
25897
  delegationScopes.delete(entry2.turnId);
25495
25898
  delegationLimits.delete(entry2.turnId);
25899
+ delegationStartedAt.delete(entry2.turnId);
25496
25900
  delegationModels.delete(entry2.turnId);
25497
25901
  await subagentRuntime?.releaseTurn(entry2.turnId);
25498
25902
  }
@@ -25961,6 +26365,12 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
25961
26365
  progressNotices: /* @__PURE__ */ __name(() => progressNotices.look({ ...outstandingFacts(scope2.sessionId), now: Date.now() }), "progressNotices"),
25962
26366
  ...sideModel ? { sideModel } : {},
25963
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"),
25964
26374
  memoryCuration: {
25965
26375
  subscribe: /* @__PURE__ */ __name((listener) => {
25966
26376
  curationListeners.add(listener);
@@ -26018,6 +26428,7 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
26018
26428
  curation?.turnStarted();
26019
26429
  memoryLifecycle.turnStarted();
26020
26430
  delegationLimits.set(turnId, resolveTurnGuards(options.limits, opts?.limits));
26431
+ delegationStartedAt.set(turnId, Date.now());
26021
26432
  delegatedResumeHandlers.set(turnId, control.handler);
26022
26433
  delegatedReviewAllowedCalls.set(turnId, control.reviewAllowedCalls);
26023
26434
  delegatedModeControls.set(turnId, control);
@@ -26029,6 +26440,7 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
26029
26440
  liveModeControls.delete(control);
26030
26441
  delegationScopes.delete(turnId);
26031
26442
  delegationLimits.delete(turnId);
26443
+ delegationStartedAt.delete(turnId);
26032
26444
  delegatedResumeHandlers.delete(turnId);
26033
26445
  delegatedReviewAllowedCalls.delete(turnId);
26034
26446
  delegatedModeControls.delete(turnId);
@@ -26313,6 +26725,7 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
26313
26725
  let runManager = manager;
26314
26726
  const delegationBusy = delegationIsBusy({
26315
26727
  hypermode: opts?.hypermode === true,
26728
+ keyword: opts?.workflow === true || opts?.workflowGuidance === true,
26316
26729
  liveAgents: subagentRuntime?.liveChildSessionIds().size ?? 0,
26317
26730
  // Owners are read against every run (ownedBy forgets a run the
26318
26731
  // registry no longer holds), then narrowed to the ones still running.
@@ -27977,6 +28390,7 @@ function toAgentEvent(event, presenter, readsOnly, cwd) {
27977
28390
  ...tidy?.shell ? { shell: tidy.shell } : {},
27978
28391
  ...event.isError && (unknownTool !== void 0 || event.facts?.kind === "failure" && event.facts.reason === "unknown_tool") ? { unknownTool: true } : {},
27979
28392
  ...event.durationMs !== void 0 ? { durationMs: event.durationMs } : {},
28393
+ ...event.facts?.kind === "questions" ? { questions: event.facts } : {},
27980
28394
  ...view.kind === "generic" && view.visibility === "hidden" ? { hidden: true } : {},
27981
28395
  ...event.isError && view.kind === "generic" && view.outcome === "cancelled" ? { cancelled: true } : {},
27982
28396
  ...view.kind === "generic" && view.declined ? { declined: view.declined } : {},
@@ -28549,6 +28963,7 @@ export {
28549
28963
  renderNoteNotSaved,
28550
28964
  renderTypedNoteResult,
28551
28965
  renderStoredMemorySection,
28966
+ renderWaitingClaims,
28552
28967
  loadManagedMemories,
28553
28968
  originLabel,
28554
28969
  ageLabel,
@@ -28629,4 +29044,4 @@ export {
28629
29044
  pathSummary,
28630
29045
  computerUseStartState
28631
29046
  };
28632
- //# sourceMappingURL=chunk-O4WK5FUN.js.map
29047
+ //# sourceMappingURL=chunk-R3P3IGP2.js.map