@namzu/cli 43.0.0 → 44.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (406) hide show
  1. package/CHANGELOG.md +131 -0
  2. package/dist/bin.js +1 -1
  3. package/dist/chunks/{acp-GKYFK7VQ.js → acp-JCGPYVIA.js} +40 -38
  4. package/dist/chunks/acp-JCGPYVIA.js.map +6 -0
  5. package/dist/chunks/{activity-command-TOTM3MOY.js → activity-command-UCUGH2LW.js} +12 -12
  6. package/dist/chunks/{add-4GRA6X5I.js → add-TNGQA6CH.js} +15 -14
  7. package/dist/chunks/add-TNGQA6CH.js.map +6 -0
  8. package/dist/chunks/{agent-KEI53I7S.js → agent-F7HY5T3U.js} +31 -29
  9. package/dist/chunks/agent-session-FFLSUP5P.js +60 -0
  10. package/dist/chunks/{archive-OOQMVBUH.js → archive-3L6VJWS4.js} +10 -10
  11. package/dist/chunks/{bin-main-L67SJQV2.js → bin-main-YEEDVZXH.js} +5 -5
  12. package/dist/chunks/{browser-GDIYUWKT.js → browser-UHJ43DUU.js} +6 -6
  13. package/dist/chunks/{chat-FUQOCA7Q.js → chat-DDPHHLQJ.js} +15 -15
  14. package/dist/chunks/{chunk-BHW43OKH.js → chunk-3A4UOMMU.js} +3 -3
  15. package/dist/chunks/{chunk-2R44UHEU.js → chunk-3LCJJT2F.js} +2 -2
  16. package/dist/chunks/chunk-3NJPNX6V.js +65 -0
  17. package/dist/chunks/chunk-3NJPNX6V.js.map +6 -0
  18. package/dist/chunks/{chunk-WQDMDSPW.js → chunk-3UK2GDVX.js} +4 -4
  19. package/dist/chunks/{chunk-2S4VEEVB.js → chunk-4LHT2QDO.js} +8 -8
  20. package/dist/chunks/{chunk-VWNLO4OM.js → chunk-4YJ4EI4X.js} +6 -4
  21. package/dist/chunks/chunk-4YJ4EI4X.js.map +6 -0
  22. package/dist/chunks/{chunk-V5YIGRUD.js → chunk-4Z4VYMTT.js} +5 -5
  23. package/dist/chunks/chunk-5PJIJTP2.js +157 -0
  24. package/dist/chunks/chunk-5PJIJTP2.js.map +6 -0
  25. package/dist/chunks/{chunk-FFXSL2SL.js → chunk-6WXVHAS6.js} +15 -3
  26. package/dist/chunks/chunk-6WXVHAS6.js.map +6 -0
  27. package/dist/chunks/{chunk-BNYTG2ZC.js → chunk-72ZSHKT7.js} +328 -18
  28. package/dist/chunks/chunk-72ZSHKT7.js.map +6 -0
  29. package/dist/chunks/{chunk-NJ6P3WPZ.js → chunk-76DOZYZP.js} +2 -2
  30. package/dist/chunks/{chunk-IJUCXVG5.js → chunk-7DYH6R67.js} +2 -2
  31. package/dist/chunks/{chunk-EM5AM5BR.js → chunk-7HRVTREO.js} +3 -3
  32. package/dist/chunks/{chunk-SM377CLQ.js → chunk-AH3DBEMR.js} +2 -2
  33. package/dist/chunks/{chunk-TZQT5JL3.js → chunk-B45X6IGD.js} +4 -4
  34. package/dist/chunks/{chunk-MJRLJDNK.js → chunk-B5KDTZYH.js} +2 -2
  35. package/dist/chunks/{chunk-NWW46AII.js → chunk-BKZW4DRY.js} +2 -2
  36. package/dist/chunks/{chunk-HAAL3DME.js → chunk-CFHRQGO2.js} +3 -3
  37. package/dist/chunks/{chunk-XZPLOQBA.js → chunk-CLVP63AB.js} +2 -2
  38. package/dist/chunks/{chunk-XV3FGIHS.js → chunk-DASSBULE.js} +235 -8
  39. package/dist/chunks/chunk-DASSBULE.js.map +6 -0
  40. package/dist/chunks/{chunk-M3RKXXZE.js → chunk-DYJY4COC.js} +3 -3
  41. package/dist/chunks/{chunk-NXM3BLL4.js → chunk-EBN4YPIN.js} +3 -3
  42. package/dist/chunks/{chunk-B4I264HC.js → chunk-EYYWIMVU.js} +6 -6
  43. package/dist/chunks/{chunk-752S5IP3.js → chunk-F37FVPVW.js} +59 -6
  44. package/dist/chunks/chunk-F37FVPVW.js.map +6 -0
  45. package/dist/chunks/{chunk-RHT52Z5X.js → chunk-GKMPPOXW.js} +2 -2
  46. package/dist/chunks/{chunk-GURZ2GEB.js → chunk-GX74LDJL.js} +3 -3
  47. package/dist/chunks/{chunk-OUGL6FI2.js → chunk-HI7UZRIV.js} +2 -2
  48. package/dist/chunks/{chunk-FTMTO72X.js → chunk-HSEIISLI.js} +2 -1
  49. package/dist/chunks/{chunk-LWPTVYRU.js → chunk-I47Q4G4X.js} +4 -4
  50. package/dist/chunks/{chunk-5QCBUBKO.js → chunk-IDU2KLLT.js} +4 -4
  51. package/dist/chunks/{chunk-DXTK4EMM.js → chunk-IYNTTEQA.js} +2 -2
  52. package/dist/chunks/{chunk-XGOM2KHV.js → chunk-J7PV6OOX.js} +6 -6
  53. package/dist/chunks/{chunk-Z3VSDOCX.js → chunk-JS4C7HNH.js} +207 -8
  54. package/dist/chunks/chunk-JS4C7HNH.js.map +6 -0
  55. package/dist/chunks/{chunk-I7FY5SK5.js → chunk-KEOBHC65.js} +11 -4
  56. package/dist/chunks/chunk-KEOBHC65.js.map +6 -0
  57. package/dist/chunks/{chunk-LAQTQNQE.js → chunk-MT4ONV77.js} +8 -8
  58. package/dist/chunks/{chunk-EADX2OKC.js → chunk-MZUVCANX.js} +2 -2
  59. package/dist/chunks/{chunk-TAAAO6PM.js → chunk-N4IDJ5V2.js} +2 -2
  60. package/dist/chunks/{chunk-DABNNT6R.js → chunk-NB5LGTUL.js} +7 -7
  61. package/dist/chunks/{chunk-6WK7YVAX.js → chunk-OAISYZM4.js} +125 -48
  62. package/dist/chunks/chunk-OAISYZM4.js.map +6 -0
  63. package/dist/chunks/{chunk-EDP5FDN4.js → chunk-OERIIND6.js} +7 -7
  64. package/dist/chunks/{chunk-GNG6HJIV.js → chunk-OKDDIWD7.js} +75646 -74040
  65. package/dist/chunks/chunk-OKDDIWD7.js.map +6 -0
  66. package/dist/chunks/{chunk-54TFQUPM.js → chunk-OZLMT5WB.js} +4 -4
  67. package/dist/chunks/{chunk-NOG4Z42R.js → chunk-PEJV6XTK.js} +3 -3
  68. package/dist/chunks/{chunk-TYMIKXOD.js → chunk-RBTQ5ZQU.js} +2 -2
  69. package/dist/chunks/{chunk-TIBFEO2R.js → chunk-RMBD3YZ5.js} +2 -2
  70. package/dist/chunks/{chunk-ODOM3I7B.js → chunk-SBKOTD2M.js} +302 -26
  71. package/dist/chunks/chunk-SBKOTD2M.js.map +6 -0
  72. package/dist/chunks/{chunk-VTU23NBS.js → chunk-SEYQW7MF.js} +6 -6
  73. package/dist/chunks/{chunk-3SQVE73V.js → chunk-SYOISB7S.js} +1400 -428
  74. package/dist/chunks/chunk-SYOISB7S.js.map +6 -0
  75. package/dist/chunks/{chunk-OIOA7BRC.js → chunk-TKCRF7DK.js} +5 -5
  76. package/dist/chunks/{chunk-PXSTTFI7.js → chunk-UEPYLY5U.js} +49 -23
  77. package/dist/chunks/chunk-UEPYLY5U.js.map +6 -0
  78. package/dist/chunks/{chunk-VNK6EA2D.js → chunk-UVSKCXL6.js} +2 -2
  79. package/dist/chunks/{chunk-P73IFAYM.js → chunk-UXDNVRJ5.js} +15 -15
  80. package/dist/chunks/chunk-UXDNVRJ5.js.map +6 -0
  81. package/dist/chunks/{chunk-2C5QF5ZM.js → chunk-UZYTWQYW.js} +2 -2
  82. package/dist/chunks/{chunk-6G3XZZRF.js → chunk-V2EGJD7W.js} +2 -2
  83. package/dist/chunks/{chunk-UPXD4LJ5.js → chunk-VKYIL6BJ.js} +6 -5
  84. package/dist/chunks/chunk-VKYIL6BJ.js.map +6 -0
  85. package/dist/chunks/{chunk-LCVRXUEV.js → chunk-VPZBVRXT.js} +2 -2
  86. package/dist/chunks/{chunk-AEZ7YTIJ.js → chunk-W6OOY44A.js} +3 -3
  87. package/dist/chunks/{chunk-4V2V2FMP.js → chunk-WEAIQEWJ.js} +2 -2
  88. package/dist/chunks/{chunk-W6ZZLT64.js → chunk-WG5LLHJX.js} +3 -3
  89. package/dist/chunks/{chunk-BBERAGUX.js → chunk-WIU25RLZ.js} +4 -4
  90. package/dist/chunks/{chunk-VRUEY647.js → chunk-WOY7SAUB.js} +2 -2
  91. package/dist/chunks/{chunk-7WQS7BP2.js → chunk-WQ72OU4F.js} +2 -2
  92. package/dist/chunks/{chunk-UB5YVQJM.js → chunk-WTPIGLX7.js} +4 -4
  93. package/dist/chunks/{chunk-VNFXDLKD.js → chunk-WUUZJCAA.js} +3 -3
  94. package/dist/chunks/{chunk-IY7XWRXE.js → chunk-XHCUNLST.js} +149 -17
  95. package/dist/chunks/chunk-XHCUNLST.js.map +6 -0
  96. package/dist/chunks/{chunk-OK4UNUNI.js → chunk-Y6HB4AJE.js} +2 -2
  97. package/dist/chunks/{chunk-CD5X75DB.js → chunk-YSGVHT54.js} +2 -2
  98. package/dist/chunks/{chunk-N4DS6G4I.js → chunk-ZNY5ZPBB.js} +13 -13
  99. package/dist/chunks/{chunk-W6Z7RNVL.js → chunk-ZRPLJYFM.js} +9 -9
  100. package/dist/chunks/cli-runtime-VRAUDAKZ.js +338 -0
  101. package/dist/chunks/cli-runtime-VRAUDAKZ.js.map +6 -0
  102. package/dist/chunks/{commands-4ZTQFX2X.js → commands-Q3FSPHGU.js} +5 -5
  103. package/dist/chunks/{crash-report-Y6U6CH73.js → crash-report-6XW44BV6.js} +6 -6
  104. package/dist/chunks/{dist-TKVIIUPJ.js → dist-4SPA7VSK.js} +2 -2
  105. package/dist/chunks/{dist-GTK2JZSU.js → dist-5DDSGOSA.js} +40 -4
  106. package/dist/chunks/dist-5DDSGOSA.js.map +6 -0
  107. package/dist/chunks/{dist-XP72U44M.js → dist-6XC3YARD.js} +2 -2
  108. package/dist/chunks/{dist-J36EH26G.js → dist-KNYBFHXB.js} +2 -2
  109. package/dist/chunks/{dist-3YHUITAK.js → dist-NG6RAO2C.js} +2 -2
  110. package/dist/chunks/{dist-ZNMZHP7A.js → dist-VEEXDONU.js} +2 -2
  111. package/dist/chunks/{dist-OKRQSUWC.js → dist-VYUROH2A.js} +2 -2
  112. package/dist/chunks/{doctor-WKZ7BGFC.js → doctor-ZDXK5W6E.js} +13 -13
  113. package/dist/chunks/{drain-VOM6IT3C.js → drain-NQLOKED3.js} +11 -11
  114. package/dist/chunks/{eval-7MDLH5UR.js → eval-A2G4KS62.js} +2 -2
  115. package/dist/chunks/{exec-YBTNNBSS.js → exec-EWGVFJNZ.js} +297 -89
  116. package/dist/chunks/exec-EWGVFJNZ.js.map +6 -0
  117. package/dist/chunks/github-FH7PPWVW.js +347 -0
  118. package/dist/chunks/github-FH7PPWVW.js.map +6 -0
  119. package/dist/chunks/{home-UID64VNR.js → home-5N3FSKF7.js} +3 -3
  120. package/dist/chunks/{host-queries-A3XQQHI4.js → host-queries-R2KVVFTJ.js} +16 -16
  121. package/dist/chunks/{learn-N2FNKNCW.js → learn-SAVZB4Q7.js} +14 -14
  122. package/dist/chunks/{learn-builtin-3SQNWE77.js → learn-builtin-ZWX7Q3X2.js} +17 -17
  123. package/dist/chunks/{lifecycle-TIEMDICJ.js → lifecycle-2RFARBGC.js} +24 -23
  124. package/dist/chunks/{list-HGGKMHPQ.js → list-D63Z2LT4.js} +11 -10
  125. package/dist/chunks/list-D63Z2LT4.js.map +6 -0
  126. package/dist/chunks/{live-JHNWMJIE.js → live-XC3V46W3.js} +12 -12
  127. package/dist/chunks/{login-CLFAZ2WB.js → login-NIX66V67.js} +8 -8
  128. package/dist/chunks/{logs-A5HZQ3XA.js → logs-LJSWQUT5.js} +4 -4
  129. package/dist/chunks/{mcp-V27XPHVU.js → mcp-OCEDFJA5.js} +16 -15
  130. package/dist/chunks/mcp-OCEDFJA5.js.map +6 -0
  131. package/dist/chunks/{message-command-HBTDJ6WS.js → message-command-THJZ4EIM.js} +37 -35
  132. package/dist/chunks/message-command-THJZ4EIM.js.map +6 -0
  133. package/dist/chunks/{operator-tools-7YJWXVYR.js → operator-tools-C7KZGWFJ.js} +13 -13
  134. package/dist/chunks/{output-schema-NEJ27MH6.js → output-schema-4BLF2AFQ.js} +3 -3
  135. package/dist/chunks/{pal-LX2FA7N2.js → pal-7IB6LZJX.js} +11 -11
  136. package/dist/chunks/{providers-XRDUL4OO.js → providers-NCGZXLFH.js} +6 -6
  137. package/dist/chunks/{resident-T6QB5MX7.js → resident-EODT4UTE.js} +25 -25
  138. package/dist/chunks/{resident-T6QB5MX7.js.map → resident-EODT4UTE.js.map} +1 -1
  139. package/dist/chunks/resume-2RX7TSTR.js +23 -0
  140. package/dist/chunks/{resume-command-VSFQAVVN.js → resume-command-YJ6LCKON.js} +4 -4
  141. package/dist/chunks/{schedule-GCBVV54F.js → schedule-LWY6AMC3.js} +8 -8
  142. package/dist/chunks/{service-UQPEAJKT.js → service-RQZF7NCJ.js} +23 -22
  143. package/dist/chunks/service-RQZF7NCJ.js.map +6 -0
  144. package/dist/chunks/session-step-YIL6LV2J.js +33 -0
  145. package/dist/chunks/{skills-LCTXKJCR.js → skills-3KYQHENX.js} +9 -9
  146. package/dist/chunks/{start-check-NAACA6IE.js → start-check-OKGZSWUG.js} +2 -2
  147. package/dist/chunks/{state-GNWJY3F2.js → state-ER7R4WEN.js} +2 -2
  148. package/dist/chunks/{store-7ZXMZ6ES.js → store-C654AJPG.js} +14 -10
  149. package/dist/chunks/{store-44ZZJVF3.js → store-EQQRW7NJ.js} +6 -6
  150. package/dist/chunks/{store-KGH5U7KF.js → store-HWGRIA5X.js} +4 -4
  151. package/dist/chunks/{tui-TNCMJCJJ.js → tui-UYHIDUPB.js} +1470 -774
  152. package/dist/chunks/tui-UYHIDUPB.js.map +6 -0
  153. package/dist/chunks/{upgrade-DU4I5ACF.js → upgrade-D6Q5EAMR.js} +6 -6
  154. package/dist/chunks/{worktree-XGJCKZQJ.js → worktree-UFFQMC2B.js} +12 -12
  155. package/dist/cli-runtime.d.ts +2 -0
  156. package/dist/cli-runtime.d.ts.map +1 -1
  157. package/dist/cli.d.ts.map +1 -1
  158. package/dist/commands/desktop-host.d.ts +3 -0
  159. package/dist/commands/desktop-host.d.ts.map +1 -1
  160. package/dist/commands/exec-flags.d.ts +16 -0
  161. package/dist/commands/exec-flags.d.ts.map +1 -1
  162. package/dist/commands/exec-json.d.ts +8 -1
  163. package/dist/commands/exec-json.d.ts.map +1 -1
  164. package/dist/commands/exec.d.ts.map +1 -1
  165. package/dist/commands/github.d.ts +20 -0
  166. package/dist/commands/github.d.ts.map +1 -0
  167. package/dist/commands/manifest.d.ts +1 -0
  168. package/dist/commands/manifest.d.ts.map +1 -1
  169. package/dist/commands/resident-flags.d.ts.map +1 -1
  170. package/dist/commands/resume.d.ts +4 -0
  171. package/dist/commands/resume.d.ts.map +1 -1
  172. package/dist/commands/stream-input.d.ts +4 -0
  173. package/dist/commands/stream-input.d.ts.map +1 -0
  174. package/dist/config/load.d.ts.map +1 -1
  175. package/dist/config/model-environment.d.ts +18 -0
  176. package/dist/config/model-environment.d.ts.map +1 -0
  177. package/dist/config/schema.d.ts +25 -2
  178. package/dist/config/schema.d.ts.map +1 -1
  179. package/dist/config/turn-guards.d.ts +2 -0
  180. package/dist/config/turn-guards.d.ts.map +1 -1
  181. package/dist/context/environment.d.ts +17 -4
  182. package/dist/context/environment.d.ts.map +1 -1
  183. package/dist/context/system-prompt.d.ts +2 -2
  184. package/dist/context/system-prompt.d.ts.map +1 -1
  185. package/dist/index.js +17 -17
  186. package/dist/integrations/github/pull-request.d.ts +64 -0
  187. package/dist/integrations/github/pull-request.d.ts.map +1 -0
  188. package/dist/integrations/github/workflows.d.ts +49 -0
  189. package/dist/integrations/github/workflows.d.ts.map +1 -0
  190. package/dist/integrations/mcp/elicitation.d.ts +40 -0
  191. package/dist/integrations/mcp/elicitation.d.ts.map +1 -0
  192. package/dist/integrations/mcp/output.d.ts +9 -0
  193. package/dist/integrations/mcp/output.d.ts.map +1 -0
  194. package/dist/integrations/mcp/person-commands.d.ts +18 -0
  195. package/dist/integrations/mcp/person-commands.d.ts.map +1 -0
  196. package/dist/integrations/mcp/person-session.d.ts +15 -0
  197. package/dist/integrations/mcp/person-session.d.ts.map +1 -0
  198. package/dist/integrations/mcp/prompts.d.ts +18 -0
  199. package/dist/integrations/mcp/prompts.d.ts.map +1 -0
  200. package/dist/integrations/mcp/servers.d.ts +33 -1
  201. package/dist/integrations/mcp/servers.d.ts.map +1 -1
  202. package/dist/integrations/peers/runtime.d.ts.map +1 -1
  203. package/dist/integrations/plugins/files.d.ts +43 -0
  204. package/dist/integrations/plugins/files.d.ts.map +1 -0
  205. package/dist/integrations/plugins/runtime.d.ts +5 -1
  206. package/dist/integrations/plugins/runtime.d.ts.map +1 -1
  207. package/dist/integrations/resident/runner-worker.js +22 -22
  208. package/dist/integrations/resident/session-step.d.ts.map +1 -1
  209. package/dist/integrations/sessions/side-question.d.ts +46 -0
  210. package/dist/integrations/sessions/side-question.d.ts.map +1 -0
  211. package/dist/integrations/sessions/store.d.ts +23 -1
  212. package/dist/integrations/sessions/store.d.ts.map +1 -1
  213. package/dist/integrations/subagents/agent-names.d.ts +21 -0
  214. package/dist/integrations/subagents/agent-names.d.ts.map +1 -0
  215. package/dist/integrations/subagents/definitions.d.ts +24 -2
  216. package/dist/integrations/subagents/definitions.d.ts.map +1 -1
  217. package/dist/integrations/subagents/runtime.d.ts +28 -0
  218. package/dist/integrations/subagents/runtime.d.ts.map +1 -1
  219. package/dist/integrations/telemetry/otlp-export.d.ts +67 -0
  220. package/dist/integrations/telemetry/otlp-export.d.ts.map +1 -0
  221. package/dist/permissions/auto-classifier.d.ts +12 -1
  222. package/dist/permissions/auto-classifier.d.ts.map +1 -1
  223. package/dist/permissions/delegated-mode.d.ts +25 -0
  224. package/dist/permissions/delegated-mode.d.ts.map +1 -0
  225. package/dist/permissions/live-mode.d.ts +5 -0
  226. package/dist/permissions/live-mode.d.ts.map +1 -1
  227. package/dist/permissions/live-rules.d.ts +12 -0
  228. package/dist/permissions/live-rules.d.ts.map +1 -0
  229. package/dist/permissions/path-rules.d.ts +43 -0
  230. package/dist/permissions/path-rules.d.ts.map +1 -0
  231. package/dist/permissions/rule-screen.d.ts +36 -0
  232. package/dist/permissions/rule-screen.d.ts.map +1 -0
  233. package/dist/permissions/rule-strings.d.ts +50 -0
  234. package/dist/permissions/rule-strings.d.ts.map +1 -0
  235. package/dist/permissions/rules.d.ts +7 -2
  236. package/dist/permissions/rules.d.ts.map +1 -1
  237. package/dist/permissions/session-allow.d.ts +2 -0
  238. package/dist/permissions/session-allow.d.ts.map +1 -1
  239. package/dist/reminders/changed-files.d.ts +24 -0
  240. package/dist/reminders/changed-files.d.ts.map +1 -0
  241. package/dist/reminders/frame.d.ts +1 -1
  242. package/dist/reminders/frame.d.ts.map +1 -1
  243. package/dist/reminders/index.d.ts +30 -0
  244. package/dist/reminders/index.d.ts.map +1 -1
  245. package/dist/reminders/mcp-instructions.d.ts +27 -0
  246. package/dist/reminders/mcp-instructions.d.ts.map +1 -0
  247. package/dist/reminders/memory-index.d.ts +28 -0
  248. package/dist/reminders/memory-index.d.ts.map +1 -0
  249. package/dist/reminders/model.d.ts +9 -0
  250. package/dist/reminders/model.d.ts.map +1 -0
  251. package/dist/reminders/skills.d.ts +27 -0
  252. package/dist/reminders/skills.d.ts.map +1 -0
  253. package/dist/skills/catalog.d.ts.map +1 -1
  254. package/dist/skills/store.d.ts.map +1 -1
  255. package/dist/tui/App.d.ts.map +1 -1
  256. package/dist/tui/Composer.d.ts +4 -1
  257. package/dist/tui/Composer.d.ts.map +1 -1
  258. package/dist/tui/LiveActivity.d.ts.map +1 -1
  259. package/dist/tui/ResumePicker.d.ts.map +1 -1
  260. package/dist/tui/agent.d.ts +27 -1
  261. package/dist/tui/agent.d.ts.map +1 -1
  262. package/dist/tui/mention-file.d.ts +10 -0
  263. package/dist/tui/mention-file.d.ts.map +1 -0
  264. package/dist/tui/mention-sources.d.ts +31 -0
  265. package/dist/tui/mention-sources.d.ts.map +1 -0
  266. package/dist/tui/mentions.d.ts +55 -1
  267. package/dist/tui/mentions.d.ts.map +1 -1
  268. package/dist/tui/plugin-view.d.ts.map +1 -1
  269. package/dist/tui/resume-empty.d.ts +7 -0
  270. package/dist/tui/resume-empty.d.ts.map +1 -1
  271. package/dist/tui/resume-picker-state.d.ts +3 -0
  272. package/dist/tui/resume-picker-state.d.ts.map +1 -1
  273. package/dist/tui/slashCommands.d.ts +16 -0
  274. package/dist/tui/slashCommands.d.ts.map +1 -1
  275. package/dist/tui/thinking-label.d.ts +24 -0
  276. package/dist/tui/thinking-label.d.ts.map +1 -0
  277. package/dist/tui/types.d.ts +4 -0
  278. package/dist/tui/types.d.ts.map +1 -1
  279. package/dist/user-commands/store.d.ts +10 -1
  280. package/dist/user-commands/store.d.ts.map +1 -1
  281. package/package.json +7 -6
  282. package/dist/chunks/acp-GKYFK7VQ.js.map +0 -6
  283. package/dist/chunks/add-4GRA6X5I.js.map +0 -6
  284. package/dist/chunks/agent-session-4IF5H4YO.js +0 -58
  285. package/dist/chunks/chunk-3SQVE73V.js.map +0 -6
  286. package/dist/chunks/chunk-6WK7YVAX.js.map +0 -6
  287. package/dist/chunks/chunk-752S5IP3.js.map +0 -6
  288. package/dist/chunks/chunk-BNYTG2ZC.js.map +0 -6
  289. package/dist/chunks/chunk-FFXSL2SL.js.map +0 -6
  290. package/dist/chunks/chunk-GNG6HJIV.js.map +0 -6
  291. package/dist/chunks/chunk-I7FY5SK5.js.map +0 -6
  292. package/dist/chunks/chunk-IY7XWRXE.js.map +0 -6
  293. package/dist/chunks/chunk-LXB3S4IC.js +0 -19
  294. package/dist/chunks/chunk-LXB3S4IC.js.map +0 -6
  295. package/dist/chunks/chunk-ODOM3I7B.js.map +0 -6
  296. package/dist/chunks/chunk-P73IFAYM.js.map +0 -6
  297. package/dist/chunks/chunk-PXSTTFI7.js.map +0 -6
  298. package/dist/chunks/chunk-UPXD4LJ5.js.map +0 -6
  299. package/dist/chunks/chunk-VWNLO4OM.js.map +0 -6
  300. package/dist/chunks/chunk-XV3FGIHS.js.map +0 -6
  301. package/dist/chunks/chunk-Z3VSDOCX.js.map +0 -6
  302. package/dist/chunks/cli-runtime-Y6RGQSMF.js +0 -186
  303. package/dist/chunks/cli-runtime-Y6RGQSMF.js.map +0 -6
  304. package/dist/chunks/dist-GTK2JZSU.js.map +0 -6
  305. package/dist/chunks/exec-YBTNNBSS.js.map +0 -6
  306. package/dist/chunks/list-HGGKMHPQ.js.map +0 -6
  307. package/dist/chunks/mcp-V27XPHVU.js.map +0 -6
  308. package/dist/chunks/message-command-HBTDJ6WS.js.map +0 -6
  309. package/dist/chunks/resume-YPKHTYLO.js +0 -23
  310. package/dist/chunks/service-UQPEAJKT.js.map +0 -6
  311. package/dist/chunks/session-step-OKCO6S7R.js +0 -33
  312. package/dist/chunks/tui-TNCMJCJJ.js.map +0 -6
  313. /package/dist/chunks/{activity-command-TOTM3MOY.js.map → activity-command-UCUGH2LW.js.map} +0 -0
  314. /package/dist/chunks/{agent-KEI53I7S.js.map → agent-F7HY5T3U.js.map} +0 -0
  315. /package/dist/chunks/{agent-session-4IF5H4YO.js.map → agent-session-FFLSUP5P.js.map} +0 -0
  316. /package/dist/chunks/{archive-OOQMVBUH.js.map → archive-3L6VJWS4.js.map} +0 -0
  317. /package/dist/chunks/{bin-main-L67SJQV2.js.map → bin-main-YEEDVZXH.js.map} +0 -0
  318. /package/dist/chunks/{browser-GDIYUWKT.js.map → browser-UHJ43DUU.js.map} +0 -0
  319. /package/dist/chunks/{chat-FUQOCA7Q.js.map → chat-DDPHHLQJ.js.map} +0 -0
  320. /package/dist/chunks/{chunk-BHW43OKH.js.map → chunk-3A4UOMMU.js.map} +0 -0
  321. /package/dist/chunks/{chunk-2R44UHEU.js.map → chunk-3LCJJT2F.js.map} +0 -0
  322. /package/dist/chunks/{chunk-WQDMDSPW.js.map → chunk-3UK2GDVX.js.map} +0 -0
  323. /package/dist/chunks/{chunk-2S4VEEVB.js.map → chunk-4LHT2QDO.js.map} +0 -0
  324. /package/dist/chunks/{chunk-V5YIGRUD.js.map → chunk-4Z4VYMTT.js.map} +0 -0
  325. /package/dist/chunks/{chunk-NJ6P3WPZ.js.map → chunk-76DOZYZP.js.map} +0 -0
  326. /package/dist/chunks/{chunk-IJUCXVG5.js.map → chunk-7DYH6R67.js.map} +0 -0
  327. /package/dist/chunks/{chunk-EM5AM5BR.js.map → chunk-7HRVTREO.js.map} +0 -0
  328. /package/dist/chunks/{chunk-SM377CLQ.js.map → chunk-AH3DBEMR.js.map} +0 -0
  329. /package/dist/chunks/{chunk-TZQT5JL3.js.map → chunk-B45X6IGD.js.map} +0 -0
  330. /package/dist/chunks/{chunk-MJRLJDNK.js.map → chunk-B5KDTZYH.js.map} +0 -0
  331. /package/dist/chunks/{chunk-NWW46AII.js.map → chunk-BKZW4DRY.js.map} +0 -0
  332. /package/dist/chunks/{chunk-HAAL3DME.js.map → chunk-CFHRQGO2.js.map} +0 -0
  333. /package/dist/chunks/{chunk-XZPLOQBA.js.map → chunk-CLVP63AB.js.map} +0 -0
  334. /package/dist/chunks/{chunk-M3RKXXZE.js.map → chunk-DYJY4COC.js.map} +0 -0
  335. /package/dist/chunks/{chunk-NXM3BLL4.js.map → chunk-EBN4YPIN.js.map} +0 -0
  336. /package/dist/chunks/{chunk-B4I264HC.js.map → chunk-EYYWIMVU.js.map} +0 -0
  337. /package/dist/chunks/{chunk-RHT52Z5X.js.map → chunk-GKMPPOXW.js.map} +0 -0
  338. /package/dist/chunks/{chunk-GURZ2GEB.js.map → chunk-GX74LDJL.js.map} +0 -0
  339. /package/dist/chunks/{chunk-OUGL6FI2.js.map → chunk-HI7UZRIV.js.map} +0 -0
  340. /package/dist/chunks/{chunk-FTMTO72X.js.map → chunk-HSEIISLI.js.map} +0 -0
  341. /package/dist/chunks/{chunk-LWPTVYRU.js.map → chunk-I47Q4G4X.js.map} +0 -0
  342. /package/dist/chunks/{chunk-5QCBUBKO.js.map → chunk-IDU2KLLT.js.map} +0 -0
  343. /package/dist/chunks/{chunk-DXTK4EMM.js.map → chunk-IYNTTEQA.js.map} +0 -0
  344. /package/dist/chunks/{chunk-XGOM2KHV.js.map → chunk-J7PV6OOX.js.map} +0 -0
  345. /package/dist/chunks/{chunk-LAQTQNQE.js.map → chunk-MT4ONV77.js.map} +0 -0
  346. /package/dist/chunks/{chunk-EADX2OKC.js.map → chunk-MZUVCANX.js.map} +0 -0
  347. /package/dist/chunks/{chunk-TAAAO6PM.js.map → chunk-N4IDJ5V2.js.map} +0 -0
  348. /package/dist/chunks/{chunk-DABNNT6R.js.map → chunk-NB5LGTUL.js.map} +0 -0
  349. /package/dist/chunks/{chunk-EDP5FDN4.js.map → chunk-OERIIND6.js.map} +0 -0
  350. /package/dist/chunks/{chunk-54TFQUPM.js.map → chunk-OZLMT5WB.js.map} +0 -0
  351. /package/dist/chunks/{chunk-NOG4Z42R.js.map → chunk-PEJV6XTK.js.map} +0 -0
  352. /package/dist/chunks/{chunk-TYMIKXOD.js.map → chunk-RBTQ5ZQU.js.map} +0 -0
  353. /package/dist/chunks/{chunk-TIBFEO2R.js.map → chunk-RMBD3YZ5.js.map} +0 -0
  354. /package/dist/chunks/{chunk-VTU23NBS.js.map → chunk-SEYQW7MF.js.map} +0 -0
  355. /package/dist/chunks/{chunk-OIOA7BRC.js.map → chunk-TKCRF7DK.js.map} +0 -0
  356. /package/dist/chunks/{chunk-VNK6EA2D.js.map → chunk-UVSKCXL6.js.map} +0 -0
  357. /package/dist/chunks/{chunk-2C5QF5ZM.js.map → chunk-UZYTWQYW.js.map} +0 -0
  358. /package/dist/chunks/{chunk-6G3XZZRF.js.map → chunk-V2EGJD7W.js.map} +0 -0
  359. /package/dist/chunks/{chunk-LCVRXUEV.js.map → chunk-VPZBVRXT.js.map} +0 -0
  360. /package/dist/chunks/{chunk-AEZ7YTIJ.js.map → chunk-W6OOY44A.js.map} +0 -0
  361. /package/dist/chunks/{chunk-4V2V2FMP.js.map → chunk-WEAIQEWJ.js.map} +0 -0
  362. /package/dist/chunks/{chunk-W6ZZLT64.js.map → chunk-WG5LLHJX.js.map} +0 -0
  363. /package/dist/chunks/{chunk-BBERAGUX.js.map → chunk-WIU25RLZ.js.map} +0 -0
  364. /package/dist/chunks/{chunk-VRUEY647.js.map → chunk-WOY7SAUB.js.map} +0 -0
  365. /package/dist/chunks/{chunk-7WQS7BP2.js.map → chunk-WQ72OU4F.js.map} +0 -0
  366. /package/dist/chunks/{chunk-UB5YVQJM.js.map → chunk-WTPIGLX7.js.map} +0 -0
  367. /package/dist/chunks/{chunk-VNFXDLKD.js.map → chunk-WUUZJCAA.js.map} +0 -0
  368. /package/dist/chunks/{chunk-OK4UNUNI.js.map → chunk-Y6HB4AJE.js.map} +0 -0
  369. /package/dist/chunks/{chunk-CD5X75DB.js.map → chunk-YSGVHT54.js.map} +0 -0
  370. /package/dist/chunks/{chunk-N4DS6G4I.js.map → chunk-ZNY5ZPBB.js.map} +0 -0
  371. /package/dist/chunks/{chunk-W6Z7RNVL.js.map → chunk-ZRPLJYFM.js.map} +0 -0
  372. /package/dist/chunks/{commands-4ZTQFX2X.js.map → commands-Q3FSPHGU.js.map} +0 -0
  373. /package/dist/chunks/{crash-report-Y6U6CH73.js.map → crash-report-6XW44BV6.js.map} +0 -0
  374. /package/dist/chunks/{dist-TKVIIUPJ.js.map → dist-4SPA7VSK.js.map} +0 -0
  375. /package/dist/chunks/{dist-XP72U44M.js.map → dist-6XC3YARD.js.map} +0 -0
  376. /package/dist/chunks/{dist-J36EH26G.js.map → dist-KNYBFHXB.js.map} +0 -0
  377. /package/dist/chunks/{dist-3YHUITAK.js.map → dist-NG6RAO2C.js.map} +0 -0
  378. /package/dist/chunks/{dist-ZNMZHP7A.js.map → dist-VEEXDONU.js.map} +0 -0
  379. /package/dist/chunks/{dist-OKRQSUWC.js.map → dist-VYUROH2A.js.map} +0 -0
  380. /package/dist/chunks/{doctor-WKZ7BGFC.js.map → doctor-ZDXK5W6E.js.map} +0 -0
  381. /package/dist/chunks/{drain-VOM6IT3C.js.map → drain-NQLOKED3.js.map} +0 -0
  382. /package/dist/chunks/{eval-7MDLH5UR.js.map → eval-A2G4KS62.js.map} +0 -0
  383. /package/dist/chunks/{home-UID64VNR.js.map → home-5N3FSKF7.js.map} +0 -0
  384. /package/dist/chunks/{host-queries-A3XQQHI4.js.map → host-queries-R2KVVFTJ.js.map} +0 -0
  385. /package/dist/chunks/{learn-N2FNKNCW.js.map → learn-SAVZB4Q7.js.map} +0 -0
  386. /package/dist/chunks/{learn-builtin-3SQNWE77.js.map → learn-builtin-ZWX7Q3X2.js.map} +0 -0
  387. /package/dist/chunks/{lifecycle-TIEMDICJ.js.map → lifecycle-2RFARBGC.js.map} +0 -0
  388. /package/dist/chunks/{live-JHNWMJIE.js.map → live-XC3V46W3.js.map} +0 -0
  389. /package/dist/chunks/{login-CLFAZ2WB.js.map → login-NIX66V67.js.map} +0 -0
  390. /package/dist/chunks/{logs-A5HZQ3XA.js.map → logs-LJSWQUT5.js.map} +0 -0
  391. /package/dist/chunks/{operator-tools-7YJWXVYR.js.map → operator-tools-C7KZGWFJ.js.map} +0 -0
  392. /package/dist/chunks/{output-schema-NEJ27MH6.js.map → output-schema-4BLF2AFQ.js.map} +0 -0
  393. /package/dist/chunks/{pal-LX2FA7N2.js.map → pal-7IB6LZJX.js.map} +0 -0
  394. /package/dist/chunks/{providers-XRDUL4OO.js.map → providers-NCGZXLFH.js.map} +0 -0
  395. /package/dist/chunks/{resume-YPKHTYLO.js.map → resume-2RX7TSTR.js.map} +0 -0
  396. /package/dist/chunks/{resume-command-VSFQAVVN.js.map → resume-command-YJ6LCKON.js.map} +0 -0
  397. /package/dist/chunks/{schedule-GCBVV54F.js.map → schedule-LWY6AMC3.js.map} +0 -0
  398. /package/dist/chunks/{session-step-OKCO6S7R.js.map → session-step-YIL6LV2J.js.map} +0 -0
  399. /package/dist/chunks/{skills-LCTXKJCR.js.map → skills-3KYQHENX.js.map} +0 -0
  400. /package/dist/chunks/{start-check-NAACA6IE.js.map → start-check-OKGZSWUG.js.map} +0 -0
  401. /package/dist/chunks/{state-GNWJY3F2.js.map → state-ER7R4WEN.js.map} +0 -0
  402. /package/dist/chunks/{store-44ZZJVF3.js.map → store-C654AJPG.js.map} +0 -0
  403. /package/dist/chunks/{store-7ZXMZ6ES.js.map → store-EQQRW7NJ.js.map} +0 -0
  404. /package/dist/chunks/{store-KGH5U7KF.js.map → store-HWGRIA5X.js.map} +0 -0
  405. /package/dist/chunks/{upgrade-DU4I5ACF.js.map → upgrade-D6Q5EAMR.js.map} +0 -0
  406. /package/dist/chunks/{worktree-XGJCKZQJ.js.map → worktree-UFFQMC2B.js.map} +0 -0
