@dreamboard-games/sdk 0.4.0-alpha.9 → 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 (124) hide show
  1. package/README.md +49 -11
  2. package/dist/authoring/index.d.ts +3 -6
  3. package/dist/authoring/index.js +3 -3
  4. package/dist/authoring-compiler.d.ts +3 -3
  5. package/dist/authoring-compiler.js +4 -5
  6. package/dist/authoring-materialize-cli.js +6 -7
  7. package/dist/authoring-materialize-cli.js.map +1 -1
  8. package/dist/browser-interaction.d.ts +21 -21
  9. package/dist/{chunk-3PFDHTR7.js → chunk-2GQIALJL.js} +37 -11
  10. package/dist/chunk-2GQIALJL.js.map +1 -0
  11. package/dist/{chunk-XDGRC6OR.js → chunk-533O7C4L.js} +94 -38
  12. package/dist/chunk-533O7C4L.js.map +1 -0
  13. package/dist/{chunk-BUOODBVO.js → chunk-6LMESVGT.js} +9 -28
  14. package/dist/chunk-6LMESVGT.js.map +1 -0
  15. package/dist/{chunk-GMOBG7Y7.js → chunk-DQS2EG5E.js} +5 -5
  16. package/dist/{chunk-GMOBG7Y7.js.map → chunk-DQS2EG5E.js.map} +1 -1
  17. package/dist/{chunk-L3W2FPRQ.js → chunk-EOEA3I64.js} +84 -13
  18. package/dist/chunk-EOEA3I64.js.map +1 -0
  19. package/dist/{chunk-YNW3KBDE.js → chunk-FL67RDID.js} +2 -2
  20. package/dist/{chunk-SACZWUA6.js → chunk-HIH6Y4FA.js} +86 -1224
  21. package/dist/{chunk-SACZWUA6.js.map → chunk-HIH6Y4FA.js.map} +1 -1
  22. package/dist/{chunk-P6IJ5YVY.js → chunk-HUK4234C.js} +21 -9
  23. package/dist/chunk-HUK4234C.js.map +1 -0
  24. package/dist/{chunk-7ADPYKFT.js → chunk-KGV2EUNN.js} +5 -5
  25. package/dist/chunk-KGV2EUNN.js.map +1 -0
  26. package/dist/{chunk-JRGP6W4V.js → chunk-KRJPRYEA.js} +49 -4
  27. package/dist/chunk-KRJPRYEA.js.map +1 -0
  28. package/dist/chunk-KWHOFBDM.js +9 -0
  29. package/dist/chunk-KWHOFBDM.js.map +1 -0
  30. package/dist/{chunk-UC2UXAC6.js → chunk-LMHCGCA6.js} +2 -2
  31. package/dist/{chunk-NGYFBNBP.js → chunk-N33CGX2F.js} +15 -85
  32. package/dist/chunk-N33CGX2F.js.map +1 -0
  33. package/dist/{chunk-5XTAQ4EQ.js → chunk-TXELBVTG.js} +2 -2
  34. package/dist/{chunk-2TRZSZGD.js → chunk-VRRR6QZT.js} +9 -12
  35. package/dist/chunk-VRRR6QZT.js.map +1 -0
  36. package/dist/chunk-VWTKGIYF.js +90 -0
  37. package/dist/chunk-VWTKGIYF.js.map +1 -0
  38. package/dist/{chunk-QQNL4WTX.js → chunk-XFMSLL3P.js} +120 -61
  39. package/dist/chunk-XFMSLL3P.js.map +1 -0
  40. package/dist/{chunk-WDR7SKBM.js → chunk-ZSTCUJKZ.js} +4 -4
  41. package/dist/chunk-ZSTCUJKZ.js.map +1 -0
  42. package/dist/codegen.js +1 -1
  43. package/dist/{components-BPzsSRs8.d.ts → components-CNAt5J1p.d.ts} +1 -1
  44. package/dist/{definitions-0kjPV9wh.d.ts → definitions-bZSBaPjj.d.ts} +9 -3
  45. package/dist/digest.d.ts +8 -0
  46. package/dist/{index-CWzWpQzM.d.ts → index-CR69MyWr.d.ts} +2 -2
  47. package/dist/{index.d-C7Ztirg6.d.ts → index.d-Bw8AOcgp.d.ts} +324 -225
  48. package/dist/index.js +2 -2
  49. package/dist/package-set.d.ts +2 -2
  50. package/dist/package-set.js +2 -2
  51. package/dist/plugin-runtime-contract.d.ts +17 -0
  52. package/dist/plugin-runtime-contract.js +94 -0
  53. package/dist/{protocol-B2LWcqB4.d.ts → protocol-CVaSqPgX.d.ts} +45 -47
  54. package/dist/reducer/advanced.d.ts +5 -4
  55. package/dist/reducer/advanced.js +10 -85
  56. package/dist/reducer/advanced.js.map +1 -1
  57. package/dist/reducer-contract.d.ts +1 -1
  58. package/dist/reducer-contract.js +6 -4
  59. package/dist/reducer.d.ts +9 -93
  60. package/dist/reducer.js +3 -3
  61. package/dist/reducer.js.map +1 -1
  62. package/dist/reference-games/index.d.ts +29 -11
  63. package/dist/reference-games/index.js +43 -45
  64. package/dist/reference-games/index.js.map +1 -1
  65. package/dist/runtime/primitives.d.ts +3 -3
  66. package/dist/runtime/primitives.js +5 -5
  67. package/dist/runtime/runtime-api.d.ts +1 -1
  68. package/dist/runtime/workspace-contract.d.ts +343 -11
  69. package/dist/runtime/workspace-contract.js +12 -6
  70. package/dist/{runtime-B_w9AO2n.d.ts → runtime-C7Z2acNU.d.ts} +7 -26
  71. package/dist/{runtime-api-xCWLMQRT.d.ts → runtime-api-CgPuEVeF.d.ts} +2 -13
  72. package/dist/runtime.d.ts +7 -7
  73. package/dist/runtime.js +18 -14
  74. package/dist/runtime.js.map +1 -1
  75. package/dist/schema.d.ts +405 -0
  76. package/dist/testing-compiler.d.ts +6 -5
  77. package/dist/testing-compiler.js +41 -5
  78. package/dist/testing-compiler.js.map +1 -1
  79. package/dist/testing-runtime.d.ts +7 -6
  80. package/dist/testing-runtime.js +6 -6
  81. package/dist/testing.d.ts +30 -107
  82. package/dist/testing.js +44 -371
  83. package/dist/testing.js.map +1 -1
  84. package/dist/{types-Bvptkukh.d.ts → types-DN4O7kH_.d.ts} +2 -2
  85. package/dist/{types-_zfC_7CD.d.ts → types-q1Guidm5.d.ts} +4 -5
  86. package/dist/types.d.ts +0 -1
  87. package/dist/ui/components.d.ts +3 -2
  88. package/dist/ui/components.js +1 -1
  89. package/dist/ui/plugin-styles.css +1 -1
  90. package/dist/{ui-contract-CUC7Lyoc.d.ts → ui-contract-BC4JpysE.d.ts} +2 -6
  91. package/dist/ui.d.ts +4 -3
  92. package/dist/ui.js +2 -2
  93. package/dist/{views-DE2eZxPz.d.ts → views-D2Cfzr3h.d.ts} +3 -3
  94. package/package.json +28 -29
  95. package/REFERENCE.md +0 -23787
  96. package/dist/chunk-2TRZSZGD.js.map +0 -1
  97. package/dist/chunk-3PFDHTR7.js.map +0 -1
  98. package/dist/chunk-45P5CEGH.js +0 -176
  99. package/dist/chunk-45P5CEGH.js.map +0 -1
  100. package/dist/chunk-7ADPYKFT.js.map +0 -1
  101. package/dist/chunk-BUOODBVO.js.map +0 -1
  102. package/dist/chunk-JRGP6W4V.js.map +0 -1
  103. package/dist/chunk-L3W2FPRQ.js.map +0 -1
  104. package/dist/chunk-NGYFBNBP.js.map +0 -1
  105. package/dist/chunk-P6IJ5YVY.js.map +0 -1
  106. package/dist/chunk-QQNL4WTX.js.map +0 -1
  107. package/dist/chunk-SFOAY5H4.js +0 -12
  108. package/dist/chunk-SFOAY5H4.js.map +0 -1
  109. package/dist/chunk-UNVCT5Z7.js +0 -73
  110. package/dist/chunk-UNVCT5Z7.js.map +0 -1
  111. package/dist/chunk-WDR7SKBM.js.map +0 -1
  112. package/dist/chunk-XDGRC6OR.js.map +0 -1
  113. package/dist/chunk-XLHLFTLI.js +0 -399
  114. package/dist/chunk-XLHLFTLI.js.map +0 -1
  115. package/dist/reference-game-compiler.d.ts +0 -45
  116. package/dist/reference-game-compiler.js +0 -25
  117. package/dist/reference-game-source-manifest-cli.d.ts +0 -1
  118. package/dist/reference-game-source-manifest-cli.js +0 -84
  119. package/dist/reference-game-source-manifest-cli.js.map +0 -1
  120. package/dist/schema-9jZzlEWZ.d.ts +0 -220
  121. /package/dist/{chunk-YNW3KBDE.js.map → chunk-FL67RDID.js.map} +0 -0
  122. /package/dist/{chunk-UC2UXAC6.js.map → chunk-LMHCGCA6.js.map} +0 -0
  123. /package/dist/{chunk-5XTAQ4EQ.js.map → chunk-TXELBVTG.js.map} +0 -0
  124. /package/dist/{reference-game-compiler.js.map → plugin-runtime-contract.js.map} +0 -0
