/**
 * ConfidenceGate -- Self-reported confidence threshold gate.
 *
 * Fires during PreToolUse. Reads `tool.args.confidence` (a 0-1 float the
 * agent MAY emit). If confidence is below `minConfidenceForAutonomous` the
 * decision is routed to the approval queue. If below
 * `minConfidenceForReviewer` the gate fails closed per
 * `belowReviewerThresholdAction`. If confidence is absent the gate treats
 * the call as strict-fail-closed by default (configurable per pack).
 *
 * P3-T1 coverage gap: Confidence threshold enforcement before decision gates.
 *
 * Compliance bindings:
 *   - MRPC 1.6: legal agents -- very strict autonomous threshold (>= 0.95)
 *   - HIPAA 164.308(a)(1): risk analysis -- high-certainty bar for PHI decisions
 *   - FDA SaMD: autonomous clinical decisions require near-certain confidence
 *   - EU AI Act Art. 14: human oversight -- route uncertain decisions to human
 *   - ISO 42001 A.9.2: AI performance management
 *
 * @connexum/ai-governance
 */
export declare class ConfidenceBelowAutonomousError extends Error {
    readonly agentId: string;
    readonly toolName: string;
    readonly confidence: number;
    readonly minConfidenceForAutonomous: number;
    readonly packBinding: string[];
    constructor(opts: {
        agentId: string;
        toolName: string;
        confidence: number;
        minConfidenceForAutonomous: number;
        packBinding?: string[];
    });
}
export declare class ConfidenceBelowReviewerError extends Error {
    readonly agentId: string;
    readonly toolName: string;
    readonly confidence: number;
    readonly minConfidenceForReviewer: number;
    readonly packBinding: string[];
    constructor(opts: {
        agentId: string;
        toolName: string;
        confidence: number;
        minConfidenceForReviewer: number;
        packBinding?: string[];
    });
}
export declare class ConfidenceMissingError extends Error {
    readonly agentId: string;
    readonly toolName: string;
    readonly packBinding: string[];
    constructor(opts: {
        agentId: string;
        toolName: string;
        packBinding?: string[];
    });
}
export interface ConfidenceThresholds {
    /** Min confidence for autonomous execution (0-1). Default 0.85. */
    minConfidenceForAutonomous: number;
    /** Min confidence to even route to a human reviewer (0-1). Default 0.60. */
    minConfidenceForReviewer: number;
}
export interface ConfidenceGateConfig {
    /** Min confidence for autonomous execution (0-1). Default 0.85. */
    minConfidenceForAutonomous: number;
    /** Min confidence to even route to a human reviewer (0-1). Default 0.60. */
    minConfidenceForReviewer: number;
    /**
     * Per-pack threshold overrides. Pack ID -> thresholds.
     * Legal/medical packs should enforce very strict thresholds (>= 0.95).
     */
    perPackOverrides: Record<string, Partial<ConfidenceThresholds>>;
    /**
     * Action when confidence is below minConfidenceForReviewer:
     *   'deny' (default): throws ConfidenceBelowReviewerError (hard fail-closed).
     *   'require-second-agent': throws with a flag indicating a second agent must
     *     co-sign the decision before it can proceed.
     */
    belowReviewerThresholdAction: 'deny' | 'require-second-agent';
    /**
     * What to do when the agent does not emit a confidence score:
     *   'strict' (default): fail-closed. Throws ConfidenceMissingError.
     *   'lax': emit WARN audit event but permit the tool call.
     */
    missingConfidencePolicy: 'strict' | 'lax';
    /**
     * Callback invoked on every gate decision that generates an audit event.
     */
    onAuditEvent?: (event: ConfidenceGateAuditEvent) => void;
}
export type ConfidenceGateEventType = 'governance:confidence-below-autonomous' | 'governance:confidence-below-reviewer' | 'governance:confidence-missing' | 'governance:confidence-passed';
export interface ConfidenceGateAuditEvent {
    type: ConfidenceGateEventType;
    agentId: string;
    toolName: string;
    confidence: number | null;
    minConfidenceForAutonomous: number;
    minConfidenceForReviewer: number;
    outcome: 'allow' | 'route-to-reviewer' | 'deny' | 'require-second-agent' | 'warn-missing';
    packBinding: string[];
    timestamp: string;
}
export declare class ConfidenceGate {
    private readonly config;
    constructor(config?: Partial<ConfidenceGateConfig>);
    /**
     * Resolve effective thresholds, considering active pack overrides.
     */
    resolveThresholds(activePackIds?: string[]): {
        minConfidenceForAutonomous: number;
        minConfidenceForReviewer: number;
    };
    /**
     * PreToolUse hook entry point.
     *
     * Reads `toolArgs.confidence` (if present) and applies the configured
     * threshold policy. Throws synchronously on any non-allow outcome.
     *
     * @param agentId      Identity of the calling agent.
     * @param toolName     Name of the tool being invoked.
     * @param toolArgs     Arguments supplied to the tool call (may include `confidence`).
     * @param activePackIds Active compliance pack IDs for override resolution.
     */
    hook(agentId: string, toolName: string, toolArgs: Record<string, unknown>, activePackIds?: string[]): void;
}
//# sourceMappingURL=confidence-gate.d.ts.map