@seriousgaming/sdk-tools 1.7.0 → 1.9.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 (188) hide show
  1. package/dist/agent/guidance.md +1 -0
  2. package/dist/{cli-SOFCTQAL.js → cli-2BF7KBBJ.js} +15 -15
  3. package/dist/cli-2CSI2UU2.js +110 -0
  4. package/dist/{cli-2BH7FX27.js → cli-2FXZZLCL.js} +1 -1
  5. package/dist/{cli-H3J3ICCQ.js → cli-2I6UN6C3.js} +3 -3
  6. package/dist/{cli-MYJGGLC5.js → cli-2JEICVMA.js} +3 -3
  7. package/dist/{cli-7RYIEKMB.js → cli-2PMLR6WG.js} +15 -15
  8. package/dist/{cli-JRIIAZ33.js → cli-2UOUIVHW.js} +53 -38
  9. package/dist/{cli-OQG3Y4RU.js → cli-2VV5IPSY.js} +15 -15
  10. package/dist/{cli-ZRPWZOCW.js → cli-35K37SYY.js} +20 -16
  11. package/dist/cli-3I6AI4AA.js +36 -0
  12. package/dist/{cli-YSPZZQCP.js → cli-3RMP4HKZ.js} +2 -2
  13. package/dist/{cli-4UWFQNGF.js → cli-3VV2JLHX.js} +1 -1
  14. package/dist/cli-3YGNWZC6.js +30 -0
  15. package/dist/{cli-TPNQLYPC.js → cli-4L7S27XO.js} +1 -1
  16. package/dist/cli-4X3X4HB2.js +16 -0
  17. package/dist/{cli-TJ3PLRHF.js → cli-5BPQ73OM.js} +15 -15
  18. package/dist/{cli-UTM4QU67.js → cli-5PTCQTS6.js} +282 -96
  19. package/dist/{cli-ZTZ5H55T.js → cli-6COAU7JR.js} +17 -17
  20. package/dist/{cli-QVASWX2A.js → cli-6GDPO5VU.js} +2 -2
  21. package/dist/{cli-TFMNNVJ7.js → cli-6KL5B7EC.js} +15 -15
  22. package/dist/{cli-NOQBWJQN.js → cli-6Y4XIVQS.js} +3 -3
  23. package/dist/cli-6ZBQELF2.js +36 -0
  24. package/dist/{cli-MMN4BPO4.js → cli-7CW2BBJG.js} +1 -1
  25. package/dist/{cli-LQ4VSM5R.js → cli-7N7WFRWA.js} +0 -0
  26. package/dist/{cli-JR5AZLLK.js → cli-7OCEVQQN.js} +2 -2
  27. package/dist/{cli-Z5HWENER.js → cli-7RLZIWFP.js} +19 -19
  28. package/dist/{cli-J4DKUUTK.js → cli-7V6GUIIS.js} +2 -2
  29. package/dist/{cli-6ZSMW4HR.js → cli-A3P3PO6Z.js} +15 -15
  30. package/dist/{cli-4VZIJYKU.js → cli-A7PITFRR.js} +2 -2
  31. package/dist/{cli-4XCQUM3E.js → cli-AA5GMEUL.js} +4 -4
  32. package/dist/{cli-N6H6T2E2.js → cli-AEAFLZGY.js} +12 -0
  33. package/dist/{cli-C47GJATR.js → cli-AGYCXRPR.js} +3 -3
  34. package/dist/{cli-T4HWGMY4.js → cli-AJ5CABGJ.js} +15 -15
  35. package/dist/{cli-FZ7QAZZP.js → cli-B5LZEFLU.js} +15 -15
  36. package/dist/{cli-XSVGKI3R.js → cli-BC4KKNLA.js} +1 -1
  37. package/dist/{cli-EJVAQCMQ.js → cli-BF6L37O3.js} +114 -5
  38. package/dist/{cli-ZQ2Y3U7F.js → cli-BNN36WZJ.js} +13 -13
  39. package/dist/{cli-FXY3DKPW.js → cli-BT47H36C.js} +2 -2
  40. package/dist/{cli-XTANOFQR.js → cli-BV7MX7JE.js} +3 -3
  41. package/dist/{cli-PVA52RC2.js → cli-BYXNPBVG.js} +15 -15
  42. package/dist/{cli-MJUYJIEP.js → cli-C45A5VX6.js} +3 -3
  43. package/dist/{cli-HM7CD4VU.js → cli-CKV44U7P.js} +19 -19
  44. package/dist/{cli-LQERHJFE.js → cli-CL3KF5KS.js} +2 -2
  45. package/dist/{cli-SX3ULO5P.js → cli-CPX4YA3P.js} +11 -11
  46. package/dist/{cli-CV4JGVJR.js → cli-CQUSM3SF.js} +19 -19
  47. package/dist/cli-CUZUIYCQ.js +36 -0
  48. package/dist/{cli-YOTGR3NB.js → cli-CVOLMK3Z.js} +1 -1
  49. package/dist/{cli-TFZ53OA2.js → cli-D6AC3ZCX.js} +18 -18
  50. package/dist/{cli-PIO7NWMH.js → cli-DJCQ5XFR.js} +15 -15
  51. package/dist/{cli-4YB3ROVR.js → cli-DMKRP33X.js} +1 -1
  52. package/dist/cli-DNCJURUU.js +36 -0
  53. package/dist/{cli-TIDQ4WUE.js → cli-DXHPYN4N.js} +1 -1
  54. package/dist/{cli-FP32D3T6.js → cli-E77R7ZYB.js} +15 -15
  55. package/dist/{cli-PKQNOGBO.js → cli-EDZF5Q2E.js} +63 -17
  56. package/dist/{cli-IPP5FDCH.js → cli-G54355N5.js} +18 -18
  57. package/dist/{cli-SWZY7L7K.js → cli-G7JTIP5G.js} +6 -6
  58. package/dist/{cli-C5QOJJWX.js → cli-GHIMH6JU.js} +1 -1
  59. package/dist/{cli-LE5ICDAF.js → cli-GHQIATHP.js} +4 -4
  60. package/dist/{cli-ESA6YNPF.js → cli-GZE4V7RC.js} +19 -19
  61. package/dist/{cli-4CHKF4DQ.js → cli-H7T6E7OA.js} +2 -2
  62. package/dist/{cli-TDYKRXUA.js → cli-HCMVZXWK.js} +17 -17
  63. package/dist/{cli-WU43JT4T.js → cli-HJPNNORV.js} +2 -2
  64. package/dist/{cli-MYJGMA6U.js → cli-IC5FOT2J.js} +1 -1
  65. package/dist/{cli-VYR326C6.js → cli-ICLCA6VD.js} +19 -19
  66. package/dist/{cli-CXCL7VRK.js → cli-IJPRZSJ5.js} +20 -20
  67. package/dist/{cli-VL2P354N.js → cli-IVZ7AHUJ.js} +3 -3
  68. package/dist/{cli-B6YHEKIJ.js → cli-J2OTL6JH.js} +5 -5
  69. package/dist/{cli-SOMIB4B4.js → cli-J75EBRAJ.js} +17 -17
  70. package/dist/{cli-WAZD75KE.js → cli-JEMWAIAA.js} +15 -15
  71. package/dist/{cli-TDSQSCX4.js → cli-K6M6YB67.js} +1 -1
  72. package/dist/{cli-WG36UJRK.js → cli-KD2RQS35.js} +18 -18
  73. package/dist/{cli-GTWEGYSU.js → cli-KGJHEDR2.js} +19 -19
  74. package/dist/{cli-EDCAH2TC.js → cli-KINJAQTJ.js} +19 -19
  75. package/dist/cli-KJV3GGBA.js +1973 -0
  76. package/dist/{cli-X7E3637I.js → cli-KO26S2CL.js} +50 -26
  77. package/dist/{cli-MULKSLA4.js → cli-L5ZKQNMI.js} +15 -15
  78. package/dist/{cli-ATI6OLJU.js → cli-LFUKHLHI.js} +17 -17
  79. package/dist/{cli-GHLILDH7.js → cli-LZFUSEJT.js} +13 -13
  80. package/dist/{cli-RZITKPJX.js → cli-MN7X4UG2.js} +1 -1
  81. package/dist/{cli-HCRTYQQS.js → cli-MPWTXNF6.js} +2 -2
  82. package/dist/{cli-HHPMAV4F.js → cli-MSSJLABW.js} +3 -3
  83. package/dist/{cli-DHOWZCXT.js → cli-MTAGL3QE.js} +15 -15
  84. package/dist/{cli-JIZTQVL2.js → cli-MX7GFQ6N.js} +14 -14
  85. package/dist/{cli-7TOLC62D.js → cli-MYBDWJP7.js} +20 -20
  86. package/dist/{cli-VPON5HGB.js → cli-MZM4MW7C.js} +19 -19
  87. package/dist/{cli-UBQCSUDH.js → cli-NTI22MRE.js} +16 -16
  88. package/dist/{cli-ZTWOE3ZT.js → cli-NU4SCD5D.js} +1 -1
  89. package/dist/{cli-DEBCP7UH.js → cli-OK6XWVIN.js} +17 -17
  90. package/dist/{cli-6HB6HTC6.js → cli-OOTGO3KW.js} +47 -47
  91. package/dist/{cli-2DQJACAH.js → cli-OX3254NS.js} +17 -17
  92. package/dist/{cli-GEQUJF4L.js → cli-PJO4BKSV.js} +16 -16
  93. package/dist/{cli-R7RG2VMW.js → cli-QIHVXDMW.js} +15 -15
  94. package/dist/{cli-57V4ARER.js → cli-QK2OD24J.js} +1 -1
  95. package/dist/{cli-OANH3BTQ.js → cli-QRAYIXNE.js} +5 -5
  96. package/dist/{cli-GPAN6XK2.js → cli-QWO3XJR3.js} +4 -4
  97. package/dist/{cli-JRMHSMYT.js → cli-R6YAZP6E.js} +19 -19
  98. package/dist/{cli-FXWWYBYU.js → cli-RHYQYXE2.js} +18 -18
  99. package/dist/{cli-C3OERMIR.js → cli-RL5EBZL7.js} +3 -3
  100. package/dist/{cli-XR2XSWQN.js → cli-S3YIYAXC.js} +12 -12
  101. package/dist/{cli-NPPY557S.js → cli-S7PLSPGE.js} +15 -15
  102. package/dist/{cli-NEOLMC2P.js → cli-SBKTGFY4.js} +17 -17
  103. package/dist/{cli-BOXXMDSX.js → cli-TLRTLTGK.js} +18 -18
  104. package/dist/cli-UKC7KXWU.js +36 -0
  105. package/dist/{cli-FWFRKQNE.js → cli-UR63LFVK.js} +2 -2
  106. package/dist/{cli-ZKG3OPZ6.js → cli-USBJQAYI.js} +13 -13
  107. package/dist/{cli-M7WEAIRF.js → cli-VRGVHSXH.js} +106 -28
  108. package/dist/{cli-IUS2YCD3.js → cli-VTLFQHDO.js} +1 -1
  109. package/dist/{cli-JGFJWZFU.js → cli-W4BHSBAX.js} +3 -3
  110. package/dist/cli-WA2PDQUB.js +36 -0
  111. package/dist/{cli-HYEU3QS6.js → cli-WJO75KP7.js} +3 -3
  112. package/dist/{cli-3PIJLSRQ.js → cli-XA4IL7IM.js} +11 -11
  113. package/dist/{cli-LRQDF3ZO.js → cli-XRVH5WV6.js} +13 -13
  114. package/dist/{cli-SRHBXZCN.js → cli-Y33ULHYO.js} +1 -1
  115. package/dist/{cli-G5DQGZ2E.js → cli-YD4SBAHQ.js} +19 -19
  116. package/dist/{cli-64AA7367.js → cli-YI3WZF3C.js} +11 -11
  117. package/dist/{cli-JPAXKLVT.js → cli-ZHFHOWJI.js} +11 -11
  118. package/dist/{cli-MM3A4SPH.js → cli-ZZSPFLTK.js} +7265 -4467
  119. package/dist/cli.js +52 -52
  120. package/dist/client.js +17518 -16558
  121. package/dist/core/save-scenario.d.ts +1 -0
  122. package/dist/core/session-start-gate.d.ts +25 -0
  123. package/dist/core/session.d.ts +4 -0
  124. package/dist/dev/console/assets/{index-CnXlPeLX.js → index-CVNjiRUh.js} +31 -27
  125. package/dist/dev/console/index.html +1 -1
  126. package/dist/docs/api/deck.md +1 -1
  127. package/dist/docs/api/index.md +1 -1
  128. package/dist/docs/api/sdk-e2e.md +7 -6
  129. package/dist/docs/api/sdk-projection.md +1 -0
  130. package/dist/docs/api/sdk-tools-client.md +3 -1
  131. package/dist/docs/api/sdk-tools-playwright.md +1 -8
  132. package/dist/docs/api/sdk-ui.md +40 -64
  133. package/dist/docs/api/sdk.md +10 -1
  134. package/dist/docs/changelog.md +25 -0
  135. package/dist/docs/cli-error-codes.md +7 -1
  136. package/dist/docs/cli-reference.md +3 -0
  137. package/dist/docs/concepts/index.md +1 -0
  138. package/dist/docs/guides/engine.md +5 -0
  139. package/dist/docs/guides/file-handling.md +4 -1
  140. package/dist/docs/guides/llm-integration.md +3 -2
  141. package/dist/docs/guides/multi-team-games.md +2 -0
  142. package/dist/docs/guides/patterns.md +5 -0
  143. package/dist/docs/guides/session.md +1 -1
  144. package/dist/docs/guides/settings.md +2 -0
  145. package/dist/docs/guides/setup.md +67 -6
  146. package/dist/docs/guides/speech-generation.md +1 -0
  147. package/dist/docs/guides/testing.md +2 -0
  148. package/dist/docs/guides/tick-controller.md +2 -0
  149. package/dist/docs/guides/type-safety.md +2 -1
  150. package/dist/docs/guides/ui-files-and-llms.md +3 -1
  151. package/dist/docs/guides/upgrading.md +4 -0
  152. package/dist/docs/guides/validators.md +27 -4
  153. package/dist/docs/guides/waiting-room.md +2 -0
  154. package/dist/docs/page-index.md +10 -7
  155. package/dist/docs/recipes/call-endpoint-from-ui.md +1 -0
  156. package/dist/docs/recipes/create-scenario-editor.md +2 -1
  157. package/dist/docs/recipes/create-setup.md +19 -10
  158. package/dist/docs/recipes/declare-api-uses.md +1 -0
  159. package/dist/docs/recipes/describe-setup-with-endpoint.md +69 -0
  160. package/dist/docs/recipes/give-setup-a-menu.md +90 -0
  161. package/dist/docs/recipes/index.md +4 -1
  162. package/dist/docs/recipes/share-logic-between-engine-and-ui.md +2 -2
  163. package/dist/docs/recipes/test-user-interface.md +1 -1
  164. package/dist/docs/recipes/validate-scenarios.md +9 -3
  165. package/dist/docs/recipes/write-setup-notes.md +57 -0
  166. package/dist/docs/troubleshooting.md +2 -1
  167. package/dist/execution/executor.d.ts +12 -0
  168. package/dist/execution/scenario-gates.d.ts +40 -0
  169. package/dist/host.js +1082 -467
  170. package/dist/playwright.js +17529 -16569
  171. package/dist/runtime/manifest-version.d.ts +1 -1
  172. package/dist/runtime.js +4 -2
  173. package/dist/setup/setup-notes.d.ts +42 -0
  174. package/dist/templates/package/package.json.liquid +15 -15
  175. package/dist/templates/starter-game/package.json +13 -13
  176. package/dist/utils/error-codes.d.ts +13 -1
  177. package/dist/validation/package-validation.d.ts +1 -1
  178. package/package.json +22 -23
  179. package/dist/cli-57C72YKJ.js +0 -36
  180. package/dist/cli-5G7TZHD3.js +0 -36
  181. package/dist/cli-7MBLH4M3.js +0 -36
  182. package/dist/cli-C6G65H6S.js +0 -256
  183. package/dist/cli-L5IG7MY2.js +0 -36
  184. package/dist/cli-SPGUVL6Z.js +0 -36
  185. package/dist/cli-UY4VDI7W.js +0 -30
  186. package/dist/cli-WM6SQJ6Q.js +0 -16
  187. package/dist/cli-ZBTFLZUL.js +0 -36
  188. package/dist/cli-ZF7IFB54.js +0 -4026
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ createSettingsEditor
4
+ } from "./cli-S3YIYAXC.js";
5
+ import "./cli-BV7MX7JE.js";
6
+ import "./cli-A7PITFRR.js";
7
+ import "./cli-S5IVGDDD.js";
8
+ import "./cli-7OCEVQQN.js";
9
+ import "./cli-3VV2JLHX.js";
10
+ import "./cli-GHQIATHP.js";
11
+ import "./cli-VTLFQHDO.js";
12
+ import "./cli-QUNIRH7A.js";
13
+ import "./cli-3RMP4HKZ.js";
14
+ import "./cli-BC4KKNLA.js";
15
+ import "./cli-BT47H36C.js";
16
+ import "./cli-QK2OD24J.js";
17
+ import "./cli-W4BHSBAX.js";
18
+ import "./cli-NU4SCD5D.js";
19
+ import "./cli-2I6UN6C3.js";
20
+ import "./cli-G7JTIP5G.js";
21
+ import "./cli-2CSI2UU2.js";
22
+ import "./cli-5PTCQTS6.js";
23
+ import "./cli-25RWY5BQ.js";
24
+ import "./cli-QWQMPCL6.js";
25
+ import "./cli-ZZSPFLTK.js";
26
+ import "./cli-F2D4GGUA.js";
27
+ import "./cli-DMKRP33X.js";
28
+ import "./cli-AEAFLZGY.js";
29
+
30
+ // cli/commands/resources/scenario-editor/new.ts
31
+ function createScenarioEditor(definitionInput, options) {
32
+ return createSettingsEditor("scenario_editor", definitionInput, options);
33
+ }
34
+ export {
35
+ createScenarioEditor
36
+ };
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CliError
4
- } from "./cli-N6H6T2E2.js";
4
+ } from "./cli-AEAFLZGY.js";
5
5
 
