@gameslate/sdk 0.3.11 → 0.3.13
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 +3 -0
- package/bin/gameslate-plugin.mjs +49 -0
- package/lib/catalogue.d.ts +40 -10
- package/lib/catalogue.js +33 -16
- package/lib/chips.d.ts +2 -2
- package/lib/chips.js +12 -4
- package/lib/game-support-yaml.d.ts +5 -0
- package/lib/game-support-yaml.js +124 -0
- package/lib/game-support.d.ts +400 -0
- package/lib/game-support.js +306 -0
- package/lib/host/addresses.d.ts +40 -0
- package/lib/host/addresses.js +59 -3
- package/lib/host/game-support.d.ts +27 -0
- package/lib/host/game-support.js +101 -0
- package/lib/host/index.d.ts +1 -0
- package/lib/host/index.js +1 -0
- package/lib/host/live-sandbox.d.ts +1 -0
- package/lib/host/live-sandbox.js +19 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/pack.d.ts +36 -7
- package/lib/pack.js +14 -1
- package/lib/plugin/contract.d.ts +5 -0
- package/lib/plugin/sandbox-guest.js +3 -0
- package/lib/sandbox-protocol.d.ts +48 -9
- package/lib/status.d.ts +9 -1
- package/lib/status.js +26 -0
- package/package.json +1 -1
- package/template/claude/skills/build-gameslate-plugin/SKILL.md +352 -12
- package/template/claude/skills/verify-gameslate-plugin/SKILL.md +25 -0
- package/template/{test → plugin}/live.test.ts +1 -1
- package/template/tsconfig.json +1 -1
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { GameCapability } from './types.js';
|
|
3
|
+
import type { GamePack } from './pack.js';
|
|
4
|
+
export declare const SUPPORT_TABLE_START = "<!-- gameslate:support-table:start -->";
|
|
5
|
+
export declare const SUPPORT_TABLE_END = "<!-- gameslate:support-table:end -->";
|
|
6
|
+
export declare const REQUIRED_SUPPORT_HEADINGS: readonly ["## Builds & Asset Extraction", "## Map", "## Vitals, Inventory, Missions & Reference", "## Known Gaps", "## Verification"];
|
|
7
|
+
export declare const SupportBuildSchema: z.ZodObject<{
|
|
8
|
+
id: z.ZodString;
|
|
9
|
+
label: z.ZodString;
|
|
10
|
+
verification: z.ZodEnum<["live_played", "live_route", "tas_verified", "attract_only", "unit_only"]>;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
label: string;
|
|
13
|
+
id: string;
|
|
14
|
+
verification: "live_played" | "live_route" | "tas_verified" | "attract_only" | "unit_only";
|
|
15
|
+
}, {
|
|
16
|
+
label: string;
|
|
17
|
+
id: string;
|
|
18
|
+
verification: "live_played" | "live_route" | "tas_verified" | "attract_only" | "unit_only";
|
|
19
|
+
}>;
|
|
20
|
+
export declare const GameSupportSchema: z.ZodObject<{
|
|
21
|
+
gameId: z.ZodString;
|
|
22
|
+
title: z.ZodString;
|
|
23
|
+
builds: z.ZodArray<z.ZodObject<{
|
|
24
|
+
id: z.ZodString;
|
|
25
|
+
label: z.ZodString;
|
|
26
|
+
verification: z.ZodEnum<["live_played", "live_route", "tas_verified", "attract_only", "unit_only"]>;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
label: string;
|
|
29
|
+
id: string;
|
|
30
|
+
verification: "live_played" | "live_route" | "tas_verified" | "attract_only" | "unit_only";
|
|
31
|
+
}, {
|
|
32
|
+
label: string;
|
|
33
|
+
id: string;
|
|
34
|
+
verification: "live_played" | "live_route" | "tas_verified" | "attract_only" | "unit_only";
|
|
35
|
+
}>, "many">;
|
|
36
|
+
map: z.ZodObject<{
|
|
37
|
+
status: z.ZodEnum<["done", "partial", "puzzle_panel", "open"]>;
|
|
38
|
+
assetSource: z.ZodEnum<["local_rom", "local_files", "registry", "none"]>;
|
|
39
|
+
geometry: z.ZodEnum<["3d_mesh", "textured_2d", "vector_surfaces", "vector_walls", "route_lanes", "none"]>;
|
|
40
|
+
layers: z.ZodEnum<["multi_floor", "per_room", "mode_switched", "single", "none"]>;
|
|
41
|
+
controls: z.ZodObject<{
|
|
42
|
+
panZoom: z.ZodBoolean;
|
|
43
|
+
rotate2d: z.ZodBoolean;
|
|
44
|
+
tilt3d: z.ZodBoolean;
|
|
45
|
+
}, "strip", z.ZodTypeAny, {
|
|
46
|
+
panZoom: boolean;
|
|
47
|
+
rotate2d: boolean;
|
|
48
|
+
tilt3d: boolean;
|
|
49
|
+
}, {
|
|
50
|
+
panZoom: boolean;
|
|
51
|
+
rotate2d: boolean;
|
|
52
|
+
tilt3d: boolean;
|
|
53
|
+
}>;
|
|
54
|
+
player: z.ZodObject<{
|
|
55
|
+
position: z.ZodBoolean;
|
|
56
|
+
heading: z.ZodBoolean;
|
|
57
|
+
roomOrFloor: z.ZodBoolean;
|
|
58
|
+
}, "strip", z.ZodTypeAny, {
|
|
59
|
+
position: boolean;
|
|
60
|
+
heading: boolean;
|
|
61
|
+
roomOrFloor: boolean;
|
|
62
|
+
}, {
|
|
63
|
+
position: boolean;
|
|
64
|
+
heading: boolean;
|
|
65
|
+
roomOrFloor: boolean;
|
|
66
|
+
}>;
|
|
67
|
+
actors: z.ZodObject<{
|
|
68
|
+
enemies: z.ZodEnum<["tokens", "dots", "none"]>;
|
|
69
|
+
npcs: z.ZodEnum<["tokens", "dots", "none"]>;
|
|
70
|
+
rivalsOrPlayers: z.ZodEnum<["dots", "none"]>;
|
|
71
|
+
}, "strip", z.ZodTypeAny, {
|
|
72
|
+
enemies: "none" | "tokens" | "dots";
|
|
73
|
+
npcs: "none" | "tokens" | "dots";
|
|
74
|
+
rivalsOrPlayers: "none" | "dots";
|
|
75
|
+
}, {
|
|
76
|
+
enemies: "none" | "tokens" | "dots";
|
|
77
|
+
npcs: "none" | "tokens" | "dots";
|
|
78
|
+
rivalsOrPlayers: "none" | "dots";
|
|
79
|
+
}>;
|
|
80
|
+
pins: z.ZodObject<{
|
|
81
|
+
exits: z.ZodBoolean;
|
|
82
|
+
collectiblesOrItems: z.ZodBoolean;
|
|
83
|
+
objectives: z.ZodBoolean;
|
|
84
|
+
autoHideCollected: z.ZodBoolean;
|
|
85
|
+
customNotes: z.ZodBoolean;
|
|
86
|
+
wayfinding: z.ZodBoolean;
|
|
87
|
+
}, "strip", z.ZodTypeAny, {
|
|
88
|
+
objectives: boolean;
|
|
89
|
+
exits: boolean;
|
|
90
|
+
collectiblesOrItems: boolean;
|
|
91
|
+
autoHideCollected: boolean;
|
|
92
|
+
customNotes: boolean;
|
|
93
|
+
wayfinding: boolean;
|
|
94
|
+
}, {
|
|
95
|
+
objectives: boolean;
|
|
96
|
+
exits: boolean;
|
|
97
|
+
collectiblesOrItems: boolean;
|
|
98
|
+
autoHideCollected: boolean;
|
|
99
|
+
customNotes: boolean;
|
|
100
|
+
wayfinding: boolean;
|
|
101
|
+
}>;
|
|
102
|
+
}, "strip", z.ZodTypeAny, {
|
|
103
|
+
status: "done" | "partial" | "puzzle_panel" | "open";
|
|
104
|
+
layers: "none" | "multi_floor" | "per_room" | "mode_switched" | "single";
|
|
105
|
+
assetSource: "local_rom" | "local_files" | "registry" | "none";
|
|
106
|
+
geometry: "none" | "3d_mesh" | "textured_2d" | "vector_surfaces" | "vector_walls" | "route_lanes";
|
|
107
|
+
controls: {
|
|
108
|
+
panZoom: boolean;
|
|
109
|
+
rotate2d: boolean;
|
|
110
|
+
tilt3d: boolean;
|
|
111
|
+
};
|
|
112
|
+
player: {
|
|
113
|
+
position: boolean;
|
|
114
|
+
heading: boolean;
|
|
115
|
+
roomOrFloor: boolean;
|
|
116
|
+
};
|
|
117
|
+
actors: {
|
|
118
|
+
enemies: "none" | "tokens" | "dots";
|
|
119
|
+
npcs: "none" | "tokens" | "dots";
|
|
120
|
+
rivalsOrPlayers: "none" | "dots";
|
|
121
|
+
};
|
|
122
|
+
pins: {
|
|
123
|
+
objectives: boolean;
|
|
124
|
+
exits: boolean;
|
|
125
|
+
collectiblesOrItems: boolean;
|
|
126
|
+
autoHideCollected: boolean;
|
|
127
|
+
customNotes: boolean;
|
|
128
|
+
wayfinding: boolean;
|
|
129
|
+
};
|
|
130
|
+
}, {
|
|
131
|
+
status: "done" | "partial" | "puzzle_panel" | "open";
|
|
132
|
+
layers: "none" | "multi_floor" | "per_room" | "mode_switched" | "single";
|
|
133
|
+
assetSource: "local_rom" | "local_files" | "registry" | "none";
|
|
134
|
+
geometry: "none" | "3d_mesh" | "textured_2d" | "vector_surfaces" | "vector_walls" | "route_lanes";
|
|
135
|
+
controls: {
|
|
136
|
+
panZoom: boolean;
|
|
137
|
+
rotate2d: boolean;
|
|
138
|
+
tilt3d: boolean;
|
|
139
|
+
};
|
|
140
|
+
player: {
|
|
141
|
+
position: boolean;
|
|
142
|
+
heading: boolean;
|
|
143
|
+
roomOrFloor: boolean;
|
|
144
|
+
};
|
|
145
|
+
actors: {
|
|
146
|
+
enemies: "none" | "tokens" | "dots";
|
|
147
|
+
npcs: "none" | "tokens" | "dots";
|
|
148
|
+
rivalsOrPlayers: "none" | "dots";
|
|
149
|
+
};
|
|
150
|
+
pins: {
|
|
151
|
+
objectives: boolean;
|
|
152
|
+
exits: boolean;
|
|
153
|
+
collectiblesOrItems: boolean;
|
|
154
|
+
autoHideCollected: boolean;
|
|
155
|
+
customNotes: boolean;
|
|
156
|
+
wayfinding: boolean;
|
|
157
|
+
};
|
|
158
|
+
}>;
|
|
159
|
+
panels: z.ZodObject<{
|
|
160
|
+
vitals: z.ZodArray<z.ZodString, "many">;
|
|
161
|
+
inventory: z.ZodObject<{
|
|
162
|
+
items: z.ZodEnum<["full", "partial", "none"]>;
|
|
163
|
+
equipment: z.ZodBoolean;
|
|
164
|
+
counters: z.ZodBoolean;
|
|
165
|
+
icons: z.ZodEnum<["extracted_hd", "glyphs", "none"]>;
|
|
166
|
+
}, "strip", z.ZodTypeAny, {
|
|
167
|
+
counters: boolean;
|
|
168
|
+
items: "partial" | "none" | "full";
|
|
169
|
+
equipment: boolean;
|
|
170
|
+
icons: "none" | "extracted_hd" | "glyphs";
|
|
171
|
+
}, {
|
|
172
|
+
counters: boolean;
|
|
173
|
+
items: "partial" | "none" | "full";
|
|
174
|
+
equipment: boolean;
|
|
175
|
+
icons: "none" | "extracted_hd" | "glyphs";
|
|
176
|
+
}>;
|
|
177
|
+
missions: z.ZodObject<{
|
|
178
|
+
main: z.ZodBoolean;
|
|
179
|
+
side: z.ZodBoolean;
|
|
180
|
+
collectibles: z.ZodBoolean;
|
|
181
|
+
}, "strip", z.ZodTypeAny, {
|
|
182
|
+
main: boolean;
|
|
183
|
+
side: boolean;
|
|
184
|
+
collectibles: boolean;
|
|
185
|
+
}, {
|
|
186
|
+
main: boolean;
|
|
187
|
+
side: boolean;
|
|
188
|
+
collectibles: boolean;
|
|
189
|
+
}>;
|
|
190
|
+
reference: z.ZodArray<z.ZodString, "many">;
|
|
191
|
+
timelines: z.ZodBoolean;
|
|
192
|
+
ai: z.ZodObject<{
|
|
193
|
+
stateFacts: z.ZodBoolean;
|
|
194
|
+
chips: z.ZodBoolean;
|
|
195
|
+
curatedHints: z.ZodBoolean;
|
|
196
|
+
wayfindNudges: z.ZodBoolean;
|
|
197
|
+
}, "strip", z.ZodTypeAny, {
|
|
198
|
+
chips: boolean;
|
|
199
|
+
stateFacts: boolean;
|
|
200
|
+
curatedHints: boolean;
|
|
201
|
+
wayfindNudges: boolean;
|
|
202
|
+
}, {
|
|
203
|
+
chips: boolean;
|
|
204
|
+
stateFacts: boolean;
|
|
205
|
+
curatedHints: boolean;
|
|
206
|
+
wayfindNudges: boolean;
|
|
207
|
+
}>;
|
|
208
|
+
}, "strip", z.ZodTypeAny, {
|
|
209
|
+
timelines: boolean;
|
|
210
|
+
inventory: {
|
|
211
|
+
counters: boolean;
|
|
212
|
+
items: "partial" | "none" | "full";
|
|
213
|
+
equipment: boolean;
|
|
214
|
+
icons: "none" | "extracted_hd" | "glyphs";
|
|
215
|
+
};
|
|
216
|
+
missions: {
|
|
217
|
+
main: boolean;
|
|
218
|
+
side: boolean;
|
|
219
|
+
collectibles: boolean;
|
|
220
|
+
};
|
|
221
|
+
reference: string[];
|
|
222
|
+
vitals: string[];
|
|
223
|
+
ai: {
|
|
224
|
+
chips: boolean;
|
|
225
|
+
stateFacts: boolean;
|
|
226
|
+
curatedHints: boolean;
|
|
227
|
+
wayfindNudges: boolean;
|
|
228
|
+
};
|
|
229
|
+
}, {
|
|
230
|
+
timelines: boolean;
|
|
231
|
+
inventory: {
|
|
232
|
+
counters: boolean;
|
|
233
|
+
items: "partial" | "none" | "full";
|
|
234
|
+
equipment: boolean;
|
|
235
|
+
icons: "none" | "extracted_hd" | "glyphs";
|
|
236
|
+
};
|
|
237
|
+
missions: {
|
|
238
|
+
main: boolean;
|
|
239
|
+
side: boolean;
|
|
240
|
+
collectibles: boolean;
|
|
241
|
+
};
|
|
242
|
+
reference: string[];
|
|
243
|
+
vitals: string[];
|
|
244
|
+
ai: {
|
|
245
|
+
chips: boolean;
|
|
246
|
+
stateFacts: boolean;
|
|
247
|
+
curatedHints: boolean;
|
|
248
|
+
wayfindNudges: boolean;
|
|
249
|
+
};
|
|
250
|
+
}>;
|
|
251
|
+
}, "strip", z.ZodTypeAny, {
|
|
252
|
+
map: {
|
|
253
|
+
status: "done" | "partial" | "puzzle_panel" | "open";
|
|
254
|
+
layers: "none" | "multi_floor" | "per_room" | "mode_switched" | "single";
|
|
255
|
+
assetSource: "local_rom" | "local_files" | "registry" | "none";
|
|
256
|
+
geometry: "none" | "3d_mesh" | "textured_2d" | "vector_surfaces" | "vector_walls" | "route_lanes";
|
|
257
|
+
controls: {
|
|
258
|
+
panZoom: boolean;
|
|
259
|
+
rotate2d: boolean;
|
|
260
|
+
tilt3d: boolean;
|
|
261
|
+
};
|
|
262
|
+
player: {
|
|
263
|
+
position: boolean;
|
|
264
|
+
heading: boolean;
|
|
265
|
+
roomOrFloor: boolean;
|
|
266
|
+
};
|
|
267
|
+
actors: {
|
|
268
|
+
enemies: "none" | "tokens" | "dots";
|
|
269
|
+
npcs: "none" | "tokens" | "dots";
|
|
270
|
+
rivalsOrPlayers: "none" | "dots";
|
|
271
|
+
};
|
|
272
|
+
pins: {
|
|
273
|
+
objectives: boolean;
|
|
274
|
+
exits: boolean;
|
|
275
|
+
collectiblesOrItems: boolean;
|
|
276
|
+
autoHideCollected: boolean;
|
|
277
|
+
customNotes: boolean;
|
|
278
|
+
wayfinding: boolean;
|
|
279
|
+
};
|
|
280
|
+
};
|
|
281
|
+
title: string;
|
|
282
|
+
gameId: string;
|
|
283
|
+
panels: {
|
|
284
|
+
timelines: boolean;
|
|
285
|
+
inventory: {
|
|
286
|
+
counters: boolean;
|
|
287
|
+
items: "partial" | "none" | "full";
|
|
288
|
+
equipment: boolean;
|
|
289
|
+
icons: "none" | "extracted_hd" | "glyphs";
|
|
290
|
+
};
|
|
291
|
+
missions: {
|
|
292
|
+
main: boolean;
|
|
293
|
+
side: boolean;
|
|
294
|
+
collectibles: boolean;
|
|
295
|
+
};
|
|
296
|
+
reference: string[];
|
|
297
|
+
vitals: string[];
|
|
298
|
+
ai: {
|
|
299
|
+
chips: boolean;
|
|
300
|
+
stateFacts: boolean;
|
|
301
|
+
curatedHints: boolean;
|
|
302
|
+
wayfindNudges: boolean;
|
|
303
|
+
};
|
|
304
|
+
};
|
|
305
|
+
builds: {
|
|
306
|
+
label: string;
|
|
307
|
+
id: string;
|
|
308
|
+
verification: "live_played" | "live_route" | "tas_verified" | "attract_only" | "unit_only";
|
|
309
|
+
}[];
|
|
310
|
+
}, {
|
|
311
|
+
map: {
|
|
312
|
+
status: "done" | "partial" | "puzzle_panel" | "open";
|
|
313
|
+
layers: "none" | "multi_floor" | "per_room" | "mode_switched" | "single";
|
|
314
|
+
assetSource: "local_rom" | "local_files" | "registry" | "none";
|
|
315
|
+
geometry: "none" | "3d_mesh" | "textured_2d" | "vector_surfaces" | "vector_walls" | "route_lanes";
|
|
316
|
+
controls: {
|
|
317
|
+
panZoom: boolean;
|
|
318
|
+
rotate2d: boolean;
|
|
319
|
+
tilt3d: boolean;
|
|
320
|
+
};
|
|
321
|
+
player: {
|
|
322
|
+
position: boolean;
|
|
323
|
+
heading: boolean;
|
|
324
|
+
roomOrFloor: boolean;
|
|
325
|
+
};
|
|
326
|
+
actors: {
|
|
327
|
+
enemies: "none" | "tokens" | "dots";
|
|
328
|
+
npcs: "none" | "tokens" | "dots";
|
|
329
|
+
rivalsOrPlayers: "none" | "dots";
|
|
330
|
+
};
|
|
331
|
+
pins: {
|
|
332
|
+
objectives: boolean;
|
|
333
|
+
exits: boolean;
|
|
334
|
+
collectiblesOrItems: boolean;
|
|
335
|
+
autoHideCollected: boolean;
|
|
336
|
+
customNotes: boolean;
|
|
337
|
+
wayfinding: boolean;
|
|
338
|
+
};
|
|
339
|
+
};
|
|
340
|
+
title: string;
|
|
341
|
+
gameId: string;
|
|
342
|
+
panels: {
|
|
343
|
+
timelines: boolean;
|
|
344
|
+
inventory: {
|
|
345
|
+
counters: boolean;
|
|
346
|
+
items: "partial" | "none" | "full";
|
|
347
|
+
equipment: boolean;
|
|
348
|
+
icons: "none" | "extracted_hd" | "glyphs";
|
|
349
|
+
};
|
|
350
|
+
missions: {
|
|
351
|
+
main: boolean;
|
|
352
|
+
side: boolean;
|
|
353
|
+
collectibles: boolean;
|
|
354
|
+
};
|
|
355
|
+
reference: string[];
|
|
356
|
+
vitals: string[];
|
|
357
|
+
ai: {
|
|
358
|
+
chips: boolean;
|
|
359
|
+
stateFacts: boolean;
|
|
360
|
+
curatedHints: boolean;
|
|
361
|
+
wayfindNudges: boolean;
|
|
362
|
+
};
|
|
363
|
+
};
|
|
364
|
+
builds: {
|
|
365
|
+
label: string;
|
|
366
|
+
id: string;
|
|
367
|
+
verification: "live_played" | "live_route" | "tas_verified" | "attract_only" | "unit_only";
|
|
368
|
+
}[];
|
|
369
|
+
}>;
|
|
370
|
+
export type GameSupport = z.infer<typeof GameSupportSchema>;
|
|
371
|
+
/** Parses a per-game `<game>/README.md` into its validated `GameSupport` spec and checks required headings. */
|
|
372
|
+
export declare function parseGameSupportReadme(markdown: string): {
|
|
373
|
+
support: GameSupport;
|
|
374
|
+
body: string;
|
|
375
|
+
problems: string[];
|
|
376
|
+
};
|
|
377
|
+
export interface SupportCodeContext {
|
|
378
|
+
pack: GamePack;
|
|
379
|
+
sources: ReadonlyArray<{
|
|
380
|
+
capabilities: readonly GameCapability[];
|
|
381
|
+
supportedBuildIds: ReadonlyMap<string, {
|
|
382
|
+
region: string;
|
|
383
|
+
}>;
|
|
384
|
+
}>;
|
|
385
|
+
hasAssetExtractor: boolean;
|
|
386
|
+
/** Optional explicit timeline check (omitted for sandboxed packs whose `ui.timelines` is a host proxy). */
|
|
387
|
+
hasTimelines?: boolean;
|
|
388
|
+
}
|
|
389
|
+
/** Verifies that a game's README support spec agrees with its actual pack, sources, and extractor. */
|
|
390
|
+
export declare function checkSupportAgainstCode(support: GameSupport, ctx: SupportCodeContext): string[];
|
|
391
|
+
/** Renders a standard Markdown support table from a list of per-game support entries. */
|
|
392
|
+
export declare function renderSupportTable(entries: ReadonlyArray<{
|
|
393
|
+
support: GameSupport;
|
|
394
|
+
readmeRelPath: string;
|
|
395
|
+
}>): string;
|
|
396
|
+
/** Replaces the region between SUPPORT_TABLE_START and SUPPORT_TABLE_END in a top-level README. */
|
|
397
|
+
export declare function spliceSupportTable(readmeMarkdown: string, entries: ReadonlyArray<{
|
|
398
|
+
support: GameSupport;
|
|
399
|
+
readmeRelPath: string;
|
|
400
|
+
}>): string;
|