@namzu/cli 53.0.1 → 53.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (460) hide show
  1. package/CHANGELOG.md +85 -0
  2. package/dist/bin.js +1 -1
  3. package/dist/chunks/{acp-IOWTKF2X.js → acp-3FNB6MSI.js} +101 -82
  4. package/dist/chunks/acp-3FNB6MSI.js.map +6 -0
  5. package/dist/chunks/{activity-command-U2AOTIVF.js → activity-command-IBOJOCRF.js} +15 -15
  6. package/dist/chunks/{add-YYQLPCP2.js → add-LYBL3IC7.js} +27 -27
  7. package/dist/chunks/{agent-WL6NX4W6.js → agent-LTLWJW3P.js} +47 -43
  8. package/dist/chunks/agent-session-BD2AHK5S.js +77 -0
  9. package/dist/chunks/{apply-at-exit-BRXYTQVG.js → apply-at-exit-7BF3KBU2.js} +8 -8
  10. package/dist/chunks/{archive-UE756BME.js → archive-FCPUCOYT.js} +14 -14
  11. package/dist/chunks/{bin-main-XR2DJOI6.js → bin-main-AVPCWJHJ.js} +14 -14
  12. package/dist/chunks/{binding-HCIPLFUO.js → binding-OZCOSUYV.js} +3 -3
  13. package/dist/chunks/{browser-7SFVCKSO.js → browser-LR25NVO7.js} +6 -6
  14. package/dist/chunks/{chat-K6GQGRUA.js → chat-PP7XU7US.js} +22 -22
  15. package/dist/chunks/{chunk-3NAVAACC.js → chunk-2KNLSJFS.js} +2 -2
  16. package/dist/chunks/{chunk-2VSICYQP.js → chunk-2O6LZGGG.js} +2 -2
  17. package/dist/chunks/{chunk-V7VNFYA4.js → chunk-32LCSSAN.js} +18 -14
  18. package/dist/chunks/chunk-32LCSSAN.js.map +6 -0
  19. package/dist/chunks/{chunk-Z5NMQ2YN.js → chunk-3Q42HHZM.js} +2 -2
  20. package/dist/chunks/{chunk-RAPO3KLG.js → chunk-3WTIGIDA.js} +4 -4
  21. package/dist/chunks/chunk-4JBQTRTF.js +452 -0
  22. package/dist/chunks/chunk-4JBQTRTF.js.map +6 -0
  23. package/dist/chunks/{chunk-NICPMJJQ.js → chunk-4KMFIIWV.js} +6 -5
  24. package/dist/chunks/{chunk-NICPMJJQ.js.map → chunk-4KMFIIWV.js.map} +1 -1
  25. package/dist/chunks/{chunk-5NDRDTNX.js → chunk-4NVFHP23.js} +6 -6
  26. package/dist/chunks/chunk-4NVFHP23.js.map +6 -0
  27. package/dist/chunks/{chunk-FX7BSCB4.js → chunk-4Q4J3KDG.js} +4 -4
  28. package/dist/chunks/{chunk-KO2N6EIF.js → chunk-4VB264C5.js} +13 -13
  29. package/dist/chunks/{chunk-HJILJSZO.js → chunk-4VXS3UYL.js} +2 -2
  30. package/dist/chunks/{chunk-2WDF5N2A.js → chunk-5FEAC3G5.js} +9 -9
  31. package/dist/chunks/{chunk-BHOZPFJM.js → chunk-5HCZHDPA.js} +5 -5
  32. package/dist/chunks/chunk-5OAKUXE3.js +41 -0
  33. package/dist/chunks/chunk-5OAKUXE3.js.map +6 -0
  34. package/dist/chunks/{chunk-U4XNJBDB.js → chunk-5WORROIE.js} +8 -1
  35. package/dist/chunks/{chunk-U4XNJBDB.js.map → chunk-5WORROIE.js.map} +1 -1
  36. package/dist/chunks/{chunk-Z5FDI74K.js → chunk-5YNAPIUZ.js} +6 -6
  37. package/dist/chunks/{chunk-A47ZNTW7.js → chunk-6SHOR62K.js} +3 -3
  38. package/dist/chunks/{chunk-46VSU4QF.js → chunk-72IJ3FQU.js} +2 -2
  39. package/dist/chunks/{chunk-DHS5CQNC.js → chunk-AO4A56EG.js} +12 -12
  40. package/dist/chunks/{chunk-KAPCNFMC.js → chunk-BFCUL4BW.js} +3 -3
  41. package/dist/chunks/{chunk-DOFQWVBL.js → chunk-CKWDYYBE.js} +3 -3
  42. package/dist/chunks/{chunk-J3PHMXN4.js → chunk-CSBKGTBA.js} +4 -4
  43. package/dist/chunks/{chunk-ZMKEYARZ.js → chunk-D3JJE6VZ.js} +6 -6
  44. package/dist/chunks/{chunk-UWN4WNQZ.js → chunk-DEEK2FOC.js} +2 -2
  45. package/dist/chunks/chunk-DEH4YIDN.js +247 -0
  46. package/dist/chunks/chunk-DEH4YIDN.js.map +6 -0
  47. package/dist/chunks/{chunk-F3SQRGKZ.js → chunk-DSMBM5LQ.js} +2 -2
  48. package/dist/chunks/chunk-DZBCLR75.js +526 -0
  49. package/dist/chunks/chunk-DZBCLR75.js.map +6 -0
  50. package/dist/chunks/{chunk-4FV2VZS6.js → chunk-EC2F3CWT.js} +3 -3
  51. package/dist/chunks/{chunk-OBMHA7OP.js → chunk-EMXH2RJN.js} +3 -3
  52. package/dist/chunks/{chunk-MYVF3JRV.js → chunk-EQGE25MQ.js} +6 -6
  53. package/dist/chunks/{chunk-RDW6L3PV.js → chunk-F2TXNDKC.js} +3 -3
  54. package/dist/chunks/{chunk-UMHKTV2L.js → chunk-FAWY4LRG.js} +3 -3
  55. package/dist/chunks/{chunk-LMLJ7NS5.js → chunk-FK6WJQ5T.js} +5 -5
  56. package/dist/chunks/{chunk-EKMHZKVP.js → chunk-FRADQASS.js} +2 -2
  57. package/dist/chunks/{chunk-N56NUKMT.js → chunk-FS7CUHOG.js} +2 -2
  58. package/dist/chunks/{chunk-C5XQHEYB.js → chunk-GFZFGTDZ.js} +2 -2
  59. package/dist/chunks/{chunk-VVWI4EB7.js → chunk-GXCOSOVM.js} +3 -3
  60. package/dist/chunks/{chunk-TI6FFONP.js → chunk-HJJNIG33.js} +2 -2
  61. package/dist/chunks/{chunk-MHXJYXOF.js → chunk-HUDP4HTK.js} +5 -5
  62. package/dist/chunks/{chunk-SHUA4YUK.js → chunk-IBPN346S.js} +2 -2
  63. package/dist/chunks/chunk-IERT7D34.js +226 -0
  64. package/dist/chunks/chunk-IERT7D34.js.map +6 -0
  65. package/dist/chunks/{chunk-Z6J7SVOB.js → chunk-IPAGLYU3.js} +2 -2
  66. package/dist/chunks/{chunk-ZDZ35MMZ.js → chunk-ISHCON5Z.js} +2 -2
  67. package/dist/chunks/{chunk-FEIIR46G.js → chunk-J6I6MCWR.js} +5 -5
  68. package/dist/chunks/{chunk-HGZYNEQE.js → chunk-JFLX34FA.js} +14 -7
  69. package/dist/chunks/chunk-JFLX34FA.js.map +6 -0
  70. package/dist/chunks/{chunk-YELRULQ7.js → chunk-JTEWIH66.js} +4478 -2713
  71. package/dist/chunks/chunk-JTEWIH66.js.map +6 -0
  72. package/dist/chunks/{chunk-X6SREM2V.js → chunk-JXJIKAAE.js} +7 -7
  73. package/dist/chunks/{chunk-POOJ2MUS.js → chunk-K3QEZ7D7.js} +3 -3
  74. package/dist/chunks/{chunk-4RTQTX5R.js → chunk-KFWQSTT3.js} +2 -2
  75. package/dist/chunks/{chunk-DI4L3GH5.js → chunk-KHQAU33M.js} +2 -2
  76. package/dist/chunks/{chunk-CCYAWSZL.js → chunk-KNBFV3DC.js} +5 -5
  77. package/dist/chunks/{chunk-HTHNDZ3L.js → chunk-L2Q7APTU.js} +2 -2
  78. package/dist/chunks/{chunk-DIWEKTYK.js → chunk-LHZ632YK.js} +5 -5
  79. package/dist/chunks/chunk-LQZIENWB.js +686 -0
  80. package/dist/chunks/chunk-LQZIENWB.js.map +6 -0
  81. package/dist/chunks/{chunk-TYTE2GIF.js → chunk-LWYW2DAK.js} +5 -5
  82. package/dist/chunks/{chunk-NZMKMXGG.js → chunk-MKAQAKHE.js} +2 -2
  83. package/dist/chunks/{chunk-QPR3UA4L.js → chunk-MXJAJXE7.js} +2 -2
  84. package/dist/chunks/{chunk-SPSWX3QZ.js → chunk-MXR77LCX.js} +2 -2
  85. package/dist/chunks/{chunk-PSLNHLZI.js → chunk-NSGEVYJC.js} +3 -3
  86. package/dist/chunks/{chunk-EKQ6J5KA.js → chunk-O4GHSR2X.js} +2 -2
  87. package/dist/chunks/chunk-P3LYPSD6.js +137 -0
  88. package/dist/chunks/chunk-P3LYPSD6.js.map +6 -0
  89. package/dist/chunks/{chunk-J7SA5BCI.js → chunk-PNEFIK4E.js} +4 -4
  90. package/dist/chunks/chunk-PTPVAPCA.js +44 -0
  91. package/dist/chunks/chunk-PTPVAPCA.js.map +6 -0
  92. package/dist/chunks/{chunk-XHLFI6F6.js → chunk-QXKCTJWO.js} +2 -2
  93. package/dist/chunks/{chunk-P7FHJL3V.js → chunk-SK3JQNO5.js} +2 -2
  94. package/dist/chunks/{chunk-RJWPNAYL.js → chunk-SU5VBBRS.js} +12 -12
  95. package/dist/chunks/{chunk-SVMGV4AS.js → chunk-SWH4CAIH.js} +56 -47
  96. package/dist/chunks/chunk-SWH4CAIH.js.map +6 -0
  97. package/dist/chunks/{chunk-7AWFHVMT.js → chunk-T2CHZ6V7.js} +3 -3
  98. package/dist/chunks/{chunk-P5E6ITP5.js → chunk-TE4MIRMA.js} +5 -5
  99. package/dist/chunks/{chunk-24N42TGE.js → chunk-THOVK7I5.js} +6 -6
  100. package/dist/chunks/{chunk-YSKCWH72.js → chunk-TIMEEDY6.js} +203 -32
  101. package/dist/chunks/chunk-TIMEEDY6.js.map +6 -0
  102. package/dist/chunks/{chunk-DSKNFDTL.js → chunk-TLTD26JG.js} +2 -2
  103. package/dist/chunks/{chunk-CQKYKQEF.js → chunk-TUEZKY7I.js} +4 -4
  104. package/dist/chunks/{chunk-LOWGGJOB.js → chunk-U3IK5VKD.js} +6 -111
  105. package/dist/chunks/chunk-U3IK5VKD.js.map +6 -0
  106. package/dist/chunks/{chunk-2U357RJS.js → chunk-UUQY5P7K.js} +10 -10
  107. package/dist/chunks/{chunk-WOSL3OZD.js → chunk-VBRCNXMM.js} +4 -4
  108. package/dist/chunks/{chunk-VYLCV6W3.js → chunk-VI66HXJT.js} +9 -9
  109. package/dist/chunks/{chunk-HOKSVFIC.js → chunk-VQ5KK7YF.js} +79 -7
  110. package/dist/chunks/chunk-VQ5KK7YF.js.map +6 -0
  111. package/dist/chunks/{chunk-AGFGC7SI.js → chunk-VQCP7LOK.js} +3 -3
  112. package/dist/chunks/{chunk-OAHCS42A.js → chunk-VTS2SVX6.js} +2 -2
  113. package/dist/chunks/{chunk-HUONDMU4.js → chunk-W5TE6NIA.js} +2 -2
  114. package/dist/chunks/{chunk-UJOWXA23.js → chunk-WDY7OHLQ.js} +777 -261
  115. package/dist/chunks/chunk-WDY7OHLQ.js.map +6 -0
  116. package/dist/chunks/{chunk-ZZNHDQAD.js → chunk-WV45Z5QQ.js} +2 -2
  117. package/dist/chunks/{chunk-TUXH7IXQ.js → chunk-X44EPHHA.js} +2 -2
  118. package/dist/chunks/{chunk-6CFPN6I4.js → chunk-XFCFWWFK.js} +2 -2
  119. package/dist/chunks/{chunk-PV65WQHD.js → chunk-XGS5WUCQ.js} +12 -12
  120. package/dist/chunks/{chunk-NTV2XD2J.js → chunk-Y4MKRX73.js} +2 -2
  121. package/dist/chunks/{chunk-WSMX3IQE.js → chunk-YCJOAIDG.js} +518 -395
  122. package/dist/chunks/chunk-YCJOAIDG.js.map +6 -0
  123. package/dist/chunks/{chunk-SB3A7KUJ.js → chunk-YDGUEMBB.js} +4 -4
  124. package/dist/chunks/{chunk-7JT7DNR7.js → chunk-YIZXVNUY.js} +3 -3
  125. package/dist/chunks/{chunk-PYSZ7JTU.js → chunk-YNBAVIQA.js} +2 -2
  126. package/dist/chunks/{chunk-O326HKCW.js → chunk-YPLYAESJ.js} +3 -3
  127. package/dist/chunks/{chunk-5I45HTKW.js → chunk-ZH5MQMMF.js} +182 -40
  128. package/dist/chunks/chunk-ZH5MQMMF.js.map +6 -0
  129. package/dist/chunks/{chunk-M3AUPUII.js → chunk-ZI5FFFBJ.js} +6 -6
  130. package/dist/chunks/{chunk-EA73SWCT.js → chunk-ZIRQSGOG.js} +4 -4
  131. package/dist/chunks/{chunk-HOB6FTE2.js → chunk-ZVLTZDC4.js} +5 -4
  132. package/dist/chunks/{chunk-HOB6FTE2.js.map → chunk-ZVLTZDC4.js.map} +1 -1
  133. package/dist/chunks/{chunk-KNQ7R54U.js → chunk-ZZK2BVEH.js} +911 -670
  134. package/dist/chunks/chunk-ZZK2BVEH.js.map +6 -0
  135. package/dist/chunks/{cli-runtime-SVXU6U4V.js → cli-runtime-V2FI7PIQ.js} +25 -25
  136. package/dist/chunks/{commands-A2E3OV7F.js → commands-R2LZBXLK.js} +5 -5
  137. package/dist/chunks/{cost-NA7APCZD.js → cost-PQWWLMOO.js} +8 -8
  138. package/dist/chunks/{crash-report-C6QXQJAK.js → crash-report-MY27ZDU6.js} +9 -9
  139. package/dist/chunks/{dist-3PE5MOU6.js → dist-3HCAPKP5.js} +2 -2
  140. package/dist/chunks/{dist-5SZ7VOLE.js → dist-4RNVO224.js} +2 -2
  141. package/dist/chunks/{dist-6CHQ5OPZ.js → dist-7A7PB34A.js} +2 -2
  142. package/dist/chunks/{dist-G4BSVJKY.js → dist-MSFQTEPK.js} +2 -2
  143. package/dist/chunks/{dist-LBTLFSNF.js → dist-MT3MTMRF.js} +68 -2
  144. package/dist/chunks/{dist-HYKH6P7F.js → dist-PH7MWV7K.js} +2 -2
  145. package/dist/chunks/{dist-GVGW7AZ2.js → dist-TIMUM4OR.js} +2 -2
  146. package/dist/chunks/{dist-HASAHQL3.js → dist-Y4Q4SXRE.js} +2 -2
  147. package/dist/chunks/{doctor-Y5PQ2R7D.js → doctor-JRVQJERE.js} +46 -42
  148. package/dist/chunks/{drain-RG275P5J.js → drain-YOE55I26.js} +14 -14
  149. package/dist/chunks/{entry-BJY7UE6P.js → entry-QAXRBCG3.js} +6 -6
  150. package/dist/chunks/{eval-GG2BH7CQ.js → eval-UPNYQIHO.js} +12 -12
  151. package/dist/chunks/{exec-63SUPKUV.js → exec-LLOKYQZY.js} +92 -64
  152. package/dist/chunks/exec-LLOKYQZY.js.map +6 -0
  153. package/dist/chunks/{github-MGIA7MTZ.js → github-Z3JQNLXA.js} +5 -5
  154. package/dist/chunks/{home-KMZDOTX5.js → home-7TSSDRFT.js} +3 -3
  155. package/dist/chunks/hooks-JNM3P24H.js +210 -0
  156. package/dist/chunks/hooks-JNM3P24H.js.map +6 -0
  157. package/dist/chunks/hooks-report-GGRTQH23.js +39 -0
  158. package/dist/chunks/{host-OB5CL3GG.js → host-M2CYP3TP.js} +12 -12
  159. package/dist/chunks/{host-queries-2GQM7BTI.js → host-queries-L7P5FQ36.js} +15 -15
  160. package/dist/chunks/{learn-LUEHNOMA.js → learn-CBIMGXXS.js} +12 -12
  161. package/dist/chunks/{learn-builtin-R2Z27LDI.js → learn-builtin-UHGQ6CNQ.js} +17 -17
  162. package/dist/chunks/{lifecycle-DCLLAROM.js → lifecycle-NJGOR77O.js} +37 -37
  163. package/dist/chunks/{list-5UW5SFIX.js → list-QZUWOS4I.js} +19 -19
  164. package/dist/chunks/{live-YUE4AKRQ.js → live-LHKUQFEO.js} +44 -40
  165. package/dist/chunks/load-LF7GZYTP.js +75 -0
  166. package/dist/chunks/{login-ELIGI6HT.js → login-F4NOOGD5.js} +13 -13
  167. package/dist/chunks/{logs-PXASK6XI.js → logs-6CJCV6YU.js} +5 -5
  168. package/dist/chunks/{mcp-YVV35X7H.js → mcp-C7FQLLXL.js} +34 -34
  169. package/dist/chunks/{message-command-QVGOKB4W.js → message-command-BJPPVBGT.js} +59 -55
  170. package/dist/chunks/message-command-BJPPVBGT.js.map +6 -0
  171. package/dist/chunks/{open-MDT2NTF4.js → open-GLWFBW4C.js} +8 -8
  172. package/dist/chunks/{operator-tools-LYY2FXSO.js → operator-tools-KQV2T5UU.js} +14 -14
  173. package/dist/chunks/{output-schema-VR43KZNJ.js → output-schema-XXKTMSU6.js} +3 -3
  174. package/dist/chunks/{pal-YXOWNULV.js → pal-4OZ7KPSC.js} +19 -19
  175. package/dist/chunks/{peers-CJOTRI4W.js → peers-4DMT2KZ2.js} +18 -18
  176. package/dist/chunks/{peers-6M4UPHDF.js → peers-SMOALKZW.js} +6 -6
  177. package/dist/chunks/{plugin-IVIHCAEO.js → plugin-IDW4AYIK.js} +101 -20
  178. package/dist/chunks/plugin-IDW4AYIK.js.map +6 -0
  179. package/dist/chunks/{providers-7WDY37V3.js → providers-7HLI5PWI.js} +11 -11
  180. package/dist/chunks/{pty-CLDDZT5T.js → pty-SQBYCAX4.js} +3 -3
  181. package/dist/chunks/resume-2HBHZF54.js +23 -0
  182. package/dist/chunks/{resume-command-TXPTYQFF.js → resume-command-VCMPAWTN.js} +4 -4
  183. package/dist/chunks/{running-KBISZDIQ.js → running-DR4MSZ7B.js} +5 -5
  184. package/dist/chunks/{schedule-ECZVNZLH.js → schedule-W3QPDJRS.js} +8 -8
  185. package/dist/chunks/{send-VUJ33MJM.js → send-QDBFAZ5P.js} +16 -16
  186. package/dist/chunks/{send-person-WXM7Y5PZ.js → send-person-O5OJ7KHD.js} +13 -13
  187. package/dist/chunks/{service-DORQ3PNE.js → service-5Z47V5KC.js} +42 -42
  188. package/dist/chunks/{skills-W7KY3WX4.js → skills-XYT6UUTP.js} +45 -16
  189. package/dist/chunks/skills-XYT6UUTP.js.map +6 -0
  190. package/dist/chunks/{start-check-KECY75IO.js → start-check-OKCRZ67I.js} +2 -2
  191. package/dist/chunks/{startup-failure-MS7TPUMI.js → startup-failure-N3RO73Z4.js} +2 -2
  192. package/dist/chunks/{state-YK5JWP5I.js → state-7CLHPA4P.js} +6 -6
  193. package/dist/chunks/{store-XIPDR26B.js → store-CNEKBGKD.js} +6 -6
  194. package/dist/chunks/{store-TM7VDQ5G.js → store-GA3I7BMG.js} +4 -4
  195. package/dist/chunks/{store-H4IVAEZK.js → store-YFAH5XGW.js} +3 -3
  196. package/dist/chunks/store-YFAH5XGW.js.map +6 -0
  197. package/dist/chunks/{store-7SFKBFX6.js → store-ZDFRYDWS.js} +12 -10
  198. package/dist/chunks/store-ZDFRYDWS.js.map +6 -0
  199. package/dist/chunks/{tui-XKAQI3DD.js → tui-T6VPVMEV.js} +95 -89
  200. package/dist/chunks/tui-T6VPVMEV.js.map +6 -0
  201. package/dist/chunks/{upgrade-GLEEEZWO.js → upgrade-SW474CXN.js} +10 -10
  202. package/dist/chunks/{watch-XZKKDKAF.js → watch-OIYLZVDF.js} +134 -101
  203. package/dist/chunks/watch-OIYLZVDF.js.map +6 -0
  204. package/dist/chunks/{workspaces-GS6D72XT.js → workspaces-YQW2E6PE.js} +22 -22
  205. package/dist/chunks/worktree-ZMMQI2Z5.js +204 -0
  206. package/dist/chunks/worktree-ZMMQI2Z5.js.map +6 -0
  207. package/dist/cli.d.ts.map +1 -1
  208. package/dist/commands/acp.d.ts.map +1 -1
  209. package/dist/commands/desktop-host.d.ts +7 -0
  210. package/dist/commands/desktop-host.d.ts.map +1 -1
  211. package/dist/commands/exec-json.d.ts.map +1 -1
  212. package/dist/commands/exec.d.ts.map +1 -1
  213. package/dist/commands/hooks.d.ts +13 -0
  214. package/dist/commands/hooks.d.ts.map +1 -0
  215. package/dist/commands/manifest.d.ts +1 -0
  216. package/dist/commands/manifest.d.ts.map +1 -1
  217. package/dist/commands/worktree.d.ts.map +1 -1
  218. package/dist/config/hook-common-shape.d.ts +2 -0
  219. package/dist/config/hook-common-shape.d.ts.map +1 -1
  220. package/dist/config/hook-layers.d.ts.map +1 -1
  221. package/dist/config/hooks-report.d.ts +162 -0
  222. package/dist/config/hooks-report.d.ts.map +1 -0
  223. package/dist/config/load.d.ts +53 -1
  224. package/dist/config/load.d.ts.map +1 -1
  225. package/dist/config/skill-hooks-reader.d.ts +46 -0
  226. package/dist/config/skill-hooks-reader.d.ts.map +1 -0
  227. package/dist/doctor/checks/hooks.d.ts +7 -2
  228. package/dist/doctor/checks/hooks.d.ts.map +1 -1
  229. package/dist/index.js +49 -45
  230. package/dist/integrations/plugins/hook-activity.d.ts +62 -0
  231. package/dist/integrations/plugins/hook-activity.d.ts.map +1 -0
  232. package/dist/integrations/plugins/hook-entries.d.ts +126 -0
  233. package/dist/integrations/plugins/hook-entries.d.ts.map +1 -0
  234. package/dist/integrations/plugins/runtime.d.ts +52 -2
  235. package/dist/integrations/plugins/runtime.d.ts.map +1 -1
  236. package/dist/integrations/plugins/validate.d.ts.map +1 -1
  237. package/dist/integrations/sessions/conversation-facts.d.ts +12 -0
  238. package/dist/integrations/sessions/conversation-facts.d.ts.map +1 -1
  239. package/dist/integrations/sessions/store.d.ts +11 -1
  240. package/dist/integrations/sessions/store.d.ts.map +1 -1
  241. package/dist/integrations/sessions/watch-view.d.ts +2 -0
  242. package/dist/integrations/sessions/watch-view.d.ts.map +1 -1
  243. package/dist/integrations/subagents/NamzuCliAgent.d.ts +9 -1
  244. package/dist/integrations/subagents/NamzuCliAgent.d.ts.map +1 -1
  245. package/dist/integrations/subagents/agent-hooks.d.ts +116 -0
  246. package/dist/integrations/subagents/agent-hooks.d.ts.map +1 -0
  247. package/dist/integrations/subagents/definitions.d.ts +18 -0
  248. package/dist/integrations/subagents/definitions.d.ts.map +1 -1
  249. package/dist/integrations/subagents/replay.d.ts +6 -0
  250. package/dist/integrations/subagents/replay.d.ts.map +1 -1
  251. package/dist/integrations/subagents/runtime.d.ts +23 -0
  252. package/dist/integrations/subagents/runtime.d.ts.map +1 -1
  253. package/dist/integrations/subagents/worktree-driver.d.ts +20 -5
  254. package/dist/integrations/subagents/worktree-driver.d.ts.map +1 -1
  255. package/dist/integrations/trust/folder-grants.d.ts.map +1 -1
  256. package/dist/integrations/worktrees/hook-host.d.ts +23 -0
  257. package/dist/integrations/worktrees/hook-host.d.ts.map +1 -0
  258. package/dist/integrations/worktrees/managed.d.ts +20 -2
  259. package/dist/integrations/worktrees/managed.d.ts.map +1 -1
  260. package/dist/integrations/worktrees/untrusted-hook.d.ts +16 -0
  261. package/dist/integrations/worktrees/untrusted-hook.d.ts.map +1 -0
  262. package/dist/schedule/fire/fire.d.ts.map +1 -1
  263. package/dist/skills/audit.d.ts +11 -0
  264. package/dist/skills/audit.d.ts.map +1 -1
  265. package/dist/skills/catalog.d.ts +3 -0
  266. package/dist/skills/catalog.d.ts.map +1 -1
  267. package/dist/skills/restore-skill-hooks.d.ts +16 -0
  268. package/dist/skills/restore-skill-hooks.d.ts.map +1 -0
  269. package/dist/skills/skill-hooks.d.ts +73 -0
  270. package/dist/skills/skill-hooks.d.ts.map +1 -0
  271. package/dist/skills/store.d.ts +3 -0
  272. package/dist/skills/store.d.ts.map +1 -1
  273. package/dist/skills/use-hooks.d.ts +25 -0
  274. package/dist/skills/use-hooks.d.ts.map +1 -0
  275. package/dist/tui/App.d.ts.map +1 -1
  276. package/dist/tui/ReadSearchGroup.d.ts.map +1 -1
  277. package/dist/tui/Transcript.d.ts.map +1 -1
  278. package/dist/tui/agent-transcript-rows.d.ts +3 -1
  279. package/dist/tui/agent-transcript-rows.d.ts.map +1 -1
  280. package/dist/tui/agent.d.ts +73 -1
  281. package/dist/tui/agent.d.ts.map +1 -1
  282. package/dist/tui/fullscreen/layout.d.ts +9 -1
  283. package/dist/tui/fullscreen/layout.d.ts.map +1 -1
  284. package/dist/tui/fullscreen/markdown-rows.d.ts +18 -18
  285. package/dist/tui/fullscreen/markdown-rows.d.ts.map +1 -1
  286. package/dist/tui/fullscreen/reply-rows.d.ts +83 -0
  287. package/dist/tui/fullscreen/reply-rows.d.ts.map +1 -0
  288. package/dist/tui/hint-fit.d.ts +36 -0
  289. package/dist/tui/hint-fit.d.ts.map +1 -0
  290. package/dist/tui/plugin-view.d.ts.map +1 -1
  291. package/dist/tui/restored-rows.d.ts +6 -0
  292. package/dist/tui/restored-rows.d.ts.map +1 -1
  293. package/dist/tui/slashCommands.d.ts +44 -1
  294. package/dist/tui/slashCommands.d.ts.map +1 -1
  295. package/dist/tui/transcript-scroll.d.ts +1 -1
  296. package/dist/tui/transcript-scroll.d.ts.map +1 -1
  297. package/dist/user-commands/store.d.ts +2 -0
  298. package/dist/user-commands/store.d.ts.map +1 -1
  299. package/package.json +5 -5
  300. package/dist/chunks/acp-IOWTKF2X.js.map +0 -6
  301. package/dist/chunks/agent-session-L6J5GZVX.js +0 -73
  302. package/dist/chunks/chunk-5I45HTKW.js.map +0 -6
  303. package/dist/chunks/chunk-5NDRDTNX.js.map +0 -6
  304. package/dist/chunks/chunk-AME342DQ.js +0 -245
  305. package/dist/chunks/chunk-AME342DQ.js.map +0 -6
  306. package/dist/chunks/chunk-HGZYNEQE.js.map +0 -6
  307. package/dist/chunks/chunk-HOKSVFIC.js.map +0 -6
  308. package/dist/chunks/chunk-KNQ7R54U.js.map +0 -6
  309. package/dist/chunks/chunk-LOWGGJOB.js.map +0 -6
  310. package/dist/chunks/chunk-SVMGV4AS.js.map +0 -6
  311. package/dist/chunks/chunk-UJOWXA23.js.map +0 -6
  312. package/dist/chunks/chunk-V7VNFYA4.js.map +0 -6
  313. package/dist/chunks/chunk-WSMX3IQE.js.map +0 -6
  314. package/dist/chunks/chunk-YELRULQ7.js.map +0 -6
  315. package/dist/chunks/chunk-YSKCWH72.js.map +0 -6
  316. package/dist/chunks/exec-63SUPKUV.js.map +0 -6
  317. package/dist/chunks/message-command-QVGOKB4W.js.map +0 -6
  318. package/dist/chunks/plugin-IVIHCAEO.js.map +0 -6
  319. package/dist/chunks/resume-ZRVTAGB6.js +0 -23
  320. package/dist/chunks/skills-W7KY3WX4.js.map +0 -6
  321. package/dist/chunks/tui-XKAQI3DD.js.map +0 -6
  322. package/dist/chunks/watch-XZKKDKAF.js.map +0 -6
  323. package/dist/chunks/worktree-Z456JZKA.js +0 -119
  324. package/dist/chunks/worktree-Z456JZKA.js.map +0 -6
  325. /package/dist/chunks/{activity-command-U2AOTIVF.js.map → activity-command-IBOJOCRF.js.map} +0 -0
  326. /package/dist/chunks/{add-YYQLPCP2.js.map → add-LYBL3IC7.js.map} +0 -0
  327. /package/dist/chunks/{agent-WL6NX4W6.js.map → agent-LTLWJW3P.js.map} +0 -0
  328. /package/dist/chunks/{agent-session-L6J5GZVX.js.map → agent-session-BD2AHK5S.js.map} +0 -0
  329. /package/dist/chunks/{apply-at-exit-BRXYTQVG.js.map → apply-at-exit-7BF3KBU2.js.map} +0 -0
  330. /package/dist/chunks/{archive-UE756BME.js.map → archive-FCPUCOYT.js.map} +0 -0
  331. /package/dist/chunks/{bin-main-XR2DJOI6.js.map → bin-main-AVPCWJHJ.js.map} +0 -0
  332. /package/dist/chunks/{binding-HCIPLFUO.js.map → binding-OZCOSUYV.js.map} +0 -0
  333. /package/dist/chunks/{browser-7SFVCKSO.js.map → browser-LR25NVO7.js.map} +0 -0
  334. /package/dist/chunks/{chat-K6GQGRUA.js.map → chat-PP7XU7US.js.map} +0 -0
  335. /package/dist/chunks/{chunk-3NAVAACC.js.map → chunk-2KNLSJFS.js.map} +0 -0
  336. /package/dist/chunks/{chunk-2VSICYQP.js.map → chunk-2O6LZGGG.js.map} +0 -0
  337. /package/dist/chunks/{chunk-Z5NMQ2YN.js.map → chunk-3Q42HHZM.js.map} +0 -0
  338. /package/dist/chunks/{chunk-RAPO3KLG.js.map → chunk-3WTIGIDA.js.map} +0 -0
  339. /package/dist/chunks/{chunk-FX7BSCB4.js.map → chunk-4Q4J3KDG.js.map} +0 -0
  340. /package/dist/chunks/{chunk-KO2N6EIF.js.map → chunk-4VB264C5.js.map} +0 -0
  341. /package/dist/chunks/{chunk-HJILJSZO.js.map → chunk-4VXS3UYL.js.map} +0 -0
  342. /package/dist/chunks/{chunk-2WDF5N2A.js.map → chunk-5FEAC3G5.js.map} +0 -0
  343. /package/dist/chunks/{chunk-BHOZPFJM.js.map → chunk-5HCZHDPA.js.map} +0 -0
  344. /package/dist/chunks/{chunk-Z5FDI74K.js.map → chunk-5YNAPIUZ.js.map} +0 -0
  345. /package/dist/chunks/{chunk-A47ZNTW7.js.map → chunk-6SHOR62K.js.map} +0 -0
  346. /package/dist/chunks/{chunk-46VSU4QF.js.map → chunk-72IJ3FQU.js.map} +0 -0
  347. /package/dist/chunks/{chunk-DHS5CQNC.js.map → chunk-AO4A56EG.js.map} +0 -0
  348. /package/dist/chunks/{chunk-KAPCNFMC.js.map → chunk-BFCUL4BW.js.map} +0 -0
  349. /package/dist/chunks/{chunk-DOFQWVBL.js.map → chunk-CKWDYYBE.js.map} +0 -0
  350. /package/dist/chunks/{chunk-J3PHMXN4.js.map → chunk-CSBKGTBA.js.map} +0 -0
  351. /package/dist/chunks/{chunk-ZMKEYARZ.js.map → chunk-D3JJE6VZ.js.map} +0 -0
  352. /package/dist/chunks/{chunk-UWN4WNQZ.js.map → chunk-DEEK2FOC.js.map} +0 -0
  353. /package/dist/chunks/{chunk-F3SQRGKZ.js.map → chunk-DSMBM5LQ.js.map} +0 -0
  354. /package/dist/chunks/{chunk-4FV2VZS6.js.map → chunk-EC2F3CWT.js.map} +0 -0
  355. /package/dist/chunks/{chunk-OBMHA7OP.js.map → chunk-EMXH2RJN.js.map} +0 -0
  356. /package/dist/chunks/{chunk-MYVF3JRV.js.map → chunk-EQGE25MQ.js.map} +0 -0
  357. /package/dist/chunks/{chunk-RDW6L3PV.js.map → chunk-F2TXNDKC.js.map} +0 -0
  358. /package/dist/chunks/{chunk-UMHKTV2L.js.map → chunk-FAWY4LRG.js.map} +0 -0
  359. /package/dist/chunks/{chunk-LMLJ7NS5.js.map → chunk-FK6WJQ5T.js.map} +0 -0
  360. /package/dist/chunks/{chunk-EKMHZKVP.js.map → chunk-FRADQASS.js.map} +0 -0
  361. /package/dist/chunks/{chunk-N56NUKMT.js.map → chunk-FS7CUHOG.js.map} +0 -0
  362. /package/dist/chunks/{chunk-C5XQHEYB.js.map → chunk-GFZFGTDZ.js.map} +0 -0
  363. /package/dist/chunks/{chunk-VVWI4EB7.js.map → chunk-GXCOSOVM.js.map} +0 -0
  364. /package/dist/chunks/{chunk-TI6FFONP.js.map → chunk-HJJNIG33.js.map} +0 -0
  365. /package/dist/chunks/{chunk-MHXJYXOF.js.map → chunk-HUDP4HTK.js.map} +0 -0
  366. /package/dist/chunks/{chunk-SHUA4YUK.js.map → chunk-IBPN346S.js.map} +0 -0
  367. /package/dist/chunks/{chunk-Z6J7SVOB.js.map → chunk-IPAGLYU3.js.map} +0 -0
  368. /package/dist/chunks/{chunk-ZDZ35MMZ.js.map → chunk-ISHCON5Z.js.map} +0 -0
  369. /package/dist/chunks/{chunk-FEIIR46G.js.map → chunk-J6I6MCWR.js.map} +0 -0
  370. /package/dist/chunks/{chunk-X6SREM2V.js.map → chunk-JXJIKAAE.js.map} +0 -0
  371. /package/dist/chunks/{chunk-POOJ2MUS.js.map → chunk-K3QEZ7D7.js.map} +0 -0
  372. /package/dist/chunks/{chunk-4RTQTX5R.js.map → chunk-KFWQSTT3.js.map} +0 -0
  373. /package/dist/chunks/{chunk-DI4L3GH5.js.map → chunk-KHQAU33M.js.map} +0 -0
  374. /package/dist/chunks/{chunk-CCYAWSZL.js.map → chunk-KNBFV3DC.js.map} +0 -0
  375. /package/dist/chunks/{chunk-HTHNDZ3L.js.map → chunk-L2Q7APTU.js.map} +0 -0
  376. /package/dist/chunks/{chunk-DIWEKTYK.js.map → chunk-LHZ632YK.js.map} +0 -0
  377. /package/dist/chunks/{chunk-TYTE2GIF.js.map → chunk-LWYW2DAK.js.map} +0 -0
  378. /package/dist/chunks/{chunk-NZMKMXGG.js.map → chunk-MKAQAKHE.js.map} +0 -0
  379. /package/dist/chunks/{chunk-QPR3UA4L.js.map → chunk-MXJAJXE7.js.map} +0 -0
  380. /package/dist/chunks/{chunk-SPSWX3QZ.js.map → chunk-MXR77LCX.js.map} +0 -0
  381. /package/dist/chunks/{chunk-PSLNHLZI.js.map → chunk-NSGEVYJC.js.map} +0 -0
  382. /package/dist/chunks/{chunk-EKQ6J5KA.js.map → chunk-O4GHSR2X.js.map} +0 -0
  383. /package/dist/chunks/{chunk-J7SA5BCI.js.map → chunk-PNEFIK4E.js.map} +0 -0
  384. /package/dist/chunks/{chunk-XHLFI6F6.js.map → chunk-QXKCTJWO.js.map} +0 -0
  385. /package/dist/chunks/{chunk-P7FHJL3V.js.map → chunk-SK3JQNO5.js.map} +0 -0
  386. /package/dist/chunks/{chunk-RJWPNAYL.js.map → chunk-SU5VBBRS.js.map} +0 -0
  387. /package/dist/chunks/{chunk-7AWFHVMT.js.map → chunk-T2CHZ6V7.js.map} +0 -0
  388. /package/dist/chunks/{chunk-P5E6ITP5.js.map → chunk-TE4MIRMA.js.map} +0 -0
  389. /package/dist/chunks/{chunk-24N42TGE.js.map → chunk-THOVK7I5.js.map} +0 -0
  390. /package/dist/chunks/{chunk-DSKNFDTL.js.map → chunk-TLTD26JG.js.map} +0 -0
  391. /package/dist/chunks/{chunk-CQKYKQEF.js.map → chunk-TUEZKY7I.js.map} +0 -0
  392. /package/dist/chunks/{chunk-2U357RJS.js.map → chunk-UUQY5P7K.js.map} +0 -0
  393. /package/dist/chunks/{chunk-WOSL3OZD.js.map → chunk-VBRCNXMM.js.map} +0 -0
  394. /package/dist/chunks/{chunk-VYLCV6W3.js.map → chunk-VI66HXJT.js.map} +0 -0
  395. /package/dist/chunks/{chunk-AGFGC7SI.js.map → chunk-VQCP7LOK.js.map} +0 -0
  396. /package/dist/chunks/{chunk-OAHCS42A.js.map → chunk-VTS2SVX6.js.map} +0 -0
  397. /package/dist/chunks/{chunk-HUONDMU4.js.map → chunk-W5TE6NIA.js.map} +0 -0
  398. /package/dist/chunks/{chunk-ZZNHDQAD.js.map → chunk-WV45Z5QQ.js.map} +0 -0
  399. /package/dist/chunks/{chunk-TUXH7IXQ.js.map → chunk-X44EPHHA.js.map} +0 -0
  400. /package/dist/chunks/{chunk-6CFPN6I4.js.map → chunk-XFCFWWFK.js.map} +0 -0
  401. /package/dist/chunks/{chunk-PV65WQHD.js.map → chunk-XGS5WUCQ.js.map} +0 -0
  402. /package/dist/chunks/{chunk-NTV2XD2J.js.map → chunk-Y4MKRX73.js.map} +0 -0
  403. /package/dist/chunks/{chunk-SB3A7KUJ.js.map → chunk-YDGUEMBB.js.map} +0 -0
  404. /package/dist/chunks/{chunk-7JT7DNR7.js.map → chunk-YIZXVNUY.js.map} +0 -0
  405. /package/dist/chunks/{chunk-PYSZ7JTU.js.map → chunk-YNBAVIQA.js.map} +0 -0
  406. /package/dist/chunks/{chunk-O326HKCW.js.map → chunk-YPLYAESJ.js.map} +0 -0
  407. /package/dist/chunks/{chunk-M3AUPUII.js.map → chunk-ZI5FFFBJ.js.map} +0 -0
  408. /package/dist/chunks/{chunk-EA73SWCT.js.map → chunk-ZIRQSGOG.js.map} +0 -0
  409. /package/dist/chunks/{cli-runtime-SVXU6U4V.js.map → cli-runtime-V2FI7PIQ.js.map} +0 -0
  410. /package/dist/chunks/{commands-A2E3OV7F.js.map → commands-R2LZBXLK.js.map} +0 -0
  411. /package/dist/chunks/{cost-NA7APCZD.js.map → cost-PQWWLMOO.js.map} +0 -0
  412. /package/dist/chunks/{crash-report-C6QXQJAK.js.map → crash-report-MY27ZDU6.js.map} +0 -0
  413. /package/dist/chunks/{dist-3PE5MOU6.js.map → dist-3HCAPKP5.js.map} +0 -0
  414. /package/dist/chunks/{dist-5SZ7VOLE.js.map → dist-4RNVO224.js.map} +0 -0
  415. /package/dist/chunks/{dist-6CHQ5OPZ.js.map → dist-7A7PB34A.js.map} +0 -0
  416. /package/dist/chunks/{dist-G4BSVJKY.js.map → dist-MSFQTEPK.js.map} +0 -0
  417. /package/dist/chunks/{dist-LBTLFSNF.js.map → dist-MT3MTMRF.js.map} +0 -0
  418. /package/dist/chunks/{dist-HYKH6P7F.js.map → dist-PH7MWV7K.js.map} +0 -0
  419. /package/dist/chunks/{dist-GVGW7AZ2.js.map → dist-TIMUM4OR.js.map} +0 -0
  420. /package/dist/chunks/{dist-HASAHQL3.js.map → dist-Y4Q4SXRE.js.map} +0 -0
  421. /package/dist/chunks/{doctor-Y5PQ2R7D.js.map → doctor-JRVQJERE.js.map} +0 -0
  422. /package/dist/chunks/{drain-RG275P5J.js.map → drain-YOE55I26.js.map} +0 -0
  423. /package/dist/chunks/{entry-BJY7UE6P.js.map → entry-QAXRBCG3.js.map} +0 -0
  424. /package/dist/chunks/{eval-GG2BH7CQ.js.map → eval-UPNYQIHO.js.map} +0 -0
  425. /package/dist/chunks/{github-MGIA7MTZ.js.map → github-Z3JQNLXA.js.map} +0 -0
  426. /package/dist/chunks/{home-KMZDOTX5.js.map → home-7TSSDRFT.js.map} +0 -0
  427. /package/dist/chunks/{host-OB5CL3GG.js.map → hooks-report-GGRTQH23.js.map} +0 -0
  428. /package/dist/chunks/{lifecycle-DCLLAROM.js.map → host-M2CYP3TP.js.map} +0 -0
  429. /package/dist/chunks/{host-queries-2GQM7BTI.js.map → host-queries-L7P5FQ36.js.map} +0 -0
  430. /package/dist/chunks/{learn-LUEHNOMA.js.map → learn-CBIMGXXS.js.map} +0 -0
  431. /package/dist/chunks/{learn-builtin-R2Z27LDI.js.map → learn-builtin-UHGQ6CNQ.js.map} +0 -0
  432. /package/dist/chunks/{live-YUE4AKRQ.js.map → lifecycle-NJGOR77O.js.map} +0 -0
  433. /package/dist/chunks/{list-5UW5SFIX.js.map → list-QZUWOS4I.js.map} +0 -0
  434. /package/dist/chunks/{login-ELIGI6HT.js.map → live-LHKUQFEO.js.map} +0 -0
  435. /package/dist/chunks/{open-MDT2NTF4.js.map → load-LF7GZYTP.js.map} +0 -0
  436. /package/dist/chunks/{output-schema-VR43KZNJ.js.map → login-F4NOOGD5.js.map} +0 -0
  437. /package/dist/chunks/{logs-PXASK6XI.js.map → logs-6CJCV6YU.js.map} +0 -0
  438. /package/dist/chunks/{mcp-YVV35X7H.js.map → mcp-C7FQLLXL.js.map} +0 -0
  439. /package/dist/chunks/{peers-6M4UPHDF.js.map → open-GLWFBW4C.js.map} +0 -0
  440. /package/dist/chunks/{operator-tools-LYY2FXSO.js.map → operator-tools-KQV2T5UU.js.map} +0 -0
  441. /package/dist/chunks/{providers-7WDY37V3.js.map → output-schema-XXKTMSU6.js.map} +0 -0
  442. /package/dist/chunks/{pal-YXOWNULV.js.map → pal-4OZ7KPSC.js.map} +0 -0
  443. /package/dist/chunks/{peers-CJOTRI4W.js.map → peers-4DMT2KZ2.js.map} +0 -0
  444. /package/dist/chunks/{pty-CLDDZT5T.js.map → peers-SMOALKZW.js.map} +0 -0
  445. /package/dist/chunks/{resume-ZRVTAGB6.js.map → providers-7HLI5PWI.js.map} +0 -0
  446. /package/dist/chunks/{resume-command-TXPTYQFF.js.map → pty-SQBYCAX4.js.map} +0 -0
  447. /package/dist/chunks/{running-KBISZDIQ.js.map → resume-2HBHZF54.js.map} +0 -0
  448. /package/dist/chunks/{send-VUJ33MJM.js.map → resume-command-VCMPAWTN.js.map} +0 -0
  449. /package/dist/chunks/{send-person-WXM7Y5PZ.js.map → running-DR4MSZ7B.js.map} +0 -0
  450. /package/dist/chunks/{schedule-ECZVNZLH.js.map → schedule-W3QPDJRS.js.map} +0 -0
  451. /package/dist/chunks/{start-check-KECY75IO.js.map → send-QDBFAZ5P.js.map} +0 -0
  452. /package/dist/chunks/{store-7SFKBFX6.js.map → send-person-O5OJ7KHD.js.map} +0 -0
  453. /package/dist/chunks/{service-DORQ3PNE.js.map → service-5Z47V5KC.js.map} +0 -0
  454. /package/dist/chunks/{store-H4IVAEZK.js.map → start-check-OKCRZ67I.js.map} +0 -0
  455. /package/dist/chunks/{startup-failure-MS7TPUMI.js.map → startup-failure-N3RO73Z4.js.map} +0 -0
  456. /package/dist/chunks/{state-YK5JWP5I.js.map → state-7CLHPA4P.js.map} +0 -0
  457. /package/dist/chunks/{store-TM7VDQ5G.js.map → store-CNEKBGKD.js.map} +0 -0
  458. /package/dist/chunks/{store-XIPDR26B.js.map → store-GA3I7BMG.js.map} +0 -0
  459. /package/dist/chunks/{upgrade-GLEEEZWO.js.map → upgrade-SW474CXN.js.map} +0 -0
  460. /package/dist/chunks/{workspaces-GS6D72XT.js.map → workspaces-YQW2E6PE.js.map} +0 -0
