core/tools/process: drop host TTY restore; rely on CSI sanitize only

This commit is contained in:
2026-07-18 16:26:23 +08:00
parent 896dc98d20
commit edd54a427c
6 changed files with 35 additions and 127 deletions
+2 -2
View File
@@ -232,8 +232,8 @@ Safety defaults:
- Command basename denylist (e.g. dangerous shells/utilities).
- Destructive tools (delete/move/overwrite) can require confirm (`confirm_destructive`; default deny in non-TTY). Override for the session with `/yolo on|off|once` or startup `--yes` (path/command denylists still apply).
- PTY sessions: caps, idle TTL, output budget; master FD is non-inheritable; sessions closed on chat exit.
Prefer file tools over full-screen editors (`vim`/`nano`) for edits. `read_pty` escapes CSI so tool
results cannot reprogram the host TTY; `close_pty` / chat exit also restore the host terminal.
Prefer file tools over full-screen editors (`vim`/`nano`) for edits. `read_pty` sanitizes CSI/controls
so tool results cannot reprogram the host TTY (no host terminal reset on exit).
`write_pty` is literal text only; use `write_pty_keys` for `\xHH`, `ctrl+x`, `key=esc|enter|…`.
## Usage / context (CLI)