Update docs for terminal emulation

This commit is contained in:
Jared Miller 2026-01-31 10:04:29 -05:00
parent 6bd599d47b
commit 0ac5eec30d
Signed by: shmup
GPG key ID: 22B5C6D66A38B06C
2 changed files with 11 additions and 0 deletions

View file

@ -13,6 +13,16 @@ Core tech:
- Bun.serve() for HTTP + WebSocket + SSE
- plain text output (no xterm.js) for mobile-friendly display
## Terminal Emulation
Output processing uses @xterm/headless for proper VT100 emulation:
- src/terminal.ts - headless terminal wrapper
- One terminal instance per session (created on auth, disposed on close)
- serializeAsHTML() produces HTML for SSE broadcast
- ansi.ts and ansi-carryover.ts are deprecated (kept for rollback)
See docs/terminal-emulation.md for design rationale.
## References
Inspiration and patterns to steal from:

View file

@ -110,6 +110,7 @@ Pure Bun stack:
- bun-pty for PTY wrapper
- bun:sqlite for persistence
- Bun.serve() for HTTP + WebSocket + SSE
- @xterm/headless for terminal emulation and state tracking
- plain text output (mobile-friendly)
Target: ~1000-1500 lines total.