Open History to see the last commit
1import type { ThreadId } from "@t3tools/contracts";
2import * as Context from "effect/Context";
3import * as Layer from "effect/Layer";
4
5import { makeKeyedSerialExecutor, type KeyedSerialExecutor } from "./KeyedSerialExecutor.ts";
6
7/** Shared by thread commands and project deletion so both plan against current thread state. */
8export class ThreadCommandExecutor extends Context.Service<
9 ThreadCommandExecutor,
10 KeyedSerialExecutor<ThreadId>
11>()("t3/orchestration-v2/ThreadCommandExecutor") {}
12
13export const layer = Layer.effect(ThreadCommandExecutor, makeKeyedSerialExecutor<ThreadId>());