UNPKG

@juspay/neurolink

Version:

Universal AI Development Platform with working MCP integration, multi-provider support, voice (TTS/STT/realtime), and professional CLI. 58+ external MCP servers discoverable, multimodal file processing, RAG pipelines. Build, test, and deploy AI applicatio

20 lines (19 loc) 801 B
/** * ContextCompactor * * Orchestrates multi-stage context reduction: * * Stage 1: Tool Output Pruning (cheapest -- no LLM call) * Stage 2: File Read Deduplication (cheap -- no LLM call) * Stage 3: LLM Summarization (expensive -- requires LLM call) * Stage 4: Sliding Window Truncation (fallback -- no LLM call) */ import type { ChatMessage, ConversationMemoryConfig, CompactionResult, CompactionConfig } from "../types/index.js"; export declare class ContextCompactor { private config; constructor(config?: CompactionConfig); /** * Run the multi-stage compaction pipeline until messages fit within budget. */ compact(messages: ChatMessage[], targetTokens: number, memoryConfig?: Partial<ConversationMemoryConfig>, requestId?: string): Promise<CompactionResult>; }