@seriousgaming/sdk-tools 1.9.0 → 1.11.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 (178) hide show
  1. package/dist/agent/guidance.md +31 -23
  2. package/dist/{cli-KJV3GGBA.js → cli-226ZJ72R.js} +1 -1
  3. package/dist/{cli-VRGVHSXH.js → cli-25SJZI7N.js} +44 -9
  4. package/dist/{cli-YI3WZF3C.js → cli-27TQVLVF.js} +11 -11
  5. package/dist/cli-27Z5T52R.js +30 -0
  6. package/dist/cli-3VLBFWHN.js +36 -0
  7. package/dist/{cli-DXHPYN4N.js → cli-44CM2AH2.js} +1 -1
  8. package/dist/{cli-2PMLR6WG.js → cli-4F24FUW6.js} +15 -15
  9. package/dist/{cli-6GDPO5VU.js → cli-4FJL3KQZ.js} +2 -2
  10. package/dist/{cli-2BF7KBBJ.js → cli-5ATO27Z4.js} +15 -15
  11. package/dist/{cli-AA5GMEUL.js → cli-5EH4WTH4.js} +4 -4
  12. package/dist/{cli-MPWTXNF6.js → cli-5M6KDNVX.js} +2 -2
  13. package/dist/{cli-J2OTL6JH.js → cli-5O7XENQY.js} +5 -5
  14. package/dist/{cli-XA4IL7IM.js → cli-5RRPUL6V.js} +11 -11
  15. package/dist/{cli-JEMWAIAA.js → cli-5TTJWM2R.js} +15 -15
  16. package/dist/{cli-S3YIYAXC.js → cli-5UKWX3IU.js} +12 -12
  17. package/dist/{cli-AEAFLZGY.js → cli-5VZBFMCK.js} +5 -1
  18. package/dist/{cli-AGYCXRPR.js → cli-5Z4D3F6Y.js} +3 -3
  19. package/dist/{cli-ZHFHOWJI.js → cli-6AMK3DYS.js} +11 -11
  20. package/dist/{cli-G7JTIP5G.js → cli-6BLVI2JM.js} +11 -7
  21. package/dist/{cli-SBKTGFY4.js → cli-6JWDFCUV.js} +17 -17
  22. package/dist/{cli-7OCEVQQN.js → cli-6O7YCK2M.js} +2 -2
  23. package/dist/{cli-GZE4V7RC.js → cli-6P6V2EHY.js} +19 -19
  24. package/dist/{cli-KD2RQS35.js → cli-77T4LJQF.js} +22 -19
  25. package/dist/{cli-IC5FOT2J.js → cli-7JUNA74L.js} +1 -1
  26. package/dist/{cli-2FXZZLCL.js → cli-AH6AMAIB.js} +1 -1
  27. package/dist/{cli-NTI22MRE.js → cli-ATAJSIXH.js} +16 -16
  28. package/dist/{cli-OOTGO3KW.js → cli-ATHATKI5.js} +49 -49
  29. package/dist/{cli-QWO3XJR3.js → cli-ATWJCB2G.js} +4 -4
  30. package/dist/{cli-QIHVXDMW.js → cli-B2QAJ5RQ.js} +15 -15
  31. package/dist/{cli-MN7X4UG2.js → cli-B3EFE7ZF.js} +1 -1
  32. package/dist/{cli-HJPNNORV.js → cli-BC67QHD5.js} +2 -2
  33. package/dist/cli-BINVO5R7.js +36 -0
  34. package/dist/{cli-PJO4BKSV.js → cli-BJFYGVJV.js} +16 -16
  35. package/dist/{cli-C45A5VX6.js → cli-BQ36DV5C.js} +3 -3
  36. package/dist/{cli-IJPRZSJ5.js → cli-BZOKZ7LP.js} +24 -22
  37. package/dist/{cli-GHIMH6JU.js → cli-C32Q5E5I.js} +1 -1
  38. package/dist/{cli-35K37SYY.js → cli-D3S7NJZ3.js} +14 -14
  39. package/dist/{cli-KGJHEDR2.js → cli-DBMEH4Y5.js} +23 -21
  40. package/dist/{cli-A7PITFRR.js → cli-DH35TZ2Q.js} +5 -3
  41. package/dist/{cli-A3P3PO6Z.js → cli-DQE7ITIR.js} +15 -15
  42. package/dist/{cli-BV7MX7JE.js → cli-EEO5ZPAZ.js} +3 -3
  43. package/dist/{cli-3RMP4HKZ.js → cli-ERJNDBDH.js} +2 -2
  44. package/dist/{cli-2JEICVMA.js → cli-F3YJKP6D.js} +3 -3
  45. package/dist/{cli-2VV5IPSY.js → cli-FT3X3D4P.js} +15 -15
  46. package/dist/{cli-LZFUSEJT.js → cli-FYPW25VD.js} +13 -13
  47. package/dist/{cli-CVOLMK3Z.js → cli-G2GLW5Z4.js} +1 -1
  48. package/dist/{cli-BYXNPBVG.js → cli-G3TU6CP6.js} +15 -15
  49. package/dist/{cli-4L7S27XO.js → cli-GO64NABP.js} +1 -1
  50. package/dist/{cli-XRVH5WV6.js → cli-GSOV26O5.js} +13 -13
  51. package/dist/{cli-2UOUIVHW.js → cli-H6PP2MZT.js} +24 -12
  52. package/dist/{cli-6Y4XIVQS.js → cli-HGCOEL5T.js} +3 -3
  53. package/dist/cli-HLI5UEKX.js +36 -0
  54. package/dist/{cli-B5LZEFLU.js → cli-HMDYG6PS.js} +15 -15
  55. package/dist/{cli-7CW2BBJG.js → cli-HNDFANQG.js} +1 -1
  56. package/dist/{cli-MSSJLABW.js → cli-IKSLPAZN.js} +3 -3
  57. package/dist/{cli-AJ5CABGJ.js → cli-JHLWBRXB.js} +15 -15
  58. package/dist/{cli-5PTCQTS6.js → cli-JXQLHJO2.js} +1 -1
  59. package/dist/{cli-H7T6E7OA.js → cli-K4HSQWXC.js} +2 -2
  60. package/dist/{cli-WJO75KP7.js → cli-KIZTASLL.js} +3 -3
  61. package/dist/{cli-MX7GFQ6N.js → cli-KJA6GLZI.js} +14 -14
  62. package/dist/{cli-KINJAQTJ.js → cli-L7F4XKCB.js} +19 -19
  63. package/dist/{cli-BC4KKNLA.js → cli-LHMRUJVN.js} +4 -2
  64. package/dist/{cli-CQUSM3SF.js → cli-LPFSJ625.js} +19 -19
  65. package/dist/{cli-BNN36WZJ.js → cli-MDVC5ZNM.js} +13 -13
  66. package/dist/{cli-TLRTLTGK.js → cli-MSNSXVGF.js} +18 -18
  67. package/dist/{cli-5BPQ73OM.js → cli-NKKCDO6K.js} +15 -15
  68. package/dist/{cli-L5ZKQNMI.js → cli-OBLEROSC.js} +15 -15
  69. package/dist/cli-OF36EA62.js +36 -0
  70. package/dist/{cli-MZM4MW7C.js → cli-OM32UURE.js} +19 -19
  71. package/dist/{cli-J75EBRAJ.js → cli-OMTHTWYJ.js} +17 -17
  72. package/dist/{cli-K6M6YB67.js → cli-OTBCA54D.js} +1 -1
  73. package/dist/cli-OVIJRBFI.js +36 -0
  74. package/dist/{cli-IVZ7AHUJ.js → cli-OXLOGXT3.js} +3 -3
  75. package/dist/{cli-NU4SCD5D.js → cli-P3NUTOPK.js} +1 -1
  76. package/dist/{cli-D6AC3ZCX.js → cli-PNS4KWWC.js} +22 -19
  77. package/dist/{cli-7N7WFRWA.js → cli-PXQYY6KM.js} +0 -0
  78. package/dist/{cli-MTAGL3QE.js → cli-Q7QSWNY2.js} +15 -15
  79. package/dist/{cli-7V6GUIIS.js → cli-QDBYFITU.js} +2 -2
  80. package/dist/{cli-QK2OD24J.js → cli-QEFYDXMH.js} +9 -2
  81. package/dist/{cli-MYBDWJP7.js → cli-QPV3TYOM.js} +20 -20
  82. package/dist/{cli-W4BHSBAX.js → cli-QTCTWYCM.js} +3 -3
  83. package/dist/{cli-HCMVZXWK.js → cli-R5SNTPND.js} +17 -17
  84. package/dist/{cli-RHYQYXE2.js → cli-REAM7LSC.js} +18 -18
  85. package/dist/{cli-GHQIATHP.js → cli-RHL4B4H7.js} +6 -5
  86. package/dist/{cli-RL5EBZL7.js → cli-RKPQLB7J.js} +3 -3
  87. package/dist/{cli-E77R7ZYB.js → cli-RMD5WSUQ.js} +15 -15
  88. package/dist/{cli-OX3254NS.js → cli-S3NHXAJM.js} +17 -17
  89. package/dist/{cli-6COAU7JR.js → cli-SRXDLMXY.js} +17 -17
  90. package/dist/{cli-DMKRP33X.js → cli-TCQJL2GY.js} +1 -1
  91. package/dist/{cli-KO26S2CL.js → cli-TEBV2OIW.js} +31 -14
  92. package/dist/{cli-USBJQAYI.js → cli-TI2FOFPA.js} +13 -13
  93. package/dist/{cli-7RLZIWFP.js → cli-TLSTSZAC.js} +19 -19
  94. package/dist/{cli-2CSI2UU2.js → cli-UEQMK4WX.js} +1 -1
  95. package/dist/cli-UIYKPSIY.js +36 -0
  96. package/dist/{cli-2I6UN6C3.js → cli-UQC46YSV.js} +3 -3
  97. package/dist/{cli-BF6L37O3.js → cli-UULZSQBV.js} +3 -3
  98. package/dist/{cli-OK6XWVIN.js → cli-UVIURDZC.js} +17 -17
  99. package/dist/{cli-6KL5B7EC.js → cli-VXLHOZSO.js} +15 -15
  100. package/dist/{cli-UR63LFVK.js → cli-W3RG2MRI.js} +2 -2
  101. package/dist/{cli-G54355N5.js → cli-WJVPSVF2.js} +22 -19
  102. package/dist/{cli-YD4SBAHQ.js → cli-WNBP3LOD.js} +19 -19
  103. package/dist/{cli-DJCQ5XFR.js → cli-WNHMJM3Z.js} +15 -15
  104. package/dist/{cli-CL3KF5KS.js → cli-WQ7JBZNW.js} +2 -2
  105. package/dist/{cli-VTLFQHDO.js → cli-WW54THXN.js} +1 -1
  106. package/dist/cli-WZNIW6ZO.js +16 -0
  107. package/dist/{cli-BT47H36C.js → cli-X3TSTTYI.js} +2 -2
  108. package/dist/{cli-ICLCA6VD.js → cli-X52TXCNF.js} +19 -19
  109. package/dist/{cli-ZZSPFLTK.js → cli-X64BNBQH.js} +26 -4
  110. package/dist/{cli-CKV44U7P.js → cli-XJ7JESC2.js} +19 -19
  111. package/dist/{cli-EDZF5Q2E.js → cli-XKAIDYIE.js} +14 -14
  112. package/dist/{cli-CPX4YA3P.js → cli-XNOAO6DY.js} +11 -11
  113. package/dist/{cli-R6YAZP6E.js → cli-XOYUTNER.js} +19 -19
  114. package/dist/{cli-3VV2JLHX.js → cli-XW3JLRSA.js} +1 -1
  115. package/dist/{cli-S7PLSPGE.js → cli-YYXAGJQR.js} +15 -15
  116. package/dist/{cli-LFUKHLHI.js → cli-ZGCG6C22.js} +17 -17
  117. package/dist/{cli-QRAYIXNE.js → cli-ZJW6HQ6N.js} +5 -5
  118. package/dist/{cli-Y33ULHYO.js → cli-ZNQBF4Z3.js} +1 -1
  119. package/dist/cli.js +52 -52
  120. package/dist/client/index.d.ts +1 -1
  121. package/dist/client/test-session.d.ts +44 -6
  122. package/dist/client.js +100 -12
  123. package/dist/dev/console/assets/{index-CVNjiRUh.js → index-Ch6HHb2T.js} +1 -1
  124. package/dist/dev/console/index.html +1 -1
  125. package/dist/dev/surfaces.d.ts +8 -2
  126. package/dist/docs/api/index.md +3 -1
  127. package/dist/docs/api/sdk-tools-client.md +38 -6
  128. package/dist/docs/api/sdk-tools-vite.md +21 -0
  129. package/dist/docs/api/sdk.md +2 -0
  130. package/dist/docs/changelog.md +49 -0
  131. package/dist/docs/cli-error-codes.md +41 -39
  132. package/dist/docs/cli-reference.md +2 -1
  133. package/dist/docs/guides/endpoints.md +1 -1
  134. package/dist/docs/guides/engine-testing.md +49 -14
  135. package/dist/docs/guides/engine.md +2 -2
  136. package/dist/docs/guides/scenario-editor.md +1 -1
  137. package/dist/docs/guides/setup.md +22 -5
  138. package/dist/docs/guides/testing.md +3 -8
  139. package/dist/docs/guides/upgrading.md +15 -0
  140. package/dist/docs/page-index.md +6 -5
  141. package/dist/docs/recipes/create-game.md +1 -1
  142. package/dist/docs/recipes/fix-duplicate-packages.md +8 -19
  143. package/dist/docs/recipes/give-setup-a-menu.md +7 -1
  144. package/dist/docs/recipes/write-setup-notes.md +2 -2
  145. package/dist/host/protocol.d.ts +8 -5
  146. package/dist/oxlint/logic.json +184 -0
  147. package/dist/playwright.js +100 -12
  148. package/dist/runtime/manifest-version.d.ts +1 -1
  149. package/dist/runtime.js +1 -1
  150. package/dist/schema.json +20 -0
  151. package/dist/templates/package/README.md.liquid +1 -0
  152. package/dist/templates/package/claude/rules/workflow-create-engine.md +1 -1
  153. package/dist/templates/package/claude/rules/workflow-create-user-interface.md +1 -1
  154. package/dist/templates/package/claude/rules/workflow-test-engine-or-ui.md +1 -1
  155. package/dist/templates/package/claude/rules/workflow-update-sdk-version.md +2 -2
  156. package/dist/templates/package/claude/settings.json.template +1 -0
  157. package/dist/templates/package/oxfmtrc.json.template +8 -1
  158. package/dist/templates/package/oxlintrc.json.template +1 -180
  159. package/dist/templates/package/package.json.liquid +1 -0
  160. package/dist/templates/package/vite.config.ts.liquid +2 -8
  161. package/dist/templates/package/vitest.config.ts.liquid +2 -8
  162. package/dist/templates/starter-game/package.json +2 -1
  163. package/dist/templates/starter-game/testing/engine/game.engine.test.ts +62 -37
  164. package/dist/templates/starter-game/vite.config.ts +2 -8
  165. package/dist/templates/starter-game/vitest.config.ts +4 -3
  166. package/dist/utils/error-codes.d.ts +6 -2
  167. package/dist/utils/resource-scan.d.ts +5 -0
  168. package/dist/vite/index.d.ts +30 -0
  169. package/dist/vite.js +12 -0
  170. package/package.json +12 -4
  171. package/dist/cli-3I6AI4AA.js +0 -36
  172. package/dist/cli-3YGNWZC6.js +0 -30
  173. package/dist/cli-4X3X4HB2.js +0 -16
  174. package/dist/cli-6ZBQELF2.js +0 -36
  175. package/dist/cli-CUZUIYCQ.js +0 -36
  176. package/dist/cli-DNCJURUU.js +0 -36
  177. package/dist/cli-UKC7KXWU.js +0 -36
  178. package/dist/cli-WA2PDQUB.js +0 -36
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CliError
4
- } from "./cli-AEAFLZGY.js";
4
+ } from "./cli-5VZBFMCK.js";
5
5
 
