/**
 * Engine Context Bridge
 *
 * Connects the engine's ephemeral sessions to SQLite persistent storage.
 * Loads accumulated context before workflow execution and persists outcomes after.
 */
import type { ConformanceReport } from "./conformance.js";
import type { ToolCallRecord } from "./session.js";
export interface SessionContext {
    recentRuns: Array<{
        workflow: string;
        score: number;
        grade: string;
        durationMs: number;
        createdAt: string;
    }>;
    relevantLearnings: Array<{
        key: string;
        content: string;
        category: string;
    }>;
    conformanceTrend: {
        direction: "improving" | "stable" | "regressing" | "insufficient_data";
        avgScore: number;
        runCount: number;
    };
    recentContentThemes: string[];
    openGapCount: number;
}
export interface ContextHealth {
    learningsCount: number;
    recentRunScores: number[];
    trendDirection: string;
    contentArchiveSize: number;
    daysSinceLastLearning: number | null;
    workflowCoverage: Record<string, number>;
}
export declare function loadSessionContext(workflow: string, _preset: string): SessionContext;
export declare function persistSessionOutcome(sessionId: string, report: ConformanceReport, workflow: string, preset: string, callHistory?: ToolCallRecord[]): void;
export declare function getContextHealth(): ContextHealth;
export declare function archiveContent(title: string, contentType: string, digest: string, themes: string[], workflow?: string, fullContent?: string): void;
export declare function searchContentArchive(query: string, contentType?: string, limit?: number): Array<{
    id: string;
    title: string;
    contentType: string;
    digest: string;
    themes: string[];
    publishedAt: string;
}>;
export declare function getWorkflowHistory(workflow: string, limit?: number): Array<{
    sessionId: string;
    workflow: string;
    preset: string;
    score: number;
    grade: string;
    durationMs: number;
    stepCount: number;
    successCount: number;
    failedCount: number;
    createdAt: string;
}>;
export declare function searchLearnings(query: string, limit?: number): Array<{
    key: string;
    content: string;
    category: string;
    createdAt: string;
}>;
