@seriousgaming/sdk-tools 1.11.0 → 1.12.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 (192) hide show
  1. package/dist/agent/guidance.md +4 -0
  2. package/dist/{cli-F2D4GGUA.js → cli-2BKEIIA3.js} +66 -0
  3. package/dist/{cli-ZGCG6C22.js → cli-2QGTDHRX.js} +21 -21
  4. package/dist/{cli-SRXDLMXY.js → cli-2SDG3SZ7.js} +21 -21
  5. package/dist/{cli-DH35TZ2Q.js → cli-2VXP34R5.js} +2 -2
  6. package/dist/{cli-P3NUTOPK.js → cli-2W4B6PD5.js} +1 -1
  7. package/dist/{cli-WJVPSVF2.js → cli-2X7DKSXN.js} +24 -24
  8. package/dist/{cli-ATAJSIXH.js → cli-2ZP4N7HK.js} +19 -19
  9. package/dist/{cli-5O7XENQY.js → cli-3GJYZH4C.js} +5 -5
  10. package/dist/{cli-H6PP2MZT.js → cli-3GO3M2MX.js} +17 -13
  11. package/dist/{cli-HMDYG6PS.js → cli-3LDLUNME.js} +17 -17
  12. package/dist/{cli-BZOKZ7LP.js → cli-3WY6L2WP.js} +27 -27
  13. package/dist/{cli-REAM7LSC.js → cli-44MBABRD.js} +25 -25
  14. package/dist/{cli-5TTJWM2R.js → cli-4IO7MKLR.js} +20 -20
  15. package/dist/{cli-HNDFANQG.js → cli-4U2PY7W3.js} +1 -1
  16. package/dist/{cli-WQ7JBZNW.js → cli-4WI4LTBI.js} +2 -2
  17. package/dist/{cli-OTBCA54D.js → cli-55EIGGZK.js} +1 -1
  18. package/dist/{cli-FYPW25VD.js → cli-5AQV6FTL.js} +18 -18
  19. package/dist/{cli-RKPQLB7J.js → cli-5CW7BEU7.js} +3 -3
  20. package/dist/{cli-27TQVLVF.js → cli-5JUVHNZF.js} +12 -12
  21. package/dist/{cli-F3YJKP6D.js → cli-5KERL6HV.js} +9 -4
  22. package/dist/{cli-MSNSXVGF.js → cli-5KSA24NQ.js} +24 -24
  23. package/dist/{cli-5VZBFMCK.js → cli-5PIFO3EN.js} +8 -0
  24. package/dist/{cli-FT3X3D4P.js → cli-5QN2Z43X.js} +20 -20
  25. package/dist/cli-5XSPAA5X.js +69 -0
  26. package/dist/{cli-B2QAJ5RQ.js → cli-62KAYGXO.js} +20 -20
  27. package/dist/{cli-QPV3TYOM.js → cli-6IMV5ZZU.js} +26 -26
  28. package/dist/{cli-UULZSQBV.js → cli-6KWCIAN2.js} +764 -66
  29. package/dist/{cli-DQE7ITIR.js → cli-6NWETIX5.js} +20 -20
  30. package/dist/{cli-L7F4XKCB.js → cli-774W3MN5.js} +26 -26
  31. package/dist/cli-7BUD3VAD.js +16 -0
  32. package/dist/{cli-XNOAO6DY.js → cli-7KEP57S7.js} +12 -12
  33. package/dist/{cli-5UKWX3IU.js → cli-7OYFJMA6.js} +18 -18
  34. package/dist/{cli-WNHMJM3Z.js → cli-7ZNEDQ3G.js} +20 -20
  35. package/dist/{cli-5RRPUL6V.js → cli-AFK6OUID.js} +12 -12
  36. package/dist/{cli-6P6V2EHY.js → cli-AIYQFWXN.js} +25 -25
  37. package/dist/{cli-ERJNDBDH.js → cli-ARAAEWIQ.js} +2 -2
  38. package/dist/cli-AVQYV3N4.js +36 -0
  39. package/dist/{cli-TI2FOFPA.js → cli-B54Z6CXH.js} +16 -16
  40. package/dist/{cli-EEO5ZPAZ.js → cli-B5TC4MEL.js} +5 -5
  41. package/dist/{cli-5Z4D3F6Y.js → cli-BCXGOLU3.js} +3 -3
  42. package/dist/{cli-G2GLW5Z4.js → cli-BHAODVTZ.js} +1 -1
  43. package/dist/{cli-4F24FUW6.js → cli-BPS2JG74.js} +20 -20
  44. package/dist/{cli-W3RG2MRI.js → cli-BVO55SR2.js} +2 -2
  45. package/dist/{cli-R5SNTPND.js → cli-CFH3JZP5.js} +21 -21
  46. package/dist/{cli-Q7QSWNY2.js → cli-CTK2OIK6.js} +20 -20
  47. package/dist/{cli-ATWJCB2G.js → cli-CW5MV4VX.js} +4 -4
  48. package/dist/{cli-TCQJL2GY.js → cli-D5VOSJZ7.js} +1 -1
  49. package/dist/{cli-KIZTASLL.js → cli-DAEPMK7A.js} +5 -5
  50. package/dist/{cli-44CM2AH2.js → cli-DAHR7PKB.js} +1 -1
  51. package/dist/{cli-XW3JLRSA.js → cli-DWDSBTYL.js} +1 -1
  52. package/dist/cli-DYSDPGXW.js +95 -0
  53. package/dist/{cli-QEFYDXMH.js → cli-DZCLRZXJ.js} +1 -1
  54. package/dist/{cli-77T4LJQF.js → cli-EJ47IE45.js} +24 -24
  55. package/dist/{cli-QDBYFITU.js → cli-EK4OSJHA.js} +2 -2
  56. package/dist/{cli-GO64NABP.js → cli-FCJHNXDA.js} +1 -1
  57. package/dist/{cli-ZNQBF4Z3.js → cli-FNESSE3L.js} +1 -1
  58. package/dist/{cli-D3S7NJZ3.js → cli-FTLH4WCE.js} +17 -17
  59. package/dist/{cli-JHLWBRXB.js → cli-FYV77YS2.js} +18 -18
  60. package/dist/cli-GMJX6Q4Q.js +36 -0
  61. package/dist/{cli-7JUNA74L.js → cli-GRBVNGDW.js} +1 -1
  62. package/dist/{cli-XKAIDYIE.js → cli-HAFCFY77.js} +33 -19
  63. package/dist/{cli-OXLOGXT3.js → cli-HCJLYI24.js} +3 -3
  64. package/dist/{cli-XOYUTNER.js → cli-HCXS5EXU.js} +25 -25
  65. package/dist/cli-HEUNNHDH.js +36 -0
  66. package/dist/{cli-G3TU6CP6.js → cli-HNUTIWDZ.js} +19 -19
  67. package/dist/{cli-JXQLHJO2.js → cli-HXT25ETJ.js} +244 -243
  68. package/dist/{cli-5EH4WTH4.js → cli-IGEL7UJQ.js} +5 -5
  69. package/dist/{cli-TLSTSZAC.js → cli-IO32YA5N.js} +26 -26
  70. package/dist/cli-IPTGZDBB.js +36 -0
  71. package/dist/{cli-OBLEROSC.js → cli-J25TYFKB.js} +19 -19
  72. package/dist/{cli-5ATO27Z4.js → cli-J7XYMEMX.js} +20 -20
  73. package/dist/{cli-X3TSTTYI.js → cli-JC5OJRID.js} +2 -2
  74. package/dist/{cli-25SJZI7N.js → cli-JD563OF4.js} +126 -27
  75. package/dist/{cli-VXLHOZSO.js → cli-JRJF2WHU.js} +20 -20
  76. package/dist/{cli-UQC46YSV.js → cli-JTFLIMIG.js} +3 -3
  77. package/dist/{cli-K4HSQWXC.js → cli-K2BSJ2PK.js} +2 -2
  78. package/dist/{cli-OM32UURE.js → cli-K4QTYMN2.js} +25 -25
  79. package/dist/{cli-BJFYGVJV.js → cli-KFJDD4C4.js} +20 -20
  80. package/dist/{cli-WW54THXN.js → cli-KVQ2JPVD.js} +1 -1
  81. package/dist/{cli-LHMRUJVN.js → cli-L6AHMW2Z.js} +1 -1
  82. package/dist/{cli-IKSLPAZN.js → cli-LCYUBCVY.js} +4 -4
  83. package/dist/{cli-HGCOEL5T.js → cli-LEWSCDH5.js} +4 -4
  84. package/dist/{cli-XJ7JESC2.js → cli-LI6G7GND.js} +27 -27
  85. package/dist/{cli-OMTHTWYJ.js → cli-LU2GCWIU.js} +21 -21
  86. package/dist/{cli-UEQMK4WX.js → cli-M3Z2KOEB.js} +1 -1
  87. package/dist/{cli-226ZJ72R.js → cli-M6E3E3I2.js} +170 -3
  88. package/dist/{cli-NKKCDO6K.js → cli-MCRPA4Z6.js} +20 -20
  89. package/dist/{cli-BQ36DV5C.js → cli-MI2DEDMA.js} +3 -3
  90. package/dist/{cli-6O7YCK2M.js → cli-MITZ6SE7.js} +3 -3
  91. package/dist/{cli-LPFSJ625.js → cli-MTIYD3BX.js} +26 -26
  92. package/dist/{cli-5M6KDNVX.js → cli-MTZUJGBK.js} +2 -2
  93. package/dist/{cli-GSOV26O5.js → cli-NCLMUXLC.js} +14 -14
  94. package/dist/{cli-X52TXCNF.js → cli-NLS3DKWH.js} +26 -26
  95. package/dist/{cli-AH6AMAIB.js → cli-NMDGS7IE.js} +1 -1
  96. package/dist/cli-O3DJO2CS.js +30 -0
  97. package/dist/{cli-BC67QHD5.js → cli-O47D5BFN.js} +2 -2
  98. package/dist/{cli-MDVC5ZNM.js → cli-OBRZ36VP.js} +14 -14
  99. package/dist/{cli-UVIURDZC.js → cli-OMG4E53H.js} +20 -20
  100. package/dist/{cli-C32Q5E5I.js → cli-P6V3NSU4.js} +1 -1
  101. package/dist/{cli-RMD5WSUQ.js → cli-PAMQMTHK.js} +21 -21
  102. package/dist/{cli-WNBP3LOD.js → cli-PKTHOCT3.js} +26 -26
  103. package/dist/{cli-S3NHXAJM.js → cli-QK7QAP5H.js} +18 -18
  104. package/dist/cli-QQ432JEN.js +36 -0
  105. package/dist/{cli-YYXAGJQR.js → cli-QVNDPTBU.js} +20 -20
  106. package/dist/{cli-KJA6GLZI.js → cli-R2DFD6ZZ.js} +15 -15
  107. package/dist/{cli-6BLVI2JM.js → cli-RMVJMOWU.js} +111 -7
  108. package/dist/{cli-TEBV2OIW.js → cli-RQISHMJF.js} +83 -21
  109. package/dist/{cli-X64BNBQH.js → cli-RVZH462G.js} +585 -8
  110. package/dist/{cli-6AMK3DYS.js → cli-SEEOQVUL.js} +12 -12
  111. package/dist/{cli-QTCTWYCM.js → cli-SO354HPI.js} +3 -3
  112. package/dist/{cli-RHL4B4H7.js → cli-T76HDH7F.js} +88 -4
  113. package/dist/{cli-ZJW6HQ6N.js → cli-TIS7DWRR.js} +7 -7
  114. package/dist/{cli-6JWDFCUV.js → cli-TY3B6XS7.js} +21 -21
  115. package/dist/{cli-4FJL3KQZ.js → cli-UKEZJFIT.js} +2 -2
  116. package/dist/cli-VQAMW4RF.js +95 -0
  117. package/dist/{cli-ATHATKI5.js → cli-W4LMRVZT.js} +78 -47
  118. package/dist/cli-W7I5KGIB.js +84 -0
  119. package/dist/{cli-B3EFE7ZF.js → cli-WXGJFA4F.js} +1 -1
  120. package/dist/{cli-PNS4KWWC.js → cli-XCG33I77.js} +24 -24
  121. package/dist/{cli-DBMEH4Y5.js → cli-YHLSG5HB.js} +26 -26
  122. package/dist/cli-YNH5DTHY.js +36 -0
  123. package/dist/cli-YPMJWPDA.js +69 -0
  124. package/dist/{cli-PXQYY6KM.js → cli-YSXIR7EM.js} +0 -0
  125. package/dist/cli-ZPFWO4VW.js +85 -0
  126. package/dist/cli.js +53 -53
  127. package/dist/client.js +1918 -283
  128. package/dist/core/assessment-moves.d.ts +32 -0
  129. package/dist/core/assessment-reports.d.ts +38 -0
  130. package/dist/core/assessment-settings.d.ts +15 -0
  131. package/dist/core/benchmark-samples.d.ts +28 -0
  132. package/dist/core/session-host.d.ts +4 -0
  133. package/dist/core/session-roster.d.ts +6 -0
  134. package/dist/core/session-timers.d.ts +40 -0
  135. package/dist/core/session.d.ts +14 -1
  136. package/dist/core/tick-timer.d.ts +18 -0
  137. package/dist/dev/console/assets/{index-Ch6HHb2T.js → index-zd--5H1f.js} +26 -26
  138. package/dist/dev/console/index.html +1 -1
  139. package/dist/dev/shell.d.ts +8 -0
  140. package/dist/dev/view/commands.d.ts +3 -1
  141. package/dist/docs/api/index.md +1 -1
  142. package/dist/docs/api/sdk-commands.md +29 -0
  143. package/dist/docs/api/sdk-e2e.md +30 -0
  144. package/dist/docs/api/sdk-projection.md +5 -0
  145. package/dist/docs/api/sdk-tools-client.md +30 -0
  146. package/dist/docs/api/sdk-ui.md +7 -0
  147. package/dist/docs/api/sdk.md +834 -19
  148. package/dist/docs/changelog.md +28 -0
  149. package/dist/docs/cli-error-codes.md +5 -1
  150. package/dist/docs/cli-reference.md +76 -2
  151. package/dist/docs/concepts/index.md +2 -0
  152. package/dist/docs/concepts/terminology.md +12 -0
  153. package/dist/docs/guides/assessments.md +248 -0
  154. package/dist/docs/guides/benchmarks.md +241 -0
  155. package/dist/docs/guides/engine.md +8 -0
  156. package/dist/docs/guides/index.md +2 -0
  157. package/dist/docs/guides/presentation.md +11 -9
  158. package/dist/docs/guides/session-hooks.md +24 -22
  159. package/dist/docs/guides/tick-controller.md +22 -1
  160. package/dist/docs/guides/ui.md +24 -0
  161. package/dist/docs/guides/upgrading.md +21 -0
  162. package/dist/docs/page-index.md +16 -12
  163. package/dist/docs/recipes/create-assessment.md +124 -0
  164. package/dist/docs/recipes/create-benchmark.md +115 -0
  165. package/dist/docs/recipes/index.md +2 -0
  166. package/dist/execution/context-composition.d.ts +39 -4
  167. package/dist/execution/engine-state.d.ts +13 -0
  168. package/dist/execution/executor.d.ts +16 -0
  169. package/dist/execution/logic-result.d.ts +13 -2
  170. package/dist/help-examples.d.ts +12 -0
  171. package/dist/host/adapter.d.ts +24 -1
  172. package/dist/host/protocol.d.ts +115 -1
  173. package/dist/host.js +29 -1
  174. package/dist/playwright.js +1912 -277
  175. package/dist/runtime/index.d.ts +3 -1
  176. package/dist/runtime/manifest-version.d.ts +1 -1
  177. package/dist/runtime.js +298 -16
  178. package/dist/schema.json +189 -0
  179. package/dist/templating/resource-metadata.d.ts +1 -1
  180. package/dist/utils/error-codes.d.ts +9 -1
  181. package/dist/validation/assessment-validation.d.ts +34 -0
  182. package/dist/validation/benchmark-validation.d.ts +20 -0
  183. package/dist/validation/schema-validation.d.ts +4 -0
  184. package/package.json +3 -3
  185. package/dist/cli-27Z5T52R.js +0 -30
  186. package/dist/cli-3VLBFWHN.js +0 -36
  187. package/dist/cli-BINVO5R7.js +0 -36
  188. package/dist/cli-HLI5UEKX.js +0 -36
  189. package/dist/cli-OF36EA62.js +0 -36
  190. package/dist/cli-OVIJRBFI.js +0 -36
  191. package/dist/cli-UIYKPSIY.js +0 -36
  192. package/dist/cli-WZNIW6ZO.js +0 -16
