/**
 * CLI provider status/launch pure helpers.
 *
 * Pure move out of cli-provider-instance.ts (no behavior change): the
 * side-effect-free status predicates, the turn-anchored duration computation,
 * the forced-new-session script resolver, the adapter-ready poll, and the lazy
 * node:sqlite DatabaseSync loader. cli-provider-instance re-exports the
 * public symbols (computeTurnAnchoredDurationMs, getForcedNewSessionScriptName,
 * waitForCliAdapterReady) so existing importers/tests keep their path.
 */
import type { ProviderModule } from './contracts.js';
export declare function isIdleStatus(value: unknown): boolean;
export declare function getMessageTime(message: unknown): number;
export declare function hasNonEmptyCliModalButtons(activeModal: unknown): boolean;
export declare function isCliGeneratingLikeStatus(status: unknown): boolean;
/**
 * NOTIF Defect-2a: the REPORTED short-generating duration, anchored on the IMMUTABLE turn
 * start. generatingStartedAt is reset to 0 on every mid-turn waiting_approval/idle blip and
 * re-armed on the next →generating, so a long turn that blips would otherwise measure only the
 * final 1.5-2.5s sliver. engine.currentTurnStartedAt (set once at onTurnStarted, surviving
 * mid-turn blips until the next turn starts) is preferred; generatingStartedAt is the fallback
 * for turns that never recorded an engine turn start. Returns 0 when neither anchor is set.
 * Pure / unit-testable.
 */
export declare function computeTurnAnchoredDurationMs(engineTurnStartedAt: number | undefined, generatingStartedAt: number, now: number): {
    durationMs: number;
    anchor: 'turn-start' | 'generatingStartedAt' | 'none';
};
export declare function getDatabaseSync(): new (path: string, options?: {
    readOnly?: boolean;
}) => {
    prepare(sql: string): {
        get(...params: Array<string | number>): unknown;
    };
    close(): void;
};
export declare function getForcedNewSessionScriptName(provider: ProviderModule | undefined, launchMode: 'new' | 'resume' | 'manual'): string | null;
export declare function waitForCliAdapterReady(adapter: {
    isReady?: () => boolean;
    getStatus?: () => {
        status?: string;
    };
}, options?: {
    timeoutMs?: number;
    pollMs?: number;
}): Promise<void>;
