@markusylisiurunen/tau 0.3.82 → 0.3.83

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 (147) hide show
  1. package/README.md +1 -3
  2. package/dist/core/agent/agent_runtime.js +6 -4
  3. package/dist/core/agent/agent_runtime.js.map +1 -1
  4. package/dist/core/cli.js +2 -2
  5. package/dist/core/cli.js.map +1 -1
  6. package/dist/core/code_mode/models.js +61 -22
  7. package/dist/core/code_mode/models.js.map +1 -1
  8. package/dist/core/history/cli.js +48 -0
  9. package/dist/core/history/cli.js.map +1 -1
  10. package/dist/core/history/history_manager.js +9 -3
  11. package/dist/core/history/history_manager.js.map +1 -1
  12. package/dist/core/history/local_history_store.js +9 -2
  13. package/dist/core/history/local_history_store.js.map +1 -1
  14. package/dist/core/history/remote_history_client.js +18 -3
  15. package/dist/core/history/remote_history_client.js.map +1 -1
  16. package/dist/core/models/openrouter.js +17 -5
  17. package/dist/core/models/openrouter.js.map +1 -1
  18. package/dist/core/models/openrouter_decisions.js +16 -1
  19. package/dist/core/models/openrouter_decisions.js.map +1 -1
  20. package/dist/core/static/tau_docs/client-tools.md +53 -53
  21. package/dist/core/static/tau_docs/config-reference.md +46 -43
  22. package/dist/core/static/tau_docs/configuration.md +40 -36
  23. package/dist/core/static/tau_docs/credentials.md +32 -31
  24. package/dist/core/static/tau_docs/getting-started.md +28 -28
  25. package/dist/core/static/tau_docs/history.md +114 -79
  26. package/dist/core/static/tau_docs/image-generation.md +20 -18
  27. package/dist/core/static/tau_docs/index.md +30 -31
  28. package/dist/core/static/tau_docs/manifest.json +1 -0
  29. package/dist/core/static/tau_docs/models.md +17 -17
  30. package/dist/core/static/tau_docs/node-sdk.md +69 -69
  31. package/dist/core/static/tau_docs/nook.md +75 -69
  32. package/dist/core/static/tau_docs/openrouter.md +28 -13
  33. package/dist/core/static/tau_docs/ownership-and-scope.md +21 -23
  34. package/dist/core/static/tau_docs/pdf-unpacking.md +6 -6
  35. package/dist/core/static/tau_docs/personas.md +29 -27
  36. package/dist/core/static/tau_docs/prompts-and-project-context.md +41 -39
  37. package/dist/core/static/tau_docs/remote-sessions.md +38 -38
  38. package/dist/core/static/tau_docs/sdk-diff-review.md +16 -12
  39. package/dist/core/static/tau_docs/security.md +72 -72
  40. package/dist/core/static/tau_docs/session-protocol-methods.md +45 -45
  41. package/dist/core/static/tau_docs/session-protocol.md +43 -43
  42. package/dist/core/static/tau_docs/sessions.md +99 -88
  43. package/dist/core/static/tau_docs/skills.md +25 -20
  44. package/dist/core/static/tau_docs/speech-generation.md +5 -5
  45. package/dist/core/static/tau_docs/subagents.md +42 -44
  46. package/dist/core/static/tau_docs/telegram-projects.md +142 -0
  47. package/dist/core/static/tau_docs/telegram.md +64 -181
  48. package/dist/core/static/tau_docs/tools.md +72 -80
  49. package/dist/core/static/tau_docs/troubleshooting.md +94 -149
  50. package/dist/core/static/tau_docs/tui.md +124 -80
  51. package/dist/core/tool/image_generate.js +5 -17
  52. package/dist/core/tool/image_generate.js.map +1 -1
  53. package/dist/core/tool/openrouter.js +21 -2
  54. package/dist/core/tool/openrouter.js.map +1 -1
  55. package/dist/core/utils/gemini_transcription.js +43 -13
  56. package/dist/core/utils/gemini_transcription.js.map +1 -1
  57. package/dist/core/utils/model_stream.js +17 -1
  58. package/dist/core/utils/model_stream.js.map +1 -1
  59. package/dist/core/version.js +2 -2
  60. package/dist/diff_tool/app/dist/assets/{angular-html-D20byCHL.js → angular-html-x29PkEoY.js} +1 -1
  61. package/dist/diff_tool/app/dist/assets/{angular-ts-CvVQslm2.js → angular-ts-CsWCqoCf.js} +1 -1
  62. package/dist/diff_tool/app/dist/assets/{apl-DNIxlYWe.js → apl-CEvdc7jl.js} +1 -1
  63. package/dist/diff_tool/app/dist/assets/{astro-DDOw4EUG.js → astro-Cgi6YxH2.js} +1 -1
  64. package/dist/diff_tool/app/dist/assets/{blade-DlhB-SLW.js → blade-B0pr7Zx6.js} +1 -1
  65. package/dist/diff_tool/app/dist/assets/{c-C1f4vhDm.js → c-DDVLgtVy.js} +1 -1
  66. package/dist/diff_tool/app/dist/assets/{chapel-Ctt8xOX1.js → chapel-Bk9M7Jej.js} +1 -1
  67. package/dist/diff_tool/app/dist/assets/{cobol-BXw71PAA.js → cobol-DyEvnPuC.js} +1 -1
  68. package/dist/diff_tool/app/dist/assets/{coffee-CRh_5Nmr.js → coffee-Di2-m3Jq.js} +1 -1
  69. package/dist/diff_tool/app/dist/assets/{cpp-IlI-zWOZ.js → cpp-CWpAaUgO.js} +1 -1
  70. package/dist/diff_tool/app/dist/assets/{crystal-CXeL28i7.js → crystal-CUker9Zt.js} +1 -1
  71. package/dist/diff_tool/app/dist/assets/{css-BfST9hFI.js → css-D4XpBIiJ.js} +1 -1
  72. package/dist/diff_tool/app/dist/assets/{edge--Q22k_ty.js → edge-CVxhhF7L.js} +1 -1
  73. package/dist/diff_tool/app/dist/assets/{elixir-CIfC_rQx.js → elixir-B_FS9APl.js} +1 -1
  74. package/dist/diff_tool/app/dist/assets/{elm-OkZ29XRO.js → elm-1KyefTkH.js} +1 -1
  75. package/dist/diff_tool/app/dist/assets/{erb-B8ZXgEqv.js → erb-CCgO9dRW.js} +1 -1
  76. package/dist/diff_tool/app/dist/assets/{git-rebase-CxkO_WGd.js → git-rebase-D0VYo_oY.js} +1 -1
  77. package/dist/diff_tool/app/dist/assets/{glimmer-js-BVadyIrr.js → glimmer-js-Ce07ngjZ.js} +1 -1
  78. package/dist/diff_tool/app/dist/assets/{glimmer-ts-D5J3Qb7n.js → glimmer-ts-BmOM4djO.js} +1 -1
  79. package/dist/diff_tool/app/dist/assets/{glsl-B6iy73-Y.js → glsl-D-jkLYJ8.js} +1 -1
  80. package/dist/diff_tool/app/dist/assets/{graphql-Dc3rUXf5.js → graphql-DZOwJE5e.js} +1 -1
  81. package/dist/diff_tool/app/dist/assets/{hack-q8Utf8Jp.js → hack-Cgvn19h8.js} +1 -1
  82. package/dist/diff_tool/app/dist/assets/{haml-mjMIlj_2.js → haml-JTmDSYQl.js} +1 -1
  83. package/dist/diff_tool/app/dist/assets/{handlebars-CA-BL8Ks.js → handlebars-CChh7Dy5.js} +1 -1
  84. package/dist/diff_tool/app/dist/assets/{html-BmPxhYCX.js → html-BKgzx_cb.js} +1 -1
  85. package/dist/diff_tool/app/dist/assets/{html-derivative-CvknIjuB.js → html-derivative-CdFl0BmX.js} +1 -1
  86. package/dist/diff_tool/app/dist/assets/{http-DNxLDRIi.js → http-DZeL7KvH.js} +1 -1
  87. package/dist/diff_tool/app/dist/assets/{hurl-kbd3Eq2V.js → hurl-CqKevOlQ.js} +1 -1
  88. package/dist/diff_tool/app/dist/assets/index-BXyr8GCM.js +341 -0
  89. package/dist/diff_tool/app/dist/assets/{java-BuZshgf1.js → java-Sq3MCkId.js} +1 -1
  90. package/dist/diff_tool/app/dist/assets/{javascript-DfL2oeFU.js → javascript-CHZB4Nse.js} +1 -1
  91. package/dist/diff_tool/app/dist/assets/{jinja-Bu0KQihU.js → jinja-C4ucJVla.js} +1 -1
  92. package/dist/diff_tool/app/dist/assets/{jison-Bqn7Mf3Q.js → jison-D3mprebA.js} +1 -1
  93. package/dist/diff_tool/app/dist/assets/{json-BuX5LKaB.js → json-DgPfCYJ1.js} +1 -1
  94. package/dist/diff_tool/app/dist/assets/{jsx-DdVJ-ZBp.js → jsx-BG-Tx0cw.js} +1 -1
  95. package/dist/diff_tool/app/dist/assets/{julia-CQeijOoQ.js → julia-B1GnFeUC.js} +1 -1
  96. package/dist/diff_tool/app/dist/assets/{just-vzAktFGR.js → just-_MZzo0MF.js} +1 -1
  97. package/dist/diff_tool/app/dist/assets/{latex-Dm60cg0k.js → latex-DI0kqjQy.js} +1 -1
  98. package/dist/diff_tool/app/dist/assets/{liquid-vxKzm2P8.js → liquid-BtMAPeHl.js} +1 -1
  99. package/dist/diff_tool/app/dist/assets/{lua-DIoqi4dd.js → lua-CFxaP0To.js} +1 -1
  100. package/dist/diff_tool/app/dist/assets/{marko-BTHgFKby.js → marko-BIJocuFI.js} +1 -1
  101. package/dist/diff_tool/app/dist/assets/{mdc-CEfz8gZ9.js → mdc-BAgrdjTH.js} +1 -1
  102. package/dist/diff_tool/app/dist/assets/{nginx-DNlFDEfJ.js → nginx-DE-3CsYn.js} +1 -1
  103. package/dist/diff_tool/app/dist/assets/{nim-DnvT_0lZ.js → nim-DOxeXLhb.js} +1 -1
  104. package/dist/diff_tool/app/dist/assets/{org-BbD-ElVf.js → org-KTfP0tHA.js} +1 -1
  105. package/dist/diff_tool/app/dist/assets/{perl-DTsbnAmK.js → perl-BH-NxpgK.js} +1 -1
  106. package/dist/diff_tool/app/dist/assets/{php-CwEsJe-W.js → php-vuiVEXZK.js} +1 -1
  107. package/dist/diff_tool/app/dist/assets/{pug-BOttMVH-.js → pug-VlIlTMUy.js} +1 -1
  108. package/dist/diff_tool/app/dist/assets/{qml-C8KkSItN.js → qml-k6wTtGG-.js} +1 -1
  109. package/dist/diff_tool/app/dist/assets/{r-K4ksJj_R.js → r-Ccjcb2zh.js} +1 -1
  110. package/dist/diff_tool/app/dist/assets/{razor-yuWRrrG6.js → razor-BNhYgSCv.js} +1 -1
  111. package/dist/diff_tool/app/dist/assets/{regexp-CV-jhnUz.js → regexp-C4LFejPu.js} +1 -1
  112. package/dist/diff_tool/app/dist/assets/{rst-CLA3Attc.js → rst-DXLxI-UJ.js} +1 -1
  113. package/dist/diff_tool/app/dist/assets/{ruby-DiHR2-DX.js → ruby-BPuL4jDV.js} +1 -1
  114. package/dist/diff_tool/app/dist/assets/{sas-DxIjbYJ5.js → sas-B3Yz8snb.js} +1 -1
  115. package/dist/diff_tool/app/dist/assets/{scss-CShwEaV4.js → scss-B2AJ5vpk.js} +1 -1
  116. package/dist/diff_tool/app/dist/assets/{shellscript-CeezOnrF.js → shellscript-zyDexxnC.js} +1 -1
  117. package/dist/diff_tool/app/dist/assets/{shellsession-CjSS2r7j.js → shellsession-C8b8xluk.js} +1 -1
  118. package/dist/diff_tool/app/dist/assets/{soy-CI_v23nJ.js → soy-DKWe_XML.js} +1 -1
  119. package/dist/diff_tool/app/dist/assets/{sql-D9GaB00A.js → sql-uEbz-Epf.js} +1 -1
  120. package/dist/diff_tool/app/dist/assets/{stata-hK92TPE_.js → stata-DieRPmHY.js} +1 -1
  121. package/dist/diff_tool/app/dist/assets/{surrealql-UO8LtPJG.js → surrealql-Dbk3Sp1P.js} +1 -1
  122. package/dist/diff_tool/app/dist/assets/{svelte-kIlaw_oh.js → svelte-CjPbRmkM.js} +1 -1
  123. package/dist/diff_tool/app/dist/assets/{templ-DFRz1JP6.js → templ-Do_f5vc4.js} +1 -1
  124. package/dist/diff_tool/app/dist/assets/{tex-CfxIXk_z.js → tex-UjLP4qUm.js} +1 -1
  125. package/dist/diff_tool/app/dist/assets/{ts-tags-BtUHl0ff.js → ts-tags-5L2FutA6.js} +1 -1
  126. package/dist/diff_tool/app/dist/assets/{tsx-Cd4SAe2C.js → tsx-B1pNtpUr.js} +1 -1
  127. package/dist/diff_tool/app/dist/assets/{twig-CWk4q5Y3.js → twig-O41Vg_IM.js} +1 -1
  128. package/dist/diff_tool/app/dist/assets/{typescript-BqxGJiP0.js → typescript-Bj9uwnnJ.js} +1 -1
  129. package/dist/diff_tool/app/dist/assets/{typst-D9nAun2p.js → typst-DsibO7oD.js} +1 -1
  130. package/dist/diff_tool/app/dist/assets/{vue-D6HYhg6_.js → vue-DPhaEurv.js} +1 -1
  131. package/dist/diff_tool/app/dist/assets/{vue-html-1VRlaENS.js → vue-html-DDV9NSy1.js} +1 -1
  132. package/dist/diff_tool/app/dist/assets/{vue-vine-BaH0We9y.js → vue-vine-Dh4jOifx.js} +1 -1
  133. package/dist/diff_tool/app/dist/assets/{xml-C4RWnUuj.js → xml-DtIulkQk.js} +1 -1
  134. package/dist/diff_tool/app/dist/assets/{xsl-D1iD38ga.js → xsl-DoWtb58Z.js} +1 -1
  135. package/dist/diff_tool/app/dist/assets/{yaml-yAb4W0G-.js → yaml-CZC-l1Dg.js} +1 -1
  136. package/dist/diff_tool/app/dist/index.html +1 -1
  137. package/dist/history/worker/index.js +87 -83
  138. package/dist/history/worker/index.js.map +1 -1
  139. package/dist/main.js +6 -7
  140. package/dist/main.js.map +1 -1
  141. package/dist/tui/session_chat_controller.js +14 -3
  142. package/dist/tui/session_chat_controller.js.map +1 -1
  143. package/dist/tui/ui/footer.js +2 -4
  144. package/dist/tui/ui/footer.js.map +1 -1
  145. package/package.json +9 -9
  146. package/dist/diff_tool/app/dist/assets/index-D8ZI_2RC.js +0 -340
  147. package/dist/nook/README.md +0 -123
