Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
13 lines
544 B
TypeScript
13 lines
544 B
TypeScript
import type { ThreadId } from "@t3tools/contracts";
|
|
import * as KeyedLock from "@t3tools/shared/KeyedLock";
|
|
import * as Context from "effect/Context";
|
|
import * as Layer from "effect/Layer";
|
|
|
|
/** Shared by thread commands and project deletion so both plan against current thread state. */
|
|
export class ThreadCommandExecutor extends Context.Service<
|
|
ThreadCommandExecutor,
|
|
KeyedLock.KeyedLock<ThreadId>
|
|
>()("t3/orchestration-v2/ThreadCommandExecutor") {}
|
|
|
|
export const layer = Layer.effect(ThreadCommandExecutor, KeyedLock.make<ThreadId>());
|