@markusylisiurunen/tau 0.3.82 → 0.3.84
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 +1 -3
- package/dist/core/agent/agent_runtime.js +10 -6
- package/dist/core/agent/agent_runtime.js.map +1 -1
- package/dist/core/cli.js +2 -2
- package/dist/core/cli.js.map +1 -1
- package/dist/core/code_mode/models.js +61 -22
- package/dist/core/code_mode/models.js.map +1 -1
- package/dist/core/commands/auto_compact.js +16 -0
- package/dist/core/commands/auto_compact.js.map +1 -0
- package/dist/core/commands/registry.js +13 -0
- package/dist/core/commands/registry.js.map +1 -1
- package/dist/core/history/cli.js +48 -0
- package/dist/core/history/cli.js.map +1 -1
- package/dist/core/history/history_manager.js +9 -3
- package/dist/core/history/history_manager.js.map +1 -1
- package/dist/core/history/local_history_store.js +9 -2
- package/dist/core/history/local_history_store.js.map +1 -1
- package/dist/core/history/remote_history_client.js +18 -3
- package/dist/core/history/remote_history_client.js.map +1 -1
- package/dist/core/models/openrouter.js +17 -5
- package/dist/core/models/openrouter.js.map +1 -1
- package/dist/core/models/openrouter_decisions.js +16 -1
- package/dist/core/models/openrouter_decisions.js.map +1 -1
- package/dist/core/runtime/chat_runtime.js +5 -0
- package/dist/core/runtime/chat_runtime.js.map +1 -1
- package/dist/core/session/auto_compaction_threshold.js +4 -0
- package/dist/core/session/auto_compaction_threshold.js.map +1 -0
- package/dist/core/static/tau_docs/client-tools.md +53 -53
- package/dist/core/static/tau_docs/config-reference.md +46 -43
- package/dist/core/static/tau_docs/configuration.md +40 -36
- package/dist/core/static/tau_docs/credentials.md +32 -31
- package/dist/core/static/tau_docs/getting-started.md +28 -28
- package/dist/core/static/tau_docs/history.md +114 -79
- package/dist/core/static/tau_docs/image-generation.md +20 -18
- package/dist/core/static/tau_docs/index.md +30 -31
- package/dist/core/static/tau_docs/manifest.json +1 -0
- package/dist/core/static/tau_docs/models.md +17 -17
- package/dist/core/static/tau_docs/node-sdk.md +74 -69
- package/dist/core/static/tau_docs/nook.md +75 -69
- package/dist/core/static/tau_docs/openrouter.md +28 -13
- package/dist/core/static/tau_docs/ownership-and-scope.md +21 -23
- package/dist/core/static/tau_docs/pdf-unpacking.md +6 -6
- package/dist/core/static/tau_docs/personas.md +29 -27
- package/dist/core/static/tau_docs/prompts-and-project-context.md +41 -39
- package/dist/core/static/tau_docs/remote-sessions.md +38 -38
- package/dist/core/static/tau_docs/sdk-diff-review.md +16 -12
- package/dist/core/static/tau_docs/security.md +72 -72
- package/dist/core/static/tau_docs/session-protocol-methods.md +69 -45
- package/dist/core/static/tau_docs/session-protocol.md +59 -52
- package/dist/core/static/tau_docs/sessions.md +112 -88
- package/dist/core/static/tau_docs/skills.md +25 -20
- package/dist/core/static/tau_docs/speech-generation.md +5 -5
- package/dist/core/static/tau_docs/subagents.md +42 -44
- package/dist/core/static/tau_docs/telegram-projects.md +142 -0
- package/dist/core/static/tau_docs/telegram.md +67 -181
- package/dist/core/static/tau_docs/tools.md +72 -80
- package/dist/core/static/tau_docs/troubleshooting.md +94 -149
- package/dist/core/static/tau_docs/tui.md +127 -80
- package/dist/core/subagents/agent_supervisor.js +1 -0
- package/dist/core/subagents/agent_supervisor.js.map +1 -1
- package/dist/core/telegram/adapter.js +31 -1
- package/dist/core/telegram/adapter.js.map +1 -1
- package/dist/core/telegram/session_manager.js +11 -0
- package/dist/core/telegram/session_manager.js.map +1 -1
- package/dist/core/tool/image_generate.js +5 -17
- package/dist/core/tool/image_generate.js.map +1 -1
- package/dist/core/tool/openrouter.js +21 -2
- package/dist/core/tool/openrouter.js.map +1 -1
- package/dist/core/utils/gemini_transcription.js +43 -13
- package/dist/core/utils/gemini_transcription.js.map +1 -1
- package/dist/core/utils/model_stream.js +17 -1
- package/dist/core/utils/model_stream.js.map +1 -1
- package/dist/core/version.js +2 -2
- package/dist/diff_tool/app/dist/assets/{angular-html-D20byCHL.js → angular-html-Dr923UVo.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{angular-ts-CvVQslm2.js → angular-ts-DOChuIbB.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{apl-DNIxlYWe.js → apl-Bs_bcAcm.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{astro-DDOw4EUG.js → astro-a4yvqyGV.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{blade-DlhB-SLW.js → blade-BD5OxwVc.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{c-C1f4vhDm.js → c-CPWQkPLc.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{chapel-Ctt8xOX1.js → chapel-DaQatW92.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{cobol-BXw71PAA.js → cobol-Dv7H5p9m.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{coffee-CRh_5Nmr.js → coffee-BUGvGi57.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{cpp-IlI-zWOZ.js → cpp-fo_wPsB8.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{crystal-CXeL28i7.js → crystal--pI-R_dD.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{css-BfST9hFI.js → css-BssyxPkY.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{edge--Q22k_ty.js → edge-CZ8t3-Ec.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{elixir-CIfC_rQx.js → elixir-UZt0J7RJ.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{elm-OkZ29XRO.js → elm-DIbchse0.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{erb-B8ZXgEqv.js → erb-BOBhlFtI.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{git-rebase-CxkO_WGd.js → git-rebase-BAOt70YV.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{glimmer-js-BVadyIrr.js → glimmer-js-CEvU-NQC.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{glimmer-ts-D5J3Qb7n.js → glimmer-ts-BTMr7YQb.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{glsl-B6iy73-Y.js → glsl-BdwQytbZ.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{graphql-Dc3rUXf5.js → graphql-MVXf_Gip.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{hack-q8Utf8Jp.js → hack-BKsyThYd.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{haml-mjMIlj_2.js → haml-aYjo4kTQ.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{handlebars-CA-BL8Ks.js → handlebars-CkBj5nNj.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{html-BmPxhYCX.js → html-V_XLZjq3.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{html-derivative-CvknIjuB.js → html-derivative-CLtkZVT2.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{http-DNxLDRIi.js → http-nUN1ldGy.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{hurl-kbd3Eq2V.js → hurl-BBwLfekr.js} +1 -1
- package/dist/diff_tool/app/dist/assets/index-Dt2v7POE.js +341 -0
- package/dist/diff_tool/app/dist/assets/{java-BuZshgf1.js → java-DLkxtNEL.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{javascript-DfL2oeFU.js → javascript-CVr4Rx0e.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{jinja-Bu0KQihU.js → jinja-BOSJTyD0.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{jison-Bqn7Mf3Q.js → jison-Di3-hBGP.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{json-BuX5LKaB.js → json-D9C8xfZt.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{jsx-DdVJ-ZBp.js → jsx-CUDhGSfU.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{julia-CQeijOoQ.js → julia-CRy8R7YY.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{just-vzAktFGR.js → just-tUqjHI43.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{latex-Dm60cg0k.js → latex-8_LCZmZN.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{liquid-vxKzm2P8.js → liquid-CvGorueR.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{lua-DIoqi4dd.js → lua-DR_7pVFC.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{marko-BTHgFKby.js → marko-sTN8ZOd5.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{mdc-CEfz8gZ9.js → mdc-xRsS5Ubl.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{nginx-DNlFDEfJ.js → nginx-ypaVSshx.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{nim-DnvT_0lZ.js → nim-DTc1FpAl.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{org-BbD-ElVf.js → org-B7I2tEAw.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{perl-DTsbnAmK.js → perl-CTNhHvKx.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{php-CwEsJe-W.js → php-LzxyOsOP.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{pug-BOttMVH-.js → pug-D5FIy7qc.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{qml-C8KkSItN.js → qml-CfdV5Js7.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{r-K4ksJj_R.js → r-CZ-EMZDs.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{razor-yuWRrrG6.js → razor-BhyBjPmN.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{regexp-CV-jhnUz.js → regexp-iPvMX04S.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{rst-CLA3Attc.js → rst-Dpp9DE6Q.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{ruby-DiHR2-DX.js → ruby-CVyShlOK.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{sas-DxIjbYJ5.js → sas-DFmollAV.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{scss-CShwEaV4.js → scss-Di6lsIQE.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{shellscript-CeezOnrF.js → shellscript-CRHervLi.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{shellsession-CjSS2r7j.js → shellsession-CHP7Q5Ym.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{soy-CI_v23nJ.js → soy-CNXyGE_T.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{sql-D9GaB00A.js → sql-DnPFF_uz.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{stata-hK92TPE_.js → stata-CobN2W6n.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{surrealql-UO8LtPJG.js → surrealql-DqvGXHs7.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{svelte-kIlaw_oh.js → svelte-ChhfFBzQ.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{templ-DFRz1JP6.js → templ-DKi2U_4-.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{tex-CfxIXk_z.js → tex-Cjl-M5D5.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{ts-tags-BtUHl0ff.js → ts-tags-CV2veQhe.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{tsx-Cd4SAe2C.js → tsx-Dw0DYsvT.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{twig-CWk4q5Y3.js → twig-r46-w1o_.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{typescript-BqxGJiP0.js → typescript-QuYM-098.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{typst-D9nAun2p.js → typst-B9jAU5LS.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{vue-D6HYhg6_.js → vue-CIrFiYWU.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{vue-html-1VRlaENS.js → vue-html-bfczklzO.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{vue-vine-BaH0We9y.js → vue-vine-BmBCOwQI.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{xml-C4RWnUuj.js → xml-DYPsS0xh.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{xsl-D1iD38ga.js → xsl-DZFDwCkt.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{yaml-yAb4W0G-.js → yaml-9CQ32JJD.js} +1 -1
- package/dist/diff_tool/app/dist/index.html +1 -1
- package/dist/history/worker/index.js +87 -83
- package/dist/history/worker/index.js.map +1 -1
- package/dist/host/hosted_ephemeral_agent_session.js +1 -0
- package/dist/host/hosted_ephemeral_agent_session.js.map +1 -1
- package/dist/host/local_session_host.js +30 -1
- package/dist/host/local_session_host.js.map +1 -1
- package/dist/host/session_protocol_handler.js +18 -0
- package/dist/host/session_protocol_handler.js.map +1 -1
- package/dist/main.js +6 -7
- package/dist/main.js.map +1 -1
- package/dist/protocol/index.d.ts +1 -1
- package/dist/protocol/index.js.map +1 -1
- package/dist/protocol/session_protocol.d.ts +13 -2
- package/dist/protocol/session_protocol.js +31 -1
- package/dist/protocol/session_protocol.js.map +1 -1
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/session.js +11 -0
- package/dist/sdk/session.js.map +1 -1
- package/dist/sdk/types.d.ts +2 -0
- package/dist/store/session_snapshot_migrations.js +19 -1
- package/dist/store/session_snapshot_migrations.js.map +1 -1
- package/dist/tui/session_chat_controller.js +41 -4
- package/dist/tui/session_chat_controller.js.map +1 -1
- package/dist/tui/terminal.js +1 -0
- package/dist/tui/terminal.js.map +1 -1
- package/dist/tui/ui/chat_container.js +34 -17
- package/dist/tui/ui/chat_container.js.map +1 -1
- package/dist/tui/ui/footer.js +2 -4
- package/dist/tui/ui/footer.js.map +1 -1
- package/package.json +11 -10
- package/dist/diff_tool/app/dist/assets/index-D8ZI_2RC.js +0 -340
- package/dist/nook/README.md +0 -123
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
# Subagents
|
|
2
2
|
|
|
3
|
-
Subagents are
|
|
3
|
+
Subagents are background agents that the main agent starts and the host supervises. They help when part of the work can run independently or benefits from a separate context. A subagent belongs to its parent session. It is not a session of its own and has no persona file.
|
|
4
4
|
|
|
5
5
|
## Background workers
|
|
6
6
|
|
|
7
|
-
Subagents are general-purpose
|
|
7
|
+
Subagents are general-purpose workers. There are no named types. Several can run at once, each with its own task and conversation.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
A subagent behaves like the active main persona, wrapped in instructions that Tau maintains. Those instructions and the subagent's description cannot be configured. Put task-specific instructions, including any relevant skill guidance, in the launch prompt.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Whether the agent can start subagents depends on the main persona's tool list. Built-in personas, and custom personas that omit `tools`, enable all five subagent tools. A custom persona with a `tools` list that lacks `spawn_agent` cannot start subagents. Leave out all five subagent tools when no subagent interaction is wanted. There is no other setting to turn subagents on or off. See [personas](personas.md).
|
|
12
12
|
|
|
13
13
|
## Trigger sensitivity
|
|
14
14
|
|
|
15
|
-
The main agent
|
|
15
|
+
The main agent starts subagents only when the user or active instructions explicitly ask for delegation. Ask in ordinary language; no special tag is needed. The request itself does not create a subagent: the main agent still has to call `spawn_agent`.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
The agent follows this rule itself. Tau checks that a launch is valid, but it does not judge whether the request really asked for delegation.
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## Tools
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
A subagent can receive these tools:
|
|
22
22
|
|
|
23
23
|
- `bash`
|
|
24
24
|
- `write`
|
|
@@ -30,31 +30,29 @@ The eligible inherited tools are:
|
|
|
30
30
|
- `mcp`, when the host has enabled MCP servers
|
|
31
31
|
- `models`
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
A subagent gets each of these that the main persona also has. For example, a main persona with `bash`, `edit`, `history`, and `spawn_agent` gives its subagents `bash`, `edit`, and `history`. Names such as `web` and `history` enable the matching capability in the subagent's `code` tool. MCP uses the host's existing connections, whatever the subagent's working directory. There is no separate tool list for subagents.
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
Subagents cannot launch other subagents: supervision tools are never included in a child's registry. See [tools](tools.md) for the broader availability contract.
|
|
35
|
+
Every subagent also gets the built-in `tau_docs` tool, and a persona's `tools` list cannot remove it. Subagents never get the subagent tools, client tools, or TUI tools, so a subagent cannot start subagents of its own. See [tools](tools.md) for how tool availability works in general.
|
|
38
36
|
|
|
39
37
|
## Models and settings
|
|
40
38
|
|
|
41
|
-
By default, a new subagent
|
|
39
|
+
By default, a new subagent uses the active persona's model and all of its settings, including reasoning and service tier. These are fixed when the subagent starts. Later persona or reasoning changes do not affect it.
|
|
42
40
|
|
|
43
|
-
A
|
|
41
|
+
A model override uses this exact form:
|
|
44
42
|
|
|
45
43
|
```text
|
|
46
44
|
<provider>/<model>:<effort>
|
|
47
45
|
```
|
|
48
46
|
|
|
49
|
-
The provider is
|
|
47
|
+
The provider is lowercased. The model ID is kept exactly as written and is case-sensitive. Effort is one of `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, or `max`.
|
|
50
48
|
|
|
51
|
-
The configured launch
|
|
49
|
+
The configured list of launch models is an allowlist. It does not choose a default. The main agent should normally omit the `model` argument to `spawn_agent`, and the subagent then uses the active persona's model and reasoning. When `model` is given, it must exactly match an allowlist entry after normalization. The override changes the provider, model, and reasoning, and keeps the other settings.
|
|
52
50
|
|
|
53
|
-
|
|
51
|
+
A model ID may be missing from the catalog if its provider is known (see [models](models.md)). An entry with an invalid provider, model, effort, or format makes the configuration field invalid. Duplicate entries are removed.
|
|
54
52
|
|
|
55
53
|
### Allowing model overrides
|
|
56
54
|
|
|
57
|
-
Configure the
|
|
55
|
+
Configure the allowlist with `subagents.launchModels` in `config.json`:
|
|
58
56
|
|
|
59
57
|
```json
|
|
60
58
|
{
|
|
@@ -67,66 +65,66 @@ Configure the built-in worker’s launch allowlist through `subagents.launchMode
|
|
|
67
65
|
}
|
|
68
66
|
```
|
|
69
67
|
|
|
70
|
-
|
|
68
|
+
The nearest `launchModels` list replaces broader ones; lists are not combined. The resulting list applies to every persona that has `spawn_agent`.
|
|
71
69
|
|
|
72
|
-
## Working
|
|
70
|
+
## Working directory
|
|
73
71
|
|
|
74
|
-
`spawn_agent` normally runs the
|
|
72
|
+
`spawn_agent` normally runs the subagent in the main session's `cwd`. The optional `workingDirectory` may be absolute or relative to that `cwd`. Tau resolves it to an absolute path on the execution environment.
|
|
75
73
|
|
|
76
|
-
When
|
|
74
|
+
When that path differs from the parent's `cwd`, Tau rebuilds the subagent's context for the new directory. It detects the platform and repository there, reads the applicable `AGENTS.md` files, and discovers that directory's skills.
|
|
77
75
|
|
|
78
|
-
The
|
|
76
|
+
The new directory does **not** change the subagent's persona, model catalog, runtime configuration, credentials, or tool policy. Those always come from the parent session. Configuration in the new directory is read only where context needs it, such as for skill discovery.
|
|
79
77
|
|
|
80
|
-
|
|
78
|
+
`workingDirectory` is always a path on the execution environment, which matters in monorepos and hosted environments. The host and attached clients never resolve it against their own filesystems.
|
|
81
79
|
|
|
82
|
-
A launch
|
|
80
|
+
A launch fails if Tau cannot build context for the directory, if the directory is invalid for the environment, or if the environment cannot resolve working directories. A path that resolves to the parent's `cwd`, such as `.`, reuses the parent's context.
|
|
83
81
|
|
|
84
|
-
## Lifecycle and
|
|
82
|
+
## Lifecycle and subagent tools
|
|
85
83
|
|
|
86
|
-
|
|
84
|
+
Each subagent has an ID that the host generates.
|
|
87
85
|
|
|
88
86
|
### Spawn
|
|
89
87
|
|
|
90
|
-
`spawn_agent`
|
|
88
|
+
`spawn_agent` takes a title, a prompt, an optional model, and an optional working directory. The prompt is the subagent's only initial input, so it should be self-contained. The call returns right away with the new ID, and the subagent keeps working in the background.
|
|
91
89
|
|
|
92
|
-
At most eight
|
|
90
|
+
At most eight subagents can be running at once in one main session. Subagents that have finished or been interrupted do not count toward this limit.
|
|
93
91
|
|
|
94
92
|
### Observe and wait
|
|
95
93
|
|
|
96
|
-
`list_agents` returns every
|
|
94
|
+
`list_agents` returns every subagent with its ID, name, title, model and reasoning, working directory, run state, context usage, cost, and whether a response is ready. Use it to find an ID again or to check progress.
|
|
97
95
|
|
|
98
|
-
`wait_for_agents`
|
|
96
|
+
`wait_for_agents` takes one or more IDs. It returns as soon as at least one of them finishes, with the current state of all of them. A finished response stays readable through later waits until a follow-up run replaces it.
|
|
99
97
|
|
|
100
|
-
The host also
|
|
98
|
+
The host also sends live subagent activity to attached clients for display. It is a summary for display, and the final response from these tools remains the real result.
|
|
101
99
|
|
|
102
100
|
### Follow up
|
|
103
101
|
|
|
104
|
-
`send_input_to_agent` starts another run on an
|
|
102
|
+
`send_input_to_agent` starts another run on an idle subagent. The subagent keeps its conversation, model, settings, tools, and working directory. It must finish or be interrupted before it accepts more input.
|
|
105
103
|
|
|
106
|
-
|
|
104
|
+
A follow-up replaces the subagent's previous response, so read anything you need first. Follow-ups do not pick up a changed persona definition or a reloaded allowlist.
|
|
107
105
|
|
|
108
106
|
### Interrupt
|
|
109
107
|
|
|
110
|
-
`interrupt_agent`
|
|
108
|
+
`interrupt_agent` asks the current run to stop and waits for the subagent's latest state. The subagent stays available for follow-up input. On an idle subagent, the call just returns its state.
|
|
111
109
|
|
|
112
|
-
|
|
110
|
+
In the TUI, `Ctrl+G` interrupts the selected running subagent. Interrupting the main session does not interrupt subagents, and interrupting a subagent does not interrupt the main session.
|
|
113
111
|
|
|
114
112
|
## Detach, rewind, and recovery
|
|
115
113
|
|
|
116
|
-
Subagents
|
|
114
|
+
Subagents belong to the running session on the host, not to an attached TUI. Detaching a client, or losing the connection, does not stop them while the session stays alive. Another client can attach to the session and see their current state.
|
|
117
115
|
|
|
118
|
-
|
|
116
|
+
Subagents do not survive the end of a session on the host or a host restart. Their status may be saved while the session is live, but recovery removes those records, because the subagents' conversations no longer exist. A recovered session cannot send input to an old subagent ID.
|
|
119
117
|
|
|
120
|
-
Rewind also removes
|
|
118
|
+
Rewind also removes subagents that were started by an assistant message the rewind removed. Host shutdown or session disposal interrupts and removes all subagents.
|
|
121
119
|
|
|
122
|
-
Plan
|
|
120
|
+
Plan long work with this in mind. Important results should reach the main agent and end up in the session history or in project files before the session on the host goes away. [Sessions](sessions.md) covers saving and recovery in general.
|
|
123
121
|
|
|
124
122
|
## Reloading and validation
|
|
125
123
|
|
|
126
|
-
|
|
124
|
+
Changes to persona tools or to the launch allowlist apply after `/reload` in an idle session, or in a new session. Reload affects only new launches. Running subagents, and follow-ups to them, keep their existing setup.
|
|
127
125
|
|
|
128
|
-
`subagents.launchModels` must be
|
|
126
|
+
`subagents.launchModels` must be an array of valid `<provider>/<model>:<effort>` strings. Unknown providers, invalid efforts, and malformed entries produce configuration warnings.
|
|
129
127
|
|
|
130
|
-
|
|
128
|
+
A launch can fail because of invalid arguments, a model outside the allowlist, the concurrency limit, a prompt that cannot be built, or a working directory whose context cannot be built. Follow-up, wait, and interrupt calls reject unknown IDs. A follow-up also fails while the subagent is still running.
|
|
131
129
|
|
|
132
|
-
|
|
130
|
+
Before starting a local TUI, `tau --debug --persona <id>` shows which tools are available, the model and settings subagents inherit, and the subagents' tool list. In a running session, `/reload` reports file warnings and `list_agents` shows live subagent state.
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# Telegram projects and workspaces
|
|
2
|
+
|
|
3
|
+
A Telegram runner starts every session in a project. The project decides which repository or directory the session works in, how its workspace is prepared, and what happens to the workspace when the session ends or the runner restarts. Projects are defined under `projects` in the runner's config file and offered to chats per bot, as described in [Telegram](telegram.md).
|
|
4
|
+
|
|
5
|
+
## Project IDs and common fields
|
|
6
|
+
|
|
7
|
+
Project IDs become `/use_<projectId>` command suffixes. They must contain only lowercase letters, digits, and underscores, and may be at most 28 characters:
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
ledger
|
|
11
|
+
platform_api
|
|
12
|
+
release2026
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Every project can have an optional non-empty `description`. Repository and persistent-directory projects can select `persona` as `<id>` or `<id>:<reasoning>`. Composite projects require their own persona. Sessions load applicable `AGENTS.md` instructions.
|
|
16
|
+
|
|
17
|
+
Each project must define exactly one workspace source: `repo`, `directory`, or `projectIds`.
|
|
18
|
+
|
|
19
|
+
## Repository projects
|
|
20
|
+
|
|
21
|
+
A repository project clones one GitHub repository into a session-specific managed workspace:
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"projects": {
|
|
26
|
+
"ledger": {
|
|
27
|
+
"repo": "acme/ledger",
|
|
28
|
+
"ref": "main",
|
|
29
|
+
"workingDirectory": "packages/api",
|
|
30
|
+
"persona": "gpt-6.1-sol-coder"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
`repo` must be a GitHub `owner/repo`; other Git URLs are not accepted. The runner needs `gh` and `git` on its login shell's `PATH`, and `gh` must already be signed in with access to the repository.
|
|
37
|
+
|
|
38
|
+
All managed projects use the top-level `workspaceRoot`. A session workspace is:
|
|
39
|
+
|
|
40
|
+
```text
|
|
41
|
+
<effective-workspace-root>/<project-id>/<telegram-session-id>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
`workingDirectory` is optional and must be a relative directory inside the clone. Tau validates that it exists and does not escape the repository, then uses it as the session `cwd`. Without it, the repository root is the `cwd`.
|
|
45
|
+
|
|
46
|
+
`ref` is optional and is passed to `git checkout` after cloning. Without it, the clone's default branch remains checked out. Configure a ref when sessions must begin from a predictable branch or commit.
|
|
47
|
+
|
|
48
|
+
### Repository caches
|
|
49
|
+
|
|
50
|
+
Tau keeps a persistent bare cache at:
|
|
51
|
+
|
|
52
|
+
```text
|
|
53
|
+
<effective-workspace-root>-repo-cache/<project-id>.git
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
The first preparation uses `gh repo clone <owner/repo> <cache> -- --bare`. Later preparations fetch and prune the cache, then create the session workspace with a shared local clone. If the repository configured for the same project ID changes, Tau discards and recreates that cache.
|
|
57
|
+
|
|
58
|
+
Sessions never work in the cache directly.
|
|
59
|
+
|
|
60
|
+
## Persistent-directory projects
|
|
61
|
+
|
|
62
|
+
A persistent-directory project reuses one existing directory instead of creating a managed clone:
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
{
|
|
66
|
+
"projects": {
|
|
67
|
+
"notes": {
|
|
68
|
+
"directory": "/srv/tau/notes",
|
|
69
|
+
"persona": "gpt-6.1-sol-coder"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Relative `directory` paths resolve from the Telegram config file's directory. JSON does not expand `~`, so use an absolute path when referring to a home directory.
|
|
76
|
+
|
|
77
|
+
The directory must already exist. Tau never creates, replaces, provisions, or removes it. `/new`, session close, runner shutdown, and startup cleanup all preserve it.
|
|
78
|
+
|
|
79
|
+
Every session of this project works in the same directory, including sessions from different chats or bots, and Tau does not stop them from editing at the same time. If the directory cannot handle that, use `maxSessions`, per-bot projects, and allowlists to prevent it.
|
|
80
|
+
|
|
81
|
+
Persistent-directory sessions have no `repository` attribute. On recovery, the configured directory must match the one saved in the session. Changing `directory` does not move existing sessions; their recovery fails instead.
|
|
82
|
+
|
|
83
|
+
## Composite projects
|
|
84
|
+
|
|
85
|
+
A composite project creates a root containing multiple repositories:
|
|
86
|
+
|
|
87
|
+
```json
|
|
88
|
+
{
|
|
89
|
+
"projects": {
|
|
90
|
+
"web": { "repo": "acme/web", "ref": "main" },
|
|
91
|
+
"api": { "repo": "acme/api", "workingDirectory": "services/http" },
|
|
92
|
+
"platform": {
|
|
93
|
+
"projectIds": ["web", "api"],
|
|
94
|
+
"persona": "gpt-6.1-sol-coder:high",
|
|
95
|
+
"instructions": "Keep shared contracts synchronized.",
|
|
96
|
+
"subagents": {
|
|
97
|
+
"launchModels": ["openai/gpt-6.1-sol:high"]
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
`projectIds` requires at least two unique repository projects; directories and composites are invalid members. Order controls workspace context and history `repository`.
|
|
105
|
+
|
|
106
|
+
Members are placed at `<composite-root>/<member-project-id>` and use each repository's cache, ref, and working directory. The root is the session's `cwd`. When the workspace is created, Tau writes a root `AGENTS.md` that lists the members and any `instructions`, and a root `.tau/config.json` containing `subagents` or `{}`. These are ordinary workspace files. They do not follow later Telegram configuration changes and are not rewritten when a preserved session reconnects.
|
|
107
|
+
|
|
108
|
+
`subagents.launchModels` sets which models subagents may be started with. See [subagents](subagents.md) for the syntax and inheritance.
|
|
109
|
+
|
|
110
|
+
The composite's settings apply to the whole session: persona, subagents, model catalog, configuration, and tools. Members' `.tau/config.json` files are not merged. A subagent started in a member directory rebuilds only the context that depends on the directory: environment and repository details, the applicable `AGENTS.md`, and the skills found there.
|
|
111
|
+
|
|
112
|
+
If any member cannot be prepared, Tau removes the whole composite workspace. Composite workspaces and member caches use the top-level `workspaceRoot`.
|
|
113
|
+
|
|
114
|
+
## Managed workspace lifecycle
|
|
115
|
+
|
|
116
|
+
Repository and composite projects work the same way. Tau prepares one workspace per session, and the session keeps working there. A normal runner restart reconnects without fetching or checking out repositories, running provision hooks, or rewriting generated files. Changes to workspace preparation in the Telegram config affect only workspaces prepared later.
|
|
117
|
+
|
|
118
|
+
If the expected workspace is missing, recovery reconstructs it from the caches and current project configuration. `/new` and session close remove a managed workspace; normal shutdown preserves it. Tau does not commit, push, or save uncommitted changes elsewhere.
|
|
119
|
+
|
|
120
|
+
## Managed workspace safety
|
|
121
|
+
|
|
122
|
+
**Important:** startup removes entries under managed workspace roots that no persisted session references. Dedicate these roots to Tau; never use a home directory, repository collection, or unrelated tree.
|
|
123
|
+
|
|
124
|
+
Tau preserves referenced managed workspaces, configured persistent directories, and repository caches. `/new` closes the active session before replacing it. Closing a repository or composite session interrupts work and removes its workspace; persistent directories remain untouched.
|
|
125
|
+
|
|
126
|
+
## Provision hooks
|
|
127
|
+
|
|
128
|
+
A repository can include `.tau/scripts/provision` at its root. It must be a regular executable file, not a symlink, and start with a shebang. Tau runs it in the session's working directory once the session is available, without blocking chat input.
|
|
129
|
+
|
|
130
|
+
New and reconstructed workspaces run their hooks; preserved workspaces and persistent-directory projects do not. Composite sessions run member hooks in order and continue after failures. A failure is reported to linked chats but leaves the session usable. Keep hooks repeatable and non-interactive.
|
|
131
|
+
|
|
132
|
+
## Troubleshooting
|
|
133
|
+
|
|
134
|
+
**Repository preparation fails.** Check that the runner machine has `gh` signed in with access to the repository, `git`, and network access. Check `repo`, `ref`, the workspace root's permissions and free space, and that `workingDirectory` exists after checkout. Changing the repository of an existing project ID rebuilds its cache. Do not delete caches or workspaces first; keep the logs and fix access or configuration.
|
|
135
|
+
|
|
136
|
+
**Startup removed unexpected files.** The workspace root was not dedicated to Tau. Stop the runner and move `workspaceRoot` to an empty directory of its own before restarting. Tau cannot restore unrelated files it deleted.
|
|
137
|
+
|
|
138
|
+
**Provisioning fails but chat still works.** This is intended: a provisioning failure does not break the session. Fix the executable bit, shebang, script, or dependencies. Then run the script by hand if it supports that, or start a new session to provision again.
|
|
139
|
+
|
|
140
|
+
**A persistent-directory session fails recovery.** Recovery rejects a saved `cwd` that differs from the configured directory. Restore the directory at its original path, or set the project config back, or start a new session in the new directory. Tau does not move an existing session to a new directory.
|
|
141
|
+
|
|
142
|
+
**A recovered session does not match the current configuration.** Preserved workspaces are used as they are, and composite root files are not regenerated, so configuration changes apply only to new workspaces. Recovery also needs the same `workspaceRoot`, project definitions, host home, and Tau sessions. Check the runner logs and `/status`. Do not edit runner state, project preferences, saved sessions, or managed workspaces to force a match.
|