@namzu/cli 53.1.0 → 53.2.1

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 (406) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/bin.js +1 -1
  3. package/dist/chunks/{acp-UVCLNIXU.js → acp-RVXP6JYI.js} +73 -60
  4. package/dist/chunks/acp-RVXP6JYI.js.map +6 -0
  5. package/dist/chunks/{activity-command-2QIWTUUB.js → activity-command-URELNCMX.js} +12 -12
  6. package/dist/chunks/{add-2YDEALUT.js → add-S5EFCMBB.js} +20 -20
  7. package/dist/chunks/{agent-IKQ67NMW.js → agent-FHKVVYCJ.js} +42 -41
  8. package/dist/chunks/agent-session-NJ6H25QY.js +77 -0
  9. package/dist/chunks/{apply-at-exit-F4G7PCZL.js → apply-at-exit-LR5XT7FM.js} +8 -8
  10. package/dist/chunks/{archive-FOTYHQPL.js → archive-A37GUHNR.js} +10 -10
  11. package/dist/chunks/{bin-main-DWOCG2WK.js → bin-main-WTM64ZLB.js} +9 -9
  12. package/dist/chunks/{binding-2GEVBR5H.js → binding-JIILVHUU.js} +3 -3
  13. package/dist/chunks/{browser-WYPSIPEZ.js → browser-UYISYE63.js} +6 -6
  14. package/dist/chunks/{chat-LWVIDEXR.js → chat-AJVT3PZ4.js} +15 -15
  15. package/dist/chunks/{chunk-YLCMBXE3.js → chunk-2CNFTOKO.js} +3 -3
  16. package/dist/chunks/{chunk-4EBZUUE4.js → chunk-2FZ5I36Y.js} +3 -3
  17. package/dist/chunks/{chunk-GD7VSTWZ.js → chunk-2IMSB7XK.js} +2 -2
  18. package/dist/chunks/{chunk-QTPZCVPP.js → chunk-2JDHGE5X.js} +2 -2
  19. package/dist/chunks/{chunk-XKIV3H62.js → chunk-2UKMUTVB.js} +6 -6
  20. package/dist/chunks/{chunk-S5R2E5TZ.js → chunk-3HLKXSR4.js} +5 -5
  21. package/dist/chunks/{chunk-L2AKMCV3.js → chunk-3WYIYJID.js} +4 -4
  22. package/dist/chunks/{chunk-LC7SV2KM.js → chunk-4DER34EW.js} +2 -2
  23. package/dist/chunks/{chunk-2QMXCXZ2.js → chunk-4Q7Y6SKU.js} +5 -5
  24. package/dist/chunks/{chunk-XODDL7OV.js → chunk-526VZQN4.js} +3 -3
  25. package/dist/chunks/{chunk-33WFG4C3.js → chunk-5HZGL2CJ.js} +2 -2
  26. package/dist/chunks/{chunk-MNMKHEMI.js → chunk-5LSXNZBY.js} +2 -2
  27. package/dist/chunks/{chunk-PXA27JGJ.js → chunk-6E4XSINO.js} +2 -2
  28. package/dist/chunks/{chunk-XTVF376M.js → chunk-AR7JOE6W.js} +6 -6
  29. package/dist/chunks/{chunk-KXUKJLA2.js → chunk-AUNCOQGN.js} +2 -2
  30. package/dist/chunks/{chunk-XFVVJAI3.js → chunk-AV7SMPXT.js} +79 -7
  31. package/dist/chunks/chunk-AV7SMPXT.js.map +6 -0
  32. package/dist/chunks/{chunk-QPAWT3EG.js → chunk-AZIXXTEN.js} +4 -4
  33. package/dist/chunks/{chunk-RVXJ5MYA.js → chunk-BBOGGNTL.js} +7 -7
  34. package/dist/chunks/{chunk-CMHOQ62S.js → chunk-BT76TYMR.js} +2 -2
  35. package/dist/chunks/{chunk-C74LVDRC.js → chunk-BY57QRDB.js} +50 -8
  36. package/dist/chunks/chunk-BY57QRDB.js.map +6 -0
  37. package/dist/chunks/{chunk-D5RO75LO.js → chunk-CVUHHALT.js} +6 -6
  38. package/dist/chunks/{chunk-ORCR5VST.js → chunk-DADJ4GQ2.js} +2 -2
  39. package/dist/chunks/{chunk-6CXEEZLK.js → chunk-DTI6LBPL.js} +2 -2
  40. package/dist/chunks/{chunk-IW3XMMEN.js → chunk-EIK35VTY.js} +4 -4
  41. package/dist/chunks/{chunk-UNO2ZRXA.js → chunk-EMLOKSP6.js} +12 -12
  42. package/dist/chunks/{chunk-DTORDCJR.js → chunk-EP6JEZ6Y.js} +4 -4
  43. package/dist/chunks/{chunk-5JQIGBBR.js → chunk-EVGU3BR6.js} +3 -3
  44. package/dist/chunks/{chunk-T3NIOUQJ.js → chunk-FUPKNX52.js} +3 -3
  45. package/dist/chunks/{chunk-IOWYDR6H.js → chunk-FVSMLXXD.js} +59 -21
  46. package/dist/chunks/{chunk-IOWYDR6H.js.map → chunk-FVSMLXXD.js.map} +1 -1
  47. package/dist/chunks/{chunk-PXJ2KPOI.js → chunk-G44HNSPD.js} +2 -2
  48. package/dist/chunks/{chunk-RFGMOXA6.js → chunk-G6FYM5SR.js} +5 -5
  49. package/dist/chunks/{chunk-3T5AX2PC.js → chunk-GELAA6HR.js} +2 -2
  50. package/dist/chunks/{chunk-TMOEYXPR.js → chunk-GXFCNVRN.js} +5 -5
  51. package/dist/chunks/{chunk-YVJVXTUS.js → chunk-GXOQRU72.js} +10 -10
  52. package/dist/chunks/{chunk-XLDFNUCV.js → chunk-H4SIPZ3Q.js} +4 -4
  53. package/dist/chunks/{chunk-5S7U5MFW.js → chunk-H6UQL66Z.js} +3 -3
  54. package/dist/chunks/{chunk-QBCGPM4E.js → chunk-I2WWQWOI.js} +2 -2
  55. package/dist/chunks/{chunk-6JKNPDZD.js → chunk-IFCUIKLP.js} +10 -10
  56. package/dist/chunks/{chunk-EADNTGVW.js → chunk-IFNX2DCK.js} +3 -3
  57. package/dist/chunks/chunk-IFUOFLH7.js +137 -0
  58. package/dist/chunks/chunk-IFUOFLH7.js.map +6 -0
  59. package/dist/chunks/{chunk-URIGGSIK.js → chunk-IRCIEEOM.js} +2 -2
  60. package/dist/chunks/{chunk-6KIXUAOC.js → chunk-J6YNCFQG.js} +3 -3
  61. package/dist/chunks/{chunk-H7UZKOVC.js → chunk-JIWW55EF.js} +4 -132
  62. package/dist/chunks/chunk-JIWW55EF.js.map +6 -0
  63. package/dist/chunks/{chunk-E7GZ5OXM.js → chunk-JLGLQMAN.js} +4 -4
  64. package/dist/chunks/{chunk-3EEKLQXD.js → chunk-K7MLADWM.js} +3 -3
  65. package/dist/chunks/{chunk-LOUV4VZ6.js → chunk-KC2CIMAX.js} +4 -4
  66. package/dist/chunks/{chunk-4ASCYXSH.js → chunk-KGGI2PH4.js} +3 -3
  67. package/dist/chunks/{chunk-UYAI6F3R.js → chunk-KNIPTSFW.js} +3 -3
  68. package/dist/chunks/{chunk-NJWQUZF2.js → chunk-L4XN5ILM.js} +2 -2
  69. package/dist/chunks/{chunk-UNZNPAW7.js → chunk-LEFLHBYY.js} +2 -2
  70. package/dist/chunks/{chunk-MDY2IMVQ.js → chunk-LFJYO4YC.js} +2 -2
  71. package/dist/chunks/{chunk-7T6TX47O.js → chunk-LL6ZXDH3.js} +3 -3
  72. package/dist/chunks/{chunk-RXUWYGFX.js → chunk-M56YCKGZ.js} +4 -4
  73. package/dist/chunks/{chunk-2Q2TPLYP.js → chunk-M5NXCEVY.js} +3 -3
  74. package/dist/chunks/{chunk-WY6KOPIY.js → chunk-MOMUAPLM.js} +9 -9
  75. package/dist/chunks/{chunk-7PDUMQ4M.js → chunk-N7Y7J6RY.js} +21 -21
  76. package/dist/chunks/{chunk-G7LMPHZE.js → chunk-NMYUBZZU.js} +2 -2
  77. package/dist/chunks/{chunk-6APCO6YC.js → chunk-NTN4HVCG.js} +14 -14
  78. package/dist/chunks/{chunk-RPXTYB22.js → chunk-NYSXRWIC.js} +2 -2
  79. package/dist/chunks/{chunk-NW6VBCCU.js → chunk-OARZW3MB.js} +3 -3
  80. package/dist/chunks/{chunk-BLGPF6UL.js → chunk-ODQ6JG66.js} +3 -3
  81. package/dist/chunks/{chunk-UWYDZYCZ.js → chunk-PIV6IFK2.js} +10 -10
  82. package/dist/chunks/{chunk-FWTWILCD.js → chunk-PZCNHP7O.js} +2 -2
  83. package/dist/chunks/{chunk-VV2EHZOG.js → chunk-Q3HGNRKL.js} +3 -3
  84. package/dist/chunks/{chunk-NRGGICBE.js → chunk-QIBMSMZA.js} +2 -2
  85. package/dist/chunks/{chunk-G4R65ULE.js → chunk-QOGLGPLA.js} +2 -2
  86. package/dist/chunks/{chunk-P6OOW3RL.js → chunk-QVVJ5GAJ.js} +2 -2
  87. package/dist/chunks/{chunk-5F4SSZKS.js → chunk-RYVWRI2O.js} +2 -2
  88. package/dist/chunks/{chunk-GZNTRTD5.js → chunk-RZILFYMH.js} +3 -3
  89. package/dist/chunks/{chunk-53UWPLAF.js → chunk-SVEAODES.js} +29 -7
  90. package/dist/chunks/{chunk-53UWPLAF.js.map → chunk-SVEAODES.js.map} +1 -1
  91. package/dist/chunks/{chunk-ZYSTDBP7.js → chunk-TFXV3553.js} +5 -5
  92. package/dist/chunks/{chunk-D7JY7KNY.js → chunk-UHFJTEZV.js} +3 -3
  93. package/dist/chunks/{chunk-EYAWI7KU.js → chunk-UNSMBZM3.js} +34 -32
  94. package/dist/chunks/chunk-UNSMBZM3.js.map +6 -0
  95. package/dist/chunks/{chunk-LRFRTQW7.js → chunk-UTT4MLLS.js} +2 -2
  96. package/dist/chunks/{chunk-NFKSV6UI.js → chunk-UZNITHS6.js} +2 -2
  97. package/dist/chunks/{chunk-VG6RBHI4.js → chunk-VXRC5XNZ.js} +5 -5
  98. package/dist/chunks/{chunk-MTY4XYDO.js → chunk-WL3HPARH.js} +2 -2
  99. package/dist/chunks/{chunk-F3GGSHY2.js → chunk-WM6TW355.js} +296 -137
  100. package/dist/chunks/chunk-WM6TW355.js.map +6 -0
  101. package/dist/chunks/{chunk-LQJLTW2D.js → chunk-WWFYM2UR.js} +2 -2
  102. package/dist/chunks/{chunk-YNY6XL5T.js → chunk-XBQFS7OK.js} +2 -2
  103. package/dist/chunks/{chunk-3HJXXP6L.js → chunk-XH3JG354.js} +3 -3
  104. package/dist/chunks/{chunk-6NUQEVHG.js → chunk-XHLQEV4L.js} +9 -9
  105. package/dist/chunks/{chunk-FBRYV5YN.js → chunk-XNBNN3OW.js} +3 -3
  106. package/dist/chunks/{chunk-2CYBRCPH.js → chunk-XNQMO4UQ.js} +4 -4
  107. package/dist/chunks/{chunk-QE5PQM5T.js → chunk-XO6WQQ67.js} +3 -3
  108. package/dist/chunks/{chunk-HFZLLEJS.js → chunk-XTS4BWEA.js} +2 -2
  109. package/dist/chunks/{chunk-DHWD5YYD.js → chunk-Y6WCUDCQ.js} +3 -3
  110. package/dist/chunks/{chunk-ABOV5CRT.js → chunk-YVLXLUGP.js} +9038 -8633
  111. package/dist/chunks/chunk-YVLXLUGP.js.map +6 -0
  112. package/dist/chunks/{chunk-AZHBCP6G.js → chunk-YWJ4WKSM.js} +51 -42
  113. package/dist/chunks/chunk-YWJ4WKSM.js.map +6 -0
  114. package/dist/chunks/{chunk-MZURZ6P4.js → chunk-YXX7ARE5.js} +2 -2
  115. package/dist/chunks/{chunk-DCMZYSON.js → chunk-YZAM5OII.js} +4 -4
  116. package/dist/chunks/{chunk-6RTDZGPO.js → chunk-YZPZQJTG.js} +2 -2
  117. package/dist/chunks/{chunk-NIRQFXO6.js → chunk-ZAJRK64O.js} +2 -2
  118. package/dist/chunks/{chunk-QP435RW7.js → chunk-ZGXGRKTT.js} +4 -4
  119. package/dist/chunks/chunk-ZIEVVDOR.js +526 -0
  120. package/dist/chunks/chunk-ZIEVVDOR.js.map +6 -0
  121. package/dist/chunks/{chunk-QIDU76IF.js → chunk-ZJ56MAER.js} +2 -2
  122. package/dist/chunks/{cli-runtime-33Z22SZM.js → cli-runtime-ULOMVN5Y.js} +13 -13
  123. package/dist/chunks/{commands-DLREWCNK.js → commands-MENGP42Y.js} +5 -5
  124. package/dist/chunks/{cost-MJOM52FI.js → cost-2D4AKLSB.js} +3 -3
  125. package/dist/chunks/{crash-report-62LMID3V.js → crash-report-NNFSJ43Y.js} +6 -6
  126. package/dist/chunks/{dist-XFBNYCQ7.js → dist-6BYDAAGG.js} +11 -2
  127. package/dist/chunks/{dist-XFBNYCQ7.js.map → dist-6BYDAAGG.js.map} +1 -1
  128. package/dist/chunks/{dist-HA6ABMIV.js → dist-7JVVF6E3.js} +31 -2
  129. package/dist/chunks/dist-7JVVF6E3.js.map +6 -0
  130. package/dist/chunks/{dist-IL4H4QGY.js → dist-AXIGKZIL.js} +2 -2
  131. package/dist/chunks/{dist-U7A47UOF.js → dist-EQE2TVFV.js} +2 -2
  132. package/dist/chunks/{dist-TCKNCSZO.js → dist-GWSFISZW.js} +2 -2
  133. package/dist/chunks/{dist-HWU5U4SQ.js → dist-INIQ54DO.js} +2 -2
  134. package/dist/chunks/{dist-NUPNUHXB.js → dist-PNWD3XCT.js} +4 -2
  135. package/dist/chunks/{dist-MTYIYUQU.js → dist-QXUTKQ55.js} +2 -2
  136. package/dist/chunks/{doctor-V5C6R5EN.js → doctor-GIFSKHDE.js} +40 -39
  137. package/dist/chunks/{drain-CS7XQ5B7.js → drain-WNGSFYGG.js} +12 -12
  138. package/dist/chunks/{entry-HXLBVNDK.js → entry-3ZDHM5YQ.js} +6 -6
  139. package/dist/chunks/{eval-NRBZ4IWO.js → eval-4IIX7NIV.js} +8 -8
  140. package/dist/chunks/{exec-GCNNTGHM.js → exec-NNLZUIZJ.js} +53 -53
  141. package/dist/chunks/{home-GP3Y7F5H.js → home-S3SNMFFG.js} +3 -3
  142. package/dist/chunks/hooks-3T5XVQSK.js +210 -0
  143. package/dist/chunks/hooks-3T5XVQSK.js.map +6 -0
  144. package/dist/chunks/hooks-report-3GDKOXB3.js +39 -0
  145. package/dist/chunks/{host-C5GIO57R.js → host-BTE2HSHJ.js} +12 -12
  146. package/dist/chunks/{host-queries-F5Y3L7E4.js → host-queries-MWZKZJOA.js} +15 -15
  147. package/dist/chunks/{learn-5FEP65D6.js → learn-DA2U4OPO.js} +11 -11
  148. package/dist/chunks/{learn-builtin-HV3ASHAJ.js → learn-builtin-R5A4MYGZ.js} +14 -14
  149. package/dist/chunks/{lifecycle-TMZEWFWF.js → lifecycle-P3BZYTFI.js} +30 -30
  150. package/dist/chunks/{list-MD6ZN2PW.js → list-SIJK3GE5.js} +13 -13
  151. package/dist/chunks/{live-OVTHCQB3.js → live-KY5OOYNO.js} +38 -37
  152. package/dist/chunks/{load-ADBRLXAL.js → load-SI2C6QKJ.js} +10 -8
  153. package/dist/chunks/{login-RV3AHE4C.js → login-WOAZ5OLO.js} +12 -12
  154. package/dist/chunks/{logs-6SBW5BWD.js → logs-ZXSLLFAK.js} +4 -4
  155. package/dist/chunks/{mcp-3QDMZ7PD.js → mcp-TRDRYPNW.js} +23 -23
  156. package/dist/chunks/{message-command-TW57Q7AB.js → message-command-LR5MNLOD.js} +48 -47
  157. package/dist/chunks/message-command-LR5MNLOD.js.map +6 -0
  158. package/dist/chunks/{open-K4R6E6QJ.js → open-KTUOVJCU.js} +8 -8
  159. package/dist/chunks/{operator-tools-YX4575HD.js → operator-tools-HN6MNPZW.js} +13 -13
  160. package/dist/chunks/{output-schema-QBKJSX77.js → output-schema-4LL23SA5.js} +3 -3
  161. package/dist/chunks/{pal-KLH2IC3W.js → pal-C7A3S6MR.js} +15 -15
  162. package/dist/chunks/{peers-5BMGZLHY.js → peers-HINKWP3P.js} +9 -9
  163. package/dist/chunks/{peers-6F4JS4VL.js → peers-IYCZ3OWB.js} +6 -6
  164. package/dist/chunks/{plugin-T6ULGX5N.js → plugin-YBGRF5FP.js} +20 -20
  165. package/dist/chunks/{providers-YJVPCIRI.js → providers-AI27XYWT.js} +10 -10
  166. package/dist/chunks/{pty-UMMMCRJW.js → pty-7OTKGV53.js} +3 -3
  167. package/dist/chunks/resume-2P6LYLYX.js +23 -0
  168. package/dist/chunks/{resume-command-H4IJJDLH.js → resume-command-PG63DMVD.js} +4 -4
  169. package/dist/chunks/{running-UTOYIBXM.js → running-CNUUXGYY.js} +5 -5
  170. package/dist/chunks/{schedule-KWX4SXS5.js → schedule-37J3S7UQ.js} +8 -8
  171. package/dist/chunks/{send-UEL2L3VA.js → send-7JV6J5T5.js} +15 -15
  172. package/dist/chunks/{send-person-X3SWXKWV.js → send-person-J5BSYFXQ.js} +13 -13
  173. package/dist/chunks/{service-4VS6XQ7O.js → service-NSMWSI2E.js} +30 -30
  174. package/dist/chunks/{skills-LK7WSDDG.js → skills-AXZ5ETFS.js} +19 -19
  175. package/dist/chunks/{start-check-HTPENJ36.js → start-check-V2U4533P.js} +2 -2
  176. package/dist/chunks/{startup-failure-LKAHWAYZ.js → startup-failure-4HKS72EM.js} +2 -2
  177. package/dist/chunks/{state-UQPKWIYT.js → state-NVCB2RFV.js} +2 -2
  178. package/dist/chunks/{store-74PEEN6L.js → store-2BFQ2UUT.js} +4 -4
  179. package/dist/chunks/{store-BY6HMUUN.js → store-FUNVZ2G4.js} +6 -6
  180. package/dist/chunks/{store-MILGWYSA.js → store-IACUKT6H.js} +12 -10
  181. package/dist/chunks/{store-UHIHEGKS.js → store-XBERR7IC.js} +3 -3
  182. package/dist/chunks/store-XBERR7IC.js.map +6 -0
  183. package/dist/chunks/{tui-FOVSBYCD.js → tui-UOTMH2CQ.js} +88 -87
  184. package/dist/chunks/tui-UOTMH2CQ.js.map +6 -0
  185. package/dist/chunks/{upgrade-V5ST42EQ.js → upgrade-FBBMIEF6.js} +9 -9
  186. package/dist/chunks/{watch-Q7MSKZIA.js → watch-KKCKSEUU.js} +118 -90
  187. package/dist/chunks/watch-KKCKSEUU.js.map +6 -0
  188. package/dist/chunks/{workspaces-2AL72WFH.js → workspaces-WDQH4NP3.js} +19 -19
  189. package/dist/chunks/{worktree-QPKIZBSK.js → worktree-SRCZK4CS.js} +20 -20
  190. package/dist/cli.d.ts.map +1 -1
  191. package/dist/commands/desktop-host.d.ts +7 -0
  192. package/dist/commands/desktop-host.d.ts.map +1 -1
  193. package/dist/commands/hooks.d.ts +13 -0
  194. package/dist/commands/hooks.d.ts.map +1 -0
  195. package/dist/commands/manifest.d.ts +1 -0
  196. package/dist/commands/manifest.d.ts.map +1 -1
  197. package/dist/config/hooks-report.d.ts +162 -0
  198. package/dist/config/hooks-report.d.ts.map +1 -0
  199. package/dist/config/load.d.ts +30 -2
  200. package/dist/config/load.d.ts.map +1 -1
  201. package/dist/index.js +43 -42
  202. package/dist/integrations/plugins/hook-entries.d.ts +34 -0
  203. package/dist/integrations/plugins/hook-entries.d.ts.map +1 -1
  204. package/dist/integrations/sessions/conversation-facts.d.ts +12 -0
  205. package/dist/integrations/sessions/conversation-facts.d.ts.map +1 -1
  206. package/dist/integrations/sessions/store.d.ts +11 -1
  207. package/dist/integrations/sessions/store.d.ts.map +1 -1
  208. package/dist/integrations/sessions/watch-view.d.ts +2 -0
  209. package/dist/integrations/sessions/watch-view.d.ts.map +1 -1
  210. package/dist/integrations/subagents/activity.d.ts +17 -0
  211. package/dist/integrations/subagents/activity.d.ts.map +1 -1
  212. package/dist/integrations/subagents/replay.d.ts +6 -0
  213. package/dist/integrations/subagents/replay.d.ts.map +1 -1
  214. package/dist/integrations/subagents/runtime.d.ts.map +1 -1
  215. package/dist/skills/restore-skill-hooks.d.ts +16 -0
  216. package/dist/skills/restore-skill-hooks.d.ts.map +1 -0
  217. package/dist/skills/skill-hooks.d.ts +21 -0
  218. package/dist/skills/skill-hooks.d.ts.map +1 -1
  219. package/dist/tui/AgentExplorer.d.ts +10 -1
  220. package/dist/tui/AgentExplorer.d.ts.map +1 -1
  221. package/dist/tui/App.d.ts +2 -1
  222. package/dist/tui/App.d.ts.map +1 -1
  223. package/dist/tui/ReadSearchGroup.d.ts.map +1 -1
  224. package/dist/tui/Transcript.d.ts.map +1 -1
  225. package/dist/tui/agent-tokens.d.ts +31 -0
  226. package/dist/tui/agent-tokens.d.ts.map +1 -0
  227. package/dist/tui/agent-transcript-rows.d.ts +4 -2
  228. package/dist/tui/agent-transcript-rows.d.ts.map +1 -1
  229. package/dist/tui/agent.d.ts.map +1 -1
  230. package/dist/tui/fullscreen/layout.d.ts +9 -1
  231. package/dist/tui/fullscreen/layout.d.ts.map +1 -1
  232. package/dist/tui/fullscreen/markdown-rows.d.ts +18 -18
  233. package/dist/tui/fullscreen/markdown-rows.d.ts.map +1 -1
  234. package/dist/tui/fullscreen/reply-rows.d.ts +83 -0
  235. package/dist/tui/fullscreen/reply-rows.d.ts.map +1 -0
  236. package/dist/tui/hint-fit.d.ts +36 -0
  237. package/dist/tui/hint-fit.d.ts.map +1 -0
  238. package/dist/tui/restored-rows.d.ts +7 -0
  239. package/dist/tui/restored-rows.d.ts.map +1 -1
  240. package/dist/tui/transcript-scroll.d.ts +1 -1
  241. package/dist/tui/transcript-scroll.d.ts.map +1 -1
  242. package/dist/tui/workflow-runs.d.ts.map +1 -1
  243. package/package.json +6 -6
  244. package/dist/chunks/acp-UVCLNIXU.js.map +0 -6
  245. package/dist/chunks/agent-session-H3OE6ZJT.js +0 -76
  246. package/dist/chunks/chunk-ABOV5CRT.js.map +0 -6
  247. package/dist/chunks/chunk-AZHBCP6G.js.map +0 -6
  248. package/dist/chunks/chunk-C74LVDRC.js.map +0 -6
  249. package/dist/chunks/chunk-EYAWI7KU.js.map +0 -6
  250. package/dist/chunks/chunk-F3GGSHY2.js.map +0 -6
  251. package/dist/chunks/chunk-H7UZKOVC.js.map +0 -6
  252. package/dist/chunks/chunk-XFVVJAI3.js.map +0 -6
  253. package/dist/chunks/dist-HA6ABMIV.js.map +0 -6
  254. package/dist/chunks/message-command-TW57Q7AB.js.map +0 -6
  255. package/dist/chunks/resume-RKZ52FZP.js +0 -23
  256. package/dist/chunks/tui-FOVSBYCD.js.map +0 -6
  257. package/dist/chunks/watch-Q7MSKZIA.js.map +0 -6
  258. /package/dist/chunks/{activity-command-2QIWTUUB.js.map → activity-command-URELNCMX.js.map} +0 -0
  259. /package/dist/chunks/{add-2YDEALUT.js.map → add-S5EFCMBB.js.map} +0 -0
  260. /package/dist/chunks/{agent-IKQ67NMW.js.map → agent-FHKVVYCJ.js.map} +0 -0
  261. /package/dist/chunks/{agent-session-H3OE6ZJT.js.map → agent-session-NJ6H25QY.js.map} +0 -0
  262. /package/dist/chunks/{apply-at-exit-F4G7PCZL.js.map → apply-at-exit-LR5XT7FM.js.map} +0 -0
  263. /package/dist/chunks/{archive-FOTYHQPL.js.map → archive-A37GUHNR.js.map} +0 -0
  264. /package/dist/chunks/{bin-main-DWOCG2WK.js.map → bin-main-WTM64ZLB.js.map} +0 -0
  265. /package/dist/chunks/{binding-2GEVBR5H.js.map → binding-JIILVHUU.js.map} +0 -0
  266. /package/dist/chunks/{browser-WYPSIPEZ.js.map → browser-UYISYE63.js.map} +0 -0
  267. /package/dist/chunks/{chat-LWVIDEXR.js.map → chat-AJVT3PZ4.js.map} +0 -0
  268. /package/dist/chunks/{chunk-YLCMBXE3.js.map → chunk-2CNFTOKO.js.map} +0 -0
  269. /package/dist/chunks/{chunk-4EBZUUE4.js.map → chunk-2FZ5I36Y.js.map} +0 -0
  270. /package/dist/chunks/{chunk-GD7VSTWZ.js.map → chunk-2IMSB7XK.js.map} +0 -0
  271. /package/dist/chunks/{chunk-QTPZCVPP.js.map → chunk-2JDHGE5X.js.map} +0 -0
  272. /package/dist/chunks/{chunk-XKIV3H62.js.map → chunk-2UKMUTVB.js.map} +0 -0
  273. /package/dist/chunks/{chunk-S5R2E5TZ.js.map → chunk-3HLKXSR4.js.map} +0 -0
  274. /package/dist/chunks/{chunk-L2AKMCV3.js.map → chunk-3WYIYJID.js.map} +0 -0
  275. /package/dist/chunks/{chunk-LC7SV2KM.js.map → chunk-4DER34EW.js.map} +0 -0
  276. /package/dist/chunks/{chunk-2QMXCXZ2.js.map → chunk-4Q7Y6SKU.js.map} +0 -0
  277. /package/dist/chunks/{chunk-XODDL7OV.js.map → chunk-526VZQN4.js.map} +0 -0
  278. /package/dist/chunks/{chunk-33WFG4C3.js.map → chunk-5HZGL2CJ.js.map} +0 -0
  279. /package/dist/chunks/{chunk-MNMKHEMI.js.map → chunk-5LSXNZBY.js.map} +0 -0
  280. /package/dist/chunks/{chunk-PXA27JGJ.js.map → chunk-6E4XSINO.js.map} +0 -0
  281. /package/dist/chunks/{chunk-XTVF376M.js.map → chunk-AR7JOE6W.js.map} +0 -0
  282. /package/dist/chunks/{chunk-KXUKJLA2.js.map → chunk-AUNCOQGN.js.map} +0 -0
  283. /package/dist/chunks/{chunk-QPAWT3EG.js.map → chunk-AZIXXTEN.js.map} +0 -0
  284. /package/dist/chunks/{chunk-RVXJ5MYA.js.map → chunk-BBOGGNTL.js.map} +0 -0
  285. /package/dist/chunks/{chunk-CMHOQ62S.js.map → chunk-BT76TYMR.js.map} +0 -0
  286. /package/dist/chunks/{chunk-D5RO75LO.js.map → chunk-CVUHHALT.js.map} +0 -0
  287. /package/dist/chunks/{chunk-ORCR5VST.js.map → chunk-DADJ4GQ2.js.map} +0 -0
  288. /package/dist/chunks/{chunk-6CXEEZLK.js.map → chunk-DTI6LBPL.js.map} +0 -0
  289. /package/dist/chunks/{chunk-IW3XMMEN.js.map → chunk-EIK35VTY.js.map} +0 -0
  290. /package/dist/chunks/{chunk-UNO2ZRXA.js.map → chunk-EMLOKSP6.js.map} +0 -0
  291. /package/dist/chunks/{chunk-DTORDCJR.js.map → chunk-EP6JEZ6Y.js.map} +0 -0
  292. /package/dist/chunks/{chunk-5JQIGBBR.js.map → chunk-EVGU3BR6.js.map} +0 -0
  293. /package/dist/chunks/{chunk-T3NIOUQJ.js.map → chunk-FUPKNX52.js.map} +0 -0
  294. /package/dist/chunks/{chunk-PXJ2KPOI.js.map → chunk-G44HNSPD.js.map} +0 -0
  295. /package/dist/chunks/{chunk-RFGMOXA6.js.map → chunk-G6FYM5SR.js.map} +0 -0
  296. /package/dist/chunks/{chunk-3T5AX2PC.js.map → chunk-GELAA6HR.js.map} +0 -0
  297. /package/dist/chunks/{chunk-TMOEYXPR.js.map → chunk-GXFCNVRN.js.map} +0 -0
  298. /package/dist/chunks/{chunk-YVJVXTUS.js.map → chunk-GXOQRU72.js.map} +0 -0
  299. /package/dist/chunks/{chunk-XLDFNUCV.js.map → chunk-H4SIPZ3Q.js.map} +0 -0
  300. /package/dist/chunks/{chunk-5S7U5MFW.js.map → chunk-H6UQL66Z.js.map} +0 -0
  301. /package/dist/chunks/{chunk-QBCGPM4E.js.map → chunk-I2WWQWOI.js.map} +0 -0
  302. /package/dist/chunks/{chunk-6JKNPDZD.js.map → chunk-IFCUIKLP.js.map} +0 -0
  303. /package/dist/chunks/{chunk-EADNTGVW.js.map → chunk-IFNX2DCK.js.map} +0 -0
  304. /package/dist/chunks/{chunk-URIGGSIK.js.map → chunk-IRCIEEOM.js.map} +0 -0
  305. /package/dist/chunks/{chunk-6KIXUAOC.js.map → chunk-J6YNCFQG.js.map} +0 -0
  306. /package/dist/chunks/{chunk-E7GZ5OXM.js.map → chunk-JLGLQMAN.js.map} +0 -0
  307. /package/dist/chunks/{chunk-3EEKLQXD.js.map → chunk-K7MLADWM.js.map} +0 -0
  308. /package/dist/chunks/{chunk-LOUV4VZ6.js.map → chunk-KC2CIMAX.js.map} +0 -0
  309. /package/dist/chunks/{chunk-4ASCYXSH.js.map → chunk-KGGI2PH4.js.map} +0 -0
  310. /package/dist/chunks/{chunk-UYAI6F3R.js.map → chunk-KNIPTSFW.js.map} +0 -0
  311. /package/dist/chunks/{chunk-NJWQUZF2.js.map → chunk-L4XN5ILM.js.map} +0 -0
  312. /package/dist/chunks/{chunk-UNZNPAW7.js.map → chunk-LEFLHBYY.js.map} +0 -0
  313. /package/dist/chunks/{chunk-MDY2IMVQ.js.map → chunk-LFJYO4YC.js.map} +0 -0
  314. /package/dist/chunks/{chunk-7T6TX47O.js.map → chunk-LL6ZXDH3.js.map} +0 -0
  315. /package/dist/chunks/{chunk-RXUWYGFX.js.map → chunk-M56YCKGZ.js.map} +0 -0
  316. /package/dist/chunks/{chunk-2Q2TPLYP.js.map → chunk-M5NXCEVY.js.map} +0 -0
  317. /package/dist/chunks/{chunk-WY6KOPIY.js.map → chunk-MOMUAPLM.js.map} +0 -0
  318. /package/dist/chunks/{chunk-7PDUMQ4M.js.map → chunk-N7Y7J6RY.js.map} +0 -0
  319. /package/dist/chunks/{chunk-G7LMPHZE.js.map → chunk-NMYUBZZU.js.map} +0 -0
  320. /package/dist/chunks/{chunk-6APCO6YC.js.map → chunk-NTN4HVCG.js.map} +0 -0
  321. /package/dist/chunks/{chunk-RPXTYB22.js.map → chunk-NYSXRWIC.js.map} +0 -0
  322. /package/dist/chunks/{chunk-NW6VBCCU.js.map → chunk-OARZW3MB.js.map} +0 -0
  323. /package/dist/chunks/{chunk-BLGPF6UL.js.map → chunk-ODQ6JG66.js.map} +0 -0
  324. /package/dist/chunks/{chunk-UWYDZYCZ.js.map → chunk-PIV6IFK2.js.map} +0 -0
  325. /package/dist/chunks/{chunk-FWTWILCD.js.map → chunk-PZCNHP7O.js.map} +0 -0
  326. /package/dist/chunks/{chunk-VV2EHZOG.js.map → chunk-Q3HGNRKL.js.map} +0 -0
  327. /package/dist/chunks/{chunk-NRGGICBE.js.map → chunk-QIBMSMZA.js.map} +0 -0
  328. /package/dist/chunks/{chunk-G4R65ULE.js.map → chunk-QOGLGPLA.js.map} +0 -0
  329. /package/dist/chunks/{chunk-P6OOW3RL.js.map → chunk-QVVJ5GAJ.js.map} +0 -0
  330. /package/dist/chunks/{chunk-5F4SSZKS.js.map → chunk-RYVWRI2O.js.map} +0 -0
  331. /package/dist/chunks/{chunk-GZNTRTD5.js.map → chunk-RZILFYMH.js.map} +0 -0
  332. /package/dist/chunks/{chunk-ZYSTDBP7.js.map → chunk-TFXV3553.js.map} +0 -0
  333. /package/dist/chunks/{chunk-D7JY7KNY.js.map → chunk-UHFJTEZV.js.map} +0 -0
  334. /package/dist/chunks/{chunk-LRFRTQW7.js.map → chunk-UTT4MLLS.js.map} +0 -0
  335. /package/dist/chunks/{chunk-NFKSV6UI.js.map → chunk-UZNITHS6.js.map} +0 -0
  336. /package/dist/chunks/{chunk-VG6RBHI4.js.map → chunk-VXRC5XNZ.js.map} +0 -0
  337. /package/dist/chunks/{chunk-MTY4XYDO.js.map → chunk-WL3HPARH.js.map} +0 -0
  338. /package/dist/chunks/{chunk-LQJLTW2D.js.map → chunk-WWFYM2UR.js.map} +0 -0
  339. /package/dist/chunks/{chunk-YNY6XL5T.js.map → chunk-XBQFS7OK.js.map} +0 -0
  340. /package/dist/chunks/{chunk-3HJXXP6L.js.map → chunk-XH3JG354.js.map} +0 -0
  341. /package/dist/chunks/{chunk-6NUQEVHG.js.map → chunk-XHLQEV4L.js.map} +0 -0
  342. /package/dist/chunks/{chunk-FBRYV5YN.js.map → chunk-XNBNN3OW.js.map} +0 -0
  343. /package/dist/chunks/{chunk-2CYBRCPH.js.map → chunk-XNQMO4UQ.js.map} +0 -0
  344. /package/dist/chunks/{chunk-QE5PQM5T.js.map → chunk-XO6WQQ67.js.map} +0 -0
  345. /package/dist/chunks/{chunk-HFZLLEJS.js.map → chunk-XTS4BWEA.js.map} +0 -0
  346. /package/dist/chunks/{chunk-DHWD5YYD.js.map → chunk-Y6WCUDCQ.js.map} +0 -0
  347. /package/dist/chunks/{chunk-MZURZ6P4.js.map → chunk-YXX7ARE5.js.map} +0 -0
  348. /package/dist/chunks/{chunk-DCMZYSON.js.map → chunk-YZAM5OII.js.map} +0 -0
  349. /package/dist/chunks/{chunk-6RTDZGPO.js.map → chunk-YZPZQJTG.js.map} +0 -0
  350. /package/dist/chunks/{chunk-NIRQFXO6.js.map → chunk-ZAJRK64O.js.map} +0 -0
  351. /package/dist/chunks/{chunk-QP435RW7.js.map → chunk-ZGXGRKTT.js.map} +0 -0
  352. /package/dist/chunks/{chunk-QIDU76IF.js.map → chunk-ZJ56MAER.js.map} +0 -0
  353. /package/dist/chunks/{cli-runtime-33Z22SZM.js.map → cli-runtime-ULOMVN5Y.js.map} +0 -0
  354. /package/dist/chunks/{commands-DLREWCNK.js.map → commands-MENGP42Y.js.map} +0 -0
  355. /package/dist/chunks/{cost-MJOM52FI.js.map → cost-2D4AKLSB.js.map} +0 -0
  356. /package/dist/chunks/{crash-report-62LMID3V.js.map → crash-report-NNFSJ43Y.js.map} +0 -0
  357. /package/dist/chunks/{dist-IL4H4QGY.js.map → dist-AXIGKZIL.js.map} +0 -0
  358. /package/dist/chunks/{dist-U7A47UOF.js.map → dist-EQE2TVFV.js.map} +0 -0
  359. /package/dist/chunks/{dist-TCKNCSZO.js.map → dist-GWSFISZW.js.map} +0 -0
  360. /package/dist/chunks/{dist-HWU5U4SQ.js.map → dist-INIQ54DO.js.map} +0 -0
  361. /package/dist/chunks/{dist-NUPNUHXB.js.map → dist-PNWD3XCT.js.map} +0 -0
  362. /package/dist/chunks/{dist-MTYIYUQU.js.map → dist-QXUTKQ55.js.map} +0 -0
  363. /package/dist/chunks/{doctor-V5C6R5EN.js.map → doctor-GIFSKHDE.js.map} +0 -0
  364. /package/dist/chunks/{drain-CS7XQ5B7.js.map → drain-WNGSFYGG.js.map} +0 -0
  365. /package/dist/chunks/{entry-HXLBVNDK.js.map → entry-3ZDHM5YQ.js.map} +0 -0
  366. /package/dist/chunks/{eval-NRBZ4IWO.js.map → eval-4IIX7NIV.js.map} +0 -0
  367. /package/dist/chunks/{exec-GCNNTGHM.js.map → exec-NNLZUIZJ.js.map} +0 -0
  368. /package/dist/chunks/{home-GP3Y7F5H.js.map → home-S3SNMFFG.js.map} +0 -0
  369. /package/dist/chunks/{host-C5GIO57R.js.map → hooks-report-3GDKOXB3.js.map} +0 -0
  370. /package/dist/chunks/{lifecycle-TMZEWFWF.js.map → host-BTE2HSHJ.js.map} +0 -0
  371. /package/dist/chunks/{host-queries-F5Y3L7E4.js.map → host-queries-MWZKZJOA.js.map} +0 -0
  372. /package/dist/chunks/{learn-5FEP65D6.js.map → learn-DA2U4OPO.js.map} +0 -0
  373. /package/dist/chunks/{learn-builtin-HV3ASHAJ.js.map → learn-builtin-R5A4MYGZ.js.map} +0 -0
  374. /package/dist/chunks/{live-OVTHCQB3.js.map → lifecycle-P3BZYTFI.js.map} +0 -0
  375. /package/dist/chunks/{list-MD6ZN2PW.js.map → list-SIJK3GE5.js.map} +0 -0
  376. /package/dist/chunks/{load-ADBRLXAL.js.map → live-KY5OOYNO.js.map} +0 -0
  377. /package/dist/chunks/{login-RV3AHE4C.js.map → load-SI2C6QKJ.js.map} +0 -0
  378. /package/dist/chunks/{open-K4R6E6QJ.js.map → login-WOAZ5OLO.js.map} +0 -0
  379. /package/dist/chunks/{logs-6SBW5BWD.js.map → logs-ZXSLLFAK.js.map} +0 -0
  380. /package/dist/chunks/{mcp-3QDMZ7PD.js.map → mcp-TRDRYPNW.js.map} +0 -0
  381. /package/dist/chunks/{output-schema-QBKJSX77.js.map → open-KTUOVJCU.js.map} +0 -0
  382. /package/dist/chunks/{operator-tools-YX4575HD.js.map → operator-tools-HN6MNPZW.js.map} +0 -0
  383. /package/dist/chunks/{peers-6F4JS4VL.js.map → output-schema-4LL23SA5.js.map} +0 -0
  384. /package/dist/chunks/{pal-KLH2IC3W.js.map → pal-C7A3S6MR.js.map} +0 -0
  385. /package/dist/chunks/{peers-5BMGZLHY.js.map → peers-HINKWP3P.js.map} +0 -0
  386. /package/dist/chunks/{providers-YJVPCIRI.js.map → peers-IYCZ3OWB.js.map} +0 -0
  387. /package/dist/chunks/{plugin-T6ULGX5N.js.map → plugin-YBGRF5FP.js.map} +0 -0
  388. /package/dist/chunks/{pty-UMMMCRJW.js.map → providers-AI27XYWT.js.map} +0 -0
  389. /package/dist/chunks/{resume-RKZ52FZP.js.map → pty-7OTKGV53.js.map} +0 -0
  390. /package/dist/chunks/{resume-command-H4IJJDLH.js.map → resume-2P6LYLYX.js.map} +0 -0
  391. /package/dist/chunks/{running-UTOYIBXM.js.map → resume-command-PG63DMVD.js.map} +0 -0
  392. /package/dist/chunks/{send-UEL2L3VA.js.map → running-CNUUXGYY.js.map} +0 -0
  393. /package/dist/chunks/{schedule-KWX4SXS5.js.map → schedule-37J3S7UQ.js.map} +0 -0
  394. /package/dist/chunks/{send-person-X3SWXKWV.js.map → send-7JV6J5T5.js.map} +0 -0
  395. /package/dist/chunks/{start-check-HTPENJ36.js.map → send-person-J5BSYFXQ.js.map} +0 -0
  396. /package/dist/chunks/{service-4VS6XQ7O.js.map → service-NSMWSI2E.js.map} +0 -0
  397. /package/dist/chunks/{skills-LK7WSDDG.js.map → skills-AXZ5ETFS.js.map} +0 -0
  398. /package/dist/chunks/{store-74PEEN6L.js.map → start-check-V2U4533P.js.map} +0 -0
  399. /package/dist/chunks/{startup-failure-LKAHWAYZ.js.map → startup-failure-4HKS72EM.js.map} +0 -0
  400. /package/dist/chunks/{state-UQPKWIYT.js.map → state-NVCB2RFV.js.map} +0 -0
  401. /package/dist/chunks/{store-BY6HMUUN.js.map → store-2BFQ2UUT.js.map} +0 -0
  402. /package/dist/chunks/{store-MILGWYSA.js.map → store-FUNVZ2G4.js.map} +0 -0
  403. /package/dist/chunks/{store-UHIHEGKS.js.map → store-IACUKT6H.js.map} +0 -0
  404. /package/dist/chunks/{upgrade-V5ST42EQ.js.map → upgrade-FBBMIEF6.js.map} +0 -0
  405. /package/dist/chunks/{workspaces-2AL72WFH.js.map → workspaces-WDQH4NP3.js.map} +0 -0
  406. /package/dist/chunks/{worktree-QPKIZBSK.js.map → worktree-SRCZK4CS.js.map} +0 -0
