@markusylisiurunen/tau 0.3.82 → 0.3.84

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 (183) hide show
  1. package/README.md +1 -3
  2. package/dist/core/agent/agent_runtime.js +10 -6
  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/auto_compact.js +16 -0
  9. package/dist/core/commands/auto_compact.js.map +1 -0
  10. package/dist/core/commands/registry.js +13 -0
  11. package/dist/core/commands/registry.js.map +1 -1
  12. package/dist/core/history/cli.js +48 -0
  13. package/dist/core/history/cli.js.map +1 -1
  14. package/dist/core/history/history_manager.js +9 -3
  15. package/dist/core/history/history_manager.js.map +1 -1
  16. package/dist/core/history/local_history_store.js +9 -2
  17. package/dist/core/history/local_history_store.js.map +1 -1
  18. package/dist/core/history/remote_history_client.js +18 -3
  19. package/dist/core/history/remote_history_client.js.map +1 -1
  20. package/dist/core/models/openrouter.js +17 -5
  21. package/dist/core/models/openrouter.js.map +1 -1
  22. package/dist/core/models/openrouter_decisions.js +16 -1
  23. package/dist/core/models/openrouter_decisions.js.map +1 -1
  24. package/dist/core/runtime/chat_runtime.js +5 -0
  25. package/dist/core/runtime/chat_runtime.js.map +1 -1
  26. package/dist/core/session/auto_compaction_threshold.js +4 -0
  27. package/dist/core/session/auto_compaction_threshold.js.map +1 -0
  28. package/dist/core/static/tau_docs/client-tools.md +53 -53
  29. package/dist/core/static/tau_docs/config-reference.md +46 -43
  30. package/dist/core/static/tau_docs/configuration.md +40 -36
  31. package/dist/core/static/tau_docs/credentials.md +32 -31
  32. package/dist/core/static/tau_docs/getting-started.md +28 -28
  33. package/dist/core/static/tau_docs/history.md +114 -79
  34. package/dist/core/static/tau_docs/image-generation.md +20 -18
  35. package/dist/core/static/tau_docs/index.md +30 -31
  36. package/dist/core/static/tau_docs/manifest.json +1 -0
  37. package/dist/core/static/tau_docs/models.md +17 -17
  38. package/dist/core/static/tau_docs/node-sdk.md +74 -69
  39. package/dist/core/static/tau_docs/nook.md +75 -69
  40. package/dist/core/static/tau_docs/openrouter.md +28 -13
  41. package/dist/core/static/tau_docs/ownership-and-scope.md +21 -23
  42. package/dist/core/static/tau_docs/pdf-unpacking.md +6 -6
  43. package/dist/core/static/tau_docs/personas.md +29 -27
  44. package/dist/core/static/tau_docs/prompts-and-project-context.md +41 -39
  45. package/dist/core/static/tau_docs/remote-sessions.md +38 -38
  46. package/dist/core/static/tau_docs/sdk-diff-review.md +16 -12
  47. package/dist/core/static/tau_docs/security.md +72 -72
  48. package/dist/core/static/tau_docs/session-protocol-methods.md +69 -45
  49. package/dist/core/static/tau_docs/session-protocol.md +59 -52
  50. package/dist/core/static/tau_docs/sessions.md +112 -88
  51. package/dist/core/static/tau_docs/skills.md +25 -20
  52. package/dist/core/static/tau_docs/speech-generation.md +5 -5
  53. package/dist/core/static/tau_docs/subagents.md +42 -44
  54. package/dist/core/static/tau_docs/telegram-projects.md +142 -0
  55. package/dist/core/static/tau_docs/telegram.md +67 -181
  56. package/dist/core/static/tau_docs/tools.md +72 -80
  57. package/dist/core/static/tau_docs/troubleshooting.md +94 -149
  58. package/dist/core/static/tau_docs/tui.md +127 -80
  59. package/dist/core/subagents/agent_supervisor.js +1 -0
  60. package/dist/core/subagents/agent_supervisor.js.map +1 -1
  61. package/dist/core/telegram/adapter.js +31 -1
  62. package/dist/core/telegram/adapter.js.map +1 -1
  63. package/dist/core/telegram/session_manager.js +11 -0
  64. package/dist/core/telegram/session_manager.js.map +1 -1
  65. package/dist/core/tool/image_generate.js +5 -17
  66. package/dist/core/tool/image_generate.js.map +1 -1
  67. package/dist/core/tool/openrouter.js +21 -2
  68. package/dist/core/tool/openrouter.js.map +1 -1
  69. package/dist/core/utils/gemini_transcription.js +43 -13
  70. package/dist/core/utils/gemini_transcription.js.map +1 -1
  71. package/dist/core/utils/model_stream.js +17 -1
  72. package/dist/core/utils/model_stream.js.map +1 -1
  73. package/dist/core/version.js +2 -2
  74. package/dist/diff_tool/app/dist/assets/{angular-html-D20byCHL.js → angular-html-Dr923UVo.js} +1 -1
  75. package/dist/diff_tool/app/dist/assets/{angular-ts-CvVQslm2.js → angular-ts-DOChuIbB.js} +1 -1
  76. package/dist/diff_tool/app/dist/assets/{apl-DNIxlYWe.js → apl-Bs_bcAcm.js} +1 -1
  77. package/dist/diff_tool/app/dist/assets/{astro-DDOw4EUG.js → astro-a4yvqyGV.js} +1 -1
  78. package/dist/diff_tool/app/dist/assets/{blade-DlhB-SLW.js → blade-BD5OxwVc.js} +1 -1
  79. package/dist/diff_tool/app/dist/assets/{c-C1f4vhDm.js → c-CPWQkPLc.js} +1 -1
  80. package/dist/diff_tool/app/dist/assets/{chapel-Ctt8xOX1.js → chapel-DaQatW92.js} +1 -1
  81. package/dist/diff_tool/app/dist/assets/{cobol-BXw71PAA.js → cobol-Dv7H5p9m.js} +1 -1
  82. package/dist/diff_tool/app/dist/assets/{coffee-CRh_5Nmr.js → coffee-BUGvGi57.js} +1 -1
  83. package/dist/diff_tool/app/dist/assets/{cpp-IlI-zWOZ.js → cpp-fo_wPsB8.js} +1 -1
  84. package/dist/diff_tool/app/dist/assets/{crystal-CXeL28i7.js → crystal--pI-R_dD.js} +1 -1
  85. package/dist/diff_tool/app/dist/assets/{css-BfST9hFI.js → css-BssyxPkY.js} +1 -1
  86. package/dist/diff_tool/app/dist/assets/{edge--Q22k_ty.js → edge-CZ8t3-Ec.js} +1 -1
  87. package/dist/diff_tool/app/dist/assets/{elixir-CIfC_rQx.js → elixir-UZt0J7RJ.js} +1 -1
  88. package/dist/diff_tool/app/dist/assets/{elm-OkZ29XRO.js → elm-DIbchse0.js} +1 -1
  89. package/dist/diff_tool/app/dist/assets/{erb-B8ZXgEqv.js → erb-BOBhlFtI.js} +1 -1
  90. package/dist/diff_tool/app/dist/assets/{git-rebase-CxkO_WGd.js → git-rebase-BAOt70YV.js} +1 -1
  91. package/dist/diff_tool/app/dist/assets/{glimmer-js-BVadyIrr.js → glimmer-js-CEvU-NQC.js} +1 -1
  92. package/dist/diff_tool/app/dist/assets/{glimmer-ts-D5J3Qb7n.js → glimmer-ts-BTMr7YQb.js} +1 -1
  93. package/dist/diff_tool/app/dist/assets/{glsl-B6iy73-Y.js → glsl-BdwQytbZ.js} +1 -1
  94. package/dist/diff_tool/app/dist/assets/{graphql-Dc3rUXf5.js → graphql-MVXf_Gip.js} +1 -1
  95. package/dist/diff_tool/app/dist/assets/{hack-q8Utf8Jp.js → hack-BKsyThYd.js} +1 -1
  96. package/dist/diff_tool/app/dist/assets/{haml-mjMIlj_2.js → haml-aYjo4kTQ.js} +1 -1
  97. package/dist/diff_tool/app/dist/assets/{handlebars-CA-BL8Ks.js → handlebars-CkBj5nNj.js} +1 -1
  98. package/dist/diff_tool/app/dist/assets/{html-BmPxhYCX.js → html-V_XLZjq3.js} +1 -1
  99. package/dist/diff_tool/app/dist/assets/{html-derivative-CvknIjuB.js → html-derivative-CLtkZVT2.js} +1 -1
  100. package/dist/diff_tool/app/dist/assets/{http-DNxLDRIi.js → http-nUN1ldGy.js} +1 -1
  101. package/dist/diff_tool/app/dist/assets/{hurl-kbd3Eq2V.js → hurl-BBwLfekr.js} +1 -1
  102. package/dist/diff_tool/app/dist/assets/index-Dt2v7POE.js +341 -0
  103. package/dist/diff_tool/app/dist/assets/{java-BuZshgf1.js → java-DLkxtNEL.js} +1 -1
  104. package/dist/diff_tool/app/dist/assets/{javascript-DfL2oeFU.js → javascript-CVr4Rx0e.js} +1 -1
  105. package/dist/diff_tool/app/dist/assets/{jinja-Bu0KQihU.js → jinja-BOSJTyD0.js} +1 -1
  106. package/dist/diff_tool/app/dist/assets/{jison-Bqn7Mf3Q.js → jison-Di3-hBGP.js} +1 -1
  107. package/dist/diff_tool/app/dist/assets/{json-BuX5LKaB.js → json-D9C8xfZt.js} +1 -1
  108. package/dist/diff_tool/app/dist/assets/{jsx-DdVJ-ZBp.js → jsx-CUDhGSfU.js} +1 -1
  109. package/dist/diff_tool/app/dist/assets/{julia-CQeijOoQ.js → julia-CRy8R7YY.js} +1 -1
  110. package/dist/diff_tool/app/dist/assets/{just-vzAktFGR.js → just-tUqjHI43.js} +1 -1
  111. package/dist/diff_tool/app/dist/assets/{latex-Dm60cg0k.js → latex-8_LCZmZN.js} +1 -1
  112. package/dist/diff_tool/app/dist/assets/{liquid-vxKzm2P8.js → liquid-CvGorueR.js} +1 -1
  113. package/dist/diff_tool/app/dist/assets/{lua-DIoqi4dd.js → lua-DR_7pVFC.js} +1 -1
  114. package/dist/diff_tool/app/dist/assets/{marko-BTHgFKby.js → marko-sTN8ZOd5.js} +1 -1
  115. package/dist/diff_tool/app/dist/assets/{mdc-CEfz8gZ9.js → mdc-xRsS5Ubl.js} +1 -1
  116. package/dist/diff_tool/app/dist/assets/{nginx-DNlFDEfJ.js → nginx-ypaVSshx.js} +1 -1
  117. package/dist/diff_tool/app/dist/assets/{nim-DnvT_0lZ.js → nim-DTc1FpAl.js} +1 -1
  118. package/dist/diff_tool/app/dist/assets/{org-BbD-ElVf.js → org-B7I2tEAw.js} +1 -1
  119. package/dist/diff_tool/app/dist/assets/{perl-DTsbnAmK.js → perl-CTNhHvKx.js} +1 -1
  120. package/dist/diff_tool/app/dist/assets/{php-CwEsJe-W.js → php-LzxyOsOP.js} +1 -1
  121. package/dist/diff_tool/app/dist/assets/{pug-BOttMVH-.js → pug-D5FIy7qc.js} +1 -1
  122. package/dist/diff_tool/app/dist/assets/{qml-C8KkSItN.js → qml-CfdV5Js7.js} +1 -1
  123. package/dist/diff_tool/app/dist/assets/{r-K4ksJj_R.js → r-CZ-EMZDs.js} +1 -1
  124. package/dist/diff_tool/app/dist/assets/{razor-yuWRrrG6.js → razor-BhyBjPmN.js} +1 -1
  125. package/dist/diff_tool/app/dist/assets/{regexp-CV-jhnUz.js → regexp-iPvMX04S.js} +1 -1
  126. package/dist/diff_tool/app/dist/assets/{rst-CLA3Attc.js → rst-Dpp9DE6Q.js} +1 -1
  127. package/dist/diff_tool/app/dist/assets/{ruby-DiHR2-DX.js → ruby-CVyShlOK.js} +1 -1
  128. package/dist/diff_tool/app/dist/assets/{sas-DxIjbYJ5.js → sas-DFmollAV.js} +1 -1
  129. package/dist/diff_tool/app/dist/assets/{scss-CShwEaV4.js → scss-Di6lsIQE.js} +1 -1
  130. package/dist/diff_tool/app/dist/assets/{shellscript-CeezOnrF.js → shellscript-CRHervLi.js} +1 -1
  131. package/dist/diff_tool/app/dist/assets/{shellsession-CjSS2r7j.js → shellsession-CHP7Q5Ym.js} +1 -1
  132. package/dist/diff_tool/app/dist/assets/{soy-CI_v23nJ.js → soy-CNXyGE_T.js} +1 -1
  133. package/dist/diff_tool/app/dist/assets/{sql-D9GaB00A.js → sql-DnPFF_uz.js} +1 -1
  134. package/dist/diff_tool/app/dist/assets/{stata-hK92TPE_.js → stata-CobN2W6n.js} +1 -1
  135. package/dist/diff_tool/app/dist/assets/{surrealql-UO8LtPJG.js → surrealql-DqvGXHs7.js} +1 -1
  136. package/dist/diff_tool/app/dist/assets/{svelte-kIlaw_oh.js → svelte-ChhfFBzQ.js} +1 -1
  137. package/dist/diff_tool/app/dist/assets/{templ-DFRz1JP6.js → templ-DKi2U_4-.js} +1 -1
  138. package/dist/diff_tool/app/dist/assets/{tex-CfxIXk_z.js → tex-Cjl-M5D5.js} +1 -1
  139. package/dist/diff_tool/app/dist/assets/{ts-tags-BtUHl0ff.js → ts-tags-CV2veQhe.js} +1 -1
  140. package/dist/diff_tool/app/dist/assets/{tsx-Cd4SAe2C.js → tsx-Dw0DYsvT.js} +1 -1
  141. package/dist/diff_tool/app/dist/assets/{twig-CWk4q5Y3.js → twig-r46-w1o_.js} +1 -1
  142. package/dist/diff_tool/app/dist/assets/{typescript-BqxGJiP0.js → typescript-QuYM-098.js} +1 -1
  143. package/dist/diff_tool/app/dist/assets/{typst-D9nAun2p.js → typst-B9jAU5LS.js} +1 -1
  144. package/dist/diff_tool/app/dist/assets/{vue-D6HYhg6_.js → vue-CIrFiYWU.js} +1 -1
  145. package/dist/diff_tool/app/dist/assets/{vue-html-1VRlaENS.js → vue-html-bfczklzO.js} +1 -1
  146. package/dist/diff_tool/app/dist/assets/{vue-vine-BaH0We9y.js → vue-vine-BmBCOwQI.js} +1 -1
  147. package/dist/diff_tool/app/dist/assets/{xml-C4RWnUuj.js → xml-DYPsS0xh.js} +1 -1
  148. package/dist/diff_tool/app/dist/assets/{xsl-D1iD38ga.js → xsl-DZFDwCkt.js} +1 -1
  149. package/dist/diff_tool/app/dist/assets/{yaml-yAb4W0G-.js → yaml-9CQ32JJD.js} +1 -1
  150. package/dist/diff_tool/app/dist/index.html +1 -1
  151. package/dist/history/worker/index.js +87 -83
  152. package/dist/history/worker/index.js.map +1 -1
  153. package/dist/host/hosted_ephemeral_agent_session.js +1 -0
  154. package/dist/host/hosted_ephemeral_agent_session.js.map +1 -1
  155. package/dist/host/local_session_host.js +30 -1
  156. package/dist/host/local_session_host.js.map +1 -1
  157. package/dist/host/session_protocol_handler.js +18 -0
  158. package/dist/host/session_protocol_handler.js.map +1 -1
  159. package/dist/main.js +6 -7
  160. package/dist/main.js.map +1 -1
  161. package/dist/protocol/index.d.ts +1 -1
  162. package/dist/protocol/index.js.map +1 -1
  163. package/dist/protocol/session_protocol.d.ts +13 -2
  164. package/dist/protocol/session_protocol.js +31 -1
  165. package/dist/protocol/session_protocol.js.map +1 -1
  166. package/dist/sdk/index.d.ts +1 -1
  167. package/dist/sdk/index.js.map +1 -1
  168. package/dist/sdk/session.js +11 -0
  169. package/dist/sdk/session.js.map +1 -1
  170. package/dist/sdk/types.d.ts +2 -0
  171. package/dist/store/session_snapshot_migrations.js +19 -1
  172. package/dist/store/session_snapshot_migrations.js.map +1 -1
  173. package/dist/tui/session_chat_controller.js +41 -4
  174. package/dist/tui/session_chat_controller.js.map +1 -1
  175. package/dist/tui/terminal.js +1 -0
  176. package/dist/tui/terminal.js.map +1 -1
  177. package/dist/tui/ui/chat_container.js +34 -17
  178. package/dist/tui/ui/chat_container.js.map +1 -1
  179. package/dist/tui/ui/footer.js +2 -4
  180. package/dist/tui/ui/footer.js.map +1 -1
  181. package/package.json +11 -10
  182. package/dist/diff_tool/app/dist/assets/index-D8ZI_2RC.js +0 -340
  183. 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
  }
