@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.
- package/README.md +1 -3
- package/dist/core/agent/agent_runtime.js +6 -4
- 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/registry.js +0 -22
- 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 +2 -13
- package/dist/core/runtime/chat_runtime.js.map +1 -1
- 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 +69 -72
- 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 +46 -91
- package/dist/core/static/tau_docs/session-protocol.md +54 -54
- package/dist/core/static/tau_docs/sessions.md +97 -107
- 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 +65 -182
- package/dist/core/static/tau_docs/tools.md +72 -91
- package/dist/core/static/tau_docs/troubleshooting.md +94 -149
- package/dist/core/static/tau_docs/tui.md +124 -81
- package/dist/core/telegram/adapter.js +1 -6
- package/dist/core/telegram/adapter.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/tools/catalog.js +0 -11
- package/dist/core/tools/catalog.js.map +1 -1
- package/dist/core/tools/tool_names.js +0 -6
- package/dist/core/tools/tool_names.js.map +1 -1
- package/dist/core/utils/gemini_transcription.js +103 -28
- 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/utils/user_metadata.js +0 -14
- package/dist/core/utils/user_metadata.js.map +1 -1
- package/dist/core/version.js +2 -2
- package/dist/diff_tool/app/dist/assets/{angular-html-BbLgbIhq.js → angular-html-x29PkEoY.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{angular-ts-DXk17TRM.js → angular-ts-CsWCqoCf.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{apl-BsvksCXR.js → apl-CEvdc7jl.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{astro-DH775E4V.js → astro-Cgi6YxH2.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{blade-Ck99Rm59.js → blade-B0pr7Zx6.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{c-DJpHqu5J.js → c-DDVLgtVy.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{chapel-Owff0Csy.js → chapel-Bk9M7Jej.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{cobol-Cv2gZuhO.js → cobol-DyEvnPuC.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{coffee-Bji0YCf_.js → coffee-Di2-m3Jq.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{cpp-DTjA_yFF.js → cpp-CWpAaUgO.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{crystal-Dd00NOeb.js → crystal-CUker9Zt.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{css-D44TN1V6.js → css-D4XpBIiJ.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{edge-CVmGSi2m.js → edge-CVxhhF7L.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{elixir-B8Mq7no2.js → elixir-B_FS9APl.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{elm-CXS0I3Z2.js → elm-1KyefTkH.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{erb-B9oDKaUo.js → erb-CCgO9dRW.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{git-rebase-DT-YFebH.js → git-rebase-D0VYo_oY.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{glimmer-js-s0DXlNjq.js → glimmer-js-Ce07ngjZ.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{glimmer-ts-QgEB5S2z.js → glimmer-ts-BmOM4djO.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{glsl-NA0icwbY.js → glsl-D-jkLYJ8.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{graphql-0_dOlfV0.js → graphql-DZOwJE5e.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{hack-D-mr7l1l.js → hack-Cgvn19h8.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{haml-B0-oQmz7.js → haml-JTmDSYQl.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{handlebars-Yq9bXpWN.js → handlebars-CChh7Dy5.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{html-B8bMmdRK.js → html-BKgzx_cb.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{html-derivative-BpxSlQb_.js → html-derivative-CdFl0BmX.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{http-hS_53mxt.js → http-DZeL7KvH.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{hurl-B2ST1kwl.js → hurl-CqKevOlQ.js} +1 -1
- package/dist/diff_tool/app/dist/assets/index-BXyr8GCM.js +341 -0
- package/dist/diff_tool/app/dist/assets/{java-D4mj0lZJ.js → java-Sq3MCkId.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{javascript-wC7rrKiV.js → javascript-CHZB4Nse.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{jinja-DbQ3o87F.js → jinja-C4ucJVla.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{jison-CrE9FdvP.js → jison-D3mprebA.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{json-xjicDyWN.js → json-DgPfCYJ1.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{jsx-m28lXojQ.js → jsx-BG-Tx0cw.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{julia-19xkOmop.js → julia-B1GnFeUC.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{just-Cf7OorTr.js → just-_MZzo0MF.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{latex-DDb7GQOy.js → latex-DI0kqjQy.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{liquid-DHOuQ0rf.js → liquid-BtMAPeHl.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{lua-BGyIvonw.js → lua-CFxaP0To.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{marko-DB5OqI1C.js → marko-BIJocuFI.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{mdc-DTyNMupO.js → mdc-BAgrdjTH.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{nginx-DfF0fMYD.js → nginx-DE-3CsYn.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{nim-BbwsXuZD.js → nim-DOxeXLhb.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{org-BkOBBl1f.js → org-KTfP0tHA.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{perl-BTXTOl4K.js → perl-BH-NxpgK.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{php-DIMVQWiA.js → php-vuiVEXZK.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{pug-B_nrb4dJ.js → pug-VlIlTMUy.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{qml-1PXi8G8Z.js → qml-k6wTtGG-.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{r-CJrAkc2Z.js → r-Ccjcb2zh.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{razor-DgPUftNd.js → razor-BNhYgSCv.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{regexp-C2hS8XvL.js → regexp-C4LFejPu.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{rst-CDouhKnc.js → rst-DXLxI-UJ.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{ruby-CAjKW1uO.js → ruby-BPuL4jDV.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{sas-qAHkHLc1.js → sas-B3Yz8snb.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{scss-Bfx2Ydid.js → scss-B2AJ5vpk.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{shellscript-Bu76R8y2.js → shellscript-zyDexxnC.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{shellsession-BU8BL0oL.js → shellsession-C8b8xluk.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{soy-FRl8ozP-.js → soy-DKWe_XML.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{sql-BacQgsEs.js → sql-uEbz-Epf.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{stata-B9kkG-ET.js → stata-DieRPmHY.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{surrealql-qvETr7iY.js → surrealql-Dbk3Sp1P.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{svelte-B0z1MgHc.js → svelte-CjPbRmkM.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{templ-DTnPshKb.js → templ-Do_f5vc4.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{tex-Cosab9_H.js → tex-UjLP4qUm.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{ts-tags-DNYvLFUH.js → ts-tags-5L2FutA6.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{tsx-Dstq6j1a.js → tsx-B1pNtpUr.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{twig-BzqZdwaX.js → twig-O41Vg_IM.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{typescript-YOQ_oE25.js → typescript-Bj9uwnnJ.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{typst-DTffwfpc.js → typst-DsibO7oD.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{vue-D4OMj_C5.js → vue-DPhaEurv.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{vue-html-kT4WrHGK.js → vue-html-DDV9NSy1.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{vue-vine-CxeapeMO.js → vue-vine-Dh4jOifx.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{xml-DWVpuurg.js → xml-DtIulkQk.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{xsl-C0ciup5a.js → xsl-DoWtb58Z.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{yaml-98Fvyfpc.js → yaml-CZC-l1Dg.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/local_session_host.js +24 -318
- package/dist/host/local_session_host.js.map +1 -1
- package/dist/host/session_host.js.map +1 -1
- package/dist/host/session_protocol_handler.js +0 -98
- 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 +3 -28
- package/dist/protocol/session_protocol.js +1 -56
- 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 +0 -20
- package/dist/sdk/session.js.map +1 -1
- package/dist/sdk/types.d.ts +1 -7
- package/dist/store/session_snapshot_migrations.js +72 -1
- package/dist/store/session_snapshot_migrations.js.map +1 -1
- package/dist/tui/session_chat_controller.js +14 -30
- package/dist/tui/session_chat_controller.js.map +1 -1
- package/dist/tui/ui/footer.js +4 -9
- package/dist/tui/ui/footer.js.map +1 -1
- package/package.json +9 -9
- package/dist/core/session/goal.js +0 -54
- package/dist/core/session/goal.js.map +0 -1
- package/dist/core/tools/goal.js +0 -167
- package/dist/core/tools/goal.js.map +0 -1
- package/dist/diff_tool/app/dist/assets/index-CBT_sNIz.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
|
}
|
|
@@ -76,11 +76,11 @@ params: {
|
|
|
76
76
|
result: { sessionId: string }
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
`cwd` must be absolute inside the
|
|
79
|
+
`cwd` must be an absolute path inside the chosen execution environment. A Fly Sprite must already exist, and the host must have a `flySprites` connection configured. Tau does not create the target or the repository.
|
|
80
80
|
|
|
81
|
-
`attributes` is required,
|
|
81
|
+
`attributes` is required, even when empty. It accepts at most 32 pairs, which never change after creation. Keys are 1 to 64 characters and values at most 1,024 characters. Tau stores them as given and does not fill in missing ones. Conventional attributes and their use are covered in [sessions](sessions.md) and [history](history.md).
|
|
82
82
|
|
|
83
|
-
A local `env`
|
|
83
|
+
A local `env` sets environment variables for the execution environment. Names must be valid variable names, values cannot contain NUL, and `HOME` is not allowed because the execution environment sets it. These variables are saved with the session, so do not put secrets there unless the session store is protected accordingly.
|
|
84
84
|
|
|
85
85
|
Creation returns only an id. Call `session.observe` for state and streamed updates.
|
|
86
86
|
|
|
@@ -111,7 +111,7 @@ result: {
|
|
|
111
111
|
}
|
|
112
112
|
```
|
|
113
113
|
|
|
114
|
-
Install all three
|
|
114
|
+
Install all three before applying later messages. Calling `observe` again returns fresh starting states; it does not create a second session.
|
|
115
115
|
|
|
116
116
|
### `session.unobserve`
|
|
117
117
|
|
|
@@ -139,7 +139,7 @@ params: { sessionId: string; text: string; historyEntryId?: string }
|
|
|
139
139
|
result: { snapshot: SessionProtocolSnapshot; userHistoryEntryId: string }
|
|
140
140
|
```
|
|
141
141
|
|
|
142
|
-
This
|
|
142
|
+
This changes the context and waits its turn behind other changes. It can interrupt a running turn, and rejects pending queued and steering requests before adding the message. Use it for text written by the user that the model should see, not for client diagnostics.
|
|
143
143
|
|
|
144
144
|
### `session.submit`
|
|
145
145
|
|
|
@@ -150,22 +150,22 @@ params: { sessionId: string; text: string; historyEntryId?: string }
|
|
|
150
150
|
result: { userHistoryEntryId: string; turn: TurnOutcome }
|
|
151
151
|
```
|
|
152
152
|
|
|
153
|
-
Once accepted, the turn is
|
|
153
|
+
Once accepted, the turn is recorded in `snapshot.turns[userHistoryEntryId]`. Updates arrive through the observed channels while the request is open.
|
|
154
154
|
|
|
155
155
|
### `session.queue`
|
|
156
156
|
|
|
157
|
-
|
|
157
|
+
Same parameters and result as `session.submit`. When the session is idle, the turn starts right away. While a turn is running, the message is listed as pending and starts once the session is idle.
|
|
158
158
|
|
|
159
159
|
```ts
|
|
160
160
|
params: { sessionId: string; text: string; historyEntryId?: string }
|
|
161
161
|
result: { userHistoryEntryId: string; turn: TurnOutcome }
|
|
162
162
|
```
|
|
163
163
|
|
|
164
|
-
The
|
|
164
|
+
The response arrives when that turn finishes.
|
|
165
165
|
|
|
166
166
|
### `session.steer`
|
|
167
167
|
|
|
168
|
-
|
|
168
|
+
Changes the direction of the running turn.
|
|
169
169
|
|
|
170
170
|
```ts
|
|
171
171
|
params: {
|
|
@@ -178,11 +178,11 @@ result: {
|
|
|
178
178
|
}
|
|
179
179
|
```
|
|
180
180
|
|
|
181
|
-
When idle, steering starts an ordinary turn. During
|
|
181
|
+
When idle, steering starts an ordinary turn. During a turn, Tau waits for the next safe point, batches steering messages in arrival order, and continues the turn with them before any queued work. Batched requests share the same generated `userHistoryEntryId`. Steering does not accept a history ID from the caller.
|
|
182
182
|
|
|
183
183
|
### `session.cancelPendingMessages`
|
|
184
184
|
|
|
185
|
-
Cancels all pending
|
|
185
|
+
Cancels all pending queued and steering requests without interrupting running work.
|
|
186
186
|
|
|
187
187
|
```ts
|
|
188
188
|
params: {
|
|
@@ -208,11 +208,11 @@ result: {
|
|
|
208
208
|
}
|
|
209
209
|
```
|
|
210
210
|
|
|
211
|
-
The session must be idle.
|
|
211
|
+
The session must be idle.
|
|
212
212
|
|
|
213
213
|
### `session.interrupt`
|
|
214
214
|
|
|
215
|
-
|
|
215
|
+
Asks the session's running work to stop: turns, direct commands, model samples, and maintenance.
|
|
216
216
|
|
|
217
217
|
```ts
|
|
218
218
|
params: {
|
|
@@ -224,7 +224,7 @@ result: {
|
|
|
224
224
|
}
|
|
225
225
|
```
|
|
226
226
|
|
|
227
|
-
`isTurnRunning` may
|
|
227
|
+
`isTurnRunning` may stay `true` until the cancellation finishes. The method also cancels steering that has not been applied. It does not interrupt or remove subagents; use `session.interruptSubagent` for a subagent.
|
|
228
228
|
|
|
229
229
|
## Run independent execution and sampling
|
|
230
230
|
|
|
@@ -259,9 +259,9 @@ result: {
|
|
|
259
259
|
|
|
260
260
|
`execId` must be unique among active executions in the session. `stdinBase64` is limited to 16 MiB decoded. `maxCaptureBytes` is positive and at most 24 MiB; the default is 1 MiB. `HOME` cannot be overridden.
|
|
261
261
|
|
|
262
|
-
When `args` is present, Bash receives the first value as `$0` and the rest as `$@`.
|
|
262
|
+
When `args` is present, Bash receives the first value as `$0` and the rest as `$@`. To run one executable safely, use `command: 'exec "$0" "$@"'` with the executable and its arguments in `args`. `cwd` sets the starting directory; it does not restrict the command to it.
|
|
263
263
|
|
|
264
|
-
|
|
264
|
+
Commands can run at the same time as turns, samples, session changes, and other commands. Clients must coordinate workspace access when consistency matters.
|
|
265
265
|
|
|
266
266
|
### `session.cancelExec`
|
|
267
267
|
|
|
@@ -279,7 +279,7 @@ result: {
|
|
|
279
279
|
|
|
280
280
|
### `session.sample`
|
|
281
281
|
|
|
282
|
-
Runs
|
|
282
|
+
Runs a standalone model call with the session's current model. It uses only the context you supply, and does not change the session, run tools, send deltas, or add to the session's cost.
|
|
283
283
|
|
|
284
284
|
```ts
|
|
285
285
|
params: {
|
|
@@ -299,13 +299,13 @@ params: {
|
|
|
299
299
|
result: { message: AssistantMessage }
|
|
300
300
|
```
|
|
301
301
|
|
|
302
|
-
`context.messages` and the returned message use Tau's provider-
|
|
302
|
+
`context.messages` and the returned message use Tau's provider-independent message format. System messages after the first use the plain-text format with versioned metadata described in the [session protocol](session-protocol.md); the metadata is not sent to the provider. Sections and tool changes are rejected. Tool calls in the response are returned as data and never run. Samples can run at the same time, and `session.interrupt`, transport shutdown, or host shutdown cancels them.
|
|
303
303
|
|
|
304
304
|
## Read and change session state
|
|
305
305
|
|
|
306
306
|
### `session.snapshot`
|
|
307
307
|
|
|
308
|
-
Returns the complete
|
|
308
|
+
Returns the complete current snapshot.
|
|
309
309
|
|
|
310
310
|
```ts
|
|
311
311
|
params: {
|
|
@@ -318,7 +318,7 @@ Use this after observation, on demand, or to recover from a delta revision gap.
|
|
|
318
318
|
|
|
319
319
|
### `session.setReasoning`
|
|
320
320
|
|
|
321
|
-
Changes the reasoning effort
|
|
321
|
+
Changes the reasoning effort, starting with the next turn.
|
|
322
322
|
|
|
323
323
|
```ts
|
|
324
324
|
params: {
|
|
@@ -331,7 +331,7 @@ result: {
|
|
|
331
331
|
}
|
|
332
332
|
```
|
|
333
333
|
|
|
334
|
-
The
|
|
334
|
+
The change waits its turn behind other changes but does not interrupt a running turn. Running turns, including their steering, keep their settings.
|
|
335
335
|
|
|
336
336
|
### `session.setPersona`
|
|
337
337
|
|
|
@@ -345,7 +345,7 @@ params: {
|
|
|
345
345
|
result: SessionProtocolSnapshot;
|
|
346
346
|
```
|
|
347
347
|
|
|
348
|
-
This
|
|
348
|
+
This changes the context and waits its turn behind other changes. It interrupts a running turn and rejects pending input, then returns the new snapshot.
|
|
349
349
|
|
|
350
350
|
### `session.resolvePrompt`
|
|
351
351
|
|
|
@@ -362,11 +362,11 @@ result: {
|
|
|
362
362
|
}
|
|
363
363
|
```
|
|
364
364
|
|
|
365
|
-
|
|
365
|
+
The snapshot catalog holds only prompt IDs and labels. Call this when the user chooses a prompt.
|
|
366
366
|
|
|
367
367
|
### `session.autocompletePaths`
|
|
368
368
|
|
|
369
|
-
Returns
|
|
369
|
+
Returns a limited list of path suggestions from the execution environment.
|
|
370
370
|
|
|
371
371
|
```ts
|
|
372
372
|
params: { sessionId: string; query: string; limit: number }
|
|
@@ -375,56 +375,11 @@ result: { paths: string[] }
|
|
|
375
375
|
|
|
376
376
|
`limit` is a positive integer no greater than 100. Results can include directories with a trailing `/` and are not snapshot state.
|
|
377
377
|
|
|
378
|
-
## Manage goals
|
|
379
|
-
|
|
380
|
-
### `session.startGoal`
|
|
381
|
-
|
|
382
|
-
Creates a persistent active goal, commits its objective as user input, and runs autonomous continuations until the goal completes, blocks, fails, or is interrupted.
|
|
383
|
-
|
|
384
|
-
```ts
|
|
385
|
-
params: {
|
|
386
|
-
sessionId: string;
|
|
387
|
-
objective: string;
|
|
388
|
-
}
|
|
389
|
-
result: {
|
|
390
|
-
userHistoryEntryId: string;
|
|
391
|
-
turn: TurnOutcome;
|
|
392
|
-
}
|
|
393
|
-
```
|
|
394
|
-
|
|
395
|
-
Only one goal can exist. Queued messages wait for goal work to settle.
|
|
396
|
-
|
|
397
|
-
### `session.resumeGoal`
|
|
398
|
-
|
|
399
|
-
Resumes a blocked goal without adding a visible user message.
|
|
400
|
-
|
|
401
|
-
```ts
|
|
402
|
-
params: {
|
|
403
|
-
sessionId: string;
|
|
404
|
-
}
|
|
405
|
-
result: {
|
|
406
|
-
turn: TurnOutcome;
|
|
407
|
-
}
|
|
408
|
-
```
|
|
409
|
-
|
|
410
|
-
### `session.clearGoal`
|
|
411
|
-
|
|
412
|
-
Clears the current goal and returns the updated snapshot.
|
|
413
|
-
|
|
414
|
-
```ts
|
|
415
|
-
params: {
|
|
416
|
-
sessionId: string;
|
|
417
|
-
}
|
|
418
|
-
result: SessionProtocolSnapshot;
|
|
419
|
-
```
|
|
420
|
-
|
|
421
|
-
If no goal exists, the method returns `invalid_request`. Clearing interrupts an active turn and rejects pending input.
|
|
422
|
-
|
|
423
378
|
## Reload, compact, and rewind
|
|
424
379
|
|
|
425
380
|
### `session.reload`
|
|
426
381
|
|
|
427
|
-
Reloads session
|
|
382
|
+
Reloads the session's configuration and content from the execution environment.
|
|
428
383
|
|
|
429
384
|
```ts
|
|
430
385
|
params: { sessionId: string }
|
|
@@ -435,11 +390,11 @@ result: {
|
|
|
435
390
|
}
|
|
436
391
|
```
|
|
437
392
|
|
|
438
|
-
Reload
|
|
393
|
+
Reload changes the context and waits its turn behind other changes. It interrupts a running turn and rejects pending input. It does not reload client themes or tools, process environment variables, or host services. See [configuration](configuration.md) for when changes apply.
|
|
439
394
|
|
|
440
395
|
### `session.compact`
|
|
441
396
|
|
|
442
|
-
|
|
397
|
+
Replaces the model's context with a generated summary.
|
|
443
398
|
|
|
444
399
|
```ts
|
|
445
400
|
params: {
|
|
@@ -454,11 +409,11 @@ result: {
|
|
|
454
409
|
}
|
|
455
410
|
```
|
|
456
411
|
|
|
457
|
-
Compaction interrupts
|
|
412
|
+
Compaction interrupts a running turn, rejects pending input, and returns the new snapshot. A successful compaction advances the timeline epoch.
|
|
458
413
|
|
|
459
414
|
### `session.rewind`
|
|
460
415
|
|
|
461
|
-
Removes one
|
|
416
|
+
Removes one user message and everything after it.
|
|
462
417
|
|
|
463
418
|
```ts
|
|
464
419
|
params: { sessionId: string; historyEntryId: string }
|
|
@@ -470,13 +425,13 @@ result: {
|
|
|
470
425
|
}
|
|
471
426
|
```
|
|
472
427
|
|
|
473
|
-
Rewind requires
|
|
428
|
+
Rewind requires an idle session with no pending input, and returns `busy` instead of interrupting work. The returned `text` is the removed user message, for putting back in an editor.
|
|
474
429
|
|
|
475
430
|
## Control subagents and ephemeral contexts
|
|
476
431
|
|
|
477
432
|
### `session.interruptSubagent`
|
|
478
433
|
|
|
479
|
-
Interrupts
|
|
434
|
+
Interrupts one subagent's current run. The subagent stays available for follow-ups.
|
|
480
435
|
|
|
481
436
|
```ts
|
|
482
437
|
params: {
|
|
@@ -490,7 +445,7 @@ result: {
|
|
|
490
445
|
|
|
491
446
|
### `session.ephemeral.create`
|
|
492
447
|
|
|
493
|
-
Creates
|
|
448
|
+
Creates an agent context on the host that is not saved and is separate from the main conversation.
|
|
494
449
|
|
|
495
450
|
```ts
|
|
496
451
|
params: {
|
|
@@ -504,7 +459,7 @@ result: {
|
|
|
504
459
|
}
|
|
505
460
|
```
|
|
506
461
|
|
|
507
|
-
The context uses the
|
|
462
|
+
The context uses the session's persona and execution environment, with the given instructions and exactly the given tools. `reasoning` sets the starting effort for new threads. Without it, the context uses the session's effort at creation time. Later changes to the session's settings do not affect the context. It does not survive a host restart.
|
|
508
463
|
|
|
509
464
|
### `session.ephemeral.submit`
|
|
510
465
|
|
|
@@ -522,7 +477,7 @@ params: {
|
|
|
522
477
|
result: { threadId: string; response: string }
|
|
523
478
|
```
|
|
524
479
|
|
|
525
|
-
`reasoning`
|
|
480
|
+
`reasoning` changes the thread's effort before running the message, and stays in effect for later messages. Without it, the thread keeps its current effort. `forkFromThreadId` creates a new thread from an idle thread in the same context, copying its effort; a `reasoning` value given here applies only to the new fork. A second submission to a busy thread returns `busy`, while different threads can run at once.
|
|
526
481
|
|
|
527
482
|
### `session.ephemeral.close`
|
|
528
483
|
|
|
@@ -542,7 +497,7 @@ result: {
|
|
|
542
497
|
|
|
543
498
|
## Complete delegated client-tool calls
|
|
544
499
|
|
|
545
|
-
These methods are for
|
|
500
|
+
These methods are for clients that offered tools in `initialize`. Other clients never call them.
|
|
546
501
|
|
|
547
502
|
### `session.clientTool.ack`
|
|
548
503
|
|
|
@@ -568,9 +523,9 @@ result: {
|
|
|
568
523
|
}
|
|
569
524
|
```
|
|
570
525
|
|
|
571
|
-
The optional presentation
|
|
526
|
+
The optional presentation partly overrides the running tool card. If given, `subject` must be non-empty and may contain line feeds but not carriage returns. Each detail text and metadata value is one line. Presentation objects are limited to 1 MiB; subjects and detail values to 256 KiB each; metadata values to 16 KiB each; and detail and metadata collections to 1,024 entries each.
|
|
572
527
|
|
|
573
|
-
The host
|
|
528
|
+
The host keeps fields you set, within those limits, and fills in omitted fields with defaults truncated as Tau truncates its own cards. It sets the action and operation, and records the final presentation. An empty `details` or `metadata` array hides that default. Once the acknowledgement is accepted, the client may start work.
|
|
574
529
|
|
|
575
530
|
### `session.clientTool.result`
|
|
576
531
|
|
|
@@ -609,10 +564,10 @@ params:
|
|
|
609
564
|
result: { accepted: boolean };
|
|
610
565
|
```
|
|
611
566
|
|
|
612
|
-
`content`
|
|
567
|
+
`content` keeps the order of text and image blocks in the model's result, snapshots, and deltas. It may be empty and can have at most 1,024 blocks, including at most 16 images in valid padded base64 of at most 3.5 MiB each. Images are never shown in the tool card.
|
|
613
568
|
|
|
614
|
-
The optional
|
|
569
|
+
The optional presentation applies only to the finished card, separately from the running one. The host keeps fields you set once they pass validation, and fills in omitted fields with truncated defaults. If no result arrives, the host shows a complete default card for the timeout, cancellation, detach, or other outcome.
|
|
615
570
|
|
|
616
|
-
A successful result is accepted only after the host has accepted the acknowledgement. An error sent before
|
|
571
|
+
A successful result is accepted only after the host has accepted the acknowledgement. An error sent before acknowledging records a preparation failure, such as an error from `describe`, and the tool never runs. An error sent afterward records an execution failure.
|
|
617
572
|
|
|
618
|
-
`accepted: false` means
|
|
573
|
+
`accepted: false` means a successful result arrived before the call was acknowledged, or the call was cancelled, timed out, detached, unknown, or already finished. Do not retry or send more results for that call.
|