@markusylisiurunen/tau 0.3.99 → 0.3.100
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/dist/core/code_mode/agents.js +2 -0
- package/dist/core/code_mode/agents.js.map +1 -1
- package/dist/core/code_mode/history.js +7 -0
- package/dist/core/code_mode/history.js.map +1 -1
- package/dist/core/code_mode/models.js.map +1 -1
- package/dist/core/code_mode/web.js.map +1 -1
- package/dist/core/config/content_loader.js.map +1 -1
- package/dist/core/config/index.js +2 -1
- package/dist/core/config/index.js.map +1 -1
- package/dist/core/config/ownership.js +71 -0
- package/dist/core/config/ownership.js.map +1 -0
- package/dist/core/config/runtime.js +22 -10
- package/dist/core/config/runtime.js.map +1 -1
- package/dist/core/config/runtime_config_snapshot.js +2 -2
- package/dist/core/config/runtime_config_snapshot.js.map +1 -1
- package/dist/core/config/schema.js +3 -2
- package/dist/core/config/schema.js.map +1 -1
- package/dist/core/history/agent_history_recorder.js +64 -0
- package/dist/core/history/agent_history_recorder.js.map +1 -0
- package/dist/core/history/cli.js +2 -2
- package/dist/core/history/cli.js.map +1 -1
- package/dist/core/history/config.js.map +1 -1
- package/dist/core/history/history_manager.js +14 -29
- package/dist/core/history/history_manager.js.map +1 -1
- package/dist/core/history/local_history_store.js +43 -10
- package/dist/core/history/local_history_store.js.map +1 -1
- package/dist/core/history/migrations.js +1 -1
- package/dist/core/history/migrations.js.map +1 -1
- package/dist/core/history/remote_history_client.js +2 -0
- package/dist/core/history/remote_history_client.js.map +1 -1
- package/dist/core/history/setup.js +10 -8
- package/dist/core/history/setup.js.map +1 -1
- package/dist/core/index.js +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/runtime/agent_model.js.map +1 -1
- package/dist/core/runtime/chat_runtime.js +1 -0
- package/dist/core/runtime/chat_runtime.js.map +1 -1
- package/dist/core/static/code_mode/history/documentation.md +22 -4
- package/dist/core/static/tau_docs/code-mode.md +1 -1
- package/dist/core/static/tau_docs/config-reference.md +22 -8
- package/dist/core/static/tau_docs/configuration.md +13 -2
- package/dist/core/static/tau_docs/credentials.md +1 -1
- package/dist/core/static/tau_docs/history.md +42 -2
- package/dist/core/static/tau_docs/models.md +1 -1
- package/dist/core/static/tau_docs/node-sdk.md +4 -4
- package/dist/core/static/tau_docs/ownership-and-scope.md +7 -5
- package/dist/core/static/tau_docs/personas.md +1 -1
- package/dist/core/static/tau_docs/remote-sessions.md +2 -1
- package/dist/core/static/tau_docs/security.md +11 -3
- package/dist/core/static/tau_docs/session-protocol-methods.md +1 -1
- package/dist/core/static/tau_docs/session-protocol.md +20 -10
- package/dist/core/static/tau_docs/sessions.md +2 -2
- package/dist/core/static/tau_docs/subagents.md +13 -13
- package/dist/core/static/tau_docs/telegram-projects.md +62 -4
- package/dist/core/static/tau_docs/telegram.md +9 -6
- package/dist/core/static/tau_docs/troubleshooting.md +5 -3
- package/dist/core/static/tau_docs/tui.md +23 -4
- package/dist/core/subagents/agent_supervisor.js +5 -1
- package/dist/core/subagents/agent_supervisor.js.map +1 -1
- package/dist/core/subagents/claude_code_runner.mjs +49 -49
- package/dist/core/subagents/native_subagent_runtime.js +6 -1
- package/dist/core/subagents/native_subagent_runtime.js.map +1 -1
- package/dist/core/subagents/runtime.js.map +1 -1
- package/dist/core/telegram/adapter.js +17 -20
- package/dist/core/telegram/adapter.js.map +1 -1
- package/dist/core/telegram/cli.js +24 -12
- package/dist/core/telegram/cli.js.map +1 -1
- package/dist/core/telegram/config.js +2 -0
- package/dist/core/telegram/config.js.map +1 -1
- package/dist/core/telegram/local_session_client.js +2 -2
- package/dist/core/telegram/local_session_client.js.map +1 -1
- package/dist/core/telegram/runtime.js +10 -1
- package/dist/core/telegram/runtime.js.map +1 -1
- package/dist/core/telegram/session_manager.js +12 -0
- package/dist/core/telegram/session_manager.js.map +1 -1
- package/dist/core/telegram/workspace.js +21 -0
- package/dist/core/telegram/workspace.js.map +1 -1
- package/dist/core/tools/catalog.js.map +1 -1
- package/dist/core/utils/model_notices.js.map +1 -1
- package/dist/core/utils/speech_to_text_keywords.js +10 -4
- package/dist/core/utils/speech_to_text_keywords.js.map +1 -1
- package/dist/core/version.js +2 -2
- package/dist/core/version.js.map +1 -1
- package/dist/diff_tool/app/dist/assets/{core-D8lOlLN2.js → core-3PFMkRLP.js} +1 -1
- package/dist/diff_tool/app/dist/assets/engine-oniguruma-C5P09Ghe.js +1 -0
- package/dist/diff_tool/app/dist/assets/{highlights-B80gocb2.js → highlights-Bi-VwGCO.js} +2 -2
- package/dist/diff_tool/app/dist/assets/index-DhaXI7F3.js +221 -0
- package/dist/diff_tool/app/dist/assets/langs-CDbZNx2R.js +1 -0
- package/dist/diff_tool/app/dist/assets/lib-BKZ5ZaMU.js +1 -0
- package/dist/diff_tool/app/dist/assets/shiki-BArE1NVK.js +2 -0
- package/dist/diff_tool/app/dist/assets/{stream-tokenizer-BkuDYA48.js → stream-tokenizer-DFTZfQ1S.js} +4 -4
- package/dist/diff_tool/app/dist/assets/{themes-BaMgiyFz.js → themes-Dzo-2cM5.js} +2 -2
- package/dist/diff_tool/app/dist/assets/wasm-4KdTHw0F.js +1 -0
- package/dist/diff_tool/app/dist/index.html +2 -2
- package/dist/history/worker/index.js +140 -15
- package/dist/history/worker/index.js.map +1 -1
- package/dist/history/worker/migrations/0002_parent_session.sql +3 -0
- package/dist/history/worker/viewer.css +10 -1
- package/dist/host/local_session_host.js +86 -62
- package/dist/host/local_session_host.js.map +1 -1
- package/dist/host/session_bootstrap.js +53 -0
- package/dist/host/session_bootstrap.js.map +1 -0
- package/dist/main.js +48 -95
- package/dist/main.js.map +1 -1
- package/dist/protocol/environment_variables.d.ts +2 -0
- package/dist/protocol/environment_variables.js +7 -0
- package/dist/protocol/environment_variables.js.map +1 -0
- package/dist/protocol/session_protocol.d.ts +9 -2
- package/dist/protocol/session_protocol.js +14 -7
- package/dist/protocol/session_protocol.js.map +1 -1
- package/dist/sdk/client.js +2 -2
- package/dist/sdk/client.js.map +1 -1
- package/dist/sdk/local_client.d.ts +2 -2
- package/dist/sdk/local_client.js +11 -66
- package/dist/sdk/local_client.js.map +1 -1
- package/dist/sdk/types.d.ts +4 -0
- package/dist/store/session_snapshot_migrations.js +19 -1
- package/dist/store/session_snapshot_migrations.js.map +1 -1
- package/dist/tui/chat_view.js +5 -0
- package/dist/tui/chat_view.js.map +1 -1
- package/dist/tui/host_diagnostic_relay.js +44 -0
- package/dist/tui/host_diagnostic_relay.js.map +1 -0
- package/dist/tui/index.js +1 -0
- package/dist/tui/index.js.map +1 -1
- package/dist/tui/listen_capture.js +7 -9
- package/dist/tui/listen_capture.js.map +1 -1
- package/dist/tui/session_chat_app.js +2 -2
- package/dist/tui/session_chat_app.js.map +1 -1
- package/dist/tui/session_chat_controller.js +89 -13
- package/dist/tui/session_chat_controller.js.map +1 -1
- package/dist/tui/terminal.js +13 -2
- package/dist/tui/terminal.js.map +1 -1
- package/package.json +9 -9
- package/dist/diff_tool/app/dist/assets/index-DSKn9aHV.js +0 -205
- package/dist/diff_tool/app/dist/assets/langs-Cb6u03GG.js +0 -1
- package/dist/diff_tool/app/dist/assets/lib-BFrBoEqQ.js +0 -9
- package/dist/diff_tool/app/dist/assets/shiki-DaptjTao.js +0 -2
- package/dist/diff_tool/app/dist/assets/wasm-BnjxR4X6.js +0 -1
|
@@ -16,7 +16,7 @@ The **host** creates, observes, persists, and recovers sessions. It owns model c
|
|
|
16
16
|
|
|
17
17
|
Session snapshots, authentication storage, usage logs, and the local history database live in the host user's home. Manage them with Tau commands and session operations. Do not edit their files directly.
|
|
18
18
|
|
|
19
|
-
MCP connections belong to the
|
|
19
|
+
MCP connections belong to the hosted session and end when the host unloads it. Stdio servers run on the host, with the host's credentials and access to the host's resources. They do not run in the session's execution environment. A session on a local execution environment reads its server definitions from the global and project configuration of its working directory. A session on a remote execution environment has no MCP servers.
|
|
20
20
|
|
|
21
21
|
The built-in `tau_docs` tool also belongs to the host. It reads the documentation installed with the host's Tau version.
|
|
22
22
|
|
|
@@ -54,6 +54,7 @@ A Fly Sprite puts the execution environment on another machine while the host st
|
|
|
54
54
|
| Agent `cwd`, home, repository, files, and commands | Execution environment | Use target paths in prompts, `session.create`, and agent tool calls. |
|
|
55
55
|
| `.tau/config.json`, personas, prompts, skills, and `AGENTS.md` used by a session | Execution environment | Edit them on the target and relative to the session `cwd`. |
|
|
56
56
|
| Global runtime content for a session | Execution-environment home | `~/.config/tau` is the target user's home when runtime content is collected. |
|
|
57
|
+
| MCP servers | Host, for local sessions | Define them in the session's project or global configuration. They run on the host with host credentials. Sessions on a remote execution environment have none. See [security](security.md#trust-mcp-servers). |
|
|
57
58
|
| Model and host-tool credentials | Host | Set environment secrets where the host process runs. API keys come from the host environment or private global host configuration. |
|
|
58
59
|
| Codex OAuth accounts | Host home | Run `tau auth …` on the host machine. Do not edit auth storage. |
|
|
59
60
|
| Session snapshots | Host home | Local defaults live under the host's Tau config directory. Do not edit session files. |
|
|
@@ -62,17 +63,18 @@ A Fly Sprite puts the execution environment on another machine while the host st
|
|
|
62
63
|
| `/diff` process | TUI client | Tau’s built-in browser tool runs on the client machine. Repository capture still runs through the session execution environment. |
|
|
63
64
|
| Configured command client tools | Owning client | Commands and their environment are on the client. File access they make on behalf of the session goes to the execution environment. |
|
|
64
65
|
| `/listen` and `/speak` capture or playback | TUI client | Required programs, devices, and media credentials belong on the client machine. |
|
|
66
|
+
| Speech vocabulary | Session, plus client global terms | Project terms come from the session's working directory. The transcribing client adds terms from its own global configuration. |
|
|
65
67
|
| Host execution-environment targets | Host startup | Fly Sprite connection settings must be in the host's configuration before it accepts sessions that use them. |
|
|
66
|
-
| Telegram bot token, routing, workspaces, and generated runner state | Telegram runner | Manage these through the Telegram config and runner commands, not project `config.json`. |
|
|
68
|
+
| Telegram bot token, bot environment, routing, workspaces, and generated runner state | Telegram runner | Manage these through the Telegram config and runner commands, not project `config.json`. |
|
|
67
69
|
|
|
68
70
|
## Decide where to edit configuration
|
|
69
71
|
|
|
70
72
|
Start from the behavior that consumes the setting:
|
|
71
73
|
|
|
72
|
-
1. If it changes what the agent sees or can do in the project, edit configuration or content in the execution environment's discovery path.
|
|
73
|
-
2. If it changes the TUI's theme, speech, or command client tools, edit the TUI client's configuration and restart that client.
|
|
74
|
+
1. If it changes what the agent sees or can do in the project, or the project's speech vocabulary, edit configuration or content in the execution environment's discovery path.
|
|
75
|
+
2. If it changes the TUI's theme, voice, recording shortcut, personal speech vocabulary, or command client tools, edit the TUI client's configuration and restart that client.
|
|
74
76
|
3. If it changes credentials, session storage, remote history, or hosted execution environment connections, set it for the host process and restart the host when required.
|
|
75
|
-
4. If it changes Telegram routing, bot startup settings, presets, or workspace preparation, edit the runner's `--config-file` on the runner machine.
|
|
77
|
+
4. If it changes Telegram routing, bot startup settings, bot environments, presets, or workspace preparation, edit the runner's `--config-file` on the runner machine.
|
|
76
78
|
|
|
77
79
|
For a local `tau` session these locations are often the same home and repository. Following the ownership rule anyway means the configuration still works when the session becomes remote.
|
|
78
80
|
|
|
@@ -115,7 +115,7 @@ The selectable tool names are:
|
|
|
115
115
|
|
|
116
116
|
Names such as `web`, `history`, `mcp`, and `models` enable capabilities inside the `code` tool, and `bash` also enables `tau.bash`. `agents` enables `tau.agents` inside `code` and the `wait_for_agents` tool. Tau builds the `code` tool from whichever of these capabilities are selected and usable.
|
|
117
117
|
|
|
118
|
-
A `tools` list replaces the defaults. Names are lowercased and duplicates removed. An unknown name makes the persona invalid. `tools: []` gives the persona none of these tools. The built-in `tau_docs` tool is always available, independent of this list. `mcp` works only when the
|
|
118
|
+
A `tools` list replaces the defaults. Names are lowercased and duplicates removed. An unknown name makes the persona invalid. `tools: []` gives the persona none of these tools. The built-in `tau_docs` tool is always available, independent of this list. `mcp` works only when the session has enabled MCP servers, which a session on a remote execution environment never has. [Tools](tools.md) explains eligibility and ownership.
|
|
119
119
|
|
|
120
120
|
## Selecting a persona
|
|
121
121
|
|
|
@@ -158,9 +158,10 @@ Each kind of change belongs to a different process:
|
|
|
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
|
+
| MCP server definitions | Start a new session, or reopen the session after the host has unloaded it. See [`mcpServers`](config-reference.md#mcpservers). |
|
|
161
162
|
| Global model `apiKeys` on the host | Restart the host. |
|
|
162
163
|
| Codex auth changed with `tau auth` | No restart needed; every new request reads auth storage again. |
|
|
163
|
-
| Attaching themes, speech
|
|
164
|
+
| Attaching themes, voice, recording shortcut, personal speech vocabulary, or configured client tools | Restart `tau attach`. |
|
|
164
165
|
| Host environment variables, history target, WebSocket listener, Fly Sprite connection, or host startup flags | Restart `tau serve`. |
|
|
165
166
|
| Host Tau package, built-in tools, protocol, session recovery code, or built-in documentation | Upgrade and restart the host. |
|
|
166
167
|
| TUI package, keybindings, rendering, local speech, or client-tool implementation | Upgrade and restart the attaching client. |
|
|
@@ -34,7 +34,7 @@ Trusting a repository therefore means trusting this content. Before using a repo
|
|
|
34
34
|
- `enabledClientTools`, which can turn on commands from your global configuration; and
|
|
35
35
|
- provision scripts or other repository automation used by integrations such as Telegram.
|
|
36
36
|
|
|
37
|
-
Project configuration cannot define client tool commands. It can only select commands defined in global configuration. A repository therefore cannot add a new
|
|
37
|
+
Project configuration cannot define client tool commands. It can only select commands defined in global configuration. A repository therefore cannot add a new client tool command to your machine, but a selected command can still do anything it was written to do. MCP servers follow different rules: [project configuration can define them](#trust-mcp-servers).
|
|
38
38
|
|
|
39
39
|
`--no-agent-context-files` turns off `AGENTS.md` loading and the list of nested `AGENTS.md` files. Project configuration, personas, skills, and tools still load. `--no-client-tools` turns off TUI client tools, not host tools. Neither flag is a general safe mode.
|
|
40
40
|
|
|
@@ -114,7 +114,11 @@ The `history` API is read-only, but it can see transcripts from every repository
|
|
|
114
114
|
|
|
115
115
|
## Trust MCP servers
|
|
116
116
|
|
|
117
|
-
MCP servers
|
|
117
|
+
A session on a local execution environment uses the MCP servers from the global and project configuration of its working directory, if its persona allows `mcp`. Its subagents use the same servers. Opening a session in a repository therefore lets that repository's `.tau/config.json` start commands on the host and use host credentials, with no approval step. This also applies to repositories that Telegram prepares and to directories that a WebSocket client chooses. Review a project's configuration before you open a session in it.
|
|
118
|
+
|
|
119
|
+
Anyone who can write a project's configuration can use this authority, including the agent. If the agent adds a server to `.tau/config.json`, that server becomes available the next time a session loads that configuration, for example after recovery. Tau removes secret-like variables from [Bash commands](#understand-environment-sanitization), but a stdio server inherits the full host environment. Definitions can also put any host environment variable into `env` or `headers` with `${NAME}`, and send it to the configured command or URL.
|
|
120
|
+
|
|
121
|
+
A session on a remote execution environment has no MCP servers, including servers configured on the host. Servers run on the host, so they could expose the host's files to a session that should see only its own machine, and neither the transport type nor a server's description shows whether they do. Configuration on the remote machine therefore cannot start commands on the host. The cost is that remote sessions also lose servers that only call an external service. This rule does not cover everything outside the remote machine: [Claude Code subagents](subagents.md#claude-code-subagents) use their own MCP configuration on that machine, and an attached client can still offer [command tools](client-tools.md) that run on the client's machine.
|
|
118
122
|
|
|
119
123
|
A stdio MCP server is trusted code on the host. It runs outside the code-mode sandbox with the host account's file and process permissions and its full environment, including credentials. Review the executable and arguments before configuring a server. HTTP servers receive the configured headers and the arguments sent to their tools. Use HTTPS for remote servers and give them only the access they need.
|
|
120
124
|
|
|
@@ -122,7 +126,7 @@ MCP has no confirmation step. Tools can change external systems or host resource
|
|
|
122
126
|
|
|
123
127
|
How a stdio server shuts down depends on the MCP transport. Child processes that ignore `SIGTERM` can outlive the server, so do not rely on shutdown to stop untrusted server processes.
|
|
124
128
|
|
|
125
|
-
|
|
129
|
+
A server that exposes host files or commands gives the agent that access. If that access is not acceptable, remove `mcp` from the persona or disable the server. Connections and credentials stay outside the model's JavaScript, but the server decides what its tools return.
|
|
126
130
|
|
|
127
131
|
## Protect remote session transports
|
|
128
132
|
|
|
@@ -148,12 +152,16 @@ Each bot's `allowedProjectIds` should list only the intended projects. Telegram
|
|
|
148
152
|
|
|
149
153
|
Repository and composite projects use managed workspaces and persistent bare repository caches. New or reconstructed repositories may run an executable `.tau/scripts/provision` in the background. Review that script like any other trusted project automation. Persistent-directory projects are never provisioned and never deleted by Tau.
|
|
150
154
|
|
|
155
|
+
A bot's `env` can select its own GitHub account and commit identity, but it does not isolate bots from each other. All bots run as the same operating-system user and share repository caches, so a command in one bot's session can read any credential store that user can read. Run separate runners under separate OS accounts when bots must be isolated. Tau saves `env` in each session, so it should hold paths to credential stores and no secrets. See [bot environments](telegram-projects.md#bot-environments).
|
|
156
|
+
|
|
151
157
|
Protect the runner configuration, session state, project-preference state, managed workspace root, and temporary attachment storage with a suitable OS account and file permissions. Never run two Telegram runners on the same state. Operational details are in [Telegram](telegram.md) and [Telegram projects and workspaces](telegram-projects.md).
|
|
152
158
|
|
|
153
159
|
## Know what history retains
|
|
154
160
|
|
|
155
161
|
Tau keeps a flat transcript history in the host user's home, separate from saved sessions. It contains user messages, intermediate system instructions, assistant text, and completed tool calls. The initial persona prompt is not included. Compaction does not remove entries. Rewind removes entries after the rewind point. Apart from that, entries stay; history is not a temporary cache.
|
|
156
162
|
|
|
163
|
+
History also records each native Tau subagent as its own session, whether or not any agent has the `history` tool. Rewinding the parent session does not remove these sessions, so a rewind can leave subagent transcripts in history that came from the removed work.
|
|
164
|
+
|
|
157
165
|
Without remote history, it stays in a SQLite database on the host. The `tau.history` capability can search all of it, within the persona's tools and the agent's usage rules. Protect the host account and database as you would the transcripts themselves.
|
|
158
166
|
|
|
159
167
|
With global `history` configuration, entries are still written to local SQLite first, and a persistent outbox copies them to the configured service in the background. Remote entries are limited in size, with large content truncated in the middle, but they can still contain source code, tool output, instructions, and personal data. The service also summarizes transcript content with its configured Cloudflare AI service.
|
|
@@ -423,7 +423,7 @@ result: {
|
|
|
423
423
|
}
|
|
424
424
|
```
|
|
425
425
|
|
|
426
|
-
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.
|
|
426
|
+
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. MCP server definitions also stay as they were when the host loaded the session. If the definitions on disk differ, `warnings` says so. See [configuration](configuration.md) for when changes apply.
|
|
427
427
|
|
|
428
428
|
### `session.compact`
|
|
429
429
|
|
|
@@ -18,7 +18,7 @@ The server sends `ready` as its first message:
|
|
|
18
18
|
|
|
19
19
|
```json
|
|
20
20
|
{
|
|
21
|
-
"version":
|
|
21
|
+
"version": 19,
|
|
22
22
|
"type": "ready",
|
|
23
23
|
"methods": ["initialize", "session.create", "session.list"]
|
|
24
24
|
}
|
|
@@ -30,7 +30,7 @@ After `ready`, send `initialize` with non-empty client metadata:
|
|
|
30
30
|
|
|
31
31
|
```json
|
|
32
32
|
{
|
|
33
|
-
"version":
|
|
33
|
+
"version": 19,
|
|
34
34
|
"type": "request",
|
|
35
35
|
"id": "init-1",
|
|
36
36
|
"method": "initialize",
|
|
@@ -50,7 +50,7 @@ Every request has the same envelope:
|
|
|
50
50
|
|
|
51
51
|
```json
|
|
52
52
|
{
|
|
53
|
-
"version":
|
|
53
|
+
"version": 19,
|
|
54
54
|
"type": "request",
|
|
55
55
|
"id": "req-42",
|
|
56
56
|
"method": "session.snapshot",
|
|
@@ -64,7 +64,7 @@ Successful responses echo the request id:
|
|
|
64
64
|
|
|
65
65
|
```json
|
|
66
66
|
{
|
|
67
|
-
"version":
|
|
67
|
+
"version": 19,
|
|
68
68
|
"type": "response",
|
|
69
69
|
"id": "req-42",
|
|
70
70
|
"ok": true,
|
|
@@ -101,7 +101,7 @@ Observing controls which updates you receive; it does not make you the owner. `s
|
|
|
101
101
|
| `lifecycle` | `idle` or `running`. |
|
|
102
102
|
| `agentState` | Independent agent revision, model context key, and optional usage checkpoint. |
|
|
103
103
|
| `settings`, `costTotal` | Persona, reasoning, and auto-compaction settings, and accumulated session cost. |
|
|
104
|
-
| `bootstrap`, `catalog` | Selected model and prompt metadata plus available personas, prompt metadata, skills,
|
|
104
|
+
| `bootstrap`, `catalog` | Selected model and prompt metadata plus available personas, prompt metadata, skills, MCP availability, and speech vocabulary. |
|
|
105
105
|
| `executionEnvironment` | The environment kind, identity, `cwd`, and home used for agent-visible work. |
|
|
106
106
|
| `messages`, `turns` | Messages sent to the model, and a saved record for each accepted turn. |
|
|
107
107
|
| `timeline` | Ordered active transcript placement. |
|
|
@@ -115,7 +115,17 @@ Both auto-compaction fields in `settings` are required:
|
|
|
115
115
|
|
|
116
116
|
`bootstrap.model.contextWindow` is the full model window, regardless of the compaction threshold.
|
|
117
117
|
|
|
118
|
-
`catalog.
|
|
118
|
+
`catalog.mcp` says whether the session can use MCP. A session on a local execution environment lists its enabled servers by name, and a session on a remote execution environment has none:
|
|
119
|
+
|
|
120
|
+
```ts
|
|
121
|
+
catalog.mcp:
|
|
122
|
+
| { status: "available"; servers: string[] }
|
|
123
|
+
| { status: "unavailable"; reason: "remote-execution" };
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
A listed server may not be connected yet, because servers connect on first use. Connection settings and credentials are never included. The host sets this field when it loads the session, and it stays the same until the host loads the session again.
|
|
127
|
+
|
|
128
|
+
`catalog.speechVocabulary` holds the session's merged [`speech.vocabulary`](config-reference.md#speech) terms. The list has at most 100 terms and at most 10,000 Unicode characters in total. Each term is trimmed and non-empty, has at most 100 Unicode characters, and contains no angle brackets or line breaks. Clients that transcribe speech use these terms for this session. The host resolves them again on load, reload, and persona changes.
|
|
119
129
|
|
|
120
130
|
`bootstrap.prompt.subagentSystemPrompt` is present when subagents can be started. Each catalog persona has a `subagentLaunchModels` allowlist. Subagent records have task titles and IDs; there are no worker types.
|
|
121
131
|
|
|
@@ -141,7 +151,7 @@ Observed snapshot changes arrive as `session.delta`:
|
|
|
141
151
|
|
|
142
152
|
```json
|
|
143
153
|
{
|
|
144
|
-
"version":
|
|
154
|
+
"version": 19,
|
|
145
155
|
"type": "session.delta",
|
|
146
156
|
"sessionId": "0195d6e4-4cf9-7f44-a2d8-f8f7f49ee9d3",
|
|
147
157
|
"fromRevision": 8,
|
|
@@ -179,7 +189,7 @@ Some live state is not part of the snapshot. Each of these channels has its own
|
|
|
179
189
|
|
|
180
190
|
```json
|
|
181
191
|
{
|
|
182
|
-
"version":
|
|
192
|
+
"version": 19,
|
|
183
193
|
"type": "session.pendingUserMessages",
|
|
184
194
|
"sessionId": "...",
|
|
185
195
|
"state": {
|
|
@@ -216,7 +226,7 @@ An initialized client that advertised a tool can receive:
|
|
|
216
226
|
|
|
217
227
|
```json
|
|
218
228
|
{
|
|
219
|
-
"version":
|
|
229
|
+
"version": 19,
|
|
220
230
|
"type": "session.clientTool.call",
|
|
221
231
|
"sessionId": "...",
|
|
222
232
|
"agentId": "main",
|
|
@@ -242,7 +252,7 @@ Error responses use `ok: false`:
|
|
|
242
252
|
|
|
243
253
|
```json
|
|
244
254
|
{
|
|
245
|
-
"version":
|
|
255
|
+
"version": 19,
|
|
246
256
|
"type": "response",
|
|
247
257
|
"id": "req-42",
|
|
248
258
|
"ok": false,
|
|
@@ -169,7 +169,7 @@ Compaction keeps searchable history, while rewind cuts it back to the rewind poi
|
|
|
169
169
|
|
|
170
170
|
Run `/reload` in the TUI while the session is idle. The host reads configuration, personas, prompts, skills, and `AGENTS.md` context again from the session's working directory. It keeps the current persona if its ID still exists, and otherwise selects the first available persona. Warnings appear in the transcript.
|
|
171
171
|
|
|
172
|
-
Reload affects later turns. It never changes the saved conversation or the execution environment. It does not reload anything owned by the client, such as themes,
|
|
172
|
+
Reload affects later turns. It never changes the saved conversation or the execution environment. It does not change the session's MCP servers, which stay as loaded; see [`mcpServers`](config-reference.md#mcpservers). It does not reload anything owned by the client, such as themes, voice, or client tools; restart the TUI for those. Codex auth storage is read again on every new request. Restart the host after changing its environment variables, `apiKeys`, listener settings, hosted environment settings, or the Tau version. [Credentials](credentials.md) and [remote sessions](remote-sessions.md) describe where each setting belongs.
|
|
173
173
|
|
|
174
174
|
Protocol clients can request changes directly, but should still wait for an idle session. Some changes interrupt running work and reject pending messages, so the session ends up with one consistent configuration.
|
|
175
175
|
|
|
@@ -180,7 +180,7 @@ Tau keeps two separate records for different purposes:
|
|
|
180
180
|
- The saved session is what Tau uses to continue one conversation. It contains the model's current context and the session state you see.
|
|
181
181
|
- Searchable history is a flat list of user messages, intermediate system instructions, assistant text, and finished tool calls, used to search and read across sessions. It is stored in the host's history database and can also be copied to a configured history service.
|
|
182
182
|
|
|
183
|
-
Compaction changes the saved session's model context but leaves searchable history as it was. Rewind cuts both back to the rewind point. History cannot rebuild a session and is never used to recover one. See [history](history.md) for storage, replication, and the history tool.
|
|
183
|
+
Compaction changes the saved session's model context but leaves searchable history as it was. Rewind cuts both back to the rewind point, but subagent sessions in history stay. History cannot rebuild a session and is never used to recover one. See [history](history.md) for storage, replication, and the history tool.
|
|
184
184
|
|
|
185
185
|
## Inspect model usage
|
|
186
186
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Subagents
|
|
2
2
|
|
|
3
|
-
Subagents are background agents that the main agent starts and the host supervises. They help when part of the work can run independently or benefits from a separate context. A subagent belongs to its parent session. It
|
|
3
|
+
Subagents are background agents that the main agent starts and the host supervises. They help when part of the work can run independently or benefits from a separate context. A subagent belongs to its parent session. It has no saved session of its own and no persona file.
|
|
4
4
|
|
|
5
5
|
## Background workers
|
|
6
6
|
|
|
@@ -14,7 +14,7 @@ Whether the agent can start subagents depends on the main persona's tool list. T
|
|
|
14
14
|
|
|
15
15
|
The main agent starts subagents only when the user or active instructions explicitly ask for delegation. Ask in ordinary language; no special tag is needed. The request itself does not create a subagent: the main agent still has to call `tau.agents.spawn`.
|
|
16
16
|
|
|
17
|
-
The agent follows this rule itself. Tau checks that a launch is valid, but it does not judge whether the request
|
|
17
|
+
The agent follows this rule itself. Tau checks that a launch is valid, but it does not judge whether the request asked for delegation.
|
|
18
18
|
|
|
19
19
|
## Tools
|
|
20
20
|
|
|
@@ -26,12 +26,12 @@ A native Tau subagent can receive these tools. [Claude Code subagents](#claude-c
|
|
|
26
26
|
- `view_image`
|
|
27
27
|
- `web`
|
|
28
28
|
- `history`
|
|
29
|
-
- `mcp`, when the
|
|
29
|
+
- `mcp`, when the session has enabled MCP servers
|
|
30
30
|
- `models`
|
|
31
31
|
|
|
32
|
-
A subagent gets each of these that the main persona also has. For example, a main persona with `bash`, `edit`, `history`, and `agents` gives its subagents `bash`, `edit`, and `history`. Names such as `web` and `history` enable the matching capability in the subagent's `code` tool. MCP uses the
|
|
32
|
+
A subagent gets each of these that the main persona also has. For example, a main persona with `bash`, `edit`, `history`, and `agents` gives its subagents `bash`, `edit`, and `history`. Names such as `web` and `history` enable the matching capability in the subagent's `code` tool. MCP uses the parent session's servers and connections, whatever the subagent's working directory. There is no separate tool list for subagents.
|
|
33
33
|
|
|
34
|
-
Every native Tau subagent also gets the built-in `tau_docs` tool, and a persona's `tools` list cannot remove it. Subagents never get `agents`: their `code` tool has no `tau.agents`, and they have no `wait_for_agents`.
|
|
34
|
+
Every native Tau subagent also gets the built-in `tau_docs` tool, and a persona's `tools` list cannot remove it. Subagents never get `agents`: their `code` tool has no `tau.agents`, and they have no `wait_for_agents`.
|
|
35
35
|
|
|
36
36
|
Subagents also never get [client tools](client-tools.md), such as the TUI's tools or a Telegram runner's file delivery tools. Only the main agent uses tools that attached clients offer. See [tools](tools.md) for how tool availability works in general.
|
|
37
37
|
|
|
@@ -114,7 +114,7 @@ Claude Code loads its user, project, and local settings and discovers its own in
|
|
|
114
114
|
| `edit` | Edit |
|
|
115
115
|
| `web` | WebSearch, WebFetch |
|
|
116
116
|
|
|
117
|
-
Workers receive no Tau `code` capabilities,
|
|
117
|
+
Workers receive no Tau `code` capabilities, Tau MCP connections, `tau_docs`, or client tools. Nested agents and interactive questions are disabled. Hooks and automatic memory are disabled too. Claude Code discovers its own MCP servers from its normal configuration sources, including project and user configuration on the execution environment. These connections are independent of the parent persona's `mcp` tool selection and of Tau's `mcpServers` setting, and Tau does not map or forward its own MCP connections. They run on the execution environment, so workers can use them even in a session on a remote execution environment, where Tau's own MCP is unavailable. Managed Claude Code policies still apply.
|
|
118
118
|
|
|
119
119
|
Selected tools use `bypassPermissions`, with Claude Code's sandbox disabled. They run with the execution environment's operating-system authority, like Tau's tools. Review the local Claude settings, skills, and MCP configuration before enabling these workers.
|
|
120
120
|
|
|
@@ -130,9 +130,7 @@ Claude workers share the eight-worker limit and the usual subagent lifetime. Int
|
|
|
130
130
|
|
|
131
131
|
`tau.agents.spawn` normally runs the subagent in the main session's `cwd`. The optional `workingDirectory` may be absolute or relative to that `cwd`. Tau resolves it to an absolute path on the execution environment.
|
|
132
132
|
|
|
133
|
-
For native Tau subagents, when that path differs from the parent's `cwd`, Tau rebuilds the subagent's context for the new directory. It detects the platform and repository there, reads the applicable `AGENTS.md` files, and discovers that directory's skills.
|
|
134
|
-
|
|
135
|
-
For native Tau subagents, the new directory does not change the persona, model catalog, runtime configuration, credentials, or tool policy. Those come from the parent session. Configuration in the new directory is read only where context needs it, such as for skill discovery.
|
|
133
|
+
For native Tau subagents, when that path differs from the parent's `cwd`, Tau rebuilds the subagent's context for the new directory. It detects the platform and repository there, reads the applicable `AGENTS.md` files, and discovers that directory's skills. The new directory does not change the persona, model catalog, runtime configuration, credentials, or tool policy. Those come from the parent session. Configuration in the new directory is read only where context needs it, such as for skill discovery.
|
|
136
134
|
|
|
137
135
|
`workingDirectory` is always a path on the execution environment, which matters in monorepos and hosted environments. The host and attached clients never resolve it against their own filesystems.
|
|
138
136
|
|
|
@@ -201,7 +199,7 @@ The response text of all requested subagents shares a budget of 8,192 estimated
|
|
|
201
199
|
|
|
202
200
|
Inside a program, `waitUntilIdle` waits for one subagent with the same meaning of idle and returns its state without the response. Neither wait returns until queued input has been handled too. Cancelling a wait, or stopping the program that waits, does not interrupt the subagent.
|
|
203
201
|
|
|
204
|
-
The host also sends
|
|
202
|
+
The host also sends attached clients a live summary of subagent activity for display. The subagent's messages and tool results are in its trace.
|
|
205
203
|
|
|
206
204
|
### Send more input
|
|
207
205
|
|
|
@@ -245,13 +243,15 @@ A failed call throws an error with a `code` and a `message`. The codes are `inva
|
|
|
245
243
|
|
|
246
244
|
## Detach, rewind, and recovery
|
|
247
245
|
|
|
248
|
-
Subagents belong to the running session on the host, not to an attached TUI. Detaching a client, or losing the connection, does not stop them while the session stays alive. Another client can attach
|
|
246
|
+
Subagents belong to the running session on the host, not to an attached TUI. Detaching a client, or losing the connection, does not stop them while the session stays alive. Another client can attach and see their current state.
|
|
249
247
|
|
|
250
248
|
Subagents do not survive the end of a session on the host or a host restart. Their status may be saved while the session is live, but recovery removes those records, because their runtimes no longer exist. A recovered session cannot send input to an old subagent ID.
|
|
251
249
|
|
|
252
250
|
Rewind also removes subagents that were started by an assistant message the rewind removed. A subagent started from a `code` program belongs to the assistant message that ran the program, including a program running as a background job. Host shutdown or session disposal interrupts and removes all subagents.
|
|
253
251
|
|
|
254
|
-
|
|
252
|
+
Tau records native subagents as child sessions in [history](history.md#native-subagent-sessions), even without the `history` tool. These sessions stay after a rewind, but history cannot restore the subagents. Claude Code is excluded.
|
|
253
|
+
|
|
254
|
+
Important results should reach the main agent and end up in the session history or in project files before the session on the host goes away. [Sessions](sessions.md) covers saving and recovery in general.
|
|
255
255
|
|
|
256
256
|
## Reloading and validation
|
|
257
257
|
|
|
@@ -259,6 +259,6 @@ Changes to persona tools or to the launch allowlist apply after `/reload` in an
|
|
|
259
259
|
|
|
260
260
|
`subagents.launchModels` must be an array of valid `<provider>/<model>:<effort>` strings. Unknown providers, invalid efforts, and malformed entries produce configuration warnings.
|
|
261
261
|
|
|
262
|
-
A launch can fail because of invalid arguments, a model outside the allowlist, the concurrency limit, a prompt that cannot be built, or a working directory whose context cannot be built. Calls with an unknown subagent ID fail.
|
|
262
|
+
A launch can fail because of invalid arguments, a model outside the allowlist, the concurrency limit, a prompt that cannot be built, or a working directory whose context cannot be built. Calls with an unknown subagent ID fail.
|
|
263
263
|
|
|
264
264
|
Before starting a local TUI, `tau --debug --persona <id>` shows which tools are available, the model and settings subagents inherit, and the subagents' tool list. In a running session, `/reload` reports file warnings and `tau.agents.list()` shows live subagent state.
|
|
@@ -32,7 +32,7 @@ A repository project clones one GitHub repository into a session-specific manage
|
|
|
32
32
|
}
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
`repo` must be a GitHub `owner/repo`; other Git URLs are not accepted. The runner needs `gh` and `git` on its login shell's `PATH`, and `gh` must already be signed in with access to the repository.
|
|
35
|
+
`repo` must be a GitHub `owner/repo`; other Git URLs are not accepted. The runner needs `gh` and `git` on its login shell's `PATH`, and `gh` must already be signed in with access to the repository. A bot can use its own sign-in through its [environment](#bot-environments).
|
|
36
36
|
|
|
37
37
|
All managed projects use the top-level `workspaceRoot`. A session workspace is:
|
|
38
38
|
|
|
@@ -104,7 +104,7 @@ Members are placed at `<composite-root>/<member-project-id>` and use each reposi
|
|
|
104
104
|
|
|
105
105
|
`subagents.launchModels` sets which models subagents may be started with. See [subagents](subagents.md) for the syntax and inheritance.
|
|
106
106
|
|
|
107
|
-
Configuration resolved at the composite root applies to the whole session, including the workspace's `defaultPersona`, subagents, model catalog, and
|
|
107
|
+
Configuration resolved at the composite root applies to the whole session, including the workspace's `defaultPersona`, subagents, model catalog, tools, MCP servers, and speech vocabulary. Members' `.tau/config.json` files are not merged. A subagent started in a member directory rebuilds only the context that depends on the directory: environment and repository details, the applicable `AGENTS.md`, and the skills found there.
|
|
108
108
|
|
|
109
109
|
If any member cannot be prepared, Tau removes the whole composite workspace. Composite workspaces and member caches use the top-level `workspaceRoot`.
|
|
110
110
|
|
|
@@ -116,6 +116,8 @@ If the expected workspace is missing, recovery reconstructs it from the caches a
|
|
|
116
116
|
|
|
117
117
|
## Managed workspace safety
|
|
118
118
|
|
|
119
|
+
A project's `.tau/config.json` can define [MCP servers](config-reference.md#mcpservers) that start commands on the runner machine with the runner's credentials, so [review what you prepare](security.md#trust-mcp-servers). A workspace outside the runner user's home does not inherit servers from global configuration.
|
|
120
|
+
|
|
119
121
|
**Important:** startup removes entries under managed workspace roots that no persisted session references. Dedicate these roots to Tau; never use a home directory, repository collection, or unrelated tree.
|
|
120
122
|
|
|
121
123
|
Tau preserves referenced managed workspaces, configured persistent directories, and repository caches. `/new` closes the active session before replacing it. Closing a repository or composite session interrupts work and removes its workspace; persistent directories remain untouched.
|
|
@@ -126,9 +128,63 @@ A repository can include `.tau/scripts/provision` at its root. It must be a regu
|
|
|
126
128
|
|
|
127
129
|
New and reconstructed workspaces run their hooks; preserved workspaces and persistent-directory projects do not. Composite sessions run member hooks in order and continue after failures. A failure is reported to linked chats but leaves the session usable. Keep hooks repeatable and non-interactive.
|
|
128
130
|
|
|
131
|
+
## Bot environments
|
|
132
|
+
|
|
133
|
+
Bots in one runner can use different environment variables, for example to give each bot its own GitHub account and commit identity. Set `bots.<id>.env` to a map of variable names to string values:
|
|
134
|
+
|
|
135
|
+
```json
|
|
136
|
+
"env": {
|
|
137
|
+
"GH_CONFIG_DIR": "/var/lib/assistant-github/gh",
|
|
138
|
+
"GIT_CONFIG_GLOBAL": "/var/lib/assistant-github/gitconfig",
|
|
139
|
+
"GH_TOKEN": "",
|
|
140
|
+
"GITHUB_TOKEN": ""
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Set up the files this example refers to as the runner's user:
|
|
145
|
+
|
|
146
|
+
1. Sign in to `gh` in that directory with `GH_CONFIG_DIR=/var/lib/assistant-github/gh gh auth login`.
|
|
147
|
+
2. Create the Git config file. Git uses it in place of the user's `~/.gitconfig`. Git HTTPS operations need the credential helper, and commits need the identity:
|
|
148
|
+
|
|
149
|
+
```ini
|
|
150
|
+
[credential "https://github.com"]
|
|
151
|
+
helper =
|
|
152
|
+
helper = !gh auth git-credential
|
|
153
|
+
[user]
|
|
154
|
+
name = Assistant
|
|
155
|
+
email = assistant@example.com
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
The empty tokens override any token in the runner's environment, which `gh` would otherwise use in place of the signed-in account.
|
|
159
|
+
|
|
160
|
+
The map applies in two places:
|
|
161
|
+
|
|
162
|
+
- **Workspace preparation.** The bot's repository clone and fetch commands run with the runner's environment plus the map. The map wins when both set a variable.
|
|
163
|
+
- **New sessions.** Session tools, provision hooks, and subagents run with the session's usual environment, which has inherited secret-like variables removed, plus the map.
|
|
164
|
+
|
|
165
|
+
The runner's own environment and other bots do not change. The map does not set model-provider credentials or configure client tools.
|
|
166
|
+
|
|
167
|
+
Names and values follow these rules:
|
|
168
|
+
|
|
169
|
+
- Names must match `[A-Za-z_][A-Za-z0-9_]*`.
|
|
170
|
+
- Values cannot contain NUL.
|
|
171
|
+
- `HOME` is not allowed, because the execution environment sets it.
|
|
172
|
+
- Values are literal. Tau does not expand `$HOME` or `~` and does not resolve relative paths, so use absolute paths for credential directories.
|
|
173
|
+
|
|
174
|
+
Tau saves the map in each session, so do not put tokens or other secrets in it. Use paths to separately protected credential stores instead. The map is not a security boundary. Bots still share the operating-system user's permissions and repository caches, and commands can override their own environment.
|
|
175
|
+
|
|
176
|
+
### Changing a bot's environment
|
|
177
|
+
|
|
178
|
+
Restart the runner after changing or removing `env`. New sessions use the new map. A saved session whose map differs fails recovery before it accepts turns, because it would otherwise continue under the old identity. This check does not change the session's files. A session resumes normally if its map is unchanged, and that includes an older session with no saved map if the bot has no `env`.
|
|
179
|
+
|
|
180
|
+
A session that failed this check has two ways forward:
|
|
181
|
+
|
|
182
|
+
- Restore the previous `env` and restart the runner. The session then resumes.
|
|
183
|
+
- Start a new session with `/new`. For a repository or composite project, this deletes the old workspace, so first save any unfinished work from it on the runner machine. Persistent-directory projects keep their files.
|
|
184
|
+
|
|
129
185
|
## Troubleshooting
|
|
130
186
|
|
|
131
|
-
**Repository preparation fails.** Check that the runner machine has `gh` signed in with access to the repository, `git`, and network access. Check `repo`, `ref`, the workspace root's permissions and free space, and that `workingDirectory` exists after checkout. Changing the repository of an existing project ID rebuilds its cache. Do not delete caches or workspaces first; keep the logs and fix access or configuration.
|
|
187
|
+
**Repository preparation fails.** Check that the runner machine has `gh` signed in with access to the repository, `git`, and network access. If the bot sets `env`, check the sign-in that its [environment](#bot-environments) selects. Check `repo`, `ref`, the workspace root's permissions and free space, and that `workingDirectory` exists after checkout. Changing the repository of an existing project ID rebuilds its cache. Do not delete caches or workspaces first; keep the logs and fix access or configuration.
|
|
132
188
|
|
|
133
189
|
**Startup removed unexpected files.** The workspace root was not dedicated to Tau. Stop the runner and move `workspaceRoot` to an empty directory of its own before restarting. Tau cannot restore unrelated files it deleted.
|
|
134
190
|
|
|
@@ -136,4 +192,6 @@ New and reconstructed workspaces run their hooks; preserved workspaces and persi
|
|
|
136
192
|
|
|
137
193
|
**A persistent-directory session fails recovery.** Recovery rejects a saved `cwd` that differs from the configured directory. Restore the directory at its original path, or set the project config back, or start a new session in the new directory. Tau does not move an existing session to a new directory.
|
|
138
194
|
|
|
139
|
-
**A
|
|
195
|
+
**A session fails recovery after a bot's `env` changes.** Recovery rejects a saved environment that differs from the bot's current `env`, and `/status` reports the failure. See [changing a bot's environment](#changing-a-bots-environment) for the ways forward.
|
|
196
|
+
|
|
197
|
+
**A recovered session does not match the current configuration.** Preserved workspaces are used as they are, and composite root files are not regenerated, so configuration changes apply only to new workspaces. Recovery also needs the same `workspaceRoot`, project definitions, bot `env`, host home, and Tau sessions. Check the runner logs and `/status`. Do not edit runner state, project preferences, saved sessions, or managed workspaces to force a match.
|
|
@@ -14,6 +14,8 @@ tau telegram --config-file /etc/tau/telegram.json
|
|
|
14
14
|
|
|
15
15
|
The process stays in the foreground until `SIGINT` or `SIGTERM`. Relative `--config-file` paths resolve from the process working directory. Paths inside that file resolve as described below, usually from the config file's directory.
|
|
16
16
|
|
|
17
|
+
Add `--check-config` to validate the file and exit without starting the runner. It does not check tokens, directories, or repository access.
|
|
18
|
+
|
|
17
19
|
The Telegram file is **not** one of Tau's `config.json` levels. It configures the runner: bot tokens, startup settings, presets, projects, workspace roots, and routing. Tau still loads normal configuration from the runner's startup directory and from each session's workspace. See [configuration](configuration.md) and [ownership and scope](ownership-and-scope.md).
|
|
18
20
|
|
|
19
21
|
Run at most one runner per configuration and workspace root. Two runners would compete for Telegram updates, runner state, and workspace cleanup.
|
|
@@ -68,6 +70,7 @@ Each `bots.<id>` object supports:
|
|
|
68
70
|
| Field | Required | Behavior |
|
|
69
71
|
| --- | --- | --- |
|
|
70
72
|
| `botToken` | Yes | Telegram Bot API token. |
|
|
73
|
+
| `env` | No | Environment variables for this bot's workspace preparation and new sessions. See [bot environments](telegram-projects.md#bot-environments). |
|
|
71
74
|
| `allowedProjectIds` | No | Non-empty unique subset of configured project IDs; omission exposes all projects. |
|
|
72
75
|
| `autoCompactThresholdTokens` | No | Default automatic-compaction threshold for this bot's sessions. See [compaction thresholds](#compaction-thresholds). |
|
|
73
76
|
| `startup` | Yes | `{ "source": "workspace" }` or `{ "source": "preset", "preset": "<key>" }`. See [startup and presets](#startup-and-presets). |
|
|
@@ -95,13 +98,13 @@ Each project tells the runner where a session works. There are three kinds:
|
|
|
95
98
|
- A **persistent-directory project** reuses one existing directory for all of its sessions.
|
|
96
99
|
- A **composite project** combines several repository projects in one workspace.
|
|
97
100
|
|
|
98
|
-
|
|
101
|
+
[Telegram projects and workspaces](telegram-projects.md) describes project fields, workspace preparation, provision hooks, and recovery.
|
|
99
102
|
|
|
100
103
|
**Important:** at startup, the runner deletes everything under its managed workspace roots that no saved session uses. Give Tau a dedicated `workspaceRoot`; never use a home directory, a collection of repositories, or any directory with other content.
|
|
101
104
|
|
|
102
105
|
## Normal Tau configuration inside workspaces
|
|
103
106
|
|
|
104
|
-
After preparation, Tau creates an ordinary local session in the workspace. It reads `~/.config/tau` and the `.tau` directories above the workspace as usual, so personas, prompts, skills, project context, host tools, and other settings work as in the TUI.
|
|
107
|
+
After preparation, Tau creates an ordinary local session in the workspace. It reads `~/.config/tau` and the `.tau` directories above the workspace as usual, so personas, prompts, skills, project context, host tools, [MCP servers](config-reference.md#mcpservers), and other settings work as in the TUI.
|
|
105
108
|
|
|
106
109
|
The bot's `startup` selects a new session's settings, as described in [startup and presets](#startup-and-presets).
|
|
107
110
|
|
|
@@ -213,7 +216,7 @@ In a DM, ordinary text goes to the active session. If none is selected but the c
|
|
|
213
216
|
|
|
214
217
|
In an allowed group, a message starts a turn only when it mentions the bot's username. Other text and captions are kept as background context, labeled with their sender. At the next mention, Tau includes up to the 50 most recent kept messages since the last turn, and clears them once the turn is submitted.
|
|
215
218
|
|
|
216
|
-
Group context can include attachment paths, audio transcripts, and processing errors. The model receives it as untrusted input.
|
|
219
|
+
Group context can include attachment paths, audio transcripts, and processing errors. The model receives it as untrusted input.
|
|
217
220
|
|
|
218
221
|
Text and transcribed audio either start or steer a turn. When the session is idle, the message starts a normal turn. When Tau is working, the message steers the running turn: the turn stops at its next safe point and continues with the new message. Further steering is batched as usual. Telegram has no command to queue a separate turn. Use `/interrupt` to stop instead of steering.
|
|
219
222
|
|
|
@@ -229,7 +232,7 @@ Sending a file only queues it, and its caption is kept as metadata. The next tex
|
|
|
229
232
|
|
|
230
233
|
Files are stored in the execution environment's temporary directory, so system cleanup can remove them. Queued files and group context are cleared on shutdown. Treat file contents and metadata as untrusted.
|
|
231
234
|
|
|
232
|
-
Voice transcription uses Gemini with `GEMINI_API_KEY`, or else `apiKeys.google`. Optional spelling hints use GPT-6 Luna (reasoning disabled) with OpenAI credentials. The
|
|
235
|
+
Voice transcription uses Gemini with `GEMINI_API_KEY`, or else `apiKeys.google`. Optional spelling hints use GPT-6 Luna (reasoning disabled) with OpenAI credentials. The session's [`speech.vocabulary`](config-reference.md#speech) terms, then the runner's global terms, precede extracted hints and work without OpenAI credentials or conversation context. Without a selected session, Tau does not download or transcribe audio. Transcription fails if the session is not ready. Gemini transcribes verbatim with `gemini-3.5-transcribe`, using English (`en-US`) and Finnish (`fi-FI`) hints, and Tau tries to delete the uploaded file afterward. Receiving files needs no Google key. See [credentials](credentials.md).
|
|
233
236
|
|
|
234
237
|
`/tts_on` rewrites text with `gpt-6-luna` (reasoning disabled) and generates speech with Eleven v4 Turbo. It requires both OpenAI and ElevenLabs credentials and runner `ffmpeg` with Opus. Voice notes use brisk delivery and 1.15× speed. See [`speech` configuration](config-reference.md#speech) for default and custom voice selection. Source and rewritten text are limited to 10,000 Unicode characters each, and audio to 32 MiB. Rewriting times out after one minute and the whole job after five. Jobs are not saved. On failure, the bot sends `voice response failed. please try again.`; the text reply is unaffected and details go to the logs.
|
|
235
238
|
|
|
@@ -253,7 +256,7 @@ If a failed session still has submitted work with an unknown result, Tau can rec
|
|
|
253
256
|
|
|
254
257
|
## Verify a runner safely
|
|
255
258
|
|
|
256
|
-
1.
|
|
259
|
+
1. Run `--check-config`, without showing the file in a shared terminal.
|
|
257
260
|
2. Confirm the runner user can execute `tau`, `git`, and `gh`, and that `gh` can access each repository.
|
|
258
261
|
3. Start the runner and watch for config, polling, command-sync, cache, checkout, and recovery errors. Successful startup prints `tau telegram running`.
|
|
259
262
|
4. In an allowed DM, run `/status`, select a project if needed, then run `/new`.
|
|
@@ -278,7 +281,7 @@ Do not verify bot tokens, provider keys, Access secrets, transcript contents, or
|
|
|
278
281
|
|
|
279
282
|
**Audio or an attachment fails.** The reply or runner log names the step that failed: download, saving, format, or transcription. Check that Telegram can deliver the file to the bot, the type is supported, the runner can write to its temporary directory, and Gemini accepts the media type. Transcription needs `GEMINI_API_KEY` or `apiKeys.google` for the runner process; restart the runner after setting it. Changing a workspace's environment does not affect the runner. Do not log media or transcripts to debug this.
|
|
280
283
|
|
|
281
|
-
**Voice replies fail.** `/tts_on` needs OpenAI and ElevenLabs credentials and `ffmpeg` with Opus on the runner. Check [`speech.voiceId`](config-reference.md#speech) if a configured voice is unavailable.
|
|
284
|
+
**Voice replies fail.** `/tts_on` needs OpenAI and ElevenLabs credentials and `ffmpeg` with Opus on the runner. Check [`speech.voiceId`](config-reference.md#speech) if a configured voice is unavailable.
|
|
282
285
|
|
|
283
286
|
**Replies or notifications arrive late or not at all.** Each outgoing message part has a deadline and is retried twice on retryable errors. Tau honors Telegram's `retry_after`, and later notifications in a chat wait for earlier ones. Long replies are split, so only a later part may have failed. The runner log shows the method, status, retry class, attempt, chat, session, and message. Fix network, rate-limit, token, or chat permission problems on the runner. Before resending by hand, check which parts arrived. A delivery failure is not a failed turn, and notifications about failed or blocked turns are sent again after a restart. Never fix delivery by editing runner state.
|
|
284
287
|
|
|
@@ -61,10 +61,11 @@ Run `tau --debug` from the intended directory for a new local startup. For a run
|
|
|
61
61
|
| Change | How to apply |
|
|
62
62
|
| --- | --- |
|
|
63
63
|
| Session configuration and content | `/reload` while idle |
|
|
64
|
-
|
|
|
64
|
+
| MCP server definitions | Start a new session, or reopen the session after the host has unloaded it |
|
|
65
|
+
| Theme, voice, recording shortcut, personal speech vocabulary, or TUI client tools | Restart `tau` or `tau attach` |
|
|
65
66
|
| Host environment, `apiKeys`, history, hosted environments, listener, or Tau version | Restart the host |
|
|
66
67
|
| Default persona or execution environment | Create a new session if it must change |
|
|
67
|
-
| Telegram config, routing, speech, or workspaces | Restart the runner |
|
|
68
|
+
| Telegram config, routing, voice, personal speech vocabulary, or workspaces | Restart the runner |
|
|
68
69
|
|
|
69
70
|
## `/reload` is unavailable, refused, or not enough
|
|
70
71
|
|
|
@@ -73,7 +74,8 @@ Run `tau --debug` from the intended directory for a new local startup. For a run
|
|
|
73
74
|
Reload updates configuration, personas, prompts, skills, `AGENTS.md` context, and host tools for later turns. It does not:
|
|
74
75
|
|
|
75
76
|
- change the execution environment, its `cwd`, or its home;
|
|
76
|
-
-
|
|
77
|
+
- change the session's MCP servers;
|
|
78
|
+
- reload an attached client's themes, voice, recording shortcut, personal speech vocabulary, or tools;
|
|
77
79
|
- read environment variables again in a running process;
|
|
78
80
|
- reload the host's history service or hosted environment settings;
|
|
79
81
|
- update Tau's code or built-in documentation; or
|
|
@@ -27,7 +27,9 @@ printf 'summarize the current changes' | tau
|
|
|
27
27
|
|
|
28
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 servers. MCP servers are shown as configured, not connected, because connections open on first use.
|
|
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. The MCP list comes from the session, also in attached sessions, and a session on a remote execution environment shows MCP as unavailable. Empty sections are left out.
|
|
31
|
+
|
|
32
|
+
In a local TUI, configuration problems found when the host loads a session appear in the transcript. An attached TUI shows them when you run `/reload`.
|
|
31
33
|
|
|
32
34
|
## Work in the editor
|
|
33
35
|
|
|
@@ -238,7 +240,7 @@ A submitted draft that contains dictation carries hidden guidance saying that so
|
|
|
238
240
|
|
|
239
241
|
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.
|
|
240
242
|
|
|
241
|
-
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.
|
|
243
|
+
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. The session's [`speech.vocabulary`](config-reference.md#speech) terms, followed by the terms in the TUI's own global configuration, take priority over extracted hints and remain available when extraction fails.
|
|
242
244
|
|
|
243
245
|
If transcription fails, Tau keeps the local WAV file and reports its path:
|
|
244
246
|
|
|
@@ -277,11 +279,28 @@ See [`speech` configuration](config-reference.md#speech) for the default Maisie
|
|
|
277
279
|
- Escape stops playback without turning the mode off.
|
|
278
280
|
- It uses the same voice, credentials, and rewriting as `/speak`. It never opens the microphone or submits dictation.
|
|
279
281
|
|
|
282
|
+
## See session status in your terminal
|
|
283
|
+
|
|
284
|
+
The TUI reports the session's status to the terminal through the [Program Status Protocol (OSC 7501)](https://www.superlogical.com/rex/docs/build/program-status). A terminal such as Rex can use these reports to show which of your sessions need attention. Local and attached sessions report in the same way, and the report always comes from the TUI on your machine.
|
|
285
|
+
|
|
286
|
+
| Status | Meaning |
|
|
287
|
+
| --------- | ----------------------------------------------------------- |
|
|
288
|
+
| `working` | A turn is running, including any tools it uses. |
|
|
289
|
+
| `done` | The last turn finished successfully. |
|
|
290
|
+
| `error` | The last turn failed or was blocked. |
|
|
291
|
+
| `idle` | The session is waiting for input, or you canceled the turn. |
|
|
292
|
+
|
|
293
|
+
`done` and `error` stay until the next turn starts. When you start the TUI, attach, or switch sessions, Tau reports only `working` or `idle`, so a turn that finished earlier appears as `idle`. Tau clears the status when you leave a session or exit.
|
|
294
|
+
|
|
295
|
+
Each report contains only the status and `app=tau`. It never includes messages or other session content, and nothing is sent when the TUI's output is not a terminal. Tau reports only the main session, and it does not use the protocol's `blocked` state, even while a diff review waits for you.
|
|
296
|
+
|
|
297
|
+
Terminals without support show nothing. Set `PI_PROGRAM_STATUS=0` on the TUI machine to turn reports off, or `PI_PROGRAM_STATUS=1` to send them without waiting for the terminal to confirm support.
|
|
298
|
+
|
|
280
299
|
## Reload the right component
|
|
281
300
|
|
|
282
|
-
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.
|
|
301
|
+
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. This also refreshes the session's speech vocabulary. MCP server definitions do not change on reload; a warning tells you when they differ, and [the configuration reference](config-reference.md#mcpservers) explains how to apply them.
|
|
283
302
|
|
|
284
|
-
Restart the TUI instead after changing themes, speech
|
|
303
|
+
Restart the TUI instead after changing themes, voice, recording shortcut, personal speech vocabulary, 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.
|
|
285
304
|
|
|
286
305
|
## Common mistakes
|
|
287
306
|
|