@@ -2,14 +2,14 @@ import { createRequire as __namzuCreateRequire } from 'node:module';
2
2
  const require = __namzuCreateRequire(import.meta.url);
3
3
  import {
4
4
  trustDir
5
- } from "./chunk-CD5X75DB.js";
5
+ } from "./chunk-YSGVHT54.js";
6
6
  import {
7
7
  restrictToOwner
8
- } from "./chunk-2R44UHEU.js";
8
+ } from "./chunk-3LCJJT2F.js";
9
9
  import {
10
10
  DiskPalStore,
11
11
  resolveNamzuHome
12
- } from "./chunk-GNG6HJIV.js";
12
+ } from "./chunk-OKDDIWD7.js";
13
13
  import {
14
14
  __name
15
15
  } from "./chunk-76FLAFCG.js";
@@ -124,4 +124,4 @@ export {
124
124
  deletePal,
125
125
  palAtWorkspace
126
126
  };
127
- //# sourceMappingURL=chunk-54TFQUPM.js.map
127
+ //# sourceMappingURL=chunk-OZLMT5WB.js.map
@@ -5,10 +5,10 @@ import {
5
5
  } from "./chunk-KONYGNG6.js";
6
6
  import {
7
7
  restrictToOwner
8
- } from "./chunk-2R44UHEU.js";
8
+ } from "./chunk-3LCJJT2F.js";
9
9
  import {
10
10
  resolveNamzuHome
11
- } from "./chunk-GNG6HJIV.js";
11
+ } from "./chunk-OKDDIWD7.js";
12
12
  import {
13
13
  __name,
14
14
  __toESM
@@ -137,4 +137,4 @@ export {
137
137
  setUserConfigValue,
138
138
  deleteUserConfigValue
139
139
  };
140
- //# sourceMappingURL=chunk-NOG4Z42R.js.map
140
+ //# sourceMappingURL=chunk-PEJV6XTK.js.map
@@ -2,7 +2,7 @@ import { createRequire as __namzuCreateRequire } from 'node:module';
2
2
  const require = __namzuCreateRequire(import.meta.url);
3
3
  import {
4
4
  isTrusted
5
- } from "./chunk-CD5X75DB.js";
5
+ } from "./chunk-YSGVHT54.js";
6
6
  import {
7
7
  canonicalProjectPath
8
8
  } from "./chunk-JORONMD3.js";