6
6
  // cli/dev/lockfile.ts
7
7
  import { createHash, randomUUID } from "crypto";
package/dist/cli.js CHANGED
@@ -2,21 +2,21 @@
2
2
  import {
3
3
  RESOURCE_DESCRIPTORS,
4
4
  lazy
5
- } from "./cli-OOTGO3KW.js";
5
+ } from "./cli-ATHATKI5.js";
6
6
  import {
7
7
  DEV_PORT_ENV_VAR,
8
8
  ERROR_OVERLAY_ENV_VAR,
9
9
  defaultDevPort
10
- } from "./cli-GHIMH6JU.js";
10
+ } from "./cli-C32Q5E5I.js";
11
11
  import {
12
12
  PUBLIC_ASSET_URL_ENV_VAR,
13
13
  PUBLIC_HMR_URL_ENV_VAR,
14
14
  PUBLIC_URL_ENV_VAR
15
- } from "./cli-CVOLMK3Z.js";
15
+ } from "./cli-G2GLW5Z4.js";
16
16
  import {
17
17
  setAssumeYes,
18
18
  setPromptUsage
19
- } from "./cli-NU4SCD5D.js";
19
+ } from "./cli-P3NUTOPK.js";
20
20
  import {
21
21
  compact,
22
22
  indent,
@@ -24,7 +24,7 @@ import {
24
24
  } from "./cli-F2D4GGUA.js";
25
25
  import {
26
26
  setVerboseMode
27
- } from "./cli-DMKRP33X.js";
27
+ } from "./cli-TCQJL2GY.js";
28
28
  import {
29
29
  CliError,
30
30
  beginCommand,
@@ -35,7 +35,7 @@ import {
35
35
  jsonRequestedByEnvironment,
36
36
  processExitRequested,
37
37
  setCommandPath
38
- } from "./cli-AEAFLZGY.js";
38
+ } from "./cli-5VZBFMCK.js";
39
39
 
