import type { SerializedError } from '@pikku/core/errors'; import { PikkuWorkflowService } from '@pikku/core/workflow'; import type { WorkflowPlannedStep, WorkflowQueueOptions, WorkflowRun, WorkflowRunWire, StepState, StepStatus, WorkflowStatus, WorkflowVersionStatus } from '@pikku/core/workflow'; import { Redis, type RedisOptions } from 'ioredis'; export declare class RedisWorkflowService extends PikkuWorkflowService { private redis; private keyPrefix; private ownsConnection; private lockTTL; constructor(connectionOrConfig: Redis | RedisOptions | string | undefined, keyPrefix?: string, options?: WorkflowQueueOptions); init(): Promise; private runKey; private stepKey; private stepHistoryKey; private lockKey; private stepLockKey; private saveStepHistory; private updateCurrentHistoryRecord; protected createRunImpl(workflowName: string, input: any, inline: boolean, graphHash: string, wire: WorkflowRunWire, options?: { deterministic?: boolean; plannedSteps?: WorkflowPlannedStep[]; }): Promise; getRun(id: string): Promise; protected updateRunStatusImpl(id: string, status: WorkflowStatus, output?: any, error?: SerializedError): Promise; protected insertStepStateImpl(runId: string, stepName: string, rpcName: string | null, data: any, stepOptions?: { retries?: number; retryDelay?: string | number; }, fromStepName?: string): Promise; getStepState(runId: string, stepName: string): Promise; getRunHistory(runId: string): Promise>; protected setStepRunningImpl(stepId: string): Promise; protected setStepScheduledImpl(stepId: string): Promise; protected setStepChildRunIdImpl(stepId: string, childRunId: string): Promise; protected setStepResultImpl(stepId: string, result: any): Promise; protected setStepErrorImpl(stepId: string, error: Error): Promise; private withLock; withRunLock(id: string, fn: () => Promise): Promise; withStepLock(runId: string, stepName: string, fn: () => Promise): Promise; protected createRetryAttemptImpl(stepId: string, status: 'pending' | 'running'): Promise; getCompletedGraphState(runId: string): Promise<{ completedNodeIds: string[]; failedNodeIds: string[]; branchKeys: Record; }>; getStepInstances(runId: string): Promise>; getNodeResults(runId: string, nodeIds: string[]): Promise>; protected setBranchTakenImpl(stepId: string, branchKey: string): Promise; private runStateKey; protected updateRunStateImpl(runId: string, name: string, value: unknown): Promise; getRunState(runId: string): Promise>; private versionKey; protected upsertWorkflowVersionImpl(name: string, graphHash: string, graph: any, source: string, status?: WorkflowVersionStatus): Promise; protected updateWorkflowVersionStatusImpl(name: string, graphHash: string, status: WorkflowVersionStatus): Promise; getWorkflowVersion(name: string, graphHash: string): Promise<{ graph: any; source: string; } | null>; close(): Promise; }