/**
 * Operation-aware LAFS envelope validation.
 *
 * The base LAFS shape proves that an envelope is structurally valid. This
 * module adds the dispatch-layer contract checks that require `_meta.operation`
 * to resolve to a registered CLEO operation and, when a result schema is known,
 * validates successful payloads against that operation's result contract.
 *
 * @task T10610
 * @saga T10538
 */
import type { OperationDef } from './dispatch/operation-def.js';
interface SafeParseIssue {
    readonly path: readonly PropertyKey[];
    readonly message: string;
    readonly code?: string;
}
interface SafeParseError {
    readonly issues: readonly SafeParseIssue[];
}
interface ResultSchema {
    safeParse(input: unknown): {
        success: true;
        data: unknown;
    } | {
        success: false;
        error: SafeParseError;
    };
}
/** Stable issue code emitted when `_meta.operation` is absent or unknown. */
export declare const E_LAFS_OPERATION_UNREGISTERED = "E_LAFS_OPERATION_UNREGISTERED";
/** Stable issue code emitted when an operation result fails its contract schema. */
export declare const E_LAFS_OPERATION_RESULT_SCHEMA = "E_LAFS_OPERATION_RESULT_SCHEMA";
/** Stable issue code emitted when success/error envelope invariants are violated. */
export declare const E_LAFS_OPERATION_ERROR_SHAPE = "E_LAFS_OPERATION_ERROR_SHAPE";
/** Dot-delimited operation name, e.g. `tasks.frontier`. */
export type OperationEnvelopeName = `${string}.${string}`;
/** One issue produced by operation-aware envelope validation. */
export interface OperationEnvelopeValidationIssue {
    /** JSON Pointer path into the envelope. */
    readonly path: string;
    /** Stable machine-readable issue code. */
    readonly code: string;
    /** Human-readable validation failure. */
    readonly message: string;
    /** Optional underlying schema keyword or parser code. */
    readonly keyword?: string;
}
/** Result of validating a LAFS envelope against the dispatch operation registry. */
export interface OperationEnvelopeValidationResult {
    /** True only when base LAFS shape, registry lookup, and result schema checks pass. */
    readonly valid: boolean;
    /** Base LAFS structural verdict. */
    readonly envelopeValid: boolean;
    /** Resolved operation definition, if `_meta.operation` matched the registry. */
    readonly operation?: OperationDef;
    /** Result schema key that was enforced, when available. */
    readonly resultSchemaOperation?: OperationEnvelopeName;
    /** Structured issue list, including base LAFS and operation-aware issues. */
    readonly issues: readonly OperationEnvelopeValidationIssue[];
    /** Human-readable issue messages for CLI/reporting callers. */
    readonly errors: readonly string[];
}
/** Options for operation-aware LAFS validation. */
export interface OperationEnvelopeValidationOptions {
    /** Registry to resolve `_meta.operation` against. Defaults to canonical OPERATIONS. */
    readonly operations?: readonly OperationDef[];
    /** Per-operation result schemas. Defaults to the currently contracted WorkGraph reads. */
    readonly resultSchemas?: ReadonlyMap<OperationEnvelopeName, ResultSchema>;
}
/** Canonical result schemas currently promoted to operation-aware LAFS validation. */
export declare const OPERATION_RESULT_SCHEMAS: ReadonlyMap<OperationEnvelopeName, ResultSchema>;
/**
 * Validate a LAFS envelope against the dispatch operation registry and known
 * operation result contracts.
 */
export declare function validateOperationEnvelope(input: unknown, options?: OperationEnvelopeValidationOptions): OperationEnvelopeValidationResult;
export {};
//# sourceMappingURL=operation-envelope-validation.d.ts.map