@namzu/cli 41.0.0 → 41.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (326) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist/bin.js +1 -1
  3. package/dist/chunks/{acp-CLFVQCFH.js → acp-ZNDDGL4A.js} +40 -35
  4. package/dist/chunks/acp-ZNDDGL4A.js.map +6 -0
  5. package/dist/chunks/{activity-command-XULXEUGH.js → activity-command-IGRDHYFY.js} +12 -11
  6. package/dist/chunks/activity-command-IGRDHYFY.js.map +6 -0
  7. package/dist/chunks/{add-BALM5DGZ.js → add-DKDPH2O7.js} +20 -19
  8. package/dist/chunks/add-DKDPH2O7.js.map +6 -0
  9. package/dist/chunks/{agent-CLYE4KWV.js → agent-5MAZW7PD.js} +31 -26
  10. package/dist/chunks/agent-session-SY5BWKNS.js +59 -0
  11. package/dist/chunks/{archive-FWXFWMZJ.js → archive-3PH42KH6.js} +10 -9
  12. package/dist/chunks/archive-3PH42KH6.js.map +6 -0
  13. package/dist/chunks/{bin-main-HO4CMSMY.js → bin-main-YJBHUBGV.js} +3 -3
  14. package/dist/chunks/{browser-Z46YPGWH.js → browser-DYA5FWWB.js} +6 -6
  15. package/dist/chunks/{chat-NOXE5RTE.js → chat-W7G4NIMV.js} +15 -14
  16. package/dist/chunks/chat-W7G4NIMV.js.map +6 -0
  17. package/dist/chunks/{chunk-BPRT5LV7.js → chunk-24CZYMWP.js} +2 -2
  18. package/dist/chunks/{chunk-V4PHIKLW.js → chunk-2F4BARJH.js} +2 -2
  19. package/dist/chunks/{chunk-SPZWLMZY.js → chunk-2X5QU773.js} +3 -3
  20. package/dist/chunks/{chunk-PKLBJMCY.js → chunk-3RSNEZOX.js} +4 -4
  21. package/dist/chunks/{chunk-B2RMIYPZ.js → chunk-4OHKGKUE.js} +4 -4
  22. package/dist/chunks/{chunk-NQGMYAXK.js → chunk-56MTJMCE.js} +3 -3
  23. package/dist/chunks/{chunk-AX4Z3H7N.js → chunk-5CF5NKWH.js} +2 -2
  24. package/dist/chunks/{chunk-IR3AZZFJ.js → chunk-5ND5QQDO.js} +15 -19
  25. package/dist/chunks/chunk-5ND5QQDO.js.map +6 -0
  26. package/dist/chunks/{chunk-WV7XGYNQ.js → chunk-64BXKXCY.js} +5 -5
  27. package/dist/chunks/{chunk-YXZBHG5N.js → chunk-6DY377DD.js} +333 -42
  28. package/dist/chunks/chunk-6DY377DD.js.map +6 -0
  29. package/dist/chunks/{chunk-B6BQ5ULO.js → chunk-72SF2UK7.js} +2 -2
  30. package/dist/chunks/chunk-7AAONVMX.js +406 -0
  31. package/dist/chunks/chunk-7AAONVMX.js.map +6 -0
  32. package/dist/chunks/{chunk-HE7K6IZ2.js → chunk-7UHIIE6W.js} +50 -30
  33. package/dist/chunks/chunk-7UHIIE6W.js.map +6 -0
  34. package/dist/chunks/{chunk-KD4Q2INM.js → chunk-7Y6IIRSM.js} +2 -2
  35. package/dist/chunks/{chunk-5OVI35QS.js → chunk-ABTQVE2K.js} +3 -3
  36. package/dist/chunks/{chunk-4JQUY3DT.js → chunk-BO4VL25F.js} +2 -2
  37. package/dist/chunks/{chunk-SEYEOYMT.js → chunk-BPLY6HCD.js} +4 -4
  38. package/dist/chunks/{chunk-O6FOUL5S.js → chunk-DSW5QXUB.js} +4 -4
  39. package/dist/chunks/{chunk-YGV3VBYL.js → chunk-E5FAPPFH.js} +2 -2
  40. package/dist/chunks/{chunk-AGN45S6D.js → chunk-EAQJSEKA.js} +2 -2
  41. package/dist/chunks/{chunk-OUQEMJ26.js → chunk-ELVAEMBF.js} +3 -3
  42. package/dist/chunks/{chunk-XWLQH2NW.js → chunk-FTBXHPCM.js} +19 -19
  43. package/dist/chunks/chunk-FVHJPEJU.js +403 -0
  44. package/dist/chunks/chunk-FVHJPEJU.js.map +6 -0
  45. package/dist/chunks/{chunk-3WAQN6DX.js → chunk-G5747QGU.js} +2 -2
  46. package/dist/chunks/{chunk-MNDFPZVQ.js → chunk-GFBEQZGH.js} +3 -3
  47. package/dist/chunks/{chunk-XRX3DHEW.js → chunk-GR7FEYP5.js} +4 -4
  48. package/dist/chunks/{chunk-4GJSW2KC.js → chunk-HKY44MS7.js} +18 -18
  49. package/dist/chunks/{chunk-4GJSW2KC.js.map → chunk-HKY44MS7.js.map} +2 -2
  50. package/dist/chunks/{chunk-EL6GXINV.js → chunk-HPBQLE3Y.js} +2 -2
  51. package/dist/chunks/chunk-ITSVWCSR.js +197 -0
  52. package/dist/chunks/chunk-ITSVWCSR.js.map +6 -0
  53. package/dist/chunks/chunk-KES7QU4W.js +56 -0
  54. package/dist/chunks/chunk-KES7QU4W.js.map +6 -0
  55. package/dist/chunks/{chunk-SMR6TQN2.js → chunk-KSWPRDI2.js} +2 -2
  56. package/dist/chunks/{chunk-MDG3THRR.js → chunk-L3NHCRUZ.js} +2 -2
  57. package/dist/chunks/chunk-LCGXWCVU.js +28 -0
  58. package/dist/chunks/chunk-LCGXWCVU.js.map +6 -0
  59. package/dist/chunks/{chunk-37S7MY2T.js → chunk-LSHPFJKI.js} +69 -4
  60. package/dist/chunks/chunk-LSHPFJKI.js.map +6 -0
  61. package/dist/chunks/{chunk-M5RW7JBV.js → chunk-LXGH4QBJ.js} +9 -9
  62. package/dist/chunks/{chunk-FLYE25VX.js → chunk-M7TGNC4F.js} +2 -2
  63. package/dist/chunks/{chunk-6RNVFKSZ.js → chunk-MIPMLOJ4.js} +3 -3
  64. package/dist/chunks/{chunk-QSDPQR3F.js → chunk-MOUJITK2.js} +3 -3
  65. package/dist/chunks/{chunk-K5OXOYM5.js → chunk-NWTFQJZI.js} +32245 -31293
  66. package/dist/chunks/chunk-NWTFQJZI.js.map +6 -0
  67. package/dist/chunks/{chunk-G4LCCGQR.js → chunk-OS33YOPX.js} +2 -2
  68. package/dist/chunks/{chunk-65CAAE7I.js → chunk-P4BH5CLU.js} +4 -4
  69. package/dist/chunks/{chunk-CBL2FUHG.js → chunk-P7PEG3T2.js} +2 -2
  70. package/dist/chunks/{chunk-SE5UKEXD.js → chunk-PJQJZFYF.js} +2 -2
  71. package/dist/chunks/{chunk-VUZYMKPD.js → chunk-PUXPTJMD.js} +7 -7
  72. package/dist/chunks/{chunk-QY77MJS4.js → chunk-R5FI7ST2.js} +4 -4
  73. package/dist/chunks/{chunk-PSZ44BRO.js → chunk-RT7XM57Q.js} +4 -4
  74. package/dist/chunks/{chunk-PPZKCA6K.js → chunk-RVEF2EUC.js} +2 -2
  75. package/dist/chunks/{chunk-WZPN6PWE.js → chunk-S7L7KHGT.js} +7 -7
  76. package/dist/chunks/{chunk-WQRBEQ2P.js → chunk-TBQRTGCQ.js} +2 -2
  77. package/dist/chunks/{chunk-RWOPUQNS.js → chunk-TRX6W6TD.js} +2 -2
  78. package/dist/chunks/{chunk-V2ZSQXYQ.js → chunk-TTEKFLTN.js} +8 -8
  79. package/dist/chunks/{chunk-DMPPM3IA.js → chunk-UJVN6557.js} +3 -3
  80. package/dist/chunks/{chunk-V2NG7LLL.js → chunk-UOPSAWJE.js} +9 -50
  81. package/dist/chunks/chunk-UOPSAWJE.js.map +6 -0
  82. package/dist/chunks/{chunk-AOHJCFG3.js → chunk-VEB3EYJK.js} +2 -2
  83. package/dist/chunks/{chunk-P3JHLZH4.js → chunk-VHSRFBTI.js} +2 -2
  84. package/dist/chunks/{chunk-6CCX6DPQ.js → chunk-VJZ4NHWX.js} +2 -2
  85. package/dist/chunks/{chunk-AUZB4LKS.js → chunk-VXJFOQIO.js} +4 -4
  86. package/dist/chunks/{chunk-JSGZ4V7Y.js → chunk-VYJUJQ4H.js} +2 -2
  87. package/dist/chunks/{chunk-O6JILDEY.js → chunk-XBEW7SQB.js} +6 -6
  88. package/dist/chunks/{chunk-PTJI2QA4.js → chunk-XKFG3473.js} +3 -3
  89. package/dist/chunks/chunk-XTSD7XEF.js +609 -0
  90. package/dist/chunks/chunk-XTSD7XEF.js.map +6 -0
  91. package/dist/chunks/{chunk-WLAVNIFG.js → chunk-YL2SBQDK.js} +3 -3
  92. package/dist/chunks/{chunk-MZI4TLFB.js → chunk-Z37S7NJH.js} +22 -20
  93. package/dist/chunks/chunk-Z37S7NJH.js.map +6 -0
  94. package/dist/chunks/{chunk-PDZZ64IH.js → chunk-ZZIK6J3Q.js} +26 -201
  95. package/dist/chunks/chunk-ZZIK6J3Q.js.map +6 -0
  96. package/dist/chunks/{cli-runtime-5H7CTXF2.js → cli-runtime-CBVA2QU3.js} +11 -10
  97. package/dist/chunks/cli-runtime-CBVA2QU3.js.map +6 -0
  98. package/dist/chunks/{commands-XC67PG6L.js → commands-7KVEJYKS.js} +5 -5
  99. package/dist/chunks/{crash-report-UE423ET4.js → crash-report-NXFD4VH5.js} +6 -6
  100. package/dist/chunks/{dist-SY7OYS74.js → dist-6LIEN5YB.js} +2 -2
  101. package/dist/chunks/{dist-DSK2VZQB.js → dist-CUCXA33N.js} +2 -2
  102. package/dist/chunks/{dist-YZRXSX7C.js → dist-FRHHWOOW.js} +2 -2
  103. package/dist/chunks/{dist-DCOPEJDN.js → dist-HTMWZWBC.js} +2 -2
  104. package/dist/chunks/{dist-SN7QXPO2.js → dist-JZXBY5D3.js} +2 -2
  105. package/dist/chunks/{dist-4ACX6FL7.js → dist-KURG5KLO.js} +2 -2
  106. package/dist/chunks/{dist-OXUHOXCU.js → dist-VQIK2TS3.js} +2 -2
  107. package/dist/chunks/{doctor-VCCIYKNL.js → doctor-B3TR2C6U.js} +9 -9
  108. package/dist/chunks/{drain-QKEXEMCO.js → drain-YWRSLFBO.js} +10 -10
  109. package/dist/chunks/{eval-K47YMZVT.js → eval-BP6U5TEX.js} +2 -2
  110. package/dist/chunks/{exec-K3LRQU6R.js → exec-Y6TR57J4.js} +30 -27
  111. package/dist/chunks/exec-Y6TR57J4.js.map +6 -0
  112. package/dist/chunks/{home-OSHELFKX.js → home-HVHU4PVC.js} +3 -3
  113. package/dist/chunks/{host-queries-TV3XH3YV.js → host-queries-W7ATBLK2.js} +15 -14
  114. package/dist/chunks/host-queries-W7ATBLK2.js.map +6 -0
  115. package/dist/chunks/learn-WM5TTHUD.js +92 -0
  116. package/dist/chunks/learn-WM5TTHUD.js.map +6 -0
  117. package/dist/chunks/learn-builtin-RXNSBTBC.js +235 -0
  118. package/dist/chunks/learn-builtin-RXNSBTBC.js.map +6 -0
  119. package/dist/chunks/{lifecycle-R3QWZ664.js → lifecycle-SHRBIHQV.js} +26 -24
  120. package/dist/chunks/{list-L5QFDBPX.js → list-WB7ULXJM.js} +21 -20
  121. package/dist/chunks/list-WB7ULXJM.js.map +6 -0
  122. package/dist/chunks/{login-N4EO2F45.js → login-PDYMJ6JR.js} +8 -8
  123. package/dist/chunks/{logs-264INNUN.js → logs-5X7RTN2P.js} +4 -4
  124. package/dist/chunks/{mcp-7H3G3KLD.js → mcp-R4ZVPY23.js} +17 -16
  125. package/dist/chunks/mcp-R4ZVPY23.js.map +6 -0
  126. package/dist/chunks/{message-command-JOQ24TAL.js → message-command-PHYRUQCA.js} +37 -32
  127. package/dist/chunks/message-command-PHYRUQCA.js.map +6 -0
  128. package/dist/chunks/{operator-tools-O2MDVMJP.js → operator-tools-VBLGZWBL.js} +13 -12
  129. package/dist/chunks/operator-tools-VBLGZWBL.js.map +6 -0
  130. package/dist/chunks/{output-schema-LKM35JS4.js → output-schema-4H5YYW34.js} +3 -3
  131. package/dist/chunks/{pal-N56IUOUP.js → pal-7LGE7ORS.js} +11 -11
  132. package/dist/chunks/{providers-B352G4OM.js → providers-APLUKR7Z.js} +6 -6
  133. package/dist/chunks/{resident-SMWDKMJP.js → resident-COJTHT7K.js} +50 -335
  134. package/dist/chunks/resident-COJTHT7K.js.map +6 -0
  135. package/dist/chunks/resume-DL73LUH6.js +23 -0
  136. package/dist/chunks/{resume-command-OHQBIY5P.js → resume-command-CCEBJXTF.js} +4 -4
  137. package/dist/chunks/{schedule-VHP2VGEF.js → schedule-3MVCIZZS.js} +8 -8
  138. package/dist/chunks/{service-RHWPRJJO.js → service-OAKQZBBF.js} +31 -29
  139. package/dist/chunks/service-OAKQZBBF.js.map +6 -0
  140. package/dist/chunks/session-step-HOLKYCG2.js +30 -0
  141. package/dist/chunks/{skills-JS3FQPHU.js → skills-ZXEEIGHF.js} +8 -8
  142. package/dist/chunks/{state-A56X2FGB.js → state-ETXYDF3L.js} +2 -2
  143. package/dist/chunks/{store-IMV6NZTT.js → store-HJFAIW4G.js} +10 -9
  144. package/dist/chunks/{store-WJEK5ZI2.js → store-MKUMQQBF.js} +6 -6
  145. package/dist/chunks/{store-SEPPZ7H6.js → store-ODVHN3VE.js} +4 -4
  146. package/dist/chunks/{tui-BP7MYQG2.js → tui-WTLNGZ3U.js} +115 -68
  147. package/dist/chunks/tui-WTLNGZ3U.js.map +6 -0
  148. package/dist/chunks/{upgrade-2A7CIVAY.js → upgrade-OV2AFIZR.js} +2 -2
  149. package/dist/chunks/{worktree-ERUU4NVZ.js → worktree-3QCDPF3N.js} +12 -11
  150. package/dist/chunks/worktree-3QCDPF3N.js.map +6 -0
  151. package/dist/cli.d.ts.map +1 -1
  152. package/dist/commands/exec-json.d.ts.map +1 -1
  153. package/dist/commands/exec.d.ts.map +1 -1
  154. package/dist/commands/learn-builtin.d.ts +8 -0
  155. package/dist/commands/learn-builtin.d.ts.map +1 -0
  156. package/dist/commands/learn.d.ts +9 -0
  157. package/dist/commands/learn.d.ts.map +1 -0
  158. package/dist/commands/learning.d.ts +6 -0
  159. package/dist/commands/learning.d.ts.map +1 -0
  160. package/dist/commands/manifest.d.ts +2 -0
  161. package/dist/commands/manifest.d.ts.map +1 -1
  162. package/dist/commands/resident.d.ts +2 -0
  163. package/dist/commands/resident.d.ts.map +1 -1
  164. package/dist/config/learning-generator.d.ts +13 -0
  165. package/dist/config/learning-generator.d.ts.map +1 -0
  166. package/dist/config/load.d.ts.map +1 -1
  167. package/dist/config/schema.d.ts +23 -0
  168. package/dist/config/schema.d.ts.map +1 -1
  169. package/dist/context/doctrine.d.ts.map +1 -1
  170. package/dist/context/environment.d.ts.map +1 -1
  171. package/dist/index.js +14 -13
  172. package/dist/integrations/learning/generator-run.d.ts +43 -0
  173. package/dist/integrations/learning/generator-run.d.ts.map +1 -0
  174. package/dist/integrations/learning/generator-settings.d.ts +25 -0
  175. package/dist/integrations/learning/generator-settings.d.ts.map +1 -0
  176. package/dist/integrations/learning/generator-state.d.ts +28 -0
  177. package/dist/integrations/learning/generator-state.d.ts.map +1 -0
  178. package/dist/integrations/learning/generator-trigger.d.ts +58 -0
  179. package/dist/integrations/learning/generator-trigger.d.ts.map +1 -0
  180. package/dist/integrations/learning/guidance-history.d.ts +45 -0
  181. package/dist/integrations/learning/guidance-history.d.ts.map +1 -0
  182. package/dist/integrations/learning/learned-notice.d.ts +11 -0
  183. package/dist/integrations/learning/learned-notice.d.ts.map +1 -0
  184. package/dist/integrations/learning/learning-model.d.ts +26 -0
  185. package/dist/integrations/learning/learning-model.d.ts.map +1 -0
  186. package/dist/integrations/learning/project-guidance.d.ts +11 -0
  187. package/dist/integrations/learning/project-guidance.d.ts.map +1 -0
  188. package/dist/integrations/learning/scenario-evaluator.d.ts +84 -0
  189. package/dist/integrations/learning/scenario-evaluator.d.ts.map +1 -0
  190. package/dist/integrations/learning/scenarios.d.ts +42 -0
  191. package/dist/integrations/learning/scenarios.d.ts.map +1 -0
  192. package/dist/integrations/learning/session-feed.d.ts +110 -0
  193. package/dist/integrations/learning/session-feed.d.ts.map +1 -0
  194. package/dist/integrations/learning/session-store.d.ts +22 -0
  195. package/dist/integrations/learning/session-store.d.ts.map +1 -0
  196. package/dist/integrations/learning/sources.d.ts +4 -0
  197. package/dist/integrations/learning/sources.d.ts.map +1 -0
  198. package/dist/integrations/resident/learning-storage.d.ts +2 -2
  199. package/dist/integrations/resident/learning-storage.d.ts.map +1 -1
  200. package/dist/integrations/resident/runner-worker.js +22 -19
  201. package/dist/integrations/resident/runner-worker.js.map +1 -1
  202. package/dist/integrations/resident/session-step.d.ts.map +1 -1
  203. package/dist/integrations/subagents/runtime.d.ts.map +1 -1
  204. package/dist/integrations/workflows/offering.d.ts.map +1 -1
  205. package/dist/reminders/index.d.ts.map +1 -1
  206. package/dist/reminders/mode.d.ts +8 -1
  207. package/dist/reminders/mode.d.ts.map +1 -1
  208. package/dist/tui/App.d.ts.map +1 -1
  209. package/dist/tui/agent.d.ts +31 -0
  210. package/dist/tui/agent.d.ts.map +1 -1
  211. package/dist/tui/types.d.ts +5 -0
  212. package/dist/tui/types.d.ts.map +1 -1
  213. package/package.json +5 -5
  214. package/dist/chunks/acp-CLFVQCFH.js.map +0 -6
  215. package/dist/chunks/activity-command-XULXEUGH.js.map +0 -6
  216. package/dist/chunks/add-BALM5DGZ.js.map +0 -6
  217. package/dist/chunks/agent-session-2MVAYKJC.js +0 -54
  218. package/dist/chunks/archive-FWXFWMZJ.js.map +0 -6
  219. package/dist/chunks/chat-NOXE5RTE.js.map +0 -6
  220. package/dist/chunks/chunk-37S7MY2T.js.map +0 -6
  221. package/dist/chunks/chunk-HE7K6IZ2.js.map +0 -6
  222. package/dist/chunks/chunk-IR3AZZFJ.js.map +0 -6
  223. package/dist/chunks/chunk-K5OXOYM5.js.map +0 -6
  224. package/dist/chunks/chunk-MZI4TLFB.js.map +0 -6
  225. package/dist/chunks/chunk-PDZZ64IH.js.map +0 -6
  226. package/dist/chunks/chunk-V2NG7LLL.js.map +0 -6
  227. package/dist/chunks/chunk-YXZBHG5N.js.map +0 -6
  228. package/dist/chunks/cli-runtime-5H7CTXF2.js.map +0 -6
  229. package/dist/chunks/exec-K3LRQU6R.js.map +0 -6
  230. package/dist/chunks/host-queries-TV3XH3YV.js.map +0 -6
  231. package/dist/chunks/list-L5QFDBPX.js.map +0 -6
  232. package/dist/chunks/mcp-7H3G3KLD.js.map +0 -6
  233. package/dist/chunks/message-command-JOQ24TAL.js.map +0 -6
  234. package/dist/chunks/operator-tools-O2MDVMJP.js.map +0 -6
  235. package/dist/chunks/resident-SMWDKMJP.js.map +0 -6
  236. package/dist/chunks/resume-EXHKGQII.js +0 -22
  237. package/dist/chunks/service-RHWPRJJO.js.map +0 -6
  238. package/dist/chunks/session-step-NJRR3Q2L.js +0 -30
  239. package/dist/chunks/tui-BP7MYQG2.js.map +0 -6
  240. package/dist/chunks/worktree-ERUU4NVZ.js.map +0 -6
  241. package/dist/commands/resident-learning.d.ts +0 -6
  242. package/dist/commands/resident-learning.d.ts.map +0 -1
  243. package/dist/integrations/resident/learning-sources.d.ts +0 -4
  244. package/dist/integrations/resident/learning-sources.d.ts.map +0 -1
  245. /package/dist/chunks/{agent-CLYE4KWV.js.map → agent-5MAZW7PD.js.map} +0 -0
  246. /package/dist/chunks/{agent-session-2MVAYKJC.js.map → agent-session-SY5BWKNS.js.map} +0 -0
  247. /package/dist/chunks/{bin-main-HO4CMSMY.js.map → bin-main-YJBHUBGV.js.map} +0 -0
  248. /package/dist/chunks/{browser-Z46YPGWH.js.map → browser-DYA5FWWB.js.map} +0 -0
  249. /package/dist/chunks/{chunk-BPRT5LV7.js.map → chunk-24CZYMWP.js.map} +0 -0
  250. /package/dist/chunks/{chunk-V4PHIKLW.js.map → chunk-2F4BARJH.js.map} +0 -0
  251. /package/dist/chunks/{chunk-SPZWLMZY.js.map → chunk-2X5QU773.js.map} +0 -0
  252. /package/dist/chunks/{chunk-PKLBJMCY.js.map → chunk-3RSNEZOX.js.map} +0 -0
  253. /package/dist/chunks/{chunk-B2RMIYPZ.js.map → chunk-4OHKGKUE.js.map} +0 -0
  254. /package/dist/chunks/{chunk-NQGMYAXK.js.map → chunk-56MTJMCE.js.map} +0 -0
  255. /package/dist/chunks/{chunk-AX4Z3H7N.js.map → chunk-5CF5NKWH.js.map} +0 -0
  256. /package/dist/chunks/{chunk-WV7XGYNQ.js.map → chunk-64BXKXCY.js.map} +0 -0
  257. /package/dist/chunks/{chunk-B6BQ5ULO.js.map → chunk-72SF2UK7.js.map} +0 -0
  258. /package/dist/chunks/{chunk-KD4Q2INM.js.map → chunk-7Y6IIRSM.js.map} +0 -0
  259. /package/dist/chunks/{chunk-5OVI35QS.js.map → chunk-ABTQVE2K.js.map} +0 -0
  260. /package/dist/chunks/{chunk-4JQUY3DT.js.map → chunk-BO4VL25F.js.map} +0 -0
  261. /package/dist/chunks/{chunk-SEYEOYMT.js.map → chunk-BPLY6HCD.js.map} +0 -0
  262. /package/dist/chunks/{chunk-O6FOUL5S.js.map → chunk-DSW5QXUB.js.map} +0 -0
  263. /package/dist/chunks/{chunk-YGV3VBYL.js.map → chunk-E5FAPPFH.js.map} +0 -0
  264. /package/dist/chunks/{chunk-AGN45S6D.js.map → chunk-EAQJSEKA.js.map} +0 -0
  265. /package/dist/chunks/{chunk-OUQEMJ26.js.map → chunk-ELVAEMBF.js.map} +0 -0
  266. /package/dist/chunks/{chunk-XWLQH2NW.js.map → chunk-FTBXHPCM.js.map} +0 -0
  267. /package/dist/chunks/{chunk-3WAQN6DX.js.map → chunk-G5747QGU.js.map} +0 -0
  268. /package/dist/chunks/{chunk-MNDFPZVQ.js.map → chunk-GFBEQZGH.js.map} +0 -0
  269. /package/dist/chunks/{chunk-XRX3DHEW.js.map → chunk-GR7FEYP5.js.map} +0 -0
  270. /package/dist/chunks/{chunk-EL6GXINV.js.map → chunk-HPBQLE3Y.js.map} +0 -0
  271. /package/dist/chunks/{chunk-SMR6TQN2.js.map → chunk-KSWPRDI2.js.map} +0 -0
  272. /package/dist/chunks/{chunk-MDG3THRR.js.map → chunk-L3NHCRUZ.js.map} +0 -0
  273. /package/dist/chunks/{chunk-M5RW7JBV.js.map → chunk-LXGH4QBJ.js.map} +0 -0
  274. /package/dist/chunks/{chunk-FLYE25VX.js.map → chunk-M7TGNC4F.js.map} +0 -0
  275. /package/dist/chunks/{chunk-6RNVFKSZ.js.map → chunk-MIPMLOJ4.js.map} +0 -0
  276. /package/dist/chunks/{chunk-QSDPQR3F.js.map → chunk-MOUJITK2.js.map} +0 -0
  277. /package/dist/chunks/{chunk-G4LCCGQR.js.map → chunk-OS33YOPX.js.map} +0 -0
  278. /package/dist/chunks/{chunk-65CAAE7I.js.map → chunk-P4BH5CLU.js.map} +0 -0
  279. /package/dist/chunks/{chunk-CBL2FUHG.js.map → chunk-P7PEG3T2.js.map} +0 -0
  280. /package/dist/chunks/{chunk-SE5UKEXD.js.map → chunk-PJQJZFYF.js.map} +0 -0
  281. /package/dist/chunks/{chunk-VUZYMKPD.js.map → chunk-PUXPTJMD.js.map} +0 -0
  282. /package/dist/chunks/{chunk-QY77MJS4.js.map → chunk-R5FI7ST2.js.map} +0 -0
  283. /package/dist/chunks/{chunk-PSZ44BRO.js.map → chunk-RT7XM57Q.js.map} +0 -0
  284. /package/dist/chunks/{chunk-PPZKCA6K.js.map → chunk-RVEF2EUC.js.map} +0 -0
  285. /package/dist/chunks/{chunk-WZPN6PWE.js.map → chunk-S7L7KHGT.js.map} +0 -0
  286. /package/dist/chunks/{chunk-WQRBEQ2P.js.map → chunk-TBQRTGCQ.js.map} +0 -0
  287. /package/dist/chunks/{chunk-RWOPUQNS.js.map → chunk-TRX6W6TD.js.map} +0 -0
  288. /package/dist/chunks/{chunk-V2ZSQXYQ.js.map → chunk-TTEKFLTN.js.map} +0 -0
  289. /package/dist/chunks/{chunk-DMPPM3IA.js.map → chunk-UJVN6557.js.map} +0 -0
  290. /package/dist/chunks/{chunk-AOHJCFG3.js.map → chunk-VEB3EYJK.js.map} +0 -0
  291. /package/dist/chunks/{chunk-P3JHLZH4.js.map → chunk-VHSRFBTI.js.map} +0 -0
  292. /package/dist/chunks/{chunk-6CCX6DPQ.js.map → chunk-VJZ4NHWX.js.map} +0 -0
  293. /package/dist/chunks/{chunk-AUZB4LKS.js.map → chunk-VXJFOQIO.js.map} +0 -0
  294. /package/dist/chunks/{chunk-JSGZ4V7Y.js.map → chunk-VYJUJQ4H.js.map} +0 -0
  295. /package/dist/chunks/{chunk-O6JILDEY.js.map → chunk-XBEW7SQB.js.map} +0 -0
  296. /package/dist/chunks/{chunk-PTJI2QA4.js.map → chunk-XKFG3473.js.map} +0 -0
  297. /package/dist/chunks/{chunk-WLAVNIFG.js.map → chunk-YL2SBQDK.js.map} +0 -0
  298. /package/dist/chunks/{commands-XC67PG6L.js.map → commands-7KVEJYKS.js.map} +0 -0
  299. /package/dist/chunks/{crash-report-UE423ET4.js.map → crash-report-NXFD4VH5.js.map} +0 -0
  300. /package/dist/chunks/{dist-SY7OYS74.js.map → dist-6LIEN5YB.js.map} +0 -0
  301. /package/dist/chunks/{dist-DSK2VZQB.js.map → dist-CUCXA33N.js.map} +0 -0
  302. /package/dist/chunks/{dist-YZRXSX7C.js.map → dist-FRHHWOOW.js.map} +0 -0
  303. /package/dist/chunks/{dist-DCOPEJDN.js.map → dist-HTMWZWBC.js.map} +0 -0
  304. /package/dist/chunks/{dist-SN7QXPO2.js.map → dist-JZXBY5D3.js.map} +0 -0
  305. /package/dist/chunks/{dist-4ACX6FL7.js.map → dist-KURG5KLO.js.map} +0 -0
  306. /package/dist/chunks/{dist-OXUHOXCU.js.map → dist-VQIK2TS3.js.map} +0 -0
  307. /package/dist/chunks/{doctor-VCCIYKNL.js.map → doctor-B3TR2C6U.js.map} +0 -0
  308. /package/dist/chunks/{drain-QKEXEMCO.js.map → drain-YWRSLFBO.js.map} +0 -0
  309. /package/dist/chunks/{eval-K47YMZVT.js.map → eval-BP6U5TEX.js.map} +0 -0
  310. /package/dist/chunks/{home-OSHELFKX.js.map → home-HVHU4PVC.js.map} +0 -0
  311. /package/dist/chunks/{lifecycle-R3QWZ664.js.map → lifecycle-SHRBIHQV.js.map} +0 -0
  312. /package/dist/chunks/{login-N4EO2F45.js.map → login-PDYMJ6JR.js.map} +0 -0
  313. /package/dist/chunks/{logs-264INNUN.js.map → logs-5X7RTN2P.js.map} +0 -0
  314. /package/dist/chunks/{output-schema-LKM35JS4.js.map → output-schema-4H5YYW34.js.map} +0 -0
  315. /package/dist/chunks/{pal-N56IUOUP.js.map → pal-7LGE7ORS.js.map} +0 -0
  316. /package/dist/chunks/{providers-B352G4OM.js.map → providers-APLUKR7Z.js.map} +0 -0
  317. /package/dist/chunks/{resume-EXHKGQII.js.map → resume-DL73LUH6.js.map} +0 -0
  318. /package/dist/chunks/{resume-command-OHQBIY5P.js.map → resume-command-CCEBJXTF.js.map} +0 -0
  319. /package/dist/chunks/{schedule-VHP2VGEF.js.map → schedule-3MVCIZZS.js.map} +0 -0
  320. /package/dist/chunks/{session-step-NJRR3Q2L.js.map → session-step-HOLKYCG2.js.map} +0 -0
  321. /package/dist/chunks/{skills-JS3FQPHU.js.map → skills-ZXEEIGHF.js.map} +0 -0
  322. /package/dist/chunks/{state-A56X2FGB.js.map → state-ETXYDF3L.js.map} +0 -0
  323. /package/dist/chunks/{store-IMV6NZTT.js.map → store-HJFAIW4G.js.map} +0 -0
  324. /package/dist/chunks/{store-SEPPZ7H6.js.map → store-MKUMQQBF.js.map} +0 -0
  325. /package/dist/chunks/{store-WJEK5ZI2.js.map → store-ODVHN3VE.js.map} +0 -0
  326. /package/dist/chunks/{upgrade-2A7CIVAY.js.map → upgrade-OV2AFIZR.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-B2RMIYPZ.js";
6
- import {
7
- createSessionSkillCatalog
8
- } from "./chunk-SPZWLMZY.js";
5
+ } from "./chunk-4OHKGKUE.js";
9
6
  import {
10
7
  createBrowserControl
11
8
  } from "./chunk-WHODOMXA.js";