package/README.md CHANGED
@@ -1,19 +1,57 @@
1
1
  # @dreamboard-games/sdk
2
2
 
3
- The public Dreamboard SDK package. This repository publishes one consumer
4
- package, `@dreamboard-games/sdk`; public capabilities are exposed through the
5
- package export map rather than separate installable workspace packages.
3
+ The public TypeScript SDK for authoring, testing, and rendering Dreamboard
4
+ games. Install this package rather than any of the repository's unpublished
5
+ workspace inputs.
6
6
 
7
- Internal workspaces such as `sdk-types`, `workspace-codegen`, and
8
- `reducer-contract` are implementation inputs. Consumers should not install or
9
- import those package names directly.
7
+ ```sh
8
+ pnpm add @dreamboard-games/sdk
9
+ ```
10
10
 
11
- Typical imports:
11
+ The package's declarations and export map are the API authority. Supported
12
+ imports include the root module and explicit subpaths for authoring, runtime,
13
+ reducer contracts, testing, browser interaction, UI, and reference-game
14
+ metadata. Import only subpaths present in the installed package's `exports`
15
+ field.
12
16
 
13
17
  ```ts
14
- import {
15
- DREAMBOARD_SDK_PACKAGE_SET,
16
- DREAMBOARD_SDK_VERSION,
17
- } from "@dreamboard-games/sdk";
18
+ import { DREAMBOARD_SDK_VERSION } from "@dreamboard-games/sdk";
18
19
  import type { ReducerWire } from "@dreamboard-games/sdk/reducer-contract";
20
+ import {
21
+ REFERENCE_GAME_MANIFEST_SCHEMA_VERSION,
22
+ parseReferenceGameManifest,
23
+ type ReferenceGameManifest,
24
+ } from "@dreamboard-games/sdk/reference-games";
25
+
26
+ const manifest: ReferenceGameManifest = parseReferenceGameManifest(input);
27
+ console.log(REFERENCE_GAME_MANIFEST_SCHEMA_VERSION, manifest.id);
19
28
  ```
29
+
30
+ Reference-game manifests use schema V5. They describe the game workspace,
31
+ teaching purpose, mechanics, UI patterns, and substantive rights metadata.
32
+
33
+ Include the packaged stylesheet when using SDK UI components:
34
+
35
+ ```ts
36
+ import "@dreamboard-games/sdk/ui/plugin-styles.css";
37
+ ```
38
+
39
+ ## Reducer runner contract
40
+
41
+ `createReducerBundle(game)` returns exactly the contract version and four
42
+ operations: `boardStatic()`, `initialize(input)`, `dispatch({ state, input })`,
43
+ and `project({ state, playerIds })`. The runner contract is `0.5.0`; hosts must
44
+ require that exact version. Dispatch includes validation and effect execution. Initialization returns
45
+ `{ state, terminal?, events? }`, preserving outcomes and events from initial
46
+ phase entry and automatic continuations.
47
+
48
+ The authoritative state is explicit on every dispatch and projection. A host
49
+ may retain a warm worker and SDK caches, but replaying the same state and input
50
+ must produce the same gameplay result as a fresh worker. Projection timing is
51
+ diagnostic and is excluded from this equivalence.
52
+
53
+ Seat projections are independent of session versions. The gameplay service
54
+ owns the monotonically increasing version, perspective, and action-set identity.
55
+ The plugin frame basis contains `version`, `actionSetVersion`, and
56
+ `perspectivePlayerId`; it has no generation counter. Hosts merge the separately
57
+ cached board static projection when materializing plugin gameplay frames.
@@ -1,10 +1,7 @@
1
1
  import { JsonValue } from '../types.js';
2
2
 
