@dreamboard-games/sdk 0.4.0-alpha.8 → 0.5.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/README.md +49 -11
  2. package/dist/authoring/index.d.ts +6 -14
  3. package/dist/authoring/index.js +11 -547
  4. package/dist/authoring/index.js.map +1 -1
  5. package/dist/authoring-compiler.d.ts +27 -0
  6. package/dist/authoring-compiler.js +11 -0
  7. package/dist/authoring-compiler.js.map +1 -0
  8. package/dist/authoring-materialize-cli.d.ts +1 -0
  9. package/dist/authoring-materialize-cli.js +45 -0
  10. package/dist/authoring-materialize-cli.js.map +1 -0
  11. package/dist/browser-interaction.d.ts +22 -22
  12. package/dist/{chunk-3BLN5POZ.js → chunk-2GQIALJL.js} +51 -15
  13. package/dist/chunk-2GQIALJL.js.map +1 -0
  14. package/dist/chunk-533O7C4L.js +7095 -0
  15. package/dist/chunk-533O7C4L.js.map +1 -0
  16. package/dist/{chunk-44N3T2A5.js → chunk-6LMESVGT.js} +9 -28
  17. package/dist/chunk-6LMESVGT.js.map +1 -0
  18. package/dist/{chunk-ZYONCTZ2.js → chunk-DQS2EG5E.js} +3 -3
  19. package/dist/{chunk-ZYONCTZ2.js.map → chunk-DQS2EG5E.js.map} +1 -1
  20. package/dist/chunk-EOEA3I64.js +1864 -0
  21. package/dist/chunk-EOEA3I64.js.map +1 -0
  22. package/dist/{chunk-B2YBS3SG.js → chunk-FL67RDID.js} +41 -13
  23. package/dist/chunk-FL67RDID.js.map +1 -0
  24. package/dist/{chunk-2TAKLJJD.js → chunk-HIH6Y4FA.js} +222 -1267
  25. package/dist/chunk-HIH6Y4FA.js.map +1 -0
  26. package/dist/chunk-HUK4234C.js +166 -0
  27. package/dist/chunk-HUK4234C.js.map +1 -0
  28. package/dist/chunk-KGV2EUNN.js +532 -0
  29. package/dist/chunk-KGV2EUNN.js.map +1 -0
  30. package/dist/{chunk-VTK4TIXC.js → chunk-KRJPRYEA.js} +49 -4
  31. package/dist/chunk-KRJPRYEA.js.map +1 -0
  32. package/dist/chunk-KWHOFBDM.js +9 -0
  33. package/dist/chunk-KWHOFBDM.js.map +1 -0
  34. package/dist/{chunk-UC2UXAC6.js → chunk-LMHCGCA6.js} +2 -2
  35. package/dist/{chunk-XV27IQHA.js → chunk-N33CGX2F.js} +15 -85
  36. package/dist/chunk-N33CGX2F.js.map +1 -0
  37. package/dist/chunk-TXELBVTG.js +32 -0
  38. package/dist/chunk-TXELBVTG.js.map +1 -0
  39. package/dist/{chunk-2TRZSZGD.js → chunk-VRRR6QZT.js} +9 -12
  40. package/dist/chunk-VRRR6QZT.js.map +1 -0
  41. package/dist/chunk-VWTKGIYF.js +90 -0
  42. package/dist/chunk-VWTKGIYF.js.map +1 -0
  43. package/dist/{chunk-IYX5OO2K.js → chunk-XFMSLL3P.js} +133 -61
  44. package/dist/chunk-XFMSLL3P.js.map +1 -0
  45. package/dist/{chunk-YGQTL63W.js → chunk-ZSTCUJKZ.js} +4 -4
  46. package/dist/chunk-ZSTCUJKZ.js.map +1 -0
  47. package/dist/codegen.js +1 -1
  48. package/dist/{components-BTwSIjXj.d.ts → components-CNAt5J1p.d.ts} +1 -1
  49. package/dist/definitions-bZSBaPjj.d.ts +300 -0
  50. package/dist/{diagnostics-1BWjRo6-.d.ts → diagnostics-DIi3ina7.d.ts} +2 -1
  51. package/dist/digest.d.ts +8 -0
  52. package/dist/{index-CFTjJIXd.d.ts → index-CR69MyWr.d.ts} +2 -2
  53. package/dist/{index.d-C0PKOVbh.d.ts → index.d-Bw8AOcgp.d.ts} +532 -225
  54. package/dist/index.js +2 -2
  55. package/dist/package-set.d.ts +2 -2
  56. package/dist/package-set.js +2 -2
  57. package/dist/plugin-runtime-contract.d.ts +17 -0
  58. package/dist/plugin-runtime-contract.js +94 -0
  59. package/dist/plugin-runtime-contract.js.map +1 -0
  60. package/dist/{protocol-nS2ojsGr.d.ts → protocol-CVaSqPgX.d.ts} +54 -47
  61. package/dist/reducer/advanced.d.ts +5 -4
  62. package/dist/reducer/advanced.js +14 -108
  63. package/dist/reducer/advanced.js.map +1 -1
  64. package/dist/reducer-contract.d.ts +1 -1
  65. package/dist/reducer-contract.js +6 -4
  66. package/dist/reducer.d.ts +20 -98
  67. package/dist/reducer.js +28 -6050
  68. package/dist/reducer.js.map +1 -1
  69. package/dist/reference-games/index.d.ts +6 -198
  70. package/dist/reference-games/index.js +18 -200
  71. package/dist/reference-games/index.js.map +1 -1
  72. package/dist/runtime/primitives.d.ts +3 -3
  73. package/dist/runtime/primitives.js +5 -5
  74. package/dist/runtime/runtime-api.d.ts +1 -1
  75. package/dist/runtime/workspace-contract.d.ts +343 -11
  76. package/dist/runtime/workspace-contract.js +12 -6
  77. package/dist/{runtime-Dkfm1x2r.d.ts → runtime-C7Z2acNU.d.ts} +67 -31
  78. package/dist/{runtime-api-C6aWo9c0.d.ts → runtime-api-CgPuEVeF.d.ts} +4 -13
  79. package/dist/runtime.d.ts +7 -7
  80. package/dist/runtime.js +15 -11
  81. package/dist/runtime.js.map +1 -1
  82. package/dist/schema.d.ts +405 -0
  83. package/dist/{stale-contract-artifact-error-C5AaZPJ8.d.ts → stale-contract-artifact-error-XLaweZtF.d.ts} +1 -1
  84. package/dist/testing-compiler.d.ts +37 -0
  85. package/dist/testing-compiler.js +272 -0
  86. package/dist/testing-compiler.js.map +1 -0
  87. package/dist/testing-runtime.d.ts +98 -21
  88. package/dist/testing-runtime.js +154 -95
  89. package/dist/testing-runtime.js.map +1 -1
  90. package/dist/testing.d.ts +197 -156
  91. package/dist/testing.js +660 -372
  92. package/dist/testing.js.map +1 -1
  93. package/dist/types-DN4O7kH_.d.ts +122 -0
  94. package/dist/{types-CTeN_QAk.d.ts → types-q1Guidm5.d.ts} +4 -5
  95. package/dist/types.d.ts +0 -1
  96. package/dist/ui/components.d.ts +3 -2
  97. package/dist/ui/components.js +1 -1
  98. package/dist/ui/plugin-styles.css +1 -1
  99. package/dist/{ui-contract-Ue6SywvO.d.ts → ui-contract-BC4JpysE.d.ts} +2 -6
  100. package/dist/ui.d.ts +4 -3
  101. package/dist/ui.js +2 -2
  102. package/dist/{views-Qx-EHBP8.d.ts → views-D2Cfzr3h.d.ts} +17 -5
  103. package/package.json +41 -22
  104. package/REFERENCE.md +0 -22884
  105. package/dist/chunk-2TAKLJJD.js.map +0 -1
  106. package/dist/chunk-2TRZSZGD.js.map +0 -1
  107. package/dist/chunk-3BLN5POZ.js.map +0 -1
  108. package/dist/chunk-3OZMHZK3.js +0 -40
  109. package/dist/chunk-3OZMHZK3.js.map +0 -1
  110. package/dist/chunk-44N3T2A5.js.map +0 -1
  111. package/dist/chunk-5CQIJHGF.js +0 -663
  112. package/dist/chunk-5CQIJHGF.js.map +0 -1
  113. package/dist/chunk-B2YBS3SG.js.map +0 -1
  114. package/dist/chunk-IYX5OO2K.js.map +0 -1
  115. package/dist/chunk-VTK4TIXC.js.map +0 -1
  116. package/dist/chunk-VTNEWMWJ.js +0 -12
  117. package/dist/chunk-VTNEWMWJ.js.map +0 -1
  118. package/dist/chunk-XV27IQHA.js.map +0 -1
  119. package/dist/chunk-YGQTL63W.js.map +0 -1
  120. package/dist/types-B_3pObUV.d.ts +0 -192
  121. /package/dist/{chunk-UC2UXAC6.js.map → chunk-LMHCGCA6.js.map} +0 -0