@@ -1,18 +1,18 @@
1
1
  # Remote sessions
2
2
 
3
- Remote sessions let the terminal stay close to the user while the session host and execution environment run elsewhere. Tau does not turn remote work into a second product mode: `tau attach` uses the same TUI over WebSocket. The important boundaries are who owns credentials and persistence and where agent-visible commands run.
3
+ In a remote session, the terminal stays on your machine while the session host and execution environment run elsewhere. `tau attach` is the same TUI, connected over WebSocket. What changes is which machine holds credentials and saved sessions, and where the agent's commands run.
4
4
 
5
5
  ## Choose the connection shape
6
6
 
7
- Use the smallest shape that matches the lifecycle you need.
7
+ Choose the simplest setup that matches how long the host should live.
8
8
 
9
- | Shape | Best for | Lifetime and ownership |
9
+ | Setup | Best for | Lifetime and ownership |
10
10
  | --- | --- | --- |
11
11
  | `tau serve` plus WebSocket attach | Long-running hosts, reconnects, and multiple observers | The server owns the host independently of any one TUI. |
12
12
  | Node SDK with its default client | Applications that want an in-process host | The SDK client owns the host and closes it with the client. |
13
13
  | Node SDK over WebSocket | Applications sharing a long-running `tau serve` host | The server owns sessions; the SDK observes them remotely. |