@@ -1,5 +1,11 @@
1
1
  import { createRequire as __namzuCreateRequire } from 'node:module';
2
2
  const require = __namzuCreateRequire(import.meta.url);
3
+ import {
4
+ openWorktreeHookRuntime
5
+ } from "./chunk-PTPVAPCA.js";
6
+ import {
7
+ selectDesktopBackend
8
+ } from "./chunk-IBPN346S.js";
3
9
  import {
4
10
  NAMZU_COMPACT_WORDMARK,
5
11
  NAMZU_WORDMARK,
@@ -11,24 +17,33 @@ import {
11
17
  confirmationView,
12
18
  describeChanges,
13
19
  permissionsChanged
14
- } from "./chunk-HTHNDZ3L.js";
20
+ } from "./chunk-L2Q7APTU.js";
15
21
  import {
16
22
  visibleScheduleMessage
17
23
  } from "./chunk-NADQQMMG.js";
18
24
  import {
19
- selectDesktopBackend
20
- } from "./chunk-SHUA4YUK.js";
25
+ hooksOf
26
+ } from "./chunk-5OAKUXE3.js";
21
27
  import {
22
28
  applyProviderFlags
23
- } from "./chunk-OBMHA7OP.js";
29
+ } from "./chunk-EMXH2RJN.js";
30
+ import {
31
+ BYPASS_CONSENT_BODY,
32
+ BYPASS_CONSENT_TITLE,
33
+ acknowledgeBypass,
34
+ hasAcknowledgedBypass
35
+ } from "./chunk-72IJ3FQU.js";
36
+ import {
37
+ applyFallbackFlag
38
+ } from "./chunk-RL2CTUF2.js";
24
39
  import {
25
40
  settleAnsweredPark
26
- } from "./chunk-KO2N6EIF.js";
41
+ } from "./chunk-4VB264C5.js";
27
42
  import {
28
43
  DELIVERY_READ_LIMIT,
29
44
  readSourceDeliveryPage,
30
45
  takeSuppressedCount
31
- } from "./chunk-V7VNFYA4.js";
46
+ } from "./chunk-32LCSSAN.js";
32
47
  import {
33
48
  DEFAULT_MAX_ITERATIONS,
34
49
  DEFAULT_TIMEOUT_MS,
@@ -39,7 +54,7 @@ import {
39
54
  editedJob,
40
55
  previewLines,
41
56
  runsPerDay
42
- } from "./chunk-P5E6ITP5.js";
57
+ } from "./chunk-TE4MIRMA.js";
43
58
  import {
44
59
  callsCount
45
60
  } from "./chunk-OG2MLME3.js";