package/dist/index.js CHANGED
@@ -2,8 +2,8 @@ import {
2
2
  DREAMBOARD_SDK_PACKAGES,
3
3
  DREAMBOARD_SDK_PACKAGE_SET,
4
4
  DREAMBOARD_SDK_VERSION
5
- } from "./chunk-YGQTL63W.js";
6
- import "./chunk-VTNEWMWJ.js";
5
+ } from "./chunk-ZSTCUJKZ.js";
6
+ import "./chunk-KWHOFBDM.js";
7
7
  import "./chunk-PZ5AY32C.js";
8
8
  export {
9
9
  DREAMBOARD_SDK_PACKAGES,
@@ -1,6 +1,6 @@
1
- declare const DREAMBOARD_SDK_VERSION: "0.4.0-alpha.8";
1
+ declare const DREAMBOARD_SDK_VERSION: string;
2
2
  declare const DREAMBOARD_SDK_PACKAGES: {
3
- readonly "@dreamboard-games/sdk": "0.4.0-alpha.8";
3
+ readonly "@dreamboard-games/sdk": string;
4
4
  };
5
5
  type DreamboardSdkPackageName = keyof typeof DREAMBOARD_SDK_PACKAGES;
6
6
  type DreamboardSdkPackageSet = {
@@ -2,8 +2,8 @@ import {
2
2
  DREAMBOARD_SDK_PACKAGES,
3
3
  DREAMBOARD_SDK_PACKAGE_SET,
4
4
  DREAMBOARD_SDK_VERSION
5
- } from "./chunk-YGQTL63W.js";
6
- import "./chunk-VTNEWMWJ.js";
5
+ } from "./chunk-ZSTCUJKZ.js";
6
+ import "./chunk-KWHOFBDM.js";
7
7
  import "./chunk-PZ5AY32C.js";
8
8
  export {
9
9
  DREAMBOARD_SDK_PACKAGES,
@@ -0,0 +1,17 @@
1
+ import { P, M, R, v } from './protocol-CVaSqPgX.js';
2
+ export { A as ActionInteractionDescriptor, a as ActionSetVersionInput, C as CanonicalJson, D as DREAMBOARD_PLUGIN_PROTOCOL, b as DREAMBOARD_PLUGIN_PROTOCOL_VERSION, G as GameEvent, c as GameEventDetail, d as GameOutcome, e as GameplayBasis, H as HostToPluginEnvelope, f as HostToPluginPayload, I as InputDomain, g as InputDomainDependencies, h as InputDomainDependencyCase, i as InputSelection, j as InteractionAvailability, k as InteractionChoiceOption, l as InteractionCommitPolicy, m as InteractionContext, n as InteractionContextOption, o as InteractionDescriptor, p as InteractionDiagnosticReason, q as InteractionInputDescriptor, r as InteractionResult, O as OutcomeResult, s as OutcomeScoreComponent, t as OutcomeStanding, u as OutcomeTieBreak, P as PlayerId, v as PluginGameplayFrame, w as PluginPlayerSummary, x as PluginProtocolEnvelope, y as PluginProtocolFrame, z as PluginProtocolStep, B as PluginProtocolTape, E as PluginSessionDescriptor, F as PluginToHostEnvelope, J as PluginToHostPayload, K as ProjectedGameEvent, L as PromptInteractionDescriptor, R as ReducerBoardStaticProjection, M as ReducerSeatProjectionBundle, N as RuntimeJson, S as SimultaneousPhaseSnapshot, Q as SubmitInteractionCommand, T as SystemActionEvent, Z as ZoneHandlesSnapshot, U as canonicalizePluginRuntimeJson, V as digestPluginRuntimeJson, W as encodeCanonicalPluginRuntimeJson } from './protocol-CVaSqPgX.js';
3
+ export { BoardStaticProjectionSchema, GameEventDetailSchema, GameEventSchema, GameOutcomeSchema, GameplayBasisSchema, HostToPluginEnvelopeSchema, HostToPluginPayloadSchema, InputDomainDependenciesSchema, InputDomainSchema, InteractionAvailabilitySchema, InteractionCommitPolicySchema, InteractionContextSchema, InteractionDescriptorSchema, InteractionInputDescriptorSchema, InteractionResultSchema, PluginGameplayFrameSchema, PluginPlayerSummarySchema, PluginProtocolFrameSchema, PluginProtocolStepSchema, PluginProtocolTapeSchema, PluginSessionDescriptorSchema, PluginToHostEnvelopeSchema, PluginToHostPayloadSchema, ProjectedGameEventSchema, RuntimeJsonSchema, SeatProjectionBundleSchema, SimultaneousPhaseSnapshotSchema, SubmitInteractionCommandSchema, SystemActionEventSchema, ZoneHandlesSnapshotSchema, createPluginProtocolEnvelopeSchema, parseHostToPluginEnvelope, parsePluginGameplayFrame, parsePluginSessionDescriptor, parsePluginToHostEnvelope } from './schema.js';
4
+ export { computePluginActionSetVersion, digestPluginCommandRequest, digestPluginGameplayFrame } from './digest.js';
5
+
6
+ interface MaterializePluginGameplayFrameInput {
7
+ readonly currentPhase: string | null;
8
+ readonly activePlayers: readonly P[];
9
+ readonly dynamicProjection: M;
10
+ readonly staticProjection?: R | null;
11
+ readonly perspectivePlayerId: P;
12
+ readonly version: number;
13
+ readonly actionSetVersion: string;
14
+ }
15
+ declare function materializePluginGameplayFrame(input: MaterializePluginGameplayFrameInput): v;
16
+
17
+ export { type MaterializePluginGameplayFrameInput, materializePluginGameplayFrame };
@@ -0,0 +1,94 @@
1
+ import {
2
+ BoardStaticProjectionSchema,
3
+ DREAMBOARD_PLUGIN_PROTOCOL,
4
+ DREAMBOARD_PLUGIN_PROTOCOL_VERSION,
5
+ GameEventDetailSchema,
6
+ GameEventSchema,
7
+ GameOutcomeSchema,
8
+ GameplayBasisSchema,
9
+ HostToPluginEnvelopeSchema,
10
+ HostToPluginPayloadSchema,
11
+ InputDomainDependenciesSchema,
12
+ InputDomainSchema,
13
+ InteractionAvailabilitySchema,
14
+ InteractionCommitPolicySchema,
15
+ InteractionContextSchema,
16
+ InteractionDescriptorSchema,
17
+ InteractionInputDescriptorSchema,
18
+ InteractionResultSchema,
19
+ PluginGameplayFrameSchema,
20
+ PluginPlayerSummarySchema,
21
+ PluginProtocolFrameSchema,
22
+ PluginProtocolStepSchema,
23
+ PluginProtocolTapeSchema,
24
+ PluginSessionDescriptorSchema,
25
+ PluginToHostEnvelopeSchema,
26
+ PluginToHostPayloadSchema,
27
+ ProjectedGameEventSchema,
28
+ RuntimeJsonSchema,
29
+ SeatProjectionBundleSchema,
30
+ SimultaneousPhaseSnapshotSchema,
31
+ SubmitInteractionCommandSchema,
32
+ SystemActionEventSchema,
33
+ ZoneHandlesSnapshotSchema,
34
+ canonicalizePluginRuntimeJson,
35
+ computePluginActionSetVersion,
36
+ createPluginProtocolEnvelopeSchema,
37
+ digestPluginCommandRequest,
38
+ digestPluginGameplayFrame,
39
+ digestPluginRuntimeJson,
40
+ encodeCanonicalPluginRuntimeJson,
41
+ materializePluginGameplayFrame,
42
+ parseHostToPluginEnvelope,
43
+ parsePluginGameplayFrame,
44
+ parsePluginSessionDescriptor,
45
+ parsePluginToHostEnvelope
46
+ } from "./chunk-XFMSLL3P.js";
47
+ import "./chunk-PZ5AY32C.js";
48
+ export {
49
+ BoardStaticProjectionSchema,
50
+ DREAMBOARD_PLUGIN_PROTOCOL,
51
+ DREAMBOARD_PLUGIN_PROTOCOL_VERSION,
52
+ GameEventDetailSchema,
53
+ GameEventSchema,
54
+ GameOutcomeSchema,
55
+ GameplayBasisSchema,
56
+ HostToPluginEnvelopeSchema,
57
+ HostToPluginPayloadSchema,
58
+ InputDomainDependenciesSchema,
59
+ InputDomainSchema,
60
+ InteractionAvailabilitySchema,
61
+ InteractionCommitPolicySchema,
62
+ InteractionContextSchema,
63
+ InteractionDescriptorSchema,
64
+ InteractionInputDescriptorSchema,
65
+ InteractionResultSchema,
66
+ PluginGameplayFrameSchema,
67
+ PluginPlayerSummarySchema,
68
+ PluginProtocolFrameSchema,
69
+ PluginProtocolStepSchema,
70
+ PluginProtocolTapeSchema,
71
+ PluginSessionDescriptorSchema,
72
+ PluginToHostEnvelopeSchema,
73
+ PluginToHostPayloadSchema,
74
+ ProjectedGameEventSchema,
75
+ RuntimeJsonSchema,
76
+ SeatProjectionBundleSchema,
77
+ SimultaneousPhaseSnapshotSchema,
78
+ SubmitInteractionCommandSchema,
79
+ SystemActionEventSchema,
80
+ ZoneHandlesSnapshotSchema,
81
+ canonicalizePluginRuntimeJson,
82
+ computePluginActionSetVersion,
83
+ createPluginProtocolEnvelopeSchema,
84
+ digestPluginCommandRequest,
85
+ digestPluginGameplayFrame,
86
+ digestPluginRuntimeJson,
87
+ encodeCanonicalPluginRuntimeJson,
88
+ materializePluginGameplayFrame,
89
+ parseHostToPluginEnvelope,
90
+ parsePluginGameplayFrame,
91
+ parsePluginSessionDescriptor,
92
+ parsePluginToHostEnvelope
93
+ };
94
+ //# sourceMappingURL=plugin-runtime-contract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -9,6 +9,11 @@ declare function encodeCanonicalPluginRuntimeJson(value: unknown): string;
9
9
  declare function digestPluginRuntimeJson(value: unknown): string;
10
10
 
11
11
  type PlayerId = string;
12
+ interface GameplayBasis {
13
+ readonly version: number;
14
+ readonly actionSetVersion: string;
15
+ readonly perspectivePlayerId: PlayerId;
16
+ }
12
17
  interface PluginPlayerSummary {
13
18
  readonly playerId: PlayerId;
14
19
  readonly displayName: string;
@@ -167,14 +172,34 @@ type ProjectedGameEvent = GameEvent & {
167
172
  readonly version: number;
168
173
  readonly index: number;
169
174
  };
170
- interface PluginGameplayFrame<View = unknown, Phase extends string = string, Stage extends string = string, Interaction extends string = string> {
171
- readonly gameVersion: number;
172
- readonly actionSetVersion: string;
173
- readonly perspectivePlayerId: PlayerId | null;
174
- readonly sharedView: {
175
- readonly boardStatic: RuntimeJson | null;
176
- readonly dynamicView: RuntimeJson | null;
175
+ type OutcomeResult = "win" | "draw" | "loss" | "eliminated";
176
+ interface OutcomeScoreComponent {
177
+ readonly id: string;
178
+ readonly label: string;
179
+ readonly value: number;
180
+ }
181
+ interface OutcomeTieBreak {
182
+ readonly id: string;
183
+ readonly label: string;
184
+ readonly value: number | string;
185
+ }
186
+ interface OutcomeStanding<Player extends string = string> {
187
+ readonly playerId: Player;
188
+ readonly rank: number;
189
+ readonly result: OutcomeResult;
190
+ readonly score?: number;
191
+ readonly scoreBreakdown?: readonly OutcomeScoreComponent[];
192
+ readonly tieBreaks?: readonly OutcomeTieBreak[];
193
+ }
194
+ interface GameOutcome<Player extends string = string> {
195
+ readonly reason: {
196
+ readonly code: string;
197
+ readonly message?: string;
177
198
  };
199
+ readonly standings: readonly OutcomeStanding<Player>[];
200
+ }
201
+ interface PluginGameplayFrame<View = unknown, Phase extends string = string, Stage extends string = string, Interaction extends string = string> {
202
+ readonly basis: GameplayBasis;
178
203
  readonly view: View | null;
179
204
  readonly flow: {
180
205
  readonly currentPhase: Phase | null;
@@ -191,6 +216,15 @@ interface ReducerSeatProjectionBundle {
191
216
  readonly currentStage?: string | null;
192
217
  readonly stageSeats?: readonly string[];
193
218
  readonly simultaneousPhase?: SimultaneousPhaseSnapshot | null;
219
+ readonly schedulerFlow?: {
220
+ readonly version: 1;
221
+ readonly activePlayerIds: readonly string[];
222
+ readonly pendingPlayerIds: readonly string[];
223
+ readonly continuationDependencies: readonly {
224
+ readonly waiterPlayerId: string;
225
+ readonly blockerPlayerIds: readonly string[];
226
+ }[];
227
+ };
194
228
  readonly guidance?: GameGuidanceProjection | null;
195
229
  readonly recentEvents?: readonly ProjectedGameEvent[];
196
230
  readonly sharedView?: unknown;
@@ -208,35 +242,22 @@ interface ReducerBoardStaticProjection {
208
242
  }
209
243
 
210
244
  declare const DREAMBOARD_PLUGIN_PROTOCOL: "dreamboard-plugin";
211
- declare const DREAMBOARD_PLUGIN_PROTOCOL_VERSION: 3;
212
- interface ValidationResult {
213
- readonly valid: boolean;
214
- readonly errorCode?: string;
215
- readonly message?: string;
216
- }
217
- type SubmissionResult = {
245
+ declare const DREAMBOARD_PLUGIN_PROTOCOL_VERSION: 4;
246
+ type InteractionResult = {
247
+ readonly type: "interaction.result";
248
+ readonly clientActionId: string;
218
249
  readonly accepted: true;
219
250
  } | {
251
+ readonly type: "interaction.result";
252
+ readonly clientActionId: string;
220
253
  readonly accepted: false;
221
254
  readonly errorCode: string;
222
255
  readonly message?: string;
223
256
  };
224
- interface PluginInteractionBasis {
225
- readonly gameVersion: number;
226
- readonly actionSetVersion: string;
227
- readonly perspectivePlayerId: PlayerId | null;
228
- }
229
- interface ValidateInteractionCommand {
230
- readonly type: "interaction.validate";
231
- readonly requestId: string;
232
- readonly basis: PluginInteractionBasis;
233
- readonly interactionId: string;
234
- readonly params: RuntimeJson;
235
- }
236
257
  interface SubmitInteractionCommand {
237
258
  readonly type: "interaction.submit";
238
- readonly requestId: string;
239
- readonly basis: PluginInteractionBasis;
259
+ readonly clientActionId: string;
260
+ readonly basis: GameplayBasis;
240
261
  readonly interactionId: string;
241
262
  readonly params: RuntimeJson;
242
263
  }
@@ -246,15 +267,7 @@ type HostToPluginPayload = {
246
267
  } | {
247
268
  readonly type: "gameplay.frame";
248
269
  readonly frame: PluginGameplayFrame;
249
- } | {
250
- readonly type: "interaction.validation-result";
251
- readonly requestId: string;
252
- readonly result: ValidationResult;
253
- } | {
254
- readonly type: "interaction.submit-result";
255
- readonly requestId: string;
256
- readonly result: SubmissionResult;
257
- };
270
+ } | InteractionResult;
258
271
  type PluginToHostPayload = {
259
272
  readonly type: "runtime.ready";
260
273
  } | {
@@ -263,7 +276,7 @@ type PluginToHostPayload = {
263
276
  readonly sequence: number;
264
277
  readonly clientReceivedAtMs?: number;
265
278
  readonly clientRenderedAtMs?: number;
266
- } | ValidateInteractionCommand | SubmitInteractionCommand | {
279
+ } | SubmitInteractionCommand | {
267
280
  readonly type: "runtime.error";
268
281
  readonly message: string;
269
282
  readonly code?: string;
@@ -292,22 +305,16 @@ type PluginProtocolStep = {
292
305
  readonly id: string;
293
306
  readonly kind: "host.frame";
294
307
  readonly frameId: string;
295
- } | {
296
- readonly id: string;
297
- readonly kind: "client.validate";
298
- readonly fromFrameId: string;
299
- readonly requestDigest: string;
300
- readonly response: ValidationResult;
301
308
  } | {
302
309
  readonly id: string;
303
310
  readonly kind: "client.submit";
304
311
  readonly fromFrameId: string;
305
312
  readonly requestDigest: string;
306
- readonly response: SubmissionResult;
313
+ readonly response: InteractionResult;
307
314
  };
308
315
  type ActionSetVersionInput = {
309
- readonly gameVersion: number;
316
+ readonly version: number;
310
317
  readonly availableInteractions: readonly InteractionDescriptor[];
311
318
  };
312
319
 
313
- export { type ActionInteractionDescriptor as A, type PromptInteractionDescriptor as B, type CanonicalJson as C, DREAMBOARD_PLUGIN_PROTOCOL as D, type ReducerSeatProjectionBundle as E, type RuntimeJson as F, type GameEvent as G, type HostToPluginEnvelope as H, type InputDomain as I, type SubmissionResult as J, type SubmitInteractionCommand as K, type SystemActionEvent as L, type ValidationResult as M, canonicalizePluginRuntimeJson as N, digestPluginRuntimeJson as O, type PlayerId as P, encodeCanonicalPluginRuntimeJson as Q, type ReducerBoardStaticProjection as R, type SimultaneousPhaseSnapshot as S, type ValidateInteractionCommand as V, type ZoneHandlesSnapshot as Z, type ActionSetVersionInput as a, DREAMBOARD_PLUGIN_PROTOCOL_VERSION as b, type GameEventDetail as c, type HostToPluginPayload as d, type InputDomainDependencies as e, type InputDomainDependencyCase as f, type InputSelection as g, type InteractionAvailability as h, type InteractionChoiceOption as i, type InteractionCommitPolicy as j, type InteractionContext as k, type InteractionContextOption as l, type InteractionDescriptor as m, type InteractionDiagnosticReason as n, type InteractionInputDescriptor as o, type PluginGameplayFrame as p, type PluginInteractionBasis as q, type PluginPlayerSummary as r, type PluginProtocolEnvelope as s, type PluginProtocolFrame as t, type PluginProtocolStep as u, type PluginProtocolTape as v, type PluginSessionDescriptor as w, type PluginToHostEnvelope as x, type PluginToHostPayload as y, type ProjectedGameEvent as z };
320
+ export { type ActionInteractionDescriptor as A, type PluginProtocolTape as B, type CanonicalJson as C, DREAMBOARD_PLUGIN_PROTOCOL as D, type PluginSessionDescriptor as E, type PluginToHostEnvelope as F, type GameEvent as G, type HostToPluginEnvelope as H, type InputDomain as I, type PluginToHostPayload as J, type ProjectedGameEvent as K, type PromptInteractionDescriptor as L, type ReducerSeatProjectionBundle as M, type RuntimeJson as N, type OutcomeResult as O, type PlayerId as P, type SubmitInteractionCommand as Q, type ReducerBoardStaticProjection as R, type SimultaneousPhaseSnapshot as S, type SystemActionEvent as T, canonicalizePluginRuntimeJson as U, digestPluginRuntimeJson as V, encodeCanonicalPluginRuntimeJson as W, type ZoneHandlesSnapshot as Z, type ActionSetVersionInput as a, DREAMBOARD_PLUGIN_PROTOCOL_VERSION as b, type GameEventDetail as c, type GameOutcome as d, type GameplayBasis as e, type HostToPluginPayload as f, type InputDomainDependencies as g, type InputDomainDependencyCase as h, type InputSelection as i, type InteractionAvailability as j, type InteractionChoiceOption as k, type InteractionCommitPolicy as l, type InteractionContext as m, type InteractionContextOption as n, type InteractionDescriptor as o, type InteractionDiagnosticReason as p, type InteractionInputDescriptor as q, type InteractionResult as r, type OutcomeScoreComponent as s, type OutcomeStanding as t, type OutcomeTieBreak as u, type PluginGameplayFrame as v, type PluginPlayerSummary as w, type PluginProtocolEnvelope as x, type PluginProtocolFrame as y, type PluginProtocolStep as z };
@@ -1,9 +1,10 @@
1
- import { bQ as RuntimeTableRecord, bD as RuntimeRngState, c6 as SetupBootstrapStep, V as GeneratedManifestContractLike, bZ as SetupBootstrapContainerRef, c1 as SetupBootstrapPerPlayerContainerTemplateRef, aD as PlayerIdOfManifest, b_ as SetupBootstrapDestinationRef, n as CardIdOfManifest, aB as PieceIdOfManifest, I as DieIdOfManifest } from '../runtime-Dkfm1x2r.js';
2
- export { A as AnyContinuationToken, a as AnySchema, B as BoardBaseIdOfManifest, b as BoardContainerIdOfManifest, c as BoardContainerIdOfTable, d as BoardIdOfManifest, e as BoardIdOfTable, f as BoardLayoutOfManifest, g as BoardMapOfTable, i as BoardStateOfTable, j as BoardTypeIdOfManifest, k as BoardTypeIdOfTable, l as Brand, C as CardIdOfDeck, m as CardIdOfHand, o as CardIdOfState, p as CardIdOfTable, q as CardTypeOfState, r as CardTypeOfTable, s as ChoiceOption, t as CompatibleCardIdForHandAndDeck, u as CompatibleCardIdForTwoPlayerZones, v as CompatibleHandIdForDeck, w as ComponentDataOfTable, x as ComponentIdOfTable, y as ComponentLocationByTypeOfTable, z as ComponentLocationOfTable, D as ContinuationResponseOf, E as ContinuationToken, F as DeckCardsOfTable, G as DeckIdOfState, H as DeckIdOfTable, J as EdgeTypeIdOfManifest, K as EffectInvokeOptions, L as EffectSpecLike, M as EffectTypeTag, N as ErrorCodeOfContract, O as ExactManifestContractOf, P as FlowState, Q as FrameworkErrorCode, R as FrameworkErrorCodes, S as GameEvent, T as GameEventDetail, U as GameOutcome, W as HandCardsOfTable, X as HandIdOfState, Y as HandIdOfTable, Z as HexBoardIdOfTable, _ as HexBoardStateOfTable, $ as HexEdgeIdOfTable, a0 as HexEdgeStateOfTable, a1 as HexEdgeTypeIdOfTable, a2 as HexSpaceIdOfTable, a3 as HexSpaceTypeIdOfTable, a4 as HexVertexIdOfTable, a5 as HexVertexStateOfTable, a6 as HexVertexTypeIdOfTable, a7 as HiddenSchemaOfContract, a8 as HiddenStateOfState, a9 as InitContext, aa as InitSetupSelectionInput, ab as ManifestContract, ac as ManifestContractOf, ad as ManifestDefaults, ae as ManifestIdSchema, af as ManifestIds, ag as ManifestLiterals, ah as ManifestOf, ai as NonEmptyReadonlyArray, aj as OutcomeResult, ak as OutcomeScoreComponent, al as OutcomeStanding, am as OutcomeTieBreak, aq as PhaseAccessor, ar as PhaseMapOfState, as as PhaseNameOf, at as PhaseNameOfContract, au as PhaseNameOfManifest, av as PhaseNameOfState, aw as PhasePayload, ax as PhaseSchemasOfContract, ay as PhaseStateMapOfContract, az as PhaseStateOfState, aA as PhaseStepOfState, aE as PlayerIdOfState, aF as PlayerIdOfTable, aG as PlayerZoneIdOfManifest, aH as PlayerZoneIdOfState, aI as PlayerZoneIdOfTable, aJ as PrivateSchemaOfContract, aK as PrivateStateOfState, aL as PublicSchemaOfContract, aM as PublicStateOfState, aN as ReducerAccept, aO as ReducerAcceptOptions, aP as ReducerFx, aQ as ReducerGameState, aR as ReducerManifestContract, aS as ReducerReject, aT as ReducerResult, aU as ReducerRuntimeStateForState, aV as ReducerSessionState, aW as ReducerValidationResult, aX as RelationTypeIdOfManifest, aY as RelationTypeIdOfTable, aZ as ResolvedContainerLocation, a_ as ResolvedDeckLocation, a$ as ResolvedEdgeLocation, b0 as ResolvedHandLocation, b1 as ResolvedSlotLocation, b2 as ResolvedSpaceLocation, b3 as ResolvedVertexLocation, b4 as ResolvedZoneLocation, b5 as ResourceAmountsOfTable, b6 as ResourceBalancesOfState, b7 as ResourceBalancesOfTable, b8 as ResourceIdOfManifest, b9 as ResourceIdOfState, ba as ResourceIdOfTable, bb as RuntimeBoardBaseState, bc as RuntimeBoardCollections, bd as RuntimeBoardCompatibilityState, be as RuntimeBoardContainerState, bf as RuntimeBoardRelationState, bg as RuntimeBoardSpaceState, bh as RuntimeBoardState, bi as RuntimeCardData, bj as RuntimeCardVisibility, bk as RuntimeComponentLocation, bl as RuntimeComponentLocationMap, bm as RuntimeDeckMap, bn as RuntimeDieData, bo as RuntimeGenericBoardState, bp as RuntimeHandMap, bq as RuntimeHandVisibilityMode, br as RuntimeHexBoardState, bs as RuntimeHexEdgeState, bt as RuntimeHexOrientation, bu as RuntimeHexSpaceState, bv as RuntimeHexVertexState, bw as RuntimeOwnerMap, bx as RuntimeParams, by as RuntimePayload, bz as RuntimePhaseState, bA as RuntimePieceData, bB as RuntimeRecord, bC as RuntimeResourceMap, bE as RuntimeScalar, bF as RuntimeSetupSelection, bG as RuntimeSetupSelectionInput, bH as RuntimeSetupSelectionOverride, bI as RuntimeSimultaneousState, bJ as RuntimeSimultaneousSubmission, bK as RuntimeSlotHostRef, bL as RuntimeSquareBoardState, bM as RuntimeSquareEdgeState, bN as RuntimeSquareSpaceState, bO as RuntimeSquareVertexState, bP as RuntimeState, bR as RuntimeTiledBoardBaseState, bS as RuntimeTiledBoardState, bT as RuntimeTiledEdgeState, bU as RuntimeTiledSpaceState, bV as RuntimeTiledVertexState, bW as RuntimeVisibilityMap, bX as RuntimeZoneMap, bY as SchemaLike, b$ as SetupBootstrapPerPlayerBoardContainerRef, c0 as SetupBootstrapPerPlayerBoardSpaceRef, c2 as SetupBootstrapPerPlayerZoneRef, c3 as SetupBootstrapSharedBoardContainerRef, c4 as SetupBootstrapSharedBoardSpaceRef, c5 as SetupBootstrapSharedZoneRef, c7 as SetupOptionChoiceMetadata, c8 as SetupOptionIdOfManifest, c9 as SetupOptionMetadata, ca as SetupProfileDefinition, cb as SetupProfileIdOfManifest, cc as SetupProfileMetadata, cd as SetupSelectionInputOfManifest, ce as SetupSelectionOfManifest, cg as SharedZoneIdOfManifest, ch as SharedZoneIdOfState, ci as SharedZoneIdOfTable, cj as SpaceIdOfManifest, ck as SpaceIdOfTable, cl as SpaceTypeIdOfManifest, cm as SpaceTypeIdOfTable, cn as SquareBoardIdOfTable, co as SquareBoardStateOfTable, cp as SquareEdgeIdOfTable, cq as SquareEdgeStateOfTable, cr as SquareEdgeTypeIdOfTable, cs as SquareSpaceIdOfTable, ct as SquareSpaceTypeIdOfTable, cu as SquareVertexIdOfTable, cv as SquareVertexStateOfTable, cw as SquareVertexTypeIdOfTable, cx as StateDefinition, cy as StateDefinitionOfContract, cz as StaticBoards, cA as StaticBoardsJsonEnvelope, cB as StringKeyOf, cC as SystemActionEvent, cD as TableOfManifest, cE as TableOfState, cF as TableQueries, cG as TableQueriesOfState, cH as TiledBoardIdOfTable, cI as TiledBoardStateOfTable, cJ as TiledEdgeIdOfTable, cK as TiledEdgeMap, cL as TiledEdgeStateOfTable, cM as TiledEdgeTypeIdOfTable, cN as TiledSpaceIdOfTable, cO as TiledSpaceMap, cP as TiledVertexIdOfTable, cQ as TiledVertexMap, cR as TiledVertexStateOfTable, cS as TiledVertexTypeIdOfTable, cT as VertexTypeIdOfManifest, cV as assumeManifestSchema, cZ as cloneManifestDefault, c_ as createManifestGameStateSchema, c$ as createManifestRuntimeSchema, d0 as createManifestStringLiteralSchema, d1 as isManifestScopedSchema, d6 as markManifestScopedSchema, dk as resolveManifestPlayerIds } from '../runtime-Dkfm1x2r.js';
3
- import { aH as ReducerGameContractLike, au as PhaseMapOf, bc as ViewMapOf, aI as ReducerGameDefinition } from '../views-Qx-EHBP8.js';
4
- export { A as ActionContext, a as ActorSelection, b as ActorSelector, c as ActorSelectorArgs, d as AnyCardActionSpec, e as AnyContinuationCallable, f as AnyInteractionSpec, g as AnyPhaseDefinitionForContract, h as AnyReducerGameDefinition, i as AutoPhaseDefinition, B as BaseGameSessionOfContract, j as BaseGameStateOfContract, k as BoardInputCollectorKind, l as BoardInputCollectorMeta, m as BoardInteractionKeyOfDefinition, n as BoardTargetDomainDescriptor, o as BoundedNumberDomainDescriptor, C as CardActionMap, p as CardActionSpec, q as CardInputCollectorMeta, r as CardInputZoneIdsOfDefinition, s as CardInteractionKeyOfDefinition, t as CardTargetDomainDescriptor, u as ChoiceDomainDescriptor, v as ChoiceListDomainDescriptor, w as ClientParamsOf, x as ClientParamsOfInteractionOfDefinition, y as CollectorState, z as ContinuationCallable, D as ContinuationInput, E as ContinuationInputForSource, F as ContinuationKind, G as ContinuationReduceArgs, H as ContinuationSourceKind, I as DefaultedClientParamKeysOfInteractionOfDefinition, L as EagerInputDomainDependencies, M as EffectContinuationCallable, N as EffectContinuationInput, O as EffectContinuationResponse, P as EffectDefinition, Q as EffectIdsOfDefinition, R as EffectMap, S as EffectRegistryOfPhase, T as EffectRollDieDefinition, U as EffectShuffleDefinition, V as EffectShufflePlayerZoneDefinition, W as EmptyViewDefinition, X as GameStateOf, Y as InitialStateCallbacks, Z as InputCollector, _ as InputCollectorKind, $ as InputCollectorMetaForKind, a0 as InputDomainDependencyCase, a1 as InputDomainDescriptor, a2 as InputDomainResolverDescriptor, a3 as InputKeysWithCollectorKindOfDefinition, a4 as InputSelectionDescriptor, a5 as InteractionAvailabilityArgs, a6 as InteractionCommitPolicy, a7 as InteractionIdOfDefinition, a8 as InteractionIdOfDefinitionPhase, a9 as InteractionKind, aa as InteractionMap, ab as InteractionReduceArgs, ac as InteractionReduceInput, ad as InteractionRule, ae as InteractionRuleValidationResult, af as InteractionSpec, ag as InteractionSpecByNameOfDefinitionPhase, ah as InteractionToArgs, ai as InteractionValidateArgs, aj as LazyBoardTargetDomainDescriptor, ak as LazyCardTargetDomainDescriptor, al as LazyInputDomainDependencies, am as MutationRuntimeHelpers, ao as ParamsOf, ap as ParamsOfInteractionOfDefinition, aq as PhaseDefinition, ar as PhaseDefinitionByName, as as PhaseEnterArgs, at as PhaseEnterContext, av as PhaseNamesOfDefinition, aw as PhaseStateMapOfDefinitions, ax as PhaseStateOfDefinitions, ay as PhaseZoneList, az as PlayableInteractionsOfZoneOfDefinition, aA as PlayerPhaseDefinition, aB as PlayerViewDefinition, aC as PromptInputCollectorMeta, aD as PromptInteractionKeyOfDefinition, aE as RandomHelpers, aG as ReducerGameContract, aK as ReducerSessionForConfig, aM as ReducerStateForConfig, aO as ResolvedBoardTargetDomainDescriptor, aP as ResolvedCardTargetDomainDescriptor, aQ as ResolvedGameSessionOf, aR as ResolvedGameStateOf, aS as ResourceMapDomainDescriptor, aT as ResumableEffectKind, aU as RngInputCollectorMeta, aV as RollDieContinuationResponse, aX as RuntimeHelpers, aY as ScopedPhaseState, aZ as SharedViewDefinition, a_ as ShufflePlayerZoneContinuationResponse, a$ as ShuffleSharedZoneContinuationResponse, b0 as SimultaneousPlayerPhaseDefinition, b1 as SimultaneousResolveArgs, b2 as SimultaneousSubmission, b3 as SimultaneousSubmitSpec, b4 as StageMap, b5 as StageNamesOfDefinitionPhase, b6 as StageSpec, b7 as StaticViewDefinition, b8 as StaticViewQueries, b9 as TargetKind, ba as ValidationIssue, bb as ViewDefinitionByName, bd as ViewNamesOfDefinition, be as ViewOfDefinition, bf as ViewsOfDefinition, bg as ZoneIdsOfDefinition } from '../views-Qx-EHBP8.js';
1
+ import { bV as RuntimeTableRecord, bI as RuntimeRngState, cb as SetupBootstrapStep, V as GeneratedManifestContractLike, c2 as SetupBootstrapContainerRef, c6 as SetupBootstrapPerPlayerContainerTemplateRef, aF as PlayerIdOfManifest, c3 as SetupBootstrapDestinationRef, n as CardIdOfManifest, aD as PieceIdOfManifest, I as DieIdOfManifest } from '../runtime-C7Z2acNU.js';
2
+ export { A as AnyContinuationToken, a as AnySchema, B as BoardBaseIdOfManifest, b as BoardContainerIdOfManifest, c as BoardContainerIdOfTable, d as BoardIdOfManifest, e as BoardIdOfTable, f as BoardLayoutOfManifest, g as BoardMapOfTable, i as BoardStateOfTable, j as BoardTypeIdOfManifest, k as BoardTypeIdOfTable, l as Brand, C as CardIdOfDeck, m as CardIdOfHand, o as CardIdOfState, p as CardIdOfTable, q as CardTypeOfState, r as CardTypeOfTable, s as ChoiceOption, t as CompatibleCardIdForHandAndDeck, u as CompatibleCardIdForTwoPlayerZones, v as CompatibleHandIdForDeck, w as ComponentDataOfTable, x as ComponentIdOfTable, y as ComponentLocationByTypeOfTable, z as ComponentLocationOfTable, D as ContinuationResponseOf, E as ContinuationToken, F as DeckCardsOfTable, G as DeckIdOfState, H as DeckIdOfTable, J as EdgeTypeIdOfManifest, K as EffectInvokeOptions, L as EffectSpecLike, M as EffectTypeTag, N as ErrorCodeOfContract, O as ExactManifestContractOf, P as FlowState, Q as FrameworkErrorCode, R as FrameworkErrorCodes, S as GameEvent, T as GameEventDetail, U as GameOutcome, W as HandCardsOfTable, X as HandIdOfState, Y as HandIdOfTable, Z as HexBoardIdOfTable, _ as HexBoardStateOfTable, $ as HexEdgeIdOfTable, a0 as HexEdgeStateOfTable, a1 as HexEdgeTypeIdOfTable, a2 as HexSpaceIdOfTable, a3 as HexSpaceTypeIdOfTable, a4 as HexVertexIdOfTable, a5 as HexVertexStateOfTable, a6 as HexVertexTypeIdOfTable, a7 as HiddenSchemaOfContract, a8 as HiddenStateOfState, a9 as InitContext, aa as InitSetupSelectionInput, ab as ManifestContract, ac as ManifestContractOf, ad as ManifestDefaults, ae as ManifestIdFamily, af as ManifestIdSchema, ag as ManifestIds, ah as ManifestLiterals, ai as ManifestNormalSetup, aj as ManifestOf, ak as NonEmptyReadonlyArray, al as OutcomeResult, am as OutcomeScoreComponent, an as OutcomeStanding, ao as OutcomeTieBreak, as as PhaseAccessor, at as PhaseMapOfState, au as PhaseNameOf, av as PhaseNameOfContract, aw as PhaseNameOfManifest, ax as PhaseNameOfState, ay as PhasePayload, az as PhaseSchemasOfContract, aA as PhaseStateMapOfContract, aB as PhaseStateOfState, aC as PhaseStepOfState, aG as PlayerIdOfState, aH as PlayerIdOfTable, aI as PlayerZoneIdOfManifest, aJ as PlayerZoneIdOfState, aK as PlayerZoneIdOfTable, aL as PrivateSchemaOfContract, aM as PrivateStateOfState, aN as PublicSchemaOfContract, aO as PublicStateOfState, aP as ReducerAccept, aQ as ReducerAcceptOptions, aR as ReducerFx, aS as ReducerGameState, aT as ReducerManifestContract, aU as ReducerReject, aV as ReducerResult, aW as ReducerRuntimeStateForState, aX as ReducerSessionState, aY as ReducerValidationResult, aZ as RelationTypeIdOfManifest, a_ as RelationTypeIdOfTable, a$ as ResolvedContainerLocation, b0 as ResolvedDeckLocation, b1 as ResolvedEdgeLocation, b2 as ResolvedHandLocation, b3 as ResolvedSlotLocation, b4 as ResolvedSpaceLocation, b5 as ResolvedVertexLocation, b6 as ResolvedZoneLocation, b7 as ResourceAmountsOfTable, b8 as ResourceBalancesOfState, b9 as ResourceBalancesOfTable, ba as ResourceIdOfManifest, bb as ResourceIdOfState, bc as ResourceIdOfTable, bd as RuntimeBoardBaseState, be as RuntimeBoardCollections, bf as RuntimeBoardCompatibilityState, bg as RuntimeBoardContainerState, bh as RuntimeBoardRelationState, bi as RuntimeBoardSpaceState, bj as RuntimeBoardState, bk as RuntimeCardData, bl as RuntimeCardVisibility, bm as RuntimeComponentLocation, bn as RuntimeComponentLocationMap, bo as RuntimeDeckMap, bp as RuntimeDieData, bq as RuntimeGenericBoardState, br as RuntimeHandMap, bs as RuntimeHandVisibilityMode, bt as RuntimeHexBoardState, bu as RuntimeHexEdgeState, bv as RuntimeHexOrientation, bw as RuntimeHexSpaceState, bx as RuntimeHexVertexState, by as RuntimeOwnerMap, bz as RuntimeParams, bA as RuntimePayload, bB as RuntimePhaseState, bC as RuntimePieceData, bD as RuntimeRecord, bE as RuntimeResourceMap, bF as RuntimeRngDraw, bG as RuntimeRngOperation, bH as RuntimeRngOperationParameter, bJ as RuntimeScalar, bK as RuntimeSetupSelection, bL as RuntimeSetupSelectionInput, bM as RuntimeSetupSelectionOverride, bN as RuntimeSimultaneousState, bO as RuntimeSimultaneousSubmission, bP as RuntimeSlotHostRef, bQ as RuntimeSquareBoardState, bR as RuntimeSquareEdgeState, bS as RuntimeSquareSpaceState, bT as RuntimeSquareVertexState, bU as RuntimeState, bW as RuntimeTiledBoardBaseState, bX as RuntimeTiledBoardState, bY as RuntimeTiledEdgeState, bZ as RuntimeTiledSpaceState, b_ as RuntimeTiledVertexState, b$ as RuntimeVisibilityMap, c0 as RuntimeZoneMap, c1 as SchemaLike, c4 as SetupBootstrapPerPlayerBoardContainerRef, c5 as SetupBootstrapPerPlayerBoardSpaceRef, c7 as SetupBootstrapPerPlayerZoneRef, c8 as SetupBootstrapSharedBoardContainerRef, c9 as SetupBootstrapSharedBoardSpaceRef, ca as SetupBootstrapSharedZoneRef, cc as SetupOptionChoiceMetadata, cd as SetupOptionIdOfManifest, ce as SetupOptionMetadata, cf as SetupProfileDefinition, cg as SetupProfileIdOfManifest, ch as SetupProfileMetadata, ci as SetupSelectionInputOfManifest, cj as SetupSelectionOfManifest, cl as SharedZoneIdOfManifest, cm as SharedZoneIdOfState, cn as SharedZoneIdOfTable, co as SpaceIdOfManifest, cp as SpaceIdOfTable, cq as SpaceTypeIdOfManifest, cr as SpaceTypeIdOfTable, cs as SquareBoardIdOfTable, ct as SquareBoardStateOfTable, cu as SquareEdgeIdOfTable, cv as SquareEdgeStateOfTable, cw as SquareEdgeTypeIdOfTable, cx as SquareSpaceIdOfTable, cy as SquareSpaceTypeIdOfTable, cz as SquareVertexIdOfTable, cA as SquareVertexStateOfTable, cB as SquareVertexTypeIdOfTable, cC as StateDefinition, cD as StateDefinitionOfContract, cE as StaticBoards, cF as StaticBoardsJsonEnvelope, cG as StringKeyOf, cH as SystemActionEvent, cI as TableOfManifest, cJ as TableOfState, cK as TableQueries, cL as TableQueriesOfState, cM as TiledBoardIdOfTable, cN as TiledBoardStateOfTable, cO as TiledEdgeIdOfTable, cP as TiledEdgeMap, cQ as TiledEdgeStateOfTable, cR as TiledEdgeTypeIdOfTable, cS as TiledSpaceIdOfTable, cT as TiledSpaceMap, cU as TiledVertexIdOfTable, cV as TiledVertexMap, cW as TiledVertexStateOfTable, cX as TiledVertexTypeIdOfTable, cY as VertexTypeIdOfManifest, c_ as assumeManifestSchema, d2 as cloneManifestDefault, d3 as createManifestGameStateSchema, d4 as createManifestRuntimeSchema, d5 as createManifestStringLiteralSchema, d6 as isManifestScopedSchema, db as manifestSchemaFamily, dc as markManifestScopedSchema, dr as resolveManifestPlayerIds } from '../runtime-C7Z2acNU.js';
3
+ import { aH as ReducerGameContractLike, au as PhaseMapOf, bc as ViewMapOf, aI as ReducerGameDefinition } from '../views-D2Cfzr3h.js';
4
+ export { A as ActionContext, a as ActorSelection, b as ActorSelector, c as ActorSelectorArgs, d as AnyCardActionSpec, e as AnyContinuationCallable, f as AnyInteractionSpec, g as AnyPhaseDefinitionForContract, h as AnyReducerGameDefinition, i as AutoPhaseDefinition, B as BaseGameSessionOfContract, j as BaseGameStateOfContract, k as BoardInputCollectorKind, l as BoardInputCollectorMeta, m as BoardInteractionKeyOfDefinition, n as BoardTargetDomainDescriptor, o as BoundedNumberDomainDescriptor, C as CardActionMap, p as CardActionSpec, q as CardInputCollectorMeta, r as CardInputZoneIdsOfDefinition, s as CardInteractionKeyOfDefinition, t as CardTargetDomainDescriptor, u as ChoiceDomainDescriptor, v as ChoiceListDomainDescriptor, w as ClientParamsOf, x as ClientParamsOfInteractionOfDefinition, y as CollectorState, z as ContinuationCallable, D as ContinuationInput, E as ContinuationInputForSource, F as ContinuationKind, G as ContinuationReduceArgs, H as ContinuationSourceKind, I as DefaultedClientParamKeysOfInteractionOfDefinition, L as EagerInputDomainDependencies, M as EffectContinuationCallable, N as EffectContinuationInput, O as EffectContinuationResponse, P as EffectDefinition, Q as EffectIdsOfDefinition, R as EffectMap, S as EffectRegistryOfPhase, T as EffectRollDieDefinition, U as EffectShuffleDefinition, V as EffectShufflePlayerZoneDefinition, W as EmptyViewDefinition, X as GameStateOf, Y as InitialStateCallbacks, Z as InputCollector, _ as InputCollectorKind, $ as InputCollectorMetaForKind, a0 as InputDomainDependencyCase, a1 as InputDomainDescriptor, a2 as InputDomainResolverDescriptor, a3 as InputKeysWithCollectorKindOfDefinition, a4 as InputSelectionDescriptor, a5 as InteractionAvailabilityArgs, a6 as InteractionCommitPolicy, a7 as InteractionIdOfDefinition, a8 as InteractionIdOfDefinitionPhase, a9 as InteractionKind, aa as InteractionMap, ab as InteractionReduceArgs, ac as InteractionReduceInput, ad as InteractionRule, ae as InteractionRuleValidationResult, af as InteractionSpec, ag as InteractionSpecByNameOfDefinitionPhase, ah as InteractionToArgs, ai as InteractionValidateArgs, aj as LazyBoardTargetDomainDescriptor, ak as LazyCardTargetDomainDescriptor, al as LazyInputDomainDependencies, am as MutationRuntimeHelpers, ao as ParamsOf, ap as ParamsOfInteractionOfDefinition, aq as PhaseDefinition, ar as PhaseDefinitionByName, as as PhaseEnterArgs, at as PhaseEnterContext, av as PhaseNamesOfDefinition, aw as PhaseStateMapOfDefinitions, ax as PhaseStateOfDefinitions, ay as PhaseZoneList, az as PlayableInteractionsOfZoneOfDefinition, aA as PlayerPhaseDefinition, aB as PlayerViewDefinition, aC as PromptInputCollectorMeta, aD as PromptInteractionKeyOfDefinition, aE as RandomHelpers, aG as ReducerGameContract, aK as ReducerSessionForConfig, aM as ReducerStateForConfig, aO as ResolvedBoardTargetDomainDescriptor, aP as ResolvedCardTargetDomainDescriptor, aQ as ResolvedGameSessionOf, aR as ResolvedGameStateOf, aS as ResourceMapDomainDescriptor, aT as ResumableEffectKind, aU as RngInputCollectorMeta, aV as RollDieContinuationResponse, aX as RuntimeHelpers, aY as ScopedPhaseState, aZ as SharedViewDefinition, a_ as ShufflePlayerZoneContinuationResponse, a$ as ShuffleSharedZoneContinuationResponse, b0 as SimultaneousPlayerPhaseDefinition, b1 as SimultaneousResolveArgs, b2 as SimultaneousSubmission, b3 as SimultaneousSubmitSpec, b4 as StageMap, b5 as StageNamesOfDefinitionPhase, b6 as StageSpec, b7 as StaticViewDefinition, b8 as StaticViewQueries, b9 as TargetKind, ba as ValidationIssue, bb as ViewDefinitionByName, bd as ViewNamesOfDefinition, be as ViewOfDefinition, bf as ViewsOfDefinition, bg as ZoneIdsOfDefinition } from '../views-D2Cfzr3h.js';
5
5
  import 'zod';
6
6
  import '../types.js';
7
+ import './protocol-CVaSqPgX.js';
7
8
 
8
9
  type ClientParamSchema = {
9
10
  safeParse: (value: unknown) => {
@@ -1,123 +1,28 @@
1
+ import {
2
+ dealToPlayerBoardContainer,
3
+ dealToPlayerZone,
4
+ seedSharedBoardContainer,
5
+ seedSharedBoardSpace,
6
+ shuffle
7
+ } from "../chunk-VWTKGIYF.js";
8
+ import {
9
+ createClientParamSchemasByPhase
10
+ } from "../chunk-TXELBVTG.js";
1
11
  import {
2
12
  FrameworkErrorCodes,
3
13
  applySetupBootstrap,
4
14
  assumeManifestSchema,
5
15
  cloneManifestDefault,
6
- collectReducerDefinitionIndex,
7
16
  createManifestGameStateSchema,
8
17
  createManifestRuntimeSchema,
9
18
  createManifestStringLiteralSchema,
10
19
  isManifestScopedSchema,
20
+ manifestSchemaFamily,
11
21
  markManifestScopedSchema,
12
22
  resolveManifestPlayerIds
13
- } from "../chunk-B2YBS3SG.js";
23
+ } from "../chunk-FL67RDID.js";
24
+ import "../chunk-2GQIALJL.js";
14
25
  import "../chunk-PZ5AY32C.js";
15
-
16
- // src/reducer/client-param-schemas.ts
17
- import { z } from "zod";
18
- function schemaForCollectors(collectors) {
19
- const shape = {};
20
- for (const [key, collector] of Object.entries(collectors)) {
21
- if (collector.kind === "rng") continue;
22
- const schema = collector.schema;
23
- shape[key] = "defaultValue" in collector ? schema.default(collector.defaultValue) : schema;
24
- }
25
- return z.object(shape);
26
- }
27
- function createClientParamSchemasByPhase(definition) {
28
- const index = collectReducerDefinitionIndex(definition);
29
- const out = {};
30
- for (const phaseIndex of index.phasesByName.values()) {
31
- const phaseSchemas = {};
32
- for (const [id, interaction] of phaseIndex.interactions) {
33
- phaseSchemas[id] = interaction.paramsSchema ?? schemaForCollectors(interaction.inputs);
34
- }
35
- out[String(phaseIndex.phaseName)] = phaseSchemas;
36
- }
37
- return out;
38
- }
39
-
40
- // src/reducer/setup-bootstrap-helpers.ts
41
- function shuffle(container) {
42
- return {
43
- type: "shuffle",
44
- container
45
- };
46
- }
47
- function dealToPlayerZone({
48
- from,
49
- zoneId,
50
- count,
51
- playerIds
52
- }) {
53
- return {
54
- type: "deal",
55
- from,
56
- to: {
57
- type: "playerZone",
58
- zoneId
59
- },
60
- count,
61
- playerIds
62
- };
63
- }
64
- function dealToPlayerBoardContainer({
65
- from,
66
- boardId,
67
- containerId,
68
- count,
69
- playerIds
70
- }) {
71
- return {
72
- type: "deal",
73
- from,
74
- to: {
75
- type: "playerBoardContainer",
76
- boardId,
77
- containerId
78
- },
79
- count,
80
- playerIds
81
- };
82
- }
83
- function seedSharedBoardContainer({
84
- from,
85
- boardId,
86
- containerId,
87
- count,
88
- componentIds
89
- }) {
90
- return {
91
- type: "move",
92
- from,
93
- to: {
94
- type: "sharedBoardContainer",
95
- boardId,
96
- containerId
97
- },
98
- count,
99
- componentIds
100
- };
101
- }
102
- function seedSharedBoardSpace({
103
- from,
104
- boardId,
105
- spaceId,
106
- count,
107
- componentIds
108
- }) {
109
- return {
110
- type: "move",
111
- from,
112
- to: {
113
- type: "sharedBoardSpace",
114
- boardId,
115
- spaceId
116
- },
117
- count,
118
- componentIds
119
- };
120
- }
121
26
  export {
122
27
  FrameworkErrorCodes,
123
28
  applySetupBootstrap,
@@ -130,6 +35,7 @@ export {
130
35
  dealToPlayerBoardContainer,
131
36
  dealToPlayerZone,
132
37
  isManifestScopedSchema,
38
+ manifestSchemaFamily,
133
39
  markManifestScopedSchema,
134
40
  resolveManifestPlayerIds,
135
41
  seedSharedBoardContainer,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/reducer/client-param-schemas.ts","../../src/reducer/setup-bootstrap-helpers.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { collectReducerDefinitionIndex } from \"./definition-index\";\nimport type {\n InputCollector,\n PhaseMapOf,\n ReducerGameContractLike,\n ReducerGameDefinition,\n ViewMapOf,\n} from \"./model\";\n\nexport type ClientParamSchema = {\n safeParse: (value: unknown) =>\n | { success: true; data: Record<string, unknown> }\n | {\n success: false;\n error: { issues: Array<{ path: PropertyKey[]; message: string }> };\n };\n};\n\nexport type ClientParamSchemasByPhase = Readonly<\n Record<string, Readonly<Record<string, ClientParamSchema>>>\n>;\n\nfunction schemaForCollectors(\n collectors: Record<string, InputCollector>,\n): ClientParamSchema {\n const shape: Record<string, z.ZodTypeAny> = {};\n for (const [key, collector] of Object.entries(collectors)) {\n if (collector.kind === \"rng\") continue;\n const schema = collector.schema as z.ZodTypeAny;\n shape[key] =\n \"defaultValue\" in collector\n ? schema.default(collector.defaultValue)\n : schema;\n }\n return z.object(shape) as unknown as ClientParamSchema;\n}\n\nexport function createClientParamSchemasByPhase<\n Contract extends ReducerGameContractLike,\n Definitions extends PhaseMapOf<Contract>,\n Views extends ViewMapOf<Contract>,\n>(\n definition: ReducerGameDefinition<Contract, Definitions, Views>,\n): ClientParamSchemasByPhase {\n const index = collectReducerDefinitionIndex(definition);\n const out: Record<string, Record<string, ClientParamSchema>> = {};\n for (const phaseIndex of index.phasesByName.values()) {\n const phaseSchemas: Record<string, ClientParamSchema> = {};\n for (const [id, interaction] of phaseIndex.interactions) {\n phaseSchemas[id] =\n interaction.paramsSchema ?? schemaForCollectors(interaction.inputs);\n }\n out[String(phaseIndex.phaseName)] = phaseSchemas;\n }\n return out;\n}\n","import type {\n CardIdOfManifest,\n DieIdOfManifest,\n GeneratedManifestContractLike,\n PieceIdOfManifest,\n PlayerIdOfManifest,\n SetupBootstrapContainerRef,\n SetupBootstrapPerPlayerContainerTemplateRef,\n SetupBootstrapStep,\n SetupBootstrapDestinationRef,\n} from \"./model\";\n\nexport function shuffle<\n Manifest extends GeneratedManifestContractLike =\n GeneratedManifestContractLike,\n>(\n container: SetupBootstrapContainerRef<Manifest>,\n): SetupBootstrapStep<Manifest> {\n return {\n type: \"shuffle\",\n container,\n };\n}\n\nexport function dealToPlayerZone<\n Manifest extends GeneratedManifestContractLike =\n GeneratedManifestContractLike,\n>({\n from,\n zoneId,\n count,\n playerIds,\n}: {\n from: Extract<\n SetupBootstrapContainerRef<Manifest>,\n { type: \"sharedZone\" | \"sharedBoardContainer\" }\n >;\n zoneId: Extract<\n SetupBootstrapPerPlayerContainerTemplateRef<Manifest>,\n { type: \"playerZone\" }\n >[\"zoneId\"];\n count: number;\n playerIds?: readonly PlayerIdOfManifest<Manifest>[];\n}): SetupBootstrapStep<Manifest> {\n return {\n type: \"deal\",\n from,\n to: {\n type: \"playerZone\",\n zoneId,\n } as SetupBootstrapPerPlayerContainerTemplateRef<Manifest>,\n count,\n playerIds,\n };\n}\n\nexport function dealToPlayerBoardContainer<\n Manifest extends GeneratedManifestContractLike =\n GeneratedManifestContractLike,\n>({\n from,\n boardId,\n containerId,\n count,\n playerIds,\n}: {\n from: Extract<\n SetupBootstrapContainerRef<Manifest>,\n { type: \"sharedZone\" | \"sharedBoardContainer\" }\n >;\n boardId: Extract<\n SetupBootstrapPerPlayerContainerTemplateRef<Manifest>,\n { type: \"playerBoardContainer\" }\n >[\"boardId\"];\n containerId: Extract<\n SetupBootstrapPerPlayerContainerTemplateRef<Manifest>,\n { type: \"playerBoardContainer\" }\n >[\"containerId\"];\n count: number;\n playerIds?: readonly PlayerIdOfManifest<Manifest>[];\n}): SetupBootstrapStep<Manifest> {\n return {\n type: \"deal\",\n from,\n to: {\n type: \"playerBoardContainer\",\n boardId,\n containerId,\n } as SetupBootstrapPerPlayerContainerTemplateRef<Manifest>,\n count,\n playerIds,\n };\n}\n\nexport function seedSharedBoardContainer<\n Manifest extends GeneratedManifestContractLike =\n GeneratedManifestContractLike,\n>({\n from,\n boardId,\n containerId,\n count,\n componentIds,\n}: {\n from: SetupBootstrapContainerRef<Manifest>;\n boardId: Extract<\n SetupBootstrapDestinationRef<Manifest>,\n { type: \"sharedBoardContainer\" }\n >[\"boardId\"];\n containerId: Extract<\n SetupBootstrapDestinationRef<Manifest>,\n { type: \"sharedBoardContainer\" }\n >[\"containerId\"];\n count?: number;\n componentIds?: readonly (\n | CardIdOfManifest<Manifest>\n | PieceIdOfManifest<Manifest>\n | DieIdOfManifest<Manifest>\n )[];\n}): SetupBootstrapStep<Manifest> {\n return {\n type: \"move\",\n from,\n to: {\n type: \"sharedBoardContainer\",\n boardId,\n containerId,\n } as SetupBootstrapDestinationRef<Manifest>,\n count,\n componentIds,\n };\n}\n\nexport function seedSharedBoardSpace<\n Manifest extends GeneratedManifestContractLike =\n GeneratedManifestContractLike,\n>({\n from,\n boardId,\n spaceId,\n count,\n componentIds,\n}: {\n from: SetupBootstrapContainerRef<Manifest>;\n boardId: Extract<\n SetupBootstrapDestinationRef<Manifest>,\n { type: \"sharedBoardSpace\" }\n >[\"boardId\"];\n spaceId: Extract<\n SetupBootstrapDestinationRef<Manifest>,\n { type: \"sharedBoardSpace\" }\n >[\"spaceId\"];\n count?: number;\n componentIds?: readonly (\n | CardIdOfManifest<Manifest>\n | PieceIdOfManifest<Manifest>\n | DieIdOfManifest<Manifest>\n )[];\n}): SetupBootstrapStep<Manifest> {\n return {\n type: \"move\",\n from,\n to: {\n type: \"sharedBoardSpace\",\n boardId,\n spaceId,\n } as SetupBootstrapDestinationRef<Manifest>,\n count,\n componentIds,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAS,SAAS;AAuBlB,SAAS,oBACP,YACmB;AACnB,QAAM,QAAsC,CAAC;AAC7C,aAAW,CAAC,KAAK,SAAS,KAAK,OAAO,QAAQ,UAAU,GAAG;AACzD,QAAI,UAAU,SAAS,MAAO;AAC9B,UAAM,SAAS,UAAU;AACzB,UAAM,GAAG,IACP,kBAAkB,YACd,OAAO,QAAQ,UAAU,YAAY,IACrC;AAAA,EACR;AACA,SAAO,EAAE,OAAO,KAAK;AACvB;AAEO,SAAS,gCAKd,YAC2B;AAC3B,QAAM,QAAQ,8BAA8B,UAAU;AACtD,QAAM,MAAyD,CAAC;AAChE,aAAW,cAAc,MAAM,aAAa,OAAO,GAAG;AACpD,UAAM,eAAkD,CAAC;AACzD,eAAW,CAAC,IAAI,WAAW,KAAK,WAAW,cAAc;AACvD,mBAAa,EAAE,IACb,YAAY,gBAAgB,oBAAoB,YAAY,MAAM;AAAA,IACtE;AACA,QAAI,OAAO,WAAW,SAAS,CAAC,IAAI;AAAA,EACtC;AACA,SAAO;AACT;;;AC5CO,SAAS,QAId,WAC8B;AAC9B,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,EACF;AACF;AAEO,SAAS,iBAGd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAWiC;AAC/B,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,IACA,IAAI;AAAA,MACF,MAAM;AAAA,MACN;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEO,SAAS,2BAGd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAeiC;AAC/B,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,IACA,IAAI;AAAA,MACF,MAAM;AAAA,MACN;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEO,SAAS,yBAGd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAgBiC;AAC/B,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,IACA,IAAI;AAAA,MACF,MAAM;AAAA,MACN;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEO,SAAS,qBAGd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAgBiC;AAC/B,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,IACA,IAAI;AAAA,MACF,MAAM;AAAA,MACN;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,3 +1,3 @@
1
- export { M as MaybePromise, R as REDUCER_CONTRACT_VERSION, a as ReducerBundleContract, w as ReducerWire, z as ReducerWireZod } from './index.d-C0PKOVbh.js';
1
+ export { M as MaybePromise, R as REDUCER_CONTRACT_VERSION, a as ReducerBundleContract, w as ReducerWire, z as ReducerWireZod, b as assertReducerBundleContract } from './index.d-Bw8AOcgp.js';
2
2
  export { materializeManifestTable } from './codegen.js';
3
3
  import 'zod';
@@ -1,14 +1,16 @@
1
- import {
2
- materializeManifestTable
3
- } from "./chunk-2TAKLJJD.js";
4
1
  import {
5
2
  REDUCER_CONTRACT_VERSION,
3
+ assertReducerBundleContract,
6
4
  zod_exports
7
- } from "./chunk-3BLN5POZ.js";
5
+ } from "./chunk-2GQIALJL.js";
6
+ import {
7
+ materializeManifestTable
8
+ } from "./chunk-HIH6Y4FA.js";
8
9
  import "./chunk-PZ5AY32C.js";
9
10
  export {
10
11
  REDUCER_CONTRACT_VERSION,
11
12
  zod_exports as ReducerWireZod,
13
+ assertReducerBundleContract,
12
14
  materializeManifestTable
13
15
  };
14
16
  //# sourceMappingURL=reducer-contract.js.map