9
+ import {
10
+ createSessionSkillCatalog
11
+ } from "./chunk-2X5QU773.js";
12
12
  import {
13
13
  SAVE_SKILL_TOOL_NAME,
14
14
  attachAgentView,
@@ -25,13 +25,22 @@ import {
25
25
  theme,
26
26
  viewFromJournal,
27
27
  workingDirectoryProblem
28
- } from "./chunk-65CAAE7I.js";
28
+ } from "./chunk-P4BH5CLU.js";
29
+ import {
30
+ runGeneratorCycle
31
+ } from "./chunk-XTSD7XEF.js";
32
+ import {
33
+ createSessionLearningFeed,
34
+ openLearningTarget,
35
+ readProjectGuidance,
36
+ withSessionLearningFeed
37
+ } from "./chunk-7AAONVMX.js";
29
38
  import {
30
39
  connectMcpServers
31
- } from "./chunk-O6FOUL5S.js";
40
+ } from "./chunk-DSW5QXUB.js";
32
41
  import {
33
42
  openInBrowser
34
- } from "./chunk-JSGZ4V7Y.js";
43
+ } from "./chunk-VYJUJQ4H.js";
35
44
  import {
36
45
  CredentialRefreshRejectedError,
37
46
  CredentialWithdrawnError,
@@ -39,7 +48,7 @@ import {
39
48
  ensureFreshStoredCodexCredential,
40
49
  readSubscriptionCredential,
41
50
  sameOAuthCredential
42
- } from "./chunk-PSZ44BRO.js";
51
+ } from "./chunk-RT7XM57Q.js";
43
52
  import {
44
53
  debugRequested
45
54
  } from "./chunk-GNBMKISG.js";
