/**
 * Shared persistence block used after each agent turn.
 *
 * Two call sites produce this pattern with identical semantics:
 *   - `routes/agentRoutes.ts:runAgentDrivenAnalysis` (HTTP path)
 *   - `cli-user/services/cliAnalyzeService.ts:persistTurnToBackend` (CLI path)
 *
 * Each one:
 *   1. Takes a unified snapshot from the orchestrator and
 *      stashes it on the session as `_lastSnapshot` so the report builder
 *      can read analysisNotes / analysisPlan / uncertaintyFlags.
 *   2. Writes the snapshot atomically via `saveSessionStateSnapshot`, or
 *      falls back to individual-field persistence if the
 *      orchestrator doesn't expose `takeSnapshot`.
 *   3. Appends the turn's user+assistant messages to the messages table
 *      so the web UI's history view renders them.
 *
 * Centralizing here closes the drift risk: any future schema change only
 * needs one update, and both call sites stay in sync automatically.
 */
import type { AnalyzeManagedSession } from '../assistant/application/agentAnalyzeSessionService';
export interface PersistAgentTurnInput {
    session: AnalyzeManagedSession;
    sessionId: string;
    traceId: string;
    query: string;
    result: {
        conclusion: string;
        totalDurationMs: number;
        partial?: boolean;
        terminationMessage?: string;
    };
    /** Optional structured logger (HTTP route provides SessionLogger; CLI
     *  currently doesn't wire one through — `console` fallback is fine). */
    logger?: {
        info: (component: string, message: string, data?: unknown) => void;
        warn: (component: string, message: string, data?: unknown) => void;
    };
    /** Log component name. HTTP route passes 'AgentDrivenAnalysis' to preserve
     *  existing log-based alerts keyed on that component; CLI defaults to
     *  logComponent so CLI-only log stream is self-identifying. */
    logComponent?: string;
}
export declare function persistAgentTurn(input: PersistAgentTurnInput): void;
//# sourceMappingURL=persistAgentSession.d.ts.map