@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ExecAPI, ExecClientCapabilitySummary, ExecGridClientMod } from '../domains/exec.js';
|
|
2
|
-
import { type PlayerCodeBrokerOptions, type PlayerCodeGridBounds, type PlayerCodeHostCall, type PlayerCodePresentation } from '../player-runtime/player-code-broker.js';
|
|
2
|
+
import { type PlayerCodeBrokerOptions, type PlayerCodeGridBounds, type PlayerCodeHostCall, type PlayerCodeLogLine, type PlayerCodePresentation } from '../player-runtime/player-code-broker.js';
|
|
3
3
|
/** The grid a player stands in: its id and chunk box. */
|
|
4
4
|
export type ExecClientHalvesGrid = PlayerCodeGridBounds & {
|
|
5
5
|
gridId: string;
|
|
@@ -48,6 +48,10 @@ export interface ExecClientHalfError {
|
|
|
48
48
|
export interface ExecClientHalfBroker {
|
|
49
49
|
start(artifact: ArrayBuffer): Promise<void>;
|
|
50
50
|
stop(): void;
|
|
51
|
+
/** `PlayerCodeBroker.invoke`: the module's `handle_invoke`. */
|
|
52
|
+
invoke?(payload: Uint8Array, options?: {
|
|
53
|
+
timeoutMs?: number;
|
|
54
|
+
}): Promise<Uint8Array>;
|
|
51
55
|
}
|
|
52
56
|
export interface ExecClientHalvesOptions {
|
|
53
57
|
exec: Pick<ExecAPI, 'gridClientMods' | 'consentClientMod' | 'trustAuthor' | 'modClientArtifactBytes'>;
|
|
@@ -60,6 +64,11 @@ export interface ExecClientHalvesOptions {
|
|
|
60
64
|
*/
|
|
61
65
|
onHostCall: (call: PlayerCodeHostCall, mod: ExecGridClientMod) => Promise<unknown>;
|
|
62
66
|
onPresentation?: (presentation: PlayerCodePresentation, mod: ExecGridClientMod) => void;
|
|
67
|
+
/**
|
|
68
|
+
* Each CLIENT half's `crowdy::log` lines, bounded by the broker (see
|
|
69
|
+
* `PlayerCodeBrokerOptions.onLog`). The text is the mod author's: render it as text.
|
|
70
|
+
*/
|
|
71
|
+
onLog?: (line: PlayerCodeLogLine, mod: ExecGridClientMod) => void;
|
|
63
72
|
/**
|
|
64
73
|
* Asks the player about CLIENT halves they neither consented to nor trust the author of; true
|
|
65
74
|
* consents. Without it, only what the player already agreed to runs. A declined question is
|
|
@@ -100,8 +109,7 @@ export interface ExecClientHalvesOptions {
|
|
|
100
109
|
* that filled the cache; consent and trust are the listing's, on every refresh.
|
|
101
110
|
*
|
|
102
111
|
* `NOT_FOUND` (not served to this player now) and `RATE_LIMITED` hold that CLIENT half back for
|
|
103
|
-
* a while instead of fetching on every refresh.
|
|
104
|
-
* (`marketplace.gridClientMods`) are not this runner's.
|
|
112
|
+
* a while instead of fetching on every refresh.
|
|
105
113
|
*/
|
|
106
114
|
export declare class ExecClientHalves {
|
|
107
115
|
private readonly options;
|
|
@@ -123,6 +131,14 @@ export declare class ExecClientHalves {
|
|
|
123
131
|
* when the grid's CLIENT halves cannot be listed, and what runs keeps running.
|
|
124
132
|
*/
|
|
125
133
|
refresh(): Promise<void>;
|
|
134
|
+
/**
|
|
135
|
+
* Calls the `handle_invoke` export of the running CLIENT half of mod `modId` with `payload`
|
|
136
|
+
* and resolves with its reply bytes (see `PlayerCodeBroker.invoke`). Rejects when that CLIENT
|
|
137
|
+
* half is not running.
|
|
138
|
+
*/
|
|
139
|
+
invoke(modId: string, payload: Uint8Array, options?: {
|
|
140
|
+
timeoutMs?: number;
|
|
141
|
+
}): Promise<Uint8Array>;
|
|
126
142
|
/** Stops every CLIENT half and leaves the grid; the module cache stays. */
|
|
127
143
|
stop(): void;
|
|
128
144
|
private reconcile;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exec-client-halves.d.ts","sourceRoot":"","sources":["../../src/grid-mods/exec-client-halves.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,2BAA2B,EAC3B,iBAAiB,EAClB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC5B,MAAM,yCAAyC,CAAC;AAEjD,yDAAyD;AACzD,MAAM,MAAM,oBAAoB,GAAG,oBAAoB,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7E;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,QAAQ,GAAG,KAAK,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,kGAAkG;IAClG,cAAc,EAAE,MAAM,CAAC;IACvB,yEAAyE;IACzE,qBAAqB,EAAE,MAAM,CAAC;IAC9B,iBAAiB,EAAE,2BAA2B,GAAG,IAAI,CAAC;IACtD,0CAA0C;IAC1C,IAAI,EAAE,SAAS,iBAAiB,EAAE,CAAC;CACpC;AAED;;;;;GAKG;AACH,MAAM,MAAM,wBAA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Q,CAAC,OAAO,CAA6B;IACrD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqB;IAC9C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqB;IAC9C,OAAO,CAAC,QAAQ,CAA4D;gBAE/C,OAAO,EAAE,uBAAuB;IAE7D,iGAAiG;IACjG,SAAS,CAAC,IAAI,EAAE,oBAAoB,GAAG,IAAI,GAAG,IAAI;IASlD,qCAAqC;IACrC,IAAI,OAAO,IAAI,SAAS,iBAAiB,EAAE,CAE1C;IAED;;;OAGG;IACH,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAUxB;;;;OAIG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,UAAU,CAAC;IAWjG,2EAA2E;IAC3E,IAAI,IAAI,IAAI;YAQE,SAAS;IAuBvB,OAAO,CAAC,SAAS;IAiBjB,+FAA+F;YACjF,QAAQ;YA8ER,KAAK;IAmFnB,OAAO,CAAC,IAAI;IAaZ,OAAO,CAAC,QAAQ;IAShB,OAAO,CAAC,MAAM;IAId,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,OAAO;IAIf,OAAO,CAAC,GAAG;CAGZ"}
|
|
@@ -30,8 +30,7 @@ function refusal(error) {
|
|
|
30
30
|
* that filled the cache; consent and trust are the listing's, on every refresh.
|
|
31
31
|
*
|
|
32
32
|
* `NOT_FOUND` (not served to this player now) and `RATE_LIMITED` hold that CLIENT half back for
|
|
33
|
-
* a while instead of fetching on every refresh.
|
|
34
|
-
* (`marketplace.gridClientMods`) are not this runner's.
|
|
33
|
+
* a while instead of fetching on every refresh.
|
|
35
34
|
*/
|
|
36
35
|
export class ExecClientHalves {
|
|
37
36
|
constructor(options) {
|
|
@@ -74,6 +73,21 @@ export class ExecClientHalves {
|
|
|
74
73
|
this.inFlight = { generation, done };
|
|
75
74
|
return done;
|
|
76
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* Calls the `handle_invoke` export of the running CLIENT half of mod `modId` with `payload`
|
|
78
|
+
* and resolves with its reply bytes (see `PlayerCodeBroker.invoke`). Rejects when that CLIENT
|
|
79
|
+
* half is not running.
|
|
80
|
+
*/
|
|
81
|
+
invoke(modId, payload, options) {
|
|
82
|
+
const worker = this.workers.get(modId);
|
|
83
|
+
if (!worker?.started) {
|
|
84
|
+
return Promise.reject(new Error(`the CLIENT half of mod ${modId} is not running`));
|
|
85
|
+
}
|
|
86
|
+
if (!worker.broker.invoke) {
|
|
87
|
+
return Promise.reject(new Error('this broker cannot invoke its module'));
|
|
88
|
+
}
|
|
89
|
+
return worker.broker.invoke(payload, options);
|
|
90
|
+
}
|
|
77
91
|
/** Stops every CLIENT half and leaves the grid; the module cache stays. */
|
|
78
92
|
stop() {
|
|
79
93
|
this.stopAll('stopped');
|
|
@@ -262,6 +276,7 @@ export class ExecClientHalves {
|
|
|
262
276
|
consentedHostCalls: consented.filter((fn) => served.includes(fn)),
|
|
263
277
|
onHostCall: (call) => this.options.onHostCall(call, mod),
|
|
264
278
|
onPresentation: (presentation) => this.options.onPresentation?.(presentation, mod),
|
|
279
|
+
...(this.options.onLog ? { onLog: (line) => this.options.onLog?.(line, mod) } : {}),
|
|
265
280
|
onCircuitOpen: () => {
|
|
266
281
|
if (this.workers.get(mod.modId)?.broker !== broker)
|
|
267
282
|
return;
|
|
@@ -1,19 +1,32 @@
|
|
|
1
|
-
import type { GridScope } from '../grid-scope.js';
|
|
1
|
+
import type { GridChunk, GridScope } from '../grid-scope.js';
|
|
2
2
|
import type { PlayerCodeHostCall } from '../player-runtime/player-code-broker.js';
|
|
3
|
+
import type { AvatarsAPI } from '../domains/avatars.js';
|
|
3
4
|
import type { ChunksAPI } from '../domains/chunks.js';
|
|
4
5
|
import type { VoxelsAPI } from '../domains/voxels.js';
|
|
5
6
|
import type { StateAPI } from '../domains/state.js';
|
|
6
|
-
import type { GameModelAPI } from '../domains/gameModel.js';
|
|
7
7
|
/**
|
|
8
|
-
* Game-local fast paths. A game that already holds the world in memory (a
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* Game-local fast paths and knowledge. A game that already holds the world in memory (a chunk
|
|
9
|
+
* store, an actor store) answers reads from there instead of a round trip; anything it leaves
|
|
10
|
+
* out falls through to the server path. The calls only the game can answer (`actors_list*`,
|
|
11
|
+
* `avatar_state_get`, `grid_permission_check`, `pointer_clicks`) are refused without their
|
|
12
|
+
* hook.
|
|
11
13
|
*/
|
|
12
14
|
export interface GridHostLocal {
|
|
13
15
|
chunkVoxels?(x: bigint, y: bigint, z: bigint): {
|
|
14
16
|
voxelsBase64: string | null;
|
|
15
17
|
} | null;
|
|
16
18
|
actorsInChunk?(x: bigint, y: bigint, z: bigint): Array<Record<string, unknown>>;
|
|
19
|
+
/**
|
|
20
|
+
* The chunk of the avatar's live actor, from the game's actor store, or null when the game
|
|
21
|
+
* sees none. `avatar_state_get` answers only for an avatar whose actor is inside the grid.
|
|
22
|
+
*/
|
|
23
|
+
avatarChunk?(avatarId: string): GridChunk | null | undefined | Promise<GridChunk | null | undefined>;
|
|
24
|
+
/**
|
|
25
|
+
* The runtime permission keys the visiting player holds on this grid, as the game knows them
|
|
26
|
+
* (where Crowdy Studio's `targetPermissions` come from). `grid_permission_check` answers from
|
|
27
|
+
* these, for that player and this grid only; the server still enforces the permissions.
|
|
28
|
+
*/
|
|
29
|
+
gridPermissionKeys?(): Iterable<string> | Promise<Iterable<string>>;
|
|
17
30
|
setVoxel?(input: {
|
|
18
31
|
chunk: {
|
|
19
32
|
x: number;
|
|
@@ -36,15 +49,15 @@ export interface GridHostCallsOptions {
|
|
|
36
49
|
chunks: ChunksAPI;
|
|
37
50
|
voxels: VoxelsAPI;
|
|
38
51
|
state: StateAPI;
|
|
39
|
-
|
|
52
|
+
/** For `avatar_state_get`, a public read (`avatarAppState`). */
|
|
53
|
+
avatars?: Pick<AvatarsAPI, 'appState'>;
|
|
40
54
|
};
|
|
41
55
|
local?: GridHostLocal;
|
|
42
56
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* functions are meant to be scriptable by visitors' mods.
|
|
57
|
+
* The visiting player's user id. `grid_permission_check` answers only about them, so without
|
|
58
|
+
* it the call is refused.
|
|
46
59
|
*/
|
|
47
|
-
|
|
60
|
+
userId?: string;
|
|
48
61
|
/**
|
|
49
62
|
* Channels a mod may post to. Default: the grid's own channels only (the
|
|
50
63
|
* server rule for grid code). A game may widen it to channels the player
|
|
@@ -60,13 +73,12 @@ export declare class GridHostCallRefused extends Error {
|
|
|
60
73
|
constructor(fn: string, reason?: string);
|
|
61
74
|
}
|
|
62
75
|
/**
|
|
63
|
-
* The page-side answer to
|
|
64
|
-
* through ordinary CrowdyJS confined to one grid
|
|
65
|
-
* to `PlayerCodeBroker({ onHostCall })`; the broker
|
|
66
|
-
* allowlist, rate caps and chunk
|
|
67
|
-
* `hud_set` and `overlay_draw`
|
|
68
|
-
*
|
|
69
|
-
* cases below serve legacy CLIENT modules until 18.0.
|
|
76
|
+
* The page-side answer to a CLIENT half's host calls (`EXEC_CLIENT_HOST_CALLS`,
|
|
77
|
+
* what crowdy-client-sdk wraps), through ordinary CrowdyJS confined to one grid
|
|
78
|
+
* (DN-10 §4). Hand the result to `PlayerCodeBroker({ onHostCall })`; the broker
|
|
79
|
+
* has already applied the allowlist, the player's consent, rate caps and chunk
|
|
80
|
+
* clamps, and answers `grid_info`, `emit_event`, `hud_set` and `overlay_draw`
|
|
81
|
+
* itself.
|
|
70
82
|
*/
|
|
71
83
|
export declare function createGridHostCalls(options: GridHostCallsOptions): (call: PlayerCodeHostCall) => Promise<unknown>;
|
|
72
84
|
//# sourceMappingURL=grid-host-calls.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid-host-calls.d.ts","sourceRoot":"","sources":["../../src/grid-mods/grid-host-calls.ts"],"names":[],"mappings":"AAAA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event', 'text']);
|
|
10
10
|
/**
|
|
11
|
-
* The page-side answer to
|
|
12
|
-
* through ordinary CrowdyJS confined to one grid
|
|
13
|
-
* to `PlayerCodeBroker({ onHostCall })`; the broker
|
|
14
|
-
* allowlist, rate caps and chunk
|
|
15
|
-
* `hud_set` and `overlay_draw`
|
|
16
|
-
*
|
|
17
|
-
* cases below serve legacy CLIENT modules until 18.0.
|
|
11
|
+
* The page-side answer to a CLIENT half's host calls (`EXEC_CLIENT_HOST_CALLS`,
|
|
12
|
+
* what crowdy-client-sdk wraps), through ordinary CrowdyJS confined to one grid
|
|
13
|
+
* (DN-10 §4). Hand the result to `PlayerCodeBroker({ onHostCall })`; the broker
|
|
14
|
+
* has already applied the allowlist, the player's consent, rate caps and chunk
|
|
15
|
+
* clamps, and answers `grid_info`, `emit_event`, `hud_set` and `overlay_draw`
|
|
16
|
+
* itself.
|
|
18
17
|
*/
|
|
19
18
|
export function createGridHostCalls(options) {
|
|
20
19
|
const { scope, client, local } = options;
|
|
@@ -134,44 +133,35 @@ export function createGridHostCalls(options) {
|
|
|
134
133
|
}
|
|
135
134
|
return scope.channels.send(channelId, uuid(args), String(args.payloadBase64 ?? ''));
|
|
136
135
|
}
|
|
137
|
-
case '
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
case 'container_get_batch': {
|
|
149
|
-
const ids = Array.isArray(args.containerIds) ? args.containerIds.slice(0, 32) : [];
|
|
150
|
-
const found = await Promise.all(ids.map((id) => scope.model.container(String(id)).catch(() => null)));
|
|
151
|
-
return found.filter((c) => c != null);
|
|
136
|
+
case 'avatar_state_get': {
|
|
137
|
+
const avatarId = decimalId(args.avatarId);
|
|
138
|
+
if (!avatarId)
|
|
139
|
+
throw new GridHostCallRefused(fn, 'needs an avatar id');
|
|
140
|
+
if (!local?.avatarChunk || !client.avatars)
|
|
141
|
+
throw new GridHostCallRefused(fn);
|
|
142
|
+
const at = await local.avatarChunk(avatarId);
|
|
143
|
+
if (!at || !scope.contains(at)) {
|
|
144
|
+
throw new GridHostCallRefused(fn, 'names an avatar with no live actor in this grid');
|
|
145
|
+
}
|
|
146
|
+
return client.avatars.appState(appId, avatarId);
|
|
152
147
|
}
|
|
153
|
-
case '
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
return scope.model.delete(String(args.containerId));
|
|
157
|
-
case 'property_set':
|
|
158
|
-
return scope.model.set({
|
|
159
|
-
containerId: String(args.containerId),
|
|
160
|
-
propertyKey: String(args.key),
|
|
161
|
-
valueJson: JSON.stringify(args.value ?? null),
|
|
162
|
-
});
|
|
163
|
-
case 'model_invoke':
|
|
164
|
-
if (!options.allowModelInvoke)
|
|
148
|
+
case 'grid_permission_check': {
|
|
149
|
+
const player = decimalId(options.userId);
|
|
150
|
+
if (!local?.gridPermissionKeys || !player)
|
|
165
151
|
throw new GridHostCallRefused(fn);
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
|
|
152
|
+
const gridId = decimalId(args.gridId);
|
|
153
|
+
if (!gridId || gridId !== decimalId(scope.gridId)) {
|
|
154
|
+
throw new GridHostCallRefused(fn, 'names another grid');
|
|
155
|
+
}
|
|
156
|
+
if (decimalId(args.userId) !== player) {
|
|
157
|
+
throw new GridHostCallRefused(fn, 'asks about another player');
|
|
158
|
+
}
|
|
159
|
+
const key = args.permissionKey;
|
|
160
|
+
if (typeof key !== 'string' || !PERMISSION_KEY.test(key)) {
|
|
161
|
+
throw new GridHostCallRefused(fn, 'needs a permission key');
|
|
162
|
+
}
|
|
163
|
+
return new Set(await local.gridPermissionKeys()).has(key);
|
|
164
|
+
}
|
|
175
165
|
case 'user_state_get':
|
|
176
166
|
return client.state.getOne(appId);
|
|
177
167
|
case 'user_state_set':
|
|
@@ -184,13 +174,17 @@ export function createGridHostCalls(options) {
|
|
|
184
174
|
throw new GridHostCallRefused(fn);
|
|
185
175
|
return local.drainPointerClicks();
|
|
186
176
|
default:
|
|
187
|
-
// edge_*, grid_state_*, avatar_state_get and grid_permission_check have
|
|
188
|
-
// no browser GraphQL surface yet: the server host answers them for
|
|
189
|
-
// SERVER mods.
|
|
190
177
|
throw new GridHostCallRefused(fn);
|
|
191
178
|
}
|
|
192
179
|
};
|
|
193
180
|
}
|
|
181
|
+
/** As the runtime permission keys (`runtimePermissions`): lowercase, digits and `_`. */
|
|
182
|
+
const PERMISSION_KEY = /^[a-z][a-z0-9_]{0,63}$/;
|
|
183
|
+
/** A positive decimal id (BigInt as a decimal string, or a safe integer), normalized; else null. */
|
|
184
|
+
function decimalId(value) {
|
|
185
|
+
const text = typeof value === 'string' ? value : typeof value === 'number' && Number.isSafeInteger(value) ? String(value) : '';
|
|
186
|
+
return /^[1-9][0-9]{0,19}$/.test(text) ? text : null;
|
|
187
|
+
}
|
|
194
188
|
function coords(x, y, z) {
|
|
195
189
|
return [BigInt(x), BigInt(y), BigInt(z)];
|
|
196
190
|
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { type PlayerCodeEngine, type PlayerCodePresentation } from '../player-runtime/player-code-broker.js';
|
|
1
|
+
import { type PlayerCodeEngine, type PlayerCodeLogLine, type PlayerCodePresentation } from '../player-runtime/player-code-broker.js';
|
|
2
2
|
import type { GridProgramPort } from '../grid-program/protocol.js';
|
|
3
3
|
import type { GridScope } from '../grid-scope.js';
|
|
4
4
|
import { type GridHostCallsOptions, type GridHostLocal } from './grid-host-calls.js';
|
|
5
5
|
/**
|
|
6
|
-
* A
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* A ck-exec mod's CLIENT half: platform-built WASM run in the tokenless glue worker, with the
|
|
7
|
+
* `digest` (as `artifactHash`), `fuelPerDispatch`, `tickIntervalMs` and summary host calls of
|
|
8
|
+
* `exec.modClientArtifactBytes` (`ExecClientHalves` runs a whole grid's).
|
|
9
9
|
*/
|
|
10
10
|
export interface WasmGridModSpec {
|
|
11
11
|
kind: 'wasm';
|
|
12
12
|
moduleName: string;
|
|
13
13
|
artifact: ArrayBuffer;
|
|
14
|
-
artifactHash
|
|
15
|
-
fuelPerDispatch
|
|
14
|
+
artifactHash: string;
|
|
15
|
+
fuelPerDispatch: bigint;
|
|
16
16
|
tickIntervalMs?: number;
|
|
17
|
-
/**
|
|
17
|
+
/** `'ck-exec'`, the only engine. */
|
|
18
18
|
engine?: PlayerCodeEngine;
|
|
19
|
-
/**
|
|
20
|
-
consentedHostCalls
|
|
19
|
+
/** The CLIENT half's `capabilitySummary.hostFunctions` the player consented to. */
|
|
20
|
+
consentedHostCalls: readonly string[];
|
|
21
21
|
/** The platform glue worker URL (`@crowdedkingdoms/crowdyjs/player-glue-worker`). */
|
|
22
22
|
workerUrl: string | URL;
|
|
23
23
|
}
|
|
@@ -40,18 +40,25 @@ export interface StartGridModOptions {
|
|
|
40
40
|
graphqlUrl?: string;
|
|
41
41
|
graphqlWsUrl?: string;
|
|
42
42
|
local?: GridHostLocal;
|
|
43
|
-
|
|
43
|
+
/** Forwarded to `createGridHostCalls`: the visiting player, for `grid_permission_check`. */
|
|
44
|
+
userId?: string;
|
|
44
45
|
onPresentation?: (presentation: PlayerCodePresentation) => void;
|
|
46
|
+
/** A CLIENT half's `crowdy::log` lines, bounded by the broker. Render them as text. */
|
|
47
|
+
onLog?: (line: PlayerCodeLogLine) => void;
|
|
45
48
|
onStopped?: (reason: string) => void;
|
|
46
49
|
}
|
|
47
50
|
export interface RunningGridMod {
|
|
48
51
|
kind: GridModSpec['kind'];
|
|
49
52
|
moduleName: string;
|
|
50
53
|
stop(): void;
|
|
54
|
+
/** A CLIENT half's `handle_invoke` (`PlayerCodeBroker.invoke`); absent for a grid program. */
|
|
55
|
+
invoke?(payload: Uint8Array, options?: {
|
|
56
|
+
timeoutMs?: number;
|
|
57
|
+
}): Promise<Uint8Array>;
|
|
51
58
|
}
|
|
52
59
|
/**
|
|
53
60
|
* One way to run player code inside a grid, whatever it is written in (DN-10
|
|
54
|
-
* §4-5).
|
|
61
|
+
* §4-5). A ck-exec CLIENT half gets the host calls it was consented through
|
|
55
62
|
* {@link createGridHostCalls}; JS grid programs get real CrowdyJS through a
|
|
56
63
|
* grid-token relay. Both are confined to `scope`'s grid, locally for UX and by
|
|
57
64
|
* the server for authority.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod-runtime.d.ts","sourceRoot":"","sources":["../../src/grid-mods/mod-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC5B,MAAM,yCAAyC,CAAC;AAEjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAE9B;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,WAAW,CAAC;IACtB,YAAY,
|
|
1
|
+
{"version":3,"file":"mod-runtime.d.ts","sourceRoot":"","sources":["../../src/grid-mods/mod-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC5B,MAAM,yCAAyC,CAAC;AAEjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAE9B;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,M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,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,IAAI,IAAI,CAAC;IACb,8FAA8F;IAC9F,MAAM,CAAC,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;CACrF;AAED;;;;;;GAMG;AACH,wBAAsB,YAAY,CAChC,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,cAAc,CAAC,CA+CzB"}
|
|
@@ -3,7 +3,7 @@ import { hostGridProgram } from '../grid-program/host.js';
|
|
|
3
3
|
import { createGridHostCalls, } from './grid-host-calls.js';
|
|
4
4
|
/**
|
|
5
5
|
* One way to run player code inside a grid, whatever it is written in (DN-10
|
|
6
|
-
* §4-5).
|
|
6
|
+
* §4-5). A ck-exec CLIENT half gets the host calls it was consented through
|
|
7
7
|
* {@link createGridHostCalls}; JS grid programs get real CrowdyJS through a
|
|
8
8
|
* grid-token relay. Both are confined to `scope`'s grid, locally for UX and by
|
|
9
9
|
* the server for authority.
|
|
@@ -27,9 +27,10 @@ export async function startGridMod(options) {
|
|
|
27
27
|
scope,
|
|
28
28
|
client: options.client,
|
|
29
29
|
local: options.local,
|
|
30
|
-
|
|
30
|
+
...(options.userId !== undefined ? { userId: options.userId } : {}),
|
|
31
31
|
}),
|
|
32
32
|
onPresentation: options.onPresentation,
|
|
33
|
+
onLog: options.onLog,
|
|
33
34
|
onCircuitOpen: (reason) => options.onStopped?.(reason),
|
|
34
35
|
});
|
|
35
36
|
await broker.start(spec.artifact);
|
|
@@ -37,6 +38,7 @@ export async function startGridMod(options) {
|
|
|
37
38
|
kind: 'wasm',
|
|
38
39
|
moduleName: spec.moduleName,
|
|
39
40
|
stop: () => broker.stop(),
|
|
41
|
+
invoke: (payload, invokeOptions) => broker.invoke(payload, invokeOptions),
|
|
40
42
|
};
|
|
41
43
|
}
|
|
42
44
|
if (!options.graphqlUrl || !options.graphqlWsUrl) {
|
package/dist/grid-scope.d.ts
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import type { GridsAPI, GridChannel, GridToken } from './domains/grids.js';
|
|
2
|
-
import type { GameModelAPI } from './domains/gameModel.js';
|
|
3
|
-
import type { PlayerModelAPI } from './domains/playerModel.js';
|
|
4
|
-
import type { PlayerComputeAPI } from './domains/playerCompute.js';
|
|
5
2
|
import type { ChannelsAPI } from './domains/channels.js';
|
|
6
3
|
import type { UdpAPI } from './domains/udp.js';
|
|
7
|
-
import type { MarketplaceAPI } from './domains/marketplace.js';
|
|
8
|
-
import type { GameModelCreateSessionMutationVariables, PlayerComputeDeployMutationVariables, PlayerModelCreateContainerMutationVariables, PlayerModelSetPropertyMutationVariables } from './generated/graphql.js';
|
|
9
4
|
/** A chunk address as CrowdyJS passes it on the wire (decimal strings). */
|
|
10
5
|
export interface GridChunk {
|
|
11
6
|
x: string | number | bigint;
|
|
@@ -27,12 +22,8 @@ export interface GridBox {
|
|
|
27
22
|
/** The domain clients a GridScope binds (a CrowdyClient satisfies this). */
|
|
28
23
|
export interface GridScopeClients {
|
|
29
24
|
grids: GridsAPI;
|
|
30
|
-
gameModel: GameModelAPI;
|
|
31
|
-
playerModel: PlayerModelAPI;
|
|
32
|
-
playerCompute: PlayerComputeAPI;
|
|
33
25
|
channels: ChannelsAPI;
|
|
34
26
|
udp: UdpAPI;
|
|
35
|
-
marketplace: MarketplaceAPI;
|
|
36
27
|
}
|
|
37
28
|
/** Thrown locally, before any request, when a call would leave the grid. */
|
|
38
29
|
export declare class GridScopeError extends Error {
|
|
@@ -102,186 +93,6 @@ export declare class GridScope {
|
|
|
102
93
|
leave: (channelId: string) => Promise<boolean>;
|
|
103
94
|
send: (channelId: string, uuid: string, payloadBase64: string) => Promise<boolean>;
|
|
104
95
|
};
|
|
105
|
-
/** Sessions hosted inside this grid (games within the game). */
|
|
106
|
-
readonly sessions: {
|
|
107
|
-
list: (options?: {
|
|
108
|
-
status?: string;
|
|
109
|
-
limit?: number;
|
|
110
|
-
}) => Promise<{
|
|
111
|
-
__typename?: "GmSession";
|
|
112
|
-
sessionId: string;
|
|
113
|
-
appId: string;
|
|
114
|
-
name: string | null;
|
|
115
|
-
status: string;
|
|
116
|
-
createdByUserId: string | null;
|
|
117
|
-
currentTurnUserId: string | null;
|
|
118
|
-
metadataJson: string;
|
|
119
|
-
admission: string;
|
|
120
|
-
maxParticipants: number | null;
|
|
121
|
-
participantCount: number;
|
|
122
|
-
hostUserId: string | null;
|
|
123
|
-
hostTerm: number;
|
|
124
|
-
revision: string;
|
|
125
|
-
endedAt: string | null;
|
|
126
|
-
endReason: string | null;
|
|
127
|
-
createdAt: string;
|
|
128
|
-
presence: string;
|
|
129
|
-
gridId: string | null;
|
|
130
|
-
seededContainerCount: number | null;
|
|
131
|
-
}[]>;
|
|
132
|
-
create: (input?: Omit<GameModelCreateSessionMutationVariables["input"], "appId" | "gridId">) => Promise<{
|
|
133
|
-
__typename?: "GmSession";
|
|
134
|
-
sessionId: string;
|
|
135
|
-
appId: string;
|
|
136
|
-
name: string | null;
|
|
137
|
-
status: string;
|
|
138
|
-
createdByUserId: string | null;
|
|
139
|
-
currentTurnUserId: string | null;
|
|
140
|
-
metadataJson: string;
|
|
141
|
-
admission: string;
|
|
142
|
-
maxParticipants: number | null;
|
|
143
|
-
participantCount: number;
|
|
144
|
-
hostUserId: string | null;
|
|
145
|
-
hostTerm: number;
|
|
146
|
-
revision: string;
|
|
147
|
-
endedAt: string | null;
|
|
148
|
-
endReason: string | null;
|
|
149
|
-
createdAt: string;
|
|
150
|
-
presence: string;
|
|
151
|
-
gridId: string | null;
|
|
152
|
-
seededContainerCount: number | null;
|
|
153
|
-
}>;
|
|
154
|
-
join: (sessionId: string, options?: {
|
|
155
|
-
role?: string;
|
|
156
|
-
actorUuid?: string;
|
|
157
|
-
}) => Promise<{
|
|
158
|
-
__typename?: "GmSessionParticipant";
|
|
159
|
-
sessionId: string;
|
|
160
|
-
userId: string;
|
|
161
|
-
role: string;
|
|
162
|
-
state: string;
|
|
163
|
-
incarnation: number;
|
|
164
|
-
actorUuid: string | null;
|
|
165
|
-
joinedAt: string;
|
|
166
|
-
leftAt: string | null;
|
|
167
|
-
leftReason: string | null;
|
|
168
|
-
}>;
|
|
169
|
-
leave: (sessionId: string, incarnation: number) => Promise<{
|
|
170
|
-
__typename?: "GmSessionParticipant";
|
|
171
|
-
sessionId: string;
|
|
172
|
-
userId: string;
|
|
173
|
-
role: string;
|
|
174
|
-
state: string;
|
|
175
|
-
incarnation: number;
|
|
176
|
-
actorUuid: string | null;
|
|
177
|
-
joinedAt: string;
|
|
178
|
-
leftAt: string | null;
|
|
179
|
-
leftReason: string | null;
|
|
180
|
-
}>;
|
|
181
|
-
};
|
|
182
|
-
/** The player-tier Game Model of this grid. */
|
|
183
|
-
readonly model: {
|
|
184
|
-
containers: () => Promise<{
|
|
185
|
-
__typename?: "PlayerModelContainer";
|
|
186
|
-
containerId: string;
|
|
187
|
-
appId: string;
|
|
188
|
-
gridId: string;
|
|
189
|
-
ownerUserId: string;
|
|
190
|
-
typeKey: string;
|
|
191
|
-
displayName: string | null;
|
|
192
|
-
stateJson: string;
|
|
193
|
-
propertiesJson: string;
|
|
194
|
-
createdAt: string;
|
|
195
|
-
updatedAt: string;
|
|
196
|
-
}[]>;
|
|
197
|
-
container: (containerId: string) => Promise<{
|
|
198
|
-
__typename?: "PlayerModelContainer";
|
|
199
|
-
containerId: string;
|
|
200
|
-
appId: string;
|
|
201
|
-
gridId: string;
|
|
202
|
-
ownerUserId: string;
|
|
203
|
-
typeKey: string;
|
|
204
|
-
displayName: string | null;
|
|
205
|
-
stateJson: string;
|
|
206
|
-
propertiesJson: string;
|
|
207
|
-
createdAt: string;
|
|
208
|
-
updatedAt: string;
|
|
209
|
-
} | null>;
|
|
210
|
-
create: (input: Omit<PlayerModelCreateContainerMutationVariables["input"], "appId" | "gridId">) => Promise<{
|
|
211
|
-
__typename?: "PlayerModelContainer";
|
|
212
|
-
containerId: string;
|
|
213
|
-
appId: string;
|
|
214
|
-
gridId: string;
|
|
215
|
-
ownerUserId: string;
|
|
216
|
-
typeKey: string;
|
|
217
|
-
displayName: string | null;
|
|
218
|
-
stateJson: string;
|
|
219
|
-
propertiesJson: string;
|
|
220
|
-
createdAt: string;
|
|
221
|
-
updatedAt: string;
|
|
222
|
-
}>;
|
|
223
|
-
set: (input: Omit<PlayerModelSetPropertyMutationVariables["input"], "appId" | "gridId">) => Promise<{
|
|
224
|
-
__typename?: "PlayerModelContainer";
|
|
225
|
-
containerId: string;
|
|
226
|
-
appId: string;
|
|
227
|
-
gridId: string;
|
|
228
|
-
ownerUserId: string;
|
|
229
|
-
typeKey: string;
|
|
230
|
-
displayName: string | null;
|
|
231
|
-
stateJson: string;
|
|
232
|
-
propertiesJson: string;
|
|
233
|
-
createdAt: string;
|
|
234
|
-
updatedAt: string;
|
|
235
|
-
}>;
|
|
236
|
-
delete: (containerId: string) => Promise<boolean>;
|
|
237
|
-
};
|
|
238
|
-
/** Player compute on this grid (SERVER/CLIENT modules). */
|
|
239
|
-
readonly compute: {
|
|
240
|
-
deploy: (input: Omit<PlayerComputeDeployMutationVariables["input"], "appId" | "gridId">) => Promise<{
|
|
241
|
-
__typename?: "PlayerWasmModuleVersion";
|
|
242
|
-
versionId: string;
|
|
243
|
-
moduleId: string;
|
|
244
|
-
versionNo: number;
|
|
245
|
-
target: import("./index.js").PlayerComputeTarget;
|
|
246
|
-
sourceFilesJson: string | null;
|
|
247
|
-
openSource: boolean;
|
|
248
|
-
compileStatus: string;
|
|
249
|
-
compileLog: string | null;
|
|
250
|
-
compiledSizeBytes: string | null;
|
|
251
|
-
projectId: string | null;
|
|
252
|
-
sourceRevision: string | null;
|
|
253
|
-
githubCommitSha: string | null;
|
|
254
|
-
createdAt: string;
|
|
255
|
-
}>;
|
|
256
|
-
invoke: (moduleName: string, exportName: string, params?: unknown) => Promise<{
|
|
257
|
-
__typename?: "PlayerComputeInvokeResult";
|
|
258
|
-
resultBase64: string;
|
|
259
|
-
resultJson: string | null;
|
|
260
|
-
fuelUsed: string;
|
|
261
|
-
durationUs: number;
|
|
262
|
-
}>;
|
|
263
|
-
/** @deprecated Superseded by `client.exec.gridClientMods(appId, gridId)`; removed in 18.0. */
|
|
264
|
-
clientMods: () => Promise<{
|
|
265
|
-
__typename?: "GridClientMod";
|
|
266
|
-
attachmentId: string;
|
|
267
|
-
listingId: string | null;
|
|
268
|
-
listingName: string;
|
|
269
|
-
versionId: string | null;
|
|
270
|
-
sourceKind: string;
|
|
271
|
-
authorKind: import("./generated/graphql.js").PlayerCodeOwnerKind;
|
|
272
|
-
authorRef: string;
|
|
273
|
-
serverVersionId: string | null;
|
|
274
|
-
clientVersionId: string | null;
|
|
275
|
-
clientArtifactHash: string;
|
|
276
|
-
gridId: string;
|
|
277
|
-
capabilitySummaryJson: string;
|
|
278
|
-
capabilityHash: string;
|
|
279
|
-
authorCapabilitySummaryJson: string;
|
|
280
|
-
authorCapabilityHash: string;
|
|
281
|
-
callerConsented: boolean;
|
|
282
|
-
callerTrustsAuthor: boolean;
|
|
283
|
-
}[]>;
|
|
284
|
-
};
|
|
285
96
|
/**
|
|
286
97
|
* Replication that ORIGINATES in the grid. Each send checks its chunk
|
|
287
98
|
* locally, then goes out as the ordinary udp call; reach still follows
|
package/dist/grid-scope.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid-scope.d.ts","sourceRoot":"","sources":["../src/grid-scope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"grid-scope.d.ts","sourceRoot":"","sources":["../src/grid-scope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,KAAK,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