@series-inc/rundot-game-sdk 5.24.0-beta.3 → 5.24.0-beta.4

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.
Files changed (108) hide show
  1. package/README.md +4 -4
  2. package/dist/{AdsApi-CscCuIMY.d.ts → AdsApi-CUkS1Vn7.d.ts} +59 -6
  3. package/dist/{LeaderboardApi-CrWxakrr.d.ts → LeaderboardApi-Bp1wndvJ.d.ts} +1 -1
  4. package/dist/{MultiplayerApi-nnrGTTcO.d.ts → MultiplayerApi-TQr01JT7.d.ts} +9 -1
  5. package/dist/{SyncplayRoomTransport-Bfv_KE63.d.ts → SyncplayRoomTransport-DCrXJ4QQ.d.ts} +26 -6
  6. package/dist/{callRemoteFunction-NBIrdLoa.d.ts → callRemoteFunction-DeGLqhjj.d.ts} +17 -1
  7. package/dist/{chunk-XQC54EPQ.js → chunk-2RSDZJHS.js} +24 -2
  8. package/dist/chunk-2RSDZJHS.js.map +1 -0
  9. package/dist/chunk-4J2RDAOR.js +12 -0
  10. package/dist/chunk-4J2RDAOR.js.map +1 -0
  11. package/dist/{chunk-WFRNUODW.js → chunk-56UNQZIB.js} +4 -30
  12. package/dist/chunk-56UNQZIB.js.map +1 -0
  13. package/dist/{chunk-KIA4VGSK.js → chunk-A6Y5KGQZ.js} +133 -9
  14. package/dist/chunk-A6Y5KGQZ.js.map +1 -0
  15. package/dist/{chunk-3GKY3LY5.js → chunk-C5APEUTZ.js} +2 -2
  16. package/dist/chunk-C5APEUTZ.js.map +1 -0
  17. package/dist/{chunk-G7JAUUTF.js → chunk-OSKQDUTI.js} +46 -128
  18. package/dist/chunk-OSKQDUTI.js.map +1 -0
  19. package/dist/{chunk-USEBN3PO.js → chunk-Q6SGGAIV.js} +35 -10
  20. package/dist/chunk-Q6SGGAIV.js.map +1 -0
  21. package/dist/{chunk-YQEDG3Z2.js → chunk-SFJILJFQ.js} +29 -3
  22. package/dist/chunk-SFJILJFQ.js.map +1 -0
  23. package/dist/{chunk-CZONPFQG.js → chunk-WHDTRIDW.js} +24 -2
  24. package/dist/chunk-WHDTRIDW.js.map +1 -0
  25. package/dist/{chunk-RIRXVDY4.js → chunk-WZFHBFH7.js} +3 -3
  26. package/dist/{chunk-RIRXVDY4.js.map → chunk-WZFHBFH7.js.map} +1 -1
  27. package/dist/core-7QSNRRMV.js +3 -0
  28. package/dist/{core-6DQFSOBL.js.map → core-7QSNRRMV.js.map} +1 -1
  29. package/dist/host-http.d.ts +4 -20
  30. package/dist/host-http.js +2 -2
  31. package/dist/{index-Dl2PfHSb.d.ts → index-B_PIWjhp.d.ts} +2 -2
  32. package/dist/index.d.ts +24 -13
  33. package/dist/index.js +6 -6
  34. package/dist/mp-server/index.d.ts +1 -1
  35. package/dist/{multiplayer-service-BXMJaXot.d.ts → multiplayer-service-C0k76UQR.d.ts} +4 -0
  36. package/dist/playground/index.js +8 -8
  37. package/dist/playground/index.js.map +1 -1
  38. package/dist/rundot-game-api/index.d.ts +5 -5
  39. package/dist/rundot-game-api/index.js +7 -7
  40. package/dist/rundot-game-api/index.js.map +1 -1
  41. package/dist/{secret-protocol-hnhTHLBs.d.ts → secret-protocol-DY332qWW.d.ts} +1 -1
  42. package/dist/{session-promotion-BMoIRgKe.d.ts → session-promotion-DC2gPFKv.d.ts} +1 -1
  43. package/dist/syncplay/browser.d.ts +52 -11
  44. package/dist/syncplay/browser.js +334 -14
  45. package/dist/syncplay/browser.js.map +1 -1
  46. package/dist/syncplay/creator.d.ts +5 -5
  47. package/dist/syncplay/creator.js +2 -2
  48. package/dist/syncplay/index.d.ts +3 -3
  49. package/dist/syncplay/index.js +2 -2
  50. package/dist/syncplay/node.d.ts +2 -2
  51. package/dist/syncplay/node.js +2 -2
  52. package/dist/syncplay/testing.d.ts +50 -3
  53. package/dist/syncplay/testing.js +274 -7
  54. package/dist/syncplay/testing.js.map +1 -1
  55. package/dist/{types-BV8uchSD.d.ts → types-ChJ9TO_o.d.ts} +4 -0
  56. package/dist/vite/{dev-server-XDCK4DL7.js → dev-server-SGPFGDDA.js} +51 -4
  57. package/dist/vite/dev-server-SGPFGDDA.js.map +1 -0
  58. package/dist/vite/index.d.ts +3 -3
  59. package/dist/vite/index.js +40 -5
  60. package/dist/vite/index.js.map +1 -1
  61. package/dist/webview/index.js +1 -1
  62. package/docs/README.md +3 -3
  63. package/docs/SUMMARY.md +1 -1
  64. package/docs/agents-index.txt +1 -1
  65. package/docs/rundot-developer-platform/api/ACCESS_GATE.md +3 -4
  66. package/docs/rundot-developer-platform/api/AI.md +37 -7
  67. package/docs/rundot-developer-platform/api/ASSETS.md +3 -3
  68. package/docs/rundot-developer-platform/api/AVATAR_3D.md +3 -3
  69. package/docs/rundot-developer-platform/api/CLIPS.md +1 -1
  70. package/docs/rundot-developer-platform/api/CREDITS.md +22 -0
  71. package/docs/rundot-developer-platform/api/EMBEDDED_LIBRARIES.md +2 -2
  72. package/docs/rundot-developer-platform/api/HAPTICS.md +1 -1
  73. package/docs/rundot-developer-platform/api/LIVEOPS.md +1 -1
  74. package/docs/rundot-developer-platform/api/LOGGING.md +1 -1
  75. package/docs/rundot-developer-platform/api/MULTIPLAYER.md +1 -1
  76. package/docs/rundot-developer-platform/api/PRELOADER.md +3 -3
  77. package/docs/rundot-developer-platform/api/RATE_LIMITS.md +1 -1
  78. package/docs/rundot-developer-platform/api/RELEASE_NOTES.md +1 -1
  79. package/docs/rundot-developer-platform/api/SERVER_AUTHORITATIVE.md +3 -3
  80. package/docs/rundot-developer-platform/api/STORAGE.md +12 -2
  81. package/docs/rundot-developer-platform/api/SYNCPLAY-MOVEMENT.md +12 -1
  82. package/docs/rundot-developer-platform/api/SYNCPLAY-PHYSICS.md +50 -6
  83. package/docs/rundot-developer-platform/api/SYNCPLAY.md +69 -4
  84. package/docs/rundot-developer-platform/api/UGC.md +1 -1
  85. package/docs/rundot-developer-platform/cli-reference.md +15 -2
  86. package/docs/rundot-developer-platform/deploying-your-game.md +12 -12
  87. package/docs/rundot-developer-platform/getting-started.md +8 -8
  88. package/docs/rundot-developer-platform/initializing-your-game.md +1 -1
  89. package/docs/rundot-developer-platform/marketing-your-game.md +17 -17
  90. package/docs/rundot-developer-platform/playground.md +10 -10
  91. package/docs/rundot-developer-platform/runtime-environment.md +3 -3
  92. package/docs/rundot-developer-platform/setting-your-game-thumbnail.md +1 -1
  93. package/docs/rundot-developer-platform/troubleshooting.md +2 -2
  94. package/package.json +3 -3
  95. package/scripts/install-hint.mjs +1 -1
  96. package/scripts/setup.mjs +5 -5
  97. package/dist/chunk-2WRAWLP3.js +0 -12
  98. package/dist/chunk-2WRAWLP3.js.map +0 -1
  99. package/dist/chunk-3GKY3LY5.js.map +0 -1
  100. package/dist/chunk-CZONPFQG.js.map +0 -1
  101. package/dist/chunk-G7JAUUTF.js.map +0 -1
  102. package/dist/chunk-KIA4VGSK.js.map +0 -1
  103. package/dist/chunk-USEBN3PO.js.map +0 -1
  104. package/dist/chunk-WFRNUODW.js.map +0 -1
  105. package/dist/chunk-XQC54EPQ.js.map +0 -1
  106. package/dist/chunk-YQEDG3Z2.js.map +0 -1
  107. package/dist/core-6DQFSOBL.js +0 -3
  108. package/dist/vite/dev-server-XDCK4DL7.js.map +0 -1
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
- # RUN.game SDK API
1
+ # RUN.world SDK API
2
2
 
