import { Message } from './session.js'; export interface ISummarizer { summarize(messages: readonly Message[]): Promise; } export interface TruncatingSummarizerOptions { /** Approximate maximum characters of summary output. Default: 2000. */ maxChars?: number; } export declare class TruncatingSummarizer implements ISummarizer { private readonly maxChars; constructor(options?: TruncatingSummarizerOptions); summarize(messages: readonly Message[]): Promise; } export interface AnthropicSummarizerOptions { apiKey?: string; model?: string; endpoint?: string; timeoutMs?: number; } export declare class AnthropicSummarizer implements ISummarizer { private readonly apiKey; private readonly model; private readonly endpoint; private readonly timeoutMs; constructor(options?: AnthropicSummarizerOptions); summarize(messages: readonly Message[]): Promise; } export interface GoogleAISummarizerOptions { apiKey?: string; model?: string; endpoint?: string; timeoutMs?: number; } export declare class GoogleAISummarizer implements ISummarizer { private readonly apiKey; private readonly model; private readonly endpoint; private readonly timeoutMs; constructor(options?: GoogleAISummarizerOptions); summarize(messages: readonly Message[]): Promise; } /** * Pick an ISummarizer based on available credentials: * 1. OrcaRouter credential + a selected model → OrcaRouterSummarizer * 2. ANTHROPIC_API_KEY → AnthropicSummarizer * 3. GOOGLE_AI_API_KEY → GoogleAISummarizer * 4. fallback → TruncatingSummarizer (no network, no key) * * Anthropic sits second because this project is Claude-adjacent; users * who prefer Gemini can either unset ANTHROPIC_API_KEY or construct * GoogleAISummarizer directly. * * ORCAROUTER IS OPT-IN, not a fallback. It is selected only when the user has * both connected an OrcaRouter credential AND chosen a model for optimizer * calls, so a machine that merely happens to have a key in its environment * does not silently start routing summaries through a gateway nobody selected. * The credential itself is resolved by the shared seam, so a pasted key and a * PKCE-issued one behave identically here. */ export declare function createSummarizerFromEnv(): ISummarizer; //# sourceMappingURL=summarization.d.ts.map