@@ -3,29 +3,13 @@ const require = __namzuCreateRequire(import.meta.url);
3
3
  import {
4
4
  createCliPluginRuntime,
5
5
  openManagedWorktrees
6
- } from "./chunk-RVXJ5MYA.js";
7
- import {
8
- runGeneratorCycle
9
- } from "./chunk-XODDL7OV.js";
10
- import {
11
- createSessionLearningFeed,
12
- openLearningTarget,
13
- readProjectGuidance,
14
- withSessionLearningFeed
15
- } from "./chunk-QP435RW7.js";
16
- import {
17
- connectMcpServers,
18
- startMcpServers
19
- } from "./chunk-L2AKMCV3.js";
20
- import {
21
- openInBrowser
22
- } from "./chunk-G7LMPHZE.js";
6
+ } from "./chunk-BBOGGNTL.js";
23
7
  import {
24
8
  readPluginFileSources
25
- } from "./chunk-ZYSTDBP7.js";
9
+ } from "./chunk-TFXV3553.js";
26
10
  import {
27
11
  createSessionSkillCatalog
28
- } from "./chunk-5S7U5MFW.js";
12
+ } from "./chunk-H6UQL66Z.js";
29
13
  import {
30
14
  KEY_MISMATCH_MESSAGE,
31
15
  MAX_SCRIPT_BYTES,
@@ -49,7 +33,23 @@ import {
49
33
  viewFromJournal,
50
34
  workflowJournalKey,
51
35
  writeEditableCopy
52
- } from "./chunk-MNMKHEMI.js";
36
+ } from "./chunk-5LSXNZBY.js";
37
+ import {
38
+ runGeneratorCycle
39
+ } from "./chunk-526VZQN4.js";
40
+ import {
41
+ createSessionLearningFeed,
42
+ openLearningTarget,
43
+ readProjectGuidance,
44
+ withSessionLearningFeed
45
+ } from "./chunk-ZGXGRKTT.js";
46
+ import {
47
+ connectMcpServers,
48
+ startMcpServers
49
+ } from "./chunk-3WYIYJID.js";
50
+ import {
51
+ openInBrowser
52
+ } from "./chunk-NMYUBZZU.js";
53
53
  import {
54
54
  createBrowserControl
55
55
  } from "./chunk-WHODOMXA.js";