@@ -48,55 +63,27 @@ import {
48
63
  gateRefusal,
49
64
  scriptShellUnavailableReason,
50
65
  verifyScheduledScript
51
- } from "./chunk-4FV2VZS6.js";
66
+ } from "./chunk-EC2F3CWT.js";
52
67
  import {
53
68
  allowsCommands,
54
69
  compileJobPolicy,
55
70
  compileScriptCheckPolicy,
56
71
  isPresetName
57
- } from "./chunk-J3PHMXN4.js";
72
+ } from "./chunk-CSBKGTBA.js";
58
73
  import {
59
74
  parkedRunWords,
60
75
  resumeCommand
61
- } from "./chunk-TI6FFONP.js";
76
+ } from "./chunk-HJJNIG33.js";
62
77
  import {
63
78
  appendHistory,
64
79
  nextFireOf,
65
80
  readHistory,
66
81
  readState
67
- } from "./chunk-XHLFI6F6.js";
82
+ } from "./chunk-QXKCTJWO.js";
68
83
  import {
69
84
  callEndpoint,
70
85
  readEndpoint
71
86
  } from "./chunk-6YG7D7U4.js";
72
- import {
73
- BYPASS_CONSENT_BODY,
74
- BYPASS_CONSENT_TITLE,
75
- acknowledgeBypass,
76
- hasAcknowledgedBypass
77
- } from "./chunk-46VSU4QF.js";
78
- import {
79
- applyFallbackFlag
80
- } from "./chunk-RL2CTUF2.js";
81
- import {
82
- CLIPBOARD_KILL_SWITCH,
83
- ClickCounter,
84
- bypassKey,
85
- colsOnLine,
86
- createClipboardCopier,
87
- describeCopy,
88
- hostSlot,
89
- lineAt,
90
- orderRange,
91
- snapRange,
92
- wordAt
93
- } from "./chunk-ZDZ35MMZ.js";
94
- import {
95
- buildPeerTools,
96
- openLivePeers,
97
- peerMailLabel,
98
- peerMailMessage
99
- } from "./chunk-O326HKCW.js";
100
87
  import {
101
88
  AUTO_CHOICE_ID,
102
89
  PR_NONE,
@@ -110,28 +97,47 @@ import {
110
97
  sectionHeading,
111
98
  withAutoChoice,
112
99
  writeConversationExport
113
- } from "./chunk-ZMKEYARZ.js";
100
+ } from "./chunk-D3JJE6VZ.js";
114
101
  import {
115
102
  tuiPalDefinition,
116
103
  tuiPalEnvironment,
117
104
  tuiPalOwner,
118
105
  tuiPalPreferences
119
- } from "./chunk-DIWEKTYK.js";
120
- import {
121
- isModelOnlyContext,
122
- runtimeContextRowLabel
123
- } from "./chunk-6ITTTCLD.js";
106
+ } from "./chunk-LHZ632YK.js";
124
107
  import {
125
108
  NOTHING_TOLD,
126
109
  claimMismatchLine,
127
110
  goalEndingLine,
128
111
  handedBackLines,
129
112
  outcomeNotice
130
- } from "./chunk-Z6J7SVOB.js";
113
+ } from "./chunk-IPAGLYU3.js";
114
+ import {
115
+ isModelOnlyContext,
116
+ runtimeContextRowLabel
117
+ } from "./chunk-6ITTTCLD.js";
118
+ import {
119
+ CLIPBOARD_KILL_SWITCH,
120
+ ClickCounter,
121
+ bypassKey,
122
+ colsOnLine,
123
+ createClipboardCopier,
124
+ describeCopy,
125
+ hostSlot,
126
+ lineAt,
127
+ orderRange,
128
+ snapRange,
129
+ wordAt
130
+ } from "./chunk-ISHCON5Z.js";
131
+ import {
132
+ buildPeerTools,
133
+ openLivePeers,
134
+ peerMailLabel,
135
+ peerMailMessage
136
+ } from "./chunk-YPLYAESJ.js";
131
137
  import {
132
138
  claimPalConversation,
133
139
  listPalConversations
134
- } from "./chunk-FX7BSCB4.js";
140
+ } from "./chunk-4Q4J3KDG.js";
135
141
  import {
136
142
  CLICK_EXPAND_HINT,
137
143
  CLICK_FOLD_HINT,
@@ -188,7 +194,6 @@ import {
188
194
  describeTranscriptWrites,
189
195
  diffViewBody,
190
196
  diffViewRows,
191
- discoverAgentDefinitions,
192
197
  displayPath as displayPath2,
193
198
  estimateHistoryTokens,
194
199
  foldOp,
@@ -241,19 +246,11 @@ import {
241
246
  webLiveStatus,
242
247
  webSettledLine,
243
248
  withDebugDetail
244
- } from "./chunk-KNQ7R54U.js";
249
+ } from "./chunk-ZZK2BVEH.js";
245
250
  import {
246
251
  openManagedWorktrees,
247
252
  worktreeOpenHint
248
- } from "./chunk-AME342DQ.js";
249
- import {
250
- MCP_OUTPUT_CHARS,
251
- boundedMcpText,
252
- validatePromptArguments
253
- } from "./chunk-EA73SWCT.js";
254
- import {
255
- openInBrowser
256
- } from "./chunk-C5XQHEYB.js";
253
+ } from "./chunk-LQZIENWB.js";
257
254
  import {
258
255
  completionNotice,
259
256
  countAgents,
@@ -266,7 +263,15 @@ import {
266
263
  resumeReviewLines,
267
264
  runTokens,
268
265
  settledElapsed
269
- } from "./chunk-NTV2XD2J.js";
266
+ } from "./chunk-Y4MKRX73.js";
267
+ import {
268
+ MCP_OUTPUT_CHARS,
269
+ boundedMcpText,
270
+ validatePromptArguments
271
+ } from "./chunk-ZIRQSGOG.js";
272
+ import {
273
+ openInBrowser
274
+ } from "./chunk-GFZFGTDZ.js";
270
275
  import {
271
276
  describeBrowserStatus
272
277
  } from "./chunk-WHODOMXA.js";
