Records session start/end, conversation messages, tool calls, and
errors via better-sqlite3, hooked into RealtimeSession's existing
choke points so no client-side changes are needed. Also fixes a
pre-existing gap where an upstream-initiated disconnect only forwarded
session.closed to the browser without ever calling close(), so no
session end time was ever recorded for that path.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Provider-agnostic session layer for the base project: a shared client/server
wire protocol, a RealtimeProvider adapter interface, and an OpenAI Realtime
implementation of it, wired through a WebSocket relay (browser <-> our
SvelteKit server <-> OpenAI) so the API key never reaches the browser and
future providers/pipelines can be added without touching client code.
Switches the adapter to adapter-node and adds a custom server.js + dev-mode
Vite plugin, since SvelteKit has no native WebSocket support yet.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>