@markusylisiurunen/tau 0.3.99 → 0.3.101

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 (317) hide show
  1. package/dist/core/code_mode/agents.js +62 -14
  2. package/dist/core/code_mode/agents.js.map +1 -1
  3. package/dist/core/code_mode/history.js +7 -0
  4. package/dist/core/code_mode/history.js.map +1 -1
  5. package/dist/core/code_mode/models.js.map +1 -1
  6. package/dist/core/code_mode/web.js.map +1 -1
  7. package/dist/core/config/content_loader.js.map +1 -1
  8. package/dist/core/config/index.js +2 -1
  9. package/dist/core/config/index.js.map +1 -1
  10. package/dist/core/config/ownership.js +71 -0
  11. package/dist/core/config/ownership.js.map +1 -0
  12. package/dist/core/config/runtime.js +22 -10
  13. package/dist/core/config/runtime.js.map +1 -1
  14. package/dist/core/config/runtime_config_snapshot.js +2 -2
  15. package/dist/core/config/runtime_config_snapshot.js.map +1 -1
  16. package/dist/core/config/schema.js +3 -2
  17. package/dist/core/config/schema.js.map +1 -1
  18. package/dist/core/history/agent_history_recorder.js +64 -0
  19. package/dist/core/history/agent_history_recorder.js.map +1 -0
  20. package/dist/core/history/cli.js +2 -2
  21. package/dist/core/history/cli.js.map +1 -1
  22. package/dist/core/history/config.js.map +1 -1
  23. package/dist/core/history/history_manager.js +14 -29
  24. package/dist/core/history/history_manager.js.map +1 -1
  25. package/dist/core/history/local_history_store.js +43 -10
  26. package/dist/core/history/local_history_store.js.map +1 -1
  27. package/dist/core/history/migrations.js +1 -1
  28. package/dist/core/history/migrations.js.map +1 -1
  29. package/dist/core/history/remote_history_client.js +2 -0
  30. package/dist/core/history/remote_history_client.js.map +1 -1
  31. package/dist/core/history/setup.js +10 -8
  32. package/dist/core/history/setup.js.map +1 -1
  33. package/dist/core/index.js +1 -1
  34. package/dist/core/index.js.map +1 -1
  35. package/dist/core/runtime/agent_model.js.map +1 -1
  36. package/dist/core/runtime/chat_runtime.js +6 -5
  37. package/dist/core/runtime/chat_runtime.js.map +1 -1
  38. package/dist/core/runtime/session_prompt_composer.js +2 -6
  39. package/dist/core/runtime/session_prompt_composer.js.map +1 -1
  40. package/dist/core/static/code_mode/history/documentation.md +22 -4
  41. package/dist/core/static/index.js +22 -11
  42. package/dist/core/static/index.js.map +1 -1
  43. package/dist/core/static/prompts/subagent-prefix.md +13 -5
  44. package/dist/core/static/tau_docs/code-mode.md +2 -2
  45. package/dist/core/static/tau_docs/config-reference.md +23 -9
  46. package/dist/core/static/tau_docs/configuration.md +13 -2
  47. package/dist/core/static/tau_docs/credentials.md +1 -1
  48. package/dist/core/static/tau_docs/history.md +44 -4
  49. package/dist/core/static/tau_docs/image-generation.md +27 -20
  50. package/dist/core/static/tau_docs/models.md +1 -1
  51. package/dist/core/static/tau_docs/node-sdk.md +10 -10
  52. package/dist/core/static/tau_docs/ownership-and-scope.md +7 -5
  53. package/dist/core/static/tau_docs/personas.md +2 -2
  54. package/dist/core/static/tau_docs/prompts-and-project-context.md +2 -2
  55. package/dist/core/static/tau_docs/remote-sessions.md +3 -2
  56. package/dist/core/static/tau_docs/security.md +11 -3
  57. package/dist/core/static/tau_docs/session-protocol-methods.md +50 -2
  58. package/dist/core/static/tau_docs/session-protocol.md +41 -12
  59. package/dist/core/static/tau_docs/sessions.md +5 -3
  60. package/dist/core/static/tau_docs/subagents.md +69 -52
  61. package/dist/core/static/tau_docs/telegram-projects.md +62 -4
  62. package/dist/core/static/tau_docs/telegram.md +9 -6
  63. package/dist/core/static/tau_docs/tools.md +1 -1
  64. package/dist/core/static/tau_docs/troubleshooting.md +8 -6
  65. package/dist/core/static/tau_docs/tui.md +28 -11
  66. package/dist/core/subagents/agent_supervisor.js +196 -15
  67. package/dist/core/subagents/agent_supervisor.js.map +1 -1
  68. package/dist/core/subagents/claude_code_runner.mjs +52 -51
  69. package/dist/core/subagents/native_subagent_runtime.js +43 -14
  70. package/dist/core/subagents/native_subagent_runtime.js.map +1 -1
  71. package/dist/core/subagents/prompt.js.map +1 -1
  72. package/dist/core/subagents/registry.js +1 -0
  73. package/dist/core/subagents/registry.js.map +1 -1
  74. package/dist/core/subagents/runtime.js.map +1 -1
  75. package/dist/core/subagents/types.js +2 -1
  76. package/dist/core/subagents/types.js.map +1 -1
  77. package/dist/core/telegram/adapter.js +17 -20
  78. package/dist/core/telegram/adapter.js.map +1 -1
  79. package/dist/core/telegram/cli.js +24 -12
  80. package/dist/core/telegram/cli.js.map +1 -1
  81. package/dist/core/telegram/config.js +2 -0
  82. package/dist/core/telegram/config.js.map +1 -1
  83. package/dist/core/telegram/local_session_client.js +2 -2
  84. package/dist/core/telegram/local_session_client.js.map +1 -1
  85. package/dist/core/telegram/runtime.js +10 -1
  86. package/dist/core/telegram/runtime.js.map +1 -1
  87. package/dist/core/telegram/session_manager.js +12 -0
  88. package/dist/core/telegram/session_manager.js.map +1 -1
  89. package/dist/core/telegram/workspace.js +21 -0
  90. package/dist/core/telegram/workspace.js.map +1 -1
  91. package/dist/core/tool/cli.js +1 -1
  92. package/dist/core/tool/image_generate.js +6 -2
  93. package/dist/core/tool/image_generate.js.map +1 -1
  94. package/dist/core/tools/catalog.js +24 -14
  95. package/dist/core/tools/catalog.js.map +1 -1
  96. package/dist/core/tools/wait_for_agents.js.map +1 -1
  97. package/dist/core/utils/model_notices.js.map +1 -1
  98. package/dist/core/utils/speech_to_text_keywords.js +10 -4
  99. package/dist/core/utils/speech_to_text_keywords.js.map +1 -1
  100. package/dist/core/version.js +2 -2
  101. package/dist/core/version.js.map +1 -1
  102. package/dist/diff_tool/app/dist/assets/andromeeda-DW8vo71h.js +1 -0
  103. package/dist/diff_tool/app/dist/assets/aurora-x-rMvKqtYI.js +1 -0
  104. package/dist/diff_tool/app/dist/assets/ayu-dark-CwczpL8O.js +1 -0
  105. package/dist/diff_tool/app/dist/assets/ayu-light-DSh22xiD.js +1 -0
  106. package/dist/diff_tool/app/dist/assets/ayu-mirage-JE6hAyHG.js +1 -0
  107. package/dist/diff_tool/app/dist/assets/catppuccin-frappe-pyXErRRU.js +1 -0
  108. package/dist/diff_tool/app/dist/assets/catppuccin-latte-BILSUICr.js +1 -0
  109. package/dist/diff_tool/app/dist/assets/catppuccin-macchiato-Ck60ZZQE.js +1 -0
  110. package/dist/diff_tool/app/dist/assets/catppuccin-mocha-C_2G67cS.js +1 -0
  111. package/dist/diff_tool/app/dist/assets/{core-D8lOlLN2.js → core-CXVpaOO1.js} +1 -1
  112. package/dist/diff_tool/app/dist/assets/dark-plus-CHgc6GYj.js +1 -0
  113. package/dist/diff_tool/app/dist/assets/dracula-Cf1PG3MT.js +1 -0
  114. package/dist/diff_tool/app/dist/assets/dracula-soft-DXuNm1Kq.js +1 -0
  115. package/dist/diff_tool/app/dist/assets/engine-oniguruma-Rz_7DPcV.js +1 -0
  116. package/dist/diff_tool/app/dist/assets/everforest-dark-CjdfwUBe.js +1 -0
  117. package/dist/diff_tool/app/dist/assets/everforest-light-CfVwwCBP.js +1 -0
  118. package/dist/diff_tool/app/dist/assets/github-dark-BL6HSl_n.js +1 -0
  119. package/dist/diff_tool/app/dist/assets/github-dark-default-zacuWV-M.js +1 -0
  120. package/dist/diff_tool/app/dist/assets/github-dark-dimmed-Mc0P9idi.js +1 -0
  121. package/dist/diff_tool/app/dist/assets/github-dark-high-contrast-IMKX2AVF.js +1 -0
  122. package/dist/diff_tool/app/dist/assets/github-light-default-DVlCqP3X.js +1 -0
  123. package/dist/diff_tool/app/dist/assets/github-light-high-contrast-Dj6zTyWR.js +1 -0
  124. package/dist/diff_tool/app/dist/assets/github-light-mYhEBkPo.js +1 -0
  125. package/dist/diff_tool/app/dist/assets/gruvbox-dark-hard-QTgQQZn-.js +1 -0
  126. package/dist/diff_tool/app/dist/assets/gruvbox-dark-medium-9d5YdCTx.js +1 -0
  127. package/dist/diff_tool/app/dist/assets/gruvbox-dark-soft-XCkqeBhR.js +1 -0
  128. package/dist/diff_tool/app/dist/assets/gruvbox-light-hard--5-nXqNp.js +1 -0
  129. package/dist/diff_tool/app/dist/assets/gruvbox-light-medium-COA1PZW2.js +1 -0
  130. package/dist/diff_tool/app/dist/assets/gruvbox-light-soft-CIJpzjAO.js +1 -0
  131. package/dist/diff_tool/app/dist/assets/highlights-DuJNYjEh.js +7 -0
  132. package/dist/diff_tool/app/dist/assets/horizon-Ba2cwkSy.js +1 -0
  133. package/dist/diff_tool/app/dist/assets/horizon-bright-DaEDgBmR.js +1 -0
  134. package/dist/diff_tool/app/dist/assets/houston-B6x0XVpU.js +1 -0
  135. package/dist/diff_tool/app/dist/assets/index-F9is7PUw.js +221 -0
  136. package/dist/diff_tool/app/dist/assets/kanagawa-dragon-DhTFvBMT.js +1 -0
  137. package/dist/diff_tool/app/dist/assets/kanagawa-lotus--m8sdOxn.js +1 -0
  138. package/dist/diff_tool/app/dist/assets/kanagawa-wave-D-tTv4k2.js +1 -0
  139. package/dist/diff_tool/app/dist/assets/langs-CTftvgbb.js +1 -0
  140. package/dist/diff_tool/app/dist/assets/laserwave-HSLx0L75.js +1 -0
  141. package/dist/diff_tool/app/dist/assets/lib-BKZ5ZaMU.js +1 -0
  142. package/dist/diff_tool/app/dist/assets/light-plus-CUjWrTSi.js +1 -0
  143. package/dist/diff_tool/app/dist/assets/loader-bi21_x0K.js +1 -0
  144. package/dist/diff_tool/app/dist/assets/material-theme-CnthUGfg.js +1 -0
  145. package/dist/diff_tool/app/dist/assets/material-theme-darker-DUi03Qre.js +1 -0
  146. package/dist/diff_tool/app/dist/assets/material-theme-lighter-D2-qr5Vw.js +1 -0
  147. package/dist/diff_tool/app/dist/assets/material-theme-ocean-CWR-LogA.js +1 -0
  148. package/dist/diff_tool/app/dist/assets/material-theme-palenight-Cnv8m1ra.js +1 -0
  149. package/dist/diff_tool/app/dist/assets/min-dark-EXoM-6Xo.js +1 -0
  150. package/dist/diff_tool/app/dist/assets/min-light-DVOTDhnA.js +1 -0
  151. package/dist/diff_tool/app/dist/assets/monokai-DkggTbGy.js +1 -0
  152. package/dist/diff_tool/app/dist/assets/night-owl-Bdcs0PMi.js +1 -0
  153. package/dist/diff_tool/app/dist/assets/night-owl-light-RoU30LE0.js +1 -0
  154. package/dist/diff_tool/app/dist/assets/nord-u7hMircQ.js +1 -0
  155. package/dist/diff_tool/app/dist/assets/one-dark-pro-08PdtLzi.js +1 -0
  156. package/dist/diff_tool/app/dist/assets/one-light-DgvUEtgI.js +1 -0
  157. package/dist/diff_tool/app/dist/assets/pierre-dark-B2jZWvHG.js +1 -0
  158. package/dist/diff_tool/app/dist/assets/pierre-dark-protanopia-deuteranopia-CebgQdRf.js +1 -0
  159. package/dist/diff_tool/app/dist/assets/pierre-dark-soft-DdE7dyP3.js +1 -0
  160. package/dist/diff_tool/app/dist/assets/pierre-dark-tritanopia-CXimiT7X.js +1 -0
  161. package/dist/diff_tool/app/dist/assets/pierre-dark-vibrant-DzBsxHvQ.js +1 -0
  162. package/dist/diff_tool/app/dist/assets/pierre-light-Vf__O3ev.js +1 -0
  163. package/dist/diff_tool/app/dist/assets/pierre-light-protanopia-deuteranopia-BUtWcCQC.js +1 -0
  164. package/dist/diff_tool/app/dist/assets/pierre-light-soft-C3QCXKvN.js +1 -0
  165. package/dist/diff_tool/app/dist/assets/pierre-light-tritanopia-CKLy6XvA.js +1 -0
  166. package/dist/diff_tool/app/dist/assets/pierre-light-vibrant-DDuTEIhH.js +1 -0
  167. package/dist/diff_tool/app/dist/assets/plastic-B8mE6BxX.js +1 -0
  168. package/dist/diff_tool/app/dist/assets/poimandres-DUFjrgxT.js +1 -0
  169. package/dist/diff_tool/app/dist/assets/red-BJvdDEUx.js +1 -0
  170. package/dist/diff_tool/app/dist/assets/rose-pine-BSqRqUae.js +1 -0
  171. package/dist/diff_tool/app/dist/assets/rose-pine-dawn-U6TBE82u.js +1 -0
  172. package/dist/diff_tool/app/dist/assets/rose-pine-moon-CAU7u1h4.js +1 -0
  173. package/dist/diff_tool/app/dist/assets/shiki-D6ZyrNQD.js +2 -0
  174. package/dist/diff_tool/app/dist/assets/slack-dark-CMu0smFa.js +1 -0
  175. package/dist/diff_tool/app/dist/assets/slack-ochin-BBne7cjw.js +1 -0
  176. package/dist/diff_tool/app/dist/assets/snazzy-light-CV8HUEmk.js +1 -0
  177. package/dist/diff_tool/app/dist/assets/solarized-dark-CmYmhSgI.js +1 -0
  178. package/dist/diff_tool/app/dist/assets/solarized-light-CjLLwxRp.js +1 -0
  179. package/dist/diff_tool/app/dist/assets/{stream-tokenizer-BkuDYA48.js → stream-tokenizer-BdsyU_yB.js} +4 -4
  180. package/dist/diff_tool/app/dist/assets/synthwave-84-wQeDKbzQ.js +1 -0
  181. package/dist/diff_tool/app/dist/assets/{themes-BaMgiyFz.js → themes-9lpTYI_i.js} +2 -2
  182. package/dist/diff_tool/app/dist/assets/tokyo-night-D4ZgDiA7.js +1 -0
  183. package/dist/diff_tool/app/dist/assets/vesper-sUHevyKv.js +1 -0
  184. package/dist/diff_tool/app/dist/assets/vitesse-black-CfklMpOb.js +1 -0
  185. package/dist/diff_tool/app/dist/assets/vitesse-dark-CJkzwmKT.js +1 -0
  186. package/dist/diff_tool/app/dist/assets/vitesse-light-BxMp8E1Y.js +1 -0
  187. package/dist/diff_tool/app/dist/assets/wasm-4KdTHw0F.js +1 -0
  188. package/dist/diff_tool/app/dist/index.html +2 -2
  189. package/dist/history/worker/index.js +140 -15
  190. package/dist/history/worker/index.js.map +1 -1
  191. package/dist/history/worker/migrations/0002_parent_session.sql +3 -0
  192. package/dist/history/worker/viewer.css +10 -1
  193. package/dist/host/local_session_host.js +304 -172
  194. package/dist/host/local_session_host.js.map +1 -1
  195. package/dist/host/session_bootstrap.js +53 -0
  196. package/dist/host/session_bootstrap.js.map +1 -0
  197. package/dist/host/session_host.js +2 -0
  198. package/dist/host/session_host.js.map +1 -1
  199. package/dist/host/session_protocol_handler.js +11 -1
  200. package/dist/host/session_protocol_handler.js.map +1 -1
  201. package/dist/main.js +48 -95
  202. package/dist/main.js.map +1 -1
  203. package/dist/protocol/environment_variables.d.ts +2 -0
  204. package/dist/protocol/environment_variables.js +7 -0
  205. package/dist/protocol/environment_variables.js.map +1 -0
  206. package/dist/protocol/session_protocol.d.ts +27 -3
  207. package/dist/protocol/session_protocol.js +41 -7
  208. package/dist/protocol/session_protocol.js.map +1 -1
  209. package/dist/sdk/client.js +2 -2
  210. package/dist/sdk/client.js.map +1 -1
  211. package/dist/sdk/local_client.d.ts +2 -2
  212. package/dist/sdk/local_client.js +11 -66
  213. package/dist/sdk/local_client.js.map +1 -1
  214. package/dist/sdk/session.js +12 -0
  215. package/dist/sdk/session.js.map +1 -1
  216. package/dist/sdk/types.d.ts +10 -0
  217. package/dist/store/session_snapshot_migrations.js +40 -1
  218. package/dist/store/session_snapshot_migrations.js.map +1 -1
  219. package/dist/tui/chat_view.js +5 -0
  220. package/dist/tui/chat_view.js.map +1 -1
  221. package/dist/tui/host_diagnostic_relay.js +44 -0
  222. package/dist/tui/host_diagnostic_relay.js.map +1 -0
  223. package/dist/tui/index.js +1 -0
  224. package/dist/tui/index.js.map +1 -1
  225. package/dist/tui/listen_capture.js +7 -9
  226. package/dist/tui/listen_capture.js.map +1 -1
  227. package/dist/tui/session_chat_app.js +2 -2
  228. package/dist/tui/session_chat_app.js.map +1 -1
  229. package/dist/tui/session_chat_controller.js +89 -13
  230. package/dist/tui/session_chat_controller.js.map +1 -1
  231. package/dist/tui/terminal.js +13 -2
  232. package/dist/tui/terminal.js.map +1 -1
  233. package/dist/tui/ui/subagent_panel.js +45 -14
  234. package/dist/tui/ui/subagent_panel.js.map +1 -1
  235. package/package.json +11 -11
  236. package/dist/diff_tool/app/dist/assets/andromeeda-BJLMrMlp.js +0 -1
  237. package/dist/diff_tool/app/dist/assets/aurora-x-BCChoRpm.js +0 -1
  238. package/dist/diff_tool/app/dist/assets/ayu-dark-DzFZPuMV.js +0 -1
  239. package/dist/diff_tool/app/dist/assets/ayu-light-DSkcX_XD.js +0 -1
  240. package/dist/diff_tool/app/dist/assets/ayu-mirage-DSve0zuE.js +0 -1
  241. package/dist/diff_tool/app/dist/assets/catppuccin-frappe-DbLkF0J2.js +0 -1
  242. package/dist/diff_tool/app/dist/assets/catppuccin-latte-b6208YQK.js +0 -1
  243. package/dist/diff_tool/app/dist/assets/catppuccin-macchiato-CNNBbV1L.js +0 -1
  244. package/dist/diff_tool/app/dist/assets/catppuccin-mocha-DHkNF0Mp.js +0 -1
  245. package/dist/diff_tool/app/dist/assets/dark-plus-BVZ_4wTZ.js +0 -1
  246. package/dist/diff_tool/app/dist/assets/dracula-BoZgXveB.js +0 -1
  247. package/dist/diff_tool/app/dist/assets/dracula-soft-D-Kgh5gw.js +0 -1
  248. package/dist/diff_tool/app/dist/assets/everforest-dark-Y6tr-2zD.js +0 -1
  249. package/dist/diff_tool/app/dist/assets/everforest-light-CA0Ol4Qu.js +0 -1
  250. package/dist/diff_tool/app/dist/assets/github-dark-C895GGrm.js +0 -1
  251. package/dist/diff_tool/app/dist/assets/github-dark-default-CM8LCIj6.js +0 -1
  252. package/dist/diff_tool/app/dist/assets/github-dark-dimmed-jPx1V1fR.js +0 -1
  253. package/dist/diff_tool/app/dist/assets/github-dark-high-contrast-UN5YjL_Z.js +0 -1
  254. package/dist/diff_tool/app/dist/assets/github-light-B4HDwToD.js +0 -1
  255. package/dist/diff_tool/app/dist/assets/github-light-default-CfC59JYV.js +0 -1
  256. package/dist/diff_tool/app/dist/assets/github-light-high-contrast-C3edEHcK.js +0 -1
  257. package/dist/diff_tool/app/dist/assets/gruvbox-dark-hard-BdGOuxq8.js +0 -1
  258. package/dist/diff_tool/app/dist/assets/gruvbox-dark-medium-CmygtSMi.js +0 -1
  259. package/dist/diff_tool/app/dist/assets/gruvbox-dark-soft-BJH4XuY9.js +0 -1
  260. package/dist/diff_tool/app/dist/assets/gruvbox-light-hard-BkSILF4E.js +0 -1
  261. package/dist/diff_tool/app/dist/assets/gruvbox-light-medium-DiZUfgdz.js +0 -1
  262. package/dist/diff_tool/app/dist/assets/gruvbox-light-soft-CRCTnbIj.js +0 -1
  263. package/dist/diff_tool/app/dist/assets/highlights-B80gocb2.js +0 -3
  264. package/dist/diff_tool/app/dist/assets/horizon-DUI96lQn.js +0 -1
  265. package/dist/diff_tool/app/dist/assets/horizon-bright-COxh1lHf.js +0 -1
  266. package/dist/diff_tool/app/dist/assets/houston-DduE73P7.js +0 -1
  267. package/dist/diff_tool/app/dist/assets/index-DSKn9aHV.js +0 -205
  268. package/dist/diff_tool/app/dist/assets/kanagawa-dragon-BHDhSKDf.js +0 -1
  269. package/dist/diff_tool/app/dist/assets/kanagawa-lotus-NJjGXXql.js +0 -1
  270. package/dist/diff_tool/app/dist/assets/kanagawa-wave-DsGe2Uqk.js +0 -1
  271. package/dist/diff_tool/app/dist/assets/langs-Cb6u03GG.js +0 -1
  272. package/dist/diff_tool/app/dist/assets/laserwave-DYV0fvJ_.js +0 -1
  273. package/dist/diff_tool/app/dist/assets/lib-BFrBoEqQ.js +0 -9
  274. package/dist/diff_tool/app/dist/assets/light-plus-FTnIShls.js +0 -1
  275. package/dist/diff_tool/app/dist/assets/loader-DYYMIDWx.js +0 -1
  276. package/dist/diff_tool/app/dist/assets/material-theme-IcIb8QNx.js +0 -1
  277. package/dist/diff_tool/app/dist/assets/material-theme-darker-B_f2vxdL.js +0 -1
  278. package/dist/diff_tool/app/dist/assets/material-theme-lighter-CR2Q-4Hp.js +0 -1
  279. package/dist/diff_tool/app/dist/assets/material-theme-ocean-BX6hAJ_y.js +0 -1
  280. package/dist/diff_tool/app/dist/assets/material-theme-palenight-B6DWAotd.js +0 -1
  281. package/dist/diff_tool/app/dist/assets/min-dark-DECtZcqS.js +0 -1
  282. package/dist/diff_tool/app/dist/assets/min-light-qRIVcaqf.js +0 -1
  283. package/dist/diff_tool/app/dist/assets/monokai-CLmrJ-8t.js +0 -1
  284. package/dist/diff_tool/app/dist/assets/night-owl-eR4AsyAP.js +0 -1
  285. package/dist/diff_tool/app/dist/assets/night-owl-light-C74n5ti-.js +0 -1
  286. package/dist/diff_tool/app/dist/assets/nord-D4wy7NEP.js +0 -1
  287. package/dist/diff_tool/app/dist/assets/one-dark-pro-28TLzoS8.js +0 -1
  288. package/dist/diff_tool/app/dist/assets/one-light-C0UY_Fh7.js +0 -1
  289. package/dist/diff_tool/app/dist/assets/pierre-dark-fPlffE7i.js +0 -1
  290. package/dist/diff_tool/app/dist/assets/pierre-dark-protanopia-deuteranopia-BmjibgrW.js +0 -1
  291. package/dist/diff_tool/app/dist/assets/pierre-dark-soft-Cng2SYKc.js +0 -1
  292. package/dist/diff_tool/app/dist/assets/pierre-dark-tritanopia-DneQ5i7L.js +0 -1
  293. package/dist/diff_tool/app/dist/assets/pierre-dark-vibrant-BUK9Y-N_.js +0 -1
  294. package/dist/diff_tool/app/dist/assets/pierre-light-BvcXQJIj.js +0 -1
  295. package/dist/diff_tool/app/dist/assets/pierre-light-protanopia-deuteranopia-Cd5nk0bp.js +0 -1
  296. package/dist/diff_tool/app/dist/assets/pierre-light-soft-BvU23vks.js +0 -1
  297. package/dist/diff_tool/app/dist/assets/pierre-light-tritanopia-BSHccQzI.js +0 -1
  298. package/dist/diff_tool/app/dist/assets/pierre-light-vibrant-BgMZEwQI.js +0 -1
  299. package/dist/diff_tool/app/dist/assets/plastic-B2V_PDVk.js +0 -1
  300. package/dist/diff_tool/app/dist/assets/poimandres-DB9-pI6r.js +0 -1
  301. package/dist/diff_tool/app/dist/assets/red-CqYzoXtd.js +0 -1
  302. package/dist/diff_tool/app/dist/assets/rose-pine-C3zjVKxG.js +0 -1
  303. package/dist/diff_tool/app/dist/assets/rose-pine-dawn-C72QYfqa.js +0 -1
  304. package/dist/diff_tool/app/dist/assets/rose-pine-moon-CSM8ewhO.js +0 -1
  305. package/dist/diff_tool/app/dist/assets/shiki-DaptjTao.js +0 -2
  306. package/dist/diff_tool/app/dist/assets/slack-dark-Dtzi51su.js +0 -1
  307. package/dist/diff_tool/app/dist/assets/slack-ochin-Bb7oPExa.js +0 -1
  308. package/dist/diff_tool/app/dist/assets/snazzy-light-DXgiwzKu.js +0 -1
  309. package/dist/diff_tool/app/dist/assets/solarized-dark-BKOT3ICq.js +0 -1
  310. package/dist/diff_tool/app/dist/assets/solarized-light--Lk5pOfE.js +0 -1
  311. package/dist/diff_tool/app/dist/assets/synthwave-84-BJJFg-sc.js +0 -1
  312. package/dist/diff_tool/app/dist/assets/tokyo-night-DvpptEDd.js +0 -1
  313. package/dist/diff_tool/app/dist/assets/vesper-C1rBZbON.js +0 -1
  314. package/dist/diff_tool/app/dist/assets/vitesse-black-Sqvrs2Sw.js +0 -1
  315. package/dist/diff_tool/app/dist/assets/vitesse-dark-BWf_ZQtP.js +0 -1
  316. package/dist/diff_tool/app/dist/assets/vitesse-light-Cqenv4Qv.js +0 -1
  317. package/dist/diff_tool/app/dist/assets/wasm-BnjxR4X6.js +0 -1