@@ -1,39 +1,39 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  createFacilitatorGuideFiles
4
- } from "./cli-WQ7JBZNW.js";
4
+ } from "./cli-4WI4LTBI.js";
5
+ import {
6
+ input
7
+ } from "./cli-2W4B6PD5.js";
5
8
  import {
6
9
  readAuthoredBundle
7
- } from "./cli-6O7YCK2M.js";
10
+ } from "./cli-MITZ6SE7.js";
8
11
  import {
9
12
  resolveInputSource
10
- } from "./cli-XW3JLRSA.js";
13
+ } from "./cli-DWDSBTYL.js";
11
14
  import {
12
15
  loadPackageContext
13
- } from "./cli-LHMRUJVN.js";
14
- import "./cli-X3TSTTYI.js";
15
- import "./cli-QEFYDXMH.js";
16
+ } from "./cli-L6AHMW2Z.js";
17
+ import "./cli-JC5OJRID.js";
18
+ import "./cli-DZCLRZXJ.js";
16
19
  import {
17
20
  operationError,
18
21
  printOperationResult
19
- } from "./cli-QTCTWYCM.js";
20
- import {
21
- input
22
- } from "./cli-P3NUTOPK.js";
23
- import "./cli-UQC46YSV.js";
24
- import "./cli-6BLVI2JM.js";
25
- import "./cli-UEQMK4WX.js";
26
- import "./cli-JXQLHJO2.js";
22
+ } from "./cli-SO354HPI.js";
23
+ import "./cli-JTFLIMIG.js";
24
+ import "./cli-RMVJMOWU.js";
25
+ import "./cli-M3Z2KOEB.js";
26
+ import "./cli-HXT25ETJ.js";
27
27
  import "./cli-25RWY5BQ.js";
