import { User } from '@things-factory/auth-base'; import { Domain } from '@things-factory/shell'; /** * One provider request - the metering boundary writes a row each time a model is called (ADR-0061 decision 6, * design/ai/agent-settings.md §6). * * A turn that loops through tools makes several rows. The row is joined to a conversation by id only and is never * copied onto a message. It is written once and never changed, so it has no updater. */ export declare class AiUsage { readonly id: string; domain?: Domain; domainId?: string; agentId?: string; agentDomainId?: string; keyDomainId?: string; provider: string; model: string; modeKind?: string; operation: string; sessionId?: string; inputTokens?: number; cacheReadTokens?: number; cacheWriteTokens?: number; outputTokens?: number; durationMs: number; /** `ok`, or why it failed: key-rejected · rate-limited · provider-error · stopped (on our side). */ outcome: string; /** * The UTC hour the call started in. Usage is grouped by this column, which every database can do; days and months * are rolled up from it in the domain's time zone. */ hourStart: Date; creator?: User; creatorId?: string; createdAt: Date; }