@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
@@ -0,0 +1,1363 @@
1
+ import { z } from 'zod';
2
+ /** A memory source as the guest describes it: everything but its code. */
3
+ export declare const SandboxSourceSchema: z.ZodObject<{
4
+ gameId: z.ZodString;
5
+ stateSchemaVersion: z.ZodNumber;
6
+ capabilities: z.ZodArray<z.ZodEnum<["location", "map_2d", "objectives", "inventory", "stats", "chat_chips"]>, "many">;
7
+ supportedBuildIds: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodObject<{
8
+ region: z.ZodString;
9
+ }, "strip", z.ZodTypeAny, {
10
+ region: string;
11
+ }, {
12
+ region: string;
13
+ }>], null>, "many">;
14
+ executableHints: z.ZodArray<z.ZodString, "many">;
15
+ wrapperMayOmitStats: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
16
+ unsupportedExecutables: z.ZodOptional<z.ZodArray<z.ZodObject<{
17
+ executable: z.ZodString;
18
+ reason: z.ZodString;
19
+ }, "strip", z.ZodTypeAny, {
20
+ executable: string;
21
+ reason: string;
22
+ }, {
23
+ executable: string;
24
+ reason: string;
25
+ }>, "many">>;
26
+ }, "strip", z.ZodTypeAny, {
27
+ gameId: string;
28
+ stateSchemaVersion: number;
29
+ capabilities: ("location" | "map_2d" | "objectives" | "inventory" | "stats" | "chat_chips")[];
30
+ supportedBuildIds: [string, {
31
+ region: string;
32
+ }][];
33
+ executableHints: string[];
34
+ wrapperMayOmitStats?: string[] | undefined;
35
+ unsupportedExecutables?: {
36
+ executable: string;
37
+ reason: string;
38
+ }[] | undefined;
39
+ }, {
40
+ gameId: string;
41
+ stateSchemaVersion: number;
42
+ capabilities: ("location" | "map_2d" | "objectives" | "inventory" | "stats" | "chat_chips")[];
43
+ supportedBuildIds: [string, {
44
+ region: string;
45
+ }][];
46
+ executableHints: string[];
47
+ wrapperMayOmitStats?: string[] | undefined;
48
+ unsupportedExecutables?: {
49
+ executable: string;
50
+ reason: string;
51
+ }[] | undefined;
52
+ }>;
53
+ export type SandboxSource = z.infer<typeof SandboxSourceSchema>;
54
+ export declare const SandboxDescriptionSchema: z.ZodObject<{
55
+ id: z.ZodString;
56
+ packs: z.ZodArray<z.ZodObject<{
57
+ id: z.ZodString;
58
+ title: z.ZodString;
59
+ catalogue: z.ZodObject<{
60
+ items: z.ZodArray<z.ZodObject<{
61
+ id: z.ZodString;
62
+ label: z.ZodString;
63
+ icon: z.ZodOptional<z.ZodString>;
64
+ category: z.ZodOptional<z.ZodString>;
65
+ short: z.ZodOptional<z.ZodString>;
66
+ source: z.ZodOptional<z.ZodString>;
67
+ }, "strict", z.ZodTypeAny, {
68
+ label: string;
69
+ id: string;
70
+ icon?: string | undefined;
71
+ source?: string | undefined;
72
+ category?: string | undefined;
73
+ short?: string | undefined;
74
+ }, {
75
+ label: string;
76
+ id: string;
77
+ icon?: string | undefined;
78
+ source?: string | undefined;
79
+ category?: string | undefined;
80
+ short?: string | undefined;
81
+ }>, "many">;
82
+ counters: z.ZodArray<z.ZodObject<{
83
+ id: z.ZodString;
84
+ label: z.ZodString;
85
+ icon: z.ZodOptional<z.ZodString>;
86
+ max: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
87
+ display: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
88
+ }, "strict", z.ZodTypeAny, {
89
+ label: string;
90
+ id: string;
91
+ icon?: string | undefined;
92
+ max?: string | number | undefined;
93
+ display?: Record<string, string> | undefined;
94
+ }, {
95
+ label: string;
96
+ id: string;
97
+ icon?: string | undefined;
98
+ max?: string | number | undefined;
99
+ display?: Record<string, string> | undefined;
100
+ }>, "many">;
101
+ flagSets: z.ZodArray<z.ZodString, "many">;
102
+ inventoryLayouts: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
103
+ kind: z.ZodLiteral<"slotGrid">;
104
+ id: z.ZodString;
105
+ title: z.ZodString;
106
+ columns: z.ZodNumber;
107
+ slots: z.ZodArray<z.ZodString, "many">;
108
+ }, "strict", z.ZodTypeAny, {
109
+ id: string;
110
+ title: string;
111
+ kind: "slotGrid";
112
+ columns: number;
113
+ slots: string[];
114
+ }, {
115
+ id: string;
116
+ title: string;
117
+ kind: "slotGrid";
118
+ columns: number;
119
+ slots: string[];
120
+ }>, z.ZodObject<{
121
+ kind: z.ZodLiteral<"counters">;
122
+ id: z.ZodString;
123
+ title: z.ZodString;
124
+ counters: z.ZodArray<z.ZodString, "many">;
125
+ }, "strict", z.ZodTypeAny, {
126
+ id: string;
127
+ title: string;
128
+ counters: string[];
129
+ kind: "counters";
130
+ }, {
131
+ id: string;
132
+ title: string;
133
+ counters: string[];
134
+ kind: "counters";
135
+ }>]>, "many">;
136
+ missions: z.ZodArray<z.ZodObject<{
137
+ id: z.ZodString;
138
+ title: z.ZodString;
139
+ group: z.ZodEnum<["main", "side"]>;
140
+ section: z.ZodOptional<z.ZodString>;
141
+ location: z.ZodOptional<z.ZodString>;
142
+ detail: z.ZodOptional<z.ZodString>;
143
+ done: z.ZodType<import("./condition.js").Condition, z.ZodTypeDef, import("./condition.js").Condition>;
144
+ availableWhen: z.ZodOptional<z.ZodType<import("./condition.js").Condition, z.ZodTypeDef, import("./condition.js").Condition>>;
145
+ progress: z.ZodOptional<z.ZodObject<{
146
+ counter: z.ZodString;
147
+ target: z.ZodNumber;
148
+ }, "strict", z.ZodTypeAny, {
149
+ target: number;
150
+ counter: string;
151
+ }, {
152
+ target: number;
153
+ counter: string;
154
+ }>>;
155
+ steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
156
+ id: z.ZodString;
157
+ label: z.ZodString;
158
+ done: z.ZodType<import("./condition.js").Condition, z.ZodTypeDef, import("./condition.js").Condition>;
159
+ }, "strict", z.ZodTypeAny, {
160
+ label: string;
161
+ id: string;
162
+ done: import("./condition.js").Condition;
163
+ }, {
164
+ label: string;
165
+ id: string;
166
+ done: import("./condition.js").Condition;
167
+ }>, "many">>;
168
+ ask: z.ZodOptional<z.ZodString>;
169
+ }, "strict", z.ZodTypeAny, {
170
+ id: string;
171
+ title: string;
172
+ done: import("./condition.js").Condition;
173
+ group: "main" | "side";
174
+ detail?: string | undefined;
175
+ ask?: string | undefined;
176
+ location?: string | undefined;
177
+ section?: string | undefined;
178
+ availableWhen?: import("./condition.js").Condition | undefined;
179
+ progress?: {
180
+ target: number;
181
+ counter: string;
182
+ } | undefined;
183
+ steps?: {
184
+ label: string;
185
+ id: string;
186
+ done: import("./condition.js").Condition;
187
+ }[] | undefined;
188
+ }, {
189
+ id: string;
190
+ title: string;
191
+ done: import("./condition.js").Condition;
192
+ group: "main" | "side";
193
+ detail?: string | undefined;
194
+ ask?: string | undefined;
195
+ location?: string | undefined;
196
+ section?: string | undefined;
197
+ availableWhen?: import("./condition.js").Condition | undefined;
198
+ progress?: {
199
+ target: number;
200
+ counter: string;
201
+ } | undefined;
202
+ steps?: {
203
+ label: string;
204
+ id: string;
205
+ done: import("./condition.js").Condition;
206
+ }[] | undefined;
207
+ }>, "many">;
208
+ collectibles: z.ZodArray<z.ZodObject<{
209
+ id: z.ZodString;
210
+ title: z.ZodString;
211
+ noun: z.ZodString;
212
+ icon: z.ZodOptional<z.ZodString>;
213
+ counter: z.ZodOptional<z.ZodString>;
214
+ entries: z.ZodOptional<z.ZodArray<z.ZodObject<{
215
+ id: z.ZodString;
216
+ name: z.ZodString;
217
+ locationId: z.ZodOptional<z.ZodString>;
218
+ locationName: z.ZodOptional<z.ZodString>;
219
+ collectedBy: z.ZodOptional<z.ZodType<import("./condition.js").Condition, z.ZodTypeDef, import("./condition.js").Condition>>;
220
+ needs: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
221
+ pinId: z.ZodOptional<z.ZodString>;
222
+ }, "strict", z.ZodTypeAny, {
223
+ id: string;
224
+ name: string;
225
+ locationId?: string | undefined;
226
+ pinId?: string | undefined;
227
+ collectedBy?: import("./condition.js").Condition | undefined;
228
+ locationName?: string | undefined;
229
+ needs?: string[][] | undefined;
230
+ }, {
231
+ id: string;
232
+ name: string;
233
+ locationId?: string | undefined;
234
+ pinId?: string | undefined;
235
+ collectedBy?: import("./condition.js").Condition | undefined;
236
+ locationName?: string | undefined;
237
+ needs?: string[][] | undefined;
238
+ }>, "many">>;
239
+ localSource: z.ZodOptional<z.ZodObject<{
240
+ file: z.ZodString;
241
+ key: z.ZodString;
242
+ }, "strict", z.ZodTypeAny, {
243
+ key: string;
244
+ file: string;
245
+ }, {
246
+ key: string;
247
+ file: string;
248
+ }>>;
249
+ }, "strict", z.ZodTypeAny, {
250
+ id: string;
251
+ title: string;
252
+ noun: string;
253
+ icon?: string | undefined;
254
+ entries?: {
255
+ id: string;
256
+ name: string;
257
+ locationId?: string | undefined;
258
+ pinId?: string | undefined;
259
+ collectedBy?: import("./condition.js").Condition | undefined;
260
+ locationName?: string | undefined;
261
+ needs?: string[][] | undefined;
262
+ }[] | undefined;
263
+ counter?: string | undefined;
264
+ localSource?: {
265
+ key: string;
266
+ file: string;
267
+ } | undefined;
268
+ }, {
269
+ id: string;
270
+ title: string;
271
+ noun: string;
272
+ icon?: string | undefined;
273
+ entries?: {
274
+ id: string;
275
+ name: string;
276
+ locationId?: string | undefined;
277
+ pinId?: string | undefined;
278
+ collectedBy?: import("./condition.js").Condition | undefined;
279
+ locationName?: string | undefined;
280
+ needs?: string[][] | undefined;
281
+ }[] | undefined;
282
+ counter?: string | undefined;
283
+ localSource?: {
284
+ key: string;
285
+ file: string;
286
+ } | undefined;
287
+ }>, "many">;
288
+ reference: z.ZodArray<z.ZodObject<{
289
+ id: z.ZodString;
290
+ title: z.ZodString;
291
+ badge: z.ZodOptional<z.ZodString>;
292
+ defaultOpen: z.ZodOptional<z.ZodBoolean>;
293
+ entries: z.ZodArray<z.ZodObject<{
294
+ id: z.ZodString;
295
+ title: z.ZodString;
296
+ badge: z.ZodOptional<z.ZodString>;
297
+ sequence: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
298
+ notes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
299
+ rows: z.ZodOptional<z.ZodArray<z.ZodObject<{
300
+ label: z.ZodString;
301
+ detail: z.ZodString;
302
+ }, "strict", z.ZodTypeAny, {
303
+ label: string;
304
+ detail: string;
305
+ }, {
306
+ label: string;
307
+ detail: string;
308
+ }>, "many">>;
309
+ revealWhen: z.ZodOptional<z.ZodType<import("./condition.js").Condition, z.ZodTypeDef, import("./condition.js").Condition>>;
310
+ }, "strict", z.ZodTypeAny, {
311
+ id: string;
312
+ title: string;
313
+ notes?: string[] | undefined;
314
+ badge?: string | undefined;
315
+ sequence?: string[] | undefined;
316
+ rows?: {
317
+ label: string;
318
+ detail: string;
319
+ }[] | undefined;
320
+ revealWhen?: import("./condition.js").Condition | undefined;
321
+ }, {
322
+ id: string;
323
+ title: string;
324
+ notes?: string[] | undefined;
325
+ badge?: string | undefined;
326
+ sequence?: string[] | undefined;
327
+ rows?: {
328
+ label: string;
329
+ detail: string;
330
+ }[] | undefined;
331
+ revealWhen?: import("./condition.js").Condition | undefined;
332
+ }>, "many">;
333
+ }, "strict", z.ZodTypeAny, {
334
+ entries: {
335
+ id: string;
336
+ title: string;
337
+ notes?: string[] | undefined;
338
+ badge?: string | undefined;
339
+ sequence?: string[] | undefined;
340
+ rows?: {
341
+ label: string;
342
+ detail: string;
343
+ }[] | undefined;
344
+ revealWhen?: import("./condition.js").Condition | undefined;
345
+ }[];
346
+ id: string;
347
+ title: string;
348
+ badge?: string | undefined;
349
+ defaultOpen?: boolean | undefined;
350
+ }, {
351
+ entries: {
352
+ id: string;
353
+ title: string;
354
+ notes?: string[] | undefined;
355
+ badge?: string | undefined;
356
+ sequence?: string[] | undefined;
357
+ rows?: {
358
+ label: string;
359
+ detail: string;
360
+ }[] | undefined;
361
+ revealWhen?: import("./condition.js").Condition | undefined;
362
+ }[];
363
+ id: string;
364
+ title: string;
365
+ badge?: string | undefined;
366
+ defaultOpen?: boolean | undefined;
367
+ }>, "many">;
368
+ chips: z.ZodArray<z.ZodObject<{
369
+ id: z.ZodString;
370
+ label: z.ZodString;
371
+ prompt: z.ZodString;
372
+ when: z.ZodOptional<z.ZodType<import("./condition.js").Condition, z.ZodTypeDef, import("./condition.js").Condition>>;
373
+ }, "strict", z.ZodTypeAny, {
374
+ label: string;
375
+ id: string;
376
+ prompt: string;
377
+ when?: import("./condition.js").Condition | undefined;
378
+ }, {
379
+ label: string;
380
+ id: string;
381
+ prompt: string;
382
+ when?: import("./condition.js").Condition | undefined;
383
+ }>, "many">;
384
+ pinRules: z.ZodArray<z.ZodEffects<z.ZodObject<{
385
+ id: z.ZodString;
386
+ match: z.ZodEffects<z.ZodObject<{
387
+ at: z.ZodOptional<z.ZodString>;
388
+ kind: z.ZodOptional<z.ZodString>;
389
+ ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
390
+ label: z.ZodOptional<z.ZodString>;
391
+ labelContains: z.ZodOptional<z.ZodString>;
392
+ }, "strict", z.ZodTypeAny, {
393
+ label?: string | undefined;
394
+ at?: string | undefined;
395
+ kind?: string | undefined;
396
+ ids?: string[] | undefined;
397
+ labelContains?: string | undefined;
398
+ }, {
399
+ label?: string | undefined;
400
+ at?: string | undefined;
401
+ kind?: string | undefined;
402
+ ids?: string[] | undefined;
403
+ labelContains?: string | undefined;
404
+ }>, {
405
+ label?: string | undefined;
406
+ at?: string | undefined;
407
+ kind?: string | undefined;
408
+ ids?: string[] | undefined;
409
+ labelContains?: string | undefined;
410
+ }, {
411
+ label?: string | undefined;
412
+ at?: string | undefined;
413
+ kind?: string | undefined;
414
+ ids?: string[] | undefined;
415
+ labelContains?: string | undefined;
416
+ }>;
417
+ collectedBy: z.ZodOptional<z.ZodType<import("./condition.js").Condition, z.ZodTypeDef, import("./condition.js").Condition>>;
418
+ hiddenWhen: z.ZodOptional<z.ZodType<import("./condition.js").Condition, z.ZodTypeDef, import("./condition.js").Condition>>;
419
+ icon: z.ZodOptional<z.ZodString>;
420
+ }, "strict", z.ZodTypeAny, {
421
+ id: string;
422
+ match: {
423
+ label?: string | undefined;
424
+ at?: string | undefined;
425
+ kind?: string | undefined;
426
+ ids?: string[] | undefined;
427
+ labelContains?: string | undefined;
428
+ };
429
+ icon?: string | undefined;
430
+ collectedBy?: import("./condition.js").Condition | undefined;
431
+ hiddenWhen?: import("./condition.js").Condition | undefined;
432
+ }, {
433
+ id: string;
434
+ match: {
435
+ label?: string | undefined;
436
+ at?: string | undefined;
437
+ kind?: string | undefined;
438
+ ids?: string[] | undefined;
439
+ labelContains?: string | undefined;
440
+ };
441
+ icon?: string | undefined;
442
+ collectedBy?: import("./condition.js").Condition | undefined;
443
+ hiddenWhen?: import("./condition.js").Condition | undefined;
444
+ }>, {
445
+ id: string;
446
+ match: {
447
+ label?: string | undefined;
448
+ at?: string | undefined;
449
+ kind?: string | undefined;
450
+ ids?: string[] | undefined;
451
+ labelContains?: string | undefined;
452
+ };
453
+ icon?: string | undefined;
454
+ collectedBy?: import("./condition.js").Condition | undefined;
455
+ hiddenWhen?: import("./condition.js").Condition | undefined;
456
+ }, {
457
+ id: string;
458
+ match: {
459
+ label?: string | undefined;
460
+ at?: string | undefined;
461
+ kind?: string | undefined;
462
+ ids?: string[] | undefined;
463
+ labelContains?: string | undefined;
464
+ };
465
+ icon?: string | undefined;
466
+ collectedBy?: import("./condition.js").Condition | undefined;
467
+ hiddenWhen?: import("./condition.js").Condition | undefined;
468
+ }>, "many">;
469
+ pinCategories: z.ZodOptional<z.ZodArray<z.ZodObject<{
470
+ id: z.ZodString;
471
+ label: z.ZodString;
472
+ shownByDefault: z.ZodBoolean;
473
+ icon: z.ZodOptional<z.ZodString>;
474
+ }, "strip", z.ZodTypeAny, {
475
+ label: string;
476
+ id: string;
477
+ shownByDefault: boolean;
478
+ icon?: string | undefined;
479
+ }, {
480
+ label: string;
481
+ id: string;
482
+ shownByDefault: boolean;
483
+ icon?: string | undefined;
484
+ }>, "many">>;
485
+ }, "strict", z.ZodTypeAny, {
486
+ counters: {
487
+ label: string;
488
+ id: string;
489
+ icon?: string | undefined;
490
+ max?: string | number | undefined;
491
+ display?: Record<string, string> | undefined;
492
+ }[];
493
+ flagSets: string[];
494
+ items: {
495
+ label: string;
496
+ id: string;
497
+ icon?: string | undefined;
498
+ source?: string | undefined;
499
+ category?: string | undefined;
500
+ short?: string | undefined;
501
+ }[];
502
+ chips: {
503
+ label: string;
504
+ id: string;
505
+ prompt: string;
506
+ when?: import("./condition.js").Condition | undefined;
507
+ }[];
508
+ inventoryLayouts: ({
509
+ id: string;
510
+ title: string;
511
+ kind: "slotGrid";
512
+ columns: number;
513
+ slots: string[];
514
+ } | {
515
+ id: string;
516
+ title: string;
517
+ counters: string[];
518
+ kind: "counters";
519
+ })[];
520
+ missions: {
521
+ id: string;
522
+ title: string;
523
+ done: import("./condition.js").Condition;
524
+ group: "main" | "side";
525
+ detail?: string | undefined;
526
+ ask?: string | undefined;
527
+ location?: string | undefined;
528
+ section?: string | undefined;
529
+ availableWhen?: import("./condition.js").Condition | undefined;
530
+ progress?: {
531
+ target: number;
532
+ counter: string;
533
+ } | undefined;
534
+ steps?: {
535
+ label: string;
536
+ id: string;
537
+ done: import("./condition.js").Condition;
538
+ }[] | undefined;
539
+ }[];
540
+ collectibles: {
541
+ id: string;
542
+ title: string;
543
+ noun: string;
544
+ icon?: string | undefined;
545
+ entries?: {
546
+ id: string;
547
+ name: string;
548
+ locationId?: string | undefined;
549
+ pinId?: string | undefined;
550
+ collectedBy?: import("./condition.js").Condition | undefined;
551
+ locationName?: string | undefined;
552
+ needs?: string[][] | undefined;
553
+ }[] | undefined;
554
+ counter?: string | undefined;
555
+ localSource?: {
556
+ key: string;
557
+ file: string;
558
+ } | undefined;
559
+ }[];
560
+ reference: {
561
+ entries: {
562
+ id: string;
563
+ title: string;
564
+ notes?: string[] | undefined;
565
+ badge?: string | undefined;
566
+ sequence?: string[] | undefined;
567
+ rows?: {
568
+ label: string;
569
+ detail: string;
570
+ }[] | undefined;
571
+ revealWhen?: import("./condition.js").Condition | undefined;
572
+ }[];
573
+ id: string;
574
+ title: string;
575
+ badge?: string | undefined;
576
+ defaultOpen?: boolean | undefined;
577
+ }[];
578
+ pinRules: {
579
+ id: string;
580
+ match: {
581
+ label?: string | undefined;
582
+ at?: string | undefined;
583
+ kind?: string | undefined;
584
+ ids?: string[] | undefined;
585
+ labelContains?: string | undefined;
586
+ };
587
+ icon?: string | undefined;
588
+ collectedBy?: import("./condition.js").Condition | undefined;
589
+ hiddenWhen?: import("./condition.js").Condition | undefined;
590
+ }[];
591
+ pinCategories?: {
592
+ label: string;
593
+ id: string;
594
+ shownByDefault: boolean;
595
+ icon?: string | undefined;
596
+ }[] | undefined;
597
+ }, {
598
+ counters: {
599
+ label: string;
600
+ id: string;
601
+ icon?: string | undefined;
602
+ max?: string | number | undefined;
603
+ display?: Record<string, string> | undefined;
604
+ }[];
605
+ flagSets: string[];
606
+ items: {
607
+ label: string;
608
+ id: string;
609
+ icon?: string | undefined;
610
+ source?: string | undefined;
611
+ category?: string | undefined;
612
+ short?: string | undefined;
613
+ }[];
614
+ chips: {
615
+ label: string;
616
+ id: string;
617
+ prompt: string;
618
+ when?: import("./condition.js").Condition | undefined;
619
+ }[];
620
+ inventoryLayouts: ({
621
+ id: string;
622
+ title: string;
623
+ kind: "slotGrid";
624
+ columns: number;
625
+ slots: string[];
626
+ } | {
627
+ id: string;
628
+ title: string;
629
+ counters: string[];
630
+ kind: "counters";
631
+ })[];
632
+ missions: {
633
+ id: string;
634
+ title: string;
635
+ done: import("./condition.js").Condition;
636
+ group: "main" | "side";
637
+ detail?: string | undefined;
638
+ ask?: string | undefined;
639
+ location?: string | undefined;
640
+ section?: string | undefined;
641
+ availableWhen?: import("./condition.js").Condition | undefined;
642
+ progress?: {
643
+ target: number;
644
+ counter: string;
645
+ } | undefined;
646
+ steps?: {
647
+ label: string;
648
+ id: string;
649
+ done: import("./condition.js").Condition;
650
+ }[] | undefined;
651
+ }[];
652
+ collectibles: {
653
+ id: string;
654
+ title: string;
655
+ noun: string;
656
+ icon?: string | undefined;
657
+ entries?: {
658
+ id: string;
659
+ name: string;
660
+ locationId?: string | undefined;
661
+ pinId?: string | undefined;
662
+ collectedBy?: import("./condition.js").Condition | undefined;
663
+ locationName?: string | undefined;
664
+ needs?: string[][] | undefined;
665
+ }[] | undefined;
666
+ counter?: string | undefined;
667
+ localSource?: {
668
+ key: string;
669
+ file: string;
670
+ } | undefined;
671
+ }[];
672
+ reference: {
673
+ entries: {
674
+ id: string;
675
+ title: string;
676
+ notes?: string[] | undefined;
677
+ badge?: string | undefined;
678
+ sequence?: string[] | undefined;
679
+ rows?: {
680
+ label: string;
681
+ detail: string;
682
+ }[] | undefined;
683
+ revealWhen?: import("./condition.js").Condition | undefined;
684
+ }[];
685
+ id: string;
686
+ title: string;
687
+ badge?: string | undefined;
688
+ defaultOpen?: boolean | undefined;
689
+ }[];
690
+ pinRules: {
691
+ id: string;
692
+ match: {
693
+ label?: string | undefined;
694
+ at?: string | undefined;
695
+ kind?: string | undefined;
696
+ ids?: string[] | undefined;
697
+ labelContains?: string | undefined;
698
+ };
699
+ icon?: string | undefined;
700
+ collectedBy?: import("./condition.js").Condition | undefined;
701
+ hiddenWhen?: import("./condition.js").Condition | undefined;
702
+ }[];
703
+ pinCategories?: {
704
+ label: string;
705
+ id: string;
706
+ shownByDefault: boolean;
707
+ icon?: string | undefined;
708
+ }[] | undefined;
709
+ }>;
710
+ world: z.ZodObject<{
711
+ unitsPerMeter: z.ZodNumber;
712
+ northIsPositiveZ: z.ZodOptional<z.ZodBoolean>;
713
+ }, "strip", z.ZodTypeAny, {
714
+ unitsPerMeter: number;
715
+ northIsPositiveZ?: boolean | undefined;
716
+ }, {
717
+ unitsPerMeter: number;
718
+ northIsPositiveZ?: boolean | undefined;
719
+ }>;
720
+ }, "strip", z.ZodTypeAny, {
721
+ id: string;
722
+ title: string;
723
+ world: {
724
+ unitsPerMeter: number;
725
+ northIsPositiveZ?: boolean | undefined;
726
+ };
727
+ catalogue: {
728
+ counters: {
729
+ label: string;
730
+ id: string;
731
+ icon?: string | undefined;
732
+ max?: string | number | undefined;
733
+ display?: Record<string, string> | undefined;
734
+ }[];
735
+ flagSets: string[];
736
+ items: {
737
+ label: string;
738
+ id: string;
739
+ icon?: string | undefined;
740
+ source?: string | undefined;
741
+ category?: string | undefined;
742
+ short?: string | undefined;
743
+ }[];
744
+ chips: {
745
+ label: string;
746
+ id: string;
747
+ prompt: string;
748
+ when?: import("./condition.js").Condition | undefined;
749
+ }[];
750
+ inventoryLayouts: ({
751
+ id: string;
752
+ title: string;
753
+ kind: "slotGrid";
754
+ columns: number;
755
+ slots: string[];
756
+ } | {
757
+ id: string;
758
+ title: string;
759
+ counters: string[];
760
+ kind: "counters";
761
+ })[];
762
+ missions: {
763
+ id: string;
764
+ title: string;
765
+ done: import("./condition.js").Condition;
766
+ group: "main" | "side";
767
+ detail?: string | undefined;
768
+ ask?: string | undefined;
769
+ location?: string | undefined;
770
+ section?: string | undefined;
771
+ availableWhen?: import("./condition.js").Condition | undefined;
772
+ progress?: {
773
+ target: number;
774
+ counter: string;
775
+ } | undefined;
776
+ steps?: {
777
+ label: string;
778
+ id: string;
779
+ done: import("./condition.js").Condition;
780
+ }[] | undefined;
781
+ }[];
782
+ collectibles: {
783
+ id: string;
784
+ title: string;
785
+ noun: string;
786
+ icon?: string | undefined;
787
+ entries?: {
788
+ id: string;
789
+ name: string;
790
+ locationId?: string | undefined;
791
+ pinId?: string | undefined;
792
+ collectedBy?: import("./condition.js").Condition | undefined;
793
+ locationName?: string | undefined;
794
+ needs?: string[][] | undefined;
795
+ }[] | undefined;
796
+ counter?: string | undefined;
797
+ localSource?: {
798
+ key: string;
799
+ file: string;
800
+ } | undefined;
801
+ }[];
802
+ reference: {
803
+ entries: {
804
+ id: string;
805
+ title: string;
806
+ notes?: string[] | undefined;
807
+ badge?: string | undefined;
808
+ sequence?: string[] | undefined;
809
+ rows?: {
810
+ label: string;
811
+ detail: string;
812
+ }[] | undefined;
813
+ revealWhen?: import("./condition.js").Condition | undefined;
814
+ }[];
815
+ id: string;
816
+ title: string;
817
+ badge?: string | undefined;
818
+ defaultOpen?: boolean | undefined;
819
+ }[];
820
+ pinRules: {
821
+ id: string;
822
+ match: {
823
+ label?: string | undefined;
824
+ at?: string | undefined;
825
+ kind?: string | undefined;
826
+ ids?: string[] | undefined;
827
+ labelContains?: string | undefined;
828
+ };
829
+ icon?: string | undefined;
830
+ collectedBy?: import("./condition.js").Condition | undefined;
831
+ hiddenWhen?: import("./condition.js").Condition | undefined;
832
+ }[];
833
+ pinCategories?: {
834
+ label: string;
835
+ id: string;
836
+ shownByDefault: boolean;
837
+ icon?: string | undefined;
838
+ }[] | undefined;
839
+ };
840
+ }, {
841
+ id: string;
842
+ title: string;
843
+ world: {
844
+ unitsPerMeter: number;
845
+ northIsPositiveZ?: boolean | undefined;
846
+ };
847
+ catalogue: {
848
+ counters: {
849
+ label: string;
850
+ id: string;
851
+ icon?: string | undefined;
852
+ max?: string | number | undefined;
853
+ display?: Record<string, string> | undefined;
854
+ }[];
855
+ flagSets: string[];
856
+ items: {
857
+ label: string;
858
+ id: string;
859
+ icon?: string | undefined;
860
+ source?: string | undefined;
861
+ category?: string | undefined;
862
+ short?: string | undefined;
863
+ }[];
864
+ chips: {
865
+ label: string;
866
+ id: string;
867
+ prompt: string;
868
+ when?: import("./condition.js").Condition | undefined;
869
+ }[];
870
+ inventoryLayouts: ({
871
+ id: string;
872
+ title: string;
873
+ kind: "slotGrid";
874
+ columns: number;
875
+ slots: string[];
876
+ } | {
877
+ id: string;
878
+ title: string;
879
+ counters: string[];
880
+ kind: "counters";
881
+ })[];
882
+ missions: {
883
+ id: string;
884
+ title: string;
885
+ done: import("./condition.js").Condition;
886
+ group: "main" | "side";
887
+ detail?: string | undefined;
888
+ ask?: string | undefined;
889
+ location?: string | undefined;
890
+ section?: string | undefined;
891
+ availableWhen?: import("./condition.js").Condition | undefined;
892
+ progress?: {
893
+ target: number;
894
+ counter: string;
895
+ } | undefined;
896
+ steps?: {
897
+ label: string;
898
+ id: string;
899
+ done: import("./condition.js").Condition;
900
+ }[] | undefined;
901
+ }[];
902
+ collectibles: {
903
+ id: string;
904
+ title: string;
905
+ noun: string;
906
+ icon?: string | undefined;
907
+ entries?: {
908
+ id: string;
909
+ name: string;
910
+ locationId?: string | undefined;
911
+ pinId?: string | undefined;
912
+ collectedBy?: import("./condition.js").Condition | undefined;
913
+ locationName?: string | undefined;
914
+ needs?: string[][] | undefined;
915
+ }[] | undefined;
916
+ counter?: string | undefined;
917
+ localSource?: {
918
+ key: string;
919
+ file: string;
920
+ } | undefined;
921
+ }[];
922
+ reference: {
923
+ entries: {
924
+ id: string;
925
+ title: string;
926
+ notes?: string[] | undefined;
927
+ badge?: string | undefined;
928
+ sequence?: string[] | undefined;
929
+ rows?: {
930
+ label: string;
931
+ detail: string;
932
+ }[] | undefined;
933
+ revealWhen?: import("./condition.js").Condition | undefined;
934
+ }[];
935
+ id: string;
936
+ title: string;
937
+ badge?: string | undefined;
938
+ defaultOpen?: boolean | undefined;
939
+ }[];
940
+ pinRules: {
941
+ id: string;
942
+ match: {
943
+ label?: string | undefined;
944
+ at?: string | undefined;
945
+ kind?: string | undefined;
946
+ ids?: string[] | undefined;
947
+ labelContains?: string | undefined;
948
+ };
949
+ icon?: string | undefined;
950
+ collectedBy?: import("./condition.js").Condition | undefined;
951
+ hiddenWhen?: import("./condition.js").Condition | undefined;
952
+ }[];
953
+ pinCategories?: {
954
+ label: string;
955
+ id: string;
956
+ shownByDefault: boolean;
957
+ icon?: string | undefined;
958
+ }[] | undefined;
959
+ };
960
+ }>, "many">;
961
+ sources: z.ZodArray<z.ZodObject<{
962
+ gameId: z.ZodString;
963
+ stateSchemaVersion: z.ZodNumber;
964
+ capabilities: z.ZodArray<z.ZodEnum<["location", "map_2d", "objectives", "inventory", "stats", "chat_chips"]>, "many">;
965
+ supportedBuildIds: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodObject<{
966
+ region: z.ZodString;
967
+ }, "strip", z.ZodTypeAny, {
968
+ region: string;
969
+ }, {
970
+ region: string;
971
+ }>], null>, "many">;
972
+ executableHints: z.ZodArray<z.ZodString, "many">;
973
+ wrapperMayOmitStats: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
974
+ unsupportedExecutables: z.ZodOptional<z.ZodArray<z.ZodObject<{
975
+ executable: z.ZodString;
976
+ reason: z.ZodString;
977
+ }, "strip", z.ZodTypeAny, {
978
+ executable: string;
979
+ reason: string;
980
+ }, {
981
+ executable: string;
982
+ reason: string;
983
+ }>, "many">>;
984
+ }, "strip", z.ZodTypeAny, {
985
+ gameId: string;
986
+ stateSchemaVersion: number;
987
+ capabilities: ("location" | "map_2d" | "objectives" | "inventory" | "stats" | "chat_chips")[];
988
+ supportedBuildIds: [string, {
989
+ region: string;
990
+ }][];
991
+ executableHints: string[];
992
+ wrapperMayOmitStats?: string[] | undefined;
993
+ unsupportedExecutables?: {
994
+ executable: string;
995
+ reason: string;
996
+ }[] | undefined;
997
+ }, {
998
+ gameId: string;
999
+ stateSchemaVersion: number;
1000
+ capabilities: ("location" | "map_2d" | "objectives" | "inventory" | "stats" | "chat_chips")[];
1001
+ supportedBuildIds: [string, {
1002
+ region: string;
1003
+ }][];
1004
+ executableHints: string[];
1005
+ wrapperMayOmitStats?: string[] | undefined;
1006
+ unsupportedExecutables?: {
1007
+ executable: string;
1008
+ reason: string;
1009
+ }[] | undefined;
1010
+ }>, "many">;
1011
+ }, "strip", z.ZodTypeAny, {
1012
+ id: string;
1013
+ packs: {
1014
+ id: string;
1015
+ title: string;
1016
+ world: {
1017
+ unitsPerMeter: number;
1018
+ northIsPositiveZ?: boolean | undefined;
1019
+ };
1020
+ catalogue: {
1021
+ counters: {
1022
+ label: string;
1023
+ id: string;
1024
+ icon?: string | undefined;
1025
+ max?: string | number | undefined;
1026
+ display?: Record<string, string> | undefined;
1027
+ }[];
1028
+ flagSets: string[];
1029
+ items: {
1030
+ label: string;
1031
+ id: string;
1032
+ icon?: string | undefined;
1033
+ source?: string | undefined;
1034
+ category?: string | undefined;
1035
+ short?: string | undefined;
1036
+ }[];
1037
+ chips: {
1038
+ label: string;
1039
+ id: string;
1040
+ prompt: string;
1041
+ when?: import("./condition.js").Condition | undefined;
1042
+ }[];
1043
+ inventoryLayouts: ({
1044
+ id: string;
1045
+ title: string;
1046
+ kind: "slotGrid";
1047
+ columns: number;
1048
+ slots: string[];
1049
+ } | {
1050
+ id: string;
1051
+ title: string;
1052
+ counters: string[];
1053
+ kind: "counters";
1054
+ })[];
1055
+ missions: {
1056
+ id: string;
1057
+ title: string;
1058
+ done: import("./condition.js").Condition;
1059
+ group: "main" | "side";
1060
+ detail?: string | undefined;
1061
+ ask?: string | undefined;
1062
+ location?: string | undefined;
1063
+ section?: string | undefined;
1064
+ availableWhen?: import("./condition.js").Condition | undefined;
1065
+ progress?: {
1066
+ target: number;
1067
+ counter: string;
1068
+ } | undefined;
1069
+ steps?: {
1070
+ label: string;
1071
+ id: string;
1072
+ done: import("./condition.js").Condition;
1073
+ }[] | undefined;
1074
+ }[];
1075
+ collectibles: {
1076
+ id: string;
1077
+ title: string;
1078
+ noun: string;
1079
+ icon?: string | undefined;
1080
+ entries?: {
1081
+ id: string;
1082
+ name: string;
1083
+ locationId?: string | undefined;
1084
+ pinId?: string | undefined;
1085
+ collectedBy?: import("./condition.js").Condition | undefined;
1086
+ locationName?: string | undefined;
1087
+ needs?: string[][] | undefined;
1088
+ }[] | undefined;
1089
+ counter?: string | undefined;
1090
+ localSource?: {
1091
+ key: string;
1092
+ file: string;
1093
+ } | undefined;
1094
+ }[];
1095
+ reference: {
1096
+ entries: {
1097
+ id: string;
1098
+ title: string;
1099
+ notes?: string[] | undefined;
1100
+ badge?: string | undefined;
1101
+ sequence?: string[] | undefined;
1102
+ rows?: {
1103
+ label: string;
1104
+ detail: string;
1105
+ }[] | undefined;
1106
+ revealWhen?: import("./condition.js").Condition | undefined;
1107
+ }[];
1108
+ id: string;
1109
+ title: string;
1110
+ badge?: string | undefined;
1111
+ defaultOpen?: boolean | undefined;
1112
+ }[];
1113
+ pinRules: {
1114
+ id: string;
1115
+ match: {
1116
+ label?: string | undefined;
1117
+ at?: string | undefined;
1118
+ kind?: string | undefined;
1119
+ ids?: string[] | undefined;
1120
+ labelContains?: string | undefined;
1121
+ };
1122
+ icon?: string | undefined;
1123
+ collectedBy?: import("./condition.js").Condition | undefined;
1124
+ hiddenWhen?: import("./condition.js").Condition | undefined;
1125
+ }[];
1126
+ pinCategories?: {
1127
+ label: string;
1128
+ id: string;
1129
+ shownByDefault: boolean;
1130
+ icon?: string | undefined;
1131
+ }[] | undefined;
1132
+ };
1133
+ }[];
1134
+ sources: {
1135
+ gameId: string;
1136
+ stateSchemaVersion: number;
1137
+ capabilities: ("location" | "map_2d" | "objectives" | "inventory" | "stats" | "chat_chips")[];
1138
+ supportedBuildIds: [string, {
1139
+ region: string;
1140
+ }][];
1141
+ executableHints: string[];
1142
+ wrapperMayOmitStats?: string[] | undefined;
1143
+ unsupportedExecutables?: {
1144
+ executable: string;
1145
+ reason: string;
1146
+ }[] | undefined;
1147
+ }[];
1148
+ }, {
1149
+ id: string;
1150
+ packs: {
1151
+ id: string;
1152
+ title: string;
1153
+ world: {
1154
+ unitsPerMeter: number;
1155
+ northIsPositiveZ?: boolean | undefined;
1156
+ };
1157
+ catalogue: {
1158
+ counters: {
1159
+ label: string;
1160
+ id: string;
1161
+ icon?: string | undefined;
1162
+ max?: string | number | undefined;
1163
+ display?: Record<string, string> | undefined;
1164
+ }[];
1165
+ flagSets: string[];
1166
+ items: {
1167
+ label: string;
1168
+ id: string;
1169
+ icon?: string | undefined;
1170
+ source?: string | undefined;
1171
+ category?: string | undefined;
1172
+ short?: string | undefined;
1173
+ }[];
1174
+ chips: {
1175
+ label: string;
1176
+ id: string;
1177
+ prompt: string;
1178
+ when?: import("./condition.js").Condition | undefined;
1179
+ }[];
1180
+ inventoryLayouts: ({
1181
+ id: string;
1182
+ title: string;
1183
+ kind: "slotGrid";
1184
+ columns: number;
1185
+ slots: string[];
1186
+ } | {
1187
+ id: string;
1188
+ title: string;
1189
+ counters: string[];
1190
+ kind: "counters";
1191
+ })[];
1192
+ missions: {
1193
+ id: string;
1194
+ title: string;
1195
+ done: import("./condition.js").Condition;
1196
+ group: "main" | "side";
1197
+ detail?: string | undefined;
1198
+ ask?: string | undefined;
1199
+ location?: string | undefined;
1200
+ section?: string | undefined;
1201
+ availableWhen?: import("./condition.js").Condition | undefined;
1202
+ progress?: {
1203
+ target: number;
1204
+ counter: string;
1205
+ } | undefined;
1206
+ steps?: {
1207
+ label: string;
1208
+ id: string;
1209
+ done: import("./condition.js").Condition;
1210
+ }[] | undefined;
1211
+ }[];
1212
+ collectibles: {
1213
+ id: string;
1214
+ title: string;
1215
+ noun: string;
1216
+ icon?: string | undefined;
1217
+ entries?: {
1218
+ id: string;
1219
+ name: string;
1220
+ locationId?: string | undefined;
1221
+ pinId?: string | undefined;
1222
+ collectedBy?: import("./condition.js").Condition | undefined;
1223
+ locationName?: string | undefined;
1224
+ needs?: string[][] | undefined;
1225
+ }[] | undefined;
1226
+ counter?: string | undefined;
1227
+ localSource?: {
1228
+ key: string;
1229
+ file: string;
1230
+ } | undefined;
1231
+ }[];
1232
+ reference: {
1233
+ entries: {
1234
+ id: string;
1235
+ title: string;
1236
+ notes?: string[] | undefined;
1237
+ badge?: string | undefined;
1238
+ sequence?: string[] | undefined;
1239
+ rows?: {
1240
+ label: string;
1241
+ detail: string;
1242
+ }[] | undefined;
1243
+ revealWhen?: import("./condition.js").Condition | undefined;
1244
+ }[];
1245
+ id: string;
1246
+ title: string;
1247
+ badge?: string | undefined;
1248
+ defaultOpen?: boolean | undefined;
1249
+ }[];
1250
+ pinRules: {
1251
+ id: string;
1252
+ match: {
1253
+ label?: string | undefined;
1254
+ at?: string | undefined;
1255
+ kind?: string | undefined;
1256
+ ids?: string[] | undefined;
1257
+ labelContains?: string | undefined;
1258
+ };
1259
+ icon?: string | undefined;
1260
+ collectedBy?: import("./condition.js").Condition | undefined;
1261
+ hiddenWhen?: import("./condition.js").Condition | undefined;
1262
+ }[];
1263
+ pinCategories?: {
1264
+ label: string;
1265
+ id: string;
1266
+ shownByDefault: boolean;
1267
+ icon?: string | undefined;
1268
+ }[] | undefined;
1269
+ };
1270
+ }[];
1271
+ sources: {
1272
+ gameId: string;
1273
+ stateSchemaVersion: number;
1274
+ capabilities: ("location" | "map_2d" | "objectives" | "inventory" | "stats" | "chat_chips")[];
1275
+ supportedBuildIds: [string, {
1276
+ region: string;
1277
+ }][];
1278
+ executableHints: string[];
1279
+ wrapperMayOmitStats?: string[] | undefined;
1280
+ unsupportedExecutables?: {
1281
+ executable: string;
1282
+ reason: string;
1283
+ }[] | undefined;
1284
+ }[];
1285
+ }>;
1286
+ export type SandboxDescription = z.infer<typeof SandboxDescriptionSchema>;
1287
+ /** What the guest learns about the game it's attached to (no pid, no path). */
1288
+ export declare const SandboxMemoryInfoSchema: z.ZodObject<{
1289
+ buildId: z.ZodNullable<z.ZodString>;
1290
+ commandLine: z.ZodArray<z.ZodString, "many">;
1291
+ /** decimal: bigints don't cross the boundary as JSON */
1292
+ moduleBase: z.ZodString;
1293
+ }, "strip", z.ZodTypeAny, {
1294
+ buildId: string | null;
1295
+ commandLine: string[];
1296
+ moduleBase: string;
1297
+ }, {
1298
+ buildId: string | null;
1299
+ commandLine: string[];
1300
+ moduleBase: string;
1301
+ }>;
1302
+ export type SandboxMemoryInfo = z.infer<typeof SandboxMemoryInfoSchema>;
1303
+ /** The functions the guest puts on `globalThis.__gs`; arguments and results are JSON text. */
1304
+ export interface SandboxGuestApi {
1305
+ describe(): string;
1306
+ /** true when the plugin started a session on memory handle `handle` */
1307
+ createSession(gameId: string, handle: number, memoryInfo: string): boolean;
1308
+ /** a GameState as JSON, or null when this poll has nothing */
1309
+ poll(handle: number): string | null;
1310
+ closeSession(handle: number): void;
1311
+ /** the pack's views (PackViews) of a GameState given as JSON */
1312
+ views(gameId: string, state: string): string;
1313
+ }
1314
+ /** The capabilities the core puts on `globalThis.__gsHost`: memory reads for one handle. */
1315
+ export interface SandboxHostApi {
1316
+ read(handle: number, address: string, byteLength: number): ArrayBuffer | undefined;
1317
+ isValidRange(handle: number, address: string, byteLength: number): boolean;
1318
+ resolveSymbol(handle: number, name: string): string | null;
1319
+ refreshMappings(handle: number): void;
1320
+ }
1321
+ /** A player's file as the asset guest sees it: a handle for `inputRead`, its name and size. */
1322
+ export declare const SandboxInputFileSchema: z.ZodObject<{
1323
+ handle: z.ZodNumber;
1324
+ name: z.ZodString;
1325
+ size: z.ZodNumber;
1326
+ }, "strip", z.ZodTypeAny, {
1327
+ name: string;
1328
+ handle: number;
1329
+ size: number;
1330
+ }, {
1331
+ name: string;
1332
+ handle: number;
1333
+ size: number;
1334
+ }>;
1335
+ export type SandboxInputFile = z.infer<typeof SandboxInputFileSchema>;
1336
+ export declare const SandboxInputFilesSchema: z.ZodArray<z.ZodObject<{
1337
+ handle: z.ZodNumber;
1338
+ name: z.ZodString;
1339
+ size: z.ZodNumber;
1340
+ }, "strip", z.ZodTypeAny, {
1341
+ name: string;
1342
+ handle: number;
1343
+ size: number;
1344
+ }, {
1345
+ name: string;
1346
+ handle: number;
1347
+ size: number;
1348
+ }>, "many">;
1349
+ /** The asset guest's functions on `globalThis.__gsAssets`; arguments and results are JSON text. */
1350
+ export interface SandboxAssetsGuestApi {
1351
+ /** the games it has extractors for */
1352
+ games(): string[];
1353
+ /** an AssetList for these files (SandboxInputFile[] as JSON), picked as `pick` (InputPick) */
1354
+ listAssets(gameId: string, inputs: string, pick: string): string;
1355
+ /** one asset's outputs (AssetOutputWire[] as JSON); binary data went out by `emitBinary` */
1356
+ buildAsset(gameId: string, id: string, inputs: string): string;
1357
+ }
1358
+ /** The capabilities an asset guest gets on `globalThis.__gsAssetsHost`. */
1359
+ export interface SandboxAssetsHostApi {
1360
+ inputRead(handle: number, offset: number, length: number): ArrayBuffer;
1361
+ /** hands the core a block of output bytes; the index outputs refer to it by */
1362
+ emitBinary(data: ArrayBuffer): number;
1363
+ }