@markusylisiurunen/tau 0.3.18 → 0.3.20

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 (175) hide show
  1. package/README.md +22 -48
  2. package/dist/core/cli.js +6 -39
  3. package/dist/core/cli.js.map +1 -1
  4. package/dist/core/commands/index.js +1 -1
  5. package/dist/core/commands/index.js.map +1 -1
  6. package/dist/core/commands/registry.js +5 -76
  7. package/dist/core/commands/registry.js.map +1 -1
  8. package/dist/core/config/builtin_themes.js +0 -62
  9. package/dist/core/config/builtin_themes.js.map +1 -1
  10. package/dist/core/config/content_loader.js +4 -7
  11. package/dist/core/config/content_loader.js.map +1 -1
  12. package/dist/core/config/diff_tool.js +1 -1
  13. package/dist/core/config/diff_tool.js.map +1 -1
  14. package/dist/core/config/runtime.js +1 -1
  15. package/dist/core/config/runtime.js.map +1 -1
  16. package/dist/core/config/runtime_config_snapshot.js +1 -1
  17. package/dist/core/config/runtime_config_snapshot.js.map +1 -1
  18. package/dist/core/config/schema.js +10 -43
  19. package/dist/core/config/schema.js.map +1 -1
  20. package/dist/core/config/skill_parser.js +1 -1
  21. package/dist/core/config/skill_parser.js.map +1 -1
  22. package/dist/core/config/virtual_defaults.js +0 -1
  23. package/dist/core/config/virtual_defaults.js.map +1 -1
  24. package/dist/core/debug.js +1 -7
  25. package/dist/core/debug.js.map +1 -1
  26. package/dist/core/diff_review/bridge.js +1 -3
  27. package/dist/core/diff_review/bridge.js.map +1 -1
  28. package/dist/core/diff_review/index.js.map +1 -1
  29. package/dist/core/diff_review/protocol.js +13 -13
  30. package/dist/core/diff_review/protocol.js.map +1 -1
  31. package/dist/core/diff_review/review_instructions.js +48 -0
  32. package/dist/core/diff_review/review_instructions.js.map +1 -0
  33. package/dist/core/events/index.js.map +1 -1
  34. package/dist/core/events/parser.js +161 -38
  35. package/dist/core/events/parser.js.map +1 -1
  36. package/dist/core/events/types.js +1 -1
  37. package/dist/core/events/types.js.map +1 -1
  38. package/dist/core/index.js +1 -1
  39. package/dist/core/index.js.map +1 -1
  40. package/dist/core/models/catalog.js +4 -4
  41. package/dist/core/models/catalog.js.map +1 -1
  42. package/dist/core/nook/cli.js +10 -0
  43. package/dist/core/nook/cli.js.map +1 -1
  44. package/dist/core/nook/client.js +59 -16
  45. package/dist/core/nook/client.js.map +1 -1
  46. package/dist/core/nook/index.js.map +1 -1
  47. package/dist/core/personas.js +29 -14
  48. package/dist/core/personas.js.map +1 -1
  49. package/dist/core/runtime/chat_runtime.js +12 -34
  50. package/dist/core/runtime/chat_runtime.js.map +1 -1
  51. package/dist/core/runtime/conversation_turn_runtime.js +0 -4
  52. package/dist/core/runtime/conversation_turn_runtime.js.map +1 -1
  53. package/dist/core/runtime/runtime_bootstrap.js +191 -317
  54. package/dist/core/runtime/runtime_bootstrap.js.map +1 -1
  55. package/dist/core/runtime/session_prompt_composer.js +2 -6
  56. package/dist/core/runtime/session_prompt_composer.js.map +1 -1
  57. package/dist/core/session/core_session.js +2 -5
  58. package/dist/core/session/core_session.js.map +1 -1
  59. package/dist/core/session/message_accumulator.js +6 -0
  60. package/dist/core/session/message_accumulator.js.map +1 -1
  61. package/dist/core/session/runner.js +137 -32
  62. package/dist/core/session/runner.js.map +1 -1
  63. package/dist/core/session/session_engine.js +365 -120
  64. package/dist/core/session/session_engine.js.map +1 -1
  65. package/dist/core/static/index.js +0 -11
  66. package/dist/core/static/index.js.map +1 -1
  67. package/dist/core/subagents/registry.js +0 -2
  68. package/dist/core/subagents/registry.js.map +1 -1
  69. package/dist/core/subagents/subagent_engine.js +1 -3
  70. package/dist/core/subagents/subagent_engine.js.map +1 -1
  71. package/dist/core/telegram/adapter.js +34 -2
  72. package/dist/core/telegram/adapter.js.map +1 -1
  73. package/dist/core/telegram/config.js +3 -13
  74. package/dist/core/telegram/config.js.map +1 -1
  75. package/dist/core/telegram/session_manager.js +16 -5
  76. package/dist/core/telegram/session_manager.js.map +1 -1
  77. package/dist/core/tools/bash.js +6 -21
  78. package/dist/core/tools/bash.js.map +1 -1
  79. package/dist/core/tools/edit.js +1 -4
  80. package/dist/core/tools/edit.js.map +1 -1
  81. package/dist/core/tools/emit_output.js +1 -1
  82. package/dist/core/tools/emit_output.js.map +1 -1
  83. package/dist/core/tools/execution_backend.js +3 -1
  84. package/dist/core/tools/execution_backend.js.map +1 -1
  85. package/dist/core/tools/grep.js +1 -1
  86. package/dist/core/tools/grep.js.map +1 -1
  87. package/dist/core/tools/list.js +1 -1
  88. package/dist/core/tools/list.js.map +1 -1
  89. package/dist/core/tools/nook.js +29 -15
  90. package/dist/core/tools/nook.js.map +1 -1
  91. package/dist/core/tools/read.js +1 -1
  92. package/dist/core/tools/read.js.map +1 -1
  93. package/dist/core/tools/registry.js.map +1 -1
  94. package/dist/core/tools/send_input_to_agent.js +1 -1
  95. package/dist/core/tools/send_input_to_agent.js.map +1 -1
  96. package/dist/core/tools/spawn_agent.js +40 -88
  97. package/dist/core/tools/spawn_agent.js.map +1 -1
  98. package/dist/core/tools/terminate_agent.js +1 -1
  99. package/dist/core/tools/terminate_agent.js.map +1 -1
  100. package/dist/core/tools/view_image.js +1 -1
  101. package/dist/core/tools/view_image.js.map +1 -1
  102. package/dist/core/tools/wait_for_agents.js +1 -1
  103. package/dist/core/tools/wait_for_agents.js.map +1 -1
  104. package/dist/core/tools/web_fetch.js +1 -1
  105. package/dist/core/tools/web_fetch.js.map +1 -1
  106. package/dist/core/tools/web_search.js +1 -1
  107. package/dist/core/tools/web_search.js.map +1 -1
  108. package/dist/core/tools/write.js +1 -4
  109. package/dist/core/tools/write.js.map +1 -1
  110. package/dist/core/types.js +0 -1
  111. package/dist/core/types.js.map +1 -1
  112. package/dist/core/utils/context.js +1 -1
  113. package/dist/core/utils/context.js.map +1 -1
  114. package/dist/core/utils/context_builder.js +1 -15
  115. package/dist/core/utils/context_builder.js.map +1 -1
  116. package/dist/core/utils/user_metadata.js +13 -19
  117. package/dist/core/utils/user_metadata.js.map +1 -1
  118. package/dist/core/version.js +1 -1
  119. package/dist/execution/cloudflare_sandbox_execution_environment.js +15 -10
  120. package/dist/execution/cloudflare_sandbox_execution_environment.js.map +1 -1
  121. package/dist/execution/fly_sprite_execution_environment.js +9 -1
  122. package/dist/execution/fly_sprite_execution_environment.js.map +1 -1
  123. package/dist/execution/local_execution_environment.js +9 -55
  124. package/dist/execution/local_execution_environment.js.map +1 -1
  125. package/dist/execution/tool_backend_execution_environment.js +7 -10
  126. package/dist/execution/tool_backend_execution_environment.js.map +1 -1
  127. package/dist/host/client_tool_broker.js +1 -1
  128. package/dist/host/client_tool_broker.js.map +1 -1
  129. package/dist/host/execution_runtime.js +35 -0
  130. package/dist/host/execution_runtime.js.map +1 -0
  131. package/dist/host/hosted_ephemeral_agent_session.js +20 -11
  132. package/dist/host/hosted_ephemeral_agent_session.js.map +1 -1
  133. package/dist/host/local_session_host.js +117 -109
  134. package/dist/host/local_session_host.js.map +1 -1
  135. package/dist/host/session_protocol_handler.js +0 -10
  136. package/dist/host/session_protocol_handler.js.map +1 -1
  137. package/dist/main.js +31 -63
  138. package/dist/main.js.map +1 -1
  139. package/dist/nook/README.md +4 -1
  140. package/dist/nook/worker/index.js +41 -1
  141. package/dist/nook/worker/index.js.map +1 -1
  142. package/dist/protocol/index.d.ts +1 -1
  143. package/dist/protocol/index.js.map +1 -1
  144. package/dist/protocol/session_protocol.d.ts +1 -11
  145. package/dist/protocol/session_protocol.js +242 -343
  146. package/dist/protocol/session_protocol.js.map +1 -1
  147. package/dist/sdk/client.js +2 -24
  148. package/dist/sdk/client.js.map +1 -1
  149. package/dist/sdk/index.d.ts +1 -1
  150. package/dist/sdk/index.js.map +1 -1
  151. package/dist/sdk/session.js +0 -9
  152. package/dist/sdk/session.js.map +1 -1
  153. package/dist/sdk/types.d.ts +0 -4
  154. package/dist/starter/skills/guided-review/SKILL.md +1 -1
  155. package/dist/tui/chat_controller/command_hints.js +0 -2
  156. package/dist/tui/chat_controller/command_hints.js.map +1 -1
  157. package/dist/tui/chat_view.js +0 -2
  158. package/dist/tui/chat_view.js.map +1 -1
  159. package/dist/tui/session_chat_app.js +1 -1
  160. package/dist/tui/session_chat_app.js.map +1 -1
  161. package/dist/tui/session_chat_controller.js +2 -38
  162. package/dist/tui/session_chat_controller.js.map +1 -1
  163. package/dist/tui/ui/custom_editor.js +0 -5
  164. package/dist/tui/ui/custom_editor.js.map +1 -1
  165. package/dist/tui/ui/footer.js +4 -37
  166. package/dist/tui/ui/footer.js.map +1 -1
  167. package/dist/tui/ui/slash_autocomplete.js +2 -33
  168. package/dist/tui/ui/slash_autocomplete.js.map +1 -1
  169. package/dist/tui/ui/theme/palette.js +0 -2
  170. package/dist/tui/ui/theme/palette.js.map +1 -1
  171. package/dist/tui/ui/theme/theme.js.map +1 -1
  172. package/package.json +4 -4
  173. package/dist/core/diff_review/review_thread.js +0 -264
  174. package/dist/core/diff_review/review_thread.js.map +0 -1
  175. package/dist/core/static/prompts/diff-review-wrapper.md +0 -26