@@ -71,16 +71,17 @@ params: {
71
71
  attributes: Record<string, string>;
72
72
  personaId?: string;
73
73
  reasoning?: Reasoning;
74
+ autoCompactThresholdTokens?: number | null;
74
75
  }
75
76
 
76
77
  result: { sessionId: string }
77
78
  ```
78
79
 
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.
80
+ `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
81
 
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).
82
+ `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
83
 
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.
84
+ 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
85
 
85
86
  Creation returns only an id. Call `session.observe` for state and streamed updates.
86
87
 
@@ -111,7 +112,7 @@ result: {
111
112
  }
112
113
  ```
113
114
 
114
- Install all three baselines before applying later messages. Calling `observe` again refreshes the baselines without creating a second session.
115
+ Install all three before applying later messages. Calling `observe` again returns fresh starting states; it does not create a second session.
115
116
 
116
117
  ### `session.unobserve`
117
118
 
@@ -139,7 +140,7 @@ params: { sessionId: string; text: string; historyEntryId?: string }
139
140
  result: { snapshot: SessionProtocolSnapshot; userHistoryEntryId: string }
140
141
  ```
141
142
 
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.
143
+ 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
144
 
144
145
  ### `session.submit`
145
146
 
@@ -150,22 +151,22 @@ params: { sessionId: string; text: string; historyEntryId?: string }
150
151
  result: { userHistoryEntryId: string; turn: TurnOutcome }
151
152
  ```
