import type { Database } from "bun:sqlite";
import type { TaskStatus } from "../types/index.js";
import { type PolicyPackConfig } from "./config.js";
export interface UpsertPolicyPackInput {
    name: string;
    root?: string;
    version?: number;
    required_commands?: string[];
    prohibited_commands?: string[];
    prohibited_paths?: string[];
    required_statuses?: string[];
    require_passed_verification?: boolean;
    require_commit?: boolean;
    require_pull_request?: boolean;
    require_approval?: boolean;
    require_run?: boolean;
    require_artifact?: boolean;
    evidence_min_count?: number;
    branch_pattern?: string;
}
export interface ValidatePolicyPackInput {
    name: string;
    task_id: string;
    root?: string;
    explain?: boolean;
}
export type PolicyFindingStatus = "pass" | "fail";
export type PolicyFindingSeverity = "info" | "error";
export interface PolicyPackFinding {
    id: string;
    status: PolicyFindingStatus;
    severity: PolicyFindingSeverity;
    message: string;
    evidence: string[];
}
export interface PolicyEvidenceSummary {
    task: {
        id: string;
        title: string;
        status: TaskStatus;
        requires_approval: boolean;
        approved_by: string | null;
        approved_at: string | null;
    };
    verifications: Array<{
        command: string;
        status: string;
        artifact_path: string | null;
    }>;
    commits: Array<{
        sha: string;
        files_changed: string[];
    }>;
    git_refs: Array<{
        ref_type: string;
        name: string;
        url: string | null;
    }>;
    runs: Array<{
        id: string;
        status: string;
        title: string | null;
    }>;
    run_commands: Array<{
        command: string;
        status: string;
        artifact_path: string | null;
    }>;
    artifacts: string[];
    files: string[];
    evidence_count: number;
}
export interface PolicyPackValidationResult {
    pack: PolicyPackConfig;
    task_id: string;
    mode: "validate" | "explain";
    passed: boolean;
    findings: PolicyPackFinding[];
    audit_evidence: PolicyEvidenceSummary;
}
export declare function listPolicyPacks(): PolicyPackConfig[];
export declare function getPolicyPack(name: string): PolicyPackConfig | null;
export declare function upsertPolicyPack(input: UpsertPolicyPackInput): PolicyPackConfig;
export declare function removePolicyPack(name: string): boolean;
export declare function validatePolicyPack(input: ValidatePolicyPackInput, db?: Database): PolicyPackValidationResult;
export declare function explainPolicyPack(input: Omit<ValidatePolicyPackInput, "explain">, db?: Database): PolicyPackValidationResult;
//# sourceMappingURL=policy-packs.d.ts.map