@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.
- package/README.md +18 -23
- 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/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 -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/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/package.json +2 -2
- 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,28 +1,12 @@
|
|
|
1
1
|
# Telegram
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The Telegram runner connects Telegram bots to Tau sessions on the runner machine. Each session is an ordinary local session in a project workspace, with normal Tau configuration, personas, skills, and tools.
|
|
4
4
|
|
|
5
|
-
Anyone who can use a bot can cause model calls, file changes, and repository changes. Set up
|
|
5
|
+
Anyone who can use a bot can cause model calls, file changes, and repository changes. Set up the access lists before adding a bot to a group.
|
|
6
6
|
|
|
7
7
|
## Start the runner
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
```sh
|
|
12
|
-
tau telegram --config-file /etc/tau/telegram.json
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
The process stays in the foreground until `SIGINT` or `SIGTERM`. Relative `--config-file` paths resolve from the process working directory. Paths inside that file resolve as described below, usually from the config file's directory.
|
|
16
|
-
|
|
17
|
-
Add `--check-config` to validate the file and exit without starting the runner. It does not check tokens, directories, or repository access.
|
|
18
|
-
|
|
19
|
-
The Telegram file is **not** one of Tau's `config.json` levels. It configures the runner: bot tokens, startup settings, presets, projects, workspace roots, and routing. Tau still loads normal configuration from the runner's startup directory and from each session's workspace. See [configuration](configuration.md) and [ownership and scope](ownership-and-scope.md).
|
|
20
|
-
|
|
21
|
-
Run at most one runner per configuration and workspace root. Two runners would compete for Telegram updates, runner state, and workspace cleanup.
|
|
22
|
-
|
|
23
|
-
## Minimal configuration
|
|
24
|
-
|
|
25
|
-
A useful configuration defines at least one bot and one project:
|
|
9
|
+
Create a config file. It is separate from `config.json`:
|
|
26
10
|
|
|
27
11
|
```json
|
|
28
12
|
{
|
|
@@ -31,232 +15,208 @@ A useful configuration defines at least one bot and one project:
|
|
|
31
15
|
"engineering": {
|
|
32
16
|
"botToken": "<telegram-bot-token>",
|
|
33
17
|
"startup": { "source": "workspace" },
|
|
34
|
-
"allowedProjectIds": ["ledger"],
|
|
35
18
|
"allowedUserIds": [18422031],
|
|
36
19
|
"allowedChatIds": [18422031],
|
|
37
20
|
"defaultProjectId": "ledger"
|
|
38
21
|
}
|
|
39
22
|
},
|
|
40
23
|
"projects": {
|
|
41
|
-
"ledger": {
|
|
42
|
-
"repo": "acme/ledger",
|
|
43
|
-
"ref": "main"
|
|
44
|
-
}
|
|
24
|
+
"ledger": { "repo": "acme/ledger", "ref": "main" }
|
|
45
25
|
}
|
|
46
26
|
}
|
|
47
27
|
```
|
|
48
28
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
## Top-level fields
|
|
54
|
-
|
|
55
|
-
| Field | Required | Behavior |
|
|
56
|
-
| --- | --- | --- |
|
|
57
|
-
| `bots` | Yes | Non-empty object keyed by a bot ID you choose. |
|
|
58
|
-
| `projects` | Yes | Object keyed by project ID. Bots select from these definitions. |
|
|
59
|
-
| `workspaceRoot` | No | Base for managed workspaces; defaults to `.tau/telegram-workspaces` beside the Telegram config file. |
|
|
60
|
-
| `maxSessions` | No | Positive integer cap on active sessions across the whole runner. |
|
|
61
|
-
|
|
62
|
-
A relative `workspaceRoot` resolves from the config file's directory. Tau saves runner session records in `<workspaceRoot>-sessions.json` and per-chat preferences in `<workspaceRoot>-project-preferences.json`. These are the runner's own state files; do not edit them. Sessions are saved in the usual place in the runner user's Tau home.
|
|
63
|
-
|
|
64
|
-
`maxSessions` counts queued, preparing, running, and waiting sessions across all bots. Failed sessions do not count, but stay visible to their chat until replaced or closed.
|
|
65
|
-
|
|
66
|
-
## Bots and access control
|
|
67
|
-
|
|
68
|
-
Each `bots.<id>` object supports:
|
|
69
|
-
|
|
70
|
-
| Field | Required | Behavior |
|
|
71
|
-
| --- | --- | --- |
|
|
72
|
-
| `botToken` | Yes | Telegram Bot API token. |
|
|
73
|
-
| `env` | No | Environment variables for this bot's workspace preparation and new sessions. See [bot environments](telegram-projects.md#bot-environments). |
|
|
74
|
-
| `allowedProjectIds` | No | Non-empty unique subset of configured project IDs; omission exposes all projects. |
|
|
75
|
-
| `autoCompactThresholdTokens` | No | Default automatic-compaction threshold for this bot's sessions. See [compaction thresholds](#compaction-thresholds). |
|
|
76
|
-
| `startup` | Yes | `{ "source": "workspace" }` or `{ "source": "preset", "preset": "<key>" }`. See [startup and presets](#startup-and-presets). |
|
|
77
|
-
| `presets` | No | Named choices that `/persona` offers. Omission offers all workspace personas, and `{}` offers none. |
|
|
78
|
-
| `allowedUserIds` | No | Integer user IDs allowed to trigger turns, commands, and callbacks. |
|
|
79
|
-
| `allowedChatIds` | No | Integer chat IDs allowed to interact with the bot; also opts groups in. |
|
|
80
|
-
| `defaultProjectId` | No | Initial project preference, and must be allowed for this bot. |
|
|
81
|
-
| `systemMessage` | No | Additional instruction for turns from this bot. |
|
|
82
|
-
| `speechCleanupStyle` | No | `off` or `default`. Cleans up voice note transcripts for this bot with the [`default` style](tui.md#cleanup-styles). Defaults to `off`. |
|
|
83
|
-
|
|
84
|
-
The runner retries failed polling after 1,000 ms and uses a 30-second Telegram long-poll timeout.
|
|
85
|
-
|
|
86
|
-
A missing or empty `allowedUserIds` allows every user. A missing or empty `allowedChatIds` allows all DMs and no groups. A non-empty `allowedChatIds` allows only the listed DMs and groups. Group IDs are usually negative.
|
|
87
|
-
|
|
88
|
-
Use both lists for a private bot. `allowedUserIds` decides who can start work, but in an allowed group, messages from other users can still become context, labeled with their sender. Add the bot only to groups whose conversation is fine to send to the model.
|
|
89
|
-
|
|
90
|
-
A bot sees only its `allowedProjectIds`, or every project if the field is missing. If only one project is allowed, it is selected automatically and the command palette omits `/use_<project>` commands. The command still works when typed directly. Otherwise the palette includes project-switch commands, and a chat needs `defaultProjectId` or a `/use_<project>` choice before `/new`. Each startup replaces the palette, removing switch commands if the bot now has only one available project.
|
|
91
|
-
|
|
92
|
-
Telegram allows 100 commands per bot: ten built-ins and up to 90 `/use_<projectId>` commands. With `presets: {}`, `/persona` is hidden, which leaves room for one more project command.
|
|
93
|
-
|
|
94
|
-
## Projects
|
|
95
|
-
|
|
96
|
-
Each project tells the runner where a session works. There are three kinds:
|
|
97
|
-
|
|
98
|
-
- A **repository project** clones one GitHub repository into a new workspace for each session.
|
|
99
|
-
- A **persistent-directory project** reuses one existing directory for all of its sessions.
|
|
100
|
-
- A **composite project** combines several repository projects in one workspace.
|
|
101
|
-
|
|
102
|
-
[Telegram projects and workspaces](telegram-projects.md) describes project fields, workspace preparation, provision hooks, and recovery.
|
|
103
|
-
|
|
104
|
-
**Important:** at startup, the runner deletes everything under its managed workspace roots that no saved session uses. Give Tau a dedicated `workspaceRoot`; never use a home directory, a collection of repositories, or any directory with other content.
|
|
105
|
-
|
|
106
|
-
## Normal Tau configuration inside workspaces
|
|
107
|
-
|
|
108
|
-
After preparation, Tau creates an ordinary local session in the workspace. It reads `~/.config/tau` and the `.tau` directories above the workspace as usual, so personas, prompts, skills, project context, host tools, [MCP servers](config-reference.md#mcpservers), and other settings work as in the TUI.
|
|
109
|
-
|
|
110
|
-
The bot's `startup` selects a new session's settings, as described in [startup and presets](#startup-and-presets).
|
|
29
|
+
```sh
|
|
30
|
+
tau telegram --config-file /etc/tau/telegram.json --check-config
|
|
31
|
+
tau telegram --config-file /etc/tau/telegram.json
|
|
32
|
+
```
|
|
111
33
|
|
|
112
|
-
|
|
34
|
+
`--check-config` validates the file without checking tokens or repository access. The file holds bot tokens, so protect it and never commit it. The runner stays in the foreground and refuses unknown fields. Run one runner per configuration and workspace root, and restart it after changing the file.
|
|
35
|
+
|
|
36
|
+
The runner needs `tau`, `git`, and a signed-in `gh` on its login-shell `PATH`, and model credentials like any [host](models-and-credentials.md). To check that it works, send `/status` and then `/new` in an allowed DM.
|
|
37
|
+
|
|
38
|
+
**Give the runner a dedicated `workspaceRoot`.** At startup, it deletes everything under that root that no saved session uses, so never point it at a home directory or a directory with other content.
|
|
39
|
+
|
|
40
|
+
## Configuration
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
type TelegramConfig = {
|
|
44
|
+
bots: Record<string, Bot>;
|
|
45
|
+
projects: Record<string, Project>; // IDs: lowercase, digits, "_", at most 28 characters
|
|
46
|
+
workspaceRoot?: string; // default .tau/telegram-workspaces beside this file
|
|
47
|
+
maxSessions?: number; // active sessions across all bots
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
type Bot = {
|
|
51
|
+
botToken: string;
|
|
52
|
+
startup: { source: "workspace" } | { source: "preset"; preset: string };
|
|
53
|
+
presets?: Record<string, Preset>; // what /persona offers, {} hides it
|
|
54
|
+
allowedUserIds?: number[]; // empty or missing: every user
|
|
55
|
+
allowedChatIds?: number[]; // empty or missing: all DMs and no groups
|
|
56
|
+
allowedProjectIds?: string[]; // missing: all projects
|
|
57
|
+
defaultProjectId?: string;
|
|
58
|
+
systemMessage?: string; // added to each turn from this bot
|
|
59
|
+
speechCleanupStyle?: "off" | "default"; // clean up voice transcripts, default "off"
|
|
60
|
+
autoCompactThresholdTokens?: number;
|
|
61
|
+
env?: Record<string, string>; // see Bot environments
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
type Preset =
|
|
65
|
+
| { source: "workspace"; label: string }
|
|
66
|
+
| {
|
|
67
|
+
source: "persona";
|
|
68
|
+
label: string;
|
|
69
|
+
persona: string;
|
|
70
|
+
reasoning?: Reasoning;
|
|
71
|
+
autoCompactThresholdTokens?: number;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
type Project = { description?: string } & (
|
|
75
|
+
| { repo: string; ref?: string; workingDirectory?: string } // repo is GitHub "owner/name"
|
|
76
|
+
| { directory: string }
|
|
77
|
+
| {
|
|
78
|
+
projectIds: string[];
|
|
79
|
+
instructions?: string;
|
|
80
|
+
subagents?: { launchModels?: string[] };
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
```
|
|
113
84
|
|
|
114
|
-
|
|
85
|
+
`startup` selects how a new session starts. `{ "source": "workspace" }` uses the workspace's `defaultPersona`, and a preset applies its persona and settings:
|
|
115
86
|
|
|
116
87
|
```json
|
|
117
|
-
{
|
|
88
|
+
{
|
|
89
|
+
"startup": { "source": "preset", "preset": "astra" },
|
|
90
|
+
"presets": {
|
|
91
|
+
"workspace": { "source": "workspace", "label": "Workspace default" },
|
|
92
|
+
"astra": {
|
|
93
|
+
"source": "persona",
|
|
94
|
+
"label": "Astra",
|
|
95
|
+
"persona": "gpt-6-astra-chat",
|
|
96
|
+
"reasoning": "low"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
118
100
|
```
|
|
119
101
|
|
|
120
|
-
|
|
102
|
+
If you omit `presets`, `/persona` offers every persona in the workspace. A preset changes model, tools, and reasoning together and keeps the conversation. `/new` returns to `startup`.
|
|
121
103
|
|
|
122
|
-
|
|
104
|
+
## Access
|
|
123
105
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
## Chat commands
|
|
106
|
+
For a private bot, use both lists. `allowedUserIds` decides who can start work, and `allowedChatIds` decides which DMs and groups the bot talks in. Group IDs are usually negative. Telegram display names do not grant anything.
|
|
127
107
|
|
|
128
|
-
|
|
108
|
+
In an allowed group, a message starts a turn only when it mentions the bot. The last 50 other messages are kept as context for the next turn, labeled with their sender, so add the bot only to groups whose conversation can be sent to the model.
|
|
129
109
|
|
|
130
|
-
##
|
|
110
|
+
## Projects
|
|
131
111
|
|
|
132
|
-
|
|
112
|
+
Each session works in a project:
|
|
133
113
|
|
|
134
|
-
|
|
114
|
+
- A **repository project** clones one GitHub repository into a new workspace for each session. `workingDirectory` sets a subdirectory as the session's working directory.
|
|
115
|
+
- A **directory project** reuses one existing directory for all its sessions, so sessions from different chats can edit the same files at once. Tau never creates or removes the directory. Use an absolute path, because `~` is not expanded. Changing `directory` makes recovery of existing sessions fail.
|
|
116
|
+
- A **composite project** places two or more repository projects in one workspace, under a directory per project ID. Tau writes an `AGENTS.md` listing the members and any `instructions`. Configuration comes from the workspace root, and members' `.tau/config.json` files are not merged.
|
|
135
117
|
|
|
136
118
|
```json
|
|
137
|
-
|
|
138
|
-
"
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
119
|
+
{
|
|
120
|
+
"projects": {
|
|
121
|
+
"web": { "repo": "acme/web", "ref": "main" },
|
|
122
|
+
"api": { "repo": "acme/api" },
|
|
123
|
+
"notes": { "directory": "/srv/tau/notes" },
|
|
124
|
+
"platform": {
|
|
125
|
+
"projectIds": ["web", "api"],
|
|
126
|
+
"instructions": "Keep shared contracts synchronized."
|
|
127
|
+
}
|
|
146
128
|
}
|
|
147
129
|
}
|
|
148
130
|
```
|
|
149
131
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
- A `workspace` preset resolves the workspace's `defaultPersona` each time it is applied.
|
|
153
|
-
- A `persona` preset names a persona ID without an effort suffix. Its optional `reasoning` is one of `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, or `max`, and defaults to the persona's own setting. Its optional `autoCompactThresholdTokens` is [described below](#compaction-thresholds).
|
|
154
|
-
|
|
155
|
-
Every preset needs a non-empty `label`. Keys must be non-empty, without surrounding whitespace. [`/persona <key>`](telegram-commands.md#choose-a-persona-effort-or-prompt) applies a preset by its key.
|
|
156
|
-
|
|
157
|
-
The choices that `/persona` offers depend on `presets`:
|
|
158
|
-
|
|
159
|
-
- Omitted: all personas available in the session's workspace, with their own labels and default settings.
|
|
160
|
-
- `{}`: nothing, and `/persona` is hidden from the command palette. Typing it replies that no presets are configured.
|
|
161
|
-
- With entries: exactly those entries, in the object's order. Integer-like keys sort first, so use non-numeric keys to keep the order you wrote.
|
|
162
|
-
|
|
163
|
-
Buttons show only labels, because a session does not record which preset was applied. `/status` reports the session's actual settings.
|
|
164
|
-
|
|
165
|
-
Applying a preset changes the prompt, model, tools, reasoning, and other persona settings together, and keeps the conversation. It applies them once, so `/effort` then changes only reasoning, and applying the preset again restores its settings.
|
|
166
|
-
|
|
167
|
-
An unavailable persona stays in the menu. Applying it, or a `reasoning` value the persona does not support, reports an error and changes no settings. The value must be in the persona's `allowedReasoningLevels` when that list is non-empty, and a model without reasoning accepts only `none`. A failing preset at `startup` fails the new session.
|
|
168
|
-
|
|
169
|
-
A workspace selection works as in the TUI: an unavailable `defaultPersona` falls back to the first available persona, and its effort suffix skips these checks.
|
|
170
|
-
|
|
171
|
-
Restart the runner after editing `startup` or `presets`. Recovery keeps a session's saved settings and does not reapply them. Reload keeps the session's settings if its persona still exists.
|
|
172
|
-
|
|
173
|
-
## Compaction thresholds
|
|
174
|
-
|
|
175
|
-
A bot's optional `autoCompactThresholdTokens` sets a default for its sessions. A persona preset's optional field of the same name sets a saved session override when the preset is applied, including at startup. Both take a safe integer of at least 50,000 tokens.
|
|
132
|
+
If a bot allows one project, Tau selects it automatically. Otherwise the chat picks one with `/use_<projectId>` or gets `defaultProjectId`. Telegram allows 100 commands per bot, which leaves room for 90 project commands. Relative `workspaceRoot` and `directory` paths resolve from the config file's directory.
|
|
176
133
|
|
|
177
|
-
|
|
134
|
+
Sessions read `~/.config/tau` and the `.tau` directories above the workspace as usual. A project's `.tau/config.json` can start [MCP servers](mcp.md) on the runner machine, so review what you add as a project.
|
|
178
135
|
|
|
179
|
-
|
|
136
|
+
### Workspace lifecycle
|
|
180
137
|
|
|
181
|
-
|
|
138
|
+
Tau prepares a repository or composite workspace once per session, using a bare cache in `<workspaceRoot>-repo-cache`. Restarting the runner reuses the workspace as it is, so configuration changes apply only to workspaces prepared later. `/new` and closing a session delete the workspace, and Tau does not commit or push anything first. If a workspace is missing at recovery, Tau rebuilds it from the current configuration.
|
|
182
139
|
|
|
183
|
-
|
|
140
|
+
### Provision hooks
|
|
184
141
|
|
|
185
|
-
|
|
142
|
+
A repository can include an executable `.tau/scripts/provision` with a shebang. Tau runs it in the session's working directory in new and rebuilt workspaces, without blocking chat. A failure is reported to the chat and leaves the session usable. Directory projects do not run hooks.
|
|
186
143
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
Group context can include attachment paths, audio transcripts, and processing errors. The model receives it as untrusted input.
|
|
190
|
-
|
|
191
|
-
Text and transcribed audio either start or steer a turn. When the session is idle, the message starts a normal turn. When Tau is working, the message steers the running turn: the turn stops at its next safe point and continues with the new message. Further steering is batched as usual. Telegram has no command to queue a separate turn. Use `/interrupt` to stop instead of steering.
|
|
192
|
-
|
|
193
|
-
Tau does not report tool activity or lifecycle events. It sends assistant text, including several messages from one run, and keeps the typing indicator on during work. Long replies are split into parts. Notifications about failed, blocked, and unaccepted turns are kept until Telegram confirms delivery.
|
|
194
|
-
|
|
195
|
-
## Attachments and audio
|
|
196
|
-
|
|
197
|
-
The bot accepts any documents, photos, videos, animations, video notes, audio files, and voice notes. The agent receives the file paths in the execution environment, cleaned-up filenames, MIME types, sizes, and captions. Files are never run on receipt.
|
|
198
|
-
|
|
199
|
-
Limits are 32 attachments per turn, 20 MiB per file, and 100 MiB per turn. Downloads are limited even when Telegram does not report a size. Files that are too large or fail to download are skipped with a warning.
|
|
200
|
-
|
|
201
|
-
Sending a file only queues it, and its caption is kept as metadata. The next text or voice message starts or steers a turn, with one hidden `<system>` block per attachment. Only voice notes are transcribed, up to 20 minutes long. Audio files and audio documents arrive without a transcript. The original voice file stays available even if transcription fails. Transcripts of DMs, and of group messages that mention the bot, are echoed before submission.
|
|
202
|
-
|
|
203
|
-
Files are stored in the execution environment's temporary directory, so system cleanup can remove them. Queued files and group context are cleared on shutdown. Treat file contents and metadata as untrusted.
|
|
204
|
-
|
|
205
|
-
Voice transcription uses ElevenLabs Scribe v2 with `ELEVENLABS_API_KEY`, or else `apiKeys.elevenlabs`. Scribe detects the spoken language and transcribes in verbatim mode, retaining filler words and false starts. Optional spelling hints use GPT-6 Luna (reasoning disabled) with OpenAI credentials. The session's [`speech.vocabulary`](config-reference.md#speech) terms, then the runner's global terms, precede extracted hints and work without OpenAI credentials or conversation context. Without a selected session, Tau does not download or transcribe audio. Transcription fails if the session is not ready. Receiving files needs no ElevenLabs key. See [credentials](credentials.md).
|
|
206
|
-
|
|
207
|
-
When the bot's `speechCleanupStyle` is `default`, GPT-6.1 Terra (reasoning disabled) cleans up each transcript before it is echoed and submitted. It uses the vocabulary and [recent conversation](config-reference.md#speech) only to fix misheard words. Cleanup needs OpenAI credentials. If cleanup fails, the bot uses the transcript without cleanup. It also sends a warning, except for group audio being collected silently as context.
|
|
208
|
-
|
|
209
|
-
`/tts_on` rewrites text with `gpt-6-luna` (reasoning disabled) and generates speech with Eleven v4 Turbo. It requires both OpenAI and ElevenLabs credentials and runner `ffmpeg` with Opus. Voice notes use brisk delivery and 1.15× speed. See [`speech` configuration](config-reference.md#speech) for default and custom voice selection. Source and rewritten text are limited to 10,000 Unicode characters each, and audio to 32 MiB. Rewriting times out after one minute and the whole job after five. Jobs are not saved. On failure, the bot sends `voice response failed. please try again.`; the text reply is unaffected and details go to the logs.
|
|
210
|
-
|
|
211
|
-
## Command client tools
|
|
144
|
+
## Chat commands
|
|
212
145
|
|
|
213
|
-
|
|
146
|
+
| Command | Behavior |
|
|
147
|
+
| --- | --- |
|
|
148
|
+
| `/new` | Replace the active session using the preferred project. |
|
|
149
|
+
| `/use_<projectId>` | Select the project for future `/new` sessions. |
|
|
150
|
+
| `/status` | Show session state, project, model, reasoning, context use, and cost. |
|
|
151
|
+
| `/persona [key]` | Apply a persona or preset while idle, keeping the conversation. |
|
|
152
|
+
| `/effort [level]` | Set reasoning for future turns, also during a turn. |
|
|
153
|
+
| `/prompt [id]` | Add a saved prompt to the conversation without starting a turn. |
|
|
154
|
+
| `/auto_compact [tokens\|default]` | Show or set the compaction threshold. |
|
|
155
|
+
| `/compact` | Compact while idle. |
|
|
156
|
+
| `/interrupt` | Interrupt the running turn. |
|
|
157
|
+
| `/tts_on`, `/tts_off` | Turn voice replies on or off. |
|
|
214
158
|
|
|
215
|
-
|
|
159
|
+
`/persona`, `/effort`, and `/prompt` show buttons when sent alone. With a value they apply it directly, as in `/persona astra`, `/effort low`, or `/prompt release-summary`. A persona value is the preset key when the bot has `presets`, and otherwise the persona ID, never the button label. Values are case-sensitive.
|
|
216
160
|
|
|
217
|
-
|
|
161
|
+
In groups, commands must mention the bot, as in `/status@tau_engineering_bot`.
|
|
218
162
|
|
|
219
|
-
|
|
163
|
+
A message sent while Tau is working steers the running turn. Telegram has no way to queue a separate turn, so wait or use `/interrupt` before starting something unrelated. Users do not see tool activity, and only the agent's text is sent. Tau tells the agent this at the start of each turn.
|
|
220
164
|
|
|
221
|
-
|
|
165
|
+
## Files and voice
|
|
222
166
|
|
|
223
|
-
|
|
167
|
+
The bot accepts documents, photos, videos, and audio, up to 20 MiB per file, 100 MiB per turn, and 32 files per turn. Sending a file only queues it, and the next text or voice message starts a turn with the file paths. Files go to a temporary directory on the runner machine, where system cleanup can remove them.
|
|
224
168
|
|
|
225
|
-
|
|
169
|
+
Voice notes up to 20 minutes are transcribed with `ELEVENLABS_API_KEY`. With `speechCleanupStyle: "default"`, the transcript is also cleaned up as in the [TUI](tui.md#speech), which needs OpenAI credentials, and the raw transcript is used if cleanup fails. `/tts_on` needs OpenAI and ElevenLabs keys and `ffmpeg` with Opus on the runner. See [models and credentials](models-and-credentials.md).
|
|
226
170
|
|
|
227
|
-
|
|
171
|
+
The agent can send files back with these tools, which take `{ path, caption? }`:
|
|
228
172
|
|
|
229
|
-
|
|
173
|
+
| Tool | Delivery | Files | Maximum size |
|
|
174
|
+
| --------------------------- | --------------- | --------- | ------------ |
|
|
175
|
+
| `send_photo_to_telegram` | In-chat photo | JPEG, PNG | 10 MB |
|
|
176
|
+
| `send_video_to_telegram` | Playable video | MPEG4 | 50 MB |
|
|
177
|
+
| `send_audio_to_telegram` | Audio player | MP3, M4A | 50 MB |
|
|
178
|
+
| `send_document_to_telegram` | File attachment | Any | 50 MB |
|
|
230
179
|
|
|
231
|
-
|
|
232
|
-
2. Confirm the runner user can execute `tau`, `git`, and `gh`, and that `gh` can access each repository.
|
|
233
|
-
3. Start the runner and watch for config, polling, command-sync, cache, checkout, and recovery errors. Successful startup prints `tau telegram running`.
|
|
234
|
-
4. In an allowed DM, run `/status`, select a project if needed, then run `/new`.
|
|
235
|
-
5. Send a small, non-sensitive prompt and confirm the reply.
|
|
236
|
-
6. If groups are enabled, check that a message without a mention gets no reply and a command with a mention works.
|
|
237
|
-
7. If there is a provision hook, wait for it to finish or report a failure before relying on what it installs.
|
|
238
|
-
8. Restart the runner normally and use `/status` to confirm the session recovered without resending old replies.
|
|
180
|
+
Calls are not retried, because an interrupted upload may already have arrived. Tau does not convert files, so send unsupported media as a document. The workspace's `enabledClientTools` selects any configured [command tools](client-tools.md), and these run on the runner machine.
|
|
239
181
|
|
|
240
|
-
|
|
182
|
+
## Bot environments
|
|
241
183
|
|
|
242
|
-
|
|
184
|
+
Bots in one runner can use different environment variables, for example to give each bot its own GitHub account:
|
|
243
185
|
|
|
244
|
-
|
|
186
|
+
```json
|
|
187
|
+
{
|
|
188
|
+
"env": {
|
|
189
|
+
"GH_CONFIG_DIR": "/var/lib/assistant-github/gh",
|
|
190
|
+
"GIT_CONFIG_GLOBAL": "/var/lib/assistant-github/gitconfig",
|
|
191
|
+
"GH_TOKEN": "",
|
|
192
|
+
"GITHUB_TOKEN": ""
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
```
|
|
245
196
|
|
|
246
|
-
|
|
197
|
+
Sign in with `GH_CONFIG_DIR=/var/lib/assistant-github/gh gh auth login`. The Git config needs a commit identity and the credential helper:
|
|
247
198
|
|
|
248
|
-
|
|
199
|
+
```ini
|
|
200
|
+
[credential "https://github.com"]
|
|
201
|
+
helper =
|
|
202
|
+
helper = !gh auth git-credential
|
|
203
|
+
[user]
|
|
204
|
+
name = Assistant
|
|
205
|
+
email = assistant@example.com
|
|
206
|
+
```
|
|
249
207
|
|
|
250
|
-
|
|
208
|
+
The empty tokens stop `gh` from using a token in the runner's environment. The map applies to the bot's repository commands and to new sessions, and values are used literally, so use absolute paths. Tau saves the map in each session, so keep secrets out of it. It does not isolate bots from each other, because they share one OS user. Use separate runners under separate accounts when bots must be isolated.
|
|
251
209
|
|
|
252
|
-
|
|
210
|
+
A saved session whose map differs from the bot's current `env` fails recovery. Restore the old `env`, or start over with `/new`, which deletes a repository workspace, so save unfinished work first.
|
|
253
211
|
|
|
254
|
-
|
|
212
|
+
## Restarts
|
|
255
213
|
|
|
256
|
-
|
|
214
|
+
A normal shutdown interrupts running work and disconnects sessions. After a restart, sessions reconnect with their conversation, and unsent failure notices are delivered. A message that Tau never accepted is reported so you can resend it. Do not edit the runner's state files, `<workspaceRoot>-sessions.json` and `<workspaceRoot>-project-preferences.json`.
|
|
257
215
|
|
|
258
|
-
|
|
216
|
+
## When the bot ignores you
|
|
259
217
|
|
|
260
|
-
**
|
|
218
|
+
- **In a DM:** check that the chat and the sender are in the allowlists that are set.
|
|
219
|
+
- **In a group:** the group must be in `allowedChatIds`, the message must mention the bot, and the sender must be in `allowedUserIds` when that is set.
|
|
220
|
+
- **`/new` asks for a project:** set `defaultProjectId` or run `/use_<projectId>`.
|
|
261
221
|
|
|
262
|
-
|
|
222
|
+
The runner log names the failing step for repository preparation, attachments, and delivery.
|