refactor: 拆分 claude-dev-stack 为 windows-dev-stack 和 wsl-dev-stack
将原 claude-dev-stack 目录拆分为独立的 Windows 和 WSL 部署栈,便于分别维护和使用。 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
import { z } from "zod";
|
||||
import { formatErrorForMcp } from "../utils/errors.js";
|
||||
export function registerExportTools(server, godot) {
|
||||
server.tool("list_export_presets", "List all export presets configured in export_presets.cfg", {}, async () => {
|
||||
try {
|
||||
const result = await godot.sendCommand("list_export_presets");
|
||||
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
||||
}
|
||||
catch (e) {
|
||||
return { content: [{ type: "text", text: formatErrorForMcp(e) }], isError: true };
|
||||
}
|
||||
});
|
||||
server.tool("export_project", "Get the export command for a preset (direct export from editor is not supported in Godot 4)", {
|
||||
preset_name: z.string().optional().describe("Export preset name"),
|
||||
preset_index: z.number().optional().describe("Export preset index (alternative to name)"),
|
||||
debug: z.boolean().optional().describe("Debug export (default: true)"),
|
||||
}, async (params) => {
|
||||
try {
|
||||
const result = await godot.sendCommand("export_project", params);
|
||||
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
||||
}
|
||||
catch (e) {
|
||||
return { content: [{ type: "text", text: formatErrorForMcp(e) }], isError: true };
|
||||
}
|
||||
});
|
||||
server.tool("get_export_info", "Get export-related project info (executable path, templates, project path)", {}, async () => {
|
||||
try {
|
||||
const result = await godot.sendCommand("get_export_info");
|
||||
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
||||
}
|
||||
catch (e) {
|
||||
return { content: [{ type: "text", text: formatErrorForMcp(e) }], isError: true };
|
||||
}
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=export-tools.js.map
|
||||
Reference in New Issue
Block a user