/**
 * Voice-assistant service — bridges the browser to OpenAI's Realtime API.
 *
 * Architecture:
 *   Browser  ←WebSocket→  Gateway  ←WebSocket→  OpenAI Realtime API
 *
 * The gateway sits in the middle, relaying audio in both directions and
 * intercepting function calls to execute them locally with full Jait access.
 * This is a GLOBAL session — not tied to any workspace.
 */
import type { IncomingMessage } from "node:http";
import type { Duplex } from "node:stream";
import { type VoiceToolDeps } from "./tools.js";
export interface VoiceAssistantServiceDeps extends VoiceToolDeps {
    /** Verify a JWT token → return user info or null. */
    verifyToken: (token: string) => Promise<{
        id: string;
        username: string;
    } | null>;
    /** Look up per-user API keys from their settings. */
    getUserApiKeys?: (userId: string) => Record<string, string>;
}
export declare class VoiceAssistantService {
    private wss;
    private deps;
    constructor(deps: VoiceAssistantServiceDeps);
    /** Handle HTTP → WebSocket upgrade for the /ws/voice-assistant path. */
    handleUpgrade(request: IncomingMessage, socket: Duplex, head: Buffer): void;
    private handleConnection;
    private buildSessionUpdate;
    private buildTurnDetection;
    private buildInstructions;
}
//# sourceMappingURL=service.d.ts.map