import { z } from 'zod';
export declare const Sha256Pattern: RegExp;
export declare const Sha256Schema: z.ZodString;
export declare const ActorEnum: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
export type Actor = z.infer<typeof ActorEnum>;
export declare const ErrorClassEnum: z.ZodEnum<["retryable", "fatal", "userFault", "manual"]>;
export type ErrorClass = z.infer<typeof ErrorClassEnum>;
export declare const ErrorCodeEnum: z.ZodEnum<["LeaseExpired", "WorkerCrashed", "NetworkError", "ProviderRateLimited", "IdempotencyInputMismatch", "IdempotencyConflict", "InputValidationFailed", "InputBindingFailed", "OutputSchemaViolation", "WaitDeadlineExceeded", "TtlExpired", "UnknownProviderError", "InputUnrecoverable", "CorruptLog", "LoopMaxIterationsExceeded", "LoopBodyFailed"]>;
export type ErrorCode = z.infer<typeof ErrorCodeEnum>;
export declare const ErrorPayloadSchema: z.ZodObject<{
    errorCode: z.ZodEnum<["LeaseExpired", "WorkerCrashed", "NetworkError", "ProviderRateLimited", "IdempotencyInputMismatch", "IdempotencyConflict", "InputValidationFailed", "InputBindingFailed", "OutputSchemaViolation", "WaitDeadlineExceeded", "TtlExpired", "UnknownProviderError", "InputUnrecoverable", "CorruptLog", "LoopMaxIterationsExceeded", "LoopBodyFailed"]>;
    errorClass: z.ZodEnum<["retryable", "fatal", "userFault", "manual"]>;
    errorMessage: z.ZodString;
    stackRef: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed";
    errorClass: "manual" | "retryable" | "fatal" | "userFault";
    errorMessage: string;
    stackRef?: string | undefined;
}, {
    errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed";
    errorClass: "manual" | "retryable" | "fatal" | "userFault";
    errorMessage: string;
    stackRef?: string | undefined;
}>;
export type ErrorPayload = z.infer<typeof ErrorPayloadSchema>;
export declare const OutputRefSchema: z.ZodObject<{
    outputHash: z.ZodString;
    outputPath: z.ZodOptional<z.ZodString>;
    outputBytes: z.ZodNumber;
    outputSchemaVersion: z.ZodNumber;
    contentType: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    outputHash: string;
    outputBytes: number;
    outputSchemaVersion: number;
    outputPath?: string | undefined;
    contentType?: string | undefined;
}, {
    outputHash: string;
    outputBytes: number;
    outputSchemaVersion: number;
    outputPath?: string | undefined;
    contentType?: string | undefined;
}>;
export type OutputRef = z.infer<typeof OutputRefSchema>;
export declare const ReconcileCapabilityEnum: z.ZodEnum<["readOnlyLookup", "idempotentSubmit", "none"]>;
export declare const ReconcileDecisionEnum: z.ZodEnum<["replayed", "completedByIdempotentSubmit", "manual", "freshRetry"]>;
export declare const WaitKindEnum: z.ZodEnum<["human-gate", "time", "condition"]>;
export declare const WaitResolutionEnum: z.ZodEnum<["approved", "rejected", "external"]>;
export declare const CancelTargetSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
    kind: z.ZodLiteral<"run">;
    runId: z.ZodString;
}, "strip", z.ZodTypeAny, {
    kind: "run";
    runId: string;
}, {
    kind: "run";
    runId: string;
}>, z.ZodObject<{
    kind: z.ZodLiteral<"node">;
    nodeId: z.ZodString;
}, "strip", z.ZodTypeAny, {
    kind: "node";
    nodeId: string;
}, {
    kind: "node";
    nodeId: string;
}>, z.ZodObject<{
    kind: z.ZodLiteral<"activity">;
    activityId: z.ZodString;
}, "strip", z.ZodTypeAny, {
    kind: "activity";
    activityId: string;
}, {
    kind: "activity";
    activityId: string;
}>]>;
export declare const BackoffPolicySchema: z.ZodObject<{
    kind: z.ZodEnum<["fixed", "exponential"]>;
    baseMs: z.ZodNumber;
    factor: z.ZodOptional<z.ZodNumber>;
    jitter: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
    kind: "fixed" | "exponential";
    baseMs: number;
    factor?: number | undefined;
    jitter?: boolean | undefined;
}, {
    kind: "fixed" | "exponential";
    baseMs: number;
    factor?: number | undefined;
    jitter?: boolean | undefined;
}>;
/**
 * Immutable identity snapshot of a workflow bot at run-creation time.
 * Frozen here so subsequent rename / re-wire in bots.json doesn't drift
 * the historical run view (UI doc §3.4).  All fields optional so a bot
 * with partial registry data still serializes cleanly.
 */
