@seriousgaming/sdk-tools 1.10.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 (219) hide show
  1. package/dist/agent/guidance.md +35 -23
  2. package/dist/{cli-F2D4GGUA.js → cli-2BKEIIA3.js} +66 -0
  3. package/dist/{cli-NQSL2CIH.js → cli-2QGTDHRX.js} +21 -21
  4. package/dist/{cli-33MZSPPK.js → cli-2SDG3SZ7.js} +21 -21
  5. package/dist/{cli-CLO7HKEQ.js → cli-2VXP34R5.js} +5 -3
  6. package/dist/{cli-P3NUTOPK.js → cli-2W4B6PD5.js} +1 -1
  7. package/dist/{cli-SOO6SEIS.js → cli-2X7DKSXN.js} +28 -25
  8. package/dist/{cli-LNEZ6KDW.js → cli-2ZP4N7HK.js} +19 -19
  9. package/dist/{cli-5O7XENQY.js → cli-3GJYZH4C.js} +5 -5
  10. package/dist/{cli-NAZTYKZT.js → cli-3GO3M2MX.js} +30 -14
  11. package/dist/{cli-YZJBFKRI.js → cli-3LDLUNME.js} +17 -17
  12. package/dist/{cli-J42N4PJG.js → cli-3WY6L2WP.js} +31 -29
  13. package/dist/{cli-WG7MAOCS.js → cli-44MBABRD.js} +25 -25
  14. package/dist/{cli-MGZYQDCH.js → cli-4IO7MKLR.js} +20 -20
  15. package/dist/{cli-HNDFANQG.js → cli-4U2PY7W3.js} +1 -1
  16. package/dist/{cli-4JNF3O5N.js → cli-4WI4LTBI.js} +2 -2
  17. package/dist/{cli-OTBCA54D.js → cli-55EIGGZK.js} +1 -1
  18. package/dist/{cli-5TKPT3CY.js → cli-5AQV6FTL.js} +18 -18
  19. package/dist/{cli-KNXY43YV.js → cli-5CW7BEU7.js} +3 -3
  20. package/dist/{cli-5V4N4BR4.js → cli-5JUVHNZF.js} +12 -12
  21. package/dist/{cli-F3YJKP6D.js → cli-5KERL6HV.js} +9 -4
  22. package/dist/{cli-HN442ZVK.js → cli-5KSA24NQ.js} +24 -24
  23. package/dist/{cli-5VZBFMCK.js → cli-5PIFO3EN.js} +8 -0
  24. package/dist/{cli-IQBY7Z7Q.js → cli-5QN2Z43X.js} +20 -20
  25. package/dist/cli-5XSPAA5X.js +69 -0
  26. package/dist/{cli-QW7VXL2V.js → cli-62KAYGXO.js} +20 -20
  27. package/dist/{cli-TDLIPYKT.js → cli-6IMV5ZZU.js} +26 -26
  28. package/dist/{cli-UULZSQBV.js → cli-6KWCIAN2.js} +764 -66
  29. package/dist/{cli-2ANX6E3A.js → cli-6NWETIX5.js} +20 -20
  30. package/dist/{cli-EXUPHPDJ.js → cli-774W3MN5.js} +26 -26
  31. package/dist/cli-7BUD3VAD.js +16 -0
  32. package/dist/{cli-7NUFHMGE.js → cli-7KEP57S7.js} +12 -12
  33. package/dist/{cli-6CYAOUYT.js → cli-7OYFJMA6.js} +18 -18
  34. package/dist/{cli-ILHHJR2S.js → cli-7ZNEDQ3G.js} +20 -20
  35. package/dist/{cli-5RRPUL6V.js → cli-AFK6OUID.js} +12 -12
  36. package/dist/{cli-A3AJQZEN.js → cli-AIYQFWXN.js} +25 -25
  37. package/dist/{cli-B5DWKRZ4.js → cli-ARAAEWIQ.js} +2 -2
  38. package/dist/cli-AVQYV3N4.js +36 -0
  39. package/dist/{cli-35GV2F6R.js → cli-B54Z6CXH.js} +16 -16
  40. package/dist/{cli-467VRXGP.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-XR3O2YTV.js → cli-BPS2JG74.js} +20 -20
  44. package/dist/{cli-W3RG2MRI.js → cli-BVO55SR2.js} +2 -2
  45. package/dist/{cli-PYAST3G5.js → cli-CFH3JZP5.js} +21 -21
  46. package/dist/{cli-VZVHS5AP.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-GRSQRFRG.js → cli-DZCLRZXJ.js} +9 -2
  54. package/dist/{cli-RSF5R3HC.js → cli-EJ47IE45.js} +28 -25
  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-MUOLHQNL.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-HHRP6FP6.js → cli-HCXS5EXU.js} +25 -25
  65. package/dist/cli-HEUNNHDH.js +36 -0
  66. package/dist/{cli-36GABN2A.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-JMNPMDXH.js → cli-IO32YA5N.js} +26 -26
  70. package/dist/cli-IPTGZDBB.js +36 -0
  71. package/dist/{cli-L54SXUK6.js → cli-J25TYFKB.js} +19 -19
  72. package/dist/{cli-CQ4ZR3ZQ.js → cli-J7XYMEMX.js} +20 -20
  73. package/dist/{cli-5DWR7RPQ.js → cli-JC5OJRID.js} +2 -2
  74. package/dist/{cli-25SJZI7N.js → cli-JD563OF4.js} +126 -27
  75. package/dist/{cli-JAVMRERQ.js → cli-JRJF2WHU.js} +20 -20
  76. package/dist/{cli-UQC46YSV.js → cli-JTFLIMIG.js} +3 -3
  77. package/dist/{cli-2AH6D32V.js → cli-K2BSJ2PK.js} +2 -2
  78. package/dist/{cli-XB5PI2XT.js → cli-K4QTYMN2.js} +25 -25
  79. package/dist/{cli-5SHG2M7E.js → cli-KFJDD4C4.js} +20 -20
  80. package/dist/{cli-WW54THXN.js → cli-KVQ2JPVD.js} +1 -1
  81. package/dist/{cli-O5WYATAI.js → cli-L6AHMW2Z.js} +4 -2
  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-HNG6PZW2.js → cli-LI6G7GND.js} +27 -27
  85. package/dist/{cli-2AVPNSAX.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-OXU6TTEN.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-VALLLE6Y.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-Z3DITVBE.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-267QJ2DS.js → cli-OMG4E53H.js} +20 -20
  100. package/dist/{cli-C32Q5E5I.js → cli-P6V3NSU4.js} +1 -1
  101. package/dist/{cli-PBSLPO6G.js → cli-PAMQMTHK.js} +21 -21
  102. package/dist/{cli-RUEPTOWG.js → cli-PKTHOCT3.js} +26 -26
  103. package/dist/{cli-PTXOKO2Y.js → cli-QK7QAP5H.js} +18 -18
  104. package/dist/cli-QQ432JEN.js +36 -0
  105. package/dist/{cli-YFLQ7XOO.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-M6AZFIMV.js → cli-RQISHMJF.js} +88 -23
  109. package/dist/{cli-X64BNBQH.js → cli-RVZH462G.js} +585 -8
  110. package/dist/{cli-LLJQI2QP.js → cli-SEEOQVUL.js} +12 -12
  111. package/dist/{cli-QTCTWYCM.js → cli-SO354HPI.js} +3 -3
  112. package/dist/{cli-URCHZDTS.js → cli-T76HDH7F.js} +90 -5
  113. package/dist/{cli-ZJW6HQ6N.js → cli-TIS7DWRR.js} +7 -7
  114. package/dist/{cli-WOFYI7HZ.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-4A7RWFNO.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-IPTHJT3J.js → cli-XCG33I77.js} +28 -25
  121. package/dist/{cli-WLSACMYA.js → cli-YHLSG5HB.js} +30 -28
  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/index.d.ts +1 -1
  128. package/dist/client/test-session.d.ts +44 -6
  129. package/dist/client.js +1934 -286
  130. package/dist/core/assessment-moves.d.ts +32 -0
  131. package/dist/core/assessment-reports.d.ts +38 -0
  132. package/dist/core/assessment-settings.d.ts +15 -0
  133. package/dist/core/benchmark-samples.d.ts +28 -0
  134. package/dist/core/session-host.d.ts +4 -0
  135. package/dist/core/session-roster.d.ts +6 -0
  136. package/dist/core/session-timers.d.ts +40 -0
  137. package/dist/core/session.d.ts +14 -1
  138. package/dist/core/tick-timer.d.ts +18 -0
  139. package/dist/dev/console/assets/{index-Ch6HHb2T.js → index-zd--5H1f.js} +26 -26
  140. package/dist/dev/console/index.html +1 -1
  141. package/dist/dev/shell.d.ts +8 -0
  142. package/dist/dev/view/commands.d.ts +3 -1
  143. package/dist/docs/api/index.md +4 -2
  144. package/dist/docs/api/sdk-commands.md +29 -0
  145. package/dist/docs/api/sdk-e2e.md +30 -0
  146. package/dist/docs/api/sdk-projection.md +5 -0
  147. package/dist/docs/api/sdk-tools-client.md +68 -6
  148. package/dist/docs/api/sdk-tools-vite.md +21 -0
  149. package/dist/docs/api/sdk-ui.md +7 -0
  150. package/dist/docs/api/sdk.md +834 -19
  151. package/dist/docs/changelog.md +67 -0
  152. package/dist/docs/cli-error-codes.md +5 -1
  153. package/dist/docs/cli-reference.md +76 -2
  154. package/dist/docs/concepts/index.md +2 -0
  155. package/dist/docs/concepts/terminology.md +12 -0
  156. package/dist/docs/guides/assessments.md +248 -0
  157. package/dist/docs/guides/benchmarks.md +241 -0
  158. package/dist/docs/guides/endpoints.md +1 -1
  159. package/dist/docs/guides/engine-testing.md +49 -14
  160. package/dist/docs/guides/engine.md +10 -2
  161. package/dist/docs/guides/index.md +2 -0
  162. package/dist/docs/guides/presentation.md +11 -9
  163. package/dist/docs/guides/session-hooks.md +24 -22
  164. package/dist/docs/guides/testing.md +3 -8
  165. package/dist/docs/guides/tick-controller.md +22 -1
  166. package/dist/docs/guides/ui.md +24 -0
  167. package/dist/docs/guides/upgrading.md +36 -0
  168. package/dist/docs/page-index.md +18 -13
  169. package/dist/docs/recipes/create-assessment.md +124 -0
  170. package/dist/docs/recipes/create-benchmark.md +115 -0
  171. package/dist/docs/recipes/create-game.md +1 -1
  172. package/dist/docs/recipes/fix-duplicate-packages.md +8 -19
  173. package/dist/docs/recipes/index.md +2 -0
  174. package/dist/execution/context-composition.d.ts +39 -4
  175. package/dist/execution/engine-state.d.ts +13 -0
  176. package/dist/execution/executor.d.ts +16 -0
  177. package/dist/execution/logic-result.d.ts +13 -2
  178. package/dist/help-examples.d.ts +12 -0
  179. package/dist/host/adapter.d.ts +24 -1
  180. package/dist/host/protocol.d.ts +115 -1
  181. package/dist/host.js +29 -1
  182. package/dist/oxlint/logic.json +184 -0
  183. package/dist/playwright.js +1928 -280
  184. package/dist/runtime/index.d.ts +3 -1
  185. package/dist/runtime/manifest-version.d.ts +1 -1
  186. package/dist/runtime.js +298 -16
  187. package/dist/schema.json +189 -0
  188. package/dist/templates/package/README.md.liquid +1 -0
  189. package/dist/templates/package/claude/rules/workflow-create-engine.md +1 -1
  190. package/dist/templates/package/claude/rules/workflow-create-user-interface.md +1 -1
  191. package/dist/templates/package/claude/rules/workflow-test-engine-or-ui.md +1 -1
  192. package/dist/templates/package/claude/rules/workflow-update-sdk-version.md +2 -2
  193. package/dist/templates/package/claude/settings.json.template +1 -0
  194. package/dist/templates/package/oxfmtrc.json.template +8 -1
  195. package/dist/templates/package/oxlintrc.json.template +1 -180
  196. package/dist/templates/package/package.json.liquid +1 -0
  197. package/dist/templates/package/vite.config.ts.liquid +2 -8
  198. package/dist/templates/package/vitest.config.ts.liquid +2 -8
  199. package/dist/templates/starter-game/package.json +2 -1
  200. package/dist/templates/starter-game/testing/engine/game.engine.test.ts +62 -37
  201. package/dist/templates/starter-game/vite.config.ts +2 -8
  202. package/dist/templates/starter-game/vitest.config.ts +4 -3
  203. package/dist/templating/resource-metadata.d.ts +1 -1
  204. package/dist/utils/error-codes.d.ts +9 -1
  205. package/dist/utils/resource-scan.d.ts +5 -0
  206. package/dist/validation/assessment-validation.d.ts +34 -0
  207. package/dist/validation/benchmark-validation.d.ts +20 -0
  208. package/dist/validation/schema-validation.d.ts +4 -0
  209. package/dist/vite/index.d.ts +30 -0
  210. package/dist/vite.js +12 -0
  211. package/package.json +12 -4
  212. package/dist/cli-27Z5T52R.js +0 -30
  213. package/dist/cli-5XE4OMFL.js +0 -36
  214. package/dist/cli-BB6CU4ZC.js +0 -36
  215. package/dist/cli-FGP6YYM7.js +0 -36
  216. package/dist/cli-I3ZAZYWP.js +0 -36
  217. package/dist/cli-RFAPPYXK.js +0 -36
  218. package/dist/cli-WZNIW6ZO.js +0 -16
  219. package/dist/cli-XEEOJGBL.js +0 -36
