/** * v0.5 §5.6 — token usage → USD conversion for the Author loop budget envelope. * * Anthropic 2026 list pricing (per MTok): * opus-4-7 input $15.00 output $75.00 * sonnet-4-6 input $3.00 output $15.00 * haiku-4-5 input $0.80 output $4.00 * * Cache pricing follows the Anthropic standard: * cache_creation_input_tokens — 1.25× base input * cache_read_input_tokens — 0.10× base input * * The Author loop calls `usdFromUsage` after each Claude API response and * appends the result to `/memory/author-costs.jsonl` (see * `author-budget.ts`). The number is intentionally not rounded — callers * that want a display-ready string format upstream. */ export type CostModel = "opus-4-7" | "sonnet-4-6" | "haiku-4-5"; export interface UsageBreakdown { input_tokens: number; output_tokens: number; cache_creation_input_tokens?: number; cache_read_input_tokens?: number; } export declare function usdFromUsage(usage: UsageBreakdown, model: CostModel): number; /** Exposed for tests / diagnostics — list of supported model ids. */ export declare function supportedModels(): CostModel[];