sandbox-agent/server/packages
Nathan Flurry ac0a22cd07 feat: add PTY/terminal session support to Process Manager API
Add Docker-style terminal support with -t (TTY) and -i (interactive) flags:

Backend (Rust):
- Add portable-pty dependency for PTY allocation on Unix
- Extend StartProcessRequest with tty, interactive, and terminalSize options
- Add PTY process spawning with TERM=xterm-256color
- Add WebSocket endpoint for bidirectional terminal I/O
- Add terminal resize endpoint (POST /process/:id/resize)
- Add terminal input endpoint (POST /process/:id/input)
- Support base64-encoded binary input
- Process info now includes tty, interactive, and terminalSize fields
- Terminal output is logged to combined.log for persistence

Frontend (Inspector UI):
- Add @xterm/xterm and addons for terminal rendering
- Create Terminal component with xterm.js integration
- Add tabbed view (Terminal/Logs) for PTY processes
- Terminal auto-connects via WebSocket when process is expanded
- Support terminal resize with ResizeObserver
- Show PTY badge on processes with TTY enabled
- Graceful handling of process exit and disconnection

API:
- GET /v1/process/:id/terminal - WebSocket for terminal I/O
- POST /v1/process/:id/resize - Resize terminal (cols, rows)
- POST /v1/process/:id/input - Write data to terminal

WebSocket protocol:
- type: 'data' - Terminal output (server -> client)
- type: 'input' - Terminal input (client -> server)
- type: 'resize' - Resize request (client -> server)
- type: 'exit' - Process exited (server -> client)
- type: 'error' - Error message (server -> client)
2026-01-30 13:13:16 -08:00
..
agent-credentials fix: add description and repository fields to all crate Cargo.toml files 2026-01-27 20:32:09 -08:00
agent-management feat: add Claude adapter improvements for HITL support (#30) 2026-01-29 07:19:10 -08:00
error fix: add description and repository fields to all crate Cargo.toml files 2026-01-27 20:32:09 -08:00
extracted-agent-schemas feat: move api cli commands under api subcommand 2026-01-28 01:11:57 -08:00
openapi-gen fix: add description and repository fields to all crate Cargo.toml files 2026-01-27 20:32:09 -08:00
sandbox-agent feat: add PTY/terminal session support to Process Manager API 2026-01-30 13:13:16 -08:00
universal-agent-schema feat: add Claude adapter improvements for HITL support (#30) 2026-01-29 07:19:10 -08:00
universal-schema-gen fix: add description and repository fields to all crate Cargo.toml files 2026-01-27 20:32:09 -08:00