/**
 * @module        shared/runtimeSchemas
 * @description   零散磁盘对象的 zod schema —— 唯一出处
 *
 * @layer         shared
 *
 * 解决 v0.49.5 / 15 / 16 踩过的"writer 和 reader 各自硬编码解析器，schema 改了一处漂移"的坑。
 *
 * 所有写入点 `writeXxx.parse(payload)`，所有读取点 `XxxSchema.safeParse(raw)`。
 * 任何一侧加字段，另一侧 TS 类型直接不兼容 —— 编译期拦截漂移。
 */
import { z } from 'zod';
export declare const WorkerMarkerSchema: z.ZodObject<{
    /** 卡片 id（形如 "md-<seq>" 或裸 seq 字符串） */
    cardId: z.ZodString;
    /** 当前阶段名，如 "develop" / "qa" / "review" */
    stage: z.ZodString;
    /** ISO 8601 派发时间 */
    dispatchedAt: z.ZodString;
    /** ACP session ID，spawn 成功后写入 */
    sessionId: z.ZodOptional<z.ZodString>;
    /** 子进程 PID，spawn 成功后写入 */
    pid: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
    cardId: string;
    stage: string;
    dispatchedAt: string;
    sessionId?: string | undefined;
    pid?: number | undefined;
}, {
    cardId: string;
    stage: string;
    dispatchedAt: string;
    sessionId?: string | undefined;
    pid?: number | undefined;
}>;
export type WorkerMarker = z.infer<typeof WorkerMarkerSchema>;
export declare const CardFrontmatterSchema: z.ZodObject<{
    seq: z.ZodNumber;
    title: z.ZodString;
    labels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
    skills: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
    created: z.ZodOptional<z.ZodString>;
    updated: z.ZodOptional<z.ZodString>;
    branch: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    claimed_by: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    claimed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    retry_count: z.ZodOptional<z.ZodNumber>;
    meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, "strip", z.ZodTypeAny, {
    seq: number;
    title: string;
    labels: string[];
    skills: string[];
    meta?: Record<string, unknown> | undefined;
    created?: string | undefined;
    branch?: string | null | undefined;
    claimed_by?: string | null | undefined;
    claimed_at?: string | null | undefined;
    retry_count?: number | undefined;
    updated?: string | undefined;
}, {
    seq: number;
    title: string;
    meta?: Record<string, unknown> | undefined;
    created?: string | undefined;
    branch?: string | null | undefined;
    labels?: string[] | undefined;
    skills?: string[] | undefined;
    claimed_by?: string | null | undefined;
    claimed_at?: string | null | undefined;
    retry_count?: number | undefined;
    updated?: string | undefined;
}>;
export type CardFrontmatter = z.infer<typeof CardFrontmatterSchema>;
export declare const ProjectConfSchema: z.ZodObject<{
    PROJECT_NAME: z.ZodString;
    PROJECT_DIR: z.ZodString;
    PM_TOOL: z.ZodDefault<z.ZodEnum<["markdown", "gitlab", "github"]>>;
    AGENT_PROVIDER: z.ZodDefault<z.ZodString>;
    MAX_WORKERS: z.ZodDefault<z.ZodString>;
    MERGE_BRANCH: z.ZodDefault<z.ZodString>;
    GITLAB_PROJECT: z.ZodOptional<z.ZodString>;
    GITLAB_PROJECT_ID: z.ZodOptional<z.ZodString>;
    MATRIX_ROOM_ID: z.ZodOptional<z.ZodString>;
    REPO_DIR: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    PROJECT_NAME: string;
    PROJECT_DIR: string;
    PM_TOOL: "markdown" | "github" | "gitlab";
    AGENT_PROVIDER: string;
    MAX_WORKERS: string;
    MERGE_BRANCH: string;
    GITLAB_PROJECT?: string | undefined;
    GITLAB_PROJECT_ID?: string | undefined;
    MATRIX_ROOM_ID?: string | undefined;
    REPO_DIR?: string | undefined;
}, {
    PROJECT_NAME: string;
    PROJECT_DIR: string;
    GITLAB_PROJECT?: string | undefined;
    GITLAB_PROJECT_ID?: string | undefined;
    MATRIX_ROOM_ID?: string | undefined;
    REPO_DIR?: string | undefined;
    PM_TOOL?: "markdown" | "github" | "gitlab" | undefined;
    AGENT_PROVIDER?: string | undefined;
    MAX_WORKERS?: string | undefined;
    MERGE_BRANCH?: string | undefined;
}>;
export type ProjectConf = z.infer<typeof ProjectConfSchema>;
export declare const WorkerSlotStateSchema: z.ZodObject<{
    status: z.ZodEnum<["idle", "active", "merging", "resolving", "releasing"]>;
    seq: z.ZodNullable<z.ZodNumber>;
    branch: z.ZodNullable<z.ZodString>;
    worktree: z.ZodNullable<z.ZodString>;
    claimedAt: z.ZodNullable<z.ZodString>;
    lastHeartbeat: z.ZodNullable<z.ZodString>;
    mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<["print", "acp", "acp-sdk"]>>>;
    agent: z.ZodOptional<z.ZodNullable<z.ZodEnum<["claude"]>>>;
    pid: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
    sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    remoteStatus: z.ZodOptional<z.ZodNullable<z.ZodEnum<["submitted", "running", "waiting_input", "needs_confirmation", "stalled_submit", "completed", "failed", "cancelled", "lost"]>>>;
    completedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, "strip", z.ZodTypeAny, {
    seq: number | null;
    status: "idle" | "active" | "merging" | "resolving" | "releasing";
    branch: string | null;
    worktree: string | null;
    claimedAt: string | null;
    lastHeartbeat: string | null;
    sessionId?: string | null | undefined;
    pid?: number | null | undefined;
    mode?: "acp-sdk" | "print" | "acp" | null | undefined;
    agent?: "claude" | null | undefined;
    remoteStatus?: "failed" | "running" | "needs_confirmation" | "submitted" | "waiting_input" | "stalled_submit" | "completed" | "cancelled" | "lost" | null | undefined;
    completedAt?: string | null | undefined;
}, {
    seq: number | null;
    status: "idle" | "active" | "merging" | "resolving" | "releasing";
    branch: string | null;
    worktree: string | null;
    claimedAt: string | null;
    lastHeartbeat: string | null;
    sessionId?: string | null | undefined;
    pid?: number | null | undefined;
    mode?: "acp-sdk" | "print" | "acp" | null | undefined;
    agent?: "claude" | null | undefined;
    remoteStatus?: "failed" | "running" | "needs_confirmation" | "submitted" | "waiting_input" | "stalled_submit" | "completed" | "cancelled" | "lost" | null | undefined;
    completedAt?: string | null | undefined;
}>;
export declare const StateJsonSchema: z.ZodObject<{
    workers: z.ZodRecord<z.ZodString, z.ZodObject<{
        status: z.ZodEnum<["idle", "active", "merging", "resolving", "releasing"]>;
        seq: z.ZodNullable<z.ZodNumber>;
        branch: z.ZodNullable<z.ZodString>;
        worktree: z.ZodNullable<z.ZodString>;
        claimedAt: z.ZodNullable<z.ZodString>;
        lastHeartbeat: z.ZodNullable<z.ZodString>;
        mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<["print", "acp", "acp-sdk"]>>>;
        agent: z.ZodOptional<z.ZodNullable<z.ZodEnum<["claude"]>>>;
        pid: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        remoteStatus: z.ZodOptional<z.ZodNullable<z.ZodEnum<["submitted", "running", "waiting_input", "needs_confirmation", "stalled_submit", "completed", "failed", "cancelled", "lost"]>>>;
        completedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    }, "strip", z.ZodTypeAny, {
        seq: number | null;
        status: "idle" | "active" | "merging" | "resolving" | "releasing";
        branch: string | null;
        worktree: string | null;
        claimedAt: string | null;
        lastHeartbeat: string | null;
        sessionId?: string | null | undefined;
        pid?: number | null | undefined;
        mode?: "acp-sdk" | "print" | "acp" | null | undefined;
        agent?: "claude" | null | undefined;
        remoteStatus?: "failed" | "running" | "needs_confirmation" | "submitted" | "waiting_input" | "stalled_submit" | "completed" | "cancelled" | "lost" | null | undefined;
        completedAt?: string | null | undefined;
    }, {
        seq: number | null;
        status: "idle" | "active" | "merging" | "resolving" | "releasing";
        branch: string | null;
        worktree: string | null;
        claimedAt: string | null;
        lastHeartbeat: string | null;
        sessionId?: string | null | undefined;
        pid?: number | null | undefined;
        mode?: "acp-sdk" | "print" | "acp" | null | undefined;
        agent?: "claude" | null | undefined;
        remoteStatus?: "failed" | "running" | "needs_confirmation" | "submitted" | "waiting_input" | "stalled_submit" | "completed" | "cancelled" | "lost" | null | undefined;
        completedAt?: string | null | undefined;
    }>>;
}, "strip", z.ZodTypeAny, {
    workers: Record<string, {
        seq: number | null;
        status: "idle" | "active" | "merging" | "resolving" | "releasing";
        branch: string | null;
        worktree: string | null;
        claimedAt: string | null;
        lastHeartbeat: string | null;
        sessionId?: string | null | undefined;
        pid?: number | null | undefined;
        mode?: "acp-sdk" | "print" | "acp" | null | undefined;
        agent?: "claude" | null | undefined;
        remoteStatus?: "failed" | "running" | "needs_confirmation" | "submitted" | "waiting_input" | "stalled_submit" | "completed" | "cancelled" | "lost" | null | undefined;
        completedAt?: string | null | undefined;
    }>;
}, {
    workers: Record<string, {
        seq: number | null;
        status: "idle" | "active" | "merging" | "resolving" | "releasing";
        branch: string | null;
        worktree: string | null;
        claimedAt: string | null;
        lastHeartbeat: string | null;
        sessionId?: string | null | undefined;
        pid?: number | null | undefined;
        mode?: "acp-sdk" | "print" | "acp" | null | undefined;
        agent?: "claude" | null | undefined;
        remoteStatus?: "failed" | "running" | "needs_confirmation" | "submitted" | "waiting_input" | "stalled_submit" | "completed" | "cancelled" | "lost" | null | undefined;
        completedAt?: string | null | undefined;
    }>;
}>;
export type WorkerSlotStatePayload = z.infer<typeof WorkerSlotStateSchema>;
export declare const PipelineYamlSchema: z.ZodObject<{
    mode: z.ZodDefault<z.ZodEnum<["project", "single", "card"]>>;
    states: z.ZodOptional<z.ZodObject<{
        planning: z.ZodOptional<z.ZodString>;
        backlog: z.ZodOptional<z.ZodString>;
        ready: z.ZodOptional<z.ZodString>;
        done: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        ready?: string | undefined;
        done?: string | undefined;
        planning?: string | undefined;
        backlog?: string | undefined;
    }, {
        ready?: string | undefined;
        done?: string | undefined;
        planning?: string | undefined;
        backlog?: string | undefined;
    }>>;
    stages: z.ZodArray<z.ZodObject<{
        name: z.ZodString;
        trigger_state: z.ZodOptional<z.ZodString>;
        active_state: z.ZodOptional<z.ZodString>;
        on_complete: z.ZodOptional<z.ZodString>;
        on_fail: z.ZodOptional<z.ZodObject<{
            action: z.ZodOptional<z.ZodString>;
            halt: z.ZodOptional<z.ZodBoolean>;
        }, "strip", z.ZodTypeAny, {
            action?: string | undefined;
            halt?: boolean | undefined;
        }, {
            action?: string | undefined;
            halt?: boolean | undefined;
        }>>;
        agent: z.ZodOptional<z.ZodString>;
        cwd: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        name: string;
        cwd?: string | undefined;
        agent?: string | undefined;
        trigger_state?: string | undefined;
        active_state?: string | undefined;
        on_complete?: string | undefined;
        on_fail?: {
            action?: string | undefined;
            halt?: boolean | undefined;
        } | undefined;
    }, {
        name: string;
        cwd?: string | undefined;
        agent?: string | undefined;
        trigger_state?: string | undefined;
        active_state?: string | undefined;
        on_complete?: string | undefined;
        on_fail?: {
            action?: string | undefined;
            halt?: boolean | undefined;
        } | undefined;
    }>, "many">;
}, "strip", z.ZodTypeAny, {
    mode: "project" | "card" | "single";
    stages: {
        name: string;
        cwd?: string | undefined;
        agent?: string | undefined;
        trigger_state?: string | undefined;
        active_state?: string | undefined;
        on_complete?: string | undefined;
        on_fail?: {
            action?: string | undefined;
            halt?: boolean | undefined;
        } | undefined;
    }[];
    states?: {
        ready?: string | undefined;
        done?: string | undefined;
        planning?: string | undefined;
        backlog?: string | undefined;
    } | undefined;
}, {
    stages: {
        name: string;
        cwd?: string | undefined;
        agent?: string | undefined;
        trigger_state?: string | undefined;
        active_state?: string | undefined;
        on_complete?: string | undefined;
        on_fail?: {
            action?: string | undefined;
            halt?: boolean | undefined;
        } | undefined;
    }[];
    mode?: "project" | "card" | "single" | undefined;
    states?: {
        ready?: string | undefined;
        done?: string | undefined;
        planning?: string | undefined;
        backlog?: string | undefined;
    } | undefined;
}>;
export type PipelineYaml = z.infer<typeof PipelineYamlSchema>;
//# sourceMappingURL=runtimeSchemas.d.ts.map