import { z } from "zod"; /** * INV-1 (canonical-writer) enforcement config, per proposal 001 §6 and * Proposal 006 A6. Lives in the TARGET repo (Proposal 010 §1.2: * `.loopgraph/config.json`) so the engine hard-codes NO business paths — it * only provides the generic "guarded-column write-site scan + location * allowlist" primitive; which tables/columns are guarded and which paths may * write them is data supplied here. * * Shipped as JSON (not the plan's `loopgraph.config.ts`) deliberately: T0 must * stay <5s and must not compile TypeScript in its hot path, and JSON needs no * TS-loader dependency. How config ultimately lands in the target repo (`.ts` vs `.json`, * repo location) is a GATE-1 (A8) decision — A6 does not pre-empt it. */ export declare const GuardedTableConfig: z.ZodObject<{ /** Guarded state columns (drizzle property names), e.g. ["status"]. */ columns: z.ZodArray; /** Repo-relative path prefixes whose files MAY write these columns (the canonical writer). */ allowlist: z.ZodArray; }, "strip", z.ZodTypeAny, { columns: string[]; allowlist: string[]; }, { columns: string[]; allowlist: string[]; }>; export type GuardedTableConfig = z.infer; export declare const Inv1Config: z.ZodObject<{ /** Keyed by the drizzle table identifier as written in code (e.g. `runs`, `sessions`). */ guardedTables: z.ZodRecord; /** Repo-relative path prefixes whose files MAY write these columns (the canonical writer). */ allowlist: z.ZodArray; }, "strip", z.ZodTypeAny, { columns: string[]; allowlist: string[]; }, { columns: string[]; allowlist: string[]; }>>; /** Alias identifier → canonical guarded-table identifier (for `import { runs as runsTable }`). */ aliases: z.ZodDefault>; /** * Path prefixes where a dynamic-table `update().set(...)` is known to be * a table-agnostic generic primitive (e.g. `packages/db`), so it is NOT * surfaced as unanalyzable. Everything else dynamic outside the allowlist is. */ unanalyzableExceptions: z.ZodDefault>; }, "strip", z.ZodTypeAny, { guardedTables: Record; aliases: Record; unanalyzableExceptions: string[]; }, { guardedTables: Record; aliases?: Record | undefined; unanalyzableExceptions?: string[] | undefined; }>; export type Inv1Config = z.infer; export interface LoadInv1ConfigResult { /** Parsed config, or undefined when no config file is present (INV-1 simply not run). */ config?: Inv1Config; /** Set when a config file exists but is malformed — a loud error, not a silent skip. */ error?: string; } /** * Proposal 010 §1.2: moved from repo-root `loopgraph.config.json` to * `.loopgraph/config.json` (the unified per-target namespace — model, config, * adapter, agent kit, and side-channel all live under one directory). */ export declare const INV1_CONFIG_RELATIVE_PATH: string; /** Loads and validates `/.loopgraph/config.json`. Absent file → `{}` (skip); present+invalid → `{error}`. */ export declare function loadInv1Config(dir: string): Promise; //# sourceMappingURL=config.d.ts.map