import { type RealtimeBackend } from "./server.js";
import type { VisionClawConfig } from "../config/types.js";
import { type RealtimeActiveSessionInfo, type VoiceSessionFinishedEvent, type VoiceSessionSummary, type VoiceSummaryStatus } from "./types.js";
export type { VoiceSessionFinishedEvent } from "./types.js";
/** Path prefix used for tunnel ingress routing (e.g., xicas.visionclawobs.com/realtime). */
export declare const REALTIME_PATH_PREFIX = "/realtime";
export interface RealtimeModuleHandle {
    close: () => Promise<void>;
    tunnelUrl: string | null;
    /** Backend mounted under `/realtime` by the OBS HTTP server. */
    backend: RealtimeBackend;
    /** Get unprocessed voice transcripts (for Merge step). */
    getUnprocessedTranscripts: () => Promise<VoiceTranscript[]>;
    /** Mark a transcript as processed by the agent. */
    markTranscriptProcessed: (filename: string) => Promise<void>;
    /** Return active realtime voice session metadata for main-agent context. */
    getActiveSessionInfo: () => RealtimeActiveSessionInfo | null;
    /**
     * Subscribe to voice-session-finished events (fires once per session, after
     * summarization completes). The realtime agent bridge uses this to enqueue
     * an internal message through the existing idle-wake / busy-interrupt path.
     */
    onVoiceSessionFinished: (listener: (event: VoiceSessionFinishedEvent) => void) => void;
}
export interface VoiceTranscript {
    filename: string;
    schemaVersion?: number;
    source?: string;
    sessionId: string | null;
    telegramUser: {
        id: number;
        first_name?: string;
        username?: string;
    } | null;
    duration: number | null;
    startedAt: string | null;
    endedAt: string | null;
    messageCount: number;
    transcript: {
        role: "user" | "assistant";
        text: string;
        timestamp: string;
    }[];
    summary?: VoiceSessionSummary;
    summaryText?: string;
    summaryStatus?: VoiceSummaryStatus;
    summaryError?: string;
    processedByAgent: boolean;
    processedAt?: string;
}
/**
 * Start the realtime module.
 *
 * The realtime backend is mounted inside the OBS HTTP server (see
 * `src/obs/server.ts`) under the `/realtime` path. This mirrors how `/rdp`
 * is mounted: a single listening socket, served via the existing Cloudflare
 * tunnel, so no separate port or DNS setup is required. The caller is
 * expected to register {@link RealtimeModuleHandle.backend} with the OBS
 * server.
 */
export declare function startRealtimeModule(config: VisionClawConfig): RealtimeModuleHandle;
//# sourceMappingURL=index.d.ts.map