@crowdedkingdoms/crowdyjs 17.14.0-dev.1 → 18.0.1-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 +129 -1
- package/README.md +97 -164
- 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/apps.d.ts +1 -10
- package/dist/domains/apps.d.ts.map +1 -1
- package/dist/domains/apps.js +1 -16
- package/dist/domains/host.d.ts +3 -3
- package/dist/domains/host.js +3 -3
- package/dist/domains/hosting.d.ts +0 -6
- package/dist/domains/hosting.d.ts.map +1 -1
- package/dist/domains/hosting.js +1 -16
- 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/organizations.d.ts +1 -9
- package/dist/domains/organizations.d.ts.map +1 -1
- package/dist/domains/organizations.js +1 -15
- package/dist/domains/payments.d.ts +5 -48
- package/dist/domains/payments.d.ts.map +1 -1
- package/dist/domains/payments.js +5 -57
- 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/domains/quotas.d.ts +20 -7
- package/dist/domains/quotas.d.ts.map +1 -1
- package/dist/domains/quotas.js +15 -6
- package/dist/domains/users.d.ts +7 -74
- package/dist/domains/users.d.ts.map +1 -1
- package/dist/domains/users.js +7 -105
- 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 +955 -8272
- package/dist/generated/graphql.d.ts.map +1 -1
- package/dist/generated/graphql.js +5 -329
- 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 +12 -18
- 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
package/dist/kit/kit.d.ts
CHANGED
|
@@ -1,231 +1,31 @@
|
|
|
1
1
|
import type { ChannelsAPI } from '../domains/channels.js';
|
|
2
2
|
import type { GameAppsAPI } from '../domains/gameApps.js';
|
|
3
|
-
import type { GameModelAPI } from '../domains/gameModel.js';
|
|
4
3
|
import type { TeamsAPI } from '../domains/teams.js';
|
|
5
4
|
import type { UdpAPI } from '../domains/udp.js';
|
|
6
|
-
import type {
|
|
7
|
-
import type { ComputeAPI } from '../domains/compute.js';
|
|
8
|
-
import { type KitBlueprint } from './blueprints/index.js';
|
|
9
|
-
import { CombatKit, type CombatKitOptions } from './combat.js';
|
|
10
|
-
import { DirectorKit, type DirectorKitOptions } from './director.js';
|
|
11
|
-
import { DecksKit, type DecksKitOptions } from './decks.js';
|
|
12
|
-
import { EconomyKit, type EconomyKitOptions } from './economy.js';
|
|
13
|
-
import { EngineDetector } from './engine.js';
|
|
14
|
-
import { FeaturesKit } from './features.js';
|
|
15
|
-
import { InstancesKit, type InstancesKitOptions } from './instances.js';
|
|
16
|
-
import { InventoryKit, type InventoryKitOptions } from './inventory.js';
|
|
17
|
-
import { LeaderboardsKit, type LeaderboardsKitOptions } from './leaderboards.js';
|
|
18
|
-
import { LootKit, type LootKitOptions } from './loot.js';
|
|
19
|
-
import { MatchmakingKit, type MatchmakingKitOptions } from './matchmaking.js';
|
|
20
|
-
import { MinigamesKit, type MinigamesKitOptions } from './minigames.js';
|
|
21
|
-
import { MobsKit, type MobsKitOptions } from './mobs.js';
|
|
22
|
-
import { NpcsKit, type NpcsKitOptions } from './npcs.js';
|
|
23
|
-
import { ObjectsKit, type ObjectsKitOptions } from './objects.js';
|
|
24
|
-
import { PetsKit, type PetsKitOptions } from './pets.js';
|
|
25
|
-
import { PlotsKit, type PlotsKitOptions } from './plots.js';
|
|
26
|
-
import { MatchesKit, type MatchesKitOptions } from './matches.js';
|
|
27
|
-
import { ProgressionKit, type ProgressionKitOptions } from './progression.js';
|
|
28
|
-
import { QuestsKit, type QuestsKitOptions } from './quests.js';
|
|
5
|
+
import type { Scalars } from '../generated/graphql.js';
|
|
29
6
|
import { SocialKit, type SocialKitOptions } from './social.js';
|
|
30
|
-
|
|
31
|
-
import { LiveopsKit, type LiveopsKitOptions } from './liveops.js';
|
|
32
|
-
import { MovementKit, type MovementKitOptions } from './movement.js';
|
|
33
|
-
import { RacingKit, type RacingKitOptions } from './racing.js';
|
|
34
|
-
import { TerritoryKit, type TerritoryKitOptions } from './territory.js';
|
|
35
|
-
import { ModerationKit, type ModerationKitOptions } from './moderation.js';
|
|
36
|
-
import { TelemetryKit, type TelemetryKitOptions } from './telemetry.js';
|
|
37
|
-
import { WorldsimKit, type WorldsimKitOptions } from './worldsim.js';
|
|
38
|
-
/** Options for {@link GameKitClient}, configuring the runtime helpers to match your deployed blueprints. */
|
|
7
|
+
/** Options for {@link GameKitClient}. */
|
|
39
8
|
export interface GameKitOptions {
|
|
40
|
-
inventory?: InventoryKitOptions;
|
|
41
|
-
objects?: ObjectsKitOptions;
|
|
42
|
-
npcs?: NpcsKitOptions;
|
|
43
|
-
plots?: PlotsKitOptions;
|
|
44
|
-
economy?: EconomyKitOptions;
|
|
45
|
-
progression?: ProgressionKitOptions;
|
|
46
|
-
loot?: LootKitOptions;
|
|
47
|
-
quests?: QuestsKitOptions;
|
|
48
|
-
combat?: CombatKitOptions;
|
|
49
|
-
matches?: MatchesKitOptions;
|
|
50
|
-
decks?: DecksKitOptions;
|
|
51
|
-
worldsim?: WorldsimKitOptions;
|
|
52
|
-
liveops?: LiveopsKitOptions;
|
|
53
|
-
moderation?: ModerationKitOptions;
|
|
54
|
-
telemetry?: TelemetryKitOptions;
|
|
55
|
-
abilities?: AbilitiesKitOptions;
|
|
56
|
-
movement?: MovementKitOptions;
|
|
57
|
-
territory?: TerritoryKitOptions;
|
|
58
|
-
racing?: RacingKitOptions;
|
|
59
9
|
social?: SocialKitOptions;
|
|
60
|
-
leaderboards?: LeaderboardsKitOptions;
|
|
61
|
-
mobs?: MobsKitOptions;
|
|
62
|
-
pets?: PetsKitOptions;
|
|
63
|
-
instances?: InstancesKitOptions;
|
|
64
|
-
director?: DirectorKitOptions;
|
|
65
|
-
matchmaking?: MatchmakingKitOptions;
|
|
66
|
-
minigames?: MinigamesKitOptions;
|
|
67
10
|
}
|
|
68
11
|
/**
|
|
69
|
-
* The
|
|
70
|
-
* matches (notify-to-pull) and social chat, teams for parties/guilds, and
|
|
71
|
-
* compute for the engine-backed helpers (mobs/pets, capability detection).
|
|
12
|
+
* The domains the kit composes: teams for parties and guilds, channels and udp for chat.
|
|
72
13
|
* `client.kit(appId)` wires them automatically.
|
|
73
14
|
*/
|
|
74
15
|
export interface GameKitDomains {
|
|
75
16
|
channels?: ChannelsAPI;
|
|
76
17
|
teams?: TeamsAPI;
|
|
77
18
|
udp?: UdpAPI;
|
|
78
|
-
compute?: ComputeAPI;
|
|
79
|
-
}
|
|
80
|
-
/** The result of {@link GameKitClient.deploy}: the seed outcome plus each automation/trigger upserted. */
|
|
81
|
-
export interface KitDeployResult {
|
|
82
|
-
seed: GameModelSeedMutation['gameModelSeed'];
|
|
83
|
-
automations: GameModelUpsertAutomationMutation['gameModelUpsertAutomation'][];
|
|
84
|
-
automationTriggers: GameModelUpsertAutomationTriggerMutation['gameModelUpsertAutomationTrigger'][];
|
|
85
|
-
/** Engine templates deployed alongside (when `engines` was passed). */
|
|
86
|
-
engines: Array<{
|
|
87
|
-
templateName: string;
|
|
88
|
-
moduleName: string;
|
|
89
|
-
compileStatus: string;
|
|
90
|
-
}>;
|
|
91
|
-
/** Non-fatal static-analysis warnings from the seed. */
|
|
92
|
-
warnings: string[];
|
|
93
19
|
}
|
|
94
20
|
/**
|
|
95
|
-
* App-scoped **Game Kit**
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
* Two phases, matching the platform's model:
|
|
101
|
-
*
|
|
102
|
-
* 1. **Studio (admin) loads the rules** — {@link deploy} takes declarative
|
|
103
|
-
* {@link KitBlueprint}s (built with `inventoryBlueprint`, `lockBlueprint`,
|
|
104
|
-
* `npcBlueprint`, or by hand) and seeds the container types, property
|
|
105
|
-
* schemas, policy-gated functions, and automations into the app in one
|
|
106
|
-
* idempotent pass. Requires the app-admin `manage_apps` permission — run
|
|
107
|
-
* it from a trusted admin context, never the shipped game client.
|
|
108
|
-
* 2. **The game client plays** — {@link inventory}, {@link objects}, and
|
|
109
|
-
* {@link npcs} wrap the runtime calls (create/read containers, invoke the
|
|
110
|
-
* gated functions) assuming the blueprint conventions. Authorization is
|
|
111
|
-
* enforced server-side on every call.
|
|
112
|
-
*
|
|
113
|
-
* See the docs guides "Game API → Modeling game concepts" and
|
|
114
|
-
* "CrowdyJS → Game Kit".
|
|
115
|
-
*
|
|
116
|
-
* @example
|
|
117
|
-
* ```ts
|
|
118
|
-
* // Studio setup (admin token):
|
|
119
|
-
* const kit = admin.kit(appId);
|
|
120
|
-
* await kit.deploy([
|
|
121
|
-
* inventoryBlueprint(),
|
|
122
|
-
* lockBlueprint({ objectTypeName: 'Door', authority: { kind: 'key' } }),
|
|
123
|
-
* ]);
|
|
124
|
-
*
|
|
125
|
-
* // Game client (player token):
|
|
126
|
-
* const kit = game.kit(appId);
|
|
127
|
-
* const bag = await kit.inventory.ensure(me.userId);
|
|
128
|
-
* const result = await kit.objects.open(doorId, { keyId });
|
|
129
|
-
* if (!result.success) showLockedMessage(result.errorMessage);
|
|
130
|
-
* ```
|
|
21
|
+
* App-scoped **Game Kit** returned by `client.kit(appId)`: parties, guilds and chat rooms
|
|
22
|
+
* over teams and channels ({@link social}). Game rules and state live in ck-exec hubs
|
|
23
|
+
* (`client.exec`); the kit's wire codecs (`encodeEnginePose`, `parseEngineEvent`, ...) and
|
|
24
|
+
* `runOptimisticAction` are standalone exports.
|
|
131
25
|
*/
|
|
132
26
|
export declare class GameKitClient {
|
|
133
|
-
private readonly appId;
|
|
134
|
-
private readonly gameModel;
|
|
135
|
-
/** Inventory helpers (per-player bags and item stacks). */
|
|
136
|
-
readonly inventory: InventoryKit;
|
|
137
|
-
/** Lockable-object helpers (doors/chests/gates with custom permissions). */
|
|
138
|
-
readonly objects: ObjectsKit;
|
|
139
|
-
/** NPC helpers (spawn/read instances, manage the automations behind them). */
|
|
140
|
-
readonly npcs: NpcsKit;
|
|
141
|
-
/** Plot helpers (buy/rent land with transactional, enforced grid grants). */
|
|
142
|
-
readonly plots: PlotsKit;
|
|
143
|
-
/** Economy helpers (wallets, shops, escrow trades, player market). */
|
|
144
|
-
readonly economy: EconomyKit;
|
|
145
|
-
/** Progression helpers (xp/levels, skills, achievements, rating). */
|
|
146
|
-
readonly progression: ProgressionKit;
|
|
147
|
-
/** Loot helpers (server-rolled weighted tables, atomic claims). */
|
|
148
|
-
readonly loot: LootKit;
|
|
149
|
-
/** Quest helpers (catalog, progress, atomic reward turn-in, daily resets). */
|
|
150
|
-
readonly quests: QuestsKit;
|
|
151
|
-
/** Combat helpers (server-authoritative attacks, status effects, respawn). */
|
|
152
|
-
readonly combat: CombatKit;
|
|
153
|
-
/** Match helpers (lobbies, rounds, turns, scores, notify-to-pull channels). */
|
|
154
|
-
readonly matches: MatchesKit;
|
|
155
|
-
/** Deck helpers (hidden hands via owner visibility, server-dealt shuffles). */
|
|
156
|
-
readonly decks: DecksKit;
|
|
157
|
-
/** World simulation helpers (clock/weather, nodes, crops, wave counters). */
|
|
158
|
-
readonly worldsim: WorldsimKit;
|
|
159
|
-
/** Liveops helpers (event windows, seasons, battle-pass composition). */
|
|
160
|
-
readonly liveops: LiveopsKit;
|
|
161
|
-
/** Moderation helpers (reports, admin queue, personal mutes). */
|
|
162
|
-
readonly moderation: ModerationKit;
|
|
163
|
-
/** Telemetry helpers (track + sampled counters). */
|
|
164
|
-
readonly telemetry: TelemetryKit;
|
|
165
|
-
/** Realtime ability casts (abilities engine, type-94 events). */
|
|
166
|
-
readonly abilities: AbilitiesKit;
|
|
167
|
-
/** Movement-warden reads (observe/flag posture, type-95 events). */
|
|
168
|
-
readonly movement: MovementKit;
|
|
169
|
-
/** Control points + factions (territory engine, type-96 events). */
|
|
170
|
-
readonly territory: TerritoryKit;
|
|
171
|
-
/** Racing + possession (type-97 events, ghosts, the ball). */
|
|
172
|
-
readonly racing: RacingKit;
|
|
173
27
|
/** Social helpers (parties, guilds, chat over teams + channels). */
|
|
174
28
|
readonly social: SocialKit;
|
|
175
|
-
|
|
176
|
-
readonly leaderboards: LeaderboardsKit;
|
|
177
|
-
/** Monetization helpers (feature keys, tier grants, featureGate policies). */
|
|
178
|
-
readonly features: FeaturesKit;
|
|
179
|
-
/** Mob-engine helpers (defs/slots, refereed attacks, contact events). */
|
|
180
|
-
readonly mobs: MobsKit;
|
|
181
|
-
/** Instance helpers (private world slices, seeded runs). */
|
|
182
|
-
readonly instances: InstancesKit;
|
|
183
|
-
/** Director helpers (encounter defs, run state, kill/boss reports). */
|
|
184
|
-
readonly director: DirectorKit;
|
|
185
|
-
/** Matchmaking helpers (queues, proposals, rating). */
|
|
186
|
-
readonly matchmaking: MatchmakingKit;
|
|
187
|
-
/** Minigame helpers (thin invoke wrapper for invoke-loop games). */
|
|
188
|
-
readonly minigames: MinigamesKit;
|
|
189
|
-
/** Pet helpers (adopt/summon/dismiss/rename over the npc engine). */
|
|
190
|
-
readonly pets: PetsKit;
|
|
191
|
-
/** Compute-engine capability detection shared by the engine-aware kits. */
|
|
192
|
-
readonly engines: EngineDetector;
|
|
193
|
-
private readonly compute?;
|
|
194
|
-
constructor(appId: Scalars['BigInt']['input'], gameModel: GameModelAPI, gameApps: GameAppsAPI, options?: GameKitOptions, domains?: GameKitDomains);
|
|
195
|
-
/**
|
|
196
|
-
* Helpers for an additional lockable object type deployed under a different
|
|
197
|
-
* type name (e.g. both `Door` and `Chest` lock blueprints in one app).
|
|
198
|
-
*/
|
|
199
|
-
objectsFor(objectTypeName: string, keyTypeName?: string): ObjectsKit;
|
|
200
|
-
/**
|
|
201
|
-
* **Studio (admin)** — load blueprints into the app: one transactional
|
|
202
|
-
* `gameModelSeed` for the definitions (and any seed containers/edges),
|
|
203
|
-
* followed by an `upsertAutomation` per automation and an
|
|
204
|
-
* `upsertAutomationTrigger` per event trigger. Idempotent: definitions
|
|
205
|
-
* upsert on their names, automations key on the automation name.
|
|
206
|
-
*
|
|
207
|
-
* Requires the app-admin `manage_apps` permission.
|
|
208
|
-
*
|
|
209
|
-
* @param blueprints - The blueprints to deploy. Duplicate type/function/
|
|
210
|
-
* automation names across blueprints throw before anything is sent.
|
|
211
|
-
* @param options - `sessionId` scopes any seed containers to a session.
|
|
212
|
-
* @returns A {@link KitDeployResult} with the seed counts, the upserted
|
|
213
|
-
* automations/triggers, and any non-fatal seed `warnings`.
|
|
214
|
-
* @throws {CrowdyGraphQLError} `FORBIDDEN` (`requiredPermission ===
|
|
215
|
-
* 'manage_apps'`) without app-admin, or `BAD_USER_INPUT` for definitions
|
|
216
|
-
* that fail to compile.
|
|
217
|
-
*/
|
|
218
|
-
deploy(blueprints: KitBlueprint | KitBlueprint[], options?: {
|
|
219
|
-
sessionId?: string;
|
|
220
|
-
/**
|
|
221
|
-
* Engine templates to deploy from the platform registry alongside the
|
|
222
|
-
* blueprints (`computeDeployTemplate` — requires the compute domain +
|
|
223
|
-
* 'manage_compute'). Each entry is a template name, optionally
|
|
224
|
-
* `'template:module'` to override the module name.
|
|
225
|
-
*/
|
|
226
|
-
engines?: string[];
|
|
227
|
-
/** Wait for engine compiles (default true). */
|
|
228
|
-
waitForEngines?: boolean;
|
|
229
|
-
}): Promise<KitDeployResult>;
|
|
29
|
+
constructor(appId: Scalars['BigInt']['input'], gameApps: GameAppsAPI, options?: GameKitOptions, domains?: GameKitDomains);
|
|
230
30
|
}
|
|
231
31
|
//# sourceMappingURL=kit.d.ts.map
|
package/dist/kit/kit.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kit.d.ts","sourceRoot":"","sources":["../../src/kit/kit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"kit.d.ts","sourceRoot":"","sources":["../../src/kit/kit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/D,yCAAyC;AACzC,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,WAAW,CAAC;IACvB,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;;;GAKG;AACH,qBAAa,aAAa;IACxB,oEAAoE;IACpE,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;gBAGzB,KAAK,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,EACjC,QAAQ,EAAE,WAAW,EACrB,OAAO,GAAE,cAAmB,EAC5B,OAAO,GAAE,cAAmB;CAW/B"}
|
package/dist/kit/kit.js
CHANGED
|
@@ -1,170 +1,12 @@
|
|
|
1
|
-
import { mergeBlueprints } from './blueprints/index.js';
|
|
2
|
-
import { CombatKit } from './combat.js';
|
|
3
|
-
import { DirectorKit } from './director.js';
|
|
4
|
-
import { DecksKit } from './decks.js';
|
|
5
|
-
import { EconomyKit } from './economy.js';
|
|
6
|
-
import { EngineDetector } from './engine.js';
|
|
7
|
-
import { FeaturesKit } from './features.js';
|
|
8
|
-
import { InstancesKit } from './instances.js';
|
|
9
|
-
import { InventoryKit } from './inventory.js';
|
|
10
|
-
import { LeaderboardsKit } from './leaderboards.js';
|
|
11
|
-
import { LootKit } from './loot.js';
|
|
12
|
-
import { MatchmakingKit } from './matchmaking.js';
|
|
13
|
-
import { MinigamesKit } from './minigames.js';
|
|
14
|
-
import { MobsKit } from './mobs.js';
|
|
15
|
-
import { NpcsKit } from './npcs.js';
|
|
16
|
-
import { ObjectsKit } from './objects.js';
|
|
17
|
-
import { PetsKit } from './pets.js';
|
|
18
|
-
import { PlotsKit } from './plots.js';
|
|
19
|
-
import { MatchesKit } from './matches.js';
|
|
20
|
-
import { ProgressionKit } from './progression.js';
|
|
21
|
-
import { QuestsKit } from './quests.js';
|
|
22
1
|
import { SocialKit } from './social.js';
|
|
23
|
-
import { AbilitiesKit } from './abilities.js';
|
|
24
|
-
import { LiveopsKit } from './liveops.js';
|
|
25
|
-
import { MovementKit } from './movement.js';
|
|
26
|
-
import { RacingKit } from './racing.js';
|
|
27
|
-
import { TerritoryKit } from './territory.js';
|
|
28
|
-
import { ModerationKit } from './moderation.js';
|
|
29
|
-
import { TelemetryKit } from './telemetry.js';
|
|
30
|
-
import { WorldsimKit } from './worldsim.js';
|
|
31
2
|
/**
|
|
32
|
-
* App-scoped **Game Kit**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* Two phases, matching the platform's model:
|
|
38
|
-
*
|
|
39
|
-
* 1. **Studio (admin) loads the rules** — {@link deploy} takes declarative
|
|
40
|
-
* {@link KitBlueprint}s (built with `inventoryBlueprint`, `lockBlueprint`,
|
|
41
|
-
* `npcBlueprint`, or by hand) and seeds the container types, property
|
|
42
|
-
* schemas, policy-gated functions, and automations into the app in one
|
|
43
|
-
* idempotent pass. Requires the app-admin `manage_apps` permission — run
|
|
44
|
-
* it from a trusted admin context, never the shipped game client.
|
|
45
|
-
* 2. **The game client plays** — {@link inventory}, {@link objects}, and
|
|
46
|
-
* {@link npcs} wrap the runtime calls (create/read containers, invoke the
|
|
47
|
-
* gated functions) assuming the blueprint conventions. Authorization is
|
|
48
|
-
* enforced server-side on every call.
|
|
49
|
-
*
|
|
50
|
-
* See the docs guides "Game API → Modeling game concepts" and
|
|
51
|
-
* "CrowdyJS → Game Kit".
|
|
52
|
-
*
|
|
53
|
-
* @example
|
|
54
|
-
* ```ts
|
|
55
|
-
* // Studio setup (admin token):
|
|
56
|
-
* const kit = admin.kit(appId);
|
|
57
|
-
* await kit.deploy([
|
|
58
|
-
* inventoryBlueprint(),
|
|
59
|
-
* lockBlueprint({ objectTypeName: 'Door', authority: { kind: 'key' } }),
|
|
60
|
-
* ]);
|
|
61
|
-
*
|
|
62
|
-
* // Game client (player token):
|
|
63
|
-
* const kit = game.kit(appId);
|
|
64
|
-
* const bag = await kit.inventory.ensure(me.userId);
|
|
65
|
-
* const result = await kit.objects.open(doorId, { keyId });
|
|
66
|
-
* if (!result.success) showLockedMessage(result.errorMessage);
|
|
67
|
-
* ```
|
|
3
|
+
* App-scoped **Game Kit** returned by `client.kit(appId)`: parties, guilds and chat rooms
|
|
4
|
+
* over teams and channels ({@link social}). Game rules and state live in ck-exec hubs
|
|
5
|
+
* (`client.exec`); the kit's wire codecs (`encodeEnginePose`, `parseEngineEvent`, ...) and
|
|
6
|
+
* `runOptimisticAction` are standalone exports.
|
|
68
7
|
*/
|
|
69
8
|
export class GameKitClient {
|
|
70
|
-
constructor(appId,
|
|
71
|
-
this.appId = appId;
|
|
72
|
-
this.gameModel = gameModel;
|
|
73
|
-
this.compute = domains.compute;
|
|
74
|
-
this.engines = new EngineDetector(String(appId), domains.compute);
|
|
75
|
-
this.inventory = new InventoryKit(appId, gameModel, options.inventory);
|
|
76
|
-
this.objects = new ObjectsKit(appId, gameModel, options.objects);
|
|
77
|
-
this.npcs = new NpcsKit(appId, gameModel, options.npcs, this.engines);
|
|
78
|
-
this.plots = new PlotsKit(appId, gameModel, gameApps, options.plots);
|
|
79
|
-
this.economy = new EconomyKit(appId, gameModel, options.economy, this.engines);
|
|
80
|
-
this.progression = new ProgressionKit(appId, gameModel, options.progression);
|
|
81
|
-
this.loot = new LootKit(appId, gameModel, options.loot, this.engines);
|
|
82
|
-
this.quests = new QuestsKit(appId, gameModel, options.quests);
|
|
83
|
-
this.combat = new CombatKit(appId, gameModel, options.combat, this.engines);
|
|
84
|
-
this.matches = new MatchesKit(appId, gameModel, domains.channels, domains.udp, options.matches, this.engines);
|
|
85
|
-
this.decks = new DecksKit(appId, gameModel, options.decks, this.engines);
|
|
86
|
-
this.worldsim = new WorldsimKit(appId, gameModel, options.worldsim, this.engines);
|
|
87
|
-
this.liveops = new LiveopsKit(appId, gameModel, options.liveops, this.engines);
|
|
88
|
-
this.moderation = new ModerationKit(appId, gameModel, options.moderation);
|
|
89
|
-
this.telemetry = new TelemetryKit(appId, gameModel, options.telemetry);
|
|
90
|
-
this.abilities = new AbilitiesKit(appId, gameModel, this.engines, options.abilities);
|
|
91
|
-
this.movement = new MovementKit(appId, gameModel, this.engines, options.movement);
|
|
92
|
-
this.territory = new TerritoryKit(appId, gameModel, this.engines, options.territory);
|
|
93
|
-
this.racing = new RacingKit(appId, gameModel, this.engines, options.racing);
|
|
94
|
-
this.mobs = new MobsKit(appId, gameModel, this.engines, options.mobs);
|
|
95
|
-
this.pets = new PetsKit(appId, gameModel, this.engines, options.pets);
|
|
96
|
-
this.instances = new InstancesKit(appId, this.engines, options.instances);
|
|
97
|
-
this.director = new DirectorKit(appId, gameModel, this.engines, options.director);
|
|
98
|
-
this.matchmaking = new MatchmakingKit(appId, this.engines, options.matchmaking);
|
|
99
|
-
this.minigames = new MinigamesKit(appId, this.engines, options.minigames);
|
|
9
|
+
constructor(appId, gameApps, options = {}, domains = {}) {
|
|
100
10
|
this.social = new SocialKit(appId, domains.teams, domains.channels, domains.udp, gameApps, options.social);
|
|
101
|
-
this.leaderboards = new LeaderboardsKit(appId, gameModel, options.leaderboards, this.engines);
|
|
102
|
-
this.features = new FeaturesKit(appId, gameModel);
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Helpers for an additional lockable object type deployed under a different
|
|
106
|
-
* type name (e.g. both `Door` and `Chest` lock blueprints in one app).
|
|
107
|
-
*/
|
|
108
|
-
objectsFor(objectTypeName, keyTypeName) {
|
|
109
|
-
return new ObjectsKit(this.appId, this.gameModel, {
|
|
110
|
-
objectTypeName,
|
|
111
|
-
keyTypeName,
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* **Studio (admin)** — load blueprints into the app: one transactional
|
|
116
|
-
* `gameModelSeed` for the definitions (and any seed containers/edges),
|
|
117
|
-
* followed by an `upsertAutomation` per automation and an
|
|
118
|
-
* `upsertAutomationTrigger` per event trigger. Idempotent: definitions
|
|
119
|
-
* upsert on their names, automations key on the automation name.
|
|
120
|
-
*
|
|
121
|
-
* Requires the app-admin `manage_apps` permission.
|
|
122
|
-
*
|
|
123
|
-
* @param blueprints - The blueprints to deploy. Duplicate type/function/
|
|
124
|
-
* automation names across blueprints throw before anything is sent.
|
|
125
|
-
* @param options - `sessionId` scopes any seed containers to a session.
|
|
126
|
-
* @returns A {@link KitDeployResult} with the seed counts, the upserted
|
|
127
|
-
* automations/triggers, and any non-fatal seed `warnings`.
|
|
128
|
-
* @throws {CrowdyGraphQLError} `FORBIDDEN` (`requiredPermission ===
|
|
129
|
-
* 'manage_apps'`) without app-admin, or `BAD_USER_INPUT` for definitions
|
|
130
|
-
* that fail to compile.
|
|
131
|
-
*/
|
|
132
|
-
async deploy(blueprints, options = {}) {
|
|
133
|
-
const list = Array.isArray(blueprints) ? blueprints : [blueprints];
|
|
134
|
-
const merged = mergeBlueprints(this.appId, list, options);
|
|
135
|
-
const seed = await this.gameModel.seed(merged.seedInput);
|
|
136
|
-
const automations = [];
|
|
137
|
-
for (const automation of merged.automations) {
|
|
138
|
-
automations.push(await this.gameModel.upsertAutomation(automation));
|
|
139
|
-
}
|
|
140
|
-
const automationTriggers = [];
|
|
141
|
-
for (const trigger of merged.automationTriggers) {
|
|
142
|
-
automationTriggers.push(await this.gameModel.upsertAutomationTrigger(trigger));
|
|
143
|
-
}
|
|
144
|
-
const engines = [];
|
|
145
|
-
for (const entry of options.engines ?? []) {
|
|
146
|
-
if (!this.compute) {
|
|
147
|
-
throw new Error('kit.deploy engines requires the compute domain (createCrowdyClient default)');
|
|
148
|
-
}
|
|
149
|
-
const [templateName, moduleOverride] = entry.split(':');
|
|
150
|
-
const module = await this.compute.deployTemplate({
|
|
151
|
-
appId: this.appId,
|
|
152
|
-
templateName,
|
|
153
|
-
...(moduleOverride ? { moduleName: moduleOverride } : {}),
|
|
154
|
-
});
|
|
155
|
-
let compileStatus = 'pending';
|
|
156
|
-
if (options.waitForEngines !== false) {
|
|
157
|
-
const compiled = await this.compute.waitForCompile(this.appId, module.name);
|
|
158
|
-
compileStatus = compiled.compileStatus;
|
|
159
|
-
}
|
|
160
|
-
engines.push({ templateName, moduleName: module.name, compileStatus });
|
|
161
|
-
}
|
|
162
|
-
return {
|
|
163
|
-
seed,
|
|
164
|
-
automations,
|
|
165
|
-
automationTriggers,
|
|
166
|
-
engines,
|
|
167
|
-
warnings: [...(seed.warnings ?? [])],
|
|
168
|
-
};
|
|
169
11
|
}
|
|
170
12
|
}
|
package/dist/kit/social.d.ts
CHANGED
|
@@ -36,9 +36,7 @@ export interface KitChatMessage {
|
|
|
36
36
|
* Runtime **social** helpers — parties, guilds, and chat rooms in familiar
|
|
37
37
|
* words, wrapped over the platform's teams (membership + roles) and
|
|
38
38
|
* channels (location-independent messaging) with realtime delivery via the
|
|
39
|
-
* UDP notification subscription.
|
|
40
|
-
* deployable is the optional {@link guildBlueprint} composite (guild hall +
|
|
41
|
-
* bank).
|
|
39
|
+
* UDP notification subscription. Nothing is deployed.
|
|
42
40
|
*
|
|
43
41
|
* Conventions: a party is a team named `party:<name>` paired with an
|
|
44
42
|
* equally-named channel; a guild is `guild:<name>` likewise. Guild
|
package/dist/kit/social.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"social.d.ts","sourceRoot":"","sources":["../../src/kit/social.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAGvD,qCAAqC;AACrC,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oEAAoE;IACpE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oEAAoE;IACpE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,+DAA+D;AAC/D,MAAM,WAAW,mBAAmB;IAClC,wDAAwD;IACxD,MAAM,EAAE,MAAM,CAAC;IACf,wEAAwE;IACxE,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,mDAAmD;AACnD,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,kEAAkE;IAClE,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB;AAED
|
|
1
|
+
{"version":3,"file":"social.d.ts","sourceRoot":"","sources":["../../src/kit/social.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;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AGG;yBAEM,mBAAmB,UAClB,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,WACzB,MAAM,EAAE;;;;;;;;0BA8F6l7oB,CAAC;;;;;;;;QArFjn7oB;;;;;WAKG;gCAEM,mBAAmB,UAClB,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,YACzB;YAAE,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;YAAC,WAAW,CAAC,EAAE,MAAM,CAAA;SAAE;;;;;;;;;MAY9D;IAEF,8DAA8D;IAC9D,QAAQ,CAAC,IAAI;QACX,4DAA4D;qBACzC,MAAM;;;;;;;;;;;;;QAOzB,wBAAwB;0BACA,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC;;;;;;;;0BAmD6gzjB,CAAC;;;;;;;;QA/ChkzjB;;;;WAIG;0BAEU,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,QAC/B,MAAM,KACX,OAAO,CAAC,OAAO,CAAC;QAQnB;;;WAGG;+BAEU,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,YAC3B,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,KAC1C,CAAC,MAAM,IAAI,CAAC;MAsBf;CACH"}
|
package/dist/kit/social.js
CHANGED
|
@@ -3,9 +3,7 @@ import { decodeBase64, encodeBase64, generateCrowdyUuid } from '../utils.js';
|
|
|
3
3
|
* Runtime **social** helpers — parties, guilds, and chat rooms in familiar
|
|
4
4
|
* words, wrapped over the platform's teams (membership + roles) and
|
|
5
5
|
* channels (location-independent messaging) with realtime delivery via the
|
|
6
|
-
* UDP notification subscription.
|
|
7
|
-
* deployable is the optional {@link guildBlueprint} composite (guild hall +
|
|
8
|
-
* bank).
|
|
6
|
+
* UDP notification subscription. Nothing is deployed.
|
|
9
7
|
*
|
|
10
8
|
* Conventions: a party is a team named `party:<name>` paired with an
|
|
11
9
|
* equally-named channel; a guild is `guild:<name>` likewise. Guild
|
package/dist/kit/wire.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Engine wire registry — the client mirror of
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
2
|
+
* Engine wire registry — the client mirror of `crowdy-game-kit-core::wire`
|
|
3
|
+
* (the actor pose layout and flag-bit registry the game engines emit, and
|
|
4
|
+
* hubs that keep a game's client parsers still send). Parity with the Rust
|
|
5
|
+
* crate is checked by the kit wire unit suite: any change here must land in
|
|
6
|
+
* kit-core first.
|
|
7
7
|
*
|
|
8
8
|
* 48-byte little-endian pose: pos f32 x3 (0..11), yaw/pitch f32 (12..19),
|
|
9
9
|
* velocity f32 x3 (20..31), flags u8 (32), held u8 (33), 34-35 reserved,
|
|
@@ -172,4 +172,15 @@ export interface RaceTimingEvent {
|
|
|
172
172
|
}
|
|
173
173
|
/** Parse a race-timing event; null when the payload is another type. */
|
|
174
174
|
export declare function parseRaceTimingEvent(bytes: Uint8Array): RaceTimingEvent | null;
|
|
175
|
+
/** A parsed type-98 zone-change event (a shrinking or moving play zone). */
|
|
176
|
+
export interface ZoneChangeEvent {
|
|
177
|
+
kind: string;
|
|
178
|
+
phase: number | null;
|
|
179
|
+
radiusNow: number;
|
|
180
|
+
centerX: number;
|
|
181
|
+
centerZ: number;
|
|
182
|
+
body: Record<string, unknown>;
|
|
183
|
+
}
|
|
184
|
+
/** Parse a zone-change event; null when the payload is another type. */
|
|
185
|
+
export declare function parseZoneChangeEvent(bytes: Uint8Array): ZoneChangeEvent | null;
|
|
175
186
|
//# sourceMappingURL=wire.d.ts.map
|
package/dist/kit/wire.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wire.d.ts","sourceRoot":"","sources":["../../src/kit/wire.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,eAAO,MAAM,UAAU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
*
|
|
2
|
+
* Engine wire registry — the client mirror of `crowdy-game-kit-core::wire`
|
|
3
|
+
* (the actor pose layout and flag-bit registry the game engines emit, and
|
|
4
|
+
* hubs that keep a game's client parsers still send). Parity with the Rust
|
|
5
|
+
* crate is checked by the kit wire unit suite: any change here must land in
|
|
6
|
+
* kit-core first.
|
|
7
7
|
*
|
|
8
8
|
* 48-byte little-endian pose: pos f32 x3 (0..11), yaw/pitch f32 (12..19),
|
|
9
9
|
* velocity f32 x3 (20..31), flags u8 (32), held u8 (33), 34-35 reserved,
|
|
@@ -264,3 +264,17 @@ export function parseRaceTimingEvent(bytes) {
|
|
|
264
264
|
body: parsed.body,
|
|
265
265
|
};
|
|
266
266
|
}
|
|
267
|
+
/** Parse a zone-change event; null when the payload is another type. */
|
|
268
|
+
export function parseZoneChangeEvent(bytes) {
|
|
269
|
+
const parsed = parseEngineEvent(bytes);
|
|
270
|
+
if (!parsed || parsed.eventType !== EVENT_ZONE_CHANGE)
|
|
271
|
+
return null;
|
|
272
|
+
return {
|
|
273
|
+
kind: String(parsed.body.kind ?? ''),
|
|
274
|
+
phase: parsed.body.phase != null ? Number(parsed.body.phase) : null,
|
|
275
|
+
radiusNow: Number(parsed.body.radiusNow ?? 0),
|
|
276
|
+
centerX: Number(parsed.body.centerX ?? 0),
|
|
277
|
+
centerZ: Number(parsed.body.centerZ ?? 0),
|
|
278
|
+
body: parsed.body,
|
|
279
|
+
};
|
|
280
|
+
}
|