/** * Dynamic route derivation + error classification (Phase 3) * * These utilities enable lazy tool discovery — new Godot-side tools can be * called through godot_advanced_tool without MCP-side code changes. */ /** * Convert a tool name to a Godot-side API route. * * Convention: godot_category_action → category/action * Examples: * godot_custom_light_bake → custom/light-bake * godot_terrain_sculpt → terrain/sculpt * godot_animation_play → animation/play * * Only accepts tool names with the 'godot_' prefix. * Returns null for names that don't match. */ export declare function toolNameToRoute(toolName: string): string | null; export type ErrorClass = 'permanent' | 'transient'; /** * Classify an HTTP status code for retry decisions. * * - 4xx (client errors): permanent — don't retry * - 5xx (server errors): transient — retry with backoff * - Other: permanent — conservative default */ export declare function classifyError(status: number): ErrorClass; /** * 判断一个工具调用结果是否表示"路由不存在"(unknown route)。 * * 对标 unity-mcp-server 的 isUnknownRouteResult,兼容多种 GD addon 版本的错误签名: * - HTTP 404 字样(新版 addon 用 HTTP 404 表 unknown route) * - "Unknown route" 字样 * - "Unknown API endpoint" / "Unknown method" / "Unknown command" 字样(更老版本) * * 用途:advanced-proxy 动态路由失败时,区分"路由不存在"(可建议 did-you-mean) * 和"路由存在但执行失败"(不该建议)。 * * @param result 工具调用结果(对象或 Error 或字符串) */ export declare function isUnknownRouteResult(result: unknown): boolean;