/** Typed row returned from the policies table */
export interface PolicyRow {
    id: string;
    name: string;
    category: string;
    level: string;
    rawMarkdown: string | null;
    convertedFormat: string | null;
    executableTools: string[];
    tags: string[];
    createdAt: string;
    updatedAt: string;
    version: number;
    isActive: boolean;
    priority: number;
    enforcementStage: string;
}
/** Typed row returned from the executable_tools table */
export interface ExecutableToolRow {
    id: string;
    policyId: string;
    toolName: string;
    code: string;
    language: string;
    createdAt: string;
}
/** Typed row returned from the policy_executions table */
export interface PolicyExecutionRow {
    id: number;
    policyId: string;
    toolName: string;
    operation: string;
    args: Record<string, unknown>;
    result: unknown;
    allowed: boolean;
    reason: string;
    executedAt: string;
    taskId: string | null;
}
export declare class DatabaseManager {
    private db;
    constructor(dbPath?: string);
    private initialize;
    private serialize;
    private deserializeRow;
    upsertPolicy(data: Record<string, unknown>): void;
    findPolicies(where: Record<string, unknown>): PolicyRow[];
    findOnePolicy(where: Record<string, unknown>): PolicyRow | null;
    updatePolicy(where: Record<string, unknown>, updates: Record<string, unknown>): void;
    getAllActivePolicies(): PolicyRow[];
    upsertExecutableTool(data: Record<string, unknown>): void;
    findExecutableTools(policyId: string): ExecutableToolRow[];
    findExecutableTool(policyId: string, toolName: string): ExecutableToolRow | null;
    logExecution(data: {
        policyId: string;
        toolName: string;
        operation: string;
        args: Record<string, unknown>;
        result: unknown;
        allowed: boolean;
        reason: string;
        taskId?: string;
    }): void;
    getExecutionLog(policyId?: string, limit?: number): PolicyExecutionRow[];
    /**
     * Prune old audit log entries to prevent unbounded table growth.
     * Keeps the most recent `keepCount` rows and deletes everything older.
     */
    pruneExecutionLog(keepCount?: number): number;
    close(): void;
}
//# sourceMappingURL=database-manager.d.ts.map