package/README.md CHANGED
@@ -82,10 +82,10 @@ filters: `--since`, `--persona`, `--provider`, `--model`.
82
82
  tau can run without the TUI via NDJSON RPC over stdin/stdout:
83
83
 
84
84
  ```sh
85
- tau rpc --persona gpt-5.5-coder --risk read-only
85
+ tau rpc --persona gpt-5.5-coder
86
86
  ```
87
87
 
88
- RPC mode reuses the same startup config, persona loading, and risk handling as interactive mode. stdin/stdout are reserved for protocol traffic in this mode (piped stdin is **not** treated as an initial user message). `--caffeinated` is a macOS-only TUI flag and is rejected outside TUI mode.
88
+ RPC mode reuses the same startup config and persona loading as interactive mode. stdin/stdout are reserved for protocol traffic in this mode (piped stdin is **not** treated as an initial user message). `--caffeinated` is a macOS-only TUI flag and is rejected outside TUI mode.
89
89
 
90
90
  for protocol details and examples, see [docs/rpc.md](docs/rpc.md).
91
91
 
@@ -94,7 +94,7 @@ for protocol details and examples, see [docs/rpc.md](docs/rpc.md).
94
94
  tau can host sessions over WebSocket:
95
95
 
96
96
  ```sh
97
- tau serve --host 0.0.0.0 --port 8787 --auth-token "$TAU_WS_AUTH_TOKEN" --risk read-only
97
+ tau serve --host 0.0.0.0 --port 8787 --auth-token "$TAU_WS_AUTH_TOKEN"
98
98
  ```
99
99
 
100
100
  WebSocket auth tokens authorize full session access. Prefer `wss://` behind a trusted TLS proxy on untrusted networks, avoid putting tokens in URLs or shell history, and treat any proxy/access logs that capture headers, query strings, or WebSocket handshake details as sensitive.
@@ -127,16 +127,16 @@ tau attach --new --execution-kind fly-sprite --fly-api default --fly-sprite spri
127
127
  tau can also run the terminal UI against any command that speaks the same session protocol on stdin/stdout:
128
128
 
129
129
  ```sh
130
- tau attach -- ssh vps 'cd /path/to/repo && tau rpc --risk read-only'
130
+ tau attach -- ssh vps 'cd /path/to/repo && tau rpc'
131
131
  ```
132
132
 
133
133
  For stdio attach, use `--session <id>` before `--`:
134
134
 