export declare const BotSnapshotSchema: z.ZodObject<{
    larkAppId: z.ZodOptional<z.ZodString>;
    cliId: z.ZodOptional<z.ZodString>;
    displayName: z.ZodOptional<z.ZodString>;
    workingDir: z.ZodOptional<z.ZodString>;
    cliPathOverride: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    larkAppId?: string | undefined;
    cliId?: string | undefined;
    cliPathOverride?: string | undefined;
    workingDir?: string | undefined;
    displayName?: string | undefined;
}, {
    larkAppId?: string | undefined;
    cliId?: string | undefined;
    cliPathOverride?: string | undefined;
    workingDir?: string | undefined;
    displayName?: string | undefined;
}>;
export type BotSnapshot = z.infer<typeof BotSnapshotSchema>;
export declare const RunCreatedPayload: z.ZodObject<{
    workflowId: z.ZodString;
    revisionId: z.ZodString;
    inputRef: z.ZodObject<{
        outputHash: z.ZodString;
        outputPath: z.ZodOptional<z.ZodString>;
        outputBytes: z.ZodNumber;
        outputSchemaVersion: z.ZodNumber;
        contentType: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        outputHash: string;
        outputBytes: number;
        outputSchemaVersion: number;
        outputPath?: string | undefined;
        contentType?: string | undefined;
    }, {
        outputHash: string;
        outputBytes: number;
        outputSchemaVersion: number;
        outputPath?: string | undefined;
        contentType?: string | undefined;
    }>;
    initiator: z.ZodString;
    botSnapshots: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
        larkAppId: z.ZodOptional<z.ZodString>;
        cliId: z.ZodOptional<z.ZodString>;
        displayName: z.ZodOptional<z.ZodString>;
        workingDir: z.ZodOptional<z.ZodString>;
        cliPathOverride: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        larkAppId?: string | undefined;
        cliId?: string | undefined;
        cliPathOverride?: string | undefined;
        workingDir?: string | undefined;
        displayName?: string | undefined;
    }, {
        larkAppId?: string | undefined;
        cliId?: string | undefined;
        cliPathOverride?: string | undefined;
        workingDir?: string | undefined;
        displayName?: string | undefined;
    }>>>;
}, "strip", z.ZodTypeAny, {
    workflowId: string;
    revisionId: string;
    inputRef: {
        outputHash: string;
        outputBytes: number;
        outputSchemaVersion: number;
        outputPath?: string | undefined;
        contentType?: string | undefined;
    };
    initiator: string;
    botSnapshots?: Record<string, {
        larkAppId?: string | undefined;
        cliId?: string | undefined;
        cliPathOverride?: string | undefined;
        workingDir?: string | undefined;
        displayName?: string | undefined;
    }> | undefined;
}, {
    workflowId: string;
    revisionId: string;
    inputRef: {
        outputHash: string;
        outputBytes: number;
        outputSchemaVersion: number;
        outputPath?: string | undefined;
        contentType?: string | undefined;
    };
    initiator: string;
    botSnapshots?: Record<string, {
        larkAppId?: string | undefined;
        cliId?: string | undefined;
        cliPathOverride?: string | undefined;
        workingDir?: string | undefined;
        displayName?: string | undefined;
    }> | undefined;
}>;
export declare const RunStartedPayload: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
export declare const RunSucceededPayload: z.ZodObject<{
    outputRef: z.ZodObject<{
        outputHash: z.ZodString;
        outputPath: z.ZodOptional<z.ZodString>;
        outputBytes: z.ZodNumber;
        outputSchemaVersion: z.ZodNumber;
        contentType: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        outputHash: string;
        outputBytes: number;
        outputSchemaVersion: number;
        outputPath?: string | undefined;
        contentType?: string | undefined;
    }, {
        outputHash: string;
        outputBytes: number;
        outputSchemaVersion: number;
        outputPath?: string | undefined;
        contentType?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    outputRef: {
        outputHash: string;
        outputBytes: number;
        outputSchemaVersion: number;
        outputPath?: string | undefined;
        contentType?: string | undefined;
    };
}, {
    outputRef: {
        outputHash: string;
        outputBytes: number;
        outputSchemaVersion: number;
        outputPath?: string | undefined;
        contentType?: string | undefined;
    };
}>;
export declare const RunFailedPayload: z.ZodObject<{
    failedNodeId: z.ZodString;
    rootCauseEventId: z.ZodString;
}, "strip", z.ZodTypeAny, {
    failedNodeId: string;
    rootCauseEventId: string;
}, {
    failedNodeId: string;
    rootCauseEventId: string;
}>;
export declare const RunCanceledPayload: z.ZodObject<{
    cancelOriginEventId: z.ZodString;
}, "strip", z.ZodTypeAny, {
    cancelOriginEventId: string;
}, {
    cancelOriginEventId: string;
}>;
export declare const NodeWaitingPayload: z.ZodObject<{
    nodeId: z.ZodString;
    waitReason: z.ZodString;
    deadlineAt: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
    nodeId: string;
    waitReason: string;
    deadlineAt?: number | undefined;
}, {
    nodeId: string;
    waitReason: string;
    deadlineAt?: number | undefined;
}>;
export declare const NodeRetryingPayload: z.ZodObject<{
    nodeId: z.ZodString;
    lastAttemptId: z.ZodString;
    nextBackoffMs: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
    nodeId: string;
    lastAttemptId: string;
    nextBackoffMs: number;
}, {
    nodeId: string;
    lastAttemptId: string;
    nextBackoffMs: number;
}>;
export declare const NodeSucceededPayload: z.ZodObject<{
    nodeId: z.ZodString;
    lastActivityId: z.ZodString;
}, "strip", z.ZodTypeAny, {
    nodeId: string;
    lastActivityId: string;
}, {
    nodeId: string;
    lastActivityId: string;
}>;
export declare const NodeFailedPayload: z.ZodObject<{
    nodeId: z.ZodString;
    lastActivityId: z.ZodString;
    errorClass: z.ZodEnum<["retryable", "fatal", "userFault", "manual"]>;
}, "strip", z.ZodTypeAny, {
    nodeId: string;
    errorClass: "manual" | "retryable" | "fatal" | "userFault";
    lastActivityId: string;
}, {
    nodeId: string;
    errorClass: "manual" | "retryable" | "fatal" | "userFault";
    lastActivityId: string;
}>;
export declare const NodeSkippedPayload: z.ZodObject<{
    nodeId: z.ZodString;
    conditionEventId: z.ZodString;
}, "strip", z.ZodTypeAny, {
    nodeId: string;
    conditionEventId: string;
}, {
    nodeId: string;
    conditionEventId: string;
}>;
export declare const NodeCanceledPayload: z.ZodObject<{
    nodeId: z.ZodString;
    cancelOriginEventId: z.ZodString;
}, "strip", z.ZodTypeAny, {
    nodeId: string;
    cancelOriginEventId: string;
}, {
    nodeId: string;
    cancelOriginEventId: string;
}>;
export declare const ActivityRunningPayload: z.ZodObject<{
    activityId: z.ZodString;
    attemptId: z.ZodString;
    leaseId: z.ZodString;
}, "strip", z.ZodTypeAny, {
    attemptId: string;
    activityId: string;
    leaseId: string;
}, {
    attemptId: string;
    activityId: string;
    leaseId: string;
}>;
export declare const ActivityWaitingPayload: z.ZodObject<{
    activityId: z.ZodString;
    reason: z.ZodString;
}, "strip", z.ZodTypeAny, {
    reason: string;
    activityId: string;
}, {
    reason: string;
    activityId: string;
}>;
export declare const ActivityTimedOutPayload: z.ZodObject<{
    activityId: z.ZodString;
    attemptId: z.ZodString;
    runningMs: z.ZodNumber;
    reason: z.ZodLiteral<"LeaseExpired">;
    errorClass: z.ZodLiteral<"retryable">;
}, "strip", z.ZodTypeAny, {
    reason: "LeaseExpired";
    attemptId: string;
    errorClass: "retryable";
    activityId: string;
    runningMs: number;
}, {
    reason: "LeaseExpired";
    attemptId: string;
    errorClass: "retryable";
    activityId: string;
    runningMs: number;
}>;
export declare const LoopStartedPayload: z.ZodObject<{
    loopId: z.ZodString;
    maxIterations: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
    loopId: string;
    maxIterations: number;
}, {
    loopId: string;
    maxIterations: number;
}>;
export declare const LoopIterationStartedPayload: z.ZodObject<{
    loopId: z.ZodString;
    iteration: z.ZodNumber;
    prevResolution: z.ZodEnum<["initial", "rejected"]>;
}, "strip", z.ZodTypeAny, {
    loopId: string;
    iteration: number;
    prevResolution: "rejected" | "initial";
}, {
    loopId: string;
    iteration: number;
    prevResolution: "rejected" | "initial";
}>;
export declare const LoopIterationFinishedPayload: z.ZodObject<{
    loopId: z.ZodString;
    iteration: z.ZodNumber;
    resolution: z.ZodEnum<["approved", "rejected"]>;
    decisionActivityId: z.ZodString;
    waitResolvedEventId: z.ZodString;
    by: z.ZodString;
    comment: z.ZodOptional<z.ZodString>;
    timedOut: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
    loopId: string;
    iteration: number;
    resolution: "approved" | "rejected";
    decisionActivityId: string;
    waitResolvedEventId: string;
    by: string;
    timedOut?: boolean | undefined;
    comment?: string | undefined;
}, {
    loopId: string;
    iteration: number;
    resolution: "approved" | "rejected";
    decisionActivityId: string;
    waitResolvedEventId: string;
    by: string;
    timedOut?: boolean | undefined;
    comment?: string | undefined;
}>;
export declare const LoopFinishedPayload: z.ZodObject<{
    loopId: z.ZodString;
    finalIteration: z.ZodNumber;
    resolution: z.ZodEnum<["approved", "max-iterations-exceeded", "body-failed", "cancelled", "timeout"]>;
    outputRef: z.ZodOptional<z.ZodObject<{
        outputHash: z.ZodString;
        outputPath: z.ZodOptional<z.ZodString>;
        outputBytes: z.ZodNumber;
        outputSchemaVersion: z.ZodNumber;
        contentType: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        outputHash: string;
        outputBytes: number;
        outputSchemaVersion: number;
        outputPath?: string | undefined;
        contentType?: string | undefined;
    }, {
        outputHash: string;
        outputBytes: number;
        outputSchemaVersion: number;
        outputPath?: string | undefined;
        contentType?: string | undefined;
    }>>;
    errorCode: z.ZodOptional<z.ZodEnum<["LeaseExpired", "WorkerCrashed", "NetworkError", "ProviderRateLimited", "IdempotencyInputMismatch", "IdempotencyConflict", "InputValidationFailed", "InputBindingFailed", "OutputSchemaViolation", "WaitDeadlineExceeded", "TtlExpired", "UnknownProviderError", "InputUnrecoverable", "CorruptLog", "LoopMaxIterationsExceeded", "LoopBodyFailed"]>>;
    errorClass: z.ZodOptional<z.ZodEnum<["retryable", "fatal", "userFault", "manual"]>>;
}, "strip", z.ZodTypeAny, {
    loopId: string;
    resolution: "timeout" | "approved" | "max-iterations-exceeded" | "body-failed" | "cancelled";
    finalIteration: number;
    errorCode?: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed" | undefined;
    errorClass?: "manual" | "retryable" | "fatal" | "userFault" | undefined;
    outputRef?: {
        outputHash: string;
        outputBytes: number;
        outputSchemaVersion: number;
        outputPath?: string | undefined;
        contentType?: string | undefined;
    } | undefined;
}, {
    loopId: string;
    resolution: "timeout" | "approved" | "max-iterations-exceeded" | "body-failed" | "cancelled";
    finalIteration: number;
    errorCode?: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed" | undefined;
    errorClass?: "manual" | "retryable" | "fatal" | "userFault" | undefined;
    outputRef?: {
        outputHash: string;
        outputBytes: number;
        outputSchemaVersion: number;
        outputPath?: string | undefined;
        contentType?: string | undefined;
    } | undefined;
}>;
export declare const ConditionEvaluatedPayload: z.ZodObject<{
    nodeId: z.ZodString;
    conditionExpr: z.ZodString;
    resultTrue: z.ZodBoolean;
    evaluatedInputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, "strip", z.ZodTypeAny, {
    nodeId: string;
    conditionExpr: string;
    resultTrue: boolean;
    evaluatedInputs?: Record<string, unknown> | undefined;
}, {
    nodeId: string;
    conditionExpr: string;
    resultTrue: boolean;
    evaluatedInputs?: Record<string, unknown> | undefined;
}>;
export declare const LeaseSignedPayload: z.ZodObject<{
    activityId: z.ZodString;
    attemptId: z.ZodString;
    leaseId: z.ZodString;
    timeoutMs: z.ZodNumber;
    maxOutputBytes: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
    timeoutMs: number;
    attemptId: string;
    activityId: string;
    leaseId: string;
    maxOutputBytes: number;
}, {
    timeoutMs: number;
    attemptId: string;
    activityId: string;
    leaseId: string;
    maxOutputBytes: number;
}>;
export declare const AttemptCreatedPayload: z.ZodObject<{
    nodeId: z.ZodString;
    activityId: z.ZodString;
    attemptId: z.ZodString;
    attemptNumber: z.ZodNumber;
    inputRef: z.ZodObject<{
        outputHash: z.ZodString;
        outputPath: z.ZodOptional<z.ZodString>;
        outputBytes: z.ZodNumber;
        outputSchemaVersion: z.ZodNumber;
        contentType: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        outputHash: string;
        outputBytes: number;
        outputSchemaVersion: number;
        outputPath?: string | undefined;
        contentType?: string | undefined;
    }, {
        outputHash: string;
        outputBytes: number;
        outputSchemaVersion: number;
        outputPath?: string | undefined;
        contentType?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    nodeId: string;
    attemptId: string;
    activityId: string;
    inputRef: {
        outputHash: string;
        outputBytes: number;
        outputSchemaVersion: number;
        outputPath?: string | undefined;
        contentType?: string | undefined;
    };
    attemptNumber: number;
}, {
    nodeId: string;
    attemptId: string;
    activityId: string;
    inputRef: {
        outputHash: string;
        outputBytes: number;
        outputSchemaVersion: number;
        outputPath?: string | undefined;
        contentType?: string | undefined;
    };
    attemptNumber: number;
}>;
export declare const BackoffScheduledPayload: z.ZodObject<{
    nodeId: z.ZodString;
    lastAttemptId: z.ZodString;
    nextAttemptAt: z.ZodNumber;
    backoffPolicy: z.ZodObject<{
        kind: z.ZodEnum<["fixed", "exponential"]>;
        baseMs: z.ZodNumber;
        factor: z.ZodOptional<z.ZodNumber>;
        jitter: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        kind: "fixed" | "exponential";
        baseMs: number;
        factor?: number | undefined;
        jitter?: boolean | undefined;
    }, {
        kind: "fixed" | "exponential";
        baseMs: number;
        factor?: number | undefined;
        jitter?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    nodeId: string;
    lastAttemptId: string;
    nextAttemptAt: number;
    backoffPolicy: {
        kind: "fixed" | "exponential";
        baseMs: number;
        factor?: number | undefined;
        jitter?: boolean | undefined;
    };
}, {
    nodeId: string;
    lastAttemptId: string;
    nextAttemptAt: number;
    backoffPolicy: {
        kind: "fixed" | "exponential";
        baseMs: number;
        factor?: number | undefined;
        jitter?: boolean | undefined;
    };
}>;
export declare const BackoffElapsedPayload: z.ZodObject<{
    nodeId: z.ZodString;
    scheduledAttemptId: z.ZodString;
}, "strip", z.ZodTypeAny, {
    nodeId: string;
    scheduledAttemptId: string;
}, {
    nodeId: string;
    scheduledAttemptId: string;
}>;
export declare const EffectAttemptedPayload: z.ZodObject<{
    activityId: z.ZodString;
    attemptId: z.ZodString;
    idempotencyKey: z.ZodString;
    inputHash: z.ZodString;
    idempotencyTtlMs: z.ZodNumber;
    provider: z.ZodString;
}, "strip", z.ZodTypeAny, {
    attemptId: string;
    activityId: string;
    idempotencyKey: string;
    inputHash: string;
    idempotencyTtlMs: number;
    provider: string;
}, {
    attemptId: string;
    activityId: string;
    idempotencyKey: string;
    inputHash: string;
    idempotencyTtlMs: number;
    provider: string;
}>;
export declare const ActivitySucceededPayload: z.ZodObject<{
    activityId: z.ZodString;
    attemptId: z.ZodString;
    outputRef: z.ZodObject<{
        outputHash: z.ZodString;
        outputPath: z.ZodOptional<z.ZodString>;
        outputBytes: z.ZodNumber;
        outputSchemaVersion: z.ZodNumber;
        contentType: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        outputHash: string;
        outputBytes: number;
        outputSchemaVersion: number;
        outputPath?: string | undefined;
        contentType?: string | undefined;
    }, {
        outputHash: string;
        outputBytes: number;
        outputSchemaVersion: number;
        outputPath?: string | undefined;
        contentType?: string | undefined;
    }>;
    externalRefs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, "strip", z.ZodTypeAny, {
    attemptId: string;
    activityId: string;
    outputRef: {
        outputHash: string;
        outputBytes: number;
        outputSchemaVersion: number;
        outputPath?: string | undefined;
        contentType?: string | undefined;
    };
    externalRefs?: Record<string, unknown> | undefined;
}, {
    attemptId: string;
    activityId: string;
    outputRef: {
        outputHash: string;
        outputBytes: number;
        outputSchemaVersion: number;
        outputPath?: string | undefined;
        contentType?: string | undefined;
    };
    externalRefs?: Record<string, unknown> | undefined;
}>;
export declare const ActivityFailedPayload: z.ZodObject<{
    activityId: z.ZodString;
    attemptId: z.ZodString;
    error: z.ZodObject<{
        errorCode: z.ZodEnum<["LeaseExpired", "WorkerCrashed", "NetworkError", "ProviderRateLimited", "IdempotencyInputMismatch", "IdempotencyConflict", "InputValidationFailed", "InputBindingFailed", "OutputSchemaViolation", "WaitDeadlineExceeded", "TtlExpired", "UnknownProviderError", "InputUnrecoverable", "CorruptLog", "LoopMaxIterationsExceeded", "LoopBodyFailed"]>;
        errorClass: z.ZodEnum<["retryable", "fatal", "userFault", "manual"]>;
        errorMessage: z.ZodString;
        stackRef: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed";
        errorClass: "manual" | "retryable" | "fatal" | "userFault";
        errorMessage: string;
        stackRef?: string | undefined;
    }, {
        errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed";
        errorClass: "manual" | "retryable" | "fatal" | "userFault";
        errorMessage: string;
        stackRef?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    error: {
        errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed";
        errorClass: "manual" | "retryable" | "fatal" | "userFault";
        errorMessage: string;
        stackRef?: string | undefined;
    };
    attemptId: string;
    activityId: string;
}, {
    error: {
        errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed";
        errorClass: "manual" | "retryable" | "fatal" | "userFault";
        errorMessage: string;
        stackRef?: string | undefined;
    };
    attemptId: string;
    activityId: string;
}>;
/**
 * Spec §6 open question #7 resolved at Step 8: `onTimeout` is part of
 * the wait creation payload, not external node IR.  Recording it on the
 * event lets resume materialize the right terminal for a dangling
 * `waitDeadlineExceeded` without consulting external workflow state.
 * Default is `fail` at the consumer (matches spec default behavior).
 */
export declare const WaitOnTimeoutEnum: z.ZodEnum<["fail", "success"]>;
export declare const WaitCreatedPayload: z.ZodObject<{
    activityId: z.ZodString;
    nodeId: z.ZodString;
    waitKind: z.ZodEnum<["human-gate", "time", "condition"]>;
    deadlineAt: z.ZodOptional<z.ZodNumber>;
    prompt: z.ZodOptional<z.ZodString>;
    promptRef: z.ZodOptional<z.ZodObject<{
        outputHash: z.ZodString;
        outputPath: z.ZodOptional<z.ZodString>;
        outputBytes: z.ZodNumber;
        outputSchemaVersion: z.ZodNumber;
        contentType: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        outputHash: string;
        outputBytes: number;
        outputSchemaVersion: number;
        outputPath?: string | undefined;
        contentType?: string | undefined;
    }, {
        outputHash: string;
        outputBytes: number;
        outputSchemaVersion: number;
        outputPath?: string | undefined;
        contentType?: string | undefined;
    }>>;
    promptPreview: z.ZodOptional<z.ZodString>;
    approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    onTimeout: z.ZodOptional<z.ZodEnum<["fail", "success"]>>;
}, "strip", z.ZodTypeAny, {
    nodeId: string;
    activityId: string;
    waitKind: "time" | "human-gate" | "condition";
    prompt?: string | undefined;
    deadlineAt?: number | undefined;
    promptRef?: {
        outputHash: string;
        outputBytes: number;
        outputSchemaVersion: number;
        outputPath?: string | undefined;
        contentType?: string | undefined;
    } | undefined;
    promptPreview?: string | undefined;
    approvers?: string[] | undefined;
    onTimeout?: "fail" | "success" | undefined;
}, {
    nodeId: string;
    activityId: string;
    waitKind: "time" | "human-gate" | "condition";
    prompt?: string | undefined;
    deadlineAt?: number | undefined;
    promptRef?: {
        outputHash: string;
        outputBytes: number;
        outputSchemaVersion: number;
        outputPath?: string | undefined;
        contentType?: string | undefined;
    } | undefined;
    promptPreview?: string | undefined;
    approvers?: string[] | undefined;
    onTimeout?: "fail" | "success" | undefined;
}>;
export declare const WaitResolvedPayload: z.ZodObject<{
    activityId: z.ZodString;
    resolution: z.ZodEnum<["approved", "rejected", "external"]>;
    by: z.ZodString;
    comment: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    activityId: string;
    resolution: "approved" | "rejected" | "external";
    by: string;
    comment?: string | undefined;
}, {
    activityId: string;
    resolution: "approved" | "rejected" | "external";
    by: string;
    comment?: string | undefined;
}>;
export declare const WaitDeadlineExceededPayload: z.ZodObject<{
    activityId: z.ZodString;
    deadlineAt: z.ZodNumber;
    exceededAtMs: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
    activityId: string;
    deadlineAt: number;
    exceededAtMs: number;
}, {
    activityId: string;
    deadlineAt: number;
    exceededAtMs: number;
}>;
export declare const CancelRequestedPayload: z.ZodObject<{
    target: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
        kind: z.ZodLiteral<"run">;
        runId: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        kind: "run";
        runId: string;
    }, {
        kind: "run";
        runId: string;
    }>, z.ZodObject<{
        kind: z.ZodLiteral<"node">;
        nodeId: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        kind: "node";
        nodeId: string;
    }, {
        kind: "node";
        nodeId: string;
    }>, z.ZodObject<{
        kind: z.ZodLiteral<"activity">;
        activityId: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        kind: "activity";
        activityId: string;
    }, {
        kind: "activity";
        activityId: string;
    }>]>;
    reason: z.ZodString;
    by: z.ZodString;
}, "strip", z.ZodTypeAny, {
    reason: string;
    by: string;
    target: {
        kind: "run";
        runId: string;
    } | {
        kind: "node";
        nodeId: string;
    } | {
        kind: "activity";
        activityId: string;
    };
}, {
    reason: string;
    by: string;
    target: {
        kind: "run";
        runId: string;
    } | {
        kind: "node";
        nodeId: string;
    } | {
        kind: "activity";
        activityId: string;
    };
}>;
export declare const CancelDeliveredPayload: z.ZodObject<{
    target: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
        kind: z.ZodLiteral<"run">;
        runId: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        kind: "run";
        runId: string;
    }, {
        kind: "run";
        runId: string;
    }>, z.ZodObject<{
        kind: z.ZodLiteral<"node">;
        nodeId: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        kind: "node";
        nodeId: string;
    }, {
        kind: "node";
        nodeId: string;
    }>, z.ZodObject<{
        kind: z.ZodLiteral<"activity">;
        activityId: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        kind: "activity";
        activityId: string;
    }, {
        kind: "activity";
        activityId: string;
    }>]>;
    activityId: z.ZodString;
}, "strip", z.ZodTypeAny, {
    activityId: string;
    target: {
        kind: "run";
        runId: string;
    } | {
        kind: "node";
        nodeId: string;
    } | {
        kind: "activity";
        activityId: string;
    };
}, {
    activityId: string;
    target: {
        kind: "run";
        runId: string;
    } | {
        kind: "node";
        nodeId: string;
    } | {
        kind: "activity";
        activityId: string;
    };
}>;
export declare const ActivityCanceledPayload: z.ZodObject<{
    activityId: z.ZodString;
    attemptId: z.ZodString;
    cancelOriginEventId: z.ZodString;
}, "strip", z.ZodTypeAny, {
    attemptId: string;
    activityId: string;
    cancelOriginEventId: string;
}, {
    attemptId: string;
    activityId: string;
    cancelOriginEventId: string;
}>;
export declare const WorkerLostPayload: z.ZodObject<{
    workerId: z.ZodString;
    lostActivityIds: z.ZodArray<z.ZodString, "many">;
}, "strip", z.ZodTypeAny, {
    workerId: string;
    lostActivityIds: string[];
}, {
    workerId: string;
    lostActivityIds: string[];
}>;
export declare const ResumeStartedPayload: z.ZodObject<{
    daemonId: z.ZodString;
    lastSeenEventId: z.ZodString;
}, "strip", z.ZodTypeAny, {
    daemonId: string;
    lastSeenEventId: string;
}, {
    daemonId: string;
    lastSeenEventId: string;
}>;
/**
 * `reconcileResult.evidence` v0 convention (spec §6 Q4 — standardization
 * deferred to v0.x+, but the per-provider shape used by the v0 runtime
 * is fixed here so dashboards and resume recovery can parse it without
 * provider-specific knowledge).
 *
 * Common keys (any provider, any decision):
 *   - `externalRefs`?: Record<string, unknown>
 *       Provider-returned ref (messageId / taskId / ...) — required
 *       for `completedByIdempotentSubmit` decisions, recovery uses it
 *       to materialize `activitySucceeded.payload.externalRefs`.
 *   - `errorCode`?: string
 *       Recorded errorCode for `manual` decisions — recovery uses it
 *       to materialize `activityFailed.payload.error.errorCode`.
 *
 * Manual-only keys (decision='manual'):
 *   - `reason`?: 'ttl_expired' | 'no_reconciler' | 'no_capability'
 *                | 'input_unrecoverable' | 'missing_external_refs'
 *   - `attemptedAtMs`, `nowMs`, `idempotencyTtlMs`?: number
 *       Populated when reason='ttl_expired' for forensics.
 *   - `originalDecision`?: ReconcileDecision
 *       When recovery escalates from a corrupt prior decision (e.g.
 *       replayed/manual without terminal), the original decision the
 *       prior reconcile wrote is preserved here.
 *   - `corruptReason`?: 'missing_external_refs'
 *   - `reconcileEventId`?: string
 *       eventId of the originating reconcileResult (recovery cross-ref).
 *
 * Cancel-coupled keys (Step 9 round 2 — when reconcile fires under
 * cancel, any decision):
 *   - `cancelOriginEventId`?: string  — eventId of the originating
 *     `cancelRequested` so dashboard / forensics can correlate the
 *     cancel × reconcile pair structurally instead of parsing
 *     `activityFailed.errorMessage`.
 *   - `cancelReason`?: string         — `cancelRequested.payload.reason`
 *   - `cancelRequestedBy`?: string    — `cancelRequested.payload.by`
 *
 * These keys are written ONLY by `recoverCancelWithReconcile`'s fresh
 * reconcile cycle; they are absent on regular reconciles and on F1
 * recovery (the prior reconcileResult was written before cancel
 * landed and is immutable).
 *
 * `freshRetry` evidence is provider-specific; v0 puts whatever the
 * reconciler returned from `readOnlyLookup({ found: false })` here.
 *
 * Per-provider conventions (v0):
 *   - `botmux-schedule` readOnlyLookup: `{ source: 'getTask',
 *     returned: 'task' | 'undefined' }`
 *   - `feishu-im` idempotentSubmit: `{ source: 'create-or-reply' }` or
 *     similar; provider just returns externalRefs on success.
 *
 * Future work: lock these per-provider shapes via discriminated
 * schemas keyed on `(decision, capability, provider)`.  Tracked in
 * spec §6 Q4.
 */
export declare const ReconcileResultPayload: z.ZodObject<{
    activityId: z.ZodString;
    idempotencyKey: z.ZodString;
    capability: z.ZodEnum<["readOnlyLookup", "idempotentSubmit", "none"]>;
    decision: z.ZodEnum<["replayed", "completedByIdempotentSubmit", "manual", "freshRetry"]>;
    evidence: z.ZodRecord<z.ZodString, z.ZodUnknown>;
}, "strip", z.ZodTypeAny, {
    capability: "none" | "readOnlyLookup" | "idempotentSubmit";
    decision: "manual" | "replayed" | "completedByIdempotentSubmit" | "freshRetry";
    activityId: string;
    idempotencyKey: string;
    evidence: Record<string, unknown>;
}, {
    capability: "none" | "readOnlyLookup" | "idempotentSubmit";
    decision: "manual" | "replayed" | "completedByIdempotentSubmit" | "freshRetry";
    activityId: string;
    idempotencyKey: string;
    evidence: Record<string, unknown>;
}>;
//# sourceMappingURL=payloads.d.ts.map