@@ -32,7 +32,7 @@ A repository project clones one GitHub repository into a session-specific manage
32
32
  }
33
33
  ```
34
34
 
35
- `repo` must be a GitHub `owner/repo`; other Git URLs are not accepted. The runner needs `gh` and `git` on its login shell's `PATH`, and `gh` must already be signed in with access to the repository.
35
+ `repo` must be a GitHub `owner/repo`; other Git URLs are not accepted. The runner needs `gh` and `git` on its login shell's `PATH`, and `gh` must already be signed in with access to the repository. A bot can use its own sign-in through its [environment](#bot-environments).
36
36
 
37
37
  All managed projects use the top-level `workspaceRoot`. A session workspace is:
38
38
 
@@ -104,7 +104,7 @@ Members are placed at `<composite-root>/<member-project-id>` and use each reposi
104
104
 
105
105
  `subagents.launchModels` sets which models subagents may be started with. See [subagents](subagents.md) for the syntax and inheritance.
106
106
 
107
- Configuration resolved at the composite root applies to the whole session, including the workspace's `defaultPersona`, subagents, model catalog, and tools. Members' `.tau/config.json` files are not merged. A subagent started in a member directory rebuilds only the context that depends on the directory: environment and repository details, the applicable `AGENTS.md`, and the skills found there.
107
+ Configuration resolved at the composite root applies to the whole session, including the workspace's `defaultPersona`, subagents, model catalog, tools, MCP servers, and speech vocabulary. Members' `.tau/config.json` files are not merged. A subagent started in a member directory rebuilds only the context that depends on the directory: environment and repository details, the applicable `AGENTS.md`, and the skills found there.
108
108
 
109
109
  If any member cannot be prepared, Tau removes the whole composite workspace. Composite workspaces and member caches use the top-level `workspaceRoot`.
110
110
 
@@ -116,6 +116,8 @@ If the expected workspace is missing, recovery reconstructs it from the caches a
116
116
 
117
117
  ## Managed workspace safety
118
118
 
119
+ A project's `.tau/config.json` can define [MCP servers](config-reference.md#mcpservers) that start commands on the runner machine with the runner's credentials, so [review what you prepare](security.md#trust-mcp-servers). A workspace outside the runner user's home does not inherit servers from global configuration.
120
+
119
121
  **Important:** startup removes entries under managed workspace roots that no persisted session references. Dedicate these roots to Tau; never use a home directory, repository collection, or unrelated tree.
120
122
 
121
123
  Tau preserves referenced managed workspaces, configured persistent directories, and repository caches. `/new` closes the active session before replacing it. Closing a repository or composite session interrupts work and removes its workspace; persistent directories remain untouched.
@@ -126,9 +128,63 @@ A repository can include `.tau/scripts/provision` at its root. It must be a regu
126
128
 
127
129
  New and reconstructed workspaces run their hooks; preserved workspaces and persistent-directory projects do not. Composite sessions run member hooks in order and continue after failures. A failure is reported to linked chats but leaves the session usable. Keep hooks repeatable and non-interactive.
128
130
 
131
+ ## Bot environments
132
+
133
+ Bots in one runner can use different environment variables, for example to give each bot its own GitHub account and commit identity. Set `bots.<id>.env` to a map of variable names to string values:
134
+
135
+ ```json
136
+ "env": {
137
+ "GH_CONFIG_DIR": "/var/lib/assistant-github/gh",
138
+ "GIT_CONFIG_GLOBAL": "/var/lib/assistant-github/gitconfig",
139
+ "GH_TOKEN": "",
140
+ "GITHUB_TOKEN": ""
141
+ }
142
+ ```
143
+
144
+ Set up the files this example refers to as the runner's user:
145
+
146
+ 1. Sign in to `gh` in that directory with `GH_CONFIG_DIR=/var/lib/assistant-github/gh gh auth login`.
147
+ 2. Create the Git config file. Git uses it in place of the user's `~/.gitconfig`. Git HTTPS operations need the credential helper, and commits need the identity:
148
+
149
+ ```ini
150
+ [credential "https://github.com"]
151
+ helper =
152
+ helper = !gh auth git-credential
153
+ [user]
154
+ name = Assistant
155
+ email = assistant@example.com
156
+ ```
157
+
158
+ The empty tokens override any token in the runner's environment, which `gh` would otherwise use in place of the signed-in account.
159
+
160
+ The map applies in two places:
161
+
162
+ - **Workspace preparation.** The bot's repository clone and fetch commands run with the runner's environment plus the map. The map wins when both set a variable.
163
+ - **New sessions.** Session tools, provision hooks, and subagents run with the session's usual environment, which has inherited secret-like variables removed, plus the map.
164
+
165
+ The runner's own environment and other bots do not change. The map does not set model-provider credentials or configure client tools.
166
+
167
+ Names and values follow these rules:
168
+
169
+ - Names must match `[A-Za-z_][A-Za-z0-9_]*`.
170
+ - Values cannot contain NUL.
171
+ - `HOME` is not allowed, because the execution environment sets it.
172
+ - Values are literal. Tau does not expand `$HOME` or `~` and does not resolve relative paths, so use absolute paths for credential directories.
173
+
174
+ Tau saves the map in each session, so do not put tokens or other secrets in it. Use paths to separately protected credential stores instead. The map is not a security boundary. Bots still share the operating-system user's permissions and repository caches, and commands can override their own environment.
175
+
176
+ ### Changing a bot's environment
177
+
178
+ Restart the runner after changing or removing `env`. New sessions use the new map. A saved session whose map differs fails recovery before it accepts turns, because it would otherwise continue under the old identity. This check does not change the session's files. A session resumes normally if its map is unchanged, and that includes an older session with no saved map if the bot has no `env`.
179
+
180
+ A session that failed this check has two ways forward:
181
+
182
+ - Restore the previous `env` and restart the runner. The session then resumes.
183
+ - Start a new session with `/new`. For a repository or composite project, this deletes the old workspace, so first save any unfinished work from it on the runner machine. Persistent-directory projects keep their files.
184
+
129
185
  ## Troubleshooting
130
186
 
131
- **Repository preparation fails.** Check that the runner machine has `gh` signed in with access to the repository, `git`, and network access. Check `repo`, `ref`, the workspace root's permissions and free space, and that `workingDirectory` exists after checkout. Changing the repository of an existing project ID rebuilds its cache. Do not delete caches or workspaces first; keep the logs and fix access or configuration.
187
+ **Repository preparation fails.** Check that the runner machine has `gh` signed in with access to the repository, `git`, and network access. If the bot sets `env`, check the sign-in that its [environment](#bot-environments) selects. Check `repo`, `ref`, the workspace root's permissions and free space, and that `workingDirectory` exists after checkout. Changing the repository of an existing project ID rebuilds its cache. Do not delete caches or workspaces first; keep the logs and fix access or configuration.
132
188
 
133
189
  **Startup removed unexpected files.** The workspace root was not dedicated to Tau. Stop the runner and move `workspaceRoot` to an empty directory of its own before restarting. Tau cannot restore unrelated files it deleted.
134
190
 
@@ -136,4 +192,6 @@ New and reconstructed workspaces run their hooks; preserved workspaces and persi
136
192
 
137
193
  **A persistent-directory session fails recovery.** Recovery rejects a saved `cwd` that differs from the configured directory. Restore the directory at its original path, or set the project config back, or start a new session in the new directory. Tau does not move an existing session to a new directory.
138
194
 
139
- **A recovered session does not match the current configuration.** Preserved workspaces are used as they are, and composite root files are not regenerated, so configuration changes apply only to new workspaces. Recovery also needs the same `workspaceRoot`, project definitions, host home, and Tau sessions. Check the runner logs and `/status`. Do not edit runner state, project preferences, saved sessions, or managed workspaces to force a match.
195
+ **A session fails recovery after a bot's `env` changes.** Recovery rejects a saved environment that differs from the bot's current `env`, and `/status` reports the failure. See [changing a bot's environment](#changing-a-bots-environment) for the ways forward.
196
+
197
+ **A recovered session does not match the current configuration.** Preserved workspaces are used as they are, and composite root files are not regenerated, so configuration changes apply only to new workspaces. Recovery also needs the same `workspaceRoot`, project definitions, bot `env`, host home, and Tau sessions. Check the runner logs and `/status`. Do not edit runner state, project preferences, saved sessions, or managed workspaces to force a match.
@@ -14,6 +14,8 @@ tau telegram --config-file /etc/tau/telegram.json
14
14
 
15
15
  The process stays in the foreground until `SIGINT` or `SIGTERM`. Relative `--config-file` paths resolve from the process working directory. Paths inside that file resolve as described below, usually from the config file's directory.
16
16
 
17
+ Add `--check-config` to validate the file and exit without starting the runner. It does not check tokens, directories, or repository access.
18
+
17
19
  The Telegram file is **not** one of Tau's `config.json` levels. It configures the runner: bot tokens, startup settings, presets, projects, workspace roots, and routing. Tau still loads normal configuration from the runner's startup directory and from each session's workspace. See [configuration](configuration.md) and [ownership and scope](ownership-and-scope.md).
18
20
 
19
21
  Run at most one runner per configuration and workspace root. Two runners would compete for Telegram updates, runner state, and workspace cleanup.
@@ -68,6 +70,7 @@ Each `bots.<id>` object supports:
68
70
  | Field | Required | Behavior |
69
71
  | --- | --- | --- |
70
72
  | `botToken` | Yes | Telegram Bot API token. |
73
+ | `env` | No | Environment variables for this bot's workspace preparation and new sessions. See [bot environments](telegram-projects.md#bot-environments). |
71
74
  | `allowedProjectIds` | No | Non-empty unique subset of configured project IDs; omission exposes all projects. |
72
75
  | `autoCompactThresholdTokens` | No | Default automatic-compaction threshold for this bot's sessions. See [compaction thresholds](#compaction-thresholds). |
73
76
  | `startup` | Yes | `{ "source": "workspace" }` or `{ "source": "preset", "preset": "<key>" }`. See [startup and presets](#startup-and-presets). |
@@ -95,13 +98,13 @@ Each project tells the runner where a session works. There are three kinds:
95
98
  - A **persistent-directory project** reuses one existing directory for all of its sessions.
96
99
  - A **composite project** combines several repository projects in one workspace.
97
100
 
98
- Project IDs become `/use_<projectId>` commands, so they may contain only lowercase letters, digits, and underscores, and be at most 28 characters. Every project can have a `description`, and must define exactly one of `repo`, `directory`, or `projectIds`. [Telegram projects and workspaces](telegram-projects.md) describes each kind, where workspaces live, provision hooks, and what happens to workspaces on restart.
101
+ [Telegram projects and workspaces](telegram-projects.md) describes project fields, workspace preparation, provision hooks, and recovery.
99
102
 
100
103
  **Important:** at startup, the runner deletes everything under its managed workspace roots that no saved session uses. Give Tau a dedicated `workspaceRoot`; never use a home directory, a collection of repositories, or any directory with other content.
101
104
 
102
105
  ## Normal Tau configuration inside workspaces
103
106
 
104
- After preparation, Tau creates an ordinary local session in the workspace. It reads `~/.config/tau` and the `.tau` directories above the workspace as usual, so personas, prompts, skills, project context, host tools, and other settings work as in the TUI.
107
+ After preparation, Tau creates an ordinary local session in the workspace. It reads `~/.config/tau` and the `.tau` directories above the workspace as usual, so personas, prompts, skills, project context, host tools, [MCP servers](config-reference.md#mcpservers), and other settings work as in the TUI.
105
108
 
106
109
  The bot's `startup` selects a new session's settings, as described in [startup and presets](#startup-and-presets).
107
110
 
@@ -213,7 +216,7 @@ In a DM, ordinary text goes to the active session. If none is selected but the c
213
216
 
214
217
  In an allowed group, a message starts a turn only when it mentions the bot's username. Other text and captions are kept as background context, labeled with their sender. At the next mention, Tau includes up to the 50 most recent kept messages since the last turn, and clears them once the turn is submitted.
215
218
 
216
- Group context can include attachment paths, audio transcripts, and processing errors. The model receives it as untrusted input. `allowedUserIds` stops an unlisted sender from starting work, but their messages can still become context in an allowed group.
219
+ Group context can include attachment paths, audio transcripts, and processing errors. The model receives it as untrusted input.
217
220
 
218
221
  Text and transcribed audio either start or steer a turn. When the session is idle, the message starts a normal turn. When Tau is working, the message steers the running turn: the turn stops at its next safe point and continues with the new message. Further steering is batched as usual. Telegram has no command to queue a separate turn. Use `/interrupt` to stop instead of steering.
219
222
 
@@ -229,7 +232,7 @@ Sending a file only queues it, and its caption is kept as metadata. The next tex
229
232
 
230
233
  Files are stored in the execution environment's temporary directory, so system cleanup can remove them. Queued files and group context are cleared on shutdown. Treat file contents and metadata as untrusted.
231
234
 
232
- Voice transcription uses Gemini with `GEMINI_API_KEY`, or else `apiKeys.google`. Optional spelling hints use GPT-6 Luna (reasoning disabled) with OpenAI credentials. The runner's [`speech.vocabulary`](config-reference.md#speech) terms precede extracted hints and work without OpenAI credentials or conversation context. Gemini transcribes verbatim with `gemini-3.5-transcribe`, using English (`en-US`) and Finnish (`fi-FI`) hints, and Tau tries to delete the uploaded file afterward. Receiving files needs no Google key. See [credentials](credentials.md).
235
+ Voice transcription uses Gemini with `GEMINI_API_KEY`, or else `apiKeys.google`. Optional spelling hints use GPT-6 Luna (reasoning disabled) with OpenAI credentials. The session's [`speech.vocabulary`](config-reference.md#speech) terms, then the runner's global terms, precede extracted hints and work without OpenAI credentials or conversation context. Without a selected session, Tau does not download or transcribe audio. Transcription fails if the session is not ready. Gemini transcribes verbatim with `gemini-3.5-transcribe`, using English (`en-US`) and Finnish (`fi-FI`) hints, and Tau tries to delete the uploaded file afterward. Receiving files needs no Google key. See [credentials](credentials.md).
233
236
 
234
237
  `/tts_on` rewrites text with `gpt-6-luna` (reasoning disabled) and generates speech with Eleven v4 Turbo. It requires both OpenAI and ElevenLabs credentials and runner `ffmpeg` with Opus. Voice notes use brisk delivery and 1.15× speed. See [`speech` configuration](config-reference.md#speech) for default and custom voice selection. Source and rewritten text are limited to 10,000 Unicode characters each, and audio to 32 MiB. Rewriting times out after one minute and the whole job after five. Jobs are not saved. On failure, the bot sends `voice response failed. please try again.`; the text reply is unaffected and details go to the logs.
235
238
 
@@ -253,7 +256,7 @@ If a failed session still has submitted work with an unknown result, Tau can rec
253
256
 
254
257
  ## Verify a runner safely
255
258
 
256
- 1. Check that the Telegram file is valid JSON, without showing it in a shared terminal.
259
+ 1. Run `--check-config`, without showing the file in a shared terminal.
257
260
  2. Confirm the runner user can execute `tau`, `git`, and `gh`, and that `gh` can access each repository.
258
261
  3. Start the runner and watch for config, polling, command-sync, cache, checkout, and recovery errors. Successful startup prints `tau telegram running`.
259
262
  4. In an allowed DM, run `/status`, select a project if needed, then run `/new`.
@@ -278,7 +281,7 @@ Do not verify bot tokens, provider keys, Access secrets, transcript contents, or
278
281
 
279
282
  **Audio or an attachment fails.** The reply or runner log names the step that failed: download, saving, format, or transcription. Check that Telegram can deliver the file to the bot, the type is supported, the runner can write to its temporary directory, and Gemini accepts the media type. Transcription needs `GEMINI_API_KEY` or `apiKeys.google` for the runner process; restart the runner after setting it. Changing a workspace's environment does not affect the runner. Do not log media or transcripts to debug this.
280
283
 
281
- **Voice replies fail.** `/tts_on` needs OpenAI and ElevenLabs credentials and `ffmpeg` with Opus on the runner. Check [`speech.voiceId`](config-reference.md#speech) if a configured voice is unavailable. The bot replies `voice response failed. please try again.` and logs the details; the text reply is still delivered.
284
+ **Voice replies fail.** `/tts_on` needs OpenAI and ElevenLabs credentials and `ffmpeg` with Opus on the runner. Check [`speech.voiceId`](config-reference.md#speech) if a configured voice is unavailable.
282
285
 
283
286
  **Replies or notifications arrive late or not at all.** Each outgoing message part has a deadline and is retried twice on retryable errors. Tau honors Telegram's `retry_after`, and later notifications in a chat wait for earlier ones. Long replies are split, so only a later part may have failed. The runner log shows the method, status, retry class, attempt, chat, session, and message. Fix network, rate-limit, token, or chat permission problems on the runner. Before resending by hand, check which parts arrived. A delivery failure is not a failed turn, and notifications about failed or blocked turns are sent again after a restart. Never fix delivery by editing runner state.
284
287
 
@@ -155,7 +155,7 @@ Each guide covers setup, input, examples, outputs, and failures. Run `tau tool -
155
155
 