135
135
  ```sh
136
- tau attach --session 0195d6e4-4cf9-7f44-a2d8-f8f7f49ee9d3 -- ssh vps 'cd /path/to/repo && tau rpc --risk read-only'
136
+ tau attach --session 0195d6e4-4cf9-7f44-a2d8-f8f7f49ee9d3 -- ssh vps 'cd /path/to/repo && tau rpc'
137
137
  ```
138
138
 
139
- Session attach renders the authoritative session snapshot, streams recoverable `session.delta` updates and independently revisioned, non-persisted `session.pendingUserMessages` replacements, submits normal user input through `session.submit`, `session.queue`, and `session.steer`, supports steering/interruption, runs `!`/`!!` shell commands in the session execution environment, records `/listen` from the local microphone, speaks `/speak` locally, reloads session content with `/reload`, changes the session risk level with `/risk:<level>` or `Ctrl+R`, switches session personas with `/persona:<id>` or `Ctrl+P`, inserts session prompt templates with `/prompt:<id>`, compacts or prunes the session with `/compact:*` and `/prune:*`, creates a new session with `/new`, and exits with `/exit` or `Ctrl+C` twice.
139
+ Session attach renders the authoritative session snapshot, streams recoverable `session.delta` updates and independently revisioned, non-persisted `session.pendingUserMessages` replacements, submits normal user input through `session.submit`, `session.queue`, and `session.steer`, supports steering/interruption, runs `!`/`!!` shell commands in the session execution environment, records `/listen` from the local microphone, speaks `/speak` locally, reloads session content with `/reload`, switches session personas with `/persona:<id>` or `Ctrl+P`, inserts session prompt templates with `/prompt:<id>`, compacts or prunes the session with `/compact:*` and `/prune:*`, creates a new session with `/new`, and exits with `/exit` or `Ctrl+C` twice.
140
140
 
141
141
  ## Telegram runner
142
142
 
@@ -150,11 +150,12 @@ The Telegram command surface is intentionally small:
150
150
 
151
151
  - `/new` creates a new session for the chat, replacing the previous active session if one exists.
152
152
  - `/status` returns a short natural-language status paragraph for the active session, including model, reasoning effort, context usage, and cumulative cost when session details are available.
153
+ - `/compact` summarizes older conversation context to reduce context usage.
153
154
  - `/interrupt` interrupts the active run.
154
155
 
155
156
  The runner keeps tool and lifecycle progress quiet: Telegram receives command acknowledgements/errors and assistant messages, including multiple assistant progress updates from a single active run. While work is active, it shows Telegram's typing indicator in DMs and groups. Assistant messages are sent as Telegram rich markdown.
156
157
 
157
- Telegram DM input supports plain text, voice/audio transcription, and attachment queueing (`image/*`, PDF, `.txt`, `.md`, `.json`, `.csv`, `.yaml`, `.yml`). allowed groups are opt-in via `allowedChatIds`; non-triggering group text/captions, attachments, audio transcripts, and processing errors are buffered as sender-attributed context and the most recent 50 messages since the previous bot-triggering turn are included when a bot mention triggers a turn. group commands accept explicit bot mentions on or around the command, such as `/status@botusername`, `/status @botusername`, or `@botusername /status`.
158
+ Telegram DM input supports plain text, voice/audio transcription with the transcript echoed back for verification, and attachment queueing (`image/*`, PDF, `.txt`, `.md`, `.json`, `.csv`, `.yaml`, `.yml`). allowed groups are opt-in via `allowedChatIds`; non-triggering group text/captions, attachments, audio transcripts, and processing errors are buffered as sender-attributed context and the most recent 50 messages since the previous bot-triggering turn are included when a bot mention triggers a turn. group commands accept explicit bot mentions on or around the command, such as `/status@botusername`, `/status @botusername`, or `@botusername /status`.
158
159
 
159
160
  Telegram config defines `bots`, `projects`, `workspaceRoot`, optional `systemMessage`, and optional `maxSessions`. repositories use persistent bare caches at `<workspaceRoot>-repo-cache/<projectId>.git`; active session records are persisted at `<workspaceRoot>-sessions.json`, their workspaces survive runner restarts, and unreferenced workspace entries are removed on startup. Tau reconnects preserved sessions to their corresponding snapshots. When creating or reconstructing a workspace, `bootstrapCommands` block initial readiness and `backgroundBootstrapCommands` start without blocking; preserved workspaces skip both on restart. for config details, see [docs/telegram.md](docs/telegram.md).
160
161
 
@@ -180,6 +181,7 @@ tau nook setup \
180
181
  --access-aud <access-application-audience>
181
182
  tau nook deploy ./dist --site demo
182
183
  tau nook deploy ./dist --site demo --public
184
+ mkdir restored-demo && tau nook copy demo ./restored-demo
183
185
  tau nook template save starter ./app
184
186
  tau nook template copy starter ./next-app
185
187
  tau nook kv put demo settings '{"theme":"dark"}'
@@ -197,7 +199,7 @@ Add a single configured target to Tau config after deploying the Worker and crea
197
199
  }
198
200
  ```
199
201
 
200
- Template copies require a destination directory that already exists and is empty. The Worker validates Cloudflare Access JWTs against the Access JWKS with the configured issuer and audience. Tau sends service-token headers to Cloudflare Access for CLI/API calls, but the Worker does not treat those raw headers as authentication. When `nook` is configured, Tau automatically exposes a read-write model tool named `nook`. Detailed setup, deploy, template, Worker, browser SDK, and V0 scope notes live in [src/nook/README.md](src/nook/README.md).
202
+ Template copies require a destination directory that already exists and is empty. The Worker validates Cloudflare Access JWTs against the Access JWKS with the configured issuer and audience. Tau sends service-token headers to Cloudflare Access for CLI/API calls, but the Worker does not treat those raw headers as authentication. When `nook` is configured, Tau automatically exposes a model tool named `nook`. Detailed setup, deploy, template, Worker, browser SDK, and V0 scope notes live in [src/nook/README.md](src/nook/README.md).
201
203
 
202
204
  ## SDK usage (Node)
203
205
 
@@ -256,13 +258,8 @@ this writes prompts and skills into `.tau/` under your current working directory
256
258
 
257
259
  ## security notice
258
260
 
259
- **the risk level system is a UX guardrail, not a hard security boundary.** it helps prevent accidental writes and guides model behavior, but it has significant limitations:
260
-
261
- - **model trust**: the bash tool relies on the model honestly declaring whether a command is a read or write. there's no runtime validation that the command actually matches the declared intent. a model could declare `safetyLevel="read"` while running `rm -rf /`.
262
- - **no command analysis**: the system doesn't inspect command content. it trusts the declared safety level without verifying what the command actually does.
263
261
  - **full system access**: the model can access any file on your system that your user account can read or write, not just the current working directory. if you need stronger isolation, run Tau inside a VM or container.
264
262
  - **no tty / non-interactive tools**: tool commands run with stdin ignored and no TTY. anything that prompts for input or opens an editor can hang or fail (for example `sudo`, `ssh` password prompts, `git` credential prompts). tau also forces git into non-interactive mode (no prompt/editor/pager, batch-mode ssh).
265
- - **user bypasses**: the `!` prefix executes shell commands directly and completely bypasses risk level checks. this is intentional for direct use, but means risk levels only constrain the model, not the user.
266
263
 
267
264
  note that there is no confirmation step before tool execution. the model runs commands immediately, and you can only observe the results after the fact.
268
265
 
@@ -303,7 +300,6 @@ available palette tokens (theme keys):
303
300
  - diff: `diffAdd`, `diffRemove`
304
301
  - toasts: `toastSuccess`, `toastWarn`, `toastError`
305
302
  - user: `userSurface`, `userMemorySurface`, `userMemoryText`
306
- - risk: `riskReadOnlyText`, `riskReadWriteText`
307
303
 
308
304
  example theme file (`.tau/themes/solarized.json`):
309
305
 
@@ -321,24 +317,9 @@ and in config (`.tau/config.json` or `~/.config/tau/config.json`):
321
317
  { "defaultTheme": "solarized" }
322
318
  ```
