@markusylisiurunen/tau 0.3.102 → 0.3.103

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.
Files changed (50) hide show
  1. package/README.md +18 -23
  2. package/dist/core/history/migrations.js +40 -0
  3. package/dist/core/history/migrations.js.map +1 -1
  4. package/dist/core/history/setup.js +24 -7
  5. package/dist/core/history/setup.js.map +1 -1
  6. package/dist/core/mcp/cli.js +1 -1
  7. package/dist/core/mcp/cli.js.map +1 -1
  8. package/dist/core/static/tau_docs/client-tools.md +46 -385
  9. package/dist/core/static/tau_docs/code-mode.md +104 -43
  10. package/dist/core/static/tau_docs/configuration.md +77 -171
  11. package/dist/core/static/tau_docs/getting-started.md +25 -96
  12. package/dist/core/static/tau_docs/history.md +30 -228
  13. package/dist/core/static/tau_docs/how-tau-works.md +53 -0
  14. package/dist/core/static/tau_docs/image-generation.md +15 -107
  15. package/dist/core/static/tau_docs/index.md +46 -46
  16. package/dist/core/static/tau_docs/instructions-and-skills.md +81 -0
  17. package/dist/core/static/tau_docs/manifest.json +15 -21
  18. package/dist/core/static/tau_docs/mcp.md +77 -0
  19. package/dist/core/static/tau_docs/models-and-credentials.md +67 -0
  20. package/dist/core/static/tau_docs/openrouter.md +31 -129
  21. package/dist/core/static/tau_docs/pdf-unpacking.md +8 -21
  22. package/dist/core/static/tau_docs/personas.md +48 -144
  23. package/dist/core/static/tau_docs/remote-sessions.md +33 -170
  24. package/dist/core/static/tau_docs/sdk.md +150 -0
  25. package/dist/core/static/tau_docs/security.md +6 -193
  26. package/dist/core/static/tau_docs/session-protocol.md +84 -246
  27. package/dist/core/static/tau_docs/sessions.md +41 -205
  28. package/dist/core/static/tau_docs/speech-generation.md +16 -129
  29. package/dist/core/static/tau_docs/subagents.md +57 -229
  30. package/dist/core/static/tau_docs/telegram.md +152 -192
  31. package/dist/core/static/tau_docs/tools.md +44 -167
  32. package/dist/core/static/tau_docs/troubleshooting.md +23 -217
  33. package/dist/core/static/tau_docs/tui.md +42 -282
  34. package/dist/core/version.js +1 -1
  35. package/dist/history/worker/index.js +16 -22
  36. package/dist/history/worker/index.js.map +1 -1
  37. package/dist/history/worker/migrations/0005_external_content.sql +58 -0
  38. package/dist/history/worker/migrations/0006_external_content_cutover.sql +44 -0
  39. package/package.json +2 -2
  40. package/dist/core/static/tau_docs/config-reference.md +0 -367
  41. package/dist/core/static/tau_docs/credentials.md +0 -165
  42. package/dist/core/static/tau_docs/models.md +0 -57
  43. package/dist/core/static/tau_docs/node-sdk.md +0 -430
  44. package/dist/core/static/tau_docs/ownership-and-scope.md +0 -107
  45. package/dist/core/static/tau_docs/prompts-and-project-context.md +0 -147
  46. package/dist/core/static/tau_docs/sdk-diff-review.md +0 -92
  47. package/dist/core/static/tau_docs/session-protocol-methods.md +0 -655
  48. package/dist/core/static/tau_docs/skills.md +0 -135
  49. package/dist/core/static/tau_docs/telegram-commands.md +0 -55
  50. package/dist/core/static/tau_docs/telegram-projects.md +0 -197
@@ -1,55 +1,26 @@
1
1
  # Image generation
2
2
 
3
- `tau tool image-generate` generates one image from a prompt and optional ordered local references using Google or OpenAI.
4
-
5
- ```bash
6
- tau tool image-generate --help
7
- tau tool image-generate \
8
- --model gpt-image-2.6-flare \
9
- --prompt 'A quiet lakeside sauna at dusk, editorial photograph, no text' \
10
- --size 1536x1024 --quality medium --output ./sauna.png
11
- ```
3
+ `tau tool image-generate` generates one image from a prompt and optional reference images. `tau tool image-generate --help` lists every flag.
12
4
 
13
5
  ## Credentials and requirements
14
6
 