156
156
  ## Subagent tools
157
157
 
158
- A subagent gets each of `bash`, `write`, `edit`, `view_image`, `web`, `history`, `mcp`, and `models` that the main persona also has, plus `tau_docs`. It never gets `agents` or client tools. Its Bash and file tools start in the subagent's working directory. [Subagents](subagents.md#tools) has the details.
158
+ A subagent gets each of `bash`, `write`, `edit`, `view_image`, `web`, `history`, `mcp`, and `models` that its parent also has, plus `tau_docs`. A native Tau subagent at depth 1 also gets `agents` when its parent has it. Subagents at depth 2 and Claude Code subagents never get it, and no subagent gets client tools. Its Bash and file tools start in the subagent's working directory. [Subagents](subagents.md#tools) has the details.
159
159
 
160
160
  ## Client-owned tools
161
161
 
@@ -61,10 +61,11 @@ Run `tau --debug` from the intended directory for a new local startup. For a run
61
61
  | Change | How to apply |
62
62
  | --- | --- |
63
63
  | Session configuration and content | `/reload` while idle |
64
- | Theme, speech, or TUI client tools | Restart `tau` or `tau attach` |
64
+ | MCP server definitions | Start a new session, or reopen the session after the host has unloaded it |
65
+ | Theme, voice, recording shortcut, personal speech vocabulary, or TUI client tools | Restart `tau` or `tau attach` |
65
66
  | Host environment, `apiKeys`, history, hosted environments, listener, or Tau version | Restart the host |
