@markusylisiurunen/tau 0.2.66 → 0.2.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/README.md +45 -57
  2. package/dist/core/async/cli.js +150 -181
  3. package/dist/core/async/cli.js.map +1 -1
  4. package/dist/core/async/server_config.js +5 -8
  5. package/dist/core/async/server_config.js.map +1 -1
  6. package/dist/core/async/session_manager.js +65 -72
  7. package/dist/core/async/session_manager.js.map +1 -1
  8. package/dist/core/async/telegram.js +57 -6
  9. package/dist/core/async/telegram.js.map +1 -1
  10. package/dist/core/auth/auth_manager.js.map +1 -1
  11. package/dist/core/auth/auth_storage.js +55 -76
  12. package/dist/core/auth/auth_storage.js.map +1 -1
  13. package/dist/core/auth/credential_resolver.js +11 -1
  14. package/dist/core/auth/credential_resolver.js.map +1 -1
  15. package/dist/core/auth/jwt.js +9 -9
  16. package/dist/core/auth/jwt.js.map +1 -1
  17. package/dist/core/auth/providers/openai_codex.js +128 -194
  18. package/dist/core/auth/providers/openai_codex.js.map +1 -1
  19. package/dist/core/cli.js +40 -48
  20. package/dist/core/cli.js.map +1 -1
  21. package/dist/core/config/content_loader.js +118 -54
  22. package/dist/core/config/content_loader.js.map +1 -1
  23. package/dist/core/config/markdown_frontmatter.js.map +1 -1
  24. package/dist/core/config/paths.js +2 -1
  25. package/dist/core/config/paths.js.map +1 -1
  26. package/dist/core/config/runtime.js +13 -4
  27. package/dist/core/config/runtime.js.map +1 -1
  28. package/dist/core/config/schema.js +41 -45
  29. package/dist/core/config/schema.js.map +1 -1
  30. package/dist/core/config/skills_loader.js +5 -10
  31. package/dist/core/config/skills_loader.js.map +1 -1
  32. package/dist/core/config/virtual_bundle.js +1 -1
  33. package/dist/core/config/virtual_bundle.js.map +1 -1
  34. package/dist/core/events/parser.js +47 -25
  35. package/dist/core/events/parser.js.map +1 -1
  36. package/dist/core/install/cli.js +10 -4
  37. package/dist/core/install/cli.js.map +1 -1
  38. package/dist/core/models/catalog.js +409 -0
  39. package/dist/core/models/catalog.js.map +1 -0
  40. package/dist/core/models/tau_extensions.js +2 -0
  41. package/dist/core/models/tau_extensions.js.map +1 -0
  42. package/dist/core/personas.js +7 -7
  43. package/dist/core/personas.js.map +1 -1
  44. package/dist/core/session/session_engine.js +30 -1
  45. package/dist/core/session/session_engine.js.map +1 -1
  46. package/dist/core/subagents/control_plane.js +5 -2
  47. package/dist/core/subagents/control_plane.js.map +1 -1
  48. package/dist/core/subagents/launch_model.js +9 -15
  49. package/dist/core/subagents/launch_model.js.map +1 -1
  50. package/dist/core/subagents/subagent_engine.js +3 -4
  51. package/dist/core/subagents/subagent_engine.js.map +1 -1
  52. package/dist/core/tools/registry.js.map +1 -1
  53. package/dist/core/tools/send_input_to_agent.js +1 -0
  54. package/dist/core/tools/send_input_to_agent.js.map +1 -1
  55. package/dist/core/tools/spawn_agent.js +18 -2
  56. package/dist/core/tools/spawn_agent.js.map +1 -1
  57. package/dist/core/usage/cli.js +150 -130
  58. package/dist/core/usage/cli.js.map +1 -1
  59. package/dist/core/utils/agents_files.js +5 -1
  60. package/dist/core/utils/agents_files.js.map +1 -1
  61. package/dist/core/utils/model_stream.js +30 -4
  62. package/dist/core/utils/model_stream.js.map +1 -1
  63. package/dist/core/version.js +1 -1
  64. package/dist/main.js +5 -4
  65. package/dist/main.js.map +1 -1
  66. package/dist/tui/chat_controller/session_maintenance_service.js +10 -8
  67. package/dist/tui/chat_controller/session_maintenance_service.js.map +1 -1
  68. package/dist/tui/chat_controller.js +10 -18
  69. package/dist/tui/chat_controller.js.map +1 -1
  70. package/package.json +4 -4
  71. package/dist/core/utils/type_guards.js +0 -4
  72. package/dist/core/utils/type_guards.js.map +0 -1