28
- import "./cli-QWQMPCL6.js";
29
28
  import {
30
29
  validateSDKFacilitatorGuide
31
- } from "./cli-X64BNBQH.js";
32
- import "./cli-F2D4GGUA.js";
30
+ } from "./cli-RVZH462G.js";
31
+ import "./cli-QWQMPCL6.js";
32
+ import "./cli-2BKEIIA3.js";
33
33
  import {
34
34
  logger
35
- } from "./cli-TCQJL2GY.js";
36
- import "./cli-5VZBFMCK.js";
35
+ } from "./cli-D5VOSJZ7.js";
36
+ import "./cli-5PIFO3EN.js";
37
37
 
38
38
  // cli/commands/resources/guide/new.ts
39
39
  async function createFacilitatorGuide(definitionInput, options) {
@@ -1,37 +1,37 @@
1
1
  #!/usr/bin/env node
2
+ import {
3
+ confirmAction
4
+ } from "./cli-2W4B6PD5.js";
5
+ import {
6
+ loadPackageContext
7
+ } from "./cli-L6AHMW2Z.js";
2
8
  import {
3
9
  deleteTickControllerFiles,
4
10
  findTickControllerReferences
5
- } from "./cli-RHL4B4H7.js";
6
- import "./cli-WW54THXN.js";
11
+ } from "./cli-T76HDH7F.js";
12
+ import "./cli-KVQ2JPVD.js";
7
13
  import "./cli-QUNIRH7A.js";