@@ -58,10 +58,10 @@ import {
58
58
  } from "./chunk-YOWYTBJS.js";
59
59
  import {
60
60
  migrateAccountKeys
61
- } from "./chunk-TMOEYXPR.js";
61
+ } from "./chunk-GXFCNVRN.js";
62
62
  import {
63
63
  openCliAccounts
64
- } from "./chunk-RFGMOXA6.js";
64
+ } from "./chunk-G6FYM5SR.js";
65
65
  import {
66
66
  CredentialRefreshRejectedError,
67
67
  CredentialWithdrawnError as CredentialWithdrawnError2,
@@ -69,16 +69,17 @@ import {
69
69
  ensureFreshStoredCodexCredential,
70
70
  readSubscriptionCredential,
71
71
  sameOAuthCredential
72
- } from "./chunk-2CYBRCPH.js";
72
+ } from "./chunk-XNQMO4UQ.js";
73
73
  import {
74
74
  conversationLogPath,
75
75
  ensureSessionStarted,
76
76
  openConversationLog,
77
+ readConversationFacts,
77
78
  recordAccountBound
78
- } from "./chunk-XFVVJAI3.js";
79
+ } from "./chunk-AV7SMPXT.js";
79
80
  import {
80
81
  readIdentity
81
- } from "./chunk-2Q2TPLYP.js";
82
+ } from "./chunk-M5NXCEVY.js";
82
83
  import {
83
84
  INSTRUCTIONS_FILENAME,
84
85
  MAX_CHARS_PER_FILE,
@@ -89,21 +90,12 @@ import {
89
90
  } from "./chunk-JQIBPPOL.js";
90
91
  import {
91
92
  isDefaultAccountId
92
- } from "./chunk-MZURZ6P4.js";
93
+ } from "./chunk-YXX7ARE5.js";
93
94
  import {
94
95
  createLazyCodeAnalysis,
95
- discoverAgentDefinitions,
96
96
  promptCacheTtl,
97
97
  setPromptCacheTtl
98
- } from "./chunk-H7UZKOVC.js";
99
- import {
100
- createAgentHooksHost
101
- } from "./chunk-DCMZYSON.js";
102
- import {
103
- readSkillHooks,
104
- withoutConversationEvents,
105
- withoutSessionStart
106
- } from "./chunk-3HJXXP6L.js";
98
+ } from "./chunk-JIWW55EF.js";
107
99
  import {
108
100
  DEFAULT_MAX_HOOK_REFUSALS,
109
101
  SAVE_SKILL_TOOL_NAME,
@@ -113,31 +105,45 @@ import {
113
105
  turnConfigFields,
114
106
  withSandboxShell,
115
107
  workingDirectoryProblem
116
- } from "./chunk-3EEKLQXD.js";
108
+ } from "./chunk-K7MLADWM.js";
117
109
  import {
118
110
  CHECK_HINT
119
111
  } from "./chunk-BBTPD3DU.js";
