/**
 * @module guardrails
 * Enhanced error messages with actionable suggestions for policy violations
 *
 * When policies deny requests, guardrails provide specific, actionable
 * guidance on how to fix the issue or what to request from admins.
 */
import type { PolicyViolationDetails } from './policy.js';
/**
 * Policy violation error with actionable suggestions
 */
export declare class PolicyDenied extends Error {
    /** Which policy rule was violated */
    readonly rule: string;
    /** What the policy allows */
    readonly allowed: unknown;
    /** What was requested */
    readonly requested: unknown;
    /** Actionable suggestion for how to fix */
    readonly suggestion: string;
    /** Full policy violation details */
    readonly details?: PolicyViolationDetails | undefined;
    constructor(
    /** Which policy rule was violated */
    rule: string, 
    /** What the policy allows */
    allowed: unknown, 
    /** What was requested */
    requested: unknown, 
    /** Actionable suggestion for how to fix */
    suggestion: string, 
    /** Full policy violation details */
    details?: PolicyViolationDetails | undefined);
    /**
     * Format error for AI agent consumption
     *
     * Structured format optimized for LLM parsing
     */
    toAgentFormat(): string;
    /**
     * Format error for human consumption
     *
     * User-friendly format with clear next steps
     */
    toUserFormat(): string;
    /**
     * Format error for logs (structured JSON)
     */
    toLogFormat(): Record<string, unknown>;
    private formatValue;
}
/**
 * Guardrail builder - fluent API for creating policy errors with suggestions
 *
 * @example
 * ```typescript
 * const error = Guardrails.amountExceeded({
 *   requested: 5000,
 *   limit: 1000,
 *   type: 'per-transaction'
 * });
 *
 * throw error;
 * // ❌ Policy Violation: maxAmount
 * // You requested: $5,000
 * // Policy allows: $1,000
 * // 💡 Suggestion: Reduce amount to $1,000 or request policy update from admin
 * ```
 */
export declare class Guardrails {
    /**
     * Amount exceeded (per-transaction limit)
     */
    static amountExceeded(options: {
        requested: number;
        limit: number;
        type: 'per-transaction' | 'daily' | 'monthly';
    }): PolicyDenied;
    /**
     * Rate limit exceeded
     */
    static rateLimitExceeded(options: {
        current: number;
        limit: number;
        windowMs: number;
    }): PolicyDenied;
    /**
     * Tool not allowed
     */
    static toolDenied(options: {
        tool: string;
        allowed: string[];
    }): PolicyDenied;
    /**
     * Scope not allowed
     */
    static scopeDenied(options: {
        scope: string;
        allowed: string[];
    }): PolicyDenied;
    /**
     * Field filter denied (data access restriction)
     */
    static fieldDenied(options: {
        field: string;
        allowed: string[];
        tool: string;
    }): PolicyDenied;
    /**
     * Time window restriction
     */
    static timeWindowDenied(options: {
        current: Date;
        allowedStart: string;
        allowedEnd: string;
    }): PolicyDenied;
    /**
     * Generic policy violation
     */
    static custom(options: {
        rule: string;
        allowed: unknown;
        requested: unknown;
        suggestion: string;
    }): PolicyDenied;
}
/**
 * Helper: Extract actionable suggestion from AgentError details
 *
 * Used by agent.call() to convert PolicyViolationDetails into PolicyDenied
 */
export declare function extractSuggestion(details: PolicyViolationDetails): string;
/**
 * Helper: Convert PolicyViolationDetails to PolicyDenied
 */
export declare function toPolicyDenied(details: PolicyViolationDetails): PolicyDenied;