66
67
  | Default persona or execution environment | Create a new session if it must change |
67
- | Telegram config, routing, speech, or workspaces | Restart the runner |
68
+ | Telegram config, routing, voice, personal speech vocabulary, or workspaces | Restart the runner |
68
69
 
69
70
  ## `/reload` is unavailable, refused, or not enough
70
71
 
@@ -73,7 +74,8 @@ Run `tau --debug` from the intended directory for a new local startup. For a run
73
74
  Reload updates configuration, personas, prompts, skills, `AGENTS.md` context, and host tools for later turns. It does not:
74
75
 
75
76
  - change the execution environment, its `cwd`, or its home;
76
- - reload an attached client's themes, speech settings, or tools;
77
+ - change the session's MCP servers;
78
+ - reload an attached client's themes, voice, recording shortcut, personal speech vocabulary, or tools;
77
79
  - read environment variables again in a running process;
78
80
  - reload the host's history service or hosted environment settings;
79
81
  - update Tau's code or built-in documentation; or
@@ -117,11 +119,11 @@ For a host tool, check the active persona's `tools` list. A list replaces the de
117
119
 
118
120
  For subagents, check three things:
119
121
 
120
- 1. The main persona has `agents`.
122
+ 1. The main persona has `agents`, and the calling agent is the main agent or a native Tau subagent at depth 1.
121
123
  2. A requested model exactly matches an entry in the launch allowlist.
