All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Universal adapter layer:
BackendAdapterandBackendSessioninterfaces — one contract for any coding agent - UnifiedMessage: Normalized message envelope with
Interruptible,Configurable,PermissionHandler,Reconnectable,Encryptableextension interfaces via runtime type narrowing - SequencedMessage<T>: Wrapper with
seq+timestampfor reconnection replay - ClaudeAdapter: Claude Code
--sdk-urlNDJSON/WebSocket adapter with inbound/outbound translators, state reducer, and--resumesupport - ACPAdapter: JSON-RPC 2.0 over stdio covering 25+ ACP-compliant agents (Goose, Kiro, Gemini CLI, Cline, OpenHands, ...)
- CodexAdapter: JSON-RPC over WebSocket for
codex app-servermode — Thread/Turn/Item model mapped to UnifiedMessage (30+ method types) - OpencodeAdapter: HTTP + SSE adapter for Opencode CLI
- GeminiAdapter: A2A SSE adapter for Gemini CLI
- Backend adapter compliance test suite
- React 19 + Zustand + Tailwind v4 + Vite single-file consumer (~300 KB, ~94 KB gzip)
- Companion-style layout: collapsible sidebar, chat view, agent pane, status bar
- New Session Dialog: create sessions with adapter, model, and working directory selection
- Rich message rendering: markdown, code blocks, image blocks, thinking blocks, tool execution, diffs
- Streaming UX: blinking cursor, elapsed time, token count
- Slash command menu: categorized typeahead with keyboard navigation
- Permission UI: tool-specific previews (Bash commands, Edit diffs, file paths)
- Team coordination: task panel, agent grid, member presence
- Process log drawer, toast notifications, circuit breaker status banner
- Auto-reconnect with message replay from
last_seen_seq
Daemonclass withstart()/stop()lifecycleLockFile:O_CREAT | O_EXCLexclusive lock prevents duplicate instances with staleness detectionStateFile:{ pid, port, heartbeat, version, controlApiToken }for CLI discoveryControlApi: HTTP on127.0.0.1:0with Bearer auth — list, create, delete sessionsHealthCheck: 60s heartbeat loop updating state file- Graceful shutdown on SIGTERM/SIGINT with 10s force-exit timeout
EncryptionLayer: transparent E2E encryption middleware (sealed boxes: XSalsa20-Poly1305)CloudflaredManager: cloudflared sidecar — start, stop, tunnel URL extraction, retry with backoffPairingManager: pairing link generation and sealed-box key exchangeNonceTracker: anti-replay protection (last 1000 nonces, 30s timestamp window)- HMAC-SHA256 permission signing with nonce + timestamp + request_id binding
EncryptedEnvelopewire format:{ v: 1, sid, ct, len }
ReconnectionHandler: stable consumer IDs, per-session message history, replay fromlast_seen_seqConsumerChannel: per-consumer send queue with backpressure and high-water mark
- Renamed package from
claude-code-bridgetobeamcode SessionBridgedecomposed into focused modules:SessionStore,ConsumerBroadcaster,ConsumerGatekeeper,SlashCommandExecutor,TeamEventDiffer- Slash command routing replaced with explicit handler chain (no binary routing)
- Session coordination delegated from
SessionBridgetoSessionManager NodeWebSocketServergeneralized for consumer reconnection supportProcessSupervisorextracted as reusable core component- Added
libsodium-wrappers-sumodependency for E2E encryption
- Consumer token used for HTTP API auth so New Session Dialog works correctly (#79)
- Await backend session close before port reuse to prevent startup races (#76)
- Remove
/costcommand — not supported by Claude CLI (#73) - Codex
codex/event/errorhandling witherror_codemetadata surfacing (#66) - Security audit: 9 findings resolved including env injection, path traversal, and auth hardening (#68)
- Architecture violations: hexagonal boundary enforcement across all layers (#67)
- Frontend stability, message echo prevention, and security hardening (#5)
- Rewrote
README.md: focused vision, web UI walkthrough, updated adapter diagrams - Added
DEVELOPMENT.md: architecture reference, adapter guide, configuration, events, auth, testing, build
- GitHub Actions CI/CD workflows for automated testing and releases
- Main CI workflow: Tests on Node 18.x and 20.x, linting, type checking, code coverage
- Release workflow: Automated GitHub Release creation on version tags
- Coverage uploads to Codecov for main branch pushes
- Consolidated documentation structure (API_REFERENCE.md, CHANGELOG.md, README.md)
- Enhanced .gitignore with coverage, IDE, and log patterns
- Removed redundant PRODUCTION_HARDENING.md and COMPLETION_SUMMARY.md documentation
- Initial release of the library (then named
claude-code-bridge) - Runtime-agnostic TypeScript library for managing Claude Code CLI sessions via WebSocket
- Core:
- SessionManager for WebSocket-based session coordination
- SessionBridge for bridging consumer and CLI connections
- CLILauncher for spawning and managing CLI processes
- FileStorage for persistent session state
- Production hardening:
- Idle session timeout cleanup
- Health check endpoint
- Connection heartbeat (ping-pong)
- Backpressure handling with queue limits
- Graceful drain on shutdown
- Pending message queue overflow prevention
- Rate limiting (token bucket)
- Circuit breaker (sliding window)
- Atomic/crash-safe file writes with write-ahead logging
- Structured logging with pluggable logger interface
- Session statistics API with real-time metrics
- Operational commands (close, archive, list)
- Slash command support:
- Emulated commands:
/model,/status,/config,/cost,/context(instant, from SessionState) - Native forwarding:
/compact,/cost,/context,/files,/release-notes(to CLI) - PTY commands: Any other command via sidecar PTY (requires
node-pty) SlashCommandExecutorwith per-session serialization queuePtyCommandRunneradapter for interactive PTY execution
- Emulated commands:
- Security:
- UUID validation for session IDs
- Path traversal prevention in FileStorage
- Environment variable deny list
- Binary path validation (basename or absolute only)
- Auth:
- Pluggable
Authenticatorinterface - Role-based access control (
participant/observer) - Presence tracking and broadcast
- Pluggable
- DX:
- Dual CJS/ESM package exports
- Full TypeScript type definitions
TypedEventEmitterwith complete event map types- Testing utilities (
MockProcessManager,MemoryStorage,MockCommandRunner) - Example operator dashboard server
- 331 tests via Vitest
- Runtime: Node.js 22.0.0+
- Language: TypeScript 5.8+
- Testing: Vitest 3.0+
- Linting: Biome 2.3+
- WebSocket: ws 8.18+
- Crypto: libsodium-wrappers-sumo 0.7.15