@@ -281,15 +286,15 @@ import {
281
286
  import {
282
287
  beginSubscriptionLogin,
283
288
  parsePastedInput
284
- } from "./chunk-LMLJ7NS5.js";
289
+ } from "./chunk-FK6WJQ5T.js";
285
290
  import {
286
291
  API_KEY_ACCOUNT_PROVIDERS,
287
292
  openCliAccounts,
288
293
  storedAccountSignedIn
289
- } from "./chunk-CCYAWSZL.js";
294
+ } from "./chunk-KNBFV3DC.js";
290
295
  import {
291
296
  beginCodexDeviceLogin
292
- } from "./chunk-CQKYKQEF.js";
297
+ } from "./chunk-TUEZKY7I.js";
293
298
  import {
294
299
  ConversationIndexRefreshError,
295
300
  activeConversationTurn,
@@ -319,15 +324,15 @@ import {
319
324
  typedTextOf,
320
325
  unansweredReviewPark,
321
326
  unarchiveConversation
322
- } from "./chunk-HOKSVFIC.js";
327
+ } from "./chunk-VQ5KK7YF.js";
323
328
  import {
324
329
  bindAccount,
325
330
  findAccountByName,
326
331
  isDefaultAccountId
327
- } from "./chunk-OAHCS42A.js";
332
+ } from "./chunk-VTS2SVX6.js";
328
333
  import {
329
334
  startAutoUpdate
330
- } from "./chunk-J7SA5BCI.js";
335
+ } from "./chunk-PNEFIK4E.js";
331
336
  import {
332
337
  readManifest
333
338
  } from "./chunk-AK2U3N2A.js";
@@ -365,7 +370,10 @@ import {
365
370
  turnLimitCommands,
366
371
  useThemeEpoch,
367
372
  useThemeSubscription
368
- } from "./chunk-5I45HTKW.js";
373
+ } from "./chunk-ZH5MQMMF.js";
374
+ import {
375
+ discoverUserCommands
376
+ } from "./chunk-4KMFIIWV.js";
369
377
  import {
370
378
  describeAllCredentialsLogout,
371
379
  describeApiKeyLogout,
@@ -375,8 +383,15 @@ import {
375
383
  describeProviderLogout
376
384
  } from "./chunk-MDK4RMBQ.js";
377
385
  import {
378
- discoverUserCommands
379
- } from "./chunk-NICPMJJQ.js";
386
+ capChoiceLines,
387
+ choiceDisplayText,
388
+ choiceDisplayWidth,
389
+ eraseLastChoiceGrapheme,
390
+ truncateAtSeparator,
391
+ truncateChoiceText,
392
+ wrapBalancedText,
393
+ wrapChoiceText
394
+ } from "./chunk-CING2BNJ.js";
380
395
  import {
381
396
  ScheduleConflictError,
382
397
  confirmationHolds,
@@ -394,36 +409,26 @@ import {
394
409
  } from "./chunk-OEW7CJKK.js";
395
410
  import {
396
411
  resolveNpmInvocation
397
- } from "./chunk-ZZNHDQAD.js";
412
+ } from "./chunk-WV45Z5QQ.js";
398
413
  import {
399
- capChoiceLines,
400
- choiceDisplayText,
401
- choiceDisplayWidth,
402
- eraseLastChoiceGrapheme,
403
- truncateAtSeparator,
404
- truncateChoiceText,
405
- wrapBalancedText,
406
- wrapChoiceText
407
- } from "./chunk-CING2BNJ.js";
414
+ deleteUserConfigValue,
415
+ setUserConfigValue
416
+ } from "./chunk-K3QEZ7D7.js";
417
+ import {
418
+ pinTrustedProjectPath,
419
+ resolveTrustedProjectContext
420
+ } from "./chunk-CHIEVVQ2.js";
408
421
  import {
409
422
  motionAllowed,
410
423
  reducedMotion,
411
424
  require_react,
412
425
  useReducedMotion
413
426
  } from "./chunk-5PO5ZH6M.js";
414
- import {
415
- pinTrustedProjectPath,
416
- resolveTrustedProjectContext
417
- } from "./chunk-CHIEVVQ2.js";
418
- import {
419
- deleteUserConfigValue,
420
- setUserConfigValue
421
- } from "./chunk-POOJ2MUS.js";
422
427
  import {
423
428
  describeCacheLifetime,
424
429
  promptCacheTtl,
425
430
  providerOffersCacheLifetime
426
- } from "./chunk-UMHKTV2L.js";
431
+ } from "./chunk-FAWY4LRG.js";
427
432
  import {
428
433
  SAVE_SKILL_TOOL_NAME,
429
434
  SKILL_CREATOR_SKILL,
@@ -436,14 +441,14 @@ import {
436
441
  newSkillPrompt,
437
442
  resolveTurnGuards,
438
443
  sandboxRunsShellUnasked
439
- } from "./chunk-Z5FDI74K.js";
444
+ } from "./chunk-5YNAPIUZ.js";
440
445
  import {
441
446
  describePlainInterruption,
442
447
  describeProviderWait,
443
448
  describeProviderWaitClock,
444
449
  isSelfMending,
445
450
  isSpentAllowance
446
- } from "./chunk-M3AUPUII.js";
451
+ } from "./chunk-ZI5FFFBJ.js";
447
452
  import {
448
453
  debugRequested
449
454
  } from "./chunk-GNBMKISG.js";
@@ -455,7 +460,58 @@ import {
455
460
  handoffContinuationNote,
456
461
  refusalDetail,
457
462
  retryAfterMs
458
- } from "./chunk-2VSICYQP.js";
463
+ } from "./chunk-2O6LZGGG.js";
464
+ import {
465
+ autoAvailable,
466
+ nextCycleMode,
467
+ permissionModeDescription,
468
+ permissionModeLabel,
469
+ permissionModeName
470
+ } from "./chunk-MXJAJXE7.js";
471
+ import {
472
+ expandTabs,
473
+ scriptText,
474
+ terminalDisplayText
475
+ } from "./chunk-I4GTRFPK.js";
476
+ import {
477
+ paint,
478
+ rowTints,
479
+ theme,
480
+ tokenColor
481
+ } from "./chunk-WD2F6EO3.js";
482
+ import {
483
+ discoverAgentDefinitions
484
+ } from "./chunk-P3LYPSD6.js";
485
+ import {
486
+ readAgentHooks
487
+ } from "./chunk-DEH4YIDN.js";
488
+ import {
489
+ readSkillHooks,
490
+ withoutSessionStart
491
+ } from "./chunk-IERT7D34.js";
492
+ import {
493
+ NO_SKILLS_FOUND,
494
+ composeSkillsPrompt,
495
+ discoverSkills,
496
+ loadSkillBody,
497
+ renderSkillRoster,
498
+ skillTierLabel
499
+ } from "./chunk-JFLX34FA.js";
500
+ import {
501
+ primaryProvider,
502
+ writePreferences
503
+ } from "./chunk-XGS5WUCQ.js";
504
+ import {
505
+ apiKeyLogoutWord,
506
+ automaticChoice,
507
+ automaticKind,
508
+ canSelectModel,
509
+ describeAutomaticChoice,
510
+ discoverProviders,
511
+ hasApiCredential,
512
+ isApiKeyLogoutTarget,
513
+ signedInSubscriptionProviders
514
+ } from "./chunk-JXJIKAAE.js";
459
515
  import {
460
516
  COMPOSER_TRIGGER_DEFAULTS,
461
517
  COMPOSER_TRIGGER_IDS,
@@ -486,7 +542,7 @@ import {
486
542
  saveDecisionKey,
487
543
  shouldOfferDecisionSetup,
488
544
  writeConnection
489
- } from "./chunk-WSMX3IQE.js";
545
+ } from "./chunk-YCJOAIDG.js";
490
546
  import {
491
547
  PROJECT_MCP_FILE,
492
548
  parseMcpServerFile
@@ -499,27 +555,6 @@ import {
499
555
  plural,
500
556
  productName
501
557
  } from "./chunk-6PWRKA5T.js";
502
- import {
503
- autoAvailable,
504
- nextCycleMode,
505
- permissionModeDescription,
506
- permissionModeLabel,
507
- permissionModeName
508
- } from "./chunk-QPR3UA4L.js";
509
- import {
510
- paint,
511
- rowTints,
512
- theme,
513
- tokenColor
514
- } from "./chunk-WD2F6EO3.js";
515
- import {
516
- THEME_CHOICES
517
- } from "./chunk-S2JWPUUH.js";
518
- import {
519
- expandTabs,
520
- scriptText,
521
- terminalDisplayText
522
- } from "./chunk-I4GTRFPK.js";
523
558
  import {
524
559
  isFullWidth,
525
560
  isWide,
@@ -527,28 +562,8 @@ import {
527
562
  stripAnsi
528
563
  } from "./chunk-U5UV2YRE.js";
529
564
  import {
530
- NO_SKILLS_FOUND,
531
- composeSkillsPrompt,
532
- discoverSkills,
533
- loadSkillBody,
534
- renderSkillRoster,
535
- skillTierLabel
536
- } from "./chunk-HGZYNEQE.js";
537
- import {
538
- primaryProvider,
539
- writePreferences
540
- } from "./chunk-PV65WQHD.js";
541
- import {
542
- apiKeyLogoutWord,
543
- automaticChoice,
544
- automaticKind,
545
- canSelectModel,
546
- describeAutomaticChoice,
547
- discoverProviders,
548
- hasApiCredential,
549
- isApiKeyLogoutTarget,
550
- signedInSubscriptionProviders
551
- } from "./chunk-X6SREM2V.js";
565
+ THEME_CHOICES
566
+ } from "./chunk-S2JWPUUH.js";
552
567
  import {
553
568
  ALL_PROVIDER_IDS,
554
569
  PROVIDER_REGISTRY,
@@ -559,11 +574,11 @@ import {
559
574
  import {
560
575
  isAnthropicOAuthToken,
561
576
  readCodexCredentialFile
562
- } from "./chunk-UWN4WNQZ.js";
577
+ } from "./chunk-DEEK2FOC.js";
563
578
  import {
564
579
  isTrusted,
565
580
  trustDir
566
- } from "./chunk-F3SQRGKZ.js";
581
+ } from "./chunk-DSMBM5LQ.js";
567
582
  import {
568
583
  apiKeysPath,
569
584
  clearAllStoredApiKeys,
@@ -581,10 +596,10 @@ import {
581
596
  readStoredSubscriptionCredential,
582
597
  writeStoredApiKey,
583
598
  writeStoredGeminiApiKey
584
- } from "./chunk-6CFPN6I4.js";
599
+ } from "./chunk-XFCFWWFK.js";
585
600
  import {
586
601
  namzuHomePath
587
- } from "./chunk-3NAVAACC.js";
602
+ } from "./chunk-2KNLSJFS.js";
588
603
  import {
589
604
  ACCEPT_EDITS_TOOLS,
590
605
  AccountRegistryError,
@@ -631,6 +646,7 @@ import {
631
646
  mustAskPerson,
632
647
  nextFireTime,
633
648
  parseAccountId,
649
+ parseAgentMarkdown,
634
650
  parseHandBack,
635
651
  parseScheduleSpec,
636
652
  parseTurnOutcome,
@@ -644,7 +660,7 @@ import {
644
660
  validateTimeZone,
645
661
  wakeBudgetFromEnv,
646
662
  wrapUntrusted
647
- } from "./chunk-YELRULQ7.js";
663
+ } from "./chunk-JTEWIH66.js";
648
664
  import {
649
665
  __commonJS,
650
666
  __export,
@@ -20558,7 +20574,7 @@ __name(useTerminalFocused, "useTerminalFocused");
20558
20574
  // src/tui/App.tsx
20559
20575
  import { existsSync as existsSync4, rmSync as rmSync2 } from "node:fs";
20560
20576
  import { homedir } from "node:os";
20561
- import { join as join10, relative as relative3, resolve as resolve8 } from "node:path";
20577
+ import { join as join11, relative as relative4, resolve as resolve8 } from "node:path";
20562
20578
  var import_react60 = __toESM(require_react(), 1);
20563
20579
 
20564
20580
  // src/tui/system-rows.ts
@@ -21012,22 +21028,22 @@ function workflowRowVariants(workflow, now) {
21012
21028
  const spent = workflow.tokens === void 0 ? void 0 : formatCompactCount(workflow.tokens);
21013
21029
  const tokens = spent && `\u2193 ${spent} tokens`;
21014
21030
  const warning = workflow.large ? LARGE_WORKFLOW_WARNING : void 0;
21015
- const join11 = /* @__PURE__ */ __name((parts) => parts.filter((part) => part !== void 0).join(" \xB7 "), "join");
21031
+ const join12 = /* @__PURE__ */ __name((parts) => parts.filter((part) => part !== void 0).join(" \xB7 "), "join");
21016
21032
  const [wide, ...narrower] = WORKFLOW_BAR_WIDTHS;
21017
21033
  const few = WORKFLOW_BAR_WIDTHS[WORKFLOW_BAR_WIDTHS.length - 1];
21018
21034
  const variants = [
21019
21035
  ...railPhaseTexts(workflow.runningPhases).map((phases) => ({
21020
21036
  barWidth: wide,
21021
- text: join11([count2, elapsed2, tokens, warning, phases])
21037
+ text: join12([count2, elapsed2, tokens, warning, phases])
21022
21038
  })),
21023
- { barWidth: wide, text: join11([count2, elapsed2, tokens, warning]) },
21039
+ { barWidth: wide, text: join12([count2, elapsed2, tokens, warning]) },
21024
21040
  ...narrower.map((barWidth) => ({
21025
21041
  barWidth,
21026
- text: join11([count2, elapsed2, tokens, warning])
21042
+ text: join12([count2, elapsed2, tokens, warning])
21027
21043
  })),
21028
- { barWidth: few, text: join11([count2, elapsed2, warning]) },
21029
- { barWidth: few, text: join11([count2, elapsed2]) },
21030
- { barWidth: 0, text: join11([count2, elapsed2]) },
21044
+ { barWidth: few, text: join12([count2, elapsed2, warning]) },
21045
+ { barWidth: few, text: join12([count2, elapsed2]) },
21046
+ { barWidth: 0, text: join12([count2, elapsed2]) },
21031
21047
  { barWidth: 0, text: count2 }
21032
21048
  ];
21033
21049
  return variants.filter(
@@ -23410,10 +23426,10 @@ function doneClock(at) {
23410
23426
  return at.toLocaleTimeString(void 0, { hour: "numeric", minute: "2-digit" });
23411
23427
  }
23412
23428
  __name(doneClock, "doneClock");
23413
- function settleLine(elapsedMs, agents, doneAt) {
23429
+ function settleLine(elapsedMs, agents, doneAt, spentInAll) {
23414
23430
  const worked = /* @__PURE__ */ __name((ms) => `Worked for ${formatElapsed(Math.max(0, ms))}${doneAt ? ` \xB7 done ${doneClock(doneAt)}` : ""}`, "worked");
23415
23431
  if (agents.length <= 0) return elapsedMs >= SETTLE_LINE_MIN_MS ? worked(elapsedMs) : void 0;
23416
- const spent = agents.reduce(
23432
+ const spent = spentInAll ?? agents.reduce(
23417
23433
  (sum, agent) => agent.tokens === void 0 ? sum : (sum ?? 0) + agent.tokens,
23418
23434
  void 0
23419
23435
  );
@@ -25942,7 +25958,7 @@ function Markdown({
25942
25958
  text,
25943
25959
  color = theme.text.primary,
25944
25960
  hyperlinks = false,
25945
- join: join11 = "block",
25961
+ join: join12 = "block",
25946
25962
  lang,
25947
25963
  fence,
25948
25964
  lead = null,
@@ -25951,9 +25967,9 @@ function Markdown({
25951
25967
  const cache3 = (0, import_react39.useRef)(void 0);
25952
25968
  cache3.current ??= createBlockCache();
25953
25969
  const shown = terminalDisplayText(text);
25954
- const source = join11 === "code" ? `${fence ?? `\`\`\`${lang ?? ""}`}
25970
+ const source = join12 === "code" ? `${fence ?? `\`\`\`${lang ?? ""}`}
25955
25971
  ${shown}` : shown;
25956
- const blocks = cache3.current.parse(source, join11 === "text" ? "text" : void 0);
25972
+ const blocks = cache3.current.parse(source, join12 === "text" ? "text" : void 0);
25957
25973
  const width = useContentWidth();
25958
25974
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
25959
25975
  BlockList,
@@ -25962,7 +25978,7 @@ ${shown}` : shown;
25962
25978
  color,
25963
25979
  hyperlinks,
25964
25980
  width,
25965
- lead: join11 === "block" ? lead : "join",
25981
+ lead: join12 === "block" ? lead : "join",
25966
25982
  flow
25967
25983
  }
25968
25984
  );
@@ -26206,6 +26222,52 @@ __name(SpanView, "SpanView");
26206
26222
  // src/tui/Transcript.tsx
26207
26223
  var import_react40 = __toESM(require_react(), 1);
26208
26224
 
26225
+ // src/tui/hint-fit.ts
26226
+ var HINTS = [
26227
+ [EXPAND_HINT, "(ctrl+o)"],
26228
+ [CLICK_EXPAND_HINT, "(click)"],
26229
+ [CLICK_FOLD_HINT, void 0]
26230
+ ];
26231
+ var SIZE_NOTE = / \(~[\d,]+ KB\)$/u;
26232
+ function trailingHint(text) {
26233
+ const note = SIZE_NOTE.exec(text)?.[0] ?? "";
26234
+ const body = note.length > 0 ? text.slice(0, -note.length) : text;
26235
+ for (const [full, short] of HINTS) {
26236
+ if (body.endsWith(full)) return { hint: full, short, note, at: body.length - full.length };
26237
+ }
26238
+ return void 0;
26239
+ }
26240
+ __name(trailingHint, "trailingHint");
26241
+ function fitHint(text, width, wrap3) {
26242
+ const found = trailingHint(text);
26243
+ if (found === void 0) return text;
26244
+ const lead = text.slice(0, found.at);
26245
+ const sep2 = /( · | )$/u.exec(lead)?.[0];
26246
+ if (sep2 === void 0) return text;
26247
+ const before = lead.slice(0, -sep2.length);
26248
+ const unit = `${found.hint}${found.note}`;
26249
+ const rows = wrap3(before, width);
26250
+ const last = rows.at(-1) ?? "";
26251
+ if (choiceDisplayWidth(last) + choiceDisplayWidth(sep2) + choiceDisplayWidth(unit) <= width) {
26252
+ return text;
26253
+ }
26254
+ if (choiceDisplayWidth(unit) <= width) return `${before}
26255
+ ${unit}`;
26256
+ const short = found.short === void 0 ? void 0 : `${found.short}${found.note}`;
26257
+ if (short !== void 0 && choiceDisplayWidth(short) <= width) return `${before}
26258
+ ${short}`;
26259
+ return before;
26260
+ }
26261
+ __name(fitHint, "fitHint");
26262
+ function fitHintPlain(text, width) {
26263
+ return fitHint(text, width, wrapChoiceText);
26264
+ }
26265
+ __name(fitHintPlain, "fitHintPlain");
26266
+ function hintSuffix(before, tail2, width) {
26267
+ return fitHintPlain(`${before}${tail2}`, width).slice(before.length);
26268
+ }
26269
+ __name(hintSuffix, "hintSuffix");
26270
+
26209
26271
  // src/tui/user-text-view.ts
26210
26272
  var USER_TEXT_LIMIT = 1e4;
26211
26273
  var USER_TEXT_EDGE = 2500;
@@ -26641,10 +26703,11 @@ function ReadSearchGroup({ message }) {
26641
26703
  // biome-ignore lint/suspicious/noArrayIndexKey: segments are positional and hold no state.
26642
26704
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { bold: segment.bold, children: segment.text }, i)
26643
26705
  )),
26644
- shownHint ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Text, { color: theme.text.muted, children: [
26645
- " ",
26646
- shownHint
26647
- ] }) : null
26706
+ shownHint ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { color: theme.text.muted, children: hintSuffix(
26707
+ segments.map((segment) => segment.text).join(""),
26708
+ ` ${shownHint}`,
26709
+ width
26710
+ ) }) : null
26648
26711
  ] }) })
