@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.
- package/README.md +1 -3
- package/dist/core/agent/agent_runtime.js +10 -6
- package/dist/core/agent/agent_runtime.js.map +1 -1
- package/dist/core/cli.js +2 -2
- package/dist/core/cli.js.map +1 -1
- package/dist/core/code_mode/models.js +61 -22
- package/dist/core/code_mode/models.js.map +1 -1
- package/dist/core/commands/auto_compact.js +16 -0
- package/dist/core/commands/auto_compact.js.map +1 -0
- package/dist/core/commands/registry.js +13 -0
- package/dist/core/commands/registry.js.map +1 -1
- package/dist/core/history/cli.js +48 -0
- package/dist/core/history/cli.js.map +1 -1
- package/dist/core/history/history_manager.js +9 -3
- package/dist/core/history/history_manager.js.map +1 -1
- package/dist/core/history/local_history_store.js +9 -2
- package/dist/core/history/local_history_store.js.map +1 -1
- package/dist/core/history/remote_history_client.js +18 -3
- package/dist/core/history/remote_history_client.js.map +1 -1
- package/dist/core/models/openrouter.js +17 -5
- package/dist/core/models/openrouter.js.map +1 -1
- package/dist/core/models/openrouter_decisions.js +16 -1
- package/dist/core/models/openrouter_decisions.js.map +1 -1
- package/dist/core/runtime/chat_runtime.js +5 -0
- package/dist/core/runtime/chat_runtime.js.map +1 -1
- package/dist/core/session/auto_compaction_threshold.js +4 -0
- package/dist/core/session/auto_compaction_threshold.js.map +1 -0
- package/dist/core/static/tau_docs/client-tools.md +53 -53
- package/dist/core/static/tau_docs/config-reference.md +46 -43
- package/dist/core/static/tau_docs/configuration.md +40 -36
- package/dist/core/static/tau_docs/credentials.md +32 -31
- package/dist/core/static/tau_docs/getting-started.md +28 -28
- package/dist/core/static/tau_docs/history.md +114 -79
- package/dist/core/static/tau_docs/image-generation.md +20 -18
- package/dist/core/static/tau_docs/index.md +30 -31
- package/dist/core/static/tau_docs/manifest.json +1 -0
- package/dist/core/static/tau_docs/models.md +17 -17
- package/dist/core/static/tau_docs/node-sdk.md +74 -69
- package/dist/core/static/tau_docs/nook.md +75 -69
- package/dist/core/static/tau_docs/openrouter.md +28 -13
- package/dist/core/static/tau_docs/ownership-and-scope.md +21 -23
- package/dist/core/static/tau_docs/pdf-unpacking.md +6 -6
- package/dist/core/static/tau_docs/personas.md +29 -27
- package/dist/core/static/tau_docs/prompts-and-project-context.md +41 -39
- package/dist/core/static/tau_docs/remote-sessions.md +38 -38
- package/dist/core/static/tau_docs/sdk-diff-review.md +16 -12
- package/dist/core/static/tau_docs/security.md +72 -72
- package/dist/core/static/tau_docs/session-protocol-methods.md +69 -45
- package/dist/core/static/tau_docs/session-protocol.md +59 -52
- package/dist/core/static/tau_docs/sessions.md +112 -88
- package/dist/core/static/tau_docs/skills.md +25 -20
- package/dist/core/static/tau_docs/speech-generation.md +5 -5
- package/dist/core/static/tau_docs/subagents.md +42 -44
- package/dist/core/static/tau_docs/telegram-projects.md +142 -0
- package/dist/core/static/tau_docs/telegram.md +67 -181
- package/dist/core/static/tau_docs/tools.md +72 -80
- package/dist/core/static/tau_docs/troubleshooting.md +94 -149
- package/dist/core/static/tau_docs/tui.md +127 -80
- package/dist/core/subagents/agent_supervisor.js +1 -0
- package/dist/core/subagents/agent_supervisor.js.map +1 -1
- package/dist/core/telegram/adapter.js +31 -1
- package/dist/core/telegram/adapter.js.map +1 -1
- package/dist/core/telegram/session_manager.js +11 -0
- package/dist/core/telegram/session_manager.js.map +1 -1
- package/dist/core/tool/image_generate.js +5 -17
- package/dist/core/tool/image_generate.js.map +1 -1
- package/dist/core/tool/openrouter.js +21 -2
- package/dist/core/tool/openrouter.js.map +1 -1
- package/dist/core/utils/gemini_transcription.js +43 -13
- package/dist/core/utils/gemini_transcription.js.map +1 -1
- package/dist/core/utils/model_stream.js +17 -1
- package/dist/core/utils/model_stream.js.map +1 -1
- package/dist/core/version.js +2 -2
- package/dist/diff_tool/app/dist/assets/{angular-html-D20byCHL.js → angular-html-Dr923UVo.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{angular-ts-CvVQslm2.js → angular-ts-DOChuIbB.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{apl-DNIxlYWe.js → apl-Bs_bcAcm.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{astro-DDOw4EUG.js → astro-a4yvqyGV.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{blade-DlhB-SLW.js → blade-BD5OxwVc.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{c-C1f4vhDm.js → c-CPWQkPLc.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{chapel-Ctt8xOX1.js → chapel-DaQatW92.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{cobol-BXw71PAA.js → cobol-Dv7H5p9m.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{coffee-CRh_5Nmr.js → coffee-BUGvGi57.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{cpp-IlI-zWOZ.js → cpp-fo_wPsB8.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{crystal-CXeL28i7.js → crystal--pI-R_dD.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{css-BfST9hFI.js → css-BssyxPkY.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{edge--Q22k_ty.js → edge-CZ8t3-Ec.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{elixir-CIfC_rQx.js → elixir-UZt0J7RJ.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{elm-OkZ29XRO.js → elm-DIbchse0.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{erb-B8ZXgEqv.js → erb-BOBhlFtI.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{git-rebase-CxkO_WGd.js → git-rebase-BAOt70YV.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{glimmer-js-BVadyIrr.js → glimmer-js-CEvU-NQC.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{glimmer-ts-D5J3Qb7n.js → glimmer-ts-BTMr7YQb.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{glsl-B6iy73-Y.js → glsl-BdwQytbZ.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{graphql-Dc3rUXf5.js → graphql-MVXf_Gip.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{hack-q8Utf8Jp.js → hack-BKsyThYd.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{haml-mjMIlj_2.js → haml-aYjo4kTQ.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{handlebars-CA-BL8Ks.js → handlebars-CkBj5nNj.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{html-BmPxhYCX.js → html-V_XLZjq3.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{html-derivative-CvknIjuB.js → html-derivative-CLtkZVT2.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{http-DNxLDRIi.js → http-nUN1ldGy.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{hurl-kbd3Eq2V.js → hurl-BBwLfekr.js} +1 -1
- package/dist/diff_tool/app/dist/assets/index-Dt2v7POE.js +341 -0
- package/dist/diff_tool/app/dist/assets/{java-BuZshgf1.js → java-DLkxtNEL.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{javascript-DfL2oeFU.js → javascript-CVr4Rx0e.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{jinja-Bu0KQihU.js → jinja-BOSJTyD0.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{jison-Bqn7Mf3Q.js → jison-Di3-hBGP.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{json-BuX5LKaB.js → json-D9C8xfZt.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{jsx-DdVJ-ZBp.js → jsx-CUDhGSfU.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{julia-CQeijOoQ.js → julia-CRy8R7YY.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{just-vzAktFGR.js → just-tUqjHI43.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{latex-Dm60cg0k.js → latex-8_LCZmZN.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{liquid-vxKzm2P8.js → liquid-CvGorueR.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{lua-DIoqi4dd.js → lua-DR_7pVFC.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{marko-BTHgFKby.js → marko-sTN8ZOd5.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{mdc-CEfz8gZ9.js → mdc-xRsS5Ubl.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{nginx-DNlFDEfJ.js → nginx-ypaVSshx.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{nim-DnvT_0lZ.js → nim-DTc1FpAl.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{org-BbD-ElVf.js → org-B7I2tEAw.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{perl-DTsbnAmK.js → perl-CTNhHvKx.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{php-CwEsJe-W.js → php-LzxyOsOP.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{pug-BOttMVH-.js → pug-D5FIy7qc.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{qml-C8KkSItN.js → qml-CfdV5Js7.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{r-K4ksJj_R.js → r-CZ-EMZDs.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{razor-yuWRrrG6.js → razor-BhyBjPmN.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{regexp-CV-jhnUz.js → regexp-iPvMX04S.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{rst-CLA3Attc.js → rst-Dpp9DE6Q.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{ruby-DiHR2-DX.js → ruby-CVyShlOK.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{sas-DxIjbYJ5.js → sas-DFmollAV.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{scss-CShwEaV4.js → scss-Di6lsIQE.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{shellscript-CeezOnrF.js → shellscript-CRHervLi.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{shellsession-CjSS2r7j.js → shellsession-CHP7Q5Ym.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{soy-CI_v23nJ.js → soy-CNXyGE_T.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{sql-D9GaB00A.js → sql-DnPFF_uz.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{stata-hK92TPE_.js → stata-CobN2W6n.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{surrealql-UO8LtPJG.js → surrealql-DqvGXHs7.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{svelte-kIlaw_oh.js → svelte-ChhfFBzQ.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{templ-DFRz1JP6.js → templ-DKi2U_4-.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{tex-CfxIXk_z.js → tex-Cjl-M5D5.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{ts-tags-BtUHl0ff.js → ts-tags-CV2veQhe.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{tsx-Cd4SAe2C.js → tsx-Dw0DYsvT.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{twig-CWk4q5Y3.js → twig-r46-w1o_.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{typescript-BqxGJiP0.js → typescript-QuYM-098.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{typst-D9nAun2p.js → typst-B9jAU5LS.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{vue-D6HYhg6_.js → vue-CIrFiYWU.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{vue-html-1VRlaENS.js → vue-html-bfczklzO.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{vue-vine-BaH0We9y.js → vue-vine-BmBCOwQI.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{xml-C4RWnUuj.js → xml-DYPsS0xh.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{xsl-D1iD38ga.js → xsl-DZFDwCkt.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{yaml-yAb4W0G-.js → yaml-9CQ32JJD.js} +1 -1
- package/dist/diff_tool/app/dist/index.html +1 -1
- package/dist/history/worker/index.js +87 -83
- package/dist/history/worker/index.js.map +1 -1
- package/dist/host/hosted_ephemeral_agent_session.js +1 -0
- package/dist/host/hosted_ephemeral_agent_session.js.map +1 -1
- package/dist/host/local_session_host.js +30 -1
- package/dist/host/local_session_host.js.map +1 -1
- package/dist/host/session_protocol_handler.js +18 -0
- package/dist/host/session_protocol_handler.js.map +1 -1
- package/dist/main.js +6 -7
- package/dist/main.js.map +1 -1
- package/dist/protocol/index.d.ts +1 -1
- package/dist/protocol/index.js.map +1 -1
- package/dist/protocol/session_protocol.d.ts +13 -2
- package/dist/protocol/session_protocol.js +31 -1
- package/dist/protocol/session_protocol.js.map +1 -1
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/session.js +11 -0
- package/dist/sdk/session.js.map +1 -1
- package/dist/sdk/types.d.ts +2 -0
- package/dist/store/session_snapshot_migrations.js +19 -1
- package/dist/store/session_snapshot_migrations.js.map +1 -1
- package/dist/tui/session_chat_controller.js +41 -4
- package/dist/tui/session_chat_controller.js.map +1 -1
- package/dist/tui/terminal.js +1 -0
- package/dist/tui/terminal.js.map +1 -1
- package/dist/tui/ui/chat_container.js +34 -17
- package/dist/tui/ui/chat_container.js.map +1 -1
- package/dist/tui/ui/footer.js +2 -4
- package/dist/tui/ui/footer.js.map +1 -1
- package/package.json +11 -10
- package/dist/diff_tool/app/dist/assets/index-D8ZI_2RC.js +0 -340
- package/dist/nook/README.md +0 -123
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Session protocol method reference
|
|
2
2
|
|
|
3
|
-
This page
|
|
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
|
|
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
|
|
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
|
|
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:
|
|
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
|
|
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,
|
|
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`
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
|
165
|
+
The response arrives when that turn finishes.
|
|
165
166
|
|
|
166
167
|
### `session.steer`
|
|
167
168
|
|
|
168
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
|
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 `$@`.
|
|
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
|
-
|
|
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
|
|
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-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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`
|
|
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
|
|
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
|
|
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
|
|
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`
|
|
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
|
|
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
|
|
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
|
|
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.
|