@baixfeng/godot-mcp-cli 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +187 -0
- package/addons/godot_mcp/command_handler.gd +161 -0
- package/addons/godot_mcp/command_handler.gd.uid +1 -0
- package/addons/godot_mcp/commands/base_command_processor.gd +221 -0
- package/addons/godot_mcp/commands/base_command_processor.gd.uid +1 -0
- package/addons/godot_mcp/commands/debugger_commands.gd +221 -0
- package/addons/godot_mcp/commands/debugger_commands.gd.uid +1 -0
- package/addons/godot_mcp/commands/editor_commands.gd +237 -0
- package/addons/godot_mcp/commands/editor_commands.gd.uid +1 -0
- package/addons/godot_mcp/commands/editor_script_commands.gd +365 -0
- package/addons/godot_mcp/commands/editor_script_commands.gd.uid +1 -0
- package/addons/godot_mcp/commands/input_commands.gd +337 -0
- package/addons/godot_mcp/commands/input_commands.gd.uid +1 -0
- package/addons/godot_mcp/commands/node_commands.gd +222 -0
- package/addons/godot_mcp/commands/node_commands.gd.uid +1 -0
- package/addons/godot_mcp/commands/project_commands.gd +298 -0
- package/addons/godot_mcp/commands/project_commands.gd.uid +1 -0
- package/addons/godot_mcp/commands/scene_commands.gd +337 -0
- package/addons/godot_mcp/commands/scene_commands.gd.uid +1 -0
- package/addons/godot_mcp/commands/script_commands.gd +349 -0
- package/addons/godot_mcp/commands/script_commands.gd.uid +1 -0
- package/addons/godot_mcp/mcp_asset_commands.gd +153 -0
- package/addons/godot_mcp/mcp_asset_commands.gd.uid +1 -0
- package/addons/godot_mcp/mcp_debug_output_publisher.gd +1669 -0
- package/addons/godot_mcp/mcp_debug_output_publisher.gd.uid +1 -0
- package/addons/godot_mcp/mcp_debugger_bridge.gd +1455 -0
- package/addons/godot_mcp/mcp_debugger_bridge.gd.uid +1 -0
- package/addons/godot_mcp/mcp_enhanced_commands.gd +1083 -0
- package/addons/godot_mcp/mcp_enhanced_commands.gd.uid +1 -0
- package/addons/godot_mcp/mcp_input_handler.gd +545 -0
- package/addons/godot_mcp/mcp_input_handler.gd.uid +1 -0
- package/addons/godot_mcp/mcp_runtime_debugger_bridge.gd +464 -0
- package/addons/godot_mcp/mcp_runtime_debugger_bridge.gd.uid +1 -0
- package/addons/godot_mcp/mcp_script_resource_commands.gd +165 -0
- package/addons/godot_mcp/mcp_script_resource_commands.gd.uid +1 -0
- package/addons/godot_mcp/mcp_server.gd +260 -0
- package/addons/godot_mcp/mcp_server.gd.uid +1 -0
- package/addons/godot_mcp/plugin.cfg +7 -0
- package/addons/godot_mcp/runtime_debugger.gd +81 -0
- package/addons/godot_mcp/runtime_debugger.gd.uid +1 -0
- package/addons/godot_mcp/ui/mcp_panel.gd +94 -0
- package/addons/godot_mcp/ui/mcp_panel.gd.uid +1 -0
- package/addons/godot_mcp/ui/mcp_panel.tscn +96 -0
- package/addons/godot_mcp/utils/node_utils.gd +82 -0
- package/addons/godot_mcp/utils/node_utils.gd.uid +1 -0
- package/addons/godot_mcp/utils/resource_utils.gd +81 -0
- package/addons/godot_mcp/utils/resource_utils.gd.uid +1 -0
- package/addons/godot_mcp/utils/script_utils.gd +114 -0
- package/addons/godot_mcp/utils/script_utils.gd.uid +1 -0
- package/addons/godot_mcp/websocket_server.gd +197 -0
- package/addons/godot_mcp/websocket_server.gd.uid +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +561 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +156 -0
- package/dist/index.js.map +1 -0
- package/dist/resources/asset_resources.d.ts +29 -0
- package/dist/resources/asset_resources.js +145 -0
- package/dist/resources/asset_resources.js.map +1 -0
- package/dist/resources/debug_resources.d.ts +11 -0
- package/dist/resources/debug_resources.js +106 -0
- package/dist/resources/debug_resources.js.map +1 -0
- package/dist/resources/debugger_resources.d.ts +62 -0
- package/dist/resources/debugger_resources.js +201 -0
- package/dist/resources/debugger_resources.js.map +1 -0
- package/dist/resources/editor_resources.d.ts +47 -0
- package/dist/resources/editor_resources.js +155 -0
- package/dist/resources/editor_resources.js.map +1 -0
- package/dist/resources/project_resources.d.ts +33 -0
- package/dist/resources/project_resources.js +137 -0
- package/dist/resources/project_resources.js.map +1 -0
- package/dist/resources/scene_resources.d.ts +33 -0
- package/dist/resources/scene_resources.js +160 -0
- package/dist/resources/scene_resources.js.map +1 -0
- package/dist/resources/script_resources.d.ts +51 -0
- package/dist/resources/script_resources.js +203 -0
- package/dist/resources/script_resources.js.map +1 -0
- package/dist/tools/asset_tools.d.ts +5 -0
- package/dist/tools/asset_tools.js +125 -0
- package/dist/tools/asset_tools.js.map +1 -0
- package/dist/tools/debugger_tools.d.ts +2 -0
- package/dist/tools/debugger_tools.js +342 -0
- package/dist/tools/debugger_tools.js.map +1 -0
- package/dist/tools/editor_tools.d.ts +2 -0
- package/dist/tools/editor_tools.js +165 -0
- package/dist/tools/editor_tools.js.map +1 -0
- package/dist/tools/enhanced_tools.d.ts +5 -0
- package/dist/tools/enhanced_tools.js +706 -0
- package/dist/tools/enhanced_tools.js.map +1 -0
- package/dist/tools/input_tools.d.ts +2 -0
- package/dist/tools/input_tools.js +408 -0
- package/dist/tools/input_tools.js.map +1 -0
- package/dist/tools/node_tools.d.ts +5 -0
- package/dist/tools/node_tools.js +217 -0
- package/dist/tools/node_tools.js.map +1 -0
- package/dist/tools/project_tools.d.ts +5 -0
- package/dist/tools/project_tools.js +162 -0
- package/dist/tools/project_tools.js.map +1 -0
- package/dist/tools/scene_tools.d.ts +5 -0
- package/dist/tools/scene_tools.js +260 -0
- package/dist/tools/scene_tools.js.map +1 -0
- package/dist/tools/script_resource_tools.d.ts +5 -0
- package/dist/tools/script_resource_tools.js +5 -0
- package/dist/tools/script_resource_tools.js.map +1 -0
- package/dist/tools/script_tools.d.ts +5 -0
- package/dist/tools/script_tools.js +154 -0
- package/dist/tools/script_tools.js.map +1 -0
- package/dist/utils/godot_connection.d.ts +30 -0
- package/dist/utils/godot_connection.js +285 -0
- package/dist/utils/godot_connection.js.map +1 -0
- package/dist/utils/types.d.ts +16 -0
- package/dist/utils/types.js +2 -0
- package/dist/utils/types.js.map +1 -0
- package/package.json +58 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
12
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
38
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
39
|
+
if (ar || !(i in from)) {
|
|
40
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
41
|
+
ar[i] = from[i];
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
45
|
+
};
|
|
46
|
+
// File: /server/src/index.ts
|
|
47
|
+
import { FastMCP } from 'fastmcp';
|
|
48
|
+
import { nodeTools } from './tools/node_tools.js';
|
|
49
|
+
import { scriptTools } from './tools/script_tools.js';
|
|
50
|
+
import { sceneTools } from './tools/scene_tools.js';
|
|
51
|
+
import { editorTools } from './tools/editor_tools.js';
|
|
52
|
+
import { assetTools } from './tools/asset_tools.js';
|
|
53
|
+
import { enhancedTools } from './tools/enhanced_tools.js';
|
|
54
|
+
import { scriptResourceTools } from './tools/script_resource_tools.js';
|
|
55
|
+
import { debuggerTools } from './tools/debugger_tools.js';
|
|
56
|
+
import { projectTools } from './tools/project_tools.js';
|
|
57
|
+
import { inputTools } from './tools/input_tools.js';
|
|
58
|
+
import { getGodotConnection } from './utils/godot_connection.js';
|
|
59
|
+
// Import resources
|
|
60
|
+
import { sceneListResource, sceneStructureResource, fullSceneTreeResource } from './resources/scene_resources.js';
|
|
61
|
+
import { scriptListResource, scriptByPathResourceTemplate, scriptMetadataResourceTemplate } from './resources/script_resources.js';
|
|
62
|
+
import { projectStructureResource, projectSettingsResource, projectResourcesResource } from './resources/project_resources.js';
|
|
63
|
+
import { editorStateResource, selectedNodeResource, currentScriptResource } from './resources/editor_resources.js';
|
|
64
|
+
import { assetListResource, assetByTypeResourceTemplate } from './resources/asset_resources.js';
|
|
65
|
+
import { debugOutputResource } from './resources/debug_resources.js';
|
|
66
|
+
import { debuggerStateResource, debuggerBreakpointsResource, debuggerCallStackResourceTemplate, debuggerSessionResourceTemplate } from './resources/debugger_resources.js';
|
|
67
|
+
/**
|
|
68
|
+
* Main entry point for the Godot MCP server
|
|
69
|
+
*/
|
|
70
|
+
function main() {
|
|
71
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
72
|
+
var server, allTools, godot, error_1, err, cleanup;
|
|
73
|
+
return __generator(this, function (_a) {
|
|
74
|
+
switch (_a.label) {
|
|
75
|
+
case 0:
|
|
76
|
+
console.error('Starting Enhanced Godot MCP server...');
|
|
77
|
+
server = new FastMCP({
|
|
78
|
+
name: 'EnhancedGodotMCP',
|
|
79
|
+
version: '1.1.0',
|
|
80
|
+
});
|
|
81
|
+
allTools = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], nodeTools, true), scriptTools, true), sceneTools, true), editorTools, true), assetTools, true), enhancedTools, true), projectTools, true), scriptResourceTools, true), debuggerTools, true), inputTools, true);
|
|
82
|
+
allTools.forEach(function (tool) {
|
|
83
|
+
server.addTool(tool);
|
|
84
|
+
console.error("Registered tool: ".concat(tool.name));
|
|
85
|
+
});
|
|
86
|
+
// Register all resources
|
|
87
|
+
server.addResource(sceneListResource);
|
|
88
|
+
server.addResource(scriptListResource);
|
|
89
|
+
server.addResource(projectStructureResource);
|
|
90
|
+
server.addResource(projectSettingsResource);
|
|
91
|
+
server.addResource(projectResourcesResource);
|
|
92
|
+
server.addResource(editorStateResource);
|
|
93
|
+
server.addResource(selectedNodeResource);
|
|
94
|
+
server.addResource(currentScriptResource);
|
|
95
|
+
server.addResource(sceneStructureResource);
|
|
96
|
+
server.addResource(fullSceneTreeResource);
|
|
97
|
+
server.addResource(debugOutputResource);
|
|
98
|
+
server.addResource(assetListResource);
|
|
99
|
+
server.addResource(debuggerStateResource);
|
|
100
|
+
server.addResource(debuggerBreakpointsResource);
|
|
101
|
+
server.addResourceTemplate(scriptByPathResourceTemplate);
|
|
102
|
+
server.addResourceTemplate(scriptMetadataResourceTemplate);
|
|
103
|
+
server.addResourceTemplate(assetByTypeResourceTemplate);
|
|
104
|
+
server.addResourceTemplate(debuggerCallStackResourceTemplate);
|
|
105
|
+
server.addResourceTemplate(debuggerSessionResourceTemplate);
|
|
106
|
+
console.error('All resources and tools registered');
|
|
107
|
+
_a.label = 1;
|
|
108
|
+
case 1:
|
|
109
|
+
_a.trys.push([1, 3, , 4]);
|
|
110
|
+
godot = getGodotConnection();
|
|
111
|
+
return [4 /*yield*/, godot.connect()];
|
|
112
|
+
case 2:
|
|
113
|
+
_a.sent();
|
|
114
|
+
console.error('Successfully connected to Godot WebSocket server');
|
|
115
|
+
return [3 /*break*/, 4];
|
|
116
|
+
case 3:
|
|
117
|
+
error_1 = _a.sent();
|
|
118
|
+
err = error_1;
|
|
119
|
+
console.warn("Could not connect to Godot: ".concat(err.message));
|
|
120
|
+
console.warn('Will retry connection when commands are executed');
|
|
121
|
+
return [3 /*break*/, 4];
|
|
122
|
+
case 4:
|
|
123
|
+
// Start the server
|
|
124
|
+
// Start with stdio transport
|
|
125
|
+
server.start({
|
|
126
|
+
transportType: 'stdio',
|
|
127
|
+
});
|
|
128
|
+
// Start with SSE transport
|
|
129
|
+
// server.start({
|
|
130
|
+
// transportType: 'sse',
|
|
131
|
+
// sse: {
|
|
132
|
+
// endpoint: '/sse',
|
|
133
|
+
// port: 8083
|
|
134
|
+
// }
|
|
135
|
+
// });
|
|
136
|
+
console.error('Enhanced Godot MCP server started');
|
|
137
|
+
console.error('Ready to process commands from Claude or other AI assistants');
|
|
138
|
+
cleanup = function () {
|
|
139
|
+
console.error('Shutting down Enhanced Godot MCP server...');
|
|
140
|
+
var godot = getGodotConnection();
|
|
141
|
+
godot.disconnect();
|
|
142
|
+
process.exit(0);
|
|
143
|
+
};
|
|
144
|
+
process.on('SIGINT', cleanup);
|
|
145
|
+
process.on('SIGTERM', cleanup);
|
|
146
|
+
return [2 /*return*/];
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
// Start the server
|
|
152
|
+
main().catch(function (error) {
|
|
153
|
+
console.error('Failed to start Enhanced Godot MCP server:', error);
|
|
154
|
+
process.exit(1);
|
|
155
|
+
});
|
|
156
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6BAA6B;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,aAAa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@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resource for retrieving asset lists
|
|
3
|
+
*/
|
|
4
|
+
export declare const assetListResource: {
|
|
5
|
+
uri: string;
|
|
6
|
+
name: string;
|
|
7
|
+
mimeType: string;
|
|
8
|
+
load(): Promise<{
|
|
9
|
+
text: string;
|
|
10
|
+
}>;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Template resource for retrieving assets filtered by type.
|
|
14
|
+
*/
|
|
15
|
+
export declare const assetByTypeResourceTemplate: {
|
|
16
|
+
uriTemplate: string;
|
|
17
|
+
name: string;
|
|
18
|
+
mimeType: string;
|
|
19
|
+
arguments: {
|
|
20
|
+
name: "type";
|
|
21
|
+
description: string;
|
|
22
|
+
required: boolean;
|
|
23
|
+
}[];
|
|
24
|
+
load({ type }: {
|
|
25
|
+
type: string;
|
|
26
|
+
}): Promise<{
|
|
27
|
+
text: string;
|
|
28
|
+
}>;
|
|
29
|
+
};
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
12
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
import { getGodotConnection } from '../utils/godot_connection.js';
|
|
38
|
+
var extensionMap = {
|
|
39
|
+
images: ['.png', '.jpg', '.jpeg', '.webp', '.svg', '.bmp', '.tga'],
|
|
40
|
+
audio: ['.ogg', '.mp3', '.wav', '.opus'],
|
|
41
|
+
fonts: ['.ttf', '.otf', '.fnt', '.font'],
|
|
42
|
+
models: ['.glb', '.gltf', '.obj', '.fbx'],
|
|
43
|
+
shaders: ['.gdshader', '.shader'],
|
|
44
|
+
resources: ['.tres', '.res', '.theme', '.material'],
|
|
45
|
+
all: []
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Resource for retrieving asset lists
|
|
49
|
+
*/
|
|
50
|
+
export var assetListResource = {
|
|
51
|
+
uri: 'godot/assets',
|
|
52
|
+
name: 'Asset List',
|
|
53
|
+
mimeType: 'application/json',
|
|
54
|
+
load: function () {
|
|
55
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
56
|
+
var godot, result, files, organizedFiles_1, error_1;
|
|
57
|
+
return __generator(this, function (_a) {
|
|
58
|
+
switch (_a.label) {
|
|
59
|
+
case 0:
|
|
60
|
+
godot = getGodotConnection();
|
|
61
|
+
_a.label = 1;
|
|
62
|
+
case 1:
|
|
63
|
+
_a.trys.push([1, 3, , 4]);
|
|
64
|
+
return [4 /*yield*/, godot.sendCommand('list_project_files', {
|
|
65
|
+
extensions: []
|
|
66
|
+
})];
|
|
67
|
+
case 2:
|
|
68
|
+
result = _a.sent();
|
|
69
|
+
files = result.files || [];
|
|
70
|
+
organizedFiles_1 = {};
|
|
71
|
+
files.forEach(function (file) {
|
|
72
|
+
var parts = file.split('/');
|
|
73
|
+
var current = organizedFiles_1;
|
|
74
|
+
for (var i = 1; i < parts.length - 1; i++) {
|
|
75
|
+
var part = parts[i];
|
|
76
|
+
if (!(part in current)) {
|
|
77
|
+
current[part] = {};
|
|
78
|
+
}
|
|
79
|
+
current = current[part];
|
|
80
|
+
}
|
|
81
|
+
var fileName = parts[parts.length - 1];
|
|
82
|
+
current[fileName] = file;
|
|
83
|
+
});
|
|
84
|
+
return [2 /*return*/, {
|
|
85
|
+
text: JSON.stringify({
|
|
86
|
+
count: files.length,
|
|
87
|
+
files: files,
|
|
88
|
+
organizedFiles: organizedFiles_1
|
|
89
|
+
})
|
|
90
|
+
}];
|
|
91
|
+
case 3:
|
|
92
|
+
error_1 = _a.sent();
|
|
93
|
+
console.error('Error fetching asset list:', error_1);
|
|
94
|
+
throw error_1;
|
|
95
|
+
case 4: return [2 /*return*/];
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* Template resource for retrieving assets filtered by type.
|
|
103
|
+
*/
|
|
104
|
+
export var assetByTypeResourceTemplate = {
|
|
105
|
+
uriTemplate: 'godot/assets/{type}',
|
|
106
|
+
name: 'Typed Asset List',
|
|
107
|
+
mimeType: 'application/json',
|
|
108
|
+
arguments: [
|
|
109
|
+
{
|
|
110
|
+
name: 'type',
|
|
111
|
+
description: 'Asset category (images, audio, fonts, models, shaders, resources, all)',
|
|
112
|
+
required: true
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
load: function (_a) {
|
|
116
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
117
|
+
var godot, incomingType, validTypes, assetType, result, error_2;
|
|
118
|
+
var type = _b.type;
|
|
119
|
+
return __generator(this, function (_c) {
|
|
120
|
+
switch (_c.label) {
|
|
121
|
+
case 0:
|
|
122
|
+
godot = getGodotConnection();
|
|
123
|
+
_c.label = 1;
|
|
124
|
+
case 1:
|
|
125
|
+
_c.trys.push([1, 3, , 4]);
|
|
126
|
+
incomingType = (type !== null && type !== void 0 ? type : 'all').toLowerCase();
|
|
127
|
+
validTypes = ['images', 'audio', 'fonts', 'models', 'shaders', 'resources', 'all'];
|
|
128
|
+
assetType = (validTypes.includes(incomingType) ? incomingType : 'all');
|
|
129
|
+
return [4 /*yield*/, godot.sendCommand('list_assets_by_type', { type: assetType })];
|
|
130
|
+
case 2:
|
|
131
|
+
result = _c.sent();
|
|
132
|
+
return [2 /*return*/, {
|
|
133
|
+
text: JSON.stringify(result)
|
|
134
|
+
}];
|
|
135
|
+
case 3:
|
|
136
|
+
error_2 = _c.sent();
|
|
137
|
+
console.error('Error fetching assets by type:', error_2);
|
|
138
|
+
throw error_2;
|
|
139
|
+
case 4: return [2 /*return*/];
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
//# sourceMappingURL=asset_resources.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asset_resources.js","sourceRoot":"","sources":["../../src/resources/asset_resources.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAOlE,IAAM,YAAY,GAAa;IAC7B,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;IAClE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;IACxC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;IACxC,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC;IACzC,OAAO,EAAE,CAAC,WAAW,EAAE,SAAS,CAAC;IACjC,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,CAAC;IACnD,GAAG,EAAE,EAAE;CACR,CAAC;AAUF;;GAEG;AACH,MAAM,CAAC,IAAM,iBAAiB,GAAG;IAC/B,GAAG,EAAE,cAAc;IACnB,IAAI,EAAE,YAAY;IAClB,QAAQ,EAAE,kBAAkB;IACtB,IAAI;;;;;;wBACF,KAAK,GAAG,kBAAkB,EAAE,CAAC;;;;wBAIlB,qBAAM,KAAK,CAAC,WAAW,CAAC,oBAAoB,EAAE;gCAC3D,UAAU,EAAE,EAAE;6BACf,CAAC,EAAA;;wBA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,MAAe;YACrB,WAAW,EAAE,wEAAwE;YACrF,QAAQ,EAAE,IAAI;SACf;KACF;IACK,IAAI;4DAAC,EAA0B;;gBAAxB,IAAI,UAAA;;;;wBACT,KAAK,GAAG,kBAAkB,EAAE,CAAC;;;;wBAG3B,YAAY,GAAG,CAAC,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC;wBAC7C,UAAU,GAAgB,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;wBAChG,SAAS,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,YAAyB,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAc,CAAC;wBAExF,qBAAM,KAAK,CAAC,WAAW,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,EAAA;;wBAA5E,MAAM,GAAG,SAAmE;wBAClF,sBAAO;gCACL,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;6BAC7B,EAAC;;;wBAEF,OAAO,CAAC,KAAK,CAAC,gCAAgC,EAAE,OAAK,CAAC,CAAC;wBACvD,MAAM,OAAK,CAAC;;;;;KAEf;CACF,CAAC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
12
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
import { getGodotConnection } from '../utils/godot_connection.js';
|
|
38
|
+
/**
|
|
39
|
+
* Resource that provides access to Godot's debug output log
|
|
40
|
+
*/
|
|
41
|
+
export var debugOutputResource = {
|
|
42
|
+
uri: 'godot/debug/log',
|
|
43
|
+
name: 'Godot Debug Output',
|
|
44
|
+
mimeType: 'text/plain',
|
|
45
|
+
load: function () {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
47
|
+
var godot, result, outputText, diagnostics, source, detail, controlClass, controlPath, logFilePath, controlSearch, error_1;
|
|
48
|
+
return __generator(this, function (_a) {
|
|
49
|
+
switch (_a.label) {
|
|
50
|
+
case 0:
|
|
51
|
+
godot = getGodotConnection();
|
|
52
|
+
_a.label = 1;
|
|
53
|
+
case 1:
|
|
54
|
+
_a.trys.push([1, 3, , 4]);
|
|
55
|
+
return [4 /*yield*/, godot.sendCommand('get_debug_output')];
|
|
56
|
+
case 2:
|
|
57
|
+
result = _a.sent();
|
|
58
|
+
outputText = typeof result.output === 'string' ? result.output : '';
|
|
59
|
+
diagnostics = typeof result.diagnostics === 'object' && result.diagnostics !== null
|
|
60
|
+
? result.diagnostics
|
|
61
|
+
: {};
|
|
62
|
+
if (!outputText || outputText.length === 0) {
|
|
63
|
+
source = typeof diagnostics.source === 'string' && diagnostics.source.length > 0
|
|
64
|
+
? diagnostics.source
|
|
65
|
+
: 'unknown';
|
|
66
|
+
detail = typeof diagnostics.detail === 'string' && diagnostics.detail.length > 0
|
|
67
|
+
? diagnostics.detail
|
|
68
|
+
: 'No additional detail from publisher.';
|
|
69
|
+
controlClass = typeof diagnostics.control_class === 'string' && diagnostics.control_class.length > 0
|
|
70
|
+
? diagnostics.control_class
|
|
71
|
+
: 'unset';
|
|
72
|
+
controlPath = typeof diagnostics.control_path === 'string' && diagnostics.control_path.length > 0
|
|
73
|
+
? diagnostics.control_path
|
|
74
|
+
: 'unset';
|
|
75
|
+
logFilePath = typeof diagnostics.log_file_path === 'string' && diagnostics.log_file_path.length > 0
|
|
76
|
+
? diagnostics.log_file_path
|
|
77
|
+
: 'not-found';
|
|
78
|
+
controlSearch = typeof diagnostics.control_search === 'string' && diagnostics.control_search.length > 0
|
|
79
|
+
? diagnostics.control_search
|
|
80
|
+
: 'control search summary unavailable';
|
|
81
|
+
return [2 /*return*/, {
|
|
82
|
+
text: [
|
|
83
|
+
'No debug output available.',
|
|
84
|
+
"Capture source: ".concat(source),
|
|
85
|
+
"Detail: ".concat(detail),
|
|
86
|
+
"Control class: ".concat(controlClass),
|
|
87
|
+
"Control path: ".concat(controlPath),
|
|
88
|
+
"Log file path: ".concat(logFilePath),
|
|
89
|
+
"Control search: ".concat(controlSearch),
|
|
90
|
+
].join('\n'),
|
|
91
|
+
}];
|
|
92
|
+
}
|
|
93
|
+
return [2 /*return*/, {
|
|
94
|
+
text: outputText,
|
|
95
|
+
}];
|
|
96
|
+
case 3:
|
|
97
|
+
error_1 = _a.sent();
|
|
98
|
+
console.error('Error fetching debug output:', error_1);
|
|
99
|
+
throw error_1;
|
|
100
|
+
case 4: return [2 /*return*/];
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
//# sourceMappingURL=debug_resources.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug_resources.js","sourceRoot":"","sources":["../../src/resources/debug_resources.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAElE;;GAEG;AACH,MAAM,CAAC,IAAM,mBAAmB,GAAG;IACjC,GAAG,EAAE,iBAAiB;IACtB,IAAI,EAAE,oBAAoB;IAC1B,QAAQ,EAAE,YAAY;IAChB,IAAI;;;;;;wBACF,KAAK,GAAG,kB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,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC;gCACvG,CAAC,CAAC,WAAW,CAAC,aAAa;gCAC3B,CAAC,CAAC,WAAW,CAAC;4BACV,aAAa,GAAG,OAAO,WAAW,CAAC,cAAc,KAAK,QAAQ,IAAI,WAAW,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC;gCAC3G,CAAC,CAAC,WAAW,CAAC,cAAc;gCAC5B,CAAC,CAAC,oCAAoC,CAAC;4BAEzC,sBAAO;oCACL,IAAI,EAAE;wCACJ,4BAA4B;wCAC5B,0BAAmB,MAAM,CAAE;wCAC3B,kBAAW,MAAM,CAAE;wCACnB,yBAAkB,YAAY,CAAE;wCAChC,wBAAiB,WAAW,CAAE;wCAC9B,yBAAkB,WAAW,CAAE;wCAC/B,0BAAmB,aAAa,CAAE;qCACnC,CAAC,IAAI,CAAC,IAAI,CAAC;iCACb,EAAC;wBACJ,CAAC;wBAED,sBAAO;gCACL,IAAI,EAAE,UAAU;6BACjB,EAAC;;;wBAEF,OAAO,CAAC,KAAK,CAAC,8BAA8B,EAAE,OAAK,CAAC,CAAC;wBACrD,MAAM,OAAK,CAAC;;;;;KAEf;CACF,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resource for accessing current debugger state including breakpoints and execution status
|
|
3
|
+
*/
|
|
4
|
+
export declare const debuggerStateResource: {
|
|
5
|
+
uri: string;
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
mimeType: string;
|
|
9
|
+
load(): Promise<{
|
|
10
|
+
text: string;
|
|
11
|
+
}>;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Resource for accessing active debugger breakpoints
|
|
15
|
+
*/
|
|
16
|
+
export declare const debuggerBreakpointsResource: {
|
|
17
|
+
uri: string;
|
|
18
|
+
name: string;
|
|
19
|
+
description: string;
|
|
20
|
+
mimeType: string;
|
|
21
|
+
load(): Promise<{
|
|
22
|
+
text: string;
|
|
23
|
+
}>;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Resource template for accessing debugger call stack information
|
|
27
|
+
*/
|
|
28
|
+
export declare const debuggerCallStackResourceTemplate: {
|
|
29
|
+
uriTemplate: string;
|
|
30
|
+
name: string;
|
|
31
|
+
description: string;
|
|
32
|
+
mimeType: string;
|
|
33
|
+
arguments: {
|
|
34
|
+
name: "sessionId";
|
|
35
|
+
description: string;
|
|
36
|
+
required: boolean;
|
|
37
|
+
}[];
|
|
38
|
+
load({ sessionId }: {
|
|
39
|
+
sessionId?: string;
|
|
40
|
+
}): Promise<{
|
|
41
|
+
text: string;
|
|
42
|
+
}>;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Resource template for accessing debugger session information
|
|
46
|
+
*/
|
|
47
|
+
export declare const debuggerSessionResourceTemplate: {
|
|
48
|
+
uriTemplate: string;
|
|
49
|
+
name: string;
|
|
50
|
+
description: string;
|
|
51
|
+
mimeType: string;
|
|
52
|
+
arguments: {
|
|
53
|
+
name: "sessionId";
|
|
54
|
+
description: string;
|
|
55
|
+
required: boolean;
|
|
56
|
+
}[];
|
|
57
|
+
load({ sessionId }: {
|
|
58
|
+
sessionId: string;
|
|
59
|
+
}): Promise<{
|
|
60
|
+
text: string;
|
|
61
|
+
}>;
|
|
62
|
+
};
|