14
14
 
15
- Use `tau serve` for remote TUI and SDK connections. Keep it bound to loopback behind an SSH tunnel when SSH is the desired security boundary. The [session protocol](session-protocol.md) and [Node SDK](node-sdk.md) cover developer APIs and wire details; this page stays at the operational level.
15
+ Use `tau serve` for remote TUI and SDK connections. To rely on SSH for security, keep it on loopback and connect through an SSH tunnel. The [session protocol](session-protocol.md) and [Node SDK](node-sdk.md) cover the developer APIs and wire format; this page covers operation.
16
16
 
17
17
  ## Host sessions over WebSocket
18
18
 
@@ -22,7 +22,7 @@ Start a server on the host:
22
22
  tau serve
23
23
  ```
24
24
 
25
- The default listener is `127.0.0.1:8787`. This is suitable for local clients or a reverse proxy on the same machine. To listen on another interface, set it explicitly and require a strong token:
25
+ By default the server listens on `127.0.0.1:8787`, which suits local clients or a reverse proxy on the same machine. To listen on another interface, set it explicitly and require a strong token:
26
26
 
27
27
  ```sh
28
28
  export TAU_WS_AUTH_TOKEN="$(openssl rand -hex 32)"
@@ -36,15 +36,15 @@ export TAU_WS_AUTH_TOKEN='the-same-token'
36
36
  tau attach ws://buildbox.example:8787