323
319
 
324
- ## risk levels
325
-
326
- tau uses risk levels to control what the model can do. this lets you stay in control while working alongside AI.
327
-
328
- - **read-only** (default): model can run read-only tools (no file modifications)
329
- - **read-write**: model can create, edit, and delete files
330
-
331
- sub-agents inherit the session risk level unless overridden in persona config. a sub-agent configured with `riskLevel: read-write` can write even when the main session is `read-only`.
332
-
333
- start with a specific risk level (exact values: `read-only` or `read-write`):
334
-
335
- ```sh
336
- tau --risk read-write
337
- ```
338
-
339
- or change it during a session with `/risk:read-only` or `/risk:read-write`.
320
+ ## tool access
340
321
 
341
- the default is read-only because it lets the model investigate your code and answer questions without risk of unintended changes. bump it to read-write when you're ready to let the model make edits.
322
+ enabled tools execute directly. persona and sub-agent tool lists determine which tools are available.
342
323
 
343
324
  ## power management (macOS)
344
325
 
@@ -357,10 +338,10 @@ tau comes with several built-in personas across different models:
357
338
  - **Claude Opus 4.6** (Anthropic): `opus-4.6-chat`, `opus-4.6-coder`
358
339
  - **Claude Opus 4.8** (Anthropic): `opus-4.8-chat`, `opus-4.8-coder`
359
340
  - **GPT-5.5** (OpenAI): `gpt-5.5-chat`, `gpt-5.5-coder`
360
- - **GPT-5.5 Fast (ChatGPT)** and **GPT-5.6 Fast (ChatGPT)** (OpenAI Codex, priority tier): `gpt-5.5-chatgpt-fast-chat`, `gpt-5.5-chatgpt-fast-coder`, `gpt-5.6-sol-chatgpt-fast-chat`, `gpt-5.6-sol-chatgpt-fast-coder`, `gpt-5.6-terra-chatgpt-fast-chat`, `gpt-5.6-terra-chatgpt-fast-coder`
341
+ - **GPT-5.5 Fast (ChatGPT)** and **GPT-5.6 Fast (ChatGPT)** (OpenAI Codex, priority tier): `gpt-5.5-chatgpt-fast-chat`, `gpt-5.5-chatgpt-fast-coder`, `gpt-5.6-sol-chatgpt-fast-chat`, `gpt-5.6-sol-chatgpt-fast-coder`, `gpt-5.6-terra-chatgpt-fast-chat`, `gpt-5.6-terra-chatgpt-fast-coder`, `gpt-5.6-luna-chatgpt-fast-chat`, `gpt-5.6-luna-chatgpt-fast-coder`
361
342
  - **GPT-5.5 (ChatGPT)** (OpenAI Codex): `gpt-5.5-chatgpt-chat`, `gpt-5.5-chatgpt-coder`
362
- - **GPT-5.6 Sol** and **GPT-5.6 Terra** (OpenAI): `gpt-5.6-sol-chat`, `gpt-5.6-sol-coder`, `gpt-5.6-terra-chat`, `gpt-5.6-terra-coder`
363
- - **GPT-5.6 Sol (ChatGPT)** and **GPT-5.6 Terra (ChatGPT)** (OpenAI Codex): `gpt-5.6-sol-chatgpt-chat`, `gpt-5.6-sol-chatgpt-coder`, `gpt-5.6-terra-chatgpt-chat`, `gpt-5.6-terra-chatgpt-coder`
343
+ - **GPT-5.6 Sol**, **GPT-5.6 Terra**, and **GPT-5.6 Luna** (OpenAI): `gpt-5.6-sol-chat`, `gpt-5.6-sol-coder`, `gpt-5.6-terra-chat`, `gpt-5.6-terra-coder`, `gpt-5.6-luna-chat`, `gpt-5.6-luna-coder`
344
+ - **GPT-5.6 Sol (ChatGPT)**, **GPT-5.6 Terra (ChatGPT)**, and **GPT-5.6 Luna (ChatGPT)** (OpenAI Codex): `gpt-5.6-sol-chatgpt-chat`, `gpt-5.6-sol-chatgpt-coder`, `gpt-5.6-terra-chatgpt-chat`, `gpt-5.6-terra-chatgpt-coder`, `gpt-5.6-luna-chatgpt-chat`, `gpt-5.6-luna-chatgpt-coder`
364
345
  - **Gemini 3.1 Pro** and **Gemini 3 Flash** (Google): `gemini-3.1-pro-chat`, `gemini-3-flash-chat`
365
346
 
366
347
  chat variants are for general-purpose assistance; coder variants are optimized for software engineering. built-in personas include the `default` sub-agent for background tasks unless disabled.
@@ -377,9 +358,9 @@ tau --persona opus-4.8-coder
377
358
 
378
359
  some personas can run isolated sub-agents via the `spawn_agent`, `send_input_to_agent`, `wait_for_agents`, and `terminate_agent` tools. sub-agents report progress in the subagent panel, and `wait_for_agents` returns completed outputs as soon as at least one requested agent finishes.
379
360
 
380
- the built-in `default` sub-agent is available unless disabled. it inherits the main persona's model, settings, tool access (minus sub-agent management tools), risk level, and system prompt. the inherited main prompt is wrapped with default sub-agent-specific rules, and those wrapper rules take precedence on conflicts. custom sub-agents can override model, reasoning, tools, and risk level. a sub-agent configured with `riskLevel: read-write` can perform writes even when the main session is `read-only`.
361
+ the built-in `default` sub-agent is available unless disabled. it inherits the main persona's model, settings, tool access (minus sub-agent management tools), and system prompt. the inherited main prompt is wrapped with default sub-agent-specific rules, and those wrapper rules take precedence on conflicts. custom sub-agents can override model, reasoning, and tools.
381
362
 
