Add references section for inspiration sources
This commit is contained in:
parent
1db763aa89
commit
82f3d18117
1 changed files with 23 additions and 0 deletions
23
CLAUDE.md
23
CLAUDE.md
|
|
@ -7,11 +7,33 @@ Self-hosted remote control for Claude Code. Wrap CLI in PTY, stream output to se
|
||||||
Pure Bun stack: no frameworks, minimal dependencies. Target ~1000-1500 lines total.
|
Pure Bun stack: no frameworks, minimal dependencies. Target ~1000-1500 lines total.
|
||||||
|
|
||||||
Core tech:
|
Core tech:
|
||||||
|
|
||||||
- bun-pty for PTY wrapper (FFI to Rust, pre-built binaries)
|
- bun-pty for PTY wrapper (FFI to Rust, pre-built binaries)
|
||||||
- bun:sqlite for persistence
|
- bun:sqlite for persistence
|
||||||
- Bun.serve() for HTTP + WebSocket + SSE
|
- Bun.serve() for HTTP + WebSocket + SSE
|
||||||
- plain text output (no xterm.js) for mobile-friendly display
|
- plain text output (no xterm.js) for mobile-friendly display
|
||||||
|
|
||||||
|
## References
|
||||||
|
|
||||||
|
Inspiration and patterns to steal from:
|
||||||
|
|
||||||
|
| Source | Path | What to look at |
|
||||||
|
| ---------- | ---------------- | ------------------------------------------------------------------ |
|
||||||
|
| crabigator | `../crabigator/` | Architecture, WebSocket protocol, cloud client, session management |
|
||||||
|
| bun-pty | `../bun-pty/` | PTY API, spawn patterns, event handling |
|
||||||
|
|
||||||
|
Key files in crabigator:
|
||||||
|
|
||||||
|
- `src/cloud/client.rs` - WebSocket connection, reconnection logic
|
||||||
|
- `src/cloud/events.rs` - event types for streaming
|
||||||
|
- `src/capture.rs` - output capture patterns
|
||||||
|
- `workers/crabigator-api/src/session-do.ts` - session state management
|
||||||
|
|
||||||
|
Key files in bun-pty:
|
||||||
|
|
||||||
|
- `src/index.ts` - spawn API, IPty interface
|
||||||
|
- `src/terminal.ts` - FFI bindings (for understanding internals)
|
||||||
|
|
||||||
## Contribution policy
|
## Contribution policy
|
||||||
|
|
||||||
If bun-pty needs changes, fork and contribute upstream. Don't vendor or patch locally.
|
If bun-pty needs changes, fork and contribute upstream. Don't vendor or patch locally.
|
||||||
|
|
@ -19,6 +41,7 @@ If bun-pty needs changes, fork and contribute upstream. Don't vendor or patch lo
|
||||||
## Workflow
|
## Workflow
|
||||||
|
|
||||||
After making changes:
|
After making changes:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
just check # lint + typecheck + test
|
just check # lint + typecheck + test
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue