import type { WalletState } from "../../economy/wallet.js"; import type { GameFeed } from "../../game/feed.js"; import type { InventorySet } from "../../inventory/inventoryModel.js"; import type { PoseState } from "../../movement/poseState.js"; import { type StatValueMap } from "../../scene/entityStats.js"; import type { EntityStore } from "../../scene/entityStore.js"; import type { ObjectStore } from "../../scene/objectStore.js"; import type { Possession } from "../../scene/possession.js"; import type { ObservableKeyedStore } from "../../store/observableKeyedStore.js"; import type { SimClock } from "../../time/simClock.js"; import type { MotionIntents } from "../motionIntents.js"; import type { SnapshotModule } from "../worldSnapshot.js"; /** @internal The live always-on subsystems the baseline descriptors serialize — handed in by `createGameContext`. */ export interface BaselineDeps { signalNotify: () => void; entities: EntityStore; objects: ObjectStore; statsByInstance: Map; store: ObservableKeyedStore; feed: GameFeed; inventoryIds: readonly string[]; inventoryByUser: ReadonlyMap>; inventoryFor: (userId: string) => InventorySet; wallets: Map; time: SimClock; pose: PoseState; possession: Possession; motionByUser: ReadonlyMap; motionFor: (userId: string) => MotionIntents; } /** @internal What an always-on baseline descriptor contributes: a replication module, a save-only module, or both. */ export interface BaselineBuild { /** Registered into the host→client replication set (`ctx.snapshot`/`ctx.hydrate`), and therefore also into the save set. */ replicate?: SnapshotModule; /** Registered into the whole-world save-only set (`ctx.game.save`) — persisted but never sent to clients. */ save?: SnapshotModule; } /** * Always-on counterpart to {@link featureDescriptors}: each baseline subsystem (entities, stats, * store, feed, inventory, economy, time, pose, possession, motion, objects) owns its own serialization here * instead of `createGameContext` hand-maintaining two distant module arrays. Order is * load-bearing — it fixes the snapshot key order, so it must stay stable. * @internal */ export interface BaselineDescriptor { readonly key: string; create(deps: BaselineDeps): BaselineBuild; } /** @internal */ export declare const baselineDescriptors: readonly BaselineDescriptor[];