import type { Memory } from '@mastra/memory';
import { Logger } from '@n8n/backend-common';
import { GlobalConfig } from '@n8n/config';
import type { ModelConfig } from '@n8n/instance-ai';
import { TypeORMMemoryStorage } from './storage/typeorm-memory-storage';
export declare class InstanceAiCompactionService {
    private readonly logger;
    private readonly memoryStorage;
    private readonly maxContextWindowTokensCap;
    constructor(logger: Logger, memoryStorage: TypeORMMemoryStorage, globalConfig: GlobalConfig);
    prepareCompactedContext(threadId: string, memory: Memory, modelId: ModelConfig, lastMessages: number, compactionThreshold?: number): Promise<string | null>;
    private getCachedSummaryBlock;
    private extractRawText;
    private extractHighSignalContent;
    private extractTextFromContent;
    private formatSummaryBlock;
    private parseMetadata;
    private saveMetadata;
}