@@ -51,16 +60,19 @@ import {
51
60
  sessionWorkflowSizeAdvice,
52
61
  unmatchedPassthroughTools,
53
62
  workflowTokenCeiling
54
- } from "./chunk-37S7MY2T.js";
63
+ } from "./chunk-LSHPFJKI.js";
55
64
  import {
56
65
  formatSize,
57
66
  homePath,
58
67
  plural,
59
68
  productName
60
69
  } from "./chunk-XPS3W7FC.js";
70
+ import {
71
+ resolveGeneratorSettings
72
+ } from "./chunk-LCGXWCVU.js";
61
73
  import {
62
74
  createLazyCodeAnalysis
63
- } from "./chunk-EL6GXINV.js";
75
+ } from "./chunk-HPBQLE3Y.js";
64
76
  import {
65
77
  canSelectModel,
66
78
  chainCapabilityDisagreements,
@@ -85,7 +97,7 @@ import {
85
97
  requiresCredentialForModel,
86
98
  resolveChainCapabilities,
87
99
  unresolvedMembers
88
- } from "./chunk-IR3AZZFJ.js";
100
+ } from "./chunk-5ND5QQDO.js";
89
101
  import {
90
102
  PROVIDER_REGISTRY,
91
103
  missingCredentialMessage,
@@ -94,12 +106,15 @@ import {
94
106
  import {
95
107
  isPermissionMode,
96
108
  permissionModeLabel
97
- } from "./chunk-RWOPUQNS.js";
109
+ } from "./chunk-TRX6W6TD.js";
98
110
  import {
99
111
  conversationLogPath,
100
112
  ensureSessionStarted,
101
113
  openConversationLog
102
- } from "./chunk-V2NG7LLL.js";
114
+ } from "./chunk-UOPSAWJE.js";
115
+ import {
116
+ readIdentity
117
+ } from "./chunk-KES7QU4W.js";
103
118
  import {
104
119
  INSTRUCTIONS_FILENAME,
105
120
  MAX_CHARS_PER_FILE,
@@ -110,10 +125,10 @@ import {
110
125
  import {
111
126
  compilePermissions,
112
127
  isPermissionEffect
113
- } from "./chunk-5OVI35QS.js";
128
+ } from "./chunk-ABTQVE2K.js";
114
129
  import {
115
130
  cliLogger
116
- } from "./chunk-MDG3THRR.js";
131
+ } from "./chunk-L3NHCRUZ.js";
117
132
  import {
118
133
  stringWidth
119
134
  } from "./chunk-U5UV2YRE.js";
