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

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 (65) hide show
  1. package/dist/{AdsApi-CDJtVB3I.d.ts → AdsApi-CscCuIMY.d.ts} +114 -3
  2. package/dist/{SyncplayRoomTransport-BZFFN-il.d.ts → SyncplayRoomTransport-Bfv_KE63.d.ts} +113 -2
  3. package/dist/{chunk-N5MASNTK.js → chunk-CZONPFQG.js} +868 -85
  4. package/dist/chunk-CZONPFQG.js.map +1 -0
  5. package/dist/{chunk-3MDWJBCR.js → chunk-G7JAUUTF.js} +230 -22
  6. package/dist/chunk-G7JAUUTF.js.map +1 -0
  7. package/dist/{chunk-7RIEVFDA.js → chunk-KIA4VGSK.js} +109 -63
  8. package/dist/chunk-KIA4VGSK.js.map +1 -0
  9. package/dist/{chunk-RNEWXNDL.js → chunk-NU24WCLE.js} +51 -15
  10. package/dist/chunk-NU24WCLE.js.map +1 -0
  11. package/dist/{chunk-DMKR7SVQ.js → chunk-RIRXVDY4.js} +3 -3
  12. package/dist/{chunk-DMKR7SVQ.js.map → chunk-RIRXVDY4.js.map} +1 -1
  13. package/dist/{chunk-YSK7K2OH.js → chunk-XQC54EPQ.js} +222 -14
  14. package/dist/chunk-XQC54EPQ.js.map +1 -0
  15. package/dist/{index-BrvMOxG0.d.ts → index-Dl2PfHSb.d.ts} +9 -0
  16. package/dist/index.d.ts +69 -6
  17. package/dist/index.js +2 -2
  18. package/dist/mp-server/index.d.ts +37 -0
  19. package/dist/{multiplayer-service-BPEWIL4F.d.ts → multiplayer-service-BXMJaXot.d.ts} +1 -1
  20. package/dist/playground/index.js +23 -3
  21. package/dist/playground/index.js.map +1 -1
  22. package/dist/rundot-game-api/index.d.ts +2 -2
  23. package/dist/rundot-game-api/index.js +2 -2
  24. package/dist/secret-protocol-hnhTHLBs.d.ts +169 -0
  25. package/dist/{static-checker-nclHCa43.d.ts → static-checker-BshYHV5c.d.ts} +6 -1
  26. package/dist/syncplay/browser.d.ts +144 -6
  27. package/dist/syncplay/browser.js +2513 -114
  28. package/dist/syncplay/browser.js.map +1 -1
  29. package/dist/syncplay/creator.d.ts +2 -1
  30. package/dist/syncplay/creator.js +2 -2
  31. package/dist/syncplay/index.d.ts +2 -1
  32. package/dist/syncplay/index.js +2 -2
  33. package/dist/syncplay/node.d.ts +10 -4
  34. package/dist/syncplay/node.js +13 -10
  35. package/dist/syncplay/node.js.map +1 -1
  36. package/dist/syncplay/testing.d.ts +424 -4
  37. package/dist/syncplay/testing.js +1835 -26
  38. package/dist/syncplay/testing.js.map +1 -1
  39. package/dist/syncplay/tools.d.ts +2 -2
  40. package/dist/syncplay/tools.js +2 -2
  41. package/dist/vite/{dev-server-V3IZP5XX.js → dev-server-XDCK4DL7.js} +1314 -17
  42. package/dist/vite/dev-server-XDCK4DL7.js.map +1 -0
  43. package/dist/vite/index.js +1 -1
  44. package/docs/README.md +1 -1
  45. package/docs/SUMMARY.md +2 -2
  46. package/docs/agents-index.txt +1 -1
  47. package/docs/rundot-developer-platform/api/ANALYTICS.md +2 -0
  48. package/docs/rundot-developer-platform/api/ENVIRONMENT.md +1 -1
  49. package/docs/rundot-developer-platform/api/LIVEOPS.md +120 -2
  50. package/docs/rundot-developer-platform/api/PURCHASES.md +30 -1
  51. package/docs/rundot-developer-platform/api/RATE_LIMITS.md +9 -10
  52. package/docs/rundot-developer-platform/api/STORAGE.md +10 -7
  53. package/docs/rundot-developer-platform/api/SYNCPLAY-PHYSICS.md +169 -13
  54. package/docs/rundot-developer-platform/api/SYNCPLAY-SECRETS.md +187 -0
  55. package/docs/rundot-developer-platform/api/SYNCPLAY.md +56 -24
  56. package/docs/rundot-developer-platform/error-handling.md +9 -1
  57. package/docs/rundot-developer-platform/playground.md +16 -0
  58. package/package.json +1 -1
  59. package/dist/chunk-3MDWJBCR.js.map +0 -1
  60. package/dist/chunk-7RIEVFDA.js.map +0 -1
  61. package/dist/chunk-N5MASNTK.js.map +0 -1
  62. package/dist/chunk-RNEWXNDL.js.map +0 -1
  63. package/dist/chunk-YSK7K2OH.js.map +0 -1
  64. package/dist/vite/dev-server-V3IZP5XX.js.map +0 -1
  65. package/docs/rundot-developer-platform/api/EXPERIMENTS.md +0 -118
