/**
 * Workspace inspector — score the persisted state of an agent after a run.
 *
 * Many evals don't ask "did the response say the right thing" but "did the
 * agent put the right rows in the DB / files in the vault / entities on the
 * canvas". This is the primitive for that.
 *
 * Implementations read from D1, KV, filesystem, or any store — the interface
 * is deliberately small so consumers plug in their own backends.
 */
export interface WorkspaceSnapshot {
    /** Vault files: logical path → content */
    files: Record<string, string>;
    /** DB rows: table name → array of rows (post-validation) */
    rows: Record<string, Array<Record<string, unknown>>>;
    /** KV entries: key → value (scoped to whatever prefix the inspector chose) */
    kv: Record<string, string>;
    /** Free-form blob metadata: for large binaries the inspector stores summary, not bytes */
    blobs?: Record<string, {
        size: number;
        hash?: string;
        mimeType?: string;
    }>;
}
export interface InspectorContext {
    /** Workspace / agent / thread id — whatever the backend uses to scope the snapshot */
    scopeId: string;
    /** Optional scenario id — allows scenario-specific snapshot shaping */
    scenarioId?: string;
}
export interface WorkspaceInspector {
    name: string;
    snapshot(context: InspectorContext): Promise<WorkspaceSnapshot>;
}
export declare class InMemoryWorkspaceInspector implements WorkspaceInspector {
    readonly name = "in-memory";
    private readonly snapshots;
    set(scopeId: string, snapshot: WorkspaceSnapshot): void;
    snapshot(context: InspectorContext): Promise<WorkspaceSnapshot>;
}
export interface WorkspaceAssertion {
    name: string;
    description?: string;
    check(snapshot: WorkspaceSnapshot): WorkspaceAssertionResult;
}
export interface WorkspaceAssertionResult {
    pass: boolean;
    /** 0..1 — partial credit for assertions that admit it */
    score: number;
    detail?: string;
}
export declare function fileExists(path: string): WorkspaceAssertion;
export declare function fileContains(path: string, needle: string): WorkspaceAssertion;
export declare function rowCount(table: string, min: number, max?: number): WorkspaceAssertion;
export declare function rowWhere<T extends Record<string, unknown>>(table: string, predicate: (row: T) => boolean, options?: {
    min?: number;
}): WorkspaceAssertion;
/** Run many assertions; return aggregate pass + mean score + per-assertion details. */
export declare function runAssertions(snapshot: WorkspaceSnapshot, assertions: WorkspaceAssertion[]): {
    pass: boolean;
    score: number;
    results: Array<{
        assertion: string;
        result: WorkspaceAssertionResult;
    }>;
};
//# sourceMappingURL=workspace-inspector.d.ts.map