37
37
  ```
38
38
 
39
- `tau attach` uses `TAU_WS_AUTH_TOKEN` when `--auth-token` is absent. An explicit form is also valid:
39
+ `tau attach` uses `TAU_WS_AUTH_TOKEN` when `--auth-token` is not given. You can also pass the token explicitly:
40
40
 
41
41
  ```sh
42
42
  tau attach --auth-token "$TAU_WS_AUTH_TOKEN" ws://buildbox.example:8787
43
43
  ```
44
44
 
45
- A server token authorizes full access to hosted sessions. Without `--auth-token` or `TAU_WS_AUTH_TOKEN`, the listener is unauthenticated. Tau’s server terminates plain WebSocket traffic and does not accept certificate options. On an untrusted network, put it behind a trusted TLS reverse proxy and attach with `wss://`, or keep it bound to loopback and use an SSH tunnel. Treat proxy logs and WebSocket handshake metadata as sensitive because the authentication token is carried during connection setup.
45
+ The token gives full access to all hosted sessions. Without `--auth-token` or `TAU_WS_AUTH_TOKEN`, the server has no authentication. Tau serves plain WebSocket and has no TLS settings. On an untrusted network, put it behind a trusted TLS reverse proxy and attach with `wss://`, or keep it on loopback and use an SSH tunnel. The token is sent when the connection is set up, so treat proxy logs and WebSocket handshake data as sensitive.
46
46
 
47
- A typical tunnel keeps Tau bound to loopback:
47
+ A typical tunnel, with Tau on loopback:
48
48
 
49
49
  ```sh
50
50
  ssh -N -L 8787:127.0.0.1:8787 dev@buildbox.example
@@ -64,9 +64,9 @@ Without `--session` or `--new`, `tau attach` asks the host for its session list
64
64
  tau attach ws://127.0.0.1:8787
65
65
  ```
66
66
 
67
- The selector shows each session id and whether it is currently idle or running. It can also create a session. If stdin or stdout is not a TTY, selection is unavailable, so specify `--session` or `--new`.
67
+ The selector shows each session ID and whether it is idle or running, and can also create a session. It needs a terminal: if stdin or stdout is not a TTY, pass `--session` or `--new`.
68
68
 
69
- Attach directly when the session id is known:
69
+ If you know the session ID, attach directly:
70
70
 
