/** * `aidlc autopilot` — work the backlog in the background, on request * (autopilot-on-demand/AC-1..AC-13). * * - `setup` — pick the agent, parallelism, cost cap, where it stops for a person, * and the release step from lists. * - `run` — start one background run for `--items n` or `--all`, and return. * - `stop` — create the STOP file; the run ends at its next step. * - `pause` — freeze the run and its agents where they stand; `resume` thaws them. * - `status` — the active run and every tracked item; `--watch` follows each item * live until the run ends (autopilot-live-progress). * - `approve` — carry on an item paused for review (autopilot-stop-controls). * - `review` — keep, reject or promote what an unattended run decided * (unattended-decision-diary), for one instance, `--pending` for all, or * `--from` an agent's proposal (review-from-agent-proposal); it reads the * checkout it runs in. * - `pending` — every decision the run waits on a person for; `wait --pending` blocks * until a new one appears; `answer` applies a person's answer to one and * records it (autopilot-watcher-asks-person). * - `forget` — stop tracking an item finished or abandoned by hand. * - `tick` — one pass, in the foreground; kept for debugging. * * The driver acts in the primary checkout (merges and releases happen on its * `main`), so every subcommand resolves that checkout's copy of the project, not the * worktree it was run from. * * @module */ import { Command } from 'commander'; import { type Prompter } from '../core/prompt.js'; import { type PendingEntry } from '../autopilot/pending.js'; import { runStatusLines } from '../autopilot/run.js'; import { type AutopilotConfig, type AutopilotPaths } from '../autopilot/state.js'; import { type StopOverrides } from '../autopilot/stops.js'; import { type WatchDeps } from '../autopilot/watch.js'; export { runStatusLines }; export interface Where { repo: string; paths: AutopilotPaths; } /** * The primary checkout's copy of the project and the autopilot directory, or null * outside a git repo. * * `repo` is where autopilot reads `.aidlc/` (config, cost rates, `roadmap/hold/`, a merged * instance's state), runs `aidlc`, stages `.aidlc` at close-out and looks for its release * script — so it is the project, not the checkout's top, which for a project below the * repository root holds none of those (repo-root-is-not-the-project/AC-11). `git` and * `gh` run the same from either. */ export declare function locate(cwd?: string): Where | null; export interface SetupOptions { agent?: string; parallel?: string; costCap?: string; tokenCap?: string; pauseAfter?: string; stopAt?: string; release?: string; nonInteractive?: boolean; } export type SetupOutcome = { ok: true; config: AutopilotConfig; } | { ok: false; reason: string; }; /** * Ask the four questions, or take them from flags (AC-10, AC-11), and write the * per-machine config. Any flag, or `--non-interactive`, means no prompts: the * questions not answered by a flag take the recommended choice. * * Without a terminal and without either, it refuses rather than picking the * agent's permissions on the user's behalf. */ export declare function runSetup(repo: string, p: AutopilotPaths, opts: SetupOptions, prompt?: Prompter): Promise; export declare function describeConfig(p: AutopilotPaths, c: AutopilotConfig): string; /** * `aidlc autopilot setup`. `aidlc init` asks the same four questions through * `askAutopilotQuestions` and saves the answers per home instead * (init-sets-work-mode/AC-16, AC-20). */ export declare function setupCommand(opts: SetupOptions, prompt?: Prompter): Promise; /** `--stop-at` and `--pause-after`, or the message naming the valid values (autopilot-stop-controls/AC-4, AC-8). */ export declare function parseStopFlags(opts: { stopAt?: string; pauseAfter?: string; }): { ok: true; stops: StopOverrides; } | { ok: false; reason: string; }; /** The stops a run started now would apply: team, then machine, then its flags (autopilot-stop-controls/AC-5). */ export declare function runStopsLine(repo: string, p: AutopilotPaths, stops: StopOverrides): string; /** * The start line off GitHub, so nobody learns it from the first pushed branch; null on GitHub * (gitlab-and-plain-git/AC-17, autopilot-gitlab-merge-requests/AC-19). */ export declare function hostLine(repo: string): string | null; /** * `aidlc autopilot forget ` — stop tracking an item finished or * abandoned by hand, so the next run does not try to merge it again * (autopilot-merge-lane-stalls-on-conflicts/AC-17, AC-18). */ export declare function forgetCommand(name: string): number; /** * `aidlc autopilot approve ` — approve the phase an item paused after, so * the next pass carries it on. Only autopilot's own state changes * (autopilot-stop-controls/AC-16, AC-17). */ export declare function approveCommand(name: string): number; /** * The watch frame for the autopilot at `p`. Every read here is one that writes nothing: * `liveRun`, not `activeRun`, which clears a dead run's record (autopilot-live-progress/AC-6). * The console's `/watch` draws the same frame (colorful-autopilot-watch/AC-17). */ export declare function watchFrame(p: AutopilotPaths, colour: boolean): WatchDeps['frame']; /** `aidlc autopilot status --watch [--view cards|table|lanes]`. */ export declare function watchCommand(viewName?: string): Promise; /** Every entry waiting on a person now, less those answered. Reads only (`liveRun`, not `activeRun`). */ export declare function pendingNow(where: Where): PendingEntry[]; export declare function answerCommandAction(fp: string, option: string, opts: { note?: string; rank?: string; by?: string; }): number; export declare function registerAutopilot(program: Command): Command; //# sourceMappingURL=autopilot.d.ts.map