3
- type GeneratedAuthoringMetadataV1 = {
3
+ type AuthoringMetadataV1 = {
4
4
  sdkVersion: string;
5
- codegenVersion: string;
6
- manifestSchemaVersion: number;
7
- generatedArtifactSchemaVersion: number;
8
5
  };
9
6
  type AuthoringValidationResultV1 = {
10
7
  valid: boolean;
@@ -36,7 +33,7 @@ type AuthoringManifestConformanceCaseV1 = {
36
33
  };
37
34
  type ProjectAuthoringAdapterV1 = {
38
35
  protocolVersion: 1;
39
- metadata: GeneratedAuthoringMetadataV1;
36
+ metadata: AuthoringMetadataV1;
40
37
  generatedPaths: readonly string[];
41
38
  generatedPathPatterns: readonly GeneratedPathPatternV1[];
42
39
  manifestConformanceCases: readonly AuthoringManifestConformanceCaseV1[];
@@ -59,4 +56,4 @@ declare const GENERATED_WORKSPACE_PATH_PATTERNS: readonly GeneratedWorkspacePath
59
56
  declare const MANIFEST_CONFORMANCE_CASES: readonly AuthoringManifestConformanceCaseV1[];
60
57
  declare const projectAuthoringAdapter: ProjectAuthoringAdapterV1;
61
58
 
62
- export { type AuthoringManifestConformanceCaseV1, type AuthoringValidationResultV1, GENERATED_WORKSPACE_PATHS, GENERATED_WORKSPACE_PATH_PATTERNS, type GeneratedArtifactV1, type GeneratedAuthoringMetadataV1, type GeneratedPathPatternV1, MANIFEST_CONFORMANCE_CASES, type ProjectAuthoringAdapterV1, diagnosticCodesForValidationErrors, generateWorkspaceArtifacts, materializeManifest, projectAuthoringAdapter, validateManifest };
59
+ export { type AuthoringManifestConformanceCaseV1, type AuthoringMetadataV1, type AuthoringValidationResultV1, GENERATED_WORKSPACE_PATHS, GENERATED_WORKSPACE_PATH_PATTERNS, type GeneratedArtifactV1, type GeneratedPathPatternV1, MANIFEST_CONFORMANCE_CASES, type ProjectAuthoringAdapterV1, diagnosticCodesForValidationErrors, generateWorkspaceArtifacts, materializeManifest, projectAuthoringAdapter, validateManifest };
@@ -7,9 +7,9 @@ import {
7
7
  materializeManifest,
8
8
  projectAuthoringAdapter,
9
9
  validateManifest
10
- } from "../chunk-7ADPYKFT.js";
11
- import "../chunk-SFOAY5H4.js";
12
- import "../chunk-SACZWUA6.js";
10
+ } from "../chunk-KGV2EUNN.js";
11
+ import "../chunk-KWHOFBDM.js";
12
+ import "../chunk-HIH6Y4FA.js";
13
13
  import "../chunk-PZ5AY32C.js";
14
14
  export {
15
15
  GENERATED_WORKSPACE_PATHS,
@@ -4,7 +4,7 @@ type MaterializeWorkspaceOptions = {
4
4
  /** Scaffolding-only. Existing build/test paths leave seed files untouched. */
5
5
  readonly writeMissingSeeds?: boolean;
6
6
  };
7
- type MaterializedWorkspaceReceipt = {
7
+ type MaterializedWorkspaceResult = {
8
8
  readonly schemaVersion: 1;
9
9
  readonly projectRoot: string;
10
10
  readonly authoritativeFiles: number;
@@ -22,6 +22,6 @@ type MaterializedWorkspaceReceipt = {
22
22
  * scaffolding caller explicitly opts in. No test state or projection artifact
23
23
  * is emitted.
24
24
  */
25
- declare function materializeWorkspace(options: MaterializeWorkspaceOptions): Promise<MaterializedWorkspaceReceipt>;
25
+ declare function materializeWorkspace(options: MaterializeWorkspaceOptions): Promise<MaterializedWorkspaceResult>;
26
26
 
27
- export { type MaterializeWorkspaceOptions, type MaterializedWorkspaceReceipt, materializeWorkspace };
27
+ export { type MaterializeWorkspaceOptions, type MaterializedWorkspaceResult, materializeWorkspace };
@@ -1,10 +1,9 @@
1
1
  import {
2
2
  materializeWorkspace
3
- } from "./chunk-P6IJ5YVY.js";
4
- import "./chunk-7ADPYKFT.js";
5
- import "./chunk-UNVCT5Z7.js";
6
- import "./chunk-SFOAY5H4.js";
7
- import "./chunk-SACZWUA6.js";
3
+ } from "./chunk-HUK4234C.js";
4
+ import "./chunk-KGV2EUNN.js";
5
+ import "./chunk-KWHOFBDM.js";
6
+ import "./chunk-HIH6Y4FA.js";
8
7
  import "./chunk-PZ5AY32C.js";
9
8
  export {
10
9
  materializeWorkspace
@@ -1,17 +1,16 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  materializeWorkspace
4
- } from "./chunk-P6IJ5YVY.js";
5
- import "./chunk-7ADPYKFT.js";
6
- import "./chunk-UNVCT5Z7.js";
7
- import "./chunk-SFOAY5H4.js";
8
- import "./chunk-SACZWUA6.js";
4
+ } from "./chunk-HUK4234C.js";
5
+ import "./chunk-KGV2EUNN.js";
6
+ import "./chunk-KWHOFBDM.js";
7
+ import "./chunk-HIH6Y4FA.js";
9
8
  import "./chunk-PZ5AY32C.js";
10
9
 
11
10
  // src/authoring-materialize-cli.ts
12
11
  var options = parseArgs(process.argv.slice(2));
13
- var receipt = await materializeWorkspace(options);
14
- console.log(JSON.stringify(receipt, null, 2));
12
+ var result = await materializeWorkspace(options);
13
+ console.log(JSON.stringify(result, null, 2));
15
14
  function parseArgs(argv) {
16
15
  let manifestPath;
17
16
  let projectRoot;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/authoring-materialize-cli.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { materializeWorkspace } from \"./authoring/materialize-workspace.js\";\n\nconst options = parseArgs(process.argv.slice(2));\nconst receipt = await materializeWorkspace(options);\nconsole.log(JSON.stringify(receipt, null, 2));\n\nfunction parseArgs(argv: readonly string[]): {\n readonly manifestPath: string;\n readonly projectRoot?: string;\n readonly writeMissingSeeds?: boolean;\n} {\n let manifestPath: string | undefined;\n let projectRoot: string | undefined;\n let writeMissingSeeds = false;\n for (let index = 0; index < argv.length; index += 1) {\n const arg = argv[index];\n if (arg === \"--manifest\") {\n manifestPath = argv[index + 1];\n index += 1;\n continue;\n }\n if (arg === \"--project-root\") {\n projectRoot = argv[index + 1];\n index += 1;\n continue;\n }\n if (arg === \"--write-missing-seeds\") {\n writeMissingSeeds = true;\n continue;\n }\n throw new Error(`Unknown argument '${arg}'.`);\n }\n if (!manifestPath) {\n throw new Error(\"--manifest is required.\");\n }\n return {\n manifestPath,\n ...(projectRoot === undefined ? {} : { projectRoot }),\n ...(writeMissingSeeds ? { writeMissingSeeds: true } : {}),\n };\n}\n"],"mappings":";;;;;;;;;;;AAGA,IAAM,UAAU,UAAU,QAAQ,KAAK,MAAM,CAAC,CAAC;AAC/C,IAAM,UAAU,MAAM,qBAAqB,OAAO;AAClD,QAAQ,IAAI,KAAK,UAAU,SAAS,MAAM,CAAC,CAAC;AAE5C,SAAS,UAAU,MAIjB;AACA,MAAI;AACJ,MAAI;AACJ,MAAI,oBAAoB;AACxB,WAAS,QAAQ,GAAG,QAAQ,KAAK,QAAQ,SAAS,GAAG;AACnD,UAAM,MAAM,KAAK,KAAK;AACtB,QAAI,QAAQ,cAAc;AACxB,qBAAe,KAAK,QAAQ,CAAC;AAC7B,eAAS;AACT;AAAA,IACF;AACA,QAAI,QAAQ,kBAAkB;AAC5B,oBAAc,KAAK,QAAQ,CAAC;AAC5B,eAAS;AACT;AAAA,IACF;AACA,QAAI,QAAQ,yBAAyB;AACnC,0BAAoB;AACpB;AAAA,IACF;AACA,UAAM,IAAI,MAAM,qBAAqB,GAAG,IAAI;AAAA,EAC9C;AACA,MAAI,CAAC,cAAc;AACjB,UAAM,IAAI,MAAM,yBAAyB;AAAA,EAC3C;AACA,SAAO;AAAA,IACL;AAAA,IACA,GAAI,gBAAgB,SAAY,CAAC,IAAI,EAAE,YAAY;AAAA,IACnD,GAAI,oBAAoB,EAAE,mBAAmB,KAAK,IAAI,CAAC;AAAA,EACzD;AACF;","names":[]}
1
+ {"version":3,"sources":["../src/authoring-materialize-cli.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { materializeWorkspace } from \"./authoring/materialize-workspace.js\";\n\nconst options = parseArgs(process.argv.slice(2));\nconst result = await materializeWorkspace(options);\nconsole.log(JSON.stringify(result, null, 2));\n\nfunction parseArgs(argv: readonly string[]): {\n readonly manifestPath: string;\n readonly projectRoot?: string;\n readonly writeMissingSeeds?: boolean;\n} {\n let manifestPath: string | undefined;\n let projectRoot: string | undefined;\n let writeMissingSeeds = false;\n for (let index = 0; index < argv.length; index += 1) {\n const arg = argv[index];\n if (arg === \"--manifest\") {\n manifestPath = argv[index + 1];\n index += 1;\n continue;\n }\n if (arg === \"--project-root\") {\n projectRoot = argv[index + 1];\n index += 1;\n continue;\n }\n if (arg === \"--write-missing-seeds\") {\n writeMissingSeeds = true;\n continue;\n }\n throw new Error(`Unknown argument '${arg}'.`);\n }\n if (!manifestPath) {\n throw new Error(\"--manifest is required.\");\n }\n return {\n manifestPath,\n ...(projectRoot === undefined ? {} : { projectRoot }),\n ...(writeMissingSeeds ? { writeMissingSeeds: true } : {}),\n };\n}\n"],"mappings":";;;;;;;;;;AAGA,IAAM,UAAU,UAAU,QAAQ,KAAK,MAAM,CAAC,CAAC;AAC/C,IAAM,SAAS,MAAM,qBAAqB,OAAO;AACjD,QAAQ,IAAI,KAAK,UAAU,QAAQ,MAAM,CAAC,CAAC;AAE3C,SAAS,UAAU,MAIjB;AACA,MAAI;AACJ,MAAI;AACJ,MAAI,oBAAoB;AACxB,WAAS,QAAQ,GAAG,QAAQ,KAAK,QAAQ,SAAS,GAAG;AACnD,UAAM,MAAM,KAAK,KAAK;AACtB,QAAI,QAAQ,cAAc;AACxB,qBAAe,KAAK,QAAQ,CAAC;AAC7B,eAAS;AACT;AAAA,IACF;AACA,QAAI,QAAQ,kBAAkB;AAC5B,oBAAc,KAAK,QAAQ,CAAC;AAC5B,eAAS;AACT;AAAA,IACF;AACA,QAAI,QAAQ,yBAAyB;AACnC,0BAAoB;AACpB;AAAA,IACF;AACA,UAAM,IAAI,MAAM,qBAAqB,GAAG,IAAI;AAAA,EAC9C;AACA,MAAI,CAAC,cAAc;AACjB,UAAM,IAAI,MAAM,yBAAyB;AAAA,EAC3C;AACA,SAAO;AAAA,IACL;AAAA,IACA,GAAI,gBAAgB,SAAY,CAAC,IAAI,EAAE,YAAY;AAAA,IACnD,GAAI,oBAAoB,EAAE,mBAAmB,KAAK,IAAI,CAAC;AAAA,EACzD;AACF;","names":[]}
@@ -111,8 +111,8 @@ declare const gameplaySemanticEffectSchema: z.ZodUnion<readonly [z.ZodObject<{
111
111
  declare const browserInteractionDiagnosticSchema: z.ZodObject<{
112
112
  code: z.ZodString;
113
113
  severity: z.ZodEnum<{
114
- error: "error";
115
114
  warning: "warning";
115
+ error: "error";
116
116
  }>;
117
117
  message: z.ZodString;
118
118
  surface: z.ZodOptional<z.ZodString>;
@@ -190,8 +190,8 @@ declare const browserInteractionActuatorSchema: z.ZodObject<{
190
190
  diagnostics: z.ZodArray<z.ZodObject<{
191
191
  code: z.ZodString;
192
192
  severity: z.ZodEnum<{
193
- error: "error";
194
193
  warning: "warning";
194
+ error: "error";
195
195
  }>;
196
196
  message: z.ZodString;
197
197
  surface: z.ZodOptional<z.ZodString>;
@@ -225,8 +225,8 @@ declare const browserInteractionPointerTargetSchema: z.ZodObject<{
225
225
  diagnostics: z.ZodArray<z.ZodObject<{
226
226
  code: z.ZodString;
227
227
  severity: z.ZodEnum<{
228
- error: "error";
229
228
  warning: "warning";
229
+ error: "error";
230
230
  }>;
231
231
  message: z.ZodString;
232
232
  surface: z.ZodOptional<z.ZodString>;
@@ -315,8 +315,8 @@ declare const browserGameplayInteractionSchema: z.ZodObject<{
315
315
  diagnostics: z.ZodArray<z.ZodObject<{
316
316
  code: z.ZodString;
317
317
  severity: z.ZodEnum<{
318
- error: "error";
319
318
  warning: "warning";
319
+ error: "error";
320
320
  }>;
321
321
  message: z.ZodString;
322
322
  surface: z.ZodOptional<z.ZodString>;
@@ -350,8 +350,8 @@ declare const browserGameplayInteractionSchema: z.ZodObject<{
350
350
  diagnostics: z.ZodArray<z.ZodObject<{
351
351
  code: z.ZodString;
352
352
  severity: z.ZodEnum<{
353
- error: "error";
354
353
  warning: "warning";
354
+ error: "error";
355
355
  }>;
356
356
  message: z.ZodString;
357
357
  surface: z.ZodOptional<z.ZodString>;
@@ -365,8 +365,8 @@ declare const browserGameplayInteractionSchema: z.ZodObject<{
365
365
  diagnostics: z.ZodArray<z.ZodObject<{
366
366
  code: z.ZodString;
367
367
  severity: z.ZodEnum<{
368
- error: "error";
369
368
  warning: "warning";
369
+ error: "error";
370
370
  }>;
371
371
  message: z.ZodString;
372
372
  surface: z.ZodOptional<z.ZodString>;
@@ -458,8 +458,8 @@ declare const browserGameplaySurfaceSnapshotSchema: z.ZodObject<{
458
458
  diagnostics: z.ZodArray<z.ZodObject<{
459
459
  code: z.ZodString;
460
460
  severity: z.ZodEnum<{
461
- error: "error";
462
461
  warning: "warning";
462
+ error: "error";
463
463
  }>;
464
464
  message: z.ZodString;
465
465
  surface: z.ZodOptional<z.ZodString>;
@@ -493,8 +493,8 @@ declare const browserGameplaySurfaceSnapshotSchema: z.ZodObject<{
493
493
  diagnostics: z.ZodArray<z.ZodObject<{
494
494
  code: z.ZodString;
495
495
  severity: z.ZodEnum<{
496
- error: "error";
497
496
  warning: "warning";
497
+ error: "error";
498
498
  }>;
499
499
  message: z.ZodString;
500
500
  surface: z.ZodOptional<z.ZodString>;
@@ -508,8 +508,8 @@ declare const browserGameplaySurfaceSnapshotSchema: z.ZodObject<{
508
508
  diagnostics: z.ZodArray<z.ZodObject<{
509
509
  code: z.ZodString;
510
510
  severity: z.ZodEnum<{
511
- error: "error";
512
511
  warning: "warning";
512
+ error: "error";
513
513
  }>;
514
514
  message: z.ZodString;
515
515
  surface: z.ZodOptional<z.ZodString>;
@@ -523,8 +523,8 @@ declare const browserGameplaySurfaceSnapshotSchema: z.ZodObject<{
523
523
  diagnostics: z.ZodArray<z.ZodObject<{
524
524
  code: z.ZodString;
525
525
  severity: z.ZodEnum<{
526
- error: "error";
527
526
  warning: "warning";
527
+ error: "error";
528
528
  }>;
529
529
  message: z.ZodString;
530
530
  surface: z.ZodOptional<z.ZodString>;
@@ -616,8 +616,8 @@ declare const browserSemanticSurfaceSnapshotSchema: z.ZodObject<{
616
616
  diagnostics: z.ZodArray<z.ZodObject<{
617
617
  code: z.ZodString;
618
618
  severity: z.ZodEnum<{
619
- error: "error";
620
619
  warning: "warning";
620
+ error: "error";
621
621
  }>;
622
622
  message: z.ZodString;
623
623
  surface: z.ZodOptional<z.ZodString>;
@@ -651,8 +651,8 @@ declare const browserSemanticSurfaceSnapshotSchema: z.ZodObject<{
651
651
  diagnostics: z.ZodArray<z.ZodObject<{
652
652
  code: z.ZodString;
653
653
  severity: z.ZodEnum<{
654
- error: "error";
655
654
  warning: "warning";
655
+ error: "error";
656
656
  }>;
657
657
  message: z.ZodString;
658
658
  surface: z.ZodOptional<z.ZodString>;
@@ -666,8 +666,8 @@ declare const browserSemanticSurfaceSnapshotSchema: z.ZodObject<{
666
666
  diagnostics: z.ZodArray<z.ZodObject<{
667
667
  code: z.ZodString;
668
668
  severity: z.ZodEnum<{
669
- error: "error";
670
669
  warning: "warning";
670
+ error: "error";
671
671
  }>;
672
672
  message: z.ZodString;
673
673
  surface: z.ZodOptional<z.ZodString>;
@@ -681,8 +681,8 @@ declare const browserSemanticSurfaceSnapshotSchema: z.ZodObject<{
681
681
  diagnostics: z.ZodArray<z.ZodObject<{
682
682
  code: z.ZodString;
683
683
  severity: z.ZodEnum<{
684
- error: "error";
685
684
  warning: "warning";
685
+ error: "error";
686
686
  }>;
687
687
  message: z.ZodString;
688
688
  surface: z.ZodOptional<z.ZodString>;
@@ -699,8 +699,8 @@ declare const browserUnknownSurfaceSnapshotSchema: z.ZodObject<{
699
699
  diagnostics: z.ZodArray<z.ZodObject<{
700
700
  code: z.ZodString;
701
701
  severity: z.ZodEnum<{
702
- error: "error";
703
702
  warning: "warning";
703
+ error: "error";
704
704
  }>;
705
705
  message: z.ZodString;
706
706
  surface: z.ZodOptional<z.ZodString>;
@@ -797,8 +797,8 @@ declare const browserInteractionSnapshotSchema: z.ZodObject<{
797
797
  diagnostics: z.ZodArray<z.ZodObject<{
798
798
  code: z.ZodString;
799
799
  severity: z.ZodEnum<{
800
- error: "error";
801
800
  warning: "warning";
801
+ error: "error";
802
802
  }>;
803
803
  message: z.ZodString;
804
804
  surface: z.ZodOptional<z.ZodString>;
@@ -832,8 +832,8 @@ declare const browserInteractionSnapshotSchema: z.ZodObject<{
832
832
  diagnostics: z.ZodArray<z.ZodObject<{
833
833
  code: z.ZodString;
834
834
  severity: z.ZodEnum<{
835
- error: "error";
836
835
  warning: "warning";
836
+ error: "error";
837
837
  }>;
838
838
  message: z.ZodString;
839
839
  surface: z.ZodOptional<z.ZodString>;
@@ -847,8 +847,8 @@ declare const browserInteractionSnapshotSchema: z.ZodObject<{
847
847
  diagnostics: z.ZodArray<z.ZodObject<{
848
848
  code: z.ZodString;
849
849
  severity: z.ZodEnum<{
850
- error: "error";
851
850
  warning: "warning";
851
+ error: "error";
852
852
  }>;
853
853
  message: z.ZodString;
854
854
  surface: z.ZodOptional<z.ZodString>;
@@ -862,8 +862,8 @@ declare const browserInteractionSnapshotSchema: z.ZodObject<{
862
862
  diagnostics: z.ZodArray<z.ZodObject<{
863
863
  code: z.ZodString;
864
864
  severity: z.ZodEnum<{
865
- error: "error";
866
865
  warning: "warning";
866
+ error: "error";
867
867
  }>;
868
868
  message: z.ZodString;
869
869
  surface: z.ZodOptional<z.ZodString>;
@@ -879,8 +879,8 @@ declare const browserInteractionSnapshotSchema: z.ZodObject<{
879
879
  diagnostics: z.ZodArray<z.ZodObject<{
880
880
  code: z.ZodString;
881
881
  severity: z.ZodEnum<{
882
- error: "error";
883
882
  warning: "warning";
883
+ error: "error";
884
884
  }>;
885
885
  message: z.ZodString;
886
886
  surface: z.ZodOptional<z.ZodString>;
@@ -894,8 +894,8 @@ declare const browserInteractionSnapshotSchema: z.ZodObject<{
894
894
  diagnostics: z.ZodArray<z.ZodObject<{
895
895
  code: z.ZodString;
896
896
  severity: z.ZodEnum<{
897
- error: "error";
898
897
  warning: "warning";
898
+ error: "error";
899
899
  }>;
900
900
  message: z.ZodString;
901
901
  surface: z.ZodOptional<z.ZodString>;
@@ -30,12 +30,13 @@ __export(zod_exports, {
30
30
  GameOutcomeSchema: () => GameOutcomeSchema,
31
31
  InitializePhaseRequestSchema: () => InitializePhaseRequestSchema,
32
32
  InitializeRequestSchema: () => InitializeRequestSchema,
33
+ InitializeResultSchema: () => InitializeResultSchema,
33
34
  JsonValueSchema: () => JsonValueSchema,
34
35
  OutcomeResultSchema: () => OutcomeResultSchema,
35
36
  OutcomeScoreComponentSchema: () => OutcomeScoreComponentSchema,
36
37
  OutcomeStandingSchema: () => OutcomeStandingSchema,
37
38
  OutcomeTieBreakSchema: () => OutcomeTieBreakSchema,
38
- ProjectSeatsDynamicRequestSchema: () => ProjectSeatsDynamicRequestSchema,
39
+ ProjectRequestSchema: () => ProjectRequestSchema,
39
40
  ProjectionTimingMetadataSchema: () => ProjectionTimingMetadataSchema,
40
41
  ReduceRequestSchema: () => ReduceRequestSchema,
41
42
  ReduceResultAcceptSchema: () => ReduceResultAcceptSchema,
@@ -100,12 +101,6 @@ var EffectShuffleSharedZoneSchema = z.object({ "effectId": EffectIdSchema, "type
100
101
  var EffectShufflePlayerZoneSchema = z.object({ "effectId": EffectIdSchema, "type": z.literal("shufflePlayerZone"), "zoneId": z.string().min(1), "playerId": z.string().min(1) }).strict();
101
102
  var EffectSchema = z.discriminatedUnion("type", [EffectTransitionSchema, EffectRollDieSchema, EffectShuffleSharedZoneSchema, EffectShufflePlayerZoneSchema]);
102
103
  var ReducerInputValidationResultSchema = z.object({ "valid": z.boolean(), "errorCode": z.string().optional(), "message": z.string().optional() }).strict();
103
- var InitializeRequestSchema = z.object({ "table": JsonValueSchema, "playerIds": z.array(z.string().min(1)), "rngSeed": z.union([z.number().refine(Number.isInteger, { message: "Expected integer" }), z.null()]).optional(), "setup": z.union([ReducerSetupSelectionSchema, z.null()]).optional() }).strict();
104
- var InitializePhaseRequestSchema = z.object({ "state": ReducerSessionStateSchema, "to": z.string().min(1) }).strict();
105
- var ValidateInputRequestSchema = z.object({ "state": ReducerSessionStateSchema, "input": GameInputSchema }).strict();
106
- var ReduceRequestSchema = z.object({ "state": ReducerSessionStateSchema, "input": GameInputSchema }).strict();
107
- var DispatchRequestSchema = z.object({ "state": ReducerSessionStateSchema, "input": GameInputSchema }).strict();
108
- var ReduceResultRejectSchema = z.object({ "kind": z.literal("reject"), "errorCode": z.string().min(1), "message": z.string().optional() }).strict();
109
104
  var GameOutcomeReasonSchema = z.object({ "code": z.string().min(1), "message": z.string().min(1).optional() }).strict();
110
105
  var OutcomeResultSchema = z.enum(["win", "draw", "loss", "eliminated"]);
111
106
  var OutcomeScoreComponentSchema = z.object({ "id": z.string().min(1), "label": z.string().min(1), "value": z.number().finite() }).strict();
@@ -115,6 +110,13 @@ var GameOutcomeSchema = z.object({ "reason": GameOutcomeReasonSchema, "standings
115
110
  var GameEventDetailSchema = z.object({ "label": z.string().min(1), "value": z.union([z.string(), z.number().finite(), z.boolean()]) }).strict();
116
111
  var SystemActionEventSchema = z.object({ "kind": z.literal("systemAction"), "procedureId": z.string().min(1), "title": z.string().min(1), "summary": z.string().min(1).optional(), "details": z.array(GameEventDetailSchema).max(16).optional() }).strict();
117
112
  var GameEventSchema = z.discriminatedUnion("kind", [SystemActionEventSchema]);
113
+ var InitializeResultSchema = z.object({ "state": ReducerSessionStateSchema, "terminal": GameOutcomeSchema.optional(), "events": z.array(GameEventSchema).optional() }).strict();
114
+ var InitializeRequestSchema = z.object({ "table": JsonValueSchema, "playerIds": z.array(z.string().min(1)), "rngSeed": z.union([z.number().refine(Number.isInteger, { message: "Expected integer" }), z.null()]).optional(), "setup": z.union([ReducerSetupSelectionSchema, z.null()]).optional() }).strict();
115
+ var InitializePhaseRequestSchema = z.object({ "state": ReducerSessionStateSchema, "to": z.string().min(1) }).strict();
116
+ var ValidateInputRequestSchema = z.object({ "state": ReducerSessionStateSchema, "input": GameInputSchema }).strict();
117
+ var ReduceRequestSchema = z.object({ "state": ReducerSessionStateSchema, "input": GameInputSchema }).strict();
118
+ var DispatchRequestSchema = z.object({ "state": ReducerSessionStateSchema, "input": GameInputSchema }).strict();
119
+ var ReduceResultRejectSchema = z.object({ "kind": z.literal("reject"), "errorCode": z.string().min(1), "message": z.string().optional() }).strict();
118
120
  var ReduceResultAcceptSchema = z.object({ "kind": z.literal("accept"), "state": ReducerSessionStateSchema, "terminal": GameOutcomeSchema.optional(), "effects": z.array(EffectSchema), "continuations": ContinuationMapSchema, "events": z.array(GameEventSchema).max(32) }).strict();
119
121
  var ReduceResultSchema = z.discriminatedUnion("kind", [ReduceResultRejectSchema, ReduceResultAcceptSchema]);
120
122
  var DispatchTraceAcceptedClientInputSchema = z.object({ "kind": z.literal("acceptedClientInput"), "input": GameInputSchema }).strict();
@@ -135,11 +137,34 @@ var SchedulerContinuationDependencySchema = z.object({ "waiterPlayerId": z.strin
135
137
  var SchedulerFlowAuthorityProjectionSchema = z.object({ "version": z.literal(1), "activePlayerIds": z.array(z.string().min(1)), "pendingPlayerIds": z.array(z.string().min(1)), "continuationDependencies": z.array(SchedulerContinuationDependencySchema) }).strict();
136
138
  var ProjectionTimingMetadataSchema = z.object({ "resolveAvailableInteractionsMs": z.number().finite().gte(0), "resolveViewMs": z.number().finite().gte(0), "resolveZoneHandlesMs": z.number().finite().gte(0), "descriptorHashMs": z.number().finite().gte(0) }).strict();
137
139
  var SeatProjectionBundleSchema = z.object({ "currentStage": z.union([z.string().min(1), z.null()]).optional(), "stageSeats": z.array(z.string().min(1)).optional(), "simultaneousPhase": z.union([SimultaneousPhaseProjectionSchema, z.null()]).optional(), "schedulerFlow": SchedulerFlowAuthorityProjectionSchema.optional(), "sharedView": JsonValueSchema.optional(), "interactionsByRef": JsonValueSchema.optional(), "seats": z.record(z.string(), SeatProjectionSchema), "timing": ProjectionTimingMetadataSchema.optional() }).strict();
138
- var ProjectSeatsDynamicRequestSchema = z.object({ "state": ReducerSessionStateSchema, "playerIds": z.array(z.string().min(1)), "projectionMode": z.union([z.enum(["full", "actionsOnly"]), z.null()]).optional() }).strict();
140
+ var ProjectRequestSchema = z.object({ "state": ReducerSessionStateSchema, "playerIds": z.array(z.string().min(1)) }).strict();
139
141
  var BoardStaticProjectionSchema = z.object({ "view": JsonValueSchema, "hash": z.string().min(1), "manifestVersion": z.string() }).strict();
140
142
 
141
143
  // ../reducer-contract/generated/version.ts
142
- var REDUCER_CONTRACT_VERSION = "0.4.0";
144
+ var REDUCER_CONTRACT_VERSION = "0.5.0";
145
+
146
+ // ../reducer-contract/src/bundle.ts
147
+ function assertReducerBundleContract(value, source) {
148
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
149
+ throw new Error(`Reducer bundle ${source} did not export an object.`);
150
+ }
151
+ const bundle = value;
152
+ if (bundle.reducerContractVersion !== REDUCER_CONTRACT_VERSION) {
153
+ throw new Error(
154
+ `Reducer bundle ${source} requires exact contract ${REDUCER_CONTRACT_VERSION}; received ${String(bundle.reducerContractVersion ?? "missing")}.`
155
+ );
156
+ }
157
+ for (const method of [
158
+ "initialize",
159
+ "dispatch",
160
+ "boardStatic",
161
+ "project"
162
+ ]) {
163
+ if (typeof bundle[method] !== "function") {
164
+ throw new Error(`Reducer bundle ${source} is missing ${method}().`);
165
+ }
166
+ }
167
+ }
143
168
 
144
169
  // ../reducer-contract/generated/builders.ts
145
170
  var builders_exports = {};
@@ -188,6 +213,7 @@ function materializeAccept(pending) {
188
213
  export {
189
214
  zod_exports,
190
215
  builders_exports,
191
- REDUCER_CONTRACT_VERSION
216
+ REDUCER_CONTRACT_VERSION,
217
+ assertReducerBundleContract
192
218
  };
193
- //# sourceMappingURL=chunk-3PFDHTR7.js.map
219
+ //# sourceMappingURL=chunk-2GQIALJL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../reducer-contract/generated/zod.ts","../../reducer-contract/generated/version.ts","../../reducer-contract/src/bundle.ts","../../reducer-contract/generated/builders.ts"],"sourcesContent":["// @generated by packages/reducer-contract/scripts/generate.ts\n// DO NOT EDIT BY HAND. Edit schema/reducer-runtime.schema.json and rerun `pnpm generate`.\n\n/* eslint-disable */\nimport type * as Wire from \"./wire\";\nimport { z } from \"zod\";\n\nexport const ReducerContractVersionSchema = z.string().regex(new RegExp(\"^[0-9]+\\\\.[0-9]+\\\\.[0-9]+$\"));\n\nexport const EffectIdSchema = z.string().min(1);\n\nlet JsonValueSchemaInternal: z.ZodType<Wire.JsonValue>;\nJsonValueSchemaInternal = z.lazy(() => z.union([z.record(z.string(), JsonValueSchemaInternal), z.array(JsonValueSchemaInternal), z.string(), z.number(), z.boolean(), z.null()]));\nexport const JsonValueSchema = JsonValueSchemaInternal;\n\nexport const ContinuationTokenSchema = z.object({ \"id\": z.string().min(1), \"data\": JsonValueSchema }).strict();\n\nexport const ContinuationMapSchema = z.record(z.string(), ContinuationTokenSchema);\n\nexport const ReducerSetupSelectionSchema = z.object({ \"profileId\": z.string().min(1), \"optionValues\": z.record(z.string(), z.union([z.string(), z.null()])) }).strict();\n\nexport const RngOperationParameterSchema = z.union([z.string(), z.number().finite(), z.boolean()]);\n\nexport const RngOperationSchema = z.object({ \"kind\": z.string().min(1), \"parameters\": z.record(z.string(), RngOperationParameterSchema) }).strict();\n\nexport const RngDrawSchema = z.object({ \"index\": z.number().int().gte(0), \"cursorBefore\": z.number().int().gte(0), \"cursorAfter\": z.number().int().gte(0), \"operation\": RngOperationSchema }).strict();\n\nexport const RngStateSchema = z.object({ \"seed\": z.union([z.number().refine(Number.isInteger, { message: \"Expected integer\" }), z.null()]), \"cursor\": z.number().int(), \"trace\": z.array(z.string()), \"draws\": z.array(RngDrawSchema).optional() }).strict();\n\nexport const ReducerFlowStateSchema = z.object({ \"currentPhase\": z.string().min(1), \"turn\": z.number().int(), \"round\": z.number().int(), \"activePlayers\": z.array(z.string().min(1)) }).strict();\n\nexport const RuntimeSimultaneousSubmissionSchema = z.object({ \"interactionId\": z.string().min(1), \"params\": JsonValueSchema }).strict();\n\nexport const RuntimeSimultaneousCurrentSchema = z.object({ \"phaseName\": z.string().min(1), \"actors\": z.array(z.string().min(1)), \"submissions\": z.record(z.string(), RuntimeSimultaneousSubmissionSchema) }).strict();\n\nexport const RuntimeSimultaneousStateSchema = z.object({ \"current\": z.union([RuntimeSimultaneousCurrentSchema, z.null()]) }).strict();\n\nexport const TransitionRecordSchema = z.object({ \"from\": z.string().min(1), \"to\": z.string().min(1) }).strict();\n\nexport const ReducerRuntimeStateSchema = z.object({ \"rng\": RngStateSchema, \"setup\": z.union([ReducerSetupSelectionSchema, z.null()]), \"simultaneous\": RuntimeSimultaneousStateSchema, \"lastTransition\": z.union([TransitionRecordSchema, z.null()]) }).strict();\n\nexport const ReducerDomainStateSchema = z.object({ \"table\": JsonValueSchema, \"publicState\": JsonValueSchema, \"privateState\": z.record(z.string(), JsonValueSchema), \"hiddenState\": JsonValueSchema, \"flow\": ReducerFlowStateSchema, \"phase\": JsonValueSchema }).strict();\n\nexport const ReducerSessionMetaSchema = z.object({ \"contractFingerprint\": z.string().regex(new RegExp(\"^cfp[0-9]+:[a-f0-9]{16}$\")) }).strict();\n\nexport const ReducerSessionStateSchema = z.object({ \"meta\": ReducerSessionMetaSchema.optional(), \"domain\": ReducerDomainStateSchema, \"runtime\": ReducerRuntimeStateSchema }).strict();\n\nexport const GameInputInteractionSchema = z.object({ \"kind\": z.literal(\"interaction\"), \"playerId\": z.string().min(1), \"interactionId\": z.string().min(1), \"params\": JsonValueSchema }).strict();\n\nexport const GameInputSchema = z.discriminatedUnion(\"kind\", [GameInputInteractionSchema]);\n\nexport const EffectTransitionSchema = z.object({ \"effectId\": EffectIdSchema, \"type\": z.literal(\"transition\"), \"to\": z.string().min(1) }).strict();\n\nexport const EffectRollDieSchema = z.object({ \"effectId\": EffectIdSchema, \"type\": z.literal(\"rollDie\"), \"dieId\": z.string().min(1) }).strict();\n\nexport const EffectShuffleSharedZoneSchema = z.object({ \"effectId\": EffectIdSchema, \"type\": z.literal(\"shuffleSharedZone\"), \"zoneId\": z.string().min(1) }).strict();\n\nexport const EffectShufflePlayerZoneSchema = z.object({ \"effectId\": EffectIdSchema, \"type\": z.literal(\"shufflePlayerZone\"), \"zoneId\": z.string().min(1), \"playerId\": z.string().min(1) }).strict();\n\nexport const EffectSchema = z.discriminatedUnion(\"type\", [EffectTransitionSchema, EffectRollDieSchema, EffectShuffleSharedZoneSchema, EffectShufflePlayerZoneSchema]);\n\nexport const ReducerInputValidationResultSchema = z.object({ \"valid\": z.boolean(), \"errorCode\": z.string().optional(), \"message\": z.string().optional() }).strict();\n\nexport const GameOutcomeReasonSchema = z.object({ \"code\": z.string().min(1), \"message\": z.string().min(1).optional() }).strict();\n\nexport const OutcomeResultSchema = z.enum([\"win\", \"draw\", \"loss\", \"eliminated\"]);\n\nexport const OutcomeScoreComponentSchema = z.object({ \"id\": z.string().min(1), \"label\": z.string().min(1), \"value\": z.number().finite() }).strict();\n\nexport const OutcomeTieBreakSchema = z.object({ \"id\": z.string().min(1), \"label\": z.string().min(1), \"value\": z.union([z.number().finite(), z.string()]) }).strict();\n\nexport const OutcomeStandingSchema = z.object({ \"playerId\": z.string().min(1), \"rank\": z.number().int().gte(1), \"result\": OutcomeResultSchema, \"score\": z.number().finite().optional(), \"scoreBreakdown\": z.array(OutcomeScoreComponentSchema).optional(), \"tieBreaks\": z.array(OutcomeTieBreakSchema).optional() }).strict();\n\nexport const GameOutcomeSchema = z.object({ \"reason\": GameOutcomeReasonSchema, \"standings\": z.array(OutcomeStandingSchema).min(1) }).strict();\n\nexport const GameEventDetailSchema = z.object({ \"label\": z.string().min(1), \"value\": z.union([z.string(), z.number().finite(), z.boolean()]) }).strict();\n\nexport const SystemActionEventSchema = z.object({ \"kind\": z.literal(\"systemAction\"), \"procedureId\": z.string().min(1), \"title\": z.string().min(1), \"summary\": z.string().min(1).optional(), \"details\": z.array(GameEventDetailSchema).max(16).optional() }).strict();\n\nexport const GameEventSchema = z.discriminatedUnion(\"kind\", [SystemActionEventSchema]);\n\nexport const InitializeResultSchema = z.object({ \"state\": ReducerSessionStateSchema, \"terminal\": GameOutcomeSchema.optional(), \"events\": z.array(GameEventSchema).optional() }).strict();\n\nexport const InitializeRequestSchema = z.object({ \"table\": JsonValueSchema, \"playerIds\": z.array(z.string().min(1)), \"rngSeed\": z.union([z.number().refine(Number.isInteger, { message: \"Expected integer\" }), z.null()]).optional(), \"setup\": z.union([ReducerSetupSelectionSchema, z.null()]).optional() }).strict();\n\nexport const InitializePhaseRequestSchema = z.object({ \"state\": ReducerSessionStateSchema, \"to\": z.string().min(1) }).strict();\n\nexport const ValidateInputRequestSchema = z.object({ \"state\": ReducerSessionStateSchema, \"input\": GameInputSchema }).strict();\n\nexport const ReduceRequestSchema = z.object({ \"state\": ReducerSessionStateSchema, \"input\": GameInputSchema }).strict();\n\nexport const DispatchRequestSchema = z.object({ \"state\": ReducerSessionStateSchema, \"input\": GameInputSchema }).strict();\n\nexport const ReduceResultRejectSchema = z.object({ \"kind\": z.literal(\"reject\"), \"errorCode\": z.string().min(1), \"message\": z.string().optional() }).strict();\n\nexport const ReduceResultAcceptSchema = z.object({ \"kind\": z.literal(\"accept\"), \"state\": ReducerSessionStateSchema, \"terminal\": GameOutcomeSchema.optional(), \"effects\": z.array(EffectSchema), \"continuations\": ContinuationMapSchema, \"events\": z.array(GameEventSchema).max(32) }).strict();\n\nexport const ReduceResultSchema = z.discriminatedUnion(\"kind\", [ReduceResultRejectSchema, ReduceResultAcceptSchema]);\n\nexport const DispatchTraceAcceptedClientInputSchema = z.object({ \"kind\": z.literal(\"acceptedClientInput\"), \"input\": GameInputSchema }).strict();\n\nexport const DispatchTraceAppliedEffectSchema = z.object({ \"kind\": z.literal(\"appliedEffect\"), \"effect\": EffectSchema, \"continuation\": ContinuationTokenSchema.optional() }).strict();\n\nexport const DispatchTraceRngConsumptionSchema = z.object({ \"kind\": z.literal(\"rngConsumption\"), \"version\": z.literal(2), \"operation\": z.string().min(1), \"drawIndex\": z.number().int().gte(0), \"traceEntry\": z.string() }).strict();\n\nexport const DispatchTraceSchema = z.discriminatedUnion(\"kind\", [DispatchTraceAcceptedClientInputSchema, DispatchTraceAppliedEffectSchema, DispatchTraceRngConsumptionSchema]);\n\nexport const DispatchResultRejectSchema = z.object({ \"kind\": z.literal(\"reject\"), \"errorCode\": z.string().min(1), \"message\": z.string().optional() }).strict();\n\nexport const DispatchResultAcceptSchema = z.object({ \"kind\": z.literal(\"accept\"), \"state\": ReducerSessionStateSchema, \"terminal\": GameOutcomeSchema.optional(), \"trace\": z.array(DispatchTraceSchema), \"events\": z.array(GameEventSchema).max(32) }).strict();\n\nexport const DispatchResultSchema = z.discriminatedUnion(\"kind\", [DispatchResultRejectSchema, DispatchResultAcceptSchema]);\n\nexport const ReducerRuntimeLogEntryAcceptedClientInputSchema = z.object({ \"kind\": z.literal(\"acceptedClientInput\"), \"version\": z.number().int(), \"input\": GameInputSchema }).strict();\n\nexport const ReducerRuntimeLogEntryAppliedEffectSchema = z.object({ \"kind\": z.literal(\"appliedEffect\"), \"version\": z.number().int(), \"effect\": EffectSchema, \"continuation\": z.union([ContinuationTokenSchema, z.null()]) }).strict();\n\nexport const ReducerRuntimeLogEntryRngConsumptionSchema = z.object({ \"kind\": z.literal(\"rngConsumption\"), \"version\": z.number().int(), \"operation\": z.string().min(1), \"drawIndex\": z.number().int().gte(0).optional(), \"traceEntry\": z.string() }).strict();\n\nexport const ReducerRuntimeLogEntryStateCommitSchema = z.object({ \"kind\": z.literal(\"stateCommit\"), \"version\": z.number().int(), \"state\": ReducerSessionStateSchema }).strict();\n\nexport const ReducerRuntimeLogEntrySchema = z.discriminatedUnion(\"kind\", [ReducerRuntimeLogEntryAcceptedClientInputSchema, ReducerRuntimeLogEntryAppliedEffectSchema, ReducerRuntimeLogEntryRngConsumptionSchema, ReducerRuntimeLogEntryStateCommitSchema]);\n\nexport const SeatProjectionSchema = z.object({ \"view\": JsonValueSchema.optional(), \"availableInteractionRefs\": JsonValueSchema.optional(), \"zones\": JsonValueSchema.optional() }).strict();\n\nexport const SimultaneousPhaseProjectionSchema = z.object({ \"phaseName\": z.string().min(1), \"interactionId\": z.string().min(1), \"actorIds\": z.array(z.string().min(1)), \"sealedPlayerIds\": z.array(z.string().min(1)), \"pendingPlayerIds\": z.array(z.string().min(1)) }).strict();\n\nexport const SchedulerContinuationDependencySchema = z.object({ \"waiterPlayerId\": z.string().min(1), \"blockerPlayerIds\": z.array(z.string().min(1)) }).strict();\n\nexport const SchedulerFlowAuthorityProjectionSchema = z.object({ \"version\": z.literal(1), \"activePlayerIds\": z.array(z.string().min(1)), \"pendingPlayerIds\": z.array(z.string().min(1)), \"continuationDependencies\": z.array(SchedulerContinuationDependencySchema) }).strict();\n\nexport const ProjectionTimingMetadataSchema = z.object({ \"resolveAvailableInteractionsMs\": z.number().finite().gte(0), \"resolveViewMs\": z.number().finite().gte(0), \"resolveZoneHandlesMs\": z.number().finite().gte(0), \"descriptorHashMs\": z.number().finite().gte(0) }).strict();\n\nexport const SeatProjectionBundleSchema = z.object({ \"currentStage\": z.union([z.string().min(1), z.null()]).optional(), \"stageSeats\": z.array(z.string().min(1)).optional(), \"simultaneousPhase\": z.union([SimultaneousPhaseProjectionSchema, z.null()]).optional(), \"schedulerFlow\": SchedulerFlowAuthorityProjectionSchema.optional(), \"sharedView\": JsonValueSchema.optional(), \"interactionsByRef\": JsonValueSchema.optional(), \"seats\": z.record(z.string(), SeatProjectionSchema), \"timing\": ProjectionTimingMetadataSchema.optional() }).strict();\n\nexport const ProjectRequestSchema = z.object({ \"state\": ReducerSessionStateSchema, \"playerIds\": z.array(z.string().min(1)) }).strict();\n\nexport const BoardStaticProjectionSchema = z.object({ \"view\": JsonValueSchema, \"hash\": z.string().min(1), \"manifestVersion\": z.string() }).strict();\n","// @generated by packages/reducer-contract/scripts/generate.ts\n// DO NOT EDIT BY HAND. Edit schema/reducer-runtime.schema.json and rerun `pnpm generate`.\n\n/**\n * The wire-protocol version this package implements. Bumped in lockstep with\n * any breaking change to schema/reducer-runtime.schema.json. At bundle load\n * time hosts require bundles to carry this exact version.\n */\nexport const REDUCER_CONTRACT_VERSION = \"0.5.0\" as const;\n","// @generated by packages/reducer-contract/scripts/generate.ts\n// DO NOT EDIT BY HAND. Edit schema/reducer-runtime.operations.json and rerun `pnpm generate`.\n\n/* eslint-disable */\nimport type * as Wire from \"../generated/wire\";\nimport { REDUCER_CONTRACT_VERSION } from \"../generated/version\";\n\nexport type MaybePromise<T> = T | Promise<T>;\n\n/**\n * Canonical erased reducer boundary for `createReducerBundle(...)`.\n *\n * The callable method list is generated from\n * `schema/reducer-runtime.operations.json`; payload DTOs come from\n * `schema/reducer-runtime.schema.json`.\n *\n * This interface models the host/guest surface only. The concrete\n * authored bundle stays strongly typed in `@dreamboard-games/sdk/reducer`, but every\n * cross-runtime caller should agree on this shape.\n */\nexport interface ReducerBundleContract {\n readonly reducerContractVersion: Wire.ReducerContractVersion;\n initialize(\n input: Wire.InitializeRequest,\n ): MaybePromise<Wire.InitializeResult>;\n dispatch(input: Wire.DispatchRequest): MaybePromise<Wire.DispatchResult>;\n boardStatic(): Wire.BoardStaticProjection | null;\n project(input: Wire.ProjectRequest): Wire.SeatProjectionBundle;\n}\n\n/**\n * Validates an imported module value at the reducer host/guest boundary.\n *\n * The required callable members are generated from the same operation\n * authority as `ReducerBundleContract`, so runtime admission cannot drift\n * from the published TypeScript interface.\n * The contract version must match exactly.\n */\nexport function assertReducerBundleContract(\n value: unknown,\n source: string,\n): asserts value is ReducerBundleContract {\n if (!value || typeof value !== \"object\" || Array.isArray(value)) {\n throw new Error(`Reducer bundle ${source} did not export an object.`);\n }\n\n const bundle = value as Record<string, unknown>;\n if (bundle.reducerContractVersion !== REDUCER_CONTRACT_VERSION) {\n throw new Error(\n `Reducer bundle ${source} requires exact contract ${REDUCER_CONTRACT_VERSION}; received ${String(bundle.reducerContractVersion ?? \"missing\")}.`,\n );\n }\n\n for (const method of [\n \"initialize\",\n \"dispatch\",\n \"boardStatic\",\n \"project\",\n ] as const) {\n if (typeof bundle[method] !== \"function\") {\n throw new Error(`Reducer bundle ${source} is missing ${method}().`);\n }\n }\n}\n","// @generated by packages/reducer-contract/scripts/generate.ts\n// DO NOT EDIT BY HAND. Edit schema/reducer-runtime.schema.json and rerun `pnpm generate`.\n\n/* eslint-disable */\nimport type * as Wire from \"./wire\";\n\n/**\n * Typed effect constructors. Authors MUST go through these; hand-constructing\n * Wire.Effect objects is banned by convention because it's how wire drift\n * re-enters the codebase.\n *\n * The `effectId` is minted by the runtime (see createEffectIdMinter below),\n * not by the author. Each builder returns a `PendingEffect` that carries\n * the optional continuation; the reducer bundle's accept materializer splits\n * pending effects into the wire's `effects[]` + `continuations` map.\n */\n\nexport type PendingEffect = Wire.Effect & {\n readonly __continuation?: Wire.ContinuationToken;\n};\n\nexport type EffectIdMinter = () => Wire.EffectId;\n\n/**\n * Produces sequential, deterministic effect ids scoped to a single accept\n * payload: \"ef0\", \"ef1\", ... . Uniqueness only needs to be local to the\n * payload because the host consumes and discards them per dispatch.\n */\nexport function createEffectIdMinter(): EffectIdMinter {\n let i = 0;\n return () => `ef${i++}` as Wire.EffectId;\n}\n\nexport type EffectBuilders = {\n transition(args: { to: string }, continuation?: Wire.ContinuationToken): PendingEffect;\n rollDie(args: { dieId: string }, continuation?: Wire.ContinuationToken): PendingEffect;\n shuffleSharedZone(args: { zoneId: string }, continuation?: Wire.ContinuationToken): PendingEffect;\n shufflePlayerZone(args: { zoneId: string; playerId: string }, continuation?: Wire.ContinuationToken): PendingEffect;\n};\n\nexport function createEffectBuilders(mint: EffectIdMinter): EffectBuilders {\n return {\n transition(args, continuation) {\n const effect = { effectId: mint(), type: \"transition\" as const, to: args.to };\n return continuation === undefined\n ? (effect as PendingEffect)\n : Object.assign(effect, { __continuation: continuation });\n },\n rollDie(args, continuation) {\n const effect = { effectId: mint(), type: \"rollDie\" as const, dieId: args.dieId };\n return continuation === undefined\n ? (effect as PendingEffect)\n : Object.assign(effect, { __continuation: continuation });\n },\n shuffleSharedZone(args, continuation) {\n const effect = { effectId: mint(), type: \"shuffleSharedZone\" as const, zoneId: args.zoneId };\n return continuation === undefined\n ? (effect as PendingEffect)\n : Object.assign(effect, { __continuation: continuation });\n },\n shufflePlayerZone(args, continuation) {\n const effect = { effectId: mint(), type: \"shufflePlayerZone\" as const, zoneId: args.zoneId, playerId: args.playerId };\n return continuation === undefined\n ? (effect as PendingEffect)\n : Object.assign(effect, { __continuation: continuation });\n },\n };\n}\n\n/**\n * Takes a list of PendingEffects and splits them into the canonical wire\n * shape: `effects[]` (stripped of `__continuation`) + `continuations` map\n * keyed by effectId. Use at the boundary where reduce/dispatch results leave\n * author code and enter the wire.\n */\nexport function materializeAccept(pending: ReadonlyArray<PendingEffect>): {\n effects: Wire.Effect[];\n continuations: Wire.ContinuationMap;\n} {\n const effects: Wire.Effect[] = [];\n const continuations: Wire.ContinuationMap = {};\n for (const pe of pending) {\n const { __continuation, ...effect } = pe as PendingEffect & { __continuation?: Wire.ContinuationToken };\n effects.push(effect as Wire.Effect);\n if (__continuation !== undefined) {\n continuations[(effect as Wire.Effect).effectId] = __continuation;\n }\n }\n return { effects, continuations };\n}\n"],"mappings":";;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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