8
- import "./cli-ERJNDBDH.js";
9
- import {
10
- loadPackageContext
11
- } from "./cli-LHMRUJVN.js";
12
- import "./cli-X3TSTTYI.js";
13
- import "./cli-QEFYDXMH.js";
14
+ import "./cli-ARAAEWIQ.js";
15
+ import "./cli-JC5OJRID.js";
16
+ import "./cli-DZCLRZXJ.js";
14
17
  import {
15
18
  operationError,
16
19
  recordOperationResult
17
- } from "./cli-QTCTWYCM.js";
18
- import {
19
- confirmAction
20
- } from "./cli-P3NUTOPK.js";
20
+ } from "./cli-SO354HPI.js";
21
21
  import {
22
22
  generateCommand
23
- } from "./cli-UQC46YSV.js";
24
- import "./cli-6BLVI2JM.js";
25
- import "./cli-UEQMK4WX.js";
26
- import "./cli-JXQLHJO2.js";
23
+ } from "./cli-JTFLIMIG.js";
24
+ import "./cli-RMVJMOWU.js";
25
+ import "./cli-M3Z2KOEB.js";
26
+ import "./cli-HXT25ETJ.js";
27
27
  import "./cli-25RWY5BQ.js";
28
+ import "./cli-RVZH462G.js";
28
29
  import "./cli-QWQMPCL6.js";
29
- import "./cli-X64BNBQH.js";
30
- import "./cli-F2D4GGUA.js";
30
+ import "./cli-2BKEIIA3.js";
31
31
  import {
32
32
  logger
33
- } from "./cli-TCQJL2GY.js";
34
- import "./cli-5VZBFMCK.js";
33
+ } from "./cli-D5VOSJZ7.js";
34
+ import "./cli-5PIFO3EN.js";
35
35
 
36
36
  // cli/commands/resources/tick-controller/delete.ts
37
37
  async function deleteTickController(options) {
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  bundlePaths
4
- } from "./cli-QEFYDXMH.js";
4
+ } from "./cli-DZCLRZXJ.js";
5
5
  import {
6
6
  MANIFEST_REFERRER,
7
7
  RESOURCE_METADATA_BY_MANIFEST_KEY
8
- } from "./cli-X64BNBQH.js";
8
+ } from "./cli-RVZH462G.js";
9
9
 
10
10
  // cli/templating/resource-engine.ts
11
11
  import { existsSync as existsSync2, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync as writeFileSync2 } from "fs";
