@seriousgaming/sdk-tools 1.5.0 → 1.6.1
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 +350 -0
- package/dist/bundling/ui-bundler.d.ts +12 -0
- package/dist/cli-25RWY5BQ.js +41 -0
- package/dist/cli-2BH7FX27.js +52 -0
- package/dist/cli-2GZYGRVL.js +36 -0
- package/dist/cli-2NU2LPEE.js +97 -0
- package/dist/cli-3BRC32CP.js +132 -0
- package/dist/cli-3D3ZXWOV.js +111 -0
- package/dist/cli-3ZKWV3PN.js +96 -0
- package/dist/cli-45OCBG53.js +60 -0
- package/dist/cli-4LKXZQ2B.js +48 -0
- package/dist/cli-4PXNOJQX.js +81 -0
- package/dist/cli-4SIWLHQO.js +717 -0
- package/dist/cli-4UWFQNGF.js +54 -0
- package/dist/cli-4VFZHLDG.js +202 -0
- package/dist/cli-4YB3ROVR.js +78 -0
- package/dist/cli-5ACDPCXI.js +21 -0
- package/dist/cli-5IAW3LIF.js +38 -0
- package/dist/cli-5SM367K7.js +30 -0
- package/dist/cli-64AB62PM.js +25 -0
- package/dist/cli-6K3VQQUS.js +307 -0
- package/dist/cli-6QB2VFPY.js +80 -0
- package/dist/cli-6SGCYEEC.js +649 -0
- package/dist/cli-6UTPHWRQ.js +207 -0
- package/dist/cli-6VNKQ3OX.js +391 -0
- package/dist/cli-72XDEFU3.js +61 -0
- package/dist/cli-7A6MKCUJ.js +463 -0
- package/dist/cli-7XLHO2FE.js +226 -0
- package/dist/cli-AV2FYC5G.js +225 -0
- package/dist/cli-B6YHEKIJ.js +248 -0
- package/dist/cli-BJMS3VX3.js +1837 -0
- package/dist/cli-BUQI5UU4.js +43 -0
- package/dist/cli-BWX5E7TQ.js +23 -0
- package/dist/cli-BYCHKSSH.js +1331 -0
- package/dist/cli-C3CMJSNL.js +89 -0
- package/dist/cli-C47GJATR.js +42 -0
- package/dist/cli-C5QOJJWX.js +46 -0
- package/dist/cli-C6ZLPK2U.js +124 -0
- package/dist/cli-CD5CIJZI.js +72 -0
- package/dist/cli-DDJYUKQG.js +36 -0
- package/dist/cli-DFBTZEBX.js +167 -0
- package/dist/cli-DOXRQ3S5.js +60 -0
- package/dist/cli-EVI36HEM.js +79 -0
- package/dist/cli-F2D4GGUA.js +549 -0
- package/dist/cli-FQRVFGN6.js +0 -0
- package/dist/cli-FWFRKQNE.js +11 -0
- package/dist/cli-G6CANSPL.js +88 -0
- package/dist/cli-GFNDW2DL.js +124 -0
- package/dist/cli-HCRTYQQS.js +16 -0
- package/dist/cli-HFX3YPUL.js +76 -0
- package/dist/cli-HKORECAG.js +53 -0
- package/dist/cli-HOE3WLFH.js +73 -0
- package/dist/cli-HSIHDN6K.js +187 -0
- package/dist/cli-HW53ICZC.js +89 -0
- package/dist/cli-IDVUHGKG.js +218 -0
- package/dist/cli-IEMKI7J7.js +1387 -0
- package/dist/cli-ILFDANBR.js +101 -0
- package/dist/cli-ILKCQNM6.js +8 -0
- package/dist/cli-IP4RXGHM.js +2847 -0
- package/dist/cli-IUS2YCD3.js +31 -0
- package/dist/cli-J4DKUUTK.js +138 -0
- package/dist/cli-J4UBELKF.js +37 -0
- package/dist/cli-JJSWBW4H.js +89 -0
- package/dist/cli-JVI24FI6.js +68 -0
- package/dist/cli-JZCLIT3O.js +135 -0
- package/dist/cli-JZOZOEZM.js +131 -0
- package/dist/cli-KGM6RRQW.js +185 -0
- package/dist/cli-KGT5L7VZ.js +13641 -0
- package/dist/cli-KOGRWFN7.js +89 -0
- package/dist/cli-KSGB2ZLK.js +101 -0
- package/dist/cli-L7VYSXQK.js +243 -0
- package/dist/cli-LK3V4RI5.js +36 -0
- package/dist/cli-LQOHATY2.js +126 -0
- package/dist/cli-MJUYJIEP.js +13 -0
- package/dist/cli-MJV47HKI.js +143 -0
- package/dist/cli-MMN4BPO4.js +145 -0
- package/dist/cli-MOPSZ3CS.js +88 -0
- package/dist/cli-MU5LB43S.js +136 -0
- package/dist/cli-MYJGMA6U.js +40 -0
- package/dist/cli-N24OHSAN.js +36 -0
- package/dist/cli-N45DREM4.js +99 -0
- package/dist/cli-N6H6T2E2.js +616 -0
- package/dist/cli-NROTDF5Y.js +182 -0
- package/dist/cli-O5ABH2WK.js +226 -0
- package/dist/cli-OMWC75CC.js +256 -0
- package/dist/cli-OXAUOWCN.js +50 -0
- package/dist/cli-PGCIHPU7.js +143 -0
- package/dist/cli-Q6ZBZYK2.js +35 -0
- package/dist/cli-QUNIRH7A.js +57 -0
- package/dist/cli-QUSCIUOM.js +142 -0
- package/dist/cli-QVASWX2A.js +187 -0
- package/dist/cli-QWQMPCL6.js +253 -0
- package/dist/cli-QY5NZAR7.js +97 -0
- package/dist/cli-R2MUZQE2.js +62 -0
- package/dist/cli-RCIWBCXD.js +36 -0
- package/dist/cli-RLEGRWFM.js +81 -0
- package/dist/cli-RSW6EBBD.js +89 -0
- package/dist/cli-RZITKPJX.js +367 -0
- package/dist/cli-S5IVGDDD.js +32 -0
- package/dist/cli-SRHBXZCN.js +159 -0
- package/dist/cli-TDSQSCX4.js +131 -0
- package/dist/cli-TIDQ4WUE.js +257 -0
- package/dist/cli-TT36JCU5.js +370 -0
- package/dist/cli-TTKICM5P.js +100 -0
- package/dist/cli-TTMBBEJC.js +131 -0
- package/dist/cli-UMEBPAZQ.js +16 -0
- package/dist/cli-UNAJ2OTE.js +15 -0
- package/dist/cli-UZZFNXRX.js +226 -0
- package/dist/cli-VDBW23SS.js +81 -0
- package/dist/cli-VL2P354N.js +46 -0
- package/dist/cli-VPRRICZA.js +304 -0
- package/dist/cli-VQ6HVQW4.js +4010 -0
- package/dist/cli-WR3NOY74.js +36 -0
- package/dist/cli-WU43JT4T.js +52 -0
- package/dist/cli-XAT25PRU.js +117 -0
- package/dist/cli-XOTNXEJA.js +124 -0
- package/dist/cli-XSLNH5PR.js +6417 -0
- package/dist/cli-XSVGKI3R.js +39 -0
- package/dist/cli-XZCJIKIV.js +124 -0
- package/dist/cli-Y3DDNMPX.js +97 -0
- package/dist/cli-Y3O5F4JN.js +90 -0
- package/dist/cli-YOTGR3NB.js +82 -0
- package/dist/cli-Z56ZIVA6.js +97 -0
- package/dist/cli-ZBN5KAIB.js +59 -0
- package/dist/cli-ZDOTXEKL.js +31 -0
- package/dist/cli-ZDUADFBY.js +88 -0
- package/dist/cli-ZJFQ7EEA.js +131 -0
- package/dist/cli-ZTWOE3ZT.js +65 -0
- package/dist/cli.js +148 -43093
- package/dist/client/build-surfaces.d.ts +33 -0
- package/dist/client/dev-server.d.ts +6 -0
- package/dist/client/index.d.ts +1 -0
- package/dist/client/playwright.d.ts +62 -0
- package/dist/client.js +228 -48
- package/dist/core/session.d.ts +15 -1
- package/dist/dev/console/assets/{index-BVF8exas.js → index-CuMOOH9m.js} +1 -1
- package/dist/dev/console/index.html +1 -1
- package/dist/dev/shell.d.ts +19 -0
- package/dist/dev/surfaces.d.ts +7 -0
- package/dist/docs/ai-agents.md +1 -1
- package/dist/docs/api/index.md +14 -12
- package/dist/docs/api/sdk-tools-client.md +29 -0
- package/dist/docs/api/sdk-tools-playwright.md +104 -0
- package/dist/docs/changelog.md +34 -0
- package/dist/docs/cli-and-dev-server.md +21 -0
- package/dist/docs/cli-reference.md +45 -31
- package/dist/docs/environment-variables.md +6 -0
- package/dist/docs/getting-started.md +1 -1
- package/dist/docs/guides/designing-a-game.md +29 -4
- package/dist/docs/guides/starter-game.md +3 -3
- package/dist/docs/guides/testing.md +33 -18
- package/dist/docs/guides/upgrading.md +19 -2
- package/dist/docs/page-index.md +10 -9
- package/dist/docs/recipes/e2e-testing.md +19 -20
- package/dist/playwright.js +32232 -0
- package/dist/templates/package/CLAUDE.md.template +7 -346
- package/dist/templates/package/claude/rules/workflow-create-engine.md +2 -2
- package/dist/templates/package/claude/rules/workflow-create-guide.md +2 -2
- package/dist/templates/package/claude/rules/workflow-create-user-interface.md +1 -1
- package/dist/templates/package/claude/rules/workflow-test-engine-or-ui.md +1 -1
- package/dist/templates/package/claude/rules/workflow-update-sdk-version.md +3 -3
- package/dist/templates/package/global-setup.ts.template +7 -18
- package/dist/templates/package/playwright.config.ts.liquid +8 -11
- package/dist/templates/starter-game/playwright.config.ts +8 -11
- package/dist/templates/starter-game/testing/e2e/game.spec.ts +1 -1
- package/dist/templates/starter-game/testing/e2e/global-setup.ts +7 -18
- package/dist/utils/prompt.d.ts +5 -5
- package/dist/utils/resource-scan.d.ts +39 -0
- package/package.json +7 -3
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// cli/utils/lazy.ts
|
|
4
|
+
function lazy(load, name) {
|
|
5
|
+
return (...args) => load().then((module) => module[name](...args));
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
// cli/commands/resources/registry.ts
|
|
9
|
+
var deleteCapability = lazy(() => import("./cli-6QB2VFPY.js"), "deleteCapability");
|
|
10
|
+
var createCapability = lazy(() => import("./cli-PGCIHPU7.js"), "createCapability");
|
|
11
|
+
var updateCapability = lazy(() => import("./cli-UZZFNXRX.js"), "updateCapability");
|
|
12
|
+
var deleteEndpoint = lazy(() => import("./cli-G6CANSPL.js"), "deleteEndpoint");
|
|
13
|
+
var createEndpoint = lazy(() => import("./cli-NROTDF5Y.js"), "createEndpoint");
|
|
14
|
+
var updateEndpoint = lazy(() => import("./cli-JZOZOEZM.js"), "updateEndpoint");
|
|
15
|
+
var deleteEngine = lazy(() => import("./cli-4PXNOJQX.js"), "deleteEngine");
|
|
16
|
+
var createEngine = lazy(() => import("./cli-JZCLIT3O.js"), "createEngine");
|
|
17
|
+
var updateEngine = lazy(() => import("./cli-6UTPHWRQ.js"), "updateEngine");
|
|
18
|
+
var deleteFacilitatorGuide = lazy(() => import("./cli-HOE3WLFH.js"), "deleteFacilitatorGuide");
|
|
19
|
+
var createFacilitatorGuide = lazy(() => import("./cli-3ZKWV3PN.js"), "createFacilitatorGuide");
|
|
20
|
+
var updateFacilitatorGuide = lazy(() => import("./cli-Y3O5F4JN.js"), "updateFacilitatorGuide");
|
|
21
|
+
var deleteHook = lazy(() => import("./cli-ZDUADFBY.js"), "deleteHook");
|
|
22
|
+
var createHook = lazy(() => import("./cli-QUSCIUOM.js"), "createHook");
|
|
23
|
+
var updateHook = lazy(() => import("./cli-3BRC32CP.js"), "updateHook");
|
|
24
|
+
var createPackage = lazy(() => import("./cli-DFBTZEBX.js"), "createPackage");
|
|
25
|
+
var updatePackage = lazy(() => import("./cli-HSIHDN6K.js"), "updatePackage");
|
|
26
|
+
var deletePresentation = lazy(() => import("./cli-HW53ICZC.js"), "deletePresentation");
|
|
27
|
+
var createPresentation = lazy(() => import("./cli-XOTNXEJA.js"), "createPresentation");
|
|
28
|
+
var updatePresentation = lazy(() => import("./cli-Y3DDNMPX.js"), "updatePresentation");
|
|
29
|
+
var deleteScenarioEditor = lazy(
|
|
30
|
+
() => import("./cli-DDJYUKQG.js"),
|
|
31
|
+
"deleteScenarioEditor"
|
|
32
|
+
);
|
|
33
|
+
var createScenarioEditor = lazy(() => import("./cli-N24OHSAN.js"), "createScenarioEditor");
|
|
34
|
+
var updateScenarioEditor = lazy(
|
|
35
|
+
() => import("./cli-LK3V4RI5.js"),
|
|
36
|
+
"updateScenarioEditor"
|
|
37
|
+
);
|
|
38
|
+
var deleteScenario = lazy(() => import("./cli-CD5CIJZI.js"), "deleteScenario");
|
|
39
|
+
var createScenario = lazy(() => import("./cli-XAT25PRU.js"), "createScenario");
|
|
40
|
+
var updateScenario = lazy(() => import("./cli-RSW6EBBD.js"), "updateScenario");
|
|
41
|
+
var deleteSessionUserInterface = lazy(
|
|
42
|
+
() => import("./cli-C3CMJSNL.js"),
|
|
43
|
+
"deleteSessionUserInterface"
|
|
44
|
+
);
|
|
45
|
+
var createSessionUserInterface = lazy(
|
|
46
|
+
() => import("./cli-MU5LB43S.js"),
|
|
47
|
+
"createSessionUserInterface"
|
|
48
|
+
);
|
|
49
|
+
var updateSessionUserInterface = lazy(
|
|
50
|
+
() => import("./cli-QY5NZAR7.js"),
|
|
51
|
+
"updateSessionUserInterface"
|
|
52
|
+
);
|
|
53
|
+
var deleteSettings = lazy(() => import("./cli-EVI36HEM.js"), "deleteSettings");
|
|
54
|
+
var createSettings = lazy(() => import("./cli-GFNDW2DL.js"), "createSettings");
|
|
55
|
+
var updateSettings = lazy(() => import("./cli-KGM6RRQW.js"), "updateSettings");
|
|
56
|
+
var deleteSetup = lazy(() => import("./cli-RCIWBCXD.js"), "deleteSetup");
|
|
57
|
+
var createSetup = lazy(() => import("./cli-2GZYGRVL.js"), "createSetup");
|
|
58
|
+
var updateSetup = lazy(() => import("./cli-WR3NOY74.js"), "updateSetup");
|
|
59
|
+
var deleteTickController = lazy(
|
|
60
|
+
() => import("./cli-JJSWBW4H.js"),
|
|
61
|
+
"deleteTickController"
|
|
62
|
+
);
|
|
63
|
+
var createTickController = lazy(() => import("./cli-3D3ZXWOV.js"), "createTickController");
|
|
64
|
+
var updateTickController = lazy(
|
|
65
|
+
() => import("./cli-Z56ZIVA6.js"),
|
|
66
|
+
"updateTickController"
|
|
67
|
+
);
|
|
68
|
+
var deleteUserInterface = lazy(() => import("./cli-VDBW23SS.js"), "deleteUserInterface");
|
|
69
|
+
var createUserInterface = lazy(() => import("./cli-MJV47HKI.js"), "createUserInterface");
|
|
70
|
+
var updateUserInterface = lazy(() => import("./cli-N45DREM4.js"), "updateUserInterface");
|
|
71
|
+
var deleteValidator = lazy(() => import("./cli-MOPSZ3CS.js"), "deleteValidator");
|
|
72
|
+
var createValidator = lazy(() => import("./cli-XZCJIKIV.js"), "createValidator");
|
|
73
|
+
var updateValidator = lazy(() => import("./cli-TTMBBEJC.js"), "updateValidator");
|
|
74
|
+
var deleteWaitingRoomUserInterface = lazy(
|
|
75
|
+
() => import("./cli-KOGRWFN7.js"),
|
|
76
|
+
"deleteWaitingRoomUserInterface"
|
|
77
|
+
);
|
|
78
|
+
var createWaitingRoomUserInterface = lazy(
|
|
79
|
+
() => import("./cli-ZJFQ7EEA.js"),
|
|
80
|
+
"createWaitingRoomUserInterface"
|
|
81
|
+
);
|
|
82
|
+
var updateWaitingRoomUserInterface = lazy(
|
|
83
|
+
() => import("./cli-2NU2LPEE.js"),
|
|
84
|
+
"updateWaitingRoomUserInterface"
|
|
85
|
+
);
|
|
86
|
+
var RESOURCE_DESCRIPTORS = [
|
|
87
|
+
{
|
|
88
|
+
type: "package",
|
|
89
|
+
create: createPackage,
|
|
90
|
+
update: { kind: "unidentified", run: updatePackage },
|
|
91
|
+
updateSupportsPatch: true,
|
|
92
|
+
help: {
|
|
93
|
+
typeLabel: "package",
|
|
94
|
+
updateSummary: "Edits seriousgaming.sdk.json: the package identifier and the game's\nsettings. A full update replaces the whole file, so restate every\nsetting you want to keep. Resources are not listed here at all: they\nare discovered from the directories on disk.",
|
|
95
|
+
updateWarning: "WARNING: The package identifier names the game everywhere it is published.\nA new identifier is a new game to a runtime, not a new version of this one.",
|
|
96
|
+
patchExample: '[{"op":"replace","path":"/maxTicks","value":50}]'
|
|
97
|
+
},
|
|
98
|
+
configureNewOptions: (cmd) => {
|
|
99
|
+
cmd.option("--empty", "skip the starter game: package files and CLAUDE.md only").option(
|
|
100
|
+
"--skip-install",
|
|
101
|
+
"skip running pnpm install after creating the package"
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
type: "capability",
|
|
107
|
+
create: createCapability,
|
|
108
|
+
update: { kind: "identified", run: updateCapability },
|
|
109
|
+
delete: { kind: "identified", run: deleteCapability },
|
|
110
|
+
help: {
|
|
111
|
+
typeLabel: "capability",
|
|
112
|
+
sampleId: "price",
|
|
113
|
+
newExtraExamples: " # Create a shared capability without writing JSON\n $ seriousgaming-sdk new capability --scope shared",
|
|
114
|
+
deleteSummary: "Deletes the capability and removes every read and write of it, from\nwhichever resources declared them."
|
|
115
|
+
},
|
|
116
|
+
configureNewOptions: (cmd) => {
|
|
117
|
+
cmd.option(
|
|
118
|
+
"--scope <scope>",
|
|
119
|
+
"cross-team visibility: 'team' (default), 'team-readable', 'shared' or 'private'"
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
type: "settings",
|
|
125
|
+
create: createSettings,
|
|
126
|
+
update: { kind: "identified", run: updateSettings },
|
|
127
|
+
delete: { kind: "identified", run: deleteSettings },
|
|
128
|
+
help: {
|
|
129
|
+
typeLabel: "settings resource",
|
|
130
|
+
sampleId: "demand",
|
|
131
|
+
intro: 'Named, read-only parameters: a schema whose every property declares a\ndefault. A resource reads it by listing it in its "settings", a\nsetup UI or scenario editor edits it by listing it in "configures", and a\nscenario overrides it under "settings", keyed by its identifier.',
|
|
132
|
+
deleteSummary: `Deletes the settings and removes every reference to them: from each
|
|
133
|
+
resource's "settings", the setup UI's and scenario editor's "configures",
|
|
134
|
+
and each scenario's "settings".`
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
type: "engine",
|
|
139
|
+
create: createEngine,
|
|
140
|
+
update: { kind: "unidentified", run: updateEngine },
|
|
141
|
+
delete: { kind: "unidentified", run: deleteEngine },
|
|
142
|
+
updateSupportsPatch: true,
|
|
143
|
+
help: {
|
|
144
|
+
typeLabel: "engine",
|
|
145
|
+
article: "an",
|
|
146
|
+
newExtraExamples: " # Scaffold an engine that runs once across every team\n $ seriousgaming-sdk new engine --aggregate"
|
|
147
|
+
},
|
|
148
|
+
configureNewOptions: (cmd) => {
|
|
149
|
+
cmd.option(
|
|
150
|
+
"--aggregate",
|
|
151
|
+
"scaffold logic exporting InitAggregate and RunAggregate, for an engine that runs once across all teams"
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
type: "ui",
|
|
157
|
+
create: createUserInterface,
|
|
158
|
+
update: { kind: "unidentified", run: updateUserInterface },
|
|
159
|
+
delete: { kind: "unidentified", run: deleteUserInterface },
|
|
160
|
+
updateSupportsPatch: true,
|
|
161
|
+
help: {
|
|
162
|
+
typeLabel: "user interface"
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
type: "setup",
|
|
167
|
+
create: createSetup,
|
|
168
|
+
update: { kind: "unidentified", run: updateSetup },
|
|
169
|
+
delete: { kind: "unidentified", run: deleteSetup },
|
|
170
|
+
updateSupportsPatch: true,
|
|
171
|
+
help: {
|
|
172
|
+
typeLabel: "setup user interface",
|
|
173
|
+
intro: "A small form a facilitator fills in when creating a session. It names\nthe settings resources it configures, and its changes apply to that\nsession only. A game with one holds each session at a setup step until\nPlay."
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
type: "scenario_editor",
|
|
178
|
+
create: createScenarioEditor,
|
|
179
|
+
update: { kind: "unidentified", run: updateScenarioEditor },
|
|
180
|
+
delete: { kind: "unidentified", run: deleteScenarioEditor },
|
|
181
|
+
updateSupportsPatch: true,
|
|
182
|
+
help: {
|
|
183
|
+
typeLabel: "scenario editor",
|
|
184
|
+
intro: "An authoring screen for building a new scenario, used at any time and\nwith no session. It names the settings resources it configures; the host\nsaves what it edits as a scenario. Optional: customScenarios.supported is\nwhat switches custom scenarios on."
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
type: "tick_controller",
|
|
189
|
+
create: createTickController,
|
|
190
|
+
update: { kind: "unidentified", run: updateTickController },
|
|
191
|
+
delete: { kind: "unidentified", run: deleteTickController },
|
|
192
|
+
updateSupportsPatch: true,
|
|
193
|
+
help: {
|
|
194
|
+
typeLabel: "tick controller"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
type: "session",
|
|
199
|
+
create: createSessionUserInterface,
|
|
200
|
+
update: { kind: "unidentified", run: updateSessionUserInterface },
|
|
201
|
+
delete: { kind: "unidentified", run: deleteSessionUserInterface },
|
|
202
|
+
updateSupportsPatch: true,
|
|
203
|
+
help: {
|
|
204
|
+
typeLabel: "session user interface",
|
|
205
|
+
intro: "A facilitator-facing UI for modifying a live session's game context."
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
type: "waiting_room",
|
|
210
|
+
create: createWaitingRoomUserInterface,
|
|
211
|
+
update: { kind: "unidentified", run: updateWaitingRoomUserInterface },
|
|
212
|
+
delete: { kind: "unidentified", run: deleteWaitingRoomUserInterface },
|
|
213
|
+
updateSupportsPatch: true,
|
|
214
|
+
help: {
|
|
215
|
+
typeLabel: "waiting room user interface",
|
|
216
|
+
intro: "The holding screen players see instead of the game UIs while the\nsession's waiting room is open. It is a player user interface in a\ndifferent display context: the same reads, writes, endpoints, hooks and\ncallbacks are available, and it renders under UserInterfaceWrapper."
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
type: "presentation",
|
|
221
|
+
create: createPresentation,
|
|
222
|
+
update: { kind: "unidentified", run: updatePresentation },
|
|
223
|
+
delete: { kind: "unidentified", run: deletePresentation },
|
|
224
|
+
updateSupportsPatch: true,
|
|
225
|
+
help: {
|
|
226
|
+
typeLabel: "presentation",
|
|
227
|
+
intro: "The facilitator's slide deck. It is read-only, renders with or without\na session, and exports to PDF, PowerPoint and PNG."
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
type: "scenario",
|
|
232
|
+
create: createScenario,
|
|
233
|
+
update: { kind: "identified", run: updateScenario },
|
|
234
|
+
delete: { kind: "identified", run: deleteScenario },
|
|
235
|
+
help: {
|
|
236
|
+
typeLabel: "scenario",
|
|
237
|
+
sampleId: "hard_mode",
|
|
238
|
+
patchExample: '[{"op":"replace","path":"/definition/locales/en/name","value":"Hard Mode v2"}]'
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
type: "guide",
|
|
243
|
+
create: createFacilitatorGuide,
|
|
244
|
+
update: { kind: "unidentified", run: updateFacilitatorGuide },
|
|
245
|
+
delete: { kind: "unidentified", run: deleteFacilitatorGuide },
|
|
246
|
+
updateSupportsPatch: true,
|
|
247
|
+
help: {
|
|
248
|
+
typeLabel: "facilitator guide",
|
|
249
|
+
patchExample: '[{"op":"replace","path":"/definition/locales/en/name","value":"Cheat sheet"}]',
|
|
250
|
+
deleteSummary: "Deletes the facilitator guide, including its content and assets."
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
type: "hook",
|
|
255
|
+
create: createHook,
|
|
256
|
+
update: { kind: "identified", run: updateHook },
|
|
257
|
+
delete: { kind: "identified", run: deleteHook },
|
|
258
|
+
help: {
|
|
259
|
+
typeLabel: "hook",
|
|
260
|
+
sampleId: "assignroles",
|
|
261
|
+
intro: "A hook reacts to an out-of-tick lifecycle signal (e.g. participantJoin).\nEach hook subscribes to exactly one signal and runs after the runtime\napplies the change."
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
type: "validator",
|
|
266
|
+
create: createValidator,
|
|
267
|
+
update: { kind: "identified", run: updateValidator },
|
|
268
|
+
delete: { kind: "identified", run: deleteValidator },
|
|
269
|
+
help: {
|
|
270
|
+
typeLabel: "validator",
|
|
271
|
+
sampleId: "decisionlimit",
|
|
272
|
+
intro: "A validator is a read-only check that runs on UI-submitted state\nmutations before they are applied. Validators reject-only; they never\nmodify the proposed state. A validator runs when a mutation changes a\ncapability it reads (one that reads nothing runs on every mutation), and\nevery failure is collected and returned to the UI."
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
type: "endpoint",
|
|
277
|
+
create: createEndpoint,
|
|
278
|
+
update: { kind: "identified", run: updateEndpoint },
|
|
279
|
+
delete: { kind: "identified", run: deleteEndpoint },
|
|
280
|
+
help: {
|
|
281
|
+
typeLabel: "endpoint",
|
|
282
|
+
article: "an",
|
|
283
|
+
sampleId: "summarise",
|
|
284
|
+
intro: "An endpoint is a named, server-side handler that user interfaces invoke\nby identifier. The author owns the request and response schemas; the UI\npasses structured parameters and receives a typed response. An endpoint\nthat declares writes may also change those capabilities, by returning\n{ response, capabilities }; it may invoke declared runtime callbacks\n(e.g. generateText, writeBlob).",
|
|
285
|
+
note: 'Note: The endpoint is declared by user interfaces that may call it:\n "endpoints": ["summarise"]',
|
|
286
|
+
deleteSummary: "Deletes the endpoint, deregisters it from the package, and removes\nreferences to it from user interfaces."
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
];
|
|
290
|
+
var RESOURCE_DESCRIPTORS_BY_TYPE = new Map(
|
|
291
|
+
RESOURCE_DESCRIPTORS.map((descriptor) => [descriptor.type, descriptor])
|
|
292
|
+
);
|
|
293
|
+
function supportedTypes(command) {
|
|
294
|
+
return RESOURCE_DESCRIPTORS.filter(
|
|
295
|
+
(descriptor) => command === "new" ? descriptor.create !== void 0 : command === "delete" ? descriptor.delete !== void 0 : true
|
|
296
|
+
).map((descriptor) => descriptor.type).join(", ");
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
export {
|
|
300
|
+
lazy,
|
|
301
|
+
RESOURCE_DESCRIPTORS,
|
|
302
|
+
RESOURCE_DESCRIPTORS_BY_TYPE,
|
|
303
|
+
supportedTypes
|
|
304
|
+
};
|