Commit Graph

4 Commits

Author SHA1 Message Date
Leopere 0314c598fb
Polish: camera-only entropy, cleaner output, complete docs
- Remove CSPRNG fallback: pool now returns errors when camera entropy
  is insufficient instead of silently falling back to ChaCha20.
  Random data is only from camera input or not at all.
- Fix throughput display: show Mbps/KB/s for smaller frame sizes,
  Gbps/MB/s for larger ones (actual frame size varies by pixel format).
- Add RESEARCH.md note about pixel format impact on throughput.
- Complete README API table with all endpoints (dice, password, coin,
  8ball, cameras, docs, MCP).
- Add docker-compose device mapping for Linux camera access with
  explanatory comments about macOS limitation.
- Add macOS LaunchAgent scripts (install/uninstall/plist template).
- Polish run-mac.sh with build step and clearer output.
- Fix dead code warnings on library utility functions.
- Add /logs/ to .gitignore for LaunchAgent log output.
- Fix skill.md: remove stale CSPRNG fallback references.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-15 11:08:13 -05:00
Leopere 1ce1c833b6
Add comprehensive curl/stream examples to all code tabs and skill.md
- Expand index.html code examples (curl, Python, JS, Rust, Go) to
  include /stream, /dice, /password, /coin, /8ball, and /health
  endpoints alongside /random — stream examples were previously missing
- Fix skill.md: remove duplicated stream code block, add dedicated
  sections for dice, password, coin, and 8ball endpoints with full
  curl examples and parameter docs
- Add comprehensive "curl (comprehensive)" cheat-sheet section to
  skill.md covering every endpoint in one block

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-09 13:50:56 -05:00
Leopere cad9ef1b23
Remove /raw endpoint completely - security hardening
- Removed /raw route from server
- Removed get_raw function and RawQuery struct
- Removed extract_raw_lsb import
- Removed all /raw references from skill.md documentation
- Replaced url_template placeholders with concrete example URLs in MCP JSON
- Users can no longer access raw sensor data

Security: Raw sensor data access completely removed to prevent potential
information leakage from camera sensor patterns.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-05 17:05:57 -05:00
Leopere 05aea9530b
Add MCP self-referencing docs and /docs endpoint
- Enhanced /.well-known/mcp.json to extract hostname from request headers (SNI/Host)
- Added self-referencing URLs that work with localhost, domains, and reverse proxies
- Documented all 5 API endpoints (random, raw, stream, cameras, health) as MCP tools
- Added /docs endpoint serving HTML documentation from skill.md
- Added /docs/skill.md for raw markdown access
- Added /docs/mcp.json as alias to /.well-known/mcp.json
- Created skill.md with comprehensive API documentation
- Markdown to HTML conversion happens at build time

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-05 16:34:28 -05:00