/**
 * GateGuard -- Forces agents to prove file comprehension before editing.
 *
 * Before any file modification, the agent must state:
 *   1. Imports/dependencies used by the code
 *   2. API surface (exports, routes, types)
 *   3. Verbatim instruction authorizing the change
 *
 * This prevents hallucination-based code modifications where an agent
 * "thinks" a function exists without having actually read the file.
 *
 * @connexum/ai-governance
 */
export interface GateGuardConfig {
    /** Directory for audit trail */
    auditDir: string;
    /**
     * Require all 3 fact categories (imports + apiSurface + authorization).
     *
     * Default: TRUE (3-of-3, EU AI Act Art. 14 human oversight -- SYSTEMIC-M3).
     *
     * Customers may opt out by explicitly setting `strictMode: false`, which
     * drops the requirement to 2-of-3 and allows agents to omit the
     * `authorization` (human instruction) field. Every audit event emitted
     * while `strictMode: false` is active carries a `strictMode-disabled` flag
     * so auditors can identify non-strict sessions on the audit chain.
     *
     * When any active compliance pack that covers EU AI Act requirements is
     * detected, a WARN audit event is emitted if `strictMode: false` is used.
     */
    strictMode?: boolean;
    /** Files exempt from GateGuard (e.g., new files, config) */
    exemptPatterns?: string[];
    /** Maximum time between read and edit in ms (default: 600000 = 10 min) */
    readEditWindowMs?: number;
    /**
     * Active compliance pack identifiers. When any EU-AI-Act-scoped pack is
     * present and `strictMode: false`, a WARN event is appended to the audit
     * chain to alert auditors. Example: ['eu-ai-act', 'hipaa'].
     */
    activePackIds?: string[];
}
export interface GateGuardVerification {
    filePath: string;
    imports: string[];
    apiSurface: string[];
    authorization: string;
    readTimestamp: string | null;
}
export interface GateGuardResult {
    allowed: boolean;
    reason: string;
    missingFacts: string[];
    verification?: GateGuardVerification;
}
interface ReadRecord {
    filePath: string;
    timestamp: number;
    agent: string;
}
export declare class GateGuard {
    private config;
    private readLog;
    private auditFile;
    constructor(config: GateGuardConfig);
    /**
     * Record that a file was read by an agent.
     * Call this when a Read tool is used.
     */
    recordRead(filePath: string, agentName: string): void;
    /**
     * Verify that an agent can edit a file.
     * Returns allowed=true if the agent has demonstrated comprehension.
     */
    verify(filePath: string, agentName: string, verification: Partial<GateGuardVerification>): GateGuardResult;
    /**
     * Quick check: was this file read recently by this agent?
     * Lighter weight than full verify() for preliminary checks.
     */
    wasRead(filePath: string, agentName: string): boolean;
    /**
     * Get read log for monitoring/debugging.
     */
    getReadLog(): ReadRecord[];
    /**
     * Clear stale read records (older than window).
     */
    clearStaleReads(): number;
    /**
     * Parse a GateGuard block from agent reasoning.
     * Expected format:
     *   <!-- GATEGUARD
     *   imports: fs, path, crypto
     *   api: createCapabilityBundle, parsePermissions
     *   auth: "User requested adding HMAC verification to handoffs"
     *   -->
     */
    static parseGateGuardBlock(text: string): Partial<GateGuardVerification> | null;
    private isExempt;
    private logAudit;
}
export {};
//# sourceMappingURL=gateguard.d.ts.map