@crowdedkingdoms/crowdyjs 17.14.0-dev.1 → 18.0.0-dev.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/MIGRATION.md +92 -1
- package/README.md +93 -162
- package/dist/crowdy-client.d.ts +12 -31
- package/dist/crowdy-client.d.ts.map +1 -1
- package/dist/crowdy-client.js +15 -37
- package/dist/crowdy-dsh/bridge.d.ts.map +1 -1
- package/dist/crowdy-dsh/bridge.js +3 -6
- package/dist/crowdy-studio/controller.d.ts +34 -59
- package/dist/crowdy-studio/controller.d.ts.map +1 -1
- package/dist/crowdy-studio/controller.js +96 -225
- package/dist/crowdy-studio/diagnostics.d.ts +3 -12
- package/dist/crowdy-studio/diagnostics.d.ts.map +1 -1
- package/dist/crowdy-studio/dom-shell.d.ts +2 -4
- package/dist/crowdy-studio/dom-shell.d.ts.map +1 -1
- package/dist/crowdy-studio/dom-shell.js +16 -49
- package/dist/crowdy-studio/embed/hud-layer.d.ts +1 -2
- package/dist/crowdy-studio/embed/hud-layer.d.ts.map +1 -1
- package/dist/crowdy-studio/embed/panel.d.ts +3 -13
- package/dist/crowdy-studio/embed/panel.d.ts.map +1 -1
- package/dist/crowdy-studio/embed/panel.js +3 -6
- package/dist/crowdy-studio/index.d.ts +1 -3
- package/dist/crowdy-studio/index.d.ts.map +1 -1
- package/dist/crowdy-studio/index.js +0 -2
- package/dist/crowdy-studio/models.d.ts +3 -4
- package/dist/crowdy-studio/models.d.ts.map +1 -1
- package/dist/crowdy-studio/starter-projects.d.ts +8 -12
- package/dist/crowdy-studio/starter-projects.d.ts.map +1 -1
- package/dist/crowdy-studio/starter-projects.js +12 -103
- package/dist/domains/appAccess.d.ts +14 -1
- package/dist/domains/appAccess.d.ts.map +1 -1
- package/dist/domains/appAccess.js +37 -1
- package/dist/domains/host.d.ts +3 -3
- package/dist/domains/host.js +3 -3
- package/dist/domains/marketplace.d.ts +9 -70
- package/dist/domains/marketplace.d.ts.map +1 -1
- package/dist/domains/marketplace.js +9 -120
- package/dist/domains/playerWallet.d.ts +6 -12
- package/dist/domains/playerWallet.d.ts.map +1 -1
- package/dist/domains/playerWallet.js +6 -21
- package/dist/errors.d.ts +7 -13
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +6 -10
- package/dist/generated/graphql.d.ts +141 -7083
- package/dist/generated/graphql.d.ts.map +1 -1
- package/dist/generated/graphql.js +5 -313
- package/dist/grid-mods/exec-client-halves.d.ts +19 -3
- package/dist/grid-mods/exec-client-halves.d.ts.map +1 -1
- package/dist/grid-mods/exec-client-halves.js +17 -2
- package/dist/grid-mods/grid-host-calls.d.ts +29 -17
- package/dist/grid-mods/grid-host-calls.d.ts.map +1 -1
- package/dist/grid-mods/grid-host-calls.js +40 -46
- package/dist/grid-mods/mod-runtime.d.ts +18 -11
- package/dist/grid-mods/mod-runtime.d.ts.map +1 -1
- package/dist/grid-mods/mod-runtime.js +4 -2
- package/dist/grid-scope.d.ts +0 -189
- package/dist/grid-scope.d.ts.map +1 -1
- package/dist/grid-scope.js +0 -70
- package/dist/index.d.ts +11 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -16
- package/dist/kit/actions.d.ts +5 -9
- package/dist/kit/actions.d.ts.map +1 -1
- package/dist/kit/actions.js +5 -9
- package/dist/kit/index.d.ts +2 -33
- package/dist/kit/index.d.ts.map +1 -1
- package/dist/kit/index.js +1 -32
- package/dist/kit/kit.d.ts +8 -208
- package/dist/kit/kit.d.ts.map +1 -1
- package/dist/kit/kit.js +5 -163
- package/dist/kit/social.d.ts +1 -3
- package/dist/kit/social.d.ts.map +1 -1
- package/dist/kit/social.js +1 -3
- package/dist/kit/wire.d.ts +16 -5
- package/dist/kit/wire.d.ts.map +1 -1
- package/dist/kit/wire.js +19 -5
- package/dist/live-coding/assets/browser-authoring-index.json +1 -1
- package/dist/live-coding/assets/manifest.json +1 -1
- package/dist/live-coding/browser-authoring-index.generated.d.ts.map +1 -1
- package/dist/live-coding/browser-authoring-index.generated.js +1496 -4386
- package/dist/live-coding/rust-analysis.d.ts.map +1 -1
- package/dist/live-coding/rust-analysis.js +30 -34
- package/dist/player-runtime/client-host-calls.d.ts +8 -0
- package/dist/player-runtime/client-host-calls.d.ts.map +1 -0
- package/dist/player-runtime/client-host-calls.js +28 -0
- package/dist/player-runtime/glue-runtime.d.ts +24 -20
- package/dist/player-runtime/glue-runtime.d.ts.map +1 -1
- package/dist/player-runtime/glue-runtime.js +26 -55
- package/dist/player-runtime/glue-sab.d.ts +2 -2
- package/dist/player-runtime/glue-sab.js +2 -2
- package/dist/player-runtime/player-code-broker.d.ts +70 -43
- package/dist/player-runtime/player-code-broker.d.ts.map +1 -1
- package/dist/player-runtime/player-code-broker.js +159 -64
- package/dist/player-runtime/player-glue-worker.d.ts +8 -9
- package/dist/player-runtime/player-glue-worker.d.ts.map +1 -1
- package/dist/player-runtime/player-glue-worker.js +26 -11
- package/dist/stores/inbox.d.ts +1 -1
- package/dist/stores/inbox.d.ts.map +1 -1
- package/dist/stores/index.d.ts +0 -11
- package/dist/stores/index.d.ts.map +1 -1
- package/dist/stores/index.js +0 -4
- package/dist/stores/session.d.ts +0 -2
- package/dist/stores/session.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/crowdy-studio/model-lint-log.d.ts +0 -76
- package/dist/crowdy-studio/model-lint-log.d.ts.map +0 -1
- package/dist/crowdy-studio/model-lint-log.js +0 -93
- package/dist/crowdy-studio/model-lint.d.ts +0 -61
- package/dist/crowdy-studio/model-lint.d.ts.map +0 -1
- package/dist/crowdy-studio/model-lint.js +0 -45
- package/dist/domains/compute.d.ts +0 -208
- package/dist/domains/compute.d.ts.map +0 -1
- package/dist/domains/compute.js +0 -274
- package/dist/domains/controlPlane.d.ts +0 -38
- package/dist/domains/controlPlane.d.ts.map +0 -1
- package/dist/domains/controlPlane.js +0 -43
- package/dist/domains/gameModel.d.ts +0 -1174
- package/dist/domains/gameModel.d.ts.map +0 -1
- package/dist/domains/gameModel.js +0 -1333
- package/dist/domains/playerCompute.d.ts +0 -91
- package/dist/domains/playerCompute.d.ts.map +0 -1
- package/dist/domains/playerCompute.js +0 -136
- package/dist/domains/playerModel.d.ts +0 -20
- package/dist/domains/playerModel.d.ts.map +0 -1
- package/dist/domains/playerModel.js +0 -54
- package/dist/kit/abilities.d.ts +0 -66
- package/dist/kit/abilities.d.ts.map +0 -1
- package/dist/kit/abilities.js +0 -71
- package/dist/kit/blueprints/combat.d.ts +0 -81
- package/dist/kit/blueprints/combat.d.ts.map +0 -1
- package/dist/kit/blueprints/combat.js +0 -357
- package/dist/kit/blueprints/core.d.ts +0 -222
- package/dist/kit/blueprints/core.d.ts.map +0 -1
- package/dist/kit/blueprints/core.js +0 -185
- package/dist/kit/blueprints/decks.d.ts +0 -50
- package/dist/kit/blueprints/decks.d.ts.map +0 -1
- package/dist/kit/blueprints/decks.js +0 -163
- package/dist/kit/blueprints/economy.d.ts +0 -88
- package/dist/kit/blueprints/economy.d.ts.map +0 -1
- package/dist/kit/blueprints/economy.js +0 -533
- package/dist/kit/blueprints/guild.d.ts +0 -51
- package/dist/kit/blueprints/guild.d.ts.map +0 -1
- package/dist/kit/blueprints/guild.js +0 -50
- package/dist/kit/blueprints/index.d.ts +0 -23
- package/dist/kit/blueprints/index.d.ts.map +0 -1
- package/dist/kit/blueprints/index.js +0 -22
- package/dist/kit/blueprints/inventory.d.ts +0 -84
- package/dist/kit/blueprints/inventory.d.ts.map +0 -1
- package/dist/kit/blueprints/inventory.js +0 -257
- package/dist/kit/blueprints/leaderboards.d.ts +0 -49
- package/dist/kit/blueprints/leaderboards.d.ts.map +0 -1
- package/dist/kit/blueprints/leaderboards.js +0 -126
- package/dist/kit/blueprints/liveops.d.ts +0 -42
- package/dist/kit/blueprints/liveops.d.ts.map +0 -1
- package/dist/kit/blueprints/liveops.js +0 -170
- package/dist/kit/blueprints/locks.d.ts +0 -82
- package/dist/kit/blueprints/locks.d.ts.map +0 -1
- package/dist/kit/blueprints/locks.js +0 -155
- package/dist/kit/blueprints/loot.d.ts +0 -90
- package/dist/kit/blueprints/loot.d.ts.map +0 -1
- package/dist/kit/blueprints/loot.js +0 -229
- package/dist/kit/blueprints/matches.d.ts +0 -84
- package/dist/kit/blueprints/matches.d.ts.map +0 -1
- package/dist/kit/blueprints/matches.js +0 -349
- package/dist/kit/blueprints/moderation.d.ts +0 -32
- package/dist/kit/blueprints/moderation.d.ts.map +0 -1
- package/dist/kit/blueprints/moderation.js +0 -140
- package/dist/kit/blueprints/npcs.d.ts +0 -78
- package/dist/kit/blueprints/npcs.d.ts.map +0 -1
- package/dist/kit/blueprints/npcs.js +0 -125
- package/dist/kit/blueprints/plots.d.ts +0 -63
- package/dist/kit/blueprints/plots.d.ts.map +0 -1
- package/dist/kit/blueprints/plots.js +0 -151
- package/dist/kit/blueprints/progression.d.ts +0 -68
- package/dist/kit/blueprints/progression.d.ts.map +0 -1
- package/dist/kit/blueprints/progression.js +0 -324
- package/dist/kit/blueprints/quests.d.ts +0 -72
- package/dist/kit/blueprints/quests.d.ts.map +0 -1
- package/dist/kit/blueprints/quests.js +0 -285
- package/dist/kit/blueprints/worldsim.d.ts +0 -91
- package/dist/kit/blueprints/worldsim.d.ts.map +0 -1
- package/dist/kit/blueprints/worldsim.js +0 -468
- package/dist/kit/combat.d.ts +0 -141
- package/dist/kit/combat.d.ts.map +0 -1
- package/dist/kit/combat.js +0 -196
- package/dist/kit/decks.d.ts +0 -157
- package/dist/kit/decks.d.ts.map +0 -1
- package/dist/kit/decks.js +0 -186
- package/dist/kit/director.d.ts +0 -88
- package/dist/kit/director.d.ts.map +0 -1
- package/dist/kit/director.js +0 -86
- package/dist/kit/economy.d.ts +0 -289
- package/dist/kit/economy.d.ts.map +0 -1
- package/dist/kit/economy.js +0 -427
- package/dist/kit/engine.d.ts +0 -48
- package/dist/kit/engine.d.ts.map +0 -1
- package/dist/kit/engine.js +0 -113
- package/dist/kit/features.d.ts +0 -60
- package/dist/kit/features.d.ts.map +0 -1
- package/dist/kit/features.js +0 -65
- package/dist/kit/instances.d.ts +0 -52
- package/dist/kit/instances.d.ts.map +0 -1
- package/dist/kit/instances.js +0 -60
- package/dist/kit/inventory.d.ts +0 -129
- package/dist/kit/inventory.d.ts.map +0 -1
- package/dist/kit/inventory.js +0 -200
- package/dist/kit/leaderboards.d.ts +0 -86
- package/dist/kit/leaderboards.d.ts.map +0 -1
- package/dist/kit/leaderboards.js +0 -133
- package/dist/kit/liveops.d.ts +0 -112
- package/dist/kit/liveops.d.ts.map +0 -1
- package/dist/kit/liveops.js +0 -183
- package/dist/kit/loot.d.ts +0 -128
- package/dist/kit/loot.d.ts.map +0 -1
- package/dist/kit/loot.js +0 -160
- package/dist/kit/matches.d.ts +0 -301
- package/dist/kit/matches.d.ts.map +0 -1
- package/dist/kit/matches.js +0 -458
- package/dist/kit/matchmaking.d.ts +0 -57
- package/dist/kit/matchmaking.d.ts.map +0 -1
- package/dist/kit/matchmaking.js +0 -59
- package/dist/kit/minigames.d.ts +0 -30
- package/dist/kit/minigames.d.ts.map +0 -1
- package/dist/kit/minigames.js +0 -38
- package/dist/kit/mobs.d.ts +0 -90
- package/dist/kit/mobs.d.ts.map +0 -1
- package/dist/kit/mobs.js +0 -98
- package/dist/kit/moderation.d.ts +0 -73
- package/dist/kit/moderation.d.ts.map +0 -1
- package/dist/kit/moderation.js +0 -103
- package/dist/kit/movement.d.ts +0 -78
- package/dist/kit/movement.d.ts.map +0 -1
- package/dist/kit/movement.js +0 -103
- package/dist/kit/notifications.d.ts +0 -45
- package/dist/kit/notifications.d.ts.map +0 -1
- package/dist/kit/notifications.js +0 -67
- package/dist/kit/npcs.d.ts +0 -226
- package/dist/kit/npcs.d.ts.map +0 -1
- package/dist/kit/npcs.js +0 -141
- package/dist/kit/objects.d.ts +0 -116
- package/dist/kit/objects.d.ts.map +0 -1
- package/dist/kit/objects.js +0 -119
- package/dist/kit/pets.d.ts +0 -85
- package/dist/kit/pets.d.ts.map +0 -1
- package/dist/kit/pets.js +0 -96
- package/dist/kit/plots.d.ts +0 -85
- package/dist/kit/plots.d.ts.map +0 -1
- package/dist/kit/plots.js +0 -113
- package/dist/kit/progression.d.ts +0 -181
- package/dist/kit/progression.d.ts.map +0 -1
- package/dist/kit/progression.js +0 -265
- package/dist/kit/quests.d.ts +0 -171
- package/dist/kit/quests.d.ts.map +0 -1
- package/dist/kit/quests.js +0 -237
- package/dist/kit/racing.d.ts +0 -85
- package/dist/kit/racing.d.ts.map +0 -1
- package/dist/kit/racing.js +0 -99
- package/dist/kit/shared.d.ts +0 -73
- package/dist/kit/shared.d.ts.map +0 -1
- package/dist/kit/shared.js +0 -101
- package/dist/kit/telemetry.d.ts +0 -66
- package/dist/kit/telemetry.d.ts.map +0 -1
- package/dist/kit/telemetry.js +0 -133
- package/dist/kit/territory.d.ts +0 -97
- package/dist/kit/territory.d.ts.map +0 -1
- package/dist/kit/territory.js +0 -114
- package/dist/kit/worldsim.d.ts +0 -263
- package/dist/kit/worldsim.d.ts.map +0 -1
- package/dist/kit/worldsim.js +0 -268
- package/dist/stores/model.d.ts +0 -81
- package/dist/stores/model.d.ts.map +0 -1
- package/dist/stores/model.js +0 -163
|
@@ -97,7 +97,6 @@ export class CrowdyStudioDomShell {
|
|
|
97
97
|
this.problemsPanel = this.createPanel('problems', 'Problems', panelTabs);
|
|
98
98
|
this.buildPanel = this.createPanel('build', 'Build', panelTabs);
|
|
99
99
|
this.logsPanel = this.createPanel('logs', 'Logs', panelTabs);
|
|
100
|
-
this.runsPanel = this.createPanel('runs', 'Runs', panelTabs);
|
|
101
100
|
this.invokePanel = this.createPanel('invoke', 'Invoke', panelTabs);
|
|
102
101
|
const hidePanel = button('×');
|
|
103
102
|
hidePanel.className = 'ck-crowdy-studio-panel-hide';
|
|
@@ -116,12 +115,7 @@ export class CrowdyStudioDomShell {
|
|
|
116
115
|
this.settingsDescription = input('Description');
|
|
117
116
|
this.serverModuleName = input('Server module name');
|
|
118
117
|
this.clientModuleName = input('Client module name');
|
|
119
|
-
this.
|
|
120
|
-
['NONE', 'No pairing'],
|
|
121
|
-
['OPTIONAL', 'Optional companion'],
|
|
122
|
-
['REQUIRED', 'Require client companion'],
|
|
123
|
-
]);
|
|
124
|
-
this.settings.append(settingsTitle, labeled('Name', this.settingsName), labeled('Description', this.settingsDescription), labeled('Server module', this.serverModuleName), labeled('Client module', this.clientModuleName), labeled('Pairing', this.pairing));
|
|
118
|
+
this.settings.append(settingsTitle, labeled('Name', this.settingsName), labeled('Description', this.settingsDescription), labeled('Server module', this.serverModuleName), labeled('Client module', this.clientModuleName));
|
|
125
119
|
// ----- GitHub repository card -------------------------------------------
|
|
126
120
|
// Bring-your-own repo, never required. The repository is resolved
|
|
127
121
|
// server-side from the project's bind; the card never learns a token.
|
|
@@ -273,14 +267,12 @@ export class CrowdyStudioDomShell {
|
|
|
273
267
|
this.clientModuleName.addEventListener('change', () => this.controller.updateSettings({
|
|
274
268
|
clientModuleName: this.clientModuleName.value,
|
|
275
269
|
}));
|
|
276
|
-
this.
|
|
277
|
-
|
|
278
|
-
this.invokeExport = input(onMod ? 'Endpoint' : 'Export name');
|
|
279
|
-
this.invokeExport.value = onMod ? 'state' : 'invoke';
|
|
270
|
+
this.invokeExport = input('Endpoint');
|
|
271
|
+
this.invokeExport.value = 'state';
|
|
280
272
|
this.invokeParams = document.createElement('textarea');
|
|
281
273
|
this.invokeParams.placeholder = '{"example": true}';
|
|
282
|
-
this.invokeParams.setAttribute('aria-label',
|
|
283
|
-
const invokeButton = button(
|
|
274
|
+
this.invokeParams.setAttribute('aria-label', 'Call arguments (JSON)');
|
|
275
|
+
const invokeButton = button('Call mod endpoint');
|
|
284
276
|
this.invokeResult = document.createElement('pre');
|
|
285
277
|
const invokeControls = element('div', 'ck-crowdy-studio-invoke');
|
|
286
278
|
invokeControls.append(this.invokeExport, this.invokeParams, invokeButton);
|
|
@@ -310,10 +302,7 @@ export class CrowdyStudioDomShell {
|
|
|
310
302
|
this.deployAction.disabled = !projectTargetsAvailable;
|
|
311
303
|
this.renderProblems(state);
|
|
312
304
|
this.renderBuild(state);
|
|
313
|
-
this.
|
|
314
|
-
this.renderRuntimeRows(this.runsPanel, state.runs, state.serverEngine === 'ck-exec'
|
|
315
|
-
? 'A mod keeps no run records; its log lines are under Logs.'
|
|
316
|
-
: undefined);
|
|
305
|
+
this.renderLogLines(this.logsPanel, state.logs);
|
|
317
306
|
this.invokeResult.textContent = state.invokeResult
|
|
318
307
|
? formatInvokeResult(state.invokeResult)
|
|
319
308
|
: '';
|
|
@@ -331,7 +320,6 @@ export class CrowdyStudioDomShell {
|
|
|
331
320
|
this.disposed = true;
|
|
332
321
|
this.controller.setSurfaceVisible('usage', false);
|
|
333
322
|
this.controller.setSurfaceVisible('logs', false);
|
|
334
|
-
this.controller.setSurfaceVisible('runs', false);
|
|
335
323
|
this.unsubscribeLayout();
|
|
336
324
|
for (const splitter of this.splitters.values())
|
|
337
325
|
splitter.dispose();
|
|
@@ -527,12 +515,9 @@ export class CrowdyStudioDomShell {
|
|
|
527
515
|
}
|
|
528
516
|
this.syncPanelPolling();
|
|
529
517
|
}
|
|
530
|
-
/** Poll logs
|
|
518
|
+
/** Poll logs only while their panel is both selected and shown. */
|
|
531
519
|
syncPanelPolling() {
|
|
532
|
-
|
|
533
|
-
for (const surface of ['logs', 'runs']) {
|
|
534
|
-
this.controller.setSurfaceVisible(surface, bottomVisible && this.activePanel === surface);
|
|
535
|
-
}
|
|
520
|
+
this.controller.setSurfaceVisible('logs', this.layout.isVisible('bottom') && this.activePanel === 'logs');
|
|
536
521
|
}
|
|
537
522
|
// ----- Rendering -----------------------------------------------------------
|
|
538
523
|
renderProjects(state) {
|
|
@@ -891,7 +876,6 @@ export class CrowdyStudioDomShell {
|
|
|
891
876
|
this.settingsDescription,
|
|
892
877
|
this.serverModuleName,
|
|
893
878
|
this.clientModuleName,
|
|
894
|
-
this.pairing,
|
|
895
879
|
]) {
|
|
896
880
|
control.disabled = disabled;
|
|
897
881
|
}
|
|
@@ -903,10 +887,6 @@ export class CrowdyStudioDomShell {
|
|
|
903
887
|
setInputUnlessFocused(this.clientModuleName, project.metadata.clientModuleName ?? '');
|
|
904
888
|
this.serverModuleName.disabled = !projectTargets(project.kind).includes('SERVER');
|
|
905
889
|
this.clientModuleName.disabled = !projectTargets(project.kind).includes('CLIENT');
|
|
906
|
-
// A mod has no pairing: its CLIENT half rides it.
|
|
907
|
-
this.pairing.disabled =
|
|
908
|
-
project.kind !== 'FULL_STACK' || state.serverEngine === 'ck-exec';
|
|
909
|
-
this.pairing.value = project.metadata.pairingPreference;
|
|
910
890
|
}
|
|
911
891
|
renderProblems(state) {
|
|
912
892
|
this.problemsPanel.replaceChildren();
|
|
@@ -964,17 +944,16 @@ export class CrowdyStudioDomShell {
|
|
|
964
944
|
output.textContent = state.buildOutput || 'No build has run.';
|
|
965
945
|
this.buildPanel.append(output);
|
|
966
946
|
}
|
|
967
|
-
|
|
947
|
+
renderLogLines(panel, lines) {
|
|
968
948
|
panel.replaceChildren();
|
|
969
|
-
if (
|
|
970
|
-
panel.append(empty(
|
|
949
|
+
if (lines.length === 0) {
|
|
950
|
+
panel.append(empty('No log lines.'));
|
|
971
951
|
return;
|
|
972
952
|
}
|
|
973
|
-
for (const
|
|
953
|
+
for (const entry of lines) {
|
|
974
954
|
const line = document.createElement('pre');
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
: `${row.success ? '✓' : '✗'} ${row.startedAt} ${row.moduleName} ${row.triggerSource} · ${row.durationUs}µs · ${row.fuelUsed} fuel${row.errorMessage ? `\n${row.errorMessage}` : ''}`;
|
|
955
|
+
const where = entry.source === 'preview' ? ' (preview in this browser)' : '';
|
|
956
|
+
line.textContent = `${entry.level === 'error' ? '✗' : '·'} ${entry.at} ${entry.moduleName}${where} ${entry.level}\n${entry.text}`;
|
|
978
957
|
panel.append(line);
|
|
979
958
|
}
|
|
980
959
|
}
|
|
@@ -989,22 +968,10 @@ export class CrowdyStudioDomShell {
|
|
|
989
968
|
}
|
|
990
969
|
}
|
|
991
970
|
function budgetText(state) {
|
|
992
|
-
|
|
993
|
-
? `units ${state.usage.hourUnitsUsed}/${state.usage.unitsPerHour ?? '∞'} · compiles ${state.usage.compilesThisHour}/${state.usage.maxCompilesPerHour}`
|
|
994
|
-
: '';
|
|
995
|
-
const wallet = state.wallet
|
|
996
|
-
? `wallet ${state.wallet.balanceCents} ${state.wallet.currency}`
|
|
997
|
-
: '';
|
|
998
|
-
return [usage, wallet].filter(Boolean).join(' · ');
|
|
971
|
+
return state.wallet ? `wallet ${state.wallet.balanceCents} ${state.wallet.currency}` : '';
|
|
999
972
|
}
|
|
1000
973
|
function formatInvokeResult(result) {
|
|
1001
|
-
return
|
|
1002
|
-
result.resultJson ?? result.resultBase64 ?? '(empty result)',
|
|
1003
|
-
result.fuelUsed ? `${result.fuelUsed} fuel` : '',
|
|
1004
|
-
result.durationUs !== undefined ? `${result.durationUs}µs` : '',
|
|
1005
|
-
]
|
|
1006
|
-
.filter(Boolean)
|
|
1007
|
-
.join('\n');
|
|
974
|
+
return `${result.resultJson}\n${result.durationUs}µs`;
|
|
1008
975
|
}
|
|
1009
976
|
function sameRef(a, b) {
|
|
1010
977
|
return (a.source === b.source &&
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* A persistent, game-owned HUD layer for CLIENT mods (ck-exec CLIENT halves
|
|
3
|
-
* and legacy player-compute CLIENT modules). A
|
|
2
|
+
* A persistent, game-owned HUD layer for CLIENT mods (ck-exec CLIENT halves). A
|
|
4
3
|
* running client mod never touches the game DOM; it emits `hud_set` payloads
|
|
5
4
|
* that the broker forwards here. This layer lives outside the studio panel so
|
|
6
5
|
* a mod's HUD survives panel re-renders and keeps rendering after the coding
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hud-layer.d.ts","sourceRoot":"","sources":["../../../src/crowdy-studio/embed/hud-layer.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"hud-layer.d.ts","sourceRoot":"","sources":["../../../src/crowdy-studio/embed/hud-layer.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,MAAM,WAAW,oBAAoB;IACnC,+EAA+E;IAC/E,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,IAAI,CAA+B;IAC3C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA2C;IACnE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAkC;IAE3D,OAAO,CAAC,UAAU;IAUlB,+DAA+D;IAC/D,GAAG,CAAC,KAAK,EAAE,oBAAoB,GAAG,IAAI;IAKtC,oEAAoE;IACpE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAI5B,KAAK,IAAI,IAAI;IAKb;;;;OAIG;IACH,YAAY,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI;IAShE,OAAO,IAAI,IAAI;IAQf,OAAO,CAAC,MAAM;IAYd,OAAO,CAAC,aAAa;IAerB,OAAO,CAAC,SAAS;IAajB,mEAAmE;IACnE,OAAO,CAAC,QAAQ;CAQjB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type MountCrowdyStudioDshOptions, type MountCrowdyStudioOptions } from '../mount.js';
|
|
2
2
|
import type { CrowdyStudioDshPane } from '../../crowdy-dsh/pane.js';
|
|
3
3
|
import type { CrowdyStudioDshHost } from '../../crowdy-dsh/bridge.js';
|
|
4
|
-
import type { CrowdyStudioController, CrowdyStudioMods,
|
|
4
|
+
import type { CrowdyStudioController, CrowdyStudioMods, CrowdyStudioPlayerWallet } from '../controller.js';
|
|
5
5
|
import type { CrowdyStudioProjectProvider } from '../models.js';
|
|
6
6
|
import type { CrowdyStudioGitHubTransport } from '../github/transport.js';
|
|
7
7
|
import type { PlayerHostAdapterV1 } from '../../player-host/index.js';
|
|
@@ -15,12 +15,11 @@ export type CrowdyStudioEmbedDisplayMode = 'docked' | 'fullscreen';
|
|
|
15
15
|
*/
|
|
16
16
|
export interface CrowdyStudioEmbedServices {
|
|
17
17
|
crowdyStudio: CrowdyStudioProjectProvider;
|
|
18
|
-
|
|
18
|
+
/** ck-exec mods and their CLIENT halves, what runs a project. `CrowdyClient` provides it. */
|
|
19
|
+
exec: CrowdyStudioMods;
|
|
19
20
|
playerWallet?: CrowdyStudioPlayerWallet;
|
|
20
21
|
/** GitHub repository loop; omission hides the card. `CrowdyClient` provides it. */
|
|
21
22
|
crowdyStudioGitHub?: CrowdyStudioGitHubTransport;
|
|
22
|
-
/** ck-exec, the default engine for both targets when present. `CrowdyClient` provides it. */
|
|
23
|
-
exec?: CrowdyStudioMods;
|
|
24
23
|
}
|
|
25
24
|
export interface CrowdyStudioEmbedTargetPermission {
|
|
26
25
|
canWrite: boolean;
|
|
@@ -69,15 +68,6 @@ export interface CrowdyStudioEmbedOptions {
|
|
|
69
68
|
* the project provider commits them.
|
|
70
69
|
*/
|
|
71
70
|
github?: CrowdyStudioGitHubTransport;
|
|
72
|
-
/**
|
|
73
|
-
* What runs the project: a ck-exec mod on the grid, built from the project's `ckx-sdk`
|
|
74
|
-
* crate, with the CLIENT target as its `crowdy-client-sdk` CLIENT half (`client.exec`), or
|
|
75
|
-
* legacy player compute for both targets, which the platform is switching off. Defaults to
|
|
76
|
-
* `'ck-exec'` when the client has `exec` (every `CrowdyClient` does), else
|
|
77
|
-
* `'player-compute'`. Pass `'player-compute'` to stay on the legacy engine until 18.0
|
|
78
|
-
* removes it.
|
|
79
|
-
*/
|
|
80
|
-
serverEngine?: CrowdyStudioServerEngine;
|
|
81
71
|
/**
|
|
82
72
|
* Suppress gameplay input and return a restoration callback. Used only by
|
|
83
73
|
* the narrow-screen modal; the desktop dock remains non-modal.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../../src/crowdy-studio/embed/panel.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC9B,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EACV,sBAAsB,EACtB,gBAAgB,EAChB,
|
|
1
|
+
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../../src/crowdy-studio/embed/panel.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC9B,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EACV,sBAAsB,EACtB,gBAAgB,EAChB,wBAAwB,EACzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EACV,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAKL,KAAK,4BAA4B,EAClC,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAO1D,MAAM,MAAM,4BAA4B,GAAG,QAAQ,GAAG,YAAY,CAAC;AAEnE;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC,YAAY,EAAE,2BAA2B,CAAC;IAC1C,6FAA6F;IAC7F,IAAI,EAAE,gBAAgB,CAAC;IACvB,Y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B;CACH;AAED,2DAA2D;AAC3D,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,wBAAwB,GAChC,iBAAiB,CAEnB"}
|
|
@@ -359,15 +359,12 @@ export class CrowdyStudioEmbed {
|
|
|
359
359
|
});
|
|
360
360
|
}
|
|
361
361
|
: undefined);
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
throw new Error("serverEngine 'ck-exec' needs the client's exec domain");
|
|
362
|
+
if (!client.exec) {
|
|
363
|
+
throw new Error("Crowdy Studio needs the client's exec domain (ck-exec mods)");
|
|
365
364
|
}
|
|
366
365
|
const handle = await mountCrowdyStudio(element, {
|
|
367
366
|
projectProvider: client.crowdyStudio,
|
|
368
|
-
|
|
369
|
-
serverEngine,
|
|
370
|
-
...(serverEngine === 'ck-exec' ? { mods: client.exec } : {}),
|
|
367
|
+
mods: client.exec,
|
|
371
368
|
...((this.options.github ?? client.crowdyStudioGitHub)
|
|
372
369
|
? { github: this.options.github ?? client.crowdyStudioGitHub }
|
|
373
370
|
: {}),
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
export { CrowdyStudioController, type CrowdyStudioControllerOptions, type CrowdyStudioBroker, type CrowdyStudioAgentWorkContext, type CrowdyStudioDeploymentPlan, type CrowdyStudioDeployResult, type CrowdyStudioInvokeResult, type CrowdyStudioPhase, type CrowdyStudioPolledSurface, type
|
|
1
|
+
export { CrowdyStudioController, type CrowdyStudioControllerOptions, type CrowdyStudioBroker, type CrowdyStudioAgentWorkContext, type CrowdyStudioDeploymentPlan, type CrowdyStudioDeployResult, type CrowdyStudioInvokeResult, type CrowdyStudioPhase, type CrowdyStudioPolledSurface, type CrowdyStudioLogLine, type CrowdyStudioRuntimeStatus, type CrowdyStudioRuntimeSync, type CrowdyStudioRuntimeSyncState, type CrowdyStudioLogLevel, type CrowdyStudioMods, type CrowdyStudioPlayerWallet, type CrowdyStudioState, type CrowdyStudioStopResult, type CrowdyStudioWalletSnapshot, } from './controller.js';
|
|
2
2
|
export { mountCrowdyStudio, type CrowdyStudioHandle, type MountCrowdyStudioDshOptions, type MountCrowdyStudioOptions, } from './mount.js';
|
|
3
3
|
export { CrowdyStudioOfflineError, CrowdyStudioRevisionConflictError, cloneCrowdyStudioProject, crowdyStudioFileKey, crowdyStudioFileUri, normalizeCrowdyStudioPath, projectTargets, type CreateCrowdyStudioProjectInput, type ImportCrowdyStudioReferenceFileInput, type CrowdyStudioAtomicFileChange, type CrowdyStudioAtomicPatchInput, type CrowdyStudioAtomicPatchResult, type CrowdyStudioCheckpointFile, type CrowdyStudioCheckpointMetadata, type CrowdyStudioCheckpointRestoreInput, type CrowdyStudioCheckpointRestoreResult, type CrowdyStudioFileRef, type CrowdyStudioPairingPreference, type CrowdyStudioProject, type CrowdyStudioProjectFile, type CrowdyStudioProjectKind, type CrowdyStudioProjectMetadata, type CrowdyStudioProjectProvider, type CrowdyStudioProjectRevision, type CrowdyStudioProjectScope, type CrowdyStudioProjectSummary, type CrowdyStudioReferenceFile, type CrowdyStudioSaveState, type CrowdyStudioSynchronizationProvider, type CrowdyStudioProjectSynchronization, type CrowdyStudioPatchOperation, type CrowdyStudioTarget, type SaveCrowdyStudioLibraryFileInput, type SaveCrowdyStudioProjectInput, } from './models.js';
|
|
4
4
|
export { createCrowdyStudioStarterProject, type CrowdyStudioModStarter, type CrowdyStudioNewProjectOptions, } from './starter-projects.js';
|
|
5
5
|
export { DEFAULT_CLIENT_TICK_INTERVAL_MS, MAX_CLIENT_TICK_INTERVAL_MS, MIN_CLIENT_TICK_INTERVAL_MS, parseClientTickIntervalMs, } from './client-tick-interval.js';
|
|
6
6
|
export { parseRustcDiagnostics, type CrowdyStudioDiagnostic, type CrowdyStudioDiagnosticSeverity, type CrowdyStudioDiagnosticSource, } from './diagnostics.js';
|
|
7
|
-
export { MODEL_LINT_QUERY, modelLintDiagnostics, modelLintSubjectPath, type CrowdyModelLintFinding, type CrowdyModelLintResult, } from './model-lint.js';
|
|
8
|
-
export { CrowdyModelLintLog, MODEL_REFUSAL_CODES, modelRefusalFrom, type CrowdyModelRefusal, } from './model-lint-log.js';
|
|
9
7
|
export { isCurrentDiagnosticVersion, type MonacoCrowdyStudioEditorOptions, } from './monaco-editor.js';
|
|
10
8
|
export { EMBEDDED_PLATFORM_INDEX, MAX_PLATFORM_CRATES, MAX_PLATFORM_CRATE_FIELD_LENGTH, MAX_PLATFORM_INDEX_BYTES, computePlatformIndexContentHash, loadPlatformIndex, type PlatformCrate, type PlatformIndex, type PlatformSymbol, type PlatformSymbolKind, } from '../live-coding/platform-index.js';
|
|
11
9
|
export { DEFAULT_VFS_LIMITS, VfsLimitError, VirtualFileSystem, offsetAt, type VirtualDocument, type VirtualFileSystemLimits, } from '../live-coding/vfs.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/crowdy-studio/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,KAAK,6BAA6B,EAClC,KAAK,kBAAkB,EACvB,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/crowdy-studio/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,KAAK,6BAA6B,EAClC,KAAK,kBAAkB,EACvB,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,4BAA4B,EACjC,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KA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5B,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,+BAA+B,EAC/B,wBAAwB,EACxB,+BAA+B,EAC/B,iBAAiB,EACjB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,kBAAkB,GACxB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,QAAQ,EACR,KAAK,eAAe,EACpB,KAAK,uBAAuB,GAC7B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,+BAA+B,EAC/B,KAAK,kBAAkB,EACvB,KAAK,2BAA2B,GACjC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,yBAAyB,EACzB,eAAe,EACf,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,EACnB,KAAK,6BAA6B,EAClC,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,mBAAmB,GACzB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,kBAAkB,EAClB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,GACvB,MAAM,eAAe,CAAC;AACvB,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC"}
|
|
@@ -4,8 +4,6 @@ export { CrowdyStudioOfflineError, CrowdyStudioRevisionConflictError, cloneCrowd
|
|
|
4
4
|
export { createCrowdyStudioStarterProject, } from './starter-projects.js';
|
|
5
5
|
export { DEFAULT_CLIENT_TICK_INTERVAL_MS, MAX_CLIENT_TICK_INTERVAL_MS, MIN_CLIENT_TICK_INTERVAL_MS, parseClientTickIntervalMs, } from './client-tick-interval.js';
|
|
6
6
|
export { parseRustcDiagnostics, } from './diagnostics.js';
|
|
7
|
-
export { MODEL_LINT_QUERY, modelLintDiagnostics, modelLintSubjectPath, } from './model-lint.js';
|
|
8
|
-
export { CrowdyModelLintLog, MODEL_REFUSAL_CODES, modelRefusalFrom, } from './model-lint-log.js';
|
|
9
7
|
export { isCurrentDiagnosticVersion, } from './monaco-editor.js';
|
|
10
8
|
export { EMBEDDED_PLATFORM_INDEX, MAX_PLATFORM_CRATES, MAX_PLATFORM_CRATE_FIELD_LENGTH, MAX_PLATFORM_INDEX_BYTES, computePlatformIndexContentHash, loadPlatformIndex, } from '../live-coding/platform-index.js';
|
|
11
9
|
export { DEFAULT_VFS_LIMITS, VfsLimitError, VirtualFileSystem, offsetAt, } from '../live-coding/vfs.js';
|
|
@@ -3,10 +3,9 @@ export type CrowdyStudioTarget = 'SERVER' | 'CLIENT';
|
|
|
3
3
|
/** The target layout selected when a project is created. */
|
|
4
4
|
export type CrowdyStudioProjectKind = 'SERVER' | 'CLIENT' | 'FULL_STACK';
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* `REQUIRED`
|
|
9
|
-
* compile successfully. A ck-exec mod has no pairing: players call it by name.
|
|
6
|
+
* The pairing a project records (the API's field). A ck-exec mod has no pairing: its CLIENT
|
|
7
|
+
* half rides it and players call it by name, so Crowdy Studio creates projects with `NONE`, and
|
|
8
|
+
* `OPTIONAL` or `REQUIRED` on an older project changes nothing.
|
|
10
9
|
*/
|
|
11
10
|
export type CrowdyStudioPairingPreference = 'NONE' | 'OPTIONAL' | 'REQUIRED';
|
|
12
11
|
/** A source file in one project target. Paths are relative to that target. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/crowdy-studio/models.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAErD,4DAA4D;AAC5D,MAAM,MAAM,uBAAuB,GAAG,QAAQ,GAAG,QAAQ,GAAG,YAAY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AC;CAC7C;AAED,6EAA6E;AAC7E,qBAAa,iCAAkC,SAAQ,KAAK;IAKxD,QAAQ,CAAC,aAAa,CAAC,EAAE,mBAAmB;IAJ9C,QAAQ,CAAC,IAAI,+BAA+B;gBAG1C,OAAO,SAA2C,EACzC,aAAa,CAAC,EAAE,mBAAmB,YAAA;CAK/C;AAED,8EAA8E;AAC9E,qBAAa,wBAAyB,SAAQ,KAAK;IACjD,QAAQ,CAAC,IAAI,qBAAqB;IAClC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;gBAEb,OAAO,SAAmC,EAAE,KAAK,CAAC,EAAE,OAAO;CAKxE;AAED,6DAA6D;AAC7D,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAa9D;AAED,yDAAyD;AACzD,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,kBAAkB,EAC1B,IAAI,EAAE,MAAM,GACX,MAAM,CAER;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,kBAAkB,EAC1B,IAAI,EAAE,MAAM,GACX,MAAM,CAOR;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,uBAAuB,GAAG,kBAAkB,EAAE,CAIlF;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,mBAAmB,GAAG,mBAAmB,CAQ1F"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { CrowdyStudioServerEngine } from './controller.js';
|
|
2
1
|
import { type CreateCrowdyStudioProjectInput, type CrowdyStudioProjectKind } from './models.js';
|
|
3
2
|
/** ck-exec's mod starter crate (`client.exec.modStarter(appId)`). */
|
|
4
3
|
export interface CrowdyStudioModStarter {
|
|
@@ -15,19 +14,16 @@ export interface CrowdyStudioNewProjectOptions {
|
|
|
15
14
|
kind: CrowdyStudioProjectKind;
|
|
16
15
|
description?: string;
|
|
17
16
|
/**
|
|
18
|
-
* The SERVER target
|
|
19
|
-
*
|
|
20
|
-
* client pairing, so a full-stack project records `NONE`.
|
|
17
|
+
* The SERVER target's crate, its package named for the project; required when the kind
|
|
18
|
+
* has a SERVER target.
|
|
21
19
|
*/
|
|
22
20
|
modStarter?: CrowdyStudioModStarter;
|
|
23
|
-
/**
|
|
24
|
-
* `'ck-exec'`: the project is a ck-exec mod. Its SERVER target starts from `modStarter`
|
|
25
|
-
* (required with one), its CLIENT target from a `crowdy-client-sdk` crate, the mod's CLIENT
|
|
26
|
-
* half, and both module names fit a mod's. Default `'player-compute'`, where the CLIENT target
|
|
27
|
-
* is a legacy compute SDK crate.
|
|
28
|
-
*/
|
|
29
|
-
engine?: CrowdyStudioServerEngine;
|
|
30
21
|
}
|
|
31
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* Create a compile-oriented starter without introducing a raw JSON source map. The project is a
|
|
24
|
+
* ck-exec mod: the SERVER target is the mod starter's crate, the CLIENT target a
|
|
25
|
+
* `crowdy-client-sdk` crate (the mod's CLIENT half), and both module names fit a mod's (a mod has
|
|
26
|
+
* no client pairing, so the preference is `NONE`).
|
|
27
|
+
*/
|
|
32
28
|
export declare function createCrowdyStudioStarterProject(options: CrowdyStudioNewProjectOptions): CreateCrowdyStudioProjectInput;
|
|
33
29
|
//# sourceMappingURL=starter-projects.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"starter-projects.d.ts","sourceRoot":"","sources":["../../src/crowdy-studio/starter-projects.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"starter-projects.d.ts","sourceRoot":"","sources":["../../src/crowdy-studio/starter-projects.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,8BAA8B,EAEnC,KAAK,uBAAuB,EAE7B,MAAM,aAAa,CAAC;AAQrB,qEAAqE;AACrE,MAAM,WAAW,sBAAsB;IACrC,sDAAsD;IACtD,KAAK,EAAE,SAAS;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACrD;AAED,MAAM,WAAW,6BAA6B;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,uBAAuB,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,sBAAsB,CAAC;CACrC;AAED;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,6BAA6B,GACrC,8BAA8B,CA+BhC"}
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import { projectTargets, } from './models.js';
|
|
2
|
-
const SDK_VERSION = '0.1.8';
|
|
3
2
|
/** crowdy-client-sdk, what a ck-exec mod's CLIENT half builds on; the build points it at the platform's copy. */
|
|
4
3
|
const CLIENT_SDK_VERSION = '0.1.0';
|
|
5
4
|
/** A mod's name is at most 48 characters, and the SERVER module name is `<base>-server`. */
|
|
6
5
|
const MOD_BASE_MAX = 48 - '-server'.length;
|
|
7
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* Create a compile-oriented starter without introducing a raw JSON source map. The project is a
|
|
8
|
+
* ck-exec mod: the SERVER target is the mod starter's crate, the CLIENT target a
|
|
9
|
+
* `crowdy-client-sdk` crate (the mod's CLIENT half), and both module names fit a mod's (a mod has
|
|
10
|
+
* no client pairing, so the preference is `NONE`).
|
|
11
|
+
*/
|
|
8
12
|
export function createCrowdyStudioStarterProject(options) {
|
|
9
13
|
const mod = options.modStarter;
|
|
10
|
-
const exec = options.engine === 'ck-exec';
|
|
11
14
|
const targets = projectTargets(options.kind);
|
|
12
|
-
if (
|
|
13
|
-
throw new Error('A
|
|
15
|
+
if (targets.includes('SERVER') && !mod) {
|
|
16
|
+
throw new Error('A SERVER target starts from the mod starter (client.exec.modStarter)');
|
|
14
17
|
}
|
|
15
|
-
const base =
|
|
18
|
+
const base = modModuleBase(options.name);
|
|
16
19
|
const metadata = {
|
|
17
20
|
name: options.name.trim() || 'Untitled mod',
|
|
18
21
|
...(options.description?.trim()
|
|
@@ -24,7 +27,7 @@ export function createCrowdyStudioStarterProject(options) {
|
|
|
24
27
|
...(targets.includes('CLIENT')
|
|
25
28
|
? { clientModuleName: `${base}-client` }
|
|
26
29
|
: {}),
|
|
27
|
-
pairingPreference:
|
|
30
|
+
pairingPreference: 'NONE',
|
|
28
31
|
};
|
|
29
32
|
return {
|
|
30
33
|
appId: options.appId,
|
|
@@ -32,12 +35,8 @@ export function createCrowdyStudioStarterProject(options) {
|
|
|
32
35
|
kind: options.kind,
|
|
33
36
|
metadata,
|
|
34
37
|
files: targets.flatMap((target) => target === 'SERVER'
|
|
35
|
-
? mod
|
|
36
|
-
|
|
37
|
-
: starterFiles(target, metadata.serverModuleName)
|
|
38
|
-
: exec
|
|
39
|
-
? clientHalfStarterFiles(metadata.clientModuleName)
|
|
40
|
-
: starterFiles(target, metadata.clientModuleName)),
|
|
38
|
+
? modStarterFiles(mod, metadata.serverModuleName)
|
|
39
|
+
: clientHalfStarterFiles(metadata.clientModuleName)),
|
|
41
40
|
};
|
|
42
41
|
}
|
|
43
42
|
/**
|
|
@@ -151,96 +150,6 @@ function modModuleBase(value) {
|
|
|
151
150
|
// The slug has no runs of dashes, so the cut leaves at most one at the end.
|
|
152
151
|
return cut.endsWith('-') ? cut.slice(0, -1) : cut;
|
|
153
152
|
}
|
|
154
|
-
function starterFiles(target, name) {
|
|
155
|
-
return [
|
|
156
|
-
{
|
|
157
|
-
target,
|
|
158
|
-
path: 'Cargo.toml',
|
|
159
|
-
content: cargoToml(target, name),
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
target,
|
|
163
|
-
path: 'src/lib.rs',
|
|
164
|
-
content: target === 'SERVER' ? serverSource() : clientSource(),
|
|
165
|
-
},
|
|
166
|
-
];
|
|
167
|
-
}
|
|
168
|
-
function cargoToml(target, name) {
|
|
169
|
-
const clientTick = target === 'CLIENT'
|
|
170
|
-
? `
|
|
171
|
-
# How often the browser calls CLIENT on_tick (clamped 16–1000 ms).
|
|
172
|
-
# 1000 = HUD/text. 50 = physics minigames (pool). 16 = shooters, if a tick stays cheap.
|
|
173
|
-
[package.metadata.crowdy]
|
|
174
|
-
tick_interval_ms = 1000
|
|
175
|
-
`
|
|
176
|
-
: '';
|
|
177
|
-
return `[package]
|
|
178
|
-
name = "${name}"
|
|
179
|
-
version = "0.1.0"
|
|
180
|
-
edition = "2021"
|
|
181
|
-
|
|
182
|
-
[lib]
|
|
183
|
-
crate-type = ["cdylib"]
|
|
184
|
-
${clientTick}
|
|
185
|
-
[dependencies]
|
|
186
|
-
crowdy-compute-sdk = "${SDK_VERSION}"
|
|
187
|
-
serde_json = "1"
|
|
188
|
-
`;
|
|
189
|
-
}
|
|
190
|
-
function serverSource() {
|
|
191
|
-
return `use crowdy_compute_sdk as crowdy;
|
|
192
|
-
|
|
193
|
-
fn on_init() {
|
|
194
|
-
// Runs once when this SERVER module starts on the owned grid.
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
fn on_tick(_dt_ms: u32) {
|
|
198
|
-
// The host only ticks when tickIntervalMs is set (omit/0 = invoke-only).
|
|
199
|
-
// Server host calls are permission checked and clamped to the owned grid.
|
|
200
|
-
// Type "crowdy::" for the platform-indexed host-call surface.
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
fn on_invoke(payload: &[u8]) -> Vec<u8> {
|
|
204
|
-
// Called by Crowdy Studio's Invoke panel or an allowed game caller.
|
|
205
|
-
payload.to_vec()
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
crowdy::register_module!(init: on_init, tick: on_tick, invoke: on_invoke);
|
|
209
|
-
`;
|
|
210
|
-
}
|
|
211
|
-
function clientSource() {
|
|
212
|
-
return `use crowdy_compute_sdk as crowdy;
|
|
213
|
-
|
|
214
|
-
fn on_init() {
|
|
215
|
-
// Runs after the hash-bound CLIENT artifact enters the browser sandbox.
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
fn on_tick(_dt_ms: u32) {
|
|
219
|
-
// dt_ms is wall time since the last tick. The host interval comes from
|
|
220
|
-
// Cargo.toml [package.metadata.crowdy] tick_interval_ms (default 1000).
|
|
221
|
-
// Client host calls are allow-listed by PlayerCodeBroker. Presentation
|
|
222
|
-
// effects (for example HUD updates) never receive the page's app token.
|
|
223
|
-
// Type "crowdy::" for lifecycle and host-call completions.
|
|
224
|
-
//
|
|
225
|
-
// Mouse (holodeck canvas only; Studio chrome is omitted). Drain every tick:
|
|
226
|
-
// let data = crowdy::api::pointer_clicks().unwrap_or(serde_json::json!({}));
|
|
227
|
-
// data["clicks"] = [{ "t": "down"|"up", "button": 0, "atMs", "heldMs", "nx", "ny" }]
|
|
228
|
-
// data["buttons"] is MouseEvent.buttons (1 = left held).
|
|
229
|
-
// data["holdingMs"]["0"] is ms the left button has been down (power meter).
|
|
230
|
-
// Click-to-charge: start on left down, read holdingMs while held, fire on up.
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
fn on_invoke(payload: &[u8]) -> Vec<u8> {
|
|
234
|
-
payload.to_vec()
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
crowdy::register_module!(init: on_init, tick: on_tick, invoke: on_invoke);
|
|
238
|
-
`;
|
|
239
|
-
}
|
|
240
|
-
function moduleName(value) {
|
|
241
|
-
const slug = slugModuleName(value).slice(0, 48);
|
|
242
|
-
return slug || 'player-mod';
|
|
243
|
-
}
|
|
244
153
|
/**
|
|
245
154
|
* Same span as trim + lower + `/[^a-z0-9]+/gu` → `-`, then `/^-+|-+$/gu`.
|
|
246
155
|
* Linear scan; non-ASCII and punctuation collapse to a single dash.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GraphQLClient } from '../client.js';
|
|
2
|
-
import { type AppAccessTiersQuery, type MyAppAccessQuery, type AppUserAccessByAppQuery, type AppUserAccessConnectionQuery, type AppUserAccessConnectionQueryVariables, type RuntimePermissionsQuery, type AppGrantMemberCandidatesQuery, type ClaimFreeAppAccessMutation, type GrantMyAppAccessMutation, type CreateAccessTierMutation, type UpdateAccessTierMutation, type ArchiveAccessTierMutation, type GrantAppAccessMutation, type RevokeAppAccessMutation, type CreateAccessTierInput, type UpdateAccessTierInput, type GrantAppAccessInput } from '../generated/graphql.js';
|
|
2
|
+
import { type DefineAppFeatureInput, type DefineAppFeatureMutation, type AppFeaturesQuery, type GrantTierFeatureInput, type GrantTierFeatureMutation, type TierFeaturesQuery, type AppAccessTiersQuery, type MyAppAccessQuery, type AppUserAccessByAppQuery, type AppUserAccessConnectionQuery, type AppUserAccessConnectionQueryVariables, type RuntimePermissionsQuery, type AppGrantMemberCandidatesQuery, type ClaimFreeAppAccessMutation, type GrantMyAppAccessMutation, type CreateAccessTierMutation, type UpdateAccessTierMutation, type ArchiveAccessTierMutation, type GrantAppAccessMutation, type RevokeAppAccessMutation, type CreateAccessTierInput, type UpdateAccessTierInput, type GrantAppAccessInput } from '../generated/graphql.js';
|
|
3
3
|
/**
|
|
4
4
|
* App access tiers + per-user access grants — exposed as `client.appAccess`
|
|
5
5
|
* (and grouped under `client.admin`).
|
|
@@ -137,5 +137,18 @@ export declare class AppAccessAPI {
|
|
|
137
137
|
* @returns `true` on success.
|
|
138
138
|
*/
|
|
139
139
|
revoke(appId: string, userId: string): Promise<RevokeAppAccessMutation['revokeAppAccess']>;
|
|
140
|
+
/**
|
|
141
|
+
* Define (or re-describe) a feature key for an app. Idempotent on `(appId, featureKey)`.
|
|
142
|
+
* Requires the app-admin `manage_apps` permission.
|
|
143
|
+
*/
|
|
144
|
+
defineFeature(input: DefineAppFeatureInput): Promise<DefineAppFeatureMutation['gameModelDefineFeature']>;
|
|
145
|
+
/** The feature keys defined for an app. Requires `manage_apps`. */
|
|
146
|
+
features(appId: string): Promise<AppFeaturesQuery['gameModelFeatures']>;
|
|
147
|
+
/** Grant a feature key to an access tier. Requires `manage_apps`. */
|
|
148
|
+
grantTierFeature(input: GrantTierFeatureInput): Promise<GrantTierFeatureMutation['gameModelGrantTierFeature']>;
|
|
149
|
+
/** Revoke a feature key from an access tier; `true` if a grant was removed. Requires `manage_apps`. */
|
|
150
|
+
revokeTierFeature(input: GrantTierFeatureInput): Promise<boolean>;
|
|
151
|
+
/** Tier-to-feature grants for an app, optionally for one tier. Requires `manage_apps`. */
|
|
152
|
+
tierFeatures(appId: string, tierId?: string): Promise<TierFeaturesQuery['gameModelTierFeatures']>;
|
|
140
153
|
}
|
|
141
154
|
//# sourceMappingURL=appAccess.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appAccess.d.ts","sourceRoot":"","sources":["../../src/domains/appAccess.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,
|
|
1
|
+
{"version":3,"file":"appAccess.d.ts","sourceRoot":"","sources":["../../src/domains/appAccess.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAmBL,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,4BAA4B,EACjC,KAAK,qCAAqC,EAC1C,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EAClC,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACzB,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,YAAY;IACX,OAAO,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AAC,wBAAwB,CAAC,kBAAkB,CAAC,CAAC;IAQxD;;;;;;OAMG;IACG,WAAW,CACf,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,yBAAyB,CAAC,mBAAmB,CAAC,CAAC;IAO1D;;;;;;;OAOG;IACG,KAAK,CACT,KAAK,EAAE,mBAAmB,GACzB,OAAO,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,CAAC;IAOpD;;;;;;;OAOG;IACG,MAAM,CACV,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,uBAAuB,CAAC,iBAAiB,CAAC,CAAC;IActD;;;OAGG;IACG,aAAa,CACjB,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,wBAAwB,CAAC,wBAAwB,CAAC,CAAC;IAK9D,mEAAmE;IAC7D,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;IAK7E,qEAAqE;IAC/D,gBAAgB,CACpB,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,wBAAwB,CAAC,2BAA2B,CAAC,CAAC;IAKjE,uGAAuG;IACjG,iBAAiB,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,OAAO,CAAC;IAKvE,0FAA0F;IACpF,YAAY,CAChB,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,iBAAiB,CAAC,uBAAuB,CAAC,CAAC;CAOvD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AppAccessTiersDocument, MyAppAccessDocument, AppUserAccessByAppDocument, AppUserAccessConnectionDocument, RuntimePermissionsDocument, AppGrantMemberCandidatesDocument, ClaimFreeAppAccessDocument, GrantMyAppAccessDocument, CreateAccessTierDocument, UpdateAccessTierDocument, ArchiveAccessTierDocument, GrantAppAccessDocument, RevokeAppAccessDocument, } from '../generated/graphql.js';
|
|
1
|
+
import { AppAccessTiersDocument, MyAppAccessDocument, AppUserAccessByAppDocument, AppUserAccessConnectionDocument, RuntimePermissionsDocument, AppGrantMemberCandidatesDocument, ClaimFreeAppAccessDocument, GrantMyAppAccessDocument, CreateAccessTierDocument, UpdateAccessTierDocument, ArchiveAccessTierDocument, GrantAppAccessDocument, RevokeAppAccessDocument, DefineAppFeatureDocument, AppFeaturesDocument, GrantTierFeatureDocument, RevokeTierFeatureDocument, TierFeaturesDocument, } from '../generated/graphql.js';
|
|
2
2
|
/**
|
|
3
3
|
* App access tiers + per-user access grants — exposed as `client.appAccess`
|
|
4
4
|
* (and grouped under `client.admin`).
|
|
@@ -195,4 +195,40 @@ export class AppAccessAPI {
|
|
|
195
195
|
});
|
|
196
196
|
return data.revokeAppAccess;
|
|
197
197
|
}
|
|
198
|
+
// -- Tier features -----------------------------------------------------------
|
|
199
|
+
//
|
|
200
|
+
// Feature keys an access tier grants. A ck-exec hub checks a player's with the node API's
|
|
201
|
+
// `players.features`. The fields keep the game model's names (`gameModelDefineFeature`,
|
|
202
|
+
// ...); they are served beside access tiers.
|
|
203
|
+
/**
|
|
204
|
+
* Define (or re-describe) a feature key for an app. Idempotent on `(appId, featureKey)`.
|
|
205
|
+
* Requires the app-admin `manage_apps` permission.
|
|
206
|
+
*/
|
|
207
|
+
async defineFeature(input) {
|
|
208
|
+
const data = await this.api.request(DefineAppFeatureDocument, { input });
|
|
209
|
+
return data.gameModelDefineFeature;
|
|
210
|
+
}
|
|
211
|
+
/** The feature keys defined for an app. Requires `manage_apps`. */
|
|
212
|
+
async features(appId) {
|
|
213
|
+
const data = await this.api.request(AppFeaturesDocument, { appId });
|
|
214
|
+
return data.gameModelFeatures;
|
|
215
|
+
}
|
|
216
|
+
/** Grant a feature key to an access tier. Requires `manage_apps`. */
|
|
217
|
+
async grantTierFeature(input) {
|
|
218
|
+
const data = await this.api.request(GrantTierFeatureDocument, { input });
|
|
219
|
+
return data.gameModelGrantTierFeature;
|
|
220
|
+
}
|
|
221
|
+
/** Revoke a feature key from an access tier; `true` if a grant was removed. Requires `manage_apps`. */
|
|
222
|
+
async revokeTierFeature(input) {
|
|
223
|
+
const data = await this.api.request(RevokeTierFeatureDocument, { input });
|
|
224
|
+
return data.gameModelRevokeTierFeature;
|
|
225
|
+
}
|
|
226
|
+
/** Tier-to-feature grants for an app, optionally for one tier. Requires `manage_apps`. */
|
|
227
|
+
async tierFeatures(appId, tierId) {
|
|
228
|
+
const data = await this.api.request(TierFeaturesDocument, {
|
|
229
|
+
appId,
|
|
230
|
+
...(tierId !== undefined ? { tierId } : {}),
|
|
231
|
+
});
|
|
232
|
+
return data.gameModelTierFeatures;
|
|
233
|
+
}
|
|
198
234
|
}
|