import type { EditorSocketDiagnostics } from "../client/socketDiagnostics";
import type { AgentDiagnosticsResponse, AgentDiagnosticsEvent } from "../services/agentService";
export interface AgentTerminalRecentEvent {
    timestamp: string;
    type: string;
    seq?: number | null;
    detail?: string | null;
}
export interface AgentTerminalRunDiagnosticsSnapshot {
    agentId: string;
    isSubmitting: boolean;
    isConnecting: boolean;
    isWaitingForResponse: boolean;
    isAgentThinking: boolean;
    isExecuting: boolean;
    hasActiveStreaming: boolean;
    isSubscribed: boolean;
    lastSeq: number;
    lastEventType: string | null;
    lastEventAt: string | null;
    recentEvents: AgentTerminalRecentEvent[];
}
export interface AgentDiagnosticsSummary {
    code: "healthy" | "client-disconnected" | "subscription-lost" | "server-failed" | "stream-stalled" | "run-finished" | "waiting";
    title: string;
    detail: string;
}
export declare function isServerExecutionActive(diagnostics?: AgentDiagnosticsResponse | null): boolean;
export declare function interpretAgentRunDiagnostics(params: {
    socketDiagnostics: EditorSocketDiagnostics;
    localSnapshot: AgentTerminalRunDiagnosticsSnapshot;
    serverDiagnostics?: AgentDiagnosticsResponse | null;
    now?: Date;
    stalledAfterMs?: number;
}): AgentDiagnosticsSummary;
export declare function formatAgentDiagnosticsEvent(event: AgentDiagnosticsEvent | AgentTerminalRecentEvent): string;
