export type RemoteLifecyclePhase = 'connecting' | 'hydrating' | 'replaying' | 'live' | 'paused' | 'resuming' | 'reconnecting' | 'disconnected';
export type RemoteTransportState = 'connecting' | 'connected' | 'reconnecting' | 'disconnected';
export interface RemoteLifecycleState {
    sessionId: string;
    label: string;
    transport: RemoteTransportState;
    phase: RemoteLifecyclePhase;
    leadConnected: boolean | null;
    isStreaming: boolean;
    hydrationReceived: boolean;
    streamId: string | null;
    streamUrl: string | null;
    lastError: string | null;
}
export interface RemoteLifecycleWorkingMessageUi {
    setWorkingMessage(message?: string): void;
}
export type RemoteLifecycleEvent = {
    type: 'connect_start';
    reconnect: boolean;
} | {
    type: 'init';
    sessionId?: string;
    label?: string;
} | {
    type: 'hydration';
    leadConnected?: boolean;
    isStreaming?: boolean;
} | {
    type: 'replay_event';
} | {
    type: 'replay_idle';
} | {
    type: 'live_signal';
    isStreaming?: boolean;
} | {
    type: 'session_resume';
    streamId?: string | null;
    streamUrl?: string | null;
} | {
    type: 'stream_ready';
    streamId?: string | null;
    streamUrl?: string | null;
} | {
    type: 'rpc_command_error';
    error: string;
    paused: boolean;
} | {
    type: 'local_resume_requested';
} | {
    type: 'connection_change';
    state: 'reconnecting' | 'disconnected';
};
export declare function createRemoteLifecycleState(sessionId: string): RemoteLifecycleState;
export declare function applyRemoteLifecycleEvent(state: RemoteLifecycleState, event: RemoteLifecycleEvent): RemoteLifecycleState;
export declare function getRemoteLifecycleLabel(state: RemoteLifecycleState): string;
export declare function getRemoteLifecycleActivityLabel(state: RemoteLifecycleState): string | undefined;
export declare function getRemoteLifecycleWorkingMessage(state: RemoteLifecycleState): string | undefined;
export declare function clearRemoteLifecycleWorkingMessage(ui: RemoteLifecycleWorkingMessageUi, lifecycleOwnsWorkingMessage: boolean): boolean;
export declare function syncRemoteLifecycleWorkingMessage(state: RemoteLifecycleState, ui: RemoteLifecycleWorkingMessageUi, lifecycleOwnsWorkingMessage: boolean): boolean;
//# sourceMappingURL=remote-lifecycle.d.ts.map