@@ -43,4 +43,4 @@ __name(decideHeadlessTrust, "decideHeadlessTrust");
43
43
  export {
44
44
  decideHeadlessTrust
45
45
  };
46
- //# sourceMappingURL=chunk-TYMIKXOD.js.map
46
+ //# sourceMappingURL=chunk-RBTQ5ZQU.js.map
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk-XPS3W7FC.js";
12
12
  import {
13
13
  namzuHomePath
14
- } from "./chunk-IJUCXVG5.js";
14
+ } from "./chunk-7DYH6R67.js";
15
15
  import {
16
16
  __name
17
17
  } from "./chunk-76FLAFCG.js";
@@ -72,4 +72,4 @@ export {
72
72
  writeCrashLog,
73
73
  reportCrash
74
74
  };
75
- //# sourceMappingURL=chunk-TIBFEO2R.js.map
75
+ //# sourceMappingURL=chunk-RMBD3YZ5.js.map
@@ -11,16 +11,20 @@ import {
11
11
  homePath
12
12
  } from "./chunk-XPS3W7FC.js";
13
13
  import {
14
+ bindPermissionTableToSource,
14
15
  mergePermissionSettings,
15
16
  mergePermissionTables,
16
17
  permissionSettingsProblem,
17
18
  splitPermissionsTable
18
- } from "./chunk-Z3VSDOCX.js";
19
+ } from "./chunk-JS4C7HNH.js";
19
20
  import {
20
21
  McpServerFileError,
21
22
  PROJECT_MCP_FILE,
22
23
  readMcpServerFile
23
24
  } from "./chunk-SIG7WHBU.js";
