/** * Global-scope `cleo.db` — **models.dev catalog SSoT** (`models_catalog`, 1 table). * * E8-CATALOG-CURATION (epic T11694 · task T11733). This table is the queryable, * `cleo health`-visible home for the **provider+model capability catalog** that * today lives only as a disk JSON cache (`llm-catalog/`) and a tiny bundled * `curated-models.json`. Each row is ONE model — its full models.dev wire * capability set (modalities, cost, limits, reasoning/tool-call flags, status, * release date) — so the catalog becomes the SSoT (DB table) with the disk cache * demoted to an offline/degraded fallback MIRROR (T11737). * * It is the catalog half of the "catalog-driven models, NO hardcoded" North Star * spine: the resolver default model derives from this table sorted by * `release_date` DESC (T11944), killing the hardcoded `claude-haiku-4-5` literal — * the static literal survives ONLY as the offline-only last-resort floor when this * table is empty/unseeded. * * ## NOT the `accounts` credential pool — do not confuse the two * * `accounts` (T11709) holds machine-wide LLM CREDENTIALS (the pool the runner picks * from). THIS table holds CATALOG DATA (model capabilities) — no secrets, no * encryption. They share the cleo-global scope and the E10 typing conventions, but * carry orthogonal data. The catalog is freely readable; credentials are sealed. * * ## E10 typing (mirrors sibling `accounts.ts` / `services.ts`) * * - Booleans (`attachment`/`reasoning`/`temperature`/`interleaved`/`tool_call`) use * `integer({mode:'boolean'})` (CHECK `(0, 1)` in the migration). * - `modalities` / `cost` are JSON blobs serialized to TEXT (documented json pattern). * - `release_date` is TEXT `YYYY-MM-DD` with a GLOB date check; `seeded_at` is a TEXT * ISO-8601 timestamp. * - `status` is a named enum ({@link CATALOG_MODEL_STATUSES}, minted in contracts). * * ## Active selection — `release_date`-sorted, latest wins * * The resolver default and any "newest model for provider X" query reads this table * ordered by `(provider_id, release_date DESC)` — the `idx_models_catalog_provider_release` * index backs that scan. No raw partial unique index is required (unlike `accounts`' * active-pointer); `id` is the natural PK and `(provider_id, models_dev_id)` is a * natural unique key for the upsert. * * @task T11733 * @epic T11694 * @see ../../../../migrations/drizzle-cleo-global — the forward migration * @see ../../../llm/catalog-seeder.ts — the seeder that populates this table (T11734) * @see ../../../llm/catalog-resolver.ts — the table-first read chokepoint (T11737) * @see ./accounts.ts — the sibling credential-pool table this directory mirrors */ /** * `models_catalog` — the machine-wide provider+model capability catalog table. * * One row per model. The catalog SSoT: seeded from the shipped offline * `curated-catalog.json` (T11734), read table-first via `resolveCatalogEntry()` * (T11737), and consulted by the resolver default (latest `release_date` wins — * T11944). `id` is the model id (PK); `(provider_id, models_dev_id)` is the natural * upsert key. * * @task T11733 */ export declare const modelsCatalog: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{ name: "models_catalog"; schema: undefined; columns: { id: import("drizzle-orm/sqlite-core").SQLiteColumn<{ name: string; tableName: "models_catalog"; dataType: "string"; data: string; driverParam: string; notNull: true; hasDefault: false; isPrimaryKey: true; isAutoincrement: false; hasRuntimeDefault: false; enumValues: [string, ...string[]]; baseColumn: never; identity: undefined; generated: undefined; }, {}>; providerId: import("drizzle-orm/sqlite-core").SQLiteColumn<{ name: string; tableName: "models_catalog"; dataType: "string"; data: string; driverParam: string; notNull: true; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: [string, ...string[]]; baseColumn: never; identity: undefined; generated: undefined; }, {}>; name: import("drizzle-orm/sqlite-core").SQLiteColumn<{ name: string; tableName: "models_catalog"; dataType: "string"; data: string; driverParam: string; notNull: true; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: [string, ...string[]]; baseColumn: never; identity: undefined; generated: undefined; }, {}>; family: import("drizzle-orm/sqlite-core").SQLiteColumn<{ name: string; tableName: "models_catalog"; dataType: "string"; data: string; driverParam: string; notNull: true; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: [string, ...string[]]; baseColumn: never; identity: undefined; generated: undefined; }, {}>; attachment: import("drizzle-orm/sqlite-core").SQLiteColumn<{ name: string; tableName: "models_catalog"; dataType: "boolean"; data: boolean; driverParam: number; notNull: true; hasDefault: true; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: undefined; baseColumn: never; identity: undefined; generated: undefined; }, {}>; reasoning: import("drizzle-orm/sqlite-core").SQLiteColumn<{ name: string; tableName: "models_catalog"; dataType: "boolean"; data: boolean; driverParam: number; notNull: true; hasDefault: true; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: undefined; baseColumn: never; identity: undefined; generated: undefined; }, {}>; temperature: import("drizzle-orm/sqlite-core").SQLiteColumn<{ name: string; tableName: "models_catalog"; dataType: "boolean"; data: boolean; driverParam: number; notNull: true; hasDefault: true; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: undefined; baseColumn: never; identity: undefined; generated: undefined; }, {}>; interleaved: import("drizzle-orm/sqlite-core").SQLiteColumn<{ name: string; tableName: "models_catalog"; dataType: "boolean"; data: boolean; driverParam: number; notNull: true; hasDefault: true; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: undefined; baseColumn: never; identity: undefined; generated: undefined; }, {}>; toolCall: import("drizzle-orm/sqlite-core").SQLiteColumn<{ name: string; tableName: "models_catalog"; dataType: "boolean"; data: boolean; driverParam: number; notNull: true; hasDefault: true; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: undefined; baseColumn: never; identity: undefined; generated: undefined; }, {}>; modalities: import("drizzle-orm/sqlite-core").SQLiteColumn<{ name: string; tableName: "models_catalog"; dataType: "string"; data: string; driverParam: string; notNull: true; hasDefault: true; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: [string, ...string[]]; baseColumn: never; identity: undefined; generated: undefined; }, {}>; cost: import("drizzle-orm/sqlite-core").SQLiteColumn<{ name: string; tableName: "models_catalog"; dataType: "string"; data: string; driverParam: string; notNull: true; hasDefault: true; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: [string, ...string[]]; baseColumn: never; identity: undefined; generated: undefined; }, {}>; contextLimit: import("drizzle-orm/sqlite-core").SQLiteColumn<{ name: string; tableName: "models_catalog"; dataType: "number int53"; data: number; driverParam: number; notNull: false; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: undefined; baseColumn: never; identity: undefined; generated: undefined; }, {}>; outputLimit: import("drizzle-orm/sqlite-core").SQLiteColumn<{ name: string; tableName: "models_catalog"; dataType: "number int53"; data: number; driverParam: number; notNull: false; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: undefined; baseColumn: never; identity: undefined; generated: undefined; }, {}>; status: import("drizzle-orm/sqlite-core").SQLiteColumn<{ name: string; tableName: "models_catalog"; dataType: "string enum"; data: "stable" | "beta" | "preview" | "deprecated" | "retired"; driverParam: string; notNull: true; hasDefault: true; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: ["stable", "beta", "preview", "deprecated", "retired"]; baseColumn: never; identity: undefined; generated: undefined; }, {}>; releaseDate: import("drizzle-orm/sqlite-core").SQLiteColumn<{ name: string; tableName: "models_catalog"; dataType: "string"; data: string; driverParam: string; notNull: true; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: [string, ...string[]]; baseColumn: never; identity: undefined; generated: undefined; }, {}>; modelsDevId: import("drizzle-orm/sqlite-core").SQLiteColumn<{ name: string; tableName: "models_catalog"; dataType: "string"; data: string; driverParam: string; notNull: true; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: [string, ...string[]]; baseColumn: never; identity: undefined; generated: undefined; }, {}>; source: import("drizzle-orm/sqlite-core").SQLiteColumn<{ name: string; tableName: "models_catalog"; dataType: "string"; data: string; driverParam: string; notNull: true; hasDefault: true; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: [string, ...string[]]; baseColumn: never; identity: undefined; generated: undefined; }, {}>; seededAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{ name: string; tableName: "models_catalog"; dataType: "string"; data: string; driverParam: string; notNull: true; hasDefault: true; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: [string, ...string[]]; baseColumn: never; identity: undefined; generated: undefined; }, {}>; }; dialect: "sqlite"; }>; /** Row type for `models_catalog` SELECT queries. */ export type ModelsCatalogRow = typeof modelsCatalog.$inferSelect; /** Row type for `models_catalog` INSERT/UPSERT operations. */ export type NewModelsCatalogRow = typeof modelsCatalog.$inferInsert; //# sourceMappingURL=models-catalog.d.ts.map