Commit graph

116 commits

Author SHA1 Message Date
508a1c9837
Fix CLI resource cleanup and auth flow 2026-01-28 11:50:51 -05:00
54bc458b7d
Add PTY CLI wrapper
Wraps claude CLI in PTY and bridges to WebSocket server. Handles:
- Argument parsing (--server, --secret)
- PTY spawn with terminal size detection
- Bidirectional I/O: local stdin/stdout + WebSocket
- Terminal resize events (SIGWINCH)
- Graceful cleanup on exit
- Basic WebSocket reconnection
- Auth and session messages to server
2026-01-28 11:46:47 -05:00
65b8acf5f8
Fix SSE cleanup and add prompt creation endpoint
- Fix SSE cancel handler to properly capture controller in closure
- Remove error JSON messages before WebSocket close (close reason is sufficient)
- Add POST /api/sessions/:sessionId/prompts endpoint for prompt creation
- Add SSE client cleanup on broadcast errors
- Add createPrompt and getSession imports
- Add prompt message type to ClientMessage for CLI prompt reporting
- Add prompt message handler in WebSocket to create and broadcast prompts
2026-01-28 11:41:50 -05:00
b4ac7beead
Add HTTP/WebSocket/SSE server 2026-01-28 11:37:59 -05:00
76a81666a2
Fix prepared statements to prepare once at init 2026-01-28 11:18:44 -05:00
596b0fd013
Add SQLite database layer with tests 2026-01-28 11:15:36 -05:00
59f21cd062
Add HMAC authentication with comprehensive tests
Implements device authentication using HMAC-SHA256 signatures with constant-time comparison for security. Includes timestamp-based auth headers with configurable freshness checking (default 5min) and clock skew tolerance.
2026-01-28 11:14:54 -05:00
e61bcb544d
Add message and entity types 2026-01-28 11:09:44 -05:00
82f3d18117
Add references section for inspiration sources 2026-01-28 11:06:09 -05:00
1db763aa89
Add placeholder test 2026-01-28 11:03:32 -05:00
02be345946
Fix biome config formatting (self-heal) 2026-01-28 11:03:31 -05:00
726190eaa6
Restructure project files into src and public directories
Moved index.ts to src/server.ts and created stub files for types, db, auth,
and cli modules. Added minimal placeholder for dashboard. Removed generated
README.md in favor of CLAUDE.md and docs/plan.md.
2026-01-28 11:00:19 -05:00
350fcf3713
Add implementation plan to docs
Copied from planning phase - full specification for PTY wrapper,
WebSocket protocol, SQLite schema, and deployment setup.
2026-01-28 10:59:48 -05:00
9c6b5f6e59
Update CLAUDE.md with project-specific instructions
Added project description, contribution policy for bun-pty, and standard
workflow notes. Kept Bun API references for development guidance.
2026-01-28 10:59:39 -05:00
62a264c62a
Add npm scripts and justfile for development workflow
Scripts cover linting, type checking, testing, and dev server.
Justfile provides docker commands and unified check command.
2026-01-28 10:59:07 -05:00
0bc0c2fded
Configure biome to use 2 space indentation
Switching from tabs to spaces for consistency with most TypeScript projects.
2026-01-28 10:58:51 -05:00