@gameslate/sdk 0.0.0-stage → 0.3.1

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.
Files changed (47) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +38 -2
  3. package/bin/gameslate-plugin.mjs +26 -0
  4. package/build/build-plugin.mjs +127 -0
  5. package/lib/assets.d.ts +1788 -0
  6. package/lib/assets.js +107 -0
  7. package/lib/bytes.d.ts +33 -0
  8. package/lib/bytes.js +89 -0
  9. package/lib/catalogue.d.ts +1228 -0
  10. package/lib/catalogue.js +305 -0
  11. package/lib/chips.d.ts +18 -0
  12. package/lib/chips.js +28 -0
  13. package/lib/condition.d.ts +58 -0
  14. package/lib/condition.js +125 -0
  15. package/lib/index.d.ts +16 -0
  16. package/lib/index.js +16 -0
  17. package/lib/logic.d.ts +68 -0
  18. package/lib/logic.js +194 -0
  19. package/lib/navigation.d.ts +139 -0
  20. package/lib/navigation.js +38 -0
  21. package/lib/pack.d.ts +933 -0
  22. package/lib/pack.js +29 -0
  23. package/lib/pins.d.ts +19 -0
  24. package/lib/pins.js +35 -0
  25. package/lib/plugin/contract.d.ts +111 -0
  26. package/lib/plugin/contract.js +1 -0
  27. package/lib/plugin/index.d.ts +3 -0
  28. package/lib/plugin/index.js +9 -0
  29. package/lib/plugin/sandbox-guest.d.ts +12 -0
  30. package/lib/plugin/sandbox-guest.js +128 -0
  31. package/lib/plugin/seqlock.d.ts +8 -0
  32. package/lib/plugin/seqlock.js +19 -0
  33. package/lib/plugin-manifest.d.ts +131 -0
  34. package/lib/plugin-manifest.js +54 -0
  35. package/lib/plugins-api.d.ts +445 -0
  36. package/lib/plugins-api.js +38 -0
  37. package/lib/registry.d.ts +2231 -0
  38. package/lib/registry.js +170 -0
  39. package/lib/sandbox-protocol.d.ts +1363 -0
  40. package/lib/sandbox-protocol.js +39 -0
  41. package/lib/status.d.ts +24 -0
  42. package/lib/status.js +75 -0
  43. package/lib/types.d.ts +2684 -0
  44. package/lib/types.js +282 -0
  45. package/lib/views.d.ts +204 -0
  46. package/lib/views.js +35 -0
  47. package/package.json +53 -3
