export interface AuditSessionLike { run(query: string, params?: Record): Promise<{ records: Array<{ get(key: string): unknown; }>; }>; } export interface RedundantSeatFinding { accountId: string; adminUserId: string; } /** The redundant-seat invariant, read side: an AdminUser on a client account is a * redundant operator seat unless it is the owner. admin-add seats carry no * au.role, so the predicate is not-the-owner, never a role:'admin' match. */ export declare function isRedundantOperatorSeat(role: string | null): boolean; /** One alarm line per flagged seat; ids truncated to 8 for readability. */ export declare function formatRedundantSeatLine(f: RedundantSeatFinding): string; /** Return every non-owner AdminUser seated on the given client accounts. One * round-trip: the cypher returns all AdminUser{accountId} rows for the client * ids and the not-owner filter is applied in JS (same predicate the audit * exposes). Empty input issues no query. */ export declare function auditRedundantOperatorSeats(session: AuditSessionLike, clientIds: string[]): Promise; export interface RedundantSeatAuditDeps { neo4jUri: string; neo4jUser: string; neo4jPassword: string; accountsRoot: string; logger: (line: string) => void; } /** Run one audit pass and log an alarm line per flagged seat. Best-effort Neo4j: * absent env or an unreachable/erroring read logs `op=unavailable` and never * throws. A clean pass logs a single `op=ok` line so the audit's own liveness is * visible. */ export declare function emitRedundantOperatorSeatAudit(deps: RedundantSeatAuditDeps): Promise; export interface RedundantSeatAudit { start(): void; stop(): void; } /** Standing periodic audit. Unref'd interval so it never holds the process open; * each tick re-emits best-effort. */ export declare function createRedundantOperatorSeatAudit(deps: RedundantSeatAuditDeps & { intervalMs: number; }): RedundantSeatAudit; //# sourceMappingURL=redundant-operator-seat-audit.d.ts.map