export type CheckResult = { result: 'pass' | 'fail' | 'part' | 'unknown'; detail: string; }; type Maybe = T | Promise; export interface LintProbe { /** The folder ESLint runs from, relative to the repo: `.` unless the app sits in a folder of its own. */ cwd?: string; /** The config file, relative to `cwd`. */ config: string; /** The path the text is linted as, relative to `cwd`. Nothing is written. */ file: string; code: string; expect: 'error' | 'warning' | 'none'; /** Words the expected message must contain. */ mentions?: string; } /** The helpers a checks file is written with. */ export interface GateHelpers { PASS(detail: string): CheckResult; FAIL(detail: string): CheckResult; PART(detail: string): CheckResult; UNKNOWN(detail: string): CheckResult; exists(rel: string): boolean; read(rel: string): string; listFiles(rel: string, test: (name: string, path: string) => boolean): string[]; file(rel: string): CheckResult; committed(rel: string): CheckResult; contains(rel: string, needle: string | RegExp, label?: string): CheckResult; lacks(rel: string, needle: string | RegExp, label?: string): CheckResult; script(pkgRel: string, name: string): CheckResult; loads(rel: string): Promise; ci(script: string | RegExp): CheckResult; ciJob(job: string, script: string): CheckResult; hook(settingsRel: string, needle: string): CheckResult; json(rel: string, test?: (data: unknown) => boolean, label?: string): CheckResult; lint(probe: LintProbe): Promise; protectedBranch(pattern: RegExp): CheckResult; gh(args: string[], label: string): CheckResult; share(files: string[], test: (file: string) => boolean, label: string): CheckResult; /** Build the catalogue of the app in `appDir` (UIG-13): passes when every part is described and sorted. */ catalogue(appDir: string): Promise; /** Every reusable part keeps the usage-page contract (UIG-19): the package's one copy of it. */ contract(appDir: string): Promise; /** * What loads into every Claude session stays small (UIG-21): `CLAUDE.md` and * every file it imports with `@` come to fewer than `limit` lines, and each * `.claude/rules` file has `paths:`, so it loads only where it applies. */ instructions(limit?: number): CheckResult; } export interface GateCheck { what: string; run: () => Maybe; aggregate?: boolean; } export interface GateTicket { ref: string; title?: string; owner: boolean; checks: GateCheck[]; } export interface TicketListEntry { ref: string; owner: string; title: string; parts?: string[]; aggregate?: boolean; /** Moved to the next phase, and by whose ruling: still checked, shown ⏭, and not waited for by the aggregate. */ later?: string; } export interface GateSpec { repo: string; tickets: GateTicket[]; /** estiva-ui only: every ticket, and the repos it joins in. */ all?: TicketListEntry[]; /** estiva-ui only: the repos beside it. `app` is the folder its app sits in, when not the top. */ siblings?: { name: string; path: string; env: string; app?: string; }[]; } /** What a report says ran it. A copy of the old script reports a hash instead. */ export declare const ENGINE: string; /** The helpers, bound to one repository. */ export declare function helpers(ROOT: string): GateHelpers; /** * How far a checkout is behind its remote's main, after fetching it. Status reads * the checkout, not main: a copy seven commits behind once reported a finished * ticket as not started (audit A4). Empty when it is level; a warning otherwise. */ export declare function behindMain(dir: string): string; export interface StatusOptions { /** The repository to report on. */ root?: string; /** The folder that holds the app, relative to `root`: `.` unless it sits in a folder of its own. */ app?: string; json?: boolean; detail?: boolean; /** List every escape, not only those due for review (B1). */ escapes?: boolean; } /** Print where the project stands. Returns what was printed, or the JSON report. */ export declare function runStatus({ root, app, json, detail, escapes }?: StatusOptions): Promise; export {}; //# sourceMappingURL=status.d.ts.map