/** * saga.repair โ€” detach an I5-violating parent edge from a Saga. * * A Saga (`type='saga'`) MUST be a root node. This verb repairs a saga that * carries an invalid `parentId` by clearing that parent edge: * * 1. Loads the saga and confirms `type='saga'`. * 2. If `parentId` is `null`, returns idempotently (no-op). * 3. Otherwise: clears `parentId` to `null`. * * The verb is **idempotent**: calling it twice on the same saga yields the * same final state and the second call reports `repaired: false`. * * @task T10117 โ€” sagaList loud-filter + repair verb * @saga T10113 * @epic T10209 * @see ADR-073-above-epic-naming.md ยง1.2 โ€” invariant I5 */ import { type EngineResult } from '../engine-result.js'; /** Input parameters for {@link repairSaga}. */ export interface RepairSagaParams { /** The saga task ID to repair (must have `labels.includes('saga')`). */ sagaId: string; } /** Result payload for {@link repairSaga}. */ export interface RepairSagaResult { /** The saga that was inspected. */ sagaId: string; /** * `true` when the call performed a state change, `false` when the saga * already satisfied I5. */ repaired: boolean; /** * The `parentId` value that was detached. `null` when no detach was needed. */ detachedParentId: string | null; /** * Free-form notes the caller can surface in CLI output, e.g. when the * former parent could not be found and only the detach half completed. */ note?: string; } /** * Repair an I5-violating saga by detaching its `parentId`. * * @param projectRoot - Absolute path to the project root. * @param params - Identifies the saga to repair. * @returns The repaired state, including whether any mutation occurred. */ export declare function repairSaga(projectRoot: string, params: RepairSagaParams): Promise>; //# sourceMappingURL=repair.d.ts.map