@namzu/cli 41.2.0 → 41.2.2

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 (260) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/bin.js +1 -1
  3. package/dist/chunks/{acp-PBJTGQHA.js → acp-5RFAFTQU.js} +39 -39
  4. package/dist/chunks/{activity-command-JFBLFZSJ.js → activity-command-XLF5EAM5.js} +12 -12
  5. package/dist/chunks/{add-MSMS6QMP.js → add-Z6Y5DOCM.js} +15 -15
  6. package/dist/chunks/{agent-OEXJQTAS.js → agent-U4NFC4DT.js} +30 -30
  7. package/dist/chunks/agent-session-LHOJDS75.js +59 -0
  8. package/dist/chunks/{archive-Z4MSUTUS.js → archive-P47MRHE2.js} +10 -10
  9. package/dist/chunks/{bin-main-3NKAMTSR.js → bin-main-B3QOTIEH.js} +3 -3
  10. package/dist/chunks/{browser-Q7CAR3HM.js → browser-QN24UC7K.js} +6 -6
  11. package/dist/chunks/{chat-Z5AJZSH6.js → chat-HRORSJPH.js} +15 -15
  12. package/dist/chunks/{chunk-5TXHYHGI.js → chunk-25XPE4N6.js} +3 -3
  13. package/dist/chunks/{chunk-LJQKALFW.js → chunk-2HDIUUMX.js} +2 -2
  14. package/dist/chunks/{chunk-FIJIJBVB.js → chunk-2QXVOSJM.js} +6 -6
  15. package/dist/chunks/{chunk-ETQIZ5KN.js → chunk-2UPDDG7V.js} +3 -3
  16. package/dist/chunks/{chunk-JDD4EWD6.js → chunk-2UYBHC3L.js} +2 -2
  17. package/dist/chunks/{chunk-ERRNULJ3.js → chunk-2VQ475KY.js} +2 -2
  18. package/dist/chunks/{chunk-3D6A3HLM.js → chunk-34L6FTQV.js} +2 -2
  19. package/dist/chunks/{chunk-LXGJMPVM.js → chunk-37DRD4QM.js} +3 -3
  20. package/dist/chunks/{chunk-3UXYK42Z.js → chunk-3OP32UHN.js} +3 -3
  21. package/dist/chunks/{chunk-MJMA5OHV.js → chunk-3RC4ATZI.js} +3 -3
  22. package/dist/chunks/{chunk-A3NXWBMA.js → chunk-4SBUXWX3.js} +6 -3
  23. package/dist/chunks/chunk-4SBUXWX3.js.map +6 -0
  24. package/dist/chunks/{chunk-NN67WN5F.js → chunk-4SP6H34B.js} +2 -2
  25. package/dist/chunks/{chunk-WJG5O4KK.js → chunk-4WWLRVYU.js} +1750 -1433
  26. package/dist/chunks/chunk-4WWLRVYU.js.map +6 -0
  27. package/dist/chunks/{chunk-R3REKFM3.js → chunk-5XJC5G7N.js} +8 -8
  28. package/dist/chunks/{chunk-I7T3E2GZ.js → chunk-72CFHDKQ.js} +7 -7
  29. package/dist/chunks/{chunk-WYH6NXPA.js → chunk-7B5YTYHY.js} +4 -4
  30. package/dist/chunks/{chunk-Z2EACB4F.js → chunk-A6J2VJL5.js} +4 -4
  31. package/dist/chunks/{chunk-SFOKT7BD.js → chunk-ANUGFVZI.js} +4 -4
  32. package/dist/chunks/{chunk-NWNJO347.js → chunk-BHR2CNBZ.js} +4 -4
  33. package/dist/chunks/{chunk-N6YMEARB.js → chunk-BNMFWLWH.js} +2 -2
  34. package/dist/chunks/{chunk-YUCU537D.js → chunk-C2IABASE.js} +4 -4
  35. package/dist/chunks/{chunk-2U3AGHA2.js → chunk-CAPC66Q6.js} +3 -3
  36. package/dist/chunks/{chunk-FDTTJKE2.js → chunk-CEIYJWZ2.js} +2 -2
  37. package/dist/chunks/{chunk-H56UWANP.js → chunk-CIIMESY2.js} +4 -4
  38. package/dist/chunks/{chunk-DNW5R5BJ.js → chunk-CLADMV2E.js} +2 -2
  39. package/dist/chunks/{chunk-ZNSLNHYH.js → chunk-CM2I2L4G.js} +2 -2
  40. package/dist/chunks/{chunk-PPFEI5JA.js → chunk-CT23IU3D.js} +3 -3
  41. package/dist/chunks/{chunk-IN62T4C7.js → chunk-D2M5K6UY.js} +2 -2
  42. package/dist/chunks/{chunk-DLLDZEN6.js → chunk-DHV3KMEC.js} +30 -30
  43. package/dist/chunks/{chunk-M2DUJ2ET.js → chunk-DQKQKNDY.js} +9 -9
  44. package/dist/chunks/{chunk-56M5MQ4J.js → chunk-E7FQPIJB.js} +2 -2
  45. package/dist/chunks/{chunk-GMAVUBKY.js → chunk-G34P5PIK.js} +4 -4
  46. package/dist/chunks/{chunk-XQUBSIWB.js → chunk-I55BEPVH.js} +4 -4
  47. package/dist/chunks/{chunk-CEBLRMD4.js → chunk-J67SASGK.js} +13 -13
  48. package/dist/chunks/{chunk-5UQSACPK.js → chunk-JEULHVUH.js} +249 -72
  49. package/dist/chunks/chunk-JEULHVUH.js.map +6 -0
  50. package/dist/chunks/{chunk-XI4FSVO4.js → chunk-JKXCLMMZ.js} +2 -2
  51. package/dist/chunks/{chunk-KJBANDDG.js → chunk-L2GZVP5H.js} +8 -8
  52. package/dist/chunks/{chunk-LURD5LEU.js → chunk-LVDRURI4.js} +2 -2
  53. package/dist/chunks/{chunk-LQ6IIEFT.js → chunk-NTPBXJMK.js} +3 -3
  54. package/dist/chunks/{chunk-R4KW67FB.js → chunk-OFNGIO53.js} +2 -2
  55. package/dist/chunks/{chunk-EBM72A56.js → chunk-PKBHQFT6.js} +4 -4
  56. package/dist/chunks/{chunk-DYV2522W.js → chunk-QNFMVN4D.js} +2 -2
  57. package/dist/chunks/{chunk-TFJNH7ID.js → chunk-QZYTSINZ.js} +4 -4
  58. package/dist/chunks/{chunk-VQTWIVVA.js → chunk-RKSYVIQX.js} +5 -5
  59. package/dist/chunks/{chunk-7MYFM63X.js → chunk-RM4XZZL3.js} +12 -12
  60. package/dist/chunks/{chunk-L6QWM6JH.js → chunk-SEVUBJMR.js} +2 -2
  61. package/dist/chunks/{chunk-74E5AVCZ.js → chunk-TU46IHIV.js} +5 -5
  62. package/dist/chunks/{chunk-VMF3FBAG.js → chunk-U2AVT6OB.js} +3 -3
  63. package/dist/chunks/{chunk-33NYEJRI.js → chunk-UEXQA2UW.js} +3 -3
  64. package/dist/chunks/{chunk-5IUMQ3HV.js → chunk-UM4ECTUS.js} +13 -13
  65. package/dist/chunks/{chunk-FGLIZTK4.js → chunk-VALR7WUL.js} +2 -2
  66. package/dist/chunks/{chunk-NJGAXOWJ.js → chunk-VCKNYZYH.js} +6 -6
  67. package/dist/chunks/{chunk-ZA6AX5U4.js → chunk-WBTXYSAB.js} +2 -2
  68. package/dist/chunks/{chunk-6C4J5CIK.js → chunk-WJ7XYOSE.js} +2 -2
  69. package/dist/chunks/{chunk-F3MJOWFD.js → chunk-WKGECHMV.js} +6 -6
  70. package/dist/chunks/{chunk-3ZB55MHY.js → chunk-WN7YMX22.js} +4 -4
  71. package/dist/chunks/{chunk-LKVNTESX.js → chunk-Y5QV6NZK.js} +2 -2
  72. package/dist/chunks/{chunk-SK5SRMCT.js → chunk-YYX7O3T2.js} +3 -3
  73. package/dist/chunks/{chunk-NQSQZ2UV.js → chunk-Z7DJAGBK.js} +2 -2
  74. package/dist/chunks/{chunk-6W42AIQG.js → chunk-ZDEFWEEI.js} +7 -7
  75. package/dist/chunks/{chunk-TX3FNXAO.js → chunk-ZGBKTT7X.js} +2 -2
  76. package/dist/chunks/{chunk-3XMZDCBX.js → chunk-ZMZR4UTZ.js} +2 -2
  77. package/dist/chunks/{chunk-A6YM5FG3.js → chunk-ZQRO6GGZ.js} +5 -5
  78. package/dist/chunks/{cli-runtime-RPB4M2RF.js → cli-runtime-7GSPWSYW.js} +10 -10
  79. package/dist/chunks/{commands-IMYUSFHX.js → commands-LU5AOF65.js} +5 -5
  80. package/dist/chunks/{crash-report-PWJTZU34.js → crash-report-YDSO3QZP.js} +6 -6
  81. package/dist/chunks/{dist-J2I6IEOU.js → dist-47WGWXP5.js} +2 -2
  82. package/dist/chunks/{dist-VPHQMXFD.js → dist-7JBTU4ZA.js} +2 -2
  83. package/dist/chunks/{dist-T6QDOXHW.js → dist-7PFXZB32.js} +2 -2
  84. package/dist/chunks/{dist-CEKNZS6X.js → dist-BJMHCL2F.js} +2 -2
  85. package/dist/chunks/{dist-GSHJSYUF.js → dist-FI4O2BO3.js} +2 -2
  86. package/dist/chunks/{dist-THRSTILU.js → dist-JWX7FPMB.js} +2 -2
  87. package/dist/chunks/{dist-B4YMSACL.js → dist-SLWBMTWO.js} +2 -2
  88. package/dist/chunks/{doctor-LJTFZVNL.js → doctor-ZK3CTBDR.js} +8 -8
  89. package/dist/chunks/{drain-FZ7QVFJ5.js → drain-CVQW35OB.js} +10 -10
  90. package/dist/chunks/{eval-STWOVX3N.js → eval-PBRDQ7GI.js} +2 -2
  91. package/dist/chunks/{exec-EWHE65KQ.js → exec-ZVOPAVQC.js} +28 -28
  92. package/dist/chunks/{home-GKHHL5OL.js → home-QPIQIIAR.js} +3 -3
  93. package/dist/chunks/{host-queries-D3VSQE6Z.js → host-queries-UUG7LHPF.js} +15 -15
  94. package/dist/chunks/{learn-N3NKUI4W.js → learn-AILV7XYA.js} +13 -13
  95. package/dist/chunks/{learn-builtin-OZQUS64D.js → learn-builtin-I2RMG7OE.js} +16 -16
  96. package/dist/chunks/{lifecycle-MRG5PYDG.js → lifecycle-ZZ5HDP6F.js} +24 -24
  97. package/dist/chunks/{list-X5V5SGOY.js → list-TMHSX32S.js} +11 -11
  98. package/dist/chunks/{login-IXB52EFK.js → login-VUIOQEA2.js} +8 -8
  99. package/dist/chunks/{logs-BBC3W6H5.js → logs-QQTFNNSW.js} +4 -4
  100. package/dist/chunks/{mcp-UEQPXI7K.js → mcp-6H3YELN6.js} +16 -16
  101. package/dist/chunks/{message-command-PXMP4IC4.js → message-command-IQTT76ZY.js} +36 -36
  102. package/dist/chunks/{operator-tools-OZCXJX23.js → operator-tools-ISZGHK3F.js} +13 -13
  103. package/dist/chunks/{output-schema-OKJHMA22.js → output-schema-63NLKBRY.js} +3 -3
  104. package/dist/chunks/{pal-COYTNDHQ.js → pal-RAIDDDNH.js} +11 -11
  105. package/dist/chunks/{providers-56OCKVO4.js → providers-N2UXL3XT.js} +6 -6
  106. package/dist/chunks/{resident-2XJYIQOD.js → resident-CWT62J2M.js} +24 -24
  107. package/dist/chunks/resume-PKATLA4S.js +23 -0
  108. package/dist/chunks/{resume-command-EIDWBG7D.js → resume-command-DNNLB5SK.js} +4 -4
  109. package/dist/chunks/{schedule-SJ36DUQY.js → schedule-6N33GN2Z.js} +8 -8
  110. package/dist/chunks/{service-FEZAPVUE.js → service-77ZFLYDC.js} +23 -23
  111. package/dist/chunks/session-step-I5DFTYDV.js +30 -0
  112. package/dist/chunks/{skills-CXLLO5VH.js → skills-SAIXOU7Z.js} +8 -8
  113. package/dist/chunks/{state-QZBFM4HR.js → state-J4NZZP7B.js} +2 -2
  114. package/dist/chunks/{store-T76GFLGS.js → store-2JQLHCG4.js} +4 -4
  115. package/dist/chunks/{store-7TGN2BZW.js → store-QLG76DQG.js} +6 -6
  116. package/dist/chunks/{store-SFATKTMK.js → store-YRVVPTUX.js} +10 -10
  117. package/dist/chunks/{tui-ZHDQMAUW.js → tui-77L5I5EV.js} +167 -82
  118. package/dist/chunks/tui-77L5I5EV.js.map +6 -0
  119. package/dist/chunks/{upgrade-U3AHBHY3.js → upgrade-ZTG65H5Q.js} +2 -2
  120. package/dist/chunks/{worktree-LU7NNZQZ.js → worktree-5ETUFJAC.js} +12 -12
  121. package/dist/context/runtime-message.d.ts.map +1 -1
  122. package/dist/context/turn-snapshot.d.ts +26 -8
  123. package/dist/context/turn-snapshot.d.ts.map +1 -1
  124. package/dist/index.js +12 -12
  125. package/dist/integrations/resident/runner-worker.js +20 -20
  126. package/dist/integrations/sessions/evidence-recall.d.ts +1 -1
  127. package/dist/integrations/sessions/evidence-recall.d.ts.map +1 -1
  128. package/dist/integrations/subagents/saved-agents.d.ts +12 -3
  129. package/dist/integrations/subagents/saved-agents.d.ts.map +1 -1
  130. package/dist/tui/App.d.ts.map +1 -1
  131. package/dist/tui/PlanApprovalOverlay.d.ts.map +1 -1
  132. package/dist/tui/agent.d.ts.map +1 -1
  133. package/dist/tui/compaction-rows.d.ts +13 -0
  134. package/dist/tui/compaction-rows.d.ts.map +1 -1
  135. package/dist/tui/display-path.d.ts +12 -0
  136. package/dist/tui/display-path.d.ts.map +1 -1
  137. package/dist/tui/permission-review.d.ts +9 -0
  138. package/dist/tui/permission-review.d.ts.map +1 -1
  139. package/dist/tui/resume-empty.d.ts +14 -0
  140. package/dist/tui/resume-empty.d.ts.map +1 -0
  141. package/dist/tui/tidy-tool-output.d.ts.map +1 -1
  142. package/dist/tui/tool-end-rows.d.ts.map +1 -1
  143. package/package.json +5 -5
  144. package/dist/chunks/agent-session-MQEHBQXA.js +0 -59
  145. package/dist/chunks/chunk-5UQSACPK.js.map +0 -6
  146. package/dist/chunks/chunk-A3NXWBMA.js.map +0 -6
  147. package/dist/chunks/chunk-WJG5O4KK.js.map +0 -6
  148. package/dist/chunks/resume-OKFXVP4R.js +0 -23
  149. package/dist/chunks/session-step-Z53LX627.js +0 -30
  150. package/dist/chunks/tui-ZHDQMAUW.js.map +0 -6
  151. /package/dist/chunks/{acp-PBJTGQHA.js.map → acp-5RFAFTQU.js.map} +0 -0
  152. /package/dist/chunks/{activity-command-JFBLFZSJ.js.map → activity-command-XLF5EAM5.js.map} +0 -0
  153. /package/dist/chunks/{add-MSMS6QMP.js.map → add-Z6Y5DOCM.js.map} +0 -0
  154. /package/dist/chunks/{agent-OEXJQTAS.js.map → agent-U4NFC4DT.js.map} +0 -0
  155. /package/dist/chunks/{agent-session-MQEHBQXA.js.map → agent-session-LHOJDS75.js.map} +0 -0
  156. /package/dist/chunks/{archive-Z4MSUTUS.js.map → archive-P47MRHE2.js.map} +0 -0
  157. /package/dist/chunks/{bin-main-3NKAMTSR.js.map → bin-main-B3QOTIEH.js.map} +0 -0
  158. /package/dist/chunks/{browser-Q7CAR3HM.js.map → browser-QN24UC7K.js.map} +0 -0
  159. /package/dist/chunks/{chat-Z5AJZSH6.js.map → chat-HRORSJPH.js.map} +0 -0
  160. /package/dist/chunks/{chunk-5TXHYHGI.js.map → chunk-25XPE4N6.js.map} +0 -0
  161. /package/dist/chunks/{chunk-LJQKALFW.js.map → chunk-2HDIUUMX.js.map} +0 -0
  162. /package/dist/chunks/{chunk-FIJIJBVB.js.map → chunk-2QXVOSJM.js.map} +0 -0
  163. /package/dist/chunks/{chunk-ETQIZ5KN.js.map → chunk-2UPDDG7V.js.map} +0 -0
  164. /package/dist/chunks/{chunk-JDD4EWD6.js.map → chunk-2UYBHC3L.js.map} +0 -0
  165. /package/dist/chunks/{chunk-ERRNULJ3.js.map → chunk-2VQ475KY.js.map} +0 -0
  166. /package/dist/chunks/{chunk-3D6A3HLM.js.map → chunk-34L6FTQV.js.map} +0 -0
  167. /package/dist/chunks/{chunk-LXGJMPVM.js.map → chunk-37DRD4QM.js.map} +0 -0
  168. /package/dist/chunks/{chunk-3UXYK42Z.js.map → chunk-3OP32UHN.js.map} +0 -0
  169. /package/dist/chunks/{chunk-MJMA5OHV.js.map → chunk-3RC4ATZI.js.map} +0 -0
  170. /package/dist/chunks/{chunk-NN67WN5F.js.map → chunk-4SP6H34B.js.map} +0 -0
  171. /package/dist/chunks/{chunk-R3REKFM3.js.map → chunk-5XJC5G7N.js.map} +0 -0
  172. /package/dist/chunks/{chunk-I7T3E2GZ.js.map → chunk-72CFHDKQ.js.map} +0 -0
  173. /package/dist/chunks/{chunk-WYH6NXPA.js.map → chunk-7B5YTYHY.js.map} +0 -0
  174. /package/dist/chunks/{chunk-Z2EACB4F.js.map → chunk-A6J2VJL5.js.map} +0 -0
  175. /package/dist/chunks/{chunk-SFOKT7BD.js.map → chunk-ANUGFVZI.js.map} +0 -0
  176. /package/dist/chunks/{chunk-NWNJO347.js.map → chunk-BHR2CNBZ.js.map} +0 -0
  177. /package/dist/chunks/{chunk-N6YMEARB.js.map → chunk-BNMFWLWH.js.map} +0 -0
  178. /package/dist/chunks/{chunk-YUCU537D.js.map → chunk-C2IABASE.js.map} +0 -0
  179. /package/dist/chunks/{chunk-2U3AGHA2.js.map → chunk-CAPC66Q6.js.map} +0 -0
  180. /package/dist/chunks/{chunk-FDTTJKE2.js.map → chunk-CEIYJWZ2.js.map} +0 -0
  181. /package/dist/chunks/{chunk-H56UWANP.js.map → chunk-CIIMESY2.js.map} +0 -0
  182. /package/dist/chunks/{chunk-DNW5R5BJ.js.map → chunk-CLADMV2E.js.map} +0 -0
  183. /package/dist/chunks/{chunk-ZNSLNHYH.js.map → chunk-CM2I2L4G.js.map} +0 -0
  184. /package/dist/chunks/{chunk-PPFEI5JA.js.map → chunk-CT23IU3D.js.map} +0 -0
  185. /package/dist/chunks/{chunk-IN62T4C7.js.map → chunk-D2M5K6UY.js.map} +0 -0
  186. /package/dist/chunks/{chunk-DLLDZEN6.js.map → chunk-DHV3KMEC.js.map} +0 -0
  187. /package/dist/chunks/{chunk-M2DUJ2ET.js.map → chunk-DQKQKNDY.js.map} +0 -0
  188. /package/dist/chunks/{chunk-56M5MQ4J.js.map → chunk-E7FQPIJB.js.map} +0 -0
  189. /package/dist/chunks/{chunk-GMAVUBKY.js.map → chunk-G34P5PIK.js.map} +0 -0
  190. /package/dist/chunks/{chunk-XQUBSIWB.js.map → chunk-I55BEPVH.js.map} +0 -0
  191. /package/dist/chunks/{chunk-CEBLRMD4.js.map → chunk-J67SASGK.js.map} +0 -0
  192. /package/dist/chunks/{chunk-XI4FSVO4.js.map → chunk-JKXCLMMZ.js.map} +0 -0
  193. /package/dist/chunks/{chunk-KJBANDDG.js.map → chunk-L2GZVP5H.js.map} +0 -0
  194. /package/dist/chunks/{chunk-LURD5LEU.js.map → chunk-LVDRURI4.js.map} +0 -0
  195. /package/dist/chunks/{chunk-LQ6IIEFT.js.map → chunk-NTPBXJMK.js.map} +0 -0
  196. /package/dist/chunks/{chunk-R4KW67FB.js.map → chunk-OFNGIO53.js.map} +0 -0
  197. /package/dist/chunks/{chunk-EBM72A56.js.map → chunk-PKBHQFT6.js.map} +0 -0
  198. /package/dist/chunks/{chunk-DYV2522W.js.map → chunk-QNFMVN4D.js.map} +0 -0
  199. /package/dist/chunks/{chunk-TFJNH7ID.js.map → chunk-QZYTSINZ.js.map} +0 -0
  200. /package/dist/chunks/{chunk-VQTWIVVA.js.map → chunk-RKSYVIQX.js.map} +0 -0
  201. /package/dist/chunks/{chunk-7MYFM63X.js.map → chunk-RM4XZZL3.js.map} +0 -0
  202. /package/dist/chunks/{chunk-L6QWM6JH.js.map → chunk-SEVUBJMR.js.map} +0 -0
  203. /package/dist/chunks/{chunk-74E5AVCZ.js.map → chunk-TU46IHIV.js.map} +0 -0
  204. /package/dist/chunks/{chunk-VMF3FBAG.js.map → chunk-U2AVT6OB.js.map} +0 -0
  205. /package/dist/chunks/{chunk-33NYEJRI.js.map → chunk-UEXQA2UW.js.map} +0 -0
  206. /package/dist/chunks/{chunk-5IUMQ3HV.js.map → chunk-UM4ECTUS.js.map} +0 -0
  207. /package/dist/chunks/{chunk-FGLIZTK4.js.map → chunk-VALR7WUL.js.map} +0 -0
  208. /package/dist/chunks/{chunk-NJGAXOWJ.js.map → chunk-VCKNYZYH.js.map} +0 -0
  209. /package/dist/chunks/{chunk-ZA6AX5U4.js.map → chunk-WBTXYSAB.js.map} +0 -0
  210. /package/dist/chunks/{chunk-6C4J5CIK.js.map → chunk-WJ7XYOSE.js.map} +0 -0
  211. /package/dist/chunks/{chunk-F3MJOWFD.js.map → chunk-WKGECHMV.js.map} +0 -0
  212. /package/dist/chunks/{chunk-3ZB55MHY.js.map → chunk-WN7YMX22.js.map} +0 -0
  213. /package/dist/chunks/{chunk-LKVNTESX.js.map → chunk-Y5QV6NZK.js.map} +0 -0
  214. /package/dist/chunks/{chunk-SK5SRMCT.js.map → chunk-YYX7O3T2.js.map} +0 -0
  215. /package/dist/chunks/{chunk-NQSQZ2UV.js.map → chunk-Z7DJAGBK.js.map} +0 -0
  216. /package/dist/chunks/{chunk-6W42AIQG.js.map → chunk-ZDEFWEEI.js.map} +0 -0
  217. /package/dist/chunks/{chunk-TX3FNXAO.js.map → chunk-ZGBKTT7X.js.map} +0 -0
  218. /package/dist/chunks/{chunk-3XMZDCBX.js.map → chunk-ZMZR4UTZ.js.map} +0 -0
  219. /package/dist/chunks/{chunk-A6YM5FG3.js.map → chunk-ZQRO6GGZ.js.map} +0 -0
  220. /package/dist/chunks/{cli-runtime-RPB4M2RF.js.map → cli-runtime-7GSPWSYW.js.map} +0 -0
  221. /package/dist/chunks/{commands-IMYUSFHX.js.map → commands-LU5AOF65.js.map} +0 -0
  222. /package/dist/chunks/{crash-report-PWJTZU34.js.map → crash-report-YDSO3QZP.js.map} +0 -0
  223. /package/dist/chunks/{dist-J2I6IEOU.js.map → dist-47WGWXP5.js.map} +0 -0
  224. /package/dist/chunks/{dist-VPHQMXFD.js.map → dist-7JBTU4ZA.js.map} +0 -0
  225. /package/dist/chunks/{dist-T6QDOXHW.js.map → dist-7PFXZB32.js.map} +0 -0
  226. /package/dist/chunks/{dist-CEKNZS6X.js.map → dist-BJMHCL2F.js.map} +0 -0
  227. /package/dist/chunks/{dist-GSHJSYUF.js.map → dist-FI4O2BO3.js.map} +0 -0
  228. /package/dist/chunks/{dist-THRSTILU.js.map → dist-JWX7FPMB.js.map} +0 -0
  229. /package/dist/chunks/{dist-B4YMSACL.js.map → dist-SLWBMTWO.js.map} +0 -0
  230. /package/dist/chunks/{doctor-LJTFZVNL.js.map → doctor-ZK3CTBDR.js.map} +0 -0
  231. /package/dist/chunks/{drain-FZ7QVFJ5.js.map → drain-CVQW35OB.js.map} +0 -0
  232. /package/dist/chunks/{eval-STWOVX3N.js.map → eval-PBRDQ7GI.js.map} +0 -0
  233. /package/dist/chunks/{exec-EWHE65KQ.js.map → exec-ZVOPAVQC.js.map} +0 -0
  234. /package/dist/chunks/{home-GKHHL5OL.js.map → home-QPIQIIAR.js.map} +0 -0
  235. /package/dist/chunks/{host-queries-D3VSQE6Z.js.map → host-queries-UUG7LHPF.js.map} +0 -0
  236. /package/dist/chunks/{learn-N3NKUI4W.js.map → learn-AILV7XYA.js.map} +0 -0
  237. /package/dist/chunks/{learn-builtin-OZQUS64D.js.map → learn-builtin-I2RMG7OE.js.map} +0 -0
  238. /package/dist/chunks/{lifecycle-MRG5PYDG.js.map → lifecycle-ZZ5HDP6F.js.map} +0 -0
  239. /package/dist/chunks/{list-X5V5SGOY.js.map → list-TMHSX32S.js.map} +0 -0
  240. /package/dist/chunks/{login-IXB52EFK.js.map → login-VUIOQEA2.js.map} +0 -0
  241. /package/dist/chunks/{logs-BBC3W6H5.js.map → logs-QQTFNNSW.js.map} +0 -0
  242. /package/dist/chunks/{mcp-UEQPXI7K.js.map → mcp-6H3YELN6.js.map} +0 -0
  243. /package/dist/chunks/{message-command-PXMP4IC4.js.map → message-command-IQTT76ZY.js.map} +0 -0
  244. /package/dist/chunks/{operator-tools-OZCXJX23.js.map → operator-tools-ISZGHK3F.js.map} +0 -0
  245. /package/dist/chunks/{output-schema-OKJHMA22.js.map → output-schema-63NLKBRY.js.map} +0 -0
  246. /package/dist/chunks/{pal-COYTNDHQ.js.map → pal-RAIDDDNH.js.map} +0 -0
  247. /package/dist/chunks/{providers-56OCKVO4.js.map → providers-N2UXL3XT.js.map} +0 -0
  248. /package/dist/chunks/{resident-2XJYIQOD.js.map → resident-CWT62J2M.js.map} +0 -0
  249. /package/dist/chunks/{resume-OKFXVP4R.js.map → resume-PKATLA4S.js.map} +0 -0
  250. /package/dist/chunks/{resume-command-EIDWBG7D.js.map → resume-command-DNNLB5SK.js.map} +0 -0
  251. /package/dist/chunks/{schedule-SJ36DUQY.js.map → schedule-6N33GN2Z.js.map} +0 -0
  252. /package/dist/chunks/{service-FEZAPVUE.js.map → service-77ZFLYDC.js.map} +0 -0
  253. /package/dist/chunks/{session-step-Z53LX627.js.map → session-step-I5DFTYDV.js.map} +0 -0
  254. /package/dist/chunks/{skills-CXLLO5VH.js.map → skills-SAIXOU7Z.js.map} +0 -0
  255. /package/dist/chunks/{state-QZBFM4HR.js.map → state-J4NZZP7B.js.map} +0 -0
  256. /package/dist/chunks/{store-7TGN2BZW.js.map → store-2JQLHCG4.js.map} +0 -0
  257. /package/dist/chunks/{store-SFATKTMK.js.map → store-QLG76DQG.js.map} +0 -0
  258. /package/dist/chunks/{store-T76GFLGS.js.map → store-YRVVPTUX.js.map} +0 -0
  259. /package/dist/chunks/{upgrade-U3AHBHY3.js.map → upgrade-ZTG65H5Q.js.map} +0 -0
  260. /package/dist/chunks/{worktree-LU7NNZQZ.js.map → worktree-5ETUFJAC.js.map} +0 -0
