/** * Decision autopilot mode and its visible trail * (change: default-decision-autopilot-with-visible-trace). * * One resolver for "is autopilot on here, and why", read by every surface that * acts on or reports the mode. An absent `governance.autopilot` means ON, except * where a human wired a blocking decisions gate (the explicit `openlore install` * path) — there it keeps meaning blocking review, today's rule. * * Kept dependency-light (heavier modules load lazily): the Pi footer imports the * unreviewed count from here into the Pi host process. */ import type { OpenLoreConfig } from '../../types/index.js'; import type { LedgerEntry } from './ledger.js'; /** The marker line the decisions pre-commit hook carries. */ export declare const DECISIONS_HOOK_MARKER = "# openlore-decisions-hook"; /** Where a human reviews what autopilot accepted. */ export declare const DECISIONS_REVIEW_COMMAND = "openlore decisions review"; export interface AutopilotMode { autopilot: boolean; /** Why, in words a user can act on. */ reason: string; source: 'config-on' | 'config-off' | 'main-checkout' | 'no-config' | 'blocking-gate' | 'unset'; } /** * Does this repository carry an OpenLore decisions commit gate? * (change: unify-onboarding-entrypoint) */ export declare function hasOpenLoreCommitGate(rootPath: string): Promise; /** * Resolve the autopilot mode. `gateRunning` is set by the gate itself: a gate run * (hook or CI `decisions --gate`) is evidence of an explicit gate, so an absent key * keeps meaning blocking review there, exactly as before. */ export declare function resolveAutopilotMode(rootPath: string, config: Pick | null | undefined, opts?: { gateRunning?: boolean; }): Promise; /** * Record autopilot for a repository whose config background auto-init just created, so the * default is an explicit, visible choice. Leaves the config alone when it already chooses, when * this is a linked worktree whose main checkout chooses (it follows that), or when a blocking * decisions gate is installed. Returns whether it wrote. Never throws. */ export declare function recordAutoInitAutopilot(rootPath: string): Promise; /** * Unreviewed auto-accepted decisions, read straight from the store file. A cheap, * fail-soft read for the status line and the Pi footer: 0 when there is no store. */ export declare function countUnreviewedDecisions(rootPath: string): Promise; export interface GovernanceStatus { autopilot: boolean; reason: string; /** Decisions ever auto-accepted, from the ledger. */ autoAccepted: number; /** Auto-accepted decisions no human has reviewed yet. */ unreviewed: number; /** Newest ledger entries, newest first (at most 3). */ recent: LedgerEntry[]; review: string; } /** The governance block `openlore status` reports. Read-only. */ export declare function collectGovernanceStatus(rootPath: string, config: Pick | null | undefined): Promise; /** * Decisions auto-accepted since the previous session start, then advance the * cursor. Without a `.openlore/` directory nothing is written and nothing is new. */ export declare function takeAutoAcceptsSinceLastSession(rootPath: string): Promise; //# sourceMappingURL=autopilot.d.ts.map