@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
15 lines (14 loc) • 508 B
TypeScript
/**
* Tool Use/Result Pair Repair
*
* After compaction, validates that every tool_use (tool_call) has a
* corresponding tool_result and vice versa. Inserts synthetic
* placeholders for orphaned entries.
*/
import type { ChatMessage, RepairResult } from "../types/index.js";
/**
* Repair orphaned tool_use/tool_result pairs in a message array.
*
* Ensures every tool_call has a following tool_result and vice versa.
*/
export declare function repairToolPairs(messages: ChatMessage[]): RepairResult;