``clawcodex tui`` — the explicit form of the default interactive entry. Unlike the lean ``mcp`` / ``doctor`` / ``daemon`` fast-paths, this launches the tool-executing agent-server, so it runs the SAME interactive bootstrap (``run_pre_action`` — config-env application + trust seeding) an
(rest: list[str])
| 190 | |
| 191 | |
| 192 | def _run_tui_subcommand(rest: list[str]) -> int: |
| 193 | """``clawcodex tui`` — the explicit form of the default interactive entry. |
| 194 | |
| 195 | Unlike the lean ``mcp`` / ``doctor`` / ``daemon`` fast-paths, this launches |
| 196 | the tool-executing agent-server, so it runs the SAME interactive bootstrap |
| 197 | (``run_pre_action`` — config-env application + trust seeding) and |
| 198 | folder-trust gate as the default ``clawcodex`` entry before handing off to |
| 199 | the Ink client. Without this, ``clawcodex tui`` would reach the backend with |
| 200 | no trust prompt and without the project env the child inherits. |
| 201 | """ |
| 202 | from types import SimpleNamespace |
| 203 | |
| 204 | from src.init import run_pre_action |
| 205 | |
| 206 | # ``print=False`` => treated as an interactive session by run_pre_action. |
| 207 | run_pre_action(SimpleNamespace(print=False)) |
| 208 | if not _gate_folder_trust(): |
| 209 | return 1 |
| 210 | from src.entrypoints.tui_launcher import run_tui_launcher |
| 211 | |
| 212 | return run_tui_launcher(rest) |
| 213 | |
| 214 | |
| 215 | def _prompt_folder_trust() -> bool: |
no test coverage detected