/**
 * Vigthoria CLI → DevTools Bridge Telemetry Client
 *
 * Connects the local CLI to the remote bridge server in "commando" mode,
 * streaming real-time activity (commands, tool calls, model responses,
 * file edits, errors) and receiving admin-issued commands.
 *
 * Design principles:
 *  - Fire-and-forget: never blocks the CLI main flow
 *  - Auto-reconnects with exponential back-off
 *  - Opt-in via --bridge <url> flag
 *  - Sensitive data (API keys, tokens) is never transmitted
 */
export type TelemetryEventType = 'cli:start' | 'cli:command' | 'cli:prompt' | 'cli:model-response' | 'cli:tool-call' | 'cli:tool-result' | 'cli:file-edit' | 'cli:error' | 'cli:end' | 'cli:mode-change' | 'cli:heartbeat';
export interface TelemetryEvent {
    type: TelemetryEventType;
    payload: Record<string, unknown>;
    ts: number;
    clientId: string;
}
export interface AdminCommand {
    type: 'admin:command';
    action: string;
    params?: Record<string, unknown>;
    requestId?: string;
}
export interface BridgeClientOptions {
    bridgeUrl: string;
    apiKey?: string;
    machineLabel?: string;
    onAdminCommand?: (cmd: AdminCommand) => void;
}
/** Get the active bridge client (may be null if --bridge was not used). */
export declare function getBridgeClient(): BridgeClient | null;
export declare class BridgeClient {
    private ws;
    private url;
    private apiKey;
    private machineLabel;
    private clientId;
    private connected;
    private reconnectTimer;
    private heartbeatTimer;
    private queue;
    private maxQueueSize;
    private reconnectDelay;
    private destroyed;
    private onAdminCommand?;
    constructor(opts: BridgeClientOptions);
    connect(): Promise<void>;
    destroy(): void;
    get isConnected(): boolean;
    /** CLI session started (command, flags, cwd). */
    emitStart(data: {
        command: string;
        flags: Record<string, unknown>;
        cwd: string;
    }): void;
    /** User entered a prompt / message. */
    emitPrompt(data: {
        prompt: string;
        mode: string;
        model: string;
    }): void;
    /** Model response received (summary only, not full content). */
    emitModelResponse(data: {
        model: string;
        chars: number;
        hasToolCalls: boolean;
        preview: string;
    }): void;
    /** Tool is being called. */
    emitToolCall(data: {
        tool: string;
        args: Record<string, string>;
    }): void;
    /** Tool finished executing. */
    emitToolResult(data: {
        tool: string;
        success: boolean;
        preview: string;
    }): void;
    /** File was written or edited. */
    emitFileEdit(data: {
        file: string;
        action: 'write' | 'edit';
        linesChanged: number;
    }): void;
    /** Error occurred. */
    emitError(data: {
        message: string;
        code?: string;
    }): void;
    /** Mode changed (agent / operator / chat). */
    emitModeChange(data: {
        mode: string;
        model: string;
    }): void;
    /** Session ended. */
    emitEnd(data: {
        reason: string;
    }): void;
    private emit;
    private sendRaw;
    private bufferEvent;
    private flushQueue;
    private scheduleReconnect;
    private startHeartbeat;
    private stopHeartbeat;
}
