export interface ReconcileCounts { strayTopLevel: number; overDeep: number; badName: number; } export interface ReconcileResult extends ReconcileCounts { /** The account-root entries counted as strays, by name — the same set * strayTopLevel counts, so PROTECTED_TOP_LEVEL entries and dot-prefixed * entries are absent from it, and an account that failed the SCHEMA.md * fail-open check returns it empty. A count alone cannot distinguish six * pieces of debris from a live plugin config; this list is what makes the * report-only posture actionable. */ strayNames: string[]; } /** The single per-run summary line body. A non-zero count is the standing signal * that an agent authored folders the hard guards could not prevent. Pure * formatter so the emitter and its test share one wording. */ export declare function formatReconcileLine(c: ReconcileCounts, homeMissing?: number, homeUnaudited?: number, agentDrift?: number): string; /** Parse the fenced ```allowed-top-level block from an account's SCHEMA.md — * the same structured set fs-schema-guard.sh parses with awk. Returns the * entry names (blank lines dropped). An absent block yields an empty set. */ export declare function parseAllowedTopLevel(schemaText: string): Set; /** Reconcile one account dir. Reads its SCHEMA.md allowed set; an absent/empty * set skips the account (fail open, like the hook — an un-seeded legacy account * must not have its whole root reported as stray). Counts and names stray * top-level entries; counts over-deep files and bad names. Moves nothing. */ export declare function reconcileAccount(accountDir: string): ReconcileResult; export interface ReconcileDeps { accountsRoot: string; logger: (line: string) => void; } /** One reconcile pass over every account under the accounts root: one op=strays * line naming the unaccounted-for entries of each account that has any, then the * single summary line. An account is any child dir with an account.json (the * account marker the census uses). Per-account errors are swallowed so one bad * account never aborts the run. * * The op=strays line is the standing signal. When a feature that reads an * account-root file goes dark, seeing that file named here says the schema does * not account for it and it is still on disk, so declare it. The absence of its * name reads as "gone" only for a file that could have been named at all: an * entry in PROTECTED_TOP_LEVEL, a dot-prefixed entry, and every entry of an * account whose SCHEMA.md is missing or has an empty allowed block are never * named whether they are present or not. Check the account root itself before * concluding a file is gone. */ export declare function runReconcile(deps: ReconcileDeps): void; export interface AccountDirSchemaReconcile { start(): void; stop(): void; } /** Standing periodic reconcile. Unref'd interval so it never holds the process * open; each tick re-runs the pass best-effort. */ export declare function createAccountDirSchemaReconcile(deps: ReconcileDeps & { intervalMs: number; }): AccountDirSchemaReconcile; //# sourceMappingURL=account-dir-schema-reconcile.d.ts.map