112
+ import {
113
+ ensureLocalConfigIgnored,
114
+ logIgnoreOutcome,
115
+ probeCapabilities,
116
+ writeLocalAllows
117
+ } from "./chunk-EIK35VTY.js";
120
118
  import {
121
119
  conversationInUseSentence,
122
120
  minutesUntilFree
123
- } from "./chunk-D7JY7KNY.js";
121
+ } from "./chunk-UHFJTEZV.js";
124
122
  import {
125
123
  debugRequested
126
124
  } from "./chunk-GNBMKISG.js";
127
- import {
128
- ensureLocalConfigIgnored,
129
- logIgnoreOutcome,
130
- probeCapabilities,
131
- writeLocalAllows
132
- } from "./chunk-IW3XMMEN.js";
133
125
  import {
134
126
  isPermissionMode,
135
127
  permissionModeLabel
136
- } from "./chunk-NJWQUZF2.js";
128
+ } from "./chunk-L4XN5ILM.js";
137
129
  import {
138
130
  diffColors,
139
131
  theme
140
132
  } from "./chunk-WD2F6EO3.js";
133
+ import {
134
+ discoverAgentDefinitions
135
+ } from "./chunk-IFUOFLH7.js";
136
+ import {
137
+ createAgentHooksHost
138
+ } from "./chunk-YZAM5OII.js";
139
+ import {
140
+ readSkillHooks,
141
+ withoutConversationEvents,
142
+ withoutSessionStart
143
+ } from "./chunk-XH3JG354.js";
144
+ import {
145
+ parseSkillMarkdown
146
+ } from "./chunk-XNBNN3OW.js";
141
147
  import {
142
148
  chainCapabilityDisagreements,
143
149
  chainPositionName,
@@ -149,7 +155,7 @@ import {
149
155
  readPreferences,
150
156
  resolveChainCapabilities,
151
157
  unresolvedMembers
152
- } from "./chunk-UNO2ZRXA.js";
158
+ } from "./chunk-EMLOKSP6.js";
153
159
  import {
154
160
  canSelectModel,
155
161
  createGeminiAccessTokenResolver,
@@ -157,7 +163,7 @@ import {
157
163
  findDetected,
158
164
  hasApiCredential,
159
165
  requiresCredentialForModel
160
- } from "./chunk-RXUWYGFX.js";
166
+ } from "./chunk-M56YCKGZ.js";
161
167
  import {
162
168
  activeZenCatalogue,
163
169
  isOfferableModel
@@ -172,16 +178,16 @@ import {
172
178
  takeConfigWarnings,
173
179
  unmatchedPassthroughTools,
174
180
  workflowTokenCeiling
175
- } from "./chunk-53UWPLAF.js";
181
+ } from "./chunk-SVEAODES.js";
176
182
  import {
177
183
  resolveGeneratorSettings
178
184
  } from "./chunk-LCGXWCVU.js";
179
185
  import {
180
186
  compilePermissions
181
- } from "./chunk-DHWD5YYD.js";
187
+ } from "./chunk-Y6WCUDCQ.js";
182
188
  import {
183
189
  cliLogger
184
- } from "./chunk-G4R65ULE.js";
190
+ } from "./chunk-QOGLGPLA.js";
185
191
  import {
186
192
  readModelLaunchEnvironment
187
193
  } from "./chunk-LVVD32KJ.js";