@@ -12,7 +12,7 @@ import {
12
12
  validateUIFiles,
13
13
  validateUserInterface,
14
14
  validateValidator
15
- } from "./cli-GO64NABP.js";
15
+ } from "./cli-FCJHNXDA.js";
16
16
  import {
17
17
  fileSettingDeclarationErrors,
18
18
  isChapterEmpty,
@@ -20,11 +20,13 @@ import {
20
20
  packageFileSettingErrors,
21
21
  referenceLocale,
22
22
  settingReferences,
23
- strayFences
24
- } from "./cli-226ZJ72R.js";
23
+ strayFences,
24
+ validateAssessment,
25
+ validateEngineAssessments
26
+ } from "./cli-M6E3E3I2.js";
25
27
  import {
26
28
  validateTsTypes
27
- } from "./cli-UEQMK4WX.js";
29
+ } from "./cli-M3Z2KOEB.js";
28
30
  import {
29
31
  LogicLoader,
30
32
  SCENARIO_VALIDATION,
@@ -34,14 +36,14 @@ import {
34
36
  isBlocking,
35
37
  resolveCapabilityScope,
36
38
  runScenarioGates
37
- } from "./cli-JXQLHJO2.js";
38
- import {
39
- describeAssetByReference
40
- } from "./cli-QWQMPCL6.js";
39
+ } from "./cli-HXT25ETJ.js";
41
40
  import {
41
+ ASSESSMENTS_SETTINGS,
42
+ BENCHMARKS_FEATURE,
42
43
  GAME_SETTINGS,
43
44
  LOGIC_NODE_BUILTIN,
44
45
  MANIFEST_FILE,
46
+ MAX_BENCHMARKS_PER_GAME,
45
47
  SETUP_NOTES_DIRECTORY,
46
48
  Transpile,
47
49
  bundleFileOf,
@@ -59,19 +61,99 @@ import {
59
61
  pointerOf,
60
62
  refProblemMessage,
61
63
  refProblems,
64
+ resolveBenchmarkLevel,
62
65
  settingPathDeclared,
63
66
  settingsSchemas,
64
67
  setupNotesLocales,
65
68
  teamsMaxOf,
66
69
  unenforceableLockMessage,
67
70
  unenforceableLocks
68
- } from "./cli-X64BNBQH.js";
71
+ } from "./cli-RVZH462G.js";
72
+ import {
73
+ describeAssetByReference
74
+ } from "./cli-QWQMPCL6.js";
69
75
 
70
76
  // cli/validation/package-validation.ts
71
77
  import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
72
78
  import { readFile } from "fs/promises";
73
79
  import { dirname as dirname2, resolve as resolve2 } from "path";
74
80
 
81
+ // cli/validation/benchmark-validation.ts
82
+ function outcome() {
83
+ return { errors: [], warnings: [], findings: [] };
84
+ }
85
+ function addError(result, finding) {
86
+ result.errors.push(finding.hint ? `${finding.message}. ${finding.hint}` : finding.message);
87
+ result.findings.push({ severity: "error", ...finding });
88
+ }
89
+ function validateBenchmark(benchmark, config) {
90
+ const result = outcome();
91
+ const { identifier } = benchmark.definition;
92
+ const file = bundleFileOf("benchmark", identifier);
93
+ const resource = { type: "benchmark", identifier };
94
+ if (!(config.requires ?? []).includes(BENCHMARKS_FEATURE)) {
95
+ addError(result, {
96
+ code: "FEATURE_UNDECLARED",
97
+ message: `Benchmark "${identifier}" needs the \`${BENCHMARKS_FEATURE}\` feature, but \`requires\` does not list it`,
98
+ hint: `Add "${BENCHMARKS_FEATURE}" to \`requires\` in seriousgaming.sdk.json, so a runtime that cannot record benchmarks refuses the package rather than failing the first round that writes one`,
99
+ file: MANIFEST_FILE,
100
+ pointer: pointerOf("requires"),
101
+ resource
102
+ });
103
+ }
104
+ const engine = config.engine;
105
+ const written = engine?.definition.benchmarks?.includes(identifier) ?? false;
106
+ if (!written) {
107
+ const message = `Benchmark "${identifier}" is not in the engine's "benchmarks", so nothing can write it and it will never hold a value`;
108
+ result.warnings.push(message);
109
+ result.findings.push({
110
+ severity: "warning",
111
+ code: "BENCHMARK_UNWRITTEN",
112
+ message,
113
+ hint: `Add "${identifier}" to "benchmarks" in engine/engine.sdk.json, or delete the benchmark`,
114
+ file,
115
+ resource
116
+ });
117
+ }
118
+ if (written && resolveBenchmarkLevel(benchmark.definition) === "session" && engine?.definition.aggregate !== true) {
119
+ addError(result, {
120
+ code: "PACKAGE_INVALID",
121
+ message: `Benchmark "${identifier}" is session-level, but the engine is not aggregate, so it has no session result to write it under`,
122
+ hint: 'Export InitAggregate and RunAggregate from the engine, or make the benchmark per team by removing "level"',
123
+ file,
124
+ pointer: pointerOf("definition", "level"),
125
+ resource
126
+ });
127
+ }
128
+ return result;
129
+ }
130
+ function validateEngineBenchmarks(config) {
131
+ const result = outcome();
132
+ const declared = new Set((config.benchmarks ?? []).map((b) => b.definition.identifier));
133
+ const engine = config.engine;
134
+ if (engine) {
135
+ (engine.definition.benchmarks ?? []).forEach((identifier, index) => {
136
+ if (declared.has(identifier)) return;
137
+ addError(result, {
138
+ code: "REFERENCE_UNKNOWN",
139
+ message: `Engine declares benchmark "${identifier}", which the package does not have`,
140
+ hint: `Create it with "new benchmark", or remove it from the engine's "benchmarks"`,
141
+ file: bundleFileOf("engine", "engine"),
142
+ pointer: pointerOf("definition", "benchmarks", index),
143
+ resource: { type: "engine", identifier: engine.definition.identifier }
144
+ });
145
+ });
146
+ }
147
+ if (declared.size > MAX_BENCHMARKS_PER_GAME) {
148
+ addError(result, {
149
+ code: "PACKAGE_INVALID",
150
+ message: `The game declares ${declared.size} benchmarks, more than the ${MAX_BENCHMARKS_PER_GAME} a game may have`,
151
+ hint: "Combine related fields into one benchmark, or remove the ones no debrief shows"
152
+ });
153
+ }
154
+ return result;
155
+ }
156
+
75
157
  // cli/validation/facilitator-guide-validator.ts
76
158
  import { existsSync, readdirSync, readFileSync, statSync } from "fs";
77
159
  import { dirname, join, resolve, sep } from "path";
