@dreamboard-games/sdk 0.4.0-alpha.7 → 0.4.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.
Files changed (112) hide show
  1. package/REFERENCE.md +1292 -287
  2. package/dist/authoring/index.d.ts +4 -9
  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 +12 -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 +46 -0
  10. package/dist/authoring-materialize-cli.js.map +1 -0
  11. package/dist/browser-interaction.d.ts +1 -1
  12. package/dist/{chunk-TGMXBRKY.js → chunk-3PFDHTR7.js} +19 -7
  13. package/dist/chunk-3PFDHTR7.js.map +1 -0
  14. package/dist/chunk-45P5CEGH.js +176 -0
  15. package/dist/chunk-45P5CEGH.js.map +1 -0
  16. package/dist/chunk-5XTAQ4EQ.js +32 -0
  17. package/dist/chunk-5XTAQ4EQ.js.map +1 -0
  18. package/dist/chunk-7ADPYKFT.js +532 -0
  19. package/dist/chunk-7ADPYKFT.js.map +1 -0
  20. package/dist/{chunk-RKGJ64UN.js → chunk-BUOODBVO.js} +2 -2
  21. package/dist/{chunk-VLG4YST5.js → chunk-GMOBG7Y7.js} +4 -4
  22. package/dist/{chunk-Q322XCY2.js → chunk-JRGP6W4V.js} +3 -3
  23. package/dist/chunk-L3W2FPRQ.js +1793 -0
  24. package/dist/chunk-L3W2FPRQ.js.map +1 -0
  25. package/dist/{chunk-3QIZKXJ2.js → chunk-NGYFBNBP.js} +3 -3
  26. package/dist/chunk-P6IJ5YVY.js +154 -0
  27. package/dist/chunk-P6IJ5YVY.js.map +1 -0
  28. package/dist/{chunk-5IHU5CUK.js → chunk-QQNL4WTX.js} +25 -22
  29. package/dist/chunk-QQNL4WTX.js.map +1 -0
  30. package/dist/{chunk-52DH7VQF.js → chunk-SACZWUA6.js} +143 -47
  31. package/dist/chunk-SACZWUA6.js.map +1 -0
  32. package/dist/{chunk-KYEWGZ2Y.js → chunk-SFOAY5H4.js} +2 -2
  33. package/dist/{chunk-KYEWGZ2Y.js.map → chunk-SFOAY5H4.js.map} +1 -1
  34. package/dist/chunk-UNVCT5Z7.js +73 -0
  35. package/dist/chunk-UNVCT5Z7.js.map +1 -0
  36. package/dist/{chunk-NO537WSS.js → chunk-WDR7SKBM.js} +2 -2
  37. package/dist/chunk-XDGRC6OR.js +7039 -0
  38. package/dist/chunk-XDGRC6OR.js.map +1 -0
  39. package/dist/chunk-XLHLFTLI.js +399 -0
  40. package/dist/chunk-XLHLFTLI.js.map +1 -0
  41. package/dist/{chunk-B2YBS3SG.js → chunk-YNW3KBDE.js} +41 -13
  42. package/dist/chunk-YNW3KBDE.js.map +1 -0
  43. package/dist/codegen.js +1 -1
  44. package/dist/{components-BTwSIjXj.d.ts → components-BPzsSRs8.d.ts} +1 -1
  45. package/dist/definitions-0kjPV9wh.d.ts +294 -0
  46. package/dist/{diagnostics-1BWjRo6-.d.ts → diagnostics-DIi3ina7.d.ts} +2 -1
  47. package/dist/{index-CFTjJIXd.d.ts → index-CWzWpQzM.d.ts} +1 -1
  48. package/dist/{index.d-DMASeF6M.d.ts → index.d-C7Ztirg6.d.ts} +234 -5
  49. package/dist/index.js +2 -2
  50. package/dist/package-set.d.ts +2 -2
  51. package/dist/package-set.js +2 -2
  52. package/dist/{protocol-835hEGne.d.ts → protocol-B2LWcqB4.d.ts} +14 -0
  53. package/dist/reducer/advanced.d.ts +4 -4
  54. package/dist/reducer/advanced.js +7 -26
  55. package/dist/reducer/advanced.js.map +1 -1
  56. package/dist/reducer-contract.d.ts +1 -1
  57. package/dist/reducer-contract.js +2 -2
  58. package/dist/reducer.d.ts +37 -28
  59. package/dist/reducer.js +43 -6018
  60. package/dist/reducer.js.map +1 -1
  61. package/dist/reference-game-compiler.d.ts +45 -0
  62. package/dist/reference-game-compiler.js +25 -0
  63. package/dist/reference-game-compiler.js.map +1 -0
  64. package/dist/reference-game-source-manifest-cli.d.ts +1 -0
  65. package/dist/reference-game-source-manifest-cli.js +84 -0
  66. package/dist/reference-game-source-manifest-cli.js.map +1 -0
  67. package/dist/reference-games/index.d.ts +7 -217
  68. package/dist/reference-games/index.js +28 -208
  69. package/dist/reference-games/index.js.map +1 -1
  70. package/dist/runtime/primitives.d.ts +3 -3
  71. package/dist/runtime/primitives.js +3 -3
  72. package/dist/runtime/runtime-api.d.ts +1 -1
  73. package/dist/runtime/workspace-contract.d.ts +4 -4
  74. package/dist/runtime/workspace-contract.js +4 -4
  75. package/dist/{runtime-Dkfm1x2r.d.ts → runtime-B_w9AO2n.d.ts} +60 -5
  76. package/dist/{runtime-api-C6aWo9c0.d.ts → runtime-api-xCWLMQRT.d.ts} +2 -0
  77. package/dist/runtime.d.ts +7 -7
  78. package/dist/runtime.js +13 -13
  79. package/dist/schema-9jZzlEWZ.d.ts +220 -0
  80. package/dist/{stale-contract-artifact-error-C5AaZPJ8.d.ts → stale-contract-artifact-error-XLaweZtF.d.ts} +1 -1
  81. package/dist/testing-compiler.d.ts +36 -0
  82. package/dist/testing-compiler.js +236 -0
  83. package/dist/testing-compiler.js.map +1 -0
  84. package/dist/testing-runtime.d.ts +97 -21
  85. package/dist/testing-runtime.js +154 -95
  86. package/dist/testing-runtime.js.map +1 -1
  87. package/dist/testing.d.ts +178 -60
  88. package/dist/testing.js +641 -26
  89. package/dist/testing.js.map +1 -1
  90. package/dist/types-Bvptkukh.d.ts +122 -0
  91. package/dist/{types-aI4V9CWe.d.ts → types-_zfC_7CD.d.ts} +1 -1
  92. package/dist/types.d.ts +4 -0
  93. package/dist/ui/components.d.ts +2 -2
  94. package/dist/ui/plugin-styles.css +1 -1
  95. package/dist/{ui-contract-Ue6SywvO.d.ts → ui-contract-CUC7Lyoc.d.ts} +1 -1
  96. package/dist/ui.d.ts +3 -3
  97. package/dist/{views-32rSsfeU.d.ts → views-DE2eZxPz.d.ts} +42 -13
  98. package/package.json +22 -3
  99. package/dist/chunk-3OZMHZK3.js +0 -40
  100. package/dist/chunk-3OZMHZK3.js.map +0 -1
  101. package/dist/chunk-52DH7VQF.js.map +0 -1
  102. package/dist/chunk-5IHU5CUK.js.map +0 -1
  103. package/dist/chunk-B2YBS3SG.js.map +0 -1
  104. package/dist/chunk-IU6KGPY7.js +0 -659
  105. package/dist/chunk-IU6KGPY7.js.map +0 -1
  106. package/dist/chunk-TGMXBRKY.js.map +0 -1
  107. package/dist/types-DcADVHe9.d.ts +0 -192
  108. /package/dist/{chunk-RKGJ64UN.js.map → chunk-BUOODBVO.js.map} +0 -0
  109. /package/dist/{chunk-VLG4YST5.js.map → chunk-GMOBG7Y7.js.map} +0 -0
  110. /package/dist/{chunk-Q322XCY2.js.map → chunk-JRGP6W4V.js.map} +0 -0
  111. /package/dist/{chunk-3QIZKXJ2.js.map → chunk-NGYFBNBP.js.map} +0 -0
  112. /package/dist/{chunk-NO537WSS.js.map → chunk-WDR7SKBM.js.map} +0 -0
package/REFERENCE.md CHANGED
@@ -47,7 +47,7 @@ _No JSDoc summary is available yet._
47
47
 
48
48
  ```ts
49
49
  const DREAMBOARD_SDK_PACKAGES: {
50
- readonly "@dreamboard-games/sdk": "0.4.0-alpha.7";
50
+ readonly "@dreamboard-games/sdk": "0.4.0-alpha.9";
51
51
  };
52
52
  ```
53
53
 
@@ -56,7 +56,7 @@ _No JSDoc summary is available yet._
56
56
  ### DREAMBOARD_SDK_VERSION
57
57
 
58
58
  ```ts
59
- const DREAMBOARD_SDK_VERSION: "0.4.0-alpha.7";
59
+ const DREAMBOARD_SDK_VERSION: "0.4.0-alpha.9";
60
60
  ```
61
61
 
62
62
  _No JSDoc summary is available yet._
@@ -95,7 +95,7 @@ _No JSDoc summary is available yet._
95
95
 
96
96
  ```ts
97
97
  const DREAMBOARD_SDK_PACKAGES: {
98
- readonly "@dreamboard-games/sdk": "0.4.0-alpha.7";
98
+ readonly "@dreamboard-games/sdk": "0.4.0-alpha.9";
99
99
  };
100
100
  ```
101
101
 
@@ -104,7 +104,7 @@ _No JSDoc summary is available yet._
104
104
  ### DREAMBOARD_SDK_VERSION
105
105
 
106
106
  ```ts
107
- const DREAMBOARD_SDK_VERSION: "0.4.0-alpha.7";
107
+ const DREAMBOARD_SDK_VERSION: "0.4.0-alpha.9";
108
108
  ```
109
109
 
110
110
  _No JSDoc summary is available yet._