152
153
 
153
- Once accepted, the turn is durably represented in `snapshot.turns[userHistoryEntryId]`. Changes stream through the observed state channels while the request remains open.
154
+ Once accepted, the turn is recorded in `snapshot.turns[userHistoryEntryId]`. Updates arrive through the observed channels while the request is open.
154
155
 
155
156
  ### `session.queue`
156
157
 
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.
158
+ 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
159
 
159
160
  ```ts
160
161
  params: { sessionId: string; text: string; historyEntryId?: string }
161
162
  result: { userHistoryEntryId: string; turn: TurnOutcome }
162
163
  ```
163
164
 
164
- The request response remains pending until its eventual turn settles.
165
+ The response arrives when that turn finishes.
165
166
 
166
167
  ### `session.steer`
167
168
 
168
- Requests a change of direction for active model work.
169
+ Changes the direction of the running turn.
169
170
 
170
171
  ```ts
171
172
  params: {
@@ -178,11 +179,11 @@ result: {
178
179
  }
179
180
  ```
180
181
 
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.
182
+ 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
183
 
183
184
  ### `session.cancelPendingMessages`
184
185
 
185
- Cancels all pending queue and steering requests without interrupting active work.
186
+ Cancels all pending queued and steering requests without interrupting running work.
186
187
 
