Skip to main content Module usage Copy item path Source HookExecution A single hook execution event from a type: "attachment" JSONL record
where attachment.type == "hook_success". ModelPricing Pricing per 1M tokens (USD) by model family. ParsedJsonl Combined result from parsing a single JSONL file. SessionUsage Usage summary for a single session, returned to the frontend status bar. UsageEntry Flat row representing a single completed assistant turn. WEB_SEARCH_COST_PER_REQUEST Flat fee per Anthropic web-search server-tool request ($10 per 1,000 = $0.01). context_window_for_model cost_for_entry Single source of truth for per-turn cost (USD), used by both the live status
bar (reduce_session) and the Usage page (commands::usage). encode_project_path Encode a project path the same way Claude Code does. fast_multiplier_for_model Fast-mode (research preview) cost multiplier, applied to the entire token
cost line when usage.speed == "fast". Fast mode is Opus-only and its
premium varies by version (confirmed Anthropic pricing, 2026-09): find_current_session_jsonl Find the JSONL file for the current session by looking up Claude Code’s
active sessions directory, matching on project path.
Falls back to finding the newest JSONL created after spawned_at. parse_jsonl_entries Parse a single JSONL file into one UsageEntry per unique message.id. pricing_for_entry Per-turn rates: pricing_for_model, except Haiku 5.5+ turns whose prompt
(input + cache reads + cache writes) exceeds 100k tokens, which bill the
long-prompt tier. Unverified: Anthropic’s pricing page doesn’t say which
token classes count toward the threshold. pricing_for_model Hardcoded as of 2026-10. Requires a code change + release when Anthropic updates pricing. reduce_session Reduce a list of UsageEntry for a single session into a SessionUsage.