import type { MeterConfig, ModelPrice, SpendSummary, UsageEvent, UsageInput } from "./types.js"; export interface RecordResult { event: UsageEvent; price?: ModelPrice; } /** Price a usage input, append it to the ledger, and return the recorded event. */ export declare function recordUsage(input: UsageInput, config?: MeterConfig): RecordResult; export declare function appendEvent(event: UsageEvent, config?: MeterConfig): void; /** Read all ledger events, skipping any malformed lines. */ export declare function readEvents(config?: MeterConfig): UsageEvent[]; /** Aggregate events into totals for today / this month / by model / by session (local time). */ export declare function summarize(events: UsageEvent[], now?: Date): SpendSummary; /** Total spend for a single session id. */ export declare function sessionSpend(events: UsageEvent[], sessionId: string): number;