/** * The dashboard's panel readers (operator-console/AC-8..AC-10, * operator-console/AC-15..AC-20). * * Reads only: nothing here writes a file, takes a lock or signals a process * (operator-console/AC-8). Each panel is read inside its own `try`, so a state file * that does not parse fails that panel alone and the rest keep drawing * (operator-console/AC-20). * * @module */ import { type AutopilotPaths } from '../../autopilot/state.js'; import { type WatchReader } from '../../autopilot/watch.js'; import type { Claim } from '../../concurrency/types.js'; import type { AutopilotData, BuildingData, BuildingRow, InstanceRow, OperatorData, PanelRead } from './model.js'; export interface ReadDeps { projectRoot: string; /** Null outside a git repository. */ autopilot: AutopilotPaths | null; version: string; reader?: WatchReader; now?: () => number; branch?: (root: string) => string | null; /** Every recorded claim; `readClaims` by default, which writes nothing. */ claims?: (root: string) => Map; } /** One panel, or the reason it could not be read, in one line. */ export declare function readPanel(read: () => T): PanelRead; export declare function gitBranch(root: string): string | null; /** * A reader that keeps what does not change between refreshes: the branch (asked of * git once a refresh at most) and the spend, re-computed only when a ledger's size or * modification time, or the day, changes (design D-8). */ export declare function createReader(deps: ReadDeps): () => OperatorData; /** * The one definition of "running" (building-panel-all-instances/AC-2..AC-4): autopilot * tracks it, or a session holds its claim. Every other unfinished instance is idle. Each * source failing alone leaves the others drawn, and says so (AC-18). */ export declare function readBuilding(autopilot: PanelRead | null, claims: PanelRead>, instances: PanelRead, attended: (name: string, claim: Claim) => BuildingRow['item']): BuildingData; /** Size and modification time of every ledger, and the day: what the spend depends on. */ export declare function spendStamp(root: string, now: number): string; //# sourceMappingURL=read.d.ts.map