@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,18 +1,18 @@
|
|
|
1
1
|
# Remote sessions
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
In a remote session, the terminal stays on your machine while the session host and execution environment run elsewhere. `tau attach` is the same TUI, connected over WebSocket. What changes is which machine holds credentials and saved sessions, and where the agent's commands run.
|
|
4
4
|
|
|
5
5
|
## Choose the connection shape
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Choose the simplest setup that matches how long the host should live.
|
|
8
8
|
|
|
9
|
-
|
|
|
9
|
+
| Setup | Best for | Lifetime and ownership |
|
|
10
10
|
| --- | --- | --- |
|
|
11
11
|
| `tau serve` plus WebSocket attach | Long-running hosts, reconnects, and multiple observers | The server owns the host independently of any one TUI. |
|
|
12
12
|
| Node SDK with its default client | Applications that want an in-process host | The SDK client owns the host and closes it with the client. |
|
|
13
13
|
| Node SDK over WebSocket | Applications sharing a long-running `tau serve` host | The server owns sessions; the SDK observes them remotely. |
|
|
14
14
|
|
|
15
|
-
Use `tau serve` for remote TUI and SDK connections.
|
|
15
|
+
Use `tau serve` for remote TUI and SDK connections. To rely on SSH for security, keep it on loopback and connect through an SSH tunnel. The [session protocol](session-protocol.md) and [Node SDK](node-sdk.md) cover the developer APIs and wire format; this page covers operation.
|
|
16
16
|
|
|
17
17
|
## Host sessions over WebSocket
|
|
18
18
|
|
|
@@ -22,7 +22,7 @@ Start a server on the host:
|
|
|
22
22
|
tau serve
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
By default the server listens on `127.0.0.1:8787`, which suits local clients or a reverse proxy on the same machine. To listen on another interface, set it explicitly and require a strong token:
|
|
26
26
|
|
|
27
27
|
```sh
|
|
28
28
|
export TAU_WS_AUTH_TOKEN="$(openssl rand -hex 32)"
|
|
@@ -36,15 +36,15 @@ export TAU_WS_AUTH_TOKEN='the-same-token'
|
|
|
36
36
|
tau attach ws://buildbox.example:8787
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
`tau attach` uses `TAU_WS_AUTH_TOKEN` when `--auth-token` is
|
|
39
|
+
`tau attach` uses `TAU_WS_AUTH_TOKEN` when `--auth-token` is not given. You can also pass the token explicitly:
|
|
40
40
|
|
|
41
41
|
```sh
|
|
42
42
|
tau attach --auth-token "$TAU_WS_AUTH_TOKEN" ws://buildbox.example:8787
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
The token gives full access to all hosted sessions. Without `--auth-token` or `TAU_WS_AUTH_TOKEN`, the server has no authentication. Tau serves plain WebSocket and has no TLS settings. On an untrusted network, put it behind a trusted TLS reverse proxy and attach with `wss://`, or keep it on loopback and use an SSH tunnel. The token is sent when the connection is set up, so treat proxy logs and WebSocket handshake data as sensitive.
|
|
46
46
|
|
|
47
|
-
A typical tunnel
|
|
47
|
+
A typical tunnel, with Tau on loopback:
|
|
48
48
|
|
|
49
49
|
```sh
|
|
50
50
|
ssh -N -L 8787:127.0.0.1:8787 dev@buildbox.example
|
|
@@ -64,9 +64,9 @@ Without `--session` or `--new`, `tau attach` asks the host for its session list
|
|
|
64
64
|
tau attach ws://127.0.0.1:8787
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
The selector shows each session
|
|
67
|
+
The selector shows each session ID and whether it is idle or running, and can also create a session. It needs a terminal: if stdin or stdout is not a TTY, pass `--session` or `--new`.
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
If you know the session ID, attach directly:
|
|
70
70
|
|
|
71
71
|
```sh
|
|
72
72
|
tau attach \
|
|
@@ -74,7 +74,7 @@ tau attach \
|
|
|
74
74
|
ws://127.0.0.1:8787
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
To create a new session, give an absolute `--cwd` in the chosen execution environment:
|
|
78
78
|
|
|
79
79
|
```sh
|
|
80
80
|
tau attach \
|
|
@@ -83,15 +83,15 @@ tau attach \
|
|
|
83
83
|
ws://127.0.0.1:8787
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
With the default `local` execution kind, this path is on the host machine, not the attaching machine. The directory must already exist and contain the repository or workspace you want. Tau creates only the session, not the directory or repository.
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
A remote `--new` sets the creation attribute `source: "tui"`. It does not look at the remote directory to fill in repository information. Clients that need it should create sessions through the SDK or protocol and send complete attributes. See [sessions](sessions.md).
|
|
89
89
|
|
|
90
|
-
`tau attach` does not accept the
|
|
90
|
+
`tau attach` does not accept the persona flags of local startup. Set the server's default when starting the host, for example `tau serve --persona opus-5.5-coder`, or switch the new session with `/persona:<id>` after attaching.
|
|
91
91
|
|
|
92
92
|
## Select an execution environment
|
|
93
93
|
|
|
94
|
-
A session can use a
|
|
94
|
+
A session can use a directory on the host or an existing Fly Sprite. Either way, the working directory is an absolute path inside that environment.
|
|
95
95
|
|
|
96
96
|
### Host-local directory
|
|
97
97
|
|
|
@@ -101,11 +101,11 @@ A session can use a local host directory or an already-provisioned Fly Sprite. I
|
|
|
101
101
|
tau attach --new --cwd /srv/workspaces/tau ws://host.example:8787
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
-
The
|
|
104
|
+
The agent's file operations and commands run on the host machine. Tau does not clone, pull, or set up a repository.
|
|
105
105
|
|
|
106
106
|
### Fly Sprite
|
|
107
107
|
|
|
108
|
-
The host must
|
|
108
|
+
The host must have a `flySprites` connection configured, and the Sprite must already exist:
|
|
109
109
|
|
|
110
110
|
```sh
|
|
111
111
|
tau attach \
|
|
@@ -118,18 +118,18 @@ tau attach \
|
|
|
118
118
|
|
|
119
119
|
`--fly-sprite` names an existing Sprite. Tau does not provision it or prepare its repository.
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
The Sprite API URL, home path, and token are host [configuration](configuration.md). When the session is created, Tau reads project configuration and content from the working directory inside the Sprite.
|
|
122
122
|
|
|
123
123
|
## Keep the ownership boundaries clear
|
|
124
124
|
|
|
125
|
-
An attached session
|
|
125
|
+
An attached session involves three separate parts, even when two of them run on the same machine.
|
|
126
126
|
|
|
127
127
|
### The attaching client owns
|
|
128
128
|
|
|
129
129
|
- terminal rendering, editor drafts, clipboard operations, and local notifications
|
|
130
130
|
- loaded themes and `defaultTheme`
|
|
131
131
|
- `/listen`, `/speak`, and their local credentials and OS commands
|
|
132
|
-
- the built-in
|
|
132
|
+
- the built-in diff tool process
|
|
133
133
|
- configured command-backed client-tool processes
|
|
134
134
|
- the client’s Tau binary and TUI behavior
|
|
135
135
|
|
|
@@ -138,7 +138,7 @@ An attached session spans three logical machines even when two happen to share o
|
|
|
138
138
|
- session orchestration, persistence, and recovery
|
|
139
139
|
- provider credential resolution and model execution
|
|
140
140
|
- WebSocket authentication and listener lifetime
|
|
141
|
-
- execution
|
|
141
|
+
- hosted execution environment settings and credentials
|
|
142
142
|
- pending input while the session remains live
|
|
143
143
|
- the host’s Tau binary and built-in agent documentation
|
|
144
144
|
|
|
@@ -149,66 +149,66 @@ An attached session spans three logical machines even when two happen to share o
|
|
|
149
149
|
- command execution, platform, PATH, and runtime dependencies
|
|
150
150
|
- automatic-compaction archives and other target-side temporary files
|
|
151
151
|
|
|
152
|
-
|
|
152
|
+
That is why a host's theme setting does not affect a remote TUI, why `!git status` runs in the execution environment, and why the built-in diff review tool opens on the attaching machine. [Ownership and scope](ownership-and-scope.md) applies the same model across Tau.
|
|
153
153
|
|
|
154
154
|
## Reload or restart the correct process
|
|
155
155
|
|
|
156
|
-
|
|
156
|
+
Each kind of change belongs to a different process:
|
|
157
157
|
|
|
158
158
|
| Change | Action |
|
|
159
159
|
| --- | --- |
|
|
160
160
|
| Project config, personas, prompts, skills, or AGENTS.md in the execution environment | Wait for idle, then run `/reload`. |
|
|
161
161
|
| Global model `apiKeys` on the host | Restart the host. |
|
|
162
|
-
|
|
|
162
|
+
| Codex auth changed with `tau auth` | No restart needed; every new request reads auth storage again. |
|
|
163
163
|
| Attaching themes, speech config, or configured client tools | Restart `tau attach`. |
|
|
164
|
-
| Host
|
|
164
|
+
| Host environment variables, history target, WebSocket listener, Fly Sprite connection, or host startup flags | Restart `tau serve`. |
|
|
165
165
|
| Host Tau package, built-in tools, protocol, session recovery code, or built-in documentation | Upgrade and restart the host. |
|
|
166
166
|
| TUI package, keybindings, rendering, local speech, or client-tool implementation | Upgrade and restart the attaching client. |
|
|
167
167
|
|
|
168
|
-
`/reload`
|
|
168
|
+
`/reload` acts on the session. The host reads session content again from the execution environment. It does not reload either process's code or environment. For a long-running WebSocket host, restarting only the client does not update the host's tools or the documentation its agent reads. For an old client attached to a new host, restarting only the host does not update the TUI. See [credentials](credentials.md) for complete precedence and apply boundaries.
|
|
169
169
|
|
|
170
170
|
## Reconnect and observe safely
|
|
171
171
|
|
|
172
|
-
A WebSocket connection observes a hosted session
|
|
172
|
+
A WebSocket connection observes a hosted session. It does not own the saved session and cannot delete it. After the last client disconnects, the host unloads an idle session from memory and keeps it saved. If a client disconnects while work is running, the host keeps working and unloads the session only after the work finishes. Reattach with the same session ID to get the current state and continue receiving updates.
|
|
173
173
|
|
|
174
|
-
A clean `tau serve` shutdown interrupts
|
|
174
|
+
A clean `tau serve` shutdown interrupts running work, saves live sessions, and closes clients. After a restart, the host lists the sessions whose execution environments it can reconnect. Recovered sessions come back idle, without queued or steering messages, and without subagents.
|
|
175
175
|
|
|
176
176
|
## Use multiple observers carefully
|
|
177
177
|
|
|
178
|
-
|
|
178
|
+
Several WebSocket clients can observe the same live session and receive the same updates and pending messages. Every one of them can also submit, queue, steer, interrupt, or change the session. None is read-only, so agree on who, or which automation, is in charge.
|
|
179
179
|
|
|
180
|
-
Each
|
|
180
|
+
Each TUI offers its `diff_review` and `prefill_input` tools plus its enabled configured client tools. Only one client may offer a given tool name in a session. Start additional clients with:
|
|
181
181
|
|
|
182
182
|
```sh
|
|
183
183
|
tau attach --no-client-tools --session 0195d6e4-4cf9-7f44-a2d8-f8f7f49ee9d3 ws://host.example:8787
|
|
184
184
|
```
|
|
185
185
|
|
|
186
|
-
|
|
186
|
+
A turn keeps the client tools that were available when it started. If the owning client detaches, its tools become unavailable and its running calls are cancelled. After a host restart, client tools return only when a client that offers them attaches again. See [client tools](client-tools.md).
|
|
187
187
|
|
|
188
188
|
## Troubleshoot connection and recovery
|
|
189
189
|
|
|
190
190
|
### The client reports an unsupported protocol version
|
|
191
191
|
|
|
192
|
-
|
|
192
|
+
Client and host must use exactly the same protocol version; there is no negotiation. Upgrade both to the same Tau release, restart both, and reconnect. The agent's tools and documentation come from the host's installation, and TUI behavior comes from the client's.
|
|
193
193
|
|
|
194
|
-
|
|
194
|
+
Do not downgrade a host that has already saved sessions in a newer format. Newer Tau versions upgrade supported older sessions when recovering them, but older versions cannot read newer sessions.
|
|
195
195
|
|
|
196
196
|
### A session is missing from the selector
|
|
197
197
|
|
|
198
|
-
The host lists only
|
|
198
|
+
The host lists only saved sessions whose execution environment it can reconnect. Confirm that:
|
|
199
199
|
|
|
200
200
|
- the connection uses the same host user and home directory as the original process
|
|
201
|
-
- the Fly
|
|
201
|
+
- the Fly Sprite connection is still configured on the host
|
|
202
202
|
- host credentials are available to the restarted process
|
|
203
203
|
- the target Sprite or local directory still exists
|
|
204
204
|
- the session was created on this host rather than another machine with a different store
|
|
205
205
|
|
|
206
|
-
Do not edit the session
|
|
206
|
+
Do not edit the session files to change the environment. Restore the configuration or the target instead.
|
|
207
207
|
|
|
208
208
|
### WebSocket attachment is unauthorized
|
|
209
209
|
|
|
210
|
-
|
|
210
|
+
Check that server and client use the same token, and that any reverse proxy passes through the WebSocket request path and query string. `TAU_WS_AUTH_TOKEN` can supply the token on either side without you noticing, so check the environment as well as the flags. Do not print the token into shared logs.
|
|
211
211
|
|
|
212
212
|
### A reconnect shows an interrupted turn
|
|
213
213
|
|
|
214
|
-
A client
|
|
214
|
+
A client disconnecting does not stop a turn on a WebSocket host, but a server shutdown does. Look at the last assistant message and tool results, check the execution environment with `!!pwd` and `!!git status --short`, then retry if you mean to. [Sessions](sessions.md) explains recovery and how to check a recovered session.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# SDK browser diff review
|
|
2
2
|
|
|
3
|
-
`startTauSdkDiffReview()` starts Tau's built-in browser review UI for an observed SDK session without
|
|
3
|
+
`startTauSdkDiffReview()` starts Tau's built-in browser review UI for an observed SDK session, without the TUI and without opening a browser. It takes the diff in the session's execution environment, creates the same review agent context that `/diff` uses, starts preparing the review context and reviewer guide right away, and starts an HTTP server, on loopback by default.
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
6
|
import { startTauSdkDiffReview } from "@markusylisiurunen/tau/sdk";
|
|
@@ -23,15 +23,19 @@ try {
|
|
|
23
23
|
}
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
The source
|
|
26
|
+
The source can instead be `{ kind: "patch_files", patchFiles, scopeLabel }`. Paths and Git arguments refer to the session's execution environment. A snapshot's patch can be at most 16 MiB; narrow the Git arguments or patch files if a larger diff is rejected. A plain working-tree snapshot includes non-binary untracked files of up to 4 MiB each, within that total. The optional `host`, `port`, and `signal` fields set where the HTTP server listens and let you cancel startup.
|
|
27
27
|
|
|
28
28
|
## Routing and lifecycle
|
|
29
29
|
|
|
30
|
-
The returned `url` is
|
|
30
|
+
The returned `url` is on the SDK client's machine and ends with a slash. Your service can expose it through a reverse proxy that handles authentication or access links. The browser app uses relative paths, so it works under a path prefix, as long as the public URL also ends with a slash. Your service is responsible for public authentication, routing, retention, and recovery.
|
|
31
31
|
|
|
32
|
-
The HTTP server
|
|
32
|
+
The HTTP server has no authentication. The default loopback address suits a proxy on the same machine. Set a non-loopback `host` only inside a trusted network; otherwise keep it on loopback behind a protected proxy.
|
|
33
33
|
|
|
34
|
-
Always call `close()` when the review
|
|
34
|
+
Always call `close()` when the review should no longer be available. It cancels the review if needed, closes the review agent context, and stops the HTTP server.
|
|
35
|
+
|
|
36
|
+
In the UI, **Submit** first opens a preview of the exact text to be returned, where the reviewer can exclude feedback and copy the full review. **Approve** returns right away when no feedback remains; if feedback appears while approval is being checked, the preview opens instead. The returned Markdown stands on its own: it names the reviewed scope, gives change-level comments their context, and explains who took part in each unresolved discussion and in what role.
|
|
37
|
+
|
|
38
|
+
`result` resolves once, with the outcome or the reason for cancellation. An approval and a review with comments are separate outcomes, so you never need to check for placeholder text:
|
|
35
39
|
|
|
36
40
|
```ts
|
|
37
41
|
const result = await review.result;
|
|
@@ -44,7 +48,7 @@ if (result.status === "returned" && result.outcome === "approved") {
|
|
|
44
48
|
|
|
45
49
|
## Durable review state
|
|
46
50
|
|
|
47
|
-
|
|
51
|
+
By default, review annotations, transcripts, guide content and comments, and UI preferences are kept only in memory. Pass a `storage` adapter to save them:
|
|
48
52
|
|
|
49
53
|
```ts
|
|
50
54
|
const review = await startTauSdkDiffReview({
|
|
@@ -57,15 +61,15 @@ const review = await startTauSdkDiffReview({
|
|
|
57
61
|
});
|
|
58
62
|
```
|
|
59
63
|
|
|
60
|
-
The stored document is
|
|
64
|
+
The stored document is a versioned Tau value of limited size. Store it as is, without reading or changing it. Tau saves each change before the HTTP request succeeds, and undoes the change if saving fails.
|
|
61
65
|
|
|
62
|
-
|
|
66
|
+
To restore, the stored document must be valid, supported by the running Tau version, and made for the same diff. "The same diff" covers the patch, file metadata, diff command and arguments, repository root, and working directory. If the state is invalid, unsupported, or for a different diff, `startTauSdkDiffReview()` rejects, instead of quietly starting empty. Your application then decides whether to keep, discard, or replace the document before trying again.
|
|
63
67
|
|
|
64
|
-
|
|
68
|
+
Saved state does not include loading indicators or review agent thread IDs. After a restore, the first follow-up question starts a new agent thread and gives it the saved conversation transcript.
|
|
65
69
|
|
|
66
70
|
## Durable submission
|
|
67
71
|
|
|
68
|
-
Use `onSubmit` when review
|
|
72
|
+
Use `onSubmit` when the submitted review must be saved before the browser is told it succeeded:
|
|
69
73
|
|
|
70
74
|
```ts
|
|
71
75
|
const review = await startTauSdkDiffReview({
|
|
@@ -83,6 +87,6 @@ const review = await startTauSdkDiffReview({
|
|
|
83
87
|
|
|
84
88
|
An approved submission has `outcome: "approved"` and no `review` field. A commented submission has `outcome: "commented"` and a required `review` field. Both include `diffCommand` and `reviewedFiles`.
|
|
85
89
|
|
|
86
|
-
|
|
90
|
+
Each running review server allows only one submission at a time, and none after one succeeds. Tau waits for `onSubmit` to finish before reporting success and closing the review. If the callback fails, the reviewer can submit again.
|
|
87
91
|
|
|
88
|
-
|
|
92
|
+
Your application is responsible for recording the submission exactly once, for deciding whether a submitted review may be opened again, and for keeping or deleting stored state. A typical callback marks its own review record as submitted and queues follow-up work in one transaction.
|