382
- `spawn_agent` supports an optional launch override string (`model: "<provider>/<model>:<effort>"`) and an optional `workingDirectory`. when `workingDirectory` is set, the sub-agent runs from that directory and its prompt context (cwd, AGENTS.md scope, and skills block) is rebuilt as if tau was started there. launch overrides are allowlisted per subagent. custom subagents can define `launchModels` in persona frontmatter, and the built-in `default` sub-agent uses `subagents.defaultLaunchModels` from config.
363
+ `spawn_agent` supports an optional launch override string (`model: "<provider>/<model>:<effort>"`) and an optional `workingDirectory`. when `workingDirectory` is set, the sub-agent runs from that directory and its config, model catalog, repository metadata, AGENTS.md context, and skills are resolved through the session execution environment as if tau was started there. launch overrides are allowlisted per subagent. custom subagents can define `launchModels` in persona frontmatter, and the built-in `default` sub-agent uses `subagents.defaultLaunchModels` from config.
383
364
 
384
365
  sub-agent progress appears in a sticky panel. use `alt+down` to cycle active subagents and `ctrl+g` to terminate the selected one. tau caps active subagents at 8.
385
366
 
@@ -467,9 +448,7 @@ tau supports slash commands for common actions:
467
448
  | `/persona:<id>` | switch to a different persona |
468
449
  | `/prompt:<id>` | insert a saved prompt template |
469
450
  | `/theme:<id>` | switch to a loaded theme |
470
- | `/risk:read-only` | allow read-only tool calls |
471
- | `/risk:read-write` | allow all tools |
472
- | `!<cmd>` | run a shell command directly (bypasses risk checks) |
451
+ | `!<cmd>` | run a shell command directly |
473
452
  | `!!<cmd>` | run a shell command without adding output to the model context |
474
453
 
475
454
  tau automatically compacts long sessions when provider-reported usage approaches the model context limit. automatic compaction summarizes older context, asks the compaction model to select original user messages to append verbatim inside the summary by history id, retains a recent tail verbatim, and inserts a hidden continuation note so the assistant continues without asking you to repeat context.
@@ -491,7 +470,6 @@ the prune commands drop bash tool results from the active context without summar
491
470
  | key | action |
492
471
  | ------------ | ----------------------------------------- |
493
472
  | `shift+tab` | cycle reasoning effort |
494
- | `ctrl+r` | cycle risk level |
495
473
  | `ctrl+p` | cycle personality |
496
474
  | `ctrl+t` | toggle thinking visibility |
497
475
  | `ctrl+o` | toggle compact tool display |
@@ -524,7 +502,6 @@ model definitions can be extended and overridden through `~/.config/tau/models.j
524
502
  "mistral": "..."
525
503
  },
526
504
  "defaultPersona": "gpt-5.5-chat",
527
- "defaultRisk": "read-write",
528
505
  "disableBuiltinPersonas": false,
529
506
  "disableBuiltinThemes": false,
530
507
  "defaultTheme": "solarized",
@@ -578,8 +555,6 @@ for built-in providers and features, the `apiKeys` field uses these keys: `anthr
578
555
 
579
556
  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.
580
557
 
581
- 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`.
582
-
583
558
  the `defaultTheme` field sets the theme id to load at startup. it must be non-empty, and matching is exact/case-sensitive. if not specified, it defaults to `gold`.
584
559
 
585
560
  `speechToText.provider` selects the `/listen` and Telegram audio transcription provider. supported values are `mistral` (default, uses Voxtral) and `gemini` (uses Gemini 3.5 Flash with minimal thinking).
@@ -673,8 +648,8 @@ optional frontmatter fields:
673
648
  - `serviceTier`: `priority` or `flex` for providers that support service tiers (currently `openai` and `openai-codex`)
674
649
  - `allowedReasoningLevels`: list of reasoning levels shown in the ui
675
650
  - `skills`: list of enabled skill names (matched by `name` in skill frontmatter), or `"*"` to enable all discovered skills. if omitted, custom personas default to `"*"`. set `skills: []` to disable skills completely.
676
- - `tools`: optional list of persona-selected host tools. Nook is not selected here; when effective config contains `nook`, Tau exposes the `nook` tool automatically and gates every operation on read-write risk.
677
- - `subagents`: optional map of subagent definitions. the built-in `default` sub-agent is implicit unless `default: false` is provided. custom subagents must include `systemPrompt` and may include `description`, `provider`+`model`, `reasoning`, `serviceTier`, `tools`, `riskLevel`, and `launchModels` (when specifying a model, `provider` and `model` must be provided together). names must be lowercase with dashes (max 64 chars). `launchModels` entries must use `<provider>/<model>:<effort>` and are used to allowlist launch-time `spawn_agent` overrides. example:
651
+ - `tools`: optional list of persona-selected host tools. Nook is not selected here; when effective config contains `nook`, Tau exposes the `nook` tool automatically.
652
+ - `subagents`: optional map of subagent definitions. the built-in `default` sub-agent is implicit unless `default: false` is provided. custom subagents must include `systemPrompt` and may include `description`, `provider`+`model`, `reasoning`, `serviceTier`, `tools`, and `launchModels` (when specifying a model, `provider` and `model` must be provided together). names must be lowercase with dashes (max 64 chars). `launchModels` entries must use `<provider>/<model>:<effort>` and are used to allowlist launch-time `spawn_agent` overrides. example:
678
653
  ```yaml
679
654
  subagents:
680
655
  default: false
@@ -686,12 +661,11 @@ optional frontmatter fields:
686
661
  model: claude-haiku-4-5
687
662
  reasoning: medium
688
663
  tools: [web_search, web_fetch, bash]
689
- riskLevel: read-only
690
664
  launchModels:
691
665
  - openai/gpt-5.5:high
692
666
  - anthropic/claude-haiku-4-5:medium