6
6
  // cli/utils/global-settings.ts
7
7
  import {
@@ -9,13 +9,13 @@ import {
9
9
  findResourceMeta,
10
10
  isNamelessInterface,
11
11
  removedFromBundle
12
- } from "./cli-ZF7IFB54.js";
12
+ } from "./cli-ZZSPFLTK.js";
13
13
  import {
14
14
  resourceExample
15
15
  } from "./cli-F2D4GGUA.js";
16
16
  import {
17
17
  CliError
18
- } from "./cli-N6H6T2E2.js";
18
+ } from "./cli-AEAFLZGY.js";
19
19
 
20
20
  // cli/utils/validators.ts
21
21
  var PACKAGE_IDENTIFIER_PATTERN = /^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+$/;
@@ -1,53 +1,53 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  promptForSettings
4
- } from "./cli-C3OERMIR.js";
4
+ } from "./cli-RL5EBZL7.js";
5
5
  import {
6
6
  loadResourceIdentifiers
7
- } from "./cli-XTANOFQR.js";
7
+ } from "./cli-BV7MX7JE.js";
8
8
  import {
9
9
  readAuthoredBundle
10
- } from "./cli-JR5AZLLK.js";
10
+ } from "./cli-7OCEVQQN.js";
11
11
  import {
12
12
  resolveInputSource
13
- } from "./cli-4UWFQNGF.js";
13
+ } from "./cli-3VV2JLHX.js";
14
14
  import {
15
15
  createUserInterfaceFiles
16
- } from "./cli-LE5ICDAF.js";
17
- import "./cli-IUS2YCD3.js";
16
+ } from "./cli-GHQIATHP.js";
17
+ import "./cli-VTLFQHDO.js";
18
18
  import "./cli-QUNIRH7A.js";
