import type { SanitizeRule } from '../types'; /** * 孤立 tool_call 检测规则。 * * 检测场景:assistant 消息包含 tool_call,但后续缺少对应的 tool 消息。 * 问题原因:工具执行被中断或消息持久化失败导致 tool 结果丢失。 * 大多数 LLM API 要求每个 tool_call 必须有对应的 tool 响应。 * 修复策略:为缺失的 tool_call 插入占位符 tool 消息。 * * @example * 输入: [user, assistant(tool_call:A, tool_call:B), tool(A)] // 缺少 tool(B) * 输出: [user, assistant(tool_call:A, tool_call:B), tool(A), tool(B, "Tool execution was interrupted.")] */ export declare const orphanedToolCallRule: SanitizeRule;