import { z } from "zod/v4";
/**
 * History / cross-dp-worker listing contracts (M8 Phase A wave-1).
 *
 * Three new GET endpoints share these wire shapes:
 *   - GET /api/tasks/adhoc          AdhocBatchListItemSchema
 *   - GET /api/tasks/runs           TaskRunListItemSchema
 *   - GET /api/scheduled-tasks      ScheduledTaskListItemSchema
 *
 * Cursors are opaque strings (timestamp-based, but the client should NOT
 * parse them) — the server hands one back as `next_cursor` and the client
 * passes it through unchanged to fetch the next page.
 */
export declare const AdhocBatchListItemSchema: z.ZodObject<{
    id: z.ZodString;
    name: z.ZodString;
    prompt: z.ZodString;
    target_descriptor_json: z.ZodRecord<z.ZodString, z.ZodUnknown>;
    random_delay_seconds: z.ZodNumber;
    dispatch_window_seconds: z.ZodNumber;
    summary_stats_json: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    created_by: z.ZodOptional<z.ZodString>;
    created_at: z.ZodString;
    run_count: z.ZodNumber;
    success_count: z.ZodNumber;
    failure_count: z.ZodNumber;
}, z.core.$strip>;
export type AdhocBatchListItem = z.infer<typeof AdhocBatchListItemSchema>;
export declare const AdhocBatchListResponseSchema: z.ZodObject<{
    items: z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        prompt: z.ZodString;
        target_descriptor_json: z.ZodRecord<z.ZodString, z.ZodUnknown>;
        random_delay_seconds: z.ZodNumber;
        dispatch_window_seconds: z.ZodNumber;
        summary_stats_json: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        created_by: z.ZodOptional<z.ZodString>;
        created_at: z.ZodString;
        run_count: z.ZodNumber;
        success_count: z.ZodNumber;
        failure_count: z.ZodNumber;
    }, z.core.$strip>>;
    next_cursor: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
export type AdhocBatchListResponse = z.infer<typeof AdhocBatchListResponseSchema>;
export declare const TaskRunListItemSchema: z.ZodObject<{
    id: z.ZodString;
    worker_id: z.ZodString;
    worker_name: z.ZodString;
    task_name: z.ZodString;
    scheduled_task_id: z.ZodOptional<z.ZodString>;
    parent_adhoc_task_id: z.ZodOptional<z.ZodString>;
    source: z.ZodEnum<{
        scheduled: "scheduled";
        ad_hoc: "ad_hoc";
        chat_replay: "chat_replay";
    }>;
    status: z.ZodEnum<{
        running: "running";
        success: "success";
        failed: "failed";
        queued: "queued";
        dispatched: "dispatched";
        cancelled: "cancelled";
        timeout: "timeout";
    }>;
    prompt: z.ZodString;
    dispatched_at: z.ZodOptional<z.ZodString>;
    started_at: z.ZodOptional<z.ZodString>;
    finished_at: z.ZodOptional<z.ZodString>;
    result_summary: z.ZodOptional<z.ZodString>;
    error: z.ZodOptional<z.ZodString>;
    randomized_delay_ms: z.ZodNumber;
    scheduled_fire_at: z.ZodOptional<z.ZodString>;
    created_at: z.ZodString;
}, z.core.$strip>;
export type TaskRunListItem = z.infer<typeof TaskRunListItemSchema>;
export declare const TaskRunHistoryListResponseSchema: z.ZodObject<{
    items: z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        worker_id: z.ZodString;
        worker_name: z.ZodString;
        task_name: z.ZodString;
        scheduled_task_id: z.ZodOptional<z.ZodString>;
        parent_adhoc_task_id: z.ZodOptional<z.ZodString>;
        source: z.ZodEnum<{
            scheduled: "scheduled";
            ad_hoc: "ad_hoc";
            chat_replay: "chat_replay";
        }>;
        status: z.ZodEnum<{
            running: "running";
            success: "success";
            failed: "failed";
            queued: "queued";
            dispatched: "dispatched";
            cancelled: "cancelled";
            timeout: "timeout";
        }>;
        prompt: z.ZodString;
        dispatched_at: z.ZodOptional<z.ZodString>;
        started_at: z.ZodOptional<z.ZodString>;
        finished_at: z.ZodOptional<z.ZodString>;
        result_summary: z.ZodOptional<z.ZodString>;
        error: z.ZodOptional<z.ZodString>;
        randomized_delay_ms: z.ZodNumber;
        scheduled_fire_at: z.ZodOptional<z.ZodString>;
        created_at: z.ZodString;
    }, z.core.$strip>>;
    next_cursor: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