@@ -2,13 +2,13 @@ import { createRequire as __namzuCreateRequire } from 'node:module';
2
2
  const require = __namzuCreateRequire(import.meta.url);
3
3
  import {
4
4
  openManagedWorktrees
5
- } from "./chunk-3ZB55MHY.js";
5
+ } from "./chunk-WN7YMX22.js";
6
6
  import {
7
7
  createBrowserControl
8
8
  } from "./chunk-WHODOMXA.js";
9
9
  import {
10
10
  createSessionSkillCatalog
11
- } from "./chunk-5TXHYHGI.js";
11
+ } from "./chunk-25XPE4N6.js";
12
12
  import {
13
13
  SAVE_SKILL_TOOL_NAME,
14
14
  attachAgentView,
@@ -25,22 +25,22 @@ import {
25
25
  theme,
26
26
  viewFromJournal,
27
27
  workingDirectoryProblem
28
- } from "./chunk-Z2EACB4F.js";
28
+ } from "./chunk-A6J2VJL5.js";
29
29
  import {
30
30
  runGeneratorCycle
31
- } from "./chunk-LXGJMPVM.js";
31
+ } from "./chunk-37DRD4QM.js";
32
32
  import {
33
33
  createSessionLearningFeed,
34
34
  openLearningTarget,
35
35
  readProjectGuidance,
36
36
  withSessionLearningFeed
37
- } from "./chunk-VQTWIVVA.js";
37
+ } from "./chunk-RKSYVIQX.js";
38
38
  import {
39
39
  connectMcpServers
40
- } from "./chunk-GMAVUBKY.js";
40
+ } from "./chunk-G34P5PIK.js";
41
41
  import {
42
42
  openInBrowser
43
- } from "./chunk-ZA6AX5U4.js";
43
+ } from "./chunk-WBTXYSAB.js";
44
44
  import {
45
45
  CredentialRefreshRejectedError,
46
46
  CredentialWithdrawnError,
@@ -48,7 +48,7 @@ import {
48
48
  ensureFreshStoredCodexCredential,
49
49
  readSubscriptionCredential,
50
50
  sameOAuthCredential
51
- } from "./chunk-XQUBSIWB.js";
51
+ } from "./chunk-I55BEPVH.js";
52
52
  import {
53
53
  debugRequested
54
54
  } from "./chunk-GNBMKISG.js";
