import type Database from 'better-sqlite3';
import { z } from 'zod';
import type { AgentActionEvent } from './schemas.js';
import type { RiskAssessment } from './RiskClassifier.js';
declare const PolicyRuleSchema: z.ZodObject<{
    field: z.ZodEnum<{
        riskLevel: "riskLevel";
        actionType: "actionType";
        agentId: "agentId";
        target: "target";
        params: "params";
    }>;
    operator: z.ZodEnum<{
        contains: "contains";
        eq: "eq";
        matches: "matches";
        gt: "gt";
        lt: "lt";
        in: "in";
        neq: "neq";
    }>;
    value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNumber]>;
}, z.core.$strip>;
export type PolicyRule = z.infer<typeof PolicyRuleSchema>;
declare const PolicyActionEnum: z.ZodEnum<{
    block: "block";
    require_confirmation: "require_confirmation";
    allow: "allow";
}>;
export type PolicyAction = z.infer<typeof PolicyActionEnum>;
export interface PolicyDecision {
    allowed: boolean;
    reason: string;
    requiredAction?: 'confirm' | 'block';
    matchedPolicies: string[];
}
export interface PolicyRow {
    id: string;
    name: string;
    description: string | null;
    rules: string;
    action: string;
    priority: number;
    enabled: number;
    version: number;
    createdAt: string;
    updatedAt: string;
}
interface StorageProvider {
    getDatabase(): Database.Database;
}
export declare class PolicyEngine {
    private readonly db;
    private readonly allPoliciesStmt;
    constructor(storage: StorageProvider);
    private initTables;
    private seedDefaultPolicies;
    evaluate(action: AgentActionEvent, riskAssessment: RiskAssessment): PolicyDecision;
    addPolicy(policy: {
        name: string;
        description?: string;
        rules: PolicyRule[];
        action: PolicyAction;
        priority?: number;
    }): string;
    getPolicyCount(): number;
    private parseRules;
    private matchesAllRules;
    private evaluateRule;
    private getFieldValue;
    private applyOperator;
    private stricterAction;
    private buildDecision;
}
export {};
//# sourceMappingURL=PolicyEngine.d.ts.map