/**
 * Zod validation schemas for hook event payloads.
 *
 * Provides runtime validation for all hook payload types defined in
 * ./types.ts. Each schema mirrors its corresponding TypeScript interface
 * and can be used to validate payloads at dispatch time.
 *
 * @module @cleocode/cleo/hooks/payload-schemas
 */
import { z } from 'zod';
import type { HookEvent } from './types.js';
/** Zod schema for {@link HookPayload}. */
export declare const HookPayloadSchema: z.ZodObject<{
    timestamp: z.ZodISODateTime;
    sessionId: z.ZodOptional<z.ZodString>;
    taskId: z.ZodOptional<z.ZodString>;
    providerId: z.ZodOptional<z.ZodString>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
/** Zod schema for {@link SessionStartPayload}. */
export declare const SessionStartPayloadSchema: z.ZodObject<{
    timestamp: z.ZodISODateTime;
    taskId: z.ZodOptional<z.ZodString>;
    providerId: z.ZodOptional<z.ZodString>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    sessionId: z.ZodString;
    name: z.ZodString;
    scope: z.ZodString;
    agent: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
/** @deprecated Use {@link SessionStartPayloadSchema}. Kept for backward compatibility. */
export declare const OnSessionStartPayloadSchema: z.ZodObject<{
    timestamp: z.ZodISODateTime;
    taskId: z.ZodOptional<z.ZodString>;
    providerId: z.ZodOptional<z.ZodString>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    sessionId: z.ZodString;
    name: z.ZodString;
    scope: z.ZodString;
    agent: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
/** Zod schema for {@link SessionEndPayload}. */
export declare const SessionEndPayloadSchema: z.ZodObject<{
    timestamp: z.ZodISODateTime;
    taskId: z.ZodOptional<z.ZodString>;
    providerId: z.ZodOptional<z.ZodString>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    sessionId: z.ZodString;
    duration: z.ZodNumber;
    tasksCompleted: z.ZodArray<z.ZodString>;
}, z.core.$strip>;
/** @deprecated Use {@link SessionEndPayloadSchema}. Kept for backward compatibility. */
export declare const OnSessionEndPayloadSchema: z.ZodObject<{
    timestamp: z.ZodISODateTime;
    taskId: z.ZodOptional<z.ZodString>;
    providerId: z.ZodOptional<z.ZodString>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    sessionId: z.ZodString;
    duration: z.ZodNumber;
    tasksCompleted: z.ZodArray<z.ZodString>;
}, z.core.$strip>;
/** Zod schema for {@link PreToolUsePayload}. */
export declare const PreToolUsePayloadSchema: z.ZodObject<{
    timestamp: z.ZodISODateTime;
    sessionId: z.ZodOptional<z.ZodString>;
    providerId: z.ZodOptional<z.ZodString>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    taskId: z.ZodString;
    taskTitle: z.ZodString;
    previousTask: z.ZodOptional<z.ZodString>;
    toolName: z.ZodOptional<z.ZodString>;
    toolInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
/** @deprecated Use {@link PreToolUsePayloadSchema}. Kept for backward compatibility. */
export declare const OnToolStartPayloadSchema: z.ZodObject<{
    timestamp: z.ZodISODateTime;
    sessionId: z.ZodOptional<z.ZodString>;
    providerId: z.ZodOptional<z.ZodString>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    taskId: z.ZodString;
    taskTitle: z.ZodString;
    previousTask: z.ZodOptional<z.ZodString>;
    toolName: z.ZodOptional<z.ZodString>;
    toolInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
/** Zod schema for {@link PostToolUsePayload}. */
export declare const PostToolUsePayloadSchema: z.ZodObject<{
    timestamp: z.ZodISODateTime;
    sessionId: z.ZodOptional<z.ZodString>;
    providerId: z.ZodOptional<z.ZodString>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    taskId: z.ZodString;
    taskTitle: z.ZodString;
    status: z.ZodEnum<{
        archived: "archived";
        done: "done";
        cancelled: "cancelled";
    }>;
    toolResult: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
/** @deprecated Use {@link PostToolUsePayloadSchema}. Kept for backward compatibility. */
export declare const OnToolCompletePayloadSchema: z.ZodObject<{
    timestamp: z.ZodISODateTime;
    sessionId: z.ZodOptional<z.ZodString>;
    providerId: z.ZodOptional<z.ZodString>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    taskId: z.ZodString;
    taskTitle: z.ZodString;
    status: z.ZodEnum<{
        archived: "archived";
        done: "done";
        cancelled: "cancelled";
    }>;
    toolResult: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
/** Zod schema for {@link NotificationPayload}. */
export declare const NotificationPayloadSchema: z.ZodObject<{
    timestamp: z.ZodISODateTime;
    sessionId: z.ZodOptional<z.ZodString>;
    taskId: z.ZodOptional<z.ZodString>;
    providerId: z.ZodOptional<z.ZodString>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    filePath: z.ZodOptional<z.ZodString>;
    changeType: z.ZodOptional<z.ZodEnum<{
        write: "write";
        create: "create";
        delete: "delete";
    }>>;
    sizeBytes: z.ZodOptional<z.ZodNumber>;
    message: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
/** @deprecated Use {@link NotificationPayloadSchema}. Kept for backward compatibility. */
export declare const OnFileChangePayloadSchema: z.ZodObject<{
    timestamp: z.ZodISODateTime;
    sessionId: z.ZodOptional<z.ZodString>;
    taskId: z.ZodOptional<z.ZodString>;
    providerId: z.ZodOptional<z.ZodString>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    filePath: z.ZodOptional<z.ZodString>;
    changeType: z.ZodOptional<z.ZodEnum<{
        write: "write";
        create: "create";
        delete: "delete";
    }>>;
    sizeBytes: z.ZodOptional<z.ZodNumber>;
    message: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
/** Zod schema for {@link PostToolUseFailurePayload}. */
export declare const PostToolUseFailurePayloadSchema: z.ZodObject<{
    timestamp: z.ZodISODateTime;
    sessionId: z.ZodOptional<z.ZodString>;
    taskId: z.ZodOptional<z.ZodString>;
    providerId: z.ZodOptional<z.ZodString>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    errorCode: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
    message: z.ZodString;
    domain: z.ZodOptional<z.ZodString>;
    operation: z.ZodOptional<z.ZodString>;
    gateway: z.ZodOptional<z.ZodString>;
    stack: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
/** @deprecated Use {@link PostToolUseFailurePayloadSchema}. Kept for backward compatibility. */
export declare const OnErrorPayloadSchema: z.ZodObject<{
    timestamp: z.ZodISODateTime;
    sessionId: z.ZodOptional<z.ZodString>;
    taskId: z.ZodOptional<z.ZodString>;
    providerId: z.ZodOptional<z.ZodString>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    errorCode: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
    message: z.ZodString;
    domain: z.ZodOptional<z.ZodString>;
    operation: z.ZodOptional<z.ZodString>;
    gateway: z.ZodOptional<z.ZodString>;
    stack: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
/** Zod schema for {@link PromptSubmitPayload}. */
export declare const PromptSubmitPayloadSchema: z.ZodObject<{
    timestamp: z.ZodISODateTime;
    sessionId: z.ZodOptional<z.ZodString>;
    taskId: z.ZodOptional<z.ZodString>;
    providerId: z.ZodOptional<z.ZodString>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    gateway: z.ZodString;
    domain: z.ZodString;
    operation: z.ZodString;
    source: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
/** @deprecated Use {@link PromptSubmitPayloadSchema}. Kept for backward compatibility. */
export declare const OnPromptSubmitPayloadSchema: z.ZodObject<{
    timestamp: z.ZodISODateTime;
    sessionId: z.ZodOptional<z.ZodString>;
    taskId: z.ZodOptional<z.ZodString>;
    providerId: z.ZodOptional<z.ZodString>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    gateway: z.ZodString;
    domain: z.ZodString;
    operation: z.ZodString;
    source: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
/** Zod schema for {@link ResponseCompletePayload}. */
export declare const ResponseCompletePayloadSchema: z.ZodObject<{
    timestamp: z.ZodISODateTime;
    sessionId: z.ZodOptional<z.ZodString>;
    taskId: z.ZodOptional<z.ZodString>;
    providerId: z.ZodOptional<z.ZodString>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    gateway: z.ZodString;
    domain: z.ZodString;
    operation: z.ZodString;
    success: z.ZodBoolean;
    durationMs: z.ZodOptional<z.ZodNumber>;
    errorCode: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
/** @deprecated Use {@link ResponseCompletePayloadSchema}. Kept for backward compatibility. */
export declare const OnResponseCompletePayloadSchema: z.ZodObject<{
    timestamp: z.ZodISODateTime;
    sessionId: z.ZodOptional<z.ZodString>;
    taskId: z.ZodOptional<z.ZodString>;
    providerId: z.ZodOptional<z.ZodString>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    gateway: z.ZodString;
    domain: z.ZodString;
    operation: z.ZodString;
    success: z.ZodBoolean;
    durationMs: z.ZodOptional<z.ZodNumber>;
    errorCode: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
/** Zod schema for {@link SubagentStartPayload}. */
export declare const SubagentStartPayloadSchema: z.ZodObject<{
    timestamp: z.ZodISODateTime;
    sessionId: z.ZodOptional<z.ZodString>;
    providerId: z.ZodOptional<z.ZodString>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    agentId: z.ZodString;
    role: z.ZodOptional<z.ZodString>;
    taskId: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
/** Zod schema for {@link SubagentStopPayload}. */
export declare const SubagentStopPayloadSchema: z.ZodObject<{
    timestamp: z.ZodISODateTime;
    sessionId: z.ZodOptional<z.ZodString>;
    providerId: z.ZodOptional<z.ZodString>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    agentId: z.ZodString;
    status: z.ZodOptional<z.ZodEnum<{
        partial: "partial";
        complete: "complete";
        blocked: "blocked";
        failed: "failed";
    }>>;
    taskId: z.ZodOptional<z.ZodString>;
    summary: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
/** Zod schema for {@link PreCompactPayload}. */
export declare const PreCompactPayloadSchema: z.ZodObject<{
    timestamp: z.ZodISODateTime;
    sessionId: z.ZodOptional<z.ZodString>;
    taskId: z.ZodOptional<z.ZodString>;
    providerId: z.ZodOptional<z.ZodString>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    tokensBefore: z.ZodOptional<z.ZodNumber>;
    reason: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
/** Zod schema for {@link PostCompactPayload}. */
export declare const PostCompactPayloadSchema: z.ZodObject<{
    timestamp: z.ZodISODateTime;
    sessionId: z.ZodOptional<z.ZodString>;
    taskId: z.ZodOptional<z.ZodString>;
    providerId: z.ZodOptional<z.ZodString>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    tokensBefore: z.ZodOptional<z.ZodNumber>;
    tokensAfter: z.ZodOptional<z.ZodNumber>;
    success: z.ZodBoolean;
}, z.core.$strip>;
/** Zod schema for {@link ConfigChangePayload}. */
export declare const ConfigChangePayloadSchema: z.ZodObject<{
    timestamp: z.ZodISODateTime;
    sessionId: z.ZodOptional<z.ZodString>;
    taskId: z.ZodOptional<z.ZodString>;
    providerId: z.ZodOptional<z.ZodString>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    key: z.ZodString;
    previousValue: z.ZodOptional<z.ZodUnknown>;
    newValue: z.ZodOptional<z.ZodUnknown>;
}, z.core.$strip>;
/** Zod schema for {@link OnWorkAvailablePayload}. */
export declare const OnWorkAvailablePayloadSchema: z.ZodObject<{
    timestamp: z.ZodISODateTime;
    sessionId: z.ZodOptional<z.ZodString>;
    taskId: z.ZodOptional<z.ZodString>;
    providerId: z.ZodOptional<z.ZodString>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    taskIds: z.ZodArray<z.ZodString>;
    epicId: z.ZodOptional<z.ZodString>;
    chainId: z.ZodOptional<z.ZodString>;
    reason: z.ZodOptional<z.ZodEnum<{
        manual: "manual";
        "dependency-cleared": "dependency-cleared";
        "new-task": "new-task";
        retry: "retry";
        patrol: "patrol";
    }>>;
}, z.core.$strip>;
/** Zod schema for {@link OnAgentSpawnPayload}. */
export declare const OnAgentSpawnPayloadSchema: z.ZodObject<{
    timestamp: z.ZodISODateTime;
    sessionId: z.ZodOptional<z.ZodString>;
    providerId: z.ZodOptional<z.ZodString>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    agentId: z.ZodString;
    role: z.ZodString;
    adapterId: z.ZodOptional<z.ZodString>;
    taskId: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
/** Zod schema for {@link OnAgentCompletePayload}. */
export declare const OnAgentCompletePayloadSchema: z.ZodObject<{
    timestamp: z.ZodISODateTime;
    sessionId: z.ZodOptional<z.ZodString>;
    providerId: z.ZodOptional<z.ZodString>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    agentId: z.ZodString;
    role: z.ZodString;
    status: z.ZodEnum<{
        partial: "partial";
        complete: "complete";
        blocked: "blocked";
        failed: "failed";
    }>;
    taskId: z.ZodOptional<z.ZodString>;
    summary: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
/** Zod schema for {@link OnCascadeStartPayload}. */
export declare const OnCascadeStartPayloadSchema: z.ZodObject<{
    timestamp: z.ZodISODateTime;
    sessionId: z.ZodOptional<z.ZodString>;
    taskId: z.ZodOptional<z.ZodString>;
    providerId: z.ZodOptional<z.ZodString>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    cascadeId: z.ZodString;
    chainId: z.ZodOptional<z.ZodString>;
    tesseraId: z.ZodOptional<z.ZodString>;
    taskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>;
/** Zod schema for {@link OnPatrolPayload}. */
export declare const OnPatrolPayloadSchema: z.ZodObject<{
    timestamp: z.ZodISODateTime;
    sessionId: z.ZodOptional<z.ZodString>;
    taskId: z.ZodOptional<z.ZodString>;
    providerId: z.ZodOptional<z.ZodString>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    watcherId: z.ZodString;
    patrolType: z.ZodEnum<{
        custom: "custom";
        health: "health";
        sweep: "sweep";
        refinery: "refinery";
        watcher: "watcher";
    }>;
    scope: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
/** Result of payload validation. */
export interface PayloadValidationResult {
    /** Whether the payload passed validation. */
    valid: boolean;
    /** Validation errors (empty when valid). */
    errors: string[];
}
/**
 * Validate a hook payload against its event-specific Zod schema.
 *
 * Falls back to the base {@link HookPayloadSchema} for events without
 * a dedicated schema. Returns a result object rather than throwing,
 * so callers can decide how to handle validation failures.
 *
 * @param event - The hook event name
 * @param payload - The payload to validate
 * @returns Validation result with any error messages
 */
export declare function validatePayload(event: HookEvent, payload: unknown): PayloadValidationResult;
//# sourceMappingURL=payload-schemas.d.ts.map