71
71
  ```sh
72
72
  tau attach \
@@ -74,7 +74,7 @@ tau attach \
74
74
  ws://127.0.0.1:8787
75
75
  ```
76
76
 
77
- Create a new session with an absolute cwd in the selected execution environment:
77
+ To create a new session, give an absolute `--cwd` in the chosen execution environment:
78
78
 
79
79
  ```sh
80
80
  tau attach \
@@ -83,15 +83,15 @@ tau attach \
83
83
  ws://127.0.0.1:8787
84
84
  ```
85
85
 
86
- For the default `local` execution kind, this path is on the host machine, not the attaching machine. It must already be a usable directory with the desired repository or workspace. Tau creates the session, not the directory or repository.
86
+ With the default `local` execution kind, this path is on the host machine, not the attaching machine. The directory must already exist and contain the repository or workspace you want. Tau creates only the session, not the directory or repository.
87
87
 
88
- Remote `--new` supplies the conventional creation attribute `source: "tui"`. It does not infer repository metadata by inspecting the remote cwd. Clients that need repository provenance should create through the SDK or protocol and provide complete immutable attributes. See [sessions](sessions.md).
88
+ A remote `--new` sets the creation attribute `source: "tui"`. It does not look at the remote directory to fill in repository information. Clients that need it should create sessions through the SDK or protocol and send complete attributes. See [sessions](sessions.md).
89
89
 
90
- `tau attach` does not accept the normal local startup persona flags. Select the server’s default at host startup, for example `tau serve --persona opus-5.5-coder`, or switch the newly created session with `/persona:<id>` after attaching.
90
+ `tau attach` does not accept the persona flags of local startup. Set the server's default when starting the host, for example `tau serve --persona opus-5.5-coder`, or switch the new session with `/persona:<id>` after attaching.
91
91
 
92
92
  ## Select an execution environment
93
93
 
94
- A session can use a local host directory or an already-provisioned Fly Sprite. In all cases, the execution cwd is an absolute path inside that environment.
94
+ A session can use a directory on the host or an existing Fly Sprite. Either way, the working directory is an absolute path inside that environment.
95
95
 
96
96
  ### Host-local directory
97
97
 
@@ -101,11 +101,11 @@ A session can use a local host directory or an already-provisioned Fly Sprite. I
101
101
  tau attach --new --cwd /srv/workspaces/tau ws://host.example:8787
102
102
  ```
103
103
 
104
- The host process executes agent-visible filesystem and command operations on its own machine. Tau does not clone, pull, or provision a repository.
104
+ The agent's file operations and commands run on the host machine. Tau does not clone, pull, or set up a repository.
105
105
 
106
106
  ### Fly Sprite
107
107
 
108
- The host must already have a connection configured in `flySprites`, and the Sprite must already exist:
108
+ The host must have a `flySprites` connection configured, and the Sprite must already exist:
109
109
 
110
110
  ```sh
111
111
  tau attach \
@@ -118,18 +118,18 @@ tau attach \
118
118
 
119
119
  `--fly-sprite` names an existing Sprite. Tau does not provision it or prepare its repository.
120
120
 
121
- Bridge URLs, API targets, home paths, and credential environment variables are host-owned [configuration](configuration.md). Session creation resolves Tau project configuration and content from the execution cwd through the selected environment. The execution environment itself remains a generic filesystem and process target; it does not own Tau’s configuration precedence or session policy.
121
+ The Sprite API URL, home path, and token are host [configuration](configuration.md). When the session is created, Tau reads project configuration and content from the working directory inside the Sprite.
122
122
 
123
123
  ## Keep the ownership boundaries clear
124
124
 
125
- An attached session spans three logical machines even when two happen to share one operating system.
125
+ An attached session involves three separate parts, even when two of them run on the same machine.
126
126
 
127
127
  ### The attaching client owns
128
128
 
129
129
  - terminal rendering, editor drafts, clipboard operations, and local notifications
130
130
  - loaded themes and `defaultTheme`
131
131
  - `/listen`, `/speak`, and their local credentials and OS commands
132
- - the built-in or configured diff-tool process
132
+ - the built-in diff tool process
133
133
  - configured command-backed client-tool processes
134
134
  - the client’s Tau binary and TUI behavior
135
135
 
@@ -138,7 +138,7 @@ An attached session spans three logical machines even when two happen to share o
138
138
  - session orchestration, persistence, and recovery
139
139
  - provider credential resolution and model execution
140
140
  - WebSocket authentication and listener lifetime
141
- - execution-environment resolver definitions and credentials
141
+ - hosted execution environment settings and credentials
142
142
  - pending input while the session remains live
143
143
  - the host’s Tau binary and built-in agent documentation
144
144
 
@@ -149,66 +149,66 @@ An attached session spans three logical machines even when two happen to share o
149
149
  - command execution, platform, PATH, and runtime dependencies
150
150
  - automatic-compaction archives and other target-side temporary files
151
151
 
152
- This is why changing a host’s theme selection does not affect a remote TUI, why `!git status` runs against the execution environment, and why the built-in diff review tool opens on the attaching machine. [Ownership and scope](ownership-and-scope.md) applies the same model across Tau.
152
+ That is why a host's theme setting does not affect a remote TUI, why `!git status` runs in the execution environment, and why the built-in diff review tool opens on the attaching machine. [Ownership and scope](ownership-and-scope.md) applies the same model across Tau.
153
153
 
