export type AnalyzeBehavior = 'show_menu' | 'ask_then_menu' | 'auto_upload' | 'skip';
export interface DecideInput {
    isTTY: boolean;
    aiAnalyticsFlag: boolean;
}
export declare function decideAnalyzeBehavior(input: DecideInput): AnalyzeBehavior;
export declare function writeLocalAiFile(jobId: string): Promise<string>;
export interface PostAnalyzeInput {
    apiHost: string;
    apikey: string;
    jobId: string;
    appId: string;
    logs: string;
}
export declare const STREAM_FIRST_BYTE_TIMEOUT_MS = 120000;
export declare const STREAM_IDLE_TIMEOUT_MS = 45000;
export declare const STREAM_TOTAL_TIMEOUT_MS = 600000;
export type PostAnalyzeResult = {
    kind: 'ok';
    analysis: string;
} | {
    kind: 'already_analyzed';
} | {
    kind: 'too_big';
} | {
    kind: 'upgrade_required';
    message?: string;
} | {
    kind: 'error';
    status?: number;
    message?: string;
    partial?: string;
};
export interface PostAnalyzeStreamInput extends PostAnalyzeInput {
    onChunk?: (text: string) => void;
}
export declare function postAnalyzeStreamRequest(input: PostAnalyzeStreamInput): Promise<PostAnalyzeResult>;
export declare const HARD_LOG_SIZE_LIMIT: number;
export declare function isLogTooBig(jobId: string): Promise<boolean>;
export interface RunCapgoAiAnalysisInput {
    apiHost: string;
    apikey: string;
    jobId: string;
    appId: string;
    onChunk?: (text: string) => void;
}
export declare function runCapgoAiAnalysis(input: RunCapgoAiAnalysisInput): Promise<PostAnalyzeResult>;
export declare function releaseCapturedLogs(jobId: string): Promise<void>;
