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; export declare const ErrorClassEnum: z.ZodEnum<["retryable", "fatal", "userFault", "manual"]>; export type ErrorClass = z.infer; 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; 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; }, "strip", z.ZodTypeAny, { errorCode: "IdempotencyConflict" | "InputValidationFailed" | "UnknownProviderError" | "ProviderRateLimited" | "NetworkError" | "LeaseExpired" | "WorkerCrashed" | "IdempotencyInputMismatch" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed"; errorClass: "retryable" | "fatal" | "userFault" | "manual"; errorMessage: string; stackRef?: string | undefined; }, { errorCode: "IdempotencyConflict" | "InputValidationFailed" | "UnknownProviderError" | "ProviderRateLimited" | "NetworkError" | "LeaseExpired" | "WorkerCrashed" | "IdempotencyInputMismatch" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed"; errorClass: "retryable" | "fatal" | "userFault" | "manual"; errorMessage: string; stackRef?: string | undefined; }>; export type ErrorPayload = z.infer; export declare const OutputRefSchema: z.ZodObject<{ outputHash: z.ZodString; outputPath: z.ZodOptional; outputBytes: z.ZodNumber; outputSchemaVersion: z.ZodNumber; contentType: z.ZodOptional; }, "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; 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; jitter: z.ZodOptional; }, "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; cliId: z.ZodOptional; displayName: z.ZodOptional; workingDir: z.ZodOptional; cliPathOverride: z.ZodOptional; sandbox: z.ZodOptional; sandboxPaths: z.ZodOptional>; readOnly: z.ZodOptional>; deny: z.ZodOptional>; }, "strip", z.ZodTypeAny, { deny?: string[] | undefined; readOnly?: string[] | undefined; readWrite?: string[] | undefined; }, { deny?: string[] | undefined; readOnly?: string[] | undefined; readWrite?: string[] | undefined; }>>; sandboxHidePaths: z.ZodOptional>; sandboxReadonlyPaths: z.ZodOptional>; sandboxNetwork: z.ZodOptional; }, "strip", z.ZodTypeAny, { cliPathOverride?: string | undefined; workingDir?: string | undefined; displayName?: string | undefined; larkAppId?: string | undefined; cliId?: string | undefined; sandbox?: boolean | undefined; sandboxPaths?: { deny?: string[] | undefined; readOnly?: string[] | undefined; readWrite?: string[] | undefined; } | undefined; sandboxHidePaths?: string[] | undefined; sandboxReadonlyPaths?: string[] | undefined; sandboxNetwork?: boolean | undefined; }, { cliPathOverride?: string | undefined; workingDir?: string | undefined; displayName?: string | undefined; larkAppId?: string | undefined; cliId?: string | undefined; sandbox?: boolean | undefined; sandboxPaths?: { deny?: string[] | undefined; readOnly?: string[] | undefined; readWrite?: string[] | undefined; } | undefined; sandboxHidePaths?: string[] | undefined; sandboxReadonlyPaths?: string[] | undefined; sandboxNetwork?: boolean | undefined; }>; export type BotSnapshot = z.infer; export declare const RunCreatedPayload: z.ZodObject<{ workflowId: z.ZodString; revisionId: z.ZodString; inputRef: z.ZodObject<{ outputHash: z.ZodString; outputPath: z.ZodOptional; outputBytes: z.ZodNumber; outputSchemaVersion: z.ZodNumber; contentType: z.ZodOptional; }, "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; cliId: z.ZodOptional; displayName: z.ZodOptional; workingDir: z.ZodOptional; cliPathOverride: z.ZodOptional; sandbox: z.ZodOptional; sandboxPaths: z.ZodOptional>; readOnly: z.ZodOptional>; deny: z.ZodOptional>; }, "strip", z.ZodTypeAny, { deny?: string[] | undefined; readOnly?: string[] | undefined; readWrite?: string[] | undefined; }, { deny?: string[] | undefined; readOnly?: string[] | undefined; readWrite?: string[] | undefined; }>>; sandboxHidePaths: z.ZodOptional>; sandboxReadonlyPaths: z.ZodOptional>; sandboxNetwork: z.ZodOptional; }, "strip", z.ZodTypeAny, { cliPathOverride?: string | undefined; workingDir?: string | undefined; displayName?: string | undefined; larkAppId?: string | undefined; cliId?: string | undefined; sandbox?: boolean | undefined; sandboxPaths?: { deny?: string[] | undefined; readOnly?: string[] | undefined; readWrite?: string[] | undefined; } | undefined; sandboxHidePaths?: string[] | undefined; sandboxReadonlyPaths?: string[] | undefined; sandboxNetwork?: boolean | undefined; }, { cliPathOverride?: string | undefined; workingDir?: string | undefined; displayName?: string | undefined; larkAppId?: string | undefined; cliId?: string | undefined; sandbox?: boolean | undefined; sandboxPaths?: { deny?: string[] | undefined; readOnly?: string[] | undefined; readWrite?: string[] | undefined; } | undefined; sandboxHidePaths?: string[] | undefined; sandboxReadonlyPaths?: string[] | undefined; sandboxNetwork?: boolean | 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 | undefined; }, { workflowId: string; revisionId: string; inputRef: { outputHash: string; outputBytes: number; outputSchemaVersion: number; outputPath?: string | undefined; contentType?: string | undefined; }; initiator: string; botSnapshots?: Record | 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; outputBytes: z.ZodNumber; outputSchemaVersion: z.ZodNumber; contentType: z.ZodOptional; }, "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; }, "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: "retryable" | "fatal" | "userFault" | "manual"; lastActivityId: string; }, { nodeId: string; errorClass: "retryable" | "fatal" | "userFault" | "manual"; 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; leaseId: string; activityId: string; }, { attemptId: string; leaseId: string; activityId: 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, { maxIterations: number; loopId: string; }, { maxIterations: number; loopId: string; }>; 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: "initial" | "rejected"; }, { loopId: string; iteration: number; prevResolution: "initial" | "rejected"; }>; 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; timedOut: z.ZodOptional; }, "strip", z.ZodTypeAny, { loopId: string; iteration: number; resolution: "approved" | "rejected"; by: string; decisionActivityId: string; waitResolvedEventId: string; comment?: string | undefined; timedOut?: boolean | undefined; }, { loopId: string; iteration: number; resolution: "approved" | "rejected"; by: string; decisionActivityId: string; waitResolvedEventId: string; comment?: string | undefined; timedOut?: boolean | 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; outputBytes: z.ZodNumber; outputSchemaVersion: z.ZodNumber; contentType: z.ZodOptional; }, "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>; errorClass: z.ZodOptional>; }, "strip", z.ZodTypeAny, { loopId: string; resolution: "cancelled" | "timeout" | "approved" | "max-iterations-exceeded" | "body-failed"; finalIteration: number; errorCode?: "IdempotencyConflict" | "InputValidationFailed" | "UnknownProviderError" | "ProviderRateLimited" | "NetworkError" | "LeaseExpired" | "WorkerCrashed" | "IdempotencyInputMismatch" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed" | undefined; errorClass?: "retryable" | "fatal" | "userFault" | "manual" | undefined; outputRef?: { outputHash: string; outputBytes: number; outputSchemaVersion: number; outputPath?: string | undefined; contentType?: string | undefined; } | undefined; }, { loopId: string; resolution: "cancelled" | "timeout" | "approved" | "max-iterations-exceeded" | "body-failed"; finalIteration: number; errorCode?: "IdempotencyConflict" | "InputValidationFailed" | "UnknownProviderError" | "ProviderRateLimited" | "NetworkError" | "LeaseExpired" | "WorkerCrashed" | "IdempotencyInputMismatch" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed" | undefined; errorClass?: "retryable" | "fatal" | "userFault" | "manual" | 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>; }, "strip", z.ZodTypeAny, { nodeId: string; conditionExpr: string; resultTrue: boolean; evaluatedInputs?: Record | undefined; }, { nodeId: string; conditionExpr: string; resultTrue: boolean; evaluatedInputs?: Record | 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; leaseId: string; activityId: string; maxOutputBytes: number; }, { timeoutMs: number; attemptId: string; leaseId: string; activityId: 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; outputBytes: z.ZodNumber; outputSchemaVersion: z.ZodNumber; contentType: z.ZodOptional; }, "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; inputRef: { outputHash: string; outputBytes: number; outputSchemaVersion: number; outputPath?: string | undefined; contentType?: string | undefined; }; activityId: string; attemptNumber: number; }, { nodeId: string; attemptId: string; inputRef: { outputHash: string; outputBytes: number; outputSchemaVersion: number; outputPath?: string | undefined; contentType?: string | undefined; }; activityId: string; 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; jitter: z.ZodOptional; }, "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, { provider: string; attemptId: string; inputHash: string; idempotencyKey: string; idempotencyTtlMs: number; activityId: string; }, { provider: string; attemptId: string; inputHash: string; idempotencyKey: string; idempotencyTtlMs: number; activityId: string; }>; export declare const ActivitySucceededPayload: z.ZodObject<{ activityId: z.ZodString; attemptId: z.ZodString; outputRef: z.ZodObject<{ outputHash: z.ZodString; outputPath: z.ZodOptional; outputBytes: z.ZodNumber; outputSchemaVersion: z.ZodNumber; contentType: z.ZodOptional; }, "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>; }, "strip", z.ZodTypeAny, { attemptId: string; activityId: string; outputRef: { outputHash: string; outputBytes: number; outputSchemaVersion: number; outputPath?: string | undefined; contentType?: string | undefined; }; externalRefs?: Record | undefined; }, { attemptId: string; activityId: string; outputRef: { outputHash: string; outputBytes: number; outputSchemaVersion: number; outputPath?: string | undefined; contentType?: string | undefined; }; externalRefs?: Record | 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; }, "strip", z.ZodTypeAny, { errorCode: "IdempotencyConflict" | "InputValidationFailed" | "UnknownProviderError" | "ProviderRateLimited" | "NetworkError" | "LeaseExpired" | "WorkerCrashed" | "IdempotencyInputMismatch" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed"; errorClass: "retryable" | "fatal" | "userFault" | "manual"; errorMessage: string; stackRef?: string | undefined; }, { errorCode: "IdempotencyConflict" | "InputValidationFailed" | "UnknownProviderError" | "ProviderRateLimited" | "NetworkError" | "LeaseExpired" | "WorkerCrashed" | "IdempotencyInputMismatch" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed"; errorClass: "retryable" | "fatal" | "userFault" | "manual"; errorMessage: string; stackRef?: string | undefined; }>; }, "strip", z.ZodTypeAny, { error: { errorCode: "IdempotencyConflict" | "InputValidationFailed" | "UnknownProviderError" | "ProviderRateLimited" | "NetworkError" | "LeaseExpired" | "WorkerCrashed" | "IdempotencyInputMismatch" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed"; errorClass: "retryable" | "fatal" | "userFault" | "manual"; errorMessage: string; stackRef?: string | undefined; }; attemptId: string; activityId: string; }, { error: { errorCode: "IdempotencyConflict" | "InputValidationFailed" | "UnknownProviderError" | "ProviderRateLimited" | "NetworkError" | "LeaseExpired" | "WorkerCrashed" | "IdempotencyInputMismatch" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed"; errorClass: "retryable" | "fatal" | "userFault" | "manual"; 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; prompt: z.ZodOptional; promptRef: z.ZodOptional; outputBytes: z.ZodNumber; outputSchemaVersion: z.ZodNumber; contentType: z.ZodOptional; }, "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; approvers: z.ZodOptional>; onTimeout: z.ZodOptional>; }, "strip", z.ZodTypeAny, { nodeId: string; activityId: string; waitKind: "time" | "condition" | "human-gate"; prompt?: string | undefined; approvers?: string[] | undefined; deadlineAt?: number | undefined; promptRef?: { outputHash: string; outputBytes: number; outputSchemaVersion: number; outputPath?: string | undefined; contentType?: string | undefined; } | undefined; promptPreview?: string | undefined; onTimeout?: "fail" | "success" | undefined; }, { nodeId: string; activityId: string; waitKind: "time" | "condition" | "human-gate"; prompt?: string | undefined; approvers?: string[] | undefined; deadlineAt?: number | undefined; promptRef?: { outputHash: string; outputBytes: number; outputSchemaVersion: number; outputPath?: string | undefined; contentType?: string | undefined; } | undefined; promptPreview?: 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; }, "strip", z.ZodTypeAny, { resolution: "approved" | "rejected" | "external"; by: string; activityId: string; comment?: string | undefined; }, { resolution: "approved" | "rejected" | "external"; by: string; activityId: string; comment?: string | undefined; }>; export declare const WaitDeadlineExceededPayload: z.ZodObject<{ activityId: z.ZodString; deadlineAt: z.ZodNumber; exceededAtMs: z.ZodNumber; }, "strip", z.ZodTypeAny, { deadlineAt: number; activityId: string; exceededAtMs: number; }, { deadlineAt: number; activityId: string; 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, { 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; }; reason: string; by: 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, { 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; }; 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; }, "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 * 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; }, "strip", z.ZodTypeAny, { capability: "none" | "idempotentSubmit" | "readOnlyLookup"; decision: "manual" | "replayed" | "completedByIdempotentSubmit" | "freshRetry"; evidence: Record; idempotencyKey: string; activityId: string; }, { capability: "none" | "idempotentSubmit" | "readOnlyLookup"; decision: "manual" | "replayed" | "completedByIdempotentSubmit" | "freshRetry"; evidence: Record; idempotencyKey: string; activityId: string; }>; //# sourceMappingURL=payloads.d.ts.map