/** * Storage key builders for the durable per-run execution record: workflow * state, checkpoints, timelines, schedules, queued operations, events, async * activity resolution, and workflow updates. * * These are spread into `KEYS` in `interface.ts` rather than declared there, so * the workflow-record keyspace can carry its full rationale without pushing * that file's documented line ceiling. Callers still reach them through `KEYS`, * which keeps one import contract for storage keys. * * @module storage/workflow-record-keys */ /** * Workflow state, checkpoint, timeline, schedule, queued-operation, and event * keys. * * Spread into `KEYS` ahead of `SIGNAL_KEYS` and `WORKFLOW_LIFECYCLE_KEYS_CORE` * to preserve the pre-split `Object.keys(KEYS)` insertion order; not intended * to be imported directly by engine code. */ export declare const WORKFLOW_RECORD_KEYS_CORE: { readonly workflow: (id: string) => string; readonly checkpoint: (id: string) => string; readonly checkpointHistory: (id: string, step: number) => string; readonly timelinePrefix: (id: string) => string; readonly timeline: (id: string, step: number) => string; readonly schedule: (id: string) => string; readonly scheduleTick: (fireAt: number, id: string) => string; readonly scheduleRun: (workflowId: string) => string; /** * Durable per-workflow manifest for the schedule that launched a run. Unlike * `scheduleRun`, this link survives terminal cleanup so schedule history can * be queried until the workflow itself is purged. */ readonly scheduleRunLink: (workflowId: string) => string; readonly scheduleRunBySchedulePrefix: (scheduleId: string) => string; readonly scheduleRunBySchedule: (scheduleId: string, workflowId: string) => string; readonly operation: (queue: string, scheduledAt: number, id: string) => string; readonly operationInflight: (id: string) => string; readonly operationQueued: (id: string) => string; readonly operationResolved: (id: string) => string; readonly bulkOperationAuditPrefix: () => string; readonly bulkOperationAudit: (timestamp: number, requestId: string, confirmationToken: string) => string; readonly operationResolvedByTimePrefix: () => string; readonly operationResolvedByTime: (resolvedAt: number, id: string) => string; readonly asyncActivity: (workflowId: string, token: string) => string; readonly asyncActivityResolution: (workflowId: string, token: string) => string; readonly activityReconciliationPrefix: (workflowId: string) => string; readonly activityReconciliation: (workflowId: string, activityName: string, idempotencyKeyDigest: string) => string; readonly eventPrefix: (workflowId: string) => string; readonly event: (workflowId: string, sequence: number) => string; readonly eventHead: (workflowId: string) => string; readonly eventWatermark: (workflowId: string) => string; readonly fleetEventPrefix: () => string; readonly fleetEvent: (sequence: number) => string; readonly fleetEventTail: () => string; readonly fleetEventWatermark: () => string; readonly fleetEventByWorkflowPrefix: (workflowId: string) => string; readonly fleetEventByWorkflow: (workflowId: string, sequence: number) => string; }; /** * Workflow attribute/tag index and update keys. * * Spread into `KEYS` after `WORKFLOW_LIFECYCLE_KEYS_CORE` to preserve the * pre-split `Object.keys(KEYS)` insertion order; not intended to be imported * directly by engine code. */ export declare const WORKFLOW_RECORD_KEYS_EXTENDED: { readonly attribute: (workflowId: string) => string; readonly attributeIndex: (attributeName: string, encodedValue: string, workflowId: string) => string; readonly tagIndex: (tag: string, workflowId: string) => string; readonly updatePrefix: (workflowId: string) => string; readonly update: (workflowId: string, updateId: string) => string; readonly updateResponse: (updateId: string) => string; readonly updateIdempotency: (workflowId: string, key: string) => string; /** * Maps a start `idempotencyKey` to the workflow id created for it. Written * atomically with the workflow record under a `conditionalBatch` gated on this * key being absent, so concurrent same-key starts converge on one workflow. * Unlike `updateIdempotency`, it is keyed by the idempotency key alone (no * workflow id) because the workflow id is the value it resolves to. It is * intentionally NOT swept on terminal cleanup: it must outlive the run so a * post-completion `startOrSignal` sees a terminal workflow (and conflicts) * rather than missing the mapping and creating a fresh run. */ readonly startIdempotency: (key: string) => string; /** * The convergence signal id that `startOrSignal` derives from an idempotency * key so independent same-key callers deliver ONE signal. Deliberately uses the * RAW key (not `encodeStorageKeyComponent`): unlike `startIdempotency` this is a * signal id, not a storage key, and `validateSignalId` is character-agnostic, so * the raw key is always a valid id as long as it fits the byte cap (enforced as * ≤117 bytes so `"start-idem:"` + key stays within the 128-byte signal-id * ceiling). The two derivations are independent namespaces; both are individually * correct, so the raw-vs-encoded difference is harmless. */ readonly startIdempotencySignalId: (key: string) => string; };