@@ -1386,7 +1468,7 @@ function readsWritten(type) {
1386
1468
  const label = getResourceMeta(type).label;
1387
1469
  return (resource, context) => {
1388
1470
  const definition = resource.definition;
1389
- const outcome = {
1471
+ const outcome2 = {
1390
1472
  errors: [],
1391
1473
  warnings: [],
1392
1474
  findings: []
@@ -1395,15 +1477,15 @@ function readsWritten(type) {
1395
1477
  if (!context.capabilityIds.has(capId)) return;
1396
1478
  if (context.writtenInPackage.has(capId)) return;
1397
1479
  const message = `${label} "${definition.identifier}" declares a read of capability "${capId}", but no engine, user interface, or hook in this package writes it, so it can only ever hold its schema defaults. Remove the read if it is unused, or move the values to a settings resource if they are meant to be constants.`;
1398
- outcome.warnings.push(message);
1399
- outcome.findings.push({
1480
+ outcome2.warnings.push(message);
1481
+ outcome2.findings.push({
1400
1482
  severity: "warning",
1401
1483
  code: "READ_NEVER_WRITTEN",
1402
1484
  message,
1403
1485
  pointer: pointerOf("definition", "reads", index)
1404
1486
  });
1405
1487
  });
1406
- return outcome;
1488
+ return outcome2;
1407
1489
  };
1408
1490
  }
1409
1491
  var uiFiles = (ui, context) => validateUIFiles(ui, context.workingDir);
@@ -1441,12 +1523,25 @@ var VALIDATION_DESCRIPTORS = [
1441
1523
  localRefs("capability")
1442
1524
  ]
1443
1525
  }),
1526
+ descriptor({
1527
+ type: "benchmark",
1528
+ resources: (config) => config.benchmarks ?? [],
1529
+ identify: named,
1530
+ checks: [(benchmark, context) => validateBenchmark(benchmark, context.config)]
1531
+ }),
1532
+ descriptor({
1533
+ type: "assessment",
1534
+ resources: (config) => config.assessments ?? [],
1535
+ identify: named,
1536
+ checks: [(assessment, context) => validateAssessment(assessment, context.config)]
1537
+ }),
1444
1538
  // The built-in `game` resource's defaults are the manifest's own values,
1445
- // which the game's checks already hold to their schema.
1539
+ // which the game's checks already hold to their schema, and the built-in
1540
+ // `assessments` resource's are the bundles' bands, which theirs do.
1446
1541
  descriptor({
1447
1542
  type: "settings",
1448
1543
  resources: (config) => (config.settings ?? []).filter(
1449
- (settings) => settings.definition.identifier !== GAME_SETTINGS
1544
+ (settings) => settings.definition.identifier !== GAME_SETTINGS && !(settings.definition.identifier === ASSESSMENTS_SETTINGS && (config.assessments?.length ?? 0) > 0)
1450
1545
  ),
1451
1546
  identify: named,
1452
1547
  checks: [
@@ -1492,6 +1587,8 @@ var VALIDATION_DESCRIPTORS = [
1492
1587
  writer: writesOf,
1493
1588
  checks: [
1494
1589
  (engine, context) => validateEngine(engine, context.config),
1590
+ (_engine, context) => validateEngineBenchmarks(context.config),
1591
+ (_engine, context) => validateEngineAssessments(context.config),
1495
1592
  (engine, context) => validateEngineFiles(engine, context.workingDir),
1496
1593
  schemaDefaults("engine"),
1497
1594
  readsWritten("engine")
@@ -1830,7 +1927,7 @@ function setupNotesChecks(setup, context) {
1830
1927
  const configures = new Set(setup.definition.configures ?? []);
1831
1928
  const reads = new Set(setup.definition.settings ?? []);
1832
1929
  const resource = { type: "setup", identifier: "setup" };
1833
- const outcome = {
1930
+ const outcome2 = {
1834
1931
  errors: [],
1835
1932
  warnings: [],
1836
1933
  findings: []
@@ -1846,8 +1943,8 @@ function setupNotesChecks(setup, context) {
1846
1943
  const identifier = parseSettingPath(path)?.identifier ?? "";
1847
1944
  if (!configures.has(identifier) && !reads.has(identifier)) {
1848
1945
  const message = `Setup notes ${file}, line ${line}, name \`${path}\`, 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.`;
1849
- outcome.warnings.push(message);
1850
- outcome.findings.push({
1946
+ outcome2.warnings.push(message);
1947
+ outcome2.findings.push({
1851
1948
  severity: "warning",
1852
1949
  code: "SETUP_NOTES_UNCONFIGURED",
1853
1950
  message,
@@ -1858,7 +1955,7 @@ function setupNotesChecks(setup, context) {
1858
1955
  }
1859
1956
  }
1860
1957
  }
1861
- return outcome;
1958
+ return outcome2;
1862
1959
  }
1863
1960
  function ungatedSettingsChecks(gameIdentifier, config) {
1864
1961
  const resource = { type: "game", identifier: gameIdentifier };
@@ -1870,7 +1967,9 @@ function ungatedSettingsChecks(gameIdentifier, config) {
1870
1967
  (config.validators ?? []).filter((v) => v.definition.gates?.includes("scenario")).flatMap((v) => v.definition.settings ?? [])
1871
1968
  );
1872
1969
  for (const identifier of configures) {
1873
- if (identifier === GAME_SETTINGS || gated.has(identifier)) continue;
1970
+ if (identifier === GAME_SETTINGS || identifier === ASSESSMENTS_SETTINGS || gated.has(identifier)) {
1971
+ continue;
1972
+ }
1874
1973
  const message = `The setup UI changes the "${identifier}" settings, but no \`Scenario\` gate declares them, so nothing checks a facilitator's changes to them before the session starts. Add "${identifier}" to the \`settings\` of the validator that exports \`Scenario\` if a change there can break play.`;
1875
1974
  warnings.push(message);
1876
1975
  findings.push({
@@ -1885,8 +1984,8 @@ function ungatedSettingsChecks(gameIdentifier, config) {
1885
1984
  }
1886
1985
  return { errors: [], warnings, findings };
1887
1986
  }
1888
- function record(result, outcome) {
1889
- const byMessage = new Map((outcome.findings ?? []).map((f) => [f.message, f]));
1987
+ function record(result, outcome2) {
1988
+ const byMessage = new Map((outcome2.findings ?? []).map((f) => [f.message, f]));
1890
1989
  const add = (severity, message) => {
1891
1990
  const finding = byMessage.get(message) ?? {
1892
1991
  code: message.includes(LOGIC_NODE_BUILTIN) ? LOGIC_NODE_BUILTIN : "PACKAGE_INVALID",
@@ -1894,18 +1993,18 @@ function record(result, outcome) {
1894
1993
  };
1895
1994
  result.diagnostics.push(located(severity, finding, result));
1896
1995
  };
1897
- if (outcome.errorFindings) {
1898
- result.errors.push(...outcome.errors);
1996
+ if (outcome2.errorFindings) {
1997
+ result.errors.push(...outcome2.errors);
1899
1998
  result.diagnostics.push(
1900
- ...outcome.errorFindings.map((finding) => located("error", finding, result))
1999
+ ...outcome2.errorFindings.map((finding) => located("error", finding, result))
1901
2000
  );
1902
2001
  } else {
1903
- for (const message of outcome.errors) {
2002
+ for (const message of outcome2.errors) {
1904
2003
  result.errors.push(message);
1905
2004
  add("error", message);
1906
2005
  }
1907
2006
  }
1908
- for (const message of outcome.warnings ?? []) {
2007
+ for (const message of outcome2.warnings ?? []) {
1909
2008
  result.warnings.push(message);
1910
2009
  add("warning", message);
1911
2010
  }
@@ -1,37 +1,37 @@
1
1
  #!/usr/bin/env node
2
+ import {
3
+ confirmAction
4
+ } from "./cli-2W4B6PD5.js";
5
+ import {
6
+ loadPackageContext
7
+ } from "./cli-L6AHMW2Z.js";
2
8
  import {
3
9
  deletePresentationFiles,
4
10
  findPresentationReferences
5
- } from "./cli-RHL4B4H7.js";
6
- import "./cli-WW54THXN.js";
11
+ } from "./cli-T76HDH7F.js";
12
+ import "./cli-KVQ2JPVD.js";
7
13
  import "./cli-QUNIRH7A.js";
8
- import "./cli-ERJNDBDH.js";
9
- import {
10
- loadPackageContext
11
- } from "./cli-LHMRUJVN.js";
12
- import "./cli-X3TSTTYI.js";
13
- import "./cli-QEFYDXMH.js";
14
+ import "./cli-ARAAEWIQ.js";
15
+ import "./cli-JC5OJRID.js";
16
+ import "./cli-DZCLRZXJ.js";
14
17
  import {
15
18
  operationError,
16
19
  recordOperationResult
17
- } from "./cli-QTCTWYCM.js";
18
- import {
19
- confirmAction
20
- } from "./cli-P3NUTOPK.js";
20
+ } from "./cli-SO354HPI.js";
21
21
  import {
22
22
  generateCommand
23
- } from "./cli-UQC46YSV.js";
24
- import "./cli-6BLVI2JM.js";
25
- import "./cli-UEQMK4WX.js";
26
- import "./cli-JXQLHJO2.js";
23
+ } from "./cli-JTFLIMIG.js";
24
+ import "./cli-RMVJMOWU.js";
25
+ import "./cli-M3Z2KOEB.js";
26
+ import "./cli-HXT25ETJ.js";
27
27
  import "./cli-25RWY5BQ.js";
28
+ import "./cli-RVZH462G.js";
28
29
  import "./cli-QWQMPCL6.js";
29
- import "./cli-X64BNBQH.js";
30
- import "./cli-F2D4GGUA.js";
30
+ import "./cli-2BKEIIA3.js";
31
31
  import {
32
32
  logger
33
- } from "./cli-TCQJL2GY.js";
34
- import "./cli-5VZBFMCK.js";
33
+ } from "./cli-D5VOSJZ7.js";
34
+ import "./cli-5PIFO3EN.js";
35
35
 
36
36
  // cli/commands/resources/presentation/delete.ts
37
37
  async function deletePresentation(options) {
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  generateAllTypes
4
- } from "./cli-6BLVI2JM.js";
4
+ } from "./cli-RMVJMOWU.js";
5
5
  import {
6
6
  loadConfig
7
- } from "./cli-X64BNBQH.js";
7
+ } from "./cli-RVZH462G.js";
8
8
  import {
9
9
  logger
10
- } from "./cli-TCQJL2GY.js";
10
+ } from "./cli-D5VOSJZ7.js";
11
11
 
12
12
  // cli/commands/generate.ts
13
13
  import { resolve } from "path";
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  normalizeSettingsSchema
4
- } from "./cli-RHL4B4H7.js";
4
+ } from "./cli-T76HDH7F.js";
5
5
  import {
6
6
  CliError
7
- } from "./cli-5VZBFMCK.js";
7
+ } from "./cli-5PIFO3EN.js";
8
8
 
9
9
  // cli/commands/resources/settings/defaults.ts
10
10
  function assertEveryPropertyHasDefault(schema) {
@@ -1,53 +1,53 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  assertEveryPropertyHasDefault
4
- } from "./cli-K4HSQWXC.js";
4
+ } from "./cli-K2BSJ2PK.js";
5
5
  import {
6
6
  promptForSchemaProperties
7
- } from "./cli-B3EFE7ZF.js";
7
+ } from "./cli-WXGJFA4F.js";
8
+ import {
9
+ input
10
+ } from "./cli-2W4B6PD5.js";
8
11
  import {
9
12
  readAuthoredBundle
10
- } from "./cli-6O7YCK2M.js";
13
+ } from "./cli-MITZ6SE7.js";
11
14
  import {
12
15
  resolveInputSource
13
- } from "./cli-XW3JLRSA.js";
16
+ } from "./cli-DWDSBTYL.js";
17
+ import {
18
+ loadPackageContext
19
+ } from "./cli-L6AHMW2Z.js";
14
20
  import {
15
21
  createSettingsFiles
16
- } from "./cli-RHL4B4H7.js";
17
- import "./cli-WW54THXN.js";
22
+ } from "./cli-T76HDH7F.js";
23
+ import "./cli-KVQ2JPVD.js";
18
24
  import "./cli-QUNIRH7A.js";
19
- import "./cli-ERJNDBDH.js";
20
- import {
21
- loadPackageContext
22
- } from "./cli-LHMRUJVN.js";
23
- import "./cli-X3TSTTYI.js";
24
- import "./cli-QEFYDXMH.js";
25
+ import "./cli-ARAAEWIQ.js";
26
+ import "./cli-JC5OJRID.js";
27
+ import "./cli-DZCLRZXJ.js";
25
28
  import {
26
29
  BUILD_COMMAND,
27
30
  generateTypes,
28
31
  operationError,
29
32
  printOperationResult
30
- } from "./cli-QTCTWYCM.js";
31
- import {
32
- input
33
- } from "./cli-P3NUTOPK.js";
34
- import "./cli-UQC46YSV.js";
35
- import "./cli-6BLVI2JM.js";
36
- import "./cli-UEQMK4WX.js";
37
- import "./cli-JXQLHJO2.js";
33
+ } from "./cli-SO354HPI.js";
34
+ import "./cli-JTFLIMIG.js";
35
+ import "./cli-RMVJMOWU.js";
36
+ import "./cli-M3Z2KOEB.js";
37
+ import "./cli-HXT25ETJ.js";
38
38
  import "./cli-25RWY5BQ.js";
39
- import "./cli-QWQMPCL6.js";
40
39
  import {
41
40
  GAME_SETTINGS,
42
41
  validateSDKSettings
43
- } from "./cli-X64BNBQH.js";
44
- import "./cli-F2D4GGUA.js";
42
+ } from "./cli-RVZH462G.js";
43
+ import "./cli-QWQMPCL6.js";
44
+ import "./cli-2BKEIIA3.js";
45
45
  import {
46
46
  logger
47
- } from "./cli-TCQJL2GY.js";
47
+ } from "./cli-D5VOSJZ7.js";
48
48
  import {
49
49
  CliError
50
- } from "./cli-5VZBFMCK.js";
50
+ } from "./cli-5PIFO3EN.js";
51
51
 
52
52
  // cli/commands/resources/settings/new.ts
53
53
  async function createSettings(definitionInput, options) {
@@ -1,44 +1,44 @@
1
1
  #!/usr/bin/env node
2
+ import {
3
+ confirmAction,
4
+ input
5
+ } from "./cli-2W4B6PD5.js";
2
6
  import {
3
7
  applyJsonPatch
4
8
  } from "./cli-S5IVGDDD.js";
5
9
  import {
6
10
  assertNoRemovedManifestFields,
7
11
  getPackageIdentifierError
8
- } from "./cli-6O7YCK2M.js";
12
+ } from "./cli-MITZ6SE7.js";
9
13
  import {
10
14
  resolveInputSource
11
- } from "./cli-XW3JLRSA.js";
15
+ } from "./cli-DWDSBTYL.js";
12
16
  import {
13
17
  updatePackageFiles
14
- } from "./cli-RHL4B4H7.js";
15
- import "./cli-WW54THXN.js";
18
+ } from "./cli-T76HDH7F.js";
19
+ import "./cli-KVQ2JPVD.js";
16
20
  import "./cli-QUNIRH7A.js";
