@dreamboard-games/sdk 0.5.0-alpha.8 → 0.5.0-alpha.9

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.
@@ -9,98 +9,112 @@ import { en } from "zod/locales";
9
9
  z.config(en());
10
10
  var RuntimeJsonSchema = z.json();
11
11
 
12
- // src/shared/interaction-schema.ts
12
+ // src/shared/domain/cards.ts
13
13
  import * as z2 from "zod";
14
- var InteractionCommitPolicySchema = z2.discriminatedUnion("mode", [
15
- z2.object({ mode: z2.literal("manual") }).strict(),
16
- z2.object({ mode: z2.literal("autoWhenReady") }).strict()
14
+ var ViewCardSchema = z2.strictObject({
15
+ id: z2.string(),
16
+ cardType: z2.string(),
17
+ name: z2.string().optional(),
18
+ text: z2.string().optional(),
19
+ /** Manifest asset path; game UIs receive a loadable URL. */
20
+ frontImage: z2.string().optional(),
21
+ /** Manifest asset path; game UIs receive a loadable URL. */
22
+ backImage: z2.string().optional(),
23
+ properties: z2.record(z2.string(), RuntimeJsonSchema)
24
+ });
25
+
26
+ // src/shared/interaction-schema.ts
27
+ import * as z3 from "zod";
28
+ var InteractionCommitPolicySchema = z3.discriminatedUnion("mode", [
29
+ z3.object({ mode: z3.literal("manual") }).strict(),
30
+ z3.object({ mode: z3.literal("autoWhenReady") }).strict()
17
31
  ]);
18
- var InputSelectionSchema = z2.discriminatedUnion("mode", [
19
- z2.object({ mode: z2.literal("single") }).strict(),
20
- z2.object({
21
- mode: z2.literal("many"),
22
- min: z2.number().int(),
23
- max: z2.number().int().optional(),
24
- distinct: z2.boolean().optional()
32
+ var InputSelectionSchema = z3.discriminatedUnion("mode", [
33
+ z3.object({ mode: z3.literal("single") }).strict(),
34
+ z3.object({
35
+ mode: z3.literal("many"),
36
+ min: z3.number().int(),
37
+ max: z3.number().int().optional(),
38
+ distinct: z3.boolean().optional()
25
39
  }).strict()
26
40
  ]);
27
- var InteractionChoiceOptionSchema = z2.object({
28
- value: z2.string().nullable(),
29
- label: z2.string(),
30
- icon: z2.string().optional(),
31
- badge: z2.string().optional(),
32
- description: z2.string().optional(),
33
- disabled: z2.boolean().optional(),
34
- disabledReason: z2.string().optional()
41
+ var InteractionChoiceOptionSchema = z3.object({
42
+ value: z3.string().nullable(),
43
+ label: z3.string(),
44
+ icon: z3.string().optional(),
45
+ badge: z3.string().optional(),
46
+ description: z3.string().optional(),
47
+ disabled: z3.boolean().optional(),
48
+ disabledReason: z3.string().optional()
35
49
  }).strict();
36
50
  var selection = { selection: InputSelectionSchema.optional() };
37
- var InputDomainSchema = z2.discriminatedUnion("type", [
38
- z2.strictObject({
39
- type: z2.literal("cardTarget"),
40
- projection: z2.literal("resolved"),
41
- targetKind: z2.literal("card"),
42
- zoneIds: z2.array(z2.string()),
43
- eligibleTargets: z2.array(z2.string()),
51
+ var InputDomainSchema = z3.discriminatedUnion("type", [
52
+ z3.strictObject({
53
+ type: z3.literal("cardTarget"),
54
+ projection: z3.literal("resolved"),
55
+ targetKind: z3.literal("card"),
56
+ zoneIds: z3.array(z3.string()),
57
+ eligibleTargets: z3.array(z3.string()),
44
58
  ...selection
45
59
  }),
46
- z2.discriminatedUnion("valueKind", [
47
- z2.strictObject({
48
- type: z2.literal("boardTarget"),
49
- projection: z2.literal("resolved"),
50
- targetKind: z2.enum(["edge", "vertex", "space", "tile"]),
51
- boardId: z2.string(),
52
- valueKind: z2.literal("board-id"),
53
- eligibleTargets: z2.array(z2.string()),
60
+ z3.discriminatedUnion("valueKind", [
61
+ z3.strictObject({
62
+ type: z3.literal("boardTarget"),
63
+ projection: z3.literal("resolved"),
64
+ targetKind: z3.enum(["edge", "vertex", "space", "tile"]),
65
+ boardId: z3.string(),
66
+ valueKind: z3.literal("board-id"),
67
+ eligibleTargets: z3.array(z3.string()),
54
68
  ...selection
55
69
  }),
56
- z2.strictObject({
57
- type: z2.literal("boardTarget"),
58
- projection: z2.literal("resolved"),
59
- targetKind: z2.literal("space"),
60
- boardId: z2.string(),
61
- valueKind: z2.literal("player-board-space"),
62
- eligibleTargets: z2.array(PlayerBoardSpaceTargetSchema),
70
+ z3.strictObject({
71
+ type: z3.literal("boardTarget"),
72
+ projection: z3.literal("resolved"),
73
+ targetKind: z3.literal("space"),
74
+ boardId: z3.string(),
75
+ valueKind: z3.literal("player-board-space"),
76
+ eligibleTargets: z3.array(PlayerBoardSpaceTargetSchema),
63
77
  ...selection
64
78
  })
65
79
  ]),
66
- z2.strictObject({
67
- type: z2.literal("resourceMap"),
68
- resources: z2.array(
69
- z2.strictObject({
70
- resourceId: z2.string(),
71
- label: z2.string().optional(),
72
- icon: z2.string().optional(),
73
- min: z2.number(),
74
- max: z2.number()
80
+ z3.strictObject({
81
+ type: z3.literal("resourceMap"),
82
+ resources: z3.array(
83
+ z3.strictObject({
84
+ resourceId: z3.string(),
85
+ label: z3.string().optional(),
86
+ icon: z3.string().optional(),
87
+ min: z3.number(),
88
+ max: z3.number()
75
89
  })
76
90
  ),
77
91
  ...selection
78
92
  }),
79
- z2.strictObject({
80
- type: z2.literal("boundedNumber"),
81
- min: z2.number(),
82
- max: z2.number(),
83
- step: z2.number().optional(),
93
+ z3.strictObject({
94
+ type: z3.literal("boundedNumber"),
95
+ min: z3.number(),
96
+ max: z3.number(),
97
+ step: z3.number().optional(),
84
98
  ...selection
85
99
  }),
86
- z2.strictObject({
87
- type: z2.literal("choice"),
88
- choices: z2.array(InteractionChoiceOptionSchema),
100
+ z3.strictObject({
101
+ type: z3.literal("choice"),
102
+ choices: z3.array(InteractionChoiceOptionSchema),
89
103
  ...selection
90
104
  }),
91
- z2.strictObject({
92
- type: z2.literal("choiceList"),
93
- choices: z2.array(
94
- InteractionChoiceOptionSchema.extend({ value: z2.string() })
105
+ z3.strictObject({
106
+ type: z3.literal("choiceList"),
107
+ choices: z3.array(
108
+ InteractionChoiceOptionSchema.extend({ value: z3.string() })
95
109
  ),
96
- min: z2.number().int().optional(),
97
- max: z2.number().int().optional(),
110
+ min: z3.number().int().optional(),
111
+ max: z3.number().int().optional(),
98
112
  ...selection
99
113
  })
100
114
  ]);
101
- var InteractionInputDescriptorSchema = z2.object({
102
- key: z2.string().min(1),
103
- kind: z2.enum([
115
+ var InteractionInputDescriptorSchema = z3.object({
116
+ key: z3.string().min(1),
117
+ kind: z3.enum([
104
118
  "form",
105
119
  "board-vertex",
106
120
  "board-edge",
@@ -112,50 +126,50 @@ var InteractionInputDescriptorSchema = z2.object({
112
126
  domain: InputDomainSchema,
113
127
  defaultValue: RuntimeJsonSchema.optional()
114
128
  }).strict();
115
- var InteractionAvailabilitySchema = z2.discriminatedUnion("status", [
116
- z2.object({ status: z2.literal("available") }).strict(),
117
- z2.object({ status: z2.literal("notYourTurn"), reason: z2.string() }).strict(),
118
- z2.object({
119
- status: z2.literal("blocked"),
120
- reason: z2.string(),
121
- code: z2.string().optional()
129
+ var InteractionAvailabilitySchema = z3.discriminatedUnion("status", [
130
+ z3.object({ status: z3.literal("available") }).strict(),
131
+ z3.object({ status: z3.literal("notYourTurn"), reason: z3.string() }).strict(),
132
+ z3.object({
133
+ status: z3.literal("blocked"),
134
+ reason: z3.string(),
135
+ code: z3.string().optional()
122
136
  }).strict()
123
137
  ]);
124
- var InteractionBaseSchema = z2.object({
125
- phaseName: z2.string().min(1),
126
- interactionKey: z2.string().min(1),
127
- interactionId: z2.string().min(1),
128
- label: z2.string().min(1),
129
- help: z2.string().optional(),
130
- zoneId: z2.string().optional(),
131
- zoneIds: z2.array(z2.string()).optional(),
138
+ var InteractionBaseSchema = z3.object({
139
+ phaseName: z3.string().min(1),
140
+ interactionKey: z3.string().min(1),
141
+ interactionId: z3.string().min(1),
142
+ label: z3.string().min(1),
143
+ help: z3.string().optional(),
144
+ zoneId: z3.string().optional(),
145
+ zoneIds: z3.array(z3.string()).optional(),
132
146
  commit: InteractionCommitPolicySchema,
133
- descriptorDigest: z2.string().optional(),
134
- actorSeat: z2.number().int().optional(),
135
- draftDigest: z2.string().optional(),
136
- inputs: z2.array(InteractionInputDescriptorSchema),
137
- step: z2.object({
138
- index: z2.number().int().nonnegative(),
139
- total: z2.number().int().positive(),
140
- selected: z2.record(z2.string(), RuntimeJsonSchema),
141
- canCancel: z2.boolean()
147
+ descriptorDigest: z3.string().optional(),
148
+ actorSeat: z3.number().int().optional(),
149
+ draftDigest: z3.string().optional(),
150
+ inputs: z3.array(InteractionInputDescriptorSchema),
151
+ step: z3.object({
152
+ index: z3.number().int().nonnegative(),
153
+ total: z3.number().int().positive(),
154
+ selected: z3.record(z3.string(), RuntimeJsonSchema),
155
+ canCancel: z3.boolean()
142
156
  }).strict().optional(),
143
157
  availability: InteractionAvailabilitySchema,
144
- reasons: z2.array(
145
- z2.object({
146
- ruleId: z2.string(),
147
- errorCode: z2.string()
158
+ reasons: z3.array(
159
+ z3.object({
160
+ ruleId: z3.string(),
161
+ errorCode: z3.string()
148
162
  }).strict()
149
163
  ).optional()
150
164
  }).strict();
151
165
  var InteractionDescriptorSchema = InteractionBaseSchema.extend({
152
- kind: z2.literal("action")
166
+ kind: z3.literal("action")
153
167
  }).strict();
154
- var ZoneInteractionRefsSchema = z2.strictObject({
155
- cardIds: z2.array(z2.string()),
156
- cardViewsById: z2.record(z2.string(), z2.string()),
157
- cardBacksById: z2.record(z2.string(), z2.string()),
158
- playableByCardId: z2.record(z2.string(), z2.array(z2.string()))
168
+ var ZoneInteractionRefsSchema = z3.strictObject({
169
+ cardIds: z3.array(z3.string()),
170
+ cardViewsById: z3.record(z3.string(), ViewCardSchema),
171
+ cardBacksById: z3.record(z3.string(), z3.string()),
172
+ playableByCardId: z3.record(z3.string(), z3.array(z3.string()))
159
173
  });
160
174
 
161
175
  // src/shared/runtime-schema.ts
@@ -212,275 +226,275 @@ __export(runtime_schema_exports, {
212
226
  SystemActionEventSchema: () => SystemActionEventSchema,
213
227
  TransitionRecordSchema: () => TransitionRecordSchema
214
228
  });
215
- import * as z3 from "zod";
216
- var ReducerContractVersionSchema = z3.string().regex(new RegExp("^[0-9]+\\.[0-9]+\\.[0-9]+$"));
217
- var RngOperationParameterSchema = z3.union([
218
- z3.string(),
219
- z3.number().finite(),
220
- z3.boolean()
229
+ import * as z4 from "zod";
230
+ var ReducerContractVersionSchema = z4.string().regex(new RegExp("^[0-9]+\\.[0-9]+\\.[0-9]+$"));
231
+ var RngOperationParameterSchema = z4.union([
232
+ z4.string(),
233
+ z4.number().finite(),
234
+ z4.boolean()
221
235
  ]);
222
- var RngOperationSchema = z3.strictObject({
223
- kind: z3.string().min(1),
224
- parameters: z3.record(z3.string(), RngOperationParameterSchema)
225
- });
226
- var RngDrawSchema = z3.strictObject({
227
- index: z3.number().int().gte(0),
228
- cursorBefore: z3.number().int().gte(0),
229
- cursorAfter: z3.number().int().gte(0),
236
+ var RngOperationSchema = z4.strictObject({
237
+ kind: z4.string().min(1),
238
+ parameters: z4.record(z4.string(), RngOperationParameterSchema)
239
+ });
240
+ var RngDrawSchema = z4.strictObject({
241
+ index: z4.number().int().gte(0),
242
+ cursorBefore: z4.number().int().gte(0),
243
+ cursorAfter: z4.number().int().gte(0),
230
244
  operation: RngOperationSchema
231
245
  });
232
- var RngStateSchema = z3.strictObject({
233
- seed: z3.union([
234
- z3.number().refine(Number.isInteger, { message: "Expected integer" }),
235
- z3.null()
246
+ var RngStateSchema = z4.strictObject({
247
+ seed: z4.union([
248
+ z4.number().refine(Number.isInteger, { message: "Expected integer" }),
249
+ z4.null()
236
250
  ]),
237
- cursor: z3.number().int(),
238
- trace: z3.array(z3.string()),
239
- draws: z3.array(RngDrawSchema).optional()
240
- });
241
- var ReducerFlowStateSchema = z3.strictObject({
242
- currentPhase: z3.string().min(1),
243
- turn: z3.number().int(),
244
- round: z3.number().int(),
245
- activePlayers: z3.array(z3.string().min(1))
246
- });
247
- var RuntimeSimultaneousSubmissionSchema = z3.strictObject({
248
- interactionId: z3.string().min(1),
251
+ cursor: z4.number().int(),
252
+ trace: z4.array(z4.string()),
253
+ draws: z4.array(RngDrawSchema).optional()
254
+ });
255
+ var ReducerFlowStateSchema = z4.strictObject({
256
+ currentPhase: z4.string().min(1),
257
+ turn: z4.number().int(),
258
+ round: z4.number().int(),
259
+ activePlayers: z4.array(z4.string().min(1))
260
+ });
261
+ var RuntimeSimultaneousSubmissionSchema = z4.strictObject({
262
+ interactionId: z4.string().min(1),
249
263
  params: RuntimeJsonSchema
250
264
  });
251
- var RuntimeSimultaneousCurrentSchema = z3.strictObject({
252
- phaseName: z3.string().min(1),
253
- actors: z3.array(z3.string().min(1)),
254
- submissions: z3.record(z3.string(), RuntimeSimultaneousSubmissionSchema)
265
+ var RuntimeSimultaneousCurrentSchema = z4.strictObject({
266
+ phaseName: z4.string().min(1),
267
+ actors: z4.array(z4.string().min(1)),
268
+ submissions: z4.record(z4.string(), RuntimeSimultaneousSubmissionSchema)
255
269
  });
256
- var RuntimeSimultaneousStateSchema = z3.strictObject({
257
- current: z3.union([RuntimeSimultaneousCurrentSchema, z3.null()])
270
+ var RuntimeSimultaneousStateSchema = z4.strictObject({
271
+ current: z4.union([RuntimeSimultaneousCurrentSchema, z4.null()])
258
272
  });
259
- var TransitionRecordSchema = z3.strictObject({
260
- from: z3.string().min(1),
261
- to: z3.string().min(1)
273
+ var TransitionRecordSchema = z4.strictObject({
274
+ from: z4.string().min(1),
275
+ to: z4.string().min(1)
262
276
  });
263
- var RuntimePendingInteractionSchema = z3.strictObject({
264
- phaseName: z3.string().min(1),
265
- interactionId: z3.string().min(1),
266
- values: z3.array(RuntimeJsonSchema).min(1)
277
+ var RuntimePendingInteractionSchema = z4.strictObject({
278
+ phaseName: z4.string().min(1),
279
+ interactionId: z4.string().min(1),
280
+ values: z4.array(RuntimeJsonSchema).min(1)
267
281
  });
268
- var GameEventDetailSchema = z3.strictObject({
269
- label: z3.string().min(1),
270
- value: z3.union([z3.string(), z3.number().finite(), z3.boolean()])
282
+ var GameEventDetailSchema = z4.strictObject({
283
+ label: z4.string().min(1),
284
+ value: z4.union([z4.string(), z4.number().finite(), z4.boolean()])
271
285
  });
272
- var SystemActionEventSchema = z3.strictObject({
273
- kind: z3.literal("systemAction"),
274
- procedureId: z3.string().min(1),
275
- title: z3.string().min(1),
276
- summary: z3.string().min(1).optional(),
277
- details: z3.array(GameEventDetailSchema).max(16).optional()
286
+ var SystemActionEventSchema = z4.strictObject({
287
+ kind: z4.literal("systemAction"),
288
+ procedureId: z4.string().min(1),
289
+ title: z4.string().min(1),
290
+ summary: z4.string().min(1).optional(),
291
+ details: z4.array(GameEventDetailSchema).max(16).optional()
278
292
  });
279
- var GameEventSchema = z3.discriminatedUnion("kind", [
293
+ var GameEventSchema = z4.discriminatedUnion("kind", [
280
294
  SystemActionEventSchema
281
295
  ]);
282
- var ReducerRuntimeStateSchema = z3.strictObject({
283
- events: z3.array(GameEventSchema).max(32),
296
+ var ReducerRuntimeStateSchema = z4.strictObject({
297
+ events: z4.array(GameEventSchema).max(32),
284
298
  rng: RngStateSchema,
285
- pending: z3.record(z3.string(), RuntimePendingInteractionSchema),
299
+ pending: z4.record(z4.string(), RuntimePendingInteractionSchema),
286
300
  simultaneous: RuntimeSimultaneousStateSchema,
287
- lastTransition: z3.union([TransitionRecordSchema, z3.null()]),
288
- options: z3.record(z3.string(), RuntimeJsonSchema)
301
+ lastTransition: z4.union([TransitionRecordSchema, z4.null()]),
302
+ options: z4.record(z4.string(), RuntimeJsonSchema)
289
303
  });
290
- var ReducerDomainStateSchema = z3.strictObject({
304
+ var ReducerDomainStateSchema = z4.strictObject({
291
305
  table: RuntimeJsonSchema,
292
306
  publicState: RuntimeJsonSchema,
293
- privateState: z3.record(z3.string(), RuntimeJsonSchema),
307
+ privateState: z4.record(z4.string(), RuntimeJsonSchema),
294
308
  hiddenState: RuntimeJsonSchema,
295
309
  flow: ReducerFlowStateSchema,
296
310
  phase: RuntimeJsonSchema
297
311
  });
298
- var ReducerSessionStateSchema = z3.strictObject({
312
+ var ReducerSessionStateSchema = z4.strictObject({
299
313
  domain: ReducerDomainStateSchema,
300
314
  runtime: ReducerRuntimeStateSchema
301
315
  });
302
- var GameInputInteractionSchema = z3.strictObject({
303
- kind: z3.literal("interaction"),
304
- playerId: z3.string().min(1),
305
- interactionId: z3.string().min(1),
316
+ var GameInputInteractionSchema = z4.strictObject({
317
+ kind: z4.literal("interaction"),
318
+ playerId: z4.string().min(1),
319
+ interactionId: z4.string().min(1),
306
320
  params: RuntimeJsonSchema
307
321
  });
308
- var GameInputCancelSchema = z3.strictObject({
309
- kind: z3.literal("interaction.cancel"),
310
- playerId: z3.string().min(1),
311
- interactionId: z3.string().min(1)
322
+ var GameInputCancelSchema = z4.strictObject({
323
+ kind: z4.literal("interaction.cancel"),
324
+ playerId: z4.string().min(1),
325
+ interactionId: z4.string().min(1)
312
326
  });
313
- var GameInputSchema = z3.discriminatedUnion("kind", [
327
+ var GameInputSchema = z4.discriminatedUnion("kind", [
314
328
  GameInputInteractionSchema,
315
329
  GameInputCancelSchema
316
330
  ]);
317
- var GameOutcomeReasonSchema = z3.strictObject({
318
- code: z3.string().min(1),
319
- message: z3.string().min(1).optional()
331
+ var GameOutcomeReasonSchema = z4.strictObject({
332
+ code: z4.string().min(1),
333
+ message: z4.string().min(1).optional()
320
334
  });
321
- var OutcomeResultSchema = z3.enum([
335
+ var OutcomeResultSchema = z4.enum([
322
336
  "win",
323
337
  "draw",
324
338
  "loss",
325
339
  "eliminated"
326
340
  ]);
327
- var OutcomeScoreComponentSchema = z3.strictObject({
328
- id: z3.string().min(1),
329
- label: z3.string().min(1),
330
- value: z3.number().finite()
331
- });
332
- var OutcomeTieBreakSchema = z3.strictObject({
333
- id: z3.string().min(1),
334
- label: z3.string().min(1),
335
- value: z3.union([z3.number().finite(), z3.string()])
336
- });
337
- var OutcomeStandingSchema = z3.strictObject({
338
- playerId: z3.string().min(1),
339
- rank: z3.number().int().gte(1),
341
+ var OutcomeScoreComponentSchema = z4.strictObject({
342
+ id: z4.string().min(1),
343
+ label: z4.string().min(1),
344
+ value: z4.number().finite()
345
+ });
346
+ var OutcomeTieBreakSchema = z4.strictObject({
347
+ id: z4.string().min(1),
348
+ label: z4.string().min(1),
349
+ value: z4.union([z4.number().finite(), z4.string()])
350
+ });
351
+ var OutcomeStandingSchema = z4.strictObject({
352
+ playerId: z4.string().min(1),
353
+ rank: z4.number().int().gte(1),
340
354
  result: OutcomeResultSchema,
341
- score: z3.number().finite().optional(),
342
- scoreBreakdown: z3.array(OutcomeScoreComponentSchema).optional(),
343
- tieBreaks: z3.array(OutcomeTieBreakSchema).optional()
355
+ score: z4.number().finite().optional(),
356
+ scoreBreakdown: z4.array(OutcomeScoreComponentSchema).optional(),
357
+ tieBreaks: z4.array(OutcomeTieBreakSchema).optional()
344
358
  });
345
- var GameOutcomeSchema = z3.strictObject({
359
+ var GameOutcomeSchema = z4.strictObject({
346
360
  reason: GameOutcomeReasonSchema,
347
- standings: z3.array(OutcomeStandingSchema).min(1)
361
+ standings: z4.array(OutcomeStandingSchema).min(1)
348
362
  });
349
- var InitializeResultSchema = z3.strictObject({
363
+ var InitializeResultSchema = z4.strictObject({
350
364
  state: ReducerSessionStateSchema,
351
365
  terminal: GameOutcomeSchema.optional(),
352
- events: z3.array(GameEventSchema).optional()
366
+ events: z4.array(GameEventSchema).optional()
353
367
  });
354
- var InitializeRequestSchema = z3.strictObject({
368
+ var InitializeRequestSchema = z4.strictObject({
355
369
  table: RuntimeJsonSchema,
356
- playerIds: z3.array(z3.string().min(1)),
357
- rngSeed: z3.union([
358
- z3.number().refine(Number.isInteger, { message: "Expected integer" }),
359
- z3.null()
370
+ playerIds: z4.array(z4.string().min(1)),
371
+ rngSeed: z4.union([
372
+ z4.number().refine(Number.isInteger, { message: "Expected integer" }),
373
+ z4.null()
360
374
  ]).optional(),
361
- options: z3.record(z3.string(), RuntimeJsonSchema).optional()
375
+ options: z4.record(z4.string(), RuntimeJsonSchema).optional()
362
376
  });
363
- var DispatchRequestSchema = z3.strictObject({
377
+ var DispatchRequestSchema = z4.strictObject({
364
378
  state: ReducerSessionStateSchema,
365
379
  input: GameInputSchema
366
380
  });
367
- var DispatchTraceAcceptedClientInputSchema = z3.strictObject({
368
- kind: z3.literal("acceptedClientInput"),
381
+ var DispatchTraceAcceptedClientInputSchema = z4.strictObject({
382
+ kind: z4.literal("acceptedClientInput"),
369
383
  input: GameInputSchema
370
384
  });
371
- var DispatchTracePhaseEnteredSchema = z3.strictObject({
372
- kind: z3.literal("phaseEntered"),
373
- from: z3.string(),
374
- to: z3.string()
385
+ var DispatchTracePhaseEnteredSchema = z4.strictObject({
386
+ kind: z4.literal("phaseEntered"),
387
+ from: z4.string(),
388
+ to: z4.string()
375
389
  });
376
- var DispatchTraceRngConsumptionSchema = z3.strictObject({
377
- kind: z3.literal("rngConsumption"),
378
- version: z3.literal(2),
379
- operation: z3.string().min(1),
380
- drawIndex: z3.number().int().gte(0),
381
- traceEntry: z3.string()
390
+ var DispatchTraceRngConsumptionSchema = z4.strictObject({
391
+ kind: z4.literal("rngConsumption"),
392
+ version: z4.literal(2),
393
+ operation: z4.string().min(1),
394
+ drawIndex: z4.number().int().gte(0),
395
+ traceEntry: z4.string()
382
396
  });
383
- var DispatchTraceSchema = z3.discriminatedUnion("kind", [
397
+ var DispatchTraceSchema = z4.discriminatedUnion("kind", [
384
398
  DispatchTraceAcceptedClientInputSchema,
385
399
  DispatchTracePhaseEnteredSchema,
386
400
  DispatchTraceRngConsumptionSchema
387
401
  ]);
388
- var DispatchResultRejectSchema = z3.strictObject({
389
- kind: z3.literal("reject"),
390
- errorCode: z3.string().min(1),
391
- message: z3.string().optional()
402
+ var DispatchResultRejectSchema = z4.strictObject({
403
+ kind: z4.literal("reject"),
404
+ errorCode: z4.string().min(1),
405
+ message: z4.string().optional()
392
406
  });
393
- var DispatchResultAcceptSchema = z3.strictObject({
394
- kind: z3.literal("accept"),
407
+ var DispatchResultAcceptSchema = z4.strictObject({
408
+ kind: z4.literal("accept"),
395
409
  state: ReducerSessionStateSchema,
396
410
  terminal: GameOutcomeSchema.optional(),
397
- trace: z3.array(DispatchTraceSchema),
398
- events: z3.array(GameEventSchema).max(32)
411
+ trace: z4.array(DispatchTraceSchema),
412
+ events: z4.array(GameEventSchema).max(32)
399
413
  });
400
- var DispatchResultSchema = z3.discriminatedUnion("kind", [
414
+ var DispatchResultSchema = z4.discriminatedUnion("kind", [
401
415
  DispatchResultRejectSchema,
402
416
  DispatchResultAcceptSchema
403
417
  ]);
404
- var ReducerRuntimeLogEntryAcceptedClientInputSchema = z3.strictObject({
405
- kind: z3.literal("acceptedClientInput"),
406
- version: z3.number().int(),
418
+ var ReducerRuntimeLogEntryAcceptedClientInputSchema = z4.strictObject({
419
+ kind: z4.literal("acceptedClientInput"),
420
+ version: z4.number().int(),
407
421
  input: GameInputSchema
408
422
  });
409
- var ReducerRuntimeLogEntryPhaseEnteredSchema = z3.strictObject({
410
- kind: z3.literal("phaseEntered"),
411
- from: z3.string(),
412
- to: z3.string(),
413
- version: z3.number().int()
414
- });
415
- var ReducerRuntimeLogEntryRngConsumptionSchema = z3.strictObject({
416
- kind: z3.literal("rngConsumption"),
417
- version: z3.number().int(),
418
- operation: z3.string().min(1),
419
- drawIndex: z3.number().int().gte(0).optional(),
420
- traceEntry: z3.string()
421
- });
422
- var ReducerRuntimeLogEntryStateCommitSchema = z3.strictObject({
423
- kind: z3.literal("stateCommit"),
424
- version: z3.number().int(),
423
+ var ReducerRuntimeLogEntryPhaseEnteredSchema = z4.strictObject({
424
+ kind: z4.literal("phaseEntered"),
425
+ from: z4.string(),
426
+ to: z4.string(),
427
+ version: z4.number().int()
428
+ });
429
+ var ReducerRuntimeLogEntryRngConsumptionSchema = z4.strictObject({
430
+ kind: z4.literal("rngConsumption"),
431
+ version: z4.number().int(),
432
+ operation: z4.string().min(1),
433
+ drawIndex: z4.number().int().gte(0).optional(),
434
+ traceEntry: z4.string()
435
+ });
436
+ var ReducerRuntimeLogEntryStateCommitSchema = z4.strictObject({
437
+ kind: z4.literal("stateCommit"),
438
+ version: z4.number().int(),
425
439
  state: ReducerSessionStateSchema
426
440
  });
427
- var ReducerRuntimeLogEntrySchema = z3.discriminatedUnion("kind", [
441
+ var ReducerRuntimeLogEntrySchema = z4.discriminatedUnion("kind", [
428
442
  ReducerRuntimeLogEntryAcceptedClientInputSchema,
429
443
  ReducerRuntimeLogEntryPhaseEnteredSchema,
430
444
  ReducerRuntimeLogEntryRngConsumptionSchema,
431
445
  ReducerRuntimeLogEntryStateCommitSchema
432
446
  ]);
433
- var AuthoredViewSchema = z3.object({
434
- boards: z3.never({
447
+ var AuthoredViewSchema = z4.object({
448
+ boards: z4.never({
435
449
  error: "The view field 'boards' is reserved for manifest geometry."
436
450
  }).optional()
437
451
  }).catchall(RuntimeJsonSchema);
438
- var SeatProjectionSchema = z3.strictObject({
452
+ var SeatProjectionSchema = z4.strictObject({
439
453
  view: AuthoredViewSchema.nullable().optional(),
440
- availableInteractionRefs: z3.array(z3.string()).optional(),
441
- zones: z3.record(z3.string(), ZoneInteractionRefsSchema).optional(),
454
+ availableInteractionRefs: z4.array(z4.string()).optional(),
455
+ zones: z4.record(z4.string(), ZoneInteractionRefsSchema).optional(),
442
456
  /** Resource balances by player that this seat may see. */
443
- resources: z3.record(z3.string(), z3.record(z3.string(), z3.number().int())).optional()
444
- });
445
- var SimultaneousPhaseProjectionSchema = z3.strictObject({
446
- phaseName: z3.string().min(1),
447
- interactionId: z3.string().min(1),
448
- actorIds: z3.array(z3.string().min(1)),
449
- sealedPlayerIds: z3.array(z3.string().min(1)),
450
- pendingPlayerIds: z3.array(z3.string().min(1))
451
- });
452
- var SchedulerContinuationDependencySchema = z3.strictObject({
453
- waiterPlayerId: z3.string().min(1),
454
- blockerPlayerIds: z3.array(z3.string().min(1))
455
- });
456
- var SchedulerFlowAuthorityProjectionSchema = z3.strictObject({
457
- version: z3.literal(1),
458
- activePlayerIds: z3.array(z3.string().min(1)),
459
- pendingPlayerIds: z3.array(z3.string().min(1)),
460
- continuationDependencies: z3.array(SchedulerContinuationDependencySchema)
461
- });
462
- var ProjectionTimingMetadataSchema = z3.strictObject({
463
- resolveAvailableInteractionsMs: z3.number().finite().gte(0),
464
- resolveViewMs: z3.number().finite().gte(0),
465
- resolveZoneHandlesMs: z3.number().finite().gte(0),
466
- descriptorHashMs: z3.number().finite().gte(0)
467
- });
468
- var SeatProjectionBundleSchema = z3.strictObject({
469
- events: z3.array(GameEventSchema).max(32),
470
- simultaneousPhase: z3.union([SimultaneousPhaseProjectionSchema, z3.null()]).optional(),
457
+ resources: z4.record(z4.string(), z4.record(z4.string(), z4.number().int())).optional()
458
+ });
459
+ var SimultaneousPhaseProjectionSchema = z4.strictObject({
460
+ phaseName: z4.string().min(1),
461
+ interactionId: z4.string().min(1),
462
+ actorIds: z4.array(z4.string().min(1)),
463
+ sealedPlayerIds: z4.array(z4.string().min(1)),
464
+ pendingPlayerIds: z4.array(z4.string().min(1))
465
+ });
466
+ var SchedulerContinuationDependencySchema = z4.strictObject({
467
+ waiterPlayerId: z4.string().min(1),
468
+ blockerPlayerIds: z4.array(z4.string().min(1))
469
+ });
470
+ var SchedulerFlowAuthorityProjectionSchema = z4.strictObject({
471
+ version: z4.literal(1),
472
+ activePlayerIds: z4.array(z4.string().min(1)),
473
+ pendingPlayerIds: z4.array(z4.string().min(1)),
474
+ continuationDependencies: z4.array(SchedulerContinuationDependencySchema)
475
+ });
476
+ var ProjectionTimingMetadataSchema = z4.strictObject({
477
+ resolveAvailableInteractionsMs: z4.number().finite().gte(0),
478
+ resolveViewMs: z4.number().finite().gte(0),
479
+ resolveZoneHandlesMs: z4.number().finite().gte(0),
480
+ descriptorHashMs: z4.number().finite().gte(0)
481
+ });
482
+ var SeatProjectionBundleSchema = z4.strictObject({
483
+ events: z4.array(GameEventSchema).max(32),
484
+ simultaneousPhase: z4.union([SimultaneousPhaseProjectionSchema, z4.null()]).optional(),
471
485
  schedulerFlow: SchedulerFlowAuthorityProjectionSchema.optional(),
472
- interactionsByRef: z3.record(z3.string(), InteractionDescriptorSchema).optional(),
473
- seats: z3.record(z3.string(), SeatProjectionSchema),
486
+ interactionsByRef: z4.record(z4.string(), InteractionDescriptorSchema).optional(),
487
+ seats: z4.record(z4.string(), SeatProjectionSchema),
474
488
  timing: ProjectionTimingMetadataSchema.optional()
475
489
  });
476
- var ProjectRequestSchema = z3.strictObject({
490
+ var ProjectRequestSchema = z4.strictObject({
477
491
  state: ReducerSessionStateSchema,
478
- playerIds: z3.array(z3.string().min(1))
492
+ playerIds: z4.array(z4.string().min(1))
479
493
  });
480
- var BoardStaticProjectionSchema = z3.strictObject({
481
- view: z3.record(z3.string(), RuntimeJsonSchema),
482
- hash: z3.string().min(1),
483
- manifestVersion: z3.string()
494
+ var BoardStaticProjectionSchema = z4.strictObject({
495
+ view: z4.record(z4.string(), RuntimeJsonSchema),
496
+ hash: z4.string().min(1),
497
+ manifestVersion: z4.string()
484
498
  });
485
499
 
486
500
  // src/shared/hex-board.ts
@@ -820,6 +834,7 @@ function sha256Hex(input) {
820
834
 
821
835
  export {
822
836
  RuntimeJsonSchema,
837
+ ViewCardSchema,
823
838
  InteractionCommitPolicySchema,
824
839
  InputDomainSchema,
825
840
  InteractionInputDescriptorSchema,
@@ -847,4 +862,4 @@ export {
847
862
  encodeCanonicalPluginRuntimeJson,
848
863
  digestPluginRuntimeJson
849
864
  };
850
- //# sourceMappingURL=chunk-4H4TAIV7.js.map
865
+ //# sourceMappingURL=chunk-FUYMFUXO.js.map