import { type ModelRegistry } from "@earendil-works/pi-coding-agent"; import type { Api, AssistantMessage, Model, Usage } from "@earendil-works/pi-ai"; import { type UsageAccount, type UsageLedger } from "./ledger-schema.ts"; import type { CodexUsageSnapshot } from "./payload.ts"; export declare function usageLedgerPath(): string; export declare function usageAccountKey(accountId: string): string; export declare function readUsageLedger(path?: string): UsageLedger; export declare function usageRecordingError(): string | undefined; export declare function updateUsageLedger(key: string, at: number, update: (account: UsageAccount, ledger: UsageLedger) => void, path?: string): Promise; export declare function recordCodexSpend(accountId: string, model: Model, usage: Usage, at?: number): Promise; export declare function recordCodexQuota(snapshot: CodexUsageSnapshot, at?: number): Promise; export declare function recordCodexProxyMessage(message: AssistantMessage, registry: ModelRegistry): Promise; export declare function recordCodexManualReset(key: string): Promise;