import { type FrontMcpLogger } from '../../common/interfaces/logger.interface'; import { type JobDynamicRecord } from '../../common/records/job.record'; import { type WorkflowDynamicRecord } from '../../common/records/workflow.record'; import { type JobDefinitionStore } from './job-definition.interface'; /** Minimal Redis client interface covering operations used by this store. */ export interface RedisDefinitionStoreLike { get(key: string): Promise; set(key: string, value: string): Promise; del(key: string): Promise; sadd(key: string, ...members: string[]): Promise; srem(key: string, ...members: string[]): Promise; smembers(key: string): Promise; /** Optional graceful shutdown — present on ioredis. */ quit?(): Promise; /** Optional hard close — present on ioredis. */ disconnect?(): void; } export interface RedisJobDefinitionStoreOptions { /** * If true, dispose() will close the Redis client. Set when the store * created the client itself (e.g. via the factory) so the lifecycle is * tied to the store. Defaults to false to preserve the existing * "shared client — don't close" behavior for callers that pass an * externally-managed client. */ ownsClient?: boolean; } /** * Redis implementation of JobDefinitionStore. * Persists dynamic job/workflow definitions across restarts. */ export declare class RedisJobDefinitionStore implements JobDefinitionStore { private readonly client; private readonly keyPrefix; private readonly logger; private readonly ownsClient; private disposed; constructor(client: RedisDefinitionStoreLike, logger: FrontMcpLogger, keyPrefix?: string, options?: RedisJobDefinitionStoreOptions); /** * Parse a Redis JSON payload, returning null on malformed input. Stale or * truncated values must not crash the caller — log + treat as missing so * the surrounding flow can recover. */ private safeParse; private jobKey; private workflowKey; saveDefinition(record: JobDynamicRecord): Promise; getDefinition(jobId: string): Promise; listDefinitions(): Promise; removeDefinition(jobId: string): Promise; saveWorkflowDefinition(record: WorkflowDynamicRecord): Promise; getWorkflowDefinition(wfId: string): Promise; listWorkflowDefinitions(): Promise; removeWorkflowDefinition(wfId: string): Promise; dispose(): Promise; } //# sourceMappingURL=redis-job-definition.store.d.ts.map