@@ -1,52 +1,53 @@
1
1
  #!/usr/bin/env node
2
+ import {
3
+ input
4
+ } from "./cli-2W4B6PD5.js";
2
5
  import {
3
6
  resolvePatchedDefinition
4
- } from "./cli-CLO7HKEQ.js";
7
+ } from "./cli-2VXP34R5.js";
5
8
  import "./cli-S5IVGDDD.js";
6
9
  import {
7
10
  getResourceIdentifierError,
8
11
  readAuthoredBundle
9
- } from "./cli-6O7YCK2M.js";
12
+ } from "./cli-MITZ6SE7.js";
10
13
  import {
11
14
  resolveInputSource
12
- } from "./cli-XW3JLRSA.js";
15
+ } from "./cli-DWDSBTYL.js";
16
+ import {
17
+ loadPackageContext
18
+ } from "./cli-L6AHMW2Z.js";
13
19
  import {
14
20
  updateEndpointFiles
15
- } from "./cli-URCHZDTS.js";
16
- import "./cli-WW54THXN.js";
21
+ } from "./cli-T76HDH7F.js";
22
+ import "./cli-KVQ2JPVD.js";
17
23
  import "./cli-QUNIRH7A.js";
18
- import "./cli-B5DWKRZ4.js";
19
- import {
20
- loadPackageContext
21
- } from "./cli-O5WYATAI.js";
22
- import "./cli-5DWR7RPQ.js";
24
+ import "./cli-ARAAEWIQ.js";
25
+ import "./cli-JC5OJRID.js";
23
26
  import {
27
+ existingResourcesHint,
24
28
  findBundleFile
25
- } from "./cli-GRSQRFRG.js";
29
+ } from "./cli-DZCLRZXJ.js";
26
30
  import {
27
31
  operationError,
28
32
  printOperationResult,
29
33
  regenerateTypes
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";
34
+ } from "./cli-SO354HPI.js";
35
+ import "./cli-JTFLIMIG.js";
36
+ import "./cli-RMVJMOWU.js";
37
+ import "./cli-M3Z2KOEB.js";
38
+ import "./cli-HXT25ETJ.js";
38
39
  import "./cli-25RWY5BQ.js";