@@ -126,13 +141,13 @@ import {
126
141
  } from "./chunk-IE5XIE4W.js";
127
142
  import {
128
143
  ensurePrivateStateDirectory
129
- } from "./chunk-V4PHIKLW.js";
144
+ } from "./chunk-2F4BARJH.js";
130
145
  import {
131
146
  restrictToOwner
132
- } from "./chunk-FLYE25VX.js";
147
+ } from "./chunk-M7TGNC4F.js";
133
148
  import {
134
149
  namzuHomePath
135
- } from "./chunk-AOHJCFG3.js";
150
+ } from "./chunk-VEB3EYJK.js";
136
151
  import {
137
152
  AgentManager,
138
153
  AgentRegistry,
@@ -298,7 +313,7 @@ import {
298
313
  windowsShellNotice,
299
314
  withProviderFallback,
300
315
  wrapUntrusted
301
- } from "./chunk-K5OXOYM5.js";
316
+ } from "./chunk-NWTFQJZI.js";
302
317
  import {
303
318
  __name
304
319
  } from "./chunk-76FLAFCG.js";
@@ -4384,7 +4399,17 @@ function withoutAsking(doctrine) {
4384
4399
  return out;
4385
4400
  }
4386
4401
  __name(withoutAsking, "withoutAsking");
