Resolve conflicts: accept server split, apply hint reorder
to terminal.ts, add JSX pragma to phone.tsx
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add bin entry and CLI shim for `bunx baudy`
- Add JSX pragmas so hono/jsx resolves without tsconfig
- Add bunfig.toml, .npmignore for publishing
- Reorder error hints to prioritize headphone disconnect
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Split 783-line src/server/index.tsx into:
- src/server/audio.ts: ggwave init, playback, mic listener
- src/server/game.ts: pure game logic, returns GuessResult
- src/server/terminal.ts: console output, startup, handshake routing
- src/pages/phone.tsx: Forge components + serialized client JS
Phone page is fully standalone after load — all communication via ggwave
audio (HELLO/HEY BUDDY handshake, guess responses). Added sendAndWait()
for clean half-duplex request/response flow with configurable timeout.
Server waits 500ms before replying to give phone time to switch to listening.
Added TLS support for getUserMedia on mobile.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Phone UI sends number guesses via ggwave audio chirps through the air,
server decodes from mic, responds with Higher/Lower via SSE + audio.
Includes loopback audio test on startup, QR code for phone, stepped
terminal UX, chunked victory message, and timeout error handling.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Includes a working Bun server and iOS Safari calculator UI that uses data-over-sound
encoding/decoding via the ggwave library. Phone encodes expressions as audible chirps,
Mac server decodes via microphone, evaluates, and sends result back via SSE. Tested
reliably with ambient noise using Studio Display microphone.
Includes gotchas documentation covering iOS audio, macOS mic permissions, WASM heap,
and sample rate requirements.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>