interface BridgeEvent {
    seq: number;
    ts: string;
    kind: 'command' | 'pipeline' | 'memory' | 'telegram' | 'mission' | 'governance';
    payload: Record<string, unknown>;
}
export declare class Gateway {
    private bot;
    private reasoningMode;
    private classifier;
    private gatekeeper;
    private voiceManager;
    private app;
    private server;
    private ttsEnabled;
    private governance;
    private allowedTelegramUserId;
    private isShuttingDown;
    private watchdog;
    private queueRunner;
    private readonly bootTs;
    private manifestPublished;
    /** Cached package version for the manifest (read once, lazily). */
    private packageVersion;
    private bridgeEvents;
    private bridgeEventSeq;
    private bridgeSubscribers;
    /** Public emit hook so other subsystems can publish bridge events. */
    emitBridgeEvent(kind: BridgeEvent['kind'], payload: Record<string, unknown>): void;
    /** Replay events with seq > since (or all if since is null/undefined). */
    private bridgeEventsSince;
    constructor();
    /**
     * Redact a Telegram bot token in any log line. Public so callers can
     * use the same helper to scrub their own logs. Token shape is
     * `<numeric_id>:<35-char_secret>`; we keep the numeric prefix and
     * mask the rest.
     *
     * Story 4.3 — OpenLife v1.3 Agent OS Integration.
     */
    static redactBotToken(text: string): string;
    static classifyTelegramLaunchError(err: unknown): {
        ok: true;
    } | {
        ok: false;
        error: 'telegram_polling_conflict';
        recoveryOptions: string[];
        detail: string;
    } | {
        ok: false;
        error: 'telegram_launch_failed';
        recoveryOptions: string[];
        detail: string;
    };
    /**
     * Validate the configured TELEGRAM_BOT_TOKEN by calling getMe.
     * Returns `{ ok: true, botId, botUsername }` on success;
     * `{ ok: false, error, status? }` on failure. Never throws.
     * Never logs the token itself.
     *
     * Story 4.3 — OpenLife v1.3 Agent OS Integration.
     */
    validateBotToken(opts?: {
        timeoutMs?: number;
    }): Promise<{
        ok: true;
        botId: number;
        botUsername: string;
    } | {
        ok: false;
        error: string;
        status?: number;
    }>;
    start(): void;
    /**
     * Phase 1 — instantiate + start the QueueRunner when the autonomous
     * profile is active. Gated so the framework/CLI profile keeps its
     * reactive-only behavior. Lazy-require keeps the orchestration stack out
     * of `--help` and non-daemon command paths.
     */
    private maybeStartQueueRunner;
    shutdown(reason?: string): Promise<void>;
    private writeSseEvent;
    private resolvePackageVersion;
    private flushAgentQueue;
    processTextForTest(userId: string, text: string): Promise<string>;
    /**
     * Public chat entry point for non-Telegram surfaces (CLI chat TUI, HTTP
     * pilots, etc.). Wraps the same processInput pipeline used by the Telegram
     * flow but routes replies through a minimal in-memory ctx so no Telegraf
     * dependency is required at the call site.
     *
     * onReasoning fires for each pipeline trace event (classify → route →
     * finalize) so a TUI can stream the agent's thinking into the Matrix-rain
     * region instead of showing an opaque spinner.
     */
    processChat(userId: string, text: string, opts?: {
        onReasoning?: (chunk: string) => void;
        source?: 'telegram' | 'cli' | 'bridge';
        systemContext?: string;
    }): Promise<string>;
    /**
     * Test seam that captures the full ACK + final timeline for the fast-ACK
     * pattern. Used by the regression test to assert the placeholder reply
     * lands within the ACK budget even when downstream model processing is
     * slow. Returns:
     *   - finalText: the user-visible final answer (edited ACK or last reply)
     *   - events: ordered timeline (kind = 'reply' | 'edit' | 'voice')
     *   - ackMs: ms until the first reply landed (null if none was sent)
     *   - finalMs: ms until the last event landed
     */
    processTextForTestDetailed(userId: string, text: string): Promise<{
        finalText: string;
        events: Array<{
            kind: 'reply' | 'edit' | 'voice';
            text: string;
            tsMs: number;
        }>;
        ackMs: number | null;
        finalMs: number;
    }>;
    processImageForTest(userId: string, imagePath: string, caption?: string): Promise<string>;
    private isAuthorizedUser;
    private shouldRespondByVoice;
    private stripVoiceDirective;
    private voiceUnavailableMessage;
    private isMarkdownTableSeparator;
    private splitMarkdownTableRow;
    private renderMarkdownTableForTelegram;
    private rewriteMarkdownTablesForTelegram;
    private stripInlineMarkdown;
    private formatForTelegramPlainText;
    private processInput;
    private startTypingIndicator;
    private safeReply;
}
export {};