@@ -205,23 +211,23 @@ import {
205
211
  import {
206
212
  isAnthropicOAuthToken,
207
213
  readCodexCredentialFile
208
- } from "./chunk-ORCR5VST.js";
214
+ } from "./chunk-DADJ4GQ2.js";
209
215
  import {
210
216
  composeEnvironmentPrompt,
211
217
  detectWsl,
212
218
  environmentFactLines,
213
219
  permissionSentence,
214
220
  readEnvironmentFacts
215
- } from "./chunk-MDY2IMVQ.js";
221
+ } from "./chunk-LFJYO4YC.js";
216
222
  import {
217
223
  ensurePrivateStateDirectory
218
- } from "./chunk-NRGGICBE.js";
224
+ } from "./chunk-QIBMSMZA.js";
219
225
  import {
220
226
  isTrusted
221
- } from "./chunk-CMHOQ62S.js";
227
+ } from "./chunk-BT76TYMR.js";
222
228
  import {
223
229
  namzuHomePath
224
- } from "./chunk-5F4SSZKS.js";
230
+ } from "./chunk-RYVWRI2O.js";
225
231
  import {
226
232
  AgentManager,
227
233
  AgentRegistry,
@@ -411,7 +417,7 @@ import {
411
417
  withProviderFallback,
412
418
  worktreeHookHost,
413
419
  wrapUntrusted
414
- } from "./chunk-C74LVDRC.js";
420
+ } from "./chunk-BY57QRDB.js";
415
421
  import {
416
422
  __name,
417
423
  __toESM
@@ -733,10 +739,10 @@ var tail = Promise.resolve();
733
739
  var nextStart = 0;
734
740
  function cancelled(promise, signal) {
735
741
  signal.throwIfAborted();
736
- return new Promise((resolve15, reject) => {
742
+ return new Promise((resolve16, reject) => {
737
743
  const abort = /* @__PURE__ */ __name(() => reject(signal.reason), "abort");
738
744
  signal.addEventListener("abort", abort, { once: true });
739
- promise.then(resolve15, reject).finally(() => signal.removeEventListener("abort", abort));
745
+ promise.then(resolve16, reject).finally(() => signal.removeEventListener("abort", abort));
740
746
  });
741
747
  }
742
748
  __name(cancelled, "cancelled");
@@ -777,8 +783,8 @@ async function searchExa(query2, limit, context) {
777
783
  const deadline = Date.now() + DEADLINE_MS;
778
784
  const previous = tail;
779
785
  let release;
780
- tail = new Promise((resolve15) => {
781
- release = resolve15;
786
+ tail = new Promise((resolve16) => {
787
+ release = resolve16;
782
788
  });
783
789
  let acquired = false;
784
790
  try {
@@ -2036,7 +2042,7 @@ __name(screenApprover, "screenApprover");
2036
2042
 
2037
2043
  // src/tui/agent.ts
2038
2044
  import { realpath as realpath5, stat as stat7 } from "node:fs/promises";
2039
- import { join as join18, parse as parse2, resolve as resolve14, sep as sep8 } from "node:path";
2045
+ import { join as join19, parse as parse2, resolve as resolve15, sep as sep9 } from "node:path";
2040
2046
 
2041
2047
  // src/checkpoints/store.ts
2042
2048
  import { randomUUID as randomUUID2 } from "node:crypto";
@@ -5938,12 +5944,12 @@ function findAzOnPath(env) {
5938
5944
  return void 0;
5939
5945
  }
5940
5946
  __name(findAzOnPath, "findAzOnPath");
5941
- var defaultRunAz = /* @__PURE__ */ __name((command, args) => new Promise((resolve15, reject) => {
5947
+ var defaultRunAz = /* @__PURE__ */ __name((command, args) => new Promise((resolve16, reject) => {
5942
5948
  execFile2(
5943
5949
  command,
5944
5950
  [...args],
5945
5951
  { timeout: AZ_TIMEOUT_MS, windowsHide: true, shell: process.platform === "win32" },
5946
- (error, stdout) => error ? reject(error) : resolve15(stdout)
5952
+ (error, stdout) => error ? reject(error) : resolve16(stdout)
5947
5953
  );
5948
5954
  }), "defaultRunAz");
5949
5955
  function parseAzTokenOutput(output) {
@@ -6386,19 +6392,19 @@ function createBackgroundLearning(options) {
6386
6392
  const release = /* @__PURE__ */ __name(() => {
6387
6393
  const ready = waiters;
6388
6394
  waiters = [];
6389
- for (const resolve15 of ready) resolve15();
6395
+ for (const resolve16 of ready) resolve16();
6390
6396
  }, "release");
6391
6397
  const quiet = /* @__PURE__ */ __name(() => active === 0 && !options.questions?.isOpen(), "quiet");
6392
- const untilIdle = /* @__PURE__ */ __name((signal) => new Promise((resolve15, reject) => {
6398
+ const untilIdle = /* @__PURE__ */ __name((signal) => new Promise((resolve16, reject) => {
6393
6399
  if (signal.aborted) return reject(signal.reason);
6394
- if (quiet()) return resolve15();
6400
+ if (quiet()) return resolve16();
6395
6401
  const onAbort = /* @__PURE__ */ __name(() => {
6396
6402
  waiters = waiters.filter((w) => w !== done);
6397
6403
  reject(signal.reason);
6398
6404
  }, "onAbort");
6399
6405
  const done = /* @__PURE__ */ __name(() => {
6400
6406
  signal.removeEventListener("abort", onAbort);
6401
- resolve15();
6407
+ resolve16();
6402
6408
  }, "done");
6403
6409
  signal.addEventListener("abort", onAbort, { once: true });
6404
6410
  waiters.push(done);
@@ -7962,7 +7968,7 @@ function estimateTokens(text2) {
7962
7968
  __name(estimateTokens, "estimateTokens");
7963
7969
  function createSideModel(deps) {
7964
7970
  const routes = /* @__PURE__ */ new Map();
7965
- const resolve15 = /* @__PURE__ */ __name(async (sessionId, signal) => {
7971
+ const resolve16 = /* @__PURE__ */ __name(async (sessionId, signal) => {
7966
7972
  const active = deps.active();
7967
7973
  if (deps.configured !== void 0) {
7968
7974
  const target = parseSmallModel(deps.configured, active.providerId, deps.isKnownProvider);
@@ -7999,7 +8005,7 @@ ${active.model}
7999
8005
  ${deps.configured ?? ""}`;
8000
8006
  let pending = routes.get(key);
8001
8007
  if (pending === void 0) {
8002
- pending = resolve15(sessionId, signal);
8008
+ pending = resolve16(sessionId, signal);
8003
8009
  routes.set(key, pending);
8004
8010
  void pending.then((value) => {
8005
8011
  if (signal.aborted && value.source === "main" && routes.get(key) === pending) {
@@ -8218,6 +8224,9 @@ async function resolveSubagentParent(scope2, cwd, records) {
8218
8224
  }
8219
8225
  __name(resolveSubagentParent, "resolveSubagentParent");
8220
8226
 
8227
+ // src/integrations/subagents/replay.ts
8228
+ import { readFile as readFile4 } from "node:fs/promises";
8229
+
8221
8230
  // src/integrations/subagents/activity.ts
8222
8231
  import { Buffer as Buffer2 } from "node:buffer";
8223
8232
 
@@ -8305,6 +8314,9 @@ var SubagentActivityMonitor = class {
8305
8314
  opened.record.resumed = true;
8306
8315
  opened.record.startedAt = prior.startedAt;
8307
8316
  if (prior.tokens !== void 0) opened.record.tokens = prior.tokens;
8317
+ if (prior.outputTokens !== void 0) opened.record.outputTokens = prior.outputTokens;
8318
+ if (prior.sentTokens !== void 0) opened.record.sentTokens = prior.sentTokens;
8319
+ if (prior.cachedTokens !== void 0) opened.record.cachedTokens = prior.cachedTokens;
8308
8320
  if (prior.toolCalls !== void 0) opened.record.toolCalls = prior.toolCalls;
8309
8321
  opened.record.rows = [...prior.rows];
8310
8322
  opened.record.sessionId = prior.sessionId;
@@ -8557,6 +8569,7 @@ var SubagentActivityMonitor = class {
8557
8569
  }
8558
8570
  return {
8559
8571
  ...record.tokens !== void 0 ? { tokens: record.tokens } : {},
8572
+ ...record.outputTokens !== void 0 ? { outputTokens: record.outputTokens } : {},
8560
8573
  ...record.toolCalls !== void 0 ? { toolCalls: record.toolCalls } : {},
8561
8574
  ...lastTool !== void 0 ? { lastTool } : {}
8562
8575
  };
@@ -8576,6 +8589,9 @@ var SubagentActivityMonitor = class {
8576
8589
  agentId: record.agentId,
8577
8590
  ...record.model ? { model: record.model } : {},
8578
8591
  ...record.tokens !== void 0 ? { tokens: record.tokens } : {},
8592
+ ...record.outputTokens !== void 0 ? { outputTokens: record.outputTokens } : {},
8593
+ ...record.sentTokens !== void 0 ? { sentTokens: record.sentTokens } : {},
8594
+ ...record.cachedTokens !== void 0 ? { cachedTokens: record.cachedTokens } : {},
8579
8595
  ...record.toolCalls !== void 0 ? { toolCalls: record.toolCalls } : {},
8580
8596
  description: record.description,
8581
8597
  ...record.summary && !isTerminal(record.status) ? { summary: record.summary } : {},
@@ -8780,6 +8796,9 @@ function projectEvent(record, event) {
8780
8796
  return;
8781
8797
  case "token_usage_updated":
8782
8798
  record.tokens = event.usage.totalTokens;
8799
+ record.outputTokens = event.usage.completionTokens;
8800
+ record.sentTokens = event.usage.promptTokens;
8801
+ record.cachedTokens = event.usage.cachedTokens;
8783
8802
  return;
8784
8803
  case "reasoning_started":
8785
8804
  case "reasoning_delta":
@@ -9013,7 +9032,11 @@ async function readSavedChildrenPage(scope2, limit) {
9013
9032
  const found = [];
9014
9033
  for (const child of children.slice(0, Math.max(0, limit))) {
9015
9034
  try {
9016
- found.push({ ...child, logPath: scope2.paths.subagentLog(scope2.session, child.sessionId) });
9035
+ found.push({
9036
+ ...child,
9037
+ logPath: scope2.paths.subagentLog(scope2.session, child.sessionId),
9038
+ metaPath: scope2.paths.subagentMeta(scope2.session, child.sessionId)
9039
+ });
9017
9040
  } catch (error) {
9018
9041
  scope2.log?.warn("A saved child names an id the session layout refuses", {
9019
9042
  "namzu.subagent.replay.child_session_id": String(child.sessionId),
@@ -9041,7 +9064,9 @@ async function replaySavedChildren(children, log) {
9041
9064
  monitor.replay(
9042
9065
  {
9043
9066
  agentId: evidence.agentId ?? child.kind,
9044
- description: child.description,
9067
+ // The short name the operator saw, when it was kept; else what the
9068
+ // parent's log recorded, which is the start of the prompt.
9069
+ description: await savedShortName(child) ?? child.description,
9045
9070
  ...evidence.prompt !== void 0 ? { prompt: evidence.prompt } : {},
9046
9071
  ...evidence.model ? { model: evidence.model } : {},
9047
9072
  sessionId: child.sessionId,
@@ -9067,6 +9092,18 @@ async function replaySavedChildren(children, log) {
9067
9092
  return monitor.getSnapshot();
9068
9093
  }
9069
9094
  __name(replaySavedChildren, "replaySavedChildren");
9095
+ async function savedShortName(child) {
9096
+ if (child.metaPath === void 0) return void 0;
9097
+ try {
9098
+ const meta = JSON.parse(await readFile4(child.metaPath, "utf8"));
9099
+ const profile = meta?.continuation?.profile;
9100
+ const name = profile?.description;
9101
+ return typeof name === "string" && name.trim().length > 0 ? name.trim() : void 0;
9102
+ } catch {
9103
+ return void 0;
9104
+ }
9105
+ }
9106
+ __name(savedShortName, "savedShortName");
9070
9107
  async function replaySavedChildrenFor(scope2) {
9071
9108
  return replaySavedChildren(await listSavedChildren(scope2), scope2.log);
9072
9109
  }
@@ -9284,7 +9321,7 @@ function createIdleWatch(options) {
9284
9321
  let tripped;
9285
9322
  return {
9286
9323
  quietForMs: /* @__PURE__ */ __name(() => tripped, "quietForMs"),
9287
- wait: /* @__PURE__ */ __name((signal) => new Promise((resolve15) => {
9324
+ wait: /* @__PURE__ */ __name((signal) => new Promise((resolve16) => {
9288
9325
  if (signal.aborted) return;
9289
9326
  const timer = setInterval(() => {
9290
9327
  const last = options.lastProgressAt();
@@ -9294,7 +9331,7 @@ function createIdleWatch(options) {
9294
9331
  tripped = quiet;
9295
9332
  clearInterval(timer);
9296
9333
  signal.removeEventListener("abort", stop);
9297
- resolve15();
9334
+ resolve16();
9298
9335
  }, pollMs);
9299
9336
  const stop = /* @__PURE__ */ __name(() => clearInterval(timer), "stop");
9300
9337
  signal.addEventListener("abort", stop, { once: true });
@@ -9311,7 +9348,7 @@ __name(describeQuietTask, "describeQuietTask");
9311
9348
 
9312
9349
  // src/memory/typed.ts
9313
9350
  import { createHash as createHash3 } from "node:crypto";
9314
- import { access, readFile as readFile4, rename as rename3, writeFile as writeFile2 } from "node:fs/promises";
9351
+ import { access, readFile as readFile5, rename as rename3, writeFile as writeFile2 } from "node:fs/promises";
9315
9352
  import { join as join10 } from "node:path";
9316
9353
 
9317
9354
  // src/memory/io.ts
@@ -9708,7 +9745,7 @@ __name(composeMemoryGuidance, "composeMemoryGuidance");
9708
9745
  var MARKER2 = "migration.json";
9709
9746
  async function readMarker(directory) {
9710
9747
  try {
9711
- const parsed = JSON.parse(await readFile4(join10(directory, MARKER2), "utf8"));
9748
+ const parsed = JSON.parse(await readFile5(join10(directory, MARKER2), "utf8"));
9712
9749
  return parsed !== null && typeof parsed === "object" ? parsed : {};
9713
9750
  } catch (error) {
9714
9751
  if (error.code === "ENOENT") return {};
@@ -11667,6 +11704,7 @@ ${step}`;
11667
11704
  ...!isTerminalAgentTaskState(task.state) && observed.lastProgressAt !== void 0 ? { last_progress_ms_ago: Math.max(0, Date.now() - observed.lastProgressAt) } : {}
11668
11705
  } : {},
11669
11706
  ...progress?.tokens !== void 0 ? { tokens: progress.tokens } : {},
11707
+ ...progress?.outputTokens !== void 0 ? { outputTokens: progress.outputTokens } : {},
11670
11708
  ...progress?.toolCalls !== void 0 ? { toolCalls: progress.toolCalls } : {},
11671
11709
  ...lastTool && /^[a-zA-Z][\w.-]{0,63}$/.test(lastTool) ? { lastTool } : {},
11672
11710
  ...observed ? {
@@ -12250,8 +12288,8 @@ ${step}`;
12250
12288
  owned.busy = true;
12251
12289
  let settleAdmission = /* @__PURE__ */ __name(() => {
12252
12290
  }, "settleAdmission");
12253
- owned.admitting = new Promise((resolve15) => {
12254
- settleAdmission = resolve15;
12291
+ owned.admitting = new Promise((resolve16) => {
12292
+ settleAdmission = resolve16;
12255
12293
  });
12256
12294
  const id = randomUUID4();
12257
12295
  let journal;
@@ -12777,13 +12815,13 @@ ${SUBAGENT_PROMPT}`;
12777
12815
  __name(buildDefinition, "buildDefinition");
12778
12816
 
12779
12817
  // src/integrations/workflows/history.ts
12780
- import { readFile as readFile5, readdir as readdir2 } from "node:fs/promises";
12818
+ import { readFile as readFile6, readdir as readdir2 } from "node:fs/promises";
12781
12819
  import { join as join12 } from "node:path";
12782
12820
  var RUN_ID = /^w[0-9a-z]{8}$/;
12783
12821
  async function readWorkflowJournal(file) {
12784
12822
  let text2;
12785
12823
  try {
12786
- text2 = await readFile5(file, "utf8");
12824
+ text2 = await readFile6(file, "utf8");
12787
12825
  } catch (error) {
12788
12826
  if (error.code === "ENOENT") return [];
12789
12827
  throw error;
@@ -12826,7 +12864,7 @@ __name(listWorkflowRuns, "listWorkflowRuns");
12826
12864
  // src/integrations/workflows/host.ts
12827
12865
  import { randomBytes as randomBytes3 } from "node:crypto";
12828
12866
  import { existsSync as existsSync3 } from "node:fs";
12829
- import { readFile as readFile6 } from "node:fs/promises";
12867
+ import { readFile as readFile7 } from "node:fs/promises";
12830
12868
  import { join as join13 } from "node:path";
12831
12869
 
12832
12870
  // src/integrations/workflows/offering.ts
@@ -12984,11 +13022,11 @@ var WorkflowRunRegistry = class {
12984
13022
  whenIdle(signal) {
12985
13023
  const going = /* @__PURE__ */ __name(() => [...this.runs.values()].some((run2) => !run2.finalized), "going");
12986
13024
  if (!going() || signal?.aborted) return Promise.resolve();
12987
- return new Promise((resolve15) => {
13025
+ return new Promise((resolve16) => {
12988
13026
  const done = /* @__PURE__ */ __name(() => {
12989
13027
  off();
12990
13028
  signal?.removeEventListener("abort", done);
12991
- resolve15();
13029
+ resolve16();
12992
13030
  }, "done");
12993
13031
  const off = this.subscribe(() => {
12994
13032
  if (!going()) done();
@@ -13298,7 +13336,7 @@ function createWorkflowHost(options) {
13298
13336
  }
13299
13337
  resumeState = loadWorkflowResume(checked);
13300
13338
  if (!resumeState.resumable) {
13301
- const mismatch = key !== void 0 && await readFile6(join13(runs, runId, "workflow", "journal.jsonl"), "utf8").then(
13339
+ const mismatch = key !== void 0 && await readFile7(join13(runs, runId, "workflow", "journal.jsonl"), "utf8").then(
13302
13340
  (text2) => journalKeyMismatch(text2, runId, key),
13303
13341
  () => false
13304
13342
  );
@@ -13344,8 +13382,8 @@ function createWorkflowHost(options) {
13344
13382
  let launching = true;
13345
13383
  let settleLaunch = /* @__PURE__ */ __name(() => {
13346
13384
  }, "settleLaunch");
13347
- const launch = new Promise((resolve15) => {
13348
- settleLaunch = resolve15;
13385
+ const launch = new Promise((resolve16) => {
13386
+ settleLaunch = resolve16;
13349
13387
  });
13350
13388
  const detach = /* @__PURE__ */ __name(() => {
13351
13389
  if (!launching) return;
@@ -13448,7 +13486,7 @@ __name(createWorkflowHost, "createWorkflowHost");
13448
13486
 
13449
13487
  // src/integrations/workflows/orphans.ts
13450
13488
  import { existsSync as existsSync4 } from "node:fs";
13451
- import { readFile as readFile7, readdir as readdir3, writeFile as writeFile3 } from "node:fs/promises";
13489
+ import { readFile as readFile8, readdir as readdir3, writeFile as writeFile3 } from "node:fs/promises";
13452
13490
  import { join as join14 } from "node:path";
13453
13491
  var NOTICE_FILE = "orphan-notice.json";
13454
13492
  var MAX_ORPHAN_NOTICES = 20;
@@ -13473,7 +13511,7 @@ function noticePath(runsDirectory, runId) {
13473
13511
  __name(noticePath, "noticePath");
13474
13512
  async function readStored(runsDirectory, runId) {
13475
13513
  try {
13476
- const parsed = JSON.parse(await readFile7(noticePath(runsDirectory, runId), "utf8"));
13514
+ const parsed = JSON.parse(await readFile8(noticePath(runsDirectory, runId), "utf8"));
13477
13515
  if (typeof parsed !== "object" || parsed === null) return void 0;
13478
13516
  const stored = parsed;
13479
13517
  if (typeof stored.text === "string" && typeof stored.line === "string" && typeof stored.name === "string" && typeof stored.pass === "number" && typeof stored.delivered === "boolean") {
@@ -13609,7 +13647,7 @@ __name(recoverUnfinishedWorkflows, "recoverUnfinishedWorkflows");
13609
13647
  async function keyMismatchOf(dir, runId, key) {
13610
13648
  if (key === void 0) return false;
13611
13649
  try {
13612
- return journalKeyMismatch(await readFile7(join14(dir, "journal.jsonl"), "utf8"), runId, key);
13650
+ return journalKeyMismatch(await readFile8(join14(dir, "journal.jsonl"), "utf8"), runId, key);
13613
13651
  } catch {
13614
13652
  return false;
13615
13653
  }
@@ -13644,7 +13682,7 @@ __name(markOrphanNoticesDelivered, "markOrphanNoticesDelivered");
13644
13682
 
13645
13683
  // src/memory/anchors.ts
13646
13684
  import { createHash as createHash4 } from "node:crypto";
13647
- import { readFile as readFile8, realpath as realpath4, stat as stat4 } from "node:fs/promises";
13685
+ import { readFile as readFile9, realpath as realpath4, stat as stat4 } from "node:fs/promises";
13648
13686
  import { basename as basename3, isAbsolute as isAbsolute9, relative as relative8, resolve as resolve12, sep as sep6 } from "node:path";
13649
13687
  var ANCHOR_MAX = 5;
13650
13688
  var ANCHOR_HASH_MAX_BYTES = 1048576;
@@ -13656,7 +13694,7 @@ var nodeAnchorFs = {
13656
13694
  return info.isFile() ? { size: info.size, mtimeMs: Math.trunc(info.mtimeMs) } : void 0;
13657
13695
  }, "stat"),
13658
13696
  realpath: /* @__PURE__ */ __name((path) => realpath4(path), "realpath"),
13659
- readFile: /* @__PURE__ */ __name((path) => readFile8(path), "readFile")
13697
+ readFile: /* @__PURE__ */ __name((path) => readFile9(path), "readFile")
13660
13698
  };
13661
13699
  var digest2 = /* @__PURE__ */ __name((bytes) => createHash4("sha256").update(bytes).digest("hex"), "digest");
13662
13700
  function inside(root, path) {
@@ -14777,11 +14815,11 @@ var MemoryCurator = class {
14777
14815
  else context.signal?.addEventListener("abort", onAbort, { once: true });
14778
14816
  const deadlineMs = this.#deps.deadlineMs ?? CURATE_DEADLINE_MS;
14779
14817
  let timer;
14780
- const deadline = new Promise((resolve15) => {
14818
+ const deadline = new Promise((resolve16) => {
14781
14819
  timer = setTimeout(() => {
14782
14820
  timedOut = true;
14783
14821
  controller.abort(new Error(`Memory curation exceeded ${deadlineMs}ms.`));
14784
- resolve15("deadline");
14822
+ resolve16("deadline");
14785
14823
  }, deadlineMs);
14786
14824
  });
14787
14825
  let reply;
@@ -15247,7 +15285,7 @@ import {
15247
15285
  appendFile as appendFile4,
15248
15286
  mkdir as mkdir6,
15249
15287
  open as open3,
15250
- readFile as readFile9,
15288
+ readFile as readFile10,
15251
15289
  readdir as readdir4,
15252
15290
  rename as rename4,
15253
15291
  stat as stat5,
@@ -15288,7 +15326,7 @@ var serialize = /* @__PURE__ */ __name((entries) => entries.map((entry) => `${JS
15288
15326
  `).join(""), "serialize");
15289
15327
  async function readIfPresent(path) {
15290
15328
  try {
15291
- return await readFile9(path, "utf8");
15329
+ return await readFile10(path, "utf8");
15292
15330
  } catch (error) {
15293
15331
  if (error.code === "ENOENT") return void 0;
15294
15332
  throw error;
@@ -15847,11 +15885,11 @@ function createMemorySelector(deps) {
15847
15885
  if (input.signal.aborted) onAbort();
15848
15886
  else input.signal.addEventListener("abort", onAbort, { once: true });
15849
15887
  let timer;
15850
- const deadline = new Promise((resolve15) => {
15888
+ const deadline = new Promise((resolve16) => {
15851
15889
  timer = setTimeout(() => {
15852
15890
  timedOut = true;
15853
15891
  controller.abort(new Error(`Memory selection exceeded ${deadlineMs}ms.`));
15854
- resolve15("deadline");
15892
+ resolve16("deadline");
15855
15893
  }, deadlineMs);
15856
15894
  });
15857
15895
  try {
@@ -15891,11 +15929,11 @@ __name(memorySelectionOptions, "memorySelectionOptions");
15891
15929
 
15892
15930
  // src/memory/usage.ts
15893
15931
  import { randomUUID as randomUUID6 } from "node:crypto";
15894
- import { mkdir as mkdir7, readFile as readFile10, rename as rename5, rm as rm3, writeFile as writeFile6 } from "node:fs/promises";
15932
+ import { mkdir as mkdir7, readFile as readFile11, rename as rename5, rm as rm3, writeFile as writeFile6 } from "node:fs/promises";
15895
15933
  import { dirname as dirname6 } from "node:path";
15896
15934
  var VERSION = 1;
15897
15935
  var nodeUsageFs = {
15898
- readFile: /* @__PURE__ */ __name((path) => readFile10(path, "utf8"), "readFile"),
15936
+ readFile: /* @__PURE__ */ __name((path) => readFile11(path, "utf8"), "readFile"),
15899
15937
  writeFile: /* @__PURE__ */ __name((path, data) => writeFile6(path, data, { mode: 384 }), "writeFile"),
15900
15938
  rename: rename5,
15901
15939
  mkdir: /* @__PURE__ */ __name(async (path) => {
@@ -17690,6 +17728,45 @@ function createSkillDirectoryResolver(options) {
17690
17728
  }
17691
17729
  __name(createSkillDirectoryResolver, "createSkillDirectoryResolver");
17692
17730
 
17731
+ // src/skills/restore-skill-hooks.ts
17732
+ import { readFileSync as readFileSync2 } from "node:fs";
17733
+ import { isAbsolute as isAbsolute11, join as join18, relative as relative10, resolve as resolve13, sep as sep7 } from "node:path";
17734
+ var SKILL_FILE = "SKILL.md";
17735
+ function isInsideFolder(root, directory) {
17736
+ const inside2 = relative10(resolve13(root), resolve13(directory));
17737
+ return inside2 === "" || !inside2.startsWith(`..${sep7}`) && inside2 !== ".." && !isAbsolute11(inside2);
17738
+ }
17739
+ __name(isInsideFolder, "isInsideFolder");
17740
+ function readSkillNow(directory) {
17741
+ const path = join18(directory, SKILL_FILE);
17742
+ let raw;
17743
+ try {
17744
+ raw = readFileSync2(path, "utf8");
17745
+ } catch (error) {
17746
+ const code = error.code;
17747
+ return code === "ENOENT" || code === "ENOTDIR" ? { problem: `its file is gone (${path})` } : { problem: `its file could not be read (${path}): ${error.message}` };
17748
+ }
17749
+ try {
17750
+ return { hooksSource: parseSkillMarkdown(raw, path).hooksSource };
17751
+ } catch (error) {
17752
+ return { problem: `its file can no longer be read (${path}): ${error.message}` };
17753
+ }
17754
+ }
17755
+ __name(readSkillNow, "readSkillNow");
17756
+ function restoreSkillHooks(host, facts, readNow = readSkillNow) {
17757
+ const notes = [];
17758
+ for (const fact of facts) {
17759
+ const note = host.restore({
17760
+ name: fact.skill,
17761
+ dirPath: fact.directory,
17762
+ now: readNow(fact.directory)
17763
+ });
17764
+ if (note !== void 0) notes.push(note);
17765
+ }
17766
+ return notes;
17767
+ }
17768
+ __name(restoreSkillHooks, "restoreSkillHooks");
17769
+
17693
17770
  // src/skills/skill-hooks.ts
17694
17771
  import { createHash as createHash8 } from "node:crypto";
17695
17772
  function skillHookEnv(skillRoot) {
@@ -17736,7 +17813,7 @@ function createSkillHooksHost(options) {
17736
17813
  for (const listener of listeners) listener(line);
17737
17814
  }, "tell");
17738
17815
  const inert2 = { remove: /* @__PURE__ */ __name(() => void 0, "remove") };
17739
- const prepareHooks = /* @__PURE__ */ __name((skill, how) => {
17816
+ const prepare = /* @__PURE__ */ __name((skill, how, resumed = false) => {
17740
17817
  const name = skill.name;
17741
17818
  if (options.hooksSwitch() !== void 0) {
17742
17819
  return { withholdGrants: false, attach: /* @__PURE__ */ __name(() => inert2, "attach") };
@@ -17744,9 +17821,15 @@ function createSkillHooksHost(options) {
17744
17821
  const refuse = /* @__PURE__ */ __name((why) => {
17745
17822
  const line = `Skill ${name}: ${why} None of its hooks are attached and its allowed-tools are not pre-approved.`;
17746
17823
  tell(cut(line));
17747
- return { notice: cut(line), withholdGrants: true, attach: /* @__PURE__ */ __name(() => inert2, "attach") };
17824
+ return {
17825
+ notice: cut(line),
17826
+ withholdGrants: true,
17827
+ ...how.forked ? {} : { resumable: true },
17828
+ attach: /* @__PURE__ */ __name(() => inert2, "attach")
17829
+ };
17748
17830
  }, "refuse");
17749
- if (options.isProjectSkill(name) && !options.projectTrusted()) {
17831
+ const inProject = options.isProjectSkill(name) || resumed && skill.dirPath !== void 0 && options.isInProject?.(skill.dirPath) === true;
17832
+ if (inProject && !options.projectTrusted()) {
17750
17833
  return refuse("it is in a folder that is not trusted.");
17751
17834
  }
17752
17835
  const readAll = withoutSessionStart(readSkillHooks(skill.hooksSource, `skill ${name}`));
@@ -17772,11 +17855,12 @@ function createSkillHooksHost(options) {
17772
17855
  if (unreadable) tell(cut(`Skill ${name}:${partial}`));
17773
17856
  const sameMessage = !how.forked && (events.includes("pre_tool_use") || events.includes("permission_request")) ? " Calls written in the same message as this skill were checked before these hooks attached; make the calls they should guard in a later message." : "";
17774
17857
  const notice2 = cut(
17775
- read2.count === 0 ? `Skill ${name}: no hook of its could be loaded. ${setAside}` : how.forked ? `Skill ${name}: its hooks (${events.join(", ")}) apply to the delegated agent's run only.${setAside ? ` Set aside: ${setAside}` : ""}${partial}` : `Skill ${name}: its hooks (${events.join(", ")}) are attached for the rest of this conversation, until it is cleared or resumed.${setAside ? ` Set aside: ${setAside}` : ""}${partial}`
17858
+ read2.count === 0 ? `Skill ${name}: no hook of its could be loaded. ${setAside}` : how.forked ? `Skill ${name}: its hooks (${events.join(", ")}) apply to the delegated agent's run only.${setAside ? ` Set aside: ${setAside}` : ""}${partial}` : `Skill ${name}: its hooks (${events.join(", ")}) were attached to this conversation when it was loaded. They stay until the conversation is cleared, and are attached again if it is continued later while this skill's file still loads and its folder is trusted; a note tells you when they are not.${setAside ? ` Set aside: ${setAside}` : ""}${partial}`
17776
17859
  ) + (read2.count === 0 ? "" : sameMessage);
17777
17860
  return {
17778
17861
  notice: notice2,
17779
17862
  withholdGrants: read2.guardLost,
17863
+ ...how.forked || read2.count === 0 ? {} : { resumable: true },
17780
17864
  attach: /* @__PURE__ */ __name(() => {
17781
17865
  if (read2.count === 0) return inert2;
17782
17866
  if (!how.forked) {
@@ -17861,12 +17945,43 @@ function createSkillHooksHost(options) {
17861
17945
  };
17862
17946
  }, "attach")
17863
17947
  };
17864
- }, "prepareHooks");
17948
+ }, "prepare");
17949
+ const prepareHooks = /* @__PURE__ */ __name((skill, how) => prepare(skill, how), "prepareHooks");
17865
17950
  return {
17866
17951
  prepareHooks,
17867
17952
  use: /* @__PURE__ */ __name((skill) => {
17868
17953
  prepareHooks(skill, { forked: false }).attach();
17869
17954
  }, "use"),
17955
+ say: /* @__PURE__ */ __name((line) => {
17956
+ const cutLine2 = cut(line);
17957
+ tell(cutLine2);
17958
+ return cutLine2;
17959
+ }, "say"),
17960
+ restore: /* @__PURE__ */ __name((skill) => {
17961
+ const name = skill.name;
17962
+ if (options.hooksSwitch() !== void 0) return void 0;
17963
+ const unattached = /* @__PURE__ */ __name((why) => {
17964
+ const line = cut(
17965
+ `Skill ${name}: its hooks are not attached after this conversation was continued, because ${why} Its allowed-tools are not pre-approved.`
17966
+ );
17967
+ tell(line);
17968
+ return line;
17969
+ }, "unattached");
17970
+ if ("problem" in skill.now) return unattached(`${skill.now.problem}.`);
17971
+ const source = skill.now.hooksSource;
17972
+ if (source === void 0) {
17973
+ return unattached("its file no longer carries hooks.");
17974
+ }
17975
+ const plan = prepare(
17976
+ { name, dirPath: skill.dirPath, hooksSource: source },
17977
+ { forked: false },
17978
+ true
17979
+ );
17980
+ plan.attach();
17981
+ if (plan.withholdGrants) return plan.notice;
17982
+ const hasRows = [...live].some((found) => found.skill === name);
17983
+ return hasRows ? void 0 : unattached("its file no longer carries a hook that can be loaded.");
17984
+ }, "restore"),
17870
17985
  attached: /* @__PURE__ */ __name(() => [...live].flatMap(
17871
17986
  (found) => found.rows.filter((row) => !row.gone).map(({ gone: _gone, ...row }) => row)
17872
17987
  ), "attached"),
@@ -18090,19 +18205,19 @@ async function resolveModelSwitch(request, options) {
18090
18205
  listed.set(detected.entry.id, listing);
18091
18206
  return listing.kind === "ok" && listing.models.some((candidate) => candidate.id === stripModelWindowSuffix(model));
18092
18207
  }, "inspect");
18093
- const resolve15 = /* @__PURE__ */ __name((detected) => ({
18208
+ const resolve16 = /* @__PURE__ */ __name((detected) => ({
18094
18209
  kind: "resolved",
18095
18210
  selection: { id: detected.entry.id, model }
18096
18211
  }), "resolve");
18097
18212
  const first = selected ?? usable.find(({ entry }) => entry.id === options.currentProvider);
18098
- if (first && await inspect(first)) return resolve15(first);
18213
+ if (first && await inspect(first)) return resolve16(first);
18099
18214
  const candidates = selected ? [selected] : usable;
18100
18215
  const matches = selected ? [] : (await Promise.all(
18101
18216
  candidates.filter((candidate) => candidate !== first).map(async (candidate) => await inspect(candidate) ? candidate : void 0)
18102
18217
  )).filter((candidate) => candidate !== void 0);
18103
18218
  signal?.throwIfAborted();
18104
18219
  const uniqueMatch = matches.length === 1 ? matches[0] : void 0;
18105
- if (uniqueMatch) return resolve15(uniqueMatch);
18220
+ if (uniqueMatch) return resolve16(uniqueMatch);
18106
18221
  if (matches.length > 1) {
18107
18222
  return {
18108
18223
  kind: "rejected",
@@ -18133,7 +18248,7 @@ __name(resolveModelSwitch, "resolveModelSwitch");
18133
18248
 
18134
18249
  // src/tui/read-search-group.ts
18135
18250
  import { homedir as homedir3 } from "node:os";
18136
- import { isAbsolute as isAbsolute11, relative as relative10, resolve as resolve13, sep as sep7 } from "node:path";
18251
+ import { isAbsolute as isAbsolute12, relative as relative11, resolve as resolve14, sep as sep8 } from "node:path";
18137
18252
  var EMPTY_GROUP = {
18138
18253
  readKeys: [],
18139
18254
  anonymousReads: 0,
@@ -18503,13 +18618,13 @@ function classifyShell(command) {
18503
18618
  }
18504
18619
  __name(classifyShell, "classifyShell");
18505
18620
  function displayPath3(path, cwd) {
18506
- const abs = cwd && !isAbsolute11(path) ? resolve13(cwd, path) : path;
18621
+ const abs = cwd && !isAbsolute12(path) ? resolve14(cwd, path) : path;
18507
18622
  if (cwd) {
18508
- const rel = relative10(cwd, abs);
18509
- if (rel.length > 0 && !rel.startsWith("..") && !isAbsolute11(rel)) return rel;
18623
+ const rel = relative11(cwd, abs);
18624
+ if (rel.length > 0 && !rel.startsWith("..") && !isAbsolute12(rel)) return rel;
18510
18625
  }
18511
18626
  const home = homedir3();
18512
- if (home && (abs === home || abs.startsWith(home + sep7))) return `~${abs.slice(home.length)}`;
18627
+ if (home && (abs === home || abs.startsWith(home + sep8))) return `~${abs.slice(home.length)}`;
18513
18628
  return abs;
18514
18629
  }
18515
18630
  __name(displayPath3, "displayPath");
@@ -18891,7 +19006,7 @@ var GH_PR_HARMLESS = /* @__PURE__ */ new Set(["view", "list", "status", "checks"
18891
19006
  function vcsActions(command) {
18892
19007
  const split = splitShell(command);
18893
19008
  if (!split || split.segments.length === 0) return { actions: [], absorbed: false };
18894
- if (split.joins.some((join19, index) => index > 0 && join19 !== "&&"))
19009
+ if (split.joins.some((join20, index) => index > 0 && join20 !== "&&"))
18895
19010
  return { actions: [], absorbed: false };
18896
19011
  const actions = [];
18897
19012
  let explained = true;
@@ -19053,8 +19168,8 @@ var SessionOperationOwner = class {
19053
19168
  })()[Symbol.asyncIterator]();
19054
19169
  let settled = false;
19055
19170
  let settle;
19056
- const settlement = new Promise((resolve15) => {
19057
- settle = resolve15;
19171
+ const settlement = new Promise((resolve16) => {
19172
+ settle = resolve16;
19058
19173
  });
19059
19174
  let operationTail = Promise.resolve();
19060
19175
  let returnStarted = false;
@@ -19318,11 +19433,11 @@ __name(clipRequestContext, "clipRequestContext");
19318
19433
  async function createAgentSession(prefs, detectedProviders, options = {}) {
19319
19434
  const modelEnvironment = readModelLaunchEnvironment();
19320
19435
  if (options.palEnvironment) {
19321
- const { createPalAgentSession } = await import("./agent-session-H3OE6ZJT.js");
19436
+ const { createPalAgentSession } = await import("./agent-session-NJ6H25QY.js");
19322
19437
  return createPalAgentSession(prefs, detectedProviders, options);
19323
19438
  }
19324
19439
  let detected = detectedProviders;
19325
- const { palAtWorkspace } = await import("./store-BY6HMUUN.js");
19440
+ const { palAtWorkspace } = await import("./store-FUNVZ2G4.js");
19326
19441
  if (palAtWorkspace(options.cwd ?? process.cwd()))
19327
19442
  throw new Error("This Pal requires its owned virtual computer. Open it with namzu pal chat.");
19328
19443
  const commandArguments = builtinCommandArguments();
@@ -19359,7 +19474,7 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
19359
19474
  }
19360
19475
  return seeded;
19361
19476
  }, "observationsFor");
19362
- const requestedCwd = resolve14(options.cwd ?? process.cwd());
19477
+ const requestedCwd = resolve15(options.cwd ?? process.cwd());
19363
19478
  let cwd;
19364
19479
  try {
19365
19480
  const entry2 = await stat7(requestedCwd);
@@ -19391,13 +19506,13 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
19391
19506
  paths = options.conversationSessions.paths;
19392
19507
  projectId = options.conversationSessions.projectId;
19393
19508
  } else {
19394
- const home = resolve14(options.stateRoot ?? resolveNamzuHome());
19509
+ const home = resolve15(options.stateRoot ?? resolveNamzuHome());
19395
19510
  ensurePrivateStateDirectory(home, "projects");
19396
19511
  const project = await ensureProject({ home, cwd: cliProjectRoot(cwd) });
19397
19512
  paths = new SessionPaths({ home, slug: project.slug });
19398
19513
  projectId = project.projectId;
19399
19514
  }
19400
- ensurePrivateStateDirectory(resolve14(paths.projectDir(), ".."), paths.slug);
19515
+ ensurePrivateStateDirectory(resolve15(paths.projectDir(), ".."), paths.slug);
19401
19516
  ensurePrivateStateDirectory(paths.projectDir(), "memory");
19402
19517
  } catch (error) {
19403
19518
  return emptySession(
@@ -19778,8 +19893,8 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
19778
19893
  }
19779
19894
  const directories = [];
19780
19895
  for (const dir of options.additionalDirectories ?? []) {
19781
- const absolute = resolve14(cwd, dir);
19782
- if (absolute !== resolve14(cwd) && !directories.includes(absolute)) directories.push(absolute);
19896
+ const absolute = resolve15(cwd, dir);
19897
+ if (absolute !== resolve15(cwd) && !directories.includes(absolute)) directories.push(absolute);
19783
19898
  }
19784
19899
  const sessionDirectories = createSessionDirectories(cwd, directories);
19785
19900
  const checkpoints = new FileCheckpointStore(
@@ -20155,7 +20270,7 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
20155
20270
  });
20156
20271
  }
20157
20272
  for (const skipped of discovered.skipped) {
20158
- const inPlugin = pluginFiles.agents.some(({ dir }) => skipped.path.startsWith(`${dir}${sep8}`));
20273
+ const inPlugin = pluginFiles.agents.some(({ dir }) => skipped.path.startsWith(`${dir}${sep9}`));
20159
20274
  cliLogger().warn("agent definition skipped", {
20160
20275
  "namzu.agent.definition.path": skipped.path,
20161
20276
  "namzu.agent.definition.reason": inPlugin ? `${skipped.reason}. ${CHECK_HINT}` : skipped.reason
@@ -20390,7 +20505,7 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
20390
20505
  runsDirectory: /* @__PURE__ */ __name((turnId) => {
20391
20506
  if (options.ephemeral) return void 0;
20392
20507
  const owner = delegationScopes.get(turnId) ?? scope2;
20393
- return join18(paths.sessionDir({ sessionId: owner.sessionId }), "runs");
20508
+ return join19(paths.sessionDir({ sessionId: owner.sessionId }), "runs");
20394
20509
  }, "runsDirectory"),
20395
20510
  refusal: /* @__PURE__ */ __name((turnId) => {
20396
20511
  const auth = delegatedWorkflowAuth.get(turnId);
@@ -20628,7 +20743,7 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
20628
20743
  );
20629
20744
  toolsets.push(options.toolLoading === "eager" ? monitorToolset : deferred(monitorToolset));
20630
20745
  }
20631
- const operatorPals = await import("./operator-tools-YX4575HD.js");
20746
+ const operatorPals = await import("./operator-tools-HN6MNPZW.js");
20632
20747
  toolsets.push(
20633
20748
  readyWhen(
20634
20749
  toolset(
@@ -20683,7 +20798,7 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
20683
20798
  );
20684
20799
  const curationListeners = /* @__PURE__ */ new Set();
20685
20800
  const memoryInbox = new MemoryInbox({
20686
- file: join18(paths.home, "memory-inbox", `${paths.slug}.jsonl`),
20801
+ file: join19(paths.home, "memory-inbox", `${paths.slug}.jsonl`),
20687
20802
  now: Date.now
20688
20803
  });
20689
20804
  const curation = options.memory?.curation === "off" || options.compaction?.consolidate ? void 0 : new CurationRuntime({
@@ -20693,7 +20808,7 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
20693
20808
  sideModel: /* @__PURE__ */ __name(() => sideModel, "sideModel"),
20694
20809
  fallback: screenedPromoter,
20695
20810
  anchorRoot: cliProjectRoot(cwd),
20696
- log: createCurationLog(join18(paths.home, "memory", "curation.jsonl"))
20811
+ log: createCurationLog(join19(paths.home, "memory", "curation.jsonl"))
20697
20812
  }),
20698
20813
  setTimer: /* @__PURE__ */ __name((run2, ms) => {
20699
20814
  const handle = setTimeout(run2, ms);
@@ -20712,7 +20827,7 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
20712
20827
  }), "report")
20713
20828
  });
20714
20829
  const memoryUsage = new MemoryUsage({
20715
- file: join18(paths.home, "memory-usage", `${paths.slug}.json`),
20830
+ file: join19(paths.home, "memory-usage", `${paths.slug}.json`),
20716
20831
  now: Date.now,
20717
20832
  log: /* @__PURE__ */ __name((message, fields) => cliLogger().debug(message, fields), "log")
20718
20833
  });
@@ -20810,7 +20925,8 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
20810
20925
  hookOptions: /* @__PURE__ */ __name(() => sessionPlugins?.hookOptions, "hookOptions"),
20811
20926
  hooksSwitch: /* @__PURE__ */ __name(() => options.hooksSwitch, "hooksSwitch"),
20812
20927
  projectTrusted: /* @__PURE__ */ __name(() => options.folderTrusted === true || isTrusted(cwd), "projectTrusted"),
20813
- isProjectSkill: /* @__PURE__ */ __name((name) => skillCatalog.fileSkills.some((skill) => skill.name === name && skill.source === "project"), "isProjectSkill")
20928
+ isProjectSkill: /* @__PURE__ */ __name((name) => skillCatalog.fileSkills.some((skill) => skill.name === name && skill.source === "project"), "isProjectSkill"),
20929
+ isInProject: /* @__PURE__ */ __name((directory) => isInsideFolder(cwd, directory), "isInProject")
20814
20930
  });
20815
20931
  const sessionToolsets = toolsets.flatMap((ts) => {
20816
20932
  const wrapped = withheldTools.size > 0 ? filtered(ts, (tool) => !withheldTools.has(tool.name)) : ts;
@@ -20866,6 +20982,8 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
20866
20982
  let sessionHookContext;
20867
20983
  let conversationGeneration = 0;
20868
20984
  let nextSessionSource;
20985
+ let skillHooksRestoredFor;
20986
+ let skillHooksNotAttached = [];
20869
20987
  const conversationEnds = /* @__PURE__ */ new Set();
20870
20988
  const announceSessionStart = /* @__PURE__ */ __name(async (counted2) => {
20871
20989
  if (!sessionPlugins || sessionStarted) return;
@@ -20885,6 +21003,8 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
20885
21003
  if (!sessionPlugins) return Promise.resolve();
20886
21004
  conversationGeneration += 1;
20887
21005
  skillHooks.endConversation();
21006
+ skillHooksRestoredFor = void 0;
21007
+ skillHooksNotAttached = [];
20888
21008
  sessionStarted = false;
20889
21009
  sessionHookContext = void 0;
20890
21010
  nextSessionSource = change.starting;
@@ -20893,6 +21013,30 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
20893
21013
  void ended.then(() => conversationEnds.delete(ended));
20894
21014
  return ended;
20895
21015
  }, "changeConversation");
21016
+ const putSkillHooksBack = /* @__PURE__ */ __name(async (sessionId, hasEarlierTurns) => {
21017
+ if (skillHooksRestoredFor === String(sessionId)) return;
21018
+ skillHooksRestoredFor = String(sessionId);
21019
+ skillHooksNotAttached = [];
21020
+ if (!options.conversationSessions || !hasEarlierTurns) return;
21021
+ let readFailure;
21022
+ const known = await readConversationFacts(
21023
+ options.conversationSessions,
21024
+ sessionId,
21025
+ "tolerant"
21026
+ ).catch((error) => {
21027
+ readFailure = error;
21028
+ return null;
21029
+ });
21030
+ if (readFailure !== void 0) {
21031
+ skillHooksNotAttached = [
21032
+ skillHooks.say(
21033
+ `The skills this conversation used could not be checked for hooks, so none are attached again: ${describeError2(readFailure)}.`
21034
+ )
21035
+ ];
21036
+ } else if (known && known.skillHooks.length > 0) {
21037
+ skillHooksNotAttached = restoreSkillHooks(skillHooks, known.skillHooks);
21038
+ }
21039
+ }, "putSkillHooksBack");
20896
21040
  let sessionEndReason = "exit";
20897
21041
  let sessionClosing = false;
20898
21042
  if (pluginRuntime) {
@@ -21080,6 +21224,7 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
21080
21224
  const route = await pinnedResumeRoute(pinned, entry2.sessionId, ownedSignal);
21081
21225
  const resumeWebSearch = route ? routedWebSearch(route) : nativeWebSearch;
21082
21226
  const turnSkills = await turnSkillsFor(route?.model ?? model);
21227
+ await putSkillHooksBack(entry2.sessionId, true);
21083
21228
  const curatedMemory = readMemory(void 0, cwd);
21084
21229
  for (const notice2 of formatMemoryDiagnostics(curatedMemory)) cliLogger().warn(notice2);
21085
21230
  const storedMemory = await storedMemoryPrompt();
@@ -21117,7 +21262,9 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
21117
21262
  workflowOffered: false,
21118
21263
  permissionMode: permissionMode ?? options.permissionMode ?? "auto",
21119
21264
  extraSystem,
21120
- systemNote
21265
+ ...([systemNote, ...skillHooksNotAttached].filter(Boolean).join("\n") || void 0) !== void 0 ? {
21266
+ systemNote: [systemNote, ...skillHooksNotAttached].filter(Boolean).join("\n")
21267
+ } : {}
21121
21268
  }
21122
21269
  )
21123
21270
  );
@@ -21394,8 +21541,8 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
21394
21541
  if (mapped) yield mapped;
21395
21542
  }
21396
21543
  if (settled) break;
21397
- await new Promise((resolve15) => {
21398
- wake = resolve15;
21544
+ await new Promise((resolve16) => {
21545
+ wake = resolve16;
21399
21546
  });
21400
21547
  wake = void 0;
21401
21548
  }
@@ -21683,7 +21830,7 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
21683
21830
  const live = host.registry.list();
21684
21831
  const known = new Set(live.map((view) => view.runId));
21685
21832
  const saved = options.ephemeral ? [] : await listWorkflowRuns(
21686
- join18(paths.sessionDir({ sessionId: scope2.sessionId }), "runs")
21833
+ join19(paths.sessionDir({ sessionId: scope2.sessionId }), "runs")
21687
21834
  ).catch(() => []);
21688
21835
  return [
21689
21836
  ...[...live].sort((a, b) => b.startedAt - a.startedAt),
@@ -21693,14 +21840,14 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
21693
21840
  readScript: /* @__PURE__ */ __name((path) => {
21694
21841
  const saved = readSavedScript(
21695
21842
  path,
21696
- scriptsDirectory(join18(paths.sessionDir({ sessionId: scope2.sessionId }), "runs"))
21843
+ scriptsDirectory(join19(paths.sessionDir({ sessionId: scope2.sessionId }), "runs"))
21697
21844
  );
21698
21845
  if (!saved.ok) return void 0;
21699
21846
  reviewedScripts.record(saved.path, saved.text);
21700
21847
  return saved.text;
21701
21848
  }, "readScript"),
21702
21849
  describeResume: /* @__PURE__ */ __name((runId, script) => describeResume(
21703
- join18(paths.sessionDir({ sessionId: scope2.sessionId }), "runs"),
21850
+ join19(paths.sessionDir({ sessionId: scope2.sessionId }), "runs"),
21704
21851
  runId,
21705
21852
  script,
21706
21853
  options.ephemeral ? void 0 : workflowJournalKey(paths.home)
@@ -21708,13 +21855,13 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
21708
21855
  recoverUnfinished: /* @__PURE__ */ __name(async () => {
21709
21856
  if (options.ephemeral) return [];
21710
21857
  return recoverUnfinishedWorkflows({
21711
- runsDirectory: join18(paths.sessionDir({ sessionId: scope2.sessionId }), "runs"),
21858
+ runsDirectory: join19(paths.sessionDir({ sessionId: scope2.sessionId }), "runs"),
21712
21859
  liveRunIds: new Set(host.registry.list().map((view) => view.runId)),
21713
21860
  ...workflowJournalKey(paths.home) !== void 0 ? { key: workflowJournalKey(paths.home) } : {}
21714
21861
  });
21715
21862
  }, "recoverUnfinished"),
21716
21863
  noticesDelivered: /* @__PURE__ */ __name((runIds) => markOrphanNoticesDelivered(
21717
- join18(paths.sessionDir({ sessionId: scope2.sessionId }), "runs"),
21864
+ join19(paths.sessionDir({ sessionId: scope2.sessionId }), "runs"),
21718
21865
  runIds
21719
21866
  ), "noticesDelivered"),
21720
21867
  onEnd: /* @__PURE__ */ __name((listener) => {
@@ -22242,6 +22389,18 @@ async function createAgentSession(prefs, detectedProviders, options = {}) {
22242
22389
  await announceSessionStart(
22243
22390
  messages.filter((message) => message.role === "user").length > 1 ? "resume" : "startup"
22244
22391
  );
22392
+ await putSkillHooksBack(
22393
+ turnScope.sessionId,
22394
+ messages.filter((message) => message.role === "user").length > 1
22395
+ );
22396
+ if (skillHooksNotAttached.length > 0) {
22397
+ const notAttached = skillHooksNotAttached.join("\n");
22398
+ promptContributions.register({
22399
+ id: "namzu.hooks.skill-restore",
22400
+ placement: "context",
22401
+ render: /* @__PURE__ */ __name(() => notAttached, "render")
22402
+ });
22403
+ }
22245
22404
  if (sessionHookContext !== void 0) {
22246
22405
  const hookContext = frameOperatorHookContext([sessionHookContext]);
22247
22406
  promptContributions.register({
@@ -24209,4 +24368,4 @@ export {
24209
24368
  RESULT_SUMMARY_WHOLE_MAX,
24210
24369
  resultSummaryLine
24211
24370
  };
24212
- //# sourceMappingURL=chunk-F3GGSHY2.js.map
24371
+ //# sourceMappingURL=chunk-WM6TW355.js.map