import { generateText } from "ai"; import { type ParsedObservation } from "./parser"; /** Configuration for the AI observation compressor. */ export interface CompressorConfig { provider: string; apiKey: string | undefined; model: string; maxTokensPerCompression: number; compressionEnabled: boolean; minOutputLength: number; rateLimitingEnabled: boolean; fallbackProviders?: string[]; } /** * Compresses raw tool output into structured observations using the * Vercel AI SDK. Falls back to a heuristic-based observation * when the AI provider is unavailable or disabled. */ export declare class ObservationCompressor { private model; private config; _generate: typeof generateText; constructor(config: CompressorConfig); /** Maximum input characters sent to the API (~12.5K tokens) */ static readonly MAX_INPUT_LENGTH = 50000; /** * Compress a single tool output into a structured observation. * Returns `null` when compression is disabled, the output is too short, * or the API call fails after retries. */ compress(toolName: string, toolOutput: string, sessionContext?: string): Promise; /** * Compress multiple items sequentially (avoids rate-limit bursts). * Returns a map of `callId -> ParsedObservation | null`. */ compressBatch(items: ReadonlyArray<{ toolName: string; toolOutput: string; callId: string; sessionContext?: string; }>): Promise>; /** * Produce a basic observation from tool metadata when AI compression * is unavailable. */ createFallbackObservation(toolName: string, toolOutput: string): ParsedObservation; isAvailable(): Promise; } //# sourceMappingURL=compressor.d.ts.map