154
154
  ## Reload or restart the correct process
155
155
 
156
- Different changes have different owners:
156
+ Each kind of change belongs to a different process:
157
157
 
158
158
  | Change | Action |
159
159
  | --- | --- |
160
160
  | Project config, personas, prompts, skills, or AGENTS.md in the execution environment | Wait for idle, then run `/reload`. |
161
161
  | Global model `apiKeys` on the host | Restart the host. |
162
- | Managed Codex auth changed with `tau auth` | No host restart; auth storage is read again on later credential resolutions. |
162
+ | Codex auth changed with `tau auth` | No restart needed; every new request reads auth storage again. |
163
163
  | Attaching themes, speech config, or configured client tools | Restart `tau attach`. |
164
- | Host process environment variables, history target, WebSocket listener, Fly API target, or host startup flags | Restart `tau serve`. |
164
+ | Host environment variables, history target, WebSocket listener, Fly Sprite connection, or host startup flags | Restart `tau serve`. |
165
165
  | Host Tau package, built-in tools, protocol, session recovery code, or built-in documentation | Upgrade and restart the host. |
166
166
  | TUI package, keybindings, rendering, local speech, or client-tool implementation | Upgrade and restart the attaching client. |
167
167
 
168
- `/reload` is a session operation. It asks the host to resolve session-owned content, from the execution environment and does not reload either process’s executable code or environment. Managed Codex auth storage is separate and is read again on later credential resolutions. For a long-running WebSocket host, restarting only the client cannot update the model-facing built-in docs or host tools. For an old client against a new host, restarting only the host cannot update local TUI behavior. See [credentials](credentials.md) for complete precedence and apply boundaries.
168
+ `/reload` acts on the session. The host reads session content again from the execution environment. It does not reload either process's code or environment. For a long-running WebSocket host, restarting only the client does not update the host's tools or the documentation its agent reads. For an old client attached to a new host, restarting only the host does not update the TUI. See [credentials](credentials.md) for complete precedence and apply boundaries.
169
169
 
170
170
  ## Reconnect and observe safely
171
171
 
172
- A WebSocket connection observes a hosted session; it does not own or delete its durable state. After the last observer disconnects, the host unloads an idle live runtime while retaining its persisted snapshot. If a client disconnects while work runs, the host keeps working and unloads the runtime only after that work settles. Reattach with the same session id to recover the current persisted state and continue receiving updates.
172
+ A WebSocket connection observes a hosted session. It does not own the saved session and cannot delete it. After the last client disconnects, the host unloads an idle session from memory and keeps it saved. If a client disconnects while work is running, the host keeps working and unloads the session only after the work finishes. Reattach with the same session ID to get the current state and continue receiving updates.
173
173
 
174
- A clean `tau serve` shutdown interrupts active work, persists live sessions, and closes clients. On restart, the host lists sessions whose execution environments it can restore. Recovery returns sessions idle, drops pending queued and steering messages, and discards live subagents.
174
+ A clean `tau serve` shutdown interrupts running work, saves live sessions, and closes clients. After a restart, the host lists the sessions whose execution environments it can reconnect. Recovered sessions come back idle, without queued or steering messages, and without subagents.
175
175
 
176
176
  ## Use multiple observers carefully
177
177
 
178
- Multiple WebSocket clients can observe the same live session and receive the same committed updates and pending-message state. They can also submit, queue, steer, interrupt, or mutate that session, so coordinate human or automation ownership rather than treating observers as read-only.
178
+ Several WebSocket clients can observe the same live session and receive the same updates and pending messages. Every one of them can also submit, queue, steer, interrupt, or change the session. None is read-only, so agree on who, or which automation, is in charge.
179
179
 
180
- Each ordinary TUI advertises client-owned `diff_review` and `prefill_input` tools plus enabled configured client tools. Only one observing client may advertise a given client-tool name for a session. Start additional observers with:
180
+ Each TUI offers its `diff_review` and `prefill_input` tools plus its enabled configured client tools. Only one client may offer a given tool name in a session. Start additional clients with:
181
181
 
182
182
  ```sh
183
183
  tau attach --no-client-tools --session 0195d6e4-4cf9-7f44-a2d8-f8f7f49ee9d3 ws://host.example:8787
184
184
  ```
185
185
 
186
- The host captures the available client-tool set when a turn starts. If the owning client detaches before a delegated call, that tool becomes unavailable; an active delegated call is cancelled. Client tools are not recovered after host restart until a client advertising them attaches again. See [client tools](client-tools.md).
186
+ A turn keeps the client tools that were available when it started. If the owning client detaches, its tools become unavailable and its running calls are cancelled. After a host restart, client tools return only when a client that offers them attaches again. See [client tools](client-tools.md).
187
187
 
188
188
  ## Troubleshoot connection and recovery
189
189
 
190
190
  ### The client reports an unsupported protocol version
191
191
 