40
40
  // cli/program.ts
41
41
  import { cwd } from "process";
@@ -138,67 +138,67 @@ function newFileHelp(spec) {
138
138
  }
139
139
 
140
140
  // cli/program.ts
141
- var blobUploadCommand = lazy(() => import("./cli-UR63LFVK.js"), "blobUploadCommand");
142
- var buildCommand = lazy(() => import("./cli-2UOUIVHW.js"), "buildCommand");
143
- var buildEngineCommand = lazy(() => import("./cli-AA5GMEUL.js"), "buildEngineCommand");
144
- var configGetCommand = lazy(() => import("./cli-IVZ7AHUJ.js"), "configGetCommand");
145
- var configPathCommand = lazy(() => import("./cli-IVZ7AHUJ.js"), "configPathCommand");
146
- var configSetCommand = lazy(() => import("./cli-IVZ7AHUJ.js"), "configSetCommand");
147
- var configureCommand = lazy(() => import("./cli-EDZF5Q2E.js"), "configureCommand");
148
- var deleteCommand = lazy(() => import("./cli-ZHFHOWJI.js"), "deleteCommand");
149
- var devCommand = lazy(() => import("./cli-OK6XWVIN.js"), "devCommand");
150
- var devStatusCommand = lazy(() => import("./cli-AGYCXRPR.js"), "devStatusCommand");
151
- var devStopCommand = lazy(() => import("./cli-AGYCXRPR.js"), "devStopCommand");
152
- var docsCommand = lazy(() => import("./cli-DXHPYN4N.js"), "docsCommand");
153
- var docsExportCommand = lazy(() => import("./cli-IC5FOT2J.js"), "docsExportCommand");
141
+ var blobUploadCommand = lazy(() => import("./cli-W3RG2MRI.js"), "blobUploadCommand");
142
+ var buildCommand = lazy(() => import("./cli-H6PP2MZT.js"), "buildCommand");
143
+ var buildEngineCommand = lazy(() => import("./cli-5EH4WTH4.js"), "buildEngineCommand");
144
+ var configGetCommand = lazy(() => import("./cli-OXLOGXT3.js"), "configGetCommand");
145
+ var configPathCommand = lazy(() => import("./cli-OXLOGXT3.js"), "configPathCommand");
146
+ var configSetCommand = lazy(() => import("./cli-OXLOGXT3.js"), "configSetCommand");
147
+ var configureCommand = lazy(() => import("./cli-XKAIDYIE.js"), "configureCommand");
148
+ var deleteCommand = lazy(() => import("./cli-6AMK3DYS.js"), "deleteCommand");
149
+ var devCommand = lazy(() => import("./cli-UVIURDZC.js"), "devCommand");
150
+ var devStatusCommand = lazy(() => import("./cli-5Z4D3F6Y.js"), "devStatusCommand");
151
+ var devStopCommand = lazy(() => import("./cli-5Z4D3F6Y.js"), "devStopCommand");
152
+ var docsCommand = lazy(() => import("./cli-44CM2AH2.js"), "docsCommand");
153
+ var docsExportCommand = lazy(() => import("./cli-7JUNA74L.js"), "docsExportCommand");
154
154
  var endpointAuditCommand = lazy(
155
- () => import("./cli-XA4IL7IM.js"),
155
+ () => import("./cli-5RRPUL6V.js"),
156
156
  "endpointAuditCommand"
157
157
  );
