rpgmaker-mz-mcp 1.0.0
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/LICENSE +21 -0
- package/README.md +425 -0
- package/dist/events/commandBuilders.d.ts +405 -0
- package/dist/events/commandBuilders.d.ts.map +1 -0
- package/dist/events/commandBuilders.js +554 -0
- package/dist/events/commandBuilders.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +105 -0
- package/dist/index.js.map +1 -0
- package/dist/registry.d.ts +81 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +49 -0
- package/dist/registry.js.map +1 -0
- package/dist/tiles/autotile.d.ts +65 -0
- package/dist/tiles/autotile.d.ts.map +1 -0
- package/dist/tiles/autotile.js +201 -0
- package/dist/tiles/autotile.js.map +1 -0
- package/dist/tiles/catalog/dungeon.d.ts +16 -0
- package/dist/tiles/catalog/dungeon.d.ts.map +1 -0
- package/dist/tiles/catalog/dungeon.js +765 -0
- package/dist/tiles/catalog/dungeon.js.map +1 -0
- package/dist/tiles/catalog/index.d.ts +78 -0
- package/dist/tiles/catalog/index.d.ts.map +1 -0
- package/dist/tiles/catalog/index.js +115 -0
- package/dist/tiles/catalog/index.js.map +1 -0
- package/dist/tiles/catalog/inside.d.ts +16 -0
- package/dist/tiles/catalog/inside.d.ts.map +1 -0
- package/dist/tiles/catalog/inside.js +765 -0
- package/dist/tiles/catalog/inside.js.map +1 -0
- package/dist/tiles/catalog/outside.d.ts +16 -0
- package/dist/tiles/catalog/outside.d.ts.map +1 -0
- package/dist/tiles/catalog/outside.js +799 -0
- package/dist/tiles/catalog/outside.js.map +1 -0
- package/dist/tiles/catalog/overworld.d.ts +16 -0
- package/dist/tiles/catalog/overworld.d.ts.map +1 -0
- package/dist/tiles/catalog/overworld.js +585 -0
- package/dist/tiles/catalog/overworld.js.map +1 -0
- package/dist/tiles/catalog/sf.d.ts +16 -0
- package/dist/tiles/catalog/sf.d.ts.map +1 -0
- package/dist/tiles/catalog/sf.js +1313 -0
- package/dist/tiles/catalog/sf.js.map +1 -0
- package/dist/tiles/paint.d.ts +20 -0
- package/dist/tiles/paint.d.ts.map +1 -0
- package/dist/tiles/paint.js +65 -0
- package/dist/tiles/paint.js.map +1 -0
- package/dist/tiles/png.d.ts +11 -0
- package/dist/tiles/png.d.ts.map +1 -0
- package/dist/tiles/png.js +180 -0
- package/dist/tiles/png.js.map +1 -0
- package/dist/tiles/tileCodec.d.ts +95 -0
- package/dist/tiles/tileCodec.d.ts.map +1 -0
- package/dist/tiles/tileCodec.js +186 -0
- package/dist/tiles/tileCodec.js.map +1 -0
- package/dist/tiles/tileFlags.d.ts +98 -0
- package/dist/tiles/tileFlags.d.ts.map +1 -0
- package/dist/tiles/tileFlags.js +129 -0
- package/dist/tiles/tileFlags.js.map +1 -0
- package/dist/tiles/tilegeom.d.ts +29 -0
- package/dist/tiles/tilegeom.d.ts.map +1 -0
- package/dist/tiles/tilegeom.js +111 -0
- package/dist/tiles/tilegeom.js.map +1 -0
- package/dist/tiles/transparency.d.ts +22 -0
- package/dist/tiles/transparency.d.ts.map +1 -0
- package/dist/tiles/transparency.js +59 -0
- package/dist/tiles/transparency.js.map +1 -0
- package/dist/tools/actorTools.d.ts +48 -0
- package/dist/tools/actorTools.d.ts.map +1 -0
- package/dist/tools/actorTools.js +154 -0
- package/dist/tools/actorTools.js.map +1 -0
- package/dist/tools/allTools.d.ts +8 -0
- package/dist/tools/allTools.d.ts.map +1 -0
- package/dist/tools/allTools.js +56 -0
- package/dist/tools/allTools.js.map +1 -0
- package/dist/tools/assetTools.d.ts +113 -0
- package/dist/tools/assetTools.d.ts.map +1 -0
- package/dist/tools/assetTools.js +97 -0
- package/dist/tools/assetTools.js.map +1 -0
- package/dist/tools/batchTools.d.ts +3 -0
- package/dist/tools/batchTools.d.ts.map +1 -0
- package/dist/tools/batchTools.js +138 -0
- package/dist/tools/batchTools.js.map +1 -0
- package/dist/tools/battleTools.d.ts +72 -0
- package/dist/tools/battleTools.d.ts.map +1 -0
- package/dist/tools/battleTools.js +322 -0
- package/dist/tools/battleTools.js.map +1 -0
- package/dist/tools/catalogTools.d.ts +3 -0
- package/dist/tools/catalogTools.d.ts.map +1 -0
- package/dist/tools/catalogTools.js +134 -0
- package/dist/tools/catalogTools.js.map +1 -0
- package/dist/tools/classTools.d.ts +85 -0
- package/dist/tools/classTools.d.ts.map +1 -0
- package/dist/tools/classTools.js +279 -0
- package/dist/tools/classTools.js.map +1 -0
- package/dist/tools/commonEventTools.d.ts +32 -0
- package/dist/tools/commonEventTools.d.ts.map +1 -0
- package/dist/tools/commonEventTools.js +150 -0
- package/dist/tools/commonEventTools.js.map +1 -0
- package/dist/tools/eventCommandTools.d.ts +37 -0
- package/dist/tools/eventCommandTools.d.ts.map +1 -0
- package/dist/tools/eventCommandTools.js +893 -0
- package/dist/tools/eventCommandTools.js.map +1 -0
- package/dist/tools/eventPageTools.d.ts +112 -0
- package/dist/tools/eventPageTools.d.ts.map +1 -0
- package/dist/tools/eventPageTools.js +597 -0
- package/dist/tools/eventPageTools.js.map +1 -0
- package/dist/tools/itemTools.d.ts +82 -0
- package/dist/tools/itemTools.d.ts.map +1 -0
- package/dist/tools/itemTools.js +380 -0
- package/dist/tools/itemTools.js.map +1 -0
- package/dist/tools/listTools.d.ts +58 -0
- package/dist/tools/listTools.d.ts.map +1 -0
- package/dist/tools/listTools.js +99 -0
- package/dist/tools/listTools.js.map +1 -0
- package/dist/tools/mapTools.d.ts +270 -0
- package/dist/tools/mapTools.d.ts.map +1 -0
- package/dist/tools/mapTools.js +1066 -0
- package/dist/tools/mapTools.js.map +1 -0
- package/dist/tools/moveTools.d.ts +43 -0
- package/dist/tools/moveTools.d.ts.map +1 -0
- package/dist/tools/moveTools.js +240 -0
- package/dist/tools/moveTools.js.map +1 -0
- package/dist/tools/objectTools.d.ts +12 -0
- package/dist/tools/objectTools.d.ts.map +1 -0
- package/dist/tools/objectTools.js +221 -0
- package/dist/tools/objectTools.js.map +1 -0
- package/dist/tools/paintTools.d.ts +3 -0
- package/dist/tools/paintTools.d.ts.map +1 -0
- package/dist/tools/paintTools.js +134 -0
- package/dist/tools/paintTools.js.map +1 -0
- package/dist/tools/pluginScanTools.d.ts +22 -0
- package/dist/tools/pluginScanTools.d.ts.map +1 -0
- package/dist/tools/pluginScanTools.js +119 -0
- package/dist/tools/pluginScanTools.js.map +1 -0
- package/dist/tools/pluginTools.d.ts +11 -0
- package/dist/tools/pluginTools.d.ts.map +1 -0
- package/dist/tools/pluginTools.js +63 -0
- package/dist/tools/pluginTools.js.map +1 -0
- package/dist/tools/projectTools.d.ts +11 -0
- package/dist/tools/projectTools.d.ts.map +1 -0
- package/dist/tools/projectTools.js +74 -0
- package/dist/tools/projectTools.js.map +1 -0
- package/dist/tools/skillTools.d.ts +83 -0
- package/dist/tools/skillTools.d.ts.map +1 -0
- package/dist/tools/skillTools.js +369 -0
- package/dist/tools/skillTools.js.map +1 -0
- package/dist/tools/stateTools.d.ts +28 -0
- package/dist/tools/stateTools.d.ts.map +1 -0
- package/dist/tools/stateTools.js +161 -0
- package/dist/tools/stateTools.js.map +1 -0
- package/dist/tools/systemTools.d.ts +86 -0
- package/dist/tools/systemTools.d.ts.map +1 -0
- package/dist/tools/systemTools.js +342 -0
- package/dist/tools/systemTools.js.map +1 -0
- package/dist/tools/tileTools.d.ts +9 -0
- package/dist/tools/tileTools.d.ts.map +1 -0
- package/dist/tools/tileTools.js +34 -0
- package/dist/tools/tileTools.js.map +1 -0
- package/dist/tools/tileTransparency.d.ts +40 -0
- package/dist/tools/tileTransparency.d.ts.map +1 -0
- package/dist/tools/tileTransparency.js +156 -0
- package/dist/tools/tileTransparency.js.map +1 -0
- package/dist/tools/tilesetTools.d.ts +23 -0
- package/dist/tools/tilesetTools.d.ts.map +1 -0
- package/dist/tools/tilesetTools.js +209 -0
- package/dist/tools/tilesetTools.js.map +1 -0
- package/dist/tools/validationTools.d.ts +50 -0
- package/dist/tools/validationTools.d.ts.map +1 -0
- package/dist/tools/validationTools.js +229 -0
- package/dist/tools/validationTools.js.map +1 -0
- package/dist/utils/commit.d.ts +62 -0
- package/dist/utils/commit.d.ts.map +1 -0
- package/dist/utils/commit.js +119 -0
- package/dist/utils/commit.js.map +1 -0
- package/dist/utils/fileHandler.d.ts +49 -0
- package/dist/utils/fileHandler.d.ts.map +1 -0
- package/dist/utils/fileHandler.js +137 -0
- package/dist/utils/fileHandler.js.map +1 -0
- package/dist/utils/records.d.ts +8 -0
- package/dist/utils/records.d.ts.map +1 -0
- package/dist/utils/records.js +10 -0
- package/dist/utils/records.js.map +1 -0
- package/dist/utils/types.d.ts +465 -0
- package/dist/utils/types.d.ts.map +1 -0
- package/dist/utils/types.js +5 -0
- package/dist/utils/types.js.map +1 -0
- package/dist/validation/assets.d.ts +53 -0
- package/dist/validation/assets.d.ts.map +1 -0
- package/dist/validation/assets.js +198 -0
- package/dist/validation/assets.js.map +1 -0
- package/dist/validation/createRefs.d.ts +37 -0
- package/dist/validation/createRefs.d.ts.map +1 -0
- package/dist/validation/createRefs.js +89 -0
- package/dist/validation/createRefs.js.map +1 -0
- package/dist/validation/eventCommands.d.ts +70 -0
- package/dist/validation/eventCommands.d.ts.map +1 -0
- package/dist/validation/eventCommands.js +273 -0
- package/dist/validation/eventCommands.js.map +1 -0
- package/dist/validation/gate.d.ts +56 -0
- package/dist/validation/gate.d.ts.map +1 -0
- package/dist/validation/gate.js +50 -0
- package/dist/validation/gate.js.map +1 -0
- package/dist/validation/moveCommands.d.ts +31 -0
- package/dist/validation/moveCommands.d.ts.map +1 -0
- package/dist/validation/moveCommands.js +123 -0
- package/dist/validation/moveCommands.js.map +1 -0
- package/dist/validation/pluginCommands.d.ts +83 -0
- package/dist/validation/pluginCommands.d.ts.map +1 -0
- package/dist/validation/pluginCommands.js +134 -0
- package/dist/validation/pluginCommands.js.map +1 -0
- package/dist/validation/pluginManifest.d.ts +67 -0
- package/dist/validation/pluginManifest.d.ts.map +1 -0
- package/dist/validation/pluginManifest.js +199 -0
- package/dist/validation/pluginManifest.js.map +1 -0
- package/dist/validation/references.d.ts +57 -0
- package/dist/validation/references.d.ts.map +1 -0
- package/dist/validation/references.js +314 -0
- package/dist/validation/references.js.map +1 -0
- package/package.json +67 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { readJsonFile, getDataPath } from '../utils/fileHandler.js';
|
|
3
|
+
import { commitChange } from '../utils/commit.js';
|
|
4
|
+
import { definedOnly } from '../utils/records.js';
|
|
5
|
+
/**
|
|
6
|
+
* A blank actor mirroring what the RPG Maker MZ editor writes for a freshly-created
|
|
7
|
+
* actor (the "New Actor" shape from newdata/data/Actors.json): class 1, level 1-99,
|
|
8
|
+
* five empty equip slots, no traits, empty graphic/name fields. Pure so the template
|
|
9
|
+
* shape can be unit-tested.
|
|
10
|
+
*
|
|
11
|
+
* Every field is present — `create_actor` previously wrote only the fields a caller
|
|
12
|
+
* passed, so an actor made with just `name` was missing `equips`/`traits`/etc.
|
|
13
|
+
* entirely, which crashes the engine on load (Game_Actor reads `equips.length` and
|
|
14
|
+
* concats `traits` unconditionally). Field order mirrors the editor's on-disk shape.
|
|
15
|
+
*/
|
|
16
|
+
export function defaultActor() {
|
|
17
|
+
return {
|
|
18
|
+
name: '',
|
|
19
|
+
nickname: '',
|
|
20
|
+
classId: 1,
|
|
21
|
+
initialLevel: 1,
|
|
22
|
+
maxLevel: 99,
|
|
23
|
+
characterName: '',
|
|
24
|
+
characterIndex: 0,
|
|
25
|
+
faceName: '',
|
|
26
|
+
faceIndex: 0,
|
|
27
|
+
battlerName: '',
|
|
28
|
+
equips: [0, 0, 0, 0, 0],
|
|
29
|
+
traits: [],
|
|
30
|
+
note: '',
|
|
31
|
+
profile: '',
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Get all actors from the project
|
|
36
|
+
*/
|
|
37
|
+
export async function getActors(projectPath) {
|
|
38
|
+
const actorsPath = getDataPath(projectPath, 'Actors.json');
|
|
39
|
+
return await readJsonFile(actorsPath);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Update an actor's data
|
|
43
|
+
*/
|
|
44
|
+
export async function updateActor(projectPath, actorId, updates) {
|
|
45
|
+
const actors = await getActors(projectPath);
|
|
46
|
+
const actorIndex = actors.findIndex((actor) => actor && actor.id === actorId);
|
|
47
|
+
if (actorIndex === -1) {
|
|
48
|
+
throw new Error(`Actor with ID ${actorId} not found`);
|
|
49
|
+
}
|
|
50
|
+
actors[actorIndex] = { ...actors[actorIndex], ...updates, id: actorId };
|
|
51
|
+
const actorsPath = getDataPath(projectPath, 'Actors.json');
|
|
52
|
+
await commitChange(actorsPath, actors);
|
|
53
|
+
return actors[actorIndex];
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Build one new actor record against the current array — the shared per-record
|
|
57
|
+
* source of truth for both `create_actor` and `batch_create`. Pure: allocates the
|
|
58
|
+
* next unused id (max existing + 1), then merges the caller's defined fields over
|
|
59
|
+
* the {@link defaultActor} template with the computed id last so it always wins.
|
|
60
|
+
* Does not push or commit — the caller owns persistence (batch pushes N records
|
|
61
|
+
* onto the same array, then writes once).
|
|
62
|
+
*/
|
|
63
|
+
export function buildActorRecord(existing, input) {
|
|
64
|
+
const maxId = existing.reduce((max, actor) => (actor && actor.id > max ? actor.id : max), 0);
|
|
65
|
+
return {
|
|
66
|
+
...defaultActor(),
|
|
67
|
+
...definedOnly(input),
|
|
68
|
+
id: maxId + 1,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Create a new actor. Only `name` is required; any omitted field falls back to the
|
|
73
|
+
* editor's new-actor default (see {@link defaultActor}) so the record is always
|
|
74
|
+
* complete. Allocates the next unused id (max existing + 1) and writes through the
|
|
75
|
+
* commit choke point.
|
|
76
|
+
*/
|
|
77
|
+
export async function createActor(projectPath, overrides) {
|
|
78
|
+
const actors = await getActors(projectPath);
|
|
79
|
+
const newActor = buildActorRecord(actors, overrides);
|
|
80
|
+
actors.push(newActor);
|
|
81
|
+
const actorsPath = getDataPath(projectPath, 'Actors.json');
|
|
82
|
+
await commitChange(actorsPath, actors);
|
|
83
|
+
return newActor;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Delete an actor
|
|
87
|
+
*/
|
|
88
|
+
export async function deleteActor(projectPath, actorId) {
|
|
89
|
+
const actors = await getActors(projectPath);
|
|
90
|
+
const actorIndex = actors.findIndex((actor) => actor && actor.id === actorId);
|
|
91
|
+
if (actorIndex === -1) {
|
|
92
|
+
return false;
|
|
93
|
+
}
|
|
94
|
+
actors[actorIndex] = null;
|
|
95
|
+
const actorsPath = getDataPath(projectPath, 'Actors.json');
|
|
96
|
+
await commitChange(actorsPath, actors);
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Search actors by name
|
|
101
|
+
*/
|
|
102
|
+
export async function searchActors(projectPath, searchTerm) {
|
|
103
|
+
const actors = await getActors(projectPath);
|
|
104
|
+
const lowerSearchTerm = searchTerm.toLowerCase();
|
|
105
|
+
return actors.filter((actor) => !!actor &&
|
|
106
|
+
(actor.name.toLowerCase().includes(lowerSearchTerm) ||
|
|
107
|
+
actor.nickname.toLowerCase().includes(lowerSearchTerm)));
|
|
108
|
+
}
|
|
109
|
+
export const actorToolDefinitions = [
|
|
110
|
+
{
|
|
111
|
+
name: 'update_actor',
|
|
112
|
+
mutates: true,
|
|
113
|
+
description: "Update an actor's properties",
|
|
114
|
+
inputSchema: {
|
|
115
|
+
actorId: z.number().int().positive().describe('The ID of the actor to update'),
|
|
116
|
+
updates: z
|
|
117
|
+
.record(z.string(), z.unknown())
|
|
118
|
+
.describe('Object containing actor properties to update'),
|
|
119
|
+
},
|
|
120
|
+
handler: (ctx, args) => updateActor(ctx.projectPath, args.actorId, args.updates),
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
name: 'create_actor',
|
|
124
|
+
mutates: true,
|
|
125
|
+
description: "Create a new actor in data/Actors.json. Only `name` is required; omitted fields use the editor's new-actor defaults (class 1, level 1-99, five empty equip slots, no traits). Allocates and returns the next unused actor id. NOTE: an actor's physical accuracy comes from its class + own traits — a class/actor with no Hit Rate trait (xparam id 0: trait { code: 22, dataId: 0, value: 0.95 }) always misses physical actions. The built-in class 1 has one; a custom class needs it added.",
|
|
126
|
+
inputSchema: {
|
|
127
|
+
name: z.string(),
|
|
128
|
+
nickname: z.string().optional(),
|
|
129
|
+
profile: z.string().optional(),
|
|
130
|
+
classId: z.number().int().positive().optional(),
|
|
131
|
+
initialLevel: z.number().optional(),
|
|
132
|
+
maxLevel: z.number().optional(),
|
|
133
|
+
characterName: z.string().optional(),
|
|
134
|
+
characterIndex: z.number().int().min(0).optional(),
|
|
135
|
+
faceName: z.string().optional(),
|
|
136
|
+
faceIndex: z.number().int().min(0).optional(),
|
|
137
|
+
battlerName: z.string().optional(),
|
|
138
|
+
traits: z.array(z.unknown()).optional(),
|
|
139
|
+
equips: z.array(z.number()).optional(),
|
|
140
|
+
note: z.string().optional(),
|
|
141
|
+
},
|
|
142
|
+
handler: (ctx, args) => {
|
|
143
|
+
const { dryRun: _dryRun, ...overrides } = args;
|
|
144
|
+
return createActor(ctx.projectPath, overrides);
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
name: 'search_actors',
|
|
149
|
+
description: 'Search actors by name or nickname',
|
|
150
|
+
inputSchema: { searchTerm: z.string().describe('The search term to find actors') },
|
|
151
|
+
handler: (ctx, args) => searchActors(ctx.projectPath, args.searchTerm),
|
|
152
|
+
},
|
|
153
|
+
];
|
|
154
|
+
//# sourceMappingURL=actorTools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actorTools.js","sourceRoot":"","sources":["../../src/tools/actorTools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,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AAC,QAAQ,EAAE;YACvC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;YACtC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;SAC5B;QACD,OAAO,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YACrB,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,SAAS,EAAE,GAAG,IAAI,CAAC;YAC/C,OAAO,WAAW,CAAC,GAAG,CAAC,WAAW,EAAE,SAAuC,CAAC,CAAC;QAC/E,CAAC;KACF;IACD;QACE,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,mCAAmC;QAChD,WAAW,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC,EAAE;QAClF,OAAO,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,UAAU,CAAC;KACvE;CACF,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ToolDefinition } from '../registry.js';
|
|
2
|
+
/**
|
|
3
|
+
* Every tool the server exposes, gathered from the per-domain tool modules.
|
|
4
|
+
* Kept in its own side-effect-free module so it can be imported by both the
|
|
5
|
+
* server entry point and the tests without booting the stdio server.
|
|
6
|
+
*/
|
|
7
|
+
export declare const allToolDefinitions: ToolDefinition[];
|
|
8
|
+
//# sourceMappingURL=allTools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"allTools.d.ts","sourceRoot":"","sources":["../../src/tools/allTools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AA0BhD;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,cAAc,EAyB9C,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { projectToolDefinitions } from './projectTools.js';
|
|
2
|
+
import { actorToolDefinitions } from './actorTools.js';
|
|
3
|
+
import { itemToolDefinitions } from './itemTools.js';
|
|
4
|
+
import { skillToolDefinitions } from './skillTools.js';
|
|
5
|
+
import { mapToolDefinitions } from './mapTools.js';
|
|
6
|
+
import { battleToolDefinitions } from './battleTools.js';
|
|
7
|
+
import { classToolDefinitions } from './classTools.js';
|
|
8
|
+
import { stateToolDefinitions } from './stateTools.js';
|
|
9
|
+
import { commonEventToolDefinitions } from './commonEventTools.js';
|
|
10
|
+
import { moveToolDefinitions } from './moveTools.js';
|
|
11
|
+
import { eventCommandToolDefinitions } from './eventCommandTools.js';
|
|
12
|
+
import { eventPageToolDefinitions } from './eventPageTools.js';
|
|
13
|
+
import { pluginToolDefinitions } from './pluginTools.js';
|
|
14
|
+
import { tileToolDefinitions } from './tileTools.js';
|
|
15
|
+
import { catalogToolDefinitions } from './catalogTools.js';
|
|
16
|
+
import { paintToolDefinitions } from './paintTools.js';
|
|
17
|
+
import { objectToolDefinitions } from './objectTools.js';
|
|
18
|
+
import { tilesetToolDefinitions } from './tilesetTools.js';
|
|
19
|
+
import { systemToolDefinitions } from './systemTools.js';
|
|
20
|
+
import { assetToolDefinitions } from './assetTools.js';
|
|
21
|
+
import { listToolDefinitions } from './listTools.js';
|
|
22
|
+
import { validationToolDefinitions } from './validationTools.js';
|
|
23
|
+
import { pluginScanToolDefinitions } from './pluginScanTools.js';
|
|
24
|
+
import { batchToolDefinitions } from './batchTools.js';
|
|
25
|
+
/**
|
|
26
|
+
* Every tool the server exposes, gathered from the per-domain tool modules.
|
|
27
|
+
* Kept in its own side-effect-free module so it can be imported by both the
|
|
28
|
+
* server entry point and the tests without booting the stdio server.
|
|
29
|
+
*/
|
|
30
|
+
export const allToolDefinitions = [
|
|
31
|
+
...projectToolDefinitions,
|
|
32
|
+
...actorToolDefinitions,
|
|
33
|
+
...itemToolDefinitions,
|
|
34
|
+
...skillToolDefinitions,
|
|
35
|
+
...mapToolDefinitions,
|
|
36
|
+
...battleToolDefinitions,
|
|
37
|
+
...classToolDefinitions,
|
|
38
|
+
...stateToolDefinitions,
|
|
39
|
+
...commonEventToolDefinitions,
|
|
40
|
+
...moveToolDefinitions,
|
|
41
|
+
...eventCommandToolDefinitions,
|
|
42
|
+
...eventPageToolDefinitions,
|
|
43
|
+
...pluginToolDefinitions,
|
|
44
|
+
...tileToolDefinitions,
|
|
45
|
+
...catalogToolDefinitions,
|
|
46
|
+
...paintToolDefinitions,
|
|
47
|
+
...objectToolDefinitions,
|
|
48
|
+
...tilesetToolDefinitions,
|
|
49
|
+
...systemToolDefinitions,
|
|
50
|
+
...assetToolDefinitions,
|
|
51
|
+
...listToolDefinitions,
|
|
52
|
+
...validationToolDefinitions,
|
|
53
|
+
...batchToolDefinitions,
|
|
54
|
+
...pluginScanToolDefinitions,
|
|
55
|
+
];
|
|
56
|
+
//# sourceMappingURL=allTools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"allTools.js","sourceRoot":"","sources":["../../src/tools/allTools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC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ACtB,GAAG,yBAAyB;IAC5B,GAAG,oBAAoB;IACvB,GAAG,yBAAyB;CAC7B,CAAC"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { ToolDefinition } from '../registry.js';
|
|
2
|
+
import { ValidationWarning } from '../validation/eventCommands.js';
|
|
3
|
+
/**
|
|
4
|
+
* The project asset kinds a caller can enumerate, mapped to their directory
|
|
5
|
+
* (relative to the project root) and the file extensions they use. RPG Maker MZ
|
|
6
|
+
* references every asset by **basename without extension** (e.g. an event's
|
|
7
|
+
* `characterName` is `"Actor1"`, not `"Actor1.png"`), so `list_assets` strips the
|
|
8
|
+
* extension — the returned names are exactly what the data files expect.
|
|
9
|
+
*
|
|
10
|
+
* Audio ships as `.ogg` (and sometimes a parallel `.m4a` for other runtimes); we
|
|
11
|
+
* list both and dedupe by basename so each track appears once.
|
|
12
|
+
*/
|
|
13
|
+
declare const ASSET_DIRS: {
|
|
14
|
+
readonly characters: {
|
|
15
|
+
readonly dir: "img/characters";
|
|
16
|
+
readonly exts: readonly [".png"];
|
|
17
|
+
};
|
|
18
|
+
readonly faces: {
|
|
19
|
+
readonly dir: "img/faces";
|
|
20
|
+
readonly exts: readonly [".png"];
|
|
21
|
+
};
|
|
22
|
+
readonly tilesets: {
|
|
23
|
+
readonly dir: "img/tilesets";
|
|
24
|
+
readonly exts: readonly [".png"];
|
|
25
|
+
};
|
|
26
|
+
readonly pictures: {
|
|
27
|
+
readonly dir: "img/pictures";
|
|
28
|
+
readonly exts: readonly [".png"];
|
|
29
|
+
};
|
|
30
|
+
readonly parallaxes: {
|
|
31
|
+
readonly dir: "img/parallaxes";
|
|
32
|
+
readonly exts: readonly [".png"];
|
|
33
|
+
};
|
|
34
|
+
readonly battlebacks1: {
|
|
35
|
+
readonly dir: "img/battlebacks1";
|
|
36
|
+
readonly exts: readonly [".png"];
|
|
37
|
+
};
|
|
38
|
+
readonly battlebacks2: {
|
|
39
|
+
readonly dir: "img/battlebacks2";
|
|
40
|
+
readonly exts: readonly [".png"];
|
|
41
|
+
};
|
|
42
|
+
readonly enemies: {
|
|
43
|
+
readonly dir: "img/enemies";
|
|
44
|
+
readonly exts: readonly [".png"];
|
|
45
|
+
};
|
|
46
|
+
readonly sv_actors: {
|
|
47
|
+
readonly dir: "img/sv_actors";
|
|
48
|
+
readonly exts: readonly [".png"];
|
|
49
|
+
};
|
|
50
|
+
readonly sv_enemies: {
|
|
51
|
+
readonly dir: "img/sv_enemies";
|
|
52
|
+
readonly exts: readonly [".png"];
|
|
53
|
+
};
|
|
54
|
+
readonly titles1: {
|
|
55
|
+
readonly dir: "img/titles1";
|
|
56
|
+
readonly exts: readonly [".png"];
|
|
57
|
+
};
|
|
58
|
+
readonly titles2: {
|
|
59
|
+
readonly dir: "img/titles2";
|
|
60
|
+
readonly exts: readonly [".png"];
|
|
61
|
+
};
|
|
62
|
+
readonly system: {
|
|
63
|
+
readonly dir: "img/system";
|
|
64
|
+
readonly exts: readonly [".png"];
|
|
65
|
+
};
|
|
66
|
+
readonly bgm: {
|
|
67
|
+
readonly dir: "audio/bgm";
|
|
68
|
+
readonly exts: readonly [".ogg", ".m4a"];
|
|
69
|
+
};
|
|
70
|
+
readonly bgs: {
|
|
71
|
+
readonly dir: "audio/bgs";
|
|
72
|
+
readonly exts: readonly [".ogg", ".m4a"];
|
|
73
|
+
};
|
|
74
|
+
readonly me: {
|
|
75
|
+
readonly dir: "audio/me";
|
|
76
|
+
readonly exts: readonly [".ogg", ".m4a"];
|
|
77
|
+
};
|
|
78
|
+
readonly se: {
|
|
79
|
+
readonly dir: "audio/se";
|
|
80
|
+
readonly exts: readonly [".ogg", ".m4a"];
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
export type AssetType = keyof typeof ASSET_DIRS;
|
|
84
|
+
export interface AssetIndex {
|
|
85
|
+
type: AssetType;
|
|
86
|
+
count: number;
|
|
87
|
+
names: string[];
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* List the available asset basenames (extension stripped) for one asset kind —
|
|
91
|
+
* the exact strings the data files reference (a sprite/face/audio name). Use it to
|
|
92
|
+
* validate a graphic/audio name before wiring it into an event, since a wrong
|
|
93
|
+
* filename is a silent runtime failure in the engine.
|
|
94
|
+
*
|
|
95
|
+
* **Fails soft:** a missing asset directory (an unused kind) yields an empty list
|
|
96
|
+
* rather than an error. Read-only — no writes.
|
|
97
|
+
*/
|
|
98
|
+
export declare function listAssets(projectPath: string, type: AssetType): Promise<AssetIndex>;
|
|
99
|
+
/**
|
|
100
|
+
* Warn (never throw) when an asset `name` isn't among the project's assets of the
|
|
101
|
+
* given type — a wrong filename is a silent runtime failure in the engine. Skips
|
|
102
|
+
* the check when the name is empty (no asset referenced) or the asset dir is
|
|
103
|
+
* empty/missing (nothing to validate against — e.g. a fixture project), so it
|
|
104
|
+
* can't emit false positives. Shared by the audio/character/battler name checks.
|
|
105
|
+
*/
|
|
106
|
+
export declare function assetNameWarning(projectPath: string, type: AssetType, name: string | undefined, opts: {
|
|
107
|
+
path: string;
|
|
108
|
+
label: string;
|
|
109
|
+
consequence: string;
|
|
110
|
+
}): Promise<ValidationWarning[]>;
|
|
111
|
+
export declare const assetToolDefinitions: ToolDefinition[];
|
|
112
|
+
export {};
|
|
113
|
+
//# sourceMappingURL=assetTools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assetTools.d.ts","sourceRoot":"","sources":["../../src/tools/assetTools.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAEnE;;;;;;;;;GASG;AACH,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkBN,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,UAAU,CAAC;AAEhD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;;;;;;;GAQG;AACH,wBAAsB,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAsB1F;AAED;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CACpC,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,SAAS,EACf,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GACzD,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAa9B;AAED,eAAO,MAAM,oBAAoB,EAAE,cAAc,EAchD,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { basename, join } from 'path';
|
|
3
|
+
import { listFiles } from '../utils/fileHandler.js';
|
|
4
|
+
/**
|
|
5
|
+
* The project asset kinds a caller can enumerate, mapped to their directory
|
|
6
|
+
* (relative to the project root) and the file extensions they use. RPG Maker MZ
|
|
7
|
+
* references every asset by **basename without extension** (e.g. an event's
|
|
8
|
+
* `characterName` is `"Actor1"`, not `"Actor1.png"`), so `list_assets` strips the
|
|
9
|
+
* extension — the returned names are exactly what the data files expect.
|
|
10
|
+
*
|
|
11
|
+
* Audio ships as `.ogg` (and sometimes a parallel `.m4a` for other runtimes); we
|
|
12
|
+
* list both and dedupe by basename so each track appears once.
|
|
13
|
+
*/
|
|
14
|
+
const ASSET_DIRS = {
|
|
15
|
+
characters: { dir: 'img/characters', exts: ['.png'] },
|
|
16
|
+
faces: { dir: 'img/faces', exts: ['.png'] },
|
|
17
|
+
tilesets: { dir: 'img/tilesets', exts: ['.png'] },
|
|
18
|
+
pictures: { dir: 'img/pictures', exts: ['.png'] },
|
|
19
|
+
parallaxes: { dir: 'img/parallaxes', exts: ['.png'] },
|
|
20
|
+
battlebacks1: { dir: 'img/battlebacks1', exts: ['.png'] },
|
|
21
|
+
battlebacks2: { dir: 'img/battlebacks2', exts: ['.png'] },
|
|
22
|
+
enemies: { dir: 'img/enemies', exts: ['.png'] },
|
|
23
|
+
sv_actors: { dir: 'img/sv_actors', exts: ['.png'] },
|
|
24
|
+
sv_enemies: { dir: 'img/sv_enemies', exts: ['.png'] },
|
|
25
|
+
titles1: { dir: 'img/titles1', exts: ['.png'] },
|
|
26
|
+
titles2: { dir: 'img/titles2', exts: ['.png'] },
|
|
27
|
+
system: { dir: 'img/system', exts: ['.png'] },
|
|
28
|
+
bgm: { dir: 'audio/bgm', exts: ['.ogg', '.m4a'] },
|
|
29
|
+
bgs: { dir: 'audio/bgs', exts: ['.ogg', '.m4a'] },
|
|
30
|
+
me: { dir: 'audio/me', exts: ['.ogg', '.m4a'] },
|
|
31
|
+
se: { dir: 'audio/se', exts: ['.ogg', '.m4a'] },
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* List the available asset basenames (extension stripped) for one asset kind —
|
|
35
|
+
* the exact strings the data files reference (a sprite/face/audio name). Use it to
|
|
36
|
+
* validate a graphic/audio name before wiring it into an event, since a wrong
|
|
37
|
+
* filename is a silent runtime failure in the engine.
|
|
38
|
+
*
|
|
39
|
+
* **Fails soft:** a missing asset directory (an unused kind) yields an empty list
|
|
40
|
+
* rather than an error. Read-only — no writes.
|
|
41
|
+
*/
|
|
42
|
+
export async function listAssets(projectPath, type) {
|
|
43
|
+
const spec = ASSET_DIRS[type];
|
|
44
|
+
if (!spec) {
|
|
45
|
+
throw new Error(`Unknown asset type: ${type}. Valid types: ${Object.keys(ASSET_DIRS).join(', ')}`);
|
|
46
|
+
}
|
|
47
|
+
const dirPath = join(projectPath, ...spec.dir.split('/'));
|
|
48
|
+
const names = new Set();
|
|
49
|
+
for (const ext of spec.exts) {
|
|
50
|
+
let files;
|
|
51
|
+
try {
|
|
52
|
+
files = await listFiles(dirPath, ext);
|
|
53
|
+
}
|
|
54
|
+
catch {
|
|
55
|
+
files = []; // Missing dir (unused asset kind) → fail soft.
|
|
56
|
+
}
|
|
57
|
+
for (const file of files)
|
|
58
|
+
names.add(basename(file, ext));
|
|
59
|
+
}
|
|
60
|
+
const sorted = [...names].sort();
|
|
61
|
+
return { type, count: sorted.length, names: sorted };
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Warn (never throw) when an asset `name` isn't among the project's assets of the
|
|
65
|
+
* given type — a wrong filename is a silent runtime failure in the engine. Skips
|
|
66
|
+
* the check when the name is empty (no asset referenced) or the asset dir is
|
|
67
|
+
* empty/missing (nothing to validate against — e.g. a fixture project), so it
|
|
68
|
+
* can't emit false positives. Shared by the audio/character/battler name checks.
|
|
69
|
+
*/
|
|
70
|
+
export async function assetNameWarning(projectPath, type, name, opts) {
|
|
71
|
+
if (!projectPath || !name)
|
|
72
|
+
return [];
|
|
73
|
+
const { names } = await listAssets(projectPath, type);
|
|
74
|
+
if (names.length > 0 && !names.includes(name)) {
|
|
75
|
+
return [
|
|
76
|
+
{
|
|
77
|
+
path: opts.path,
|
|
78
|
+
code: undefined,
|
|
79
|
+
message: `${opts.label} "${name}" is not a known ${type} asset (${opts.consequence})`,
|
|
80
|
+
},
|
|
81
|
+
];
|
|
82
|
+
}
|
|
83
|
+
return [];
|
|
84
|
+
}
|
|
85
|
+
export const assetToolDefinitions = [
|
|
86
|
+
{
|
|
87
|
+
name: 'list_assets',
|
|
88
|
+
description: "List the available asset filenames (extension stripped) for one asset kind — the exact names RPG Maker's data references (a sprite/face/tileset/audio name). Use it to validate a graphic or audio name before wiring it into an event; a wrong filename fails silently at runtime. Fails soft: an unused asset directory returns an empty list.",
|
|
89
|
+
inputSchema: {
|
|
90
|
+
type: z
|
|
91
|
+
.enum(Object.keys(ASSET_DIRS))
|
|
92
|
+
.describe('Asset kind to list. Images: characters, faces, tilesets, pictures, parallaxes, battlebacks1, battlebacks2, enemies, sv_actors, sv_enemies, titles1, titles2, system. Audio: bgm, bgs, me, se.'),
|
|
93
|
+
},
|
|
94
|
+
handler: (ctx, args) => listAssets(ctx.projectPath, args.type),
|
|
95
|
+
},
|
|
96
|
+
];
|
|
97
|
+
//# sourceMappingURL=assetTools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assetTools.js","sourceRoot":"","sources":["../../src/tools/assetTools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAIpD;;;;;;;;;GASG;AACH,MAAM,UAAU,GAAG;IACjB,UAAU,EAAE,EAAE,GAAG,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE;IACrD,KAAK,EAAE,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE;IAC3C,QAAQ,EAAE,EAAE,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE;IACjD,QAAQ,EAAE,EAAE,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE;IACjD,UAAU,EAAE,EAAE,GAAG,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE;IACrD,YAAY,EAAE,EAAE,GAAG,EAAE,kBAAkB,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE;IACzD,YAAY,EAAE,EAAE,GAAG,EAAE,kBAAkB,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE;IACzD,OAAO,EAAE,EAAE,GAAG,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE;IAC/C,SAAS,EAAE,EAAE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AAM,oBAAoB,GAAqB;IACpD;QACE,IAAI,EAAE,aAAa;QACnB,WAAW,EACT,kVAAkV;QACpV,WAAW,EAAE;YACX,IAAI,EAAE,CAAC;iBACJ,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAgC,CAAC;iBAC5D,QAAQ,CACP,+LAA+L,CAChM;SACJ;QACD,OAAO,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC;KAC/D;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batchTools.d.ts","sourceRoot":"","sources":["../../src/tools/batchTools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AA4OhD,eAAO,MAAM,oBAAoB,EAAE,cAAc,EAsBhD,CAAC"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { commitChange } from '../utils/commit.js';
|
|
3
|
+
import { getDataPath } from '../utils/fileHandler.js';
|
|
4
|
+
import { getActors, buildActorRecord } from './actorTools.js';
|
|
5
|
+
import { getItems, getWeapons, getArmors, buildItemRecord, buildWeaponRecord, buildArmorRecord, assertItemEffectRefs, } from './itemTools.js';
|
|
6
|
+
import { getSkills, buildSkillRecord, assertSkillEffectRefs } from './skillTools.js';
|
|
7
|
+
import { getEnemies, buildEnemyRecord, assertEnemyRefs, battlerNameWarnings, } from './battleTools.js';
|
|
8
|
+
import { getStates, buildStateRecord } from './stateTools.js';
|
|
9
|
+
import { getClasses, buildClassRecord, summarizeClass } from './classTools.js';
|
|
10
|
+
/**
|
|
11
|
+
* Entity types `batch_create` can append to. Each maps to one 1-indexed database
|
|
12
|
+
* array (slot 0 null) that the matching single `create_*` tool already owns.
|
|
13
|
+
*/
|
|
14
|
+
const BATCH_TYPES = [
|
|
15
|
+
'actor',
|
|
16
|
+
'item',
|
|
17
|
+
'weapon',
|
|
18
|
+
'armor',
|
|
19
|
+
'skill',
|
|
20
|
+
'enemy',
|
|
21
|
+
'state',
|
|
22
|
+
'class',
|
|
23
|
+
];
|
|
24
|
+
/**
|
|
25
|
+
* Append every record in one pass, then write once.
|
|
26
|
+
*
|
|
27
|
+
* Records are pushed onto the in-memory array as they are built, so each record's
|
|
28
|
+
* id allocation (max existing + 1) sees the previous ones — ids come out
|
|
29
|
+
* sequential — and a reference check can resolve a sibling created earlier in the
|
|
30
|
+
* same batch (e.g. a skill whose Learn Skill effect points at the skill before it).
|
|
31
|
+
*
|
|
32
|
+
* A failing record throws with its index and **nothing is written**: the single
|
|
33
|
+
* `commitChange` runs only after every record is built and checked.
|
|
34
|
+
*/
|
|
35
|
+
async function runBatch(projectPath, type, spec, records) {
|
|
36
|
+
const existing = await spec.load(projectPath);
|
|
37
|
+
const created = [];
|
|
38
|
+
const warnings = [];
|
|
39
|
+
for (const [index, input] of records.entries()) {
|
|
40
|
+
let record;
|
|
41
|
+
try {
|
|
42
|
+
record = spec.build(existing, input);
|
|
43
|
+
if (spec.assertRefs) {
|
|
44
|
+
await spec.assertRefs(projectPath, record, existing);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
49
|
+
throw new Error(`records[${index}]: ${message}`);
|
|
50
|
+
}
|
|
51
|
+
existing.push(record);
|
|
52
|
+
created.push(record);
|
|
53
|
+
if (spec.warn) {
|
|
54
|
+
// Tag each warning with the record that produced it — a batch can emit
|
|
55
|
+
// several and `path` alone ("battlerName") wouldn't say which.
|
|
56
|
+
const recordWarnings = await spec.warn(projectPath, record);
|
|
57
|
+
warnings.push(...recordWarnings.map((w) => ({ ...w, path: `records[${index}].${w.path}` })));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
await commitChange(getDataPath(projectPath, spec.file), existing);
|
|
61
|
+
const out = created.map((record) => (spec.summarize ? spec.summarize(record) : record));
|
|
62
|
+
const result = { type, count: out.length, created: out };
|
|
63
|
+
return warnings.length > 0 ? { ...result, warnings } : result;
|
|
64
|
+
}
|
|
65
|
+
/** Dispatch a batch to its per-type spec. */
|
|
66
|
+
async function batchCreate(projectPath, type, records) {
|
|
67
|
+
switch (type) {
|
|
68
|
+
case 'actor':
|
|
69
|
+
return runBatch(projectPath, type, {
|
|
70
|
+
file: 'Actors.json',
|
|
71
|
+
load: getActors,
|
|
72
|
+
build: (existing, input) => buildActorRecord(existing, input),
|
|
73
|
+
}, records);
|
|
74
|
+
case 'item':
|
|
75
|
+
return runBatch(projectPath, type, {
|
|
76
|
+
file: 'Items.json',
|
|
77
|
+
load: getItems,
|
|
78
|
+
build: (existing, input) => buildItemRecord(existing, input),
|
|
79
|
+
assertRefs: (path, record) => assertItemEffectRefs(path, record),
|
|
80
|
+
}, records);
|
|
81
|
+
case 'weapon':
|
|
82
|
+
return runBatch(projectPath, type, {
|
|
83
|
+
file: 'Weapons.json',
|
|
84
|
+
load: getWeapons,
|
|
85
|
+
build: (existing, input) => buildWeaponRecord(existing, input),
|
|
86
|
+
}, records);
|
|
87
|
+
case 'armor':
|
|
88
|
+
return runBatch(projectPath, type, {
|
|
89
|
+
file: 'Armors.json',
|
|
90
|
+
load: getArmors,
|
|
91
|
+
build: (existing, input) => buildArmorRecord(existing, input),
|
|
92
|
+
}, records);
|
|
93
|
+
case 'skill':
|
|
94
|
+
return runBatch(projectPath, type, {
|
|
95
|
+
file: 'Skills.json',
|
|
96
|
+
load: getSkills,
|
|
97
|
+
build: (existing, input) => buildSkillRecord(existing, input),
|
|
98
|
+
assertRefs: (path, record, existing) => assertSkillEffectRefs(path, record, existing),
|
|
99
|
+
}, records);
|
|
100
|
+
case 'enemy':
|
|
101
|
+
return runBatch(projectPath, type, {
|
|
102
|
+
file: 'Enemies.json',
|
|
103
|
+
load: getEnemies,
|
|
104
|
+
build: (existing, input) => buildEnemyRecord(existing, input),
|
|
105
|
+
assertRefs: (path, record) => assertEnemyRefs(path, record),
|
|
106
|
+
warn: (path, record) => battlerNameWarnings(path, record.battlerName),
|
|
107
|
+
}, records);
|
|
108
|
+
case 'state':
|
|
109
|
+
return runBatch(projectPath, type, {
|
|
110
|
+
file: 'States.json',
|
|
111
|
+
load: getStates,
|
|
112
|
+
build: (existing, input) => buildStateRecord(existing, input),
|
|
113
|
+
}, records);
|
|
114
|
+
case 'class':
|
|
115
|
+
return runBatch(projectPath, type, {
|
|
116
|
+
file: 'Classes.json',
|
|
117
|
+
load: getClasses,
|
|
118
|
+
build: (existing, input) => buildClassRecord(existing, input),
|
|
119
|
+
summarize: summarizeClass,
|
|
120
|
+
}, records);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
export const batchToolDefinitions = [
|
|
124
|
+
{
|
|
125
|
+
name: 'batch_create',
|
|
126
|
+
mutates: true,
|
|
127
|
+
description: "Create many database records of one type in a single call and a single file write — the batch sibling of create_actor/create_item/create_weapon/create_armor/create_skill/create_enemy/create_state/create_class. Each entry in `records` takes the same fields its single create_* tool accepts (only `name` is required for most; omitted fields use the editor's defaults). Ids are allocated sequentially from the current max, so a record can reference a sibling created earlier in the same batch. Use this instead of N sequential create_* calls when authoring a cast, a loot table, or a skill list. Returns `{ type, count, created, warnings? }` (classes are summarized like create_class; enemy battlerName misses are warnings, never blocked). Throws — writing nothing at all — if any record references a database id that does not exist, naming the offending records[i].",
|
|
128
|
+
inputSchema: {
|
|
129
|
+
type: z.enum(BATCH_TYPES).describe('Which database the records are appended to'),
|
|
130
|
+
records: z
|
|
131
|
+
.array(z.record(z.string(), z.unknown()))
|
|
132
|
+
.min(1)
|
|
133
|
+
.describe('The records to create, each shaped like the matching create_* tool\'s arguments (e.g. for type "actor": { name, classId?, ... })'),
|
|
134
|
+
},
|
|
135
|
+
handler: async (ctx, args) => batchCreate(ctx.projectPath, args.type, args.records),
|
|
136
|
+
},
|
|
137
|
+
];
|
|
138
|
+
//# sourceMappingURL=batchTools.js.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