import type { SqliteAdapter as Database } from '../db/sqlite-adapter.js'; type BriefPeriod = 'today' | 'week'; export interface BriefTotals { sessions: number; requests: number; input_tokens: number; output_tokens: number; cache_read_tokens: number; cache_create_tokens: number; cache_create_5m_tokens: number; cache_create_1h_tokens: number; total_tokens: number; cost_usd: number; last_active: string | null; } export interface BriefPeriodSummary extends BriefTotals { label: string; period: BriefPeriod | 'since'; since?: string; } export interface BriefMachineRow extends BriefTotals { machine_id: string; last_data_at: string | null; last_data_age: string; } export interface BriefAgentRow extends BriefTotals { agent: string; } export interface BriefAccountRow extends BriefTotals { account_key: string; account_tool: string; account_name: string; account_email: string | null; account_source: string; } export interface BriefFreshnessMachine { machine_id: string; max_request_at: string | null; request_age: string; last_merge_sync_at: string | null; merge_sync_age: string; } export interface EconomyBrief { generated_at: string; machine: string; since: { input: string; timestamp: string; label: string; }; summaries: BriefPeriodSummary[]; machines: BriefMachineRow[]; agents: BriefAgentRow[]; accounts: BriefAccountRow[]; freshness: { machines: BriefFreshnessMachine[]; max_request_line: string; merge_sync_line: string; }; } export interface BriefOptions { since?: string; machine?: string; now?: Date; currentMachineId?: string; localSyncAt?: Date; } /** Human-readable age of a timestamp relative to now (never/<1m/Nm/Nh/Nd). */ export declare function formatAge(timestamp: string | null | undefined, now: Date): string; export declare function buildBrief(db: Database, opts?: BriefOptions): EconomyBrief; export {}; //# sourceMappingURL=brief.d.ts.map