158
- var endpointCallCommand = lazy(() => import("./cli-AJ5CABGJ.js"), "endpointCallCommand");
159
- var endpointListCommand = lazy(() => import("./cli-6Y4XIVQS.js"), "endpointListCommand");
160
- var generateCommand = lazy(() => import("./cli-4X3X4HB2.js"), "generateCommand");
161
- var initCommand = lazy(() => import("./cli-XRVH5WV6.js"), "initCommand");
162
- var newCommand = lazy(() => import("./cli-CPX4YA3P.js"), "newCommand");
158
+ var endpointCallCommand = lazy(() => import("./cli-JHLWBRXB.js"), "endpointCallCommand");
159
+ var endpointListCommand = lazy(() => import("./cli-HGCOEL5T.js"), "endpointListCommand");
160
+ var generateCommand = lazy(() => import("./cli-WZNIW6ZO.js"), "generateCommand");
161
+ var initCommand = lazy(() => import("./cli-GSOV26O5.js"), "initCommand");
162
+ var newCommand = lazy(() => import("./cli-XNOAO6DY.js"), "newCommand");
163
163
  var packageBundleCommand = lazy(
164
- () => import("./cli-C45A5VX6.js"),
164
+ () => import("./cli-BQ36DV5C.js"),
165
165
  "packageBundleCommand"
166
166
  );
167
167
  var packagePublishCommand = lazy(
168
- () => import("./cli-J2OTL6JH.js"),
168
+ () => import("./cli-5O7XENQY.js"),
169
169
  "packagePublishCommand"
170
170
  );
171
171
  var packageVersionCommand = lazy(
172
- () => import("./cli-6GDPO5VU.js"),
172
+ () => import("./cli-4FJL3KQZ.js"),
173
173
  "packageVersionCommand"
174
174
  );