19
- import "./cli-YSPZZQCP.js";
19
+ import "./cli-3RMP4HKZ.js";
20
20
  import {
21
21
  loadPackageContext
22
- } from "./cli-XSVGKI3R.js";
22
+ } from "./cli-BC4KKNLA.js";
23
23
  import {
24
24
  presentFields
25
- } from "./cli-FXY3DKPW.js";
26
- import "./cli-57V4ARER.js";
25
+ } from "./cli-BT47H36C.js";
26
+ import "./cli-QK2OD24J.js";
27
27
  import {
28
28
  BUILD_COMMAND,
29
29
  generateTypes,
30
30
  operationError,
31
31
  printOperationResult
32
- } from "./cli-JGFJWZFU.js";
32
+ } from "./cli-W4BHSBAX.js";
33
33
  import {
34
34
  checkbox,
35
35
  input
36
- } from "./cli-ZTWOE3ZT.js";
37
- import "./cli-H3J3ICCQ.js";
38
- import "./cli-SWZY7L7K.js";
39
- import "./cli-C6G65H6S.js";
40
- import "./cli-UTM4QU67.js";
36
+ } from "./cli-NU4SCD5D.js";
37
+ import "./cli-2I6UN6C3.js";
38
+ import "./cli-G7JTIP5G.js";
39
+ import "./cli-2CSI2UU2.js";
40
+ import "./cli-5PTCQTS6.js";
41
41
  import "./cli-25RWY5BQ.js";
