feat(shell): add PTY support for interactive commands (sudo, ssh)#1571
feat(shell): add PTY support for interactive commands (sudo, ssh)#1571tanikush wants to merge 2 commits into
Conversation
|
Thanks for taking the time to put this together. Unfortunately I don't think we can take this as-is — there are a couple of architectural blockers I should explain so the work isn't wasted.
Ink owns stdin/stdout. Reasonix's UI is an Ink TUI, which keeps A few smaller things I'd flag regardless:
Going to close this one. Appreciate the contribution — if you're interested in the non-interactive-flag detection angle (helpful error message when a command would have prompted), that'd be a welcome follow-up. |
…SessionStats, and card state Four targeted fixes for memory growth during long sessions: 1. JobRegistry: auto-evict oldest completed jobs when count > 50 2. AppendOnlyLog: auto-compact when entries > 500, keep recent 200 3. SessionStats.turns: rolling window of 200 turns, older costs aggregated into carryover 4. state.cards: trim oldest settled cards when count > 150; Terminal scrollback retains visual output, only React state freed Fixes esengine#1571
…SessionStats, and card state Four targeted fixes for memory growth during long sessions: 1. JobRegistry: auto-evict oldest completed jobs when count > 50 2. AppendOnlyLog: auto-compact when entries > 500, keep recent 200 3. SessionStats.turns: rolling window of 200 turns, older costs aggregated into carryover 4. state.cards: trim oldest settled cards when count > 150; Terminal scrollback retains visual output, only React state freed Fixes esengine#1571
- Auto-evict oldest completed jobs when count exceeds MAX_COMPLETED_JOBS (20) - Cleanup runs on job completion (settleClosed) and list() calls - No time throttle — gate on count only, O(jobs.size) is trivial at N=20 - Initialize lastCleanupAt to 0 so first call always runs (fixes dead zone) Fixes #1571 (JobRegistry portion) Co-authored-by: CI Fix <fix@ci.local>
What
Adds PTY (pseudo-terminal) support for interactive shell commands in Reasonix.
Why
Currently interactive commands like sudo, ssh, npm init fail or hang because they require user input via a real terminal.
How
##How to verify
Run:
npm run verify
Then test:
sudo echo "test"
ssh localhost (if configured)
Checklist