@markusylisiurunen/tau 0.3.81 → 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 (180) 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/commands/registry.js +0 -22
  9. package/dist/core/commands/registry.js.map +1 -1
  10. package/dist/core/history/cli.js +48 -0
  11. package/dist/core/history/cli.js.map +1 -1
  12. package/dist/core/history/history_manager.js +9 -3
  13. package/dist/core/history/history_manager.js.map +1 -1
  14. package/dist/core/history/local_history_store.js +9 -2
  15. package/dist/core/history/local_history_store.js.map +1 -1
  16. package/dist/core/history/remote_history_client.js +18 -3
  17. package/dist/core/history/remote_history_client.js.map +1 -1
  18. package/dist/core/models/openrouter.js +17 -5
  19. package/dist/core/models/openrouter.js.map +1 -1
  20. package/dist/core/models/openrouter_decisions.js +16 -1
  21. package/dist/core/models/openrouter_decisions.js.map +1 -1
  22. package/dist/core/runtime/chat_runtime.js +2 -13
  23. package/dist/core/runtime/chat_runtime.js.map +1 -1
  24. package/dist/core/static/tau_docs/client-tools.md +53 -53
  25. package/dist/core/static/tau_docs/config-reference.md +46 -43
  26. package/dist/core/static/tau_docs/configuration.md +40 -36
  27. package/dist/core/static/tau_docs/credentials.md +32 -31
  28. package/dist/core/static/tau_docs/getting-started.md +28 -28
  29. package/dist/core/static/tau_docs/history.md +114 -79
  30. package/dist/core/static/tau_docs/image-generation.md +20 -18
  31. package/dist/core/static/tau_docs/index.md +30 -31
  32. package/dist/core/static/tau_docs/manifest.json +1 -0
  33. package/dist/core/static/tau_docs/models.md +17 -17
  34. package/dist/core/static/tau_docs/node-sdk.md +69 -72
  35. package/dist/core/static/tau_docs/nook.md +75 -69
  36. package/dist/core/static/tau_docs/openrouter.md +28 -13
  37. package/dist/core/static/tau_docs/ownership-and-scope.md +21 -23
  38. package/dist/core/static/tau_docs/pdf-unpacking.md +6 -6
  39. package/dist/core/static/tau_docs/personas.md +29 -27
  40. package/dist/core/static/tau_docs/prompts-and-project-context.md +41 -39
  41. package/dist/core/static/tau_docs/remote-sessions.md +38 -38
  42. package/dist/core/static/tau_docs/sdk-diff-review.md +16 -12
  43. package/dist/core/static/tau_docs/security.md +72 -72
  44. package/dist/core/static/tau_docs/session-protocol-methods.md +46 -91
  45. package/dist/core/static/tau_docs/session-protocol.md +54 -54
  46. package/dist/core/static/tau_docs/sessions.md +97 -107
  47. package/dist/core/static/tau_docs/skills.md +25 -20
  48. package/dist/core/static/tau_docs/speech-generation.md +5 -5
  49. package/dist/core/static/tau_docs/subagents.md +42 -44
  50. package/dist/core/static/tau_docs/telegram-projects.md +142 -0
  51. package/dist/core/static/tau_docs/telegram.md +65 -182
  52. package/dist/core/static/tau_docs/tools.md +72 -91
  53. package/dist/core/static/tau_docs/troubleshooting.md +94 -149
  54. package/dist/core/static/tau_docs/tui.md +124 -81
  55. package/dist/core/telegram/adapter.js +1 -6
  56. package/dist/core/telegram/adapter.js.map +1 -1
  57. package/dist/core/tool/image_generate.js +5 -17
  58. package/dist/core/tool/image_generate.js.map +1 -1
  59. package/dist/core/tool/openrouter.js +21 -2
  60. package/dist/core/tool/openrouter.js.map +1 -1
  61. package/dist/core/tools/catalog.js +0 -11
  62. package/dist/core/tools/catalog.js.map +1 -1
  63. package/dist/core/tools/tool_names.js +0 -6
  64. package/dist/core/tools/tool_names.js.map +1 -1
  65. package/dist/core/utils/gemini_transcription.js +103 -28
  66. package/dist/core/utils/gemini_transcription.js.map +1 -1
  67. package/dist/core/utils/model_stream.js +17 -1
  68. package/dist/core/utils/model_stream.js.map +1 -1
  69. package/dist/core/utils/user_metadata.js +0 -14
  70. package/dist/core/utils/user_metadata.js.map +1 -1
  71. package/dist/core/version.js +2 -2
  72. package/dist/diff_tool/app/dist/assets/{angular-html-BbLgbIhq.js → angular-html-x29PkEoY.js} +1 -1
  73. package/dist/diff_tool/app/dist/assets/{angular-ts-DXk17TRM.js → angular-ts-CsWCqoCf.js} +1 -1
  74. package/dist/diff_tool/app/dist/assets/{apl-BsvksCXR.js → apl-CEvdc7jl.js} +1 -1
  75. package/dist/diff_tool/app/dist/assets/{astro-DH775E4V.js → astro-Cgi6YxH2.js} +1 -1
  76. package/dist/diff_tool/app/dist/assets/{blade-Ck99Rm59.js → blade-B0pr7Zx6.js} +1 -1
  77. package/dist/diff_tool/app/dist/assets/{c-DJpHqu5J.js → c-DDVLgtVy.js} +1 -1
  78. package/dist/diff_tool/app/dist/assets/{chapel-Owff0Csy.js → chapel-Bk9M7Jej.js} +1 -1
  79. package/dist/diff_tool/app/dist/assets/{cobol-Cv2gZuhO.js → cobol-DyEvnPuC.js} +1 -1
  80. package/dist/diff_tool/app/dist/assets/{coffee-Bji0YCf_.js → coffee-Di2-m3Jq.js} +1 -1
  81. package/dist/diff_tool/app/dist/assets/{cpp-DTjA_yFF.js → cpp-CWpAaUgO.js} +1 -1
  82. package/dist/diff_tool/app/dist/assets/{crystal-Dd00NOeb.js → crystal-CUker9Zt.js} +1 -1
  83. package/dist/diff_tool/app/dist/assets/{css-D44TN1V6.js → css-D4XpBIiJ.js} +1 -1
  84. package/dist/diff_tool/app/dist/assets/{edge-CVmGSi2m.js → edge-CVxhhF7L.js} +1 -1
  85. package/dist/diff_tool/app/dist/assets/{elixir-B8Mq7no2.js → elixir-B_FS9APl.js} +1 -1
  86. package/dist/diff_tool/app/dist/assets/{elm-CXS0I3Z2.js → elm-1KyefTkH.js} +1 -1
  87. package/dist/diff_tool/app/dist/assets/{erb-B9oDKaUo.js → erb-CCgO9dRW.js} +1 -1
  88. package/dist/diff_tool/app/dist/assets/{git-rebase-DT-YFebH.js → git-rebase-D0VYo_oY.js} +1 -1
  89. package/dist/diff_tool/app/dist/assets/{glimmer-js-s0DXlNjq.js → glimmer-js-Ce07ngjZ.js} +1 -1
  90. package/dist/diff_tool/app/dist/assets/{glimmer-ts-QgEB5S2z.js → glimmer-ts-BmOM4djO.js} +1 -1
  91. package/dist/diff_tool/app/dist/assets/{glsl-NA0icwbY.js → glsl-D-jkLYJ8.js} +1 -1
  92. package/dist/diff_tool/app/dist/assets/{graphql-0_dOlfV0.js → graphql-DZOwJE5e.js} +1 -1
  93. package/dist/diff_tool/app/dist/assets/{hack-D-mr7l1l.js → hack-Cgvn19h8.js} +1 -1
  94. package/dist/diff_tool/app/dist/assets/{haml-B0-oQmz7.js → haml-JTmDSYQl.js} +1 -1
  95. package/dist/diff_tool/app/dist/assets/{handlebars-Yq9bXpWN.js → handlebars-CChh7Dy5.js} +1 -1
  96. package/dist/diff_tool/app/dist/assets/{html-B8bMmdRK.js → html-BKgzx_cb.js} +1 -1
  97. package/dist/diff_tool/app/dist/assets/{html-derivative-BpxSlQb_.js → html-derivative-CdFl0BmX.js} +1 -1
  98. package/dist/diff_tool/app/dist/assets/{http-hS_53mxt.js → http-DZeL7KvH.js} +1 -1
  99. package/dist/diff_tool/app/dist/assets/{hurl-B2ST1kwl.js → hurl-CqKevOlQ.js} +1 -1
  100. package/dist/diff_tool/app/dist/assets/index-BXyr8GCM.js +341 -0
  101. package/dist/diff_tool/app/dist/assets/{java-D4mj0lZJ.js → java-Sq3MCkId.js} +1 -1
  102. package/dist/diff_tool/app/dist/assets/{javascript-wC7rrKiV.js → javascript-CHZB4Nse.js} +1 -1
  103. package/dist/diff_tool/app/dist/assets/{jinja-DbQ3o87F.js → jinja-C4ucJVla.js} +1 -1
  104. package/dist/diff_tool/app/dist/assets/{jison-CrE9FdvP.js → jison-D3mprebA.js} +1 -1
  105. package/dist/diff_tool/app/dist/assets/{json-xjicDyWN.js → json-DgPfCYJ1.js} +1 -1
  106. package/dist/diff_tool/app/dist/assets/{jsx-m28lXojQ.js → jsx-BG-Tx0cw.js} +1 -1
  107. package/dist/diff_tool/app/dist/assets/{julia-19xkOmop.js → julia-B1GnFeUC.js} +1 -1
  108. package/dist/diff_tool/app/dist/assets/{just-Cf7OorTr.js → just-_MZzo0MF.js} +1 -1
  109. package/dist/diff_tool/app/dist/assets/{latex-DDb7GQOy.js → latex-DI0kqjQy.js} +1 -1
  110. package/dist/diff_tool/app/dist/assets/{liquid-DHOuQ0rf.js → liquid-BtMAPeHl.js} +1 -1
  111. package/dist/diff_tool/app/dist/assets/{lua-BGyIvonw.js → lua-CFxaP0To.js} +1 -1
  112. package/dist/diff_tool/app/dist/assets/{marko-DB5OqI1C.js → marko-BIJocuFI.js} +1 -1
  113. package/dist/diff_tool/app/dist/assets/{mdc-DTyNMupO.js → mdc-BAgrdjTH.js} +1 -1
  114. package/dist/diff_tool/app/dist/assets/{nginx-DfF0fMYD.js → nginx-DE-3CsYn.js} +1 -1
  115. package/dist/diff_tool/app/dist/assets/{nim-BbwsXuZD.js → nim-DOxeXLhb.js} +1 -1
  116. package/dist/diff_tool/app/dist/assets/{org-BkOBBl1f.js → org-KTfP0tHA.js} +1 -1
  117. package/dist/diff_tool/app/dist/assets/{perl-BTXTOl4K.js → perl-BH-NxpgK.js} +1 -1
  118. package/dist/diff_tool/app/dist/assets/{php-DIMVQWiA.js → php-vuiVEXZK.js} +1 -1
  119. package/dist/diff_tool/app/dist/assets/{pug-B_nrb4dJ.js → pug-VlIlTMUy.js} +1 -1
  120. package/dist/diff_tool/app/dist/assets/{qml-1PXi8G8Z.js → qml-k6wTtGG-.js} +1 -1
  121. package/dist/diff_tool/app/dist/assets/{r-CJrAkc2Z.js → r-Ccjcb2zh.js} +1 -1
  122. package/dist/diff_tool/app/dist/assets/{razor-DgPUftNd.js → razor-BNhYgSCv.js} +1 -1
  123. package/dist/diff_tool/app/dist/assets/{regexp-C2hS8XvL.js → regexp-C4LFejPu.js} +1 -1
  124. package/dist/diff_tool/app/dist/assets/{rst-CDouhKnc.js → rst-DXLxI-UJ.js} +1 -1
  125. package/dist/diff_tool/app/dist/assets/{ruby-CAjKW1uO.js → ruby-BPuL4jDV.js} +1 -1
  126. package/dist/diff_tool/app/dist/assets/{sas-qAHkHLc1.js → sas-B3Yz8snb.js} +1 -1
  127. package/dist/diff_tool/app/dist/assets/{scss-Bfx2Ydid.js → scss-B2AJ5vpk.js} +1 -1
  128. package/dist/diff_tool/app/dist/assets/{shellscript-Bu76R8y2.js → shellscript-zyDexxnC.js} +1 -1
  129. package/dist/diff_tool/app/dist/assets/{shellsession-BU8BL0oL.js → shellsession-C8b8xluk.js} +1 -1
  130. package/dist/diff_tool/app/dist/assets/{soy-FRl8ozP-.js → soy-DKWe_XML.js} +1 -1
  131. package/dist/diff_tool/app/dist/assets/{sql-BacQgsEs.js → sql-uEbz-Epf.js} +1 -1
  132. package/dist/diff_tool/app/dist/assets/{stata-B9kkG-ET.js → stata-DieRPmHY.js} +1 -1
  133. package/dist/diff_tool/app/dist/assets/{surrealql-qvETr7iY.js → surrealql-Dbk3Sp1P.js} +1 -1
  134. package/dist/diff_tool/app/dist/assets/{svelte-B0z1MgHc.js → svelte-CjPbRmkM.js} +1 -1
  135. package/dist/diff_tool/app/dist/assets/{templ-DTnPshKb.js → templ-Do_f5vc4.js} +1 -1
  136. package/dist/diff_tool/app/dist/assets/{tex-Cosab9_H.js → tex-UjLP4qUm.js} +1 -1
  137. package/dist/diff_tool/app/dist/assets/{ts-tags-DNYvLFUH.js → ts-tags-5L2FutA6.js} +1 -1
  138. package/dist/diff_tool/app/dist/assets/{tsx-Dstq6j1a.js → tsx-B1pNtpUr.js} +1 -1
  139. package/dist/diff_tool/app/dist/assets/{twig-BzqZdwaX.js → twig-O41Vg_IM.js} +1 -1
  140. package/dist/diff_tool/app/dist/assets/{typescript-YOQ_oE25.js → typescript-Bj9uwnnJ.js} +1 -1
  141. package/dist/diff_tool/app/dist/assets/{typst-DTffwfpc.js → typst-DsibO7oD.js} +1 -1
  142. package/dist/diff_tool/app/dist/assets/{vue-D4OMj_C5.js → vue-DPhaEurv.js} +1 -1
  143. package/dist/diff_tool/app/dist/assets/{vue-html-kT4WrHGK.js → vue-html-DDV9NSy1.js} +1 -1
  144. package/dist/diff_tool/app/dist/assets/{vue-vine-CxeapeMO.js → vue-vine-Dh4jOifx.js} +1 -1
  145. package/dist/diff_tool/app/dist/assets/{xml-DWVpuurg.js → xml-DtIulkQk.js} +1 -1
  146. package/dist/diff_tool/app/dist/assets/{xsl-C0ciup5a.js → xsl-DoWtb58Z.js} +1 -1
  147. package/dist/diff_tool/app/dist/assets/{yaml-98Fvyfpc.js → yaml-CZC-l1Dg.js} +1 -1
  148. package/dist/diff_tool/app/dist/index.html +1 -1
  149. package/dist/history/worker/index.js +87 -83
  150. package/dist/history/worker/index.js.map +1 -1
  151. package/dist/host/local_session_host.js +24 -318
  152. package/dist/host/local_session_host.js.map +1 -1
  153. package/dist/host/session_host.js.map +1 -1
  154. package/dist/host/session_protocol_handler.js +0 -98
  155. package/dist/host/session_protocol_handler.js.map +1 -1
  156. package/dist/main.js +6 -7
  157. package/dist/main.js.map +1 -1
  158. package/dist/protocol/index.d.ts +1 -1
  159. package/dist/protocol/index.js.map +1 -1
  160. package/dist/protocol/session_protocol.d.ts +3 -28
  161. package/dist/protocol/session_protocol.js +1 -56
  162. package/dist/protocol/session_protocol.js.map +1 -1
  163. package/dist/sdk/index.d.ts +1 -1
  164. package/dist/sdk/index.js.map +1 -1
  165. package/dist/sdk/session.js +0 -20
  166. package/dist/sdk/session.js.map +1 -1
  167. package/dist/sdk/types.d.ts +1 -7
  168. package/dist/store/session_snapshot_migrations.js +72 -1
  169. package/dist/store/session_snapshot_migrations.js.map +1 -1
  170. package/dist/tui/session_chat_controller.js +14 -30
  171. package/dist/tui/session_chat_controller.js.map +1 -1
  172. package/dist/tui/ui/footer.js +4 -9
  173. package/dist/tui/ui/footer.js.map +1 -1
  174. package/package.json +9 -9
  175. package/dist/core/session/goal.js +0 -54
  176. package/dist/core/session/goal.js.map +0 -1
  177. package/dist/core/tools/goal.js +0 -167
  178. package/dist/core/tools/goal.js.map +0 -1
  179. package/dist/diff_tool/app/dist/assets/index-CBT_sNIz.js +0 -340
  180. package/dist/nook/README.md +0 -123
