import * as Effect from "effect/Effect";import * as Layer from "effect/Layer"; import { OrchestrationReactor, type OrchestrationReactorShape,} from "../Services/OrchestrationReactor.ts";import { CheckpointReactor } from "../Services/CheckpointReactor.ts";import { ProviderCommandReactor } from "../Services/ProviderCommandReactor.ts";import { ProviderRuntimeIngestionService } from "../Services/ProviderRuntimeIngestion.ts";import { ThreadDeletionReactor } from "../Services/ThreadDeletionReactor.ts";import * as AgentAwarenessRelay from "../../relay/AgentAwarenessRelay.ts"; export const makeOrchestrationReactor = Effect.gen(function* () { const providerRuntimeIngestion = yield* ProviderRuntimeIngestionService; const providerCommandReactor = yield* ProviderCommandReactor; const checkpointReactor = yield* CheckpointReactor; const threadDeletionReactor = yield* ThreadDeletionReactor; const agentAwarenessRelay = yield* AgentAwarenessRelay.AgentAwarenessRelay; const start: OrchestrationReactorShape["start"] = Effect.fn("start")(function* () { yield* providerRuntimeIngestion.start(); yield* providerCommandReactor.start(); yield* checkpointReactor.start(); yield* threadDeletionReactor.start(); yield* agentAwarenessRelay.start(); }); return { start, } satisfies OrchestrationReactorShape;}); export const OrchestrationReactorLive = Layer.effect( OrchestrationReactor, makeOrchestrationReactor,);
import * as Effect from "effect/Effect";
import * as Layer from "effect/Layer";
import {
OrchestrationReactor,
type OrchestrationReactorShape,
} from "../Services/OrchestrationReactor.ts";
import { CheckpointReactor } from "../Services/CheckpointReactor.ts";
import { ProviderCommandReactor } from "../Services/ProviderCommandReactor.ts";
import { ProviderRuntimeIngestionService } from "../Services/ProviderRuntimeIngestion.ts";
import { ThreadDeletionReactor } from "../Services/ThreadDeletionReactor.ts";
import * as AgentAwarenessRelay from "../../relay/AgentAwarenessRelay.ts";
export const makeOrchestrationReactor = Effect.gen(function* () {
const providerRuntimeIngestion = yield* ProviderRuntimeIngestionService;
const providerCommandReactor = yield* ProviderCommandReactor;
const checkpointReactor = yield* CheckpointReactor;
const threadDeletionReactor = yield* ThreadDeletionReactor;
const agentAwarenessRelay = yield* AgentAwarenessRelay.AgentAwarenessRelay;
const start: OrchestrationReactorShape["start"] = Effect.fn("start")(function* () {
yield* providerRuntimeIngestion.start();
yield* providerCommandReactor.start();
yield* checkpointReactor.start();
yield* threadDeletionReactor.start();
yield* agentAwarenessRelay.start();
});
return {
start,
} satisfies OrchestrationReactorShape;
});
export const OrchestrationReactorLive = Layer.effect(
OrchestrationReactor,
makeOrchestrationReactor,
);