import type { ToolResult } from '../types.js'; /** * 统一 Action 响应格式,包含 tool + action 用于调试追溯。 * @phase2 Phase 2 预留 — 统一 Action 路由启用后消费。 */ export interface ActionResult { tool: string; action: string; status: 'ok' | 'error'; data?: unknown; error?: { code: string; message: string; missing_params?: string[]; }; } /** 包装任意返回值为 ActionResult */ export declare function wrapResult(tool: string, action: string, result: unknown): ActionResult; /** 将 ActionResult 转回 MCP ToolResult */ export declare function toToolResult(result: ActionResult): ToolResult; /** 快速创建错误 ActionResult */ export declare function actionError(tool: string, action: string, code: string, message: string, missingParams?: string[]): ActionResult;