package/README.md CHANGED
@@ -31,7 +31,7 @@ or store keys in `~/.config/tau/config.json`:
31
31
  }
32
32
  ```
33
33
 
34
- for provider keys (`anthropic`, `openai`, `google`), tau checks `~/.config/tau/config.json` before environment variables.
34
+ for built-in providers and features, use these `apiKeys` entries: `anthropic`, `openai`, `google`, `parallel`, and `mistral`. tau checks the matching `apiKeys.<provider>` entry before environment variables.
35
35
 
36
36
  `parallel` is only needed for `web_search`/`web_fetch` usage in sub-agents and can be provided through `apiKeys.parallel` or `PARALLEL_API_KEY` (`PARALLEL_API_KEY` takes precedence).
37
37
 
@@ -45,10 +45,7 @@ to use the OpenAI Codex subscription provider (`openai-codex`), run:
45
45
  tau auth login codex
46
46
  ```
47
47
 
48
- this prints a login URL and starts a local callback server on `127.0.0.1:1455`. complete the
49
- login in your browser and tau will store tokens in `~/.config/tau/auth.json`. if port `1455`
50
- is already in use, or the browser callback fails, tau will prompt you to paste the redirect
51
- URL/code. if you see token refresh errors later, run the login command again to re-authenticate.
48
+ this prints a login URL and starts a local callback server on `127.0.0.1:1455`. complete the login in your browser and tau will store tokens in `~/.config/tau/auth.json`. if port `1455` is already in use, or the browser callback fails, tau will prompt you to paste the redirect URL/code. if you see token refresh errors later, run the login command again to re-authenticate.
52
49
 
53
50
  to list authenticated accounts and usage:
54
51
 
@@ -62,17 +59,13 @@ to remove stored credentials:
62
59
  tau auth logout codex --account <email>
63
60
  ```
64
61
 
65
- to force a specific Codex account for this run, set `TAU_CODEX_ACCOUNT` to the
66
- account email or account id (same matching as `auth logout`). when set, tau will
67
- only use that account and will not fail over.
62
+ to force a specific Codex account for this run, set `TAU_CODEX_ACCOUNT` to the account email or account id (same matching as `auth logout`). when set, tau will only use that account and will not fail over.
68
63
 
69
- `openai-codex` does **not** use `OPENAI_API_KEY` or `apiKeys.openai`; it relies on the OAuth
70
- tokens in `~/.config/tau/auth.json`.
64
+ `openai-codex` does **not** use `OPENAI_API_KEY` or `apiKeys.openai`; it relies on the OAuth tokens in `~/.config/tau/auth.json`.
71
65
 
72
66
  ## usage logging
73
67
 
74
- tau writes JSONL usage logs to `~/.config/tau/logs/usage-YYYY-MM-DD.jsonl` for every assistant
75
- response (main and sub-agent). summarize usage with:
68
+ tau writes JSONL usage logs to `~/.config/tau/logs/usage-YYYY-MM-DD.jsonl` for every assistant response (main and sub-agent). summarize usage with:
76
69
 
77
70
  ```sh
78
71
  tau usage --since 2025-01-01 --persona gpt-5.2-coder
@@ -116,11 +109,9 @@ tau async cron runs [jobId]
116
109
  tau async cron run <jobId>