192
- Tau’s current session protocol uses an exact version, not a compatibility negotiation. Upgrade the host and attaching client to the same Tau release, restart both processes, and reconnect. The host-facing agent uses tools and documentation from the host installation, while TUI behavior comes from the client installation.
192
+ Client and host must use exactly the same protocol version; there is no negotiation. Upgrade both to the same Tau release, restart both, and reconnect. The agent's tools and documentation come from the host's installation, and TUI behavior comes from the client's.
193
193
 
194
- Avoid downgrading a host that has already written sessions with a newer storage format. Newer Tau versions migrate supported older session documents during normal recovery; older versions are not expected to understand newer documents.
194
+ Do not downgrade a host that has already saved sessions in a newer format. Newer Tau versions upgrade supported older sessions when recovering them, but older versions cannot read newer sessions.
195
195
 
196
196
  ### A session is missing from the selector
197
197
 
198
- The host lists only stored sessions whose execution-environment kind it can currently restore. Confirm that:
198
+ The host lists only saved sessions whose execution environment it can reconnect. Confirm that:
199
199
 
200
200
  - the connection uses the same host user and home directory as the original process
201
- - the Fly API id still exists in host configuration
201
+ - the Fly Sprite connection is still configured on the host
202
202
  - host credentials are available to the restarted process
203
203
  - the target Sprite or local directory still exists
204
204
  - the session was created on this host rather than another machine with a different store
205
205
 
206
- Do not edit the session JSON to change environment identity. Restore the owning configuration or target instead.
206
+ Do not edit the session files to change the environment. Restore the configuration or the target instead.
207
207
 
208
208
  ### WebSocket attachment is unauthorized
209
209
 
210
- Verify that server and client use the same token and that a reverse proxy preserves the WebSocket request path and query string. `TAU_WS_AUTH_TOKEN` can silently supply either side, so inspect the environment as well as command-line flags. Do not print the token in shared logs.
210
+ Check that server and client use the same token, and that any reverse proxy passes through the WebSocket request path and query string. `TAU_WS_AUTH_TOKEN` can supply the token on either side without you noticing, so check the environment as well as the flags. Do not print the token into shared logs.
211
211
 
212
212
  ### A reconnect shows an interrupted turn
213
213
 
214
- A client disconnect alone does not stop a WebSocket-hosted turn, but server shutdown does. Review the last assistant and tool states, verify the execution environment with `!!pwd` and `!!git status --short`, then retry intentionally. [Sessions](sessions.md) explains recovery and safe verification.
214
+ A client disconnecting does not stop a turn on a WebSocket host, but a server shutdown does. Look at the last assistant message and tool results, check the execution environment with `!!pwd` and `!!git status --short`, then retry if you mean to. [Sessions](sessions.md) explains recovery and how to check a recovered session.
@@ -1,6 +1,6 @@
1
1
  # SDK browser diff review
2
2
 
3
- `startTauSdkDiffReview()` starts Tau's built-in browser review UI for an observed SDK session without requiring the TUI or opening a browser. It captures the selected diff through the session execution environment, creates the same review-scoped ephemeral agent context used by `/diff`, eagerly prepares shared review context and the reviewer guide, and binds an HTTP server on loopback by default.
3
+ `startTauSdkDiffReview()` starts Tau's built-in browser review UI for an observed SDK session, without the TUI and without opening a browser. It takes the diff in the session's execution environment, creates the same review agent context that `/diff` uses, starts preparing the review context and reviewer guide right away, and starts an HTTP server, on loopback by default.
4
4
 
5
5
  ```ts
6
6
  import { startTauSdkDiffReview } from "@markusylisiurunen/tau/sdk";
@@ -23,15 +23,19 @@ try {
23
23
  }
24
24
  ```
25
25
 
26
- The source may instead be `{ kind: "patch_files", patchFiles, scopeLabel }`. Paths and Git arguments belong to the session execution environment. Captured snapshot patches are limited to 16 MiB; narrow the Git arguments or patch-file selection when a larger scope is rejected. A plain working-tree snapshot includes non-binary untracked files up to 4 MiB each within that aggregate limit. Optional `host`, `port`, and `signal` fields control the client-owned HTTP process and startup cancellation.
26
+ The source can instead be `{ kind: "patch_files", patchFiles, scopeLabel }`. Paths and Git arguments refer to the session's execution environment. A snapshot's patch can be at most 16 MiB; narrow the Git arguments or patch files if a larger diff is rejected. A plain working-tree snapshot includes non-binary untracked files of up to 4 MiB each, within that total. The optional `host`, `port`, and `signal` fields set where the HTTP server listens and let you cancel startup.
27
27
 
28
28
  ## Routing and lifecycle
29
29
 
30
- The returned `url` is local to the SDK client machine and ends with a trailing slash. An embedding service may expose it through an authenticated or capability-protected reverse proxy. The browser app uses paths relative to its document URL, so it can be mounted below a route prefix; the external route URL must also end with a trailing slash. The embedding service owns public authentication, routing, retention, and recovery.
30
+ The returned `url` is on the SDK client's machine and ends with a slash. Your service can expose it through a reverse proxy that handles authentication or access links. The browser app uses relative paths, so it works under a path prefix, as long as the public URL also ends with a slash. Your service is responsible for public authentication, routing, retention, and recovery.
31
31
 