25
+ import {
26
+ positiveTokenCount
27
+ } from "./chunk-3NJPNX6V.js";
24
28
  import {
25
29
  canonicalProjectPath
26
30
  } from "./chunk-JORONMD3.js";
@@ -36,7 +40,7 @@ import {
36
40
  resolveNamzuHome,
37
41
  toolResultCorrespondenceGuardrail,
38
42
  toolResultInjectionGuardrail
39
- } from "./chunk-GNG6HJIV.js";
43
+ } from "./chunk-OKDDIWD7.js";
40
44
  import {
41
45
  __name,
42
46
  __toESM
@@ -564,6 +568,106 @@ import { readFileSync as readFileSync2 } from "node:fs";
564
568
  import { basename, join as join2, resolve as resolve2 } from "node:path";
565
569
  var import_yaml = __toESM(require_dist(), 1);
566
570
 
571
+ // src/permissions/rule-strings.ts
572
+ var RULE_LIST_KEYS = ["allow", "ask", "deny"];
573
+ function isRuleListKey(key) {
574
+ return RULE_LIST_KEYS.includes(key);
575
+ }
576
+ __name(isRuleListKey, "isRuleListKey");
577
+ function stricter(a, b) {
578
+ const order = ["deny", "ask", "allow"];
579
+ return order.indexOf(a) <= order.indexOf(b) ? a : b;
580
+ }
581
+ __name(stricter, "stricter");
582
+ function toolNameOf(written) {
583
+ if (written.startsWith("mcp__") || /^[a-z]/.test(written)) return written;
584
+ return written.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase();
585
+ }
586
+ __name(toolNameOf, "toolNameOf");
587
+ function parseRuleString(entry) {
588
+ const text = entry.trim();
589
+ if (!text) return void 0;
590
+ const open = text.search(/(?<!\\)\(/);
591
+ if (open === -1) {
592
+ return /[()]/.test(text.replaceAll("\\(", "").replaceAll("\\)", "")) ? void 0 : { tool: toolNameOf(text) };
593
+ }
594
+ const name = text.slice(0, open);
595
+ if (!name || /[()\s]/.test(name) || !text.endsWith(")") || text.endsWith("\\)")) return void 0;
596
+ const raw = text.slice(open + 1, -1);
597
+ if (/(?<!\\)[()]/.test(raw)) return void 0;
598
+ const specifier = raw.replaceAll("\\(", "(").replaceAll("\\)", ")");
599
+ const tool = toolNameOf(name);
600
+ return specifier === "" || specifier === "*" ? { tool } : { tool, specifier };
601
+ }
602
+ __name(parseRuleString, "parseRuleString");
603
+ function patternOf(tool, specifier, effect) {
604
+ let pattern = specifier;
605
+ if (pattern.endsWith(":*")) pattern = `${pattern.slice(0, -2)} *`;
606
+ if (tool === "web_fetch" && pattern.startsWith("domain:")) {
607
+ const host = pattern.slice("domain:".length);
608
+ return effect === "allow" ? `*://${host}/*` : `*://${host}*`;
609
+ }
610
+ return pattern;
611
+ }
612
+ __name(patternOf, "patternOf");
613
+ function foldRuleLists(table) {
614
+ const lists = RULE_LIST_KEYS.filter((key) => Array.isArray(table[key]));
615
+ if (lists.length === 0) return { table: { ...table } };
616
+ const out = {};
617
+ for (const [key, value] of Object.entries(table)) {
618
+ if (!(isRuleListKey(key) && Array.isArray(value))) out[key] = value;
619
+ }
620
+ const wholeTool = /* @__PURE__ */ new Map();
621
+ const patterns = /* @__PURE__ */ new Map();
622
+ for (const key of lists) {
623
+ const entries = table[key];
624
+ for (let i = 0; i < entries.length; i++) {
625
+ const entry = entries[i];
626
+ const parsed = typeof entry === "string" ? parseRuleString(entry) : void 0;
627
+ if (!parsed) {
628
+ return {
629
+ table: out,
630
+ problem: {
631
+ path: [key, String(i)],
632
+ message: `${JSON.stringify(entry)} is not a rule; write a tool name, or a tool name with a specifier in parentheses, such as Bash(git status *)`
633
+ }
634
+ };
635
+ }
636
+ if (parsed.specifier === void 0) {
637
+ const had2 = wholeTool.get(parsed.tool);
638
+ wholeTool.set(parsed.tool, had2 ? stricter(had2, key) : key);
639
+ continue;
640
+ }
641
+ const forTool = patterns.get(parsed.tool) ?? /* @__PURE__ */ new Map();
642
+ const pattern = patternOf(parsed.tool, parsed.specifier, key);
643
+ const had = forTool.get(pattern);
644
+ forTool.set(pattern, had ? stricter(had, key) : key);
645
+ patterns.set(parsed.tool, forTool);
646
+ }
647
+ }
648
+ const tools = /* @__PURE__ */ new Set([...wholeTool.keys(), ...patterns.keys()]);
649
+ for (const tool of tools) {
650
+ const existing = out[tool];
651
+ const whole = wholeTool.get(tool);
652
+ const found = patterns.get(tool);
653
+ if (!found && !(existing && typeof existing === "object")) {
654
+ const prior = typeof existing === "string" ? existing : void 0;
655
+ if (whole) out[tool] = prior ? stricter(prior, whole) : whole;
656
+ continue;
657
+ }
658
+ const merged = existing && typeof existing === "object" ? { ...existing } : {};
659
+ if (typeof existing === "string") merged["*"] = existing;
660
+ if (whole) merged["*"] = merged["*"] ? stricter(merged["*"], whole) : whole;
661
+ for (const [pattern, effect] of found ?? []) {
662
+ const had = merged[pattern];
663
+ merged[pattern] = had ? stricter(had, effect) : effect;
664
+ }
665
+ out[tool] = merged;
666
+ }
667
+ return { table: out };
668
+ }
669
+ __name(foldRuleLists, "foldRuleLists");
670
+
567
671
  // src/tui/theme-palettes.ts
568
672
  var THEME_NAMES = [
569
673
  "dark",
@@ -1085,7 +1189,11 @@ function readPermissionLayers(opts = {}) {
1085
1189
  layers.push({
1086
1190
  source,
1087
1191
  path,
1088
- permissions: splitPermissionsTable(config.permissions ?? {}, "operator", source).rules,
1192
+ permissions: bindPermissionTableToSource(
1193
+ splitPermissionsTable(config.permissions ?? {}, "operator", source).rules,
1194
+ path,
1195
+ source === "local-file"
1196
+ ),
1089
1197
  ...browserDenies.length > 0 ? { browserDenies } : {}
1090
1198
  });
1091
1199
  }
@@ -1285,14 +1393,21 @@ var SKILLS_CONFIG_KEYS = [
1285
1393
  "suggest",
1286
1394
  "suggestMinToolCalls"
1287
1395
  ];
1288
- var HOOK_ENTRY_KEYS = [
1289
- "command",
1396
+ var HOOK_COMMON_KEYS = [
1397
+ "type",
1290
1398
  "matcher",
1291
1399
  "timeoutMs",
1292
1400
  "if",
1293
1401
  "once",
1294
- "statusMessage"
1402
+ "statusMessage",
1403
+ "onFailure"
1295
1404
  ];
1405
+ var HOOK_KIND_KEYS = {
1406
+ command: ["command", "args", "async"],
1407
+ http: ["url", "headers", "allowedEnvVars"],
1408
+ prompt: ["prompt"]
1409
+ };
1410
+ var HOOK_ENTRY_KEYS = [...HOOK_COMMON_KEYS, ...HOOK_KIND_KEYS.command];
1296
1411
  var CONFIG_READERS = {
1297
1412
  format: /* @__PURE__ */ __name((v, context) => {
1298
1413
  if (typeof v === "string" && isFormatName(v)) return v;
@@ -1376,7 +1491,11 @@ var CONFIG_READERS = {
1376
1491
  }
1377
1492
  const problem = permissionSettingsProblem(v);
1378
1493
  if (problem) return invalidConfigValue(context, problem.path, problem.message);
1379
- return v;
1494
+ const folded = foldRuleLists(v);
1495
+ if (folded.problem) {
1496
+ return invalidConfigValue(context, folded.problem.path, folded.problem.message);
1497
+ }
1498
+ return folded.table;
1380
1499
  }, "permissions"),
1381
1500
  // Shape only, like `permissions` and for the same reason: per-entry
1382
1501
  // validation belongs to `verifyPermissionChecks`, which reports a bad
@@ -1449,7 +1568,7 @@ var CONFIG_READERS = {
1449
1568
  if (!isConfigMapping(v)) return invalidConfigValue(context, [], "must be a mapping");
1450
1569
  const raw = v;
1451
1570
  for (const key of Object.keys(v)) {
1452
- if (key !== "strategy" && key !== "contextWindowTokens" && key !== "consolidate" && key !== "recallEvidence" && key !== "resolveEvidenceQueries" && key !== "retainedToolPreviewChars" && key !== "deduplicateObservations" && key !== "idleCompaction" && key !== "idleCompactionMinTokens" && key !== "promptCacheTtl" && key !== "modelSummary") {
1571
+ if (key !== "strategy" && key !== "autoCompactWindowTokens" && key !== "contextWindowTokens" && key !== "consolidate" && key !== "recallEvidence" && key !== "resolveEvidenceQueries" && key !== "retainedToolPreviewChars" && key !== "deduplicateObservations" && key !== "idleCompaction" && key !== "idleCompactionMinTokens" && key !== "promptCacheTtl" && key !== "modelSummary") {
1453
1572
  return invalidConfigValue(context, [key], "is not a compaction key");
1454
1573
  }
1455
1574
  }
@@ -1485,11 +1604,18 @@ var CONFIG_READERS = {
1485
1604
  if (raw.strategy !== void 0 && raw.strategy !== "structured" && raw.strategy !== "salience") {
1486
1605
  return invalidConfigValue(context, ["strategy"], "must be `structured` or `salience`");
1487
1606
  }
1607
+ if (raw.autoCompactWindowTokens !== void 0 && (typeof raw.autoCompactWindowTokens !== "number" || !Number.isSafeInteger(raw.autoCompactWindowTokens) || raw.autoCompactWindowTokens <= 0))
1608
+ return invalidConfigValue(
1609
+ context,
1610
+ ["autoCompactWindowTokens"],
1611
+ "must be a positive safe integer"
1612
+ );
1488
1613
  if (raw.contextWindowTokens !== void 0 && (typeof raw.contextWindowTokens !== "number" || !Number.isInteger(raw.contextWindowTokens) || raw.contextWindowTokens <= 0)) {
1489
1614
  return invalidConfigValue(context, ["contextWindowTokens"], "must be a positive integer");
1490
1615
  }
1491
1616
  return {
1492
1617
  ...raw.strategy !== void 0 ? { strategy: raw.strategy } : {},
1618
+ ...raw.autoCompactWindowTokens !== void 0 ? { autoCompactWindowTokens: raw.autoCompactWindowTokens } : {},
1493
1619
  ...raw.contextWindowTokens !== void 0 ? { contextWindowTokens: raw.contextWindowTokens } : {},
1494
1620
  ...raw.consolidate !== void 0 ? { consolidate: raw.consolidate } : {},
1495
1621
  ...raw.recallEvidence !== void 0 ? { recallEvidence: raw.recallEvidence } : {},
@@ -1589,22 +1715,41 @@ var CONFIG_READERS = {
1589
1715
  return invalidConfigValue(context, [event, index], "must be a mapping with a `command`");
1590
1716
  }
1591
1717
  const raw = entry;
1718
+ const kind = raw.type === void 0 ? "command" : raw.type;
1719
+ if (kind !== "command" && kind !== "http" && kind !== "prompt") {
1720
+ return invalidConfigValue(
1721
+ context,
1722
+ [event, index, "type"],
1723
+ 'must be "command", "http" or "prompt"'
1724
+ );
1725
+ }
1726
+ const allowedKeys = [...HOOK_COMMON_KEYS, ...HOOK_KIND_KEYS[kind]];
1592
1727
  for (const key of Object.keys(entry)) {
1593
- if (!HOOK_ENTRY_KEYS.includes(key)) {
1728
+ if (!allowedKeys.includes(key)) {
1594
1729
  return invalidConfigValue(
1595
1730
  context,
1596
1731
  [event, index, key],
1597
- "is not a recognized hook setting"
1732
+ kind === "command" && HOOK_ENTRY_KEYS.includes(key) ? "is not a recognized hook setting" : `is not a setting of a ${kind} hook`
1598
1733
  );
1599
1734
  }
1600
1735
  }
1601
- if (typeof raw.command !== "string" || raw.command.trim().length === 0) {
1736
+ const text = /* @__PURE__ */ __name((key) => {
1737
+ const value = raw[key];
1738
+ return typeof value === "string" && value.trim().length > 0 ? value : void 0;
1739
+ }, "text");
1740
+ if (kind === "command" && text("command") === void 0) {
1602
1741
  return invalidConfigValue(
1603
1742
  context,
1604
1743
  [event, index, "command"],
1605
1744
  "must be a non-empty string"
1606
1745
  );
1607
1746
  }
1747
+ if (kind === "http" && text("url") === void 0) {
1748
+ return invalidConfigValue(context, [event, index, "url"], "must be a non-empty string");
1749
+ }
1750
+ if (kind === "prompt" && text("prompt") === void 0) {
1751
+ return invalidConfigValue(context, [event, index, "prompt"], "must be a non-empty string");
1752
+ }
1608
1753
  if (raw.matcher !== void 0 && typeof raw.matcher !== "string") {
1609
1754
  return invalidConfigValue(context, [event, index, "matcher"], "must be a string");
1610
1755
  }
@@ -1615,27 +1760,89 @@ var CONFIG_READERS = {
1615
1760
  "must be a positive integer"
1616
1761
  );
1617
1762
  }
1618
- if (raw.if !== void 0 && (typeof raw.if !== "string" || raw.if.trim().length === 0)) {
1763
+ if (raw.if !== void 0 && text("if") === void 0) {
1619
1764
  return invalidConfigValue(context, [event, index, "if"], "must be a non-empty string");
1620
1765
  }
1621
1766
  if (raw.once !== void 0 && typeof raw.once !== "boolean") {
1622
1767
  return invalidConfigValue(context, [event, index, "once"], "must be true or false");
1623
1768
  }
1624
- if (raw.statusMessage !== void 0 && (typeof raw.statusMessage !== "string" || raw.statusMessage.trim().length === 0)) {
1769
+ if (raw.statusMessage !== void 0 && text("statusMessage") === void 0) {
1625
1770
  return invalidConfigValue(
1626
1771
  context,
1627
1772
  [event, index, "statusMessage"],
1628
1773
  "must be a non-empty string"
1629
1774
  );
1630
1775
  }
1631
- parsed.push({
1632
- command: raw.command,
1776
+ if (raw.onFailure !== void 0 && raw.onFailure !== "continue" && raw.onFailure !== "block") {
1777
+ return invalidConfigValue(
1778
+ context,
1779
+ [event, index, "onFailure"],
1780
+ 'must be "continue" or "block"'
1781
+ );
1782
+ }
1783
+ if (raw.async !== void 0 && typeof raw.async !== "boolean") {
1784
+ return invalidConfigValue(context, [event, index, "async"], "must be true or false");
1785
+ }
1786
+ if (raw.args !== void 0 && (!Array.isArray(raw.args) || raw.args.some((item) => typeof item !== "string"))) {
1787
+ return invalidConfigValue(context, [event, index, "args"], "must be a list of strings");
1788
+ }
1789
+ if (raw.allowedEnvVars !== void 0 && (!Array.isArray(raw.allowedEnvVars) || raw.allowedEnvVars.some((item) => typeof item !== "string"))) {
1790
+ return invalidConfigValue(
1791
+ context,
1792
+ [event, index, "allowedEnvVars"],
1793
+ "must be a list of variable names"
1794
+ );
1795
+ }
1796
+ if (raw.headers !== void 0) {
1797
+ if (!isConfigMapping(raw.headers) || Object.values(raw.headers).some((item) => typeof item !== "string")) {
1798
+ return invalidConfigValue(
1799
+ context,
1800
+ [event, index, "headers"],
1801
+ "must be a mapping of header names to text"
1802
+ );
1803
+ }
1804
+ }
1805
+ if (kind === "http") {
1806
+ let protocol;
1807
+ try {
1808
+ protocol = new URL(raw.url).protocol;
1809
+ } catch {
1810
+ protocol = void 0;
1811
+ }
1812
+ if (protocol !== "http:" && protocol !== "https:") {
1813
+ return invalidConfigValue(
1814
+ context,
1815
+ [event, index, "url"],
1816
+ "must be an http or https address"
1817
+ );
1818
+ }
1819
+ }
1820
+ const shared = {
1633
1821
  ...raw.matcher !== void 0 ? { matcher: raw.matcher } : {},
1634
1822
  ...raw.timeoutMs !== void 0 ? { timeoutMs: raw.timeoutMs } : {},
1635
1823
  ...raw.if !== void 0 ? { if: raw.if } : {},
1636
1824
  ...raw.once !== void 0 ? { once: raw.once } : {},
1637
- ...raw.statusMessage !== void 0 ? { statusMessage: raw.statusMessage } : {}
1638
- });
1825
+ ...raw.statusMessage !== void 0 ? { statusMessage: raw.statusMessage } : {},
1826
+ ...raw.onFailure !== void 0 ? { onFailure: raw.onFailure } : {}
1827
+ };
1828
+ if (kind === "http") {
1829
+ parsed.push({
1830
+ type: "http",
1831
+ url: raw.url,
1832
+ ...raw.headers !== void 0 ? { headers: raw.headers } : {},
1833
+ ...raw.allowedEnvVars !== void 0 ? { allowedEnvVars: raw.allowedEnvVars } : {},
1834
+ ...shared
1835
+ });
1836
+ } else if (kind === "prompt") {
1837
+ parsed.push({ type: "prompt", prompt: raw.prompt, ...shared });
1838
+ } else {
1839
+ parsed.push({
1840
+ command: raw.command,
1841
+ ...raw.args !== void 0 ? { args: raw.args } : {},
1842
+ ...raw.async !== void 0 ? { async: raw.async } : {},
1843
+ ...shared
1844
+ });
1845
+ }
1639
1846
  }
1640
1847
  out[event] = parsed;
1641
1848
  }
@@ -1711,6 +1918,7 @@ var CONFIG_READERS = {
1711
1918
  for (const key of Object.keys(v)) {
1712
1919
  if (![
1713
1920
  "maxIterations",
1921
+ "maxResponseTokens",
1714
1922
  "tokenBudget",
1715
1923
  "timeoutMs",
1716
1924
  "waitForProviderMs",
@@ -1719,7 +1927,7 @@ var CONFIG_READERS = {
1719
1927
  return invalidConfigValue(
1720
1928
  context,
1721
1929
  [key],
1722
- "is not a limit (maxIterations, tokenBudget, timeoutMs, waitForProviderMs, costLimitUsd)"
1930
+ "is not a limit (maxIterations, maxResponseTokens, tokenBudget, timeoutMs, waitForProviderMs, costLimitUsd)"
1723
1931
  );
1724
1932
  const value = v[key];
1725
1933
  if (key === "costLimitUsd") {
@@ -1727,7 +1935,7 @@ var CONFIG_READERS = {
1727
1935
  return invalidConfigValue(context, [key], "must be a number of dollars, 0 or more");
1728
1936
  continue;
1729
1937
  }
1730
- const minimum = key === "waitForProviderMs" ? 1 : 0;
1938
+ const minimum = key === "waitForProviderMs" || key === "maxResponseTokens" ? 1 : 0;
1731
1939
  if (typeof value !== "number" || !Number.isSafeInteger(value) || value < minimum)
1732
1940
  return invalidConfigValue(context, [key], `must be a safe whole number at least ${minimum}`);
1733
1941
  if (key === "timeoutMs" && value > 2147483647)
@@ -1874,7 +2082,33 @@ var CONFIG_READERS = {
1874
2082
  telemetry: /* @__PURE__ */ __name((v, context) => {
1875
2083
  if (!isConfigMapping(v)) return invalidConfigValue(context, [], "must be a mapping");
1876
2084
  const raw = v;
1877
- if (raw.sessionExport === void 0) return {};
2085
+ let otlp;
2086
+ if (raw.otlp !== void 0) {
2087
+ if (!isConfigMapping(raw.otlp))
2088
+ return invalidConfigValue(context, ["otlp"], "must be a mapping");
2089
+ const o = raw.otlp;
2090
+ if (o.endpoint !== void 0 && (typeof o.endpoint !== "string" || o.endpoint === "")) {
2091
+ return invalidConfigValue(context, ["otlp", "endpoint"], "must be a non-empty string");
2092
+ }
2093
+ let headers;
2094
+ if (o.headers !== void 0) {
2095
+ if (!isConfigMapping(o.headers)) {
2096
+ return invalidConfigValue(context, ["otlp", "headers"], "must be a mapping");
2097
+ }
2098
+ headers = {};
2099
+ for (const [name, value] of Object.entries(o.headers)) {
2100
+ if (typeof value !== "string") {
2101
+ return invalidConfigValue(context, ["otlp", "headers", name], "must be a string");
2102
+ }
2103
+ headers[name] = value;
2104
+ }
2105
+ }
2106
+ otlp = {
2107
+ ...o.endpoint !== void 0 ? { endpoint: o.endpoint } : {},
2108
+ ...headers ? { headers } : {}
2109
+ };
2110
+ }
2111
+ if (raw.sessionExport === void 0) return otlp ? { otlp } : {};
1878
2112
  const se = raw.sessionExport;
1879
2113
  if (!isConfigMapping(se)) {
1880
2114
  return invalidConfigValue(context, ["sessionExport"], "must be a mapping");
@@ -1918,6 +2152,7 @@ var CONFIG_READERS = {
1918
2152
  redactors = entry.redactors;
1919
2153
  }
1920
2154
  return {
2155
+ ...otlp ? { otlp } : {},
1921
2156
  sessionExport: {
1922
2157
  destination: entry.destination,
1923
2158
  ...eventTypes !== void 0 ? { eventTypes } : {},
@@ -2193,7 +2428,8 @@ var ENV_VARIABLE_NAMES = {
2193
2428
  // and its provenance are the reviewable source of this authority.
2194
2429
  plugins: void 0,
2195
2430
  sandbox: void 0,
2196
- limits: void 0,
2431
+ // Only the per-call output allowance; no variable changes the turn's spend guards.
2432
+ limits: "NAMZU_MAX_OUTPUT_TOKENS",
2197
2433
  // The cost of a run is decided in the file, not by a variable in a shell profile.
2198
2434
  workflow: void 0,
2199
2435
  // Outbound reach is opted into in the file, never from the environment.
@@ -2213,7 +2449,7 @@ var ENV_VARIABLE_NAMES = {
2213
2449
  // where a project's runs are reviewed.
2214
2450
  toolResultScreens: void 0,
2215
2451
  // A strategy is a property of a project's runs, declared where they are reviewed.
2216
- compaction: void 0,
2452
+ compaction: "NAMZU_AUTO_COMPACT_WINDOW",
2217
2453
  memory: void 0,
2218
2454
  // Deliberately not env-settable. A `NAMZU_TELEMETRY_SESSION_EXPORT=/tmp/x`
2219
2455
  // in a shell profile would start exporting conversation content with
@@ -2231,8 +2467,8 @@ var ENV_VARIABLE_NAMES = {
2231
2467
  // Chooses which provider and model receive the conversation; a file declares it.
2232
2468
  model: void 0,
2233
2469
  routing: void 0,
2234
- // Chooses which model receives conversation text for side jobs; a file declares it.
2235
- smallModel: void 0,
2470
+ // Explicit process-local choice of the model used for side jobs.
2471
+ smallModel: "NAMZU_SMALL_MODEL",
2236
2472
  // A list of names and a switch that decide what reaches the model's prompt;
2237
2473
  // declared in a file, where a project's runs are reviewed.
2238
2474
  skills: void 0,
@@ -2258,6 +2494,35 @@ var ENV_VARIABLE_NAMES = {
2258
2494
  function readEnv(env) {
2259
2495
  const config = {};
2260
2496
  const variables = {};
2497
+ for (const key of ["limits", "compaction"]) {
2498
+ const variable = ENV_VARIABLE_NAMES[key];
2499
+ if (!variable || env[variable] === void 0) continue;
2500
+ let value;
2501
+ try {
2502
+ value = positiveTokenCount(env[variable], variable);
2503
+ } catch {
2504
+ throw new ConfigValueError(
2505
+ { kind: "environment", variable },
2506
+ key,
2507
+ "must be a positive safe whole number of tokens"
2508
+ );
2509
+ }
2510
+ if (key === "limits") config.limits = { maxResponseTokens: value };
2511
+ else config.compaction = { autoCompactWindowTokens: value };
2512
+ variables[key] = variable;
2513
+ }
2514
+ const smallVariable = ENV_VARIABLE_NAMES.smallModel;
2515
+ if (smallVariable && env[smallVariable] !== void 0) {
2516
+ const value = env[smallVariable]?.trim();
2517
+ if (!value)
2518
+ throw new ConfigValueError(
2519
+ { kind: "environment", variable: smallVariable },
2520
+ "smallModel",
2521
+ "must name a model"
2522
+ );
2523
+ config.smallModel = value;
2524
+ variables.smallModel = smallVariable;
2525
+ }
2261
2526
  const formatVar = ENV_VARIABLE_NAMES.format;
2262
2527
  if (formatVar) {
2263
2528
  const format = env[formatVar];
@@ -2381,6 +2646,12 @@ function mergeConfigs(...layers) {
2381
2646
  const permissionTables = [];
2382
2647
  for (const layer of layers) {
2383
2648
  for (const key of Object.keys(layer.config)) {
2649
+ if (layer.sourceFor(key).kind === "env" && (key === "limits" || key === "compaction")) {
2650
+ ;
2651
+ out[key] = { ...out[key], ...layer.config[key] };
2652
+ provenance[key] = layer.sourceFor(key);
2653
+ continue;
2654
+ }
2384
2655
  if (key === "permissions" && layer.config.permissions) {
2385
2656
  const source = layer.sourceFor(key);
2386
2657
  const split = splitPermissionsTable(
@@ -2388,7 +2659,9 @@ function mergeConfigs(...layers) {
2388
2659
  settingsAuthorityOf(source),
2389
2660
  describeSource(source)
2390
2661
  );
2391
- permissionTables.push(split.rules);
2662
+ permissionTables.push(
2663
+ "path" in source ? bindPermissionTableToSource(split.rules, source.path, source.kind === "local-file") : split.rules
2664
+ );
2392
2665
  out.permissions = mergePermissionTables(permissionTables);
2393
2666
  out.permissionLayers = [...permissionTables];
2394
2667
  provenance[key] = source;
@@ -2695,6 +2968,9 @@ export {
2695
2968
  withBrowserSiteRules,
2696
2969
  browserSiteRuleFor,
2697
2970
  browserCallOrigin,
2971
+ parseRuleString,
2972
+ patternOf,
2973
+ foldRuleLists,
2698
2974
  COMPOSER_TRIGGER_IDS,
2699
2975
  COMPOSER_TRIGGER_DEFAULTS,
2700
2976
  resolveComposerTriggers,
@@ -2711,4 +2987,4 @@ export {
2711
2987
  pendingProjectMcpServers,
2712
2988
  LOCAL_CONFIG_FILE
2713
2989
  };
2714
- //# sourceMappingURL=chunk-ODOM3I7B.js.map
2990
+ //# sourceMappingURL=chunk-SBKOTD2M.js.map