@@ -141,10 +141,21 @@ function canonicalizeReferenceGameSourcePayload(
141
141
 
142
142
  _No JSDoc summary is available yet._
143
143
 
144
- ### computeReferenceGameSourceDigest
144
+ ### compareReferenceGameCanonicalStrings
145
145
 
146
146
  ```ts
147
- function computeReferenceGameSourceDigest(
147
+ function compareReferenceGameCanonicalStrings(
148
+ left: string,
149
+ right: string,
150
+ ): number;
151
+ ```
152
+
153
+ Locale-independent UTF-16 code-unit order, equivalent to Java String.compareTo.
154
+
155
+ ### computeReferenceGameSourceFingerprint
156
+
157
+ ```ts
158
+ function computeReferenceGameSourceFingerprint(
148
159
  payload: ReferenceGameSourceManifestPayload,
149
160
  ): `sha256:${string}`;
150
161
  ```
@@ -188,7 +199,7 @@ _No JSDoc summary is available yet._
188
199
  ### REFERENCE_GAME_SOURCE_MANIFEST_SCHEMA_VERSION
189
200
 
190
201
  ```ts
191
- const REFERENCE_GAME_SOURCE_MANIFEST_SCHEMA_VERSION = 2;
202
+ const REFERENCE_GAME_SOURCE_MANIFEST_SCHEMA_VERSION = 3;
192
203
  ```
193
204
 
194
205
  _No JSDoc summary is available yet._
@@ -318,6 +329,32 @@ declare const referenceGameSourceEntrySchema: z.ZodObject<
318
329
 
319
330
  _No JSDoc summary is available yet._
320
331
 
332
+ ### ReferenceGameSourceInventoryPolicy
333
+
334
+ ```ts
335
+ type ReferenceGameSourceInventoryPolicy = z.infer<
336
+ typeof referenceGameSourceInventoryPolicySchema
337
+ >;
338
+ ```
339
+
340
+ _No JSDoc summary is available yet._
341
+
342
+ ### referenceGameSourceInventoryPolicySchema
343
+
344
+ ```ts
345
+ const referenceGameSourceInventoryPolicySchema: z.ZodObject<
346
+ {
347
+ schemaVersion: z.ZodLiteral<1>;
348
+ workspaceOwnershipVersion: z.ZodNumber;
349
+ excludedGameRelativePaths: z.ZodArray<z.ZodString>;
350
+ excludedGameRelativePrefixes: z.ZodArray<z.ZodString>;
351
+ },
352
+ z.core.$strict
353
+ >;
354
+ ```
355
+
356
+ _No JSDoc summary is available yet._
357
+
321
358
  ### ReferenceGameSourceManifest
322
359
 
323
360
  ```ts
@@ -2592,13 +2629,23 @@ function defineEffect(...args: never[]): unknown;
2592
2629
 
2593
2630
  _No JSDoc summary is available yet._
2594
2631
 
2632
+ ### defineEmptyView
2633
+
2634
+ ```ts
2635
+ function defineEmptyView<
2636
+ Contract extends AnyReducerGameContract,
2637
+ >(): EmptyViewDefinition<ContractState<Contract>, ContractManifest<Contract>>;
2638
+ ```
2639
+
2640
+ _No JSDoc summary is available yet._
2641
+
2595
2642
  ### defineGame
2596
2643
 
2597
2644
  ```ts
2598
2645
  function defineGame<
2599
2646
  const Contract extends AnyReducerGameContract,
2600
2647
  Definitions extends PhaseMapOf<Contract>,
2601
- Views extends ViewMapOf<Contract> = Record<string, never>,
2648
+ Views extends ViewMapOf<Contract>,
2602
2649
  >(
2603
2650
  definition: { contract: Contract } & Omit<
2604
2651
  ReducerGameDefinition<NoInfer<Contract>, Definitions, Views>,
@@ -2670,6 +2717,49 @@ function definePhaseStage<
2670
2717
 
2671
2718
  _No JSDoc summary is available yet._
2672
2719
 
2720
+ ### definePlayerView
2721
+
2722
+ ```ts
2723
+ function definePlayerView<Contract extends AnyReducerGameContract>(): <
2724
+ SharedProjection = unknown,
2725
+ Projection = unknown,
2726
+ >(
2727
+ definition: PlayerViewDefinition<
2728
+ ContractState<Contract>,
2729
+ ContractManifest<Contract>,
2730
+ SharedProjection,
2731
+ Projection
2732
+ >,
2733
+ ) => PlayerViewDefinition<
2734
+ ContractState<Contract>,
2735
+ ContractManifest<Contract>,
2736
+ SharedProjection,
2737
+ Projection
2738
+ >;
2739
+ ```
2740
+
2741
+ _No JSDoc summary is available yet._
2742
+
2743
+ ### defineSharedView
2744
+
2745
+ ```ts
2746
+ function defineSharedView<Contract extends AnyReducerGameContract>(): <
2747
+ Projection,
2748
+ >(
2749
+ definition: SharedViewDefinition<
2750
+ ContractState<Contract>,
2751
+ ContractManifest<Contract>,
2752
+ Projection
2753
+ >,
2754
+ ) => SharedViewDefinition<
2755
+ ContractState<Contract>,
2756
+ ContractManifest<Contract>,
2757
+ Projection
2758
+ >;
2759
+ ```
2760
+
2761
+ _No JSDoc summary is available yet._
2762
+
2673
2763
  ### defineStage
2674
2764
 
2675
2765
  ```ts
@@ -2693,7 +2783,7 @@ function defineStaticView<Contract extends AnyReducerGameContract>(): <
2693
2783
  ) => StaticViewDefinition<ExactManifestContractOf<Contract>, Projection>;
2694
2784
  ```
2695
2785
 
2696
- Factory for the session-scoped static view (see {@link StaticViewDefinition}). Kept separate from {@link defineView} because the argument shape is structurally different: it exposes only the manifest and generated static queries, with no `state`, `playerId`, `runtime`, `fx`, `ops`, or `accept/reject`. That shape is what prevents authors from accidentally projecting per-tick state into the once-per-session payload.
2786
+ Factory for the session-scoped static view (see {@link StaticViewDefinition}). Kept separate from dynamic view helpers because the argument shape is structurally different: it exposes only the manifest and generated static queries, with no `state`, `playerId`, `runtime`, `fx`, `ops`, or `accept/reject`. That shape is what prevents authors from accidentally projecting per-tick state into the once-per-session payload.
2697
2787
 
2698
2788
  ### defineStepPhase
2699
2789
 
@@ -2703,24 +2793,6 @@ function defineStepPhase(...args: never[]): unknown;
2703
2793
 
2704
2794
  _No JSDoc summary is available yet._
2705
2795
 
2706
- ### defineView
2707
-
2708
- ```ts
2709
- function defineView<Contract extends AnyReducerGameContract>(): <Projection>(
2710
- definition: ViewDefinition<
2711
- ContractState<Contract>,
2712
- ContractManifest<Contract>,
2713
- Projection
2714
- >,
2715
- ) => ViewDefinition<
2716
- ContractState<Contract>,
2717
- ContractManifest<Contract>,
2718
- Projection
2719
- >;
2720
- ```
2721
-
2722
- _No JSDoc summary is available yet._
2723
-
2724
2796
  ### DependencyValues
2725
2797
 
2726
2798
  ```ts
@@ -2776,8 +2848,9 @@ type DispatchTraceSummaryEntry =
2776
2848
  }
2777
2849
  | {
2778
2850
  kind: "rngConsumption";
2851
+ version: 2;
2779
2852
  operation: string;
2780
- traceEntry: string;
2853
+ drawIndex: number;
2781
2854
  };
2782
2855
  ```
2783
2856
 
@@ -2810,6 +2883,7 @@ const FrameworkErrorCodes: {
2810
2883
  readonly NOT_YOUR_TURN: "NOT_YOUR_TURN";
2811
2884
  readonly WRONG_PHASE: "WRONG_PHASE";
2812
2885
  readonly WRONG_STEP: "WRONG_STEP";
2886
+ readonly NO_LEGAL_INPUT: "NO_LEGAL_INPUT";
2813
2887
  readonly INVALID_PARAMS: "INVALID_PARAMS";
2814
2888
  readonly UNKNOWN_INTERACTION: "UNKNOWN_INTERACTION";
2815
2889
  readonly INTERNAL_ERROR: "INTERNAL_ERROR";
@@ -3409,6 +3483,23 @@ type ReducerPhaseDefinition<
3409
3483
 
3410
3484
  _No JSDoc summary is available yet._
3411
3485
 
3486
+ ### ReducerPlayerViewDefinition
3487
+
3488
+ ```ts
3489
+ type ReducerPlayerViewDefinition<
3490
+ Contract extends AnyReducerGameContract,
3491
+ SharedProjection = unknown,
3492
+ Projection = unknown,
3493
+ > = PlayerViewDefinition<
3494
+ ContractState<Contract>,
3495
+ ContractManifest<Contract>,
3496
+ SharedProjection,
3497
+ Projection
3498
+ >;
3499
+ ```
3500
+
3501
+ _No JSDoc summary is available yet._
3502
+
3412
3503
  ### ReducerReject
3413
3504
 
3414
3505
  ```ts
@@ -3429,6 +3520,21 @@ type ReducerResult<State> = ReducerAccept<State> | ReducerReject;
3429
3520
 
3430
3521
  _No JSDoc summary is available yet._
3431
3522
 
3523
+ ### ReducerSharedViewDefinition
3524
+
3525
+ ```ts
3526
+ type ReducerSharedViewDefinition<
3527
+ Contract extends AnyReducerGameContract,
3528
+ Projection = unknown,
3529
+ > = SharedViewDefinition<
3530
+ ContractState<Contract>,
3531
+ ContractManifest<Contract>,
3532
+ Projection
3533
+ >;
3534
+ ```
3535
+
3536
+ _No JSDoc summary is available yet._
3537
+
3432
3538
  ### ReducerStateBase
3433
3539
 
3434
3540
  ```ts
@@ -3463,21 +3569,6 @@ type ReducerValidationResult =
3463
3569
 
3464
3570
  _No JSDoc summary is available yet._
3465
3571
 
3466
- ### ReducerViewDefinition
3467
-
3468
- ```ts
3469
- type ReducerViewDefinition<
3470
- Contract extends AnyReducerGameContract,
3471
- Projection = unknown,
3472
- > = ViewDefinition<
3473
- ContractState<Contract>,
3474
- ContractManifest<Contract>,
3475
- Projection
3476
- >;
3477
- ```
3478
-
3479
- _No JSDoc summary is available yet._
3480
-
3481
3572
  ### rngInput
3482
3573
 
3483
3574
  ```ts
@@ -3592,7 +3683,7 @@ _No JSDoc summary is available yet._
3592
3683
  ### StaleContractArtifactKind
3593
3684
 
3594
3685
  ```ts
3595
- type StaleContractArtifactKind = "base-states" | "session-state";
3686
+ type StaleContractArtifactKind = "session-state";
3596
3687
  ```
3597
3688
 
3598
3689
  _No JSDoc summary is available yet._
@@ -3876,7 +3967,8 @@ _No JSDoc summary is available yet._
3876
3967
  ### assumeManifestSchema
3877
3968
 
3878
3969
  ```ts
3879
- function assumeManifestSchema<Output>(schema: z.ZodTypeAny): z.ZodType<Output>;
3970
+ assumeManifestSchema<Output, Family extends ManifestIdFamily | undefined>(schema: ManifestIdSchema<unknown, Family>): ManifestIdSchema<Output, Family>;
3971
+ assumeManifestSchema<Output>(schema: z.ZodTypeAny): z.ZodType<Output>;
3880
3972
  ```
3881
3973
 
3882
3974
  _No JSDoc summary is available yet._
@@ -4354,13 +4446,15 @@ _No JSDoc summary is available yet._
4354
4446
 
4355
4447
  ```ts
4356
4448
  type ClientParamsOf<Collectors extends Record<string, InputCollector>> = {
4357
- [K in keyof Collectors as K extends EngineSampledCollectorKeys<Collectors>
4358
- ? never
4359
- : K]: Collectors[K] extends InputCollector<infer S>
4360
- ? S extends SchemaLike<infer V>
4361
- ? V
4362
- : never
4363
- : never;
4449
+ [K in Exclude<
4450
+ ClientCollectorKeys<Collectors>,
4451
+ OptionalClientCollectorKeys<Collectors>
4452
+ >]: ClientCollectorValue<Collectors[K]>;
4453
+ } & {
4454
+ [K in OptionalClientCollectorKeys<Collectors>]?: Exclude<
4455
+ ClientCollectorValue<Collectors[K]>,
4456
+ undefined
4457
+ >;
4364
4458
  };
4365
4459
  ```
4366
4460
 
@@ -4600,9 +4694,16 @@ _No JSDoc summary is available yet._
4600
4694
  ### createManifestStringLiteralSchema
4601
4695
 
4602
4696
  ```ts
4603
- function createManifestStringLiteralSchema<Values extends readonly string[]>(
4697
+ function createManifestStringLiteralSchema<
4698
+ Values extends readonly string[],
4699
+ const Family extends ManifestIdFamily | undefined = undefined,
4700
+ >(
4604
4701
  values: Values,
4605
- ): ManifestIdSchema<Values[number] extends never ? string : Values[number]>;
4702
+ family?: Family,
4703
+ ): ManifestIdSchema<
4704
+ Values[number] extends never ? string : Values[number],
4705
+ Family
4706
+ >;
4606
4707
  ```
4607
4708
 
4608
4709
  _No JSDoc summary is available yet._
@@ -4879,6 +4980,23 @@ type EffectTypeTag = "rollDie" | "shuffleSharedZone" | "shufflePlayerZone";
4879
4980
 
4880
4981
  Marker tag attached by `defineEffect` to every effect spec. `fx.effect` uses `type` to dispatch to the right wire-effect builder.
4881
4982
 
4983
+ ### EmptyViewDefinition
4984
+
4985
+ ```ts
4986
+ type EmptyViewDefinition<
4987
+ State extends {
4988
+ table: RuntimeTableRecord;
4989
+ flow: {
4990
+ currentPhase: string;
4991
+ };
4992
+ },
4993
+ Manifest extends ManifestContract<TableOfState<State>>,
4994
+ > = SharedViewDefinition<State, Manifest, Record<string, never>> &
4995
+ PlayerViewDefinition<State, Manifest, unknown, Record<string, never>>;
4996
+ ```
4997
+
4998
+ _No JSDoc summary is available yet._
4999
+
4882
5000
  ### ErrorCodeOfContract
4883
5001
 
4884
5002
  ```ts
@@ -4929,6 +5047,7 @@ const FrameworkErrorCodes: {
4929
5047
  readonly NOT_YOUR_TURN: "NOT_YOUR_TURN";
4930
5048
  readonly WRONG_PHASE: "WRONG_PHASE";
4931
5049
  readonly WRONG_STEP: "WRONG_STEP";
5050
+ readonly NO_LEGAL_INPUT: "NO_LEGAL_INPUT";
4932
5051
  readonly INVALID_PARAMS: "INVALID_PARAMS";
4933
5052
  readonly UNKNOWN_INTERACTION: "UNKNOWN_INTERACTION";
4934
5053
  readonly INTERNAL_ERROR: "INTERNAL_ERROR";
@@ -5691,6 +5810,20 @@ type ManifestDefaults = ...;
5691
5810
 
5692
5811
  _No JSDoc summary is available yet._
5693
5812
 
5813
+ ### ManifestIdFamily
5814
+
5815
+ ```ts
5816
+ type ManifestIdFamily = keyof ManifestIds<
5817
+ string,
5818
+ string,
5819
+ string,
5820
+ string,
5821
+ string
5822
+ >;
5823
+ ```
5824
+
5825
+ _No JSDoc summary is available yet._
5826
+
5694
5827
  ### ManifestIds
5695
5828
 
5696
5829
  ```ts
@@ -5702,8 +5835,11 @@ _No JSDoc summary is available yet._
5702
5835
  ### ManifestIdSchema
5703
5836
 
5704
5837
  ```ts
5705
- type ManifestIdSchema<Output = unknown> = z.ZodType<Output> & {
5706
- readonly [manifestIdSchemaBrand]: true;
5838
+ type ManifestIdSchema<
5839
+ Output = unknown,
5840
+ Family extends ManifestIdFamily | undefined = ManifestIdFamily | undefined,
5841
+ > = z.ZodType<Output> & {
5842
+ readonly [manifestIdSchemaBrand]: Family;
5707
5843
  };
5708
5844
  ```
5709
5845
 
@@ -5717,6 +5853,20 @@ type ManifestLiterals = ...;
5717
5853
 
5718
5854
  _No JSDoc summary is available yet._
5719
5855
 
5856
+ ### ManifestNormalSetup
5857
+
5858
+ ```ts
5859
+ type ManifestNormalSetup<Table extends RuntimeTableRecord> = {
5860
+ readonly minPlayers: number;
5861
+ readonly maxPlayers: number;
5862
+ readonly createInitialTable: (options: {
5863
+ readonly playerIds: readonly string[];
5864
+ }) => Table;
5865
+ };
5866
+ ```
5867
+
5868
+ _No JSDoc summary is available yet._
5869
+
5720
5870
  ### ManifestOf
5721
5871
 
5722
5872
  ```ts
@@ -5733,12 +5883,24 @@ type ManifestOf<Source> = Source extends {
5733
5883
 
5734
5884
  _No JSDoc summary is available yet._
5735
5885
 
5886
+ ### manifestSchemaFamily
5887
+
5888
+ ```ts
5889
+ function manifestSchemaFamily(schema: unknown): ManifestIdFamily | undefined;
5890
+ ```
5891
+
5892
+ _No JSDoc summary is available yet._
5893
+
5736
5894
  ### markManifestScopedSchema
5737
5895
 
5738
5896
  ```ts
5739
- function markManifestScopedSchema<Schema extends z.ZodTypeAny>(
5897
+ function markManifestScopedSchema<
5898
+ Schema extends z.ZodTypeAny,
5899
+ const Family extends ManifestIdFamily | undefined = undefined,
5900
+ >(
5740
5901
  schema: Schema,
5741
- ): Schema & ManifestIdSchema<z.infer<Schema>>;
5902
+ family?: Family,
5903
+ ): Schema & ManifestIdSchema<z.infer<Schema>, Family>;
5742
5904
  ```
5743
5905
 
5744
5906
  _No JSDoc summary is available yet._
@@ -6126,6 +6288,14 @@ type PlayerPhaseDefinition = ...;
6126
6288
 
6127
6289
  _No JSDoc summary is available yet._
6128
6290
 
6291
+ ### PlayerViewDefinition
6292
+
6293
+ ```ts
6294
+ type PlayerViewDefinition = ...;
6295
+ ```
6296
+
6297
+ _No JSDoc summary is available yet._
6298
+
6129
6299
  ### PlayerZoneIdOfManifest
6130
6300
 
6131
6301
  ```ts
@@ -6253,6 +6423,7 @@ _No JSDoc summary is available yet._
6253
6423
 
6254
6424
  ```ts
6255
6425
  type RandomHelpers = {
6426
+ integer(options: { minInclusive: number; maxInclusive: number }): number;
6256
6427
  subset<const Values extends readonly unknown[]>(options: {
6257
6428
  from: Values;
6258
6429
  count: number;
@@ -7078,6 +7249,38 @@ type RuntimeResourceMap = PerPlayer<RuntimeRecord>;
7078
7249
 
7079
7250
  _No JSDoc summary is available yet._
7080
7251
 
7252
+ ### RuntimeRngDraw
7253
+
7254
+ ```ts
7255
+ type RuntimeRngDraw = {
7256
+ index: number;
7257
+ cursorBefore: number;
7258
+ cursorAfter: number;
7259
+ operation: RuntimeRngOperation;
7260
+ };
7261
+ ```
7262
+
7263
+ Public, persisted identity for one deterministic RNG cursor advance.
7264
+
7265
+ ### RuntimeRngOperation
7266
+
7267
+ ```ts
7268
+ type RuntimeRngOperation = {
7269
+ kind: string;
7270
+ parameters: Record<string, RuntimeRngOperationParameter>;
7271
+ };
7272
+ ```
7273
+
7274
+ _No JSDoc summary is available yet._
7275
+
7276
+ ### RuntimeRngOperationParameter
7277
+
7278
+ ```ts
7279
+ type RuntimeRngOperationParameter = string | number | boolean;
7280
+ ```
7281
+
7282
+ _No JSDoc summary is available yet._
7283
+
7081
7284
  ### RuntimeRngState
7082
7285
 
7083
7286
  ```ts
@@ -7085,6 +7288,7 @@ type RuntimeRngState = {
7085
7288
  seed?: number | null;
7086
7289
  cursor: number;
7087
7290
  trace: string[];
7291
+ draws: RuntimeRngDraw[];
7088
7292
  };
7089
7293
  ```
7090
7294
 
@@ -7626,6 +7830,30 @@ type SetupSelectionOfManifest<Manifest> = {
7626
7830
 
7627
7831
  _No JSDoc summary is available yet._
7628
7832
 
7833
+ ### SharedViewDefinition
7834
+
7835
+ ```ts
7836
+ type SharedViewDefinition<
7837
+ State extends {
7838
+ table: RuntimeTableRecord;
7839
+ flow: {
7840
+ currentPhase: string;
7841
+ };
7842
+ },
7843
+ Manifest extends ManifestContract<TableOfState<State>>,
7844
+ Projection = unknown,
7845
+ > = {
7846
+ project: (
7847
+ args: ActionContext<State, Manifest> &
7848
+ RuntimeHelpers<State> & {
7849
+ state: State;
7850
+ },
7851
+ ) => Projection;
7852
+ };
7853
+ ```
7854
+
7855
+ _No JSDoc summary is available yet._
7856
+
7629
7857
  ### SharedZoneIdOfManifest
7630
7858
 
7631
7859
  ```ts
@@ -8412,14 +8640,6 @@ type VertexTypeIdOfManifest<Manifest> = Manifest extends {
8412
8640
 
8413
8641
  _No JSDoc summary is available yet._
8414
8642
 
8415
- ### ViewDefinition
8416
-
8417
- ```ts
8418
- type ViewDefinition = ...;
8419
- ```
8420
-
8421
- _No JSDoc summary is available yet._
8422
-
8423
8643
  ### ViewDefinitionByName
8424
8644
 
8425
8645
  ```ts
@@ -8434,14 +8654,23 @@ _No JSDoc summary is available yet._
8434
8654
  ### ViewMapOf
8435
8655
 
8436
8656
  ```ts
8437
- type ViewMapOf<Contract> = Record<
8438
- string,
8439
- ViewDefinition<
8657
+ type ViewMapOf<
8658
+ Contract,
8659
+ SharedProjection = unknown,
8660
+ PlayerProjection = unknown,
8661
+ > = {
8662
+ shared: SharedViewDefinition<
8440
8663
  BaseGameStateOfContract<Contract>,
8441
8664
  ManifestContractOf<Contract>,
8442
- unknown
8443
- >
8444
- >;
8665
+ SharedProjection
8666
+ >;
8667
+ player: PlayerViewDefinition<
8668
+ BaseGameStateOfContract<Contract>,
8669
+ ManifestContractOf<Contract>,
8670
+ SharedProjection,
8671
+ PlayerProjection
8672
+ >;
8673
+ };
8445
8674
  ```
8446
8675
 
8447
8676
  _No JSDoc summary is available yet._
@@ -8477,9 +8706,9 @@ _No JSDoc summary is available yet._
8477
8706
 
8478
8707
  ```ts
8479
8708
  type ViewsOfDefinition<Definition> = Definition extends {
8480
- views?: infer Views;
8709
+ views: infer Views;
8481
8710
  }
8482
- ? NonNullable<Views>
8711
+ ? Views
8483
8712
  : never;
8484
8713
  ```
8485
8714
 
@@ -20234,10 +20463,7 @@ _No JSDoc summary is available yet._
20234
20463
  ### GENERATED_WORKSPACE_PATHS
20235
20464
 
20236
20465
  ```ts
20237
- const GENERATED_WORKSPACE_PATHS: readonly [
20238
- ...string[],
20239
- "test/generated/base-state.json",
20240
- ];
20466
+ const GENERATED_WORKSPACE_PATHS: readonly string[];
20241
20467
  ```
20242
20468
 
20243
20469
  _No JSDoc summary is available yet._
@@ -20247,7 +20473,7 @@ _No JSDoc summary is available yet._
20247
20473
  ```ts
20248
20474
  type GeneratedArtifactV1 = {
20249
20475
  path: string;
20250
- ownership: "authoritative" | "seed" | "derived-test";
20476
+ ownership: "authoritative" | "seed";
20251
20477
  content: string;
20252
20478
  contentSha256: string;
20253
20479
  };
@@ -20279,26 +20505,6 @@ type GeneratedPathPatternV1 = {
20279
20505
 
20280
20506
  _No JSDoc summary is available yet._
20281
20507
 
20282
- ### generateTestArtifacts
20283
-
20284
- ```ts
20285
- function generateTestArtifacts(
20286
- input: GenerateTestArtifactsInputV1,
20287
- ): readonly GeneratedArtifactV1[];
20288
- ```
20289
-
20290
- _No JSDoc summary is available yet._
20291
-
20292
- ### GenerateTestArtifactsInputV1
20293
-
20294
- ```ts
20295
- type GenerateTestArtifactsInputV1 = {
20296
- manifest: GameTopologyManifest;
20297
- };
20298
- ```
20299
-
20300
- _No JSDoc summary is available yet._
20301
-
20302
20508
  ### generateWorkspaceArtifacts
20303
20509
 
20304
20510
  ```ts
@@ -20374,7 +20580,7 @@ _No JSDoc summary is available yet._
20374
20580
  ### REDUCER_CONTRACT_VERSION
20375
20581
 
20376
20582
  ```ts
20377
- const REDUCER_CONTRACT_VERSION: "0.3.0";
20583
+ const REDUCER_CONTRACT_VERSION: "0.4.0";
20378
20584
  ```
20379
20585
 
20380
20586
  The wire-protocol version this package implements. Bumped in lockstep with any breaking change to schema/reducer-runtime.schema.json. At bundle load time hosts refuse bundles whose major version differs.
@@ -20413,6 +20619,17 @@ function activate(options: ReplayStepOptions): UIScenarioReplayStep;
20413
20619
 
20414
20620
  _No JSDoc summary is available yet._
20415
20621
 
20622
+ ### ActorRef
20623
+
20624
+ ```ts
20625
+ type ActorRef = {
20626
+ readonly seat: number;
20627
+ readonly playerId: string;
20628
+ };
20629
+ ```
20630
+
20631
+ _No JSDoc summary is available yet._
20632
+
20416
20633
  ### assertDeterministicUIScenarioFixture
20417
20634
 
20418
20635
  ```ts
@@ -20424,81 +20641,65 @@ function assertDeterministicUIScenarioFixture(
20424
20641
 
20425
20642
  _No JSDoc summary is available yet._
20426
20643
 
20427
- ### assertStep
20644
+ ### assertScenario
20428
20645
 
20429
20646
  ```ts
20430
- function assertStep(
20431
- stepId: string,
20432
- expect: UIStepExpectation,
20433
- ): UIScenarioReplayStep;
20647
+ function assertScenario<Game>(
20648
+ options: AssertScenarioOptions<Game>,
20649
+ ): Promise<void>;
20434
20650
  ```
20435
20651
 
20436
20652
  _No JSDoc summary is available yet._
20437
20653
 
20438
- ### assertSupportedBrowserInteractionProtocol
20654
+ ### AssertScenarioOptions
20439
20655
 
20440
20656
  ```ts
20441
- function assertSupportedBrowserInteractionProtocol(version: string): void;
20657
+ type AssertScenarioOptions<Game> = {
20658
+ readonly replay: ScenarioReplay<Game>;
20659
+ readonly assertion: ScenarioDefinition<Game>["then"];
20660
+ };
20442
20661
  ```
20443
20662
 
20444
20663
  _No JSDoc summary is available yet._
20445
20664
 
20446
- ### assertUIStepExpectationSatisfied
20665
+ ### assertStep
20447
20666
 
20448
20667
  ```ts
20449
- function assertUIStepExpectationSatisfied(
20668
+ function assertStep(
20450
20669
  stepId: string,
20451
- expected: UIStepExpectation,
20452
- actual: UIStepExpectation,
20453
- ): void;
20670
+ expect: UIStepExpectation,
20671
+ ): UIScenarioReplayStep;
20454
20672
  ```
20455
20673
 
20456
20674
  _No JSDoc summary is available yet._
20457
20675
 
20458
- ### assertUniqueReplayIdentity
20676
+ ### assertSupportedBrowserInteractionProtocol
20459
20677
 
20460
20678
  ```ts
20461
- function assertUniqueReplayIdentity(
20462
- step: Pick<PortableSemanticReplayStep, "stepId" | "expectedIdentity">,
20463
- candidates: readonly UIReplayIdentityCandidate[],
20464
- ): UIReplayIdentityCandidate;
20679
+ function assertSupportedBrowserInteractionProtocol(version: string): void;
20465
20680
  ```
20466
20681
 
20467
20682
  _No JSDoc summary is available yet._
20468
20683
 
20469
- ### BaseContext
20684
+ ### assertUIStepExpectationSatisfied
20470
20685
 
20471
20686
  ```ts
20472
- interface BaseContext<PlayerId extends string = string> {
20473
- game: {
20474
- start(): Promise<void>;
20475
- patchState?(
20476
- mutator: (state: Record<string, unknown>) => void,
20477
- ): Promise<void>;
20478
- submit(
20479
- playerId: PlayerId,
20480
- interactionId: string,
20481
- params?: unknown,
20482
- ): Promise<void>;
20483
- };
20484
- players(): readonly PlayerId[];
20485
- seat(index: number): PlayerId;
20486
- }
20687
+ function assertUIStepExpectationSatisfied(
20688
+ stepId: string,
20689
+ expected: UIStepExpectation,
20690
+ actual: UIStepExpectation,
20691
+ ): void;
20487
20692
  ```
20488
20693
 
20489
20694
  _No JSDoc summary is available yet._
20490
20695
 
20491
- ### BaseDefinition
20696
+ ### assertUniqueReplayIdentity
20492
20697
 
20493
20698
  ```ts
20494
- interface BaseDefinition {
20495
- id: string;
20496
- seed?: number;
20497
- players?: number;
20498
- setupProfileId?: string | null;
20499
- extends?: string;
20500
- setup: (ctx: BaseContext) => void | Promise<void>;
20501
- }
20699
+ function assertUniqueReplayIdentity(
20700
+ step: Pick<PortableSemanticReplayStep, "stepId" | "expectedIdentity">,
20701
+ candidates: readonly UIReplayIdentityCandidate[],
20702
+ ): UIReplayIdentityCandidate;
20502
20703
  ```
20503
20704
 
20504
20705
  _No JSDoc summary is available yet._
@@ -20587,14 +20788,6 @@ function createDeterministicIdFactory(seed: string): DeterministicIdFactory;
20587
20788
 
20588
20789
  _No JSDoc summary is available yet._
20589
20790
 
20590
- ### CreatedTestRuntime
20591
-
20592
- ```ts
20593
- type CreatedTestRuntime = ...;
20594
- ```
20595
-
20596
- _No JSDoc summary is available yet._
20597
-
20598
20791
  ### createExpectApi
20599
20792
 
20600
20793
  ```ts
@@ -20654,32 +20847,12 @@ interface CreateReducerScenarioRunnerOptions {
20654
20847
 
20655
20848
  _No JSDoc summary is available yet._
20656
20849
 
20657
- ### createTestRuntime
20658
-
20659
- ```ts
20660
- function createTestRuntime(
20661
- options: CreateTestRuntimeOptions,
20662
- ): CreatedTestRuntime;
20663
- ```
20664
-
20665
- _No JSDoc summary is available yet._
20666
-
20667
- ### CreateTestRuntimeOptions
20850
+ ### createScenarioAuthoring
20668
20851
 
20669
20852
  ```ts
20670
- type CreateTestRuntimeOptions = {
20671
- baseId: string;
20672
- baseStates: Record<string, BaseStateArtifact>;
20673
- bundle: ReducerBundleLike;
20674
- phase?: string;
20675
- playerIds?: readonly string[];
20676
- sessionId?: string;
20677
- userId?: string | null;
20678
- gameId?: string;
20679
- displayNameByPlayerId?: Record<string, string>;
20680
- contractFingerprint?: string;
20681
- expectedBaseStateFingerprint?: string;
20682
- };
20853
+ function createScenarioAuthoring<const Game extends ScenarioDefinitionGameLike>(
20854
+ game: Game,
20855
+ ): ScenarioAuthoring<Game>;
20683
20856
  ```
20684
20857
 
20685
20858
  _No JSDoc summary is available yet._
@@ -20707,30 +20880,6 @@ const defaultFixtureEnvironmentInit: FixtureEnvironmentInit;
20707
20880
 
20708
20881
  _No JSDoc summary is available yet._
20709
20882
 
20710
- ### defineBase
20711
-
20712
- ```ts
20713
- function defineBase<const Definition extends BaseDefinition>(
20714
- definition: Definition,
20715
- ): Definition;
20716
- ```
20717
-
20718
- _No JSDoc summary is available yet._
20719
-
20720
- ### defineScenario
20721
-
20722
- ```ts
20723
- function defineScenario<
20724
- const Runners extends readonly TestRunner[] = readonly ["reducer"],
20725
- const PhaseName extends string = string,
20726
- const StageName extends string = string,
20727
- >(
20728
- definition: ScenarioDefinition<Runners, PhaseName, StageName>,
20729
- ): ScenarioDefinition<Runners, PhaseName, StageName>;
20730
- ```
20731
-
20732
- _No JSDoc summary is available yet._
20733
-
20734
20883
  ### defineUIScenario
20735
20884
 
20736
20885
  ```ts
@@ -20822,6 +20971,57 @@ type ExpectMatchers = ...;
20822
20971
 
20823
20972
  _No JSDoc summary is available yet._
20824
20973
 
20974
+ ### exploreScenario
20975
+
20976
+ ```ts
20977
+ function exploreScenario<const Game extends ScenarioDefinitionGameLike>(
20978
+ options: ExploreScenarioOptions<Game>,
20979
+ ): Promise<ExploreScenarioResult>;
20980
+ ```
20981
+
20982
+ _No JSDoc summary is available yet._
20983
+
20984
+ ### ExploreScenarioOptions
20985
+
20986
+ ```ts
20987
+ type ExploreScenarioOptions<Game extends ScenarioDefinitionGameLike> = Omit<
20988
+ InspectScenarioOptions<Game>,
20989
+ "seed"
20990
+ > & {
20991
+ readonly seed?: number;
20992
+ readonly seedRange?: SeedRange;
20993
+ readonly limit?: number;
20994
+ readonly maxEvaluations?: number;
20995
+ readonly cursor?: string;
20996
+ };
20997
+ ```
20998
+
20999
+ _No JSDoc summary is available yet._
21000
+
21001
+ ### ExploreScenarioResult
21002
+
21003
+ ```ts
21004
+ type ExploreScenarioResult = ExploreTransitionResult | ExploreSeedResult;
21005
+ ```
21006
+
21007
+ _No JSDoc summary is available yet._
21008
+
21009
+ ### ExploreSeedResult
21010
+
21011
+ ```ts
21012
+ type ExploreSeedResult = ...;
21013
+ ```
21014
+
21015
+ _No JSDoc summary is available yet._
21016
+
21017
+ ### ExploreTransitionResult
21018
+
21019
+ ```ts
21020
+ type ExploreTransitionResult = ...;
21021
+ ```
21022
+
21023
+ _No JSDoc summary is available yet._
21024
+
20825
21025
  ### fill
20826
21026
 
20827
21027
  ```ts
@@ -20911,6 +21111,113 @@ function FixturePluginRuntime({
20911
21111
 
20912
21112
  _No JSDoc summary is available yet._
20913
21113
 
21114
+ ### FlowDiagnostic
21115
+
21116
+ ```ts
21117
+ type FlowDiagnostic = ...;
21118
+ ```
21119
+
21120
+ _No JSDoc summary is available yet._
21121
+
21122
+ ### InspectAction
21123
+
21124
+ ```ts
21125
+ type InspectAction = {
21126
+ readonly actor: ActorRef;
21127
+ readonly interactionId: string;
21128
+ readonly inputs: readonly InspectInteractionInput[];
21129
+ readonly explanation: InteractionExplanationLike;
21130
+ readonly hasConcreteCommand: true;
21131
+ };
21132
+ ```
21133
+
21134
+ _No JSDoc summary is available yet._
21135
+
21136
+ ### InspectEntropy
21137
+
21138
+ ```ts
21139
+ type InspectEntropy = {
21140
+ readonly seed: number;
21141
+ readonly draws: readonly {
21142
+ readonly index: number;
21143
+ readonly cursorBefore: number;
21144
+ readonly cursorAfter: number;
21145
+ readonly operation: {
21146
+ readonly kind: string;
21147
+ readonly parameters: Readonly<Record<string, string | number | boolean>>;
21148
+ };
21149
+ }[];
21150
+ };
21151
+ ```
21152
+
21153
+ _No JSDoc summary is available yet._
21154
+
21155
+ ### InspectInteraction
21156
+
21157
+ ```ts
21158
+ type InspectInteraction = ...;
21159
+ ```
21160
+
21161
+ _No JSDoc summary is available yet._
21162
+
21163
+ ### InspectInteractionInput
21164
+
21165
+ ```ts
21166
+ type InspectInteractionInput = {
21167
+ readonly key: string;
21168
+ readonly kind: string;
21169
+ readonly eligibleCount: number | "lazy";
21170
+ };
21171
+ ```
21172
+
21173
+ _No JSDoc summary is available yet._
21174
+
21175
+ ### InspectNode
21176
+
21177
+ ```ts
21178
+ type InspectNode = ...;
21179
+ ```
21180
+
21181
+ _No JSDoc summary is available yet._
21182
+
21183
+ ### inspectScenario
21184
+
21185
+ ```ts
21186
+ function inspectScenario<const Game extends ScenarioDefinitionGameLike>(
21187
+ options: InspectScenarioOptions<Game>,
21188
+ ): Promise<InspectScenarioResult>;
21189
+ ```
21190
+
21191
+ _No JSDoc summary is available yet._
21192
+
21193
+ ### InspectScenarioOptions
21194
+
21195
+ ```ts
21196
+ type InspectScenarioOptions<Game extends ScenarioDefinitionGameLike> = {
21197
+ readonly game: Game;
21198
+ readonly scenario: ScenarioReplayDefinition<Game>;
21199
+ readonly identity: ScenarioIdentity;
21200
+ readonly perspective: PerspectiveSelector;
21201
+ readonly at?: ScenarioCheckpoint;
21202
+ readonly seed?: number;
21203
+ };
21204
+ ```
21205
+
21206
+ _No JSDoc summary is available yet._
21207
+
21208
+ ### InspectScenarioResult
21209
+
21210
+ ```ts
21211
+ type InspectScenarioResult = {
21212
+ readonly schemaVersion: 1;
21213
+ readonly scenario: ScenarioIdentity;
21214
+ readonly node: InspectNode;
21215
+ readonly seedSource: "scenario" | "override";
21216
+ };
21217
+ ```
21218
+
21219
+ _No JSDoc summary is available yet._
21220
+
20914
21221
  ### InteractionAvailabilityLike
20915
21222
 
20916
21223
  ```ts
@@ -20930,6 +21237,7 @@ type InteractionAvailabilityLike =
20930
21237
  | {
20931
21238
  status: "blocked";
20932
21239
  reason: string;
21240
+ code?: string;
20933
21241
  };
20934
21242
  ```
20935
21243
 
@@ -21003,6 +21311,36 @@ function parseUIScenarioFixtureBundleIndex(
21003
21311
 
21004
21312
  _No JSDoc summary is available yet._
21005
21313
 
21314
+ ### PerspectiveRef
21315
+
21316
+ ```ts
21317
+ type PerspectiveRef =
21318
+ | {
21319
+ readonly kind: "player";
21320
+ readonly actor: ActorRef;
21321
+ }
21322
+ | {
21323
+ readonly kind: "spectator";
21324
+ };
21325
+ ```
21326
+
21327
+ _No JSDoc summary is available yet._
21328
+
21329
+ ### PerspectiveSelector
21330
+
21331
+ ```ts
21332
+ type PerspectiveSelector =
21333
+ | {
21334
+ readonly kind: "player";
21335
+ readonly seat: number;
21336
+ }
21337
+ | {
21338
+ readonly kind: "spectator";
21339
+ };
21340
+ ```
21341
+
21342
+ _No JSDoc summary is available yet._
21343
+
21006
21344
  ### PluginProtocolTape
21007
21345
 
21008
21346
  ```ts
@@ -21049,6 +21387,17 @@ function press(options: ReplayStepOptions): UIScenarioReplayStep;
21049
21387
 
21050
21388
  _No JSDoc summary is available yet._
21051
21389
 
21390
+ ### probeScenarioCommand
21391
+
21392
+ ```ts
21393
+ function probeScenarioCommand<Game>(options: {
21394
+ readonly replay: ScenarioReplay<Game>;
21395
+ readonly command: ScenarioCommandOf<Game>;
21396
+ }): Promise<ScenarioProbeResult<Game>>;
21397
+ ```
21398
+
21399
+ _No JSDoc summary is available yet._
21400
+
21052
21401
  ### ProtocolUIScenarioAuthority
21053
21402
 
21054
21403
  ```ts
@@ -21060,139 +21409,483 @@ interface ProtocolUIScenarioAuthority {
21060
21409
 
21061
21410
  _No JSDoc summary is available yet._
21062
21411
 
21063
- ### ReducerScenarioBundle
21412
+ ### ReducerScenarioBundle
21413
+
21414
+ ```ts
21415
+ type ReducerScenarioBundle = Pick<
21416
+ ReducerBundleContract,
21417
+ "projectSeatsDynamic" | "validateInput" | "dispatch" | "projectStatic"
21418
+ >;
21419
+ ```
21420
+
21421
+ _No JSDoc summary is available yet._
21422
+
21423
+ ### ReducerScenarioDiagnostic
21424
+
21425
+ ```ts
21426
+ interface ReducerScenarioDiagnostic {
21427
+ readonly code: string;
21428
+ readonly message: string;
21429
+ }
21430
+ ```
21431
+
21432
+ _No JSDoc summary is available yet._
21433
+
21434
+ ### ReducerScenarioExchange
21435
+
21436
+ ```ts
21437
+ type ReducerScenarioExchange = ...;
21438
+ ```
21439
+
21440
+ _No JSDoc summary is available yet._
21441
+
21442
+ ### ReducerScenarioFrame
21443
+
21444
+ ```ts
21445
+ interface ReducerScenarioFrame {
21446
+ readonly id: string;
21447
+ readonly reducerState: wire.ReducerSessionState;
21448
+ readonly dynamicProjection: wire.SeatProjectionBundle;
21449
+ readonly staticProjection?: wire.BoardStaticProjection | null;
21450
+ readonly gameVersion: number;
21451
+ readonly actionSetVersion: string;
21452
+ readonly projectionDigest: string;
21453
+ }
21454
+ ```
21455
+
21456
+ _No JSDoc summary is available yet._
21457
+
21458
+ ### ReducerScenarioOperation
21459
+
21460
+ ```ts
21461
+ type ReducerScenarioOperation =
21462
+ | {
21463
+ readonly id: string;
21464
+ readonly operation: "validate";
21465
+ readonly input: wire.GameInput;
21466
+ }
21467
+ | {
21468
+ readonly id: string;
21469
+ readonly operation: "submit";
21470
+ readonly input: wire.GameInput;
21471
+ };
21472
+ ```
21473
+
21474
+ _No JSDoc summary is available yet._
21475
+
21476
+ ### ReducerScenarioRunner
21477
+
21478
+ ```ts
21479
+ interface ReducerScenarioRunner {
21480
+ run(
21481
+ operations: readonly ReducerScenarioOperation[],
21482
+ ): Promise<ReducerScenarioTrace>;
21483
+ }
21484
+ ```
21485
+
21486
+ _No JSDoc summary is available yet._
21487
+
21488
+ ### ReducerScenarioTrace
21489
+
21490
+ ```ts
21491
+ interface ReducerScenarioTrace {
21492
+ readonly scenarioId: string;
21493
+ readonly gameId: string;
21494
+ readonly viewer: ReducerScenarioViewer;
21495
+ readonly frames: readonly ReducerScenarioFrame[];
21496
+ readonly exchanges: readonly ReducerScenarioExchange[];
21497
+ }
21498
+ ```
21499
+
21500
+ _No JSDoc summary is available yet._
21501
+
21502
+ ### ReducerScenarioViewer
21503
+
21504
+ ```ts
21505
+ interface ReducerScenarioViewer {
21506
+ readonly seatId: string;
21507
+ readonly playerId: string;
21508
+ }
21509
+ ```
21510
+
21511
+ _No JSDoc summary is available yet._
21512
+
21513
+ ### ReducerUIScenarioAuthority
21514
+
21515
+ ```ts
21516
+ interface ReducerUIScenarioAuthority {
21517
+ readonly kind: "reducer";
21518
+ readonly referenceGame: unknown;
21519
+ readonly coverage: unknown;
21520
+ readonly bundle: unknown;
21521
+ readonly initialState: unknown;
21522
+ readonly viewer: unknown;
21523
+ readonly playerIds?: readonly string[];
21524
+ readonly operations: readonly unknown[];
21525
+ }
21526
+ ```
21527
+
21528
+ _No JSDoc summary is available yet._
21529
+
21530
+ ### RejectionExpectation
21531
+
21532
+ ```ts
21533
+ type RejectionExpectation = {
21534
+ errorCode?: string;
21535
+ message?: string | RegExp;
21536
+ };
21537
+ ```
21538
+
21539
+ _No JSDoc summary is available yet._
21540
+
21541
+ ### replayScenario
21542
+
21543
+ ```ts
21544
+ function replayScenario<const Game extends ScenarioDefinitionGameLike>(
21545
+ options: ReplayScenarioOptions<Game>,
21546
+ ): Promise<ScenarioReplay<Game>>;
21547
+ ```
21548
+
21549
+ _No JSDoc summary is available yet._
21550
+
21551
+ ### ReplayScenarioOptions
21552
+
21553
+ ```ts
21554
+ type ReplayScenarioOptions<Game> = {
21555
+ readonly game: Game;
21556
+ readonly scenario: ScenarioReplayDefinition<Game>;
21557
+ readonly at?: ScenarioCheckpoint;
21558
+ };
21559
+ ```
21560
+
21561
+ _No JSDoc summary is available yet._
21562
+
21563
+ ### RuntimeParamsOfScenarioCommand
21564
+
21565
+ ```ts
21566
+ type RuntimeParamsOfScenarioCommand<
21567
+ Game,
21568
+ Phase extends PhaseNamesOfDefinition<Game>,
21569
+ InteractionId extends InteractionIdOfDefinitionPhase<Game, Phase>,
21570
+ > = ClientParamsOfInteractionOfDefinition<Game, Phase, InteractionId>;
21571
+ ```
21572
+
21573
+ Production params remain available for runtime implementors and diagnostics.
21574
+
21575
+ ### ScenarioActor
21576
+
21577
+ ```ts
21578
+ type ScenarioActor = ScenarioSeatRef;
21579
+ ```
21580
+
21581
+ _No JSDoc summary is available yet._
21582
+
21583
+ ### ScenarioAssertionContext
21584
+
21585
+ ```ts
21586
+ type ScenarioAssertionContext = ...;
21587
+ ```
21588
+
21589
+ _No JSDoc summary is available yet._
21590
+
21591
+ ### ScenarioAssertionError
21592
+
21593
+ ```ts
21594
+ class ScenarioAssertionError(message: string): ScenarioAssertionError;
21595
+ ```
21596
+
21597
+ A failed SDK matcher or probe expectation authored in `scenario.then`.
21598
+
21599
+ ### ScenarioAuthoring
21600
+
21601
+ ```ts
21602
+ type ScenarioAuthoring<Game> = {
21603
+ defineScenario<const Definition extends ScenarioDefinition<Game>>(
21604
+ definition: Definition &
21605
+ NoExtraScenarioFields<Definition, ScenarioDefinition<Game>>,
21606
+ ): Definition;
21607
+ };
21608
+ ```
21609
+
21610
+ _No JSDoc summary is available yet._
21611
+
21612
+ ### ScenarioCheckpoint
21613
+
21614
+ ```ts
21615
+ type ScenarioCheckpoint =
21616
+ | {
21617
+ readonly segment: "setup";
21618
+ readonly completed: 0;
21619
+ }
21620
+ | {
21621
+ readonly segment: "given";
21622
+ readonly completed: number;
21623
+ }
21624
+ | {
21625
+ readonly segment: "when";
21626
+ readonly completed: number;
21627
+ };
21628
+ ```
21629
+
21630
+ _No JSDoc summary is available yet._
21631
+
21632
+ ### ScenarioCommand
21633
+
21634
+ ```ts
21635
+ type ScenarioCommand<
21636
+ InteractionId extends string = string,
21637
+ Params = Record<string, unknown>,
21638
+ > = {
21639
+ readonly actor: ScenarioActor;
21640
+ readonly interactionId: InteractionId;
21641
+ readonly params: Params;
21642
+ };
21643
+ ```
21644
+
21645
+ _No JSDoc summary is available yet._
21646
+
21647
+ ### ScenarioCommandOf
21648
+
21649
+ ```ts
21650
+ type ScenarioCommandOf<Game> = {
21651
+ [Phase in PhaseNamesOfDefinition<Game>]: ScenarioCommandForPhase<Game, Phase>;
21652
+ }[PhaseNamesOfDefinition<Game>];
21653
+ ```
21654
+
21655
+ _No JSDoc summary is available yet._
21656
+
21657
+ ### ScenarioCommandTraceEntry
21658
+
21659
+ ```ts
21660
+ type ScenarioCommandTraceEntry<Game> = {
21661
+ readonly segment: ScenarioReplaySegment;
21662
+ readonly index: number;
21663
+ readonly command: ScenarioCommandOf<Game>;
21664
+ readonly trace: readonly DispatchTraceSummaryEntry[];
21665
+ };
21666
+ ```
21667
+
21668
+ _No JSDoc summary is available yet._
21669
+
21670
+ ### ScenarioDefinition
21671
+
21672
+ ```ts
21673
+ type ScenarioDefinition<Game> = ScenarioReplayDefinition<Game> & {
21674
+ readonly then: (
21675
+ context: ScenarioAssertionContext<Game>,
21676
+ ) => void | Promise<void>;
21677
+ };
21678
+ ```
21679
+
21680
+ _No JSDoc summary is available yet._
21681
+
21682
+ ### ScenarioDefinitionValidationCode
21683
+
21684
+ ```ts
21685
+ type ScenarioDefinitionValidationCode =
21686
+ | "INVALID_TYPE"
21687
+ | "UNKNOWN_FIELD"
21688
+ | "INVALID_VALUE"
21689
+ | "UNSAFE_INTEGER"
21690
+ | "OUT_OF_RANGE"
21691
+ | "UNKNOWN_SETUP_PROFILE"
21692
+ | "UNKNOWN_INTERACTION"
21693
+ | "INVALID_COMMAND_PARAMS"
21694
+ | "NON_SERIALIZABLE"
21695
+ | "NORMAL_SETUP_UNAVAILABLE";
21696
+ ```
21697
+
21698
+ _No JSDoc summary is available yet._
21699
+
21700
+ ### ScenarioDefinitionValidationError
21701
+
21702
+ ```ts
21703
+ class ScenarioDefinitionValidationError(options: { readonly code: ScenarioDefinitionValidationCode; readonly path: string; readonly reason: string; }): ScenarioDefinitionValidationError;
21704
+ ```
21705
+
21706
+ _No JSDoc summary is available yet._
21707
+
21708
+ ### ScenarioDiagnostics
21709
+
21710
+ ```ts
21711
+ type ScenarioDiagnostics = {
21712
+ readonly events: readonly ReducerDiagnosticEvent[];
21713
+ readonly lastDispatch: {
21714
+ readonly submissionId: string;
21715
+ readonly trace: readonly DispatchTraceSummaryEntry[];
21716
+ } | null;
21717
+ readonly flow: ScenarioFlowDiagnostics;
21718
+ };
21719
+ ```
21720
+
21721
+ _No JSDoc summary is available yet._
21722
+
21723
+ ### ScenarioDispatchTraceEntry
21724
+
21725
+ ```ts
21726
+ type ScenarioDispatchTraceEntry =
21727
+ | {
21728
+ readonly kind: "acceptedCommand";
21729
+ readonly actor: ActorRef;
21730
+ readonly interactionId: string;
21731
+ }
21732
+ | {
21733
+ readonly kind: "appliedInstruction";
21734
+ readonly instructionKind: string;
21735
+ }
21736
+ | {
21737
+ readonly kind: "entropyDraw";
21738
+ readonly drawIndex: number;
21739
+ };
21740
+ ```
21741
+
21742
+ _No JSDoc summary is available yet._
21743
+
21744
+ ### ScenarioFlowDiagnostics
21745
+
21746
+ ```ts
21747
+ type ScenarioFlowDiagnostics = {
21748
+ readonly currentPhase: string | null;
21749
+ readonly currentStage: string | null;
21750
+ readonly activeSeats: readonly ScenarioSeatRef[];
21751
+ };
21752
+ ```
21753
+
21754
+ _No JSDoc summary is available yet._
21755
+
21756
+ ### ScenarioIdentity
21757
+
21758
+ ```ts
21759
+ type ScenarioIdentity = {
21760
+ readonly id: string;
21761
+ readonly path: string;
21762
+ readonly sourceDigest: Sha256Digest;
21763
+ };
21764
+ ```
21765
+
21766
+ _No JSDoc summary is available yet._
21767
+
21768
+ ### ScenarioProbeAccepted
21064
21769
 
21065
21770
  ```ts
21066
- type ReducerScenarioBundle = Pick<
21067
- ReducerBundleContract,
21068
- "projectSeatsDynamic" | "validateInput" | "dispatch" | "projectStatic"
21069
- >;
21771
+ type ScenarioProbeAccepted<Game> = {
21772
+ readonly kind: "accepted";
21773
+ readonly command: ScenarioCommandOf<Game>;
21774
+ readonly checkpointDigest: string;
21775
+ readonly trace: readonly DispatchTraceSummaryEntry[];
21776
+ toBeAccepted(): void;
21777
+ toRejectWith(expected: RejectionExpectation): never;
21778
+ };
21070
21779
  ```
21071
21780
 
21072
21781
  _No JSDoc summary is available yet._
21073
21782
 
21074
- ### ReducerScenarioDiagnostic
21783
+ ### ScenarioProbeRejected
21075
21784
 
21076
21785
  ```ts
21077
- interface ReducerScenarioDiagnostic {
21078
- readonly code: string;
21079
- readonly message: string;
21080
- }
21786
+ type ScenarioProbeRejected<Game> = {
21787
+ readonly kind: "rejected";
21788
+ readonly command: ScenarioCommandOf<Game>;
21789
+ readonly errorCode: string;
21790
+ readonly message?: string;
21791
+ readonly trace: readonly DispatchTraceSummaryEntry[];
21792
+ toBeAccepted(): never;
21793
+ toRejectWith(expected: RejectionExpectation): void;
21794
+ };
21081
21795
  ```
21082
21796
 
21083
21797
  _No JSDoc summary is available yet._
21084
21798
 
21085
- ### ReducerScenarioExchange
21799
+ ### ScenarioProbeResult
21086
21800
 
21087
21801
  ```ts
21088
- type ReducerScenarioExchange = ...;
21802
+ type ScenarioProbeResult<Game> =
21803
+ | ScenarioProbeAccepted<Game>
21804
+ | ScenarioProbeRejected<Game>;
21089
21805
  ```
21090
21806
 
21091
21807
  _No JSDoc summary is available yet._
21092
21808
 
21093
- ### ReducerScenarioFrame
21809
+ ### ScenarioReplay
21094
21810
 
21095
21811
  ```ts
21096
- interface ReducerScenarioFrame {
21097
- readonly id: string;
21098
- readonly reducerState: wire.ReducerSessionState;
21099
- readonly dynamicProjection: wire.SeatProjectionBundle;
21100
- readonly staticProjection?: wire.BoardStaticProjection | null;
21101
- readonly gameVersion: number;
21102
- readonly actionSetVersion: string;
21103
- readonly projectionDigest: string;
21104
- }
21812
+ type ScenarioReplay = ...;
21105
21813
  ```
21106
21814
 
21107
21815
  _No JSDoc summary is available yet._
21108
21816
 
21109
- ### ReducerScenarioOperation
21817
+ ### ScenarioReplayDefinition
21110
21818
 
21111
21819
  ```ts
21112
- type ReducerScenarioOperation =
21113
- | {
21114
- readonly id: string;
21115
- readonly operation: "validate";
21116
- readonly input: wire.GameInput;
21117
- }
21118
- | {
21119
- readonly id: string;
21120
- readonly operation: "submit";
21121
- readonly input: wire.GameInput;
21122
- };
21820
+ type ScenarioReplayDefinition<Game> = {
21821
+ readonly id: string;
21822
+ readonly description?: string;
21823
+ readonly setup: ScenarioSetup;
21824
+ readonly given: readonly ScenarioCommandOf<Game>[];
21825
+ readonly when: readonly ScenarioCommandOf<Game>[];
21826
+ };
21123
21827
  ```
21124
21828
 
21125
21829
  _No JSDoc summary is available yet._
21126
21830
 
21127
- ### ReducerScenarioRunner
21831
+ ### ScenarioReplayError
21128
21832
 
21129
21833
  ```ts
21130
- interface ReducerScenarioRunner {
21131
- run(
21132
- operations: readonly ReducerScenarioOperation[],
21133
- ): Promise<ReducerScenarioTrace>;
21134
- }
21834
+ class ScenarioReplayError(options: ScenarioReplayErrorOptions): ScenarioReplayError;
21135
21835
  ```
21136
21836
 
21137
21837
  _No JSDoc summary is available yet._
21138
21838
 
21139
- ### ReducerScenarioTrace
21839
+ ### ScenarioReplayErrorOptions
21140
21840
 
21141
21841
  ```ts
21142
- interface ReducerScenarioTrace {
21842
+ type ScenarioReplayErrorOptions = {
21143
21843
  readonly scenarioId: string;
21144
- readonly gameId: string;
21145
- readonly viewer: ReducerScenarioViewer;
21146
- readonly frames: readonly ReducerScenarioFrame[];
21147
- readonly exchanges: readonly ReducerScenarioExchange[];
21148
- }
21844
+ readonly segment: ScenarioReplaySegment;
21845
+ readonly index: number;
21846
+ readonly interactionId: string;
21847
+ readonly errorCode: string;
21848
+ readonly reducerMessage?: string;
21849
+ readonly trace?: readonly DispatchTraceSummaryEntry[];
21850
+ };
21149
21851
  ```
21150
21852
 
21151
21853
  _No JSDoc summary is available yet._
21152
21854
 
21153
- ### ReducerScenarioViewer
21855
+ ### ScenarioReplaySegment
21154
21856
 
21155
21857
  ```ts
21156
- interface ReducerScenarioViewer {
21157
- readonly seatId: string;
21158
- readonly playerId: string;
21159
- }
21858
+ type ScenarioReplaySegment = "given" | "when";
21160
21859
  ```
21161
21860
 
21162
21861
  _No JSDoc summary is available yet._
21163
21862
 
21164
- ### ReducerUIScenarioAuthority
21863
+ ### ScenarioSchemaOutput
21165
21864
 
21166
21865
  ```ts
21167
- interface ReducerUIScenarioAuthority {
21168
- readonly kind: "reducer";
21169
- readonly referenceGame: unknown;
21170
- readonly coverage: unknown;
21171
- readonly bundle: unknown;
21172
- readonly initialState: unknown;
21173
- readonly viewer: unknown;
21174
- readonly playerIds?: readonly string[];
21175
- readonly operations: readonly unknown[];
21176
- }
21866
+ type ScenarioSchemaOutput = ...;
21177
21867
  ```
21178
21868
 
21179
- _No JSDoc summary is available yet._
21869
+ Authoring projection of an input schema. Only semantic player-id leaves are replaced; ordinary strings retain their original type.
21180
21870
 
21181
- ### RejectionExpectation
21871
+ ### ScenarioSeatRef
21182
21872
 
21183
21873
  ```ts
21184
- type RejectionExpectation = {
21185
- errorCode?: string;
21186
- message?: string | RegExp;
21874
+ type ScenarioSeatRef = {
21875
+ readonly seat: number;
21187
21876
  };
21188
21877
  ```
21189
21878
 
21190
21879
  _No JSDoc summary is available yet._
21191
21880
 
21192
- ### ScenarioDefinition
21881
+ ### ScenarioSetup
21193
21882
 
21194
21883
  ```ts
21195
- interface ScenarioDefinition { ... }
21884
+ type ScenarioSetup = {
21885
+ readonly players: number;
21886
+ readonly seed: number;
21887
+ readonly setupProfileId?: string | null;
21888
+ };
21196
21889
  ```
21197
21890
 
21198
21891
  _No JSDoc summary is available yet._
@@ -21205,10 +21898,10 @@ function serializeUIScenarioFixture(fixture: UIScenarioFixture): string;
21205
21898
 
21206
21899
  _No JSDoc summary is available yet._
21207
21900
 
21208
- ### SharedScenarioContext
21901
+ ### Sha256Digest
21209
21902
 
21210
21903
  ```ts
21211
- interface SharedScenarioContext { ... }
21904
+ type Sha256Digest = `sha256:${string}`;
21212
21905
  ```
21213
21906
 
21214
21907
  _No JSDoc summary is available yet._
@@ -21248,7 +21941,7 @@ _No JSDoc summary is available yet._
21248
21941
  ### StaleContractArtifactKind
21249
21942
 
21250
21943
  ```ts
21251
- type StaleContractArtifactKind = "base-states" | "session-state";
21944
+ type StaleContractArtifactKind = "session-state";
21252
21945
  ```
21253
21946
 
21254
21947
  _No JSDoc summary is available yet._
@@ -21261,13 +21954,15 @@ function submit(options: ReplayStepOptions): UIScenarioReplayStep;
21261
21954
 
21262
21955
  _No JSDoc summary is available yet._
21263
21956
 
21264
- ### TestRunner
21957
+ ### toScenarioReplayDefinition
21265
21958
 
21266
21959
  ```ts
21267
- type TestRunner = "reducer" | "remote" | "browser";
21960
+ function toScenarioReplayDefinition<Game>(
21961
+ definition: ScenarioDefinition<Game>,
21962
+ ): ScenarioReplayDefinition<Game>;
21268
21963
  ```
21269
21964
 
21270
- _No JSDoc summary is available yet._
21965
+ Select and clone the only serializable portion of a loaded scenario.
21271
21966
 
21272
21967
  ### UI_SCENARIO_FIXTURE_BUNDLE_SCHEMA_VERSION
21273
21968
 
@@ -21546,12 +22241,13 @@ _No JSDoc summary is available yet._
21546
22241
 
21547
22242
  ## @dreamboard-games/sdk/testing-runtime
21548
22243
 
21549
- ### CandidateVerificationBase
22244
+ ### CandidateVerificationAssertionDiagnostic
21550
22245
 
21551
22246
  ```ts
21552
- type CandidateVerificationBase =
21553
- | BaseStateArtifact
21554
- | (BaseDefinition & Partial<BaseStateArtifact>);
22247
+ type CandidateVerificationAssertionDiagnostic = {
22248
+ readonly kind: "assertion";
22249
+ readonly message: string;
22250
+ };
21555
22251
  ```
21556
22252
 
21557
22253
  _No JSDoc summary is available yet._
@@ -21559,7 +22255,46 @@ _No JSDoc summary is available yet._
21559
22255
  ### CandidateVerificationInput
21560
22256
 
21561
22257
  ```ts
21562
- type CandidateVerificationInput = ...;
22258
+ type CandidateVerificationInput<Game extends ScenarioDefinitionGameLike> = {
22259
+ /** The authored reducer game definition used by production dispatch. */
22260
+ readonly reducer: Game;
22261
+ readonly scenarios:
22262
+ | Readonly<Record<string, CandidateVerificationScenario<Game>>>
22263
+ | readonly CandidateVerificationScenario<Game>[];
22264
+ readonly maxScenarios?: number;
22265
+ readonly maxStepsPerScenario?: number;
22266
+ };
22267
+ ```
22268
+
22269
+ _No JSDoc summary is available yet._
22270
+
22271
+ ### CandidateVerificationLimitDiagnostic
22272
+
22273
+ ```ts
22274
+ type CandidateVerificationLimitDiagnostic = {
22275
+ readonly kind: "limit";
22276
+ readonly message: string;
22277
+ readonly actualSteps: number;
22278
+ readonly maxStepsPerScenario: number;
22279
+ };
22280
+ ```
22281
+
22282
+ _No JSDoc summary is available yet._
22283
+
22284
+ ### CandidateVerificationReplayDiagnostic
22285
+
22286
+ ```ts
22287
+ type CandidateVerificationReplayDiagnostic = {
22288
+ readonly kind: "replay";
22289
+ readonly message: string;
22290
+ readonly scenarioId?: string;
22291
+ readonly segment?: "given" | "when";
22292
+ readonly index?: number;
22293
+ readonly interactionId?: string;
22294
+ readonly errorCode?: string;
22295
+ readonly reducerMessage?: string;
22296
+ readonly trace?: readonly DispatchTraceSummaryEntry[];
22297
+ };
21563
22298
  ```
21564
22299
 
21565
22300
  _No JSDoc summary is available yet._
@@ -21583,7 +22318,8 @@ _No JSDoc summary is available yet._
21583
22318
  ### CandidateVerificationScenario
21584
22319
 
21585
22320
  ```ts
21586
- type CandidateVerificationScenario = ScenarioDefinition;
22321
+ type CandidateVerificationScenario<Game extends ScenarioDefinitionGameLike> =
22322
+ ScenarioDefinition<Game>;
21587
22323
  ```
21588
22324
 
21589
22325
  _No JSDoc summary is available yet._
@@ -21594,25 +22330,294 @@ _No JSDoc summary is available yet._
21594
22330
  type CandidateVerificationScenarioResult = {
21595
22331
  readonly id: string;
21596
22332
  readonly status: "passed" | "failed";
21597
- readonly diagnostic?: {
21598
- readonly kind: "assertion";
21599
- readonly message: string;
21600
- };
22333
+ readonly diagnostic?:
22334
+ | CandidateVerificationReplayDiagnostic
22335
+ | CandidateVerificationAssertionDiagnostic
22336
+ | CandidateVerificationLimitDiagnostic;
21601
22337
  };
21602
22338
  ```
21603
22339
 
21604
22340
  _No JSDoc summary is available yet._
21605
22341
 
22342
+ ### digestScenarioProjection
22343
+
22344
+ ```ts
22345
+ function digestScenarioProjection(
22346
+ projection: ScenarioProjectionParity,
22347
+ ): Sha256Digest;
22348
+ ```
22349
+
22350
+ _No JSDoc summary is available yet._
22351
+
22352
+ ### materializeScenarioRuntimeCheckpoint
22353
+
22354
+ ```ts
22355
+ function materializeScenarioRuntimeCheckpoint<
22356
+ const Game extends ScenarioDefinitionGameLike,
22357
+ >(
22358
+ options: ReplayScenarioOptions<Game>,
22359
+ ): Promise<ScenarioRuntimeCheckpointMaterialization>;
22360
+ ```
22361
+
22362
+ Trusted tool-side materialization for CLI, Workbench, and backend adapters. The returned reducer snapshot must never cross a player/browser boundary.
22363
+
22364
+ ### resolveScenarioCommandParams
22365
+
22366
+ ```ts
22367
+ function resolveScenarioCommandParams(options: {
22368
+ readonly game: GameLike;
22369
+ readonly phase: string;
22370
+ readonly interactionId: string;
22371
+ readonly params: unknown;
22372
+ readonly playerIds: readonly string[];
22373
+ readonly path: string;
22374
+ }): Record<string, unknown>;
22375
+ ```
22376
+
22377
+ _No JSDoc summary is available yet._
22378
+
21606
22379
  ### runCandidateVerification
21607
22380
 
21608
22381
  ```ts
21609
- function runCandidateVerification(
21610
- input: CandidateVerificationInput,
22382
+ function runCandidateVerification<
22383
+ const Game extends ScenarioDefinitionGameLike,
22384
+ >(
22385
+ input: CandidateVerificationInput<Game>,
21611
22386
  ): Promise<CandidateVerificationResult>;
21612
22387
  ```
21613
22388
 
21614
22389
  _No JSDoc summary is available yet._
21615
22390
 
22391
+ ### scenarioProjectionInputMetadata
22392
+
22393
+ ```ts
22394
+ function scenarioProjectionInputMetadata(
22395
+ input: ScenarioProjectionInteractionInput,
22396
+ ): {
22397
+ readonly key: string;
22398
+ readonly kind: string;
22399
+ readonly eligibleCount: number | "lazy";
22400
+ };
22401
+ ```
22402
+
22403
+ Shared SDK normalization for inspect DTOs and backend parity projections.
22404
+
22405
+ ### ScenarioProjectionInteractionInput
22406
+
22407
+ ```ts
22408
+ type ScenarioProjectionInteractionInput = {
22409
+ readonly key: string;
22410
+ readonly kind: string;
22411
+ readonly domain: unknown;
22412
+ };
22413
+ ```
22414
+
22415
+ _No JSDoc summary is available yet._
22416
+
22417
+ ### ScenarioProjectionParity
22418
+
22419
+ ```ts
22420
+ type ScenarioProjectionParity = ...;
22421
+ ```
22422
+
22423
+ _No JSDoc summary is available yet._
22424
+
22425
+ ### scenarioProjectionParityFromInspectNode
22426
+
22427
+ ```ts
22428
+ function scenarioProjectionParityFromInspectNode(
22429
+ node: InspectNode,
22430
+ ): ScenarioProjectionParity;
22431
+ ```
22432
+
22433
+ Canonical local/backend parity authority. It deliberately excludes raw reducer public/private state, interaction explanations, entropy, and trace: backend gameplay frames expose the selected projection, not reducer state.
22434
+
22435
+ ### ScenarioRuntimeCheckpointMaterialization
22436
+
22437
+ ```ts
22438
+ type ScenarioRuntimeCheckpointMaterialization = {
22439
+ readonly checkpoint: ScenarioCheckpoint;
22440
+ readonly checkpointDigest: string;
22441
+ readonly playerIds: readonly string[];
22442
+ readonly state: wire.ReducerSessionState;
22443
+ };
22444
+ ```
22445
+
22446
+ _No JSDoc summary is available yet._
22447
+
22448
+ ## @dreamboard-games/sdk/testing-compiler
22449
+
22450
+ ### CompiledScenarioReplay
22451
+
22452
+ ```ts
22453
+ type CompiledScenarioReplay = ...;
22454
+ ```
22455
+
22456
+ _No JSDoc summary is available yet._
22457
+
22458
+ ### compileScenarioReplay
22459
+
22460
+ ```ts
22461
+ function compileScenarioReplay(
22462
+ options: CompileScenarioReplayOptions,
22463
+ ): Promise<CompiledScenarioReplay>;
22464
+ ```
22465
+
22466
+ Compile one authored scenario into the trusted, serializable replay DTO used by dev-host, Workbench, demo, and performance adapters.
22467
+
22468
+ ### CompileScenarioReplayOptions
22469
+
22470
+ ```ts
22471
+ type CompileScenarioReplayOptions = {
22472
+ readonly scenarioPath: string;
22473
+ readonly at?: ScenarioCheckpoint;
22474
+ };
22475
+ ```
22476
+
22477
+ _No JSDoc summary is available yet._
22478
+
22479
+ ## @dreamboard-games/sdk/authoring-compiler
22480
+
22481
+ ### MaterializedWorkspaceReceipt
22482
+
22483
+ ```ts
22484
+ type MaterializedWorkspaceReceipt = {
22485
+ readonly schemaVersion: 1;
22486
+ readonly projectRoot: string;
22487
+ readonly authoritativeFiles: number;
22488
+ readonly seededFiles: number;
22489
+ readonly artifacts: readonly {
22490
+ readonly path: string;
22491
+ readonly ownership: "authoritative";
22492
+ readonly sha256: `sha256:${string}`;
22493
+ }[];
22494
+ readonly digest: `sha256:${string}`;
22495
+ };
22496
+ ```
22497
+
22498
+ _No JSDoc summary is available yet._
22499
+
22500
+ ### materializeWorkspace
22501
+
22502
+ ```ts
22503
+ function materializeWorkspace(
22504
+ options: MaterializeWorkspaceOptions,
22505
+ ): Promise<MaterializedWorkspaceReceipt>;
22506
+ ```
22507
+
22508
+ Materialize SDK-owned workspace contracts from authored manifest source. Authoritative files are always replaced. Seed files are untouched unless a scaffolding caller explicitly opts in. No test state or projection artifact is emitted.
22509
+
22510
+ ### MaterializeWorkspaceOptions
22511
+
22512
+ ```ts
22513
+ type MaterializeWorkspaceOptions = {
22514
+ readonly manifestPath: string;
22515
+ readonly projectRoot?: string;
22516
+ /** Scaffolding-only. Existing build/test paths leave seed files untouched. */
22517
+ readonly writeMissingSeeds?: boolean;
22518
+ };
22519
+ ```
22520
+
22521
+ _No JSDoc summary is available yet._
22522
+
22523
+ ## @dreamboard-games/sdk/reference-game-compiler
22524
+
22525
+ ### CANONICAL_REFERENCE_GAME_IDS
22526
+
22527
+ ```ts
22528
+ const CANONICAL_REFERENCE_GAME_IDS: readonly string[];
22529
+ ```
22530
+
22531
+ _No JSDoc summary is available yet._
22532
+
22533
+ ### classifyReferenceGameSourcePath
22534
+
22535
+ ```ts
22536
+ function classifyReferenceGameSourcePath(
22537
+ repositoryPath: string,
22538
+ ): ReferenceGameSourcePathClass;
22539
+ ```
22540
+
22541
+ _No JSDoc summary is available yet._
22542
+
22543
+ ### collectReferenceGameSourceManifest
22544
+
22545
+ ```ts
22546
+ function collectReferenceGameSourceManifest(options: {
22547
+ readonly sourceRoot: string;
22548
+ readonly provenance: ReferenceGameSourceProvenance;
22549
+ }): Promise<ReferenceGameSourceManifest>;
22550
+ ```
22551
+
22552
+ _No JSDoc summary is available yet._
22553
+
22554
+ ### collectReferenceGameSourceObjects
22555
+
22556
+ ```ts
22557
+ function collectReferenceGameSourceObjects(options: {
22558
+ readonly referenceGamesRoot: string;
22559
+ readonly sourceRoot: string;
22560
+ }): Promise<
22561
+ Array<{
22562
+ readonly path: string;
22563
+ readonly sha256: string;
22564
+ readonly byteLength: number;
22565
+ }>
22566
+ >;
22567
+ ```
22568
+
22569
+ _No JSDoc summary is available yet._
22570
+
22571
+ ### isReferenceGameSourceObject
22572
+
22573
+ ```ts
22574
+ function isReferenceGameSourceObject(repositoryPath: string): boolean;
22575
+ ```
22576
+
22577
+ _No JSDoc summary is available yet._
22578
+
22579
+ ### REFERENCE_GAME_SOURCE_INVENTORY_POLICY
22580
+
22581
+ ```ts
22582
+ const REFERENCE_GAME_SOURCE_INVENTORY_POLICY: ReferenceGameSourceInventoryPolicy;
22583
+ ```
22584
+
22585
+ _No JSDoc summary is available yet._
22586
+
22587
+ ### referenceGamePathIdentity
22588
+
22589
+ ```ts
22590
+ function referenceGamePathIdentity(
22591
+ repositoryPath: string,
22592
+ ): { readonly gameId: string; readonly relativePath: string } | null;
22593
+ ```
22594
+
22595
+ _No JSDoc summary is available yet._
22596
+
22597
+ ### ReferenceGameSourcePathClass
22598
+
22599
+ ```ts
22600
+ type ReferenceGameSourcePathClass =
22601
+ | "included"
22602
+ | "workspace-generated"
22603
+ | "test-generated"
22604
+ | "test-base"
22605
+ | "obsolete-screenshot"
22606
+ | "derived-output";
22607
+ ```
22608
+
22609
+ _No JSDoc summary is available yet._
22610
+
22611
+ ### shouldDescendIntoReferenceGameDirectory
22612
+
22613
+ ```ts
22614
+ function shouldDescendIntoReferenceGameDirectory(
22615
+ repositoryPath: string,
22616
+ ): boolean;
22617
+ ```
22618
+
22619
+ _No JSDoc summary is available yet._
22620
+
21616
22621
  ## @dreamboard-games/sdk/browser-interaction
21617
22622
 
21618
22623
  ### actuatorIdentityKey
@@ -22553,6 +23558,7 @@ _No JSDoc summary is available yet._
22553
23558
  ```ts
22554
23559
  const gameplayBrowserInteractionSurface: BrowserInteractionSurfaceDefinition<
22555
23560
  "gameplay",
23561
+ | "fill"
22556
23562
  | "arm"
22557
23563
  | "reveal"
22558
23564
  | "invoke"
@@ -22560,7 +23566,6 @@ const gameplayBrowserInteractionSurface: BrowserInteractionSurfaceDefinition<
22560
23566
  | "toggle"
22561
23567
  | "increment"
22562
23568
  | "decrement"
22563
- | "fill"
22564
23569
  | "submit",
22565
23570
  string
22566
23571
  >;