/** * Where autopilot stops and waits for a person (autopilot-stop-controls/AC-1). * * Two settings. `stop_at` is the last step autopilot takes for an item: `pr` opens * the pull request and waits for a person to merge it, `merge` merges without the * release step, `release` merges and releases. `pause_after` names the phases after * which the agent stops and the item waits for `aidlc autopilot approve`. * * Every place a value enters — team file, machine file, setup flags, run flags — * goes through the parsers here, so `AIDLC_PAUSE_AFTER` can only ever carry a name * from {@link PAUSE_PHASES}. * * @module */ export declare const STOP_AT: readonly ["pr", "merge", "release"]; export type StopAt = (typeof STOP_AT)[number]; /** In lifecycle order: the earliest unapproved one is the one waited on (autopilot-stop-controls/AC-13). */ export declare const PAUSE_PHASES: readonly ["requirements", "design", "implementation", "testing"]; export type PausePhase = (typeof PAUSE_PHASES)[number]; export interface Stops { stop_at: StopAt; pause_after: PausePhase[]; } /** A run's `--stop-at` and `--pause-after`, already parsed (autopilot-stop-controls/AC-4). */ export interface StopOverrides { stop_at?: StopAt; pause_after?: PausePhase[]; } /** The flag text that {@link parsePauseFlag} reads back. */ export declare function pauseFlag(pauses: readonly PausePhase[]): string; /** The stop keys as a config carries them, possibly absent or hand-edited. */ export interface StopKeys { stop_at?: unknown; pause_after?: unknown; } /** * What an absent key meant before stops existed, so a config saved earlier, or an * item tracked since then, behaves as it did (autopilot-stop-controls/AC-3, AC-6). */ export declare const LEGACY_STOPS: Readonly; export declare function parseStopAt(value: unknown): StopAt | undefined; /** A list of allowed phase names, deduplicated and in lifecycle order; anything else is undefined. */ export declare function parsePauseAfter(value: unknown): PausePhase[] | undefined; /** Flag text: `none` is no pauses, otherwise comma-separated phase names. */ export declare function parsePauseFlag(text: string): PausePhase[] | undefined; /** The stops a config sets, key by key; an absent or invalid key keeps its legacy value. */ export declare function stopsInForce(config: StopKeys | null): Stops; /** Whether a config sets either stop key validly. */ export declare function setsStops(config: StopKeys | null): boolean; export declare function describePauses(pauses: readonly PausePhase[]): string; export declare function describeStopAt(stop: StopAt): string; /** * The line `aidlc autopilot run` prints on every start. With neither key set it * says what that means, so nobody finds out from the merged pull request * (autopilot-stop-controls/AC-5). */ export declare function stopsLine(config: StopKeys | null): string; /** The earliest paused phase that is complete and not yet approved, or null. */ export declare function pendingReview(stops: Stops, approved: readonly string[], complete: (phase: PausePhase) => boolean): PausePhase | null; /** `AIDLC_PAUSE_AFTER` for the agent (autopilot-stop-controls/AC-11). */ export declare function pauseEnv(stops: Stops, approved: readonly string[]): string; //# sourceMappingURL=stops.d.ts.map