export type CommitMode = "immediate" | "simultaneous" | "resealable"; export interface SubmittedAction { participant: string; action: TAction; } export interface CommitOutcome { status: "committed" | "sealed" | "pending" | "rejected"; committed: SubmittedAction[]; reason?: string; } export interface CommitControllerConfig { mode: CommitMode; participants?: readonly string[]; } export interface CommitController { readonly mode: CommitMode; submit(participant: string, action: TAction): CommitOutcome; expected(participants: readonly string[]): void; hasSubmitted(participant: string): boolean; allReady(): boolean; pending(): SubmittedAction[]; reveal(): SubmittedAction[]; commit(): SubmittedAction[]; discard(): SubmittedAction[]; clear(): void; } export declare function createCommitController(config: CommitControllerConfig): CommitController;