/** * KeyedMutex — serialize async work per key within one process. * * Used where a read-then-write decision must not interleave for the same * logical resource: intake's create-or-join per conversation key, and * included-time consumption per case during time-entry approval. Keys chain * promises, so concurrent callers for the same key run strictly in arrival * order while different keys stay fully parallel; entries clean up when the * last waiter finishes. * * Scope: in-process only. It covers the deployment shape these paths run in * (one app process owns intake interceptors / approval actions); multi- * replica deployments serialize at the app layer (sticky routing or a * DB-level claim), which composes above these seams. */ export declare class KeyedMutex { private readonly tails; /** Run `fn` exclusively for `key`, after every earlier holder of it. */ run(key: string, fn: () => Promise): Promise; } export default KeyedMutex; //# sourceMappingURL=keyed-mutex.d.ts.map