/** * Global-scope `cleo.db` — consolidated **telemetry** domain. * * Part of the consolidated GLOBAL-scope `cleo.db` target shape. Per ADR-090 §2.3 * the two telemetry tables (`telemetry_events`, `telemetry_schema_meta`) are * machine-wide command telemetry — a CROSS-PROJECT signal — so they reside in the * GLOBAL `cleo.db` (`$XDG_DATA_HOME/cleo/cleo.db`), not the per-project file. They * were relocated here from `cleo-project/telemetry.ts` by T11540 (the deferred * residency move recorded in ADR-090 §2.3); the physical DDL is unchanged so the * exodus cutover (T11248) emits zero drift versus the prior project-scope shape. * * Physical names carry the `telemetry_` domain prefix (already present in the * source, so the idempotent prefixer is a no-op here: a table already carrying a * recognized domain prefix is NOT double-prefixed, per AC1). The live runtime * module `schema/telemetry-schema.ts` (the standalone, already-global * `telemetry.db`) is unchanged until the exodus migration deploys this shape. * * ## E10 typing applied * * - **§4 timestamps:** `telemetry_events.timestamp` is the canonical TEXT * ISO8601 form (`datetime('now')`); no epoch non-conformer in this domain. * - **No boolean / enum / JSON columns** — `exit_code` is a numeric LAFS code * (not a 0/1 boolean flag), so it stays plain `integer` per the audit. * - **`telemetry_schema_meta`** is the canonical two-column KV shape, so it is * built from the shared {@link makeSchemaMetaTable} factory (T11543) — the * single source of the `{ key TEXT PK, value TEXT NOT NULL }` DDL across every * domain. The emitted DDL is byte-identical to the prior inline definition. * * @task T11540 * @epic T11535 * @saga T11242 * @see .cleo/rcasd/adr-090-nexus-graph-residency-split.md §2.3 (telemetry → GLOBAL) * @see ../schema-utils.ts — re-exported as {@link makeSchemaMetaTable} (T11543 factory) * @see docs/migration/sqlite-schema-canonical.md §1 (D1″) · §4 * @see docs/migration/sqlite-schema-columns.json (per-column affinity SSoT) */ /** * `telemetry_events` — one row per command invocation captured by the * telemetry middleware (anonymous, opt-in). Already domain-prefixed; the * idempotent prefixer leaves the name as-is. * * @task T11540 (residency move · target shape) · T11360 (prior project-scope authoring) · T624 (original) */ export declare const telemetryEvents: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{ name: "telemetry_events"; schema: undefined; columns: { id: import("drizzle-orm/sqlite-core").SQLiteColumn<{ name: string; tableName: "telemetry_events"; 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; }, {}>; anonymousId: import("drizzle-orm/sqlite-core").SQLiteColumn<{ name: string; tableName: "telemetry_events"; 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; }, {}>; domain: import("drizzle-orm/sqlite-core").SQLiteColumn<{ name: string; tableName: "telemetry_events"; 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; }, {}>; gateway: import("drizzle-orm/sqlite-core").SQLiteColumn<{ name: string; tableName: "telemetry_events"; 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; }, {}>; operation: import("drizzle-orm/sqlite-core").SQLiteColumn<{ name: string; tableName: "telemetry_events"; 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; }, {}>; command: import("drizzle-orm/sqlite-core").SQLiteColumn<{ name: string; tableName: "telemetry_events"; 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; }, {}>; exitCode: import("drizzle-orm/sqlite-core").SQLiteColumn<{ name: string; tableName: "telemetry_events"; dataType: "number int53"; data: number; driverParam: number; notNull: true; hasDefault: true; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: undefined; baseColumn: never; identity: undefined; generated: undefined; }, {}>; durationMs: import("drizzle-orm/sqlite-core").SQLiteColumn<{ name: string; tableName: "telemetry_events"; dataType: "number int53"; data: number; driverParam: number; notNull: true; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: undefined; baseColumn: never; identity: undefined; generated: undefined; }, {}>; errorCode: import("drizzle-orm/sqlite-core").SQLiteColumn<{ name: string; tableName: "telemetry_events"; dataType: "string"; data: string; driverParam: string; notNull: false; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: [string, ...string[]]; baseColumn: never; identity: undefined; generated: undefined; }, {}>; timestamp: import("drizzle-orm/sqlite-core").SQLiteColumn<{ name: string; tableName: "telemetry_events"; 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"; }>; /** * `telemetry_schema_meta` — key-value schema-version tracking (single row). * * Built from the shared {@link makeSchemaMetaTable} factory (T11543) so the * canonical `{ key TEXT PRIMARY KEY, value TEXT NOT NULL }` shape never drifts * across domains; the emitted DDL is identical to the prior inline definition. * * @task T11540 (residency move · target shape) · T11543 (factory) · T624 (original) */ export declare const telemetrySchemaMeta: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{ name: string; schema: undefined; columns: { readonly key: import("drizzle-orm/sqlite-core").SQLiteColumn<{ name: string; tableName: string; 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; }, {}>; readonly value: import("drizzle-orm/sqlite-core").SQLiteColumn<{ name: string; tableName: string; 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; }, {}>; }; dialect: "sqlite"; }>; /** Row type for `telemetry_events` SELECT queries (target shape). */ export type TelemetryEventRow = typeof telemetryEvents.$inferSelect; /** Row type for `telemetry_events` INSERT operations (target shape). */ export type NewTelemetryEventRow = typeof telemetryEvents.$inferInsert; /** Row type for `telemetry_schema_meta` SELECT queries (target shape). */ export type TelemetrySchemaMetaRow = typeof telemetrySchemaMeta.$inferSelect; /** Row type for `telemetry_schema_meta` INSERT operations (target shape). */ export type NewTelemetrySchemaMetaRow = typeof telemetrySchemaMeta.$inferInsert; //# sourceMappingURL=telemetry.d.ts.map