@@ -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
 
@@ -18,19 +18,19 @@ The server sends `ready` as its first message:
18
18
 
19
19
  ```json
20
20
  {
21
- "version": 16,
21
+ "version": 17,
22
22
  "type": "ready",
23
23
  "methods": ["initialize", "session.create", "session.list"]
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
 
31
31
  ```json
32
32
  {
33
- "version": 16,
33
+ "version": 17,
34
34
  "type": "request",
35
35
  "id": "init-1",
36
36
  "method": "initialize",
@@ -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
 
@@ -50,7 +50,7 @@ Every request has the same envelope:
50
50
 
51
51
  ```json
52
52
  {
53
- "version": 16,
53
+ "version": 17,
54
54
  "type": "request",
55
55
  "id": "req-42",
56
56
  "method": "session.snapshot",
@@ -58,13 +58,13 @@ 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
 
65
65
  ```json
66
66
  {
67
- "version": 16,
67
+ "version": 17,
68
68
  "type": "response",
69
69
  "id": "req-42",
70
70
  "ok": true,
@@ -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
  | --- | --- |
@@ -100,31 +100,31 @@ Observation controls delivery, not session ownership. `session.unobserve` stops
100
100
  | `revision` | Monotonic protocol snapshot revision. |
101
101
  | `lifecycle` | `idle` or `running`. |
102
102
  | `agentState` | Independent agent revision, model context key, and optional usage checkpoint. |
103
- | `goal`, `settings`, `costTotal` | Current goal, persona and reasoning settings, and accumulated session cost. |
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
- User-facing behavior such as goals, retry, compaction, rewind, and recovery is described in [sessions](sessions.md).
127
+ User-facing behavior such as retry, compaction, rewind, and recovery is described in [sessions](sessions.md).
128
128
 
129
129
  ## Apply snapshot deltas in order
130
130
 
@@ -132,7 +132,7 @@ Observed snapshot changes arrive as `session.delta`:
132
132
 
133
133
  ```json
134
134
  {
135
- "version": 16,
135
+ "version": 17,
136
136
  "type": "session.delta",
137
137
  "sessionId": "0195d6e4-4cf9-7f44-a2d8-f8f7f49ee9d3",
138
138
  "fromRevision": 8,
@@ -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
 
@@ -170,7 +170,7 @@ Not all observed state belongs in the recoverable snapshot. Each live channel ha
170
170
 
171
171
  ```json
172
172
  {
173
- "version": 16,
173
+ "version": 17,
174
174
  "type": "session.pendingUserMessages",
175
175
  "sessionId": "...",
176
176
  "state": {
@@ -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
 
@@ -207,7 +207,7 @@ An initialized client that advertised a tool can receive:
207
207
 
208
208
  ```json
209
209
  {
210
- "version": 16,
210
+ "version": 17,
211
211
  "type": "session.clientTool.call",
212
212
  "sessionId": "...",
213
213
  "agentId": "main",
@@ -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
 
@@ -231,7 +231,7 @@ Error responses use `ok: false`:
231
231
 
232
232
  ```json
233
233
  {
234
- "version": 16,
234
+ "version": 17,
235
235
  "type": "response",
236
236
  "id": "req-42",
237
237
  "ok": false,
@@ -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
- - Only one ordinary main-session turn or goal turn runs at a time. `session.submit`, `session.retry`, `session.startGoal`, and `session.resumeGoal` 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.
266
+ - Only one main-session turn runs at a time. `session.submit` and `session.retry` return `busy` on conflict.
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.