4387
- var NAMZU_CHILD_WORKING_DOCTRINE = withoutAsking(CODING_AGENT_WORKING_DOCTRINE);
4402
+ var INFORMED_HEADING = "### Keeping the user informed";
4403
+ var CHILD_REPORT_SECTION = `### Your final report
4404
+ - Your parent reads your final report and not your tool calls, so put everything it needs there: what changed, what was verified, what is left, and every assumption you made.
4405
+ - Keep the report complete and free of filler, because your parent relays it onward.`;
4406
+ function withChildReport(doctrine) {
4407
+ const at = doctrine.indexOf(INFORMED_HEADING);
4408
+ if (at === -1) throw new Error(`The working rules no longer contain: ${INFORMED_HEADING}`);
4409
+ return `${doctrine.slice(0, at)}${CHILD_REPORT_SECTION}`;
4410
+ }
4411
+ __name(withChildReport, "withChildReport");
4412
+ var NAMZU_CHILD_WORKING_DOCTRINE = withChildReport(withoutAsking(CODING_AGENT_WORKING_DOCTRINE));
4388
4413
  var NAMZU_PLAN_FILE_DOCTRINE = `## Plan mode
4389
4414
 
4390
4415
  You are in plan mode. Read, search and think; the only file you may change is the plan file named in the plan-mode reminder. Any other \`edit\`, \`write\` or shell command that changes state will be refused. Write the plan into the plan file, then call \`exit_plan_mode\` so the user can approve it; a plain-text question cannot be answered in the approval screen. If the user sends you back with feedback, revise the plan file and call it again.`;
