/** * core/transport.ts — Shared API backend delivery with transport abstraction. * * Centralises the voice-detection, TTS chunking, and response-routing logic * that every transport (Whazaa, Telex, …) needs when using the APIBackend. * Transports only provide two callbacks: sendText and sendVoice. */ import type { APIBackend } from "../backend/api.js"; /** Transport-provided callbacks for sending responses back to the user. */ export interface TransportCallbacks { /** Send a text message (already markdown-formatted by the transport). */ sendText: (text: string) => Promise; /** Send a single voice-note buffer (OGG Opus). transcript is for companion-app display. */ sendVoice: (buffer: Buffer, transcript?: string) => Promise; } /** * Deliver a message through the APIBackend and route the response back * via the appropriate transport channel (text or voice). * * Voice detection: if `message` contains `:voice]` (e.g. `[Whazaa:voice]`), * the response is synthesised to voice notes via Kokoro TTS and sent as * audio. Otherwise it's sent as a plain text message. */ export declare function deliverViaApi(backend: APIBackend, message: string, sessionId: string, transport: TransportCallbacks): Promise; //# sourceMappingURL=transport.d.ts.map