Runtime review and native voice migration
Used the codebase-design skill to keep provider implementations in the preview app, behind the library's voice adapter interface.
Fixed
- Replaced the preview's voice-to-message/TTS loop with a Gemini Live session. Voice does not inject transcript bubbles. The microphone action is separate dictation.
- One-use, short-lived, model-constrained session tokens; permanent credentials remain server-only. Local session endpoint rejects cross-origin requests and non-local deployment until host authentication is added.
- Exit, interruption, and late microphone permission clean up audio playback, capture, tracks, and connection state.
- Terminal agent failures cannot be overwritten by a subsequent complete event. Incomplete streams become explicit errors; cancellation clears loading state.
- Telemetry failures do not interrupt generation or rendering.
- Validated incoming preview stream events, bounded event sizes, decoded final lines without a newline, and released reader locks.
- Bounded UI stream size before compilation.
- Text/blog intent no longer becomes generated UI merely because retrieval found a record.
- Auto-scroll follows new content while allowing users to scroll back; old voice errors clear on a new submission or call.
Verification
Automated tests cover contracts, compiler validation, variants, locale, message rendering, routing, stream lifecycle, native voice cancellation, and token provisioning. A real short-lived token connected to Gemini 3.8 Live and received native audio; the session then closed normally. Browser chat was checked separately. This is not a claim that an actual user's microphone or every browser/audio device has been tested.
Remaining constraints
- Google free-tier availability and 503 responses cannot be guaranteed by this library.
- Native calls currently provide audio conversation, not authorized business tools; no fake tool execution is exposed.
- Catalog/RAG data in the preview are demonstration fixtures, not a production database or semantic embedding service.
- Image generation is not enabled. The library is not a complete arbitrary-UI renderer.
- The app's provider routes are a local preview, not a production authenticated multi-tenant backend.
- Build chunk-size warnings remain; bundle optimization is separate from provider response latency.
Source captured: 2026-10-11