@@ -5006,6 +5031,202 @@ function resolveAutoDefault(config, isAvailable) {
5006
5031
  }
5007
5032
  __name(resolveAutoDefault, "resolveAutoDefault");
5008
5033
 
5034
+ // src/integrations/learning/generator-trigger.ts
5035
+ function createQuestionGate() {
5036
+ let open3 = false;
5037
+ const listeners = /* @__PURE__ */ new Set();
5038
+ return {
5039
+ isOpen: /* @__PURE__ */ __name(() => open3, "isOpen"),
5040
+ set(next) {
5041
+ if (next === open3) return;
5042
+ open3 = next;
5043
+ for (const listener of [...listeners]) listener();
5044
+ },
5045
+ subscribe(listener) {
5046
+ listeners.add(listener);
5047
+ return () => {
5048
+ listeners.delete(listener);
5049
+ };
5050
+ }
5051
+ };
5052
+ }
5053
+ __name(createQuestionGate, "createQuestionGate");
5054
+ var CHECK_EVERY_MS = 10 * 60 * 1e3;
5055
+ function createBackgroundLearning(options) {
5056
+ const now = options.now ?? Date.now;
5057
+ const controller = new AbortController();
5058
+ let active = 0;
5059
+ let running = null;
5060
+ let lastCheck = Number.NEGATIVE_INFINITY;
5061
+ let waiters = [];
5062
+ const release = /* @__PURE__ */ __name(() => {
5063
+ const ready = waiters;
5064
+ waiters = [];
5065
+ for (const resolve14 of ready) resolve14();
5066
+ }, "release");
5067
+ const quiet = /* @__PURE__ */ __name(() => active === 0 && !options.questions?.isOpen(), "quiet");
5068
+ const untilIdle = /* @__PURE__ */ __name((signal) => new Promise((resolve14, reject) => {
5069
+ if (signal.aborted) return reject(signal.reason);
5070
+ if (quiet()) return resolve14();
5071
+ const onAbort = /* @__PURE__ */ __name(() => {
5072
+ waiters = waiters.filter((w) => w !== done);
5073
+ reject(signal.reason);
5074
+ }, "onAbort");
5075
+ const done = /* @__PURE__ */ __name(() => {
5076
+ signal.removeEventListener("abort", onAbort);
5077
+ resolve14();
5078
+ }, "done");
5079
+ signal.addEventListener("abort", onAbort, { once: true });
5080
+ waiters.push(done);
5081
+ }), "untilIdle");
5082
+ const model = /* @__PURE__ */ __name(async (request) => {
5083
+ for (; ; ) {
5084
+ await untilIdle(request.signal);
5085
+ if (quiet()) return options.learning.model(request);
5086
+ }
5087
+ }, "model");
5088
+ const check = /* @__PURE__ */ __name(async () => {
5089
+ const target = options.openTarget();
5090
+ if (!target) return;
5091
+ await options.flushObservations();
5092
+ const outcome = await (options.run ?? runGeneratorCycle)({
5093
+ target,
5094
+ model,
5095
+ route: /* @__PURE__ */ __name(() => options.learning.route(controller.signal), "route"),
5096
+ settings: options.settings,
5097
+ mode: "automatic",
5098
+ signal: controller.signal,
5099
+ now
5100
+ });
5101
+ if (outcome.status === "ran") options.onOutcome?.(outcome);
5102
+ }, "check");
5103
+ const maybeStart = /* @__PURE__ */ __name(() => {
5104
+ if (!options.settings.enabled || controller.signal.aborted || running) return;
5105
+ if (!quiet() || now() - lastCheck < CHECK_EVERY_MS) return;
5106
+ lastCheck = now();
5107
+ running = check().catch(() => {
5108
+ }).finally(() => {
5109
+ running = null;
5110
+ });
5111
+ }, "maybeStart");
5112
+ const unsubscribe = options.questions?.subscribe(() => {
5113
+ if (!options.questions?.isOpen()) release();
5114
+ });
5115
+ return {
5116
+ turnStarted() {
5117
+ active++;
5118
+ },
5119
+ turnEnded() {
5120
+ active = Math.max(0, active - 1);
5121
+ if (active === 0) release();
5122
+ maybeStart();
5123
+ },
5124
+ async stop() {
5125
+ controller.abort(new Error("The session closed."));
5126
+ unsubscribe?.();
5127
+ release();
5128
+ await running;
5129
+ }
5130
+ };
5131
+ }
5132
+ __name(createBackgroundLearning, "createBackgroundLearning");
5133
+ function withBackgroundLearning(session, learning) {
5134
+ const watch = /* @__PURE__ */ __name((open3) => (...args) => (async function* () {
5135
+ learning.turnStarted();
5136
+ try {
5137
+ yield* open3(...args);
5138
+ } finally {
5139
+ learning.turnEnded();
5140
+ }
5141
+ })(), "watch");
5142
+ return Object.create(session, {
5143
+ send: { value: watch(session.send.bind(session)), enumerable: true },
5144
+ resumePaused: {
5145
+ value: watch(session.resumePaused.bind(session)),
5146
+ enumerable: true
5147
+ },
5148
+ ...session.close ? {
5149
+ close: {
5150
+ value: /* @__PURE__ */ __name(async (...args) => {
5151
+ await learning.stop();
5152
+ return session.close(...args);
5153
+ }, "value"),
5154
+ enumerable: true
5155
+ }
5156
+ } : {}
5157
+ });
5158
+ }
5159
+ __name(withBackgroundLearning, "withBackgroundLearning");
5160
+
5161
+ // src/integrations/learning/learned-notice.ts
5162
+ import { stripVTControlCharacters as stripVTControlCharacters2 } from "node:util";
5163
+ var MAX_CHARS = 110;
5164
+ function describeLearned(outcome) {
5165
+ if (outcome.cycle.status !== "activated") return null;
5166
+ if (outcome.proposal?.status !== "proposed") return null;
5167
+ const chars = Array.from(
5168
+ stripVTControlCharacters2(outcome.proposal.candidate.description).replace(/[\p{Cc}\p{Cf}]/gu, " ").replace(/\s+/g, " ").trim()
5169
+ );
5170
+ const learned = chars.length > MAX_CHARS ? `${chars.slice(0, MAX_CHARS - 1).join("").trimEnd()}\u2026` : chars.join("");
5171
+ if (!learned) return null;
5172
+ return `Namzu learned something for this folder: ${learned} Undo with \`namzu learn --undo\`.`;
5173
+ }
5174
+ __name(describeLearned, "describeLearned");
5175
+
5176
+ // src/integrations/learning/learning-model.ts
5177
+ function createLearningLedger() {
5178
+ let last;
5179
+ return {
5180
+ async chargeNow(input) {
5181
+ const { value, usage } = await input.request();
5182
+ last = usage;
5183
+ return value;
5184
+ },
5185
+ async chargeLater() {
5186
+ },
5187
+ take() {
5188
+ const usage = last;
5189
+ last = void 0;
5190
+ return usage;
5191
+ }
5192
+ };
5193
+ }
5194
+ __name(createLearningLedger, "createLearningLedger");
5195
+ function createSideLearningModel(options) {
5196
+ let queue = Promise.resolve();
5197
+ const model = /* @__PURE__ */ __name((request) => {
5198
+ const run2 = /* @__PURE__ */ __name(async () => {
5199
+ request.signal.throwIfAborted();
5200
+ options.ledger.take();
5201
+ const text2 = await options.side.ask({
5202
+ sessionId: options.sessionId,
5203
+ turnId: generateTurnId(),
5204
+ instruction: request.system,
5205
+ body: request.prompt,
5206
+ maxTokens: request.maxTokens,
5207
+ signal: request.signal,
5208
+ timing: "in-turn"
5209
+ });
5210
+ const usage = options.ledger.take();
5211
+ request.signal.throwIfAborted();
5212
+ if (text2 === void 0) throw new Error("The model did not answer the learning request.");
5213
+ return { text: text2, tokens: usage ? usage.totalTokens : null, costUsd: null };
5214
+ }, "run");
5215
+ const next = queue.then(run2, run2);
5216
+ queue = next.catch(() => {
5217
+ });
5218
+ return next;
5219
+ }, "model");
5220
+ return {
5221
+ model,
5222
+ route: /* @__PURE__ */ __name(async (signal) => {
5223
+ const route = await options.side.route(options.sessionId, signal);
5224
+ return `${route.providerId}/${route.model}`;
5225
+ }, "route")
5226
+ };
5227
+ }
5228
+ __name(createSideLearningModel, "createSideLearningModel");
5229
+
5009
5230
  // src/integrations/mcp/tool-search.ts