42
42
  import "./cli-QWQMPCL6.js";
43
43
  import {
44
44
  validateSDKUserInterface
45
- } from "./cli-ZF7IFB54.js";
45
+ } from "./cli-ZZSPFLTK.js";
46
46
  import "./cli-F2D4GGUA.js";
47
47
  import {
48
48
  logger
49
- } from "./cli-4YB3ROVR.js";
50
- import "./cli-N6H6T2E2.js";
49
+ } from "./cli-DMKRP33X.js";
50
+ import "./cli-AEAFLZGY.js";
51
51
 
52
52
  // cli/commands/resources/ui/new.ts
53
53
  async function createUserInterface(definitionInput, options) {
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  logger
4
- } from "./cli-4YB3ROVR.js";
4
+ } from "./cli-DMKRP33X.js";
5
5
  import {
6
6
  CliError,
7
7
  reportResult
8
- } from "./cli-N6H6T2E2.js";
8
+ } from "./cli-AEAFLZGY.js";
9
9
 
10
10
  // cli/commands/package-bundle.ts
11
11
  import { existsSync, readdirSync, readFileSync, statSync } from "fs";
@@ -2,36 +2,36 @@
2
2
  import {
3
3
  deleteHookFiles,
4
4
  findHookReferences
5
- } from "./cli-LE5ICDAF.js";
6
- import "./cli-IUS2YCD3.js";
5
+ } from "./cli-GHQIATHP.js";
6
+ import "./cli-VTLFQHDO.js";
7
7
  import "./cli-QUNIRH7A.js";