26649
26712
  ] }),
26650
26713
  under.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Box_default, { flexDirection: "column", paddingLeft: RESULT_GUTTER_INDENT, children: under.map(({ text: line, wrap: wrap3 }, i) => (
@@ -27586,6 +27649,7 @@ function MessageRow({
27586
27649
  const web = message.activity === "web";
27587
27650
  const continuesWeb = web && prev?.activity === "web";
27588
27651
  const gap = !prev || message.glyph === "\u23BF" || continuesWeb ? 0 : 1;
27652
+ const rowWidth2 = glyph === "\u23BF" ? width - RESULT_GUTTER_INDENT - (RESULT_GUTTER_WIDTH - 2) : width;
27589
27653
  if (message.group && message.shell === void 0) {
27590
27654
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Box_default, { flexDirection: "column", marginTop: gap, children: [
27591
27655
  screen && message.thinking ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ThinkingBlock, { text: message.thinking }) : null,
@@ -27626,12 +27690,17 @@ function MessageRow({
27626
27690
  ...message.diff?.summary ?? [{ text: content }],
27627
27691
  ...message.meta ? [
27628
27692
  {
27629
- text: `${metaSeparator(message.meta)}${terminalDisplayText(message.meta)}`,
27693
+ // A hint that would be cut across two rows moves whole.
27694
+ text: hintSuffix(
27695
+ (message.diff?.summary ?? [{ text: content }]).map((span) => span.text).join(""),
27696
+ `${metaSeparator(message.meta)}${terminalDisplayText(message.meta)}`,
27697
+ rowWidth2
27698
+ ),
27630
27699
  muted: true
27631
27700
  }
27632
27701
  ] : []
27633
27702
  ],
27634
- width: glyph === "\u23BF" ? width - RESULT_GUTTER_INDENT - (RESULT_GUTTER_WIDTH - 2) : width,
27703
+ width: rowWidth2,
27635
27704
  color: textColor
27636
27705
  }
27637
27706
  ) })
@@ -27729,7 +27798,10 @@ function ShellBlock({
27729
27798
  // biome-ignore lint/suspicious/noArrayIndexKey: these rows have no local state; expansion replaces their text in place.
27730
27799
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Box_default, { flexDirection: "row", children: [
27731
27800
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Box_default, { width: RESULT_GUTTER_WIDTH, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { color: theme.text.muted, children: i === 0 ? "\u23BF" : " " }) }),
27732
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { color: shellToneColor(row2.tone), wrap: "wrap", children: row2.text.length > 0 ? terminalDisplayText(row2.text) : " " }) })
27801
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { color: shellToneColor(row2.tone), wrap: "wrap", children: row2.text.length > 0 ? fitHintPlain(
27802
+ terminalDisplayText(row2.text),
27803
+ Math.max(10, width - SHELL_RESULT_INDENT)
27804
+ ) : " " }) })
27733
27805
  ] }, `s-${i}`)
27734
27806
  )) });
27735
27807
  }
@@ -27744,8 +27816,11 @@ function DetailBlock({
27744
27816
  detailRef,
27745
27817
  diff: diff2
27746
27818
  }) {
27819
+ const width = useContentWidth();
27747
27820
  if (diff2) return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DiffBlock, { info: diff2, expanded, canExpand: detailRef !== void 0 });
27748
- const shown = splitDetail(lines3.map(terminalDisplayText), expanded, detailRef);
27821
+ const shown = splitDetail(lines3.map(terminalDisplayText), expanded, detailRef).map(
27822
+ (line) => fitHintPlain(line, Math.max(10, width - SHELL_RESULT_INDENT))
27823
+ );
27749
27824
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Box_default, { flexDirection: "column", paddingLeft: SHELL_RESULT_INDENT, children: shown.map((line, i) => (
27750
27825
  // biome-ignore lint/suspicious/noArrayIndexKey: these rows have no local state; expansion replaces their text in place.
27751
27826
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Box_default, { flexDirection: "row", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { color: detailLineColor(line), wrap: "wrap", children: line.length > 0 ? line : " " }) }) }, `d-${i}`)
@@ -29062,8 +29137,8 @@ async function askSideQuestion(input) {
29062
29137
  __name(askSideQuestion, "askSideQuestion");
29063
29138
 
29064
29139
  // src/integrations/trust/folder-grants.ts
29065
- import { readFileSync as readFileSync3 } from "node:fs";
29066
- import { resolve } from "node:path";
29140
+ import { readFileSync as readFileSync3, readdirSync } from "node:fs";
29141
+ import { isAbsolute as isAbsolute2, join as join5, relative, resolve } from "node:path";
29067
29142
  var FILES = ["namzu.config.json", "namzu.config.local.json"];
29068
29143
  var MAX_SHOWN_GRANT_RULES = 8;
29069
29144
  var MAX_HOOK_RUNS_CHARS = 200;
@@ -29104,6 +29179,10 @@ function describeHooks(config) {
29104
29179
  } else if (typeof spec.command === "string") {
29105
29180
  const args = Array.isArray(spec.args) ? spec.args.filter((arg) => typeof arg === "string") : [];
29106
29181
  runs = [spec.command, ...args].join(" ");
29182
+ if (spec.env !== null && typeof spec.env === "object" && !Array.isArray(spec.env)) {
29183
+ const names = Object.keys(spec.env);
29184
+ if (names.length > 0) runs = `${runs} (sets ${names.join(", ")})`;
29185
+ }
29107
29186
  }
29108
29187
  if (runs === void 0) continue;
29109
29188
  const flat = runs.replace(/\s+/g, " ").trim();
@@ -29125,6 +29204,99 @@ function readObject(path) {
29125
29204
  }
29126
29205
  }
29127
29206
  __name(readObject, "readObject");
29207
+ function describePluginHooks(cwd2) {
29208
+ const root = resolve(cwd2, ".namzu", "plugins");
29209
+ let names;
29210
+ try {
29211
+ names = readdirSync(root).sort();
29212
+ } catch {
29213
+ return [];
29214
+ }
29215
+ const out = [];
29216
+ for (const name of names) {
29217
+ const folder = join5(root, name);
29218
+ const manifest = readObject(join5(folder, "plugin.json"));
29219
+ if (!manifest) continue;
29220
+ const label = typeof manifest.name === "string" ? manifest.name : name;
29221
+ const files = ["hooks/hooks.json"];
29222
+ if (Array.isArray(manifest.hooks)) {
29223
+ for (const path of manifest.hooks) {
29224
+ if (typeof path === "string" && path.toLowerCase().endsWith(".json")) files.push(path);
29225
+ }
29226
+ }
29227
+ const blocks = [];
29228
+ for (const file of new Set(files)) {
29229
+ const path = resolve(folder, file);
29230
+ const inside = relative(folder, path);
29231
+ if (inside.startsWith("..") || isAbsolute2(inside)) continue;
29232
+ const value = readObject(path);
29233
+ if (value) blocks.push(value);
29234
+ }
29235
+ if (manifest.hookEntries !== null && typeof manifest.hookEntries === "object") {
29236
+ blocks.push(manifest.hookEntries);
29237
+ }
29238
+ for (const block of blocks) {
29239
+ const events = block.hooks !== null && typeof block.hooks === "object" && !Array.isArray(block.hooks) ? block.hooks : block;
29240
+ for (const grant of describeHooks({ hooks: events })) {
29241
+ out.push({ event: grant.event, runs: `${grant.runs} (plugin ${label})` });
29242
+ }
29243
+ }
29244
+ }
29245
+ return out;
29246
+ }
29247
+ __name(describePluginHooks, "describePluginHooks");
29248
+ function describeSkillHooks(cwd2) {
29249
+ const out = [];
29250
+ for (const skill of discoverSkills({ cwd: cwd2 })) {
29251
+ if (skill.source !== "project" || skill.hooksSource === void 0) continue;
29252
+ const read = withoutSessionStart(readSkillHooks(skill.hooksSource, `skill ${skill.name}`));
29253
+ const config = { hooks: read.hooks };
29254
+ for (const grant of describeHooks(config)) {
29255
+ out.push({ ...grant, event: `${grant.event} (skill ${skill.name})` });
29256
+ }
29257
+ if (read.guardLost) {
29258
+ out.push({
29259
+ event: `skill ${skill.name}`,
29260
+ runs: "hooks that cannot be loaded; its tools are not pre-approved"
29261
+ });
29262
+ }
29263
+ }
29264
+ return out;
29265
+ }
29266
+ __name(describeSkillHooks, "describeSkillHooks");
29267
+ function describeAgentHooks(cwd2) {
29268
+ const out = [];
29269
+ const dir = join5(cwd2, ".namzu", "agents");
29270
+ let files;
29271
+ try {
29272
+ files = readdirSync(dir, { withFileTypes: true }).filter((entry) => entry.isFile() && entry.name.endsWith(".md")).map((entry) => entry.name).sort();
29273
+ } catch {
29274
+ return out;
29275
+ }
29276
+ for (const file of files) {
29277
+ const path = join5(dir, file);
29278
+ let text;
29279
+ try {
29280
+ text = readFileSync3(path, "utf8");
29281
+ } catch {
29282
+ continue;
29283
+ }
29284
+ const found = parseAgentMarkdown(text, path, "project");
29285
+ if ("reason" in found || found.hooksSource === void 0) continue;
29286
+ const read = readAgentHooks(found.hooksSource, found.name);
29287
+ for (const grant of describeHooks({ hooks: read.hooks })) {
29288
+ out.push({ ...grant, event: `${grant.event} (agent ${found.name})` });
29289
+ }
29290
+ if (read.guardLost) {
29291
+ out.push({
29292
+ event: `agent ${found.name}`,
29293
+ runs: "hooks that cannot be loaded; the agent is not offered"
29294
+ });
29295
+ }
29296
+ }
29297
+ return out;
29298
+ }
29299
+ __name(describeAgentHooks, "describeAgentHooks");
29128
29300
  function readFolderGrants(cwd2) {
29129
29301
  const allowRules = [];
29130
29302
  const directories = [];
@@ -29150,6 +29322,15 @@ function readFolderGrants(cwd2) {
29150
29322
  }
29151
29323
  }
29152
29324
  }
29325
+ hooks.push(...describePluginHooks(cwd2));
29326
+ try {
29327
+ hooks.push(...describeSkillHooks(cwd2));
29328
+ } catch {
29329
+ }
29330
+ try {
29331
+ hooks.push(...describeAgentHooks(cwd2));
29332
+ } catch {
29333
+ }
29153
29334
  let toolServers = [];
