@seriousgaming/sdk-tools 1.7.0 → 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-ZTZ5H55T.js → cli-27M4PX7O.js} +17 -17
- package/dist/{cli-2BH7FX27.js → cli-2FXZZLCL.js} +1 -1
- package/dist/{cli-HHPMAV4F.js → cli-2KDV2DYC.js} +3 -3
- package/dist/{cli-57V4ARER.js → cli-2QM63J3I.js} +1 -1
- package/dist/{cli-TFMNNVJ7.js → cli-32NRB2IT.js} +15 -15
- package/dist/{cli-JPAXKLVT.js → cli-3HBYH4VF.js} +11 -11
- package/dist/{cli-JR5AZLLK.js → cli-3HPAKEJJ.js} +2 -2
- package/dist/{cli-3PIJLSRQ.js → cli-3HZGJRQW.js} +11 -11
- package/dist/{cli-BOXXMDSX.js → cli-3OCKRPXI.js} +18 -18
- package/dist/{cli-4CHKF4DQ.js → cli-3OVXQJEW.js} +2 -2
- package/dist/{cli-4UWFQNGF.js → cli-3VV2JLHX.js} +1 -1
- package/dist/{cli-EJVAQCMQ.js → cli-42ZUP4X3.js} +114 -5
- package/dist/{cli-CV4JGVJR.js → cli-4B5OBHSY.js} +19 -19
- package/dist/{cli-2DQJACAH.js → cli-4EMNCU63.js} +17 -17
- package/dist/cli-5CG6BMCY.js +36 -0
- package/dist/{cli-VYR326C6.js → cli-5FRKWNVP.js} +19 -19
- package/dist/{cli-TDYKRXUA.js → cli-5P66N5G6.js} +17 -17
- package/dist/{cli-ZRPWZOCW.js → cli-5SYPXJCB.js} +20 -16
- package/dist/{cli-TJ3PLRHF.js → cli-66AHBZRZ.js} +15 -15
- package/dist/{cli-M7WEAIRF.js → cli-6AGWTGTO.js} +106 -28
- package/dist/{cli-WG36UJRK.js → cli-6BAZE75K.js} +18 -18
- package/dist/{cli-VPON5HGB.js → cli-6FVHRL3H.js} +19 -19
- package/dist/{cli-QVASWX2A.js → cli-6GDPO5VU.js} +2 -2
- package/dist/{cli-TPNQLYPC.js → cli-6NBER36P.js} +1 -1
- package/dist/{cli-LQ4VSM5R.js → cli-726NJARI.js} +0 -0
- package/dist/{cli-GHLILDH7.js → cli-72DRYVTT.js} +13 -13
- package/dist/{cli-MMN4BPO4.js → cli-7CW2BBJG.js} +1 -1
- package/dist/{cli-FP32D3T6.js → cli-7GJGFILU.js} +15 -15
- package/dist/{cli-HYEU3QS6.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-CXCL7VRK.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-64AA7367.js → cli-C7YZNPWX.js} +11 -11
- package/dist/{cli-ZKG3OPZ6.js → cli-CAX4CQTC.js} +13 -13
- package/dist/{cli-YOTGR3NB.js → cli-CVOLMK3Z.js} +1 -1
- package/dist/{cli-PKQNOGBO.js → cli-D3CZRXVJ.js} +63 -17
- package/dist/{cli-4YB3ROVR.js → cli-DMKRP33X.js} +1 -1
- package/dist/{cli-FZ7QAZZP.js → cli-DPFN2LIZ.js} +15 -15
- package/dist/{cli-7TOLC62D.js → cli-DT756M3Z.js} +20 -20
- package/dist/{cli-TIDQ4WUE.js → cli-DXHPYN4N.js} +1 -1
- package/dist/{cli-OANH3BTQ.js → cli-E665NKUQ.js} +5 -5
- package/dist/{cli-DEBCP7UH.js → cli-EK7CGMGS.js} +17 -17
- package/dist/{cli-PIO7NWMH.js → cli-ESU3J563.js} +15 -15
- package/dist/{cli-6HB6HTC6.js → cli-F47ELAXM.js} +47 -47
- package/dist/{cli-JIZTQVL2.js → cli-FH4WBZHA.js} +14 -14
- package/dist/{cli-JRMHSMYT.js → cli-FHKRO6OU.js} +19 -19
- package/dist/{cli-ESA6YNPF.js → cli-FSEDPZR5.js} +19 -19
- package/dist/{cli-G5DQGZ2E.js → cli-FV45UZQP.js} +19 -19
- package/dist/{cli-XR2XSWQN.js → cli-G7FX7ZIU.js} +12 -12
- package/dist/{cli-X7E3637I.js → cli-GFONBOJT.js} +50 -26
- package/dist/{cli-C5QOJJWX.js → cli-GHIMH6JU.js} +1 -1
- package/dist/{cli-T4HWGMY4.js → cli-HC7L5DXV.js} +15 -15
- package/dist/{cli-WU43JT4T.js → cli-HJPNNORV.js} +2 -2
- package/dist/{cli-SOMIB4B4.js → cli-HMEZHQBC.js} +17 -17
- package/dist/{cli-TFZ53OA2.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-NEOLMC2P.js → cli-JA6UFTSX.js} +17 -17
- package/dist/{cli-Z5HWENER.js → cli-JOXCAGM7.js} +19 -19
- package/dist/{cli-NOQBWJQN.js → cli-JQ6I5GGE.js} +3 -3
- package/dist/{cli-TDSQSCX4.js → cli-K6M6YB67.js} +1 -1
- package/dist/{cli-MYJGGLC5.js → cli-KFVA7DT3.js} +3 -3
- package/dist/{cli-DHOWZCXT.js → cli-KH6FKM5A.js} +15 -15
- package/dist/{cli-4VZIJYKU.js → cli-KMT235FV.js} +2 -2
- package/dist/{cli-6ZSMW4HR.js → cli-KU4PG7ZA.js} +15 -15
- package/dist/{cli-ATI6OLJU.js → cli-L4DEEAMK.js} +17 -17
- package/dist/{cli-EDCAH2TC.js → cli-ME3JKMJL.js} +19 -19
- package/dist/{cli-R7RG2VMW.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-LE5ICDAF.js → cli-MPU4FLA7.js} +4 -4
- package/dist/{cli-HCRTYQQS.js → cli-MPWTXNF6.js} +2 -2
- package/dist/{cli-NPPY557S.js → cli-N5K2KHPR.js} +15 -15
- package/dist/{cli-PVA52RC2.js → cli-NGOQWOQE.js} +15 -15
- package/dist/{cli-ZTWOE3ZT.js → cli-NU4SCD5D.js} +1 -1
- package/dist/{cli-UTM4QU67.js → cli-O3IMNLN2.js} +282 -96
- package/dist/{cli-MM3A4SPH.js → cli-OUFXSQOW.js} +7265 -4467
- package/dist/{cli-UBQCSUDH.js → cli-PEY6XZDE.js} +16 -16
- package/dist/{cli-HM7CD4VU.js → cli-PLW3TWJ7.js} +19 -19
- package/dist/{cli-LRQDF3ZO.js → cli-PO2ALWHP.js} +13 -13
- package/dist/{cli-IPP5FDCH.js → cli-PPEB3ENS.js} +18 -18
- package/dist/{cli-C3OERMIR.js → cli-PZ7G544B.js} +3 -3
- package/dist/{cli-GPAN6XK2.js → cli-Q5BKFFDL.js} +4 -4
- package/dist/{cli-MULKSLA4.js → cli-QAI6T5FL.js} +15 -15
- package/dist/{cli-JGFJWZFU.js → cli-QAVLRCQ5.js} +3 -3
- package/dist/{cli-OQG3Y4RU.js → cli-QDIH2G2P.js} +15 -15
- package/dist/cli-SN7D7HTX.js +36 -0
- package/dist/{cli-SWZY7L7K.js → cli-SOQJHK4Q.js} +6 -6
- package/dist/{cli-7RYIEKMB.js → cli-SPKPDXWD.js} +15 -15
- package/dist/{cli-WAZD75KE.js → cli-SWUAXVIJ.js} +15 -15
- package/dist/cli-TJNLXQJ5.js +36 -0
- package/dist/{cli-SX3ULO5P.js → cli-U2EWI6H5.js} +11 -11
- package/dist/{cli-FXY3DKPW.js → cli-UADUC4JD.js} +2 -2
- package/dist/{cli-FWFRKQNE.js → cli-UR63LFVK.js} +2 -2
- package/dist/{cli-YSPZZQCP.js → cli-UTHPCZYL.js} +2 -2
- package/dist/{cli-XTANOFQR.js → cli-UYV3BDPA.js} +3 -3
- package/dist/{cli-H3J3ICCQ.js → cli-UZCQL6YP.js} +3 -3
- package/dist/{cli-LQERHJFE.js → cli-V5K3CCYZ.js} +2 -2
- package/dist/cli-V7L3HEL4.js +36 -0
- package/dist/{cli-GEQUJF4L.js → cli-VBSF3R3L.js} +16 -16
- package/dist/{cli-FXWWYBYU.js → cli-VQ4OJ4KE.js} +18 -18
- package/dist/{cli-IUS2YCD3.js → cli-VTLFQHDO.js} +1 -1
- package/dist/{cli-SOFCTQAL.js → cli-W7XCTGQ7.js} +15 -15
- package/dist/{cli-GTWEGYSU.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-ZQ2Y3U7F.js → cli-YLYB4ITF.js} +13 -13
- package/dist/{cli-4XCQUM3E.js → cli-ZFY6TGU7.js} +4 -4
- package/dist/{cli-JRIIAZ33.js → cli-ZSKP2IRP.js} +53 -38
- package/dist/cli.js +52 -52
- package/dist/client.js +17518 -16558
- package/dist/core/save-scenario.d.ts +1 -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-CnXlPeLX.js → index-CVNjiRUh.js} +31 -27
- package/dist/dev/console/index.html +1 -1
- package/dist/docs/api/deck.md +1 -1
- package/dist/docs/api/index.md +1 -1
- package/dist/docs/api/sdk-e2e.md +7 -6
- package/dist/docs/api/sdk-projection.md +1 -0
- package/dist/docs/api/sdk-tools-client.md +3 -1
- package/dist/docs/api/sdk-tools-playwright.md +1 -8
- package/dist/docs/api/sdk-ui.md +40 -64
- package/dist/docs/api/sdk.md +10 -1
- package/dist/docs/changelog.md +15 -0
- package/dist/docs/cli-error-codes.md +7 -1
- package/dist/docs/cli-reference.md +3 -0
- 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/session.md +1 -1
- package/dist/docs/guides/settings.md +2 -0
- 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 +4 -0
- package/dist/docs/guides/validators.md +27 -4
- package/dist/docs/guides/waiting-room.md +2 -0
- package/dist/docs/page-index.md +8 -6
- 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.js +1082 -467
- package/dist/playwright.js +17529 -16569
- package/dist/runtime/manifest-version.d.ts +1 -1
- package/dist/runtime.js +4 -2
- 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-57C72YKJ.js +0 -36
- package/dist/cli-5G7TZHD3.js +0 -36
- package/dist/cli-7MBLH4M3.js +0 -36
- package/dist/cli-C6G65H6S.js +0 -256
- package/dist/cli-L5IG7MY2.js +0 -36
- package/dist/cli-SPGUVL6Z.js +0 -36
- package/dist/cli-UY4VDI7W.js +0 -30
- package/dist/cli-WM6SQJ6Q.js +0 -16
- package/dist/cli-ZBTFLZUL.js +0 -36
- package/dist/cli-ZF7IFB54.js +0 -4026
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<link rel="icon" type="image/svg+xml" href="/assets/icon-CRaj5uhr.svg" />
|
|
7
7
|
<title>Serious Gaming</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-CVNjiRUh.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-q6-lvlN3.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
package/dist/docs/api/deck.md
CHANGED
package/dist/docs/api/index.md
CHANGED
|
@@ -6,7 +6,7 @@ Every type, function, hook and component your game imports, one page per entry p
|
|
|
6
6
|
|
|
7
7
|
| Entry point | Exports |
|
|
8
8
|
| ------------------------------------------------------------------ | -------------------------------------------------------------- |
|
|
9
|
-
| [`@seriousgaming/sdk`](./sdk.md) | 12 functions, 3 classes, 1 constant, 100 interfaces,
|
|
9
|
+
| [`@seriousgaming/sdk`](./sdk.md) | 12 functions, 3 classes, 1 constant, 100 interfaces, 49 types |
|
|
10
10
|
| [`@seriousgaming/sdk/ui`](./sdk-ui.md) | 50 functions, 3 classes, 40 constants, 26 interfaces, 38 types |
|
|
11
11
|
| [`@seriousgaming/sdk/ui/testing`](./sdk-ui-testing.md) | 14 functions, 6 types |
|
|
12
12
|
| [`@seriousgaming/sdk/testing`](./sdk-testing.md) | 8 functions, 4 constants, 8 types |
|
package/dist/docs/api/sdk-e2e.md
CHANGED
|
@@ -103,12 +103,12 @@ Selectors and URLs for the dev console.
|
|
|
103
103
|
const DEV_SERVER: {
|
|
104
104
|
readonly DEFAULT_PORT: 3000;
|
|
105
105
|
readonly selectors: {
|
|
106
|
-
readonly devDrawerHandle:
|
|
107
|
-
readonly devDrawer:
|
|
108
|
-
readonly localeSelect:
|
|
109
|
-
readonly play:
|
|
110
|
-
readonly guideContent:
|
|
111
|
-
readonly printSheets:
|
|
106
|
+
readonly devDrawerHandle: "[data-testid=\"dev-drawer-handle\"]";
|
|
107
|
+
readonly devDrawer: "[data-testid=\"dev-drawer\"]";
|
|
108
|
+
readonly localeSelect: "[data-testid=\"locale\"]";
|
|
109
|
+
readonly play: "[data-testid=\"play\"]";
|
|
110
|
+
readonly guideContent: "[data-testid=\"guide-content\"]";
|
|
111
|
+
readonly printSheets: "[data-testid=\"print-sheets\"]";
|
|
112
112
|
};
|
|
113
113
|
readonly consoleUrl: () => string;
|
|
114
114
|
readonly playerUrl: (team: number, participant?: number) => string;
|
|
@@ -357,6 +357,7 @@ type MutationResult =
|
|
|
357
357
|
| {
|
|
358
358
|
ok: true;
|
|
359
359
|
committedAtTick?: number;
|
|
360
|
+
warnings?: string[];
|
|
360
361
|
}
|
|
361
362
|
| {
|
|
362
363
|
ok: false;
|
|
@@ -12,9 +12,10 @@ server already running for the package, for browser tests and recordings.
|
|
|
12
12
|
@example
|
|
13
13
|
|
|
14
14
|
```ts
|
|
15
|
-
import { createTestSession } from '@seriousgaming/sdk-tools/client';
|
|
16
15
|
import { fileURLToPath } from 'url';
|
|
17
16
|
|
|
17
|
+
import { createTestSession } from '@seriousgaming/sdk-tools/client';
|
|
18
|
+
|
|
18
19
|
const session = await createTestSession({
|
|
19
20
|
packagePath: fileURLToPath(new URL('../..', import.meta.url)),
|
|
20
21
|
});
|
|
@@ -483,6 +484,7 @@ type MutationResult =
|
|
|
483
484
|
| {
|
|
484
485
|
ok: true;
|
|
485
486
|
committedAtTick?: number;
|
|
487
|
+
warnings?: string[];
|
|
486
488
|
}
|
|
487
489
|
| {
|
|
488
490
|
ok: false;
|
|
@@ -60,14 +60,7 @@ const expect: Expect<{}>;
|
|
|
60
60
|
Playwright's `test`, with an isolated dev server started for each worker.
|
|
61
61
|
|
|
62
62
|
```ts
|
|
63
|
-
const test: import(
|
|
64
|
-
import('@playwright/test').PlaywrightTestArgs &
|
|
65
|
-
import('@playwright/test').PlaywrightTestOptions &
|
|
66
|
-
object,
|
|
67
|
-
import('@playwright/test').PlaywrightWorkerArgs &
|
|
68
|
-
import('@playwright/test').PlaywrightWorkerOptions &
|
|
69
|
-
DevServerWorkerFixtures
|
|
70
|
-
>;
|
|
63
|
+
const test: import("@playwright/test").TestType<import("@playwright/test").PlaywrightTestArgs & import("@playwright/test").PlaywrightTestOptions & object, import("@playwright/test").PlaywrightWorkerArgs & import("@playwright/test").PlaywrightWorkerOptions & DevServerWorkerFixtures>;
|
|
71
64
|
```
|
|
72
65
|
|
|
73
66
|
## Interfaces
|
package/dist/docs/api/sdk-ui.md
CHANGED
|
@@ -458,7 +458,7 @@ class TickSnapshotError extends Error {
|
|
|
458
458
|
Provided by every surface wrapper. Exported for the test helpers, which provide it without a host; game code reads it through `useAssetUrl` and `useAsset`.
|
|
459
459
|
|
|
460
460
|
```ts
|
|
461
|
-
const AssetContext: import(
|
|
461
|
+
const AssetContext: import("react").Context<AssetScope | undefined>;
|
|
462
462
|
```
|
|
463
463
|
|
|
464
464
|
### PastStateContext
|
|
@@ -466,7 +466,7 @@ const AssetContext: import('react').Context<AssetScope | undefined>;
|
|
|
466
466
|
Provided by the wrappers whose surfaces can read past state: the player, session and presentation wrappers. Exported for the test helpers, which provide it without a host; game code reads it through `usePastState`.
|
|
467
467
|
|
|
468
468
|
```ts
|
|
469
|
-
const PastStateContext: import(
|
|
469
|
+
const PastStateContext: import("react").Context<PastStateReader | undefined>;
|
|
470
470
|
```
|
|
471
471
|
|
|
472
472
|
### PresentationContext
|
|
@@ -474,9 +474,7 @@ const PastStateContext: import('react').Context<PastStateReader | undefined>;
|
|
|
474
474
|
The React context behind `usePresentation`.
|
|
475
475
|
|
|
476
476
|
```ts
|
|
477
|
-
const PresentationContext: import(
|
|
478
|
-
PresentationValue<unknown, unknown, unknown> | undefined
|
|
479
|
-
>;
|
|
477
|
+
const PresentationContext: import("react").Context<PresentationValue<unknown, unknown, unknown> | undefined>;
|
|
480
478
|
```
|
|
481
479
|
|
|
482
480
|
### SessionUserInterfaceCallbacksContext
|
|
@@ -484,9 +482,7 @@ const PresentationContext: import('react').Context<
|
|
|
484
482
|
The React context behind `useSessionUserInterfaceCallbacks`.
|
|
485
483
|
|
|
486
484
|
```ts
|
|
487
|
-
const SessionUserInterfaceCallbacksContext: import(
|
|
488
|
-
SessionUserInterfaceCallbacks | undefined
|
|
489
|
-
>;
|
|
485
|
+
const SessionUserInterfaceCallbacksContext: import("react").Context<SessionUserInterfaceCallbacks | undefined>;
|
|
490
486
|
```
|
|
491
487
|
|
|
492
488
|
### SessionUserInterfaceDataContext
|
|
@@ -494,15 +490,7 @@ const SessionUserInterfaceCallbacksContext: import('react').Context<
|
|
|
494
490
|
The React context behind `useSessionUserInterfaceData`.
|
|
495
491
|
|
|
496
492
|
```ts
|
|
497
|
-
const SessionUserInterfaceDataContext: import(
|
|
498
|
-
| SessionUserInterfaceDataContextValue<
|
|
499
|
-
SessionData<object, object>,
|
|
500
|
-
unknown,
|
|
501
|
-
Record<string, unknown>,
|
|
502
|
-
Record<string, unknown>
|
|
503
|
-
>
|
|
504
|
-
| undefined
|
|
505
|
-
>;
|
|
493
|
+
const SessionUserInterfaceDataContext: import("react").Context<SessionUserInterfaceDataContextValue<SessionData<object, object>, unknown, Record<string, unknown>, Record<string, unknown>> | undefined>;
|
|
506
494
|
```
|
|
507
495
|
|
|
508
496
|
### SessionUserInterfaceHookFailuresContext
|
|
@@ -510,9 +498,7 @@ const SessionUserInterfaceDataContext: import('react').Context<
|
|
|
510
498
|
The React context behind `useSessionUserInterfaceHookFailures`.
|
|
511
499
|
|
|
512
500
|
```ts
|
|
513
|
-
const SessionUserInterfaceHookFailuresContext: import(
|
|
514
|
-
SessionUserInterfaceHookFailuresValue | undefined
|
|
515
|
-
>;
|
|
501
|
+
const SessionUserInterfaceHookFailuresContext: import("react").Context<SessionUserInterfaceHookFailuresValue | undefined>;
|
|
516
502
|
```
|
|
517
503
|
|
|
518
504
|
### SessionUserInterfaceHostOverlaysContext
|
|
@@ -520,7 +506,7 @@ const SessionUserInterfaceHookFailuresContext: import('react').Context<
|
|
|
520
506
|
The React context behind `useSessionUserInterfaceHostOverlays`.
|
|
521
507
|
|
|
522
508
|
```ts
|
|
523
|
-
const SessionUserInterfaceHostOverlaysContext: import(
|
|
509
|
+
const SessionUserInterfaceHostOverlaysContext: import("react").Context<HostOverlay[]>;
|
|
524
510
|
```
|
|
525
511
|
|
|
526
512
|
### SessionUserInterfaceLocaleContext
|
|
@@ -528,9 +514,7 @@ const SessionUserInterfaceHostOverlaysContext: import('react').Context<HostOverl
|
|
|
528
514
|
The React context behind `useSessionUserInterfaceLocale`.
|
|
529
515
|
|
|
530
516
|
```ts
|
|
531
|
-
const SessionUserInterfaceLocaleContext: import(
|
|
532
|
-
SessionUserInterfaceLocale | undefined
|
|
533
|
-
>;
|
|
517
|
+
const SessionUserInterfaceLocaleContext: import("react").Context<SessionUserInterfaceLocale | undefined>;
|
|
534
518
|
```
|
|
535
519
|
|
|
536
520
|
### SessionUserInterfaceMetaContext
|
|
@@ -538,7 +522,7 @@ const SessionUserInterfaceLocaleContext: import('react').Context<
|
|
|
538
522
|
The React context behind `useSessionUserInterfaceMeta`.
|
|
539
523
|
|
|
540
524
|
```ts
|
|
541
|
-
const SessionUserInterfaceMetaContext: import(
|
|
525
|
+
const SessionUserInterfaceMetaContext: import("react").Context<SessionMeta | undefined>;
|
|
542
526
|
```
|
|
543
527
|
|
|
544
528
|
### SessionUserInterfaceParticipantsContext
|
|
@@ -546,7 +530,7 @@ const SessionUserInterfaceMetaContext: import('react').Context<SessionMeta | und
|
|
|
546
530
|
The React context behind `useSessionUserInterfaceParticipants`.
|
|
547
531
|
|
|
548
532
|
```ts
|
|
549
|
-
const SessionUserInterfaceParticipantsContext: import(
|
|
533
|
+
const SessionUserInterfaceParticipantsContext: import("react").Context<Participant[] | undefined>;
|
|
550
534
|
```
|
|
551
535
|
|
|
552
536
|
### SessionUserInterfaceSessionJoinLinkContext
|
|
@@ -554,7 +538,7 @@ const SessionUserInterfaceParticipantsContext: import('react').Context<Participa
|
|
|
554
538
|
The React context behind `useSessionUserInterfaceSessionJoinLink`.
|
|
555
539
|
|
|
556
540
|
```ts
|
|
557
|
-
const SessionUserInterfaceSessionJoinLinkContext: import(
|
|
541
|
+
const SessionUserInterfaceSessionJoinLinkContext: import("react").Context<SessionJoinLink | null>;
|
|
558
542
|
```
|
|
559
543
|
|
|
560
544
|
### SessionUserInterfaceTeamConfigurationContext
|
|
@@ -562,7 +546,7 @@ const SessionUserInterfaceSessionJoinLinkContext: import('react').Context<Sessio
|
|
|
562
546
|
The React context behind `useSessionUserInterfaceTeamConfiguration`.
|
|
563
547
|
|
|
564
548
|
```ts
|
|
565
|
-
const SessionUserInterfaceTeamConfigurationContext: import(
|
|
549
|
+
const SessionUserInterfaceTeamConfigurationContext: import("react").Context<TeamConfiguration>;
|
|
566
550
|
```
|
|
567
551
|
|
|
568
552
|
### SessionUserInterfaceTeamLinksContext
|
|
@@ -570,7 +554,7 @@ const SessionUserInterfaceTeamConfigurationContext: import('react').Context<Team
|
|
|
570
554
|
The React context behind `useSessionUserInterfaceTeamLinks`.
|
|
571
555
|
|
|
572
556
|
```ts
|
|
573
|
-
const SessionUserInterfaceTeamLinksContext: import(
|
|
557
|
+
const SessionUserInterfaceTeamLinksContext: import("react").Context<TeamLinks[]>;
|
|
574
558
|
```
|
|
575
559
|
|
|
576
560
|
### SessionUserInterfaceTeamsContext
|
|
@@ -578,7 +562,7 @@ const SessionUserInterfaceTeamLinksContext: import('react').Context<TeamLinks[]>
|
|
|
578
562
|
The React context behind `useSessionUserInterfaceTeams`.
|
|
579
563
|
|
|
580
564
|
```ts
|
|
581
|
-
const SessionUserInterfaceTeamsContext: import(
|
|
565
|
+
const SessionUserInterfaceTeamsContext: import("react").Context<TeamInfo[]>;
|
|
582
566
|
```
|
|
583
567
|
|
|
584
568
|
### SessionUserInterfaceThemeContext
|
|
@@ -586,9 +570,7 @@ const SessionUserInterfaceTeamsContext: import('react').Context<TeamInfo[]>;
|
|
|
586
570
|
The React context behind `useSessionUserInterfaceTheme`.
|
|
587
571
|
|
|
588
572
|
```ts
|
|
589
|
-
const SessionUserInterfaceThemeContext: import(
|
|
590
|
-
SessionUserInterfaceTheme | undefined
|
|
591
|
-
>;
|
|
573
|
+
const SessionUserInterfaceThemeContext: import("react").Context<SessionUserInterfaceTheme | undefined>;
|
|
592
574
|
```
|
|
593
575
|
|
|
594
576
|
### SessionUserInterfaceThemePreferenceContext
|
|
@@ -596,9 +578,7 @@ const SessionUserInterfaceThemeContext: import('react').Context<
|
|
|
596
578
|
The React context behind `useSessionUserInterfaceThemePreference`.
|
|
597
579
|
|
|
598
580
|
```ts
|
|
599
|
-
const SessionUserInterfaceThemePreferenceContext: import(
|
|
600
|
-
ThemePreference | undefined
|
|
601
|
-
>;
|
|
581
|
+
const SessionUserInterfaceThemePreferenceContext: import("react").Context<ThemePreference | undefined>;
|
|
602
582
|
```
|
|
603
583
|
|
|
604
584
|
### SessionUserInterfaceWalkthroughLinkContext
|
|
@@ -606,7 +586,7 @@ const SessionUserInterfaceThemePreferenceContext: import('react').Context<
|
|
|
606
586
|
The React context behind `useSessionUserInterfaceWalkthroughLink`.
|
|
607
587
|
|
|
608
588
|
```ts
|
|
609
|
-
const SessionUserInterfaceWalkthroughLinkContext: import(
|
|
589
|
+
const SessionUserInterfaceWalkthroughLinkContext: import("react").Context<WalkthroughLink | null>;
|
|
610
590
|
```
|
|
611
591
|
|
|
612
592
|
### SettingsEditorCallbacksContext
|
|
@@ -614,7 +594,7 @@ const SessionUserInterfaceWalkthroughLinkContext: import('react').Context<Walkth
|
|
|
614
594
|
The React context behind `useSettingsEditorCallbacks`.
|
|
615
595
|
|
|
616
596
|
```ts
|
|
617
|
-
const SettingsEditorCallbacksContext: import(
|
|
597
|
+
const SettingsEditorCallbacksContext: import("react").Context<SettingsEditorCallbacks | undefined>;
|
|
618
598
|
```
|
|
619
599
|
|
|
620
600
|
### SettingsEditorContext
|
|
@@ -622,7 +602,7 @@ const SettingsEditorCallbacksContext: import('react').Context<SettingsEditorCall
|
|
|
622
602
|
The React context behind `useSettingsEditor`.
|
|
623
603
|
|
|
624
604
|
```ts
|
|
625
|
-
const SettingsEditorContext: import(
|
|
605
|
+
const SettingsEditorContext: import("react").Context<SettingsEditorValue<unknown> | undefined>;
|
|
626
606
|
```
|
|
627
607
|
|
|
628
608
|
### SettingsEditorLocaleContext
|
|
@@ -630,7 +610,7 @@ const SettingsEditorContext: import('react').Context<SettingsEditorValue<unknown
|
|
|
630
610
|
The React context behind `useSettingsEditorLocale`.
|
|
631
611
|
|
|
632
612
|
```ts
|
|
633
|
-
const SettingsEditorLocaleContext: import(
|
|
613
|
+
const SettingsEditorLocaleContext: import("react").Context<SettingsEditorLocale | undefined>;
|
|
634
614
|
```
|
|
635
615
|
|
|
636
616
|
### SettingsEditorThemeContext
|
|
@@ -638,7 +618,7 @@ const SettingsEditorLocaleContext: import('react').Context<SettingsEditorLocale
|
|
|
638
618
|
The React context behind `useSettingsEditorTheme`.
|
|
639
619
|
|
|
640
620
|
```ts
|
|
641
|
-
const SettingsEditorThemeContext: import(
|
|
621
|
+
const SettingsEditorThemeContext: import("react").Context<SettingsEditorTheme | undefined>;
|
|
642
622
|
```
|
|
643
623
|
|
|
644
624
|
### SettingsEditorThemePreferenceContext
|
|
@@ -646,7 +626,7 @@ const SettingsEditorThemeContext: import('react').Context<SettingsEditorTheme |
|
|
|
646
626
|
The React context behind `useSettingsEditorThemePreference`.
|
|
647
627
|
|
|
648
628
|
```ts
|
|
649
|
-
const SettingsEditorThemePreferenceContext: import(
|
|
629
|
+
const SettingsEditorThemePreferenceContext: import("react").Context<ThemePreference | undefined>;
|
|
650
630
|
```
|
|
651
631
|
|
|
652
632
|
### SurfaceThemeContext
|
|
@@ -654,7 +634,7 @@ const SettingsEditorThemePreferenceContext: import('react').Context<ThemePrefere
|
|
|
654
634
|
The theme of whichever surface is rendering, for the hooks every surface shares. Provided by every wrapper; game code reads it through `useBrand`, `useBrandLogo` and `useBrandIcon`.
|
|
655
635
|
|
|
656
636
|
```ts
|
|
657
|
-
const SurfaceThemeContext: import(
|
|
637
|
+
const SurfaceThemeContext: import("react").Context<SurfaceTheme | undefined>;
|
|
658
638
|
```
|
|
659
639
|
|
|
660
640
|
### UserInterfaceCallbacksContext
|
|
@@ -662,7 +642,7 @@ const SurfaceThemeContext: import('react').Context<SurfaceTheme | undefined>;
|
|
|
662
642
|
The React context behind `useUserInterfaceCallbacks`.
|
|
663
643
|
|
|
664
644
|
```ts
|
|
665
|
-
const UserInterfaceCallbacksContext: import(
|
|
645
|
+
const UserInterfaceCallbacksContext: import("react").Context<UserInterfaceCallbacks | undefined>;
|
|
666
646
|
```
|
|
667
647
|
|
|
668
648
|
### UserInterfaceCanRenameSelfContext
|
|
@@ -670,7 +650,7 @@ const UserInterfaceCallbacksContext: import('react').Context<UserInterfaceCallba
|
|
|
670
650
|
The React context behind `useUserInterfaceCanRenameSelf`.
|
|
671
651
|
|
|
672
652
|
```ts
|
|
673
|
-
const UserInterfaceCanRenameSelfContext: import(
|
|
653
|
+
const UserInterfaceCanRenameSelfContext: import("react").Context<boolean>;
|
|
674
654
|
```
|
|
675
655
|
|
|
676
656
|
### UserInterfaceCrossTeamDataContext
|
|
@@ -678,7 +658,7 @@ const UserInterfaceCanRenameSelfContext: import('react').Context<boolean>;
|
|
|
678
658
|
The React context behind `useUserInterfaceCrossTeamData`.
|
|
679
659
|
|
|
680
660
|
```ts
|
|
681
|
-
const UserInterfaceCrossTeamDataContext: import(
|
|
661
|
+
const UserInterfaceCrossTeamDataContext: import("react").Context<CrossTeamData | undefined>;
|
|
682
662
|
```
|
|
683
663
|
|
|
684
664
|
### UserInterfaceDataContext
|
|
@@ -686,9 +666,7 @@ const UserInterfaceCrossTeamDataContext: import('react').Context<CrossTeamData |
|
|
|
686
666
|
The React context behind `useUserInterfaceData`.
|
|
687
667
|
|
|
688
668
|
```ts
|
|
689
|
-
const UserInterfaceDataContext: import(
|
|
690
|
-
UserInterfaceDataContextValue<unknown, unknown> | undefined
|
|
691
|
-
>;
|
|
669
|
+
const UserInterfaceDataContext: import("react").Context<UserInterfaceDataContextValue<unknown, unknown> | undefined>;
|
|
692
670
|
```
|
|
693
671
|
|
|
694
672
|
### UserInterfaceLocaleContext
|
|
@@ -696,7 +674,7 @@ const UserInterfaceDataContext: import('react').Context<
|
|
|
696
674
|
The React context behind `useUserInterfaceLocale`.
|
|
697
675
|
|
|
698
676
|
```ts
|
|
699
|
-
const UserInterfaceLocaleContext: import(
|
|
677
|
+
const UserInterfaceLocaleContext: import("react").Context<UserInterfaceLocale | undefined>;
|
|
700
678
|
```
|
|
701
679
|
|
|
702
680
|
### UserInterfaceOwnTeamContext
|
|
@@ -704,7 +682,7 @@ const UserInterfaceLocaleContext: import('react').Context<UserInterfaceLocale |
|
|
|
704
682
|
The React context behind `useUserInterfaceOwnTeam`.
|
|
705
683
|
|
|
706
684
|
```ts
|
|
707
|
-
const UserInterfaceOwnTeamContext: import(
|
|
685
|
+
const UserInterfaceOwnTeamContext: import("react").Context<TeamInfo | null>;
|
|
708
686
|
```
|
|
709
687
|
|
|
710
688
|
### UserInterfaceOwnTeamJoinLinkContext
|
|
@@ -712,7 +690,7 @@ const UserInterfaceOwnTeamContext: import('react').Context<TeamInfo | null>;
|
|
|
712
690
|
The React context behind `useUserInterfaceOwnTeamJoinLink`.
|
|
713
691
|
|
|
714
692
|
```ts
|
|
715
|
-
const UserInterfaceOwnTeamJoinLinkContext: import(
|
|
693
|
+
const UserInterfaceOwnTeamJoinLinkContext: import("react").Context<OwnTeamJoinLink | null>;
|
|
716
694
|
```
|
|
717
695
|
|
|
718
696
|
### UserInterfaceParticipantContext
|
|
@@ -720,7 +698,7 @@ const UserInterfaceOwnTeamJoinLinkContext: import('react').Context<OwnTeamJoinLi
|
|
|
720
698
|
The React context behind `useUserInterfaceParticipant`.
|
|
721
699
|
|
|
722
700
|
```ts
|
|
723
|
-
const UserInterfaceParticipantContext: import(
|
|
701
|
+
const UserInterfaceParticipantContext: import("react").Context<Participant | null | undefined>;
|
|
724
702
|
```
|
|
725
703
|
|
|
726
704
|
### UserInterfaceParticipantsContext
|
|
@@ -728,7 +706,7 @@ const UserInterfaceParticipantContext: import('react').Context<Participant | nul
|
|
|
728
706
|
The React context behind `useUserInterfaceParticipants`.
|
|
729
707
|
|
|
730
708
|
```ts
|
|
731
|
-
const UserInterfaceParticipantsContext: import(
|
|
709
|
+
const UserInterfaceParticipantsContext: import("react").Context<Participant[]>;
|
|
732
710
|
```
|
|
733
711
|
|
|
734
712
|
### UserInterfaceRunKindContext
|
|
@@ -736,7 +714,7 @@ const UserInterfaceParticipantsContext: import('react').Context<Participant[]>;
|
|
|
736
714
|
The React context behind `useRunKind`.
|
|
737
715
|
|
|
738
716
|
```ts
|
|
739
|
-
const UserInterfaceRunKindContext: import(
|
|
717
|
+
const UserInterfaceRunKindContext: import("react").Context<RunKind>;
|
|
740
718
|
```
|
|
741
719
|
|
|
742
720
|
### UserInterfaceTeamsContext
|
|
@@ -744,7 +722,7 @@ const UserInterfaceRunKindContext: import('react').Context<RunKind>;
|
|
|
744
722
|
The React context behind `useUserInterfaceTeams`.
|
|
745
723
|
|
|
746
724
|
```ts
|
|
747
|
-
const UserInterfaceTeamsContext: import(
|
|
725
|
+
const UserInterfaceTeamsContext: import("react").Context<TeamInfo[]>;
|
|
748
726
|
```
|
|
749
727
|
|
|
750
728
|
### UserInterfaceThemeContext
|
|
@@ -752,7 +730,7 @@ const UserInterfaceTeamsContext: import('react').Context<TeamInfo[]>;
|
|
|
752
730
|
The React context behind `useUserInterfaceTheme`.
|
|
753
731
|
|
|
754
732
|
```ts
|
|
755
|
-
const UserInterfaceThemeContext: import(
|
|
733
|
+
const UserInterfaceThemeContext: import("react").Context<UserInterfaceTheme | undefined>;
|
|
756
734
|
```
|
|
757
735
|
|
|
758
736
|
### UserInterfaceThemePreferenceContext
|
|
@@ -760,7 +738,7 @@ const UserInterfaceThemeContext: import('react').Context<UserInterfaceTheme | un
|
|
|
760
738
|
The React context behind `useUserInterfaceThemePreference`.
|
|
761
739
|
|
|
762
740
|
```ts
|
|
763
|
-
const UserInterfaceThemePreferenceContext: import(
|
|
741
|
+
const UserInterfaceThemePreferenceContext: import("react").Context<ThemePreference | undefined>;
|
|
764
742
|
```
|
|
765
743
|
|
|
766
744
|
### UserInterfaceTimerContext
|
|
@@ -768,7 +746,7 @@ const UserInterfaceThemePreferenceContext: import('react').Context<ThemePreferen
|
|
|
768
746
|
The React context behind `useUserInterfaceTimer`.
|
|
769
747
|
|
|
770
748
|
```ts
|
|
771
|
-
const UserInterfaceTimerContext: import(
|
|
749
|
+
const UserInterfaceTimerContext: import("react").Context<TimerState>;
|
|
772
750
|
```
|
|
773
751
|
|
|
774
752
|
### UserInterfaceValidationRejectionsContext
|
|
@@ -776,9 +754,7 @@ const UserInterfaceTimerContext: import('react').Context<TimerState>;
|
|
|
776
754
|
The React context behind `useUserInterfaceValidationRejections`.
|
|
777
755
|
|
|
778
756
|
```ts
|
|
779
|
-
const UserInterfaceValidationRejectionsContext: import(
|
|
780
|
-
UserInterfaceValidationRejectionsValue | undefined
|
|
781
|
-
>;
|
|
757
|
+
const UserInterfaceValidationRejectionsContext: import("react").Context<UserInterfaceValidationRejectionsValue | undefined>;
|
|
782
758
|
```
|
|
783
759
|
|
|
784
760
|
### UserInterfaceViewerRoleContext
|
|
@@ -786,7 +762,7 @@ const UserInterfaceValidationRejectionsContext: import('react').Context<
|
|
|
786
762
|
The React context behind `useUserInterfaceViewerRole`.
|
|
787
763
|
|
|
788
764
|
```ts
|
|
789
|
-
const UserInterfaceViewerRoleContext: import(
|
|
765
|
+
const UserInterfaceViewerRoleContext: import("react").Context<ViewerRole>;
|
|
790
766
|
```
|
|
791
767
|
|
|
792
768
|
### ViewerStorageContext
|
|
@@ -794,7 +770,7 @@ const UserInterfaceViewerRoleContext: import('react').Context<ViewerRole>;
|
|
|
794
770
|
Provided by every surface wrapper. Exported for the test helpers, which provide it without a host; game code reads it through `useViewerStorage`.
|
|
795
771
|
|
|
796
772
|
```ts
|
|
797
|
-
const ViewerStorageContext: import(
|
|
773
|
+
const ViewerStorageContext: import("react").Context<ViewerStorageScope | undefined>;
|
|
798
774
|
```
|
|
799
775
|
|
|
800
776
|
## Interfaces
|
package/dist/docs/api/sdk.md
CHANGED
|
@@ -1056,6 +1056,7 @@ One thing wrong with a scenario. `path` names the setting it is about as a setti
|
|
|
1056
1056
|
interface ScenarioProblem {
|
|
1057
1057
|
message: string;
|
|
1058
1058
|
path?: string;
|
|
1059
|
+
level?: ScenarioProblemLevel;
|
|
1059
1060
|
}
|
|
1060
1061
|
```
|
|
1061
1062
|
|
|
@@ -2186,7 +2187,7 @@ type ScenarioEndpointHandler<
|
|
|
2186
2187
|
|
|
2187
2188
|
### ScenarioFunction
|
|
2188
2189
|
|
|
2189
|
-
A validator's `Scenario` export: the gate on a scenario. It runs at build on every package scenario, and on a session with no scenario when the game has no default, and when a custom scenario is saved.
|
|
2190
|
+
A validator's `Scenario` export: the gate on a scenario. It runs at build on every package scenario, and on a session with no scenario when the game has no default, and when a custom scenario is saved. In a package that lists `session-validation` it also runs as a session starts, on the session's own settings. Returns every problem it finds; an empty array passes.
|
|
2190
2191
|
|
|
2191
2192
|
```ts
|
|
2192
2193
|
type ScenarioFunction<TSettings = unknown> = (
|
|
@@ -2194,6 +2195,14 @@ type ScenarioFunction<TSettings = unknown> = (
|
|
|
2194
2195
|
) => Promise<ScenarioProblem[]>;
|
|
2195
2196
|
```
|
|
2196
2197
|
|
|
2198
|
+
### ScenarioProblemLevel
|
|
2199
|
+
|
|
2200
|
+
How serious a `ScenarioProblem` is.
|
|
2201
|
+
|
|
2202
|
+
```ts
|
|
2203
|
+
type ScenarioProblemLevel = 'error' | 'warning';
|
|
2204
|
+
```
|
|
2205
|
+
|
|
2197
2206
|
### StepFunction
|
|
2198
2207
|
|
|
2199
2208
|
One step of an engine that splits its `Init` or `Run` into several functions.
|
package/dist/docs/changelog.md
CHANGED
|
@@ -31,6 +31,21 @@ are in the [0.x changelog](changelog-0.x.md).
|
|
|
31
31
|
|
|
32
32
|
## [Unreleased]
|
|
33
33
|
|
|
34
|
+
## [1.8.0] — 2026-11-06
|
|
35
|
+
|
|
36
|
+
### Added
|
|
37
|
+
|
|
38
|
+
- **A `Scenario` gate can stop a session starting.** List `session-validation` in `requires` (beside `scenario-validation`) and your validator's `Scenario` gate also runs as a session starts, on what setup changed: a session it finds an error with does not start, and the facilitator, or an agent setting the session up, is told every problem and the setting to change. A gate that throws also stops the start, reported as a fault in the game rather than in the settings; one that times out is run once more first, since a busy host can cause it. Nothing overrides either. A session nobody changed, on a scenario the build already checked, is not judged again. In the dev server, Play shows the refusal or the warnings, `pnpm run sdk play` prints the warnings, and `pnpm run sdk configure` checks the settings before it saves them, so a refused change is never written. See [When it runs](guides/validators.md#when-it-runs)
|
|
39
|
+
- **A busy host no longer refuses a sound scenario save.** A `Scenario` gate that runs out of time when a scenario is saved is run once more before the save is refused, and a refusal then says the host may have been busy. A gate that throws still refuses at once, and the build does not retry
|
|
40
|
+
- **Warnings from a `Scenario` gate.** Give a problem `level: 'warning'` for something unusual that may be meant. It is reported by the build (`SCENARIO_WARNING`), with a saved scenario and with a session start, and never refuses any of them. A problem with no `level` is an error, as before. See [Errors and warnings](guides/validators.md#errors-and-warnings)
|
|
41
|
+
- **The build notes a setting setup can change that no `Scenario` gate reads** (`SETTINGS_UNGATED`), since nothing then checks a facilitator's changes to it before play
|
|
42
|
+
- **Setup notes for assistants.** Put Markdown at `setup/notes/<locale>.md` to tell an AI assistant setting a session up which settings matter and what requests such as 'make it harder' mean as settings and values. Name settings as setting paths in code spans (`engine.BaseDemand`): the build fails on one that names no setting (`SETTINGS_UNKNOWN`) and warns on one your setup screen does not configure (`SETUP_NOTES_UNCONFIGURED`). They ship in the build, and the dev server shows them on the configuration step under **Notes for assistants**. See [Notes for assistants](guides/setup.md#notes-for-assistants)
|
|
43
|
+
- **Two recipes for assistant-led setup**: [Write setup notes for assistants](recipes/write-setup-notes.md), and [Describe a setup with an endpoint](recipes/describe-setup-with-endpoint.md), an external endpoint that reads a session's settings back in the game's own words during setup
|
|
44
|
+
|
|
45
|
+
### Changed
|
|
46
|
+
|
|
47
|
+
- **New packages start on current tooling.** `pnpm run sdk new package` now pins oxfmt 0.75 (up from 0.67), oxlint 1.90, Vite 8.3.5, Vitest 5.0.5, MUI 9.5, i18next 26.5 and react-i18next 17.1, among other patch updates. oxfmt 0.75 formats some JSX conditionals and wrapped callbacks differently, so an existing package that moves to it should run `pnpm format` once and commit the result on its own
|
|
48
|
+
|
|
34
49
|
## [1.7.0] — 2026-11-05
|
|
35
50
|
|
|
36
51
|
### Added
|
|
@@ -12,7 +12,7 @@ The codes are the contract: branch on the code, never on the message. A code is
|
|
|
12
12
|
| --------- | ------------- | ------------------- | ----- |
|
|
13
13
|
| 1 | `internal` | Internal error | 1 |
|
|
14
14
|
| 2 | `usage` | Usage error | 16 |
|
|
15
|
-
| 3 | `package` | Invalid package |
|
|
15
|
+
| 3 | `package` | Invalid package | 35 |
|
|
16
16
|
| 4 | `refused` | Refused by the game | 12 |
|
|
17
17
|
| 5 | `environment` | Environment | 19 |
|
|
18
18
|
|
|
@@ -77,6 +77,9 @@ A code marked as a diagnostic also appears in a failure's `diagnostics`, one fin
|
|
|
77
77
|
| `NO_TERMINATION` | A warning: the game declares neither `maxTicks` nor a tick controller, so only its engine can end it. | Yes |
|
|
78
78
|
| `SCENARIO_EDITOR_UNREACHABLE` | A warning: the game ships a scenario editor but does not set `customScenarios.supported`, so no host ever opens it. | Yes |
|
|
79
79
|
| `SCENARIO_REFUSED` | A validator's `Scenario` gate found a problem with a package scenario, or with the defaults when no scenario is the default. The diagnostic points at the setting it names. | Yes |
|
|
80
|
+
| `SCENARIO_WARNING` | A warning: a validator's `Scenario` gate marked a problem with a package scenario, or with the defaults, as a `warning`. It is reported and never fails the build. | Yes |
|
|
81
|
+
| `SETUP_NOTES_UNCONFIGURED` | A warning: the setup notes name a setting the setup UI does not `configures`, so a host refuses the change they describe. | Yes |
|
|
82
|
+
| `SETTINGS_UNGATED` | A warning: the setup UI `configures` a settings resource no `Scenario` gate declares, so nothing checks what a facilitator changes in it before the session starts. | Yes |
|
|
80
83
|
| `EDITOR_ENDPOINT_NOT_SCENARIO` | The scenario editor lists an endpoint that is not scenario-scoped. It works on a scenario draft with no session, so it calls `"scope": "scenario"` endpoints alone. | Yes |
|
|
81
84
|
| `SCENARIO_ENDPOINT_STATEFUL` | A scenario-scoped endpoint declares `reads`, `writes`, `actions` or `roster`, which need a session a scenario draft does not have. | Yes |
|
|
82
85
|
| `EXTERNAL_REQUEST_NOT_OBJECT` | An external endpoint's `requestSchema` does not declare `"type": "object"` at the top, which a caller outside the game needs to pass named arguments. | Yes |
|
|
@@ -154,6 +157,9 @@ The codes a diagnostic carries. `LOGIC_ERROR` is only ever a diagnostic: it sits
|
|
|
154
157
|
| `NO_TERMINATION` | A warning: the game declares neither `maxTicks` nor a tick controller, so only its engine can end it. |
|
|
155
158
|
| `SCENARIO_EDITOR_UNREACHABLE` | A warning: the game ships a scenario editor but does not set `customScenarios.supported`, so no host ever opens it. |
|
|
156
159
|
| `SCENARIO_REFUSED` | A validator's `Scenario` gate found a problem with a package scenario, or with the defaults when no scenario is the default. The diagnostic points at the setting it names. |
|
|
160
|
+
| `SCENARIO_WARNING` | A warning: a validator's `Scenario` gate marked a problem with a package scenario, or with the defaults, as a `warning`. It is reported and never fails the build. |
|
|
161
|
+
| `SETTINGS_UNGATED` | A warning: the setup UI `configures` a settings resource no `Scenario` gate declares, so nothing checks what a facilitator changes in it before the session starts. |
|
|
162
|
+
| `SETUP_NOTES_UNCONFIGURED` | A warning: the setup notes name a setting the setup UI does not `configures`, so a host refuses the change they describe. |
|
|
157
163
|
| `EDITOR_ENDPOINT_NOT_SCENARIO` | The scenario editor lists an endpoint that is not scenario-scoped. It works on a scenario draft with no session, so it calls `"scope": "scenario"` endpoints alone. |
|
|
158
164
|
| `SCENARIO_ENDPOINT_STATEFUL` | A scenario-scoped endpoint declares `reads`, `writes`, `actions` or `roster`, which need a session a scenario draft does not have. |
|
|
159
165
|
| `EXTERNAL_REQUEST_NOT_OBJECT` | An external endpoint's `requestSchema` does not declare `"type": "object"` at the top, which a caller outside the game needs to pass named arguments. |
|
|
@@ -235,6 +235,9 @@ Without `--json`, each diagnostic that names a file is printed under the error a
|
|
|
235
235
|
| `NO_TERMINATION` | A warning: the game declares neither `maxTicks` nor a tick controller, so only its engine can end it. |
|
|
236
236
|
| `SCENARIO_EDITOR_UNREACHABLE` | A warning: the game ships a scenario editor but does not set `customScenarios.supported`, so no host ever opens it. |
|
|
237
237
|
| `SCENARIO_REFUSED` | A validator's `Scenario` gate found a problem with a package scenario, or with the defaults when no scenario is the default. The diagnostic points at the setting it names. |
|
|
238
|
+
| `SCENARIO_WARNING` | A warning: a validator's `Scenario` gate marked a problem with a package scenario, or with the defaults, as a `warning`. It is reported and never fails the build. |
|
|
239
|
+
| `SETTINGS_UNGATED` | A warning: the setup UI `configures` a settings resource no `Scenario` gate declares, so nothing checks what a facilitator changes in it before the session starts. |
|
|
240
|
+
| `SETUP_NOTES_UNCONFIGURED` | A warning: the setup notes name a setting the setup UI does not `configures`, so a host refuses the change they describe. |
|
|
238
241
|
| `EDITOR_ENDPOINT_NOT_SCENARIO` | The scenario editor lists an endpoint that is not scenario-scoped. It works on a scenario draft with no session, so it calls `"scope": "scenario"` endpoints alone. |
|
|
239
242
|
| `SCENARIO_ENDPOINT_STATEFUL` | A scenario-scoped endpoint declares `reads`, `writes`, `actions` or `roster`, which need a session a scenario draft does not have. |
|
|
240
243
|
| `EXTERNAL_REQUEST_NOT_OBJECT` | An external endpoint's `requestSchema` does not declare `"type": "object"` at the top, which a caller outside the game needs to pass named arguments. |
|
|
@@ -77,6 +77,7 @@ Add `"uses": ["generateText"]` to call an external service such as generated tex
|
|
|
77
77
|
|
|
78
78
|
```typescript
|
|
79
79
|
import type { InitializationFunction, RunFunction } from '@seriousgaming/sdk';
|
|
80
|
+
|
|
80
81
|
import type { Context, Settings } from './types';
|
|
81
82
|
|
|
82
83
|
export const Init: InitializationFunction<Context, Settings> = async ({ context }) => ({
|
|
@@ -115,6 +115,7 @@ To change a value for one scenario, override it in the scenario's `settings` und
|
|
|
115
115
|
|
|
116
116
|
```typescript
|
|
117
117
|
import { InitializationFunction } from '@seriousgaming/sdk';
|
|
118
|
+
|
|
118
119
|
import type { Context, Settings } from './types';
|
|
119
120
|
|
|
120
121
|
export const Init: InitializationFunction<Context, Settings> = async ({ context, settings }) => {
|
|
@@ -136,6 +137,7 @@ export const Init: InitializationFunction<Context, Settings> = async ({ context,
|
|
|
136
137
|
|
|
137
138
|
```typescript
|
|
138
139
|
import { RunFunction } from '@seriousgaming/sdk';
|
|
140
|
+
|
|
139
141
|
import type { Context, Settings } from './types';
|
|
140
142
|
|
|
141
143
|
export const Run: RunFunction<Context, Settings> = async ({ context, settings }) => {
|
|
@@ -221,6 +223,7 @@ Some of what an engine knows is nobody else's business: a record of every round
|
|
|
221
223
|
|
|
222
224
|
```typescript
|
|
223
225
|
import type { InitializationFunction, RunFunction, SignatureCallbacks } from '@seriousgaming/sdk';
|
|
226
|
+
|
|
224
227
|
import type { Context, Settings } from './types';
|
|
225
228
|
|
|
226
229
|
interface EngineState {
|
|
@@ -482,6 +485,7 @@ The per-resource `types.ts` generator narrows the `Callbacks` type alias to the
|
|
|
482
485
|
|
|
483
486
|
```typescript
|
|
484
487
|
import type { RunFunction } from '@seriousgaming/sdk';
|
|
488
|
+
|
|
485
489
|
import type { Context, Settings, Callbacks } from './types';
|
|
486
490
|
|
|
487
491
|
export const Run: RunFunction<Context, Settings, Callbacks> = async ({ context, callbacks }) => {
|
|
@@ -499,6 +503,7 @@ Build the arguments with `logicArgs` from `@seriousgaming/sdk/testing`, which fi
|
|
|
499
503
|
```typescript
|
|
500
504
|
import { logicArgs } from '@seriousgaming/sdk/testing';
|
|
501
505
|
import { describe, it, expect } from 'vitest';
|
|
506
|
+
|
|
502
507
|
import { defaultContext, defaultSettings } from './defaults';
|
|
503
508
|
import { Run } from './logic';
|
|
504
509
|
import type { Context, Settings } from './types';
|