Commit Graph

3 Commits

Author SHA1 Message Date
5b07dfe323 feat: add ensure_pty for deferred PTY creation with client dimensions
New ensure_pty message: creates PTY if not running, or resizes and
sends replay buffer if already active. This allows the frontend to
request PTY creation with actual terminal dimensions after xterm.js
FitAddon calculates the correct cols/rows for the container.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 01:41:47 +03:00
c127faccef feat: add dev mode with DEV_ env prefix
Support dual configuration: PROXY_TOKEN/SERVER_URL for production,
DEV_PROXY_TOKEN/DEV_SERVER_URL for local development.

- npm start → production
- npm run start:dev → dev (PROXY_MODE=dev)
- npm run dev → dev with hot-reload
- Restore PTY auto-creation on sync_state for existing chats

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 01:19:21 +03:00
4a91896732 feat: xterm.js + node-pty architecture for Claude CLI web terminal
Complete rewrite from tmux + JSONL parsing to a clean PTY-based approach.
The proxy spawns Claude CLI in a pseudo-terminal via node-pty and relays
terminal I/O as binary WebSocket frames to the simple-chat backend,
which forwards them to the browser where xterm.js renders a full terminal.

- node-pty PTY manager with 50KB replay buffer per session
- Binary frame protocol with chatId multiplexing
- WebSocket client with auto-reconnection and heartbeat
- Directory listing and session listing for the web UI
- README with setup instructions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 00:24:29 +03:00