8
- import "./cli-YSPZZQCP.js";
8
+ import "./cli-3RMP4HKZ.js";
9
9
  import {
10
10
  loadPackageContext
11
- } from "./cli-XSVGKI3R.js";
12
- import "./cli-FXY3DKPW.js";
13
- import "./cli-57V4ARER.js";
11
+ } from "./cli-BC4KKNLA.js";
12
+ import "./cli-BT47H36C.js";
13
+ import "./cli-QK2OD24J.js";
14
14
  import {
15
15
  operationError,
16
16
  recordOperationResult
17
- } from "./cli-JGFJWZFU.js";
17
+ } from "./cli-W4BHSBAX.js";
18
18
  import {
19
19
  confirmAction
20
- } from "./cli-ZTWOE3ZT.js";
20
+ } from "./cli-NU4SCD5D.js";
21
21
  import {
22
22
  generateCommand
23
- } from "./cli-H3J3ICCQ.js";
24
- import "./cli-SWZY7L7K.js";
25
- import "./cli-C6G65H6S.js";
26
- import "./cli-UTM4QU67.js";
23
+ } from "./cli-2I6UN6C3.js";
24
+ import "./cli-G7JTIP5G.js";
25
+ import "./cli-2CSI2UU2.js";
26
+ import "./cli-5PTCQTS6.js";
27
27
  import "./cli-25RWY5BQ.js";
28
28
  import "./cli-QWQMPCL6.js";
29
- import "./cli-ZF7IFB54.js";
29
+ import "./cli-ZZSPFLTK.js";
30
30
  import "./cli-F2D4GGUA.js";
31
31
  import {
32
32
  logger
33
- } from "./cli-4YB3ROVR.js";
34
- import "./cli-N6H6T2E2.js";
33
+ } from "./cli-DMKRP33X.js";
34
+ import "./cli-AEAFLZGY.js";
35
35
 
36
36
  // cli/commands/resources/hook/delete.ts
37
37
  async function deleteHook(identifier, options) {
@@ -4,10 +4,10 @@ import {
4
4
  } from "./cli-S5IVGDDD.js";
5
5
  import {
6
6
  findBundleFile
7
- } from "./cli-57V4ARER.js";
7
+ } from "./cli-QK2OD24J.js";
8
8
  import {
9
9
  CliError
10
- } from "./cli-N6H6T2E2.js";
10
+ } from "./cli-AEAFLZGY.js";
11
11
 
12
12
  // cli/utils/patch-resolution.ts
13
13
  import { readFileSync } from "fs";
@@ -1,19 +1,19 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  validateEngine
4
- } from "./cli-TPNQLYPC.js";
4
+ } from "./cli-4L7S27XO.js";
5
5
  import "./cli-4LKXZQ2B.js";
6
6
  import {
7
7
  LOGIC_NODE_BUILTIN,
8
8
  Transpile,
9
9
  loadConfig
10
- } from "./cli-ZF7IFB54.js";
10
+ } from "./cli-ZZSPFLTK.js";
11
11
  import "./cli-F2D4GGUA.js";
12
- import "./cli-4YB3ROVR.js";
12
+ import "./cli-DMKRP33X.js";
13
13
  import {
14
14
  CliError,
15
15
  reportResult
16
- } from "./cli-N6H6T2E2.js";
16
+ } from "./cli-AEAFLZGY.js";
17
17
 
18
18
  // cli/commands/build-engine.ts
19
19
  import { resolve, join } from "path";
@@ -217,6 +217,18 @@ var ERROR_CODES = {
217
217
  category: "package",
218
218
  description: "A validator's `Scenario` gate found a problem with a package scenario, or with the defaults when no scenario is the default. The diagnostic points at the setting it names."
219
219
  },
220
+ SCENARIO_WARNING: {
221
+ category: "package",
222
+ description: "A warning: a validator's `Scenario` gate marked a problem with a package scenario, or with the defaults, as a `warning`. It is reported and never fails the build."
223
+ },
224
+ SETUP_NOTES_UNCONFIGURED: {
225
+ category: "package",
226
+ description: "A warning: the setup notes name a setting the setup UI does not `configures`, so a host refuses the change they describe."
227
+ },
228
+ SETTINGS_UNGATED: {
229
+ category: "package",
230
+ description: "A warning: the setup UI `configures` a settings resource no `Scenario` gate declares, so nothing checks what a facilitator changes in it before the session starts."
231
+ },
220
232
  EDITOR_ENDPOINT_NOT_SCENARIO: {
221
233
  category: "package",
222
234
  description: 'The scenario editor lists an endpoint that is not scenario-scoped. It works on a scenario draft with no session, so it calls `"scope": "scenario"` endpoints alone.'
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  stopLockedServer
4
- } from "./cli-WU43JT4T.js";
4
+ } from "./cli-HJPNNORV.js";
5
5
  import {
6
6
  inspectLockFile,
7
7
  readLockFile,
8
8
  removeLockFile
9
- } from "./cli-SRHBXZCN.js";
9
+ } from "./cli-Y33ULHYO.js";
10
10
  import {
11
11
  reportResult
12
- } from "./cli-N6H6T2E2.js";
12
+ } from "./cli-AEAFLZGY.js";
13
13
 
14
14
  // cli/commands/dev-control.ts
15
15
  async function devStatusCommand(options) {
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  guessMimeType
4
- } from "./cli-2BH7FX27.js";
4
+ } from "./cli-2FXZZLCL.js";
5
5
  import {
6
6
  resolveSession
7
- } from "./cli-OANH3BTQ.js";
8
- import "./cli-WU43JT4T.js";
7
+ } from "./cli-QRAYIXNE.js";
8
+ import "./cli-HJPNNORV.js";
9
9
  import {
10
10
  blobLinks
11
11
  } from "./cli-BWX5E7TQ.js";