17
- import "./cli-ERJNDBDH.js";
18
- import "./cli-X3TSTTYI.js";
19
- import "./cli-QEFYDXMH.js";
21
+ import "./cli-ARAAEWIQ.js";
22
+ import "./cli-JC5OJRID.js";
23
+ import "./cli-DZCLRZXJ.js";
20
24
  import {
21
25
  operationError,
22
26
  recordOperationResult
23
- } from "./cli-QTCTWYCM.js";
24
- import {
25
- confirmAction,
26
- input
27
- } from "./cli-P3NUTOPK.js";
28
- import "./cli-UQC46YSV.js";
29
- import "./cli-6BLVI2JM.js";
30
- import "./cli-UEQMK4WX.js";
31
- import "./cli-JXQLHJO2.js";
27
+ } from "./cli-SO354HPI.js";
28
+ import "./cli-JTFLIMIG.js";
29
+ import "./cli-RMVJMOWU.js";
30
+ import "./cli-M3Z2KOEB.js";
31
+ import "./cli-HXT25ETJ.js";
32
32
  import "./cli-25RWY5BQ.js";
33
+ import "./cli-RVZH462G.js";
33
34
  import "./cli-QWQMPCL6.js";
34
- import "./cli-X64BNBQH.js";
35
- import "./cli-F2D4GGUA.js";
35
+ import "./cli-2BKEIIA3.js";
36
36
  import {
37
37
  logger
38
- } from "./cli-TCQJL2GY.js";
38
+ } from "./cli-D5VOSJZ7.js";
39
39
  import {
40
40
  CliError
41
- } from "./cli-5VZBFMCK.js";
41
+ } from "./cli-5PIFO3EN.js";
42
42
 
43
43
  // cli/commands/resources/package/update.ts
44
44
  import { existsSync, readFileSync } from "fs";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CliError
4
- } from "./cli-5VZBFMCK.js";
4
+ } from "./cli-5PIFO3EN.js";
5
5
 
6
6
  // cli/utils/sdk-tools-version.ts
7
7
  import { existsSync, readFileSync } from "fs";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CliError
4
- } from "./cli-5VZBFMCK.js";
4
+ } from "./cli-5PIFO3EN.js";
5
5
 
6
6
  // cli/utils/package-context.ts
7
7
  import { existsSync, readFileSync } from "fs";