122
- 3. Fewer than eight subagents are running.
124
+ 3. Fewer than 16 subagents are running in the session.
123
125
 
124
- A running subagent keeps its model, tools, and working directory after a reload. Recovery does not restore subagents, so old IDs cannot receive follow-ups after a host restart. Use `tau.agents.list()` in `code` to see live subagents. See [subagents](subagents.md).
126
+ A running subagent keeps its model, tools, and working directory after a reload. Recovery does not restore subagents, so old IDs cannot receive follow-ups after a host restart. Use `tau.agents.list()` in `code` to see the caller's live descendants. The main agent sees all of them. See [subagents](subagents.md).
125
127
 
126
128
  If `tau_docs` is missing, the problem is the host's installation or version, not a persona. Check the host package and restart it.
127
129
 
@@ -27,7 +27,9 @@ printf 'summarize the current changes' | tau
27
27
 
28
28
  Use `tau attach` for a session hosted elsewhere. The terminal, themes, clipboard, speech commands, built-in diff review tool, and command client tools stay on the attaching machine. Bash tools, file access, project configuration, and model calls use the session's execution environment. See [remote sessions](remote-sessions.md) for connecting and creating sessions.
29
29
 
30
- The startup summary lists discovered skills, project context files, configured client tools, and enabled MCP servers. MCP servers are shown as configured, not connected, because connections open on first use. In attached sessions, the MCP list comes from the host. Empty sections are left out.
30
+ The startup summary lists discovered skills, project context files, configured client tools, and enabled MCP servers. MCP servers are shown as configured, not connected, because connections open on first use. The MCP list comes from the session, also in attached sessions, and a session on a remote execution environment shows MCP as unavailable. Empty sections are left out.
31
+
32
+ In a local TUI, configuration problems found when the host loads a session appear in the transcript. An attached TUI shows them when you run `/reload`.
31
33
 
