@iborymagic/aseprite-mcp 0.4.2 → 0.4.4
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/build/index.js +2 -13
- package/build/lua/template.js +8 -8
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -8,29 +8,18 @@ import { readFileSync } from "node:fs";
|
|
|
8
8
|
import { fileURLToPath } from "node:url";
|
|
9
9
|
let version;
|
|
10
10
|
try {
|
|
11
|
-
// Get the directory of the current file (build/index.js)
|
|
12
11
|
const __filename = fileURLToPath(import.meta.url);
|
|
13
12
|
const __dirname = path.dirname(__filename);
|
|
14
|
-
// Go up one level from build/ to package root
|
|
15
13
|
const packageJsonPath = path.join(__dirname, "..", "package.json");
|
|
16
14
|
const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf8"));
|
|
17
15
|
version = packageJson.version;
|
|
18
16
|
}
|
|
19
17
|
catch (error) {
|
|
20
|
-
|
|
21
|
-
try {
|
|
22
|
-
const packageJsonPath = path.join(process.cwd(), "package.json");
|
|
23
|
-
const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf8"));
|
|
24
|
-
version = packageJson.version;
|
|
25
|
-
}
|
|
26
|
-
catch (fallbackError) {
|
|
27
|
-
// If both fail, use default version
|
|
28
|
-
version = undefined;
|
|
29
|
-
}
|
|
18
|
+
version = "unknown";
|
|
30
19
|
}
|
|
31
20
|
const server = new McpServer({
|
|
32
21
|
name: "aseprite-mcp",
|
|
33
|
-
version: version
|
|
22
|
+
version: version
|
|
34
23
|
});
|
|
35
24
|
const asepriteToolSchemas = createAsepriteToolSchemas();
|
|
36
25
|
const luaToolSchemas = createLuaToolSchemas();
|
package/build/lua/template.js
CHANGED
|
@@ -57,49 +57,49 @@ export const LUA_TEMPLATES = [
|
|
|
57
57
|
{
|
|
58
58
|
id: "get_is_layer_exists",
|
|
59
59
|
description: "Checks if a layer exists in the active sprite",
|
|
60
|
-
params: ["layerName"],
|
|
60
|
+
params: ["inputFile", "layerName"],
|
|
61
61
|
scriptPath: path.join(__dirname, "templates", "get_is_layer_exists.lua")
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
64
|
id: "get_is_tag_exists",
|
|
65
65
|
description: "Checks if a tag exists in the active sprite",
|
|
66
|
-
params: ["tagName"],
|
|
66
|
+
params: ["inputFile", "tagName"],
|
|
67
67
|
scriptPath: path.join(__dirname, "templates", "get_is_tag_exists.lua")
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
id: "get_palette_info",
|
|
71
71
|
description: "Gets information about the palette of the active sprite",
|
|
72
|
-
params: [],
|
|
72
|
+
params: ["inputFile"],
|
|
73
73
|
scriptPath: path.join(__dirname, "templates", "get_palette_info.lua")
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
id: "get_selection_bounds",
|
|
77
77
|
description: "Gets the bounds of the selection in the active sprite",
|
|
78
|
-
params: [],
|
|
78
|
+
params: ["inputFile"],
|
|
79
79
|
scriptPath: path.join(__dirname, "templates", "get_selection_bounds.lua")
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
id: "get_tag_list",
|
|
83
83
|
description: "Gets a list of all tags in the active sprite",
|
|
84
|
-
params: [],
|
|
84
|
+
params: ["inputFile"],
|
|
85
85
|
scriptPath: path.join(__dirname, "templates", "get_tag_list.lua")
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
id: "get_layer_list",
|
|
89
89
|
description: "Gets a list of all layers in the active sprite",
|
|
90
|
-
params: [],
|
|
90
|
+
params: ["inputFile"],
|
|
91
91
|
scriptPath: path.join(__dirname, "templates", "get_layer_list.lua")
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
94
|
id: "get_frame_info",
|
|
95
95
|
description: "Gets information about the current frame",
|
|
96
|
-
params: [],
|
|
96
|
+
params: ["inputFile"],
|
|
97
97
|
scriptPath: path.join(__dirname, "templates", "get_frame_info.lua")
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
id: "get_active_sprite_info",
|
|
101
101
|
description: "Gets information about the active sprite",
|
|
102
|
-
params: [],
|
|
102
|
+
params: ["inputFile"],
|
|
103
103
|
scriptPath: path.join(__dirname, "templates", "get_active_sprite_info.lua")
|
|
104
104
|
}
|
|
105
105
|
];
|