import type { SessionContext } from "@opencode/plugin/promise/session"; export declare const sourceLabels: readonly ["Messages", "System Tools", "System Prompt", "Skills", "MCP Tools", "Other"]; export type SourceLabel = typeof sourceLabels[number]; /** A best-effort inventory of the last assembled request, never provider-reported usage. */ export interface ContextSources { capturedAt: number; model: string; tokens: Record; } export declare function estimateContextSources(request: Pick, mcpServers?: readonly string[], capturedAt?: number): ContextSources; export declare function parseContextSources(value: unknown): ContextSources | undefined; export interface BreakdownRow { label: string; tokens: number; percent: number; } /** * Presentation rows for the estimated sources, largest first. Compact mode merges the * two tool families into one `Tools` row and hides empty rows; detailed mode keeps the * six stored labels apart, including zeroes. */ export declare function breakdownRows(sources: ContextSources, detailed: boolean): readonly BreakdownRow[];