/**
 * CLEO Database Inventory — SSoT type contract + immutable constant.
 *
 * @remarks
 * This module exports the typed shape and the runtime constant for every
 * SQLite database that CLEO manages. The runtime data is sourced from the
 * canonical JSON inventory at `packages/contracts/src/db-inventory.json`
 * via ESM JSON import (`with { type: 'json' }`). The JSON file is the
 * single source of truth; this module re-exposes it with a typed contract.
 *
 * The JSON file is co-located in this package (rather than referencing a
 * sibling-package `src/` path) so that the built `dist/db-inventory.js`
 * resolves the JSON via a relative `./db-inventory.json` import that
 * works inside the published `@cleocode/contracts` npm tarball — sibling
 * package `src/` directories are not shipped to consumers.
 *
 * Downstream consumers:
 *
 * - **T10307 — Fleet survey** (`cleo doctor db-substrate`) iterates `DB_INVENTORY`
 *   to enumerate every DB on disk across project + global tiers.
 * - **T10310 — Pragma drift** validates that every open handle for each role
 *   applies the pragma SSoT (`specs/sqlite-pragmas.json`).
 * - **T10311 — Migration coverage** asserts that each entry's
 *   `migrationsDir` exists and contains a `0000_*` baseline.
 * - **T10312 — Doctor integrity** runs `PRAGMA integrity_check` against
 *   every entry whose tier resolves to a present file on disk.
 * - **T10320 — Cross-DB invariants** uses `ownerPackage` + `tier` to
 *   classify which DBs must agree on shared identifiers (project_id,
 *   agent_id, session_id, ...).
 *
 * Adding a new entry to the inventory is a charter amendment — update
 * `packages/contracts/src/db-inventory.json` AND
 * `.cleo/adrs/ADR-068-cleo-database-charter.md` in the same PR (gated by
 * `cleo check arch` Gate-4 SSoT-EXEMPT lint once T10282 ships its drift
 * check).
 *
 * @see ADR-068 — CLEO Database Charter (canonical narrative)
 * @see Saga T10281 — SG-BRAIN-DB-RESILIENCE (provenance)
 * @see Epic T10282 — E1-DB-INVENTORY (this artifact)
 * @see Research note `sg-brain-db-resilience-deep-audit-2026-05-23`
 *
 * @task T10305
 * @epic T10282
 * @saga T10281
 */
import dbInventoryData from './db-inventory.json' with { type: 'json' };
// Narrow the raw JSON to the typed shape. The runtime parity test
// (`db-inventory.test.ts`) asserts every field is valid for every entry.
const rawInventory = dbInventoryData;
/**
 * Immutable canonical inventory of every CLEO SQLite database.
 *
 * @remarks
 * Sourced from `packages/contracts/src/db-inventory.json` — the SSoT.
 * Adding a new entry is a charter amendment per ADR-068 §"How to add a
 * new database". The {@link db-inventory.test.ts} suite asserts:
 *
 * 1. Every `role` is unique across the array.
 * 2. Every `drizzleSchemaPath` (when non-null) exists on disk.
 * 3. Every `migrationsDir` (when non-null) exists on disk.
 * 4. Every `tier` is a member of the {@link DbTier} union.
 *
 * @example Iterate every project-tier database
 * ```typescript
 * import { DB_INVENTORY } from '@cleocode/contracts';
 *
 * const projectDbs = DB_INVENTORY.filter((entry) => entry.tier === 'project');
 * for (const entry of projectDbs) {
 *   console.log(entry.role, entry.filePathTemplate);
 * }
 * ```
 *
 * @public
 */
export const DB_INVENTORY = rawInventory.entries;
//# sourceMappingURL=db-inventory.js.map