@@ -60,7 +60,7 @@ import {
60
60
  sessionWorkflowSizeAdvice,
61
61
  unmatchedPassthroughTools,
62
62
  workflowTokenCeiling
63
- } from "./chunk-YUCU537D.js";
63
+ } from "./chunk-C2IABASE.js";
64
64
  import {
65
65
  formatSize,
66
66
  homePath,
@@ -72,7 +72,7 @@ import {
72
72
  } from "./chunk-LCGXWCVU.js";
73
73
  import {
74
74
  createLazyCodeAnalysis
75
- } from "./chunk-56M5MQ4J.js";
75
+ } from "./chunk-E7FQPIJB.js";
76
76
  import {
77
77
  canSelectModel,
78
78
  chainCapabilityDisagreements,
@@ -97,7 +97,7 @@ import {
97
97
  requiresCredentialForModel,
98
98
  resolveChainCapabilities,
99
99
  unresolvedMembers
100
- } from "./chunk-5IUMQ3HV.js";
100
+ } from "./chunk-UM4ECTUS.js";
101
101
  import {
102
102
  PROVIDER_REGISTRY,
103
103
  missingCredentialMessage,
@@ -106,15 +106,15 @@ import {
106
106
  import {
107
107
  isPermissionMode,
108
108
  permissionModeLabel
109
- } from "./chunk-L6QWM6JH.js";
109
+ } from "./chunk-SEVUBJMR.js";
110
110
  import {
111
111
  conversationLogPath,
112
112
  ensureSessionStarted,
113
113
  openConversationLog
114
- } from "./chunk-A6YM5FG3.js";
114
+ } from "./chunk-ZQRO6GGZ.js";
115
115
  import {
116
116
  readIdentity
117
- } from "./chunk-PPFEI5JA.js";
117
+ } from "./chunk-CT23IU3D.js";
118
118
  import {
119
119
  INSTRUCTIONS_FILENAME,
120
120
  MAX_CHARS_PER_FILE,
@@ -125,10 +125,10 @@ import {
125
125
  import {
126
126
  compilePermissions,
127
127
  isPermissionEffect
128
- } from "./chunk-VMF3FBAG.js";
128
+ } from "./chunk-U2AVT6OB.js";
129
129
  import {
130
130
  cliLogger
131
- } from "./chunk-DYV2522W.js";
131
+ } from "./chunk-QNFMVN4D.js";
132
132
  import {
133
133
  stringWidth
134
134
  } from "./chunk-U5UV2YRE.js";
