@seriousgaming/sdk-tools 1.6.1 → 1.8.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.
- package/dist/agent/guidance.md +1 -0
- package/dist/{cli-2NU2LPEE.js → cli-27M4PX7O.js} +17 -17
- package/dist/{cli-2BH7FX27.js → cli-2FXZZLCL.js} +1 -1
- package/dist/{cli-5ACDPCXI.js → cli-2KDV2DYC.js} +3 -3
- package/dist/{cli-OXAUOWCN.js → cli-2QM63J3I.js} +1 -1
- package/dist/{cli-HW53ICZC.js → cli-32NRB2IT.js} +15 -15
- package/dist/{cli-45OCBG53.js → cli-3HBYH4VF.js} +11 -11
- package/dist/{cli-4VFZHLDG.js → cli-3HPAKEJJ.js} +2 -2
- package/dist/{cli-R2MUZQE2.js → cli-3HZGJRQW.js} +11 -11
- package/dist/{cli-PGCIHPU7.js → cli-3OCKRPXI.js} +18 -18
- package/dist/{cli-64AB62PM.js → cli-3OVXQJEW.js} +2 -2
- package/dist/{cli-4UWFQNGF.js → cli-3VV2JLHX.js} +1 -1
- package/dist/{cli-XSLNH5PR.js → cli-42ZUP4X3.js} +141 -5
- package/dist/{cli-ZJFQ7EEA.js → cli-4B5OBHSY.js} +19 -19
- package/dist/{cli-7A6MKCUJ.js → cli-4EMNCU63.js} +27 -19
- package/dist/cli-5CG6BMCY.js +36 -0
- package/dist/{cli-XZCJIKIV.js → cli-5FRKWNVP.js} +19 -19
- package/dist/{cli-Y3DDNMPX.js → cli-5P66N5G6.js} +17 -17
- package/dist/{cli-6VNKQ3OX.js → cli-5SYPXJCB.js} +28 -16
- package/dist/{cli-G6CANSPL.js → cli-66AHBZRZ.js} +15 -15
- package/dist/{cli-BJMS3VX3.js → cli-6AGWTGTO.js} +106 -28
- package/dist/{cli-TTMBBEJC.js → cli-6BAZE75K.js} +18 -18
- package/dist/{cli-GFNDW2DL.js → cli-6FVHRL3H.js} +19 -19
- package/dist/{cli-QVASWX2A.js → cli-6GDPO5VU.js} +2 -2
- package/dist/{cli-7XLHO2FE.js → cli-6NBER36P.js} +1 -1
- package/dist/{cli-FQRVFGN6.js → cli-726NJARI.js} +0 -0
- package/dist/{cli-CD5CIJZI.js → cli-72DRYVTT.js} +13 -13
- package/dist/{cli-MMN4BPO4.js → cli-7CW2BBJG.js} +1 -1
- package/dist/{cli-XAT25PRU.js → cli-7GJGFILU.js} +15 -15
- package/dist/{cli-HFX3YPUL.js → cli-7NCVUM5U.js} +3 -3
- package/dist/cli-7S4G4EKK.js +110 -0
- package/dist/{cli-J4DKUUTK.js → cli-7V6GUIIS.js} +2 -2
- package/dist/{cli-N6H6T2E2.js → cli-AEAFLZGY.js} +12 -0
- package/dist/{cli-C47GJATR.js → cli-AGYCXRPR.js} +3 -3
- package/dist/{cli-XSVGKI3R.js → cli-BC4KKNLA.js} +1 -1
- package/dist/cli-BQ3FHENQ.js +16 -0
- package/dist/{cli-KGM6RRQW.js → cli-BXCCODYD.js} +20 -20
- package/dist/cli-C2XDL4LD.js +30 -0
- package/dist/{cli-MJUYJIEP.js → cli-C45A5VX6.js} +3 -3
- package/dist/{cli-DOXRQ3S5.js → cli-C7YZNPWX.js} +11 -11
- package/dist/{cli-HOE3WLFH.js → cli-CAX4CQTC.js} +13 -13
- package/dist/{cli-YOTGR3NB.js → cli-CVOLMK3Z.js} +1 -1
- package/dist/{cli-ILFDANBR.js → cli-D3CZRXVJ.js} +63 -17
- package/dist/{cli-4YB3ROVR.js → cli-DMKRP33X.js} +1 -1
- package/dist/{cli-Y3O5F4JN.js → cli-DPFN2LIZ.js} +15 -15
- package/dist/{cli-6UTPHWRQ.js → cli-DT756M3Z.js} +20 -20
- package/dist/{cli-TIDQ4WUE.js → cli-DXHPYN4N.js} +1 -1
- package/dist/{cli-6K3VQQUS.js → cli-E665NKUQ.js} +5 -5
- package/dist/{cli-O5ABH2WK.js → cli-EK7CGMGS.js} +17 -17
- package/dist/{cli-6QB2VFPY.js → cli-ESU3J563.js} +15 -15
- package/dist/{cli-VPRRICZA.js → cli-F47ELAXM.js} +47 -47
- package/dist/{cli-RLEGRWFM.js → cli-FH4WBZHA.js} +14 -14
- package/dist/{cli-3D3ZXWOV.js → cli-FHKRO6OU.js} +19 -19
- package/dist/{cli-JZCLIT3O.js → cli-FSEDPZR5.js} +19 -19
- package/dist/{cli-XOTNXEJA.js → cli-FV45UZQP.js} +19 -19
- package/dist/{cli-AV2FYC5G.js → cli-G7FX7ZIU.js} +12 -12
- package/dist/{cli-IP4RXGHM.js → cli-GFONBOJT.js} +129 -38
- package/dist/{cli-C5QOJJWX.js → cli-GHIMH6JU.js} +1 -1
- package/dist/{cli-IDVUHGKG.js → cli-HC7L5DXV.js} +15 -15
- package/dist/{cli-WU43JT4T.js → cli-HJPNNORV.js} +2 -2
- package/dist/{cli-QY5NZAR7.js → cli-HMEZHQBC.js} +17 -17
- package/dist/{cli-JZOZOEZM.js → cli-HQUVSAHY.js} +18 -18
- package/dist/{cli-MYJGMA6U.js → cli-IC5FOT2J.js} +1 -1
- package/dist/{cli-VL2P354N.js → cli-IVZ7AHUJ.js} +3 -3
- package/dist/{cli-B6YHEKIJ.js → cli-J2OTL6JH.js} +5 -5
- package/dist/{cli-Z56ZIVA6.js → cli-JA6UFTSX.js} +17 -17
- package/dist/{cli-MJV47HKI.js → cli-JOXCAGM7.js} +19 -19
- package/dist/{cli-ZBN5KAIB.js → cli-JQ6I5GGE.js} +3 -3
- package/dist/{cli-TDSQSCX4.js → cli-K6M6YB67.js} +1 -1
- package/dist/{cli-C6ZLPK2U.js → cli-KFVA7DT3.js} +3 -3
- package/dist/{cli-KOGRWFN7.js → cli-KH6FKM5A.js} +15 -15
- package/dist/{cli-5IAW3LIF.js → cli-KMT235FV.js} +2 -2
- package/dist/{cli-ZDUADFBY.js → cli-KU4PG7ZA.js} +15 -15
- package/dist/{cli-N45DREM4.js → cli-L4DEEAMK.js} +17 -17
- package/dist/{cli-MU5LB43S.js → cli-ME3JKMJL.js} +19 -19
- package/dist/{cli-C3CMJSNL.js → cli-MJ65PIYI.js} +15 -15
- package/dist/cli-MM2ROZWO.js +36 -0
- package/dist/{cli-RZITKPJX.js → cli-MN7X4UG2.js} +1 -1
- package/dist/{cli-4SIWLHQO.js → cli-MPU4FLA7.js} +4 -4
- package/dist/{cli-HCRTYQQS.js → cli-MPWTXNF6.js} +2 -2
- package/dist/{cli-EVI36HEM.js → cli-N5K2KHPR.js} +15 -15
- package/dist/{cli-RSW6EBBD.js → cli-NGOQWOQE.js} +15 -15
- package/dist/{cli-ZTWOE3ZT.js → cli-NU4SCD5D.js} +1 -1
- package/dist/{cli-BYCHKSSH.js → cli-O3IMNLN2.js} +282 -96
- package/dist/{cli-KGT5L7VZ.js → cli-OUFXSQOW.js} +7265 -4467
- package/dist/{cli-DFBTZEBX.js → cli-PEY6XZDE.js} +16 -16
- package/dist/{cli-QUSCIUOM.js → cli-PLW3TWJ7.js} +19 -19
- package/dist/{cli-JVI24FI6.js → cli-PO2ALWHP.js} +13 -13
- package/dist/{cli-3BRC32CP.js → cli-PPEB3ENS.js} +18 -18
- package/dist/{cli-ZDOTXEKL.js → cli-PZ7G544B.js} +3 -3
- package/dist/{cli-L7VYSXQK.js → cli-Q5BKFFDL.js} +4 -4
- package/dist/{cli-3ZKWV3PN.js → cli-QAI6T5FL.js} +15 -15
- package/dist/{cli-KSGB2ZLK.js → cli-QAVLRCQ5.js} +3 -3
- package/dist/{cli-VDBW23SS.js → cli-QDIH2G2P.js} +15 -15
- package/dist/cli-SN7D7HTX.js +36 -0
- package/dist/{cli-IEMKI7J7.js → cli-SOQJHK4Q.js} +6 -6
- package/dist/{cli-4PXNOJQX.js → cli-SPKPDXWD.js} +15 -15
- package/dist/{cli-MOPSZ3CS.js → cli-SWUAXVIJ.js} +15 -15
- package/dist/cli-TJNLXQJ5.js +36 -0
- package/dist/{cli-BUQI5UU4.js → cli-U2EWI6H5.js} +11 -11
- package/dist/{cli-TT36JCU5.js → cli-UADUC4JD.js} +2 -2
- package/dist/{cli-FWFRKQNE.js → cli-UR63LFVK.js} +2 -2
- package/dist/{cli-J4UBELKF.js → cli-UTHPCZYL.js} +2 -2
- package/dist/{cli-Q6ZBZYK2.js → cli-UYV3BDPA.js} +3 -3
- package/dist/{cli-LQOHATY2.js → cli-UZCQL6YP.js} +3 -3
- package/dist/{cli-HKORECAG.js → cli-V5K3CCYZ.js} +2 -2
- package/dist/cli-V7L3HEL4.js +36 -0
- package/dist/{cli-HSIHDN6K.js → cli-VBSF3R3L.js} +16 -16
- package/dist/{cli-NROTDF5Y.js → cli-VQ4OJ4KE.js} +18 -18
- package/dist/{cli-IUS2YCD3.js → cli-VTLFQHDO.js} +1 -1
- package/dist/{cli-JJSWBW4H.js → cli-W7XCTGQ7.js} +15 -15
- package/dist/{cli-UZZFNXRX.js → cli-W7Y7X3FX.js} +19 -19
- package/dist/cli-WWNTBK37.js +1973 -0
- package/dist/cli-XPJGW375.js +36 -0
- package/dist/{cli-SRHBXZCN.js → cli-Y33ULHYO.js} +1 -1
- package/dist/{cli-TTKICM5P.js → cli-YLYB4ITF.js} +13 -13
- package/dist/{cli-72XDEFU3.js → cli-ZFY6TGU7.js} +4 -4
- package/dist/{cli-6SGCYEEC.js → cli-ZSKP2IRP.js} +53 -38
- package/dist/cli.js +53 -51
- package/dist/client.js +17699 -16630
- package/dist/core/game-settings.d.ts +5 -3
- package/dist/core/save-scenario.d.ts +1 -0
- package/dist/core/session-roster.d.ts +10 -0
- package/dist/core/session-start-gate.d.ts +25 -0
- package/dist/core/session.d.ts +4 -0
- package/dist/dev/console/assets/index-CVNjiRUh.js +208 -0
- package/dist/dev/console/index.html +1 -1
- package/dist/dev/routes.d.ts +5 -2
- package/dist/dev/shell.d.ts +9 -1
- package/dist/dev/view/batch.d.ts +11 -1
- package/dist/dev/view/route.d.ts +18 -1
- package/dist/dev/view/view.d.ts +9 -0
- package/dist/docs/api/deck.md +1 -1
- package/dist/docs/api/index.md +2 -2
- package/dist/docs/api/sdk-commands.md +4 -0
- package/dist/docs/api/sdk-e2e.md +12 -6
- package/dist/docs/api/sdk-projection.md +1 -0
- package/dist/docs/api/sdk-tools-client.md +7 -1
- package/dist/docs/api/sdk-tools-playwright.md +1 -8
- package/dist/docs/api/sdk-ui-testing.md +1 -0
- package/dist/docs/api/sdk-ui.md +67 -63
- package/dist/docs/api/sdk.md +12 -1
- package/dist/docs/changelog.md +26 -0
- package/dist/docs/cli-and-dev-server.md +4 -0
- package/dist/docs/cli-error-codes.md +7 -1
- package/dist/docs/cli-reference.md +20 -2
- package/dist/docs/concepts/index.md +1 -0
- package/dist/docs/guides/engine.md +5 -0
- package/dist/docs/guides/file-handling.md +4 -1
- package/dist/docs/guides/llm-integration.md +3 -2
- package/dist/docs/guides/multi-team-games.md +2 -0
- package/dist/docs/guides/patterns.md +5 -0
- package/dist/docs/guides/presentation.md +11 -10
- package/dist/docs/guides/session-hooks.md +16 -0
- package/dist/docs/guides/session.md +1 -1
- package/dist/docs/guides/settings.md +6 -2
- package/dist/docs/guides/setup.md +23 -2
- package/dist/docs/guides/speech-generation.md +1 -0
- package/dist/docs/guides/testing.md +2 -0
- package/dist/docs/guides/tick-controller.md +2 -0
- package/dist/docs/guides/type-safety.md +2 -1
- package/dist/docs/guides/ui-files-and-llms.md +3 -1
- package/dist/docs/guides/upgrading.md +16 -0
- package/dist/docs/guides/validators.md +27 -4
- package/dist/docs/guides/waiting-room.md +2 -0
- package/dist/docs/page-index.md +12 -10
- package/dist/docs/recipes/call-endpoint-from-ui.md +1 -0
- package/dist/docs/recipes/create-scenario-editor.md +2 -1
- package/dist/docs/recipes/create-setup.md +2 -1
- package/dist/docs/recipes/declare-api-uses.md +1 -0
- package/dist/docs/recipes/describe-setup-with-endpoint.md +69 -0
- package/dist/docs/recipes/index.md +3 -1
- package/dist/docs/recipes/share-logic-between-engine-and-ui.md +2 -2
- package/dist/docs/recipes/test-user-interface.md +1 -1
- package/dist/docs/recipes/validate-scenarios.md +9 -3
- package/dist/docs/recipes/write-setup-notes.md +58 -0
- package/dist/docs/troubleshooting.md +2 -1
- package/dist/execution/executor.d.ts +12 -0
- package/dist/execution/scenario-gates.d.ts +40 -0
- package/dist/host/protocol.d.ts +10 -1
- package/dist/host.js +1083 -467
- package/dist/playwright.js +17760 -16691
- package/dist/runtime/manifest-version.d.ts +1 -1
- package/dist/runtime.js +4 -2
- package/dist/schema.json +10 -1
- package/dist/setup/setup-notes.d.ts +42 -0
- package/dist/templates/package/package.json.liquid +15 -15
- package/dist/templates/starter-game/package.json +13 -13
- package/dist/utils/error-codes.d.ts +13 -1
- package/dist/validation/package-validation.d.ts +1 -1
- package/package.json +22 -23
- package/dist/cli-2GZYGRVL.js +0 -36
- package/dist/cli-5SM367K7.js +0 -30
- package/dist/cli-DDJYUKQG.js +0 -36
- package/dist/cli-LK3V4RI5.js +0 -36
- package/dist/cli-N24OHSAN.js +0 -36
- package/dist/cli-OMWC75CC.js +0 -256
- package/dist/cli-RCIWBCXD.js +0 -36
- package/dist/cli-UMEBPAZQ.js +0 -16
- package/dist/cli-VQ6HVQW4.js +0 -4010
- package/dist/cli-WR3NOY74.js +0 -36
- package/dist/dev/console/assets/index-CuMOOH9m.js +0 -204
package/dist/agent/guidance.md
CHANGED
|
@@ -198,6 +198,7 @@ Every logic function is async, takes one args object, and returns what it writes
|
|
|
198
198
|
|
|
199
199
|
```typescript
|
|
200
200
|
import type { InitializationFunction, RunFunction } from '@seriousgaming/sdk';
|
|
201
|
+
|
|
201
202
|
import type { Context, Settings } from './types';
|
|
202
203
|
|
|
203
204
|
export const Init: InitializationFunction<Context, Settings> = async ({ context, settings }) => ({
|
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
resolvePatchedDefinition
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-KMT235FV.js";
|
|
5
5
|
import "./cli-S5IVGDDD.js";
|
|
6
6
|
import {
|
|
7
7
|
readAuthoredBundle
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-3HPAKEJJ.js";
|
|
9
9
|
import {
|
|
10
10
|
resolveInputSource
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-3VV2JLHX.js";
|
|
12
12
|
import {
|
|
13
13
|
updateWaitingRoomUserInterfaceFiles
|
|
14
|
-
} from "./cli-
|
|
15
|
-
import "./cli-
|
|
14
|
+
} from "./cli-MPU4FLA7.js";
|
|
15
|
+
import "./cli-VTLFQHDO.js";
|
|
16
16
|
import "./cli-QUNIRH7A.js";
|
|
17
|
-
import "./cli-
|
|
17
|
+
import "./cli-UTHPCZYL.js";
|
|
18
18
|
import {
|
|
19
19
|
loadPackageContext
|
|
20
|
-
} from "./cli-
|
|
21
|
-
import "./cli-
|
|
22
|
-
import "./cli-
|
|
20
|
+
} from "./cli-BC4KKNLA.js";
|
|
21
|
+
import "./cli-UADUC4JD.js";
|
|
22
|
+
import "./cli-2QM63J3I.js";
|
|
23
23
|
import {
|
|
24
24
|
operationError,
|
|
25
25
|
printOperationResult,
|
|
26
26
|
regenerateTypes
|
|
27
|
-
} from "./cli-
|
|
28
|
-
import "./cli-
|
|
29
|
-
import "./cli-
|
|
30
|
-
import "./cli-
|
|
31
|
-
import "./cli-
|
|
27
|
+
} from "./cli-QAVLRCQ5.js";
|
|
28
|
+
import "./cli-UZCQL6YP.js";
|
|
29
|
+
import "./cli-SOQJHK4Q.js";
|
|
30
|
+
import "./cli-7S4G4EKK.js";
|
|
31
|
+
import "./cli-O3IMNLN2.js";
|
|
32
32
|
import "./cli-25RWY5BQ.js";
|
|
33
33
|
import "./cli-QWQMPCL6.js";
|
|
34
34
|
import {
|
|
35
35
|
validateSDKWaitingRoomUserInterface
|
|
36
|
-
} from "./cli-
|
|
36
|
+
} from "./cli-OUFXSQOW.js";
|
|
37
37
|
import "./cli-F2D4GGUA.js";
|
|
38
38
|
import {
|
|
39
39
|
logger
|
|
40
|
-
} from "./cli-
|
|
40
|
+
} from "./cli-DMKRP33X.js";
|
|
41
41
|
import {
|
|
42
42
|
CliError
|
|
43
|
-
} from "./cli-
|
|
43
|
+
} from "./cli-AEAFLZGY.js";
|
|
44
44
|
|
|
45
45
|
// cli/commands/resources/waiting-room/update.ts
|
|
46
46
|
async function updateWaitingRoomUserInterface(definitionInput, options) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
loadConfig
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-OUFXSQOW.js";
|
|
5
5
|
import "./cli-F2D4GGUA.js";
|
|
6
|
-
import "./cli-
|
|
6
|
+
import "./cli-DMKRP33X.js";
|
|
7
7
|
import {
|
|
8
8
|
printJson,
|
|
9
9
|
reportResult
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-AEAFLZGY.js";
|
|
11
11
|
|
|
12
12
|
// cli/commands/resolve.ts
|
|
13
13
|
import { resolve } from "path";
|
|
@@ -2,36 +2,36 @@
|
|
|
2
2
|
import {
|
|
3
3
|
deletePresentationFiles,
|
|
4
4
|
findPresentationReferences
|
|
5
|
-
} from "./cli-
|
|
6
|
-
import "./cli-
|
|
5
|
+
} from "./cli-MPU4FLA7.js";
|
|
6
|
+
import "./cli-VTLFQHDO.js";
|
|
7
7
|
import "./cli-QUNIRH7A.js";
|
|
8
|
-
import "./cli-
|
|
8
|
+
import "./cli-UTHPCZYL.js";
|
|
9
9
|
import {
|
|
10
10
|
loadPackageContext
|
|
11
|
-
} from "./cli-
|
|
12
|
-
import "./cli-
|
|
13
|
-
import "./cli-
|
|
11
|
+
} from "./cli-BC4KKNLA.js";
|
|
12
|
+
import "./cli-UADUC4JD.js";
|
|
13
|
+
import "./cli-2QM63J3I.js";
|
|
14
14
|
import {
|
|
15
15
|
operationError,
|
|
16
16
|
recordOperationResult
|
|
17
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-QAVLRCQ5.js";
|
|
18
18
|
import {
|
|
19
19
|
confirmAction
|
|
20
|
-
} from "./cli-
|
|
20
|
+
} from "./cli-NU4SCD5D.js";
|
|
21
21
|
import {
|
|
22
22
|
generateCommand
|
|
23
|
-
} from "./cli-
|
|
24
|
-
import "./cli-
|
|
25
|
-
import "./cli-
|
|
26
|
-
import "./cli-
|
|
23
|
+
} from "./cli-UZCQL6YP.js";
|
|
24
|
+
import "./cli-SOQJHK4Q.js";
|
|
25
|
+
import "./cli-7S4G4EKK.js";
|
|
26
|
+
import "./cli-O3IMNLN2.js";
|
|
27
27
|
import "./cli-25RWY5BQ.js";
|
|
28
28
|
import "./cli-QWQMPCL6.js";
|
|
29
|
-
import "./cli-
|
|
29
|
+
import "./cli-OUFXSQOW.js";
|
|
30
30
|
import "./cli-F2D4GGUA.js";
|
|
31
31
|
import {
|
|
32
32
|
logger
|
|
33
|
-
} from "./cli-
|
|
34
|
-
import "./cli-
|
|
33
|
+
} from "./cli-DMKRP33X.js";
|
|
34
|
+
import "./cli-AEAFLZGY.js";
|
|
35
35
|
|
|
36
36
|
// cli/commands/resources/presentation/delete.ts
|
|
37
37
|
async function deletePresentation(options) {
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
runResourceCommand
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-7NCVUM5U.js";
|
|
5
5
|
import {
|
|
6
6
|
RESOURCE_DESCRIPTORS_BY_TYPE,
|
|
7
7
|
supportedTypes
|
|
8
|
-
} from "./cli-
|
|
9
|
-
import "./cli-
|
|
10
|
-
import "./cli-
|
|
11
|
-
import "./cli-
|
|
12
|
-
import "./cli-
|
|
13
|
-
import "./cli-
|
|
14
|
-
import "./cli-
|
|
8
|
+
} from "./cli-F47ELAXM.js";
|
|
9
|
+
import "./cli-QAVLRCQ5.js";
|
|
10
|
+
import "./cli-NU4SCD5D.js";
|
|
11
|
+
import "./cli-UZCQL6YP.js";
|
|
12
|
+
import "./cli-SOQJHK4Q.js";
|
|
13
|
+
import "./cli-7S4G4EKK.js";
|
|
14
|
+
import "./cli-O3IMNLN2.js";
|
|
15
15
|
import "./cli-25RWY5BQ.js";
|
|
16
16
|
import "./cli-QWQMPCL6.js";
|
|
17
|
-
import "./cli-
|
|
17
|
+
import "./cli-OUFXSQOW.js";
|
|
18
18
|
import "./cli-F2D4GGUA.js";
|
|
19
|
-
import "./cli-
|
|
19
|
+
import "./cli-DMKRP33X.js";
|
|
20
20
|
import {
|
|
21
21
|
CliError
|
|
22
|
-
} from "./cli-
|
|
22
|
+
} from "./cli-AEAFLZGY.js";
|
|
23
23
|
|
|
24
24
|
// cli/commands/delete.ts
|
|
25
25
|
async function deleteCommand(resourceType, identifier, options) {
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
findResourceMeta,
|
|
10
10
|
isNamelessInterface,
|
|
11
11
|
removedFromBundle
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-OUFXSQOW.js";
|
|
13
13
|
import {
|
|
14
14
|
resourceExample
|
|
15
15
|
} from "./cli-F2D4GGUA.js";
|
|
16
16
|
import {
|
|
17
17
|
CliError
|
|
18
|
-
} from "./cli-
|
|
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,25 +1,25 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
resolveSession
|
|
4
|
-
} from "./cli-
|
|
5
|
-
import "./cli-
|
|
6
|
-
import "./cli-
|
|
7
|
-
import "./cli-
|
|
8
|
-
import "./cli-
|
|
9
|
-
import "./cli-
|
|
4
|
+
} from "./cli-E665NKUQ.js";
|
|
5
|
+
import "./cli-HJPNNORV.js";
|
|
6
|
+
import "./cli-42ZUP4X3.js";
|
|
7
|
+
import "./cli-K6M6YB67.js";
|
|
8
|
+
import "./cli-Y33ULHYO.js";
|
|
9
|
+
import "./cli-WWNTBK37.js";
|
|
10
10
|
import "./cli-4LKXZQ2B.js";
|
|
11
|
-
import "./cli-
|
|
11
|
+
import "./cli-7CW2BBJG.js";
|
|
12
12
|
import "./cli-QUNIRH7A.js";
|
|
13
|
-
import "./cli-
|
|
13
|
+
import "./cli-O3IMNLN2.js";
|
|
14
14
|
import "./cli-25RWY5BQ.js";
|
|
15
15
|
import "./cli-QWQMPCL6.js";
|
|
16
|
-
import "./cli-
|
|
16
|
+
import "./cli-OUFXSQOW.js";
|
|
17
17
|
import "./cli-F2D4GGUA.js";
|
|
18
|
-
import "./cli-
|
|
18
|
+
import "./cli-DMKRP33X.js";
|
|
19
19
|
import {
|
|
20
20
|
CliError,
|
|
21
21
|
reportResult
|
|
22
|
-
} from "./cli-
|
|
22
|
+
} from "./cli-AEAFLZGY.js";
|
|
23
23
|
|
|
24
24
|
// cli/commands/endpoint-audit.ts
|
|
25
25
|
function describe(entry) {
|
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
promptForSchemaProperties
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-MN7X4UG2.js";
|
|
5
5
|
import {
|
|
6
6
|
readAuthoredBundle
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-3HPAKEJJ.js";
|
|
8
8
|
import {
|
|
9
9
|
resolveInputSource
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-3VV2JLHX.js";
|
|
11
11
|
import {
|
|
12
12
|
createCapabilityFiles
|
|
13
|
-
} from "./cli-
|
|
14
|
-
import "./cli-
|
|
13
|
+
} from "./cli-MPU4FLA7.js";
|
|
14
|
+
import "./cli-VTLFQHDO.js";
|
|
15
15
|
import "./cli-QUNIRH7A.js";
|
|
16
|
-
import "./cli-
|
|
16
|
+
import "./cli-UTHPCZYL.js";
|
|
17
17
|
import {
|
|
18
18
|
loadPackageContext
|
|
19
|
-
} from "./cli-
|
|
19
|
+
} from "./cli-BC4KKNLA.js";
|
|
20
20
|
import {
|
|
21
21
|
presentFields
|
|
22
|
-
} from "./cli-
|
|
23
|
-
import "./cli-
|
|
22
|
+
} from "./cli-UADUC4JD.js";
|
|
23
|
+
import "./cli-2QM63J3I.js";
|
|
24
24
|
import {
|
|
25
25
|
BUILD_COMMAND,
|
|
26
26
|
generateTypes,
|
|
27
27
|
operationError,
|
|
28
28
|
printOperationResult
|
|
29
|
-
} from "./cli-
|
|
29
|
+
} from "./cli-QAVLRCQ5.js";
|
|
30
30
|
import {
|
|
31
31
|
input
|
|
32
|
-
} from "./cli-
|
|
33
|
-
import "./cli-
|
|
34
|
-
import "./cli-
|
|
35
|
-
import "./cli-
|
|
36
|
-
import "./cli-
|
|
32
|
+
} from "./cli-NU4SCD5D.js";
|
|
33
|
+
import "./cli-UZCQL6YP.js";
|
|
34
|
+
import "./cli-SOQJHK4Q.js";
|
|
35
|
+
import "./cli-7S4G4EKK.js";
|
|
36
|
+
import "./cli-O3IMNLN2.js";
|
|
37
37
|
import "./cli-25RWY5BQ.js";
|
|
38
38
|
import "./cli-QWQMPCL6.js";
|
|
39
39
|
import {
|
|
40
40
|
validateSDKCapability
|
|
41
|
-
} from "./cli-
|
|
41
|
+
} from "./cli-OUFXSQOW.js";
|
|
42
42
|
import "./cli-F2D4GGUA.js";
|
|
43
43
|
import {
|
|
44
44
|
logger
|
|
45
|
-
} from "./cli-
|
|
45
|
+
} from "./cli-DMKRP33X.js";
|
|
46
46
|
import {
|
|
47
47
|
CliError
|
|
48
|
-
} from "./cli-
|
|
48
|
+
} from "./cli-AEAFLZGY.js";
|
|
49
49
|
|
|
50
50
|
// cli/commands/resources/capability/new.ts
|
|
51
51
|
var CAPABILITY_SCOPES = Object.keys({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
normalizeSettingsSchema
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-MPU4FLA7.js";
|
|
5
5
|
import {
|
|
6
6
|
CliError
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-AEAFLZGY.js";
|
|
8
8
|
|
|
9
9
|
// cli/commands/resources/settings/defaults.ts
|
|
10
10
|
function assertEveryPropertyHasDefault(schema) {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
isChapterEmpty,
|
|
5
5
|
referenceLocale,
|
|
6
6
|
resolveBlobInputs
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-WWNTBK37.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
|
-
|
|
30
|
-
|
|
31
|
+
partitionProblems,
|
|
32
|
+
resolveCapabilityScope,
|
|
33
|
+
runScenarioGates,
|
|
34
|
+
withOverrunRetry
|
|
35
|
+
} from "./cli-O3IMNLN2.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-
|
|
54
|
+
} from "./cli-OUFXSQOW.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;
|
|
@@ -538,6 +584,7 @@ var COMMAND_FIELDS = {
|
|
|
538
584
|
renameOwnTeam: { name: "string", "participantId?": "string", "teamId?": "string" },
|
|
539
585
|
renameSelf: { name: "string", "participantId?": "string", "teamId?": "string" },
|
|
540
586
|
addParticipant: { teamId: "string", "name?": "string" },
|
|
587
|
+
joinSession: { "name?": "string" },
|
|
541
588
|
renameParticipant: { participantId: "string", name: "string" },
|
|
542
589
|
moveParticipant: { participantId: "string", teamId: "string" },
|
|
543
590
|
setWaitingRoom: { open: "boolean" },
|
|
@@ -2652,6 +2699,31 @@ var GameExecutor = class {
|
|
|
2652
2699
|
getActiveScenario() {
|
|
2653
2700
|
return this.activeScenario;
|
|
2654
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
|
+
}
|
|
2655
2727
|
/** The scenario `initialize` would activate for this id, without activating it. */
|
|
2656
2728
|
findScenario(scenarioId) {
|
|
2657
2729
|
return this.configResolver.resolveScenario(scenarioId);
|
|
@@ -4324,6 +4396,29 @@ var SessionRoster = class {
|
|
|
4324
4396
|
await this.fireHook("participantJoin", record);
|
|
4325
4397
|
return void 0;
|
|
4326
4398
|
}
|
|
4399
|
+
/**
|
|
4400
|
+
* Join through the session link (§13.4).
|
|
4401
|
+
*
|
|
4402
|
+
* Which team is this host's own choice, and nothing a game may rely on:
|
|
4403
|
+
* the one with the fewest participants, the lowest index on a tie, so a
|
|
4404
|
+
* room scanning one code fills its teams evenly. It creates an ordinary
|
|
4405
|
+
* participant with an ordinary `participantJoin`, exactly as a team link
|
|
4406
|
+
* does.
|
|
4407
|
+
*/
|
|
4408
|
+
async joinSession(name) {
|
|
4409
|
+
if (this.host.runKind === "walkthrough") {
|
|
4410
|
+
throw new DeniedError("A walkthrough holds one participant, so it has no session link");
|
|
4411
|
+
}
|
|
4412
|
+
if (!this.host.settings().teams.sessionJoin) {
|
|
4413
|
+
throw new DeniedError(
|
|
4414
|
+
"This game offers no session link: its teams.sessionJoin is false. Join through a team link instead"
|
|
4415
|
+
);
|
|
4416
|
+
}
|
|
4417
|
+
const { state, participants } = this.host;
|
|
4418
|
+
const placement = state.getTeamIndexes().map((index) => ({ index, held: participants.list(`team-${index + 1}`).length })).sort((a, b) => a.held - b.held || a.index - b.index)[0];
|
|
4419
|
+
if (!placement) throw new DeniedError("The session has no team to join");
|
|
4420
|
+
return this.addParticipant(`team-${placement.index + 1}`, name);
|
|
4421
|
+
}
|
|
4327
4422
|
renameParticipant(participantId, name) {
|
|
4328
4423
|
const teamId = this.findParticipantTeam(participantId);
|
|
4329
4424
|
if (!teamId) throw new DeniedError(`Unknown participant "${participantId}"`);
|
|
@@ -5379,6 +5474,7 @@ var PLAY_STAGE = /* @__PURE__ */ new Set([
|
|
|
5379
5474
|
"updateContext",
|
|
5380
5475
|
"updateSharedContext",
|
|
5381
5476
|
"addParticipant",
|
|
5477
|
+
"joinSession",
|
|
5382
5478
|
"renameParticipant",
|
|
5383
5479
|
"moveParticipant",
|
|
5384
5480
|
"renameOwnTeam",
|
|
@@ -5434,6 +5530,8 @@ var Session = class {
|
|
|
5434
5530
|
started = false;
|
|
5435
5531
|
/** True while the game's `setup` slot still owes us a Play (§8.3). */
|
|
5436
5532
|
holdingAtSetup = false;
|
|
5533
|
+
/** The `Scenario` gate's warnings from the last start, for the mutation that caused it. */
|
|
5534
|
+
startWarnings = [];
|
|
5437
5535
|
/** Edits on disk that apply only at the next initialisation (#640). */
|
|
5438
5536
|
pending = NO_PENDING_CHANGES;
|
|
5439
5537
|
/**
|
|
@@ -5549,6 +5647,7 @@ var Session = class {
|
|
|
5549
5647
|
this.resolveMode();
|
|
5550
5648
|
this.holdingAtSetup = this.hasSetup();
|
|
5551
5649
|
if (!this.holdingAtSetup) {
|
|
5650
|
+
await this.gateStart();
|
|
5552
5651
|
await this.buildInitialState();
|
|
5553
5652
|
await this.roster.materialise();
|
|
5554
5653
|
}
|
|
@@ -5993,10 +6092,17 @@ var Session = class {
|
|
|
5993
6092
|
async apply(command) {
|
|
5994
6093
|
try {
|
|
5995
6094
|
const readsBefore = this.timers.readsBefore(command);
|
|
6095
|
+
this.startWarnings = [];
|
|
5996
6096
|
const committedAtTick = await this.dispatch(command);
|
|
5997
6097
|
await this.timers.retime(command, readsBefore);
|
|
5998
6098
|
this.emitState(command.type);
|
|
5999
|
-
|
|
6099
|
+
const warnings = this.startWarnings;
|
|
6100
|
+
this.startWarnings = [];
|
|
6101
|
+
return {
|
|
6102
|
+
ok: true,
|
|
6103
|
+
...committedAtTick === void 0 ? {} : { committedAtTick },
|
|
6104
|
+
...warnings.length > 0 ? { warnings } : {}
|
|
6105
|
+
};
|
|
6000
6106
|
} catch (error) {
|
|
6001
6107
|
if (error instanceof RefusedError) {
|
|
6002
6108
|
return withStale({ ok: false, outcome: error.outcome }, error);
|
|
@@ -6055,6 +6161,8 @@ var Session = class {
|
|
|
6055
6161
|
return this.roster.renameSelf(command);
|
|
6056
6162
|
case "addParticipant":
|
|
6057
6163
|
return this.roster.addParticipant(command.teamId, command.name);
|
|
6164
|
+
case "joinSession":
|
|
6165
|
+
return this.roster.joinSession(command.name);
|
|
6058
6166
|
case "renameParticipant":
|
|
6059
6167
|
return this.roster.renameParticipant(command.participantId, command.name);
|
|
6060
6168
|
case "moveParticipant":
|
|
@@ -6096,6 +6204,12 @@ var Session = class {
|
|
|
6096
6204
|
if (this.runKind !== "walkthrough") {
|
|
6097
6205
|
refuseTeamCountAtPlay(this.state.getTeamCount(), this.teamBounds());
|
|
6098
6206
|
}
|
|
6207
|
+
try {
|
|
6208
|
+
await this.gateStart();
|
|
6209
|
+
} catch (error) {
|
|
6210
|
+
if (error instanceof DeniedError) this.report(error.message, "play");
|
|
6211
|
+
throw error;
|
|
6212
|
+
}
|
|
6099
6213
|
this.holdingAtSetup = false;
|
|
6100
6214
|
await this.buildInitialState();
|
|
6101
6215
|
await this.roster.replayJoins();
|
|
@@ -6149,6 +6263,16 @@ var Session = class {
|
|
|
6149
6263
|
if (refusal) throw new DeniedError(refusal);
|
|
6150
6264
|
}
|
|
6151
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
|
+
}
|
|
6152
6276
|
if (command.teams !== void 0) this.options = { ...this.options, teams: command.teams };
|
|
6153
6277
|
this.options = { ...this.options, participants };
|
|
6154
6278
|
if (command.locale !== void 0) this.locale = command.locale;
|
|
@@ -6383,6 +6507,16 @@ var Session = class {
|
|
|
6383
6507
|
if (!locales) return "";
|
|
6384
6508
|
return locales[this.locale]?.name ?? locales.en?.name ?? Object.values(locales)[0]?.name ?? "";
|
|
6385
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
|
+
}
|
|
6386
6520
|
report(message, source, teamId) {
|
|
6387
6521
|
this.errors.push(message);
|
|
6388
6522
|
this.emit({ type: "error", message, source, ...teamId ? { teamId } : {} });
|
|
@@ -6409,8 +6543,10 @@ export {
|
|
|
6409
6543
|
rebuildsWalkthrough,
|
|
6410
6544
|
commandError,
|
|
6411
6545
|
atomicWriteFile,
|
|
6546
|
+
readConfigurationScenario,
|
|
6412
6547
|
saveSessionSettingsOverrides,
|
|
6413
6548
|
FakeClock,
|
|
6549
|
+
gateSessionStart,
|
|
6414
6550
|
IDLE_TIMER,
|
|
6415
6551
|
REINITIALISED_ON_CHANGE,
|
|
6416
6552
|
Session
|