32
34
  ## Work in the editor
33
35
 
@@ -108,7 +110,9 @@ Run commands that change the context, such as persona changes, compaction, rewin
108
110
 
109
111
  The footer shows context usage as a percentage of the full model window, such as `20%/272k`. When a session override is set, or the default threshold is below the model-based threshold, the effective compaction threshold appears in parentheses: `20%/272k (50k)`. This threshold cannot exceed the model's context window minus 16,384 tokens. Without an override or a lower default, the footer shows no threshold. Applying a persona removes the session override, even when reapplying the current persona.
110
112
 
111
- While subagents are running, a panel above the editor shows the selected subagent's title, recent activity, and a usage line such as `openai-codex/gpt-6-astra:medium · ↑12k ↓2k (r8k w0) · 14%/200k · $0.04`. The line starts with the subagent's provider, model, and reasoning effort, including settings inherited from the persona. Text that does not fit the terminal width is cut off on the right.
113
+ While subagents are running, a panel above the editor shows the selected subagent's title, recent activity, and a usage line such as `openai-codex/gpt-6-astra:medium · ↑12k ↓2k (r8k w0) · 14%/200k · $0.04`. The line starts with the subagent's provider, model, and reasoning effort, including inherited settings. Text that does not fit the terminal width is cut off on the right.
114
+
115
+ A subagent started by another subagent shows `parent title › child title`, with a long parent title shortened first. A subagent with running children shows their number, such as `· 2 children running`, and its footer reads `ctrl+g to interrupt this subagent only`, because they keep running.
112
116
 
113
117
  [Sessions](sessions.md) describes compaction, rewind, recovery, and retry. [Prompts and project context](prompts-and-project-context.md) covers prompt files.
114
118
 
@@ -151,8 +155,8 @@ Requests time out after 30 seconds, responses are limited to 64 KiB, and redirec
151
155
  | Enter | Steer a running turn, or submit while idle. |
152
156
  | Ctrl+Enter | Queue another turn, or submit while idle. |
153
157
  | Alt+Up | Cancel pending input and put it back in the editor. |
154
- | Alt+Down | Select the next running subagent. |
155
- | Ctrl+G | Interrupt the selected subagent. |
158
+ | Alt+Down | Select the next running subagent, one branch at a time. |
159
+ | Ctrl+G | Interrupt only the selected subagent. |
156
160
  | Enter twice | Retry, when the editor is empty and the session is idle. |
157
161
  | Escape | Interrupt local work or the session. |
158
162
  | Escape twice | Clear the editor. |
@@ -238,7 +242,7 @@ A submitted draft that contains dictation carries hidden guidance saying that so
238
242
 
239
243
  The editor is locked from the start of recording until finalization. Escape cancels voice input at any stage: startup, recording, microphone shutdown, transcription, or retry. Cancelling removes the preview at once, restores the original draft, and unlocks the editor without inserting or submitting anything. The cancelled recording is deleted once pending file work finishes. A failure also restores the original draft. A recording or retry cannot start while another editor update is pending.
240
244
 