@@ -17,31 +17,31 @@ import {
17
17
  staleError,
18
18
  staleOf,
19
19
  teamIndexFromArgument
20
- } from "./cli-GPAN6XK2.js";
21
- import "./cli-LQ4VSM5R.js";
22
- import "./cli-EJVAQCMQ.js";
23
- import "./cli-TDSQSCX4.js";
24
- import "./cli-SRHBXZCN.js";
25
- import "./cli-MM3A4SPH.js";
20
+ } from "./cli-QWO3XJR3.js";
21
+ import "./cli-7N7WFRWA.js";
22
+ import "./cli-BF6L37O3.js";
23
+ import "./cli-K6M6YB67.js";
24
+ import "./cli-Y33ULHYO.js";
25
+ import "./cli-KJV3GGBA.js";
26
26
  import "./cli-4LKXZQ2B.js";
27
- import "./cli-MMN4BPO4.js";
27
+ import "./cli-7CW2BBJG.js";
28
28
  import {
29
29
  resolveInputSource
30
- } from "./cli-4UWFQNGF.js";
30
+ } from "./cli-3VV2JLHX.js";
31
31
  import "./cli-QUNIRH7A.js";
32
32
  import {
33
33
  logicErrorOf
34
- } from "./cli-UTM4QU67.js";
34
+ } from "./cli-5PTCQTS6.js";
35
35
  import "./cli-25RWY5BQ.js";
36
36
  import {
37
37
  readBlob
38
38
  } from "./cli-QWQMPCL6.js";
39
- import "./cli-ZF7IFB54.js";
39
+ import "./cli-ZZSPFLTK.js";
40
40
  import "./cli-F2D4GGUA.js";
41
- import "./cli-4YB3ROVR.js";
41
+ import "./cli-DMKRP33X.js";
42
42
  import {
43
43
  CliError
44
- } from "./cli-N6H6T2E2.js";
44
+ } from "./cli-AEAFLZGY.js";
45
45
 
46
46
  // cli/commands/endpoint-call.ts
47
47
  import { existsSync } from "fs";
@@ -1,42 +1,42 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  updateFacilitatorGuideFiles
4
- } from "./cli-LQERHJFE.js";
4
+ } from "./cli-CL3KF5KS.js";
5
5
  import {
6
6
  resolvePatchedDefinition
7
- } from "./cli-4VZIJYKU.js";
7
+ } from "./cli-A7PITFRR.js";
8
8
  import "./cli-S5IVGDDD.js";
9
9
  import {
10
10
  readAuthoredBundle
11
- } from "./cli-JR5AZLLK.js";
11
+ } from "./cli-7OCEVQQN.js";
12
12
  import {
13
13
  resolveInputSource
14
- } from "./cli-4UWFQNGF.js";
14
+ } from "./cli-3VV2JLHX.js";
15
15
  import {
16
16
  loadPackageContext
17
- } from "./cli-XSVGKI3R.js";
18
- import "./cli-FXY3DKPW.js";
19
- import "./cli-57V4ARER.js";
17
+ } from "./cli-BC4KKNLA.js";
18
+ import "./cli-BT47H36C.js";
19
+ import "./cli-QK2OD24J.js";
20
20
  import {
21
21
  operationError,
22
22
  printOperationResult
23
- } from "./cli-JGFJWZFU.js";
24
- import "./cli-H3J3ICCQ.js";
25
- import "./cli-SWZY7L7K.js";
26
- import "./cli-C6G65H6S.js";
27
- import "./cli-UTM4QU67.js";
23
+ } from "./cli-W4BHSBAX.js";
24
+ import "./cli-2I6UN6C3.js";
25
+ import "./cli-G7JTIP5G.js";
26
+ import "./cli-2CSI2UU2.js";
27
+ import "./cli-5PTCQTS6.js";
28
28
  import "./cli-25RWY5BQ.js";
29
29
  import "./cli-QWQMPCL6.js";
30
30
  import {
31
31
  validateSDKFacilitatorGuide
32
- } from "./cli-ZF7IFB54.js";
32
+ } from "./cli-ZZSPFLTK.js";
33
33
  import "./cli-F2D4GGUA.js";
34
34
  import {
35
35
  logger
36
- } from "./cli-4YB3ROVR.js";
36
+ } from "./cli-DMKRP33X.js";
37
37
  import {
38
38
  CliError
39
- } from "./cli-N6H6T2E2.js";
39
+ } from "./cli-AEAFLZGY.js";
40
40
 
41
41
  // cli/commands/resources/guide/update.ts
42
42
  async function updateFacilitatorGuide(definitionInput, options) {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CliError
4
- } from "./cli-N6H6T2E2.js";
4
+ } from "./cli-AEAFLZGY.js";
5
5
 
6
6
  // cli/utils/package-context.ts
7
7
  import { existsSync, readFileSync } from "fs";
@@ -4,7 +4,7 @@ import {
4
4
  isChapterEmpty,
5
5
  referenceLocale,
6
6
  resolveBlobInputs
7
- } from "./cli-MM3A4SPH.js";
7
+ } from "./cli-KJV3GGBA.js";
8
8
  import {
9
9
  validateTickControllerResult
10
10
  } from "./cli-4LKXZQ2B.js";
@@ -19,15 +19,20 @@ import {
19
19
  LLMClient,
20
20
  LogicCalls,
21
21
  LogicLoader,
22
+ SESSION_VALIDATION,
22
23
  TtsClient,
23
24
  applyContextUpdate,
24
25
  carryLogicFailure,
25
26
  deepMergeContext,
27
+ describeScenarioProblems,
26
28
  logicErrorOf,
27
29
  logicFailureOf,
28
30
  markLogicFailure,
29
- resolveCapabilityScope
30
- } from "./cli-UTM4QU67.js";
31
+ partitionProblems,
32
+ resolveCapabilityScope,
33
+ runScenarioGates,
34
+ withOverrunRetry
35
+ } from "./cli-5PTCQTS6.js";
31
36
  import {
32
37
  deleteBlobs,
33
38
  describeBlob,
@@ -46,7 +51,7 @@ import {
46
51
  loadConfig,
47
52
  settingsSchemas,
48
53
  validateSessionOverrides
49
- } from "./cli-ZF7IFB54.js";
54
+ } from "./cli-ZZSPFLTK.js";
50
55
 