39
- import "./cli-QWQMPCL6.js";
40
40
  import {
41
41
  validateSDKEndpoint
42
- } from "./cli-X64BNBQH.js";
43
- import "./cli-F2D4GGUA.js";
42
+ } from "./cli-RVZH462G.js";
43
+ import "./cli-QWQMPCL6.js";
44
+ import "./cli-2BKEIIA3.js";
44
45
  import {
45
46
  logger
46
- } from "./cli-TCQJL2GY.js";
47
+ } from "./cli-D5VOSJZ7.js";
47
48
  import {
48
49
  CliError
49
- } from "./cli-5VZBFMCK.js";
50
+ } from "./cli-5PIFO3EN.js";
50
51
 
51
52
  // cli/commands/resources/endpoint/update.ts
52
53
  import { readFileSync } from "fs";
@@ -92,7 +93,9 @@ async function updateEndpoint(identifier, definitionInput, options) {
92
93
  logger.info("No JSON definition provided. Starting interactive mode...\n");
93
94
  const endpointFilePath = findBundleFile(options.workingDir, "endpoint", identifier);
94
95
  if (!endpointFilePath) {
95
- throw new CliError("RESOURCE_NOT_FOUND", `Endpoint "${identifier}" not found`);
96
+ throw new CliError("RESOURCE_NOT_FOUND", `Endpoint "${identifier}" not found`, {
97
+ hint: existingResourcesHint(options.workingDir, "endpoint")
98
+ });
96
99
  }
97
100
  let existingBundle;
98
101
  try {
@@ -1,59 +1,60 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  reviewSchemaProperties
4
- } from "./cli-B3EFE7ZF.js";
4
+ } from "./cli-WXGJFA4F.js";
5
+ import {
6
+ confirmAction,
7
+ input
8
+ } from "./cli-2W4B6PD5.js";
5
9
  import {
6
10
  resolvePatchedDefinition
7
- } from "./cli-CLO7HKEQ.js";
11
+ } from "./cli-2VXP34R5.js";
8
12
  import "./cli-S5IVGDDD.js";
