@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,73 +1,75 @@
|
|
|
1
1
|
# Terminal interface
|
|
2
2
|
|
|
3
|
-
Tau
|
|
3
|
+
Tau's terminal interface works both for local sessions and for sessions on a remote host. The editor, commands, and review workflow are the same in both. The session host holds the conversation and runs the model, while the TUI handles the terminal and local features such as themes, the clipboard, speech, and the diff tool.
|
|
4
4
|
|
|
5
5
|
## Start the TUI
|
|
6
6
|
|
|
7
|
-
Run `tau` in the project directory
|
|
7
|
+
Run `tau` in the project directory to start a new local session:
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
10
|
cd ~/Code/tau
|
|
11
11
|
tau
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
The agent works in that directory. You can choose a persona and reasoning level at startup:
|
|
15
15
|
|
|
16
16
|
```sh
|
|
17
17
|
tau --persona gpt-6.1-sol-coder:high
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
`-p` is the short form. `--no-agent-context-files`
|
|
20
|
+
`-p` is the short form. `--no-agent-context-files` turns off `AGENTS.md` loading and the scan for nested `AGENTS.md` files. `--no-client-tools` stops the TUI from offering its built-in and configured [client tools](client-tools.md).
|
|
21
21
|
|
|
22
|
-
Piped stdin becomes the first message
|
|
22
|
+
Piped stdin becomes the first message of a local session:
|
|
23
23
|
|
|
24
24
|
```sh
|
|
25
25
|
printf 'summarize the current changes' | tau
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
Use `tau attach` for a session hosted elsewhere. The terminal, themes, clipboard, speech commands, built-in diff review tool, and command
|
|
28
|
+
Use `tau attach` for a session hosted elsewhere. The terminal, themes, clipboard, speech commands, built-in diff review tool, and command client tools stay on the attaching machine. Bash tools, file access, project configuration, and model calls use the session's execution environment. See [remote sessions](remote-sessions.md) for connecting and creating sessions.
|
|
29
29
|
|
|
30
|
-
The startup summary lists discovered skills, project context files, configured client tools, and enabled MCP
|
|
30
|
+
The startup summary lists discovered skills, project context files, configured client tools, and enabled MCP servers. MCP servers are shown as configured, not connected, because connections open on first use. In attached sessions, the MCP list comes from the host. Empty sections are left out.
|
|
31
31
|
|
|
32
32
|
## Work in the editor
|
|
33
33
|
|
|
34
|
-
Enter submits
|
|
34
|
+
Enter submits. Shift+Enter or Ctrl+J inserts a newline. Up and Down move within the editor, and recall earlier submissions when the editor is empty.
|
|
35
35
|
|
|
36
|
-
Tau recognizes these
|
|
36
|
+
Tau recognizes these mentions and completes them with Tab:
|
|
37
37
|
|
|
38
38
|
- `@src/main.ts` mentions a file in the execution environment.
|
|
39
39
|
- `@@skill:code-review` explicitly activates an available skill.
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
Other forms, such as `@file:`, `@skill:`, or `@agent:`, are not mentions. File paths and skill names come from the session, not from the attaching machine's filesystem.
|
|
42
42
|
|
|
43
|
-
Typing `/` at the start of a line opens command completion. Slash commands
|
|
43
|
+
Typing `/` at the start of a line opens command completion. Slash commands work only in single-line submissions. Multiline input that starts with `/`, and unknown slash commands, are sent to the agent as ordinary messages.
|
|
44
44
|
|
|
45
45
|
## Submit, queue, and steer
|
|
46
46
|
|
|
47
|
-
When Tau is idle, Enter and Ctrl+Enter both start a normal turn. While a turn is
|
|
47
|
+
When Tau is idle, Enter and Ctrl+Enter both start a normal turn. While a turn is running:
|
|
48
48
|
|
|
49
|
-
- Ctrl+Enter queues the text as a new turn
|
|
50
|
-
- Enter steers the
|
|
51
|
-
- Alt+Up cancels all
|
|
49
|
+
- Ctrl+Enter queues the text as a new turn that runs when the session becomes idle.
|
|
50
|
+
- Enter steers the running turn. Tau applies steering at the next safe point, never in the middle of a model response or tool call.
|
|
51
|
+
- Alt+Up cancels all queued messages and steering not yet applied, and puts their text back in the editor, separated by `---`.
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
Some messages carry hidden guidance, such as a note that text was transcribed from speech. Hidden guidance stays hidden in the pending list and the editor. When messages are restored, their guidance is kept, in order, after any guidance the draft already has. On submission, all guidance goes at the start of the combined message. Editing a non-empty draft keeps its guidance, and clearing the draft removes it.
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
Pending input is shared by all clients attached to the session while the host keeps running. It is not saved and is lost when the host restarts. A queued turn uses the persona, reasoning, tools, and model settings current when it actually starts. Steering belongs to the running turn and uses the settings that turn started with.
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
Escape interrupts work. If local work is in the foreground, such as diff review, voice input, or speech playback, Escape stops that first. Otherwise it asks the host to interrupt the session, which also cancels a running manual compaction. Once compaction has replaced the context, a late interruption does not undo it or turn the saved result into a failure. Escape does not stop subagents; select one with Alt+Down and press Ctrl+G. Press Escape twice to clear the editor.
|
|
58
|
+
|
|
59
|
+
Press Enter twice on an empty editor to retry from the current history. Retry does not rewind or repeat the last user message.
|
|
58
60
|
|
|
59
61
|
## Choose persona, reasoning, and thought visibility
|
|
60
62
|
|
|
61
|
-
The current persona and reasoning level
|
|
63
|
+
The editor header shows the current persona and reasoning level.
|
|
62
64
|
|
|
63
|
-
- `/persona:<id>` selects a persona by
|
|
65
|
+
- `/persona:<id>` selects a persona by ID.
|
|
64
66
|
- Ctrl+P cycles through available personas.
|
|
65
|
-
- Shift+Tab cycles through the
|
|
66
|
-
- Ctrl+T shows or hides
|
|
67
|
+
- Shift+Tab cycles through the persona's allowed reasoning levels.
|
|
68
|
+
- Ctrl+T shows or hides the assistant's thinking in this TUI.
|
|
67
69
|
|
|
68
|
-
Persona changes require
|
|
70
|
+
Persona changes require an idle session, because they can change the model, instructions, skills, and tools. Reasoning can change while a turn is running, but that turn and its steering keep their settings. The new level applies from the next turn.
|
|
69
71
|
|
|
70
|
-
|
|
72
|
+
Ctrl+T affects only what this TUI displays. It does not turn on reasoning, change its effort, or change the session history.
|
|
71
73
|
|
|
72
74
|
For example:
|
|
73
75
|
|
|
@@ -75,34 +77,37 @@ For example:
|
|
|
75
77
|
/persona:opus-5.5-coder
|
|
76
78
|
```
|
|
77
79
|
|
|
78
|
-
Then use Shift+Tab to
|
|
80
|
+
Then use Shift+Tab to choose a reasoning level. A newly added persona appears only after `/reload`.
|
|
79
81
|
|
|
80
82
|
## Slash commands
|
|
81
83
|
|
|
82
|
-
`/help` prints the commands, keybindings, loaded skills, and context
|
|
84
|
+
`/help` prints the commands, keybindings, loaded skills, and context file paths for the current session.
|
|
83
85
|
|
|
84
86
|
| Command | Behavior |
|
|
85
87
|
| --- | --- |
|
|
86
88
|
| `/help` | Show commands, keys, skills, and context paths. |
|
|
87
|
-
| `/new` | Create a
|
|
88
|
-
| `/exit` | Close this TUI.
|
|
89
|
-
| `/rewind` | Pick an earlier user message, remove it and everything after it, and
|
|
90
|
-
| `/diff [git diff args...]` | Open the
|
|
91
|
-
| `/compact
|
|
92
|
-
| `/compact-
|
|
93
|
-
| `/
|
|
94
|
-
| `/
|
|
95
|
-
| `/
|
|
96
|
-
| `/
|
|
89
|
+
| `/new` | Create a new session in the same execution environment, keeping the current persona, reasoning, and `repository` attribute. |
|
|
90
|
+
| `/exit` | Close this TUI. On a long-running remote host, this detaches; the session is not deleted. |
|
|
91
|
+
| `/rewind` | Pick an earlier user message, remove it and everything after it, and put its text back in the editor. |
|
|
92
|
+
| `/diff [git diff args...]` | Open the local diff review tool on a snapshot taken from the execution environment. |
|
|
93
|
+
| `/auto-compact [tokens\|default]` | Show the automatic-compaction threshold. Pass `50k` or `50000` to set it (minimum 50,000 tokens), or `default` to restore the model-based threshold. |
|
|
94
|
+
| `/compact-all [guidance]` | Replace the model's context with a generated summary. |
|
|
95
|
+
| `/compact-keep-last [guidance]` | Same, and include the last assistant response in the summary when there is one. |
|
|
96
|
+
| `/reload` | Reload session configuration and content from the execution environment. |
|
|
97
|
+
| `/listen [retry/discard]` | Record speech, or retry or discard a failed recording. macOS only. |
|
|
98
|
+
| `/speak` | Read the last assistant response aloud. macOS only. |
|
|
99
|
+
| `/auto-speak [on | off]` | Toggle automatic reading of final responses, or turn it on or off. |
|
|
97
100
|
| `/copy-text` | Copy the last assistant response as plain text. |
|
|
98
|
-
| `/copy-code` | Copy code blocks from the last assistant response. |
|
|
101
|
+
| `/copy-code` | Copy the code blocks from the last assistant response. |
|
|
99
102
|
| `/persona:<id>` | Switch persona while idle. |
|
|
100
|
-
| `/prompt:<id>` |
|
|
101
|
-
| `/theme:<id>` | Switch this TUI
|
|
103
|
+
| `/prompt:<id>` | Load a prompt from the execution environment into the editor without sending it. |
|
|
104
|
+
| `/theme:<id>` | Switch this TUI's theme until it exits. |
|
|
105
|
+
|
|
106
|
+
Run commands that change the context, such as persona changes, compaction, rewind, and reload, while idle. `/auto-compact` can inspect or change the next-turn threshold during a running turn. `/auto-speak`, `/listen`, `/prompt:<id>`, and `/exit` do little during a running turn. Other commands wait until Tau is idle.
|
|
102
107
|
|
|
103
|
-
|
|
108
|
+
The footer shows context usage as a percentage of the full model window, such as `20%/272k`. When an override is set, the effective compaction threshold appears in parentheses: `20%/272k (50k)`. This threshold cannot exceed the model's context window minus 16,384 tokens. With the default setting, the footer shows no threshold.
|
|
104
109
|
|
|
105
|
-
|
|
110
|
+
[Sessions](sessions.md) describes compaction, rewind, recovery, and retry. [Prompts and project context](prompts-and-project-context.md) covers prompt files.
|
|
106
111
|
|
|
107
112
|
## Keyboard shortcuts
|
|
108
113
|
|
|
@@ -110,80 +115,103 @@ Compaction, rewind, recovery, and retry are described in [sessions](sessions.md)
|
|
|
110
115
|
| --- | --- |
|
|
111
116
|
| Shift+Tab | Cycle reasoning effort. |
|
|
112
117
|
| Ctrl+P | Cycle persona while idle. |
|
|
113
|
-
| Ctrl+T |
|
|
114
|
-
| Ctrl+S | Copy the expanded editor contents to the
|
|
118
|
+
| Ctrl+T | Show or hide thinking in this TUI. |
|
|
119
|
+
| Ctrl+S | Copy the expanded editor contents to the clipboard, then clear the editor. |
|
|
115
120
|
| Ctrl+Y | Start or stop voice recording without submitting. |
|
|
116
|
-
| Enter | Steer
|
|
117
|
-
| Ctrl+Enter | Queue another turn, or submit
|
|
118
|
-
| Alt+Up | Cancel pending input and
|
|
119
|
-
| Alt+Down |
|
|
120
|
-
| Ctrl+G | Interrupt the selected
|
|
121
|
-
| Enter twice | Retry when the editor is empty and the session is idle. |
|
|
122
|
-
| Escape | Interrupt
|
|
123
|
-
| Escape twice | Clear the
|
|
121
|
+
| Enter | Steer a running turn, or submit while idle. |
|
|
122
|
+
| Ctrl+Enter | Queue another turn, or submit while idle. |
|
|
123
|
+
| Alt+Up | Cancel pending input and put it back in the editor. |
|
|
124
|
+
| Alt+Down | Select the next running subagent. |
|
|
125
|
+
| Ctrl+G | Interrupt the selected subagent. |
|
|
126
|
+
| Enter twice | Retry, when the editor is empty and the session is idle. |
|
|
127
|
+
| Escape | Interrupt local work or the session. |
|
|
128
|
+
| Escape twice | Clear the editor. |
|
|
124
129
|
| Ctrl+C twice | Exit the TUI. |
|
|
125
130
|
|
|
126
|
-
Ctrl+C
|
|
131
|
+
A single Ctrl+C asks for confirmation; it does not interrupt the assistant. Use Escape to interrupt.
|
|
127
132
|
|
|
128
|
-
## Run
|
|
133
|
+
## Run Bash commands directly
|
|
129
134
|
|
|
130
|
-
A leading `!` runs a fresh non-interactive login Bash in the
|
|
135
|
+
A leading `!` runs a command in a fresh non-interactive login Bash in the execution environment, without going through the model:
|
|
131
136
|
|
|
132
137
|
```text
|
|
133
138
|
!git status --short
|
|
134
139
|
```
|
|
135
140
|
|
|
136
|
-
The command and
|
|
141
|
+
The command and its output are added to the session, so the agent can use them later. A double `!!` runs the command without adding it to the model's context:
|
|
137
142
|
|
|
138
143
|
```text
|
|
139
144
|
!!git diff --stat
|
|
140
145
|
```
|
|
141
146
|
|
|
142
|
-
`!!`
|
|
147
|
+
Use `!!` for checks that should not use up context. Its card still appears in the current TUI, but the command and output are not saved in the conversation.
|
|
143
148
|
|
|
144
|
-
Direct commands require
|
|
149
|
+
Direct commands require an idle session. In an attached TUI, `!pwd` shows the execution environment's directory, not the attaching machine's. Command [client tools](client-tools.md) are different: they run on the client machine and can ask the session to run commands in the execution environment.
|
|
145
150
|
|
|
146
151
|
## Use themes
|
|
147
152
|
|
|
148
|
-
Themes belong to the TUI
|
|
153
|
+
Themes belong to the TUI and are never saved in the session. Tau's built-in themes adapt to the terminal's light or dark appearance.
|
|
149
154
|
|
|
150
|
-
Set the startup theme with `defaultTheme` in the
|
|
155
|
+
Set the startup theme with `defaultTheme` in the client's [configuration](configuration.md), or switch for the current run:
|
|
151
156
|
|
|
152
157
|
```text
|
|
153
158
|
/theme:gold
|
|
154
159
|
```
|
|
155
160
|
|
|
156
|
-
Theme
|
|
161
|
+
Theme IDs are exact and case-sensitive. `/theme` does not save the choice. Restart the TUI to apply a new `defaultTheme`. A remote host's theme setting does not affect attached clients.
|
|
157
162
|
|
|
158
163
|
## Review a diff
|
|
159
164
|
|
|
160
|
-
`/diff`
|
|
165
|
+
`/diff` takes a Git snapshot in the execution environment, then opens the built-in browser review tool on the TUI machine. Arguments are passed to `git diff`, for example:
|
|
161
166
|
|
|
162
167
|
```text
|
|
163
168
|
/diff --staged
|
|
164
169
|
```
|
|
165
170
|
|
|
166
|
-
|
|
171
|
+
`tau diff-tool` is the tool's own command, and `tau diff-tool --help` shows its help, but normal reviews start from `/diff`, which sets up its environment.
|
|
172
|
+
|
|
173
|
+
A snapshot's patch can be at most 16 MiB. Narrow the Git arguments 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.
|
|
174
|
+
|
|
175
|
+
The tool opens in **Guide** mode and starts preparing an orientation, focused topics, and likely reviewer questions as soon as the review context is ready. You can comment on the guide, ask for another topic or question, or switch to **Diff** mode for review threads on files and lines.
|
|
167
176
|
|
|
168
|
-
|
|
177
|
+
Guide comments and unresolved diff threads go into the returned Markdown, which stands on its own: it names the reviewed scope, gives change-level comments their context, and explains who took part in each discussion and in what role. **Submit** first opens a preview of the exact text to be returned, where you can exclude feedback and copy the full review before submitting. **Approve** returns right away when no feedback remains. If feedback appears while approval is being checked, the preview opens instead.
|
|
169
178
|
|
|
170
|
-
The session host
|
|
179
|
+
The session host provides temporary review agents, and the local tool runs the browser interface. The returned review is added to the session as a user message, but Tau does not start an assistant turn when the tool closes. Send a follow-up message when the review should lead to more work.
|
|
171
180
|
|
|
172
|
-
The TUI also
|
|
181
|
+
The TUI also offers diff review to the agent as a client tool, unless `--no-client-tools` is set. `/diff` works either way. See [client tools](client-tools.md) for what this means with several clients.
|
|
173
182
|
|
|
174
183
|
## Use speech
|
|
175
184
|
|
|
176
|
-
|
|
185
|
+
### Dictation
|
|
186
|
+
|
|
187
|
+
`/listen` and Ctrl+Y work only on macOS. Recording uses the local `ffmpeg` with AVFoundation audio input. It stops when you press Ctrl+Y again or after 9 minutes, which leaves time to finish within Gemini's 10-minute live session. Startup fails if the microphone gives no audio within 15 seconds.
|
|
188
|
+
|
|
189
|
+
- Enter or Ctrl+Enter while recording stops capture, finishes transcription, and submits the editor text. While a turn is running, Enter steers and Ctrl+Enter queues, as usual.
|
|
190
|
+
- Ctrl+Y, or reaching the time limit, finishes transcription and inserts the transcript at the cursor without submitting it.
|
|
191
|
+
|
|
192
|
+
The shortcut can be changed with [`speech.recordingShortcut`](config-reference.md#speech), including single-press or double-tap printable keys such as `§`. The editor hint shows the configured gesture. Starting a recording stops speech playback.
|
|
193
|
+
|
|
194
|
+
While you speak, Gemini shows a live preview in muted italics at the cursor. During pauses, Gemini finalizes segments of speech while recording continues. Tau keeps finalized segments and replaces only the current preview. After recording stops:
|
|
177
195
|
|
|
178
|
-
|
|
196
|
+
- Tau tells Gemini the audio has ended. It finishes right away if a finalized segment ends exactly at the end of the audio and generation is complete.
|
|
197
|
+
- Otherwise it keeps receiving results until two seconds pass with no updates. If new speech is detected after stopping, Tau signals the end of audio again to flush it.
|
|
198
|
+
- The final transcript comes from the live stream. Normal recordings are not uploaded again for a second transcription.
|
|
199
|
+
- Unfinished speech must be finalized before Tau accepts the result. Finalization has a 30-second deadline, and Escape cancels the wait.
|
|
179
200
|
|
|
180
|
-
|
|
201
|
+
The final transcript replaces the preview in normal text, without duplication. An empty transcript inserts nothing. Tau does not detect silence locally, and the end of one speech segment does not count as the end of the recording.
|
|
181
202
|
|
|
182
|
-
|
|
203
|
+
A submitted draft that contains dictation carries hidden guidance saying that some or all of the message may have been transcribed from speech and may contain errors. The guidance survives edits and is removed when the draft is emptied.
|
|
183
204
|
|
|
184
|
-
|
|
205
|
+
The editor is locked from the start of recording until finalization. Escape cancels voice input at any stage: startup, recording, microphone shutdown, transcription, or retry. Cancelling removes the preview at once, restores the original draft, and unlocks the editor without inserting or submitting anything. The cancelled recording is deleted once pending file work finishes. A failure also restores the original draft. A recording or retry cannot start while another editor update is pending.
|
|
185
206
|
|
|
186
|
-
|
|
207
|
+
For live transcription, GPT-6 Luna, with reasoning disabled, extracts spelling hints from the recent conversation while recording starts. Tau buffers audio until the transcription session is ready, then streams it. Gemini uses `gemini-3.5-transcribe-live` in verbatim mode with English (`en-US`) and Finnish (`fi-FI`) language hints. Missing OpenAI credentials or a failed hint extraction do not stop transcription.
|
|
208
|
+
|
|
209
|
+
If transcription fails, Tau keeps the local WAV file and reports its path:
|
|
210
|
+
|
|
211
|
+
- `/listen retry` transcribes the same audio again with Gemini and the current conversation context. Gemini uploads the file for `gemini-3.5-transcribe` verbatim transcription with the same language hints, and Tau tries to delete the uploaded file afterward. Recordings longer than 20 minutes are rejected instead of being sent.
|
|
212
|
+
- `/listen discard` deletes the file.
|
|
213
|
+
|
|
214
|
+
Tau keeps at most one failed recording. A new recording deletes it only once the new capture is producing audio. Exiting leaves the file at the reported path so you can recover it.
|
|
187
215
|
|
|
188
216
|
Install `ffmpeg`:
|
|
189
217
|
|
|
@@ -191,22 +219,41 @@ Install `ffmpeg`:
|
|
|
191
219
|
brew install ffmpeg
|
|
192
220
|
```
|
|
193
221
|
|
|
194
|
-
|
|
222
|
+
Transcription uses Gemini and needs `GEMINI_API_KEY` or `apiKeys.google`. The TUI process reads these credentials, also when attached to a remote host.
|
|
223
|
+
|
|
224
|
+
### Reading responses aloud
|
|
225
|
+
|
|
226
|
+
`/speak` also works only on macOS. It rewrites the last assistant response with GPT-6 Luna (reasoning disabled), streams Eleven v4 Turbo audio, and plays it at 1.15× speed through `ffplay`, which comes with `ffmpeg`.
|
|
227
|
+
|
|
228
|
+
- It needs `OPENAI_API_KEY` or `apiKeys.openai` for rewriting, and `ELEVENLABS_API_KEY` or `apiKeys.elevenlabs` for synthesis.
|
|
229
|
+
- It runs only while the session is idle. Escape stops it.
|
|
230
|
+
- Longer responses are split into balanced parts, each aiming for at most two minutes of speech.
|
|
231
|
+
- The source and rewritten text are limited to 10,000 Unicode characters, and generation stops after 32 MiB of raw audio.
|
|
232
|
+
- Voice lookups and synthesis requests have a two-minute deadline.
|
|
233
|
+
|
|
234
|
+
See [`speech` configuration](config-reference.md#speech) for the default Maisie and Caleb voices and for choosing your own.
|
|
235
|
+
|
|
236
|
+
`/auto-speak` toggles automatic reading of successful final answers, and briefly confirms the new mode. `/auto-speak on` and `/auto-speak off` set it explicitly, and turning it off also stops current playback.
|
|
195
237
|
|
|
196
|
-
|
|
238
|
+
- It starts off and applies only to the current session in this TUI, also when attached remotely. `/new` turns it off.
|
|
239
|
+
- It does not affect other clients or read earlier answers.
|
|
240
|
+
- Commentary, tool activity, and failed or interrupted answers are not read.
|
|
241
|
+
- Answers that arrive while recording or playing speech are not saved for later playback.
|
|
242
|
+
- Escape stops playback without turning the mode off.
|
|
243
|
+
- It uses the same voice, credentials, and rewriting as `/speak`. It never opens the microphone or submits dictation.
|
|
197
244
|
|
|
198
245
|
## Reload the right component
|
|
199
246
|
|
|
200
|
-
Run `/reload` while idle after changing
|
|
247
|
+
Run `/reload` while idle after changing configuration, personas, prompts, skills, or `AGENTS.md` content in the execution environment. The host reads them again from the session's working directory, keeps the current persona if it still exists, and otherwise selects the first available persona. Warnings appear in the transcript.
|
|
201
248
|
|
|
202
|
-
Restart the TUI instead after changing
|
|
249
|
+
Restart the TUI instead after changing themes, speech settings, or configured client tools. Codex auth storage is read again on every new request. Restart the host after changing its Tau version, environment variables, `apiKeys`, WebSocket listener, or hosted execution environment settings. [Credentials](credentials.md) and [remote sessions](remote-sessions.md) explain which process owns what.
|
|
203
250
|
|
|
204
251
|
## Common mistakes
|
|
205
252
|
|
|
206
|
-
- `!` and `!!` run in the execution environment, not on the attaching
|
|
253
|
+
- `!` and `!!` run in the execution environment, not on the attaching machine.
|
|
207
254
|
- Enter during a turn steers it. Use Ctrl+Enter to queue another turn.
|
|
208
|
-
- Ctrl+T changes
|
|
209
|
-
- `/prompt:<id>` fills the editor but does not
|
|
210
|
-
- `/diff`
|
|
255
|
+
- Ctrl+T changes only what is displayed. Use Shift+Tab to change reasoning effort.
|
|
256
|
+
- `/prompt:<id>` fills the editor but does not send it.
|
|
257
|
+
- `/diff` adds the returned review to the session but does not ask the assistant to act on it.
|
|
211
258
|
- `/reload` does not reload client themes or client tools.
|
|
212
|
-
- Exiting a WebSocket attachment does not delete
|
|
259
|
+
- Exiting a WebSocket attachment does not delete the session and does not necessarily stop it. Exiting a local TUI shuts down its host, so running work is interrupted and saved where possible.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent_supervisor.js","sourceRoot":"","sources":["../../../src/core/subagents/agent_supervisor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,YAAY,EAAwB,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAKhG,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAiB,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AAErF,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIlD,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,GAEf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,kCAAkC,EAAE,MAAM,aAAa,CAAC;AAWjE,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAgC/B,KAAK,UAAU,aAAa,CAAI,OAAmB,EAAE,MAAoB;IACvE,IAAI,CAAC,MAAM;QAAE,OAAO,MAAM,OAAO,CAAC;IAClC,MAAM,CAAC,cAAc,EAAE,CAAC;IACxB,OAAO,MAAM,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,KAAK,CAAC,IAAI,CAAC,KAAoB;QACrC,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;CACF"}
|
|
@@ -2,6 +2,7 @@ import { randomUUID } from "node:crypto";
|
|
|
2
2
|
import { basename, extname } from "node:path";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { TauSessionProtocolResponseError } from "../../transport/errors.js";
|
|
5
|
+
import { formatAutoCompactThreshold, parseAutoCompactThreshold } from "../commands/auto_compact.js";
|
|
5
6
|
import { formatAdaptiveNumber, formatTokenWindow } from "../utils/format.js";
|
|
6
7
|
import { createSpeechToTextTranscription, SPEECH_TO_TEXT_CLIENT_MAX_DURATION_MS, } from "../utils/speech_to_text.js";
|
|
7
8
|
import { collectSpeechToTextContext, } from "../utils/speech_to_text_context.js";
|
|
@@ -346,7 +347,10 @@ function formatTelegramContextUsage(snapshot) {
|
|
|
346
347
|
const usageTokens = getAssistantContextWindowUsage(lastAssistantMessage);
|
|
347
348
|
const windowTokens = getAssistantContextWindow(lastAssistantMessage) || snapshot.bootstrap.model.contextWindow;
|
|
348
349
|
const percent = windowTokens > 0 ? (usageTokens / windowTokens) * 100 : 0;
|
|
349
|
-
|
|
350
|
+
const threshold = snapshot.settings.autoCompactThresholdTokens === null
|
|
351
|
+
? ""
|
|
352
|
+
: ` (${formatTokenWindow(snapshot.settings.effectiveAutoCompactThresholdTokens)})`;
|
|
353
|
+
return `${formatAdaptiveNumber(percent, 1, 3)}% of ${formatTokenWindow(windowTokens)} tokens${threshold}`;
|
|
350
354
|
}
|
|
351
355
|
function getTelegramSessionCostTotal(snapshot) {
|
|
352
356
|
return snapshot.costTotal;
|
|
@@ -927,6 +931,11 @@ class TelegramAdapterImpl {
|
|
|
927
931
|
callbackAction: "interrupt",
|
|
928
932
|
handler: async (chatId) => this.handleInterrupt(chatId),
|
|
929
933
|
},
|
|
934
|
+
{
|
|
935
|
+
command: "/auto_compact",
|
|
936
|
+
description: "inspect or set the automatic compaction threshold",
|
|
937
|
+
handler: async (chatId, args) => this.handleAutoCompact(chatId, args),
|
|
938
|
+
},
|
|
930
939
|
{
|
|
931
940
|
command: "/tts_on",
|
|
932
941
|
description: "enable voice responses",
|
|
@@ -1745,6 +1754,27 @@ class TelegramAdapterImpl {
|
|
|
1745
1754
|
await this.reply(chatId, this.formatManagerError(error));
|
|
1746
1755
|
}
|
|
1747
1756
|
}
|
|
1757
|
+
async handleAutoCompact(chatId, args) {
|
|
1758
|
+
const session = await this.requireActiveSession(chatId);
|
|
1759
|
+
if (!session)
|
|
1760
|
+
return;
|
|
1761
|
+
try {
|
|
1762
|
+
const threshold = parseAutoCompactThreshold(args.join(" "));
|
|
1763
|
+
const manager = this.getSessionManagerForChat(chatId);
|
|
1764
|
+
const result = threshold === undefined
|
|
1765
|
+
? await manager.getSessionSnapshot(session.id)
|
|
1766
|
+
: await manager.setAutoCompactThreshold(session.id, threshold);
|
|
1767
|
+
if (!result)
|
|
1768
|
+
throw new TelegramSessionManagerError("not_ready", "session is still preparing");
|
|
1769
|
+
await this.reply(chatId, formatAutoCompactThreshold(result.settings) +
|
|
1770
|
+
(threshold === undefined
|
|
1771
|
+
? ""
|
|
1772
|
+
: " changes apply from the next turn; this does not start compaction."));
|
|
1773
|
+
}
|
|
1774
|
+
catch (error) {
|
|
1775
|
+
await this.reply(chatId, this.formatManagerError(error));
|
|
1776
|
+
}
|
|
1777
|
+
}
|
|
1748
1778
|
async handleNew(chatId, args, sourceMessageId) {
|
|
1749
1779
|
const parsed = this.resolveNewCommand(chatId, args);
|
|
1750
1780
|
if ("error" in parsed) {
|