feat(tui): session resume — /resume command, exit hint, and dsh --resume <id>

Squashes feat/tui-resume-command, fix/tui-resume-desc, and
feat/tui-resume-flag.
This commit is contained in:
Turtle
2026-07-22 10:55:19 +08:00
parent 87899ae161
commit 2a5dfb7d35
10 changed files with 206 additions and 35 deletions

View File

@@ -5,6 +5,7 @@ The `dsh` command-line entry, following the `apps/` assembly tier proposed by th
The TUI surface:
- boots the shipped default config (`examples/tui-agent/cordis.yml`) or an explicit config argument, through [`dsh-app-boot`](../../packages/ui/app-boot/README.md);
- resumes a persisted session with `dsh --resume <session-id>` — the form the TUI prints on exit and lists under `/resume`; the flag sets `RESUME_SESSION_ID` before boot so the shipped config rehydrates that session, and a missing or unreadable id fails loud and exits nonzero;
- treats the **invoking directory** as the workspace — sessions, relative paths, and workspace instructions resolve from the cwd;
- tells the agent where its own source lives: after boot it adds a prompt section naming this harness checkout, resolved from the launcher's real path so it holds under a PATH symlink and an arbitrary cwd, so the self-referential `cordis` toolset can read and modify it;
- applies the personal overlay from `~/.config/dsh` (see [app-boot's Personal config](../../packages/ui/app-boot/README.md#personal-config)): `.env` fills environment gaps (ambient > project `.env` > personal `.env`), `config.yaml` patches the booted tree.