29154
29335
  try {
29155
29336
  const declared = parseMcpServerFile(
@@ -30167,7 +30348,7 @@ __name(loadImageFiles, "loadImageFiles");
30167
30348
  // src/integrations/clipboard/image.ts
30168
30349
  import { spawn as spawn3 } from "node:child_process";
30169
30350
  import { readFile as readFile2, rm } from "node:fs/promises";
30170
- import { join as join5 } from "node:path";
30351
+ import { join as join6 } from "node:path";
30171
30352
  var MAX_IMAGE_BASE64_BYTES = 5 * 1024 * 1024;
30172
30353
  function imageFitsProvider(image2) {
30173
30354
  return image2.data.length <= MAX_IMAGE_BASE64_BYTES;
@@ -30368,7 +30549,7 @@ async function readLinux(run4, wsl, readText, fit2) {
30368
30549
  __name(readLinux, "readLinux");
30369
30550
  async function readMac(run4, fit2) {
30370
30551
  const dir = await createTempDir("clip-");
30371
- const file = join5(dir, "clip.png");
30552
+ const file = join6(dir, "clip.png");
30372
30553
  try {
30373
30554
  const result = await run4(
30374
30555
  "osascript",
@@ -38014,8 +38195,12 @@ function withLiveHint(message) {
38014
38195
  return { ...message, meta: EXPAND_HINT };
38015
38196
  }
38016
38197
  __name(withLiveHint, "withLiveHint");
38017
- function scrollBodyText(message, hint) {
38018
- return message.statusRows ? message.statusRows.map(([label, value]) => `${label} ${value}`).join("\n") : `${message.content.length > 0 ? message.content : message.pending ? "\u2026" : ""}${message.meta ? ` \xB7 ${saying(terminalDisplayText(message.meta), hint)}` : ""}`;
38198
+ function scrollBodyText(message, hint, width) {
38199
+ if (message.statusRows) {
38200
+ return message.statusRows.map(([label, value]) => `${label} ${value}`).join("\n");
38201
+ }
38202
+ const text = `${message.content.length > 0 ? message.content : message.pending ? "\u2026" : ""}${message.meta ? ` \xB7 ${saying(terminalDisplayText(message.meta), hint)}` : ""}`;
38203
+ return width === void 0 ? text : fitHintPlain(text, width);
38019
38204
  }
38020
38205
  __name(scrollBodyText, "scrollBodyText");
38021
38206
  function saying(meta, hint) {
@@ -38028,7 +38213,7 @@ function messageScrollRows(asked, hasPrev, width, options = {}) {
38028
38213
  const glyph = message.glyph ?? glyphForRole(message.role);
38029
38214
  const glyphColor = paint(message.glyphColor) ?? (glyph === "\u23BF" ? theme.text.muted : glyphColorForRole(message.role));
38030
38215
  const color = paint(message.contentColor) ?? contentColorForRole(message.role);
38031
- const joined = scrollBodyText(message, options.hint);
38216
+ const joined = scrollBodyText(message, options.hint, width);
38032
38217
  const body = wrapChoiceText(joined, width);
38033
38218
  const attachmentRows2 = message.statusRows ? [] : (message.attachments ?? []).map(
38034
38219
  (row2) => truncateChoiceText(terminalDisplayText(attachmentLine(row2)), width + GUTTER)
@@ -38038,7 +38223,10 @@ function messageScrollRows(asked, hasPrev, width, options = {}) {
38038
38223
  const detail = message.statusRows ? [] : [
38039
38224
  ...attachmentRows2.map((text) => ({ text, hint: false })),
38040
38225
  ...wordedLines.flatMap(
38041
- (line, i) => wrapChoiceText(line.length > 0 ? line : " ", width + GUTTER).map((text) => ({
38226
+ (line, i) => wrapChoiceText(
38227
+ fitHintPlain(line.length > 0 ? line : " ", width + GUTTER),
38228
+ width + GUTTER
38229
+ ).map((text) => ({
38042
38230
  text,
38043
38231
  hint: line !== plainLines[i]
38044
38232
  }))
@@ -39411,7 +39599,7 @@ __name(editablePrompts, "editablePrompts");
39411
39599
  // src/tui/external-editor.ts
39412
39600
  import { spawn as spawn4 } from "node:child_process";
39413
39601
  import { lstat, mkdtemp, readFile as readFile4, rm as rm2, writeFile } from "node:fs/promises";
39414
- import { join as join6 } from "node:path";
39602
+ import { join as join7 } from "node:path";
39415
39603
  var MAX_EDITED_DRAFT_BYTES = 4 * 1024 * 1024;
39416
39604
  var ExternalEditorError = class extends Error {
39417
39605
  static {
@@ -39497,8 +39685,8 @@ __name(resolveExternalEditorCommand, "resolveExternalEditorCommand");
39497
39685
  async function editDraftInExternalEditor(seed, options) {
39498
39686
  options.signal?.throwIfAborted();
39499
39687
  const command = resolveExternalEditorCommand(options.env, options.pressed);
39500
- const directory = options.temporaryRoot === void 0 ? await createTempDir("editor-") : await mkdtemp(join6(options.temporaryRoot, "namzu-editor-"));
39501
- const draftPath = join6(directory, "draft.md");
39688
+ const directory = options.temporaryRoot === void 0 ? await createTempDir("editor-") : await mkdtemp(join7(options.temporaryRoot, "namzu-editor-"));
39689
+ const draftPath = join7(directory, "draft.md");
39502
39690
  let edited;
39503
39691
  let failure;
39504
39692
  try {
@@ -39581,7 +39769,7 @@ async function fastModeBlocker(providerId, model, now = Date.now(), otherHost =
39581
39769
  return `Fast mode is offered on the vendor's own endpoint only, and requests here go to ${otherHost}.`;
39582
39770
  }
39583
39771
  if (!model) return "Fast mode needs a model; pick one with /model.";
39584
- const { resolveFastModeVerdict } = await import("./dist-G4BSVJKY.js");
39772
+ const { resolveFastModeVerdict } = await import("./dist-MSFQTEPK.js");
39585
39773
  const verdict = resolveFastModeVerdict(model, now);
39586
39774
  return verdict.ok ? void 0 : verdict.reason;
39587
39775
  }
@@ -40055,7 +40243,7 @@ function blockRows(block, width, color, italic, spent) {
40055
40243
  );
40056
40244
  case "code": {
40057
40245
  const indent = codeIndent(block, width);
40058
- const pad = indent > 0 ? [{ text: " ".repeat(indent) }] : [];
40246
+ const pad = codePad(indent);
40059
40247
  const lines3 = block.lines.length > 0 ? block.lines : [""];
40060
40248
  grammarState(block.lang);
40061
40249
  const coloured = colourLines(block.lang, lines3, { above: "", block: 0, spent });
@@ -40070,8 +40258,27 @@ function blockRows(block, width, color, italic, spent) {
40070
40258
  }
40071
40259
  }
40072
40260
  __name(blockRows, "blockRows");
40261
+ function codePad(indent) {
40262
+ return indent > 0 ? [{ text: " ".repeat(indent) }] : [];
40263
+ }
40264
+ __name(codePad, "codePad");
40265
+ function codeLineRows(line, runs, room, indent, pad) {
40266
+ const pieces2 = wrapCodeLine(line, room);
40267
+ const joins = wrapJoiners(line, pieces2);
40268
+ const cut3 = runs ? runsForPieces(line, runs, pieces2) : void 0;
40269
+ return pieces2.map((piece, i) => {
40270
+ const body = cut3?.[i];
40271
+ const spans = body ? body.length === 0 ? [{ text: " ", color: theme.text.primary }] : body.map((run4) => ({
40272
+ text: run4.text,
40273
+ color: run4.kind ? theme.code[run4.kind] : theme.text.primary
40274
+ })) : [{ text: piece.length > 0 ? piece : " ", color: theme.status.ok }];
40275
+ return row([...pad, ...spans], i === 0 ? null : joins[i] ?? null, indent);
40276
+ });
40277
+ }
40278
+ __name(codeLineRows, "codeLineRows");
40073
40279
  var keptLines = /* @__PURE__ */ new Map();
40074
40280
  var keptLineChars = 0;
40281
+ var KEPT_LINE_CHARS = 1e6;
40075
40282
  function keptLineRows(line, runs, room, indent, pad) {
40076
40283
  const sig = runs ? runs.map((run4) => `${run4.kind ?? ""}:${run4.text.length}`).join(",") : "-";
40077
40284
  const key = `${shownTheme()}|${room}|${indent}|${sig}|${line}`;
@@ -40081,56 +40288,24 @@ function keptLineRows(line, runs, room, indent, pad) {
40081
40288
  keptLines.set(key, hit);
40082
40289
  return hit;
40083
40290
  }
40084
- const pieces2 = wrapCodeLine(line, room);
40085
- const joins = wrapJoiners(line, pieces2);
40086
- const cut3 = runs ? runsForPieces(line, runs, pieces2) : void 0;
40087
- const made = pieces2.map((piece, i) => {
40088
- const body = cut3?.[i];
40089
- const spans = body ? body.length === 0 ? [{ text: " ", color: theme.text.primary }] : body.map((run4) => ({
40090
- text: run4.text,
40091
- color: run4.kind ? theme.code[run4.kind] : theme.text.primary
40092
- })) : [{ text: piece.length > 0 ? piece : " ", color: theme.status.ok }];
40093
- return row([...pad, ...spans], i === 0 ? null : joins[i] ?? null, indent);
40094
- });
40291
+ const made = codeLineRows(line, runs, room, indent, pad);
40095
40292
  keptLines.set(key, made);
40096
40293
  keptLineChars += key.length;
40097
40294
  for (const old of keptLines.keys()) {
40098
- if (keptLineChars <= KEPT_BLOCK_CHARS || keptLines.size <= 1) break;
40295
+ if (keptLineChars <= KEPT_LINE_CHARS || keptLines.size <= 1) break;
40099
40296
  keptLines.delete(old);
40100
40297
  keptLineChars -= old.length;
40101
40298
  }
40102
40299
  return made;
40103
40300
  }
40104
40301
  __name(keptLineRows, "keptLineRows");
40105
- var KEPT_BLOCK_CHARS = 4e6;
40106
- var keptBlocks = /* @__PURE__ */ new Map();
40107
- var keptChars = 0;
40108
- function keptBlockRows(block, width, color, italic, spent) {
40109
- const key = `${shownTheme()}:${grammarVersion()}|${width}|${color}|${italic}|${spent}|${JSON.stringify(block)}`;
40110
- const hit = keptBlocks.get(key);
40111
- if (hit) {
40112
- keptBlocks.delete(key);
40113
- keptBlocks.set(key, hit);
40114
- return hit;
40115
- }
40116
- const made = blockRows(block, width, color, italic, spent);
40117
- keptBlocks.set(key, made);
40118
- keptChars += key.length;
40119
- for (const old of keptBlocks.keys()) {
40120
- if (keptChars <= KEPT_BLOCK_CHARS || keptBlocks.size <= 1) break;
40121
- keptBlocks.delete(old);
40122
- keptChars -= old.length;
40123
- }
40124
- return made;
40125
- }
40126
- __name(keptBlockRows, "keptBlockRows");
40127
- function blocksRows(blocks, width, color, italic, spent = 0) {
40302
+ function blocksRows(blocks, width, color, italic, spent = 0, before) {
40128
40303
  const rows = [];
40129
40304
  let above = spent;
40130
40305
  blocks.forEach((block, i) => {
40131
- const prev = blocks[i - 1];
40132
- if (blockGap(block, prev?.type)) rows.push(row([]));
40133
- for (const made of keptBlockRows(block, width, color, italic, above)) rows.push(made);
40306
+ const prev = i === 0 ? before : blocks[i - 1]?.type;
40307
+ if (blockGap(block, prev)) rows.push(row([]));
40308
+ for (const made of blockRows(block, width, color, italic, above)) rows.push(made);
40134
40309
  above += codeChars(block);
40135
40310
  });
40136
40311
  return rows;
@@ -40141,6 +40316,246 @@ function markdownRows(text, width, color) {
40141
40316
  }
40142
40317
  __name(markdownRows, "markdownRows");
40143
40318
 
40319
+ // src/tui/fullscreen/reply-rows.ts
40320
+ function detach(text) {
40321
+ return text.length < 13 ? text : ` ${text}`.slice(1);
40322
+ }
40323
+ __name(detach, "detach");
40324
+ var ReplyRows = class {
40325
+ constructor(width, color, wrap3) {
40326
+ this.width = width;
40327
+ this.color = color;
40328
+ this.wrap = wrap3;
40329
+ }
40330
+ width;
40331
+ color;
40332
+ wrap;
40333
+ static {
40334
+ __name(this, "ReplyRows");
40335
+ }
40336
+ /** The text last handed in: the next one must begin with it. */
40337
+ seen = "";
40338
+ /** Where the text not yet laid out for good begins: always at the start of a block. */
40339
+ pos = 0;
40340
+ /** Rows of the blocks before `pos`, in the form the window holds them. */
40341
+ done = [];
40342
+ /** The type of the last block before `pos`, for the blank row between blocks. */
40343
+ prev;
40344
+ /** Characters of fenced code before `pos`. */
40345
+ spent = 0;
40346
+ code = null;
40347
+ ended = false;
40348
+ /** A reply with a control character in it is not laid out here. */
40349
+ broken = false;
40350
+ /** Rows of the last block, still open. */
40351
+ openRows = [];
40352
+ /** Whether this reply can be laid out here at all. */
40353
+ get usable() {
40354
+ return !this.broken;
40355
+ }
40356
+ /** Rows held for good, and rows of the open block: what is kept, for the tests that count it. */
40357
+ get kept() {
40358
+ return { settled: this.done.length, open: this.openRows.length };
40359
+ }
40360
+ /**
40361
+ * The rows of `content`: the text as far as it is decided while the reply is
40362
+ * pending, the whole of it once it is `complete`. `undefined` when this reply
40363
+ * has to be laid out from the whole text.
40364
+ */
40365
+ update(content, complete) {
40366
+ if (this.broken) return void 0;
40367
+ if (this.ended || !content.startsWith(this.seen)) this.reset();
40368
+ const fresh = content.slice(this.seen.length);
40369
+ if (fresh.length > 0 && terminalDisplayText(fresh) !== fresh) {
40370
+ this.broken = true;
40371
+ this.reset();
40372
+ return void 0;
40373
+ }
40374
+ this.seen = content;
40375
+ this.advance(content, complete);
40376
+ if (complete) this.ended = true;
40377
+ return this.openRows.length > 0 ? this.done.concat(this.openRows) : this.done.slice();
40378
+ }
40379
+ reset() {
40380
+ this.seen = "";
40381
+ this.pos = 0;
40382
+ this.done = [];
40383
+ this.prev = void 0;
40384
+ this.spent = 0;
40385
+ this.code = null;
40386
+ this.ended = false;
40387
+ this.openRows = [];
40388
+ }
40389
+ put(rows, into, base) {
40390
+ for (const made of rows) into.push(this.wrap(made, base + into.length));
40391
+ }
40392
+ /** Lay out the blocks of `text`, which end at a block boundary, for good. */
40393
+ settle(text) {
40394
+ const blocks = parseMarkdown(text);
40395
+ if (blocks.length === 0) return;
40396
+ this.put(blocksRows(blocks, this.width, this.color, false, this.spent, this.prev), this.done, 0);
40397
+ for (const block of blocks) this.spent += codeChars(block);
40398
+ this.prev = blocks[blocks.length - 1]?.type;
40399
+ }
40400
+ advance(content, complete) {
40401
+ this.openRows = [];
40402
+ for (; ; ) {
40403
+ if (this.code) {
40404
+ if (!this.readCode(content, complete)) return;
40405
+ continue;
40406
+ }
40407
+ const rest = content.slice(this.pos);
40408
+ const ranges = scanBlockRanges(rest);
40409
+ const last = ranges[ranges.length - 1];
40410
+ if (!last) return;
40411
+ if (last.start > 0) {
40412
+ this.settle(detach(rest.slice(0, last.start)));
40413
+ this.pos += last.start;
40414
+ }
40415
+ if (last.kind === "code") {
40416
+ const at = content.indexOf("\n", this.pos);
40417
+ const opener = at >= 0 ? openingFence(content.slice(this.pos, at)) : null;
40418
+ if (opener) {
40419
+ this.openCode(opener, at + 1);
40420
+ continue;
40421
+ }
40422
+ }
40423
+ const tail2 = content.slice(this.pos);
40424
+ const shown = complete ? tail2 : tailView(tail2, { join: "block", lead: null });
40425
+ const blocks = parseMarkdown(shown);
40426
+ this.put(
40427
+ blocksRows(blocks, this.width, this.color, false, this.spent, this.prev),
40428
+ this.openRows,
40429
+ this.done.length
40430
+ );
40431
+ return;
40432
+ }
40433
+ }
40434
+ openCode(opener, at) {
40435
+ grammarState(opener.lang);
40436
+ this.code = {
40437
+ opener,
40438
+ lang: opener.lang,
40439
+ stripped: opener.indent,
40440
+ indent: codeIndent({ indent: opener.indent }, this.width),
40441
+ spentBefore: this.spent,
40442
+ at,
40443
+ lines: 0,
40444
+ chars: 0,
40445
+ head: [],
40446
+ headChars: 0,
40447
+ headVersion: 0,
40448
+ coloured: 0,
40449
+ volatile: [],
40450
+ volatileFor: -1,
40451
+ fixed: []
40452
+ };
40453
+ }
40454
+ /**
40455
+ * Read the lines of the open block that have arrived. True when the block has
40456
+ * ended and the text after it is next; false when it is still open, with its
40457
+ * rows in `openRows`.
40458
+ */
40459
+ readCode(content, complete) {
40460
+ const code = this.code;
40461
+ const added = [];
40462
+ let closed = false;
40463
+ let next = code.at;
40464
+ for (; ; ) {
40465
+ const nl = content.indexOf("\n", next);
40466
+ if (nl < 0 && !complete) break;
40467
+ const line = nl < 0 ? content.slice(next) : content.slice(next, nl);
40468
+ if (closesFence(line, code.opener)) {
40469
+ closed = true;
40470
+ next = nl < 0 ? content.length : nl + 1;
40471
+ break;
40472
+ }
40473
+ const text = detach(stripFenceIndent(line, code.stripped));
40474
+ added.push({ n: code.lines, line: text });
40475
+ code.lines += 1;
40476
+ code.chars += text.length + 1;
40477
+ if (code.headChars + text.length + 1 <= MAX_BLOCK_CHARS) {
40478
+ code.head.push(text);
40479
+ code.headChars += text.length + 1;
40480
+ code.headVersion += 1;
40481
+ }
40482
+ if (nl < 0) {
40483
+ next = content.length;
40484
+ closed = true;
40485
+ break;
40486
+ }
40487
+ next = nl + 1;
40488
+ }
40489
+ code.at = next;
40490
+ this.colour(code, added);
40491
+ if (code.lines === 0 && !closed) return false;
40492
+ const rows = [];
40493
+ const base = this.done.length;
40494
+ if (code.lines === 0) {
40495
+ const empty = {
40496
+ type: "code",
40497
+ ...code.lang ? { lang: code.lang } : {},
40498
+ ...code.opener.indent > 0 ? { indent: code.opener.indent } : {},
40499
+ lines: []
40500
+ };
40501
+ this.put(
40502
+ blocksRows([empty], this.width, this.color, false, this.spent, this.prev),
40503
+ rows,
40504
+ base
40505
+ );
40506
+ } else {
40507
+ if (this.gapAbove(code)) this.put([row([])], rows, base);
40508
+ for (const made of code.volatile) rows.push(made);
40509
+ for (const made of code.fixed) rows.push(made);
40510
+ }
40511
+ if (!closed) {
40512
+ this.openRows = rows;
40513
+ return false;
40514
+ }
40515
+ for (const made of rows) this.done.push(made);
40516
+ this.spent += code.chars;
40517
+ this.prev = "code";
40518
+ this.pos = next;
40519
+ this.code = null;
40520
+ return true;
40521
+ }
40522
+ /**
40523
+ * Colour what the library may still change, and make the rows of what it may not.
40524
+ * `added` are the lines that arrived since the last read, in order.
40525
+ */
40526
+ colour(code, added) {
40527
+ const room = this.width - code.indent;
40528
+ const pad = codePad(code.indent);
40529
+ const first = this.done.length + (this.gapAbove(code) ? 1 : 0);
40530
+ const into = /* @__PURE__ */ __name((rows, rowsOf2) => {
40531
+ for (const made of rows) rowsOf2.push(this.wrap(made, first + rowsOf2.length));
40532
+ }, "into");
40533
+ if (code.volatileFor !== code.headVersion) {
40534
+ const coloured = colourLines(code.lang, code.head, {
40535
+ above: "",
40536
+ block: 0,
40537
+ spent: code.spentBefore
40538
+ })?.lines;
40539
+ code.coloured = coloured?.length ?? 0;
40540
+ const rows = [];
40541
+ for (let n = 0; n < code.coloured; n++)
40542
+ into(keptLineRows(code.head[n], coloured?.[n], room, code.indent, pad), rows);
40543
+ code.volatile = rows;
40544
+ code.volatileFor = code.headVersion;
40545
+ }
40546
+ for (const { n, line } of added) {
40547
+ if (n < code.coloured) continue;
40548
+ const rows = codeLineRows(line, void 0, room, code.indent, pad);
40549
+ for (const made of rows)
40550
+ code.fixed.push(this.wrap(made, first + code.volatile.length + code.fixed.length));
40551
+ }
40552
+ }
40553
+ /** Whether a blank row stands between the block before and this one. */
40554
+ gapAbove(code) {
40555
+ return blockGap({ type: "code", indent: code.opener.indent }, this.prev) === 1;
40556
+ }
40557
+ };
40558
+
40144
40559
  // src/tui/fullscreen/layout.ts
40145
40560
  function rendersMarkdown(message) {
40146
40561
  return message.role === "assistant" && message.content.length > 0 && message.statusRows === void 0 && // The rendered rows carry the content only; a reply with a meta suffix keeps
@@ -40191,7 +40606,7 @@ function clickableRows(message, hasPrev, width, open) {
40191
40606
  const shown = open ? openedMessage(message) : message;
40192
40607
  const hint = open ? void 0 : CLICK_EXPAND_HINT;
40193
40608
  const plain2 = open ? messageScrollRows(shown, hasPrev, fit2) : closed;
40194
- const text = scrollBodyText(shown, hint);
40609
+ const text = scrollBodyText(shown, hint, fit2);
40195
40610
  const body = wrapChoiceText(text, fit2).length;
40196
40611
  const joins = wrapJoiners(
40197
40612
  text,
@@ -40208,7 +40623,7 @@ function clickableRows(message, hasPrev, width, open) {
40208
40623
  };
40209
40624
  }
40210
40625
  __name(clickableRows, "clickableRows");
40211
- function fullscreenMessageRows(asked, hasPrev, width, mode = PLAIN) {
40626
+ function fullscreenMessageRows(asked, hasPrev, width, mode = PLAIN, streams) {
40212
40627
  const message = withLiveHint(asked);
40213
40628
  if (mode.click) {
40214
40629
  const clickable = clickableRows(message, hasPrev, width, mode.open);
@@ -40220,25 +40635,36 @@ function fullscreenMessageRows(asked, hasPrev, width, mode = PLAIN) {
40220
40635
  const plain2 = messageScrollRows(markdown ? { ...message, content: "x" } : message, hasPrev, fit2);
40221
40636
  const gap = plain2.gap ? plainRow(plain2.gap) : null;
40222
40637
  const first = plain2.rows[0];
40223
- const body = markdown ? 1 : wrapChoiceText(scrollBodyText(message), fit2).length;
40638
+ const body = markdown ? 1 : wrapChoiceText(scrollBodyText(message, void 0, fit2), fit2).length;
40224
40639
  if (markdown && first) {
40225
- const shown = message.pending ? tailView(message.content, { join: "block", lead: null }) : message.content;
40226
- const rows = markdownRows(shown, width, contentColorForRole(message.role)).map(
40227
- (row2, i) => ({
40228
- glyph: i === 0 ? first.glyph : " ",
40229
- glyphColor: first.glyphColor,
40230
- text: row2.text,
40231
- color: first.color,
40232
- spans: row2.spans,
40233
- joins: row2.joins,
40234
- lead: row2.lead
40235
- })
40236
- );
40640
+ const color = contentColorForRole(message.role);
40641
+ const wrap3 = /* @__PURE__ */ __name((row2, i) => ({
40642
+ glyph: i === 0 ? first.glyph : " ",
40643
+ glyphColor: first.glyphColor,
40644
+ text: row2.text,
40645
+ color: first.color,
40646
+ spans: row2.spans,
40647
+ joins: row2.joins,
40648
+ lead: row2.lead
40649
+ }), "wrap");
40650
+ const kept = streams && (message.pending || streams.has(message.id));
40651
+ const key = `${width}|${color}|${shownTheme()}:${grammarVersion()}|${first.glyph}|${first.glyphColor}|${first.color}`;
40652
+ let held2 = kept ? streams.get(message.id) : void 0;
40653
+ if (kept && (!held2 || held2.key !== key)) {
40654
+ held2 = { key, rows: new ReplyRows(width, color, wrap3) };
40655
+ streams.set(message.id, held2);
40656
+ }
40657
+ const streamed = held2?.rows.update(message.content, !message.pending);
40658
+ const rows = streamed ?? [];
40659
+ if (!streamed) {
40660
+ const shown = message.pending ? tailView(message.content, { join: "block", lead: null }) : message.content;
40661
+ markdownRows(shown, width, color).forEach((row2, i) => rows.push(wrap3(row2, i)));
40662
+ }
40237
40663
  for (const row2 of plain2.rows.slice(body)) rows.push(plainRow(row2));
40238
40664
  return { gap, rows };
40239
40665
  }
40240
40666
  const joins = wrapJoiners(
40241
- scrollBodyText(message),
40667
+ scrollBodyText(message, void 0, fit2),
40242
40668
  plain2.rows.slice(0, body).map((r) => r.text)
40243
40669
  );
40244
40670
  const own = plain2.rows.map((row2, i) => plainRow(row2, i < body ? joins[i] ?? null : null));
@@ -40249,7 +40675,7 @@ function fullscreenMessageRows(asked, hasPrev, width, mode = PLAIN) {
40249
40675
  }
40250
40676
  __name(fullscreenMessageRows, "fullscreenMessageRows");
40251
40677
  function createLayoutCache() {
40252
- return { kept: /* @__PURE__ */ new WeakMap(), laid: 0 };
40678
+ return { kept: /* @__PURE__ */ new WeakMap(), streams: /* @__PURE__ */ new Map(), laid: 0 };
40253
40679
  }
40254
40680
  __name(createLayoutCache, "createLayoutCache");
40255
40681
  var MARK_ID = "\0new-replies";
@@ -40283,7 +40709,7 @@ function layoutTranscript(messages, pending, pendingAt, columns, cache3, view =
40283
40709
  theme: theme2,
40284
40710
  click: mode.click,
40285
40711
  open: mode.open,
40286
- block: fullscreenMessageRows(message, hasPrev, width, mode)
40712
+ block: fullscreenMessageRows(message, hasPrev, width, mode, cache3.streams)
40287
40713
  };
40288
40714
  cache3.kept.set(message, hit);
40289
40715
  cache3.laid += 1;
@@ -40297,6 +40723,7 @@ function layoutTranscript(messages, pending, pendingAt, columns, cache3, view =
40297
40723
  tail: `${message.content.length}:${message.pending ? 1 : 0}`
40298
40724
  });
40299
40725
  });
40726
+ for (const id of cache3.streams.keys()) if (id !== pending?.id) cache3.streams.delete(id);
40300
40727
  return { rows, index: buildRowIndex(blocks) };
40301
40728
  }
40302
40729
  __name(layoutTranscript, "layoutTranscript");
@@ -41688,7 +42115,7 @@ var AskQueue = class {
41688
42115
  };
41689
42116
 
41690
42117
  // src/tui/plugin-view.ts
41691
- import { join as join7 } from "node:path";
42118
+ import { join as join8 } from "node:path";
41692
42119
  function pluginOption(plugin) {
41693
42120
  return {
41694
42121
  label: plugin.name,
@@ -41699,7 +42126,7 @@ function pluginOption(plugin) {
41699
42126
  }
41700
42127
  __name(pluginOption, "pluginOption");
41701
42128
  function pluginSummary(plugin) {
41702
- return `${plugin.status} \xB7 ${plugin.scope} \xB7 ${plugin.tools.length} tool${plugin.tools.length === 1 ? "" : "s"} \xB7 ${plugin.skills.length} skill${plugin.skills.length === 1 ? "" : "s"}`;
42129
+ return `${plugin.status} \xB7 ${plugin.scope} \xB7 ${plugin.tools.length} tool${plugin.tools.length === 1 ? "" : "s"} \xB7 ${plugin.skills.length} skill${plugin.skills.length === 1 ? "" : "s"}${(plugin.hookEntries ?? 0) > 0 ? ` \xB7 ${plugin.hookEntries} hook entr${plugin.hookEntries === 1 ? "y" : "ies"}` : ""}`;
41703
42130
  }
41704
42131
  __name(pluginSummary, "pluginSummary");
41705
42132
  function pluginDetails(plugin) {
@@ -41713,6 +42140,7 @@ function pluginDetails(plugin) {
41713
42140
  `Registered tools: ${plugin.tools.join(", ") || "none"}`,
41714
42141
  `Registered skills: ${plugin.skills.join(", ") || "none"}`,
41715
42142
  `Declared hook modules: ${plugin.hookModules.join(", ") || "none"}`,
42143
+ `Hook entries (commands, addresses, prompts it ships): ${(plugin.hookEntries ?? 0) === 0 ? "none" : `${plugin.hookEntries}, listed by /hooks while the plugin is enabled`}`,
41716
42144
  `Declared MCP servers: ${plugin.mcpServers.join(", ") || "none"}`,
41717
42145
  `Slash commands: ${plugin.commands.map((name) => `/${name}`).join(", ") || "none"}`,
41718
42146
  `Agents: ${plugin.agents.join(", ") || "none"}`,
@@ -41731,9 +42159,9 @@ function emptyPluginReport(config, cwd2) {
41731
42159
  const reason = config?.enabled !== true ? "Plugins are off. Set plugins.enabled: true in your Namzu configuration to load trusted plugins at startup." : config.autoDiscovery === false ? "Plugin discovery is off (plugins.autoDiscovery: false)." : scopes.length === 0 ? "No plugin scopes are allowed (plugins.allowedScopes: [])." : "No plugins are loaded in this conversation.";
41732
42160
  return [
41733
42161
  reason,
41734
- `Configuration: ${join7(home, "config.yaml")}`,
41735
- ...scopes.includes("project") ? [`Project plugins: ${join7(cwd2, ".namzu", "plugins")}`] : [],
41736
- ...scopes.includes("user") ? [`User plugins: ${join7(home, "plugins")}`] : [],
42162
+ `Configuration: ${join8(home, "config.yaml")}`,
42163
+ ...scopes.includes("project") ? [`Project plugins: ${join8(cwd2, ".namzu", "plugins")}`] : [],
42164
+ ...scopes.includes("user") ? [`User plugins: ${join8(home, "plugins")}`] : [],
41737
42165
  "Each plugin directory contains plugin.json. Only Namzu plugin manifests are supported.",
41738
42166
  "Tools, hooks and MCP servers can execute code. Enable only plugins you trust, then restart Namzu."
41739
42167
  ].map(choiceDisplayText).join("\n");
@@ -42345,7 +42773,7 @@ function noResumeText(input) {
42345
42773
  __name(noResumeText, "noResumeText");
42346
42774
 
42347
42775
  // src/tui/schedule/host-commands.ts
42348
- import { isAbsolute as isAbsolute2, relative, resolve as resolve3 } from "node:path";
42776
+ import { isAbsolute as isAbsolute3, relative as relative2, resolve as resolve3 } from "node:path";
42349
42777
 
42350
42778
  // src/tui/schedule/loop-host.ts
42351
42779
  import { randomBytes as randomBytes2 } from "node:crypto";
@@ -42621,8 +43049,8 @@ async function confirmInTui(ctx, job, verb) {
42621
43049
  if (ctx.review) {
42622
43050
  const roots2 = [ctx.cwd, ...ctx.extraRoots ?? []];
42623
43051
  const outside = job.workspace !== "none" && !roots2.some((root) => {
42624
- const rel = relative(root, job.folder.canonical);
42625
- return rel === "" || !rel.startsWith("..") && !isAbsolute2(rel);
43052
+ const rel = relative2(root, job.folder.canonical);
43053
+ return rel === "" || !rel.startsWith("..") && !isAbsolute3(rel);
42626
43054
  });
42627
43055
  const hasScript = runKind !== "agent";
42628
43056
  const networkCapable = policy.network || job.permissions.execution === "host" && (hasScript || allowsCommands(job.permissions));
@@ -43152,7 +43580,7 @@ __name(prepareScheduledResume, "prepareScheduledResume");
43152
43580
 
43153
43581
  // src/tui/schedule/startup.ts
43154
43582
  import { readFileSync as readFileSync6 } from "node:fs";
43155
- import { join as join8 } from "node:path";
43583
+ import { join as join9 } from "node:path";
43156
43584
  function ago(ms) {
43157
43585
  if (ms < 36e5) return `${Math.max(1, Math.round(ms / 6e4))} min`;
43158
43586
  if (ms < 1728e5) return `${Math.round(ms / 36e5)} h`;
@@ -43234,7 +43662,7 @@ function scheduleStartupLine(home, cwd2, now = Date.now()) {
43234
43662
  parts.push("The scheduler is installed but has not started \u2014 namzu schedule status");
43235
43663
  }
43236
43664
  }
43237
- const suppressed = takeSuppressedCount(join8(paths.daemon, "notify.json"));
43665
+ const suppressed = takeSuppressedCount(join9(paths.daemon, "notify.json"));
43238
43666
  if (suppressed > 0)
43239
43667
  parts.push(
43240
43668
  `${plural(suppressed, "scheduled notification")} ${suppressed === 1 ? "was" : "were"} held back`
@@ -43253,10 +43681,10 @@ __name(scheduleStartupLine, "scheduleStartupLine");
43253
43681
 
43254
43682
  // src/tui/schedule/tool-host.ts
43255
43683
  import { realpathSync as realpathSync3 } from "node:fs";
43256
- import { isAbsolute as isAbsolute3, relative as relative2, resolve as resolve5 } from "node:path";
43684
+ import { isAbsolute as isAbsolute4, relative as relative3, resolve as resolve5 } from "node:path";
43257
43685
  function within(root, path) {
43258
- const rel = relative2(root, path);
43259
- return rel === "" || !rel.startsWith("..") && !isAbsolute3(rel);
43686
+ const rel = relative3(root, path);
43687
+ return rel === "" || !rel.startsWith("..") && !isAbsolute4(rel);
43260
43688
  }
43261
43689
  __name(within, "within");
43262
43690
  function canonicalCwd(cwd2) {
@@ -44307,11 +44735,11 @@ __name(setSkillSuggestions, "setSkillSuggestions");
44307
44735
 
44308
44736
  // src/tui/skills/suggestion-ledger.ts
44309
44737
  import { mkdirSync as mkdirSync4, readFileSync as readFileSync7, renameSync as renameSync3, writeFileSync as writeFileSync3 } from "node:fs";
44310
- import { dirname, join as join9 } from "node:path";
44738
+ import { dirname, join as join10 } from "node:path";
44311
44739
  var SUGGESTION_IGNORE_LIMIT = 3;
44312
44740
  var FRESH_LEDGER = { v: 1, unanswered: 0, stopped: false };
44313
44741
  function suggestionLedgerPath(namzuHome) {
44314
- return join9(namzuHome, "skills", ".suggestions.json");
44742
+ return join10(namzuHome, "skills", ".suggestions.json");
44315
44743
  }
44316
44744
  __name(suggestionLedgerPath, "suggestionLedgerPath");
44317
44745
  function readSuggestionLedger(namzuHome) {
@@ -45502,6 +45930,7 @@ function trailFromRecords(records, options) {
45502
45930
  const turns = /* @__PURE__ */ new Map();
45503
45931
  const turnOfMessage = /* @__PURE__ */ new Map();
45504
45932
  const recalled = /* @__PURE__ */ new Map();
45933
+ const spawnedIn = /* @__PURE__ */ new Map();
45505
45934
  const turn = /* @__PURE__ */ __name((id) => {
45506
45935
  let found = turns.get(id);
45507
45936
  if (!found) {
@@ -45550,6 +45979,19 @@ function trailFromRecords(records, options) {
45550
45979
  }
45551
45980
  }
45552
45981
  break;
45982
+ case "child_session_spawned":
45983
+ if (turnId && typeof record3.childSessionId === "string")
45984
+ spawnedIn.set(record3.childSessionId, turnId);
45985
+ break;
45986
+ case "child_session_ended": {
45987
+ const owner = typeof record3.childSessionId === "string" ? spawnedIn.get(record3.childSessionId) : void 0;
45988
+ const spent = record3.usage?.totalTokens;
45989
+ if (owner && typeof spent === "number" && Number.isFinite(spent)) {
45990
+ const t = turn(owner);
45991
+ t.agentTokens = (t.agentTokens ?? 0) + spent;
45992
+ }
45993
+ break;
45994
+ }
45553
45995
  case "tool_executing": {
45554
45996
  if (typeof record3.toolUseId !== "string" || record3.via) break;
45555
45997
  const key = callKey(turnId, record3.toolUseId);
@@ -45810,7 +46252,12 @@ function createRestoredTurnWriter(messages, nextId, options) {
45810
46252
  const stand = turn.agents.map(
45811
46253
  (failed) => ({ status: failed ? "failed" : "completed" })
45812
46254
  );
45813
- const line = stand.length > 0 || completed ? settleLine(Math.max(0, turn.endedAt - turn.startedAt), stand, new Date(turn.endedAt)) : void 0;
46255
+ const line = stand.length > 0 || completed ? settleLine(
46256
+ Math.max(0, turn.endedAt - turn.startedAt),
46257
+ stand,
46258
+ new Date(turn.endedAt),
46259
+ turn.agentTokens
46260
+ ) : void 0;
45814
46261
  if (line)
45815
46262
  rows.push({
45816
46263
  id: nextId(),
@@ -48339,7 +48786,7 @@ ${blocks.join("\n\n")}`;
48339
48786
  const scope = scopeRef.current;
48340
48787
  if (!sessions || !scope || !conversationMaterializedRef.current) return void 0;
48341
48788
  try {
48342
- return join10(sessions.paths.sessionDir({ sessionId: scope.sessionId }), "loops.json");
48789
+ return join11(sessions.paths.sessionDir({ sessionId: scope.sessionId }), "loops.json");
48343
48790
  } catch {
48344
48791
  return void 0;
48345
48792
  }
@@ -49513,6 +49960,19 @@ ${blocks.join("\n\n")}`;
49513
49960
  },
49514
49961
  [pushMessage, pushSystem]
49515
49962
  );
49963
+ const attachSkillHooks = (0, import_react60.useCallback)(
49964
+ (skill) => {
49965
+ if (!session?.skillHooks) {
49966
+ pushMessage(
49967
+ "system",
49968
+ `Skill ${skill.name} carries hooks, but this session has no hook runtime, so they are not attached.`
49969
+ );
49970
+ return;
49971
+ }
49972
+ session.skillHooks.use(skill);
49973
+ },
49974
+ [session, pushMessage]
49975
+ );
49516
49976
  const activateSkill = (0, import_react60.useCallback)(
49517
49977
  (name) => {
49518
49978
  const info = discoverSkills({
@@ -49530,12 +49990,14 @@ ${blocks.join("\n\n")}`;
49530
49990
  { name: info.name, body }
49531
49991
  ]);
49532
49992
  conversationLearning().skillUsed = true;
49993
+ const carried = hooksOf(info);
49994
+ if (carried) attachSkillHooks(carried);
49533
49995
  pushMessage("system", `Activated skill: ${info.name}`);
49534
49996
  } catch (error) {
49535
49997
  pushSystem("error", explainFailure(error, `Could not load skill "${name}".`));
49536
49998
  }
49537
49999
  },
49538
- [conversationLearning, ctx.cwd, ctx.skills, pushMessage, pushSystem]
50000
+ [attachSkillHooks, conversationLearning, ctx.cwd, ctx.skills, pushMessage, pushSystem]
49539
50001
  );
49540
50002
  const removeStoredCredential = (0, import_react60.useCallback)(
49541
50003
  (target) => {
@@ -50580,6 +51042,7 @@ ${blocks.join("\n\n")}`;
50580
51042
  ...activeCtx.web ? { web: activeCtx.web } : {},
50581
51043
  ...activeCtx.smallModel ? { smallModel: activeCtx.smallModel } : {},
50582
51044
  ...activeCtx.hooks ? { hooks: activeCtx.hooks } : {},
51045
+ ...activeCtx.hooksSwitch ? { hooksSwitch: activeCtx.hooksSwitch } : {},
50583
51046
  ...activeCtx.compaction ? { compaction: activeCtx.compaction } : {},
50584
51047
  ...activeCtx.memory ? { memory: activeCtx.memory } : {},
50585
51048
  ...activeCtx.workflow ? { workflow: activeCtx.workflow } : {},
@@ -50740,13 +51203,13 @@ ${blocks.join("\n\n")}`;
50740
51203
  )) {
50741
51204
  pushMessage(
50742
51205
  "system",
50743
- `Project instructions: ${s.instructionFiles.map((p) => relative3(activeCtx.cwd, p) || p).join(", ")}`
51206
+ `Project instructions: ${s.instructionFiles.map((p) => relative4(activeCtx.cwd, p) || p).join(", ")}`
50744
51207
  );
50745
51208
  }
50746
51209
  for (const skip of s.skippedInstructionFiles) {
50747
51210
  pushMessage(
50748
51211
  "system",
50749
- `Skipped ${relative3(activeCtx.cwd, skip.path) || skip.path}: ${skip.reason}`
51212
+ `Skipped ${relative4(activeCtx.cwd, skip.path) || skip.path}: ${skip.reason}`
50750
51213
  );
50751
51214
  }
50752
51215
  const reportedToolServers = /* @__PURE__ */ new Set();
@@ -51309,6 +51772,22 @@ ${blocks.join("\n\n")}`;
51309
51772
  hooks: /* @__PURE__ */ __name(() => session?.hooks, "hooks"),
51310
51773
  hooksView: /* @__PURE__ */ __name(() => ({
51311
51774
  ...session?.pluginHooks ? { pluginHooks: session.pluginHooks() } : {},
51775
+ ...session?.pluginHookEntries ? { pluginEntries: session.pluginHookEntries() } : {},
51776
+ ...session?.pluginHookProblems ? { pluginProblems: session.pluginHookProblems() } : {},
51777
+ ...session?.skillHooks ? {
51778
+ skillHooks: {
51779
+ attached: session.skillHooks.attached(),
51780
+ carriers: session.skillHooks.carriers()
51781
+ }
51782
+ } : {},
51783
+ ...session?.agentHooks ? {
51784
+ agentHooks: {
51785
+ attached: session.agentHooks.attached(),
51786
+ carriers: session.agentHooks.carriers(),
51787
+ refused: session.agentHooks.refused()
51788
+ }
51789
+ } : {},
51790
+ ...session?.hookActivity ? { activity: session.hookActivity() } : {},
51312
51791
  ...initialCtx.hooksSwitch ? { switch: initialCtx.hooksSwitch } : {}
51313
51792
  }), "hooksView"),
51314
51793
  directories: /* @__PURE__ */ __name(() => session?.directories?.list() ?? [], "directories"),
@@ -51651,10 +52130,10 @@ ${blocks.join("\n\n")}`;
51651
52130
  const progressId = pushMessage("system", "Reading spend\u2026");
51652
52131
  try {
51653
52132
  const [{ buildCostReport }, { renderSpend }, { systemClock }, { resolveNamzuHome: resolveNamzuHome2 }] = await Promise.all([
51654
- import("./cost-NA7APCZD.js"),
52133
+ import("./cost-PQWWLMOO.js"),
51655
52134
  import("./render-QFCCPEEL.js"),
51656
52135
  import("./day-CU5J7UAK.js"),
51657
- import("./home-KMZDOTX5.js")
52136
+ import("./home-7TSSDRFT.js")
51658
52137
  ]);
51659
52138
  const report = await buildCostReport(days, {
51660
52139
  home: resolveNamzuHome2(),
@@ -51680,7 +52159,7 @@ ${blocks.join("\n\n")}`;
51680
52159
  doctorRunningRef.current = true;
51681
52160
  const progressId = pushMessage("system", "Checking\u2026");
51682
52161
  try {
51683
- const { runLiveDoctor } = await import("./live-YUE4AKRQ.js");
52162
+ const { runLiveDoctor } = await import("./live-LHKUQFEO.js");
51684
52163
  const { describePlainDoctor } = await import("./plain-report-XVPBQDLE.js");
51685
52164
  const report = await runLiveDoctor({
51686
52165
  ...ctxRef.current.telemetry ? { telemetry: ctxRef.current.telemetry } : {}
@@ -51958,6 +52437,8 @@ ${blocks.join("\n\n")}`;
51958
52437
  resetSubagentActivity();
51959
52438
  session?.resetTaskStore?.();
51960
52439
  activeTurnTokenRef.current = null;
52440
+ await printLiveRowsBeforeClear();
52441
+ settleAllRef.current = false;
51961
52442
  resetTranscript();
51962
52443
  setMessages(restored);
51963
52444
  modelHistoryRef.current = msgs;
@@ -52020,6 +52501,7 @@ ${blocks.join("\n\n")}`;
52020
52501
  resetSubagentActivity,
52021
52502
  session,
52022
52503
  resetTranscript,
52504
+ printLiveRowsBeforeClear,
52023
52505
  wakeGoalDriver,
52024
52506
  pushSystem
52025
52507
  ]
@@ -52874,6 +53356,8 @@ ${blocks.join("\n\n")}`;
52874
53356
  lastAssistantMessage.current = null;
52875
53357
  const persistedOutput = latestAssistantOutput(forked.messages);
52876
53358
  lastCompletedOutputRef.current = persistedOutput ? { text: persistedOutput, provenance: "persisted" } : null;
53359
+ await printLiveRowsBeforeClear();
53360
+ settleAllRef.current = false;
52877
53361
  resetTranscript();
52878
53362
  outcomeToldRef.current = { id: void 0, telling: NOTHING_TOLD };
52879
53363
  setMessages(
@@ -52913,6 +53397,7 @@ ${blocks.join("\n\n")}`;
52913
53397
  hydrateSavedChildren,
52914
53398
  resetSubagentActivity,
52915
53399
  session,
53400
+ printLiveRowsBeforeClear,
52916
53401
  resetTranscript,
52917
53402
  setRewindView,
52918
53403
  wakeGoalDriver
@@ -52964,6 +53449,8 @@ ${blocks.join("\n\n")}`;
52964
53449
  }
52965
53450
  const at = editList.indexOf(target);
52966
53451
  const readable = option === "summarize" ? editList.slice(0, Math.max(0, at)).map((prompt) => prompt.displayText) : editList.slice(Math.max(0, at)).map((prompt) => prompt.displayText);
53452
+ await printLiveRowsBeforeClear();
53453
+ settleAllRef.current = false;
52967
53454
  resetTranscript();
52968
53455
  outcomeToldRef.current = { id: void 0, telling: NOTHING_TOLD };
52969
53456
  setMessages(
@@ -52993,7 +53480,15 @@ ${blocks.join("\n\n")}`;
52993
53480
  compactingRef.current = false;
52994
53481
  }
52995
53482
  },
52996
- [editList, nextId, pushMessage, resetTranscript, session, setRewindView]
53483
+ [
53484
+ editList,
53485
+ nextId,
53486
+ printLiveRowsBeforeClear,
53487
+ pushMessage,
53488
+ resetTranscript,
53489
+ session,
53490
+ setRewindView
53491
+ ]
52997
53492
  );
52998
53493
  const runRewindChoice = (0, import_react60.useCallback)(
52999
53494
  async (rowIndex, option, context) => {
@@ -55219,7 +55714,7 @@ ${jobLines.map(([, line]) => `- ${line}`).join("\n")}`] : []
55219
55714
  }
55220
55715
  try {
55221
55716
  const sameSignIn = accounts.registry.list("codex").find(
55222
- (other) => other.source.kind === "codex-home" && readCodexCredentialFile(join10(other.source.dir, "auth.json"))?.accountId === result.accountId
55717
+ (other) => other.source.kind === "codex-home" && readCodexCredentialFile(join11(other.source.dir, "auth.json"))?.accountId === result.accountId
55223
55718
  );
55224
55719
  if (sameSignIn) {
55225
55720
  rmSync2(dir, { recursive: true, force: true });
@@ -56128,8 +56623,11 @@ ${peersList.map((peer) => `${peer.self ? "This terminal" : peer.title} [${peer.r
56128
56623
  return;
56129
56624
  }
56130
56625
  case "clear-screen":
56131
- setMessages([]);
56132
- resetTranscript();
56626
+ void printLiveRowsBeforeClear().then(() => {
56627
+ settleAllRef.current = false;
56628
+ setMessages([]);
56629
+ resetTranscript();
56630
+ });
56133
56631
  return;
56134
56632
  case "composer-draft":
56135
56633
  composerDraftTokenRef.current += 1;
@@ -56570,8 +57068,14 @@ ${plugins.map((plugin) => {
56570
57068
  setConversationMutation("fork");
56571
57069
  }
56572
57070
  void (async () => {
57071
+ let hookRuntime;
56573
57072
  try {
56574
- const manager = await openManagedWorktrees(ctx.cwd);
57073
+ if (verb === "create" || verb === "fork") {
57074
+ hookRuntime = session?.worktreeHooks ? { hooks: session.worktreeHooks, close: /* @__PURE__ */ __name(async () => void 0, "close") } : await openWorktreeHookRuntime({ hooks: initialCtx.hooks }, ctx.cwd, notice);
57075
+ }
57076
+ const manager = await openManagedWorktrees(ctx.cwd, {
57077
+ ...hookRuntime?.hooks ? { hooks: hookRuntime.hooks.host, onNotice: hookRuntime.hooks.onNotice } : {}
57078
+ });
56575
57079
  if (verb === "list") {
56576
57080
  const items = await manager.list();
56577
57081
  notice(
@@ -56582,7 +57086,7 @@ ${plugins.map((plugin) => {
56582
57086
  } else if (verb === "create") {
56583
57087
  const created = await manager.create(label);
56584
57088
  notice(
56585
- `Created ${created.branch}. Open it in a new terminal: ${worktreeOpenHint(created.path)}${created.sourceDirty ? "\nUncommitted files stayed in this checkout." : ""}`
57089
+ created.madeByHook ? `Created a worktree at ${created.path} with a worktree_create hook. Open it in a new terminal: ${worktreeOpenHint(created.path)}` : `Created ${created.branch}. Open it in a new terminal: ${worktreeOpenHint(created.path)}${created.sourceDirty ? "\nUncommitted files stayed in this checkout." : ""}`
56586
57090
  );
56587
57091
  } else if (verb === "fork") {
56588
57092
  const scope = await materializeConversation();
@@ -56601,6 +57105,7 @@ ${plugins.map((plugin) => {
56601
57105
  } catch (error) {
56602
57106
  notice(explainFailure(error, "Could not set up the worktree."));
56603
57107
  } finally {
57108
+ await hookRuntime?.close().catch(() => void 0);
56604
57109
  if (verb === "fork") {
56605
57110
  conversationMutationRef.current = null;
56606
57111
  setConversationMutation(null);
@@ -56697,6 +57202,7 @@ ${plugins.map((plugin) => {
56697
57202
  }
56698
57203
  case "prompt":
56699
57204
  outgoing = slash.text;
57205
+ if (slash.skillHooks) attachSkillHooks(slash.skillHooks);
56700
57206
  break;
56701
57207
  case "none":
56702
57208
  return;
@@ -57253,7 +57759,8 @@ ${plugins.map((plugin) => {
57253
57759
  startFreshConversation,
57254
57760
  state,
57255
57761
  terminal.rows,
57256
- userCommands
57762
+ userCommands,
57763
+ attachSkillHooks
57257
57764
  ]
57258
57765
  );
57259
57766
  const idleStateRef = (0, import_react60.useRef)({
@@ -57393,12 +57900,21 @@ ${plugins.map((plugin) => {
57393
57900
  }, "compact")
57394
57901
  });
57395
57902
  idleCompactionRef.current = idleCompaction;
57903
+ (0, import_react60.useEffect)(() => {
57904
+ return session?.hookNotices?.subscribe((line) => pushSystem("notice", line));
57905
+ }, [session, pushSystem]);
57396
57906
  (0, import_react60.useEffect)(() => {
57397
57907
  return session?.memoryCuration?.subscribe((lines3) => {
57398
57908
  const row2 = memoryCuratedRow(lines3);
57399
57909
  if (row2) pushSystem("notice", row2);
57400
57910
  });
57401
57911
  }, [session, pushSystem]);
57912
+ (0, import_react60.useEffect)(() => {
57913
+ return session?.skillHooks?.subscribe((line) => pushSystem("notice", line));
57914
+ }, [session, pushSystem]);
57915
+ (0, import_react60.useEffect)(() => {
57916
+ return session?.agentHooks?.subscribe((line) => pushSystem("notice", line));
57917
+ }, [session, pushSystem]);
57402
57918
  const awaitingPerson = permission !== null || questionDialog !== null || planPrompt !== null || scheduleReviewPrompt !== null || choicePicker !== null && choicePicker.kind === "user-question";
57403
57919
  (0, import_react60.useEffect)(() => {
57404
57920
  if (awaitingPerson) pauseClockRef.current.begin(Date.now());
@@ -59933,4 +60449,4 @@ react/cjs/react-jsx-runtime.production.js:
59933
60449
  * LICENSE file in the root directory of this source tree.
59934
60450
  *)
59935
60451
  */
59936
- //# sourceMappingURL=chunk-UJOWXA23.js.map
60452
+ //# sourceMappingURL=chunk-WDY7OHLQ.js.map