import { z } from 'zod'; import { Sha256Schema } from './payloads.js'; export declare const PayloadRefSchema: z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>; export type PayloadRef = z.infer; export declare function isPayloadRef(p: unknown): p is PayloadRef; export declare const EventIdSchema: z.ZodString; export declare const RunCreatedEventSchema: z.ZodObject<{ type: z.ZodLiteral<"runCreated">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "runCreated"; payload: { workflowId: string; revisionId: string; inputRef: { outputHash: string; outputBytes: number; outputSchemaVersion: number; outputPath?: string | undefined; contentType?: string | undefined; }; initiator: string; botSnapshots?: Record | undefined; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "runCreated"; payload: { workflowId: string; revisionId: string; inputRef: { outputHash: string; outputBytes: number; outputSchemaVersion: number; outputPath?: string | undefined; contentType?: string | undefined; }; initiator: string; botSnapshots?: Record | undefined; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const RunStartedEventSchema: z.ZodObject<{ type: z.ZodLiteral<"runStarted">; payload: z.ZodUnion<[z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "runStarted"; payload: {} | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "runStarted"; payload: {} | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const RunSucceededEventSchema: z.ZodObject<{ type: z.ZodLiteral<"runSucceeded">; payload: z.ZodUnion<[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; }; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "runSucceeded"; payload: { outputRef: { outputHash: string; outputBytes: number; outputSchemaVersion: number; outputPath?: string | undefined; contentType?: string | undefined; }; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "runSucceeded"; payload: { outputRef: { outputHash: string; outputBytes: number; outputSchemaVersion: number; outputPath?: string | undefined; contentType?: string | undefined; }; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const RunFailedEventSchema: z.ZodObject<{ type: z.ZodLiteral<"runFailed">; payload: z.ZodUnion<[z.ZodObject<{ failedNodeId: z.ZodString; rootCauseEventId: z.ZodString; }, "strip", z.ZodTypeAny, { failedNodeId: string; rootCauseEventId: string; }, { failedNodeId: string; rootCauseEventId: string; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "runFailed"; payload: { failedNodeId: string; rootCauseEventId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "runFailed"; payload: { failedNodeId: string; rootCauseEventId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const RunCanceledEventSchema: z.ZodObject<{ type: z.ZodLiteral<"runCanceled">; payload: z.ZodUnion<[z.ZodObject<{ cancelOriginEventId: z.ZodString; }, "strip", z.ZodTypeAny, { cancelOriginEventId: string; }, { cancelOriginEventId: string; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "runCanceled"; payload: { cancelOriginEventId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "runCanceled"; payload: { cancelOriginEventId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const NodeWaitingEventSchema: z.ZodObject<{ type: z.ZodLiteral<"nodeWaiting">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "nodeWaiting"; payload: { nodeId: string; waitReason: string; deadlineAt?: number | undefined; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "nodeWaiting"; payload: { nodeId: string; waitReason: string; deadlineAt?: number | undefined; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const NodeRetryingEventSchema: z.ZodObject<{ type: z.ZodLiteral<"nodeRetrying">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "nodeRetrying"; payload: { nodeId: string; lastAttemptId: string; nextBackoffMs: number; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "nodeRetrying"; payload: { nodeId: string; lastAttemptId: string; nextBackoffMs: number; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const NodeSucceededEventSchema: z.ZodObject<{ type: z.ZodLiteral<"nodeSucceeded">; payload: z.ZodUnion<[z.ZodObject<{ nodeId: z.ZodString; lastActivityId: z.ZodString; }, "strip", z.ZodTypeAny, { nodeId: string; lastActivityId: string; }, { nodeId: string; lastActivityId: string; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "nodeSucceeded"; payload: { nodeId: string; lastActivityId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "nodeSucceeded"; payload: { nodeId: string; lastActivityId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const NodeFailedEventSchema: z.ZodObject<{ type: z.ZodLiteral<"nodeFailed">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "nodeFailed"; payload: { nodeId: string; errorClass: "retryable" | "fatal" | "userFault" | "manual"; lastActivityId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "nodeFailed"; payload: { nodeId: string; errorClass: "retryable" | "fatal" | "userFault" | "manual"; lastActivityId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const NodeSkippedEventSchema: z.ZodObject<{ type: z.ZodLiteral<"nodeSkipped">; payload: z.ZodUnion<[z.ZodObject<{ nodeId: z.ZodString; conditionEventId: z.ZodString; }, "strip", z.ZodTypeAny, { nodeId: string; conditionEventId: string; }, { nodeId: string; conditionEventId: string; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "nodeSkipped"; payload: { nodeId: string; conditionEventId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "nodeSkipped"; payload: { nodeId: string; conditionEventId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const NodeCanceledEventSchema: z.ZodObject<{ type: z.ZodLiteral<"nodeCanceled">; payload: z.ZodUnion<[z.ZodObject<{ nodeId: z.ZodString; cancelOriginEventId: z.ZodString; }, "strip", z.ZodTypeAny, { nodeId: string; cancelOriginEventId: string; }, { nodeId: string; cancelOriginEventId: string; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "nodeCanceled"; payload: { nodeId: string; cancelOriginEventId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "nodeCanceled"; payload: { nodeId: string; cancelOriginEventId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const ActivityRunningEventSchema: z.ZodObject<{ type: z.ZodLiteral<"activityRunning">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "activityRunning"; payload: { attemptId: string; leaseId: string; activityId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "activityRunning"; payload: { attemptId: string; leaseId: string; activityId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const ActivityWaitingEventSchema: z.ZodObject<{ type: z.ZodLiteral<"activityWaiting">; payload: z.ZodUnion<[z.ZodObject<{ activityId: z.ZodString; reason: z.ZodString; }, "strip", z.ZodTypeAny, { reason: string; activityId: string; }, { reason: string; activityId: string; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "activityWaiting"; payload: { reason: string; activityId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "activityWaiting"; payload: { reason: string; activityId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const ActivityTimedOutEventSchema: z.ZodObject<{ type: z.ZodLiteral<"activityTimedOut">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "activityTimedOut"; payload: { reason: "LeaseExpired"; attemptId: string; errorClass: "retryable"; activityId: string; runningMs: number; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "activityTimedOut"; payload: { reason: "LeaseExpired"; attemptId: string; errorClass: "retryable"; activityId: string; runningMs: number; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const LoopStartedEventSchema: z.ZodObject<{ type: z.ZodLiteral<"loopStarted">; payload: z.ZodUnion<[z.ZodObject<{ loopId: z.ZodString; maxIterations: z.ZodNumber; }, "strip", z.ZodTypeAny, { maxIterations: number; loopId: string; }, { maxIterations: number; loopId: string; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "loopStarted"; payload: { maxIterations: number; loopId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "loopStarted"; payload: { maxIterations: number; loopId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const LoopIterationStartedEventSchema: z.ZodObject<{ type: z.ZodLiteral<"loopIterationStarted">; payload: z.ZodUnion<[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"; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "loopIterationStarted"; payload: { loopId: string; iteration: number; prevResolution: "initial" | "rejected"; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "loopIterationStarted"; payload: { loopId: string; iteration: number; prevResolution: "initial" | "rejected"; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const LoopIterationFinishedEventSchema: z.ZodObject<{ type: z.ZodLiteral<"loopIterationFinished">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "loopIterationFinished"; payload: { loopId: string; iteration: number; resolution: "approved" | "rejected"; by: string; decisionActivityId: string; waitResolvedEventId: string; comment?: string | undefined; timedOut?: boolean | undefined; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "loopIterationFinished"; payload: { loopId: string; iteration: number; resolution: "approved" | "rejected"; by: string; decisionActivityId: string; waitResolvedEventId: string; comment?: string | undefined; timedOut?: boolean | undefined; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const LoopFinishedEventSchema: z.ZodObject<{ type: z.ZodLiteral<"loopFinished">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "loopFinished"; payload: { 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; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "loopFinished"; payload: { 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; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const ConditionEvaluatedEventSchema: z.ZodObject<{ type: z.ZodLiteral<"conditionEvaluated">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "conditionEvaluated"; payload: { nodeId: string; conditionExpr: string; resultTrue: boolean; evaluatedInputs?: Record | undefined; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "conditionEvaluated"; payload: { nodeId: string; conditionExpr: string; resultTrue: boolean; evaluatedInputs?: Record | undefined; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const LeaseSignedEventSchema: z.ZodObject<{ type: z.ZodLiteral<"leaseSigned">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "leaseSigned"; payload: { timeoutMs: number; attemptId: string; leaseId: string; activityId: string; maxOutputBytes: number; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "leaseSigned"; payload: { timeoutMs: number; attemptId: string; leaseId: string; activityId: string; maxOutputBytes: number; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const AttemptCreatedEventSchema: z.ZodObject<{ type: z.ZodLiteral<"attemptCreated">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "attemptCreated"; payload: { nodeId: string; attemptId: string; inputRef: { outputHash: string; outputBytes: number; outputSchemaVersion: number; outputPath?: string | undefined; contentType?: string | undefined; }; activityId: string; attemptNumber: number; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "attemptCreated"; payload: { nodeId: string; attemptId: string; inputRef: { outputHash: string; outputBytes: number; outputSchemaVersion: number; outputPath?: string | undefined; contentType?: string | undefined; }; activityId: string; attemptNumber: number; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const BackoffScheduledEventSchema: z.ZodObject<{ type: z.ZodLiteral<"backoffScheduled">; payload: z.ZodUnion<[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; }; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "backoffScheduled"; payload: { nodeId: string; lastAttemptId: string; nextAttemptAt: number; backoffPolicy: { kind: "fixed" | "exponential"; baseMs: number; factor?: number | undefined; jitter?: boolean | undefined; }; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "backoffScheduled"; payload: { nodeId: string; lastAttemptId: string; nextAttemptAt: number; backoffPolicy: { kind: "fixed" | "exponential"; baseMs: number; factor?: number | undefined; jitter?: boolean | undefined; }; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const BackoffElapsedEventSchema: z.ZodObject<{ type: z.ZodLiteral<"backoffElapsed">; payload: z.ZodUnion<[z.ZodObject<{ nodeId: z.ZodString; scheduledAttemptId: z.ZodString; }, "strip", z.ZodTypeAny, { nodeId: string; scheduledAttemptId: string; }, { nodeId: string; scheduledAttemptId: string; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "backoffElapsed"; payload: { nodeId: string; scheduledAttemptId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "backoffElapsed"; payload: { nodeId: string; scheduledAttemptId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const EffectAttemptedEventSchema: z.ZodObject<{ type: z.ZodLiteral<"effectAttempted">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "effectAttempted"; payload: { provider: string; attemptId: string; inputHash: string; idempotencyKey: string; idempotencyTtlMs: number; activityId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "effectAttempted"; payload: { provider: string; attemptId: string; inputHash: string; idempotencyKey: string; idempotencyTtlMs: number; activityId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const ActivitySucceededEventSchema: z.ZodObject<{ type: z.ZodLiteral<"activitySucceeded">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "activitySucceeded"; payload: { attemptId: string; activityId: string; outputRef: { outputHash: string; outputBytes: number; outputSchemaVersion: number; outputPath?: string | undefined; contentType?: string | undefined; }; externalRefs?: Record | undefined; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "activitySucceeded"; payload: { attemptId: string; activityId: string; outputRef: { outputHash: string; outputBytes: number; outputSchemaVersion: number; outputPath?: string | undefined; contentType?: string | undefined; }; externalRefs?: Record | undefined; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const ActivityFailedEventSchema: z.ZodObject<{ type: z.ZodLiteral<"activityFailed">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "activityFailed"; payload: { 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; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "activityFailed"; payload: { 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; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const WaitCreatedEventSchema: z.ZodObject<{ type: z.ZodLiteral<"waitCreated">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "waitCreated"; payload: { 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; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "waitCreated"; payload: { 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; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const WaitResolvedEventSchema: z.ZodObject<{ type: z.ZodLiteral<"waitResolved">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "waitResolved"; payload: { resolution: "approved" | "rejected" | "external"; by: string; activityId: string; comment?: string | undefined; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "waitResolved"; payload: { resolution: "approved" | "rejected" | "external"; by: string; activityId: string; comment?: string | undefined; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const WaitDeadlineExceededEventSchema: z.ZodObject<{ type: z.ZodLiteral<"waitDeadlineExceeded">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "waitDeadlineExceeded"; payload: { deadlineAt: number; activityId: string; exceededAtMs: number; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "waitDeadlineExceeded"; payload: { deadlineAt: number; activityId: string; exceededAtMs: number; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const CancelRequestedEventSchema: z.ZodObject<{ type: z.ZodLiteral<"cancelRequested">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "cancelRequested"; payload: { target: { kind: "run"; runId: string; } | { kind: "node"; nodeId: string; } | { kind: "activity"; activityId: string; }; reason: string; by: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "cancelRequested"; payload: { target: { kind: "run"; runId: string; } | { kind: "node"; nodeId: string; } | { kind: "activity"; activityId: string; }; reason: string; by: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const CancelDeliveredEventSchema: z.ZodObject<{ type: z.ZodLiteral<"cancelDelivered">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "cancelDelivered"; payload: { target: { kind: "run"; runId: string; } | { kind: "node"; nodeId: string; } | { kind: "activity"; activityId: string; }; activityId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "cancelDelivered"; payload: { target: { kind: "run"; runId: string; } | { kind: "node"; nodeId: string; } | { kind: "activity"; activityId: string; }; activityId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const ActivityCanceledEventSchema: z.ZodObject<{ type: z.ZodLiteral<"activityCanceled">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "activityCanceled"; payload: { attemptId: string; activityId: string; cancelOriginEventId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "activityCanceled"; payload: { attemptId: string; activityId: string; cancelOriginEventId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const WorkerLostEventSchema: z.ZodObject<{ type: z.ZodLiteral<"workerLost">; payload: z.ZodUnion<[z.ZodObject<{ workerId: z.ZodString; lostActivityIds: z.ZodArray; }, "strip", z.ZodTypeAny, { workerId: string; lostActivityIds: string[]; }, { workerId: string; lostActivityIds: string[]; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "workerLost"; payload: { workerId: string; lostActivityIds: string[]; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "workerLost"; payload: { workerId: string; lostActivityIds: string[]; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const ResumeStartedEventSchema: z.ZodObject<{ type: z.ZodLiteral<"resumeStarted">; payload: z.ZodUnion<[z.ZodObject<{ daemonId: z.ZodString; lastSeenEventId: z.ZodString; }, "strip", z.ZodTypeAny, { daemonId: string; lastSeenEventId: string; }, { daemonId: string; lastSeenEventId: string; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "resumeStarted"; payload: { daemonId: string; lastSeenEventId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "resumeStarted"; payload: { daemonId: string; lastSeenEventId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; export declare const ReconcileResultEventSchema: z.ZodObject<{ type: z.ZodLiteral<"reconcileResult">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "reconcileResult"; payload: { capability: "none" | "idempotentSubmit" | "readOnlyLookup"; decision: "manual" | "replayed" | "completedByIdempotentSubmit" | "freshRetry"; evidence: Record; idempotencyKey: string; activityId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "reconcileResult"; payload: { capability: "none" | "idempotentSubmit" | "readOnlyLookup"; decision: "manual" | "replayed" | "completedByIdempotentSubmit" | "freshRetry"; evidence: Record; idempotencyKey: string; activityId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>; /** * The discriminated union over all 31 event types — pure, no refinements. * * Why pure: zod's `.superRefine` wraps the union in `ZodEffects`, which * breaks `z.infer<>` narrowing on the discriminator at compile time * (`switch (e.type)` won't exhaustively narrow). The payloadHash * invariant (events doc §1.1) lives in `parseEvent` / `safeParseEvent` * instead, applied as a post-parse check. */ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodLiteral<"runCreated">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "runCreated"; payload: { workflowId: string; revisionId: string; inputRef: { outputHash: string; outputBytes: number; outputSchemaVersion: number; outputPath?: string | undefined; contentType?: string | undefined; }; initiator: string; botSnapshots?: Record | undefined; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "runCreated"; payload: { workflowId: string; revisionId: string; inputRef: { outputHash: string; outputBytes: number; outputSchemaVersion: number; outputPath?: string | undefined; contentType?: string | undefined; }; initiator: string; botSnapshots?: Record | undefined; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"runStarted">; payload: z.ZodUnion<[z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "runStarted"; payload: {} | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "runStarted"; payload: {} | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"runSucceeded">; payload: z.ZodUnion<[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; }; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "runSucceeded"; payload: { outputRef: { outputHash: string; outputBytes: number; outputSchemaVersion: number; outputPath?: string | undefined; contentType?: string | undefined; }; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "runSucceeded"; payload: { outputRef: { outputHash: string; outputBytes: number; outputSchemaVersion: number; outputPath?: string | undefined; contentType?: string | undefined; }; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"runFailed">; payload: z.ZodUnion<[z.ZodObject<{ failedNodeId: z.ZodString; rootCauseEventId: z.ZodString; }, "strip", z.ZodTypeAny, { failedNodeId: string; rootCauseEventId: string; }, { failedNodeId: string; rootCauseEventId: string; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "runFailed"; payload: { failedNodeId: string; rootCauseEventId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "runFailed"; payload: { failedNodeId: string; rootCauseEventId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"runCanceled">; payload: z.ZodUnion<[z.ZodObject<{ cancelOriginEventId: z.ZodString; }, "strip", z.ZodTypeAny, { cancelOriginEventId: string; }, { cancelOriginEventId: string; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "runCanceled"; payload: { cancelOriginEventId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "runCanceled"; payload: { cancelOriginEventId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"nodeWaiting">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "nodeWaiting"; payload: { nodeId: string; waitReason: string; deadlineAt?: number | undefined; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "nodeWaiting"; payload: { nodeId: string; waitReason: string; deadlineAt?: number | undefined; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"nodeRetrying">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "nodeRetrying"; payload: { nodeId: string; lastAttemptId: string; nextBackoffMs: number; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "nodeRetrying"; payload: { nodeId: string; lastAttemptId: string; nextBackoffMs: number; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"nodeSucceeded">; payload: z.ZodUnion<[z.ZodObject<{ nodeId: z.ZodString; lastActivityId: z.ZodString; }, "strip", z.ZodTypeAny, { nodeId: string; lastActivityId: string; }, { nodeId: string; lastActivityId: string; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "nodeSucceeded"; payload: { nodeId: string; lastActivityId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "nodeSucceeded"; payload: { nodeId: string; lastActivityId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"nodeFailed">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "nodeFailed"; payload: { nodeId: string; errorClass: "retryable" | "fatal" | "userFault" | "manual"; lastActivityId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "nodeFailed"; payload: { nodeId: string; errorClass: "retryable" | "fatal" | "userFault" | "manual"; lastActivityId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"nodeSkipped">; payload: z.ZodUnion<[z.ZodObject<{ nodeId: z.ZodString; conditionEventId: z.ZodString; }, "strip", z.ZodTypeAny, { nodeId: string; conditionEventId: string; }, { nodeId: string; conditionEventId: string; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "nodeSkipped"; payload: { nodeId: string; conditionEventId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "nodeSkipped"; payload: { nodeId: string; conditionEventId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"nodeCanceled">; payload: z.ZodUnion<[z.ZodObject<{ nodeId: z.ZodString; cancelOriginEventId: z.ZodString; }, "strip", z.ZodTypeAny, { nodeId: string; cancelOriginEventId: string; }, { nodeId: string; cancelOriginEventId: string; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "nodeCanceled"; payload: { nodeId: string; cancelOriginEventId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "nodeCanceled"; payload: { nodeId: string; cancelOriginEventId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"activityRunning">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "activityRunning"; payload: { attemptId: string; leaseId: string; activityId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "activityRunning"; payload: { attemptId: string; leaseId: string; activityId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"activityWaiting">; payload: z.ZodUnion<[z.ZodObject<{ activityId: z.ZodString; reason: z.ZodString; }, "strip", z.ZodTypeAny, { reason: string; activityId: string; }, { reason: string; activityId: string; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "activityWaiting"; payload: { reason: string; activityId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "activityWaiting"; payload: { reason: string; activityId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"activityTimedOut">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "activityTimedOut"; payload: { reason: "LeaseExpired"; attemptId: string; errorClass: "retryable"; activityId: string; runningMs: number; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "activityTimedOut"; payload: { reason: "LeaseExpired"; attemptId: string; errorClass: "retryable"; activityId: string; runningMs: number; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"loopStarted">; payload: z.ZodUnion<[z.ZodObject<{ loopId: z.ZodString; maxIterations: z.ZodNumber; }, "strip", z.ZodTypeAny, { maxIterations: number; loopId: string; }, { maxIterations: number; loopId: string; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "loopStarted"; payload: { maxIterations: number; loopId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "loopStarted"; payload: { maxIterations: number; loopId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"loopIterationStarted">; payload: z.ZodUnion<[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"; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "loopIterationStarted"; payload: { loopId: string; iteration: number; prevResolution: "initial" | "rejected"; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "loopIterationStarted"; payload: { loopId: string; iteration: number; prevResolution: "initial" | "rejected"; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"loopIterationFinished">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "loopIterationFinished"; payload: { loopId: string; iteration: number; resolution: "approved" | "rejected"; by: string; decisionActivityId: string; waitResolvedEventId: string; comment?: string | undefined; timedOut?: boolean | undefined; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "loopIterationFinished"; payload: { loopId: string; iteration: number; resolution: "approved" | "rejected"; by: string; decisionActivityId: string; waitResolvedEventId: string; comment?: string | undefined; timedOut?: boolean | undefined; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"loopFinished">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "loopFinished"; payload: { 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; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "loopFinished"; payload: { 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; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"conditionEvaluated">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "conditionEvaluated"; payload: { nodeId: string; conditionExpr: string; resultTrue: boolean; evaluatedInputs?: Record | undefined; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "conditionEvaluated"; payload: { nodeId: string; conditionExpr: string; resultTrue: boolean; evaluatedInputs?: Record | undefined; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"leaseSigned">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "leaseSigned"; payload: { timeoutMs: number; attemptId: string; leaseId: string; activityId: string; maxOutputBytes: number; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "leaseSigned"; payload: { timeoutMs: number; attemptId: string; leaseId: string; activityId: string; maxOutputBytes: number; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"attemptCreated">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "attemptCreated"; payload: { nodeId: string; attemptId: string; inputRef: { outputHash: string; outputBytes: number; outputSchemaVersion: number; outputPath?: string | undefined; contentType?: string | undefined; }; activityId: string; attemptNumber: number; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "attemptCreated"; payload: { nodeId: string; attemptId: string; inputRef: { outputHash: string; outputBytes: number; outputSchemaVersion: number; outputPath?: string | undefined; contentType?: string | undefined; }; activityId: string; attemptNumber: number; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"backoffScheduled">; payload: z.ZodUnion<[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; }; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "backoffScheduled"; payload: { nodeId: string; lastAttemptId: string; nextAttemptAt: number; backoffPolicy: { kind: "fixed" | "exponential"; baseMs: number; factor?: number | undefined; jitter?: boolean | undefined; }; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "backoffScheduled"; payload: { nodeId: string; lastAttemptId: string; nextAttemptAt: number; backoffPolicy: { kind: "fixed" | "exponential"; baseMs: number; factor?: number | undefined; jitter?: boolean | undefined; }; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"backoffElapsed">; payload: z.ZodUnion<[z.ZodObject<{ nodeId: z.ZodString; scheduledAttemptId: z.ZodString; }, "strip", z.ZodTypeAny, { nodeId: string; scheduledAttemptId: string; }, { nodeId: string; scheduledAttemptId: string; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "backoffElapsed"; payload: { nodeId: string; scheduledAttemptId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "backoffElapsed"; payload: { nodeId: string; scheduledAttemptId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"effectAttempted">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "effectAttempted"; payload: { provider: string; attemptId: string; inputHash: string; idempotencyKey: string; idempotencyTtlMs: number; activityId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "effectAttempted"; payload: { provider: string; attemptId: string; inputHash: string; idempotencyKey: string; idempotencyTtlMs: number; activityId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"activitySucceeded">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "activitySucceeded"; payload: { attemptId: string; activityId: string; outputRef: { outputHash: string; outputBytes: number; outputSchemaVersion: number; outputPath?: string | undefined; contentType?: string | undefined; }; externalRefs?: Record | undefined; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "activitySucceeded"; payload: { attemptId: string; activityId: string; outputRef: { outputHash: string; outputBytes: number; outputSchemaVersion: number; outputPath?: string | undefined; contentType?: string | undefined; }; externalRefs?: Record | undefined; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"activityFailed">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "activityFailed"; payload: { 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; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "activityFailed"; payload: { 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; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"waitCreated">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "waitCreated"; payload: { 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; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "waitCreated"; payload: { 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; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"waitResolved">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "waitResolved"; payload: { resolution: "approved" | "rejected" | "external"; by: string; activityId: string; comment?: string | undefined; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "waitResolved"; payload: { resolution: "approved" | "rejected" | "external"; by: string; activityId: string; comment?: string | undefined; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"waitDeadlineExceeded">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "waitDeadlineExceeded"; payload: { deadlineAt: number; activityId: string; exceededAtMs: number; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "waitDeadlineExceeded"; payload: { deadlineAt: number; activityId: string; exceededAtMs: number; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"cancelRequested">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "cancelRequested"; payload: { target: { kind: "run"; runId: string; } | { kind: "node"; nodeId: string; } | { kind: "activity"; activityId: string; }; reason: string; by: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "cancelRequested"; payload: { target: { kind: "run"; runId: string; } | { kind: "node"; nodeId: string; } | { kind: "activity"; activityId: string; }; reason: string; by: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"cancelDelivered">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "cancelDelivered"; payload: { target: { kind: "run"; runId: string; } | { kind: "node"; nodeId: string; } | { kind: "activity"; activityId: string; }; activityId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "cancelDelivered"; payload: { target: { kind: "run"; runId: string; } | { kind: "node"; nodeId: string; } | { kind: "activity"; activityId: string; }; activityId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"activityCanceled">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "activityCanceled"; payload: { attemptId: string; activityId: string; cancelOriginEventId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "activityCanceled"; payload: { attemptId: string; activityId: string; cancelOriginEventId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"workerLost">; payload: z.ZodUnion<[z.ZodObject<{ workerId: z.ZodString; lostActivityIds: z.ZodArray; }, "strip", z.ZodTypeAny, { workerId: string; lostActivityIds: string[]; }, { workerId: string; lostActivityIds: string[]; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "workerLost"; payload: { workerId: string; lostActivityIds: string[]; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "workerLost"; payload: { workerId: string; lostActivityIds: string[]; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"resumeStarted">; payload: z.ZodUnion<[z.ZodObject<{ daemonId: z.ZodString; lastSeenEventId: z.ZodString; }, "strip", z.ZodTypeAny, { daemonId: string; lastSeenEventId: string; }, { daemonId: string; lastSeenEventId: string; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "resumeStarted"; payload: { daemonId: string; lastSeenEventId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "resumeStarted"; payload: { daemonId: string; lastSeenEventId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"reconcileResult">; payload: z.ZodUnion<[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; }>, z.ZodObject<{ ref: z.ZodString; bytes: z.ZodNumber; schemaVersion: z.ZodNumber; }, "strip", z.ZodTypeAny, { ref: string; schemaVersion: number; bytes: number; }, { ref: string; schemaVersion: number; bytes: number; }>]>; eventId: z.ZodString; runId: z.ZodString; timestamp: z.ZodNumber; schemaVersion: z.ZodLiteral<1>; actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>; payloadHash: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "reconcileResult"; payload: { capability: "none" | "idempotentSubmit" | "readOnlyLookup"; decision: "manual" | "replayed" | "completedByIdempotentSubmit" | "freshRetry"; evidence: Record; idempotencyKey: string; activityId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }, { type: "reconcileResult"; payload: { capability: "none" | "idempotentSubmit" | "readOnlyLookup"; decision: "manual" | "replayed" | "completedByIdempotentSubmit" | "freshRetry"; evidence: Record; idempotencyKey: string; activityId: string; } | { ref: string; schemaVersion: number; bytes: number; }; schemaVersion: 1; runId: string; timestamp: number; eventId: string; actor: "system" | "worker" | "human" | "scheduler" | "hostExecutor" | "supervisor"; payloadHash?: string | undefined; }>]>; export type WorkflowEvent = z.infer; export type WorkflowEventType = WorkflowEvent['type']; /** * Check the payloadHash <-> payload-ref invariant from events doc §1.1: * - inline payload: payloadHash MUST be absent * - ref payload: payloadHash MUST be present * * Returns `null` if the event respects the invariant; otherwise a human * readable reason string. Pure function — no side effects, no throws. */ export declare function checkPayloadHashInvariant(event: WorkflowEvent): string | null; /** * `reconcileResult.capability` × `decision` legal combinations (events * doc v0.1.2 §4.3.1 — table updated per spec freeze; the codex round 4 * variant of this invariant pinned `completedByIdempotentSubmit` to * `idempotentSubmit` only, but the spec explicitly allows the * `readOnlyLookup → found → completedByIdempotentSubmit` path for * schedule, so we widen accordingly): * * | decision | allowed capability | * |--------------------------------|---------------------------| * | replayed | none | * | completedByIdempotentSubmit | readOnlyLookup OR | * | | idempotentSubmit | * | freshRetry | readOnlyLookup | * | manual | any | * * Rationale: * - `replayed` means the event log already had a terminal — resume * scans the log, no provider call, capability is `none`. * - `completedByIdempotentSubmit` covers BOTH "ROL found the effect" * (schedule case) and "IS re-submit returned the original ref" * (Feishu case). The `capability` field disambiguates which path * was taken; the decision name reflects the outcome. * - `freshRetry` requires `readOnlyLookup`: the only way to confirm * "provider definitely doesn't have it, safe to retry" is a * side-effect-free read. IS by itself cannot produce freshRetry — * a re-submit either lands or fails, no "definitely-not-yet" state. * - `manual` is the catch-all; capability records what was tried. * * Returns `null` if legal, otherwise a reason string. */ export declare function checkReconcileResultInvariant(event: WorkflowEvent): string | null; /** * `waitCreated` shape invariant: `prompt` (inline) and `promptRef` (blob * spill) are mutually exclusive, and any spill MUST carry `promptPreview` * so cards / dashboard can render without reading the blob file. * * Schema keeps `prompt` as `z.string().optional()` (no `.max()`) so that * historical events with multi-KB inline prompts still parse / replay. * The producer (runtime.dispatchGate) is responsible for the 1024-byte * split policy. */ export declare function checkWaitCreatedPromptInvariant(event: WorkflowEvent): string | null; export declare function checkLoopFinishedInvariant(event: WorkflowEvent): string | null; /** * Parse + validate an unknown value as a WorkflowEvent. Combines the * discriminated-union schema check with the post-parse invariants * (payloadHash, reconcileResult capability×decision). Throws ZodError * on failure. */ export declare function parseEvent(raw: unknown): WorkflowEvent; /** * Safe variant of `parseEvent`: returns a result object instead of throwing. * Mirrors `ZodType.safeParse` API for ergonomic call sites. */ export declare function safeParseEvent(raw: unknown): { success: true; data: WorkflowEvent; } | { success: false; error: z.ZodError; }; /** * Inline payload size cap. Payloads larger than this must be written as a * content-addressed blob and referenced via `PayloadRef`. v0 value is a * pragmatic default; verify and tune after dogfooding (see events doc §6.2). */ export declare const INLINE_PAYLOAD_MAX_BYTES = 4096; /** * Per-provider TTL (ms) within which `idempotentSubmit` is safe. Used by * the reconcile path to decide whether a dangling `effectAttempted` can * still be safely retried with the same uuid. Feishu's documented uuid * dedupe window is 1 hour (spike report §1.2). */ export { PROVIDER_TTL_MS } from '../shared/provider-reconciler.js'; export { Sha256Schema }; //# sourceMappingURL=schema.d.ts.map