/**
 * Policy validation utilities.
 *
 * Provides functions to validate policy specs for consistency,
 * completeness, and cross-registry relationships.
 *
 * @module policy/validation
 *
 * @example
 * ```typescript
 * import { validatePolicySpec, validatePolicyConsistency } from '@contractspec/lib.contracts-spec';
 *
 * // Validate a single policy spec
 * const issues = validatePolicySpec(myPolicy);
 *
 * // Validate across registries
 * const crossIssues = validatePolicyConsistency({
 *   policies: policyRegistry,
 *   operations: operationRegistry,
 * });
 * ```
 */
import type { OperationSpecRegistry } from '../operations/registry';
import type { PolicyRegistry } from './registry';
import type { PolicySpec } from './spec';
export type PolicyValidationLevel = 'error' | 'warning' | 'info';
export interface PolicyValidationIssue {
    level: PolicyValidationLevel;
    message: string;
    path?: string;
    context?: Record<string, unknown>;
}
export interface PolicyValidationResult {
    valid: boolean;
    issues: PolicyValidationIssue[];
}
/**
 * Validate a policy spec for internal consistency.
 *
 * @param spec - Policy spec to validate
 * @returns Validation result with any issues found
 *
 * @example
 * ```typescript
 * const result = validatePolicySpec(myPolicy);
 * if (!result.valid) {
 *   console.log('Issues:', result.issues);
 * }
 * ```
 */
export declare function validatePolicySpec(spec: PolicySpec): PolicyValidationResult;
export interface PolicyConsistencyDeps {
    policies: PolicyRegistry;
    operations?: OperationSpecRegistry;
}
/**
 * Validate policy consistency across registries.
 *
 * Checks that:
 * - Operations reference valid policies
 * - Policy actions align with operation kinds
 *
 * @param deps - Registry dependencies
 * @returns Validation result
 */
export declare function validatePolicyConsistency(deps: PolicyConsistencyDeps): PolicyValidationResult;
export declare class PolicyValidationError extends Error {
    readonly issues: PolicyValidationIssue[];
    constructor(message: string, issues: PolicyValidationIssue[]);
}
/**
 * Assert that a policy spec is valid, throwing if not.
 *
 * @param spec - Policy spec to validate
 * @throws {PolicyValidationError} If validation fails
 */
export declare function assertPolicySpecValid(spec: PolicySpec): void;
/**
 * Assert policy consistency across registries.
 *
 * @param deps - Registry dependencies
 * @throws {PolicyValidationError} If validation fails
 */
export declare function assertPolicyConsistency(deps: PolicyConsistencyDeps): void;
