@markusylisiurunen/tau 0.3.101 → 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.
- package/README.md +18 -23
- package/dist/core/config/ownership.js +3 -1
- package/dist/core/config/ownership.js.map +1 -1
- package/dist/core/config/schema.js +3 -1
- package/dist/core/config/schema.js.map +1 -1
- package/dist/core/history/migrations.js +46 -1
- 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/tau_docs/client-tools.md +46 -385
- package/dist/core/static/tau_docs/code-mode.md +104 -43
- 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 -45
- package/dist/core/static/tau_docs/instructions-and-skills.md +81 -0
- package/dist/core/static/tau_docs/manifest.json +15 -20
- 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 -220
- 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 -276
- package/dist/core/subagents/claude_code_runner.mjs +65 -65
- package/dist/core/telegram/adapter.js +178 -61
- package/dist/core/telegram/adapter.js.map +1 -1
- package/dist/core/telegram/cli.js +1 -3
- package/dist/core/telegram/cli.js.map +1 -1
- package/dist/core/telegram/config.js +3 -1
- package/dist/core/telegram/config.js.map +1 -1
- package/dist/core/telegram/runtime.js +1 -1
- package/dist/core/telegram/runtime.js.map +1 -1
- package/dist/core/utils/scribe_transcription.js +283 -0
- package/dist/core/utils/scribe_transcription.js.map +1 -0
- package/dist/core/utils/speech_cleanup.js +198 -0
- package/dist/core/utils/speech_cleanup.js.map +1 -0
- package/dist/core/utils/speech_to_text.js +3 -3
- package/dist/core/utils/speech_to_text_keywords.js +5 -4
- package/dist/core/utils/speech_to_text_keywords.js.map +1 -1
- package/dist/core/version.js +1 -1
- package/dist/diff_tool/app/dist/assets/{core-CXVpaOO1.js → core-Cnp6wBC7.js} +1 -1
- package/dist/diff_tool/app/dist/assets/engine-oniguruma-ConHyUk6.js +1 -0
- package/dist/diff_tool/app/dist/assets/{highlights-DuJNYjEh.js → highlights-DeO0fGqQ.js} +1 -1
- package/dist/diff_tool/app/dist/assets/index-BDuQ2wXS.js +221 -0
- package/dist/diff_tool/app/dist/assets/langs-DDFHLNuJ.js +1 -0
- package/dist/diff_tool/app/dist/assets/{loader-bi21_x0K.js → loader-DrwOwtvp.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{preload-helper-CRzLMJPS.js → preload-helper-DclECHGd.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{shiki-D6ZyrNQD.js → shiki-CwKGJZFi.js} +2 -2
- package/dist/diff_tool/app/dist/assets/{stream-tokenizer-BdsyU_yB.js → stream-tokenizer-D4-m26wx.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{themes-9lpTYI_i.js → themes-Do3waJhf.js} +2 -2
- package/dist/diff_tool/app/dist/index.html +2 -2
- package/dist/history/worker/index.js +83 -63
- package/dist/history/worker/index.js.map +1 -1
- package/dist/history/worker/migrations/0003_digest_schedule.sql +36 -0
- package/dist/history/worker/migrations/0004_recent_sessions.sql +1 -0
- 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/store/session_snapshot_migrations.js +14 -1
- package/dist/store/session_snapshot_migrations.js.map +1 -1
- package/dist/tui/chat_view.js +3 -1
- package/dist/tui/chat_view.js.map +1 -1
- package/dist/tui/listen_capture.js +7 -5
- package/dist/tui/listen_capture.js.map +1 -1
- package/dist/tui/session_chat_controller.js +93 -15
- package/dist/tui/session_chat_controller.js.map +1 -1
- package/dist/tui/ui/custom_editor.js +3 -0
- package/dist/tui/ui/custom_editor.js.map +1 -1
- package/package.json +8 -7
- package/dist/core/static/tau_docs/config-reference.md +0 -355
- 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-projects.md +0 -197
- package/dist/core/utils/gemini_transcription.js +0 -566
- package/dist/core/utils/gemini_transcription.js.map +0 -1
- package/dist/diff_tool/app/dist/assets/engine-oniguruma-Rz_7DPcV.js +0 -1
- package/dist/diff_tool/app/dist/assets/index-F9is7PUw.js +0 -221
- package/dist/diff_tool/app/dist/assets/langs-CTftvgbb.js +0 -1
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
# Ownership and scope
|
|
2
|
-
|
|
3
|
-
Tau splits a session into three parts: the terminal or other interface you use, the host that runs the session, and the machine the agent works on. They stay separate even when all three run in one process. Know which part owns a path or setting before you change it. In an attached session, “local” can mean any of three machines.
|
|
4
|
-
|
|
5
|
-
## The four operating roles
|
|
6
|
-
|
|
7
|
-
### Client
|
|
8
|
-
|
|
9
|
-
The **client** is the interface attached to a session host. The terminal client owns the TUI, editor state, terminal colors, active theme, local speech commands, the diff-review process, and configured command client tools. An SDK program or Telegram adapter can also be a client.
|
|
10
|
-
|
|
11
|
-
Client tools run on the client machine, which may differ from the machine where the agent's Bash tool runs. Client configuration is found from the client's startup working directory and home.
|
|
12
|
-
|
|
13
|
-
### Host
|
|
14
|
-
|
|
15
|
-
The **host** creates, observes, persists, and recovers sessions. It owns model calls, credentials, session orchestration, tool binding, history storage, and execution-environment lifecycle. Local `tau` creates an in-process host. `tau serve` is the standalone host entry point.
|
|
16
|
-
|
|
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
|
-
|
|
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
|
-
|
|
21
|
-
The built-in `tau_docs` tool also belongs to the host. It reads the documentation installed with the host's Tau version.
|
|
22
|
-
|
|
23
|
-
### Execution environment
|
|
24
|
-
|
|
25
|
-
The **execution environment** is the machine the agent can act on. It owns the agent-visible working directory (`cwd`), home, platform, environment, filesystem, processes, project repository, project configuration and content, `AGENTS.md` files, skills, and command resolution.
|
|
26
|
-
|
|
27
|
-
[Claude Code subagents](subagents.md#claude-code-subagents) run their model calls here and keep their subscription login and conversation files here. The host starts, observes, and stops these workers through the execution environment. Their credentials remain with Claude Code.
|
|
28
|
-
|
|
29
|
-
Tau reads files and runs commands through the execution environment, even when it is on the same machine as the host. Each session has exactly one execution environment. Paths shown to the agent and paths passed to its tools are always paths on that environment.
|
|
30
|
-
|
|
31
|
-
### Telegram runner
|
|
32
|
-
|
|
33
|
-
The **Telegram runner** owns Telegram polling, chat routing, attachments, outbound messages, project selection, and Telegram-specific persisted runner state. It is a client of in-process Tau sessions and starts their host on the runner machine.
|
|
34
|
-
|
|
35
|
-
For repository and composite projects it prepares managed workspaces. A persistent-directory project reuses the configured directory. Each workspace becomes the local execution environment of its session. The file passed to `tau telegram --config-file` is runner configuration. It is not one of Tau's `config.json` levels.
|
|
36
|
-
|
|
37
|
-
## Where each mode runs
|
|
38
|
-
|
|
39
|
-
| Mode | Client | Host | Execution environment |
|
|
40
|
-
| --- | --- | --- | --- |
|
|
41
|
-
| `tau` | Local TUI process | In-process on the same machine | Local `cwd` where Tau started |
|
|
42
|
-
| `tau attach … ws://…` | Machine running `tau attach` | Machine running `tau serve` | Environment selected or restored by that host |
|
|
43
|
-
| `tau serve` | A separate protocol client | The server process | Local or configured hosted environment chosen by the client |
|
|
44
|
-
| Default Node SDK client | SDK caller | In-process with the SDK caller | Usually a local environment supplied at session creation |
|
|
45
|
-
| SDK over WebSocket | SDK caller | Remote server | Environment selected or restored by that host |
|
|
46
|
-
| `tau telegram` | Telegram runner | In-process on the runner machine | Prepared project workspace or persistent directory |
|
|
47
|
-
|
|
48
|
-
A Fly Sprite puts the execution environment on another machine while the host stays on its own. The host keeps the provider credentials and runs the session. The Sprite owns its paths and commands.
|
|
49
|
-
|
|
50
|
-
## Who owns common paths and behavior
|
|
51
|
-
|
|
52
|
-
| Resource or behavior | Owner | Consequence |
|
|
53
|
-
| --- | --- | --- |
|
|
54
|
-
| Agent `cwd`, home, repository, files, and commands | Execution environment | Use target paths in prompts, `session.create`, and agent tool calls. |
|
|
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
|
-
| 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). |
|
|
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. |
|
|
59
|
-
| Codex OAuth accounts | Host home | Run `tau auth …` on the host machine. Do not edit auth storage. |
|
|
60
|
-
| Session snapshots | Host home | Local defaults live under the host's Tau config directory. Do not edit session files. |
|
|
61
|
-
| Local transcript history and remote history outbox | Host home | History follows the host, not an attached TUI or execution target. |
|
|
62
|
-
| Terminal theme and `/theme` | TUI client | An attached client selects from Tau’s built-in themes. Themes are not session state. |
|
|
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. |
|
|
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. |
|
|
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. |
|
|
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. |
|
|
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`. |
|
|
69
|
-
|
|
70
|
-
## Decide where to edit configuration
|
|
71
|
-
|
|
72
|
-
Start from the behavior that consumes the setting:
|
|
73
|
-
|
|
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.
|
|
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.
|
|
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.
|
|
78
|
-
|
|
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.
|
|
80
|
-
|
|
81
|
-
## A remote configuration example
|
|
82
|
-
|
|
83
|
-
Suppose a laptop runs:
|
|
84
|
-
|
|
85
|
-
```sh
|
|
86
|
-
tau attach --new --cwd /srv/ledger ws://devbox.example:8787
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
The host and its local execution environment resolve `/srv/ledger`. Project personas and `.tau/config.json` are read from `/srv/ledger` and its parent directories on `devbox.example`. The laptop's current directory has no effect on the session.
|
|
90
|
-
|
|
91
|
-
The laptop still loads its own theme and command client tools before attaching. `/diff` launches Tau’s built-in browser tool on the laptop. Git snapshot commands for the review run through the session and therefore see `/srv/ledger` on the execution environment.
|
|
92
|
-
|
|
93
|
-
The host on `devbox.example` makes the model calls, so it needs the provider credential. Export the provider's environment variable for `tau serve` there, or put the key in that host's global configuration. Setting it only in the laptop shell does not reach the remote host.
|
|
94
|
-
|
|
95
|
-
## Home has a boundary too
|
|
96
|
-
|
|
97
|
-
Tau includes global configuration only when the relevant `cwd` is the home directory or inside it. For session configuration, both the `cwd` and the home are on the execution environment. For client startup configuration, both are on the client.
|
|
98
|
-
|
|
99
|
-
This matters when a remote or hosted environment uses a project outside its home. Tau then reads project levels up to the filesystem root but does not add `~/.config/tau`, from that machine or any other.
|
|
100
|
-
|
|
101
|
-
## What `tau_docs` can and cannot tell you
|
|
102
|
-
|
|
103
|
-
`tau_docs` reads the documentation installed with the host. It can explain valid fields, paths, precedence, and supported behavior for that host's Tau version.
|
|
104
|
-
|
|
105
|
-
It cannot see effective configuration, environment variables, loaded client tools, the active TUI theme, the versions of attached clients, or files on a client machine. An attached client can run a different Tau version from the host. For client questions, use client commands and look on the client machine. For questions about the running session, use the warnings the session reports or inspect the host.
|
|
106
|
-
|
|
107
|
-
See [configuration](configuration.md) for level discovery and change boundaries, [remote sessions](remote-sessions.md) for attach and server operation, and [security](security.md) for trust implications.
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
# Prompts and project context
|
|
2
|
-
|
|
3
|
-
Tau has three ways to add instructions or reusable text to a session, and each enters at a different point:
|
|
4
|
-
|
|
5
|
-
- Prompt templates fill the editor when you ask for them.
|
|
6
|
-
- `AGENTS.md` files give standing project instructions.
|
|
7
|
-
- Hidden system blocks at the start of a user message add instructions for that one message.
|
|
8
|
-
|
|
9
|
-
None of these choose models or tools. [Personas](personas.md) set the base system prompt, model settings, and tools. Model-specific system notices are configured separately in the [configuration reference](config-reference.md).
|
|
10
|
-
|
|
11
|
-
## Prompt templates fill the editor
|
|
12
|
-
|
|
13
|
-
A prompt template is saved Markdown that Tau inserts into the TUI editor, where you can review and send it. It is never added to the system prompt and never runs by itself.
|
|
14
|
-
|
|
15
|
-
Tau discovers prompt files from:
|
|
16
|
-
|
|
17
|
-
| Scope | Location |
|
|
18
|
-
| ------- | ------------------------------- |
|
|
19
|
-
| Global | `~/.config/tau/prompts/<id>.md` |
|
|
20
|
-
| Project | `<level>/.tau/prompts/<id>.md` |
|
|
21
|
-
|
|
22
|
-
The global location applies only when the session's working directory is inside the execution environment's home directory. Tau searches project levels from the working directory up to home, or up to the filesystem root when outside home. The nearest project definition wins over parent and global ones. Prompt IDs are compared case-insensitively, both for precedence and for lookup.
|
|
23
|
-
|
|
24
|
-
A prompt's ID is its filename without `.md`. Each file needs YAML frontmatter with a non-empty `label`. For example, `release-summary.md`:
|
|
25
|
-
|
|
26
|
-
```markdown
|
|
27
|
-
---
|
|
28
|
-
label: release summary
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
Summarize the changes since the previous release. Separate user-visible changes from internal maintenance, and call out any migration steps.
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
The `label` appears in TUI autocomplete and in the Telegram prompt picker. Unknown frontmatter fields are ignored. The Markdown body is the text inserted into the editor.
|
|
35
|
-
|
|
36
|
-
Only files ending in lowercase `.md` are found. Tau skips a file with a warning if its YAML is invalid, its frontmatter is not an object, or its label is missing or invalid.
|
|
37
|
-
|
|
38
|
-
### Invoke a prompt
|
|
39
|
-
|
|
40
|
-
In the TUI, invoke a prompt by ID:
|
|
41
|
-
|
|
42
|
-
```text
|
|
43
|
-
/prompt:release-summary
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
Tau replaces the editor text with the template body. It does not send the text, so you can edit it first. Lookup is case-insensitive.
|
|
47
|
-
|
|
48
|
-
The session stores only each prompt's ID and label. Tau reads the body from the execution environment each time `/prompt:<id>` runs. As a result:
|
|
49
|
-
|
|
50
|
-
- An edit to the body of a known prompt takes effect on its next use, without `/reload`.
|
|
51
|
-
- After adding, removing, or renaming a prompt, or changing its label, run `/reload` before autocomplete shows the change.
|
|
52
|
-
|
|
53
|
-
If the file is missing or invalid when Tau reads it, the command fails. Tau never falls back to an older copy of the body. An attached client always gets the prompt from the session's execution environment, never from a file with the same name on the client machine.
|
|
54
|
-
|
|
55
|
-
### Telegram prompt picker
|
|
56
|
-
|
|
57
|
-
In [Telegram](telegram.md), `/prompt` lists the active session's saved prompts, split into pages when there are many. Selecting one reads its current body and adds it to the session as a user message, without starting a turn. You can select a prompt only while the session is idle. Otherwise, wait for Tau to finish or use `/interrupt` first.
|
|
58
|
-
|
|
59
|
-
After a prompt is added, the picker's buttons stop working and it shows the prompt text, split across more messages if needed. Send a normal message, such as details or “go”, to start the next turn with the prompt in context. In groups, that message must mention the bot as usual. Selecting another prompt adds another message; it does not replace the first. Added prompts survive session recovery.
|
|
60
|
-
|
|
61
|
-
Only the newest picker in a chat works. A picker belongs to the session that opened it and expires after a selection, when the session is replaced, or when the runner restarts. Tapping twice does not add the prompt twice. Selecting a prompt does not use up pending attachments or group context.
|
|
62
|
-
|
|
63
|
-
## `AGENTS.md` provides standing context
|
|
64
|
-
|
|
65
|
-
`AGENTS.md` files are added to the system prompt as project context. Use them for repository conventions, architecture boundaries, verification commands, and other instructions that apply to every request in the project.
|
|
66
|
-
|
|
67
|
-
Tau always reads `AGENTS.md` from the execution environment, also in a local session.
|
|
68
|
-
|
|
69
|
-
### Ancestor files are included in full
|
|
70
|
-
|
|
71
|
-
Starting at the session working directory, Tau checks each ancestor for `AGENTS.md`. When the working directory is inside home, the walk stops at home and includes home itself. Otherwise it stops at the filesystem root.
|
|
72
|
-
|
|
73
|
-
Each file found is included in full, nearest first, followed by those in parent directories. The agent sees both local and broader instructions. When they conflict, the more specific project guidance takes priority, within the agent's overall instruction hierarchy.
|
|
74
|
-
|
|
75
|
-
A file is included only if it resolves to a real file named exactly `AGENTS.md`, in a directory that is a parent or a subdirectory of the working directory. When the working directory is inside home, the resolved file must also be inside home. These checks stop a symlink from pulling in unrelated instructions from outside the session's directories.
|
|
76
|
-
|
|
77
|
-
### Descendant files are listed by path
|
|
78
|
-
|
|
79
|
-
Tau also looks below the working directory for nested `AGENTS.md` files. Their contents are not added automatically. Tau lists only their paths, so the agent knows more specific instructions exist and can read the right file before working in that subdirectory.
|
|
80
|
-
|
|
81
|
-
The scan is breadth-first, visits at most 8,192 directories, and goes at most 16 levels deep. It follows only directories whose resolved path stays under the working directory, and it does not loop on symlink cycles.
|
|
82
|
-
|
|
83
|
-
Tau skips these directory names at every level:
|
|
84
|
-
|
|
85
|
-
```text
|
|
86
|
-
.cache .git .hg .jj .next .nuxt .parcel-cache .svn .turbo
|
|
87
|
-
.venv .vite __pycache__ build coverage dist node_modules out
|
|
88
|
-
target vendor venv
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
When the scan starts at the home directory itself, Tau also skips these tool-managed directories directly under home:
|
|
92
|
-
|
|
93
|
-
```text
|
|
94
|
-
.bun .cargo .config .deno .gradle .local .m2 .npm .nvm
|
|
95
|
-
.pnpm-store .rustup .sdkman .yarn
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
It also skips `Library` directly under home on macOS, and `snap` on Linux. A directory with one of these names elsewhere is still scanned.
|
|
99
|
-
|
|
100
|
-
## Disable project context
|
|
101
|
-
|
|
102
|
-
Start Tau with:
|
|
103
|
-
|
|
104
|
-
```bash
|
|
105
|
-
tau --no-agent-context-files
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
This turns off both the included `AGENTS.md` files and the list of nested ones. Personas, prompt templates, and [skills](skills.md) still work.
|
|
109
|
-
|
|
110
|
-
The option works for local TUI sessions and for hosts started with `tau serve`. In the Node SDK, `noAgentContextFiles: true` does the same for the host. An attached client cannot change this for a session that already exists on a remote host.
|
|
111
|
-
|
|
112
|
-
## Alternate subagent working directories
|
|
113
|
-
|
|
114
|
-
A subagent normally uses its parent's working directory and context. When `tau.agents.spawn` sets a different `workingDirectory`, Tau rebuilds the parts of the context that depend on the directory:
|
|
115
|
-
|
|
116
|
-
- environment and repository details
|
|
117
|
-
- the applicable `AGENTS.md` files
|
|
118
|
-
- the skills found from that directory
|
|
119
|
-
|
|
120
|
-
The persona, model catalog, model settings, and tool policy still come from the parent. A persona file in the other directory is not used. See [subagents](subagents.md) for details.
|
|
121
|
-
|
|
122
|
-
## Leading hidden system blocks
|
|
123
|
-
|
|
124
|
-
Tau recognizes one or more `<system>...</system>` blocks only when they start a user message and each closing tag is followed by a newline:
|
|
125
|
-
|
|
126
|
-
```text
|
|
127
|
-
<system>Use the deployment checklist for this response.</system>
|
|
128
|
-
Prepare the staging release.
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
The whole message is saved and sent to the model. When Tau displays the message, it hides the recognized blocks and shows the rest. A block anywhere else in the message, a malformed block, or a closing tag without the newline is shown as ordinary text.
|
|
132
|
-
|
|
133
|
-
Integrations can use this to give the model instructions for one message without showing them as the user's words. The blocks are not secret and do not control access: they are saved in the session and sent to the model. Put project-wide guidance in `AGENTS.md` and lasting persona behavior in the persona's system prompt.
|
|
134
|
-
|
|
135
|
-
## Reload and verify context
|
|
136
|
-
|
|
137
|
-
Run `/reload` in an idle session after changing prompts, skills, personas, configuration, or project context files. Reload reads everything again and rebuilds the system prompt for the active persona. It reports configuration warnings and how much content it loaded. Reload is refused while a turn is running.
|
|
138
|
-
|
|
139
|
-
For a new local session, debug mode prints the discovered content, the paths of loaded context files, tool schemas, and the system prompt, then exits:
|
|
140
|
-
|
|
141
|
-
```bash
|
|
142
|
-
tau --debug --persona release-coder
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
Add `--no-agent-context-files` to see the result without project context. Debug mode works only for TUI startup, not with `tau serve`.
|
|
146
|
-
|
|
147
|
-
If expected context is missing, check the `cwd` and `home` of the execution environment, not the attached client's current directory. Then check exact filenames, the path rules above, scan exclusions, and reload warnings. See [troubleshooting](troubleshooting.md) for broader diagnostics.
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
# SDK browser diff review
|
|
2
|
-
|
|
3
|
-
`startTauSdkDiffReview()` starts Tau's built-in browser review UI for an observed SDK session, without the TUI and without opening a browser. It takes the diff in the session's execution environment, creates the same review agent context that `/diff` uses, starts preparing the review context and reviewer guide right away, and starts an HTTP server, on loopback by default.
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
import { startTauSdkDiffReview } from "@markusylisiurunen/tau/sdk";
|
|
7
|
-
|
|
8
|
-
const review = await startTauSdkDiffReview({
|
|
9
|
-
session,
|
|
10
|
-
source: {
|
|
11
|
-
kind: "git_diff",
|
|
12
|
-
diffArgs: ["main...HEAD"],
|
|
13
|
-
},
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
console.log(review.url);
|
|
17
|
-
|
|
18
|
-
try {
|
|
19
|
-
const result = await review.result;
|
|
20
|
-
console.log(result);
|
|
21
|
-
} finally {
|
|
22
|
-
await review.close();
|
|
23
|
-
}
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
The source can instead be `{ kind: "patch_files", patchFiles, scopeLabel }`. Paths and Git arguments refer to the session's execution environment. A snapshot's patch can be at most 16 MiB; narrow the Git arguments or patch files if a larger diff is rejected. A plain working-tree snapshot includes non-binary untracked files of up to 4 MiB each, within that total. The optional `host`, `port`, and `signal` fields set where the HTTP server listens and let you cancel startup.
|
|
27
|
-
|
|
28
|
-
## Routing and lifecycle
|
|
29
|
-
|
|
30
|
-
The returned `url` is on the SDK client's machine and ends with a slash. Your service can expose it through a reverse proxy that handles authentication or access links. The browser app uses relative paths, so it works under a path prefix, as long as the public URL also ends with a slash. Your service is responsible for public authentication, routing, retention, and recovery.
|
|
31
|
-
|
|
32
|
-
The HTTP server has no authentication. The default loopback address suits a proxy on the same machine. Set a non-loopback `host` only inside a trusted network; otherwise keep it on loopback behind a protected proxy.
|
|
33
|
-
|
|
34
|
-
Always call `close()` when the review should no longer be available. It cancels the review if needed, closes the review agent context, and stops the HTTP server.
|
|
35
|
-
|
|
36
|
-
In the UI, **Submit** first opens a preview of the exact text to be returned, where the reviewer can exclude feedback and copy the full review. **Approve** returns right away when no feedback remains; if feedback appears while approval is being checked, the preview opens instead. The returned Markdown stands on its own: it names the reviewed scope, gives change-level comments their context, and explains who took part in each unresolved discussion and in what role.
|
|
37
|
-
|
|
38
|
-
`result` resolves once, with the outcome or the reason for cancellation. An approval and a review with comments are separate outcomes, so you never need to check for placeholder text:
|
|
39
|
-
|
|
40
|
-
```ts
|
|
41
|
-
const result = await review.result;
|
|
42
|
-
if (result.status === "returned" && result.outcome === "approved") {
|
|
43
|
-
console.log("approved without comments");
|
|
44
|
-
} else if (result.status === "returned") {
|
|
45
|
-
console.log(result.review);
|
|
46
|
-
}
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## Durable review state
|
|
50
|
-
|
|
51
|
-
By default, review annotations, transcripts, guide content and comments, and UI preferences are kept only in memory. Pass a `storage` adapter to save them:
|
|
52
|
-
|
|
53
|
-
```ts
|
|
54
|
-
const review = await startTauSdkDiffReview({
|
|
55
|
-
session,
|
|
56
|
-
source: { kind: "git_diff", diffArgs: ["main...HEAD"] },
|
|
57
|
-
storage: {
|
|
58
|
-
load: () => database.loadReviewState(reviewId),
|
|
59
|
-
save: (document) => database.saveReviewState(reviewId, document),
|
|
60
|
-
},
|
|
61
|
-
});
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
The stored document is a versioned Tau value of limited size. Store it as is, without reading or changing it. Tau saves each change before the HTTP request succeeds, and undoes the change if saving fails.
|
|
65
|
-
|
|
66
|
-
To restore, the stored document must be valid, supported by the running Tau version, and made for the same diff. "The same diff" covers the patch, file metadata, diff command and arguments, repository root, and working directory. If the state is invalid, unsupported, or for a different diff, `startTauSdkDiffReview()` rejects, instead of quietly starting empty. Your application then decides whether to keep, discard, or replace the document before trying again.
|
|
67
|
-
|
|
68
|
-
Saved state does not include loading indicators or review agent thread IDs. After a restore, the first follow-up question starts a new agent thread and gives it the saved conversation transcript.
|
|
69
|
-
|
|
70
|
-
## Durable submission
|
|
71
|
-
|
|
72
|
-
Use `onSubmit` when the submitted review must be saved before the browser is told it succeeded:
|
|
73
|
-
|
|
74
|
-
```ts
|
|
75
|
-
const review = await startTauSdkDiffReview({
|
|
76
|
-
session,
|
|
77
|
-
source: { kind: "git_diff", diffArgs: ["main...HEAD"] },
|
|
78
|
-
storage,
|
|
79
|
-
onSubmit: async (submission) => {
|
|
80
|
-
await database.acceptReviewOnce({
|
|
81
|
-
reviewId,
|
|
82
|
-
...submission,
|
|
83
|
-
});
|
|
84
|
-
},
|
|
85
|
-
});
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
An approved submission has `outcome: "approved"` and no `review` field. A commented submission has `outcome: "commented"` and a required `review` field. Both include `diffCommand` and `reviewedFiles`.
|
|
89
|
-
|
|
90
|
-
Each running review server allows only one submission at a time, and none after one succeeds. Tau waits for `onSubmit` to finish before reporting success and closing the review. If the callback fails, the reviewer can submit again.
|
|
91
|
-
|
|
92
|
-
Your application is responsible for recording the submission exactly once, for deciding whether a submitted review may be opened again, and for keeping or deleting stored state. A typical callback marks its own review record as submitted and queues follow-up work in one transaction.
|