187
188
  ```ts
188
189
  params: {
@@ -212,7 +213,7 @@ The session must be idle.
212
213
 
213
214
  ### `session.interrupt`
214
215
 
215
- Requests cancellation of active session work, including turns, direct executions, model samples, and maintenance.
216
+ Asks the session's running work to stop: turns, direct commands, model samples, and maintenance.
216
217
 
217
218
  ```ts
218
219
  params: {
@@ -224,7 +225,7 @@ result: {
224
225
  }
225
226
  ```
226
227
 
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.
228
+ `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
229
 
229
230
  ## Run independent execution and sampling
230
231
 
@@ -259,9 +260,9 @@ result: {
259
260
 
260
261
  `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
262
 
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.
263
+ 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
264
 
264
- Executions can overlap turns, samples, mutations, and other executions. Clients must coordinate workspace access when consistency matters.
265
+ Commands can run at the same time as turns, samples, session changes, and other commands. Clients must coordinate workspace access when consistency matters.
265
266
 
266
267
  ### `session.cancelExec`
267
268
 
@@ -279,7 +280,7 @@ result: {
279
280
 
280
281
  ### `session.sample`
281
282
 
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.
283
+ 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
284
 
284
285
  ```ts
285
286
  params: {
@@ -299,13 +300,13 @@ params: {
299
300
  result: { message: AssistantMessage }
300
301
  ```
301
302
 
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.
303
+ `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
304
 
304
305
  ## Read and change session state
305
306
 
306
307
  ### `session.snapshot`
307
308
 
308
- Returns the complete authoritative snapshot.
309
+ Returns the complete current snapshot.
309
310
 
310
311
  ```ts
311
312
  params: {
@@ -316,9 +317,32 @@ result: SessionProtocolSnapshot;
316
317
 
317
318
  Use this after observation, on demand, or to recover from a delta revision gap. The [session protocol](session-protocol.md) describes the snapshot and client application rules.
318
319
 
320
+ ### `session.setAutoCompactThreshold`
321
+
322
+ Changes the main conversation's automatic-compaction threshold, starting with the next logical turn.
323
+
324
+ ```ts
325
+ params: {
326
+ sessionId: string;
327
+ thresholdTokens: number | null;
328
+ }
329
+ result: {
330
+ revision: number;
331
+ settings: SessionProtocolSettingsSnapshot;
332
+ }
333
+ ```
334
+
335
+ `thresholdTokens` must be a safe integer of at least 50,000, or `null` to restore the model-based default. Numeric strings are rejected. Session creation accepts the same values in the optional `autoCompactThresholdTokens` field, which defaults to `null`.
336
+
337
+ The default threshold is the model's context window minus 16,384 tokens. With an override, the effective threshold is the smaller of the configured value and that default. A model with a small context window can therefore have an effective threshold below 50,000.
338
+
339
+ The host saves the setting and publishes a `settings.set` delta to observers. Changing it does not start compaction. A running turn and its steering continuations keep their original threshold.
340
+
341
+ Reloads, persona changes, and recovery preserve the configured value. The effective threshold is recalculated for the selected model. Subagents and ephemeral threads use their model-based defaults. See [automatic compaction](sessions.md#automatic-compaction) for request-size limits and costs.
342
+
319
343
  ### `session.setReasoning`
320
344
 
321
- Changes the reasoning effort for the next independently started turn.
345
+ Changes the reasoning effort, starting with the next turn.
322
346
 
323
347
  ```ts
324
348
  params: {
@@ -331,7 +355,7 @@ result: {
331
355
  }
332
356
  ```
333
357
 
334
- The update is serialized but does not interrupt a running turn. Active turns and steering continuations retain their captured settings.
358
+ The change waits its turn behind other changes but does not interrupt a running turn. Running turns, including their steering, keep their settings.
335
359
 
336
360
  ### `session.setPersona`
337
361
 
@@ -345,7 +369,7 @@ params: {
345
369
  result: SessionProtocolSnapshot;
346
370
  ```
347
371
 
348
- This is a serialized context mutation. It interrupts an active turn and rejects pending input before returning the authoritative snapshot.
372
+ 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
373
 
350
374
  ### `session.resolvePrompt`
351
375
 
@@ -362,11 +386,11 @@ result: {
362
386
  }
363
387
  ```
364
388
 
365
- Snapshot catalog entries contain prompt metadata only. Call this lazily when the user invokes a prompt.
389
+ The snapshot catalog holds only prompt IDs and labels. Call this when the user chooses a prompt.
366
390
 
367
391
  ### `session.autocompletePaths`
368
392
 
369
- Returns bounded path suggestions from the execution environment.
393
+ Returns a limited list of path suggestions from the execution environment.
370
394
 
371
395
  ```ts
372
396
  params: { sessionId: string; query: string; limit: number }
@@ -379,7 +403,7 @@ result: { paths: string[] }
379
403
 
380
404
  ### `session.reload`
381
405
 
382
- Reloads session-owned configuration and content from the execution environment.
406
+ Reloads the session's configuration and content from the execution environment.
383
407
 
384
408
  ```ts
385
409
  params: { sessionId: string }
@@ -390,11 +414,11 @@ result: {
390
414
  }
391
415
  ```
392
416
 
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.
417
+ 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
418
 
395
419
  ### `session.compact`
396
420
 
397
- Manually replaces active model context with a generated summary.
421
+ Replaces the model's context with a generated summary.
398
422
 
399
423
  ```ts
400
424
  params: {
@@ -409,11 +433,11 @@ result: {
409
433
  }
410
434
  ```
411
435
 
412
- Compaction interrupts an active turn, rejects pending input, and returns an authoritative replacement snapshot. A successful compaction advances the timeline epoch.
436
+ Compaction interrupts a running turn, rejects pending input, and returns the new snapshot. A successful compaction advances the timeline epoch.
413
437
 
414
438
  ### `session.rewind`
415
439
 
416
- Removes one selected user history entry and all later active state.
440
+ Removes one user message and everything after it.
417
441
 
418
442
  ```ts
419
443
  params: { sessionId: string; historyEntryId: string }
@@ -425,13 +449,13 @@ result: {
425
449
  }
426
450
  ```
427
451
 
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.
452
+ 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
453
 
430
454
  ## Control subagents and ephemeral contexts
431
455
 
432
456
  ### `session.interruptSubagent`
433
457
 
434
- Interrupts the current run of one supervised subagent without disposing its reusable thread.
458
+ Interrupts one subagent's current run. The subagent stays available for follow-ups.
435
459
 
436
460
  ```ts
437
461
  params: {
@@ -445,7 +469,7 @@ result: {
445
469
 
446
470
  ### `session.ephemeral.create`
447
471
 
448
- Creates a non-persisted host-owned agent context independent of the main timeline.
472
+ Creates an agent context on the host that is not saved and is separate from the main conversation.
449
473
 
450
474
  ```ts
451
475
  params: {
@@ -459,7 +483,7 @@ result: {
459
483
  }
460
484
  ```
461
485
 
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.
486
+ 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
487
 
464
488
  ### `session.ephemeral.submit`
465
489
 
@@ -477,7 +501,7 @@ params: {
477
501
  result: { threadId: string; response: string }
478
502
  ```
479
503
 
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.
504
+ `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
505
 
482
506
  ### `session.ephemeral.close`
483
507
 
@@ -497,7 +521,7 @@ result: {
497
521
 
498
522
  ## Complete delegated client-tool calls
499
523
 
500
- These methods are for a client that advertised tools during `initialize`. Ordinary clients do not call them.
524
+ These methods are for clients that offered tools in `initialize`. Other clients never call them.
501
525
 
502
526
  ### `session.clientTool.ack`
503
527
 
@@ -523,9 +547,9 @@ result: {
523
547
  }
524
548
  ```
525
549
 
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.
550
+ 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
551
 
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.
552
+ 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
553
 
530
554
  ### `session.clientTool.result`
531
555
 
@@ -564,10 +588,10 @@ params:
564
588
  result: { accepted: boolean };
565
589
  ```
566
590
 
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.
591
+ `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
592
 
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.
593
+ 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
594
 
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.
595
+ 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
596
 
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.
597
+ `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.