@crowdedkingdoms/crowdyjs 8.7.0 → 8.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MIGRATION.md +85 -0
- package/README.md +2 -2
- package/dist/domains/compute.d.ts +12 -1
- package/dist/domains/compute.d.ts.map +1 -1
- package/dist/domains/compute.js +18 -1
- package/dist/generated/graphql.d.ts +60 -0
- package/dist/generated/graphql.d.ts.map +1 -1
- package/dist/generated/graphql.js +2 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/kit/abilities.d.ts +66 -0
- package/dist/kit/abilities.d.ts.map +1 -0
- package/dist/kit/abilities.js +71 -0
- package/dist/kit/blueprints/index.d.ts +2 -0
- package/dist/kit/blueprints/index.d.ts.map +1 -1
- package/dist/kit/blueprints/index.js +2 -0
- package/dist/kit/blueprints/liveops.d.ts +42 -0
- package/dist/kit/blueprints/liveops.d.ts.map +1 -0
- package/dist/kit/blueprints/liveops.js +170 -0
- package/dist/kit/blueprints/moderation.d.ts +32 -0
- package/dist/kit/blueprints/moderation.d.ts.map +1 -0
- package/dist/kit/blueprints/moderation.js +140 -0
- package/dist/kit/decks.d.ts +33 -1
- package/dist/kit/decks.d.ts.map +1 -1
- package/dist/kit/decks.js +49 -1
- package/dist/kit/director.d.ts +88 -0
- package/dist/kit/director.d.ts.map +1 -0
- package/dist/kit/director.js +86 -0
- package/dist/kit/economy.d.ts +46 -1
- package/dist/kit/economy.d.ts.map +1 -1
- package/dist/kit/economy.js +63 -1
- package/dist/kit/index.d.ts +14 -3
- package/dist/kit/index.d.ts.map +1 -1
- package/dist/kit/index.js +14 -3
- package/dist/kit/instances.d.ts +52 -0
- package/dist/kit/instances.d.ts.map +1 -0
- package/dist/kit/instances.js +60 -0
- package/dist/kit/kit.d.ts +60 -0
- package/dist/kit/kit.d.ts.map +1 -1
- package/dist/kit/kit.js +47 -5
- package/dist/kit/leaderboards.d.ts +21 -1
- package/dist/kit/leaderboards.d.ts.map +1 -1
- package/dist/kit/leaderboards.js +40 -1
- package/dist/kit/liveops.d.ts +112 -0
- package/dist/kit/liveops.d.ts.map +1 -0
- package/dist/kit/liveops.js +183 -0
- package/dist/kit/loot.d.ts +22 -1
- package/dist/kit/loot.d.ts.map +1 -1
- package/dist/kit/loot.js +41 -1
- package/dist/kit/matches.d.ts +33 -1
- package/dist/kit/matches.d.ts.map +1 -1
- package/dist/kit/matches.js +56 -1
- package/dist/kit/matchmaking.d.ts +57 -0
- package/dist/kit/matchmaking.d.ts.map +1 -0
- package/dist/kit/matchmaking.js +59 -0
- package/dist/kit/minigames.d.ts +30 -0
- package/dist/kit/minigames.d.ts.map +1 -0
- package/dist/kit/minigames.js +38 -0
- package/dist/kit/moderation.d.ts +73 -0
- package/dist/kit/moderation.d.ts.map +1 -0
- package/dist/kit/moderation.js +103 -0
- package/dist/kit/movement.d.ts +78 -0
- package/dist/kit/movement.d.ts.map +1 -0
- package/dist/kit/movement.js +103 -0
- package/dist/kit/npcs.d.ts.map +1 -1
- package/dist/kit/quests.d.ts +57 -0
- package/dist/kit/quests.d.ts.map +1 -1
- package/dist/kit/quests.js +72 -0
- package/dist/kit/racing.d.ts +85 -0
- package/dist/kit/racing.d.ts.map +1 -0
- package/dist/kit/racing.js +99 -0
- package/dist/kit/social.d.ts.map +1 -1
- package/dist/kit/telemetry.d.ts +66 -0
- package/dist/kit/telemetry.d.ts.map +1 -0
- package/dist/kit/telemetry.js +133 -0
- package/dist/kit/territory.d.ts +97 -0
- package/dist/kit/territory.d.ts.map +1 -0
- package/dist/kit/territory.js +114 -0
- package/dist/kit/wire.d.ts +88 -0
- package/dist/kit/wire.d.ts.map +1 -1
- package/dist/kit/wire.js +110 -0
- package/package.json +1 -1
package/dist/kit/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { andPolicies, combatBlueprint, combatNames, composeBlueprints, decksBlueprint, decksNames, economyBlueprint, economyCurrencyFn, economyNames, featureGate, guildBlueprint, guildNames, inventoryBlueprint, inventoryNames, kitPolicyJson, leaderboardsBlueprint, leaderboardsNames, lockBlueprint, lockNames, lootBlueprint, lootNames, lootRollFn, matchesBlueprint, matchesNames, mergeBlueprints, npcBehaviorFunctionName, npcBlueprint, ownerEquals, ownerEqualsCaller, ownerMirrorProperty, plotBlueprint, plotNames, progressionBlueprint, progressionNames, questsBlueprint, questsNames, toSnakeCase, trustedAuthorityFields, worldsimBlueprint, worldsimNames, type CombatBlueprintOptions, type CombatNames, type DecksBlueprintOptions, type DecksNames, type EconomyBlueprintOptions, type EconomyNames, type GuildBlueprintOptions, type GuildNames, type InventoryBlueprintOptions, type InventoryNames, type KitAutomationSpec, type KitAutomationTriggerSpec, type KitBlueprint, type KitInvokePolicy, type KitOwnerIdKind, type KitSelectorSpec, type KitTrustedAuthority, type LeaderboardsBlueprintOptions, type LeaderboardsNames, type LockAuthority, type LockBlueprintOptions, type LockNames, type LootBlueprintOptions, type LootDropSpec, type LootEntrySpec, type LootNames, type LootTableSpec, type MatchesBlueprintOptions, type MatchesNames, type MergedBlueprints, type NpcBehaviorSpec, type NpcBehaviorTrigger, type NpcBlueprintOptions, type PlotBlueprintOptions, type PlotNames, type ProgressionBlueprintOptions, type ProgressionNames, type QuestAdvanceSpec, type QuestsBlueprintOptions, type QuestsNames, type SelectorPermissionPredicate, type WorldsimBlueprintOptions, type WorldsimNames, } from './blueprints/index.js';
|
|
1
|
+
export { andPolicies, combatBlueprint, combatNames, composeBlueprints, decksBlueprint, decksNames, economyBlueprint, economyCurrencyFn, economyNames, featureGate, guildBlueprint, guildNames, inventoryBlueprint, inventoryNames, kitPolicyJson, leaderboardsBlueprint, leaderboardsNames, lockBlueprint, lockNames, lootBlueprint, lootNames, lootRollFn, matchesBlueprint, matchesNames, mergeBlueprints, npcBehaviorFunctionName, npcBlueprint, ownerEquals, ownerEqualsCaller, ownerMirrorProperty, plotBlueprint, plotNames, progressionBlueprint, progressionNames, questsBlueprint, questsNames, toSnakeCase, trustedAuthorityFields, worldsimBlueprint, worldsimNames, type CombatBlueprintOptions, type CombatNames, type DecksBlueprintOptions, type DecksNames, type EconomyBlueprintOptions, type EconomyNames, type GuildBlueprintOptions, type GuildNames, type InventoryBlueprintOptions, type InventoryNames, type KitAutomationSpec, type KitAutomationTriggerSpec, type KitBlueprint, type KitInvokePolicy, type KitOwnerIdKind, type KitSelectorSpec, type KitTrustedAuthority, type LeaderboardsBlueprintOptions, type LeaderboardsNames, type LockAuthority, type LockBlueprintOptions, type LockNames, type LootBlueprintOptions, type LootDropSpec, type LootEntrySpec, type LootNames, type LootTableSpec, type MatchesBlueprintOptions, type MatchesNames, type MergedBlueprints, type NpcBehaviorSpec, type NpcBehaviorTrigger, type NpcBlueprintOptions, type PlotBlueprintOptions, type PlotNames, type ProgressionBlueprintOptions, type ProgressionNames, type QuestAdvanceSpec, type QuestsBlueprintOptions, type QuestsNames, type SelectorPermissionPredicate, type WorldsimBlueprintOptions, type WorldsimNames, liveopsBlueprint, liveopsNames, type LiveopsBlueprintOptions, type LiveopsNames, moderationBlueprint, moderationNames, type ModerationBlueprintOptions, type ModerationNames, } from './blueprints/index.js';
|
|
2
2
|
export { GameKitClient, type GameKitDomains, type GameKitOptions, type KitDeployResult, } from './kit.js';
|
|
3
3
|
export { MatchesKit, type KitMatch, type KitMatchScore, type MatchesKitOptions, } from './matches.js';
|
|
4
4
|
export { InventoryKit, type InventoryKitOptions, type KitItemStack } from './inventory.js';
|
|
5
5
|
export { CombatKit, type CombatKitOptions, type KitCombatant, type KitRoutedAttack, type KitStatusEffect, } from './combat.js';
|
|
6
6
|
export { DecksKit, type DecksKitOptions, type KitCard } from './decks.js';
|
|
7
7
|
export { FeaturesKit } from './features.js';
|
|
8
|
-
export { EconomyKit, type EconomyKitOptions, type KitMarketListing, type KitShopListing, type KitTradeOffer, type KitWallet, } from './economy.js';
|
|
8
|
+
export { EconomyKit, MarketKit, type EconomyKitOptions, type KitMarketListing, type KitShopListing, type KitTradeOffer, type KitWallet, } from './economy.js';
|
|
9
9
|
export { LeaderboardsKit, type KitLeaderboardEntry, type LeaderboardsKitOptions, } from './leaderboards.js';
|
|
10
10
|
export { LootKit, type KitLootRoll, type LootKitOptions } from './loot.js';
|
|
11
11
|
export { ObjectsKit, type ObjectsKitOptions } from './objects.js';
|
|
@@ -13,7 +13,18 @@ export { NpcsKit, type KitNpc, type LiveNpcPose, type NpcsKitOptions, } from './
|
|
|
13
13
|
export { MobsKit, type KitAttackResult, type KitMobDef, type KitMobSlot, type MobsKitOptions, } from './mobs.js';
|
|
14
14
|
export { PetsKit, type KitPet, type KitPetResult, type PetsKitOptions, } from './pets.js';
|
|
15
15
|
export { EngineDetector, type EngineInvokeResult } from './engine.js';
|
|
16
|
-
export {
|
|
16
|
+
export { LiveopsKit, type KitEventWindow, type KitSeason, type LiveopsKitOptions, type ZoneChangeEvent, } from './liveops.js';
|
|
17
|
+
export { AbilitiesKit, type AbilitiesKitOptions, type KitAbility, } from './abilities.js';
|
|
18
|
+
export { MovementKit, type KitViolations, type MovementKitOptions, } from './movement.js';
|
|
19
|
+
export { TerritoryKit, type KitControlPoint, type TerritoryKitOptions, } from './territory.js';
|
|
20
|
+
export { RacingKit, type KitRaceRun, type RacingKitOptions, } from './racing.js';
|
|
21
|
+
export { ModerationKit, type KitModReport, type ModerationKitOptions, } from './moderation.js';
|
|
22
|
+
export { TelemetryKit, telemetryBlueprint, type TelemetryKitOptions, } from './telemetry.js';
|
|
23
|
+
export { InstancesKit, type InstancesKitOptions, type KitInstance, } from './instances.js';
|
|
24
|
+
export { DirectorKit, type DirectorKitOptions, type KitDirectorRun, type KitWaveSpec, } from './director.js';
|
|
25
|
+
export { MatchmakingKit, type KitQueueStatus, type MatchmakingKitOptions, } from './matchmaking.js';
|
|
26
|
+
export { MinigamesKit, type MinigamesKitOptions } from './minigames.js';
|
|
27
|
+
export { EVENT_CONTACT_DAMAGE, EVENT_WEATHER, FLAG_GROUNDED, FLAG_MOB, FLAG_NPC, FLAG_RESERVED3, POSE_BYTES, decodeEnginePose, encodeEnginePose, engineLanes, enginePoseCodec, parseAbilityEvent, parseContactDamage, parseControlPointEvent, parseEngineEvent, parseMovementViolation, parseProposalEvent, parseRaceTimingEvent, parseScoreEvent, parseTurnEvent, parseWeatherEvent, poseSuffix, EVENT_ABILITY, EVENT_CONTROL_POINT, EVENT_MOVEMENT_VIOLATION, EVENT_PROPOSAL, EVENT_RACE_TIMING, EVENT_SCORE, EVENT_TURN, EVENT_ZONE_CHANGE, type AbilityEvent, type ContactDamageEvent, type ControlPointEvent, type EnginePose, type MovementViolationEvent, type ProposalEvent, type RaceTimingEvent, type ScoreEvent, type TurnEvent, type WeatherEvent, } from './wire.js';
|
|
17
28
|
export { PlotsKit, type PlotsKitOptions, type KitPlot } from './plots.js';
|
|
18
29
|
export { QuestsKit, type KitQuestDef, type KitQuestProgress, type QuestsKitOptions, } from './quests.js';
|
|
19
30
|
export { ProgressionKit, type KitAchievementDef, type KitAchievementUnlock, type KitProgress, type KitSkillDef, type KitSkillRank, type ProgressionKitOptions, } from './progression.js';
|
package/dist/kit/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/kit/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,WAAW,EACX,cAAc,EACd,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,SAAS,EACT,aAAa,EACb,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,uBAAuB,EACvB,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACb,SAAS,EACT,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,WAAW,EACX,sBAAsB,EACtB,iBAAiB,EACjB,aAAa,EACb,KAAK,sBAAsB,EAC3B,KAAK,WAAW,EAChB,KAAK,qBAAqB,EAC1B,KAAK,UAAU,EACf,KAAK,uBAAuB,EAC5B,KAAK,YAAY,EACjB,KAAK,qBAAqB,EAC1B,KAAK,UAAU,EACf,KAAK,yBAAyB,EAC9B,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,4BAA4B,EACjC,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACd,KAAK,oBAAoB,EACzB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,uBAAuB,EAC5B,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACd,KAAK,2BAA2B,EAChC,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,WAAW,EAChB,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/kit/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,WAAW,EACX,cAAc,EACd,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,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+1,11 @@
|
|
|
1
|
-
export { andPolicies, combatBlueprint, combatNames, composeBlueprints, decksBlueprint, decksNames, economyBlueprint, economyCurrencyFn, economyNames, featureGate, guildBlueprint, guildNames, inventoryBlueprint, inventoryNames, kitPolicyJson, leaderboardsBlueprint, leaderboardsNames, lockBlueprint, lockNames, lootBlueprint, lootNames, lootRollFn, matchesBlueprint, matchesNames, mergeBlueprints, npcBehaviorFunctionName, npcBlueprint, ownerEquals, ownerEqualsCaller, ownerMirrorProperty, plotBlueprint, plotNames, progressionBlueprint, progressionNames, questsBlueprint, questsNames, toSnakeCase, trustedAuthorityFields, worldsimBlueprint, worldsimNames, } from './blueprints/index.js';
|
|
1
|
+
export { andPolicies, combatBlueprint, combatNames, composeBlueprints, decksBlueprint, decksNames, economyBlueprint, economyCurrencyFn, economyNames, featureGate, guildBlueprint, guildNames, inventoryBlueprint, inventoryNames, kitPolicyJson, leaderboardsBlueprint, leaderboardsNames, lockBlueprint, lockNames, lootBlueprint, lootNames, lootRollFn, matchesBlueprint, matchesNames, mergeBlueprints, npcBehaviorFunctionName, npcBlueprint, ownerEquals, ownerEqualsCaller, ownerMirrorProperty, plotBlueprint, plotNames, progressionBlueprint, progressionNames, questsBlueprint, questsNames, toSnakeCase, trustedAuthorityFields, worldsimBlueprint, worldsimNames, liveopsBlueprint, liveopsNames, moderationBlueprint, moderationNames, } from './blueprints/index.js';
|
|
2
2
|
export { GameKitClient, } from './kit.js';
|
|
3
3
|
export { MatchesKit, } from './matches.js';
|
|
4
4
|
export { InventoryKit } from './inventory.js';
|
|
5
5
|
export { CombatKit, } from './combat.js';
|
|
6
6
|
export { DecksKit } from './decks.js';
|
|
7
7
|
export { FeaturesKit } from './features.js';
|
|
8
|
-
export { EconomyKit, } from './economy.js';
|
|
8
|
+
export { EconomyKit, MarketKit, } from './economy.js';
|
|
9
9
|
export { LeaderboardsKit, } from './leaderboards.js';
|
|
10
10
|
export { LootKit } from './loot.js';
|
|
11
11
|
export { ObjectsKit } from './objects.js';
|
|
@@ -13,7 +13,18 @@ export { NpcsKit, } from './npcs.js';
|
|
|
13
13
|
export { MobsKit, } from './mobs.js';
|
|
14
14
|
export { PetsKit, } from './pets.js';
|
|
15
15
|
export { EngineDetector } from './engine.js';
|
|
16
|
-
export {
|
|
16
|
+
export { LiveopsKit, } from './liveops.js';
|
|
17
|
+
export { AbilitiesKit, } from './abilities.js';
|
|
18
|
+
export { MovementKit, } from './movement.js';
|
|
19
|
+
export { TerritoryKit, } from './territory.js';
|
|
20
|
+
export { RacingKit, } from './racing.js';
|
|
21
|
+
export { ModerationKit, } from './moderation.js';
|
|
22
|
+
export { TelemetryKit, telemetryBlueprint, } from './telemetry.js';
|
|
23
|
+
export { InstancesKit, } from './instances.js';
|
|
24
|
+
export { DirectorKit, } from './director.js';
|
|
25
|
+
export { MatchmakingKit, } from './matchmaking.js';
|
|
26
|
+
export { MinigamesKit } from './minigames.js';
|
|
27
|
+
export { EVENT_CONTACT_DAMAGE, EVENT_WEATHER, FLAG_GROUNDED, FLAG_MOB, FLAG_NPC, FLAG_RESERVED3, POSE_BYTES, decodeEnginePose, encodeEnginePose, engineLanes, enginePoseCodec, parseAbilityEvent, parseContactDamage, parseControlPointEvent, parseEngineEvent, parseMovementViolation, parseProposalEvent, parseRaceTimingEvent, parseScoreEvent, parseTurnEvent, parseWeatherEvent, poseSuffix, EVENT_ABILITY, EVENT_CONTROL_POINT, EVENT_MOVEMENT_VIOLATION, EVENT_PROPOSAL, EVENT_RACE_TIMING, EVENT_SCORE, EVENT_TURN, EVENT_ZONE_CHANGE, } from './wire.js';
|
|
17
28
|
export { PlotsKit } from './plots.js';
|
|
18
29
|
export { QuestsKit, } from './quests.js';
|
|
19
30
|
export { ProgressionKit, } from './progression.js';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { Scalars } from '../generated/graphql.js';
|
|
2
|
+
import type { EngineDetector } from './engine.js';
|
|
3
|
+
/** Options for {@link InstancesKit}. */
|
|
4
|
+
export interface InstancesKitOptions {
|
|
5
|
+
/** The instance-engine module name. Defaults to `'instance-engine'`. */
|
|
6
|
+
moduleName?: string;
|
|
7
|
+
}
|
|
8
|
+
/** A parsed instance (private world slice). */
|
|
9
|
+
export interface KitInstance {
|
|
10
|
+
instanceId: string;
|
|
11
|
+
name: string;
|
|
12
|
+
creator: string;
|
|
13
|
+
members: string[];
|
|
14
|
+
/** Decimal string (u64 seeds exceed JS safe integers). */
|
|
15
|
+
seed: string;
|
|
16
|
+
status: string;
|
|
17
|
+
outcome: string;
|
|
18
|
+
sessionId: string;
|
|
19
|
+
containerId: string;
|
|
20
|
+
/** Reserved chunk-volume corner [x, y, z]. */
|
|
21
|
+
chunkBase: [number, number, number];
|
|
22
|
+
volumeChunks: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Runtime helpers for the instance-engine (Wave 2): private world slices
|
|
26
|
+
* with lifecycle (open/join/complete), per-run seeds for deterministic
|
|
27
|
+
* procedural content, and reserved disjoint chunk volumes. v1 spatial
|
|
28
|
+
* isolation is by-convention (disjoint volumes + distance-scoped emits).
|
|
29
|
+
*
|
|
30
|
+
* Obtained via `client.kit(appId).instances`.
|
|
31
|
+
*/
|
|
32
|
+
export declare class InstancesKit {
|
|
33
|
+
private readonly engines;
|
|
34
|
+
private readonly moduleName;
|
|
35
|
+
constructor(_appId: Scalars['BigInt']['input'], engines: EngineDetector, options?: InstancesKitOptions);
|
|
36
|
+
/** Is the instance engine deployed + enabled (cached per session)? */
|
|
37
|
+
engineAvailable(): Promise<boolean>;
|
|
38
|
+
/** Open a new instance (caller becomes creator + first member). */
|
|
39
|
+
open(input?: {
|
|
40
|
+
name?: string;
|
|
41
|
+
seed?: string;
|
|
42
|
+
sessionId?: string;
|
|
43
|
+
}): Promise<KitInstance>;
|
|
44
|
+
/** Join an open instance. */
|
|
45
|
+
join(instanceId: string): Promise<KitInstance>;
|
|
46
|
+
/** Complete an instance (member-only; announces `instance_completed`). */
|
|
47
|
+
complete(instanceId: string, outcome?: string): Promise<KitInstance>;
|
|
48
|
+
/** One instance's state (or the engine's totals without an id). */
|
|
49
|
+
state(instanceId?: string): Promise<KitInstance | Record<string, unknown>>;
|
|
50
|
+
private invoke;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=instances.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instances.d.ts","sourceRoot":"","sources":["../../src/kit/instances.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAsB,MAAM,aAAa,CAAC;AAEtE,wCAAwC;AACxC,MAAM,WAAW,mBAAmB;IAClC,wEAAwE;IACxE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,+CAA+C;AAC/C,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,8CAA8C;IAC9C,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,YAAY,EAAE,MAAM,CAAC;CACtB;AAsBD;;;;;;;GAOG;AACH,qBAAa,YAAY;IAKrB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAJ1B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;gBAGlC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,EACjB,OAAO,EAAE,cAAc,EACxC,OAAO,GAAE,mBAAwB;IAKnC,sEAAsE;IACtE,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC;IAInC,mEAAmE;IAC7D,IAAI,CAAC,KAAK,GAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,OAAO,CAAC,WAAW,CAAC;IAKlG,6BAA6B;IACvB,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAKpD,0EAA0E;IACpE,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAK1E,mEAAmE;IAC7D,KAAK,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YAKlE,MAAM;CAUrB"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
function toInstance(body) {
|
|
2
|
+
return {
|
|
3
|
+
instanceId: String(body.instanceId ?? ''),
|
|
4
|
+
name: String(body.name ?? ''),
|
|
5
|
+
creator: String(body.creator ?? ''),
|
|
6
|
+
members: Array.isArray(body.members) ? body.members.map(String) : [],
|
|
7
|
+
seed: String(body.seed ?? '0'),
|
|
8
|
+
status: String(body.status ?? ''),
|
|
9
|
+
outcome: String(body.outcome ?? ''),
|
|
10
|
+
sessionId: String(body.sessionId ?? ''),
|
|
11
|
+
containerId: String(body.containerId ?? ''),
|
|
12
|
+
chunkBase: (Array.isArray(body.chunkBase) ? body.chunkBase : [0, 0, 0]).map(Number),
|
|
13
|
+
volumeChunks: Number(body.volumeChunks ?? 0),
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Runtime helpers for the instance-engine (Wave 2): private world slices
|
|
18
|
+
* with lifecycle (open/join/complete), per-run seeds for deterministic
|
|
19
|
+
* procedural content, and reserved disjoint chunk volumes. v1 spatial
|
|
20
|
+
* isolation is by-convention (disjoint volumes + distance-scoped emits).
|
|
21
|
+
*
|
|
22
|
+
* Obtained via `client.kit(appId).instances`.
|
|
23
|
+
*/
|
|
24
|
+
export class InstancesKit {
|
|
25
|
+
constructor(_appId, engines, options = {}) {
|
|
26
|
+
this.engines = engines;
|
|
27
|
+
this.moduleName = options.moduleName ?? 'instance-engine';
|
|
28
|
+
}
|
|
29
|
+
/** Is the instance engine deployed + enabled (cached per session)? */
|
|
30
|
+
engineAvailable() {
|
|
31
|
+
return this.engines.has(this.moduleName);
|
|
32
|
+
}
|
|
33
|
+
/** Open a new instance (caller becomes creator + first member). */
|
|
34
|
+
async open(input = {}) {
|
|
35
|
+
const result = await this.invoke('open', input);
|
|
36
|
+
return toInstance(result.body);
|
|
37
|
+
}
|
|
38
|
+
/** Join an open instance. */
|
|
39
|
+
async join(instanceId) {
|
|
40
|
+
const result = await this.invoke('join', { instanceId });
|
|
41
|
+
return toInstance(result.body);
|
|
42
|
+
}
|
|
43
|
+
/** Complete an instance (member-only; announces `instance_completed`). */
|
|
44
|
+
async complete(instanceId, outcome) {
|
|
45
|
+
const result = await this.invoke('complete', { instanceId, outcome });
|
|
46
|
+
return toInstance(result.body);
|
|
47
|
+
}
|
|
48
|
+
/** One instance's state (or the engine's totals without an id). */
|
|
49
|
+
async state(instanceId) {
|
|
50
|
+
const result = await this.invoke('state', instanceId ? { instanceId } : {});
|
|
51
|
+
return instanceId ? toInstance(result.body) : result.body;
|
|
52
|
+
}
|
|
53
|
+
async invoke(exportName, params) {
|
|
54
|
+
const result = await this.engines.invoke(this.moduleName, exportName, params);
|
|
55
|
+
if (!result.success) {
|
|
56
|
+
throw new Error(`instances.${exportName} failed: ${result.reason ?? 'unknown'}`);
|
|
57
|
+
}
|
|
58
|
+
return result;
|
|
59
|
+
}
|
|
60
|
+
}
|
package/dist/kit/kit.d.ts
CHANGED
|
@@ -7,13 +7,17 @@ import type { GameModelSeedMutation, GameModelUpsertAutomationMutation, GameMode
|
|
|
7
7
|
import type { ComputeAPI } from '../domains/compute.js';
|
|
8
8
|
import { type KitBlueprint } from './blueprints/index.js';
|
|
9
9
|
import { CombatKit, type CombatKitOptions } from './combat.js';
|
|
10
|
+
import { DirectorKit, type DirectorKitOptions } from './director.js';
|
|
10
11
|
import { DecksKit, type DecksKitOptions } from './decks.js';
|
|
11
12
|
import { EconomyKit, type EconomyKitOptions } from './economy.js';
|
|
12
13
|
import { EngineDetector } from './engine.js';
|
|
13
14
|
import { FeaturesKit } from './features.js';
|
|
15
|
+
import { InstancesKit, type InstancesKitOptions } from './instances.js';
|
|
14
16
|
import { InventoryKit, type InventoryKitOptions } from './inventory.js';
|
|
15
17
|
import { LeaderboardsKit, type LeaderboardsKitOptions } from './leaderboards.js';
|
|
16
18
|
import { LootKit, type LootKitOptions } from './loot.js';
|
|
19
|
+
import { MatchmakingKit, type MatchmakingKitOptions } from './matchmaking.js';
|
|
20
|
+
import { MinigamesKit, type MinigamesKitOptions } from './minigames.js';
|
|
17
21
|
import { MobsKit, type MobsKitOptions } from './mobs.js';
|
|
18
22
|
import { NpcsKit, type NpcsKitOptions } from './npcs.js';
|
|
19
23
|
import { ObjectsKit, type ObjectsKitOptions } from './objects.js';
|
|
@@ -23,6 +27,13 @@ import { MatchesKit, type MatchesKitOptions } from './matches.js';
|
|
|
23
27
|
import { ProgressionKit, type ProgressionKitOptions } from './progression.js';
|
|
24
28
|
import { QuestsKit, type QuestsKitOptions } from './quests.js';
|
|
25
29
|
import { SocialKit, type SocialKitOptions } from './social.js';
|
|
30
|
+
import { AbilitiesKit, type AbilitiesKitOptions } from './abilities.js';
|
|
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';
|
|
26
37
|
import { WorldsimKit, type WorldsimKitOptions } from './worldsim.js';
|
|
27
38
|
/** Options for {@link GameKitClient}, configuring the runtime helpers to match your deployed blueprints. */
|
|
28
39
|
export interface GameKitOptions {
|
|
@@ -38,10 +49,21 @@ export interface GameKitOptions {
|
|
|
38
49
|
matches?: MatchesKitOptions;
|
|
39
50
|
decks?: DecksKitOptions;
|
|
40
51
|
worldsim?: WorldsimKitOptions;
|
|
52
|
+
liveops?: LiveopsKitOptions;
|
|
53
|
+
moderation?: ModerationKitOptions;
|
|
54
|
+
telemetry?: TelemetryKitOptions;
|
|
55
|
+
abilities?: AbilitiesKitOptions;
|
|
56
|
+
movement?: MovementKitOptions;
|
|
57
|
+
territory?: TerritoryKitOptions;
|
|
58
|
+
racing?: RacingKitOptions;
|
|
41
59
|
social?: SocialKitOptions;
|
|
42
60
|
leaderboards?: LeaderboardsKitOptions;
|
|
43
61
|
mobs?: MobsKitOptions;
|
|
44
62
|
pets?: PetsKitOptions;
|
|
63
|
+
instances?: InstancesKitOptions;
|
|
64
|
+
director?: DirectorKitOptions;
|
|
65
|
+
matchmaking?: MatchmakingKitOptions;
|
|
66
|
+
minigames?: MinigamesKitOptions;
|
|
45
67
|
}
|
|
46
68
|
/**
|
|
47
69
|
* The extra (non-model) domains some kit helpers compose: channels + udp for
|
|
@@ -60,6 +82,12 @@ export interface KitDeployResult {
|
|
|
60
82
|
seed: GameModelSeedMutation['gameModelSeed'];
|
|
61
83
|
automations: GameModelUpsertAutomationMutation['gameModelUpsertAutomation'][];
|
|
62
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
|
+
}>;
|
|
63
91
|
/** Non-fatal static-analysis warnings from the seed. */
|
|
64
92
|
warnings: string[];
|
|
65
93
|
}
|
|
@@ -128,6 +156,20 @@ export declare class GameKitClient {
|
|
|
128
156
|
readonly decks: DecksKit;
|
|
129
157
|
/** World simulation helpers (clock/weather, nodes, crops, wave counters). */
|
|
130
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;
|
|
131
173
|
/** Social helpers (parties, guilds, chat over teams + channels). */
|
|
132
174
|
readonly social: SocialKit;
|
|
133
175
|
/** Leaderboard helpers (trusted submits, client-side ranking, seasons). */
|
|
@@ -136,10 +178,19 @@ export declare class GameKitClient {
|
|
|
136
178
|
readonly features: FeaturesKit;
|
|
137
179
|
/** Mob-engine helpers (defs/slots, refereed attacks, contact events). */
|
|
138
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;
|
|
139
189
|
/** Pet helpers (adopt/summon/dismiss/rename over the npc engine). */
|
|
140
190
|
readonly pets: PetsKit;
|
|
141
191
|
/** Compute-engine capability detection shared by the engine-aware kits. */
|
|
142
192
|
readonly engines: EngineDetector;
|
|
193
|
+
private readonly compute?;
|
|
143
194
|
constructor(appId: Scalars['BigInt']['input'], gameModel: GameModelAPI, gameApps: GameAppsAPI, options?: GameKitOptions, domains?: GameKitDomains);
|
|
144
195
|
/**
|
|
145
196
|
* Helpers for an additional lockable object type deployed under a different
|
|
@@ -166,6 +217,15 @@ export declare class GameKitClient {
|
|
|
166
217
|
*/
|
|
167
218
|
deploy(blueprints: KitBlueprint | KitBlueprint[], options?: {
|
|
168
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;
|
|
169
229
|
}): Promise<KitDeployResult>;
|
|
170
230
|
}
|
|
171
231
|
//# 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,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM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,CAAC,EAAE,MAAM,CAAC;QACnB;;;;;WAKG;QACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;QACnB,+CAA+C;QAC/C,cAAc,CAAC,EAAE,OAAO,CAAC;KACrB,GACL,OAAO,CAAC,eAAe,CAAC;CA0C5B"}
|
package/dist/kit/kit.js
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { mergeBlueprints } from './blueprints/index.js';
|
|
2
2
|
import { CombatKit } from './combat.js';
|
|
3
|
+
import { DirectorKit } from './director.js';
|
|
3
4
|
import { DecksKit } from './decks.js';
|
|
4
5
|
import { EconomyKit } from './economy.js';
|
|
5
6
|
import { EngineDetector } from './engine.js';
|
|
6
7
|
import { FeaturesKit } from './features.js';
|
|
8
|
+
import { InstancesKit } from './instances.js';
|
|
7
9
|
import { InventoryKit } from './inventory.js';
|
|
8
10
|
import { LeaderboardsKit } from './leaderboards.js';
|
|
9
11
|
import { LootKit } from './loot.js';
|
|
12
|
+
import { MatchmakingKit } from './matchmaking.js';
|
|
13
|
+
import { MinigamesKit } from './minigames.js';
|
|
10
14
|
import { MobsKit } from './mobs.js';
|
|
11
15
|
import { NpcsKit } from './npcs.js';
|
|
12
16
|
import { ObjectsKit } from './objects.js';
|
|
@@ -16,6 +20,13 @@ import { MatchesKit } from './matches.js';
|
|
|
16
20
|
import { ProgressionKit } from './progression.js';
|
|
17
21
|
import { QuestsKit } from './quests.js';
|
|
18
22
|
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';
|
|
19
30
|
import { WorldsimKit } from './worldsim.js';
|
|
20
31
|
/**
|
|
21
32
|
* App-scoped **Game Kit** facade returned by `client.kit(appId)` — high-level
|
|
@@ -59,23 +70,35 @@ export class GameKitClient {
|
|
|
59
70
|
constructor(appId, gameModel, gameApps, options = {}, domains = {}) {
|
|
60
71
|
this.appId = appId;
|
|
61
72
|
this.gameModel = gameModel;
|
|
73
|
+
this.compute = domains.compute;
|
|
62
74
|
this.engines = new EngineDetector(String(appId), domains.compute);
|
|
63
75
|
this.inventory = new InventoryKit(appId, gameModel, options.inventory);
|
|
64
76
|
this.objects = new ObjectsKit(appId, gameModel, options.objects);
|
|
65
77
|
this.npcs = new NpcsKit(appId, gameModel, options.npcs, this.engines);
|
|
66
78
|
this.plots = new PlotsKit(appId, gameModel, gameApps, options.plots);
|
|
67
|
-
this.economy = new EconomyKit(appId, gameModel, options.economy);
|
|
79
|
+
this.economy = new EconomyKit(appId, gameModel, options.economy, this.engines);
|
|
68
80
|
this.progression = new ProgressionKit(appId, gameModel, options.progression);
|
|
69
|
-
this.loot = new LootKit(appId, gameModel, options.loot);
|
|
81
|
+
this.loot = new LootKit(appId, gameModel, options.loot, this.engines);
|
|
70
82
|
this.quests = new QuestsKit(appId, gameModel, options.quests);
|
|
71
83
|
this.combat = new CombatKit(appId, gameModel, options.combat, this.engines);
|
|
72
|
-
this.matches = new MatchesKit(appId, gameModel, domains.channels, domains.udp, options.matches);
|
|
73
|
-
this.decks = new DecksKit(appId, gameModel, options.decks);
|
|
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);
|
|
74
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);
|
|
75
94
|
this.mobs = new MobsKit(appId, gameModel, this.engines, options.mobs);
|
|
76
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);
|
|
77
100
|
this.social = new SocialKit(appId, domains.teams, domains.channels, domains.udp, gameApps, options.social);
|
|
78
|
-
this.leaderboards = new LeaderboardsKit(appId, gameModel, options.leaderboards);
|
|
101
|
+
this.leaderboards = new LeaderboardsKit(appId, gameModel, options.leaderboards, this.engines);
|
|
79
102
|
this.features = new FeaturesKit(appId, gameModel);
|
|
80
103
|
}
|
|
81
104
|
/**
|
|
@@ -118,10 +141,29 @@ export class GameKitClient {
|
|
|
118
141
|
for (const trigger of merged.automationTriggers) {
|
|
119
142
|
automationTriggers.push(await this.gameModel.upsertAutomationTrigger(trigger));
|
|
120
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
|
+
}
|
|
121
162
|
return {
|
|
122
163
|
seed,
|
|
123
164
|
automations,
|
|
124
165
|
automationTriggers,
|
|
166
|
+
engines,
|
|
125
167
|
warnings: [...(seed.warnings ?? [])],
|
|
126
168
|
};
|
|
127
169
|
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { GameModelAPI } from '../domains/gameModel.js';
|
|
2
|
+
import type { EngineDetector } from './engine.js';
|
|
2
3
|
import type { Scalars } from '../generated/graphql.js';
|
|
3
4
|
import { type KitInvokeResult } from './shared.js';
|
|
4
5
|
/** Options for {@link LeaderboardsKit}. Must match the deployed blueprint. */
|
|
5
6
|
export interface LeaderboardsKitOptions {
|
|
7
|
+
/** The board engine module for server-computed rankings. Defaults to `'board-engine'`. */
|
|
8
|
+
engineModuleName?: string;
|
|
6
9
|
/** The `typePrefix` the leaderboards blueprint was deployed with. */
|
|
7
10
|
typePrefix?: string;
|
|
8
11
|
}
|
|
@@ -29,8 +32,25 @@ export interface KitLeaderboardEntry {
|
|
|
29
32
|
export declare class LeaderboardsKit {
|
|
30
33
|
private readonly appId;
|
|
31
34
|
private readonly gameModel;
|
|
35
|
+
private readonly engines?;
|
|
32
36
|
private readonly names;
|
|
33
|
-
constructor(appId: Scalars['BigInt']['input'], gameModel: GameModelAPI, options?: LeaderboardsKitOptions);
|
|
37
|
+
constructor(appId: Scalars['BigInt']['input'], gameModel: GameModelAPI, options?: LeaderboardsKitOptions, engines?: EngineDetector | undefined);
|
|
38
|
+
private readonly engineModuleName;
|
|
39
|
+
/**
|
|
40
|
+
* Is a board compute engine deployed + enabled (cached per session)? When
|
|
41
|
+
* true, rankings are computed SERVER-side (tie-aware ranks, percentiles,
|
|
42
|
+
* pages) instead of the blueprint's client-sorted reads.
|
|
43
|
+
*/
|
|
44
|
+
engineAvailable(): Promise<boolean>;
|
|
45
|
+
/** A server-ranked page (rank/percentile computed module-side). */
|
|
46
|
+
engineTop(boardId: string, page?: number, perPage?: number): Promise<Record<string, unknown>>;
|
|
47
|
+
/** Your (or a subject's) server-computed ranked row. */
|
|
48
|
+
engineRankOf(boardId: string, subjectId?: string): Promise<Record<string, unknown>>;
|
|
49
|
+
/** Submit YOUR OWN score (personal-best semantics) to an engine board. */
|
|
50
|
+
engineSubmitSelf(boardId: string, score: number): Promise<Record<string, unknown>>;
|
|
51
|
+
/** Frozen season snapshots (top rows per rolled season). */
|
|
52
|
+
engineSeasons(boardId: string): Promise<Record<string, unknown>>;
|
|
53
|
+
private engineInvoke;
|
|
34
54
|
/** Find-or-create a player's entry on a board. */
|
|
35
55
|
ensureEntry(ownerUserId: Scalars['BigInt']['input'], boardId: string, options?: {
|
|
36
56
|
displayName?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"leaderboards.d.ts","sourceRoot":"","sources":["../../src/kit/leaderboards.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAKvD,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,aAAa,CAAC;AAErB,8EAA8E;AAC9E,MAAM,WAAW,sBAAsB;IACrC,qEAAqE;IACrE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,8CAA8C;AAC9C,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,oFAAoF;IACpF,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;GAQG;AACH,qBAAa,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
|
* Obtained via `client.kit(appId).leaderboards`.
|
|
11
11
|
*/
|
|
12
12
|
export class LeaderboardsKit {
|
|
13
|
-
constructor(appId, gameModel, options = {}) {
|
|
13
|
+
constructor(appId, gameModel, options = {}, engines) {
|
|
14
14
|
this.appId = appId;
|
|
15
15
|
this.gameModel = gameModel;
|
|
16
|
+
this.engines = engines;
|
|
16
17
|
this.names = leaderboardsNames(options.typePrefix ?? '');
|
|
18
|
+
this.engineModuleName = options.engineModuleName ?? 'board-engine';
|
|
19
|
+
}
|
|
20
|
+
// -- Engine path (Wave 2): server-computed rankings --------------------------
|
|
21
|
+
/**
|
|
22
|
+
* Is a board compute engine deployed + enabled (cached per session)? When
|
|
23
|
+
* true, rankings are computed SERVER-side (tie-aware ranks, percentiles,
|
|
24
|
+
* pages) instead of the blueprint's client-sorted reads.
|
|
25
|
+
*/
|
|
26
|
+
engineAvailable() {
|
|
27
|
+
if (!this.engines)
|
|
28
|
+
return Promise.resolve(false);
|
|
29
|
+
return this.engines.has(this.engineModuleName);
|
|
30
|
+
}
|
|
31
|
+
/** A server-ranked page (rank/percentile computed module-side). */
|
|
32
|
+
async engineTop(boardId, page = 0, perPage = 10) {
|
|
33
|
+
return this.engineInvoke('top', { boardId, page, perPage });
|
|
34
|
+
}
|
|
35
|
+
/** Your (or a subject's) server-computed ranked row. */
|
|
36
|
+
async engineRankOf(boardId, subjectId) {
|
|
37
|
+
return this.engineInvoke('rank_of', subjectId ? { boardId, subjectId } : { boardId });
|
|
38
|
+
}
|
|
39
|
+
/** Submit YOUR OWN score (personal-best semantics) to an engine board. */
|
|
40
|
+
async engineSubmitSelf(boardId, score) {
|
|
41
|
+
return this.engineInvoke('submit_self', { boardId, score });
|
|
42
|
+
}
|
|
43
|
+
/** Frozen season snapshots (top rows per rolled season). */
|
|
44
|
+
async engineSeasons(boardId) {
|
|
45
|
+
return this.engineInvoke('seasons', { boardId });
|
|
46
|
+
}
|
|
47
|
+
async engineInvoke(exportName, params) {
|
|
48
|
+
if (!this.engines) {
|
|
49
|
+
throw new Error('board engine unavailable: compute domain not wired');
|
|
50
|
+
}
|
|
51
|
+
const result = await this.engines.invoke(this.engineModuleName, exportName, params);
|
|
52
|
+
if (!result.success) {
|
|
53
|
+
throw new Error(`leaderboards.${exportName} failed: ${result.reason ?? 'unknown'}`);
|
|
54
|
+
}
|
|
55
|
+
return result.body;
|
|
17
56
|
}
|
|
18
57
|
/** Find-or-create a player's entry on a board. */
|
|
19
58
|
async ensureEntry(ownerUserId, boardId, options = {}) {
|