5010
5231
  var MCP_TOOL_SEARCH_PERCENT = 10;
5011
5232
  var CHARS_PER_TOKEN = 2.5;
@@ -8117,10 +8338,9 @@ function fileAgentTools(definition, opts) {
8117
8338
  }
8118
8339
  __name(fileAgentTools, "fileAgentTools");
8119
8340
  var SUBAGENT_PROMPT = [
8120
- "You are a focused sub-agent dispatched by namzu to complete one self-contained task and report back.",
8341
+ "You are a focused sub-agent dispatched by namzu, an AI kernel, to complete one self-contained task and report back to the session that started you.",
8121
8342
  "You cannot see the parent conversation \u2014 work only from the prompt you were given.",
8122
- "Use your tools to actually do the work, then end with a concise summary of what you did and any results the parent needs.",
8123
- "Be thorough, and state every assumption you make.",
8343
+ "Use your tools to actually do the work, and finish the whole task. Then end with a report to your parent: what you did, the results and key findings it needs, and every assumption you made. Give the essentials and leave out filler, because your parent relays the report onward.",
8124
8344
  "",
8125
8345
  "Report only results you produced through tool calls, because your parent acts on them:",
8126
8346
  "- Create a file with the `write` tool and change an existing one with `edit`. Report the real path, and say a file exists only after a tool has written it.",
@@ -10276,6 +10496,8 @@ var WORKFLOW_TOOL_DESCRIPTION = [
10276
10496
  "",
10277
10497
  "Quality patterns, when hypermode is on or the task is large: adversarial verify (a second agent tries to disprove each finding), a judge panel (several agents score the same candidates, keep the consensus), loop until dry (repeat a sweep until a pass finds nothing new), and a completeness critic (a last agent lists what the others missed). Pick what fits; skip them for trivial or already verified work.",
10278
10498
  "",
10499
+ 'Example call, one agent per package and one pass over what they found: {"script":"export const meta = { name: \\"audit\\", description: \\"Check each package for stale settings\\", phases: [{ title: \\"Scan\\" }] }\\nconst found = await parallel(args.packages.map((p) => () => agent(\\"List stale settings in \\" + p, { label: p, phase: \\"Scan\\" })))\\nreturn found.filter(Boolean)","args":{"packages":["core","web"]}}.',
10500
+ "",
10279
10501
  "Before it starts the operator sees the name, description, phases, limits and the script, and approves or declines. If they decline, do not retry with the same script; ask what to change."
10280
10502
  ].join("\n");
10281
10503
  function workflowRefusal(turn) {
@@ -11607,15 +11829,23 @@ var MODE_KINDS = new Set(Object.values(KIND_OF));
11607
11829
  function lastSaid(messages) {
11608
11830
  for (let i = messages.length - 1; i >= 0; i--) {
11609
11831
  const kind = reminderKindOf(messages[i]);
11610
- if (kind !== void 0 && (MODE_KINDS.has(kind) || kind === "mode-exit")) return kind;
11832
+ if (kind === void 0) continue;
11833
+ if (MODE_KINDS.has(kind)) return kind;
11834
+ if (kind === "mode-exit") return kind;
11835
+ if (kind === "plan-mode" || kind === "plan-reentry") return "plan";
11836
+ if (kind === "plan-exit") return void 0;
11611
11837
  }
11612
11838
  return void 0;
11613
11839
  }
11614
11840
  __name(lastSaid, "lastSaid");
11841
+ function endedName(last) {
11842
+ return `The ${NAME_OF[last]} permission mode`;
11843
+ }
11844
+ __name(endedName, "endedName");
11615
11845
  function exitSentence(landing) {
11616
11846
  switch (landing) {
11617
11847
  case "plan":
11618
- return "Plan mode is on now, and its own notices say what it allows.";
11848
+ return "Plan mode is on, and its own notices say what it allows.";
11619
11849
  case "prompt":
11620
11850
  return "Shell commands and file changes go through the permission settings again, and the user may be asked before they run.";
11621
11851
  default:
@@ -11627,11 +11857,11 @@ function modeReminders(input) {
11627
11857
  const wanted = announced(input.mode);
11628
11858
  const last = lastSaid(input.messages);
11629
11859
  if (wanted === void 0) {
11630
- if (last === void 0 || last === "mode-exit") return [];
11860
+ if (last === void 0 || last === "mode-exit" || last === "plan") return [];
11631
11861
  return [
11632
11862
  frameReminder(
11633
11863
  "mode-exit",
11634
- `The ${NAME_OF[last]} permission mode has ended. ${exitSentence(input.mode)} ${SAFETY}`
11864
+ `${endedName(last)} has ended. ${exitSentence(input.mode)} ${SAFETY}`
11635
11865
  )
11636
11866
  ];
11637
11867
  }
@@ -11641,9 +11871,9 @@ function modeReminders(input) {
11641
11871
  interactive: input.interactive,
11642
11872
  mode: input.mode
11643
11873
  });
11644
- return [
11645
- frameReminder(wanted, `The ${NAME_OF[wanted]} permission mode is on. ${sentence} ${SAFETY}`)
11646
- ];
11874
+ const began = `The ${NAME_OF[wanted]} permission mode is on.`;
11875
+ const opening = last === void 0 || last === "mode-exit" || last === "plan" ? began : `${endedName(last)} has ended and the ${NAME_OF[wanted]} permission mode is on.`;
11876
+ return [frameReminder(wanted, `${opening} ${sentence} ${SAFETY}`)];
11647
11877
  }
11648
11878
  __name(modeReminders, "modeReminders");
11649
11879
 
@@ -11773,14 +12003,10 @@ function createCliReminderSource(options) {
11773
12003
  if (options.environment) {
11774
12004
  out.push(...environmentReminders({ messages, facts: options.environment() }));
11775
12005
  }
11776
- if (options.interactive !== void 0) {
11777
- out.push(
11778
- ...modeReminders({ messages, mode: options.mode(), interactive: options.interactive })
11779
- );
11780
- }
12006
+ const plan = [];
11781
12007
  if (options.planPath) {
11782
12008
  const planPath = options.planPath();
11783
- out.push(
12009
+ plan.push(
11784
12010
  ...planModeReminders({
11785
12011
  messages,
11786
12012
  mode: options.mode(),
@@ -11790,6 +12016,14 @@ function createCliReminderSource(options) {
11790
12016
  })
11791
12017
  );
11792
12018
  }
12019
+ const planEnd = plan.filter((text2) => text2.startsWith('<system-reminder kind="plan-exit"'));
12020
+ out.push(...planEnd);
12021
+ if (options.interactive !== void 0) {
12022
+ out.push(
12023
+ ...modeReminders({ messages, mode: options.mode(), interactive: options.interactive })
12024
+ );
12025
+ }
12026
+ out.push(...plan.filter((text2) => !planEnd.includes(text2)));
11793
12027
  if (options.hypermode) out.push(...hypermodeReminders({ messages, ...options.hypermode() }));
11794
12028
  if (options.tasks) {
11795
12029
  const nudge = taskNudge(messages, []);
@@ -12683,10 +12917,10 @@ function clipRequestContext(prompt, limit, kind) {
12683
12917
  __name(clipRequestContext, "clipRequestContext");
12684
12918
  async function createAgentSession(prefs, detected, options = {}) {
12685
12919
  if (options.palEnvironment) {
12686
- const { createPalAgentSession } = await import("./agent-session-2MVAYKJC.js");
12920
+ const { createPalAgentSession } = await import("./agent-session-SY5BWKNS.js");
12687
12921
  return createPalAgentSession(prefs, detected, options);
12688
12922
  }
12689
- const { palAtWorkspace } = await import("./store-WJEK5ZI2.js");
12923
+ const { palAtWorkspace } = await import("./store-MKUMQQBF.js");
12690
12924
  if (palAtWorkspace(options.cwd ?? process.cwd()))
12691
12925
  throw new Error("This Pal requires its owned virtual computer. Open it with namzu pal chat.");
12692
12926
  const commandArguments = builtinCommandArguments();
@@ -12771,6 +13005,14 @@ async function createAgentSession(prefs, detected, options = {}) {
12771
13005
  );
12772
13006
  }
12773
13007
  const scope2 = options.scope ?? mintScope(projectId, options.sessionId);
13008
+ const learningFeed = options.learningObservations === true && !options.ephemeral ? createSessionLearningFeed({
13009
+ paths,
13010
+ // The installation's own tenant, so `namzu learning --sessions` finds it again.
13011
+ tenantId: readIdentity(paths.home)?.tenantId ?? scope2.tenantId,
13012
+ projectId,
13013
+ sessionId: String(scope2.sessionId)
13014
+ }) : void 0;
13015
+ const projectGuidance = options.ephemeral ? null : await readProjectGuidance(paths, readIdentity(paths.home)?.tenantId ?? scope2.tenantId);
12774
13016
  const primary = primaryProvider(prefs);
12775
13017
  const entry = PROVIDER_REGISTRY[primary.id];
12776
13018
  if (!entry) {
@@ -13251,6 +13493,7 @@ async function createAgentSession(prefs, detected, options = {}) {
13251
13493
  toolsets.push(toolset("web-search", [webSearchTool]));
13252
13494
  }
13253
13495
  let sideModel;
13496
+ let learning;
13254
13497
  const webCapability = options.web?.fetch ? {
13255
13498
  // A page may be ten mebibytes; the guard's own
13256
13499
  // default is two.
@@ -13531,6 +13774,26 @@ async function createAgentSession(prefs, detected, options = {}) {
13531
13774
  ledger: sub.sideLedger,
13532
13775
  debug: /* @__PURE__ */ __name((message2, error) => cliLogger().debug(message2, exceptionAttributes(error)), "debug")
13533
13776
  });
13777
+ const learningLedger = createLearningLedger();
13778
+ learning = createSideLearningModel({
13779
+ side: createSideModel({
13780
+ active: /* @__PURE__ */ __name(() => ({
13781
+ providerId: turnRouteTarget?.provider ?? primary.id,
13782
+ model: turnRouteTarget?.model ?? model
13783
+ }), "active"),
13784
+ configured: options.smallModel,
13785
+ isKnownProvider: /* @__PURE__ */ __name((id) => findDetected(detected, id) != null, "isKnownProvider"),
13786
+ buildProvider: /* @__PURE__ */ __name((sessionId, target) => providerForModel(sessionId, target.providerId, target.model), "buildProvider"),
13787
+ offerable: /* @__PURE__ */ __name((providerId, listed) => {
13788
+ const found = findDetected(detected, providerId);
13789
+ return found != null && canSelectModel(found.entry, found.apiKey, listed.id) && isOfferableModel(providerId, listed.id);
13790
+ }, "offerable"),
13791
+ ledger: learningLedger,
13792
+ debug: /* @__PURE__ */ __name((message2, error) => cliLogger().debug(message2, exceptionAttributes(error)), "debug")
13793
+ }),
13794
+ ledger: learningLedger,
13795
+ sessionId: scope2.sessionId
13796
+ });
13534
13797
  const agentToolsets = [toolset("agents", [sub.agentTool, sub.waitForTaskTool])];
13535
13798
  if (sub.modelCatalogueTool)
13536
13799
  agentToolsets.push(toolset("agents:model-catalogue", [sub.modelCatalogueTool]));
@@ -13768,7 +14031,7 @@ async function createAgentSession(prefs, detected, options = {}) {
13768
14031
  );
13769
14032
  toolsets.push(options.toolLoading === "eager" ? monitorToolset : deferred(monitorToolset));
13770
14033
  }
13771
- const operatorPals = await import("./operator-tools-O2MDVMJP.js");
14034
+ const operatorPals = await import("./operator-tools-VBLGZWBL.js");
13772
14035
  toolsets.push(
13773
14036
  readyWhen(
13774
14037
  toolset(
@@ -14324,7 +14587,7 @@ async function createAgentSession(prefs, detected, options = {}) {
14324
14587
  if (failure) yield { kind: "error", message: failure.message };
14325
14588
  })();
14326
14589
  }, "resumePausedStream");
14327
- return {
14590
+ const agentSession = {
14328
14591
  hasProvider: true,
14329
14592
  autoMode: {
14330
14593
  available: sessionClassifier !== void 0,
@@ -14532,6 +14795,7 @@ async function createAgentSession(prefs, detected, options = {}) {
14532
14795
  }))(workflowHost)
14533
14796
  } : {},
14534
14797
  ...sideModel ? { sideModel } : {},
14798
+ ...learning ? { learning } : {},
14535
14799
  ...subagentRuntime ? {
14536
14800
  subagents: subagentRuntime.activity,
14537
14801
  onSubagentReport: /* @__PURE__ */ __name((listener) => {
@@ -14900,10 +15164,16 @@ async function createAgentSession(prefs, detected, options = {}) {
14900
15164
  }, "render")
14901
15165
  });
14902
15166
  }
15167
+ if (projectGuidance)
15168
+ promptContributions.register({
15169
+ id: "namzu.learning.project-guidance",
15170
+ placement: "context",
15171
+ render: /* @__PURE__ */ __name(() => projectGuidance, "render")
15172
+ });
14903
15173
  promptContributions.register({
14904
15174
  id: "namzu.turn-snapshot",
14905
15175
  placement: "context",
14906
- render: /* @__PURE__ */ __name(({ iteration }) => iteration === 1 ? turnSnapshotPrompt : null, "render")
15176
+ render: /* @__PURE__ */ __name(() => turnSnapshotPrompt, "render")
14907
15177
  });
14908
15178
  if (webCapability) promptContributions.register(webGuidanceContribution);
14909
15179
  const childOperatorNotices = options.ephemeral ? [] : await readChildOperatorNotices(paths, turnScope.sessionId);
@@ -15219,6 +15489,26 @@ async function createAgentSession(prefs, detected, options = {}) {
15219
15489
  });
15220
15490
  }), "abandonTurn")
15221
15491
  };
15492
+ const watched = learningFeed ? withSessionLearningFeed(agentSession, learningFeed) : agentSession;
15493
+ const background = options.backgroundLearning;
15494
+ if (!background || !learningFeed || !learning) return watched;
15495
+ const generator = resolveGeneratorSettings(background.config);
15496
+ if (!generator.enabled) return watched;
15497
+ const tenantId = readIdentity(paths.home)?.tenantId ?? scope2.tenantId;
15498
+ return withBackgroundLearning(
15499
+ watched,
15500
+ createBackgroundLearning({
15501
+ settings: generator,
15502
+ openTarget: /* @__PURE__ */ __name(() => openLearningTarget(paths, tenantId, projectId), "openTarget"),
15503
+ learning,
15504
+ ...background.questions ? { questions: background.questions } : {},
15505
+ flushObservations: /* @__PURE__ */ __name(() => learningFeed.flush(), "flushObservations"),
15506
+ onOutcome: /* @__PURE__ */ __name((outcome) => {
15507
+ const line = describeLearned(outcome);
15508
+ if (line) background.onLearned?.(line);
15509
+ }, "onOutcome")
15510
+ })
15511
+ );
15222
15512
  }
15223
15513
  __name(createAgentSession, "createAgentSession");
15224
15514
  function planFallbacks(members, detected) {
@@ -16582,6 +16872,7 @@ export {
16582
16872
  AGENT_LAUNCH_TOOL,
16583
16873
  visibleProjectInstructionPath,
16584
16874
  DEFERRED_TOOL_GUIDANCE,
16875
+ createQuestionGate,
16585
16876
  sessionLogCheckpointView,
16586
16877
  DEFAULT_AGENT_WORKFLOW,
16587
16878
  DEFAULT_AGENT_PHASE,
@@ -16642,4 +16933,4 @@ export {
16642
16933
  RESULT_SUMMARY_WHOLE_MAX,
16643
16934
  resultSummaryLine
16644
16935
  };
16645
- //# sourceMappingURL=chunk-YXZBHG5N.js.map
16936
+ //# sourceMappingURL=chunk-6DY377DD.js.map