package/lib/pack.d.ts ADDED
@@ -0,0 +1,933 @@
1
+ import { z } from 'zod';
2
+ import type { GameState } from './types.js';
3
+ import type { PackViews, StatusStripView, TimelineView } from './views.js';
4
+ /**
5
+ * A pack's data: everything the web app needs about one game that doesn't depend on the live
6
+ * state. The daemon serves it (`/api/packs/<gameId>`); shared code never branches on `id`.
7
+ */
8
+ export declare const PackDataSchema: z.ZodObject<{
9
+ id: z.ZodString;
10
+ title: z.ZodString;
11
+ catalogue: z.ZodObject<{
12
+ items: z.ZodArray<z.ZodObject<{
13
+ id: z.ZodString;
14
+ label: z.ZodString;
15
+ icon: z.ZodOptional<z.ZodString>;
16
+ category: z.ZodOptional<z.ZodString>;
17
+ short: z.ZodOptional<z.ZodString>;
18
+ source: z.ZodOptional<z.ZodString>;
19
+ }, "strict", z.ZodTypeAny, {
20
+ label: string;
21
+ id: string;
22
+ icon?: string | undefined;
23
+ source?: string | undefined;
24
+ category?: string | undefined;
25
+ short?: string | undefined;
26
+ }, {
27
+ label: string;
28
+ id: string;
29
+ icon?: string | undefined;
30
+ source?: string | undefined;
31
+ category?: string | undefined;
32
+ short?: string | undefined;
33
+ }>, "many">;
34
+ counters: z.ZodArray<z.ZodObject<{
35
+ id: z.ZodString;
36
+ label: z.ZodString;
37
+ icon: z.ZodOptional<z.ZodString>;
38
+ max: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
39
+ display: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
40
+ }, "strict", z.ZodTypeAny, {
41
+ label: string;
42
+ id: string;
43
+ icon?: string | undefined;
44
+ max?: string | number | undefined;
45
+ display?: Record<string, string> | undefined;
46
+ }, {
47
+ label: string;
48
+ id: string;
49
+ icon?: string | undefined;
50
+ max?: string | number | undefined;
51
+ display?: Record<string, string> | undefined;
52
+ }>, "many">;
53
+ flagSets: z.ZodArray<z.ZodString, "many">;
54
+ inventoryLayouts: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
55
+ kind: z.ZodLiteral<"slotGrid">;
56
+ id: z.ZodString;
57
+ title: z.ZodString;
58
+ columns: z.ZodNumber;
59
+ slots: z.ZodArray<z.ZodString, "many">;
60
+ }, "strict", z.ZodTypeAny, {
61
+ id: string;
62
+ title: string;
63
+ kind: "slotGrid";
64
+ columns: number;
65
+ slots: string[];
66
+ }, {
67
+ id: string;
68
+ title: string;
69
+ kind: "slotGrid";
70
+ columns: number;
71
+ slots: string[];
72
+ }>, z.ZodObject<{
73
+ kind: z.ZodLiteral<"counters">;
74
+ id: z.ZodString;
75
+ title: z.ZodString;
76
+ counters: z.ZodArray<z.ZodString, "many">;
77
+ }, "strict", z.ZodTypeAny, {
78
+ id: string;
79
+ title: string;
80
+ counters: string[];
81
+ kind: "counters";
82
+ }, {
83
+ id: string;
84
+ title: string;
85
+ counters: string[];
86
+ kind: "counters";
87
+ }>]>, "many">;
88
+ missions: z.ZodArray<z.ZodObject<{
89
+ id: z.ZodString;
90
+ title: z.ZodString;
91
+ group: z.ZodEnum<["main", "side"]>;
92
+ section: z.ZodOptional<z.ZodString>;
93
+ location: z.ZodOptional<z.ZodString>;
94
+ detail: z.ZodOptional<z.ZodString>;
95
+ done: z.ZodType<import("./condition.js").Condition, z.ZodTypeDef, import("./condition.js").Condition>;
96
+ availableWhen: z.ZodOptional<z.ZodType<import("./condition.js").Condition, z.ZodTypeDef, import("./condition.js").Condition>>;
97
+ progress: z.ZodOptional<z.ZodObject<{
98
+ counter: z.ZodString;
99
+ target: z.ZodNumber;
100
+ }, "strict", z.ZodTypeAny, {
101
+ target: number;
102
+ counter: string;
103
+ }, {
104
+ target: number;
105
+ counter: string;
106
+ }>>;
107
+ steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
108
+ id: z.ZodString;
109
+ label: z.ZodString;
110
+ done: z.ZodType<import("./condition.js").Condition, z.ZodTypeDef, import("./condition.js").Condition>;
111
+ }, "strict", z.ZodTypeAny, {
112
+ label: string;
113
+ id: string;
114
+ done: import("./condition.js").Condition;
115
+ }, {
116
+ label: string;
117
+ id: string;
118
+ done: import("./condition.js").Condition;
119
+ }>, "many">>;
120
+ ask: z.ZodOptional<z.ZodString>;
121
+ }, "strict", z.ZodTypeAny, {
122
+ id: string;
123
+ title: string;
124
+ done: import("./condition.js").Condition;
125
+ group: "main" | "side";
126
+ detail?: string | undefined;
127
+ ask?: string | undefined;
128
+ location?: string | undefined;
129
+ section?: string | undefined;
130
+ availableWhen?: import("./condition.js").Condition | undefined;
131
+ progress?: {
132
+ target: number;
133
+ counter: string;
134
+ } | undefined;
135
+ steps?: {
136
+ label: string;
137
+ id: string;
138
+ done: import("./condition.js").Condition;
139
+ }[] | undefined;
140
+ }, {
141
+ id: string;
142
+ title: string;
143
+ done: import("./condition.js").Condition;
144
+ group: "main" | "side";
145
+ detail?: string | undefined;
146
+ ask?: string | undefined;
147
+ location?: string | undefined;
148
+ section?: string | undefined;
149
+ availableWhen?: import("./condition.js").Condition | undefined;
150
+ progress?: {
151
+ target: number;
152
+ counter: string;
153
+ } | undefined;
154
+ steps?: {
155
+ label: string;
156
+ id: string;
157
+ done: import("./condition.js").Condition;
158
+ }[] | undefined;
159
+ }>, "many">;
160
+ collectibles: z.ZodArray<z.ZodObject<{
161
+ id: z.ZodString;
162
+ title: z.ZodString;
163
+ noun: z.ZodString;
164
+ icon: z.ZodOptional<z.ZodString>;
165
+ counter: z.ZodOptional<z.ZodString>;
166
+ entries: z.ZodOptional<z.ZodArray<z.ZodObject<{
167
+ id: z.ZodString;
168
+ name: z.ZodString;
169
+ locationId: z.ZodOptional<z.ZodString>;
170
+ locationName: z.ZodOptional<z.ZodString>;
171
+ collectedBy: z.ZodOptional<z.ZodType<import("./condition.js").Condition, z.ZodTypeDef, import("./condition.js").Condition>>;
172
+ needs: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
173
+ pinId: z.ZodOptional<z.ZodString>;
174
+ }, "strict", z.ZodTypeAny, {
175
+ id: string;
176
+ name: string;
177
+ locationId?: string | undefined;
178
+ pinId?: string | undefined;
179
+ collectedBy?: import("./condition.js").Condition | undefined;
180
+ locationName?: string | undefined;
181
+ needs?: string[][] | undefined;
182
+ }, {
183
+ id: string;
184
+ name: string;
185
+ locationId?: string | undefined;
186
+ pinId?: string | undefined;
187
+ collectedBy?: import("./condition.js").Condition | undefined;
188
+ locationName?: string | undefined;
189
+ needs?: string[][] | undefined;
190
+ }>, "many">>;
191
+ localSource: z.ZodOptional<z.ZodObject<{
192
+ file: z.ZodString;
193
+ key: z.ZodString;
194
+ }, "strict", z.ZodTypeAny, {
195
+ key: string;
196
+ file: string;
197
+ }, {
198
+ key: string;
199
+ file: string;
200
+ }>>;
201
+ }, "strict", z.ZodTypeAny, {
202
+ id: string;
203
+ title: string;
204
+ noun: string;
205
+ icon?: string | undefined;
206
+ entries?: {
207
+ id: string;
208
+ name: string;
209
+ locationId?: string | undefined;
210
+ pinId?: string | undefined;
211
+ collectedBy?: import("./condition.js").Condition | undefined;
212
+ locationName?: string | undefined;
213
+ needs?: string[][] | undefined;
214
+ }[] | undefined;
215
+ counter?: string | undefined;
216
+ localSource?: {
217
+ key: string;
218
+ file: string;
219
+ } | undefined;
220
+ }, {
221
+ id: string;
222
+ title: string;
223
+ noun: string;
224
+ icon?: string | undefined;
225
+ entries?: {
226
+ id: string;
227
+ name: string;
228
+ locationId?: string | undefined;
229
+ pinId?: string | undefined;
230
+ collectedBy?: import("./condition.js").Condition | undefined;
231
+ locationName?: string | undefined;
232
+ needs?: string[][] | undefined;
233
+ }[] | undefined;
234
+ counter?: string | undefined;
235
+ localSource?: {
236
+ key: string;
237
+ file: string;
238
+ } | undefined;
239
+ }>, "many">;
240
+ reference: z.ZodArray<z.ZodObject<{
241
+ id: z.ZodString;
242
+ title: z.ZodString;
243
+ badge: z.ZodOptional<z.ZodString>;
244
+ defaultOpen: z.ZodOptional<z.ZodBoolean>;
245
+ entries: z.ZodArray<z.ZodObject<{
246
+ id: z.ZodString;
247
+ title: z.ZodString;
248
+ badge: z.ZodOptional<z.ZodString>;
249
+ sequence: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
250
+ notes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
251
+ rows: z.ZodOptional<z.ZodArray<z.ZodObject<{
252
+ label: z.ZodString;
253
+ detail: z.ZodString;
254
+ }, "strict", z.ZodTypeAny, {
255
+ label: string;
256
+ detail: string;
257
+ }, {
258
+ label: string;
259
+ detail: string;
260
+ }>, "many">>;
261
+ revealWhen: z.ZodOptional<z.ZodType<import("./condition.js").Condition, z.ZodTypeDef, import("./condition.js").Condition>>;
262
+ }, "strict", z.ZodTypeAny, {
263
+ id: string;
264
+ title: string;
265
+ notes?: string[] | undefined;
266
+ badge?: string | undefined;
267
+ sequence?: string[] | undefined;
268
+ rows?: {
269
+ label: string;
270
+ detail: string;
271
+ }[] | undefined;
272
+ revealWhen?: import("./condition.js").Condition | undefined;
273
+ }, {
274
+ id: string;
275
+ title: string;
276
+ notes?: string[] | undefined;
277
+ badge?: string | undefined;
278
+ sequence?: string[] | undefined;
279
+ rows?: {
280
+ label: string;
281
+ detail: string;
282
+ }[] | undefined;
283
+ revealWhen?: import("./condition.js").Condition | undefined;
284
+ }>, "many">;
285
+ }, "strict", z.ZodTypeAny, {
286
+ entries: {
287
+ id: string;
288
+ title: string;
289
+ notes?: string[] | undefined;
290
+ badge?: string | undefined;
291
+ sequence?: string[] | undefined;
292
+ rows?: {
293
+ label: string;
294
+ detail: string;
295
+ }[] | undefined;
296
+ revealWhen?: import("./condition.js").Condition | undefined;
297
+ }[];
298
+ id: string;
299
+ title: string;
300
+ badge?: string | undefined;
301
+ defaultOpen?: boolean | undefined;
302
+ }, {
303
+ entries: {
304
+ id: string;
305
+ title: string;
306
+ notes?: string[] | undefined;
307
+ badge?: string | undefined;
308
+ sequence?: string[] | undefined;
309
+ rows?: {
310
+ label: string;
311
+ detail: string;
312
+ }[] | undefined;
313
+ revealWhen?: import("./condition.js").Condition | undefined;
314
+ }[];
315
+ id: string;
316
+ title: string;
317
+ badge?: string | undefined;
318
+ defaultOpen?: boolean | undefined;
319
+ }>, "many">;
320
+ chips: z.ZodArray<z.ZodObject<{
321
+ id: z.ZodString;
322
+ label: z.ZodString;
323
+ prompt: z.ZodString;
324
+ when: z.ZodOptional<z.ZodType<import("./condition.js").Condition, z.ZodTypeDef, import("./condition.js").Condition>>;
325
+ }, "strict", z.ZodTypeAny, {
326
+ label: string;
327
+ id: string;
328
+ prompt: string;
329
+ when?: import("./condition.js").Condition | undefined;
330
+ }, {
331
+ label: string;
332
+ id: string;
333
+ prompt: string;
334
+ when?: import("./condition.js").Condition | undefined;
335
+ }>, "many">;
336
+ pinRules: z.ZodArray<z.ZodEffects<z.ZodObject<{
337
+ id: z.ZodString;
338
+ match: z.ZodEffects<z.ZodObject<{
339
+ at: z.ZodOptional<z.ZodString>;
340
+ kind: z.ZodOptional<z.ZodString>;
341
+ ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
342
+ label: z.ZodOptional<z.ZodString>;
343
+ labelContains: z.ZodOptional<z.ZodString>;
344
+ }, "strict", z.ZodTypeAny, {
345
+ label?: string | undefined;
346
+ at?: string | undefined;
347
+ kind?: string | undefined;
348
+ ids?: string[] | undefined;
349
+ labelContains?: string | undefined;
350
+ }, {
351
+ label?: string | undefined;
352
+ at?: string | undefined;
353
+ kind?: string | undefined;
354
+ ids?: string[] | undefined;
355
+ labelContains?: string | undefined;
356
+ }>, {
357
+ label?: string | undefined;
358
+ at?: string | undefined;
359
+ kind?: string | undefined;
360
+ ids?: string[] | undefined;
361
+ labelContains?: string | undefined;
362
+ }, {
363
+ label?: string | undefined;
364
+ at?: string | undefined;
365
+ kind?: string | undefined;
366
+ ids?: string[] | undefined;
367
+ labelContains?: string | undefined;
368
+ }>;
369
+ collectedBy: z.ZodOptional<z.ZodType<import("./condition.js").Condition, z.ZodTypeDef, import("./condition.js").Condition>>;
370
+ hiddenWhen: z.ZodOptional<z.ZodType<import("./condition.js").Condition, z.ZodTypeDef, import("./condition.js").Condition>>;
371
+ icon: z.ZodOptional<z.ZodString>;
372
+ }, "strict", z.ZodTypeAny, {
373
+ id: string;
374
+ match: {
375
+ label?: string | undefined;
376
+ at?: string | undefined;
377
+ kind?: string | undefined;
378
+ ids?: string[] | undefined;
379
+ labelContains?: string | undefined;
380
+ };
381
+ icon?: string | undefined;
382
+ collectedBy?: import("./condition.js").Condition | undefined;
383
+ hiddenWhen?: import("./condition.js").Condition | undefined;
384
+ }, {
385
+ id: string;
386
+ match: {
387
+ label?: string | undefined;
388
+ at?: string | undefined;
389
+ kind?: string | undefined;
390
+ ids?: string[] | undefined;
391
+ labelContains?: string | undefined;
392
+ };
393
+ icon?: string | undefined;
394
+ collectedBy?: import("./condition.js").Condition | undefined;
395
+ hiddenWhen?: import("./condition.js").Condition | undefined;
396
+ }>, {
397
+ id: string;
398
+ match: {
399
+ label?: string | undefined;
400
+ at?: string | undefined;
401
+ kind?: string | undefined;
402
+ ids?: string[] | undefined;
403
+ labelContains?: string | undefined;
404
+ };
405
+ icon?: string | undefined;
406
+ collectedBy?: import("./condition.js").Condition | undefined;
407
+ hiddenWhen?: import("./condition.js").Condition | undefined;
408
+ }, {
409
+ id: string;
410
+ match: {
411
+ label?: string | undefined;
412
+ at?: string | undefined;
413
+ kind?: string | undefined;
414
+ ids?: string[] | undefined;
415
+ labelContains?: string | undefined;
416
+ };
417
+ icon?: string | undefined;
418
+ collectedBy?: import("./condition.js").Condition | undefined;
419
+ hiddenWhen?: import("./condition.js").Condition | undefined;
420
+ }>, "many">;
421
+ pinCategories: z.ZodOptional<z.ZodArray<z.ZodObject<{
422
+ id: z.ZodString;
423
+ label: z.ZodString;
424
+ shownByDefault: z.ZodBoolean;
425
+ icon: z.ZodOptional<z.ZodString>;
426
+ }, "strip", z.ZodTypeAny, {
427
+ label: string;
428
+ id: string;
429
+ shownByDefault: boolean;
430
+ icon?: string | undefined;
431
+ }, {
432
+ label: string;
433
+ id: string;
434
+ shownByDefault: boolean;
435
+ icon?: string | undefined;
436
+ }>, "many">>;
437
+ }, "strict", z.ZodTypeAny, {
438
+ counters: {
439
+ label: string;
440
+ id: string;
441
+ icon?: string | undefined;
442
+ max?: string | number | undefined;
443
+ display?: Record<string, string> | undefined;
444
+ }[];
445
+ flagSets: string[];
446
+ items: {
447
+ label: string;
448
+ id: string;
449
+ icon?: string | undefined;
450
+ source?: string | undefined;
451
+ category?: string | undefined;
452
+ short?: string | undefined;
453
+ }[];
454
+ chips: {
455
+ label: string;
456
+ id: string;
457
+ prompt: string;
458
+ when?: import("./condition.js").Condition | undefined;
459
+ }[];
460
+ inventoryLayouts: ({
461
+ id: string;
462
+ title: string;
463
+ kind: "slotGrid";
464
+ columns: number;
465
+ slots: string[];
466
+ } | {
467
+ id: string;
468
+ title: string;
469
+ counters: string[];
470
+ kind: "counters";
471
+ })[];
472
+ missions: {
473
+ id: string;
474
+ title: string;
475
+ done: import("./condition.js").Condition;
476
+ group: "main" | "side";
477
+ detail?: string | undefined;
478
+ ask?: string | undefined;
479
+ location?: string | undefined;
480
+ section?: string | undefined;
481
+ availableWhen?: import("./condition.js").Condition | undefined;
482
+ progress?: {
483
+ target: number;
484
+ counter: string;
485
+ } | undefined;
486
+ steps?: {
487
+ label: string;
488
+ id: string;
489
+ done: import("./condition.js").Condition;
490
+ }[] | undefined;
491
+ }[];
492
+ collectibles: {
493
+ id: string;
494
+ title: string;
495
+ noun: string;
496
+ icon?: string | undefined;
497
+ entries?: {
498
+ id: string;
499
+ name: string;
500
+ locationId?: string | undefined;
501
+ pinId?: string | undefined;
502
+ collectedBy?: import("./condition.js").Condition | undefined;
503
+ locationName?: string | undefined;
504
+ needs?: string[][] | undefined;
505
+ }[] | undefined;
506
+ counter?: string | undefined;
507
+ localSource?: {
508
+ key: string;
509
+ file: string;
510
+ } | undefined;
511
+ }[];
512
+ reference: {
513
+ entries: {
514
+ id: string;
515
+ title: string;
516
+ notes?: string[] | undefined;
517
+ badge?: string | undefined;
518
+ sequence?: string[] | undefined;
519
+ rows?: {
520
+ label: string;
521
+ detail: string;
522
+ }[] | undefined;
523
+ revealWhen?: import("./condition.js").Condition | undefined;
524
+ }[];
525
+ id: string;
526
+ title: string;
527
+ badge?: string | undefined;
528
+ defaultOpen?: boolean | undefined;
529
+ }[];
530
+ pinRules: {
531
+ id: string;
532
+ match: {
533
+ label?: string | undefined;
534
+ at?: string | undefined;
535
+ kind?: string | undefined;
536
+ ids?: string[] | undefined;
537
+ labelContains?: string | undefined;
538
+ };
539
+ icon?: string | undefined;
540
+ collectedBy?: import("./condition.js").Condition | undefined;
541
+ hiddenWhen?: import("./condition.js").Condition | undefined;
542
+ }[];
543
+ pinCategories?: {
544
+ label: string;
545
+ id: string;
546
+ shownByDefault: boolean;
547
+ icon?: string | undefined;
548
+ }[] | undefined;
549
+ }, {
550
+ counters: {
551
+ label: string;
552
+ id: string;
553
+ icon?: string | undefined;
554
+ max?: string | number | undefined;
555
+ display?: Record<string, string> | undefined;
556
+ }[];
557
+ flagSets: string[];
558
+ items: {
559
+ label: string;
560
+ id: string;
561
+ icon?: string | undefined;
562
+ source?: string | undefined;
563
+ category?: string | undefined;
564
+ short?: string | undefined;
565
+ }[];
566
+ chips: {
567
+ label: string;
568
+ id: string;
569
+ prompt: string;
570
+ when?: import("./condition.js").Condition | undefined;
571
+ }[];
572
+ inventoryLayouts: ({
573
+ id: string;
574
+ title: string;
575
+ kind: "slotGrid";
576
+ columns: number;
577
+ slots: string[];
578
+ } | {
579
+ id: string;
580
+ title: string;
581
+ counters: string[];
582
+ kind: "counters";
583
+ })[];
584
+ missions: {
585
+ id: string;
586
+ title: string;
587
+ done: import("./condition.js").Condition;
588
+ group: "main" | "side";
589
+ detail?: string | undefined;
590
+ ask?: string | undefined;
591
+ location?: string | undefined;
592
+ section?: string | undefined;
593
+ availableWhen?: import("./condition.js").Condition | undefined;
594
+ progress?: {
595
+ target: number;
596
+ counter: string;
597
+ } | undefined;
598
+ steps?: {
599
+ label: string;
600
+ id: string;
601
+ done: import("./condition.js").Condition;
602
+ }[] | undefined;
603
+ }[];
604
+ collectibles: {
605
+ id: string;
606
+ title: string;
607
+ noun: string;
608
+ icon?: string | undefined;
609
+ entries?: {
610
+ id: string;
611
+ name: string;
612
+ locationId?: string | undefined;
613
+ pinId?: string | undefined;
614
+ collectedBy?: import("./condition.js").Condition | undefined;
615
+ locationName?: string | undefined;
616
+ needs?: string[][] | undefined;
617
+ }[] | undefined;
618
+ counter?: string | undefined;
619
+ localSource?: {
620
+ key: string;
621
+ file: string;
622
+ } | undefined;
623
+ }[];
624
+ reference: {
625
+ entries: {
626
+ id: string;
627
+ title: string;
628
+ notes?: string[] | undefined;
629
+ badge?: string | undefined;
630
+ sequence?: string[] | undefined;
631
+ rows?: {
632
+ label: string;
633
+ detail: string;
634
+ }[] | undefined;
635
+ revealWhen?: import("./condition.js").Condition | undefined;
636
+ }[];
637
+ id: string;
638
+ title: string;
639
+ badge?: string | undefined;
640
+ defaultOpen?: boolean | undefined;
641
+ }[];
642
+ pinRules: {
643
+ id: string;
644
+ match: {
645
+ label?: string | undefined;
646
+ at?: string | undefined;
647
+ kind?: string | undefined;
648
+ ids?: string[] | undefined;
649
+ labelContains?: string | undefined;
650
+ };
651
+ icon?: string | undefined;
652
+ collectedBy?: import("./condition.js").Condition | undefined;
653
+ hiddenWhen?: import("./condition.js").Condition | undefined;
654
+ }[];
655
+ pinCategories?: {
656
+ label: string;
657
+ id: string;
658
+ shownByDefault: boolean;
659
+ icon?: string | undefined;
660
+ }[] | undefined;
661
+ }>;
662
+ /** Scale of the game's world coordinates, for distances shown to the player and the AI. */
663
+ world: z.ZodObject<{
664
+ unitsPerMeter: z.ZodNumber;
665
+ /** true when +Z points north (Doom); otherwise +Z points south (the Zelda ports). */
666
+ northIsPositiveZ: z.ZodOptional<z.ZodBoolean>;
667
+ }, "strip", z.ZodTypeAny, {
668
+ unitsPerMeter: number;
669
+ northIsPositiveZ?: boolean | undefined;
670
+ }, {
671
+ unitsPerMeter: number;
672
+ northIsPositiveZ?: boolean | undefined;
673
+ }>;
674
+ }, "strip", z.ZodTypeAny, {
675
+ id: string;
676
+ title: string;
677
+ world: {
678
+ unitsPerMeter: number;
679
+ northIsPositiveZ?: boolean | undefined;
680
+ };
681
+ catalogue: {
682
+ counters: {
683
+ label: string;
684
+ id: string;
685
+ icon?: string | undefined;
686
+ max?: string | number | undefined;
687
+ display?: Record<string, string> | undefined;
688
+ }[];
689
+ flagSets: string[];
690
+ items: {
691
+ label: string;
692
+ id: string;
693
+ icon?: string | undefined;
694
+ source?: string | undefined;
695
+ category?: string | undefined;
696
+ short?: string | undefined;
697
+ }[];
698
+ chips: {
699
+ label: string;
700
+ id: string;
701
+ prompt: string;
702
+ when?: import("./condition.js").Condition | undefined;
703
+ }[];
704
+ inventoryLayouts: ({
705
+ id: string;
706
+ title: string;
707
+ kind: "slotGrid";
708
+ columns: number;
709
+ slots: string[];
710
+ } | {
711
+ id: string;
712
+ title: string;
713
+ counters: string[];
714
+ kind: "counters";
715
+ })[];
716
+ missions: {
717
+ id: string;
718
+ title: string;
719
+ done: import("./condition.js").Condition;
720
+ group: "main" | "side";
721
+ detail?: string | undefined;
722
+ ask?: string | undefined;
723
+ location?: string | undefined;
724
+ section?: string | undefined;
725
+ availableWhen?: import("./condition.js").Condition | undefined;
726
+ progress?: {
727
+ target: number;
728
+ counter: string;
729
+ } | undefined;
730
+ steps?: {
731
+ label: string;
732
+ id: string;
733
+ done: import("./condition.js").Condition;
734
+ }[] | undefined;
735
+ }[];
736
+ collectibles: {
737
+ id: string;
738
+ title: string;
739
+ noun: string;
740
+ icon?: string | undefined;
741
+ entries?: {
742
+ id: string;
743
+ name: string;
744
+ locationId?: string | undefined;
745
+ pinId?: string | undefined;
746
+ collectedBy?: import("./condition.js").Condition | undefined;
747
+ locationName?: string | undefined;
748
+ needs?: string[][] | undefined;
749
+ }[] | undefined;
750
+ counter?: string | undefined;
751
+ localSource?: {
752
+ key: string;
753
+ file: string;
754
+ } | undefined;
755
+ }[];
756
+ reference: {
757
+ entries: {
758
+ id: string;
759
+ title: string;
760
+ notes?: string[] | undefined;
761
+ badge?: string | undefined;
762
+ sequence?: string[] | undefined;
763
+ rows?: {
764
+ label: string;
765
+ detail: string;
766
+ }[] | undefined;
767
+ revealWhen?: import("./condition.js").Condition | undefined;
768
+ }[];
769
+ id: string;
770
+ title: string;
771
+ badge?: string | undefined;
772
+ defaultOpen?: boolean | undefined;
773
+ }[];
774
+ pinRules: {
775
+ id: string;
776
+ match: {
777
+ label?: string | undefined;
778
+ at?: string | undefined;
779
+ kind?: string | undefined;
780
+ ids?: string[] | undefined;
781
+ labelContains?: string | undefined;
782
+ };
783
+ icon?: string | undefined;
784
+ collectedBy?: import("./condition.js").Condition | undefined;
785
+ hiddenWhen?: import("./condition.js").Condition | undefined;
786
+ }[];
787
+ pinCategories?: {
788
+ label: string;
789
+ id: string;
790
+ shownByDefault: boolean;
791
+ icon?: string | undefined;
792
+ }[] | undefined;
793
+ };
794
+ }, {
795
+ id: string;
796
+ title: string;
797
+ world: {
798
+ unitsPerMeter: number;
799
+ northIsPositiveZ?: boolean | undefined;
800
+ };
801
+ catalogue: {
802
+ counters: {
803
+ label: string;
804
+ id: string;
805
+ icon?: string | undefined;
806
+ max?: string | number | undefined;
807
+ display?: Record<string, string> | undefined;
808
+ }[];
809
+ flagSets: string[];
810
+ items: {
811
+ label: string;
812
+ id: string;
813
+ icon?: string | undefined;
814
+ source?: string | undefined;
815
+ category?: string | undefined;
816
+ short?: string | undefined;
817
+ }[];
818
+ chips: {
819
+ label: string;
820
+ id: string;
821
+ prompt: string;
822
+ when?: import("./condition.js").Condition | undefined;
823
+ }[];
824
+ inventoryLayouts: ({
825
+ id: string;
826
+ title: string;
827
+ kind: "slotGrid";
828
+ columns: number;
829
+ slots: string[];
830
+ } | {
831
+ id: string;
832
+ title: string;
833
+ counters: string[];
834
+ kind: "counters";
835
+ })[];
836
+ missions: {
837
+ id: string;
838
+ title: string;
839
+ done: import("./condition.js").Condition;
840
+ group: "main" | "side";
841
+ detail?: string | undefined;
842
+ ask?: string | undefined;
843
+ location?: string | undefined;
844
+ section?: string | undefined;
845
+ availableWhen?: import("./condition.js").Condition | undefined;
846
+ progress?: {
847
+ target: number;
848
+ counter: string;
849
+ } | undefined;
850
+ steps?: {
851
+ label: string;
852
+ id: string;
853
+ done: import("./condition.js").Condition;
854
+ }[] | undefined;
855
+ }[];
856
+ collectibles: {
857
+ id: string;
858
+ title: string;
859
+ noun: string;
860
+ icon?: string | undefined;
861
+ entries?: {
862
+ id: string;
863
+ name: string;
864
+ locationId?: string | undefined;
865
+ pinId?: string | undefined;
866
+ collectedBy?: import("./condition.js").Condition | undefined;
867
+ locationName?: string | undefined;
868
+ needs?: string[][] | undefined;
869
+ }[] | undefined;
870
+ counter?: string | undefined;
871
+ localSource?: {
872
+ key: string;
873
+ file: string;
874
+ } | undefined;
875
+ }[];
876
+ reference: {
877
+ entries: {
878
+ id: string;
879
+ title: string;
880
+ notes?: string[] | undefined;
881
+ badge?: string | undefined;
882
+ sequence?: string[] | undefined;
883
+ rows?: {
884
+ label: string;
885
+ detail: string;
886
+ }[] | undefined;
887
+ revealWhen?: import("./condition.js").Condition | undefined;
888
+ }[];
889
+ id: string;
890
+ title: string;
891
+ badge?: string | undefined;
892
+ defaultOpen?: boolean | undefined;
893
+ }[];
894
+ pinRules: {
895
+ id: string;
896
+ match: {
897
+ label?: string | undefined;
898
+ at?: string | undefined;
899
+ kind?: string | undefined;
900
+ ids?: string[] | undefined;
901
+ labelContains?: string | undefined;
902
+ };
903
+ icon?: string | undefined;
904
+ collectedBy?: import("./condition.js").Condition | undefined;
905
+ hiddenWhen?: import("./condition.js").Condition | undefined;
906
+ }[];
907
+ pinCategories?: {
908
+ label: string;
909
+ id: string;
910
+ shownByDefault: boolean;
911
+ icon?: string | undefined;
912
+ }[] | undefined;
913
+ };
914
+ }>;
915
+ export type PackData = z.infer<typeof PackDataSchema>;
916
+ /**
917
+ * Everything about one game, as a plugin exports it (games/<id>/pack.ts): its data, plus code the
918
+ * daemon runs over the live state to produce `PackViews`.
919
+ */
920
+ export interface GamePack extends PackData {
921
+ /** Facts about the live state for the AI prompt (plain sentences/phrases). */
922
+ describeState?: (state: GameState) => string[];
923
+ /** Optional UI extras that don't fit the generic catalogue (rendered by generic widgets). */
924
+ ui?: PackUi;
925
+ }
926
+ export interface PackUi {
927
+ statusStrip?: (state: GameState) => StatusStripView | null;
928
+ timelines?: (state: GameState) => TimelineView[];
929
+ }
930
+ /** The data part of a pack, without its code. */
931
+ export declare function packToData(pack: GamePack): PackData;
932
+ /** Runs a pack's code over the live state. */
933
+ export declare function packViewsFor(pack: GamePack, state: GameState): PackViews;