51
56
  // cli/execution/configuration-builder.ts
52
57
  import { existsSync, readFileSync } from "fs";
@@ -190,6 +195,47 @@ var FakeClock = class {
190
195
  }
191
196
  };
192
197
 
198
+ // cli/core/session-start-gate.ts
199
+ async function gateSessionStart(options) {
200
+ const { config, scenario, overrides } = options;
201
+ if (!config || !(config.requires ?? []).includes(SESSION_VALIDATION)) return [];
202
+ if (!hasOverrides(overrides)) return [];
203
+ const judge = () => runScenarioGates({
204
+ packagePath: options.packagePath,
205
+ config,
206
+ scenarioSettings: scenario?.definition.settings ?? null,
207
+ sessionOverrides: overrides,
208
+ locale: options.locale,
209
+ ...options.boundMs === void 0 ? {} : { boundMs: options.boundMs },
210
+ // As the session resolves its files: its scenario's, and its own blobs.
211
+ files: { scenarioRoot: scenario?.rootDirectory ?? null, blobs: "all" }
212
+ });
213
+ const problems = await withOverrunRetry(judge);
214
+ const { blocking, warnings } = partitionProblems(problems);
215
+ const failed = blocking.filter((problem) => problem.failed === true);
216
+ if (failed.length > 0 && failed.every((problem) => problem.overran === true)) {
217
+ throw new DeniedError(
218
+ "The session cannot start: the game's own check of its settings did not finish in time, even when run again. A busy host can cause this, so try again; if it keeps happening, the check is too slow, which is a fault in the game rather than in the settings.\n" + describeScenarioProblems(failed).join("\n")
219
+ );
220
+ }
221
+ if (failed.length > 0) {
222
+ throw new DeniedError(
223
+ "The session cannot start: the game's own check of its settings failed, which is a fault in the game rather than in the settings, so changing them will not help.\n" + describeScenarioProblems(failed).join("\n")
224
+ );
225
+ }
226
+ if (blocking.length > 0) {
227
+ throw new DeniedError(
228
+ "The session cannot start: the game's check found a problem with its settings. Change these and try again:\n" + describeScenarioProblems(blocking).join("\n")
229
+ );
230
+ }
231
+ return describeScenarioProblems(warnings);
232
+ }
233
+ function hasOverrides(overrides) {
234
+ return Object.values(overrides ?? {}).some(
235
+ (values) => values !== null && typeof values === "object" && Object.keys(values).length > 0
236
+ );
237
+ }
238
+
193
239
  // cli/core/tick-timer.ts
194
240
  var FLOOR_MS = 3e4;
195
241
  var CEILING_MS = 7 * 24 * 60 * 60 * 1e3;