32
- The HTTP server does not provide authentication. The default loopback listener is suitable for a same-machine proxy. An explicitly configured non-loopback `host` is safe only within a trusted network boundary; otherwise, keep the listener on loopback and expose it through a protected proxy.
32
+ The HTTP server has no authentication. The default loopback address suits a proxy on the same machine. Set a non-loopback `host` only inside a trusted network; otherwise keep it on loopback behind a protected proxy.
33
33
 
34
- Always call `close()` when the review is no longer available. This cancels the review if needed, closes the ephemeral agent context, and stops the HTTP server. Submit in the built-in UI first opens the exact return-text preview, where included feedback can be excluded and the full review can be copied. Approve returns immediately when no feedback remains; if feedback appears while approval is being checked, the preview opens instead. Returned review Markdown is self-contained: it identifies the reviewed scope, presents change-level comments with their relevant context, and explains the participants and roles in unresolved review discussions. `result` resolves once with the returned outcome or cancellation reason. Returned results distinguish an approval from submitted comments without sentinel review text:
34
+ Always call `close()` when the review should no longer be available. It cancels the review if needed, closes the review agent context, and stops the HTTP server.
35
+
36
+ In the UI, **Submit** first opens a preview of the exact text to be returned, where the reviewer can exclude feedback and copy the full review. **Approve** returns right away when no feedback remains; if feedback appears while approval is being checked, the preview opens instead. The returned Markdown stands on its own: it names the reviewed scope, gives change-level comments their context, and explains who took part in each unresolved discussion and in what role.
37
+
38
+ `result` resolves once, with the outcome or the reason for cancellation. An approval and a review with comments are separate outcomes, so you never need to check for placeholder text:
35
39
 
36
40
  ```ts
37
41
  const result = await review.result;
@@ -44,7 +48,7 @@ if (result.status === "returned" && result.outcome === "approved") {
44
48
 
45
49
  ## Durable review state
46
50
 
47
- Review annotations, transcripts, guide content and comments, and UI preferences are in memory by default. Supply a client-owned `storage` adapter to preserve them:
51
+ By default, review annotations, transcripts, guide content and comments, and UI preferences are kept only in memory. Pass a `storage` adapter to save them:
48
52
 
49
53
  ```ts
50
54
  const review = await startTauSdkDiffReview({
@@ -57,15 +61,15 @@ const review = await startTauSdkDiffReview({
57
61
  });
58
62
  ```
59
63
 
60
- The stored document is an opaque, size-bounded, versioned Tau value. The embedding application should store it without inspecting or modifying it. Tau persists durable mutations before returning HTTP success and rolls a mutation back if storage fails.
64
+ The stored document is a versioned Tau value of limited size. Store it as is, without reading or changing it. Tau saves each change before the HTTP request succeeds, and undoes the change if saving fails.
61
65
 
62
- Restoration requires the stored document to be valid, supported by the running Tau version, and bound to the same captured diff. The binding includes the patch, file metadata, diff command and arguments, repository root, and working directory. Invalid, unsupported, or mismatched state causes `startTauSdkDiffReview()` to reject instead of silently starting with empty state. The embedding application must decide whether to retain the failed document or discard or replace it before retrying startup.
66
+ To restore, the stored document must be valid, supported by the running Tau version, and made for the same diff. "The same diff" covers the patch, file metadata, diff command and arguments, repository root, and working directory. If the state is invalid, unsupported, or for a different diff, `startTauSdkDiffReview()` rejects, instead of quietly starting empty. Your application then decides whether to keep, discard, or replace the document before trying again.
63
67
 
64
- Durable review state excludes loading indicators and ephemeral agent thread identifiers. After restoration, the first follow-up recreates an agent thread from a fresh bootstrap and supplies the stored conversation transcript.
68
+ Saved state does not include loading indicators or review agent thread IDs. After a restore, the first follow-up question starts a new agent thread and gives it the saved conversation transcript.
65
69
 
66
70
  ## Durable submission
67
71
 
68
- Use `onSubmit` when review acceptance must be durable before the browser sees success:
72
+ Use `onSubmit` when the submitted review must be saved before the browser is told it succeeded:
69
73
 
70
74
  ```ts
71
75
  const review = await startTauSdkDiffReview({
@@ -83,6 +87,6 @@ const review = await startTauSdkDiffReview({
83
87
 
84
88
  An approved submission has `outcome: "approved"` and no `review` field. A commented submission has `outcome: "commented"` and a required `review` field. Both include `diffCommand` and `reviewedFiles`.
85
89
 
86
- Tau permits only one in-flight or successful submission per running diff-review server. It awaits `onSubmit` before returning HTTP success and closing the review. If the callback fails, the submission remains available for retry.
90
+ Each running review server allows only one submission at a time, and none after one succeeds. Tau waits for `onSubmit` to finish before reporting success and closing the review. If the callback fails, the reviewer can submit again.
87
91
 
88
- The embedding application remains responsible for a durable exactly-once transition, deciding whether a submitted review may be reconstructed, and retaining or removing stored state. A typical acceptance callback atomically marks its own review record submitted and enqueues downstream work.
92
+ Your application is responsible for recording the submission exactly once, for deciding whether a submitted review may be opened again, and for keeping or deleting stored state. A typical callback marks its own review record as submitted and queues follow-up work in one transaction.