import type { GateDecision, GateDefinition, GateRetraction, GateTrigger } from './types.js'; /** * The producer-side builder for a transition-gate valve. `.on()` fixes the * source event type; `.fanOut()` and `.decision()` are checked against it. * `.decision()` is terminal — the async hook is the load-bearing seam, and * supplying it registers the gate. */ export interface GateBuilder { /** The source entity and the set of triggers that fire the gate. */ on(source: string, triggers: readonly GateTrigger[]): GateBuilder; /** Enrichment context — context key -> inbound valve name. Fed by inbound faucets. */ context(inbound: Record): GateBuilder; /** Names the computed signals the decision may read. */ signals(names: readonly string[]): GateBuilder; /** Fans one trigger out to N independently-keyed crossings. */ fanOut(items: (event: TEvent) => readonly unknown[]): GateBuilder; /** Declares that a trigger supersedes and retracts the prior crossing. */ retracts(config: GateRetraction): GateBuilder; /** The async decision hook. Terminal — registers the gate and returns its definition. */ decision(hook: GateDecision): GateDefinition; } /** * Declare a transition-gate valve. A gate modulates a state change within one * silo, so `silo` is both producer and consumer. Chain the anatomy and finish * with `.decision(hook)`. */ export declare function gate(name: string, silo: string): GateBuilder; //# sourceMappingURL=gate.d.ts.map