import type { Model } from "@oh-my-pi/pi-ai";
import type { Skill } from "../../extensibility/skills.js";
import type { AgentSession } from "../../session/agent-session.js";
import { type SnapcompactSavingsEstimate } from "../../session/snapcompact-inline.js";
import type { Tool } from "../../tools/index.js";
import type { theme as Theme } from "../theme/theme.js";
type CategoryId = "systemPrompt" | "systemContext" | "systemTools" | "skills" | "messages";
interface CategoryInfo {
    id: CategoryId;
    label: string;
    tokens: number;
    color: "accent" | "warning" | "success" | "userMessageText" | "customMessageLabel";
    glyph: string;
}
export interface ContextBreakdown {
    model: Model | undefined;
    contextWindow: number;
    categories: CategoryInfo[];
    usedTokens: number;
    autoCompactBufferTokens: number;
    freeTokens: number;
    /** Estimated snapcompact wire savings; set when requested and a snapcompact.* setting is enabled. */
    snapcompact?: SnapcompactSavingsEstimate;
}
export declare function estimateSkillsTokens(skills: readonly Skill[]): number;
export declare function estimateToolSchemaTokens(tools: ReadonlyArray<Pick<Tool, "name" | "description" | "parameters">>): number;
export declare function computeNonMessageTokens(session: AgentSession): number;
/**
 * Shared helper for the four non-message token totals used by
 * `computeContextBreakdown` (/context panel). Keep this category split stable:
 * the status-line fast path intentionally uses the equivalent collapsed total
 * in `computeNonMessageTokens`.
 */
export declare function computeNonMessageBreakdown(session: AgentSession): {
    skillsTokens: number;
    toolsTokens: number;
    systemContextTokens: number;
    systemPromptTokens: number;
};
/**
 * Compute a breakdown of estimated context usage by category for the active
 * session and model.
 */
export declare function computeContextBreakdown(session: AgentSession, options?: {
    snapcompactSavings?: boolean;
}): ContextBreakdown;
/**
 * Render a colorful context-usage panel as ANSI text. Output is a series of
 * lines pairing the grid (left) with the legend (right).
 */
export declare function renderContextUsage(breakdown: ContextBreakdown, theme: typeof Theme): string;
export {};