@@ -37,6 +37,8 @@ interface RpcResponse {
37
37
  detail?: string;
38
38
  /** Structured provider rejection detail, when available. */
39
39
  errorDetail?: ProviderErrorDetail;
40
+ /** Milliseconds the caller should wait before retrying a rate-limited request. */
41
+ retryAfterMs?: number;
40
42
  stack?: string;
41
43
  };
42
44
  }
@@ -1190,6 +1192,11 @@ interface Experiment {
1190
1192
  readonly groupName: string | null;
1191
1193
  }
1192
1194
  interface FeaturesApi {
1195
+ /**
1196
+ * @deprecated Platform-managed (1p-only) experiments. For your own A/B
1197
+ * tests use LiveOps experiments: `liveops.getConfigAsync()` → `assignments`.
1198
+ * Slated for removal once remaining 1p callers migrate.
1199
+ */
1193
1200
  getExperiment(experimentName: string): Promise<Experiment | null>;
1194
1201
  getFeatureFlag(flagName: string): Promise<boolean>;
1195
1202
  getFeatureGate(gateName: string): Promise<boolean>;
@@ -1201,29 +1208,75 @@ interface LiveOpsOverride {
1201
1208
  expiresAt?: string;
1202
1209
  values: Record<string, unknown>;
1203
1210
  }
1211
+ interface LiveOpsVariant {
1212
+ id: string;
1213
+ weight: number;
1214
+ values: Record<string, unknown>;
1215
+ }
1216
+ interface LiveOpsExperiment {
1217
+ id: string;
1218
+ salt?: string;
1219
+ activeAt?: string;
1220
+ expiresAt?: string;
1221
+ variants: LiveOpsVariant[];
1222
+ /** Mock-mode only: short-circuits hashing. Rejected by push-time validators. */
1223
+ forceVariant?: string;
1224
+ }
1225
+ interface ExperimentAssignment {
1226
+ experimentId: string;
1227
+ variantId: string;
1228
+ /** Configured weights, forwarded into the exposure event so the warehouse can
1229
+ * compare the observed split against the intended one (sample-ratio check). */
1230
+ variantWeight: number;
1231
+ totalWeight: number;
1232
+ }
1233
+ /** assignVariant's return: the winning variant plus the weight sum it won under. */
1234
+ interface AssignedVariant {
1235
+ variant: LiveOpsVariant;
1236
+ totalWeight: number;
1237
+ }
1204
1238
  interface LiveOpsSection {
1205
1239
  values?: Record<string, unknown>;
1206
1240
  overrides?: LiveOpsOverride[];
1241
+ experiments?: LiveOpsExperiment[];
1207
1242
  }
1208
1243
  interface ResolvedLiveOps {
1209
1244
  values: Record<string, unknown>;
1210
1245
  activeOverrideIds: string[];
1246
+ assignments: ExperimentAssignment[];
1211
1247
  /** Epoch-ms of the next window boundary that changes the active set, or null. */
1212
1248
  nextChangeAt: number | null;
1213
1249
  }
1250
+ /** FNV-1a 32-bit. Stable, portable; do not change without re-shuffling every live experiment. */
1251
+ declare function fnv1a32(input: string): number;
1252
+ declare const BUCKET_COUNT = 10000;
1253
+ /** Double-hash into [0, BUCKET_COUNT). The double pass is load-bearing: bit 0 of a
1254
+ * single fnv1a32 is a parity function of the input chars (odd-char XOR flips it,
1255
+ * odd-prime multiply preserves it), so `hash % 2` gave every 50/50 experiment the
1256
+ * same global player split (verified: 0%/100% cross-experiment agreement). Hashing
1257
+ * the first hash's decimal string breaks that structure (cf. GrowthBook hashVersion 2).
1258
+ * Do not change without re-shuffling every live experiment. */
1259
+ declare function assignmentBucket(seed: string, unitId: string): number;
1260
+ /** Pure deterministic assignment; null on malformed input (degrade-not-throw).
1261
+ * Variants own contiguous bucket ranges in array order, boundaries scaled to
1262
+ * BUCKET_COUNT, so a constant-total weight edit moves only the boundaries,
1263
+ * which is what makes the documented ramp recipe safe. */
1264
+ declare function assignVariant(experiment: LiveOpsExperiment, unitId: string): AssignedVariant | null;
1214
1265
  /**
1215
1266
  * Resolve a LiveOps `client` section against a caller-supplied clock. Pure: never
1216
1267
  * reads an ambient clock (`nowMs` is server-anchored in the SDK real paths,
1217
1268
  * `Date.now()` in Mock, UTC now in the CLI preview). Purity is load-bearing — the
1218
1269
  * MP authority resolves once at match start with a frozen timestamp.
1219
1270
  */
1220
- declare function resolveLiveOpsSection(section: LiveOpsSection | undefined, nowMs: number): ResolvedLiveOps;
1271
+ declare function resolveLiveOpsSection(section: LiveOpsSection | undefined, nowMs: number, unitId?: string): ResolvedLiveOps;
1221
1272
 
1222
1273
  /** Resolved config — the foot-gun-free default. */
1223
1274
  interface LiveOpsConfigResult {
1224
- /** Resolved client-visible values (base + currently-active overrides). */
1275
+ /** Resolved client-visible values (base + active overrides + assigned variants). */
1225
1276
  values: Record<string, unknown>;
1226
1277
  activeOverrideIds: string[];
1278
+ /** Deterministic experiment assignments for the current profile (empty pre-identity). */
1279
+ assignments: ExperimentAssignment[];
1227
1280
  /** Server config snapshot id the rules came from — quote it in bug reports. */
1228
1281
  configVersion: string;
1229
1282
  /** Epoch-ms (server clock) of the next schedule flip, or null. Re-call at/after it. */
@@ -1233,6 +1286,7 @@ interface LiveOpsConfigResult {
1233
1286
  interface LiveOpsRawConfig {
1234
1287
  values: Record<string, unknown>;
1235
1288
  overrides: LiveOpsOverride[];
1289
+ experiments: LiveOpsExperiment[];
1236
1290
  configVersion: string;
1237
1291
  /** Authoritative server clock at fetch, for callers doing their own resolution. */
1238
1292
  serverTimeMs: number;
@@ -1806,6 +1860,7 @@ interface RundotGameMessage {
1806
1860
  data?: any;
1807
1861
  error?: string;
1808
1862
  errorCode?: string;
1863
+ retryAfterMs?: number;
1809
1864
  /** Legacy flattened provider detail STRING — the field name is wire-frozen. */
1810
1865
  errorDetail?: string;
1811
1866
  /** Structured provider rejection detail (new wire field; see errors.ts). */
@@ -1910,6 +1965,17 @@ declare class RpcSharedAssetsApi implements SharedAssetsApi {
1910
1965
  private readonly rpcClient;
1911
1966
  constructor(rpcClient: RpcClient, rundotGameApi: RundotGameAPI);
1912
1967
  loadAssetsBundle(game: string, bundleKey: string, fileType?: string): Promise<ArrayBuffer>;
1968
+ /**
1969
+ * Pull the asset from the host in chunks. Only a host that predates the
1970
+ * chunk protocol (BEGIN rejected with "Unsupported message type") falls
1971
+ * back to the legacy single-shot RPC. A failure DURING the chunked
1972
+ * transfer must NOT fall back to single-shot: pushing the whole asset
1973
+ * through the bridge in one message is the exact Android wedge this
1974
+ * protocol exists to avoid (venus issue #2749). Those errors propagate to
1975
+ * the caller's CDN fallback instead.
1976
+ */
1977
+ private loadViaHostRpc;
1978
+ private loadSingleShot;
1913
1979
  }
1914
1980
  interface LoadEmbeddedAssetsRequest {
1915
1981
  assetKey: string;
@@ -1917,6 +1983,21 @@ interface LoadEmbeddedAssetsRequest {
1917
1983
  interface LoadEmbeddedAssetsResponse {
1918
1984
  base64Data: string;
1919
1985
  }
1986
+ interface LoadEmbeddedAssetBeginRequest {
1987
+ assetKey: string;
1988
+ }
1989
+ interface LoadEmbeddedAssetBeginResponse {
1990
+ totalBytes: number;
1991
+ maxChunkBytes: number;
1992
+ }
1993
+ interface LoadEmbeddedAssetChunkRequest {
1994
+ assetKey: string;
1995
+ position: number;
1996
+ length: number;
1997
+ }
1998
+ interface LoadEmbeddedAssetChunkResponse {
1999
+ base64Data: string;
2000
+ }
1920
2001
 
1921
2002
  /** the different subscription tiers RUN offers. LITE is lowest, ULTIMATE is highest */
1922
2003
  type SubscriptionTier = 'LITE' | 'CORE' | 'PLUS' | 'PRIME' | 'ULTIMATE';
@@ -2004,6 +2085,30 @@ interface OpenStoreResult {
2004
2085
  /** The updated balance after the store closed (saves a refetch) */
2005
2086
  newBalance: number;
2006
2087
  }
2088
+ type DirectPurchaseGrantKind = 'consumable' | 'durable';
2089
+ type DirectPurchaseStorePlatform = 'web' | 'ios' | 'android' | 'steam' | 'telegram';
2090
+ interface DirectPurchaseStorePrice {
2091
+ platform: DirectPurchaseStorePlatform;
2092
+ displayPrice?: string;
2093
+ appStoreProductId?: string;
2094
+ playProductId?: string;
2095
+ stripePriceIds?: Record<string, string>;
2096
+ taxBehavior?: 'inclusive' | 'exclusive';
2097
+ amountByCurrency?: Record<string, number>;
2098
+ stars?: number;
2099
+ }
2100
+ interface DirectPurchaseSku {
2101
+ sku: string;
2102
+ gameId: string;
2103
+ tierId: string;
2104
+ nominalUsd: number;
2105
+ storePrices: DirectPurchaseStorePrice[];
2106
+ grant: {
2107
+ entitlementId: string;
2108
+ quantity: number;
2109
+ kind: DirectPurchaseGrantKind;
2110
+ };
2111
+ }
2007
2112
  interface IapApi {
2008
2113
  getHardCurrencyBalance(): Promise<number>;
2009
2114
  spendCurrency(productId: string, amount: number, options?: SpendCurrencyOptions): Promise<SpendCurrencyResult>;
@@ -2013,6 +2118,7 @@ interface IapApi {
2013
2118
  purchaseSubscription(tier: SubscriptionTier, interval: SubscriptionInterval): Promise<PurchaseSubscriptionResponse>;
2014
2119
  isUserSubscribed(tier: SubscriptionTier): Promise<boolean>;
2015
2120
  hasUserMadePurchase(): Promise<boolean>;
2121
+ listDirectPurchaseSkus(gameId: string): Promise<DirectPurchaseSku[]>;
2016
2122
  }
2017
2123
 
2018
2124
  /**
@@ -4510,6 +4616,11 @@ interface RundotGameAPI {
4510
4616
  eventName: string;
4511
4617
  params?: Record<string, any>;
4512
4618
  }): Promise<void>;
4619
+ /**
4620
+ * @deprecated Platform-managed (1p-only) experiments. For your own A/B
4621
+ * tests use LiveOps experiments: `liveops.getConfigAsync()` → `assignments`.
4622
+ * Slated for removal once remaining 1p callers migrate.
4623
+ */
4513
4624
  getExperiment(options: {
4514
4625
  experimentName: string;
4515
4626
  }): Promise<any>;
@@ -4719,4 +4830,4 @@ interface AdsApi {
4719
4830
  showInterstitialAd(options?: ShowInterstitialAdOptions): Promise<boolean>;
4720
4831
  }
4721
4832
 
4722
- 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 RoomMessageEvent 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 BackButtonCallback as aA, type IdentityChangedCallback as aB, type IdentityChangedEvent as aC, type SimulationApi as aD, type SimulationSlotValidationResult as aE, type SimulationBatchOperation as aF, type SimulationBatchOperationsResult as aG, type SimulationAvailableItem as aH, type SimulationPowerPreview as aI, type SimulationSlotMutationResult as aJ, type SimulationSlotContainer as aK, type SimulationAssignment as aL, type SimulationState as aM, type ExecuteRecipeOptions as aN, type ExecuteRecipeResponse as aO, type CollectRecipeResult as aP, type ResetStateOptions as aQ, type ResetStateResult as aR, type GetActiveRunsOptions as aS, type ExecuteScopedRecipeOptions as aT, type ExecuteScopedRecipeResult as aU, type GetAvailableRecipesOptions as aV, type GetAvailableRecipesResult as aW, type Recipe as aX, type GetBatchRecipeRequirements as aY, type TriggerRecipeChainOptions as aZ, type RoomDataUpdate 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 LiveOpsApi as aq, type LiveOpsConfigResult as ar, type LiveOpsRawConfig as as, type LiveOpsSection as at, type LifecycleApi as au, type SleepCallback as av, type AwakeCallback as aw, type PauseCallback as ax, type ResumeCallback as ay, type QuitCallback as az, type RecipeRequirementResult as b, type UgcApi as b$, type ProposedMoveEvent as b0, RundotGameTransport as b1, type RoomsApi as b2, type CreateRoomOptions as b3, type JoinOrCreateRoomOptions as b4, type JoinOrCreateResult as b5, type ListRoomsOptions as b6, type UpdateRoomDataOptions as b7, type RoomMessageRequest as b8, type StartRoomGameOptions as b9, type ShareMetadata as bA, type ShareLinkResult as bB, type SocialQRCodeOptions as bC, type QRCodeResult as bD, type ShareClickData as bE, type ShareFileOptions as bF, type ShareFileResult as bG, type CanShareFileResult as bH, type ComposeSocialPostOptions as bI, type ComposeSocialPostResult as bJ, type EntitlementApi as bK, type Entitlement as bL, type LedgerEntry as bM, type StatsApi as bN, type GrantInfo as bO, type CollectiblesApi as bP, type CollectibleCard as bQ, type VipClaimResult as bR, type ShopApi as bS, type StorefrontResponse as bT, type StorefrontItem as bU, type ShopPurchaseResponse as bV, type ShopOrderHistoryResponse as bW, type PromptLoginResult as bX, type AccessTier as bY, type AccessGateApi as bZ, type TextGenApi as b_, type ProposeMoveRequest as ba, type ProposeMoveResult as bb, type ValidateMoveVerdict as bc, type ValidateMoveResult as bd, type RoomSubscriptionOptions as be, type LoggingApi as bf, type IapApi as bg, type SpendCurrencyOptions as bh, type SpendCurrencyResult as bi, type SubscriptionTier as bj, type RunSubscriptionsResponse as bk, type SubscriptionInterval as bl, type PurchaseSubscriptionResponse as bm, type OpenStoreResult as bn, type LoadEmbeddedAssetsResponse as bo, type SharedAssetsApi as bp, type CreditsApi as bq, type CreditsBillingContext as br, type CreditBalance as bs, type CreditSubscription as bt, type CreditPlansCatalog as bu, type OpenPaywallOptions as bv, type CreditsPurchaseResult as bw, type Unsubscribe as bx, type PreloaderApi as by, type SocialApi as bz, type RundotGameAvailableRecipe as c, type AdminThreeDGenListReportsParams as c$, type VideoApi as c0, type AppApi as c1, type AdminUgcApi as c2, type AdminImageGenApi as c3, type AdminVideoGenApi as c4, type AdminSpriteGenApi as c5, type AdminAudioGenApi as c6, type AdminThreeDGenApi as c7, type AppRole as c8, type ResolveLaunchIntentOptions as c9, type FilesApi as cA, type ClipsApi as cB, type AttributionApi as cC, type InitializationContext as cD, type InitializationOptions as cE, type CaptureConsent as cF, type StartClipRecordingOptions as cG, type ClipBlob as cH, type ClipsSupport as cI, type ClipPersistOptions as cJ, type ClipResult as cK, type UgcEntry as cL, type CaptureConsentStatus as cM, AccessDeniedError as cN, type AdminGenApi as cO, type AdminImageGenBrowseParams as cP, type AdminImageGenBrowseResponse as cQ, type AdminImageGenListReportsParams as cR, type AdminImageGenListReportsResponse as cS, type AdminImageGenResolveAction as cT, type AdminSpriteGenBrowseParams as cU, type AdminSpriteGenBrowseResponse as cV, type AdminSpriteGenListReportsParams as cW, type AdminSpriteGenListReportsResponse as cX, type AdminSpriteGenResolveAction as cY, type AdminThreeDGenBrowseParams as cZ, type AdminThreeDGenBrowseResponse as c_, type LaunchIntent as ca, type ReleaseNote as cb, type AdminUgcBrowseParams as cc, type AdminUgcBrowseResponse as cd, type AdminUgcListReportsParams as ce, type AdminUgcListReportsResponse as cf, type AdminUgcResolveAction as cg, type AdminGenBrowseParams as ch, type AdminGenBrowseResponse as ci, type ImageGenEntry as cj, type AdminGenListReportsParams as ck, type AdminGenListReportsResponse as cl, type ImageGenReport as cm, type AdminGenResolveAction as cn, type SpriteGenEntry as co, type SpriteGenReport as cp, type ThreeDGenEntry as cq, type ThreeDGenReport as cr, type Avatar3dApi as cs, type AssetManifest as ct, type Avatar3dConfig as cu, type ShowEditorOptions as cv, type Avatar3dEdits as cw, type AdsApi as cx, type RawEnvironmentInfo as cy, type SharedStorageHostApi as cz, type RundotGameCollectRecipeResult as d, type RCSAvailabilityReason as d$, type AdminThreeDGenListReportsResponse as d0, type AdminThreeDGenResolveAction as d1, type AdminUgcEntry as d2, type AdminVideoGenBrowseParams as d3, type AdminVideoGenBrowseResponse as d4, type AdminVideoGenListReportsParams as d5, type AdminVideoGenListReportsResponse as d6, type AdminVideoGenResolveAction as d7, type AiContentBlock as d8, type AiImageContent as d9, type CreditsExhaustedErrorInfo as dA, type CreditsPurchaseOutcome as dB, GAMEPAD_BUTTON_NAMES as dC, type GamepadAxes as dD, type GamepadButtonName as dE, type GamepadButtonState as dF, type GamepadSource as dG, type GetSubscriptionsForTierRequest as dH, type HudInsets as dI, type IdentityChangeReason as dJ, type InboundForKeyEntry as dK, type InboundMethodIds as dL, type InboundStorageApi as dM, type IsPlayerSubscribedRequest as dN, type JoinOrCreateRoomEnvelopeResponse as dO, type JoinRoomMatchCriteria as dP, type LaunchIntentKind as dQ, type LiveOpsOverride as dR, type LoadEmbeddedAssetsRequest as dS, MockAvatarApi as dT, type NotificationTriggerInput as dU, type OnNotificationCallback as dV, type OnRequestCallback as dW, type OnResponseCallback as dX, type PlatformCapabilities as dY, type ProposedMovePayload as dZ, type PurchaseSubscriptionRequest as d_, type AiImageUrlContent as da, type AiMessage as db, type AiResponseFormat as dc, type AiTextContent as dd, type AiToolResultContent as de, type AiToolUseContent as df, type Asset as dg, type AudioGenEntry as dh, type AudioGenReport as di, CLIP_CONTENT_TYPE as dj, COMPOSE_POST_MAX_TEXT_LENGTH as dk, COMPOSE_POST_MAX_TITLE_LENGTH as dl, COMPOSE_POST_SUBREDDIT_PATTERN as dm, CREDITS_EXHAUSTED_CODE as dn, type Category as dp, type ClipAudioOptions as dq, type ClipCameraOptions as dr, type ClipPipLayout as ds, type ClipPipPosition as dt, type ComposeSocialPostMedia as du, type CreditFreeDailyInfo as dv, type CreditPlan as dw, type CreditTopUpPack as dx, type CreditsBilledTo as dy, CreditsExhaustedError as dz, type RundotGameExecuteRecipeOptions as e, type RCSOptInStatus as e0, ROOM_GAME_PHASES as e1, type RecipeInfo as e2, type ReleaseType as e3, type ResolvedLiveOps as e4, type RoomEnvelopeResponse as e5, type RoomGamePhase as e6, type RoomMessageEventType as e7, type RoomMessagePayload as e8, type RoomsEnvelopeResponse as e9, type SubmitMessageResultChannel as eA, TIER_SUPPORTED_INTERVALS as eB, type Tool as eC, type ToolChoice as eD, type ToolUse as eE, type TimeIntervalTriggerInput as eF, type UgcReport as eG, type VideoGenEntry as eH, type VideoGenReport as eI, asCreditsExhaustedError as eJ, assertTierSupportsInterval as eK, createHost as eL, isCreditsExhaustedError as eM, mapCreditsExhaustion as eN, resolveCollectionItemPrice as eO, resolveLiveOpsSection as eP, toPromptWireRequest as eQ, RpcInboundStorageApi as ea, RpcSharedAssetsApi as eb, type RpcTransport as ec, type RunSubscription as ed, type RundotGameRoomCustomMetadata as ee, type RundotGameRoomPayload as ef, type RundotGameRoomRules as eg, type RundotGameRoomRulesGameState as eh, SHARE_FILE_ALLOWED_MIME_TYPES as ei, SHARE_FILE_MAX_SIZE_BYTES as ej, SOCIAL_COMPOSE_PLATFORMS as ek, type ScheduleRCSStatus as el, type ShareFileMimeType as em, type ShopOrder as en, type SimulationBatchOperationAssign as eo, type SimulationBatchOperationRemove as ep, type SimulationBatchOperationResult as eq, type SimulationPersonalState as er, type SimulationRoomActiveRecipe as es, type SimulationRoomState as et, type SocialComposePlatform as eu, type StorefrontCollection as ev, type StorefrontCollectionItem as ew, type SubPath as ex, type SubmitMessageChannel as ey, type SubmitMessageChannelResult as ez, type RundotGameExecuteRecipeResult as f, 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 };
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 };
@@ -1,4 +1,5 @@
1
- import { C as CanonicalValue, h as ReplayFile, O as OfflineSession } from './types-BV8uchSD.js';
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';
2
3
  import { M as MultiplayerApi } from './MultiplayerApi-nnrGTTcO.js';
3
4
 
4
5
  /**
@@ -20,6 +21,8 @@ interface ConfirmedInputFrame {
20
21
  readonly inputs: readonly EncodedInput[];
21
22
  /** Slots whose input was substituted (repeated) because it never arrived in time. */
22
23
  readonly substitutedSlots: readonly number[];
24
+ /** Immutable authority-owned consequences applied immediately before this tick's simulation step. */
25
+ readonly commands?: readonly CanonicalValue[];
23
26
  readonly checksum: string;
24
27
  }
25
28
  interface InputAuthorityConfig {
@@ -63,6 +66,7 @@ interface InputAuthority {
63
66
  /** Lowest confirmed tick still retained, or -1 when nothing is confirmed yet. */
64
67
  readonly earliestRetainedTick: number;
65
68
  receiveInput(slot: number, tick: number, input: EncodedInput): InputSubmissionResult;
69
+ queueCommand(tick: number, command: CanonicalValue): void;
66
70
  /** Confirm every tick that can be confirmed up to and including `now`. Returns the new frames in order. */
67
71
  advance(now: number): readonly ConfirmedInputFrame[];
68
72
  /** A confirmed frame still inside the retained window, for redundant re-broadcast. */
@@ -172,6 +176,107 @@ type DeterministicSessionDecodeResult = {
172
176
  declare function encodeDeterministicSessionMessage(message: DeterministicSessionMessage): string;
173
177
  declare function decodeDeterministicSessionMessage(text: string): DeterministicSessionDecodeResult;
174
178
 
179
+ interface SyncplaySecretAuthorityCrypto {
180
+ readonly kid: string;
181
+ readonly publicKeySpki: string;
182
+ randomBytes(length: number): Uint8Array;
183
+ sha256(bytes: Uint8Array): Uint8Array;
184
+ sign(bytes: Uint8Array): Uint8Array;
185
+ }
186
+ interface SyncplaySecretBrowserCrypto {
187
+ randomBytes(length: number): Uint8Array;
188
+ sha256(bytes: Uint8Array): Promise<Uint8Array>;
189
+ verify(publicKeySpki: string, bytes: Uint8Array, signature: Uint8Array): Promise<boolean>;
190
+ }
191
+ declare function createBrowserSyncplaySecretCrypto(): SyncplaySecretBrowserCrypto;
192
+ declare function verifySyncplaySignedReceipt(receipt: SyncplaySignedReceipt, publicKeySpki: string, cryptoProvider?: SyncplaySecretBrowserCrypto): Promise<boolean>;
193
+
194
+ interface SyncplaySecretClientTransport {
195
+ sendSecret?(text: string): void;
196
+ onSecretMessage?(handler: (text: string) => void): void;
197
+ }
198
+ interface SyncplaySecretConnectionIdentity {
199
+ readonly playerId?: string;
200
+ readonly slot: number;
201
+ readonly role: 'player' | 'spectator';
202
+ }
203
+ interface SyncplayOwnedSecret<T> {
204
+ readonly tokenId: string;
205
+ readonly systemId: string;
206
+ readonly ownerSlot: number;
207
+ readonly value: T;
208
+ }
209
+ interface SyncplayChoiceResolvedEvent<T> {
210
+ readonly systemId: string;
211
+ readonly requestId: string;
212
+ readonly roundId: string;
213
+ readonly reveals: Readonly<Record<number, T>>;
214
+ readonly missingSlots: readonly number[];
215
+ readonly missingReveal: 'omit' | 'forfeit';
216
+ }
217
+ interface SyncplayRandomDrawnEvent {
218
+ readonly systemId: string;
219
+ readonly requestId: string;
220
+ readonly drawIndex: number;
221
+ readonly value: number;
222
+ }
223
+ interface SyncplayCollectionRevealedEvent<T> {
224
+ readonly systemId: string;
225
+ readonly requestId: string;
226
+ readonly ownerSlot: number;
227
+ readonly tokenId: string;
228
+ readonly action: 'reveal' | 'play';
229
+ readonly value: T;
230
+ }
231
+ interface SyncplayRoleRevealedEvent<T> {
232
+ readonly systemId: string;
233
+ readonly requestId: string;
234
+ readonly slot: number;
235
+ readonly tokenId: string;
236
+ readonly value: T;
237
+ }
238
+ interface SyncplayChoiceClient<T> {
239
+ commit(roundId: string, value: T): Promise<SyncplaySignedReceipt>;
240
+ reveal(roundId: string): Promise<SyncplaySignedReceipt>;
241
+ resolved(roundId: string): Promise<SyncplayChoiceResolvedEvent<T>>;
242
+ }
243
+ interface SyncplayRandomClient {
244
+ draw(): Promise<SyncplayRandomDrawnEvent>;
245
+ }
246
+ interface SyncplayCollectionClient<T> {
247
+ draw(count?: number): Promise<readonly SyncplayOwnedSecret<T>[]>;
248
+ hand(): readonly SyncplayOwnedSecret<T>[];
249
+ reveal(tokenId: string): Promise<SyncplayCollectionRevealedEvent<T>>;
250
+ play(tokenId: string): Promise<SyncplayCollectionRevealedEvent<T>>;
251
+ }
252
+ interface SyncplayRoleClient<T> {
253
+ current(): SyncplayOwnedSecret<T> | undefined;
254
+ whenAssigned(): Promise<SyncplayOwnedSecret<T>>;
255
+ reveal(): Promise<SyncplayRoleRevealedEvent<T>>;
256
+ }
257
+ interface SyncplaySecretsClient {
258
+ whenReady(): Promise<void>;
259
+ choice<T>(systemId: string): SyncplayChoiceClient<T>;
260
+ random(systemId: string): SyncplayRandomClient;
261
+ deck<T>(systemId: string): SyncplayCollectionClient<T>;
262
+ bag<T>(systemId: string): SyncplayCollectionClient<T>;
263
+ role<T>(systemId: string): SyncplayRoleClient<T>;
264
+ acceptConfirmedCommands(commands: readonly CanonicalValue[]): Promise<void>;
265
+ }
266
+ interface CreateSyncplaySecretsClientOptions {
267
+ readonly transport: SyncplaySecretClientTransport;
268
+ readonly connection: () => SyncplaySecretConnectionIdentity;
269
+ readonly crypto?: SyncplaySecretBrowserCrypto;
270
+ }
271
+ declare function createSyncplaySecretsClient(options: CreateSyncplaySecretsClientOptions): SyncplaySecretsClient;
272
+ interface SyncplaySecretEventReader {
273
+ choiceResolved<T>(systemId: string): readonly SyncplayChoiceResolvedEvent<T>[];
274
+ randomDrawn(systemId: string): readonly SyncplayRandomDrawnEvent[];
275
+ collectionRevealed<T>(systemId: string): readonly SyncplayCollectionRevealedEvent<T>[];
276
+ roleRevealed<T>(systemId: string): readonly SyncplayRoleRevealedEvent<T>[];
277
+ }
278
+ declare function createSyncplaySecretEventReader(ctx: Pick<DeterministicStepContext, 'commands'>): SyncplaySecretEventReader;
279
+
175
280
  /**
176
281
  * Reusable client transport for game-agnostic deterministic multiplayer (§6 M4).
177
282
  *
@@ -185,6 +290,9 @@ declare function decodeDeterministicSessionMessage(text: string): DeterministicS
185
290
  interface NetworkedClientTransport {
186
291
  send(text: string): void;
187
292
  onMessage(handler: (text: string) => void): void;
293
+ sendSecret?(text: string): void;
294
+ onSecretMessage?(handler: (text: string) => void): void;
295
+ readonly playerId?: string;
188
296
  }
189
297
  interface NetworkedSyncplayClientOptions<State, Input> {
190
298
  readonly transport: NetworkedClientTransport;
@@ -233,6 +341,8 @@ interface NetworkedSyncplayClientOptions<State, Input> {
233
341
  readonly inputDelay?: NetworkedSyncplayClientInputDelayOptions;
234
342
  /** Monotonic-enough clock for RTT measurement. Default Date.now. NEVER used by the sim. */
235
343
  readonly now?: () => number;
344
+ readonly playerId?: string;
345
+ readonly secretCrypto?: SyncplaySecretBrowserCrypto;
236
346
  }
237
347
  interface NetworkedSyncplayClientPacingOptions {
238
348
  /** Interval between time-sync pings while pumpPaced is driven. Default 1000. */
@@ -273,6 +383,7 @@ interface NetworkedSyncplayClient {
273
383
  readonly rollbacks: number;
274
384
  /** Live local netcode telemetry (RTT, timescale, delay, rollback depth). */
275
385
  readonly netStats: NetworkedSyncplayClientNetStats;
386
+ readonly secrets: SyncplaySecretsClient;
276
387
  /** Resolves once `session-start` has been received. */
277
388
  whenReady(): Promise<void>;
278
389
  /** Predict and submit local input up to the prediction budget. */
@@ -376,4 +487,4 @@ declare function quickMatchSyncplayRoom(api: MultiplayerApi, criteria?: Record<s
376
487
  */
377
488
  declare function createSyncplayRoom(api: MultiplayerApi): Promise<SyncplayRoomTransport>;
378
489
 
379
- export { type ConfirmedInputFrame as C, type DeterministicSessionDecodeRejection as D, type EncodedInput as E, type InputAuthority as I, type NetworkedClientTransport as N, type QuickMatchSyncplayOptions as Q, type SyncplayRoomTransport 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, createInputAuthority as o, createNetworkedSyncplayClient as p, createSyncplayRoom as q, decodeDeterministicSessionMessage as r, deterministicSessionWireVersion as s, encodeDeterministicSessionMessage as t, joinSyncplayRoomByCode as u, quickMatchSyncplayRoom as v };
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 };