export type TaskRunHistoryListResponse = z.infer<typeof TaskRunHistoryListResponseSchema>;
/**
 * Cross-dp-worker scheduled-task row. Shape differs from the per-dp-worker
 * `ScheduledTaskResponseSchema` only in that it carries `worker_name`
 * (joined from dp_workers) — handy when listing across dp-workers.
 */
export declare const ScheduledTaskListItemSchema: z.ZodObject<{
    id: z.ZodString;
    worker_id: z.ZodString;
    worker_name: z.ZodString;
    worker_status: z.ZodOptional<z.ZodString>;
    name: z.ZodString;
    cron: z.ZodString;
    timezone: z.ZodOptional<z.ZodString>;
    prompt: z.ZodString;
    random_delay_seconds: z.ZodNumber;
    enabled: z.ZodBoolean;
    last_run_at: z.ZodOptional<z.ZodString>;
    last_status: z.ZodOptional<z.ZodEnum<{
        error: "error";
        ok: "ok";
    }>>;
    run_count: z.ZodNumber;
    success_count: z.ZodNumber;
    proxy_timezone: z.ZodOptional<z.ZodString>;
    effective_timezone: z.ZodString;
    timezone_source: z.ZodEnum<{
        proxy: "proxy";
        task: "task";
        utc: "utc";
    }>;
    next_fire_at: z.ZodOptional<z.ZodString>;
    health_status: z.ZodEnum<{
        healthy: "healthy";
        failing: "failing";
        never_run: "never_run";
        disabled: "disabled";
    }>;
    latest_run_id: z.ZodOptional<z.ZodString>;
    latest_run_status: z.ZodOptional<z.ZodEnum<{
        running: "running";
        success: "success";
        failed: "failed";
        queued: "queued";
        dispatched: "dispatched";
        cancelled: "cancelled";
        timeout: "timeout";
    }>>;
    last_error: z.ZodOptional<z.ZodString>;
    created_at: z.ZodString;
    updated_at: z.ZodString;
}, z.core.$strip>;
export type ScheduledTaskListItem = z.infer<typeof ScheduledTaskListItemSchema>;
export declare const ScheduledTaskListResponseSchema: z.ZodObject<{
    items: z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        worker_id: z.ZodString;
        worker_name: z.ZodString;
        worker_status: z.ZodOptional<z.ZodString>;
        name: z.ZodString;
        cron: z.ZodString;
        timezone: z.ZodOptional<z.ZodString>;
        prompt: z.ZodString;
        random_delay_seconds: z.ZodNumber;
        enabled: z.ZodBoolean;
        last_run_at: z.ZodOptional<z.ZodString>;
        last_status: z.ZodOptional<z.ZodEnum<{
            error: "error";
            ok: "ok";
        }>>;
        run_count: z.ZodNumber;
        success_count: z.ZodNumber;
        proxy_timezone: z.ZodOptional<z.ZodString>;
        effective_timezone: z.ZodString;
        timezone_source: z.ZodEnum<{
            proxy: "proxy";
            task: "task";
            utc: "utc";
        }>;
        next_fire_at: z.ZodOptional<z.ZodString>;
        health_status: z.ZodEnum<{
            healthy: "healthy";
            failing: "failing";
            never_run: "never_run";
            disabled: "disabled";
        }>;
        latest_run_id: z.ZodOptional<z.ZodString>;
        latest_run_status: z.ZodOptional<z.ZodEnum<{
            running: "running";
            success: "success";
            failed: "failed";
            queued: "queued";
            dispatched: "dispatched";
            cancelled: "cancelled";
            timeout: "timeout";
        }>>;
        last_error: z.ZodOptional<z.ZodString>;
        created_at: z.ZodString;
        updated_at: z.ZodString;
    }, z.core.$strip>>;
    next_cursor: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
export type ScheduledTaskListResponse = z.infer<typeof ScheduledTaskListResponseSchema>;
//# sourceMappingURL=task-history-contracts.d.ts.map