@markusylisiurunen/tau 0.3.102 → 0.3.104
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 +18 -23
- package/dist/code_mode/runtime.d.ts +6 -0
- package/dist/code_mode/runtime.js +2 -0
- package/dist/code_mode/runtime.js.map +1 -1
- package/dist/core/code_mode/sdk.js +4 -0
- package/dist/core/code_mode/sdk.js.map +1 -1
- package/dist/core/code_mode/web.js +5 -5
- package/dist/core/code_mode/web.js.map +1 -1
- package/dist/core/history/migrations.js +40 -0
- package/dist/core/history/migrations.js.map +1 -1
- package/dist/core/history/setup.js +24 -7
- package/dist/core/history/setup.js.map +1 -1
- package/dist/core/mcp/cli.js +1 -1
- package/dist/core/mcp/cli.js.map +1 -1
- package/dist/core/static/code_mode/sandbox_runner.mjs +19 -2
- package/dist/core/static/tau_docs/client-tools.md +46 -385
- package/dist/core/static/tau_docs/code-mode.md +114 -41
- package/dist/core/static/tau_docs/configuration.md +77 -171
- package/dist/core/static/tau_docs/getting-started.md +25 -96
- package/dist/core/static/tau_docs/history.md +30 -228
- package/dist/core/static/tau_docs/how-tau-works.md +53 -0
- package/dist/core/static/tau_docs/image-generation.md +15 -107
- package/dist/core/static/tau_docs/index.md +46 -46
- package/dist/core/static/tau_docs/instructions-and-skills.md +81 -0
- package/dist/core/static/tau_docs/manifest.json +15 -21
- package/dist/core/static/tau_docs/mcp.md +77 -0
- package/dist/core/static/tau_docs/models-and-credentials.md +67 -0
- package/dist/core/static/tau_docs/openrouter.md +31 -129
- package/dist/core/static/tau_docs/pdf-unpacking.md +8 -21
- package/dist/core/static/tau_docs/personas.md +48 -144
- package/dist/core/static/tau_docs/remote-sessions.md +33 -170
- package/dist/core/static/tau_docs/sdk.md +150 -0
- package/dist/core/static/tau_docs/security.md +6 -193
- package/dist/core/static/tau_docs/session-protocol.md +84 -246
- package/dist/core/static/tau_docs/sessions.md +41 -205
- package/dist/core/static/tau_docs/speech-generation.md +16 -129
- package/dist/core/static/tau_docs/subagents.md +57 -229
- package/dist/core/static/tau_docs/telegram.md +152 -192
- package/dist/core/static/tau_docs/tools.md +44 -167
- package/dist/core/static/tau_docs/troubleshooting.md +23 -217
- package/dist/core/static/tau_docs/tui.md +42 -282
- package/dist/core/telegram/adapter.js +4 -4
- package/dist/core/telegram/adapter.js.map +1 -1
- package/dist/core/telegram/runtime.js +3 -2
- package/dist/core/telegram/runtime.js.map +1 -1
- package/dist/core/tools/code.js +13 -12
- package/dist/core/tools/code.js.map +1 -1
- package/dist/core/tools/code_jobs.js.map +1 -1
- package/dist/core/tools/code_mode.js +4 -0
- package/dist/core/tools/code_mode.js.map +1 -1
- package/dist/core/tools/code_preloads.js +94 -0
- package/dist/core/tools/code_preloads.js.map +1 -0
- package/dist/core/version.js +1 -1
- package/dist/history/worker/index.js +16 -22
- package/dist/history/worker/index.js.map +1 -1
- package/dist/history/worker/migrations/0005_external_content.sql +58 -0
- package/dist/history/worker/migrations/0006_external_content_cutover.sql +44 -0
- package/dist/tui/session_chat_controller.js +21 -31
- package/dist/tui/session_chat_controller.js.map +1 -1
- package/dist/tui/ui/app_intro.js +45 -12
- package/dist/tui/ui/app_intro.js.map +1 -1
- package/package.json +4 -3
- package/dist/core/static/tau_docs/config-reference.md +0 -367
- package/dist/core/static/tau_docs/credentials.md +0 -165
- package/dist/core/static/tau_docs/models.md +0 -57
- package/dist/core/static/tau_docs/node-sdk.md +0 -430
- package/dist/core/static/tau_docs/ownership-and-scope.md +0 -107
- package/dist/core/static/tau_docs/prompts-and-project-context.md +0 -147
- package/dist/core/static/tau_docs/sdk-diff-review.md +0 -92
- package/dist/core/static/tau_docs/session-protocol-methods.md +0 -655
- package/dist/core/static/tau_docs/skills.md +0 -135
- package/dist/core/static/tau_docs/telegram-commands.md +0 -55
- package/dist/core/static/tau_docs/telegram-projects.md +0 -197
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
# Skills
|
|
2
|
-
|
|
3
|
-
A skill is a directory of instructions and supporting files that teaches an agent how to handle one kind of work. Tau finds skills on the execution environment and lists all of them for every persona. The agent opens a skill only when the task calls for it.
|
|
4
|
-
|
|
5
|
-
Skills differ from Tau's other content:
|
|
6
|
-
|
|
7
|
-
- A [prompt template](prompts-and-project-context.md) is text you insert into the input editor.
|
|
8
|
-
- A [persona](personas.md) chooses the model, system prompt, and tools for a session.
|
|
9
|
-
- `AGENTS.md` gives standing instructions for a directory tree.
|
|
10
|
-
- A skill is a reusable workflow that the agent loads only when it applies.
|
|
11
|
-
|
|
12
|
-
## Where Tau discovers skills
|
|
13
|
-
|
|
14
|
-
Tau looks for skill directories at global and project levels:
|
|
15
|
-
|
|
16
|
-
| Scope | Locations |
|
|
17
|
-
| --- | --- |
|
|
18
|
-
| Global | `~/.config/tau/skills/<name>/SKILL.md` and `~/.agents/skills/<name>/SKILL.md` |
|
|
19
|
-
| Project | `<level>/.tau/skills/<name>/SKILL.md` and `<level>/.agents/skills/<name>/SKILL.md` |
|
|
20
|
-
|
|
21
|
-
The global level applies only when the session's working directory is inside the execution environment's home directory. For project levels, Tau searches from the working directory up to home, or up to the filesystem root when the working directory is outside home. A directory counts as a project level when it contains `.tau/` or `.agents/skills/`.
|
|
22
|
-
|
|
23
|
-
Skills are identified by name. When two levels define the same name, the more specific one wins:
|
|
24
|
-
|
|
25
|
-
1. Global skills are the base layer.
|
|
26
|
-
2. Parent project levels override global and more distant parent levels.
|
|
27
|
-
3. The nearest project level wins.
|
|
28
|
-
4. At the same level, `.tau/skills/` overrides `.agents/skills/`.
|
|
29
|
-
|
|
30
|
-
For example, with a session in `~/code/atlas/apps/api`, these definitions of `release-check` resolve to the last one listed:
|
|
31
|
-
|
|
32
|
-
```text
|
|
33
|
-
~/.config/tau/skills/release-check/SKILL.md
|
|
34
|
-
~/code/atlas/.tau/skills/release-check/SKILL.md
|
|
35
|
-
~/code/atlas/apps/.agents/skills/release-check/SKILL.md
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
`~/.config/tau/skills/` also overrides `~/.agents/skills/` for a same-named global skill.
|
|
39
|
-
|
|
40
|
-
Discovery happens only on the execution environment. Skills on an attached client's machine are never used.
|
|
41
|
-
|
|
42
|
-
## The skill directory contract
|
|
43
|
-
|
|
44
|
-
Each skill is a directory that contains a file named exactly `SKILL.md`, in uppercase:
|
|
45
|
-
|
|
46
|
-
```text
|
|
47
|
-
.tau/skills/release-check/
|
|
48
|
-
├── SKILL.md
|
|
49
|
-
├── references/
|
|
50
|
-
│ └── environments.md
|
|
51
|
-
├── scripts/
|
|
52
|
-
│ └── verify.sh
|
|
53
|
-
└── assets/
|
|
54
|
-
└── checklist.txt
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
Only `SKILL.md` is required. `references/`, `scripts/`, and `assets/` are optional directories by convention; Tau does not treat them specially. The instructions in `SKILL.md` say when and how to use them. Paths in a skill are relative to the skill directory unless the skill says otherwise.
|
|
58
|
-
|
|
59
|
-
`SKILL.md` starts with YAML frontmatter followed by Markdown instructions:
|
|
60
|
-
|
|
61
|
-
```markdown
|
|
62
|
-
---
|
|
63
|
-
name: release-check
|
|
64
|
-
description: Verify a release candidate and summarize blockers. Trigger: explicit.
|
|
65
|
-
license: MIT
|
|
66
|
-
compatibility: Requires Git and npm.
|
|
67
|
-
metadata:
|
|
68
|
-
owner: platform
|
|
69
|
-
maturity: stable
|
|
70
|
-
allowed-tools: bash, view_image
|
|
71
|
-
---
|
|
72
|
-
|
|
73
|
-
Check the release branch, run the repository verification commands, and report only blocking failures.
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
The frontmatter fields are:
|
|
77
|
-
|
|
78
|
-
| Field | Requirement |
|
|
79
|
-
| --- | --- |
|
|
80
|
-
| `name` | Required. Between 1 and 64 characters, using lowercase letters, digits, and single dashes between segments. It must exactly match the containing directory name. |
|
|
81
|
-
| `description` | Required. A non-empty string of at most 1,024 characters. Tau includes it in the discovered skill index, so it should say what the skill does and when it applies. |
|
|
82
|
-
| `license` | Optional non-empty string. |
|
|
83
|
-
| `compatibility` | Optional non-empty string of at most 500 characters. |
|
|
84
|
-
| `metadata` | Optional map whose keys and values are strings. |
|
|
85
|
-
| `allowed-tools` | Optional non-empty string. Accepted so that skills written for other tools load, but Tau ignores it. |
|
|
86
|
-
|
|
87
|
-
Unknown frontmatter fields are ignored. `allowed-tools` does not enable, disable, or restrict any tool. Tools come from the active persona, and subagents inherit the eligible ones. See [tools](tools.md) and [subagents](subagents.md).
|
|
88
|
-
|
|
89
|
-
Keep the description short and useful, without the full workflow. Until a skill is activated, the agent sees only its name, description, and `SKILL.md` path. After activation the agent opens the file and reads only the referenced files the task needs.
|
|
90
|
-
|
|
91
|
-
## Skill availability
|
|
92
|
-
|
|
93
|
-
Every persona can use all discovered skills. A discovered skill does not run on every turn. The agent activates it according to its trigger sensitivity.
|
|
94
|
-
|
|
95
|
-
## Activation and trigger sensitivity
|
|
96
|
-
|
|
97
|
-
A skill declares trigger sensitivity in its `description`. The supported policy levels are:
|
|
98
|
-
|
|
99
|
-
- **eager**: activate proactively whenever the capability would help.
|
|
100
|
-
- **balanced**: activate when the request clearly matches the skill. This is the default when no trigger is stated.
|
|
101
|
-
- **explicit**: activate only when the skill is explicitly named by an active instruction.
|
|
102
|
-
|
|
103
|
-
Put a clear phrase such as `Trigger: eager.`, `Trigger: balanced.`, or `Trigger: explicit.` in the description. There is no separate frontmatter field; the agent reads the policy from the description.
|
|
104
|
-
|
|
105
|
-
An exact skill reference has this form:
|
|
106
|
-
|
|
107
|
-
```text
|
|
108
|
-
@@skill:release-check
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
A reference in the current user request, active `AGENTS.md` instructions, or an already-active skill explicitly activates that skill. Generic wording or a coincidental keyword does not activate an explicit skill.
|
|
112
|
-
|
|
113
|
-
A skill can activate another skill. If `release-check` tells the agent to use `@@skill:dependency-audit`, that second skill activates too. Each skill activates at most once per request, so repeated references and cycles do not open it again.
|
|
114
|
-
|
|
115
|
-
After activation, the agent reads `SKILL.md` from the listed path. It loads only the relevant files from `references/` or `assets/`, and uses the skill's scripts when they do what the workflow needs. The agent does not edit skills unless the user explicitly asks.
|
|
116
|
-
|
|
117
|
-
## Applying changes and checking discovery
|
|
118
|
-
|
|
119
|
-
A running session keeps its current skills and prompt context until it reloads. Run:
|
|
120
|
-
|
|
121
|
-
```text
|
|
122
|
-
/reload
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
Reload finds skills again and rebuilds the list the agent sees. Tau refuses to reload while a turn is running. If the active persona no longer exists, reload selects the first available persona. If no personas remain, reload fails.
|
|
126
|
-
|
|
127
|
-
For a new local session, `tau --debug` prints the discovered skills and the system prompt without starting the TUI. Add `--persona` to see the prompt for a specific persona:
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
tau --debug --persona release-coder
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
Invalid skills are skipped and reported as configuration warnings. Common causes are malformed YAML, frontmatter that is not an object, a missing required field, an invalid name, a name that differs from the directory name, or a file or skills directory that cannot be read. A subdirectory without `SKILL.md` is not a skill and produces no warning.
|
|
134
|
-
|
|
135
|
-
When a skill does not resolve as expected, first check the session's working directory on the execution environment. Discovery starts from that path, which may be on a different machine from the TUI. Broader configuration diagnostics are covered in [troubleshooting](troubleshooting.md).
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
# Telegram chat commands
|
|
2
|
-
|
|
3
|
-
Send these commands to a [Telegram](telegram.md) bot from a DM or an allowed group.
|
|
4
|
-
|
|
5
|
-
## Commands
|
|
6
|
-
|
|
7
|
-
| Command | Behavior |
|
|
8
|
-
| --- | --- |
|
|
9
|
-
| `/use_<projectId>` | Selects the project for future `/new` sessions. |
|
|
10
|
-
| `/new` | Replaces the active session using the preferred project. |
|
|
11
|
-
| `/status` | Reports session state, project, model, reasoning, context usage, and cost. |
|
|
12
|
-
| `/persona [value]` | [Applies a persona or preset](#choose-a-persona-effort-or-prompt) while idle, without losing history or starting a turn. |
|
|
13
|
-
| `/effort [value]` | [Selects a reasoning level](#choose-a-persona-effort-or-prompt) for future turns. |
|
|
14
|
-
| `/prompt [value]` | [Records a saved prompt](prompts-and-project-context.md#telegram-prompts) while idle, without starting a turn. |
|
|
15
|
-
| `/auto_compact [tokens\|default]` | Shows the automatic-compaction threshold. Pass `50k` or `50000` to set it (minimum 50,000 tokens), or `default` to remove the session override and use the default. |
|
|
16
|
-
| `/compact` | Runs summary-only compaction while idle. |
|
|
17
|
-
| `/interrupt` | Interrupts the active Tau turn. |
|
|
18
|
-
| `/tts_on` | Sends a voice note after each final assistant response. |
|
|
19
|
-
| `/tts_off` | Disables voice responses. |
|
|
20
|
-
|
|
21
|
-
Changes to the auto-compaction threshold apply from the next turn and survive session recovery. `/status` shows context usage as a percentage of the full model window. When a session override is set, or the default threshold is below the model-based threshold, it also shows the effective threshold in parentheses. See [compaction thresholds](telegram.md#compaction-thresholds) for bot defaults and [automatic compaction](sessions.md#automatic-compaction) for limits and costs.
|
|
22
|
-
|
|
23
|
-
A [persona](personas.md) or preset choice applies to the current session only. `/new` starts from the bot's [`startup`](telegram.md#startup-and-presets).
|
|
24
|
-
|
|
25
|
-
Preferences are saved per bot and chat, and survive restarts and new sessions. A project change applies at the next `/new`, not to the current session.
|
|
26
|
-
|
|
27
|
-
In groups, commands must explicitly mention the bot. Accepted forms include:
|
|
28
|
-
|
|
29
|
-
```text
|
|
30
|
-
/status@tau_engineering_bot
|
|
31
|
-
/status @tau_engineering_bot
|
|
32
|
-
@tau_engineering_bot /status
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
Commands addressed to other bots are ignored.
|
|
36
|
-
|
|
37
|
-
## Choose a persona, effort, or prompt
|
|
38
|
-
|
|
39
|
-
`/persona`, `/effort`, and `/prompt` work the same way. Send the command alone to choose from buttons, or add a value to apply a choice directly:
|
|
40
|
-
|
|
41
|
-
| Example | Value |
|
|
42
|
-
| --- | --- |
|
|
43
|
-
| `/persona deep review` | The preset's key when the bot has `presets`, and otherwise the persona ID. |
|
|
44
|
-
| `/effort low` | `low`, `medium`, `high`, or `xhigh`. |
|
|
45
|
-
| `/prompt release-summary` | The saved prompt's ID. |
|
|
46
|
-
|
|
47
|
-
A typed value and a button follow the same rules. `/persona` and `/prompt` need an idle session. `/effort` also works during a turn: the running turn keeps its effort, and the next turn uses the new one.
|
|
48
|
-
|
|
49
|
-
`/effort` accepts only the levels in the persona's `allowedReasoningLevels` when that list is non-empty, and it has no choices for a model without reasoning.
|
|
50
|
-
|
|
51
|
-
Typed values are case-sensitive. Buttons for personas and presets show labels, and a typed value does not match a label, so use the key or ID from your configuration. A value that matches nothing changes no settings, and the bot points you to the command's buttons.
|
|
52
|
-
|
|
53
|
-
Any run of whitespace counts as one space when a value is compared, both in what you type and in the key or ID. For example, `/persona deep review` selects the preset `deep review`. If two keys or IDs become identical this way, such as `deep review` and `deep review`, typing that value is rejected, and the buttons still offer both.
|
|
54
|
-
|
|
55
|
-
Only the newest set of buttons for a command works. Buttons expire after a choice is applied, when the session is replaced, or when the runner restarts.
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
# Telegram projects and workspaces
|
|
2
|
-
|
|
3
|
-
A Telegram runner starts every session in a project. The project decides which repository or directory the session works in, how its workspace is prepared, and what happens to the workspace when the session ends or the runner restarts. Projects are defined under `projects` in the runner's config file and offered to chats per bot, as described in [Telegram](telegram.md).
|
|
4
|
-
|
|
5
|
-
## Project IDs and common fields
|
|
6
|
-
|
|
7
|
-
Project IDs become `/use_<projectId>` command suffixes. They must contain only lowercase letters, digits, and underscores, and may be at most 28 characters:
|
|
8
|
-
|
|
9
|
-
```text
|
|
10
|
-
ledger
|
|
11
|
-
platform_api
|
|
12
|
-
release2026
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Every project can have an optional non-empty `description`. Projects do not select a persona. The bot does that through [startup and presets](telegram.md#startup-and-presets). Sessions load applicable `AGENTS.md` instructions.
|
|
16
|
-
|
|
17
|
-
Each project must define exactly one workspace source: `repo`, `directory`, or `projectIds`.
|
|
18
|
-
|
|
19
|
-
## Repository projects
|
|
20
|
-
|
|
21
|
-
A repository project clones one GitHub repository into a session-specific managed workspace:
|
|
22
|
-
|
|
23
|
-
```json
|
|
24
|
-
{
|
|
25
|
-
"projects": {
|
|
26
|
-
"ledger": {
|
|
27
|
-
"repo": "acme/ledger",
|
|
28
|
-
"ref": "main",
|
|
29
|
-
"workingDirectory": "packages/api"
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
```
|
|
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. A bot can use its own sign-in through its [environment](#bot-environments).
|
|
36
|
-
|
|
37
|
-
All managed projects use the top-level `workspaceRoot`. A session workspace is:
|
|
38
|
-
|
|
39
|
-
```text
|
|
40
|
-
<effective-workspace-root>/<project-id>/<telegram-session-id>
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
`workingDirectory` is optional and must be a relative directory inside the clone. Tau validates that it exists and does not escape the repository, then uses it as the session `cwd`. Without it, the repository root is the `cwd`.
|
|
44
|
-
|
|
45
|
-
`ref` is optional and is passed to `git checkout` after cloning. Without it, the clone's default branch remains checked out. Configure a ref when sessions must begin from a predictable branch or commit.
|
|
46
|
-
|
|
47
|
-
### Repository caches
|
|
48
|
-
|
|
49
|
-
Tau keeps a persistent bare cache at:
|
|
50
|
-
|
|
51
|
-
```text
|
|
52
|
-
<effective-workspace-root>-repo-cache/<project-id>.git
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
The first preparation uses `gh repo clone <owner/repo> <cache> -- --bare`. Later preparations fetch and prune the cache, then create the session workspace with a shared local clone. If the repository configured for the same project ID changes, Tau discards and recreates that cache.
|
|
56
|
-
|
|
57
|
-
Sessions never work in the cache directly.
|
|
58
|
-
|
|
59
|
-
## Persistent-directory projects
|
|
60
|
-
|
|
61
|
-
A persistent-directory project reuses one existing directory instead of creating a managed clone:
|
|
62
|
-
|
|
63
|
-
```json
|
|
64
|
-
{
|
|
65
|
-
"projects": {
|
|
66
|
-
"notes": {
|
|
67
|
-
"directory": "/srv/tau/notes"
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
Relative `directory` paths resolve from the Telegram config file's directory. JSON does not expand `~`, so use an absolute path when referring to a home directory.
|
|
74
|
-
|
|
75
|
-
The directory must already exist. Tau never creates, replaces, provisions, or removes it. `/new`, session close, runner shutdown, and startup cleanup all preserve it.
|
|
76
|
-
|
|
77
|
-
Every session of this project works in the same directory, including sessions from different chats or bots, and Tau does not stop them from editing at the same time. If the directory cannot handle that, use `maxSessions`, per-bot projects, and allowlists to prevent it.
|
|
78
|
-
|
|
79
|
-
Persistent-directory sessions have no `repository` attribute. On recovery, the configured directory must match the one saved in the session. Changing `directory` does not move existing sessions; their recovery fails instead.
|
|
80
|
-
|
|
81
|
-
## Composite projects
|
|
82
|
-
|
|
83
|
-
A composite project creates a root containing multiple repositories:
|
|
84
|
-
|
|
85
|
-
```json
|
|
86
|
-
{
|
|
87
|
-
"projects": {
|
|
88
|
-
"web": { "repo": "acme/web", "ref": "main" },
|
|
89
|
-
"api": { "repo": "acme/api", "workingDirectory": "services/http" },
|
|
90
|
-
"platform": {
|
|
91
|
-
"projectIds": ["web", "api"],
|
|
92
|
-
"instructions": "Keep shared contracts synchronized.",
|
|
93
|
-
"subagents": {
|
|
94
|
-
"launchModels": ["openai/gpt-6.1-sol:high"]
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
`projectIds` requires at least two unique repository projects; directories and composites are invalid members. Order controls workspace context and history `repository`.
|
|
102
|
-
|
|
103
|
-
Members are placed at `<composite-root>/<member-project-id>` and use each repository's cache, ref, and working directory. The root is the session's `cwd`. When the workspace is created, Tau writes a root `AGENTS.md` that lists the members and any `instructions`, and a root `.tau/config.json` containing `subagents` or `{}`. These are ordinary workspace files. They do not follow later Telegram configuration changes and are not rewritten when a preserved session reconnects.
|
|
104
|
-
|
|
105
|
-
`subagents.launchModels` sets which models subagents may be started with. See [subagents](subagents.md) for the syntax and inheritance.
|
|
106
|
-
|
|
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
|
-
|
|
109
|
-
If any member cannot be prepared, Tau removes the whole composite workspace. Composite workspaces and member caches use the top-level `workspaceRoot`.
|
|
110
|
-
|
|
111
|
-
## Managed workspace lifecycle
|
|
112
|
-
|
|
113
|
-
Repository and composite projects work the same way. Tau prepares one workspace per session, and the session keeps working there. A normal runner restart reconnects without fetching or checking out repositories, running provision hooks, or rewriting generated files. Changes to workspace preparation in the Telegram config affect only workspaces prepared later.
|
|
114
|
-
|
|
115
|
-
If the expected workspace is missing, recovery reconstructs it from the caches and current project configuration. `/new` and session close remove a managed workspace; normal shutdown preserves it. Tau does not commit, push, or save uncommitted changes elsewhere.
|
|
116
|
-
|
|
117
|
-
## Managed workspace safety
|
|
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
|
-
|
|
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.
|
|
122
|
-
|
|
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.
|
|
124
|
-
|
|
125
|
-
## Provision hooks
|
|
126
|
-
|
|
127
|
-
A repository can include `.tau/scripts/provision` at its root. It must be a regular executable file, not a symlink, and start with a shebang. Tau runs it in the session's working directory once the session is available, without blocking chat input.
|
|
128
|
-
|
|
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.
|
|
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
|
-
|
|
185
|
-
## Troubleshooting
|
|
186
|
-
|
|
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.
|
|
188
|
-
|
|
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.
|
|
190
|
-
|
|
191
|
-
**Provisioning fails but chat still works.** This is intended: a provisioning failure does not break the session. Fix the executable bit, shebang, script, or dependencies. Then run the script by hand if it supports that, or start a new session to provision again.
|
|
192
|
-
|
|
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.
|
|
194
|
-
|
|
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.
|