9
13
  import {
10
14
  getResourceIdentifierError,
11
15
  readAuthoredBundle
12
- } from "./cli-6O7YCK2M.js";
16
+ } from "./cli-MITZ6SE7.js";
13
17
  import {
14
18
  resolveInputSource
15
- } from "./cli-XW3JLRSA.js";
19
+ } from "./cli-DWDSBTYL.js";
20
+ import {
21
+ loadPackageContext
22
+ } from "./cli-L6AHMW2Z.js";
16
23
  import {
17
24
  updateCapabilityFiles
18
- } from "./cli-URCHZDTS.js";
19
- import "./cli-WW54THXN.js";
25
+ } from "./cli-T76HDH7F.js";
26
+ import "./cli-KVQ2JPVD.js";
20
27
  import {
21
28
  extractSchemaProperties,
22
29
  wrapAsFullSchema
23
30
  } from "./cli-QUNIRH7A.js";
24
- import "./cli-B5DWKRZ4.js";
25
- import {
26
- loadPackageContext
27
- } from "./cli-O5WYATAI.js";
28
- import "./cli-5DWR7RPQ.js";
31
+ import "./cli-ARAAEWIQ.js";
32
+ import "./cli-JC5OJRID.js";
29
33
  import {
34
+ existingResourcesHint,
30
35
  findBundleFile
31
- } from "./cli-GRSQRFRG.js";
36
+ } from "./cli-DZCLRZXJ.js";
32
37
  import {
33
38
  operationError,
34
39
  printOperationResult,
35
40
  regenerateTypes
36
- } from "./cli-QTCTWYCM.js";
37
- import {
38
- confirmAction,
39
- input
40
- } from "./cli-P3NUTOPK.js";
41
- import "./cli-UQC46YSV.js";
42
- import "./cli-6BLVI2JM.js";
43
- import "./cli-UEQMK4WX.js";
44
- import "./cli-JXQLHJO2.js";
41
+ } from "./cli-SO354HPI.js";
42
+ import "./cli-JTFLIMIG.js";
43
+ import "./cli-RMVJMOWU.js";
44
+ import "./cli-M3Z2KOEB.js";
45
+ import "./cli-HXT25ETJ.js";
45
46
  import "./cli-25RWY5BQ.js";
