Open History to see the last commit
1/**
2 * CheckpointReactor - Checkpoint reaction service interface.
3 *
4 * Owns background workers that react to orchestration checkpoint lifecycle
5 * events and apply checkpoint side effects.
6 *
7 * @module CheckpointReactor
8 */
9import { ServiceMap } from "effect";
10import type { Effect, Scope } from "effect";
11
12/**
13 * CheckpointReactorShape - Service API for checkpoint reactor lifecycle.
14 */
15export interface CheckpointReactorShape {
16 /**
17 * Start the checkpoint reactor.
18 *
19 * The returned effect must be run in a scope so all worker fibers can be
20 * finalized on shutdown.
21 *
22 * Consumes both orchestration-domain and provider-runtime events via an
23 * internal queue.
24 */
25 readonly start: Effect.Effect<void, never, Scope.Scope>;
26}
27
28/**
29 * CheckpointReactor - Service tag for checkpoint reactor workers.
30 */
31export class CheckpointReactor extends ServiceMap.Service<
32 CheckpointReactor,
33 CheckpointReactorShape
34>()("t3/orchestration/Services/CheckpointReactor") {}