241
- For live transcription, GPT-6 Luna, with reasoning disabled, extracts spelling hints from the recent conversation while recording starts. Tau buffers audio until the transcription session is ready, then streams it. Gemini uses `gemini-3.5-transcribe-live` in verbatim mode with English (`en-US`) and Finnish (`fi-FI`) language hints. Missing OpenAI credentials or a failed hint extraction do not stop transcription. Configured [`speech.vocabulary`](config-reference.md#speech) terms take priority over extracted hints and remain available when extraction fails.
245
+ For live transcription, GPT-6 Luna, with reasoning disabled, extracts spelling hints from the recent conversation while recording starts. Tau buffers audio until the transcription session is ready, then streams it. Gemini uses `gemini-3.5-transcribe-live` in verbatim mode with English (`en-US`) and Finnish (`fi-FI`) language hints. Missing OpenAI credentials or a failed hint extraction do not stop transcription. The session's [`speech.vocabulary`](config-reference.md#speech) terms, followed by the terms in the TUI's own global configuration, take priority over extracted hints and remain available when extraction fails.
242
246
 
243
247
  If transcription fails, Tau keeps the local WAV file and reports its path:
244
248
 
@@ -277,18 +281,31 @@ See [`speech` configuration](config-reference.md#speech) for the default Maisie
277
281
  - Escape stops playback without turning the mode off.
278
282
  - It uses the same voice, credentials, and rewriting as `/speak`. It never opens the microphone or submits dictation.
279
283
 
284
+ ## See session status in your terminal
285
+
286
+ The TUI reports the session's status to the terminal through the [Program Status Protocol (OSC 7501)](https://www.superlogical.com/rex/docs/build/program-status). A terminal such as Rex can use these reports to show which of your sessions need attention. Local and attached sessions report in the same way, and the report always comes from the TUI on your machine.
287
+
288
+ | Status | Meaning |
289
+ | --------- | ----------------------------------------------------------- |
290
+ | `working` | A turn is running, including any tools it uses. |
291
+ | `done` | The last turn finished successfully. |
292
+ | `error` | The last turn failed or was blocked. |
293
+ | `idle` | The session is waiting for input, or you canceled the turn. |
294
+
295
+ `done` and `error` stay until the next turn starts. When you start the TUI, attach, or switch sessions, Tau reports only `working` or `idle`, so a turn that finished earlier appears as `idle`. Tau clears the status when you leave a session or exit.
296
+
297
+ Each report contains only the status and `app=tau`. It never includes messages or other session content, and nothing is sent when the TUI's output is not a terminal. Tau reports only the main session, and it does not use the protocol's `blocked` state, even while a diff review waits for you.
298
+
299
+ Terminals without support show nothing. Set `PI_PROGRAM_STATUS=0` on the TUI machine to turn reports off, or `PI_PROGRAM_STATUS=1` to send them without waiting for the terminal to confirm support.
300
+
280
301
  ## Reload the right component
281
302
 
282
- Run `/reload` while idle after changing configuration, personas, prompts, skills, or `AGENTS.md` content in the execution environment. The host reads them again from the session's working directory, keeps the current persona if it still exists, and otherwise selects the first available persona. Warnings appear in the transcript.
303
+ Run `/reload` while idle after changing configuration, personas, prompts, skills, or `AGENTS.md` content in the execution environment. The host reads them again from the session's working directory, keeps the current persona if it still exists, and otherwise selects the first available persona. Warnings appear in the transcript. This also refreshes the session's speech vocabulary. MCP server definitions do not change on reload; a warning tells you when they differ, and [the configuration reference](config-reference.md#mcpservers) explains how to apply them.
283
304
 
284
- Restart the TUI instead after changing themes, speech settings, or configured client tools. Codex auth storage is read again on every new request. Restart the host after changing its Tau version, environment variables, `apiKeys`, WebSocket listener, or hosted execution environment settings. [Credentials](credentials.md) and [remote sessions](remote-sessions.md) explain which process owns what.
305
+ Restart the TUI instead after changing themes, voice, recording shortcut, personal speech vocabulary, or configured client tools. Codex auth storage is read again on every new request. Restart the host after changing its Tau version, environment variables, `apiKeys`, WebSocket listener, or hosted execution environment settings. [Credentials](credentials.md) and [remote sessions](remote-sessions.md) explain which process owns what.
285
306
 
286
307
  ## Common mistakes
287
308
 
288
309
  - `!` and `!!` run in the execution environment, not on the attaching machine.
289
310
  - Enter during a turn steers it. Use Ctrl+Enter to queue another turn.
290
- - Ctrl+T changes only what is displayed. Use Shift+Tab to change reasoning effort.
291
- - `/prompt:<id>` fills the editor but does not send it.
292
- - `/diff` adds the returned review to the session but does not ask the assistant to act on it.
293
- - `/reload` does not reload client themes or client tools.
294
311
  - Exiting a WebSocket attachment does not delete the session and does not necessarily stop it. Exiting a local TUI shuts down its host, so running work is interrupted and saved where possible.
@@ -1,11 +1,12 @@
1
1
  import { randomUUID } from "node:crypto";
2
+ import { AgentRuntime } from "../agent/agent_runtime.js";
2
3
  import { createDefaultCoreDeps } from "../runtime/deps.js";
3
4
  import { appendUsageLogEntry } from "../usage/logs.js";
4
5
  import { AgentRequestError } from "./errors.js";
5
6
  import { formatActiveSubagentsForCompaction } from "./format.js";
6
7
  import { createSubagentRuntime } from "./runtime.js";
7
8
  import { AgentTrace } from "./trace.js";
8
- const MAX_ACTIVE_SUBAGENTS = 8;
9
+ const MAX_ACTIVE_SUBAGENTS = 16;
9
10
  async function raceWithAbort(promise, signal) {
10
11
  if (!signal)
11
12
  return await promise;
@@ -26,15 +27,69 @@ export class AgentSupervisor {
26
27
  options;
27
28
  records = new Map();
28
29
  deps;
30
+ mainLaunchEpoch = 0;
31
+ disposed = false;
29
32
  constructor(options) {
30
33
  this.options = options;
31
34
  this.deps = options.deps ?? createDefaultCoreDeps();
32
35
  }
36
+ get mainAgentId() {
37
+ return this.options.mainAgentId;
38
+ }
39
+ createMainRuntime(options) {
40
+ if (this.records.has(this.mainAgentId))
41
+ throw new Error("Main agent already registered");
42
+ const runtime = new AgentRuntime({ ...options, agentId: this.mainAgentId });
43
+ this.records.set(this.mainAgentId, {
44
+ kind: "main",
45
+ id: this.mainAgentId,
46
+ parentId: null,
47
+ depth: 0,
48
+ runtime,
49
+ });
50
+ return runtime;
51
+ }
52
+ delegatedRecords() {
53
+ return [...this.records.values()].filter((record) => record.kind === "delegated");
54
+ }
55
+ isDescendant(id, callerId) {
56
+ let record = this.records.get(id);
57
+ while (record?.parentId) {
58
+ if (record.parentId === callerId)
59
+ return true;
60
+ record = this.records.get(record.parentId);
61
+ }
62
+ return false;
63
+ }
64
+ scope(callerId) {
65
+ return new ScopedAgentSupervisor(this, callerId);
66
+ }
67
+ prepareSpawn(callerId) {
68
+ if (this.disposed)
69
+ throw new AgentRequestError("operation_failed", "Agent pool is disposed");
70
+ if (callerId === this.mainAgentId)
71
+ return this.mainLaunchEpoch;
72
+ const parent = this.requireRecord(callerId);
73
+ if (parent.depth >= 2 ||
74
+ !parent.canDelegate ||
75
+ parent.subtreeStops > 0 ||
76
+ parent.run.interruptRequested)
77
+ throw new AgentRequestError("operation_failed", "Agent cannot delegate");
78
+ return parent.launchEpoch;
79
+ }
80
+ dispose() {
81
+ this.disposed = true;
82
+ this.reset();
83
+ this.records.get(this.mainAgentId)?.runtime.dispose();
84
+ this.records.delete(this.mainAgentId);
85
+ }
33
86
  reset() {
34
87
  this.retainOrigins(new Set());
35
88
  }
36
89
  retainOrigins(originHistoryEntryIds) {
37
- for (const [id, record] of this.records) {
90
+ this.mainLaunchEpoch++;
91
+ for (const record of this.delegatedRecords()) {
92
+ const id = record.id;
38
93
  if (originHistoryEntryIds.has(record.originHistoryEntryId))
39
94
  continue;
40
95
  this.records.delete(id);
@@ -44,11 +99,18 @@ export class AgentSupervisor {
44
99
  getCapacity() {
45
100
  return { running: this.getActiveCount(), limit: MAX_ACTIVE_SUBAGENTS };
46
101
  }
102
+ async waitForIdle() {
103
+ while (this.getActiveCount() > 0) {
104
+ await Promise.allSettled(this.delegatedRecords().map((record) => record.completion));
105
+ }
106
+ }
47
107
  getActiveCount() {
48
- return [...this.records.values()].filter((record) => record.run.status === "running").length;
108
+ return this.delegatedRecords().filter((record) => record.run.status === "running").length;
49
109
  }
50
- getActiveCompactionContext() {
51
- const active = this.list().filter((state) => state.status !== "idle");
110
+ getActiveCompactionContext(callerId) {
111
+ const active = this.scope(callerId)
112
+ .list()
113
+ .filter((state) => state.status !== "idle");
52
114
  if (active.length === 0)
53
115
  return undefined;
54
116
  const state = formatActiveSubagentsForCompaction(active);
@@ -58,26 +120,56 @@ export class AgentSupervisor {
58
120
  if (this.getActiveCount() >= MAX_ACTIVE_SUBAGENTS) {
59
121
  throw new AgentRequestError("operation_failed", `Subagent limit reached (max ${MAX_ACTIVE_SUBAGENTS} active). Wait for existing agents to finish.`);
60
122
  }
123
+ const parentId = options.parentId;
124
+ const epoch = this.prepareSpawn(parentId);
125
+ if (options.launchEpoch !== epoch)
126
+ throw new AgentRequestError("operation_failed", "Delegation was interrupted");
127
+ const parent = parentId === this.mainAgentId ? undefined : this.requireRecord(parentId);
128
+ const depth = (parent?.depth ?? 0) + 1;
61
129
  const workingDirectory = options.runtimeConfig.workingDirectory.trim();
62
130
  if (!workingDirectory) {
63
131
  throw new AgentRequestError("invalid_arguments", "Subagent workingDirectory must not be blank.");
64
132
  }
65
133
  const id = randomUUID();
66
- const runtimeConfig = { ...options.runtimeConfig, workingDirectory };
134
+ const runtimeConfig = {
135
+ ...options.runtimeConfig,
136
+ workingDirectory,
137
+ tools: options.runtimeConfig.tools.filter((tool) => tool !== "agents" || (depth < 2 && options.runtimeConfig.kind === "native")),
138
+ };
139
+ const sessionIds = [id];
140
+ let ancestorId = parentId;
141
+ while (ancestorId !== this.mainAgentId) {
142
+ sessionIds.unshift(ancestorId);
143
+ ancestorId = this.requireRecord(ancestorId).parentId;
144
+ }
145
+ sessionIds.unshift(this.mainAgentId);
146
+ const createdAt = this.deps.clock.now();
147
+ const openHistory = this.options.openHistory;
67
148
  const runtime = createSubagentRuntime(runtimeConfig, {
68
149
  ...options,
69
150
  id,
151
+ sessionIds,
152
+ supervisor: this,
153
+ agents: options.agents,
70
154
  deps: this.deps,
155
+ openHistory: openHistory
156
+ ? () => openHistory({ sessionId: id, parentSessionId: parentId, workingDirectory, createdAt })
157
+ : undefined,
71
158
  onEvent: async (event) => await this.recordRuntimeEvent(id, event),
72
159
  });
73
- const createdAt = this.deps.clock.now();
74
160
  const record = {
75
161
  id,
162
+ parentId,
163
+ depth,
164
+ launchEpoch: 0,
165
+ canDelegate: runtimeConfig.kind === "native" && runtimeConfig.tools.includes("agents"),
166
+ subtreeStops: 0,
167
+ kind: "delegated",
76
168
  title: options.title,
77
169
  model: runtime.model,
78
170
  workingDirectory,
79
171
  createdAt,
80
- originHistoryEntryId: options.originHistoryEntryId,
172
+ originHistoryEntryId: parent?.originHistoryEntryId ?? options.originHistoryEntryId,
81
173
  personaId: options.personaId,
82
174
  runtime,
83
175
  run: {
@@ -110,7 +202,8 @@ export class AgentSupervisor {
110
202
  }
111
203
  sendInput(options) {
112
204
  const record = this.requireRecord(options.id);
113
- if (record.run.interruptRequested && record.run.status === "running")
205
+ if (record.subtreeStops > 0 ||
206
+ (record.run.interruptRequested && record.run.status === "running"))
114
207
  throw new AgentRequestError("operation_failed", "Subagent is stopping");
115
208
  if (record.run.status !== "running" && this.getActiveCount() >= MAX_ACTIVE_SUBAGENTS)
116
209
  throw new AgentRequestError("operation_failed", "Subagent capacity reached");
@@ -147,6 +240,8 @@ export class AgentSupervisor {
147
240
  const { run } = record;
148
241
  return {
149
242
  id,
243
+ parentId: record.parentId,
244
+ depth: record.depth,
150
245
  title: record.title,
151
246
  model: `${record.model.provider}/${record.model.id}:${record.model.reasoning}`,
152
247
  workingDirectory: record.workingDirectory,
@@ -186,8 +281,37 @@ export class AgentSupervisor {
186
281
  await raceWithAbort(Promise.race(ids.map((id) => this.waitForRecord(id))), signal);
187
282
  return ids.map((id) => this.read(id));
188
283
  }
189
- async interrupt(id, signal, wait = true) {
284
+ async interrupt(id, signal, wait = true, scope = "agent") {
190
285
  const record = this.requireRecord(id);
286
+ if (scope === "subtree") {
287
+ const targets = this.delegatedRecords().filter((target) => target.id === id || this.isDescendant(target.id, id));
288
+ for (const target of targets) {
289
+ target.launchEpoch++;
290
+ target.subtreeStops++;
291
+ }
292
+ const stopping = Promise.allSettled(targets.map(async (target) => {
293
+ try {
294
+ await this.interrupt(target.id, undefined, false);
295
+ }
296
+ finally {
297
+ await this.waitForRecord(target.id);
298
+ }
299
+ }))
300
+ .then((results) => {
301
+ const failure = results.find((result) => result.status === "rejected");
302
+ if (failure?.status === "rejected")
303
+ throw failure.reason;
304
+ })
305
+ .finally(() => {
306
+ for (const target of targets)
307
+ target.subtreeStops--;
308
+ });
309
+ if (wait)
310
+ await raceWithAbort(stopping, signal);
311
+ else
312
+ void stopping.catch(() => { });
313
+ return this.read(id);
314
+ }
191
315
  if (record.run.status === "running") {
192
316
  if (record.pending.length || record.runtime.pendingSteering)
193
317
  record.trace.append({
@@ -221,14 +345,14 @@ export class AgentSupervisor {
221
345
  }
222
346
  getSnapshot(id) {
223
347
  const record = this.records.get(id);
224
- return record ? this.toSnapshot(record) : undefined;
348
+ return record?.kind === "delegated" ? this.toSnapshot(record) : undefined;
225
349
  }
226
350
  startRun(record, prompt, eventType) {
227
351
  record.trace.append({ kind: "status", status: "working" });
228
352
  record.completion = (async () => {
229
353
  try {
230
354
  await this.emit({ type: eventType, state: this.toSnapshot(record) });
231
- if (record.run.interruptRequested) {
355
+ if (this.records.get(record.id) !== record || record.run.interruptRequested) {
232
356
  this.finishInterrupted(record);
233
357
  }
234
358
  else {
@@ -310,7 +434,7 @@ export class AgentSupervisor {
310
434
  }
311
435
  async recordRuntimeEvent(id, event) {
312
436
  const record = this.records.get(id);
313
- if (!record)
437
+ if (record?.kind !== "delegated")
314
438
  return;
315
439
  if (event.type === "trace") {
316
440
  const seq = record.trace.append(event.event);
@@ -346,12 +470,12 @@ export class AgentSupervisor {
346
470
  }
347
471
  requireRecord(id) {
348
472
  const record = this.records.get(id);
349
- if (!record)
473
+ if (record?.kind !== "delegated")
350
474
  throw new AgentRequestError("unknown_agent", `Unknown subagent ID: ${id}`);
351
475
  return record;
352
476
  }
353
477
  list() {
354
- return [...this.records.keys()].map((id) => this.read(id));
478
+ return this.delegatedRecords().map((record) => this.read(record.id));
355
479
  }
356
480
  async waitForRecord(id) {
357
481
  const record = this.requireRecord(id);
@@ -363,6 +487,8 @@ export class AgentSupervisor {
363
487
  toSnapshot(record) {
364
488
  return {
365
489
  id: record.id,
490
+ parentId: record.parentId,
491
+ depth: record.depth,
366
492
  title: record.title,
367
493
  availability: record.run.status === "running" ? "running" : "idle",
368
494
  model: { ...record.model },
@@ -377,4 +503,59 @@ export class AgentSupervisor {
377
503
  await this.options.onEvent(event);
378
504
  }
379
505
  }
506
+ export class ScopedAgentSupervisor {
507
+ supervisor;
508
+ callerId;
509
+ constructor(supervisor, callerId) {
510
+ this.supervisor = supervisor;
511
+ this.callerId = callerId;
512
+ }
513
+ check(id) {
514
+ if (!this.supervisor.isDescendant(id, this.callerId))
515
+ throw new AgentRequestError("unknown_agent", `Unknown subagent ID: ${id}`);
516
+ }
517
+ prepareSpawn() {
518
+ return this.supervisor.prepareSpawn(this.callerId);
519
+ }
520
+ spawn(options) {
521
+ return this.supervisor.spawn({ ...options, parentId: this.callerId });
522
+ }
523
+ list() {
524
+ return this.supervisor
525
+ .list()
526
+ .filter((state) => this.supervisor.isDescendant(state.id, this.callerId));
527
+ }
528
+ getCapacity() {
529
+ return this.supervisor.getCapacity();
530
+ }
531
+ read(id) {
532
+ this.check(id);
533
+ return this.supervisor.read(id);
534
+ }
535
+ sendInput(options) {
536
+ this.check(options.id);
537
+ return this.supervisor.sendInput(options);
538
+ }
539
+ interrupt(id, signal, wait = true, scope = "agent") {
540
+ this.check(id);
541
+ return this.supervisor.interrupt(id, signal, wait, scope);
542
+ }
543
+ waitForAgents(ids, signal) {
544
+ for (const id of ids)
545
+ this.check(id);
546
+ return this.supervisor.waitForAgents(ids, signal);
547
+ }
548
+ getTrace(id) {
549
+ this.check(id);
550
+ return this.supervisor.getTrace(id);
551
+ }
552
+ getSnapshot(id) {
553
+ this.check(id);
554
+ return this.supervisor.getSnapshot(id);
555
+ }
556
+ getLastResponse(id) {
557
+ this.check(id);
558
+ return this.supervisor.getLastResponse(id);
559
+ }
560
+ }
380
561
  //# sourceMappingURL=agent_supervisor.js.map