import { BaseCompressor, CompressionConfig, CompressionResult } from "./BaseCompressor.js";
import { ModelSettings } from "@inkeep/agents-core";

//#region src/domains/run/services/MidGenerationCompressor.d.ts

/**
 * Mid-generation compressor
 * Compresses context when generate() steps get too large with manual compression support
 */
declare class MidGenerationCompressor extends BaseCompressor {
  private shouldCompress;
  private lastProcessedMessageIndex;
  constructor(sessionId: string, conversationId: string, tenantId: string, projectId: string, config?: CompressionConfig, summarizerModel?: ModelSettings, baseModel?: ModelSettings);
  /**
   * Get compression type for this compressor
   */
  getCompressionType(): 'mid_generation';
  /**
   * Manual compression request from LLM tool
   */
  requestManualCompression(reason?: string): void;
  /**
   * Check if compression is needed (either automatic or manual)
   * Supports manual compression requests unique to mid-generation
   */
  isCompressionNeeded(messages: any[]): boolean;
  /**
   * Perform mid-generation compression with incremental processing
   * Uses base class functionality with mid-generation specific logic
   */
  compress(messages: any[]): Promise<CompressionResult>;
  /**
   * Get current state for debugging
   */
  getState(): {
    shouldCompress: boolean;
    lastProcessedMessageIndex: number;
    config: CompressionConfig;
    processedToolCalls: string[];
    cumulativeSummary: {
      type: "conversation_summary_v1";
      high_level: string;
      user_intent: string;
      decisions: string[];
      open_questions: string[];
      next_steps: {
        for_agent: string[];
        for_user: string[];
      };
      session_id?: string | null | undefined;
      related_artifacts?: {
        id: string;
        name: string;
        tool_name: string;
        tool_call_id: string;
        content_type: string;
        key_findings: string[];
      }[] | undefined;
    } | null;
  };
}
//#endregion
export { MidGenerationCompressor };