/**
 * Policy Configuration
 *
 * Creates PolicyEngineConfig by merging:
 * 1. Default TOML policy files (read-only, write)
 * 2. Legacy ApprovalMode migration rules
 * 3. User-defined TOML policies (if provided)
 * 4. Runtime rules (e.g., "Always Allow" UI selections)
 *
 * Implements legacy migration from ApprovalMode and --allowed-tools to policy rules.
 */
import { type PolicyRule, type PolicyEngineConfig } from './types.js';
import { ApprovalMode } from '../config/config.js';
/**
 * Minimal Config interface for policy creation
 * Avoids circular dependency by only requiring the methods we need
 */
export interface PolicyConfigSource {
    getApprovalMode(): ApprovalMode;
    getAllowedTools(): string[] | undefined;
    getNonInteractive(): boolean;
    getUserPolicyPath?(): string | undefined;
}
/**
 * Converts legacy ApprovalMode and --allowed-tools to policy rules.
 *
 * Priority bands:
 * - 1.999: YOLO mode allow-all (wildcard)
 * - 1.015: AUTO_EDIT mode write tools
 * - 2.3: --allowed-tools CLI flag
 *
 * @param config - Config object with approval mode and allowed tools
 * @returns Array of PolicyRule objects representing legacy settings
 */
export declare function migrateLegacyApprovalMode(config: PolicyConfigSource): PolicyRule[];
/**
 * Creates the full PolicyEngineConfig by merging:
 * 1. Default TOML policy files (read-only.toml, write.toml)
 * 2. Legacy ApprovalMode migration rules
 * 3. User-defined TOML policies (if userPolicyPath provided)
 * 4. Runtime rules (can be added later via PolicyEngine.addRule)
 *
 * Rules are evaluated by priority (highest wins), so:
 * - User policies (Tier 2: 2.xxx) override defaults (Tier 1: 1.xxx)
 * - Legacy migration rules slot into appropriate priority bands
 * - Admin policies (Tier 3: 3.xxx, if added later) override all
 *
 * @param config - Config object with policy settings
 * @returns PolicyEngineConfig ready for PolicyEngine construction
 */
export declare function createPolicyEngineConfig(config: PolicyConfigSource): Promise<PolicyEngineConfig>;