@@ -141,13 +141,13 @@ import {
141
141
  } from "./chunk-IE5XIE4W.js";
142
142
  import {
143
143
  ensurePrivateStateDirectory
144
- } from "./chunk-ERRNULJ3.js";
144
+ } from "./chunk-2VQ475KY.js";
145
145
  import {
146
146
  restrictToOwner
147
- } from "./chunk-6C4J5CIK.js";
147
+ } from "./chunk-WJ7XYOSE.js";
148
148
  import {
149
149
  namzuHomePath
150
- } from "./chunk-R4KW67FB.js";
150
+ } from "./chunk-OFNGIO53.js";
151
151
  import {
152
152
  AgentManager,
153
153
  AgentRegistry,
@@ -282,6 +282,7 @@ import {
282
282
  isTrustedReadOnly,
283
283
  isTurnInProgressError,
284
284
  isolationOf,
285
+ lastPromptText,
285
286
  lexShellCommandLine,
286
287
  mapTools,
287
288
  mcpJsonSchemaToZod,
@@ -308,12 +309,13 @@ import {
308
309
  toToolSourceRef,
309
310
  toolWireSchema,
310
311
  toolset,
312
+ turnContextEntries,
311
313
  untrustedEnvelopeBody,
312
314
  webGuidanceContribution,
313
315
  windowsShellNotice,
314
316
  withProviderFallback,
315
317
  wrapUntrusted
316
- } from "./chunk-WJG5O4KK.js";
318
+ } from "./chunk-4WWLRVYU.js";
317
319
  import {
318
320
  __name
319
321
  } from "./chunk-76FLAFCG.js";
@@ -869,6 +871,28 @@ var COMPACTED_TEXT = "Conversation compacted";
869
871
  var COMPACTED_HINT = "(ctrl+o for history)";
870
872
  var COMPACT_RESULT_TEXT = "Compacted";
871
873
  var COMPACT_RESULT_HINT = "(ctrl+o to see full summary)";
874
+ function estimateHistoryTokens(messages) {
875
+ let chars = 0;
876
+ for (const message2 of messages) {
877
+ if (typeof message2.content === "string") chars += message2.content.length;
878
+ else if (message2.content) {
879
+ for (const block of message2.content) if (block.type === "text") chars += block.text.length;
880
+ }
881
+ }
882
+ return Math.ceil(chars / 4);
883
+ }
884
+ __name(estimateHistoryTokens, "estimateHistoryTokens");
885
+ function compactResultLine(input) {
886
+ const parts = [COMPACT_RESULT_TEXT];
887
+ if (input.shed > 0) parts.push(`${input.shed} message${input.shed === 1 ? "" : "s"} summarized`);
888
+ if (input.tokensBefore > input.tokensAfter) {
889
+ parts.push(
890
+ `context about ${approximate(input.tokensBefore)} to ${approximate(input.tokensAfter)} tokens`
891
+ );
892
+ }
893
+ return parts.join(" \xB7 ");
894
+ }
895
+ __name(compactResultLine, "compactResultLine");
872
896
  var NOTHING_TO_COMPACT_TEXT = "Nothing to compact yet. The conversation is still short enough.";
873
897
  var COMPACT_NOT_SAVED_TEXT = "This conversation could not be saved, so the summary lasts only until you quit.";
874
898
  function approximate(tokens) {
@@ -1341,7 +1365,28 @@ __name(spansText, "spansText");
1341
1365
 
1342
1366
  // src/tui/display-path.ts
1343
1367
  import { isAbsolute, relative, resolve } from "node:path";
1368
+ var PLAN_FILE_LABEL = "the plan";
1369
+ var SESSION_ID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iu;
1370
+ function configuredNamzuHome() {
1371
+ try {
1372
+ return resolveNamzuHome();
1373
+ } catch {
1374
+ return void 0;
1375
+ }
1376
+ }
1377
+ __name(configuredNamzuHome, "configuredNamzuHome");
1378
+ function isSessionPlanPath(path, home = configuredNamzuHome()) {
1379
+ const flat = path.replace(/\\/gu, "/");
1380
+ const shape = /(^|\/)projects\/[^/]+\/([^/]+)\/plans\/plan\.md$/u.exec(flat);
1381
+ if (!shape) return false;
1382
+ if (SESSION_ID.test(shape[2] ?? "")) return true;
1383
+ if (home === void 0) return false;
1384
+ const root = `${home.replace(/\\/gu, "/").replace(/\/+$/u, "")}/projects/`;
1385
+ return flat.startsWith(root);
1386
+ }
1387
+ __name(isSessionPlanPath, "isSessionPlanPath");
1344
1388
  function displayPath(path, cwd, home) {
1389
+ if (isSessionPlanPath(path)) return PLAN_FILE_LABEL;
1345
1390
  if (path.length === 0 || /^[A-Za-z][A-Za-z0-9+.-]+:\/\//.test(path)) return path;
1346
1391
  if (cwd === void 0) return homePath(path, home);
1347
1392
  const absolute = isAbsolute(path) ? path : resolve(cwd, path);
@@ -1625,6 +1670,7 @@ function turnStoppedLine(result) {
1625
1670
  return result.includes(TURN_STOPPED_TEXT) ? TURN_STOPPED_LINE : void 0;
1626
1671
  }
1627
1672
  __name(turnStoppedLine, "turnStoppedLine");
1673
+ var FILE_CHANGED_LINE = "File changed since it was read, nothing written";
1628
1674
  function shortToolFailure(toolName2, facts) {
1629
1675
  const name = toolName2.toLowerCase();
1630
1676
  const reason = facts.reason;
@@ -1636,6 +1682,9 @@ function shortToolFailure(toolName2, facts) {
1636
1682
  if (missing2) return error("File not found");
1637
1683
  return refused ? error("Error reading file") : void 0;
1638
1684
  }
1685
+ if ((name === "edit" || name === "write") && reason === "changed_on_disk") {
1686
+ return error(FILE_CHANGED_LINE);
1687
+ }
1639
1688
  if (name === "edit") {
1640
1689
  if (reason === "not_read") return { text: "File must be read first", tone: "muted" };
1641
1690
  if (missing2) return error("File not found");
@@ -4510,34 +4559,143 @@ async function readTurnSnapshot(cwd) {
4510
4559
  };
4511
4560
  }
4512
4561
  __name(readTurnSnapshot, "readTurnSnapshot");
4562
+ var REPOSITORY_ENTRY_KEY = "repository";
4563
+ var FULL_HEADING = "## Repository";
4564
+ var NOTE_FULL = "This is the repository as of the time in the entry header; it does not update as you work. A later repository entry lists what changed since. Run `git status` before any action that depends on the current state.";
4565
+ var PROVENANCE = "File names and commit subjects read from the working directory with git. They were written by whoever committed or created them.";
4566
+ var PROVENANCE_DELTA = "Written by others.";
4567
+ var TREE_HEADING = "Working tree (git status --short):";
4568
+ var TREE_CLEAN = "Working tree: clean.";
4569
+ var COMMITS_HEADING = "Recent commits (newest first):";
4570
+ var MORE = /^… and (\d+) more$/;
4571
+ var DELTA_HEADING = "Changes since the earlier repository entries:";
4572
+ var DELTA_ADDED = "Now listed in the working tree:";
4573
+ var DELTA_REMOVED = "No longer listed in the working tree:";
4574
+ var DELTA_OMITTED = /^Entries not listed: (\d+)$/;
4575
+ var DELTA_NEW_COMMITS = "New commits (newest first):";
4576
+ var DELTA_COMMITS = "Recent commits now (newest first):";
4513
4577
  function composeTurnSnapshot(snapshot) {
4514
4578
  const body2 = [];
4515
4579
  if (snapshot.status.length === 0) {
4516
- body2.push("Working tree: clean.");
4580
+ body2.push(TREE_CLEAN);
4517
4581
  } else {
4518
- body2.push("Working tree (git status --short):", ...snapshot.status);
4582
+ body2.push(TREE_HEADING, ...snapshot.status);
4519
4583
  if (snapshot.omittedStatusLines > 0) {
4520
4584
  body2.push(`\u2026 and ${snapshot.omittedStatusLines} more`);
4521
4585
  }
4522
4586
  }
4523
4587
  if (snapshot.recentCommits.length > 0) {
4524
- body2.push("", "Recent commits (newest first):", ...snapshot.recentCommits);
4588
+ body2.push("", COMMITS_HEADING, ...snapshot.recentCommits);
4525
4589
  }
4526
- return [
4527
- "## Repository at the start of this turn",
4528
- "",
4529
- wrapUntrusted(
4530
- {
4531
- kind: "repository-snapshot",
4532
- provenance: "File names and commit subjects read from the working directory with git. They were written by whoever committed or created them."
4533
- },
4534
- body2.join("\n")
4535
- ),
4536
- "",
4537
- "This is a snapshot from when the turn started; it does not update as you work. Run `git status` before any action that depends on the current state."
4538
- ].join("\n");
4590
+ return [FULL_HEADING, "", wrap(body2), "", NOTE_FULL].join("\n");
4539
4591
  }
4540
4592
  __name(composeTurnSnapshot, "composeTurnSnapshot");
4593
+ function wrap(body2, delta = false) {
4594
+ return wrapUntrusted(
4595
+ {
4596
+ kind: "repository-snapshot",
4597
+ provenance: delta ? PROVENANCE_DELTA : PROVENANCE
4598
+ },
4599
+ body2.join("\n"),
4600
+ { brief: delta }
4601
+ );
4602
+ }
4603
+ __name(wrap, "wrap");
4604
+ var neutral = /* @__PURE__ */ __name((line) => line.replace(/namzu-untrusted/gi, "namzu_untrusted"), "neutral");
4605
+ function envelopeLines(entry) {
4606
+ const lines = entry.split("\n");
4607
+ const open3 = lines.findIndex(
4608
+ (line) => /^<namzu-untrusted-[0-9a-f]+ kind="repository-snapshot"/.test(line)
4609
+ );
4610
+ if (open3 < 0) return null;
4611
+ const close = lines.findIndex(
4612
+ (line, index) => index > open3 && /^<\/namzu-untrusted-[0-9a-f]+>$/.test(line)
4613
+ );
4614
+ if (close < 0) return null;
4615
+ const blank = lines.findIndex((line, index) => index > open3 && line === "");
4616
+ if (blank < 0 || blank > close) return null;
4617
+ return lines.slice(blank + 1, close);
4618
+ }
4619
+ __name(envelopeLines, "envelopeLines");
4620
+ function apply(known, entry) {
4621
+ const lines = envelopeLines(entry);
4622
+ if (!lines) return null;
4623
+ const whole = !lines.includes(DELTA_HEADING);
4624
+ if (!whole && !known) return null;
4625
+ const next = whole || !known ? { status: /* @__PURE__ */ new Set(), omitted: 0, commits: [] } : { status: new Set(known.status), omitted: known.omitted, commits: [...known.commits] };
4626
+ let section = "none";
4627
+ const newCommits = [];
4628
+ let replaced = null;
4629
+ for (const line of lines) {
4630
+ if (line === "" || line === DELTA_HEADING || line === TREE_CLEAN) section = "none";
4631
+ else if (line === TREE_HEADING) section = "tree";
4632
+ else if (line === DELTA_ADDED) section = "added";
4633
+ else if (line === DELTA_REMOVED) section = "removed";
4634
+ else if (line === COMMITS_HEADING) section = "commits";
4635
+ else if (line === DELTA_COMMITS) {
4636
+ section = "commits";
4637
+ replaced = [];
4638
+ } else if (line === DELTA_NEW_COMMITS) section = "newCommits";
4639
+ else if (MORE.test(line) || DELTA_OMITTED.test(line)) {
4640
+ next.omitted = Number((MORE.exec(line) ?? DELTA_OMITTED.exec(line))?.[1] ?? 0);
4641
+ section = "none";
4642
+ } else if (section === "tree" || section === "added") next.status.add(line);
4643
+ else if (section === "removed") next.status.delete(line);
4644
+ else if (section === "commits") {
4645
+ if (replaced) replaced.push(line);
4646
+ else next.commits.push(line);
4647
+ } else if (section === "newCommits") newCommits.push(line);
4648
+ }
4649
+ if (replaced) next.commits = replaced;
4650
+ else if (newCommits.length > 0) next.commits = [...newCommits, ...next.commits];
4651
+ return next;
4652
+ }
4653
+ __name(apply, "apply");
4654
+ function knownFrom(entries) {
4655
+ let known = null;
4656
+ for (const entry of entries) {
4657
+ known = apply(known, entry);
4658
+ if (known === null) return null;
4659
+ }
4660
+ return known;
4661
+ }
4662
+ __name(knownFrom, "knownFrom");
4663
+ function composeSnapshotEntry(earlier, snapshot) {
4664
+ const full = composeTurnSnapshot(snapshot);
4665
+ const known = knownFrom(earlier);
4666
+ if (!known) return full;
4667
+ const status = snapshot.status.map(neutral);
4668
+ const commits = snapshot.recentCommits.map(neutral);
4669
+ const now = new Set(status);
4670
+ const added = status.filter((line) => !known.status.has(line));
4671
+ const removed = [...known.status].filter((line) => !now.has(line));
4672
+ const omittedChanged = snapshot.omittedStatusLines !== known.omitted;
4673
+ const sameCommits = commits.length === known.commits.length && commits.every((c, i) => c === known.commits[i]);
4674
+ if (added.length === 0 && removed.length === 0 && !omittedChanged && sameCommits) return null;
4675
+ const body2 = [DELTA_HEADING];
4676
+ if (added.length > 0)
4677
+ body2.push(DELTA_ADDED, ...snapshot.status.filter((l) => added.includes(neutral(l))));
4678
+ if (removed.length > 0) body2.push(DELTA_REMOVED, ...removed);
4679
+ if (omittedChanged) body2.push(`Entries not listed: ${snapshot.omittedStatusLines}`);
4680
+ if (!sameCommits) {
4681
+ const fresh = commits.findIndex(
4682
+ (_, i) => known.commits.length >= commits.length - i && known.commits.slice(0, commits.length - i).every((c, j) => c === commits[i + j])
4683
+ );
4684
+ if (fresh > 0) body2.push(DELTA_NEW_COMMITS, ...snapshot.recentCommits.slice(0, fresh));
4685
+ else body2.push(DELTA_COMMITS, ...snapshot.recentCommits);
4686
+ }
4687
+ const delta = wrap(body2, true);
4688
+ return delta.length < full.length ? delta : full;
4689
+ }
4690
+ __name(composeSnapshotEntry, "composeSnapshotEntry");
4691
+ function createRepositorySnapshotStep(snapshot) {
4692
+ return ({ messages }) => {
4693
+ if (!snapshot) return void 0;
4694
+ const text2 = composeSnapshotEntry(turnContextEntries(messages, REPOSITORY_ENTRY_KEY), snapshot);
4695
+ return text2 ? { recordedContext: [{ key: REPOSITORY_ENTRY_KEY, text: text2 }] } : void 0;
4696
+ };
4697
+ }
4698
+ __name(createRepositorySnapshotStep, "createRepositorySnapshotStep");
4541
4699
 
4542
4700
  // ../decision/dist/contract.js
4543
4701
  var DecisionError = class extends Error {
@@ -5828,11 +5986,12 @@ function advanceScan(scans, scan3, nextCursor, excerpts, hasDerivedSummaries, ca
5828
5986
  }
5829
5987
  __name(advanceScan, "advanceScan");
5830
5988
  var RECALL_PAGES = 4;
5831
- function createConversationEvidenceRecall(sessions, sessionId, assertOwner, resolveQuery = false) {
5989
+ function createConversationEvidenceRecall(sessions, sessionId, assertOwner, resolveQuery = false, record = false) {
5832
5990
  const scope2 = { tenantId: sessions.tenantId, projectId: sessions.projectId, sessionId };
5833
5991
  return createEvidenceRecallStep({
5834
5992
  scope: scope2,
5835
5993
  resolveQuery,
5994
+ record,
5836
5995
  async retrieve(request) {
5837
5996
  const { turnId, terms, signal, maxReadBytes, maxCandidates, captureSessionEvidence } = request;
5838
5997
  assertOwner(turnId);
@@ -8199,22 +8358,43 @@ function createSavedAgentHistory(scope2) {
8199
8358
  };
8200
8359
  }
8201
8360
  __name(createSavedAgentHistory, "createSavedAgentHistory");
8361
+ var SAVED_AGENTS_KEY = "saved-agents";
8362
+ var SAVED_AGENTS_ROWS = `Each row gives the agent's session id, what it was asked to do, and its status. Rows are listed once, when they are new or their status changed; "omitted" counts older agents that are not listed.`;
8363
+ function recordedRows(entries) {
8364
+ const known = /* @__PURE__ */ new Map();
8365
+ for (const entry of entries) {
8366
+ const json = entry.split("\n").filter((line) => line.startsWith("{")).at(-1);
8367
+ if (!json) continue;
8368
+ try {
8369
+ const parsed = JSON.parse(json);
8370
+ for (const row of parsed.savedAgents ?? []) known.set(row.sessionId, row.status);
8371
+ } catch {
8372
+ }
8373
+ }
8374
+ return known;
8375
+ }
8376
+ __name(recordedRows, "recordedRows");
8202
8377
  function createSavedAgentsStep(history) {
8203
8378
  let snapshot;
8204
- return async ({ prepared, turnId, contextBudget }) => {
8379
+ return async ({ turnId, contextBudget, messages }) => {
8205
8380
  if (contextBudget && contextBudget.remainingTokens < MIN_REMAINING_TOKENS) return void 0;
8206
8381
  snapshot ??= history.list();
8207
8382
  const { agents, omitted } = await snapshot;
8208
8383
  const earlier = agents.filter((agent2) => agent2.parentTurnId !== turnId);
8209
8384
  if (earlier.length === 0) return void 0;
8210
- const rows = earlier.slice(0, MAX_PROMPTED_SAVED_AGENTS).map(({ sessionId, description, status }) => ({ sessionId, description, status }));
8211
- return {
8212
- system: [
8213
- prepared.system,
8214
- SAVED_AGENTS_GUIDANCE,
8215
- JSON.stringify({ savedAgents: rows, omitted: omitted + earlier.length - rows.length })
8216
- ].filter(Boolean).join("\n\n")
8217
- };
8385
+ const held = turnContextEntries(messages, SAVED_AGENTS_KEY);
8386
+ const known = recordedRows(held);
8387
+ const listed = earlier.slice(0, MAX_PROMPTED_SAVED_AGENTS);
8388
+ const rows = listed.map(({ sessionId, description, status }) => ({ sessionId, description, status })).filter((row) => known.get(row.sessionId) !== row.status);
8389
+ if (rows.length === 0) return void 0;
8390
+ const text2 = [
8391
+ held.length === 0 ? `${SAVED_AGENTS_GUIDANCE} ${SAVED_AGENTS_ROWS}` : void 0,
8392
+ JSON.stringify({
8393
+ savedAgents: rows,
8394
+ omitted: omitted + earlier.length - listed.length
8395
+ })
8396
+ ].filter(Boolean).join("\n");
8397
+ return { recordedContext: [{ key: SAVED_AGENTS_KEY, text: text2 }] };
8218
8398
  };
8219
8399
  }
8220
8400
  __name(createSavedAgentsStep, "createSavedAgentsStep");
@@ -12918,10 +13098,10 @@ function clipRequestContext(prompt, limit, kind) {
12918
13098
  __name(clipRequestContext, "clipRequestContext");
12919
13099
  async function createAgentSession(prefs, detected, options = {}) {
12920
13100
  if (options.palEnvironment) {
12921
- const { createPalAgentSession } = await import("./agent-session-MQEHBQXA.js");
13101
+ const { createPalAgentSession } = await import("./agent-session-LHOJDS75.js");
12922
13102
  return createPalAgentSession(prefs, detected, options);
12923
13103
  }
12924
- const { palAtWorkspace } = await import("./store-7TGN2BZW.js");
13104
+ const { palAtWorkspace } = await import("./store-QLG76DQG.js");
12925
13105
  if (palAtWorkspace(options.cwd ?? process.cwd()))
12926
13106
  throw new Error("This Pal requires its owned virtual computer. Open it with namzu pal chat.");
12927
13107
  const commandArguments = builtinCommandArguments();
@@ -13580,7 +13760,8 @@ async function createAgentSession(prefs, detected, options = {}) {
13580
13760
  if (!owner || owner.sessionId !== sessionId || owner.tenantId !== sessions.tenantId || owner.projectId !== sessions.projectId)
13581
13761
  throw new Error("The requesting turn no longer owns this conversation.");
13582
13762
  },
13583
- options.compaction?.resolveEvidenceQueries !== false
13763
+ options.compaction?.resolveEvidenceQueries !== false,
13764
+ true
13584
13765
  );
13585
13766
  evidenceRecallSteps.set(sessionId, step);
13586
13767
  }
@@ -14032,7 +14213,7 @@ async function createAgentSession(prefs, detected, options = {}) {
14032
14213
  );
14033
14214
  toolsets.push(options.toolLoading === "eager" ? monitorToolset : deferred(monitorToolset));
14034
14215
  }
14035
- const operatorPals = await import("./operator-tools-OZCXJX23.js");
14216
+ const operatorPals = await import("./operator-tools-ISZGHK3F.js");
14036
14217
  toolsets.push(
14037
14218
  readyWhen(
14038
14219
  toolset(
@@ -14240,7 +14421,7 @@ async function createAgentSession(prefs, detected, options = {}) {
14240
14421
  try {
14241
14422
  const routed = await routeModel(
14242
14423
  {
14243
- task: lastUserText(messages),
14424
+ task: lastPromptText(messages),
14244
14425
  config: routing,
14245
14426
  features: {
14246
14427
  conversationLength: messages.length,
@@ -14437,7 +14618,8 @@ async function createAgentSession(prefs, detected, options = {}) {
14437
14618
  ...options.memory?.recall === false ? [] : [
14438
14619
  createMemoryRecallStep({
14439
14620
  store: memoryStore,
14440
- identifierGrounding: options.memory?.identifierGrounding
14621
+ identifierGrounding: options.memory?.identifierGrounding,
14622
+ record: true
14441
14623
  })
14442
14624
  ],
14443
14625
  ...options.conversationSessions ? [createContextInventoryStep()] : [],
@@ -15145,7 +15327,6 @@ async function createAgentSession(prefs, detected, options = {}) {
15145
15327
  },
15146
15328
  { stable: stableEnvironment }
15147
15329
  );
15148
- const turnSnapshotPrompt = turnSnapshot ? composeTurnSnapshot(turnSnapshot) : null;
15149
15330
  const promptContributions = new PromptContributionRegistry();
15150
15331
  for (const contribution of pluginRuntime?.manager.promptContributions ?? []) {
15151
15332
  promptContributions.register(contribution);
@@ -15175,11 +15356,6 @@ async function createAgentSession(prefs, detected, options = {}) {
15175
15356
  placement: "context",
15176
15357
  render: /* @__PURE__ */ __name(() => projectGuidance, "render")
15177
15358
  });
15178
- promptContributions.register({
15179
- id: "namzu.turn-snapshot",
15180
- placement: "context",
15181
- render: /* @__PURE__ */ __name(() => turnSnapshotPrompt, "render")
15182
- });
15183
15359
  if (webCapability) promptContributions.register(webGuidanceContribution);
15184
15360
  const childOperatorNotices = options.ephemeral ? [] : await readChildOperatorNotices(paths, turnScope.sessionId);
15185
15361
  const hostContext = /* @__PURE__ */ __name(() => [
@@ -15282,7 +15458,7 @@ async function createAgentSession(prefs, detected, options = {}) {
15282
15458
  );
15283
15459
  lastSystemPromptText = systemPrompt;
15284
15460
  await announceSessionStart();
15285
- checkpoints.beginTurn(lastUserText(messages), turnId, {
15461
+ checkpoints.beginTurn(lastPromptText(messages), turnId, {
15286
15462
  promptOrdinal: Math.max(0, messages.filter((m) => m.role === "user").length - 1)
15287
15463
  });
15288
15464
  if (opts?.goalRound) {
@@ -15390,6 +15566,7 @@ async function createAgentSession(prefs, detected, options = {}) {
15390
15566
  promoteMemory: options.compaction?.consolidate ? void 0 : promoteMemory,
15391
15567
  prepareStep: [
15392
15568
  createTaskContextStep(turnTaskStore, turnScope.tenantId),
15569
+ createRepositorySnapshotStep(turnSnapshot),
15393
15570
  ...savedAgentsSteps(turnScope.sessionId),
15394
15571
  // A host-supplied resident step may select the request model.
15395
15572
  // Run it before every budgeted recall and memory admission.
@@ -15397,8 +15574,9 @@ async function createAgentSession(prefs, detected, options = {}) {
15397
15574
  ...options.memory?.recall === false ? [] : [
15398
15575
  createMemoryRecallStep({
15399
15576
  store: memoryStore,
15400
- query: lastUserText(messages),
15401
- identifierGrounding: options.memory?.identifierGrounding
15577
+ query: lastPromptText(messages),
15578
+ identifierGrounding: options.memory?.identifierGrounding,
15579
+ record: true
15402
15580
  })
15403
15581
  ],
15404
15582
  ...options.conversationSessions ? [createContextInventoryStep()] : [],
@@ -15856,14 +16034,6 @@ function conversationDrovePc(messages) {
15856
16034
  return false;
15857
16035
  }
15858
16036
  __name(conversationDrovePc, "conversationDrovePc");
15859
- function lastUserText(messages) {
15860
- for (let i = messages.length - 1; i >= 0; i--) {
15861
- const m = messages[i];
15862
- if (m?.role === "user" && typeof m.content === "string") return m.content;
15863
- }
15864
- return "";
15865
- }
15866
- __name(lastUserText, "lastUserText");
15867
16037
  function mintScope(projectId, sessionId) {
15868
16038
  return {
15869
16039
  sessionId: sessionId ?? generateSessionId(),
@@ -16647,7 +16817,12 @@ function truncate2(value, max) {
16647
16817
  __name(truncate2, "truncate");
16648
16818
  function pathSummary(summary, input, cwd) {
16649
16819
  const path = typeof input === "object" && input !== null ? input.path : void 0;
16650
- return typeof path === "string" && path.length > 0 && summary === path ? displayPath(path, cwd) : summary;
16820
+ if (typeof path !== "string" || path.length === 0) return summary;
16821
+ if (summary === path) return displayPath(path, cwd);
16822
+ if (summary.length > 0 && isSessionPlanPath(path) && path.startsWith(summary.replace(/…$/u, ""))) {
16823
+ return PLAN_FILE_LABEL;
16824
+ }
16825
+ return summary;
16651
16826
  }
16652
16827
  __name(pathSummary, "pathSummary");
16653
16828
  function diffContentLines(value) {
@@ -16851,8 +17026,9 @@ export {
16851
17026
  withDebugDetail,
16852
17027
  COMPACTING_LABEL,
16853
17028
  COMPACTED_HINT,
16854
- COMPACT_RESULT_TEXT,
16855
17029
  COMPACT_RESULT_HINT,
17030
+ estimateHistoryTokens,
17031
+ compactResultLine,
16856
17032
  NOTHING_TO_COMPACT_TEXT,
16857
17033
  COMPACT_NOT_SAVED_TEXT,
16858
17034
  compactionSummaryLines,
@@ -16867,6 +17043,7 @@ export {
16867
17043
  diffViewBody,
16868
17044
  plainDiffRows,
16869
17045
  spansText,
17046
+ isSessionPlanPath,
16870
17047
  displayPath,
16871
17048
  proposedBody,
16872
17049
  NOT_SHOWN_LINE,
@@ -16939,4 +17116,4 @@ export {
16939
17116
  RESULT_SUMMARY_WHOLE_MAX,
16940
17117
  resultSummaryLine
16941
17118
  };
16942
- //# sourceMappingURL=chunk-5UQSACPK.js.map
17119
+ //# sourceMappingURL=chunk-JEULHVUH.js.map