117
110
  ```
118
111
 
119
- project id for `tau async <prompt...>` resolves from `--project <id>` first, then
120
- `async.client.defaultProjectId` from config.
112
+ project id for `tau async <prompt...>` resolves from `--project <id>` first, then `async.client.defaultProjectId` from config.
121
113
 
122
- use `tau async -- <prompt...>` when prompt text starts with a reserved command word (for example,
123
- `list`).
114
+ use `tau async -- <prompt...>` when prompt text starts with a reserved command word (for example, `list`).
124
115
 
125
116
  for daemon/API/Telegram details, see [docs/async.md](docs/async.md).
126
117
 
@@ -166,9 +157,7 @@ tau ships starter prompt and skill templates as markdown content in this reposit
166
157
  tau install
167
158
  ```
168
159
 
169
- this writes prompts and skills into `.tau/` under your current working directory. use `--global` to
170
- install into `~/.config/tau/` instead, and `--force` to overwrite existing files/directories.
171
- use `--prompt <id>` or `--skill <name>` to install only one item (for targeted updates).
160
+ this writes prompts and skills into `.tau/` under your current working directory. use `--global` to install into `~/.config/tau/` instead, and `--force` to overwrite existing files/directories. use `--prompt <id>` or `--skill <name>` to install only one item (for targeted updates).
172
161
 
173
162
  ## security notice
174
163
 
@@ -203,8 +192,7 @@ tau can load custom palette overrides from theme files. create a theme at:
203
192
  - `.tau/themes/<id>.json` (project)
204
193
  - `~/.config/tau/themes/<id>.json` (global)
205
194
 
206
- then set `"defaultTheme": "<id>"` in config. any palette token not defined in the file renders as plain text.
207
- theme values accept `#rgb`, `#rrggbb`, `rgb(r, g, b)`, or `hsl(h, s%, l%)`. hex without `#` is ignored.
195
+ then set `"defaultTheme": "<id>"` in config. any palette token not defined in the file renders as plain text. theme values accept `#rgb`, `#rrggbb`, `rgb(r, g, b)`, or `hsl(h, s%, l%)`. hex without `#` is ignored.
208
196
 
209
197
  built-in themes are available by default with ids: `crimson`, `ember`, `gold`, `lime`, `grass`, `emerald`, `jade`, `teal`, `cyan`, `azure`, `cobalt`, `violet`, `purple`, `magenta`, `rose`. built-ins auto-adapt to dark/light terminal backgrounds via OSC 11 detection at startup (best effort, dark fallback). set `defaultTheme` to one of these ids, or disable them with `disableBuiltinThemes`.
210
198
 
