export type GoalEffPhase = "claimed" | "launching" | "launched" | "settled"; export interface GoalEffExecutor { instanceId: string; processEpoch: number; } export interface GoalEffAddr { nameToken: string; lifecycleUid: string; } interface GoalEffCommon { v: 1; executor: GoalEffExecutor; attemptId: string; ts: number; } export type GoalEffRow = (GoalEffCommon & { phase: "claimed"; }) | (GoalEffCommon & { phase: "launching"; addr: GoalEffAddr; }) | (GoalEffCommon & { phase: "launched"; addr: GoalEffAddr; }) | (GoalEffCommon & { phase: "settled"; addr?: GoalEffAddr; }); /** Who is taking the edge. A sweeper acts for an executor that is GONE โ€” which is exactly why it * may only settle: advancing a launch phase on a dead executor's behalf is the split-brain the * election exists to prevent, and it is indistinguishable in the row from the executor doing it. */ export type GoalEffActor = { role: "executor"; executor: GoalEffExecutor; attemptId: string; } | { role: "sweeper"; }; /** Parse a row from CURRENT BYTES โ€” never from a prior in-memory value. The `settled` variant is * the one that cannot be validated any other way: both of its shapes are legal and nothing in the * bytes distinguishes them, which is acceptable precisely because nothing downstream branches on * it. The address is for repair, and a settled row needs no repair. */ export declare function parseGoalEff(value: unknown): GoalEffRow; /** * Validate a transition against ยง S1: the edge exists, the actor is entitled to take it, and the * immutable fields did not move. Throws on any violation; returns nothing on success. * * `terminalExists` gates every settle. It is a REQUIRED argument rather than an assumed * precondition because a settle whose terminal has not been written is precisely the goal that * looks finished and is not โ€” and a gate the caller can satisfy by forgetting to mention it is not * a gate. */ export declare function assertGoalEffEdge(prev: GoalEffRow, next: GoalEffRow, actor: GoalEffActor, opts: { terminalExists: boolean; }): void; export {}; //# sourceMappingURL=endpoint-goaleff.d.ts.map