/**
 * 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/v4';
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 OnSessionStartPayload}. */
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 OnSessionEndPayload}. */
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 OnToolStartPayload}. */
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>;
}, z.core.$strip>;
/** Zod schema for {@link OnToolCompletePayload}. */
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<{
        cancelled: "cancelled";
        done: "done";
        archived: "archived";
    }>;
}, z.core.$strip>;
/** Zod schema for {@link OnFileChangePayload}. */
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.ZodString;
    changeType: z.ZodEnum<{
        write: "write";
        create: "create";
        delete: "delete";
    }>;
    sizeBytes: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
/** Zod schema for {@link OnErrorPayload}. */
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 OnPromptSubmitPayload}. */
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 OnResponseCompletePayload}. */
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 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";
        failed: "failed";
        blocked: "blocked";
        complete: "complete";
    }>;
    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