@@ -2653,6 +2699,31 @@ var GameExecutor = class {
2653
2699
  getActiveScenario() {
2654
2700
  return this.activeScenario;
2655
2701
  }
2702
+ /**
2703
+ * What `initialize(true, …, scenarioId)` would start a session on, read
2704
+ * without changing anything: the package on disk, the scenario it would
2705
+ * activate and the session-override layer it would load. So a start can be
2706
+ * judged (§15.8) before the running session is torn down, and a refusal
2707
+ * leaves it as it was.
2708
+ */
2709
+ async previewStart(scenarioId) {
2710
+ const config = await this.deps.loadConfig(join2(this.packagePath, "seriousgaming.sdk.json"));
2711
+ const scenarios = config.scenarios ?? [];
2712
+ const scenario = scenarioId === null ? null : scenarioId ? scenarios.find((s) => s.definition.identifier === scenarioId) ?? null : scenarios.find((s) => s.definition.default) ?? null;
2713
+ let overrides = {};
2714
+ const path2 = this.deps.configStore.getPath(this.packagePath);
2715
+ const recorded = this.deps.configStore.readScenario(this.packagePath);
2716
+ const stale = recorded !== void 0 && recorded !== (scenario?.definition.identifier ?? null);
2717
+ if (!this.inMemory && !stale && this.deps.fs.existsSync(path2)) {
2718
+ try {
2719
+ overrides = JSON.parse(
2720
+ await this.deps.fs.readFile(path2, "utf-8")
2721
+ );
2722
+ } catch {
2723
+ }
2724
+ }
2725
+ return { config, scenario, overrides };
2726
+ }
2656
2727
  /** The scenario `initialize` would activate for this id, without activating it. */
2657
2728
  findScenario(scenarioId) {
2658
2729
  return this.configResolver.resolveScenario(scenarioId);
@@ -5459,6 +5530,8 @@ var Session = class {
5459
5530
  started = false;
5460
5531
  /** True while the game's `setup` slot still owes us a Play (§8.3). */
5461
5532
  holdingAtSetup = false;
5533
+ /** The `Scenario` gate's warnings from the last start, for the mutation that caused it. */
5534
+ startWarnings = [];
5462
5535
  /** Edits on disk that apply only at the next initialisation (#640). */
5463
5536
  pending = NO_PENDING_CHANGES;
5464
5537
  /**
@@ -5574,6 +5647,7 @@ var Session = class {
5574
5647
  this.resolveMode();
5575
5648
  this.holdingAtSetup = this.hasSetup();
5576
5649
  if (!this.holdingAtSetup) {
5650
+ await this.gateStart();
5577
5651
  await this.buildInitialState();
5578
5652
  await this.roster.materialise();
5579
5653
  }
@@ -6018,10 +6092,17 @@ var Session = class {
6018
6092
  async apply(command) {
6019
6093
  try {
6020
6094
  const readsBefore = this.timers.readsBefore(command);
6095
+ this.startWarnings = [];
6021
6096
  const committedAtTick = await this.dispatch(command);
6022
6097
  await this.timers.retime(command, readsBefore);
6023
6098
  this.emitState(command.type);
6024
- return committedAtTick === void 0 ? { ok: true } : { ok: true, committedAtTick };
6099
+ const warnings = this.startWarnings;
6100
+ this.startWarnings = [];
6101
+ return {
6102
+ ok: true,
6103
+ ...committedAtTick === void 0 ? {} : { committedAtTick },
6104
+ ...warnings.length > 0 ? { warnings } : {}
6105
+ };
6025
6106
  } catch (error) {
6026
6107
  if (error instanceof RefusedError) {
6027
6108
  return withStale({ ok: false, outcome: error.outcome }, error);
@@ -6123,6 +6204,12 @@ var Session = class {
6123
6204
  if (this.runKind !== "walkthrough") {
6124
6205
  refuseTeamCountAtPlay(this.state.getTeamCount(), this.teamBounds());
6125
6206
  }
6207
+ try {
6208
+ await this.gateStart();
6209
+ } catch (error) {
6210
+ if (error instanceof DeniedError) this.report(error.message, "play");
6211
+ throw error;
6212
+ }
6126
6213
  this.holdingAtSetup = false;
6127
6214
  await this.buildInitialState();
6128
6215
  await this.roster.replayJoins();
@@ -6176,6 +6263,16 @@ var Session = class {
6176
6263
  if (refusal) throw new DeniedError(refusal);
6177
6264
  }
6178
6265
  }
6266
+ if (!this.hasSetup()) {
6267
+ const next = await this.executor.previewStart(command.scenarioId);
6268
+ this.startWarnings = await gateSessionStart({
6269
+ packagePath: this.options.packagePath,
6270
+ config: next.config,
6271
+ scenario: next.scenario,
6272
+ overrides: next.overrides,
6273
+ locale: command.locale ?? this.locale
6274
+ });
6275
+ }
6179
6276
  if (command.teams !== void 0) this.options = { ...this.options, teams: command.teams };
6180
6277
  this.options = { ...this.options, participants };
6181
6278
  if (command.locale !== void 0) this.locale = command.locale;
@@ -6410,6 +6507,16 @@ var Session = class {
6410
6507
  if (!locales) return "";
6411
6508
  return locales[this.locale]?.name ?? locales.en?.name ?? Object.values(locales)[0]?.name ?? "";
6412
6509
  }
6510
+ /** Refuse to enter play over the game's `Scenario` gate, keeping its warnings (§15.8). */
6511
+ async gateStart() {
6512
+ this.startWarnings = await gateSessionStart({
6513
+ packagePath: this.options.packagePath,
6514
+ config: this.executor.getConfig(),
6515
+ scenario: this.executor.getActiveScenario(),
6516
+ overrides: this.executor.getSessionOverrides(),
6517
+ locale: this.locale
6518
+ });
6519
+ }
6413
6520
  report(message, source, teamId) {
6414
6521
  this.errors.push(message);
6415
6522
  this.emit({ type: "error", message, source, ...teamId ? { teamId } : {} });
@@ -6436,8 +6543,10 @@ export {
6436
6543
  rebuildsWalkthrough,
6437
6544
  commandError,
6438
6545
  atomicWriteFile,
6546
+ readConfigurationScenario,
6439
6547
  saveSessionSettingsOverrides,
6440
6548
  FakeClock,
6549
+ gateSessionStart,
6441
6550
  IDLE_TIMER,
6442
6551
  REINITIALISED_ON_CHANGE,
6443
6552
  Session
@@ -1,32 +1,32 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  resolveSession
4
- } from "./cli-OANH3BTQ.js";
5
- import "./cli-WU43JT4T.js";
4
+ } from "./cli-QRAYIXNE.js";
5
+ import "./cli-HJPNNORV.js";
6
6
  import {
7
7
  emit,
8
8
  teamIndexFromArgument,
9
9
  viewReport,
10
10
  viewSummary,
11
11
  warnIfStale
12
- } from "./cli-GPAN6XK2.js";
13
- import "./cli-LQ4VSM5R.js";
14
- import "./cli-EJVAQCMQ.js";
15
- import "./cli-TDSQSCX4.js";
16
- import "./cli-SRHBXZCN.js";
17
- import "./cli-MM3A4SPH.js";
12
+ } from "./cli-QWO3XJR3.js";
13
+ import "./cli-7N7WFRWA.js";
14
+ import "./cli-BF6L37O3.js";
15
+ import "./cli-K6M6YB67.js";
16
+ import "./cli-Y33ULHYO.js";
17
+ import "./cli-KJV3GGBA.js";
18
18
  import "./cli-4LKXZQ2B.js";
19
- import "./cli-MMN4BPO4.js";
19
+ import "./cli-7CW2BBJG.js";
20
20
  import "./cli-QUNIRH7A.js";
21
- import "./cli-UTM4QU67.js";
21
+ import "./cli-5PTCQTS6.js";
22
22
  import "./cli-25RWY5BQ.js";
23
23
  import "./cli-QWQMPCL6.js";
24
- import "./cli-ZF7IFB54.js";
24
+ import "./cli-ZZSPFLTK.js";
25
25
  import "./cli-F2D4GGUA.js";
26
- import "./cli-4YB3ROVR.js";
26
+ import "./cli-DMKRP33X.js";
27
27
  import {
28
28
  CliError
29
- } from "./cli-N6H6T2E2.js";
29
+ } from "./cli-AEAFLZGY.js";
30
30
 
31
31
  // cli/commands/view.ts
32
32
  async function viewCommand(options) {