15
- Requires an OpenAI or Google API key for the selected model. See [feature-specific credentials](credentials.md#feature-specific-keys) for setup.
16
-
17
- ## Models and capabilities
18
-
19
- `--model` is required; there is no default. Start with `gpt-image-2.6-flare` at `--quality medium` for everyday generation and editing, balancing quality and cost.
20
-
21
- For demanding generation and editing where image quality is the priority, choose `gemini-nano-banana-2.1` or `gpt-image-2.6-sunburst`. Nano Banana supports very wide aspect ratios and resolution tiers up to `4K`. Sunburst supports exact dimensions, transparent backgrounds, and PNG/JPEG/WebP output. See [approximate cost](#approximate-cost) before choosing settings.
22
-
23
- Choose size, resolution, and aspect ratio for the intended use; no single size fits everything. The sizes in the examples are for those particular cases. Options you leave out use the provider's defaults, except `--format`, which defaults to `png`. Unsupported options fail before anything is generated.
24
-
25
- | Model | Resolution | Aspect ratios | Thinking | Other controls |
26
- | --- | --- | --- | --- | --- |
27
- | `gemini-nano-banana-2.1` | `1K`, `2K`, `4K` | Standard and wide | `minimal`, `medium`, `high` | PNG |
28
- | `gpt-image-2.6-flare` | Exact `--size` | Through dimensions | Not exposed | Quality, complexity, background, encoding, compression |
29
- | `gpt-image-2.6-sunburst` | Exact `--size` | Through dimensions | Not exposed | Quality, complexity, background, encoding, compression |
30
-
31
- Google's defaults are `1K` resolution and `medium` thinking. Use `--thinking minimal` for faster generation and lower thinking-token usage.
7
+ OpenAI models need `OPENAI_API_KEY` or `apiKeys.openai`. Google models need `GEMINI_API_KEY` or `apiKeys.google`.
32
8
 
33
- Standard `--aspect-ratio` values are `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, `21:9`. Wide values additionally include `1:4`, `4:1`, `1:8`, `8:1`. Resolution tiers describe approximate output size.
9
+ ## Models
34
10
 
35
- OpenAI controls:
11
+ `--model` is required. Start with `gpt-image-2.6-flare` at `--quality medium`. For the best quality, use one of the others.
36
12
 
37
- - `--size auto` or `WIDTHxHEIGHT`: both dimensions must be multiples of 16, neither above 3840, aspect ratio between 1:3 and 3:1, and total pixels between 655,360 and 8,294,400. Above 2560×1440 total pixels is experimental at the provider.
38
- - `--quality auto|low|medium|high|xhigh|max`: rendering quality. Flare favors speed; Sunburst favors demanding editing and quality.
39
- - `--complexity low|medium|high`: planning effort, separate from rendering quality. Omit it to use the provider default, `high`. Start with `low` for focused edits; use `medium` or `high` for dense text, complex layouts, or many constraints. Higher complexity can increase latency and introduce unwanted changes.
40
- - `--background auto|opaque|transparent`: `transparent` requires PNG or WebP.
41
- - `--format png|jpeg|webp`: the output extension must match (`.jpg` or `.jpeg` for JPEG).
42
- - `--compression 0..100`: an integer, only with JPEG or WebP.
13
+ | Model | Size control | Notes |
14
+ | --- | --- | --- |
15
+ | `gpt-image-2.6-flare` | `--size WIDTHxHEIGHT` | Fast. Transparency, PNG, JPEG, and WebP. |
16
+ | `gpt-image-2.6-sunburst` | `--size WIDTHxHEIGHT` | Demanding edits. Same options as Flare. |
17
+ | `gemini-nano-banana-2.1` | `--aspect-ratio`, `--resolution 1K\|2K\|4K` | Very wide ratios, PNG only, no transparency. |
43
18
 
44
- Gemini does not support transparent-background generation ([Google documentation](https://ai.google.dev/gemini-api/docs/generate-content/image-generation#stylized_illustrations_and_stickers)). For transparent assets, use an OpenAI model with `--background transparent --format png` or `webp` ([OpenAI documentation](https://developers.openai.com/api/docs/guides/image-generation#size-and-quality-options)).
19
+ OpenAI sizes must be multiples of 16, at most 3840 per side, with an aspect ratio between 1:3 and 3:1. `--quality` goes from `low` to `max`. `--complexity low` suits focused edits, and `medium` or `high` suit dense text and layouts.
45
20
 
46
21
  ## Input and examples
47
22
 
48
- Give exactly one of `--prompt` and `--prompt-file` (UTF-8). Repeat `--reference` for each local PNG, JPEG, or WebP reference image. References are sent in order and unchanged. With references, OpenAI requests use the edit endpoint.
49
-
50
- Up to 16 references are accepted for OpenAI and 14 for Gemini. Each reference is limited to 50 MB. Gemini's complete serialized request is limited to 19 MB, including the prompt, base64-encoded references, and JSON escaping.
51
-
52
- Create an asset:
23
+ Give `--prompt` or `--prompt-file`. Repeat `--reference` for each local PNG, JPEG, or WebP image. Each run is independent, so an edit sees only what you pass.
53
24
 
54
25
  ```bash
55
26
  tau tool image-generate \
@@ -57,85 +28,22 @@ tau tool image-generate \
57
28
  --prompt 'A friendly otter mascot, isolated, no lettering' \
58
29
  --size 1024x1024 --quality medium --background transparent \
59
30
  --output ./otter.png
60
- ```
61
31
 
62
- Edit an existing image:
63
-
64
- ```bash
65
32
  tau tool image-generate \
66
33
  --model gpt-image-2.6-flare --reference ./otter.png \
67
- --prompt 'Give the otter a blue scarf. Preserve its face, pose, proportions, and transparent background.' \
34
+ --prompt 'Give the otter a blue scarf. Preserve its face, pose, and background.' \
68
35
  --quality high --complexity low --background transparent --output ./otter-scarf.png
69
- ```
70
-
71
- Generate at a higher resolution using a reference:
72
36
 
73
- ```bash
74
37
  tau tool image-generate \
75
38
  --model gemini-nano-banana-2.1 --reference ./sauna.png \
76
- --prompt 'Recreate this image at higher resolution. Preserve composition and colors; refine fine detail.' \
39
+ --prompt 'Recreate this image at higher resolution. Preserve composition and colors.' \
77
40
  --aspect-ratio 16:9 --resolution 4K --output ./sauna-4k.png
78
41
  ```
79
42
 
80
- Generate inexpensive draft variants:
81
-
82
- ```bash
83
- for i in 1 2 3 4; do
84
- tau tool image-generate --model gpt-image-2.6-flare \
85
- --size 1024x1024 --quality low \
86
- --prompt-file ./prompt.txt --output "./variant-$i.png" || break
87
- done
88
- ```
89
-
90
- Each run is independent; an edit sees only the prompt and references you give it.
91
-
92
43
  ## Outputs and recovery
93
44
 
94
- The output's parent directory must exist. Neither the output nor `<output>.parts` may already exist. On success, stdout is one JSON object with absolute `output` and `artifacts` paths and provider `usage` (or `null`). The `.parts` directory contains:
95
-
96
- - `original.bin`: the provider's original image bytes.
97
- - `image.<format>`: the published image. Gemini responses are converted to PNG when needed; OpenAI bytes are saved as returned.
98
- - `manifest.json`: model, output path, usage, and `source` with the original filename and provider-declared MIME type (`null` when absent).
99
-
100
- The original bytes and usage are kept even if conversion fails. Conversion may drop embedded metadata, so use the original when provenance matters.
101
-
102
- Failures exit nonzero and name the invalid option or the step that failed. If the output or `.parts` path already exists, choose a new `--output` path, and keep the existing files in case you need them. Once generation has started, errors give the path of the kept directory, which may be empty or incomplete. If only the final copy to `--output` fails, the error points to the finished image, so copy it to a new path instead of generating again. Requests are never retried automatically, because a failed request may already have been charged, and a new request may be charged again.
45
+ The output and `<output>.parts` must not exist yet. Stdout is one JSON object with `output`, `artifacts`, and `usage`. The `.parts` directory keeps the original image and a manifest, so if only the final copy fails, copy the finished image instead of generating again. Requests are never retried, because a failed request may already have been charged.
103
46
 
104
47
  ## Approximate cost
105
48
 
106
- For OpenAI models, start at `--quality medium`, use `low` for inexpensive exploration, and increase quality when the result needs it. Explicit `--size` and `--quality` make budgeting more predictable than `auto`. For Nano Banana, account for resolution and thinking usage as well as input costs.
107
-
108
- ### OpenAI: cost per image
109
-
110
- Both `gpt-image-2.6-flare` and `gpt-image-2.6-sunburst` charge $30 per million image-output tokens. Text input costs $5 per million tokens and reference images cost $8 per million image-input tokens.
111
-
112
- OpenAI gives one estimate for both models. These are its approximate USD image-output costs per image, excluding input:
113
-
114
- | Size | `low` | `medium` | `high` | `xhigh` | `max` |
115
- | ----------- | ------ | -------- | ------ | ------- | ------ |
116
- | `1024x1024` | $0.025 | $0.043 | $0.053 | $0.094 | $0.211 |
117
- | `1536x1024` | $0.020 | $0.034 | $0.041 | $0.074 | $0.165 |
118
- | `2048x2048` | $0.050 | $0.088 | $0.107 | $0.190 | $0.428 |
119
- | `3840x2160` | $0.047 | $0.086 | $0.100 | $0.178 | $0.400 |
120
-
121
- Quality has the largest effect. At `1024x1024`, `high` costs about twice as much as `low`, and `max` costs about 8.5 times as much. For example, 100 images cost about $2.47 at `low`, $4.35 at `medium`, $5.27 at `high`, or $21.07 at `max`.
122
-
123
- Cost does not follow pixel count alone. `1536x1024` costs less than `1024x1024` because the estimate also depends on aspect ratio, and `2048x2048` has four times the pixels of `1024x1024` but costs about twice as much.
124
-
125
- Input adds to these costs. For example, 1,000 text-input tokens and 2,000 image-input tokens add $0.021.
126
-
127
- Actual cost can differ from these estimates because OpenAI notes that the two models can use different token counts at the same quality. The estimates do not vary with `--complexity`. The manifest records provider `usage` for checking actual consumption. For other sizes, OpenAI's guide includes an [interactive calculator](https://developers.openai.com/api/docs/guides/image-generation#calculating-costs).
128
-
129
- ### Google: cost per image
130
-
131
- Approximate USD image-output costs from [Google pricing](https://ai.google.dev/gemini-api/docs/pricing), excluding input and text/thinking usage:
132
-
133
- | Model | 1K | 2K | 4K |
134
- | ------------------------ | ------- | ------- | ------ |
135
- | `gemini-nano-banana-2.1` | $0.0336 | $0.0504 | $0.113 |
136
-
137
- Input costs $1.50 per million tokens. Text and thinking output cost $7.50 per million tokens, in addition to image output. The manifest records provider-reported usage.
138
-
139
- Use OpenAI when transparent backgrounds or JPEG/WebP output are required. Compare the quality needed for the task, not just matching tier names across providers. Check [OpenAI pricing](https://developers.openai.com/api/docs/guides/image-generation#gpt-image-26-costs) and Google pricing for current rates before large batches.
140
-
141
- See [command-line tools](tools.md) for the other tools and where commands run.
49
+ For OpenAI models at `1024x1024`, one image costs about $0.025 at `low`, $0.043 at `medium`, $0.053 at `high`, and $0.211 at `max`, plus input. `gemini-nano-banana-2.1` costs about $0.034 at 1K, $0.050 at 2K, and $0.113 at 4K, plus input and thinking. Check provider pricing before large batches.
@@ -1,48 +1,48 @@
1
1
  # Tau documentation
2
2
 
3
- These pages describe how to install, configure, operate, and integrate the version of Tau they ship with. Tau's agent reads the same pages through its built-in documentation tool, one page at a time.
4
-
5
- ## Start and orient
6
-
7
- - [Getting started](getting-started.md): install Tau, set up a provider, and run a first local session.
8
- - [Ownership and scope](ownership-and-scope.md): which machine runs what in local and remote sessions. Read it before changing paths or remote-session configuration.
9
- - [TUI](tui.md): interactive commands, keybindings, themes, speech, and other terminal behavior.
10
- - [Troubleshooting](troubleshooting.md): checks for common startup, configuration, provider, tool, and remote-session problems.
11
-
12
- ## Configure Tau
13
-
14
- - [Configuration](configuration.md): where configuration lives, which layer wins, how to edit safely, and when changes apply.
15
- - [Configuration reference](config-reference.md): every top-level `config.json` field and when a change takes effect.
16
- - [Credentials](credentials.md): API keys, Codex OAuth accounts, key precedence, and where credentials belong.
17
- - [Models](models.md): the bundled model catalog and how it is refreshed.
18
- - [Personas](personas.md): model, instructions, reasoning, tools, and custom persona files.
19
- - [Subagents](subagents.md): when agents can start subagents, which models they may use, and how to supervise them.
20
- - [Skills](skills.md): skill discovery, frontmatter, trigger sensitivity, and tool eligibility.
21
- - [Prompts and project context](prompts-and-project-context.md): prompt templates, `AGENTS.md`, and extra context files.
22
- - [Client tools](client-tools.md): command-backed tools that run on the machine of the attached client.
23
- - [Security](security.md): trust boundaries, secrets, process execution, and remote access.
24
-
25
- ## Build integrations
26
-
27
- - [Session protocol](session-protocol.md): transports, message envelopes, session state, deltas, errors, and rules for clients.
28
- - [Session protocol method reference](session-protocol-methods.md): every request method and its result.
29
- - [Node SDK](node-sdk.md): choosing a client, the session API, streamed state, client tools, cancellation, and exported types.
30
- - [SDK browser diff review](sdk-diff-review.md): hosting the built-in review UI from an SDK application.
31
-
32
- ## Work with sessions and services
33
-
34
- - [Tools](tools.md): built-in tools, when they are available, and how they run and stop.
35
- - [Code mode](code-mode.md): the `code` tool, saved programs and input, output and limits, background code jobs, and capabilities.
36
- - [Sessions](sessions.md): creating sessions, turns, queueing, compaction, rewind, recovery, and storage.
37
- - [Remote sessions](remote-sessions.md): `serve`, `attach`, remote paths, and authentication.
38
- - [History](history.md): searchable local history, optional remote replication, and the history tool.
39
- - [Telegram](telegram.md): running the Telegram runner, bot access, attachments, and recovery.
40
- - [Telegram chat commands](telegram-commands.md): commands for projects, sessions, personas, effort, prompts, and compaction, and how to use them in groups.
41
- - [Telegram projects and workspaces](telegram-projects.md): repository, persistent-directory, and composite projects, workspace lifecycle, and provision hooks.
42
-
43
- ## Run command-line tools
44
-
45
- - [PDF unpacking](pdf-unpacking.md): OCR PDFs with Mistral into Markdown and page images.
46
- - [Image generation](image-generation.md): generate and edit images with Google and OpenAI.
47
- - [Speech generation](speech-generation.md): narration and dialogue with ElevenLabs voices, assembled into long WAV files.
48
- - [OpenRouter](openrouter.md): typed decisions and text, image, audio, and video understanding with fixed models.
3
+ This is the manual for the Tau version it ships with, for people and agents who use, operate, or integrate Tau. It covers what you need to get work done. For implementation details, read the [source](https://github.com/markusylisiurunen/tau).
4
+
5
+ ## Start
6
+
7
+ - [Getting started](getting-started.md): install Tau and run a first session.
8
+ - [How Tau works](how-tau-works.md): client, host, and execution environment, and what runs where.
9
+
10
+ ## Use Tau
11
+
12
+ - [TUI](tui.md): the commands and keys worth knowing.
13
+ - [Sessions](sessions.md): turns, compaction, rewind, reload, recovery, and usage.
14
+ - [Troubleshooting](troubleshooting.md): how to find out why something does not apply.
15
+
16
+ ## Set up the agent
17
+
18
+ - [Configuration](configuration.md): `config.json` fields, levels, and when changes apply.
19
+ - [Models and credentials](models-and-credentials.md): API keys, Codex accounts, and the model catalog.
20
+ - [Personas](personas.md): model, prompt, reasoning, and tools.
21
+ - [Instructions and skills](instructions-and-skills.md): `AGENTS.md`, prompt templates, and skills.
22
+
23
+ ## Extend what the agent can do
24
+
25
+ - [Tools](tools.md): built-in tools, background jobs, and command-line tools.
26
+ - [Code mode](code-mode.md): programs that combine tools in one call, with examples.
27
+ - [MCP](mcp.md): connect MCP servers.
28
+ - [Subagents](subagents.md): background workers, including Claude Code.
29
+ - [Client tools](client-tools.md): tools that run in the attached client.
30
+
31
+ ## Run Tau as a service
32
+
33
+ - [Remote sessions](remote-sessions.md): `tau serve`, `tau attach`, and Fly Sprites.
34
+ - [Telegram](telegram.md): bots, projects, workspaces, and chat use.
35
+ - [History](history.md): transcript search and the optional shared service.
36
+ - [Security](security.md): what Tau does and does not protect against.
37
+
38
+ ## Integrate
39
+
40
+ - [Node SDK](sdk.md): create and control sessions from Node.
41
+ - [Session protocol](session-protocol.md): the WebSocket protocol and its methods.
42
+
43
+ ## Command-line tools
44
+
45
+ - [PDF unpacking](pdf-unpacking.md): OCR a PDF into Markdown and page images.
46
+ - [Image generation](image-generation.md): generate and edit images.
47
+ - [Speech generation](speech-generation.md): narration and dialogue as a WAV file.
48
+ - [OpenRouter](openrouter.md): typed decisions and text or media analysis.
@@ -0,0 +1,81 @@
1
+ # Instructions and skills
2
+
3
+ | Use | For | How it reaches the agent |
4
+ | --- | --- | --- |
5
+ | `AGENTS.md` | Standing project instructions | Added to the system prompt |
6
+ | Skill | A reusable workflow | The agent opens it when the task calls for it |
7
+ | Prompt template | Text you reuse | Fills your editor for you to review and send |
8
+ | Persona | Model, base prompt, and tools | See [personas](personas.md) |
9
+
10
+ All of these are read on the execution environment. Run `/reload` while idle after changing them.
11
+
12
+ ## `AGENTS.md`
13
+
14
+ Tau includes every `AGENTS.md` from the working directory up to home, or up to the filesystem root when outside home. Nearer files come first, and more specific guidance takes priority.
15
+
16
+ Nested files below the working directory are listed by path only, so the agent can read the right one before working in that directory. The scan skips common build and dependency directories such as `node_modules` and `dist`.
17
+
18
+ `tau --no-agent-context-files` turns this off. A subagent started in another directory gets the `AGENTS.md` files and skills of that directory.
19
+
20
+ ## Skills
21
+
22
+ A skill is a directory with a `SKILL.md` file, and any other files it refers to:
23
+
24
+ ```text
25
+ .tau/skills/release-check/
26
+ ├── SKILL.md
27
+ └── scripts/verify.sh
28
+ ```
29
+
30
+ ```markdown
31
+ ---
32
+ name: release-check
33
+ description: "Verify a release candidate and summarize blockers. Trigger: explicit."
34
+ ---
35
+
36
+ Check the release branch, run scripts/verify.sh, and report only blocking failures.
37
+ ```
38
+
39
+ `name` must match the directory name and use lowercase letters, digits, and single dashes. `description` is required and limited to 1,024 characters. Until a skill is activated, the agent sees only its name, description, and path, so the description should say what the skill does and when it applies.
40
+
41
+ The description also sets when the agent activates the skill. Quote it, because the colon in a trigger phrase is invalid in plain YAML:
42
+
43
+ - `Trigger: eager.` means whenever the skill would help.
44
+ - `Trigger: balanced.` means when the request clearly matches. This is the default.
45
+ - `Trigger: explicit.` means only when named as `@@skill:release-check` by you, `AGENTS.md`, or an active skill.
46
+
47
+ Tau looks in these locations, and later ones win:
48
+
49
+ ```text
50
+ ~/.agents/skills/<name>/ only when cwd is inside home
51
+ ~/.config/tau/skills/<name>/
52
+ <level>/.agents/skills/<name>/ from broadest to nearest project level
53
+ <level>/.tau/skills/<name>/
54
+ ```
55
+
56
+ At the same level, `.tau/skills` wins over `.agents/skills`. Every persona can use every discovered skill. `allowed-tools` in frontmatter is ignored, because tools come from the persona. An invalid skill is skipped with a warning.
57
+
58
+ ## Prompt templates
59
+
60
+ A prompt template is Markdown that fills the editor. Save it as `~/.config/tau/prompts/<id>.md` or `.tau/prompts/<id>.md`:
61
+
62
+ ```markdown
63
+ ---
64
+ label: release summary
65
+ ---
66
+
67
+ Summarize the changes since the previous release, and call out any migration steps.
68
+ ```
69
+
70
+ In the TUI, `/prompt:release-summary` fills the editor without sending. In Telegram, `/prompt` opens a picker, and `/prompt release-summary` adds the prompt directly. Tau reads the body each time you use the prompt, but you need `/reload` after adding, removing, or renaming one.
71
+
72
+ ## Hidden system blocks
73
+
74
+ A `<system>` block at the very start of a user message reaches the model but is hidden from the transcript. Integrations use this to add instructions for one message:
75
+
76
+ ```text
77
+ <system>Use the deployment checklist for this response.</system>
78
+ Prepare the staging release.
79
+ ```
80
+
81
+ The closing tag must be followed by a newline. These blocks are saved with the session and are not secret.
@@ -2,34 +2,28 @@
2
2
  "files": [
3
3
  "index.md",
4
4
  "getting-started.md",
5
- "ownership-and-scope.md",
5
+ "how-tau-works.md",
6
+ "tui.md",
7
+ "sessions.md",
8
+ "troubleshooting.md",
6
9
  "configuration.md",
7
- "config-reference.md",
8
- "credentials.md",
9
- "models.md",
10
+ "models-and-credentials.md",
10
11
  "personas.md",
11
- "subagents.md",
12
- "skills.md",
13
- "prompts-and-project-context.md",
12
+ "instructions-and-skills.md",
14
13
  "tools.md",
15
14
  "code-mode.md",
16
- "pdf-unpacking.md",
17
- "image-generation.md",
18
- "speech-generation.md",
19
- "openrouter.md",
15
+ "mcp.md",
16
+ "subagents.md",
20
17
  "client-tools.md",
21
- "tui.md",
22
- "sessions.md",
23
18
  "remote-sessions.md",
24
- "session-protocol.md",
25
- "session-protocol-methods.md",
26
- "node-sdk.md",
27
- "sdk-diff-review.md",
28
- "history.md",
29
19
  "telegram.md",
30
- "telegram-commands.md",
31
- "telegram-projects.md",
20
+ "history.md",
32
21
  "security.md",
33
- "troubleshooting.md"
22
+ "sdk.md",
23
+ "session-protocol.md",
24
+ "pdf-unpacking.md",
25
+ "image-generation.md",
26
+ "speech-generation.md",
27
+ "openrouter.md"
34
28
  ]
35
29
  }
@@ -0,0 +1,77 @@
1
+ # MCP
2
+
3
+ Tau connects to MCP servers defined in `config.json`. The agent reaches them through [`tau.mcp`](code-mode.md), and the persona needs `mcp` in its `tools`, which built-in personas have.
4
+
5
+ ## Configure a server
6
+
7
+ ```json
8
+ {
9
+ "mcpServers": {
10
+ "issues": {
11
+ "type": "stdio",
12
+ "command": "uvx",
13
+ "args": ["example-mcp-server"],
14
+ "env": { "API_TOKEN": "${ISSUES_TOKEN}" },
15
+ "description": "Search and update engineering issues."
16
+ },
17
+ "docs": {
18
+ "type": "http",
19
+ "url": "https://example.com/mcp",
20
+ "headers": { "Authorization": "Bearer ${DOCS_TOKEN}" }
21
+ }
22
+ }
23
+ }
24
+ ```
25
+
26
+ ```ts
27
+ type McpServer = {
28
+ enabled?: boolean; // default true, false turns off an inherited server
29
+ description?: string; // shown to the model, at most 512 characters
30
+ timeoutMs?: number; // tool calls and resource reads, default 300000
31
+ discoveryTimeoutMs?: number; // connection and discovery, default 30000
32
+ } & (
33
+ | {
34
+ type: "stdio";
35
+ command: string;
36
+ args?: string[];
37
+ cwd?: string;
38
+ env?: Record<string, string>;
39
+ }
40
+ | { type: "http"; url: string; headers?: Record<string, string> } // streamable HTTP
41
+ );
42
+ ```
43
+
44
+ `${NAME}` in `env` and `headers` reads a host environment variable, and a missing variable makes the connection fail. Stdio commands run directly without a shell. Relative commands and `cwd` resolve from the directory of the config level that defines the server.
45
+
46
+ ## Where servers run
47
+
48
+ Servers come from the global and project configuration of the session's working directory, and server names add up across levels. Stdio servers run on the host with the host's full environment and permissions, so a project's `.tau/config.json` can start commands there. See [security](security.md).
49
+
50
+ Sessions on a remote execution environment, such as a Fly Sprite, have no MCP servers. Subagents use the servers of their parent session.
51
+
52
+ ## Applying changes
53
+
54
+ The host reads definitions when it loads a session. `/reload` warns if they changed but does not apply them, so start a new session, or reopen the session after the host has unloaded it. Restart the host after changing environment variables that servers use.
55
+
56
+ ## Sign in with OAuth
57
+
58
+ An HTTP server can use browser sign-in in place of a token. Leave out the `Authorization` header and run this on the host, from the session's working directory:
59
+
60
+ ```sh
61
+ tau mcp login docs
62
+ tau mcp login docs --scope dns.write
63
+ tau mcp login docs --all
64
+ tau mcp logout docs
65
+ ```
66
+
67
+ Login prints a URL to open in your browser, and the callback listens on loopback for five minutes. On a remote host, forward the printed port first:
68
+
69
+ ```sh
70
+ ssh -N -L <port>:127.0.0.1:<port> <host>
71
+ ```
72
+
73
+ Credentials are stored per server URL, so every session on that host shares them, and running sessions pick them up without a restart. `--scope` adds to the existing grant, and `--all` requests every advertised scope. When a call needs more permissions, it fails with the login command to run, and you tell the agent to continue afterwards. Logout does not revoke the grant at the service.
74
+
75
+ ## Limits
76
+
77
+ Calls have no confirmation step. Tau does not support MCP prompts, subscriptions, elicitation, or sampling. Connections open on first use, and calls that change data are never retried.
@@ -0,0 +1,67 @@
1
+ # Models and credentials
2
+
3
+ A persona selects a provider and model, and credentials authorize the request. The host makes model calls, so model credentials belong where the host runs. In a remote session, that is usually not your terminal.
4
+
5
+ ## API keys
6
+
7
+ Set a provider's usual environment variable, such as `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, or `GEMINI_API_KEY`, or use the global configuration:
8
+
9
+ ```json
10
+ {
11
+ "apiKeys": {
12
+ "anthropic": "sk-ant-...",
13
+ "openai": "sk-...",
14
+ "google": "..."
15
+ }
16
+ }
17
+ ```
18
+
19
+ The environment variable wins. Keys are keyed by provider ID, and values are literal strings. Restart the process after changing either source.
20
+
21
+ The agent's Bash commands do not inherit variables whose names end in `_KEY`, `_SECRET`, `_TOKEN`, or `_PASSWORD`. When the agent runs a `tau tool` command, the key therefore needs to be in global configuration on that machine.
22
+
23
+ ## Feature keys
24
+
25
+ | Feature | Environment variable | `apiKeys` entry | Read by |
26
+ | --- | --- | --- | --- |
27
+ | Web search and fetch | `EXA_API_KEY` | `exa` | Host |
28
+ | Google images | `GEMINI_API_KEY` | `google` | Command |
29
+ | `/speak` rewriting, spelling hints, transcript cleanup, OpenAI images | `OPENAI_API_KEY` | `openai` | Client, runner, or command |
30
+ | `/listen`, `/speak`, Telegram transcription and voice, speech generation | `ELEVENLABS_API_KEY` | `elevenlabs` | Client, runner, or command |
31
+ | PDF OCR | `MISTRAL_API_KEY` | `mistral` | Command |
32
+ | `tau.models`, OpenRouter tool | `OPENROUTER_API_KEY` | `openrouter` | Host or command |
33
+
34
+ ## ChatGPT subscription
35
+
36
+ The `openai-codex` provider uses a ChatGPT Plus or Pro account through OAuth. Personas with `chatgpt` in their ID use it, such as `gpt-6.1-sol-chatgpt-coder`. Run these on the host:
37
+
38
+ ```sh
39
+ tau auth login codex
40
+ tau auth list
41
+ tau auth use codex --account developer@example.com
42
+ tau auth logout codex --account developer@example.com
43
+ ```
44
+
45
+ At most one account is active. The first login activates it, and later logins add an account without switching. Logging out the active account leaves none active. Tau never switches accounts by itself, including when one runs out of usage. A change applies to later requests without a restart.
46
+
47
+ ## Other credentials
48
+
49
+ - MCP servers: see [MCP](mcp.md).
50
+ - Claude Code workers: sign in with Claude Code on the execution environment. See [subagents](subagents.md).
51
+ - Remote history and Fly Sprites: see [history](history.md) and [remote sessions](remote-sessions.md).
52
+
53
+ ## Model catalog
54
+
55
+ Tau ships a model catalog with limits, capabilities, and prices. A host refreshes it from `pi.dev` in the background at startup if the cache is older than four hours. To refresh right away, run:
56
+
57
+ ```sh
58
+ tau models refresh
59
+ ```
60
+
61
+ A session keeps its catalog until `/reload`. A catalog record can change a model's endpoint and headers, so treat this refresh like a software update channel. Set `TAU_OFFLINE` to skip automatic checks.
62
+
63
+ A persona or launch allowlist can name a model ID missing from the catalog if the provider is known. Tau then uses the provider's default template, so its limits and prices may be wrong.
64
+
65
+ ## Verifying
66
+
67
+ Check a credential by making a small request with the intended persona. Do not print the environment or configuration into a transcript. If a secret ends up in a session or log, rotate it at the provider.