693
667
  ```
694
- - `tools`: list of tool names to enable for this persona. allowed: `bash`, `write`, `edit`, `view_image`, `spawn_agent`, `send_input_to_agent`, `wait_for_agents`, `terminate_agent`. if omitted, defaults to `bash`, `write`, `edit`, `view_image` (and subagent tools when subagents are enabled). risk levels still apply.
668
+ - `tools`: list of tool names to enable for this persona. allowed: `bash`, `write`, `edit`, `view_image`, `spawn_agent`, `send_input_to_agent`, `wait_for_agents`, `terminate_agent`. if omitted, defaults to `bash`, `write`, `edit`, `view_image` (and subagent tools when subagents are enabled).
695
669
 
696
670
  the markdown body becomes the system prompt.
697
671
 
@@ -743,7 +717,7 @@ use `/reload` to pick up changes to personas, model overrides, prompts, skills,
743
717
 
744
718
  ## how it works
745
719
 
746
- tau connects your terminal to large language models, giving them tools to interact with your filesystem. when you ask the model to explore code or make changes, it decides which tools to use and executes them subject to the active risk level.
720
+ tau connects your terminal to large language models, giving them tools to interact with your filesystem. when you ask the model to explore code or make changes, it decides which tools to use and executes them directly.
747
721
 
748
722
  the model sees your messages, any file contents you've shared, and the results of tool calls. it doesn't have ambient access to your filesystem; it only sees what you show it or what it explicitly requests through tools.
749
723
 
package/dist/core/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { parsePersonaReference } from "./persona_reference.js";
2
- import { REASONING_LEVELS, RiskLevelSchema, } from "./types.js";
2
+ import { REASONING_LEVELS } from "./types.js";
3
3
  export class CliError extends Error {
4
4
  constructor(message) {
5
5
  super(message);
@@ -23,7 +23,7 @@ export function parsePersonaString(raw, personas) {
23
23
  reasoning: personaId ? parsed.reasoning : undefined,
24
24
  };
25
25
  }
26
- function parsePersonaOption(raw, personas) {
26
+ function parsePersonaOption(raw) {
27
27
  const parsedReference = parsePersonaReference(raw);
28
28
  if (parsedReference.error === "missing-reasoning") {
29
29
  throw new CliError("missing reasoning level after ':' in --persona");
@@ -35,28 +35,11 @@ function parsePersonaOption(raw, personas) {
35
35
  if (!parsedReference.personaId) {
36
36
  throw new CliError("missing persona id in --persona");
37
37
  }
38
- const personaId = resolvePersonaId(parsedReference.personaId, personas);
39
- if (!personaId) {
40
- const available = personas.map((p) => p.id).join(", ");
41
- throw new CliError(`unknown persona '${parsedReference.personaId}'. available personas: ${available}`);
42
- }
43
38
  return {
44
- personaId,
39
+ personaId: parsedReference.personaId,
45
40
  reasoningOverride: parsedReference.reasoning,
46
41
  };
47
42
  }
48
- function parseRiskOption(raw) {
49
- const normalized = raw.trim();
50
- if (!normalized) {
51
- throw new CliError("missing value for --risk");
52
- }
53
- const parsed = RiskLevelSchema.safeParse(normalized);
54
- if (!parsed.success) {
55
- const allowed = RiskLevelSchema.options.join(", ");
56
- throw new CliError(`invalid risk level '${raw}'. allowed levels: ${allowed}`);
57
- }
58
- return parsed.data;
59
- }
60
43
  function parseValue(arg, argv, index) {
61
44
  const eqIndex = arg.indexOf("=");
62
45
  if (eqIndex !== -1) {
@@ -72,12 +55,11 @@ function parseValue(arg, argv, index) {
72
55
  }
73
56
  return { value: next, nextIndex: index + 1 };
74
57
  }
75
- export function parseCliArgs(argv, personas) {
58
+ export function parseCliArgs(argv) {
76
59
  let help = false;
77
60
  let debug = false;
78
61
  let personaId;
79
62
  let reasoningOverride;
80
- let riskLevel;
81
63
  let caffeinated = false;
82
64
  let noAgentContextFiles = false;
83
65
  for (let i = 0; i < argv.length; i++) {
@@ -103,18 +85,12 @@ export function parseCliArgs(argv, personas) {
103
85
  arg.startsWith("--persona=") ||
104
86
  arg.startsWith("-p=")) {
105
87
  const parsed = parseValue(arg, argv, i);
106
- const persona = parsePersonaOption(parsed.value, personas);
88
+ const persona = parsePersonaOption(parsed.value);
107
89
  personaId = persona.personaId;
108
90
  reasoningOverride = persona.reasoningOverride;
109
91
  i = parsed.nextIndex;
110
92
  continue;
111
93
  }
112
- if (arg === "--risk" || arg === "-r" || arg.startsWith("--risk=") || arg.startsWith("-r=")) {
113
- const parsed = parseValue(arg, argv, i);
114
- riskLevel = parseRiskOption(parsed.value);
115
- i = parsed.nextIndex;
116
- continue;
117
- }
118
94
  if (arg.startsWith("-")) {
119
95
  throw new CliError(`unknown option: ${arg}`);
120
96
  }
@@ -125,7 +101,6 @@ export function parseCliArgs(argv, personas) {
125
101
  debug,
126
102
  personaId,
127
103
  reasoningOverride,
128
- riskLevel,
129
104
  caffeinated,
130
105
  noAgentContextFiles,
131
106
  };
@@ -133,7 +108,6 @@ export function parseCliArgs(argv, personas) {
133
108
  export function printHelp(personas) {
134
109
  const personaList = personas.map((p) => p.id).join(", ");
135
110
  const reasoningList = REASONING_LEVELS.join(", ");
136
- const riskList = RiskLevelSchema.options.join(", ");
137
111
  console.log([
138
112
  "tau - terminal chat",
139
113
  "",
@@ -153,12 +127,10 @@ export function printHelp(personas) {
153
127
  "",
154
128
  "options:",
155
129
  " --help show this help and exit.",
156
- " --debug print debug info (personas, prompts, skills, system prompt) and exit.",
130
+ " --debug print debug info and exit (TUI mode only).",
157
131
  ` --persona, -p <id>[:<level>] start with a persona. available: ${personaList}.`,
158
132
  ` optionally specify reasoning level. levels: ${reasoningList}.`,
159
133
  ` if not specified, uses resolved config defaultPersona.`,
160
- ` --risk, -r <level> set initial model risk level. levels: ${riskList}.`,
161
- ` if not specified, uses resolved config defaultRisk (default: read-only).`,
162
134
  " --caffeinated keep macOS awake during active assistant turns in TUI mode (no-op on Linux).",
163
135
  " --no-agent-context-files disable AGENTS.md injection into the system prompt.",
164
136
  "",
@@ -177,12 +149,8 @@ export function printHelp(personas) {
177
149
  "examples:",
178
150
  " tau --persona gpt-5.4-chat:high",
179
151
  " tau -p opus-4.8-coder",
180
- " tau --persona gpt-5.4-chat:medium --risk read-write",
181
- " tau -p gpt-5.4-coder:high -r read-write",
182
- " tau serve --host 0.0.0.0 --port 8787 --risk read-only",
183
152
  " tau attach --new --cwd /repo ws://127.0.0.1:8787",
184
153
  " tau attach ws://127.0.0.1:8787",
185
- " tau attach --new --cwd /repo -- ssh vps 'tau rpc --risk read-only'",
186
154
  "",
187
155
  "notes:",
188
156
  " use `tau auth login codex` to authenticate ChatGPT subscription credentials.",
@@ -194,7 +162,6 @@ export function printHelp(personas) {
194
162
  " /diff opens the local diff review tool and delegates review work to the session host.",
195
163
  " you can switch persona during a session with /persona:<id>.",
196
164
  " insert prompt templates with /prompt:<id>.",
197
- " you can change model risk level during a session with /risk:read-only or /risk:read-write.",
198
165
  " if stdin is piped, its contents are sent as the first message automatically in TUI mode.",
199
166
  " in RPC mode, stdin/stdout are reserved for protocol traffic.",
200
167
  " reasoning only affects providers that support it.",
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/core/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAEL,gBAAgB,EAGhB,eAAe,GAChB,MAAM,YAAY,CAAC;AAYpB,MAAM,OAAO,QAAS,SAAQ,KAAK;IACjC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;IACzB,CAAC;CACF;AAED,MAAM,UAAU,gBAAgB,CAAC,GAAW,EAAE,QAAmB;IAC/D,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IAC3B,IAAI,CAAC,OAAO;QAAE,OAAO,SAAS,CAAC;IAC/B,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,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AG;QAC/F,wFAAwF;QACxF,8GAA8G;QAC9G,qFAAqF;QACrF,EAAE;QACF,cAAc;QACd,uEAAuE;QACvE,mEAAmE;QACnE,mFAAmF;QACnF,gFAAgF;QAChF,uDAAuD;QACvD,qEAAqE;QACrE,oFAAoF;QACpF,6DAA6D;QAC7D,+DAA+D;QAC/D,yEAAyE;QACzE,EAAE;QACF,WAAW;QACX,mCAAmC;QACnC,yBAAyB;QACzB,oDAAoD;QACpD,kCAAkC;QAClC,EAAE;QACF,QAAQ;QACR,gFAAgF;QAChF,qFAAqF;QACrF,uEAAuE;QACvE,4DAA4D;QAC5D,+EAA+E;QAC/E,+FAA+F;QAC/F,yFAAyF;QACzF,+DAA+D;QAC/D,8CAA8C;QAC9C,4FAA4F;QAC5F,gEAAgE;QAChE,qDAAqD;KACtD,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,iBAAiB;IAC/B,OAAO,CAAC,GAAG,CACT;QACE,QAAQ;QACR,0BAA0B;QAC1B,EAAE;QACF,uGAAuG;QACvG,0HAA0H;QAC1H,EAAE;QACF,WAAW;QACX,wBAAwB;KACzB,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;AACJ,CAAC"}
@@ -1,2 +1,2 @@
1
- export { CommandRegistry, createCommandRegistry, getRiskLevelAutocompleteOptions, getRiskLevelDescription, } from "./registry.js";
1
+ export { CommandRegistry, createCommandRegistry, } from "./registry.js";
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/commands/index.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,+BAA+B,EAC/B,uBAAuB,GACxB,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/commands/index.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,eAAe,EACf,qBAAqB,GACtB,MAAM,eAAe,CAAC"}
@@ -1,25 +1,5 @@
1
1
  import { dirname } from "node:path";
2
- import { RiskLevelSchema } from "../types.js";
3
2
  import { formatPathForDisplay } from "../utils/format.js";
4
- const DEFAULT_RISK_LEVELS = ["read-only", "read-write"];
5
- const RISK_LEVEL_HELP_DESCRIPTIONS = {
6
- "read-only": "allow read-only tool calls",
7
- "read-write": "allow all tools",
8
- };
9
- export function getRiskLevelDescription(level) {
10
- switch (level) {
11
- case "read-only":
12
- return "read-only tools";
13
- case "read-write":
14
- return "all tools";
15
- }
16
- }
17
- export function getRiskLevelAutocompleteOptions(allowed) {
18
- return allowed.map((level) => ({
19
- id: level,
20
- description: RISK_LEVEL_HELP_DESCRIPTIONS[level],
21
- }));
22
- }
23
3
  function formatSkillPath(fullPath, formatPath) {
24
4
  return formatPath(dirname(dirname(fullPath)));
25
5
  }
@@ -66,7 +46,7 @@ export class CommandRegistry {
66
46
  }
67
47
  buildHelpText(options = {}) {
68
48
  const lines = [];
69
- const { agentsFiles, skills, riskLevels, themes } = options;
49
+ const { agentsFiles, skills, themes } = options;
70
50
  const formatPath = options.formatPath ?? formatPathForDisplay;
71
51
  if (agentsFiles && agentsFiles.length > 0) {
72
52
  lines.push("context:");
@@ -88,26 +68,12 @@ export class CommandRegistry {
88
68
  }
89
69
  const hasThemes = (themes?.length ?? 0) > 0;
90
70
  const commands = this.list().filter((command) => command.argument !== "theme" || hasThemes);
91
- const baseCommands = commands.filter((command) => command.section === "base");
92
- const trailingCommands = commands.filter((command) => command.section === "trailing");
93
- const riskCommand = commands.find((command) => command.section === "risk");
94
- const commandEntries = [];
95
- baseCommands.forEach((command) => {
96
- commandEntries.push([command.usage, command.description]);
97
- });
98
- if (riskCommand) {
99
- const allowed = riskLevels ?? DEFAULT_RISK_LEVELS;
100
- allowed.forEach((level) => {
101
- const description = RISK_LEVEL_HELP_DESCRIPTIONS[level];
102
- commandEntries.push([`/risk:${level}`, description]);
103
- });
104
- }
105
- trailingCommands.forEach((command) => {
106
- commandEntries.push([command.usage, command.description]);
107
- });
71
+ const commandEntries = commands.map((command) => [
72
+ command.usage,
73
+ command.description,
74
+ ]);
108
75
  const keyEntries = [
109
76
  ["shift+tab", "cycle reasoning effort"],
110
- ["ctrl+r", "cycle risk level"],
111
77
  ["ctrl+p", "cycle personality"],
112
78
  ["ctrl+t", "toggle thoughts visibility"],
113
79
  ["ctrl+o", "toggle compact tool UI"],
@@ -140,7 +106,6 @@ export function createCommandRegistry() {
140
106
  description: "show this help",
141
107
  autocompleteDescription: "show help",
142
108
  argument: "none",
143
- section: "base",
144
109
  parse: (raw) => {
145
110
  const { command, extra } = splitCommandInput(raw);
146
111
  if (command !== "/help")
@@ -155,7 +120,6 @@ export function createCommandRegistry() {
155
120
  description: "exit tau",
156
121
  autocompleteDescription: "exit tau",
157
122
  argument: "none",
158
- section: "base",
159
123
  allowDuringStreaming: true,
160
124
  parse: (raw) => {
161
125
  const { command, extra } = splitCommandInput(raw);
@@ -171,7 +135,6 @@ export function createCommandRegistry() {
171
135
  description: "new session",
172
136
  autocompleteDescription: "new session",
173
137
  argument: "none",
174
- section: "base",
175
138
  parse: (raw) => {
176
139
  const { command, extra } = splitCommandInput(raw);
177
140
  if (command !== "/new")
@@ -186,7 +149,6 @@ export function createCommandRegistry() {
186
149
  description: "rewind context to an earlier user message",
187
150
  autocompleteDescription: "rewind context to a selected user message",
188
151
  argument: "none",
189
- section: "base",
190
152
  parse: (raw) => {
191
153
  const { command, extra } = splitCommandInput(raw);
192
154
  if (command !== "/rewind")
@@ -201,7 +163,6 @@ export function createCommandRegistry() {
201
163
  description: "open the local diff review tool for the session diff",
202
164
  autocompleteDescription: "open diff review for git diff args",
203
165
  argument: "none",
204
- section: "base",
205
166
  parse: (raw) => {
206
167
  const { command, extra } = splitCommandInput(raw);
207
168
  if (command !== "/diff")
@@ -216,7 +177,6 @@ export function createCommandRegistry() {
216
177
  description: "summarize and start new session",
217
178
  autocompleteDescription: "compact history to a summary",
218
179
  argument: "none",
219
- section: "base",
220
180
  parse: (raw) => {
221
181
  const { command, extra } = splitCommandInput(raw);
222
182
  if (command !== "/compact:summary-only")
@@ -231,7 +191,6 @@ export function createCommandRegistry() {
231
191
  description: "summarize and include previous last assistant message",
232
192
  autocompleteDescription: "compact history, keep last assistant message",
233
193
  argument: "none",
234
- section: "base",
235
194
  parse: (raw) => {
236
195
  const { command, extra } = splitCommandInput(raw);
237
196
  if (command !== "/compact:summary-and-last")
@@ -246,7 +205,6 @@ export function createCommandRegistry() {
246
205
  description: "prune earliest tool results from context",
247
206
  autocompleteDescription: "prune earliest tool results",
248
207
  argument: "none",
249
- section: "base",
250
208
  parse: (raw) => {
251
209
  const { command, extra } = splitCommandInput(raw);
252
210
  if (command !== "/prune:earliest")
@@ -261,7 +219,6 @@ export function createCommandRegistry() {
261
219
  description: "prune largest tool results from context",
262
220
  autocompleteDescription: "prune largest tool results",
263
221
  argument: "none",
264
- section: "base",
265
222
  parse: (raw) => {
266
223
  const { command, extra } = splitCommandInput(raw);
267
224
  if (command !== "/prune:largest")
@@ -276,7 +233,6 @@ export function createCommandRegistry() {
276
233
  description: "prune tool results using model selection",
277
234
  autocompleteDescription: "prune tool results with model selection",
278
235
  argument: "none",
279
- section: "base",
280
236
  parse: (raw) => {
281
237
  const { command, extra } = splitCommandInput(raw);
282
238
  if (command !== "/prune:smart")
@@ -291,7 +247,6 @@ export function createCommandRegistry() {
291
247
  description: "reload prompts, skills, themes, and AGENTS.md",
292
248
  autocompleteDescription: "reload prompts, skills, themes, and AGENTS.md",
293
249
  argument: "none",
294
- section: "base",
295
250
  parse: (raw) => {
296
251
  const { command, extra } = splitCommandInput(raw);
297
252
  if (command !== "/reload")
@@ -306,7 +261,6 @@ export function createCommandRegistry() {
306
261
  description: "start voice recording and transcription",
307
262
  autocompleteDescription: "start voice recording",
308
263
  argument: "none",
309
- section: "base",
310
264
  allowDuringStreaming: true,
311
265
  parse: (raw) => {
312
266
  const { command, extra } = splitCommandInput(raw);
@@ -322,7 +276,6 @@ export function createCommandRegistry() {
322
276
  description: "speak the last assistant message aloud",
323
277
  autocompleteDescription: "speak the last assistant message",
324
278
  argument: "none",
325
- section: "base",
326
279
  parse: (raw) => {
327
280
  const { command, extra } = splitCommandInput(raw);
328
281
  if (command !== "/speak")
@@ -337,7 +290,6 @@ export function createCommandRegistry() {
337
290
  description: "copy last assistant message",
338
291
  autocompleteDescription: "copy last assistant message",
339
292
  argument: "none",
340
- section: "base",
341
293
  parse: (raw) => {
342
294
  const { command, extra } = splitCommandInput(raw);
343
295
  if (command !== "/copy:text")
@@ -352,7 +304,6 @@ export function createCommandRegistry() {
352
304
  description: "copy code blocks from last assistant message",
353
305
  autocompleteDescription: "copy code blocks from last assistant message",
354
306
  argument: "none",
355
- section: "base",
356
307
  parse: (raw) => {
357
308
  const { command, extra } = splitCommandInput(raw);
358
309
  if (command !== "/copy:code")
@@ -361,30 +312,11 @@ export function createCommandRegistry() {
361
312
  },
362
313
  run: (ctx) => ctx.copyCode(),
363
314
  });
364
- registry.register({
365
- id: "risk",
366
- usage: "/risk:<level>",
367
- description: "set risk level",
368
- argument: "risk",
369
- section: "risk",
370
- parse: (raw) => {
371
- const { command, extra } = splitCommandInput(raw);
372
- const match = command.match(/^\/risk:(read-only|read-write)$/i);
373
- if (!match)
374
- return null;
375
- const parsed = RiskLevelSchema.safeParse(match[1]?.toLowerCase());
376
- if (!parsed.success)
377
- return null;
378
- return { type: "risk", level: parsed.data, extra };
379
- },
380
- run: (ctx, command) => ctx.risk(command.level),
381
- });
382
315
  registry.register({
383
316
  id: "persona",
384
317
  usage: "/persona:<id>",
385
318
  description: "switch persona",
386
319
  argument: "persona",
387
- section: "trailing",
388
320
  parse: (raw) => {
389
321
  const { command, extra } = splitCommandInput(raw);
390
322
  const match = command.match(/^\/persona:(.+)$/i);
@@ -400,7 +332,6 @@ export function createCommandRegistry() {
400
332
  usage: "/prompt:<id>",
401
333
  description: "insert prompt template",
402
334
  argument: "prompt",
403
- section: "trailing",
404
335
  allowDuringStreaming: true,
405
336
  parse: (raw) => {
406
337
  const { command, extra } = splitCommandInput(raw);
@@ -417,7 +348,6 @@ export function createCommandRegistry() {
417
348
  usage: "/theme:<id>",
418
349
  description: "switch theme",
419
350
  argument: "theme",
420
- section: "trailing",
421
351
  parse: (raw) => {
422
352
  const { command, extra } = splitCommandInput(raw);
423
353
  const match = command.match(/^\/theme:(.+)$/i);
@@ -433,7 +363,6 @@ export function createCommandRegistry() {
433
363
  usage: "",
434
364
  description: "",
435
365
  argument: "none",
436
- section: "base",
437
366
  hidden: true,
438
367
  parse: () => null,
439
368
  run: (ctx, command) => ctx.unknown(command.raw),