@@ -384,30 +372,30 @@ tau updates the nearest `AGENTS.md` in your current directory ancestry (or creat
384
372
 
385
373
  tau supports slash commands for common actions:
386
374
 
387
- | command | description |
388
- | --------------------------- | ------------------------------------------------------------------------------- |
389
- | `/help` | show available commands |
390
- | `/new` | clear the session and start fresh |
391
- | `/rewind` | open a picker to rewind context from a selected user message |
392
- | `/copy:text` | copy the last assistant message |
393
- | `/copy:code` | copy just the code blocks |
394
- | `/checkpoint` | save a checkpoint file for loading later |
395
- | `/reload` | reload personas, prompts, skills, themes, bash commands, and AGENTS.md |
396
- | `/speak` | toggle microphone recording and transcribe into the editor (macOS only) |
397
- | `/cd` | change the working directory |
398
- | `/compact:summary-only` | compress history into one synthetic user summary message |
399
- | `/compact:summary-and-last` | compress history and include the last assistant message verbatim when present |
400
- | `/prune:earliest` | prune bash tool results from oldest to newest and compact edit payloads/results |
401
- | `/prune:largest` | prune largest bash tool results first and compact edit payloads/results |
402
- | `/prune:smart` | prune bash tool results via model selection and compact edit payloads/results |
403
- | `/persona:<id>` | switch to a different persona |
404
- | `/prompt:<id>` | insert a saved prompt template |
405
- | `/theme:<id>` | switch to a loaded theme |
406
- | `/bash:<id>` | run a saved shell command |
407
- | `/risk:read-only` | allow read-only tool calls |
408
- | `/risk:read-write` | allow all tools |
409
- | `!<cmd>` | run a shell command directly (bypasses risk checks; uses sandbox if enabled) |
410
- | `!!<cmd>` | run a shell command without adding output to the model context |
375
+ | command | description |
376
+ | --- | --- |
377
+ | `/help` | show available commands |
378
+ | `/new` | clear the session and start fresh |
379
+ | `/rewind` | open a picker to rewind context from a selected user message |
380
+ | `/copy:text` | copy the last assistant message |
381
+ | `/copy:code` | copy just the code blocks |
382
+ | `/checkpoint` | save a checkpoint file for loading later |
383
+ | `/reload` | reload personas, model overrides, prompts, skills, themes, bash commands, and AGENTS.md |
384
+ | `/speak` | toggle microphone recording and transcribe into the editor (macOS only) |
385
+ | `/cd` | change the working directory |
386
+ | `/compact:summary-only` | compress history into one synthetic user summary message |
387
+ | `/compact:summary-and-last` | compress history and include the last assistant message verbatim when present |
388
+ | `/prune:earliest` | prune bash tool results from oldest to newest and compact edit payloads/results |
389
+ | `/prune:largest` | prune largest bash tool results first and compact edit payloads/results |
390
+ | `/prune:smart` | prune bash tool results via model selection and compact edit payloads/results |
391
+ | `/persona:<id>` | switch to a different persona |
392
+ | `/prompt:<id>` | insert a saved prompt template |
393
+ | `/theme:<id>` | switch to a loaded theme |
394
+ | `/bash:<id>` | run a saved shell command |
395
+ | `/risk:read-only` | allow read-only tool calls |
396
+ | `/risk:read-write` | allow all tools |
397
+ | `!<cmd>` | run a shell command directly (bypasses risk checks; uses sandbox if enabled) |
398
+ | `!!<cmd>` | run a shell command without adding output to the model context |
411
399
 
412
400
  use `tau -l <file>` to resume from a checkpoint created by `/checkpoint`.
413
401
 
@@ -443,10 +431,9 @@ the prune commands drop bash tool results from the active context without summar
443
431
 
444
432
  ### global config
445
433
 
446
- tau loads config from `~/.config/tau/config.json` only when the current working directory is
447
- inside your home directory. it also loads any `.tau/config.json` found by walking up from the
448
- current working directory to home (or to the filesystem root when cwd is outside home).
449
- settings merge from least-specific to most-specific.
434
+ tau loads config from `~/.config/tau/config.json` only when the current working directory is inside your home directory. it also loads any `.tau/config.json` found by walking up from the current working directory to home (or to the filesystem root when cwd is outside home). settings merge from least-specific to most-specific.
435
+
436
+ model definitions can be extended and overridden through `~/.config/tau/models.json` and `.tau/models.json` with the same discovery and precedence rules as `config.json`. see [docs/models.md](docs/models.md).
450
437
 
451
438
  ```json
452
439
  {
@@ -474,6 +461,8 @@ settings merge from least-specific to most-specific.
474
461
  }
475
462
  ```
476
463
 
464
+ for built-in providers and features, the `apiKeys` field uses these keys: `anthropic`, `openai`, `google`, `parallel`, and `mistral`. keys are merged across config levels by key name.
465
+
477
466
  the `defaultPersona` field specifies which persona to use when starting the app. it accepts `<id>` or `<id>:<reasoning>`, and matching is exact/case-sensitive. the `--persona` flag overrides this setting.
478
467
 
479
468
  the `defaultRisk` field sets the initial risk level (`read-only` or `read-write`). the `--risk` flag overrides this setting. if not specified, defaults to `read-only`.
@@ -482,7 +471,7 @@ the `defaultTheme` field sets the theme id to load at startup. it must be non-em
482
471
 
483
472
  the `subagents.defaultLaunchModels` field configures allowed `spawn_agent` launch overrides for the built-in `default` sub-agent. values must use `<provider>/<model>:<effort>`.
484
473
 
485
- the `modelSystemNotices` field maps `<provider>/<model>` to a notice string. provider/model matching is exact/case-sensitive against loaded model ids. when a message is sent to that model, tau prepends the notice as a `<system>...</system>` block before the user content. this applies to main-session user messages and sub-agent prompts, regardless of persona id.
474
+ the `modelSystemNotices` field maps `<provider>/<model>` to a notice string. provider ids must be known and model ids are exact/case-sensitive against the merged configured model catalog (built-in + layered `models.json`). when a message is sent to that model, tau prepends the notice as a `<system>...</system>` block before the user content. this applies to main-session user messages and sub-agent prompts, regardless of persona id.
486
475
 
487
476
  if `disableBuiltinPersonas` is set to `true`, tau will not load built-in personas. if `disableBuiltinThemes` is set to `true`, tau will not load built-in themes. only entries from `~/.config/tau/` and `.tau/` will be available for those categories. you can also set these flags in any `.tau/config.json`; the most specific value wins.
488
477
 
@@ -552,8 +541,7 @@ you can tell tau to always include extra `AGENTS.md` files by adding an `agentCo
552
541
  { "agentContextFiles": ["packages/pkg1/AGENTS.md"] }
553
542
  ```
554
543
 
555
- paths are resolved relative to the directory containing `.tau/` (or relative to home for the global config when it is in scope). entries must point at `AGENTS.md`.
556
- entries are only included when their directory is an ancestor or descendant of the current working directory (sibling paths are ignored).
544
+ paths are resolved relative to the directory containing `.tau/` (or relative to home for the global config when it is in scope). entries must point at `AGENTS.md`. entries are only included when their directory is an ancestor or descendant of the current working directory (sibling paths are ignored).
557
545
 
558
546
  ### custom personas
559
547
 
@@ -566,8 +554,7 @@ provider: anthropic
566
554
  model: claude-opus-4-5
567
555
  ---
568
556
 
569
- you are a helpful assistant specialized in my workflow.
570
- focus on clarity and efficiency.
557
+ you are a helpful assistant specialized in my workflow. focus on clarity and efficiency.
571
558
  ```
572
559
 
573
560
  the frontmatter defines the persona. required fields:
@@ -576,6 +563,8 @@ the frontmatter defines the persona. required fields:
576
563
  - `provider`: model provider id (for example `openai`, `anthropic`, `google`)
577
564
  - `model`: model id for the provider (for example `gpt-5.2`, `claude-opus-4-5`)
578
565
 
566
+ custom personas/subagents can reference model ids that are not bundled yet, as long as the provider is known. configure model metadata in `models.json` files or let tau derive defaults. see [docs/models.md](docs/models.md).
567
+
579
568
  the persona file name (without the `.md` extension) must match the `id`.
580
569
 
581
570
  optional frontmatter fields:
@@ -631,8 +620,7 @@ tau does not include prompt templates by default. run `tau install` to bootstrap
631
620
  id: review
632
621
  ---
633
622
 
634
- review this code for bugs, edge cases, and style issues.
635
- suggest specific improvements with code examples.
623
+ review this code for bugs, edge cases, and style issues. suggest specific improvements with code examples.
636
624
  ```
637
625
 
638
626
  insert them with `/prompt:review`. if a prompt id conflicts across levels, the most specific level wins.
@@ -652,7 +640,7 @@ optional fields: `license`, `compatibility` (<=500 chars), `metadata` (string ma
652
640
 
653
641
  enable skills per persona with the `skills` frontmatter field. you can list specific skill names (matched by `name` in skill frontmatter), use `"*"` to enable all discovered skills, or set `skills: []` to disable skills completely. built-in personas and custom personas with omitted `skills` default to `skills: "*"`. if a project skill conflicts with a user skill by name, the project skill wins. tau injects an index of enabled skills into the system prompt containing only each skill's `name`, `description`, and file path. in sandbox mode, skills outside the mounted host root are excluded and included paths are rewritten to sandbox paths.
654
642
 
655
- use `/reload` to pick up changes to personas, prompts, skills, themes, bash commands, and AGENTS.md without restarting.
643
+ use `/reload` to pick up changes to personas, model overrides, prompts, skills, themes, bash commands, and AGENTS.md without restarting.
656
644
 
657
645
  ## how it works
658
646