175
- var patchCommand = lazy(() => import("./cli-MX7GFQ6N.js"), "patchCommand");
176
- var resolveCommand = lazy(() => import("./cli-MSSJLABW.js"), "resolveCommand");
177
- var screenshotCommand = lazy(() => import("./cli-OX3254NS.js"), "screenshotCommand");
178
- var clockAdvanceCommand = lazy(() => import("./cli-35K37SYY.js"), "clockAdvanceCommand");
179
- var faultCommand = lazy(() => import("./cli-35K37SYY.js"), "faultCommand");
180
- var localeCommand = lazy(() => import("./cli-35K37SYY.js"), "localeCommand");
181
- var participantAddCommand = lazy(() => import("./cli-35K37SYY.js"), "participantAddCommand");
182
- var participantJoinCommand = lazy(() => import("./cli-35K37SYY.js"), "participantJoinCommand");
183
- var participantMoveCommand = lazy(() => import("./cli-35K37SYY.js"), "participantMoveCommand");
175
+ var patchCommand = lazy(() => import("./cli-KJA6GLZI.js"), "patchCommand");
176
+ var resolveCommand = lazy(() => import("./cli-IKSLPAZN.js"), "resolveCommand");
177
+ var screenshotCommand = lazy(() => import("./cli-S3NHXAJM.js"), "screenshotCommand");
178
+ var clockAdvanceCommand = lazy(() => import("./cli-D3S7NJZ3.js"), "clockAdvanceCommand");
179
+ var faultCommand = lazy(() => import("./cli-D3S7NJZ3.js"), "faultCommand");
180
+ var localeCommand = lazy(() => import("./cli-D3S7NJZ3.js"), "localeCommand");
181
+ var participantAddCommand = lazy(() => import("./cli-D3S7NJZ3.js"), "participantAddCommand");
182
+ var participantJoinCommand = lazy(() => import("./cli-D3S7NJZ3.js"), "participantJoinCommand");
183
+ var participantMoveCommand = lazy(() => import("./cli-D3S7NJZ3.js"), "participantMoveCommand");
184
184
  var participantRenameCommand = lazy(
185
- () => import("./cli-35K37SYY.js"),
185
+ () => import("./cli-D3S7NJZ3.js"),
186
186
  "participantRenameCommand"
187
187
  );
