/**
 * Progress Feedback Manager
 *
 * Manages real-time progress feedback for long-running agent tasks.
 * Provides:
 * - Tool/end notifications execution start
 * - Thinking indicators
 * - Progress stage updates
 * - Stream integration for real-time display
 */
export type ProgressStage = 'thinking' | 'searching' | 'reading' | 'writing' | 'executing' | 'analyzing' | 'idle';
export interface ProgressUpdate {
    stage: ProgressStage;
    detail?: string;
    toolName?: string;
    toolArgs?: Record<string, unknown>;
    timestamp: number;
}
export interface ProgressFeedbackConfig {
    level: 'minimal' | 'normal' | 'verbose';
    showThinking: boolean;
    streamToolProgress: boolean;
    heartbeatEnabled: boolean;
    heartbeatIntervalMs: number;
    longTaskThresholdMs: number;
    showErrorAccumulation: boolean;
    showRequestLimitWarning: boolean;
}
export interface ProgressMessage {
    type: 'start' | 'update' | 'complete' | 'error' | 'warning' | 'thinking';
    stage: ProgressStage;
    message: string;
    detail?: string;
    toolName?: string;
    toolArgs?: Record<string, unknown>;
}
export interface ProgressCallbacks {
    onProgress?: (msg: ProgressMessage) => void;
    onStreamStart?: (toolName: string, toolArgs: Record<string, unknown>) => void;
    onStreamUpdate?: (toolName: string, partialResult: string) => void;
    onStreamEnd?: (toolName: string, result: string, isError: boolean) => void;
    onThinking?: (thinking: string) => void;
    onHeartbeat?: (elapsedMs: number, currentStage: ProgressStage) => void;
}
export declare class ProgressFeedbackManager {
    private config;
    private callbacks;
    private currentStage;
    private currentTool;
    private taskStartTime;
    private lastHeartbeatTime;
    private heartbeatTimer?;
    private streamActive;
    constructor(config?: Partial<ProgressFeedbackConfig>);
    setCallbacks(callbacks: ProgressCallbacks): void;
    startTask(): void;
    endTask(): void;
    private startHeartbeat;
    private stopHeartbeat;
    private mapToolToStage;
    private formatToolName;
    onToolStart(toolName: string, toolArgs?: Record<string, unknown>): void;
    onToolUpdate(toolName: string, partialResult: unknown): void;
    onToolEnd(toolName: string, result: unknown, isError?: boolean): void;
    onThinking(thinking: string): void;
    onTurnStart(): void;
    onMessageStart(): void;
    onMessageUpdate(_content: string): void;
    onAgentEnd(): void;
    getCurrentState(): {
        stage: ProgressStage;
        tool: string | null;
        elapsedMs: number;
    };
    setConfig(config: Partial<ProgressFeedbackConfig>): void;
    getStageEmoji(stage: ProgressStage): string;
    getStageLabel(stage: ProgressStage): string;
    /**
     * Notify about accumulated tool errors
     * Enhanced feedback for tool failures
     */
    onToolErrorAccumulated(toolName: string, failureCount: number, maxFailures: number, remainingAttempts?: number): void;
    /**
     * Notify about request limit status
     * Enhanced feedback for approaching/ reaching request limits
     */
    onRequestLimitStatus(count: number, limit: number, remaining: number, isWarning: boolean, shouldStop: boolean): void;
}
export declare const progressFeedbackManager: ProgressFeedbackManager;
export declare function formatProgressMessage(msg: ProgressMessage, parseMode?: 'Markdown' | 'HTML'): string;
export declare function formatHeartbeatMessage(elapsedMs: number, stage: ProgressStage, detail?: string): string;
