···11+/**
22+ * Interface for distributed locking service.
33+ *
44+ * Provides distributed locking across multiple workers/instances using
55+ * a shared lock store (Redis in production, in-memory for development).
66+ */
77+export interface IDistributedLockService {
88+ /**
99+ * Executes a function while holding a distributed lock.
1010+ *
1111+ * @param key - The lock key to acquire
1212+ * @param ttl - Time-to-live for the lock in milliseconds
1313+ * @param fn - The function to execute while holding the lock
1414+ * @returns The result of the function execution
1515+ * @throws Error if lock cannot be acquired after retries
1616+ */
1717+ withLock<T>(key: string, ttl: number, fn: () => Promise<T>): Promise<T>;
1818+}