@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,8 +1,8 @@
1
1
  # Session protocol method reference
2
2
 
3
- This page defines every request method in protocol version 15. It is the compact wire reference for clients that already understand connection, observation, and delta application from the [session protocol](session-protocol.md).
3
+ This page lists every request method of the protocol version that ships with this Tau release. It is a compact reference for clients that already know how to connect, observe, and apply deltas, as described in the [session protocol](session-protocol.md).
4
4
 
5
- Every request uses `{ version, type: "request", id, method, params }`. Every successful response uses `{ version, type: "response", id, ok: true, result }`. `params` is required even when empty, and unknown object fields are stripped.
5
+ Every request is `{ version, type: "request", id, method, params }`, and every successful response is `{ version, type: "response", id, ok: true, result }`. `version` is the number the server sends in `ready`. `params` is required even when empty, and unknown fields are removed.
6
6
 
7
7
  ## Common values
8
8
 
@@ -10,7 +10,7 @@ A `sessionId` is a non-empty opaque string returned by `session.create` or `sess
10
10
 
11
11
  Reasoning values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.
12
12
 
13
- Turn methods return one of these terminal outcomes:
13
+ Turn methods return one of these final outcomes:
14
14
 
15
15
  ```ts
16
16
  type TurnOutcome =
@@ -24,7 +24,7 @@ type TurnOutcome =
24
24
  };
25
25
  ```
26
26
 
27
- A completed protocol request can therefore contain a failed, aborted, or blocked turn outcome. The protocol request itself fails only when the host cannot accept or settle it.
27
+ A successful request can therefore report a failed, aborted, or blocked turn. The request itself fails only when the host cannot accept or finish it.
28
28
 
29
29
  ## Connect and find sessions
30
30
 
@@ -47,7 +47,7 @@ params: {
47
47
  }
48
48
 
49
49
  result: {
50
- protocolVersion: 15;
50
+ protocolVersion: number; // same as `version` in `ready`
51
51
  methods: string[];
52
52
  alreadyInitialized: boolean;
53
53
  }
@@ -76,11 +76,11 @@ params: {
76
76
  result: { sessionId: string }
77
77
  ```
78
78
 
79
- `cwd` must be absolute inside the selected execution environment. Fly Sprites must already exist and be reachable through a host-configured resolver. Tau does not provision a target or repository.
79
+ `cwd` must be an absolute path inside the chosen execution environment. A Fly Sprite must already exist, and the host must have a `flySprites` connection configured. Tau does not create the target or the repository.
80
80
 
81
- `attributes` is required, including when empty. It accepts at most 32 immutable pairs; keys are 1 to 64 characters and values at most 1,024 characters. Tau stores the supplied strings without inferring missing provenance. Conventional attributes and their use are covered in [sessions](sessions.md) and [history](history.md).
81
+ `attributes` is required, even when empty. It accepts at most 32 pairs, which never change after creation. Keys are 1 to 64 characters and values at most 1,024 characters. Tau stores them as given and does not fill in missing ones. Conventional attributes and their use are covered in [sessions](sessions.md) and [history](history.md).
82
82
 
83
- A local `env` supplies execution-environment overrides. Names must be valid environment-variable names, values cannot contain NUL, and `HOME` is forbidden because the execution environment owns it. Overrides become durable session state, so do not put secrets there unless the session store is protected accordingly.
83
+ A local `env` sets environment variables for the execution environment. Names must be valid variable names, values cannot contain NUL, and `HOME` is not allowed because the execution environment sets it. These variables are saved with the session, so do not put secrets there unless the session store is protected accordingly.
84
84
 
85
85
  Creation returns only an id. Call `session.observe` for state and streamed updates.
86
86
 
@@ -111,7 +111,7 @@ result: {
111
111
  }
112
112
  ```
113
113
 
114
- Install all three baselines before applying later messages. Calling `observe` again refreshes the baselines without creating a second session.
114
+ Install all three before applying later messages. Calling `observe` again returns fresh starting states; it does not create a second session.
115
115
 
116
116
  ### `session.unobserve`
117
117
 
@@ -139,7 +139,7 @@ params: { sessionId: string; text: string; historyEntryId?: string }
139
139
  result: { snapshot: SessionProtocolSnapshot; userHistoryEntryId: string }
140
140
  ```
141
141
 
142
- This is a serialized context mutation. It can interrupt an active turn and rejects pending queue or steering requests before appending the message. Use it for user-authored material that should become model-visible, not for arbitrary client diagnostics.
142
+ This changes the context and waits its turn behind other changes. It can interrupt a running turn, and rejects pending queued and steering requests before adding the message. Use it for text written by the user that the model should see, not for client diagnostics.
143
143
 
144
144
  ### `session.submit`
145
145
 
@@ -150,22 +150,22 @@ params: { sessionId: string; text: string; historyEntryId?: string }
150
150
  result: { userHistoryEntryId: string; turn: TurnOutcome }