46
- import "./cli-QWQMPCL6.js";
47
47
  import {
48
48
  validateSDKCapability
49
- } from "./cli-X64BNBQH.js";
50
- import "./cli-F2D4GGUA.js";
49
+ } from "./cli-RVZH462G.js";
50
+ import "./cli-QWQMPCL6.js";
51
+ import "./cli-2BKEIIA3.js";
51
52
  import {
52
53
  logger
53
- } from "./cli-TCQJL2GY.js";
54
+ } from "./cli-D5VOSJZ7.js";
54
55
  import {
55
56
  CliError
56
- } from "./cli-5VZBFMCK.js";
57
+ } from "./cli-5PIFO3EN.js";
57
58
 
58
59
  // cli/commands/resources/capability/update.ts
59
60
  import { readFileSync } from "fs";
@@ -100,8 +101,9 @@ async function updateCapability(identifier, definitionInput, options) {
100
101
  logger.info("No JSON definition provided. Starting interactive mode...\n");
101
102
  const capabilityPath = findBundleFile(options.workingDir, "capability", identifier);
102
103
  if (!capabilityPath) {
103
- throw new CliError("RESOURCE_NOT_FOUND", `Capability "${identifier}" not found
104
- `);
104
+ throw new CliError("RESOURCE_NOT_FOUND", `Capability "${identifier}" not found`, {
105
+ hint: existingResourcesHint(options.workingDir, "capability")
106
+ });
105
107
  }
106
108
  let existingBundle;
107
109
  try {
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ createSettingsEditor
4
+ } from "./cli-7OYFJMA6.js";
5
+ import "./cli-B5TC4MEL.js";
6
+ import "./cli-2W4B6PD5.js";
7
+ import "./cli-2VXP34R5.js";
8
+ import "./cli-S5IVGDDD.js";
9
+ import "./cli-MITZ6SE7.js";
10
+ import "./cli-DWDSBTYL.js";
11
+ import "./cli-L6AHMW2Z.js";
12
+ import "./cli-T76HDH7F.js";
13
+ import "./cli-KVQ2JPVD.js";
14
+ import "./cli-QUNIRH7A.js";
15
+ import "./cli-ARAAEWIQ.js";
16
+ import "./cli-JC5OJRID.js";
17
+ import "./cli-DZCLRZXJ.js";
18
+ import "./cli-SO354HPI.js";
19
+ import "./cli-JTFLIMIG.js";
20
+ import "./cli-RMVJMOWU.js";
21
+ import "./cli-M3Z2KOEB.js";
22
+ import "./cli-HXT25ETJ.js";
23
+ import "./cli-25RWY5BQ.js";
24
+ import "./cli-RVZH462G.js";
25
+ import "./cli-QWQMPCL6.js";
26
+ import "./cli-2BKEIIA3.js";
27
+ import "./cli-D5VOSJZ7.js";
28
+ import "./cli-5PIFO3EN.js";
29
+
30
+ // cli/commands/resources/setup/new.ts
31
+ function createSetup(definitionInput, options) {
32
+ return createSettingsEditor("setup", definitionInput, options);
33
+ }
34
+ export {
35
+ createSetup
36
+ };
@@ -0,0 +1,69 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ confirmAction
4
+ } from "./cli-2W4B6PD5.js";
5
+ import {
6
+ loadPackageContext
7
+ } from "./cli-L6AHMW2Z.js";
8
+ import {
9
+ deleteBenchmarkFiles,
10
+ findBenchmarkReferences
11
+ } from "./cli-T76HDH7F.js";
12
+ import "./cli-KVQ2JPVD.js";
13
+ import "./cli-QUNIRH7A.js";
14
+ import "./cli-ARAAEWIQ.js";
15
+ import "./cli-JC5OJRID.js";
16
+ import "./cli-DZCLRZXJ.js";
17
+ import {
18
+ operationError,
19
+ recordOperationResult,
20
+ regenerateTypes
21
+ } from "./cli-SO354HPI.js";
22
+ import "./cli-JTFLIMIG.js";
23
+ import "./cli-RMVJMOWU.js";
24
+ import "./cli-M3Z2KOEB.js";
25
+ import "./cli-HXT25ETJ.js";
26
+ import "./cli-25RWY5BQ.js";
27
+ import "./cli-RVZH462G.js";
28
+ import "./cli-QWQMPCL6.js";
29
+ import "./cli-2BKEIIA3.js";
30
+ import {
31
+ logger
32
+ } from "./cli-D5VOSJZ7.js";
33
+ import "./cli-5PIFO3EN.js";
34
+
35
+ // cli/commands/resources/benchmark/delete.ts
36
+ async function deleteBenchmark(identifier, options) {
37
+ logger.info("\nDeleting benchmark...\n");
38
+ loadPackageContext(options.workingDir);
39
+ const references = findBenchmarkReferences({ packagePath: options.workingDir, identifier });
40
+ logger.info(`Benchmark: ${identifier}`);
41
+ if (references.length > 0) {
42
+ logger.info("\nThis benchmark is referenced by:");
43
+ for (const ref of references) logger.info(` - ${ref}`);
44
+ logger.info("\nThese references will be removed.");
45
+ }
46
+ const confirmed = await confirmAction(
47
+ { message: "Are you sure you want to delete this benchmark?" },
48
+ options.yes
49
+ );
50
+ if (!confirmed) {
51
+ logger.info("\nDeletion cancelled.\n");
52
+ return;
53
+ }
54
+ logger.info("");
55
+ const result = deleteBenchmarkFiles({ packagePath: options.workingDir, identifier });
56
+ if (!result.success) {
57
+ throw operationError(result, "Failed to delete benchmark files");
58
+ }
59
+ recordOperationResult(result);
60
+ for (const file of result.filesDeleted || []) logger.info(` \u2713 Deleted: ${file}`);
61
+ for (const ref of result.referencesRemoved || []) {
62
+ logger.info(` \u2713 Removed reference from: ${ref}`);
63
+ }
64
+ await regenerateTypes(options.workingDir);
65
+ logger.success("Benchmark deleted successfully!");
66
+ }
67
+ export {
68
+ deleteBenchmark
69
+ };
@@ -0,0 +1,85 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ readAuthoredBundle
4
+ } from "./cli-MITZ6SE7.js";
5
+ import {
6
+ resolveInputSource
7
+ } from "./cli-DWDSBTYL.js";
8
+ import {
9
+ loadPackageContext
10
+ } from "./cli-L6AHMW2Z.js";
11
+ import {
12
+ createBenchmarkFiles
13
+ } from "./cli-T76HDH7F.js";
14
+ import "./cli-KVQ2JPVD.js";
15
+ import "./cli-QUNIRH7A.js";
16
+ import "./cli-ARAAEWIQ.js";
17
+ import "./cli-JC5OJRID.js";
18
+ import "./cli-DZCLRZXJ.js";
19
+ import {
20
+ BUILD_COMMAND,
21
+ generateTypes,
22
+ operationError,
23
+ printOperationResult
24
+ } from "./cli-SO354HPI.js";
25
+ import "./cli-JTFLIMIG.js";
26
+ import "./cli-RMVJMOWU.js";
27
+ import "./cli-M3Z2KOEB.js";
28
+ import "./cli-HXT25ETJ.js";
29
+ import "./cli-25RWY5BQ.js";
30
+ import {
31
+ validateSDKBenchmark
32
+ } from "./cli-RVZH462G.js";
33
+ import "./cli-QWQMPCL6.js";
34
+ import {
35
+ resourceExample
36
+ } from "./cli-2BKEIIA3.js";
37
+ import {
38
+ logger
39
+ } from "./cli-D5VOSJZ7.js";
40
+ import {
41
+ CliError
42
+ } from "./cli-5PIFO3EN.js";
43
+
44
+ // cli/commands/resources/benchmark/new.ts
45
+ async function createBenchmark(definitionInput, options) {
46
+ logger.info("\nCreating new benchmark...\n");
47
+ loadPackageContext(options.workingDir, { suggestNewPackage: true });
48
+ const inputSource = await resolveInputSource(definitionInput, options.file);
49
+ if (inputSource.kind !== "json") {
50
+ throw new CliError(
51
+ "USAGE_MISSING_INPUT",
52
+ "A benchmark is created from a JSON definition.",
53
+ {
54
+ hint: `Expected format:
55
+ ${resourceExample("benchmark", "new")}`
56
+ }
57
+ );
58
+ }
59
+ const bundle = readAuthoredBundle({
60
+ json: inputSource.json,
61
+ type: "benchmark",
62
+ command: "new",
63
+ validate: validateSDKBenchmark
64
+ });
65
+ const { identifier, ...definition } = bundle.definition;
66
+ const result = await createBenchmarkFiles({
67
+ packagePath: options.workingDir,
68
+ identifier,
69
+ definition
70
+ });
71
+ if (!result.success) {
72
+ throw operationError(result, "Failed to create benchmark files");
73
+ }
74
+ logger.success("Benchmark created successfully!");
75
+ printOperationResult(result);
76
+ await generateTypes(options.workingDir);
77
+ logger.info("Next steps:");
78
+ logger.info(` 1. Add "${identifier}" to the engine's "benchmarks" and write it from Run`);
79
+ logger.info(' 2. List "benchmarks" in "requires" in seriousgaming.sdk.json');
80
+ logger.info(" 3. Edit sample.json to preview a debrief against realistic figures");
81
+ logger.info(` 4. Run "${BUILD_COMMAND}" to build your package`);
82
+ }
83
+ export {
84
+ createBenchmark
85
+ };
package/dist/cli.js CHANGED
@@ -2,29 +2,29 @@
2
2
  import {
3
3
  RESOURCE_DESCRIPTORS,
4
4
  lazy
5
- } from "./cli-4A7RWFNO.js";
5
+ } from "./cli-W4LMRVZT.js";
6
6
  import {
7
7
  DEV_PORT_ENV_VAR,
8
8
  ERROR_OVERLAY_ENV_VAR,
9
9
  defaultDevPort
10
- } from "./cli-C32Q5E5I.js";
10
+ } from "./cli-P6V3NSU4.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-G2GLW5Z4.js";
15
+ } from "./cli-BHAODVTZ.js";
16
16
  import {
17
17
  setAssumeYes,
18
18
  setPromptUsage
19
- } from "./cli-P3NUTOPK.js";
19
+ } from "./cli-2W4B6PD5.js";
20
20
  import {
21
21
  compact,
22
22
  indent,
23
23
  resourceExample
24
- } from "./cli-F2D4GGUA.js";
24
+ } from "./cli-2BKEIIA3.js";
25
25
  import {
26
26
  setVerboseMode
27
- } from "./cli-TCQJL2GY.js";
27
+ } from "./cli-D5VOSJZ7.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-5VZBFMCK.js";
38
+ } from "./cli-5PIFO3EN.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-W3RG2MRI.js"), "blobUploadCommand");
142
- var buildCommand = lazy(() => import("./cli-NAZTYKZT.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-LLJQI2QP.js"), "deleteCommand");
149
- var devCommand = lazy(() => import("./cli-267QJ2DS.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");
141
+ var blobUploadCommand = lazy(() => import("./cli-BVO55SR2.js"), "blobUploadCommand");
142
+ var buildCommand = lazy(() => import("./cli-3GO3M2MX.js"), "buildCommand");
143
+ var buildEngineCommand = lazy(() => import("./cli-IGEL7UJQ.js"), "buildEngineCommand");
144
+ var configGetCommand = lazy(() => import("./cli-HCJLYI24.js"), "configGetCommand");
145
+ var configPathCommand = lazy(() => import("./cli-HCJLYI24.js"), "configPathCommand");
146
+ var configSetCommand = lazy(() => import("./cli-HCJLYI24.js"), "configSetCommand");
147
+ var configureCommand = lazy(() => import("./cli-HAFCFY77.js"), "configureCommand");
148
+ var deleteCommand = lazy(() => import("./cli-SEEOQVUL.js"), "deleteCommand");
149
+ var devCommand = lazy(() => import("./cli-OMG4E53H.js"), "devCommand");
150
+ var devStatusCommand = lazy(() => import("./cli-BCXGOLU3.js"), "devStatusCommand");
151
+ var devStopCommand = lazy(() => import("./cli-BCXGOLU3.js"), "devStopCommand");
152
+ var docsCommand = lazy(() => import("./cli-DAHR7PKB.js"), "docsCommand");
153
+ var docsExportCommand = lazy(() => import("./cli-GRBVNGDW.js"), "docsExportCommand");
154
154
  var endpointAuditCommand = lazy(
155
- () => import("./cli-5RRPUL6V.js"),
155
+ () => import("./cli-AFK6OUID.js"),
156
156
  "endpointAuditCommand"
157
157
  );
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-7NUFHMGE.js"), "newCommand");
158
+ var endpointCallCommand = lazy(() => import("./cli-FYV77YS2.js"), "endpointCallCommand");
159
+ var endpointListCommand = lazy(() => import("./cli-LEWSCDH5.js"), "endpointListCommand");
160
+ var generateCommand = lazy(() => import("./cli-7BUD3VAD.js"), "generateCommand");
161
+ var initCommand = lazy(() => import("./cli-NCLMUXLC.js"), "initCommand");
162
+ var newCommand = lazy(() => import("./cli-7KEP57S7.js"), "newCommand");
163
163
  var packageBundleCommand = lazy(
164
- () => import("./cli-BQ36DV5C.js"),
164
+ () => import("./cli-MI2DEDMA.js"),
165
165
  "packageBundleCommand"
166
166
  );
167
167
  var packagePublishCommand = lazy(
168
- () => import("./cli-5O7XENQY.js"),
168
+ () => import("./cli-3GJYZH4C.js"),
169
169
  "packagePublishCommand"
170
170
  );
171
171
  var packageVersionCommand = lazy(
172
- () => import("./cli-4FJL3KQZ.js"),
172
+ () => import("./cli-UKEZJFIT.js"),
173
173
  "packageVersionCommand"
174
174
  );
175
- var patchCommand = lazy(() => import("./cli-KJA6GLZI.js"), "patchCommand");
176
- var resolveCommand = lazy(() => import("./cli-IKSLPAZN.js"), "resolveCommand");
177
- var screenshotCommand = lazy(() => import("./cli-PTXOKO2Y.js"), "screenshotCommand");
178
- var clockAdvanceCommand = lazy(() => import("./cli-MUOLHQNL.js"), "clockAdvanceCommand");
179
- var faultCommand = lazy(() => import("./cli-MUOLHQNL.js"), "faultCommand");
180
- var localeCommand = lazy(() => import("./cli-MUOLHQNL.js"), "localeCommand");
181
- var participantAddCommand = lazy(() => import("./cli-MUOLHQNL.js"), "participantAddCommand");
182
- var participantJoinCommand = lazy(() => import("./cli-MUOLHQNL.js"), "participantJoinCommand");
183
- var participantMoveCommand = lazy(() => import("./cli-MUOLHQNL.js"), "participantMoveCommand");
175
+ var patchCommand = lazy(() => import("./cli-R2DFD6ZZ.js"), "patchCommand");
176
+ var resolveCommand = lazy(() => import("./cli-LCYUBCVY.js"), "resolveCommand");
177
+ var screenshotCommand = lazy(() => import("./cli-QK7QAP5H.js"), "screenshotCommand");
178
+ var clockAdvanceCommand = lazy(() => import("./cli-FTLH4WCE.js"), "clockAdvanceCommand");
179
+ var faultCommand = lazy(() => import("./cli-FTLH4WCE.js"), "faultCommand");
180
+ var localeCommand = lazy(() => import("./cli-FTLH4WCE.js"), "localeCommand");
181
+ var participantAddCommand = lazy(() => import("./cli-FTLH4WCE.js"), "participantAddCommand");
182
+ var participantJoinCommand = lazy(() => import("./cli-FTLH4WCE.js"), "participantJoinCommand");
183
+ var participantMoveCommand = lazy(() => import("./cli-FTLH4WCE.js"), "participantMoveCommand");
184
184
  var participantRenameCommand = lazy(
185
- () => import("./cli-MUOLHQNL.js"),
185
+ () => import("./cli-FTLH4WCE.js"),
186
186
  "participantRenameCommand"
187
187
  );
188
- var playCommand = lazy(() => import("./cli-MUOLHQNL.js"), "playCommand");
189
- var reconfigureCommand = lazy(() => import("./cli-MUOLHQNL.js"), "reconfigureCommand");
190
- var resetCommand = lazy(() => import("./cli-MUOLHQNL.js"), "resetCommand");
191
- var scenarioCommand = lazy(() => import("./cli-MUOLHQNL.js"), "scenarioCommand");
192
- var teamAddCommand = lazy(() => import("./cli-MUOLHQNL.js"), "teamAddCommand");
193
- var teamRemoveCommand = lazy(() => import("./cli-MUOLHQNL.js"), "teamRemoveCommand");
194
- var teamRenameCommand = lazy(() => import("./cli-MUOLHQNL.js"), "teamRenameCommand");
195
- var timerCommand = lazy(() => import("./cli-MUOLHQNL.js"), "timerCommand");
196
- var undoCommand = lazy(() => import("./cli-MUOLHQNL.js"), "undoCommand");
197
- var waitingRoomCommand = lazy(() => import("./cli-MUOLHQNL.js"), "waitingRoomCommand");
198
- var tickCommand = lazy(() => import("./cli-27Z5T52R.js"), "tickCommand");
199
- var updateCommand = lazy(() => import("./cli-5V4N4BR4.js"), "updateCommand");
200
- var versionCommand = lazy(() => import("./cli-5M6KDNVX.js"), "versionCommand");
201
- var viewCommand = lazy(() => import("./cli-MDVC5ZNM.js"), "viewCommand");
188
+ var playCommand = lazy(() => import("./cli-FTLH4WCE.js"), "playCommand");
189
+ var reconfigureCommand = lazy(() => import("./cli-FTLH4WCE.js"), "reconfigureCommand");
190
+ var resetCommand = lazy(() => import("./cli-FTLH4WCE.js"), "resetCommand");
191
+ var scenarioCommand = lazy(() => import("./cli-FTLH4WCE.js"), "scenarioCommand");
192
+ var teamAddCommand = lazy(() => import("./cli-FTLH4WCE.js"), "teamAddCommand");
193
+ var teamRemoveCommand = lazy(() => import("./cli-FTLH4WCE.js"), "teamRemoveCommand");
194
+ var teamRenameCommand = lazy(() => import("./cli-FTLH4WCE.js"), "teamRenameCommand");
195
+ var timerCommand = lazy(() => import("./cli-FTLH4WCE.js"), "timerCommand");
196
+ var undoCommand = lazy(() => import("./cli-FTLH4WCE.js"), "undoCommand");
197
+ var waitingRoomCommand = lazy(() => import("./cli-FTLH4WCE.js"), "waitingRoomCommand");
198
+ var tickCommand = lazy(() => import("./cli-O3DJO2CS.js"), "tickCommand");
199
+ var updateCommand = lazy(() => import("./cli-5JUVHNZF.js"), "updateCommand");
200
+ var versionCommand = lazy(() => import("./cli-MTZUJGBK.js"), "versionCommand");
201
+ var viewCommand = lazy(() => import("./cli-OBRZ36VP.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.