3
- Build connected HTML5 games that integrate deeply with the RUN.game platform. This package provides the client SDK used by hosted games as well as the local mock environment for development.
3
+ Build connected HTML5 games that integrate deeply with the RUN.world platform. This package provides the client SDK used by hosted games as well as the local mock environment for development.
4
4
 
5
5
  ## Highlights
6
6
 
7
- - Typed APIs for RUN.game platform services (simulation, rooms, analytics, ads, and more)
7
+ - Typed APIs for RUN.world platform services (simulation, rooms, analytics, ads, and more)
8
8
  - Host-aware tooling including lifecycle hooks, safe-area utilities, and asset loading helpers
9
9
 
10
10
  ## Quick Start
@@ -37,7 +37,7 @@ await RundotGameAPI.initializeAsync()
37
37
 
38
38
  ## Documentation
39
39
 
40
- The complete RUN.game SDK manuals live on [Run.game Docs](https://series-1.gitbook.io/rundot-docs). Start there for setup guides, API references, tutorials, and best practices.
40
+ The complete RUN.world SDK manuals live on [RUN.world Docs](https://series-1.gitbook.io/rundot-docs). Start there for setup guides, API references, tutorials, and best practices.
41
41
 
42
42
  ## Support & Links
43
43
 
@@ -1,5 +1,5 @@
1
- import { $ as ProviderErrorDetail, M as LeaderboardApi, I as ImageGenApi, A as AudioGenApi, V as VideoGenApi, q as SpriteGenApi, T as ThreeDGenApi } from './LeaderboardApi-CrWxakrr.js';
2
- import { M as MultiplayerApi } from './MultiplayerApi-nnrGTTcO.js';
1
+ import { $ as ProviderErrorDetail, M as LeaderboardApi, I as ImageGenApi, A as AudioGenApi, V as VideoGenApi, q as SpriteGenApi, T as ThreeDGenApi } from './LeaderboardApi-Bp1wndvJ.js';
2
+ import { M as MultiplayerApi } from './MultiplayerApi-TQr01JT7.js';
3
3
 
4
4
  interface StorageApi {
5
5
  key(index: number): Promise<string | null>;
@@ -793,7 +793,7 @@ interface AiMessage {
793
793
  content: string | AiContentBlock[];
794
794
  }
795
795
  type AiChatCompletionRequest = {
796
- /** Model identifier (e.g., 'gpt-4o', 'claude-3-5-sonnet-20241022') */
796
+ /** Model identifier (e.g., 'gpt-5.6-luna', 'claude-sonnet-4-6') */
797
797
  model: string;
798
798
  /** Array of message objects in OpenAI chat format */
799
799
  messages: Array<AiMessage>;
@@ -831,6 +831,29 @@ type AiChatCompletionRequest = {
831
831
  maxTokens?: number;
832
832
  /** Upper bound for tokens generated, including visible output and reasoning tokens */
833
833
  maxCompletionTokens?: number;
834
+ /**
835
+ * Requested reasoning (thinking) effort for reasoning-capable models.
836
+ *
837
+ * Per-provider support:
838
+ * - **OpenAI** (`gpt-5` family): all levels, passed through natively as
839
+ * `reasoning_effort`.
840
+ * - **Gemini**: all levels, translated to the model generation's thinking
841
+ * config (thinking level on Gemini 3.x, thinking budget on Gemini 2.5).
842
+ * - **Anthropic** (`claude-*`) and **DeepSeek**: not yet supported — a
843
+ * request carrying this field is rejected with HTTP 400.
844
+ *
845
+ * `'none'` requests minimal/disabled reasoning where the model allows it;
846
+ * models that cannot fully disable thinking (e.g. `gemini-2.5-pro`,
847
+ * Gemini 3.x) clamp to their minimum instead.
848
+ *
849
+ * Reasoning tokens are billed as OUTPUT tokens, so higher efforts increase
850
+ * completion-token usage and cost. When the model reasons, the response's
851
+ * `usage.reasoning_tokens` reports how many of the completion tokens were
852
+ * spent on reasoning.
853
+ *
854
+ * Older backends that predate this field silently ignore it.
855
+ */
856
+ reasoningEffort?: 'none' | 'low' | 'medium' | 'high';
834
857
  /** Sampling temperature (0.0 to 2.0) */
835
858
  temperature?: number;
836
859
  /** Nucleus sampling parameter (0.0 to 1.0) */
@@ -2195,6 +2218,35 @@ interface CreditsPurchaseResult {
2195
2218
  /** Refreshed balance after the paywall closed, or `null` if it couldn't be read. */
2196
2219
  balance: CreditBalance | null;
2197
2220
  }
2221
+ type GenerationCostEstimateKind = 'image' | 'music' | 'sfx' | 'video' | 'sprite' | 'animate-sprite' | 'sprite-character-animate' | 'tts' | 'text';
2222
+ interface GenerationCostEstimateRequest {
2223
+ kind: GenerationCostEstimateKind;
2224
+ model?: string;
2225
+ provider?: string;
2226
+ mode?: string;
2227
+ durationSeconds?: number;
2228
+ imageSize?: string;
2229
+ removeBackground?: boolean;
2230
+ bgRemovalModel?: string;
2231
+ generateAudio?: boolean;
2232
+ resolution?: string;
2233
+ text?: string;
2234
+ messages?: AiMessage[];
2235
+ system?: string | AiTextContent[];
2236
+ maxTokens?: number;
2237
+ maxCompletionTokens?: number;
2238
+ quantity?: number;
2239
+ }
2240
+ interface GenerationCostEstimate {
2241
+ kind: GenerationCostEstimateKind;
2242
+ credits: number;
2243
+ lowCredits: number;
2244
+ highCredits: number;
2245
+ lowerPercent: number;
2246
+ upperPercent: number;
2247
+ exact: boolean;
2248
+ reason: string;
2249
+ }
2198
2250
  /** Construction payload for {@link CreditsExhaustedError}. */
2199
2251
  interface CreditsExhaustedErrorInfo {
2200
2252
  billedTo: CreditsBilledTo;
@@ -2240,6 +2292,7 @@ interface CreditsApi {
2240
2292
  getBalance(): Promise<CreditBalance>;
2241
2293
  getSubscription(): Promise<CreditSubscription>;
2242
2294
  getPlans(): Promise<CreditPlansCatalog>;
2295
+ estimateGenerationCost(request: GenerationCostEstimateRequest): Promise<GenerationCostEstimate>;
2243
2296
  /**
2244
2297
  * Open the host's combined paywall (plan upgrade now; top-up packs in a later
2245
2298
  * release). Resolves once the player closes it. Reuses the same host UI the
@@ -4396,9 +4449,9 @@ declare class MockAvatarApi implements Avatar3dApi {
4396
4449
  /**
4397
4450
  * DEFINITIVE TypeScript definitions for Rundot Game API
4398
4451
  *
4399
- * This is the single source of truth for all RUN.game games.
4452
+ * This is the single source of truth for all RUN.world games.
4400
4453
  *
4401
- * Usage in RUN.game games:
4454
+ * Usage in RUN.world games:
4402
4455
  * ```typescript
4403
4456
  * import type { RundotGameAPI } from '../../rundot-game-api/types';
4404
4457
  * declare const RundotGameAPI: RundotGameAPI;
@@ -4830,4 +4883,4 @@ interface AdsApi {
4830
4883
  showInterstitialAd(options?: ShowInterstitialAdOptions): Promise<boolean>;
4831
4884
  }
4832
4885
 
4833
- export { type DeviceInfo as $, type AnalyticsApi as A, type BatchRecipeRequirementsResult as B, type NotificationsApi as C, type ScheduleLocalNotification as D, type SubmitMessageInput as E, type SubmitMessageResult as F, type ScheduleNotificationOptions as G, type Host as H, type RCSAvailabilityStatus as I, type ScheduleRCSInput as J, type ScheduleRCSResult as K, type RequestRCSOptInInput as L, type RequestRCSOptInResult as M, type NavigationApi as N, type PopupsApi as O, type Profile as P, type QuitOptions as Q, type RundotGameAPI as R, type SimulationActiveRunsUpdate as S, type ShowToastOptions as T, type LikeDialogResult as U, type CommentsPanelResult as V, type LikeStateResult as W, type ShowInterstitialAdOptions as X, type ShowRewardedAdOptions as Y, type ProfileApi as Z, type DeviceApi as _, type RecipeRequirementQuery as a, type RoomDataUpdate as a$, type EnvironmentApi as a0, type EnvironmentInfo as a1, type SystemApi as a2, type SafeArea as a3, type AddToHomeScreenResult as a4, type CdnApi as a5, type FetchFromCdnOptions as a6, type AssetUrlResult as a7, type TimeApi as a8, type ServerTimeData as a9, type QuitCallback as aA, type BackButtonCallback as aB, type IdentityChangedCallback as aC, type IdentityChangedEvent as aD, type SimulationApi as aE, type SimulationSlotValidationResult as aF, type SimulationBatchOperation as aG, type SimulationBatchOperationsResult as aH, type SimulationAvailableItem as aI, type SimulationPowerPreview as aJ, type SimulationSlotMutationResult as aK, type SimulationSlotContainer as aL, type SimulationAssignment as aM, type SimulationState as aN, type ExecuteRecipeOptions as aO, type ExecuteRecipeResponse as aP, type CollectRecipeResult as aQ, type ResetStateOptions as aR, type ResetStateResult as aS, type GetActiveRunsOptions as aT, type ExecuteScopedRecipeOptions as aU, type ExecuteScopedRecipeResult as aV, type GetAvailableRecipesOptions as aW, type GetAvailableRecipesResult as aX, type Recipe as aY, type GetBatchRecipeRequirements as aZ, type TriggerRecipeChainOptions as a_, type GetFutureTimeOptions as aa, type AiApi as ab, type AiChatCompletionRequest as ac, type AiChatCompletionData as ad, type PromptCompletionRequest as ae, type AiChatCompletionStreamOptions as af, type AiChatCompletionStreamChunk as ag, type HapticsApi as ah, HapticFeedbackStyle as ai, type GamepadSnapshot as aj, type GamepadConnectionEvent as ak, type Subscription as al, type GamepadApi as am, type GamepadLatencyStats as an, type FeaturesApi as ao, type Experiment as ap, type ExperimentAssignment as aq, type LiveOpsApi as ar, type LiveOpsConfigResult as as, type LiveOpsRawConfig as at, type LiveOpsSection as au, type LifecycleApi as av, type SleepCallback as aw, type AwakeCallback as ax, type PauseCallback as ay, type ResumeCallback as az, type RecipeRequirementResult as b, type AccessGateApi as b$, type RoomMessageEvent as b0, type ProposedMoveEvent as b1, RundotGameTransport as b2, type RoomsApi as b3, type CreateRoomOptions as b4, type JoinOrCreateRoomOptions as b5, type JoinOrCreateResult as b6, type ListRoomsOptions as b7, type UpdateRoomDataOptions as b8, type RoomMessageRequest as b9, type PreloaderApi as bA, type SocialApi as bB, type ShareMetadata as bC, type ShareLinkResult as bD, type SocialQRCodeOptions as bE, type QRCodeResult as bF, type ShareClickData as bG, type ShareFileOptions as bH, type ShareFileResult as bI, type CanShareFileResult as bJ, type ComposeSocialPostOptions as bK, type ComposeSocialPostResult as bL, type EntitlementApi as bM, type Entitlement as bN, type LedgerEntry as bO, type StatsApi as bP, type GrantInfo as bQ, type CollectiblesApi as bR, type CollectibleCard as bS, type VipClaimResult as bT, type ShopApi as bU, type StorefrontResponse as bV, type StorefrontItem as bW, type ShopPurchaseResponse as bX, type ShopOrderHistoryResponse as bY, type PromptLoginResult as bZ, type AccessTier as b_, type StartRoomGameOptions as ba, type ProposeMoveRequest as bb, type ProposeMoveResult as bc, type ValidateMoveVerdict as bd, type ValidateMoveResult as be, type RoomSubscriptionOptions as bf, type LoggingApi as bg, type IapApi as bh, type SpendCurrencyOptions as bi, type SpendCurrencyResult as bj, type SubscriptionTier as bk, type RunSubscriptionsResponse as bl, type SubscriptionInterval as bm, type PurchaseSubscriptionResponse as bn, type OpenStoreResult as bo, type LoadEmbeddedAssetsResponse as bp, type DirectPurchaseSku as bq, type SharedAssetsApi as br, type CreditsApi as bs, type CreditsBillingContext as bt, type CreditBalance as bu, type CreditSubscription as bv, type CreditPlansCatalog as bw, type OpenPaywallOptions as bx, type CreditsPurchaseResult as by, type Unsubscribe as bz, type RundotGameAvailableRecipe as c, type AdminThreeDGenBrowseParams as c$, type TextGenApi as c0, type UgcApi as c1, type VideoApi as c2, type AppApi as c3, type AdminUgcApi as c4, type AdminImageGenApi as c5, type AdminVideoGenApi as c6, type AdminSpriteGenApi as c7, type AdminAudioGenApi as c8, type AdminThreeDGenApi as c9, type RawEnvironmentInfo as cA, type SharedStorageHostApi as cB, type FilesApi as cC, type ClipsApi as cD, type AttributionApi as cE, type InitializationContext as cF, type InitializationOptions as cG, type CaptureConsent as cH, type StartClipRecordingOptions as cI, type ClipBlob as cJ, type ClipsSupport as cK, type ClipPersistOptions as cL, type ClipResult as cM, type UgcEntry as cN, type CaptureConsentStatus as cO, AccessDeniedError as cP, type AdminGenApi as cQ, type AdminImageGenBrowseParams as cR, type AdminImageGenBrowseResponse as cS, type AdminImageGenListReportsParams as cT, type AdminImageGenListReportsResponse as cU, type AdminImageGenResolveAction as cV, type AdminSpriteGenBrowseParams as cW, type AdminSpriteGenBrowseResponse as cX, type AdminSpriteGenListReportsParams as cY, type AdminSpriteGenListReportsResponse as cZ, type AdminSpriteGenResolveAction as c_, type AppRole as ca, type ResolveLaunchIntentOptions as cb, type LaunchIntent as cc, type ReleaseNote as cd, type AdminUgcBrowseParams as ce, type AdminUgcBrowseResponse as cf, type AdminUgcListReportsParams as cg, type AdminUgcListReportsResponse as ch, type AdminUgcResolveAction as ci, type AdminGenBrowseParams as cj, type AdminGenBrowseResponse as ck, type ImageGenEntry as cl, type AdminGenListReportsParams as cm, type AdminGenListReportsResponse as cn, type ImageGenReport as co, type AdminGenResolveAction as cp, type SpriteGenEntry as cq, type SpriteGenReport as cr, type ThreeDGenEntry as cs, type ThreeDGenReport as ct, type Avatar3dApi as cu, type AssetManifest as cv, type Avatar3dConfig as cw, type ShowEditorOptions as cx, type Avatar3dEdits as cy, type AdsApi as cz, type RundotGameCollectRecipeResult as d, type LoadEmbeddedAssetBeginRequest as d$, type AdminThreeDGenBrowseResponse as d0, type AdminThreeDGenListReportsParams as d1, type AdminThreeDGenListReportsResponse as d2, type AdminThreeDGenResolveAction as d3, type AdminUgcEntry as d4, type AdminVideoGenBrowseParams as d5, type AdminVideoGenBrowseResponse as d6, type AdminVideoGenListReportsParams as d7, type AdminVideoGenListReportsResponse as d8, type AdminVideoGenResolveAction as d9, type CreditPlan as dA, type CreditTopUpPack as dB, type CreditsBilledTo as dC, CreditsExhaustedError as dD, type CreditsExhaustedErrorInfo as dE, type CreditsPurchaseOutcome as dF, type DirectPurchaseGrantKind as dG, type DirectPurchaseStorePlatform as dH, type DirectPurchaseStorePrice as dI, GAMEPAD_BUTTON_NAMES as dJ, type GamepadAxes as dK, type GamepadButtonName as dL, type GamepadButtonState as dM, type GamepadSource as dN, type GetSubscriptionsForTierRequest as dO, type HudInsets as dP, type IdentityChangeReason as dQ, type InboundForKeyEntry as dR, type InboundMethodIds as dS, type InboundStorageApi as dT, type IsPlayerSubscribedRequest as dU, type JoinOrCreateRoomEnvelopeResponse as dV, type JoinRoomMatchCriteria as dW, type LaunchIntentKind as dX, type LiveOpsExperiment as dY, type LiveOpsOverride as dZ, type LiveOpsVariant as d_, type AiContentBlock as da, type AiImageContent as db, type AiImageUrlContent as dc, type AiMessage as dd, type AiResponseFormat as de, type AiTextContent as df, type AiToolResultContent as dg, type AiToolUseContent as dh, type Asset as di, type AssignedVariant as dj, type AudioGenEntry as dk, type AudioGenReport as dl, BUCKET_COUNT as dm, CLIP_CONTENT_TYPE as dn, COMPOSE_POST_MAX_TEXT_LENGTH as dp, COMPOSE_POST_MAX_TITLE_LENGTH as dq, COMPOSE_POST_SUBREDDIT_PATTERN as dr, CREDITS_EXHAUSTED_CODE as ds, type Category as dt, type ClipAudioOptions as du, type ClipCameraOptions as dv, type ClipPipLayout as dw, type ClipPipPosition as dx, type ComposeSocialPostMedia as dy, type CreditFreeDailyInfo as dz, type RundotGameExecuteRecipeOptions as e, fnv1a32 as e$, type LoadEmbeddedAssetBeginResponse as e0, type LoadEmbeddedAssetChunkRequest as e1, type LoadEmbeddedAssetChunkResponse as e2, type LoadEmbeddedAssetsRequest as e3, MockAvatarApi as e4, type NotificationTriggerInput as e5, type OnNotificationCallback as e6, type OnRequestCallback as e7, type OnResponseCallback as e8, type PlatformCapabilities as e9, type ShopOrder as eA, type SimulationBatchOperationAssign as eB, type SimulationBatchOperationRemove as eC, type SimulationBatchOperationResult as eD, type SimulationPersonalState as eE, type SimulationRoomActiveRecipe as eF, type SimulationRoomState as eG, type SocialComposePlatform as eH, type StorefrontCollection as eI, type StorefrontCollectionItem as eJ, type SubPath as eK, type SubmitMessageChannel as eL, type SubmitMessageChannelResult as eM, type SubmitMessageResultChannel as eN, TIER_SUPPORTED_INTERVALS as eO, type Tool as eP, type ToolChoice as eQ, type ToolUse as eR, type TimeIntervalTriggerInput as eS, type UgcReport as eT, type VideoGenEntry as eU, type VideoGenReport as eV, asCreditsExhaustedError as eW, assertTierSupportsInterval as eX, assignVariant as eY, assignmentBucket as eZ, createHost as e_, type ProposedMovePayload as ea, type PurchaseSubscriptionRequest as eb, type RCSAvailabilityReason as ec, type RCSOptInStatus as ed, ROOM_GAME_PHASES as ee, type RecipeInfo as ef, type ReleaseType as eg, type ResolvedLiveOps as eh, type RoomEnvelopeResponse as ei, type RoomGamePhase as ej, type RoomMessageEventType as ek, type RoomMessagePayload as el, type RoomsEnvelopeResponse as em, RpcInboundStorageApi as en, RpcSharedAssetsApi as eo, type RpcTransport as ep, type RunSubscription as eq, type RundotGameRoomCustomMetadata as er, type RundotGameRoomPayload as es, type RundotGameRoomRules as et, type RundotGameRoomRulesGameState as eu, SHARE_FILE_ALLOWED_MIME_TYPES as ev, SHARE_FILE_MAX_SIZE_BYTES as ew, SOCIAL_COMPOSE_PLATFORMS as ex, type ScheduleRCSStatus as ey, type ShareFileMimeType as ez, type RundotGameExecuteRecipeResult as f, isCreditsExhaustedError as f0, mapCreditsExhaustion as f1, resolveCollectionItemPrice as f2, resolveLiveOpsSection as f3, toPromptWireRequest as f4, type RundotGameExecuteScopedRecipeOptions as g, RundotGameRoom as h, type RundotGameSimulationConfig as i, type RundotGameSimulationEffect as j, type RundotGameSimulationRecipe as k, type RundotGameSimulationStateResponse as l, type SimulationEntityUpdate as m, type SimulationRunSummary as n, type SimulationSnapshotUpdate as o, type SimulationSubscribeOptions as p, type SimulationUpdateData as q, type SimulationUpdateType as r, type RpcRequest as s, type RpcResponse as t, type RpcNotification as u, RpcClient as v, type StorageApi as w, type NavigationStackInfo as x, type PushAppOptions as y, type NavigateToGameOptions as z };
4886
+ export { type DeviceInfo as $, type AnalyticsApi as A, type BatchRecipeRequirementsResult as B, type NotificationsApi as C, type ScheduleLocalNotification as D, type SubmitMessageInput as E, type SubmitMessageResult as F, type ScheduleNotificationOptions as G, type Host as H, type RCSAvailabilityStatus as I, type ScheduleRCSInput as J, type ScheduleRCSResult as K, type RequestRCSOptInInput as L, type RequestRCSOptInResult as M, type NavigationApi as N, type PopupsApi as O, type Profile as P, type QuitOptions as Q, type RundotGameAPI as R, type SimulationActiveRunsUpdate as S, type ShowToastOptions as T, type LikeDialogResult as U, type CommentsPanelResult as V, type LikeStateResult as W, type ShowInterstitialAdOptions as X, type ShowRewardedAdOptions as Y, type ProfileApi as Z, type DeviceApi as _, type RecipeRequirementQuery as a, type RoomDataUpdate as a$, type EnvironmentApi as a0, type EnvironmentInfo as a1, type SystemApi as a2, type SafeArea as a3, type AddToHomeScreenResult as a4, type CdnApi as a5, type FetchFromCdnOptions as a6, type AssetUrlResult as a7, type TimeApi as a8, type ServerTimeData as a9, type QuitCallback as aA, type BackButtonCallback as aB, type IdentityChangedCallback as aC, type IdentityChangedEvent as aD, type SimulationApi as aE, type SimulationSlotValidationResult as aF, type SimulationBatchOperation as aG, type SimulationBatchOperationsResult as aH, type SimulationAvailableItem as aI, type SimulationPowerPreview as aJ, type SimulationSlotMutationResult as aK, type SimulationSlotContainer as aL, type SimulationAssignment as aM, type SimulationState as aN, type ExecuteRecipeOptions as aO, type ExecuteRecipeResponse as aP, type CollectRecipeResult as aQ, type ResetStateOptions as aR, type ResetStateResult as aS, type GetActiveRunsOptions as aT, type ExecuteScopedRecipeOptions as aU, type ExecuteScopedRecipeResult as aV, type GetAvailableRecipesOptions as aW, type GetAvailableRecipesResult as aX, type Recipe as aY, type GetBatchRecipeRequirements as aZ, type TriggerRecipeChainOptions as a_, type GetFutureTimeOptions as aa, type AiApi as ab, type AiChatCompletionRequest as ac, type AiChatCompletionData as ad, type PromptCompletionRequest as ae, type AiChatCompletionStreamOptions as af, type AiChatCompletionStreamChunk as ag, type HapticsApi as ah, HapticFeedbackStyle as ai, type GamepadSnapshot as aj, type GamepadConnectionEvent as ak, type Subscription as al, type GamepadApi as am, type GamepadLatencyStats as an, type FeaturesApi as ao, type Experiment as ap, type ExperimentAssignment as aq, type LiveOpsApi as ar, type LiveOpsConfigResult as as, type LiveOpsRawConfig as at, type LiveOpsSection as au, type LifecycleApi as av, type SleepCallback as aw, type AwakeCallback as ax, type PauseCallback as ay, type ResumeCallback as az, type RecipeRequirementResult as b, type PromptLoginResult as b$, type RoomMessageEvent as b0, type ProposedMoveEvent as b1, RundotGameTransport as b2, type RoomsApi as b3, type CreateRoomOptions as b4, type JoinOrCreateRoomOptions as b5, type JoinOrCreateResult as b6, type ListRoomsOptions as b7, type UpdateRoomDataOptions as b8, type RoomMessageRequest as b9, type CreditsPurchaseResult as bA, type Unsubscribe as bB, type PreloaderApi as bC, type SocialApi as bD, type ShareMetadata as bE, type ShareLinkResult as bF, type SocialQRCodeOptions as bG, type QRCodeResult as bH, type ShareClickData as bI, type ShareFileOptions as bJ, type ShareFileResult as bK, type CanShareFileResult as bL, type ComposeSocialPostOptions as bM, type ComposeSocialPostResult as bN, type EntitlementApi as bO, type Entitlement as bP, type LedgerEntry as bQ, type StatsApi as bR, type GrantInfo as bS, type CollectiblesApi as bT, type CollectibleCard as bU, type VipClaimResult as bV, type ShopApi as bW, type StorefrontResponse as bX, type StorefrontItem as bY, type ShopPurchaseResponse as bZ, type ShopOrderHistoryResponse as b_, type StartRoomGameOptions as ba, type ProposeMoveRequest as bb, type ProposeMoveResult as bc, type ValidateMoveVerdict as bd, type ValidateMoveResult as be, type RoomSubscriptionOptions as bf, type LoggingApi as bg, type IapApi as bh, type SpendCurrencyOptions as bi, type SpendCurrencyResult as bj, type SubscriptionTier as bk, type RunSubscriptionsResponse as bl, type SubscriptionInterval as bm, type PurchaseSubscriptionResponse as bn, type OpenStoreResult as bo, type LoadEmbeddedAssetsResponse as bp, type DirectPurchaseSku as bq, type SharedAssetsApi as br, type CreditsApi as bs, type CreditsBillingContext as bt, type CreditBalance as bu, type CreditSubscription as bv, type CreditPlansCatalog as bw, type GenerationCostEstimateRequest as bx, type GenerationCostEstimate as by, type OpenPaywallOptions as bz, type RundotGameAvailableRecipe as c, type AdminSpriteGenListReportsResponse as c$, type AccessTier as c0, type AccessGateApi as c1, type TextGenApi as c2, type UgcApi as c3, type VideoApi as c4, type AppApi as c5, type AdminUgcApi as c6, type AdminImageGenApi as c7, type AdminVideoGenApi as c8, type AdminSpriteGenApi as c9, type Avatar3dEdits as cA, type AdsApi as cB, type RawEnvironmentInfo as cC, type SharedStorageHostApi as cD, type FilesApi as cE, type ClipsApi as cF, type AttributionApi as cG, type InitializationContext as cH, type InitializationOptions as cI, type CaptureConsent as cJ, type StartClipRecordingOptions as cK, type ClipBlob as cL, type ClipsSupport as cM, type ClipPersistOptions as cN, type ClipResult as cO, type UgcEntry as cP, type CaptureConsentStatus as cQ, AccessDeniedError as cR, type AdminGenApi as cS, type AdminImageGenBrowseParams as cT, type AdminImageGenBrowseResponse as cU, type AdminImageGenListReportsParams as cV, type AdminImageGenListReportsResponse as cW, type AdminImageGenResolveAction as cX, type AdminSpriteGenBrowseParams as cY, type AdminSpriteGenBrowseResponse as cZ, type AdminSpriteGenListReportsParams as c_, type AdminAudioGenApi as ca, type AdminThreeDGenApi as cb, type AppRole as cc, type ResolveLaunchIntentOptions as cd, type LaunchIntent as ce, type ReleaseNote as cf, type AdminUgcBrowseParams as cg, type AdminUgcBrowseResponse as ch, type AdminUgcListReportsParams as ci, type AdminUgcListReportsResponse as cj, type AdminUgcResolveAction as ck, type AdminGenBrowseParams as cl, type AdminGenBrowseResponse as cm, type ImageGenEntry as cn, type AdminGenListReportsParams as co, type AdminGenListReportsResponse as cp, type ImageGenReport as cq, type AdminGenResolveAction as cr, type SpriteGenEntry as cs, type SpriteGenReport as ct, type ThreeDGenEntry as cu, type ThreeDGenReport as cv, type Avatar3dApi as cw, type AssetManifest as cx, type Avatar3dConfig as cy, type ShowEditorOptions as cz, type RundotGameCollectRecipeResult as d, type LiveOpsExperiment as d$, type AdminSpriteGenResolveAction as d0, type AdminThreeDGenBrowseParams as d1, type AdminThreeDGenBrowseResponse as d2, type AdminThreeDGenListReportsParams as d3, type AdminThreeDGenListReportsResponse as d4, type AdminThreeDGenResolveAction as d5, type AdminUgcEntry as d6, type AdminVideoGenBrowseParams as d7, type AdminVideoGenBrowseResponse as d8, type AdminVideoGenListReportsParams as d9, type ComposeSocialPostMedia as dA, type CreditFreeDailyInfo as dB, type CreditPlan as dC, type CreditTopUpPack as dD, type CreditsBilledTo as dE, CreditsExhaustedError as dF, type CreditsExhaustedErrorInfo as dG, type CreditsPurchaseOutcome as dH, type DirectPurchaseGrantKind as dI, type DirectPurchaseStorePlatform as dJ, type DirectPurchaseStorePrice as dK, GAMEPAD_BUTTON_NAMES as dL, type GamepadAxes as dM, type GamepadButtonName as dN, type GamepadButtonState as dO, type GamepadSource as dP, type GenerationCostEstimateKind as dQ, type GetSubscriptionsForTierRequest as dR, type HudInsets as dS, type IdentityChangeReason as dT, type InboundForKeyEntry as dU, type InboundMethodIds as dV, type InboundStorageApi as dW, type IsPlayerSubscribedRequest as dX, type JoinOrCreateRoomEnvelopeResponse as dY, type JoinRoomMatchCriteria as dZ, type LaunchIntentKind as d_, type AdminVideoGenListReportsResponse as da, type AdminVideoGenResolveAction as db, type AiContentBlock as dc, type AiImageContent as dd, type AiImageUrlContent as de, type AiMessage as df, type AiResponseFormat as dg, type AiTextContent as dh, type AiToolResultContent as di, type AiToolUseContent as dj, type Asset as dk, type AssignedVariant as dl, type AudioGenEntry as dm, type AudioGenReport as dn, BUCKET_COUNT as dp, CLIP_CONTENT_TYPE as dq, COMPOSE_POST_MAX_TEXT_LENGTH as dr, COMPOSE_POST_MAX_TITLE_LENGTH as ds, COMPOSE_POST_SUBREDDIT_PATTERN as dt, CREDITS_EXHAUSTED_CODE as du, type Category as dv, type ClipAudioOptions as dw, type ClipCameraOptions as dx, type ClipPipLayout as dy, type ClipPipPosition as dz, type RundotGameExecuteRecipeOptions as e, assignVariant as e$, type LiveOpsOverride as e0, type LiveOpsVariant as e1, type LoadEmbeddedAssetBeginRequest as e2, type LoadEmbeddedAssetBeginResponse as e3, type LoadEmbeddedAssetChunkRequest as e4, type LoadEmbeddedAssetChunkResponse as e5, type LoadEmbeddedAssetsRequest as e6, MockAvatarApi as e7, type NotificationTriggerInput as e8, type OnNotificationCallback as e9, SOCIAL_COMPOSE_PLATFORMS as eA, type ScheduleRCSStatus as eB, type ShareFileMimeType as eC, type ShopOrder as eD, type SimulationBatchOperationAssign as eE, type SimulationBatchOperationRemove as eF, type SimulationBatchOperationResult as eG, type SimulationPersonalState as eH, type SimulationRoomActiveRecipe as eI, type SimulationRoomState as eJ, type SocialComposePlatform as eK, type StorefrontCollection as eL, type StorefrontCollectionItem as eM, type SubPath as eN, type SubmitMessageChannel as eO, type SubmitMessageChannelResult as eP, type SubmitMessageResultChannel as eQ, TIER_SUPPORTED_INTERVALS as eR, type Tool as eS, type ToolChoice as eT, type ToolUse as eU, type TimeIntervalTriggerInput as eV, type UgcReport as eW, type VideoGenEntry as eX, type VideoGenReport as eY, asCreditsExhaustedError as eZ, assertTierSupportsInterval as e_, type OnRequestCallback as ea, type OnResponseCallback as eb, type PlatformCapabilities as ec, type ProposedMovePayload as ed, type PurchaseSubscriptionRequest as ee, type RCSAvailabilityReason as ef, type RCSOptInStatus as eg, ROOM_GAME_PHASES as eh, type RecipeInfo as ei, type ReleaseType as ej, type ResolvedLiveOps as ek, type RoomEnvelopeResponse as el, type RoomGamePhase as em, type RoomMessageEventType as en, type RoomMessagePayload as eo, type RoomsEnvelopeResponse as ep, RpcInboundStorageApi as eq, RpcSharedAssetsApi as er, type RpcTransport as es, type RunSubscription as et, type RundotGameRoomCustomMetadata as eu, type RundotGameRoomPayload as ev, type RundotGameRoomRules as ew, type RundotGameRoomRulesGameState as ex, SHARE_FILE_ALLOWED_MIME_TYPES as ey, SHARE_FILE_MAX_SIZE_BYTES as ez, type RundotGameExecuteRecipeResult as f, assignmentBucket as f0, createHost as f1, fnv1a32 as f2, isCreditsExhaustedError as f3, mapCreditsExhaustion as f4, resolveCollectionItemPrice as f5, resolveLiveOpsSection as f6, toPromptWireRequest as f7, type RundotGameExecuteScopedRecipeOptions as g, RundotGameRoom as h, type RundotGameSimulationConfig as i, type RundotGameSimulationEffect as j, type RundotGameSimulationRecipe as k, type RundotGameSimulationStateResponse as l, type SimulationEntityUpdate as m, type SimulationRunSummary as n, type SimulationSnapshotUpdate as o, type SimulationSubscribeOptions as p, type SimulationUpdateData as q, type SimulationUpdateType as r, type RpcRequest as s, type RpcResponse as t, type RpcNotification as u, RpcClient as v, type StorageApi as w, type NavigationStackInfo as x, type PushAppOptions as y, type NavigateToGameOptions as z };
@@ -1,4 +1,4 @@
1
- import { h as ReplayFile } from './types-BV8uchSD.js';
1
+ import { h as ReplayFile } from './types-ChJ9TO_o.js';
2
2
 
3
3
  type ImageGenModel = 'gemini-3.1-flash-image-preview' | 'gemini-3-pro-image-preview' | 'gpt-image-1' | 'gpt-image-2';
4
4
  type BgRemovalModel = 'bria' | 'birefnet';
@@ -77,6 +77,12 @@ interface ServerRoom<P extends Protocol> {
77
77
  readonly playerId: string;
78
78
  /** Whether the room is locked */
79
79
  readonly locked: boolean;
80
+ /** Authoritative current room roster. */
81
+ readonly players: readonly ServerPlayer[];
82
+ /** Effective server-enforced capacity. */
83
+ readonly maxPlayers: number;
84
+ /** Whether this player created the room. */
85
+ readonly isCreator: boolean;
80
86
  /** Current latency in ms (round-trip / 2) */
81
87
  readonly latency: number;
82
88
  /** Connection state */
@@ -85,6 +91,8 @@ interface ServerRoom<P extends Protocol> {
85
91
  on(events: RoomEvents<P>): void;
86
92
  /** Send a typed message to the server room. */
87
93
  send(message: P): void;
94
+ /** Open or close the room to new seats. Only the room creator is authorized. */
95
+ setSeatingOpen(open: boolean): void;
88
96
  /**
89
97
  * Send an opaque payload under `msgType` without the typed-message envelope
90
98
  * transform. `data` is delivered verbatim (a raw string stays a string), so
@@ -193,4 +201,4 @@ type MatchmakeOptions = Pick<RoomOptions, 'criteria'> & {
193
201
  pollIntervalMs?: number;
194
202
  };
195
203
 
196
- export type { ChatMessageData as C, JoinTicketRequest as J, ListUserRoomsOptions as L, MultiplayerApi as M, Protocol as P, RealtimeRoomSummary as R, ServerRoom as S, RoomOptions as a, MatchmakeOptions as b, ConnectionState as c, RoomEvents as d, ServerPlayer as e };
204
+ export type { ChatMessageData as C, JoinTicketRequest as J, ListUserRoomsOptions as L, MultiplayerApi as M, Protocol as P, RealtimeRoomSummary as R, ServerPlayer as S, RoomOptions as a, ServerRoom as b, MatchmakeOptions as c, ConnectionState as d, RoomEvents as e };
@@ -1,6 +1,6 @@
1
- import { C as CanonicalValue, c as DeterministicStepContext, h as ReplayFile, O as OfflineSession } from './types-BV8uchSD.js';
2
- import { S as SyncplaySignedReceipt } from './secret-protocol-hnhTHLBs.js';
3
- import { M as MultiplayerApi } from './MultiplayerApi-nnrGTTcO.js';
1
+ import { C as CanonicalValue, c as DeterministicStepContext, h as ReplayFile, O as OfflineSession } from './types-ChJ9TO_o.js';
2
+ import { S as SyncplaySignedReceipt } from './secret-protocol-DY332qWW.js';
3
+ import { S as ServerPlayer, M as MultiplayerApi } from './MultiplayerApi-TQr01JT7.js';
4
4
 
5
5
  /**
6
6
  * Game-agnostic input authority (server orders inputs, clients simulate — §2 Option 1).
@@ -21,6 +21,8 @@ interface ConfirmedInputFrame {
21
21
  readonly inputs: readonly EncodedInput[];
22
22
  /** Slots whose input was substituted (repeated) because it never arrived in time. */
23
23
  readonly substitutedSlots: readonly number[];
24
+ /** Human-occupied slots at this authority tick. Omitted by legacy authorities. */
25
+ readonly occupiedSlots?: readonly number[];
24
26
  /** Immutable authority-owned consequences applied immediately before this tick's simulation step. */
25
27
  readonly commands?: readonly CanonicalValue[];
26
28
  readonly checksum: string;
@@ -66,6 +68,7 @@ interface InputAuthority {
66
68
  /** Lowest confirmed tick still retained, or -1 when nothing is confirmed yet. */
67
69
  readonly earliestRetainedTick: number;
68
70
  receiveInput(slot: number, tick: number, input: EncodedInput): InputSubmissionResult;
71
+ recordOccupiedSlots(tick: number, slots: readonly number[]): void;
69
72
  queueCommand(tick: number, command: CanonicalValue): void;
70
73
  /** Confirm every tick that can be confirmed up to and including `now`. Returns the new frames in order. */
71
74
  advance(now: number): readonly ConfirmedInputFrame[];
@@ -373,6 +376,7 @@ interface NetworkedSyncplayClientNetStats {
373
376
  readonly rollbacks: number;
374
377
  readonly maxRollbackDepth: number;
375
378
  }
379
+ type NetworkedSyncplaySlotPresence = 'human' | 'substituted' | 'empty' | 'unknown';
376
380
  interface NetworkedSyncplayClient {
377
381
  readonly slot: number;
378
382
  /** 'player' (holds a slot) or 'spectator' (read-only follower, slot -1). From session-start. */
@@ -381,6 +385,8 @@ interface NetworkedSyncplayClient {
381
385
  readonly predictedThrough: number;
382
386
  readonly appliedThrough: number;
383
387
  readonly rollbacks: number;
388
+ /** Human occupancy at the latest contiguous authority-confirmed frame. */
389
+ readonly confirmedPlayerPresence: readonly NetworkedSyncplaySlotPresence[];
384
390
  /** Live local netcode telemetry (RTT, timescale, delay, rollback depth). */
385
391
  readonly netStats: NetworkedSyncplayClientNetStats;
386
392
  readonly secrets: SyncplaySecretsClient;
@@ -429,11 +435,23 @@ type SyncplayConnectionEvent = {
429
435
  } | {
430
436
  readonly kind: 'reconnecting';
431
437
  };
438
+ interface SyncplayRoomOptions {
439
+ readonly maxPlayers?: number;
440
+ }
441
+ interface SyncplayOccupancySnapshot {
442
+ readonly players: readonly ServerPlayer[];
443
+ readonly occupied: number;
444
+ readonly maxPlayers: number;
445
+ readonly full: boolean;
446
+ readonly locked: boolean;
447
+ }
432
448
  interface SyncplayRoomTransport extends NetworkedClientTransport {
433
449
  /** The shareable room code (e.g. "HX9KWR"). */
434
450
  readonly roomCode: string;
435
451
  /** This client's player id, as assigned by the server on join. */
436
452
  readonly playerId: string;
453
+ readonly occupancy: SyncplayOccupancySnapshot;
454
+ readonly isCreator: boolean;
437
455
  /** Leave the deterministic room and close the underlying connection. */
438
456
  close(): void;
439
457
  /**
@@ -444,6 +462,8 @@ interface SyncplayRoomTransport extends NetworkedClientTransport {
444
462
  * the match down.
445
463
  */
446
464
  onConnectionEvent(handler: (event: SyncplayConnectionEvent) => void): void;
465
+ onOccupancyChange(handler: (snapshot: SyncplayOccupancySnapshot) => void): () => void;
466
+ setSeatingOpen(open: boolean): void;
447
467
  }
448
468
  /**
449
469
  * Join an existing deterministic room by its 6-char code and return a transport
@@ -451,7 +471,7 @@ interface SyncplayRoomTransport extends NetworkedClientTransport {
451
471
  */
452
472
  declare function joinSyncplayRoomByCode(api: MultiplayerApi, code: string): Promise<SyncplayRoomTransport>;
453
473
  /** Options for {@link quickMatchSyncplayRoom}. */
454
- interface QuickMatchSyncplayOptions {
474
+ interface QuickMatchSyncplayOptions extends SyncplayRoomOptions {
455
475
  /**
456
476
  * Auto-inject a coarse `region` criterion (default true). See
457
477
  * {@link quickMatchSyncplayRoom} for the semantics and the tradeoff.
@@ -485,6 +505,6 @@ declare function quickMatchSyncplayRoom(api: MultiplayerApi, criteria?: Record<s
485
505
  * (Caller-chosen codes are not supported on create — when the platform grows
486
506
  * that path, this signature gains a typed parameter rather than a dead one.)
487
507
  */
488
- declare function createSyncplayRoom(api: MultiplayerApi): Promise<SyncplayRoomTransport>;
508
+ declare function createSyncplayRoom(api: MultiplayerApi, options?: SyncplayRoomOptions): Promise<SyncplayRoomTransport>;
489
509
 
490
- export { createBrowserSyncplaySecretCrypto as A, createInputAuthority as B, type ConfirmedInputFrame as C, type DeterministicSessionDecodeRejection as D, type EncodedInput as E, createNetworkedSyncplayClient as F, createSyncplayRoom as G, createSyncplaySecretEventReader as H, type InputAuthority as I, createSyncplaySecretsClient as J, decodeDeterministicSessionMessage as K, deterministicSessionWireVersion as L, encodeDeterministicSessionMessage as M, type NetworkedClientTransport as N, joinSyncplayRoomByCode as O, quickMatchSyncplayRoom as P, type QuickMatchSyncplayOptions as Q, verifySyncplaySignedReceipt as R, type SyncplaySecretAuthorityCrypto as S, type DeterministicSessionDecodeResult as a, type DeterministicSessionMessage as b, type DeterministicSessionMessageKind as c, type DeterministicSessionRole as d, type InputAuthorityConfig as e, type InputAuthorityRestoreState as f, type InputAuthorityStats as g, type InputRejectionReason as h, type InputSubmissionResult as i, type NetworkedSyncplayClient as j, type NetworkedSyncplayClientInputDelayOptions as k, type NetworkedSyncplayClientNetStats as l, type NetworkedSyncplayClientOptions as m, type NetworkedSyncplayClientPacingOptions as n, type SyncplayChoiceClient as o, type SyncplayChoiceResolvedEvent as p, type SyncplayCollectionClient as q, type SyncplayCollectionRevealedEvent as r, type SyncplayOwnedSecret as s, type SyncplayRandomClient as t, type SyncplayRandomDrawnEvent as u, type SyncplayRoleClient as v, type SyncplayRoleRevealedEvent as w, type SyncplayRoomTransport as x, type SyncplaySecretEventReader as y, type SyncplaySecretsClient as z };
510
+ export { type SyncplayRoomTransport as A, type SyncplaySecretEventReader as B, type ConfirmedInputFrame as C, type DeterministicSessionDecodeRejection as D, type EncodedInput as E, type SyncplaySecretsClient as F, createBrowserSyncplaySecretCrypto as G, createInputAuthority as H, type InputAuthority as I, createNetworkedSyncplayClient as J, createSyncplayRoom as K, createSyncplaySecretEventReader as L, createSyncplaySecretsClient as M, type NetworkedClientTransport as N, decodeDeterministicSessionMessage as O, deterministicSessionWireVersion as P, type QuickMatchSyncplayOptions as Q, encodeDeterministicSessionMessage as R, type SyncplaySecretAuthorityCrypto as S, joinSyncplayRoomByCode as T, quickMatchSyncplayRoom as U, verifySyncplaySignedReceipt as V, type DeterministicSessionDecodeResult as a, type DeterministicSessionMessage as b, type DeterministicSessionMessageKind as c, type DeterministicSessionRole as d, type InputAuthorityConfig as e, type InputAuthorityRestoreState as f, type InputAuthorityStats as g, type InputRejectionReason as h, type InputSubmissionResult as i, type NetworkedSyncplayClient as j, type NetworkedSyncplayClientInputDelayOptions as k, type NetworkedSyncplayClientNetStats as l, type NetworkedSyncplayClientOptions as m, type NetworkedSyncplayClientPacingOptions as n, type NetworkedSyncplaySlotPresence as o, type SyncplayChoiceClient as p, type SyncplayChoiceResolvedEvent as q, type SyncplayCollectionClient as r, type SyncplayCollectionRevealedEvent as s, type SyncplayOccupancySnapshot as t, type SyncplayOwnedSecret as u, type SyncplayRandomClient as v, type SyncplayRandomDrawnEvent as w, type SyncplayRoleClient as x, type SyncplayRoleRevealedEvent as y, type SyncplayRoomOptions as z };
@@ -1,3 +1,19 @@
1
+ /**
2
+ * Backend HTTP dependencies injected into the Http*Api classes so they are
3
+ * decoupled from the SDK playground globals (getFirebaseClient/getCloudRunUrl).
4
+ * Each host (PlaygroundHost, Telegram shell, future Steam shell) supplies its own.
5
+ */
6
+ interface BackendHttpDeps {
7
+ getIdToken(): Promise<string>;
8
+ getCloudRunUrl(): string;
9
+ /**
10
+ * Returns the host's game-session token (`x-h5-game-session`) for the current
11
+ * game+user, or `null` when unavailable. Optional so non-playground shells
12
+ * that don't mint a GST omit the header and stay fail-safe.
13
+ */
14
+ getGameSessionToken?(): Promise<string | null>;
15
+ }
16
+
1
17
  /**
2
18
  * HTTP wrapper for calling Cloud Functions.
3
19
  *
@@ -20,4 +36,4 @@
20
36
  */
21
37
  type RemoteFunctionInvoker = <TResponse>(functionName: string, payload?: unknown) => Promise<TResponse>;
22
38
 
23
- export type { RemoteFunctionInvoker as R };
39
+ export type { BackendHttpDeps as B, RemoteFunctionInvoker as R };
@@ -905,6 +905,23 @@ function createDeterministicMath(fixedScale = 1e3, minFixed = DEFAULT_MIN_FIXED,
905
905
  }
906
906
  return saturate(x, minFixed, maxFixed);
907
907
  },
908
+ integerSqrt(value) {
909
+ if (!Number.isSafeInteger(value) || value < 0) {
910
+ throw new Error("DeterministicMath.integerSqrt: value must be a non-negative safe integer");
911
+ }
912
+ if (value < 2) return value;
913
+ let low = 1;
914
+ let high = Math.min(value, 94906266);
915
+ while (low <= high) {
916
+ const mid = low + Math.trunc((high - low) / 2);
917
+ if (mid <= Math.trunc(value / mid)) {
918
+ low = mid + 1;
919
+ } else {
920
+ high = mid - 1;
921
+ }
922
+ }
923
+ return high;
924
+ },
908
925
  abs(value) {
909
926
  assertFixed(value);
910
927
  return saturate(value < 0 ? -value : value, minFixed, maxFixed);
@@ -1057,6 +1074,11 @@ function createDeterministicMath(fixedScale = 1e3, minFixed = DEFAULT_MIN_FIXED,
1057
1074
  }
1058
1075
  return (full % fixedScale + fixedScale) % fixedScale;
1059
1076
  },
1077
+ atan2Signed(y, x) {
1078
+ const turn = this.atan2(y, x);
1079
+ const half = fixedScale / 2;
1080
+ return turn >= half ? turn - fixedScale : turn;
1081
+ },
1060
1082
  wrapTurns(t) {
1061
1083
  assertFixed(t);
1062
1084
  return (t % fixedScale + fixedScale) % fixedScale;
@@ -3498,5 +3520,5 @@ function createSessionFromPromotionSnapshot(config, blob) {
3498
3520
  }
3499
3521
 
3500
3522
  export { DEFAULT_MAX_SNAPSHOT_BYTES, DEFAULT_SNAPSHOT_CHUNK_SIZE, DeterministicRandom, SyncplayError, assertDeterministicPayloadFields, base64ToBytes, buildDeterministicSession, bytesToBase64, canonicalStringify, canonicalize, cloneCanonical, createDeterministicCommandTimeline, createDeterministicCommandTimelineSnapshot, createDeterministicMath, createInstantReplayRunner, createOfflineSession, createPauseController, createSchemaArtifacts, createSessionFromPromotionSnapshot, createSnapshotTransferCollector, createSnapshotTransferFromBytes, createStableIndexedMap, createSyncplayOfflineRuntime, decodeCanonicalBytes, decodeCanonicalValue, decodeDeterministicStateSnapshot, decodeSyncplaySecretPrivateMessage, decodeSyncplaySecretRequest, decodeUtf8, defaultChecksum, defineSyncplayGame, deserializeStateWith, deterministicPayloadMatchesFields, deterministicRoomDescriptorHash, deterministicShuffle, encodeCanonicalBytes, encodeDeterministicStateSnapshot, encodeSyncplaySecretPrivateMessage, encodeSyncplaySecretRequest, encodeUtf8, evaluateDeterministicCommandTimelineMigrationResult, exportPromotionSnapshot, hasSyncplaySecretCommandPrefix, invariant, isSyncplaySecretCommand, runInstantReplay, serializeStateWith, stableDescriptorId, stableEntries, stableSortedKeys, syncplaySecretProtocol, verifyReplay, verifyReplayWithDescriptor, withRuntimeDeterminismGuards };
3501
- //# sourceMappingURL=chunk-XQC54EPQ.js.map
3502
- //# sourceMappingURL=chunk-XQC54EPQ.js.map
3523
+ //# sourceMappingURL=chunk-2RSDZJHS.js.map
3524
+ //# sourceMappingURL=chunk-2RSDZJHS.js.map