188
- var playCommand = lazy(() => import("./cli-35K37SYY.js"), "playCommand");
189
- var reconfigureCommand = lazy(() => import("./cli-35K37SYY.js"), "reconfigureCommand");
190
- var resetCommand = lazy(() => import("./cli-35K37SYY.js"), "resetCommand");
191
- var scenarioCommand = lazy(() => import("./cli-35K37SYY.js"), "scenarioCommand");
192
- var teamAddCommand = lazy(() => import("./cli-35K37SYY.js"), "teamAddCommand");
193
- var teamRemoveCommand = lazy(() => import("./cli-35K37SYY.js"), "teamRemoveCommand");
194
- var teamRenameCommand = lazy(() => import("./cli-35K37SYY.js"), "teamRenameCommand");
195
- var timerCommand = lazy(() => import("./cli-35K37SYY.js"), "timerCommand");
196
- var undoCommand = lazy(() => import("./cli-35K37SYY.js"), "undoCommand");
197
- var waitingRoomCommand = lazy(() => import("./cli-35K37SYY.js"), "waitingRoomCommand");
198
- var tickCommand = lazy(() => import("./cli-3YGNWZC6.js"), "tickCommand");
199
- var updateCommand = lazy(() => import("./cli-YI3WZF3C.js"), "updateCommand");
200
- var versionCommand = lazy(() => import("./cli-MPWTXNF6.js"), "versionCommand");
201
- var viewCommand = lazy(() => import("./cli-BNN36WZJ.js"), "viewCommand");
188
+ var playCommand = lazy(() => import("./cli-D3S7NJZ3.js"), "playCommand");
189
+ var reconfigureCommand = lazy(() => import("./cli-D3S7NJZ3.js"), "reconfigureCommand");
190
+ var resetCommand = lazy(() => import("./cli-D3S7NJZ3.js"), "resetCommand");
191
+ var scenarioCommand = lazy(() => import("./cli-D3S7NJZ3.js"), "scenarioCommand");
192
+ var teamAddCommand = lazy(() => import("./cli-D3S7NJZ3.js"), "teamAddCommand");
193
+ var teamRemoveCommand = lazy(() => import("./cli-D3S7NJZ3.js"), "teamRemoveCommand");
194
+ var teamRenameCommand = lazy(() => import("./cli-D3S7NJZ3.js"), "teamRenameCommand");
195
+ var timerCommand = lazy(() => import("./cli-D3S7NJZ3.js"), "timerCommand");
196
+ var undoCommand = lazy(() => import("./cli-D3S7NJZ3.js"), "undoCommand");
197
+ var waitingRoomCommand = lazy(() => import("./cli-D3S7NJZ3.js"), "waitingRoomCommand");
198
+ var tickCommand = lazy(() => import("./cli-27Z5T52R.js"), "tickCommand");
199
+ var updateCommand = lazy(() => import("./cli-27TQVLVF.js"), "updateCommand");
200
+ var versionCommand = lazy(() => import("./cli-5M6KDNVX.js"), "versionCommand");
201
+ var viewCommand = lazy(() => import("./cli-MDVC5ZNM.js"), "viewCommand");
202
202
  function commandPath(command) {
203
203
  const names = [];
204
204
  for (let current = command; current?.parent; current = current.parent) {
@@ -19,7 +19,7 @@
19
19
  * ```
20
20
  */
21
21
  export type { ContextDeletePath, ContextUpdate, SignatureCallbacks } from '@seriousgaming/sdk';
22
- export { createTestSession, type TestSession, type TestSessionOptions, type TestSessionSetDataOptions, type TestSessionSetSharedDataOptions, type TestSessionState, type TestSessionTeam, type UntypedContext, } from './test-session';
22
+ export { createTestSession, type LogicErrorLocation, type TestMutationResult, type TestSession, type TestSessionOptions, type TestSessionSetDataOptions, type TestSessionSetSharedDataOptions, type TestSessionState, type TestSessionTeam, type UntypedContext, } from './test-session';
23
23
  export { startDevServer, type DevServer, type DevServerOptions } from './dev-server';
24
24
  export { buildSurfaces, type BuildSurfacesOptions, type BuiltSurfaces } from './build-surfaces';
25
25
  export { createStubServices, stubGenerateText, type TestServices } from './stub-services';
@@ -62,6 +62,44 @@ export interface TestSessionOptions {
62
62
  apiHost?: string;
63
63
  };
64
64
  }
65
+ /**
66
+ * Where game logic threw, read back to the file the author wrote: the resource
67
+ * whose logic it was, the tick and team it ran for, and the source position.
68
+ * `file` is relative to the package root; `line` and `column` are 1-based.
69
+ */
70
+ export interface LogicErrorLocation {
71
+ resource: {
72
+ type: string;
73
+ identifier: string;
74
+ };
75
+ message: string;
76
+ tick?: number;
77
+ team?: {
78
+ teamId: string;
79
+ index: number;
80
+ };
81
+ file?: string;
82
+ line?: number;
83
+ column?: number;
84
+ }
85
+ /**
86
+ * What a test session answers a mutation with. A refusal that came from logic
87
+ * throwing (a failed tick, a hook, a validator) carries `logicError` beside
88
+ * its outcome, which is what `sdk tick` reports from the command line:
89
+ *
90
+ * ```ts
91
+ * const result = await session.tick();
92
+ * if (!result.ok) {
93
+ * const at = result.logicError;
94
+ * throw new Error(`${result.outcome.kind} at ${at?.file}:${at?.line} (tick ${at?.tick})`);
95
+ * }
96
+ * ```
97
+ *
98
+ * A surface never sees it: the outcome alone is what the runtime tells one.
99
+ */
100
+ export type TestMutationResult = MutationResult & {
101
+ logicError?: LogicErrorLocation;
102
+ };
65
103
  /** A capability context as the projection carries it, before a game's types narrow it. */
66
104
  export type UntypedContext = Record<string, Record<string, unknown>>;
67
105
  /** One team as {@link TestSession.state} reports it, its context typed. */
@@ -119,9 +157,9 @@ export interface TestSession<Context = UntypedContext, Shared = UntypedContext>
119
157
  * `{ ok: true }` or `{ ok: false, outcome }`, and a read answers with its
120
158
  * result. A refusal is an answer, not a throw.
121
159
  */
122
- send(command: MutationCommand): Promise<MutationResult>;
160
+ send(command: MutationCommand): Promise<TestMutationResult>;
123
161
  send(command: QueryCommand): Promise<QueryResult>;
124
- send(command: Command): Promise<MutationResult | QueryResult>;
162
+ send(command: Command): Promise<TestMutationResult | QueryResult>;
125
163
  /** The whole session now: teams, contexts, rosters, the store, the timer. */
126
164
  state(): TestSessionState<Context, Shared>;
127
165
  /**
@@ -143,7 +181,7 @@ export interface TestSession<Context = UntypedContext, Shared = UntypedContext>
143
181
  */
144
182
  tick(options?: {
145
183
  team?: number;
146
- }): Promise<MutationResult>;
184
+ }): Promise<TestMutationResult>;
147
185
  /**
148
186
  * Ask for the next tick as a participant's surface does, so the
149
187
  * validators' `RequestTick` gates judge it. Asks as the team's first
@@ -151,14 +189,14 @@ export interface TestSession<Context = UntypedContext, Shared = UntypedContext>
151
189
  */
152
190
  requestTick(team: number, options?: {
153
191
  participantId?: string;
154
- }): Promise<MutationResult>;
192
+ }): Promise<TestMutationResult>;
155
193
  /**
156
194
  * Write to one team's context, by stable index. As a participant through
157
195
  * `ui` unless `as: 'system'` (see {@link TestSessionSetDataOptions}).
158
196
  */
159
- setData(team: number, patch: ContextUpdate<Context>, options?: TestSessionSetDataOptions): Promise<MutationResult>;
197
+ setData(team: number, patch: ContextUpdate<Context>, options?: TestSessionSetDataOptions): Promise<TestMutationResult>;
160
198
  /** Write to the shared store, as the facilitator does. */
161
- setSharedData(patch: ContextUpdate<Shared>, options?: TestSessionSetSharedDataOptions): Promise<MutationResult>;
199
+ setSharedData(patch: ContextUpdate<Shared>, options?: TestSessionSetSharedDataOptions): Promise<TestMutationResult>;
162
200
  /**
163
201
  * Resolves once everything queued has run, including a tick a timer set
164
202
  * off. `advanceClock` already waits; this is for a timer moved by hand.
package/dist/client.js CHANGED
@@ -623,7 +623,11 @@ var ERROR_CODES = {
623
623
  },
624
624
  SETUP_NOTES_UNCONFIGURED: {
625
625
  category: "package",
626
- description: "A warning: the setup notes name a setting the setup UI does not `configures`, so a host refuses the change they describe."
626
+ description: "A warning: the setup notes name a setting the setup UI neither `configures` nor lists in `settings`, so a host refuses the change they describe and the setup UI cannot see it."
627
+ },
628
+ EDITOR_SETTINGS_CONFIGURED: {
629
+ category: "package",
630
+ description: "A warning: a settings editor lists a settings resource in both `configures` and `settings`. Configuring a resource already sends it, so the `settings` entry does nothing."
627
631
  },
628
632
  SETTINGS_UNGATED: {
629
633
  category: "package",
@@ -1439,6 +1443,16 @@ var schema_default = {
1439
1443
  uniqueItems: true,
1440
1444
  default: []
1441
1445
  },
1446
+ settings: {
1447
+ type: "array",
1448
+ description: "Identifiers of settings resources this setup user interface reads but does not edit, the built-in `game` included. It is sent their resolved values through `setSettings` beside those it configures, and a host refuses an `updateSettings` that names one. List a resource here, not in `configures`, when the screen only needs to see it, such as the list of what the scenario offers",
1449
+ items: {
1450
+ type: "string",
1451
+ pattern: "^[a-z][a-z0-9_]*$"
1452
+ },
1453
+ uniqueItems: true,
1454
+ default: []
1455
+ },
1442
1456
  endpoints: {
1443
1457
  type: "array",
1444
1458
  description: "Endpoint identifiers this setup user interface is permitted to call via `callbacks.endpoints[<identifier>]`. The host throws when this UI requests an endpoint whose identifier is not listed here.",
@@ -1472,6 +1486,16 @@ var schema_default = {
1472
1486
  uniqueItems: true,
1473
1487
  default: []
1474
1488
  },
1489
+ settings: {
1490
+ type: "array",
1491
+ description: "Identifiers of settings resources this scenario editor reads but does not edit, the built-in `game` included. It is sent their resolved values through `setSettings` beside those it configures, and a host refuses an `updateSettings` that names one. List a resource here, not in `configures`, when the screen only needs to see it, such as the list of what the scenario offers",
1492
+ items: {
1493
+ type: "string",
1494
+ pattern: "^[a-z][a-z0-9_]*$"
1495
+ },
1496
+ uniqueItems: true,
1497
+ default: []
1498
+ },
1475
1499
  endpoints: {
1476
1500
  type: "array",
1477
1501
  description: "Endpoint identifiers this scenario editor is permitted to call via `callbacks.endpoints[<identifier>]`. The host throws when this UI requests an endpoint whose identifier is not listed here.",
@@ -15211,7 +15235,7 @@ var BASES = [
15211
15235
  sites: []
15212
15236
  },
15213
15237
  // The two settings editors (§6.5): one layout, both naming the settings
15214
- // they edit in `configures`. Neither ever lived under a plural directory;
15238
+ // they edit in `configures` and those they only read in `settings`. Neither ever lived under a plural directory;
15215
15239
  // the version 2 settings editors they replace did, and the loader refuses
15216
15240
  // that directory with its own message.
15217
15241
  {
@@ -15223,6 +15247,7 @@ var BASES = [
15223
15247
  kind: "ui",
15224
15248
  label: "Setup user interface",
15225
15249
  declaresEndpoints: true,
15250
+ readsSettings: true,
15226
15251
  sites: []
15227
15252
  },
15228
15253
  {
@@ -15234,6 +15259,7 @@ var BASES = [
15234
15259
  kind: "ui",
15235
15260
  label: "Scenario editor",
15236
15261
  declaresEndpoints: true,
15262
+ readsSettings: true,
15237
15263
  sites: []
15238
15264
  },
15239
15265
  {
@@ -28004,6 +28030,7 @@ import { WebSocketServer } from "ws";
28004
28030
 
28005
28031
  // cli/core/listen-with-fallback.ts
28006
28032
  import { createServer as createSocket } from "net";
28033
+ var PORT_IN_USE_HINT = "`sdk dev status` says whether a dev server is already running for this package. Pass --port auto to take any free port.";
28007
28034
  async function listenWithPortFallback(server, startPort, options = {}) {
28008
28035
  const maxAttempts = options.maxAttempts ?? 100;
28009
28036
  for (let attempt = 0; attempt < maxAttempts; attempt++) {
@@ -28017,7 +28044,8 @@ async function listenWithPortFallback(server, startPort, options = {}) {
28017
28044
  }
28018
28045
  throw new CliError(
28019
28046
  "PORT_IN_USE",
28020
- `Could not find available port after ${maxAttempts} attempts`
28047
+ `Could not find available port after ${maxAttempts} attempts`,
28048
+ { hint: PORT_IN_USE_HINT }
28021
28049
  );
28022
28050
  }
28023
28051
  function tryListen(server, port, host) {
@@ -28055,7 +28083,8 @@ async function findFreePort(startPort, maxAttempts = 100) {
28055
28083
  }
28056
28084
  throw new CliError(
28057
28085
  "PORT_IN_USE",
28058
- `Could not find available port after ${maxAttempts} attempts`
28086
+ `Could not find available port after ${maxAttempts} attempts`,
28087
+ { hint: PORT_IN_USE_HINT }
28059
28088
  );
28060
28089
  }
28061
28090
  var PROBED_ADDRESSES = [void 0, "127.0.0.1", "::1"];
@@ -29116,6 +29145,16 @@ function collectUnknownSettingsReferences(config) {
29116
29145
  const resources = [
29117
29146
  { label: 'Engine "engine"', type: "engine", definition: config.engine?.definition },
29118
29147
  { label: 'User Interface "ui"', type: "ui", definition: config.ui?.definition },
29148
+ {
29149
+ label: 'Setup User Interface "setup"',
29150
+ type: "setup",
29151
+ definition: config.setup?.definition
29152
+ },
29153
+ {
29154
+ label: 'Scenario Editor "scenario_editor"',
29155
+ type: "scenario_editor",
29156
+ definition: config.scenario_editor?.definition
29157
+ },
29119
29158
  {
29120
29159
  label: 'Session User Interface "session"',
29121
29160
  type: "session",
@@ -29958,13 +29997,17 @@ var VALIDATION_DESCRIPTORS = [
29958
29997
  type: "setup",
29959
29998
  resources: (config) => slot(config.setup),
29960
29999
  identify: named2,
29961
- checks: [uiFiles, (setup, context) => setupNotesChecks(setup, context)]
30000
+ checks: [
30001
+ uiFiles,
30002
+ (setup, context) => setupNotesChecks(setup, context),
30003
+ editorSettingsChecks
30004
+ ]
29962
30005
  }),
29963
30006
  descriptor({
29964
30007
  type: "scenario_editor",
29965
30008
  resources: (config) => slot(config.scenario_editor),
29966
30009
  identify: named2,
29967
- checks: [uiFiles]
30010
+ checks: [uiFiles, editorSettingsChecks]
29968
30011
  }),
29969
30012
  descriptor({
29970
30013
  type: "tick_controller",
@@ -30248,11 +30291,32 @@ async function validateLoadedPackage(config, options) {
30248
30291
  }
30249
30292
  };
30250
30293
  }
30294
+ function editorSettingsChecks(editor) {
30295
+ const slot2 = editor.definition.identifier;
30296
+ const configures = new Set(editor.definition.configures ?? []);
30297
+ const warnings = [];
30298
+ const findings = [];
30299
+ (editor.definition.settings ?? []).forEach((identifier, index3) => {
30300
+ if (!configures.has(identifier)) return;
30301
+ const message = `${slot2} lists "${identifier}" in both \`configures\` and \`settings\`. Configuring a resource already sends it to the screen, so remove it from \`settings\`, or from \`configures\` if the screen should only read it.`;
30302
+ warnings.push(message);
30303
+ findings.push({
30304
+ severity: "warning",
30305
+ code: "EDITOR_SETTINGS_CONFIGURED",
30306
+ message,
30307
+ file: bundleFileOf(slot2, slot2),
30308
+ pointer: pointerOf("definition", "settings", index3),
30309
+ resource: { type: slot2, identifier: slot2 }
30310
+ });
30311
+ });
30312
+ return { errors: [], warnings, findings };
30313
+ }
30251
30314
  function setupNotesChecks(setup, context) {
30252
30315
  const directory = resolve7(context.workingDir, setup.rootDirectory);
30253
30316
  const schemas = settingsSchemas(context.config);
30254
30317
  const identifiers = new Set(Object.keys(schemas));
30255
30318
  const configures = new Set(setup.definition.configures ?? []);
30319
+ const reads = new Set(setup.definition.settings ?? []);
30256
30320
  const resource = { type: "setup", identifier: "setup" };
30257
30321
  const outcome = {
30258
30322
  errors: [],
@@ -30268,8 +30332,8 @@ function setupNotesChecks(setup, context) {
30268
30332
  for (const { path: path3, line } of notesSettingReferences(markdown, identifiers)) {
30269
30333
  if (!settingPathDeclared(schemas, path3)) continue;
30270
30334
  const identifier = parseSettingPath(path3)?.identifier ?? "";
30271
- if (!configures.has(identifier)) {
30272
- const message = `Setup notes ${file}, line ${line}, name \`${path3}\`, but the setup UI does not configure "${identifier}", so a host refuses that change. Add "${identifier}" to its \`configures\`, or leave the setting out of the notes.`;
30335
+ if (!configures.has(identifier) && !reads.has(identifier)) {
30336
+ const message = `Setup notes ${file}, line ${line}, name \`${path3}\`, but the setup UI neither configures nor reads "${identifier}", so a host refuses a change to it. Add "${identifier}" to its \`configures\` if setup may change it, or to its \`settings\` if the notes name it only as where the menu's offer is read from.`;
30273
30337
  outcome.warnings.push(message);
30274
30338
  outcome.findings.push({
30275
30339
  severity: "warning",
@@ -31234,7 +31298,10 @@ function toSurface(kind2, bundle, hidden) {
31234
31298
  endpoints: endpoints ?? [],
31235
31299
  crossTeamReads: visible(crossTeamReads),
31236
31300
  crossTeamParticipants: crossTeamParticipants === true,
31237
- settings: (kind2 === "setup" || kind2 === "scenario-editor" ? configures : settings) ?? []
31301
+ ...kind2 === "setup" || kind2 === "scenario-editor" ? {
31302
+ settings: [.../* @__PURE__ */ new Set([...configures ?? [], ...settings ?? []])],
31303
+ configures: configures ?? []
31304
+ } : { settings: settings ?? [] }
31238
31305
  };
31239
31306
  }
31240
31307
  var SURFACE_SLOT = {
@@ -31341,10 +31408,21 @@ function buildBatch(options) {
31341
31408
  // The two settings editors are sent the same batch (§12.3): neither is
31342
31409
  // told which slot it fills, since each is its own bundle.
31343
31410
  case "setup":
31344
- return [{ type: "setSettings", payload: settingsFor(state2, surface) }, ...common];
31411
+ return [
31412
+ {
31413
+ type: "setSettings",
31414
+ payload: settingsFor(state2, surface),
31415
+ configures: surface.configures ?? []
31416
+ },
31417
+ ...common
31418
+ ];
31345
31419
  case "scenario-editor":
31346
31420
  return [
31347
- { type: "setSettings", payload: draftSettingsFor(state2, surface, options.viewer) },
31421
+ {
31422
+ type: "setSettings",
31423
+ payload: draftSettingsFor(state2, surface, options.viewer),
31424
+ configures: surface.configures ?? []
31425
+ },
31348
31426
  ...common
31349
31427
  ];
31350
31428
  case "presentation":
@@ -33383,6 +33461,16 @@ function distPath(meta, identifier) {
33383
33461
  return `${meta.pluralDir}/${identifier}`;
33384
33462
  }
33385
33463
 
33464
+ // cli/vite/index.ts
33465
+ var REACT_CONTEXT_PACKAGES = [
33466
+ "react",
33467
+ "react-dom",
33468
+ "@emotion/react",
33469
+ "@emotion/styled",
33470
+ "@seriousgaming/sdk",
33471
+ "@seriousgaming/deck"
33472
+ ];
33473
+
33386
33474
  // cli/bundling/ui-bundler.ts
33387
33475
  async function bundleUserInterface(ui, workingDir, buildDir, type) {
33388
33476
  const uiOutputDir = join21(buildDir, distPath(getResourceMeta(type), ui.definition.identifier));
@@ -33408,7 +33496,7 @@ async function bundleUserInterface(ui, workingDir, buildDir, type) {
33408
33496
  configFile: false,
33409
33497
  plugins: [react2()],
33410
33498
  resolve: {
33411
- dedupe: ["react", "react-dom", "@emotion/react", "@emotion/styled"]
33499
+ dedupe: [...REACT_CONTEXT_PACKAGES]
33412
33500
  },
33413
33501
  build: {
33414
33502
  outDir: uiOutputDir,