151
151
  ```
152
152
 
153
- Once accepted, the turn is durably represented in `snapshot.turns[userHistoryEntryId]`. Changes stream through the observed state channels while the request remains open.
153
+ Once accepted, the turn is recorded in `snapshot.turns[userHistoryEntryId]`. Updates arrive through the observed channels while the request is open.
154
154
 
155
155
  ### `session.queue`
156
156
 
157
- Uses the same parameters and result as `session.submit`. When the session is idle it starts immediately. While a turn is active, it appears in pending state and starts after the session becomes idle.
157
+ Same parameters and result as `session.submit`. When the session is idle, the turn starts right away. While a turn is running, the message is listed as pending and starts once the session is idle.
158
158
 
159
159
  ```ts
160
160
  params: { sessionId: string; text: string; historyEntryId?: string }
161
161
  result: { userHistoryEntryId: string; turn: TurnOutcome }
162
162
  ```
163
163
 
164
- The request response remains pending until its eventual turn settles.
164
+ The response arrives when that turn finishes.
165
165
 
166
166
  ### `session.steer`
167
167
 
168
- Requests a change of direction for active model work.
168
+ Changes the direction of the running turn.
169
169
 
170
170
  ```ts
171
171
  params: {
@@ -178,11 +178,11 @@ result: {
178
178
  }
179
179
  ```
180
180
 
181
- When idle, steering starts an ordinary turn. During an active turn, Tau waits for a safe continuation boundary, batches steering in arrival order, and starts one continuation turn before queued work. Batched requests share the generated `userHistoryEntryId`. Steering does not accept a caller-provided history id.
181
+ When idle, steering starts an ordinary turn. During a turn, Tau waits for the next safe point, batches steering messages in arrival order, and continues the turn with them before any queued work. Batched requests share the same generated `userHistoryEntryId`. Steering does not accept a history ID from the caller.
182
182
 
183
183
  ### `session.cancelPendingMessages`
184
184
 
185
- Cancels all pending queue and steering requests without interrupting active work.
185
+ Cancels all pending queued and steering requests without interrupting running work.
186
186
 
187
187
  ```ts
188
188
  params: {
@@ -212,7 +212,7 @@ The session must be idle.
212
212
 
213
213
  ### `session.interrupt`
214
214
 
215
- Requests cancellation of active session work, including turns, direct executions, model samples, and maintenance.
215
+ Asks the session's running work to stop: turns, direct commands, model samples, and maintenance.
216
216
 
217
217
  ```ts
218
218
  params: {
@@ -224,7 +224,7 @@ result: {
224
224
  }
225
225
  ```
226
226
 
227
- `isTurnRunning` may remain `true` while cancellation settles. The method also cancels unapplied boundary steering. It does not dispose reusable subagent threads; use `session.interruptSubagent` for one subagent.
227
+ `isTurnRunning` may stay `true` until the cancellation finishes. The method also cancels steering that has not been applied. It does not interrupt or remove subagents; use `session.interruptSubagent` for a subagent.
228
228
 
229
229
  ## Run independent execution and sampling
230
230
 
@@ -259,9 +259,9 @@ result: {
259
259
 
260
260
  `execId` must be unique among active executions in the session. `stdinBase64` is limited to 16 MiB decoded. `maxCaptureBytes` is positive and at most 24 MiB; the default is 1 MiB. `HOME` cannot be overridden.
261
261
 
262
- When `args` is present, Bash receives the first value as `$0` and the rest as `$@`. A safe exact-executable pattern is `command: 'exec "$0" "$@"'` with the executable and arguments in `args`. `cwd` chooses the command directory but is not a confinement boundary.
262
+ When `args` is present, Bash receives the first value as `$0` and the rest as `$@`. To run one executable safely, use `command: 'exec "$0" "$@"'` with the executable and its arguments in `args`. `cwd` sets the starting directory; it does not restrict the command to it.
263
263
 
264
- Executions can overlap turns, samples, mutations, and other executions. Clients must coordinate workspace access when consistency matters.
264
+ Commands can run at the same time as turns, samples, session changes, and other commands. Clients must coordinate workspace access when consistency matters.
265
265
 
266
266
  ### `session.cancelExec`
267
267
 
@@ -279,7 +279,7 @@ result: {
279
279
 
280
280
  ### `session.sample`
281
281
 
282
- Runs isolated inference against the session's active resolved model target. It uses only the supplied context and does not mutate the session, execute tool calls, emit deltas, or add to session cost.
282
+ Runs a standalone model call with the session's current model. It uses only the context you supply, and does not change the session, run tools, send deltas, or add to the session's cost.
283
283
 
284
284
  ```ts
285
285
  params: {
@@ -299,13 +299,13 @@ params: {
299
299
  result: { message: AssistantMessage }
300
300
  ```
301
301
 
302
- `context.messages` and the returned message use Tau's provider-neutral model message shape. Intermediate system messages use the plain-text, versioned metadata shape described in the [session protocol](session-protocol.md); metadata is not sent to the provider. Unsupported sections and tool mutations are rejected. Returned tool calls are data only. Samples can run concurrently and are cancelled by `session.interrupt`, transport shutdown, or host shutdown.
302
+ `context.messages` and the returned message use Tau's provider-independent message format. System messages after the first use the plain-text format with versioned metadata described in the [session protocol](session-protocol.md); the metadata is not sent to the provider. Sections and tool changes are rejected. Tool calls in the response are returned as data and never run. Samples can run at the same time, and `session.interrupt`, transport shutdown, or host shutdown cancels them.
303
303
 
304
304
  ## Read and change session state
305
305
 
306
306
  ### `session.snapshot`
307
307
 
308
- Returns the complete authoritative snapshot.
308
+ Returns the complete current snapshot.
309
309
 
310
310
  ```ts
311
311
  params: {
@@ -318,7 +318,7 @@ Use this after observation, on demand, or to recover from a delta revision gap.
318
318
 
319
319
  ### `session.setReasoning`
320
320
 
321
- Changes the reasoning effort for the next independently started turn.
321
+ Changes the reasoning effort, starting with the next turn.
322
322
 
323
323
  ```ts
324
324
  params: {
@@ -331,7 +331,7 @@ result: {
331
331
  }
332
332
  ```
333
333
 
334
- The update is serialized but does not interrupt a running turn. Active turns and steering continuations retain their captured settings.
334
+ The change waits its turn behind other changes but does not interrupt a running turn. Running turns, including their steering, keep their settings.
335
335
 
336
336
  ### `session.setPersona`
337
337
 
@@ -345,7 +345,7 @@ params: {
345
345
  result: SessionProtocolSnapshot;
346
346
  ```
347
347
 
348
- This is a serialized context mutation. It interrupts an active turn and rejects pending input before returning the authoritative snapshot.
348
+ This changes the context and waits its turn behind other changes. It interrupts a running turn and rejects pending input, then returns the new snapshot.
349
349
 
350
350
  ### `session.resolvePrompt`
351
351
 
@@ -362,11 +362,11 @@ result: {
362
362
  }
363
363
  ```
364
364
 
365
- Snapshot catalog entries contain prompt metadata only. Call this lazily when the user invokes a prompt.
365
+ The snapshot catalog holds only prompt IDs and labels. Call this when the user chooses a prompt.
366
366
 
367
367
  ### `session.autocompletePaths`
368
368
 
369
- Returns bounded path suggestions from the execution environment.
369
+ Returns a limited list of path suggestions from the execution environment.
370
370
 
371
371
  ```ts
372
372
  params: { sessionId: string; query: string; limit: number }
@@ -379,7 +379,7 @@ result: { paths: string[] }
379
379
 
380
380
  ### `session.reload`
381
381
 
382
- Reloads session-owned configuration and content from the execution environment.
382
+ Reloads the session's configuration and content from the execution environment.
383
383
 
384
384
  ```ts
385
385
  params: { sessionId: string }
@@ -390,11 +390,11 @@ result: {
390
390
  }
391
391
  ```
392
392
 
393
- Reload is a serialized context mutation. It interrupts an active turn and rejects pending input. It does not reload client-owned themes or tools, process environment variables, or host-wide services. See [configuration](configuration.md) for apply boundaries.
393
+ Reload changes the context and waits its turn behind other changes. It interrupts a running turn and rejects pending input. It does not reload client themes or tools, process environment variables, or host services. See [configuration](configuration.md) for when changes apply.
394
394
 
395
395
  ### `session.compact`
396
396
 
397
- Manually replaces active model context with a generated summary.
397
+ Replaces the model's context with a generated summary.
398
398
 
399
399
  ```ts
400
400
  params: {
@@ -409,11 +409,11 @@ result: {
409
409
  }
410
410
  ```
411
411
 
412
- Compaction interrupts an active turn, rejects pending input, and returns an authoritative replacement snapshot. A successful compaction advances the timeline epoch.
412
+ Compaction interrupts a running turn, rejects pending input, and returns the new snapshot. A successful compaction advances the timeline epoch.
413
413
 
414
414
  ### `session.rewind`
415
415
 
416
- Removes one selected user history entry and all later active state.
416
+ Removes one user message and everything after it.
417
417
 
418
418
  ```ts
419
419
  params: { sessionId: string; historyEntryId: string }
@@ -425,13 +425,13 @@ result: {
425
425
  }
426
426
  ```
427
427
 
428
- Rewind requires no active turn and no pending user input. It returns `busy` rather than interrupting work. The returned `text` is the selected user text for restoring to an editor.
428
+ Rewind requires an idle session with no pending input, and returns `busy` instead of interrupting work. The returned `text` is the removed user message, for putting back in an editor.
429
429
 
430
430
  ## Control subagents and ephemeral contexts
431
431
 
432
432
  ### `session.interruptSubagent`
433
433
 
434
- Interrupts the current run of one supervised subagent without disposing its reusable thread.
434
+ Interrupts one subagent's current run. The subagent stays available for follow-ups.
435
435
 
436
436
  ```ts
437
437
  params: {
@@ -445,7 +445,7 @@ result: {
445
445
 
446
446
  ### `session.ephemeral.create`
447
447
 
448
- Creates a non-persisted host-owned agent context independent of the main timeline.
448
+ Creates an agent context on the host that is not saved and is separate from the main conversation.
449
449
 
450
450
  ```ts
451
451
  params: {
@@ -459,7 +459,7 @@ result: {
459
459
  }
460
460
  ```
461
461
 
462
- The context uses the hosted session's persona and execution environment plus the supplied instructions and exact tool set. `reasoning` sets the initial effort for new threads. When omitted, the context captures the parent session agent's current effective effort. Later parent setting changes do not affect the context. It is not recoverable after host restart.
462
+ The context uses the session's persona and execution environment, with the given instructions and exactly the given tools. `reasoning` sets the starting effort for new threads. Without it, the context uses the session's effort at creation time. Later changes to the session's settings do not affect the context. It does not survive a host restart.
463
463
 
464
464
  ### `session.ephemeral.submit`
465
465
 
@@ -477,7 +477,7 @@ params: {
477
477
  result: { threadId: string; response: string }
478
478
  ```
479
479
 
480
- `reasoning` updates the target thread before running the submitted message and remains active for later submissions. When omitted, the thread retains its current effort. `forkFromThreadId` creates a new thread from an idle thread in the same context, including its current reasoning effort; a submit-time `reasoning` value overrides only the new fork. Overlapping submissions to the same thread return `busy`; independent threads can run concurrently.
480
+ `reasoning` changes the thread's effort before running the message, and stays in effect for later messages. Without it, the thread keeps its current effort. `forkFromThreadId` creates a new thread from an idle thread in the same context, copying its effort; a `reasoning` value given here applies only to the new fork. A second submission to a busy thread returns `busy`, while different threads can run at once.
481
481
 
482
482
  ### `session.ephemeral.close`
483
483
 
@@ -497,7 +497,7 @@ result: {
497
497
 
498
498
  ## Complete delegated client-tool calls
499
499
 
500
- These methods are for a client that advertised tools during `initialize`. Ordinary clients do not call them.
500
+ These methods are for clients that offered tools in `initialize`. Other clients never call them.
501
501
 
502
502
  ### `session.clientTool.ack`
503
503
 
@@ -523,9 +523,9 @@ result: {
523
523
  }
524
524
  ```
525
525
 
526
- The optional presentation is a partial running-state override. When present, `subject` must be non-empty and may contain line feeds but not carriage returns. Each detail text and metadata value is one line. Presentation objects are limited to 1 MiB; subjects and detail values to 256 KiB each; metadata values to 16 KiB each; and detail and metadata collections to 1,024 entries each.
526
+ The optional presentation partly overrides the running tool card. If given, `subject` must be non-empty and may contain line feeds but not carriage returns. Each detail text and metadata value is one line. Presentation objects are limited to 1 MiB; subjects and detail values to 256 KiB each; metadata values to 16 KiB each; and detail and metadata collections to 1,024 entries each.
527
527
 
528
- The host preserves explicit fields within those safety limits and supplies canonical display-truncated defaults for omitted fields. It owns the action and operation and records the resolved presentation. Empty detail or metadata arrays suppress those default fields. An accepted acknowledgement authorizes the client to begin execution.
528
+ The host keeps fields you set, within those limits, and fills in omitted fields with defaults truncated as Tau truncates its own cards. It sets the action and operation, and records the final presentation. An empty `details` or `metadata` array hides that default. Once the acknowledgement is accepted, the client may start work.
529
529
 
530
530
  ### `session.clientTool.result`
531
531
 
@@ -564,10 +564,10 @@ params:
564
564
  result: { accepted: boolean };
565
565
  ```
566
566
 
567
- `content` preserves text/image block order in the model-facing result, snapshots, and deltas. It may be empty and allows at most 1,024 blocks, including at most 16 images with valid padded base64 representing at most 3.5 MiB each. Image bytes are not presentation content.
567
+ `content` keeps the order of text and image blocks in the model's result, snapshots, and deltas. It may be empty and can have at most 1,024 blocks, including at most 16 images in valid padded base64 of at most 3.5 MiB each. Images are never shown in the tool card.
568
568
 
569
- The optional result presentation applies only to the reported terminal state and is resolved independently from the running presentation. The host preserves explicit fields unchanged after safety validation and supplies canonical display-truncated defaults for omitted fields. If no client result arrives, the host uses a complete fallback for timeout, cancellation, detach, or another terminal outcome.
569
+ The optional presentation applies only to the finished card, separately from the running one. The host keeps fields you set once they pass validation, and fills in omitted fields with truncated defaults. If no result arrives, the host shows a complete default card for the timeout, cancellation, detach, or other outcome.
570
570
 
571
- A successful result is accepted only after the host has accepted the acknowledgement. An error sent before acknowledgement records a preparation failure, such as an error from `describe`, without authorizing execution. An error sent afterward records an execution failure.
571
+ A successful result is accepted only after the host has accepted the acknowledgement. An error sent before acknowledging records a preparation failure, such as an error from `describe`, and the tool never runs. An error sent afterward records an execution failure.
572
572
 
573
- `accepted: false` means the successful call was not yet authorized, or the call was cancelled, timed out, detached, unknown, or already completed. Do not retry or send additional results for that call.
573
+ `accepted: false` means a successful result arrived before the call was acknowledged, or the call was cancelled, timed out, detached, unknown, or already finished. Do not retry or send more results for that call.
@@ -1,8 +1,8 @@
1
1
  # Session protocol
2
2
 
3
- Tau's session protocol is the public wire contract for clients that create, observe, and control hosted sessions through `tau serve`. Node applications can usually use the typed [Node SDK](node-sdk.md) instead.
3
+ Tau's session protocol is the wire format for clients that create, observe, and control sessions hosted by `tau serve`. Node applications can usually use the typed [Node SDK](node-sdk.md) instead.
4
4
 
5
- The protocol is transport-neutral and request and response based, with separate server messages for observed state, pending input, subagent activity, ephemeral feedback, and delegated client tools. Tau currently exposes it over WebSocket. The complete method surface is in the [session protocol method reference](session-protocol-methods.md).
5
+ The protocol is based on requests and responses, plus server messages for session state, pending input, subagent activity, short-lived feedback, and client tool calls. It does not depend on a particular transport; Tau serves it over WebSocket. The complete method surface is in the [session protocol method reference](session-protocol-methods.md).
6
6
 
7
7
  ## Connect over WebSocket
8
8
 
@@ -10,7 +10,7 @@ The protocol is transport-neutral and request and response based, with separate
10
10
 
11
11
  The server exposes one host. Starting it does not create or select a session. A client lists, creates, or observes sessions explicitly.
12
12
 
13
- The client, host, and execution environment remain separate logical machines even when they share a process or filesystem. Session paths and commands belong to the execution environment. Persistence, credentials, model work, and protocol coordination belong to the host. Client tools and local UI belong to the connected client. See [ownership and scope](ownership-and-scope.md) before passing paths or credentials across this boundary.
13
+ The client, host, and execution environment are separate, even when they share a process or filesystem. Session paths and commands are on the execution environment. Saving, credentials, model calls, and protocol handling are on the host. Client tools and local UI are on the connected client. See [ownership and scope](ownership-and-scope.md) before passing paths or credentials across this boundary.
14
14
 
15
15
  ## Connect and initialize
16
16
 
@@ -24,7 +24,7 @@ The server sends `ready` as its first message:
24
24
  }
25
25
  ```
26
26
 
27
- The actual `methods` array contains the complete supported method set, not only the shortened example above. Protocol versioning is exact rather than negotiated. A client and host that disagree on `version` must use compatible Tau releases.
27
+ The real `methods` array lists every supported method; the example above is shortened. Versions must match exactly and are not negotiated. If client and host disagree on `version`, use matching Tau releases.
28
28
 
29
29
  After `ready`, send `initialize` with non-empty client metadata:
30
30
 
@@ -40,9 +40,9 @@ After `ready`, send `initialize` with non-empty client metadata:
40
40
  }
41
41
  ```
42
42
 
43
- A successful result returns `protocolVersion`, the complete `methods` array, and `alreadyInitialized`. Repeating `initialize` is allowed and reports `alreadyInitialized: true`. Initialization is a handshake signal, not a session operation, but clients should complete it before other requests.
43
+ A successful result returns `protocolVersion`, the full `methods` array, and `alreadyInitialized`. Calling `initialize` again is allowed and returns `alreadyInitialized: true`. It does not act on any session, but clients should complete it before other requests.
44
44
 
45
- An initializing client may advertise in-process client tools through `client.tools`. Tool calls are then delegated over this connection. The [client tools](client-tools.md) page owns tool behavior, authority, and command-backed helpers; this page describes the wire messages required by a raw protocol client.
45
+ A client can offer its own tools in `client.tools` when initializing. Calls to those tools are then sent to it over this connection. [Client tools](client-tools.md) covers tool behavior, permissions, and command helpers; this page covers only the wire messages a raw protocol client needs.
46
46
 
47
47
  ## Send requests and match responses
48
48
 
@@ -58,7 +58,7 @@ Every request has the same envelope:
58
58
  }
59
59
  ```
60
60
 
61
- `id` is a non-empty client-chosen string and must identify the outstanding request on that connection. `params` is always required, including `{}` for `session.list`. The host validates required fields, field types, discriminators, method names, and the exact protocol version. Unknown object fields are accepted and stripped, except system messages and their metadata, which reject unsupported fields.
61
+ `id` is a non-empty string chosen by the client, unique among its open requests on the connection. `params` is always required, even if empty, as in `{}` for `session.list`. The host validates required fields, types, discriminators, method names, and the exact protocol version. Unknown fields are accepted and removed, except in system messages and their metadata, where they are rejected.
62
62
 
63
63
  Successful responses echo the request id:
64
64
 
@@ -76,7 +76,7 @@ A request can remain open while the host emits state messages or handles later r
76
76
 
77
77
  ## Observe before consuming session state
78
78
 
79
- `session.create` creates a hosted session but does not observe it. `session.observe` establishes observation on this connection and returns three authoritative baselines together:
79
+ `session.create` creates a session but does not observe it. `session.observe` starts observing on this connection and returns three complete starting states together:
80
80
 
81
81
  ```json
82
82
  {
@@ -86,13 +86,13 @@ A request can remain open while the host emits state messages or handles later r
86
86
  }
87
87
  ```
88
88
 
89
- Install all three baselines before processing later messages for that session. The host buffers updates while preparing the observe response and sends only updates newer than the returned revisions afterward.
89
+ Install all three before processing later messages for that session. The host holds back updates while preparing the response, and afterward sends only updates newer than the returned revisions.
90
90
 
91
- Observation controls delivery, not session ownership. `session.unobserve` stops this connection's updates without deleting the session or interrupting work. Several connections may observe the same session, and every observer can mutate it. Client-tool names must remain unique across observing clients.
91
+ Observing controls which updates you receive; it does not make you the owner. `session.unobserve` stops this connection's updates without deleting the session or interrupting work. Several connections can observe one session, and each can change it. Client tool names must be unique among observing clients.
92
92
 
93
- ## Treat the snapshot as authoritative
93
+ ## Treat the snapshot as the source of truth
94
94
 
95
- `SessionProtocolSnapshot` is the recoverable public state for one session. Its major fields are:
95
+ `SessionProtocolSnapshot` is the saved, recoverable state of one session. Its main fields are:
96
96
 
97
97
  | Field | Meaning |
98
98
  | --- | --- |
@@ -103,26 +103,26 @@ Observation controls delivery, not session ownership. `session.unobserve` stops
103
103
  | `settings`, `costTotal` | Persona and reasoning settings, and accumulated session cost. |
104
104
  | `bootstrap`, `catalog` | Selected model and prompt metadata plus available personas, prompt metadata, skills, and enabled host-configured MCP server names. |
105
105
  | `executionEnvironment` | The environment kind, identity, `cwd`, and home used for agent-visible work. |
106
- | `messages`, `turns` | Synchronized model-facing records and durable logical-turn receipts. |
106
+ | `messages`, `turns` | Messages sent to the model, and a saved record for each accepted turn. |
107
107
  | `timeline` | Ordered active transcript placement. |
108
- | `tools`, `operations`, `agents` | Mutable semantic state referenced by timeline items or client views. |
108
+ | `tools`, `operations`, `agents` | Changing state that timeline items or client views refer to. |
109
109
  | `facets` | Versioned client-facing metadata. Unknown facet kinds and versions should be ignored. |
110
110
 
111
- `catalog.mcpServers` lists enabled MCP server names from the host configuration. It does not indicate live connections; servers connect lazily when used. Only names are exposed, not connection settings or credentials.
111
+ `catalog.mcpServers` lists the enabled MCP servers in the host configuration, by name only. It does not mean they are connected; servers connect on first use. Connection settings and credentials are never included.
112
112
 
113
- `bootstrap.prompt.subagentSystemPrompt` is present when subagent launches are enabled. Each catalog persona has a `subagentLaunchModels` allowlist. Subagent records have task titles and IDs, not worker-type names.
113
+ `bootstrap.prompt.subagentSystemPrompt` is present when subagents can be started. Each catalog persona has a `subagentLaunchModels` allowlist. Subagent records have task titles and IDs; there are no worker types.
114
114
 
115
115
  Render active transcript order from `timeline.items`, not by sorting or filtering `messages`. A timeline item either contains a notice or references a message, tool, or operation in the corresponding snapshot collection. Some model-visible messages intentionally have no timeline item.
116
116
 
117
117
  The timeline has an `epoch`, a per-epoch sequence high-water mark, and ordered items. Successful compaction replaces the active recoverable timeline and advances the epoch. Rewind stays in the same epoch, removes later items, and preserves the sequence high-water mark so sequence numbers are not reused.
118
118
 
119
- User message text is raw recoverable session text. User-facing renderers should remove Tau metadata and leading exact `<system>...</system>\n` blocks. The Node SDK exports projection helpers for this purpose. Do not apply user-text projection to assistant, tool-result, or protocol system messages.
119
+ User message text is stored raw. Before showing it, remove Tau metadata and any leading `<system>...</system>\n` blocks; the Node SDK exports helpers for this. Apply this only to user messages, never to assistant, tool-result, or system messages.
120
120
 
121
- The initial system message is the separate persona/base prompt. Intermediate system messages are ordered history records with plain-text `content`, a `timestamp`, and required structured `metadata`: `{ type: "instruction" | "auto-compaction-continuation", version: 1 }`. They remain model-visible and recoverable. The normal TUI hides them, while searchable conversation history includes them as system entries. Tau metadata is removed before provider dispatch. Text-block arrays, named sections, and tool additions or removals are not supported in system messages.
121
+ The first system message is the persona's base prompt. Later system messages are history records, in order, with plain-text `content`, a `timestamp`, and required `metadata`: `{ type: "instruction" | "auto-compaction-continuation", version: 1 }`. The model sees them and they are recoverable. The TUI hides them, and searchable history includes them as system entries. Tau metadata is removed before sending to the provider. System messages cannot contain text-block arrays, named sections, or tool changes.
122
122
 
123
- Intermediate instructions are committed without a user turn receipt. Their durable append uses the `system-message` delta cause and does not require a timeline item. The initial prompt has no intermediate-message metadata; recovery restores subsequent instructions without duplicating that base prompt. There is no public insertion method or automatic conversion of user-authored `<system>` text.
123
+ These later system messages are added without a turn record. Adding one uses the `system-message` delta cause and needs no timeline item. The base prompt has no such metadata, and recovery restores later instructions without duplicating it. Clients cannot insert system messages, and a user's `<system>` text is never turned into one.
124
124
 
125
- Turn requests return a terminal outcome, and accepted user turns are also keyed by `userHistoryEntryId` in `snapshot.turns`. Use that ledger to distinguish an unknown request from accepted running work and settled work. Do not infer request outcomes from notice titles, message counts, or timing.
125
+ Turn requests return a final outcome, and each accepted user turn is also recorded in `snapshot.turns`, keyed by `userHistoryEntryId`. Use this record to tell an unknown request apart from accepted work that is running or finished. Never infer outcomes from notice titles, message counts, or timing.
126
126
 
127
127
  User-facing behavior such as retry, compaction, rewind, and recovery is described in [sessions](sessions.md).
128
128
 
@@ -152,17 +152,17 @@ Observed snapshot changes arrive as `session.delta`:
152
152
  }
153
153
  ```
154
154
 
155
- For a patch, `fromRevision` must equal the installed snapshot revision and `toRevision` becomes the new revision. Apply every `changes` entry atomically and in order. Changes can set scalar state, append or replace messages, append streamed content, update the timeline, or set and remove keyed tools, operations, agents, turns, and facets.
155
+ For a patch, `fromRevision` must equal your current snapshot revision, and `toRevision` becomes the new one. Apply all `changes` in order, as one unit. Changes can set scalar state, append or replace messages, append streamed content, update the timeline, or set and remove keyed tools, operations, agents, turns, and facets.
156
156
 
157
- `snapshot.reset` carries a complete replacement snapshot. Reset causes identify `compaction`, `rewind`, or `resync`; compaction and rewind include the timeline data needed to validate the transition. Use the structured cause rather than inferring destructive transitions from content.
157
+ `snapshot.reset` carries a complete new snapshot. Its cause is `compaction`, `rewind`, or `resync`, and compaction and rewind include the timeline data needed to validate the change. Use the cause; never guess at a destructive change from the content.
158
158
 
159
- If a patch has an unexpected `fromRevision`, or applying any change would produce invalid references or ordering, stop applying deltas and call `session.snapshot`. Deltas whose `toRevision` is already installed are stale and must not replay client presentation transitions.
159
+ If a patch has an unexpected `fromRevision`, or a change would leave invalid references or ordering, stop applying deltas and call `session.snapshot`. A delta whose `toRevision` you already have is stale; do not replay its effects in the UI.
160
160
 
161
161
  Node clients can use `applySessionProtocolDelta`, which validates session identity, revision continuity, timeline rules, references, and the resulting snapshot.
162
162
 
163
163
  ## Maintain the independent live-state channels
164
164
 
165
- Not all observed state belongs in the recoverable snapshot. Each live channel has its own revision or delivery semantics.
165
+ Some live state is not part of the snapshot. Each of these channels has its own revision or delivery rules.
166
166
 
167
167
  ### Pending user messages
168
168
 
@@ -183,23 +183,23 @@ Not all observed state belongs in the recoverable snapshot. Each live channel ha
183
183
  }
184
184
  ```
185
185
 
186
- Replace the complete pending list only when its revision is newer. Pending revisions are independent of snapshot revisions. This state is shared by observers while the hosted session remains in memory, but it starts empty after recovery.
186
+ Replace the whole list, but only when the revision is newer. These revisions are separate from snapshot revisions. All observers share this state while the session is loaded on the host. It is empty after recovery.
187
187
 
188
188
  ### Subagent activities
189
189
 
190
190
  `session.subagentActivities` carries an independent `revision` and a list of changes. `agent.set` replaces that agent's complete current-run activity list; `agent.remove` deletes it. Apply changes only when the message revision is newer than the installed activity revision. The observe result provides the complete baseline.
191
191
 
192
- Activity lists contain bounded assistant text, settled tool presentations, and notices. They are transient supervision state, not a substitute for `snapshot.agents`, and they start empty after recovery.
192
+ Activity lists contain limited assistant text, finished tool cards, and notices. They are live progress information, do not replace `snapshot.agents`, and are empty after recovery.
193
193
 
194
194
  ### Ephemeral events
195
195
 
196
- `session.ephemeral` carries best-effort live events with no channel revision:
196
+ `session.ephemeral` carries live events that are not guaranteed and have no revision:
197
197
 
198
- - `feedback.notice` is temporary footer feedback.
199
- - `ephemeral-agent.thread-update` reports live progress for an ephemeral context and thread.
200
- - `timeline.item` is a non-recoverable notice with an active timeline epoch and allocated sequence.
198
+ - `feedback.notice` is short-lived footer feedback.
199
+ - `ephemeral-agent.thread-update` reports progress of an ephemeral context and thread.
200
+ - `timeline.item` is a notice that is not saved, with a timeline epoch and sequence number.
201
201
 
202
- A `timeline.item` can be merged into current presentation only when its epoch matches the installed snapshot. Discard old-epoch items after compaction and post-cutoff items after rewind. Missing ephemeral events do not require resynchronization.
202
+ Show a `timeline.item` only if its epoch matches your snapshot. After compaction, drop items from the old epoch; after rewind, drop items past the rewind point. Missing ephemeral events never require a resync.
203
203
 
204
204
  ## Delegate client tools
205
205
 
@@ -219,11 +219,11 @@ An initialized client that advertised a tool can receive:
219
219
  }
220
220
  ```
221
221
 
222
- Acknowledge promptly with `session.clientTool.ack`, optionally including a bounded partial running presentation. Begin execution only after the acknowledgement returns `{ accepted: true }`, then send exactly one `session.clientTool.result` with either `{ ok: true, content }` or `{ ok: false, error }` and an optional independent terminal presentation. Successful `content` is an ordered array of text/image blocks. Both presentation objects may contain `subject`, `subjectWrap`, `details`, and `metadata`; the host owns action and operation and supplies every omitted field. Explicit fields are preserved unchanged after protocol safety validation, while generated defaults use Tau's canonical display truncation. Empty detail or metadata arrays suppress those defaults.
222
+ Acknowledge promptly with `session.clientTool.ack`, optionally with a partial presentation for the running tool card. Start work only after the acknowledgement returns `{ accepted: true }`. Then send exactly one `session.clientTool.result` with `{ ok: true, content }` or `{ ok: false, error }`, optionally with a separate presentation for the finished card. `content` is an ordered array of text and image blocks. Both presentations may contain `subject`, `subjectWrap`, `details`, and `metadata`. The host sets the action and operation and fills in omitted fields. Fields you set are kept unchanged once they pass validation, while defaults are truncated the way Tau truncates its own cards. An empty `details` or `metadata` array hides that default.
223
223
 
224
- A successful result is rejected until acknowledgement has completed. If preparation itself fails, send an error result before acknowledgement; the host records it as a preparation failure without authorizing execution. If no result arrives because of timeout, cancellation, detach, or another failure, the host renders a complete fallback terminal presentation. The result method returns `{ accepted: boolean }`; `false` means the message is invalid for the call's current state or the call is no longer waiting for it.
224
+ A successful result is rejected until the acknowledgement has completed. If preparation fails, send an error result before acknowledging; the host records a preparation failure and the tool never runs. If no result arrives, because of a timeout, cancellation, detach, or other failure, the host shows a complete default card. The result method returns `{ accepted: boolean }`; `false` means the result does not fit the call's current state or the call no longer expects it.
225
225
 
226
- `session.clientTool.cancel` names the session and call with reason `aborted`, `timeout`, `client-detached`, or `host-failed`. Abort local work and do not send a late result. The SDK implements this lifecycle automatically. Tool execution authority and the execution-environment facade are covered in [client tools](client-tools.md).
226
+ `session.clientTool.cancel` names the session and call, with reason `aborted`, `timeout`, `client-detached`, or `host-failed`. Stop local work and do not send a result. The SDK handles all of this for you. Permissions and execution-environment access for client tools are covered in [client tools](client-tools.md).
227
227
 
228
228
  ## Handle errors and terminal transport failure
229
229
 
@@ -255,19 +255,19 @@ The supported codes are:
255
255
  | `cancelled` | Pending input, execution, or sampling was cancelled. |
256
256
  | `internal_error` | The host could not complete the operation. |
257
257
 
258
- When no valid request id can be recovered, an error response uses `id: null`. Error `message` and optional `data` are diagnostic. Branch on `code`, not message text.
258
+ When the request ID cannot be read, the error response uses `id: null`. The error `message` and optional `data` are for diagnostics. Branch on `code`, never on message text.
259
259
 
260
- A WebSocket close, malformed server payload, unsupported version, or other terminal transport failure rejects all outstanding requests. Stop sending, cancel client-local delegated tools, and reconnect or create a new transport deliberately. A WebSocket disconnect detaches from the long-running host.
260
+ A WebSocket close, a malformed server message, an unsupported version, or another fatal transport failure rejects all open requests. Stop sending, cancel running client tools, and reconnect or create a new transport on purpose. A WebSocket disconnect only detaches from the long-running host.
261
261
 
262
262
  ## Coordinate concurrent work
263
263
 
264
- The server can accept several requests before earlier requests settle, so responses and streamed messages may interleave.
264
+ The server accepts new requests before earlier ones finish, so responses and streamed messages can interleave.
265
265
 
266
266
  - Only one main-session turn runs at a time. `session.submit` and `session.retry` return `busy` on conflict.
267
- - `session.queue` waits for idle work. `session.steer` requests the next safe turn boundary. Each request receives its own eventual response.
268
- - Session mutations are serialized in arrival order across clients. Mutations that replace context can interrupt active work and reject pending input. `session.rewind` instead requires the session to be idle with no pending input.
269
- - `session.setReasoning` is serialized but does not interrupt the active turn. The new setting applies to the next independently started turn.
270
- - `session.exec` and `session.sample` are side channels. They can overlap turns, mutations, each other, and ephemeral agents. Clients own workspace coordination.
271
- - Ephemeral contexts run outside the main mutation queue. Two submissions to the same ephemeral thread conflict, while different threads can run independently.
267
+ - `session.queue` waits until the session is idle. `session.steer` joins the running turn at its next safe point. Each request gets its own response when done.
268
+ - Session changes run one at a time, in arrival order across all clients. Changes that replace the context can interrupt running work and reject pending input. `session.rewind` instead requires an idle session with no pending input.
269
+ - `session.setReasoning` waits its turn but does not interrupt the running turn. The new setting applies from the next turn.
270
+ - `session.exec` and `session.sample` run alongside everything else: turns, other changes, each other, and ephemeral agents. Clients must coordinate their own use of the workspace.
271
+ - Ephemeral contexts are not part of that one-at-a-time ordering. Two submissions to the same ephemeral thread conflict, while different threads can run at once.
272
272
 
273
- Do not assume a success response arrives before the deltas caused by that request. Maintain state from the observed streams, correlate completion by request id, and use `session.snapshot` when continuity is uncertain.
273
+ A success response may arrive before or after the deltas the request caused. Keep state from the observed streams, match completion by request ID, and call `session.snapshot` when unsure whether you missed something.