@series-inc/rundot-game-sdk 5.24.0-beta.1 → 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.
- package/dist/{AdsApi-qZCBWQM4.d.ts → AdsApi-CscCuIMY.d.ts} +242 -5
- package/dist/{LeaderboardApi-BJIye4S7.d.ts → LeaderboardApi-CrWxakrr.d.ts} +5 -1
- package/dist/{SyncplayRoomTransport-7F_e94v9.d.ts → SyncplayRoomTransport-Bfv_KE63.d.ts} +113 -2
- package/dist/chunk-CZONPFQG.js +33798 -0
- package/dist/chunk-CZONPFQG.js.map +1 -0
- package/dist/{chunk-RKWUCLFV.js → chunk-G7JAUUTF.js} +373 -39
- package/dist/chunk-G7JAUUTF.js.map +1 -0
- package/dist/{chunk-I3S5ZVHT.js → chunk-KIA4VGSK.js} +160 -68
- package/dist/chunk-KIA4VGSK.js.map +1 -0
- package/dist/{chunk-RNEWXNDL.js → chunk-NU24WCLE.js} +51 -15
- package/dist/chunk-NU24WCLE.js.map +1 -0
- package/dist/{chunk-TIOJVMES.js → chunk-RIRXVDY4.js} +51 -3
- package/dist/chunk-RIRXVDY4.js.map +1 -0
- package/dist/{chunk-5JSI7LA6.js → chunk-XQC54EPQ.js} +2725 -3030
- package/dist/chunk-XQC54EPQ.js.map +1 -0
- package/dist/host-http.d.ts +2 -2
- package/dist/{index-C_6su2d5.d.ts → index-Dl2PfHSb.d.ts} +11 -5
- package/dist/index.d.ts +103 -11
- package/dist/index.js +2 -2
- package/dist/mp-server/index.d.ts +37 -0
- package/dist/multiplayer-service-BXMJaXot.d.ts +1834 -0
- package/dist/playground/index.js +44 -6
- package/dist/playground/index.js.map +1 -1
- package/dist/rundot-game-api/index.d.ts +4 -4
- package/dist/rundot-game-api/index.js +2 -2
- package/dist/secret-protocol-hnhTHLBs.d.ts +169 -0
- package/dist/{session-promotion-CN7lr85d.d.ts → session-promotion-BMoIRgKe.d.ts} +3 -3
- package/dist/{static-checker-nclHCa43.d.ts → static-checker-BshYHV5c.d.ts} +6 -1
- package/dist/syncplay/browser.d.ts +846 -1649
- package/dist/syncplay/browser.js +19541 -23873
- package/dist/syncplay/browser.js.map +1 -1
- package/dist/syncplay/creator.d.ts +6 -5
- package/dist/syncplay/creator.js +2 -2
- package/dist/syncplay/index.d.ts +3 -2
- package/dist/syncplay/index.js +2 -2
- package/dist/syncplay/node.d.ts +10 -775
- package/dist/syncplay/node.js +5517 -36736
- package/dist/syncplay/node.js.map +1 -1
- package/dist/syncplay/testing.d.ts +5328 -0
- package/dist/syncplay/testing.js +5617 -0
- package/dist/syncplay/testing.js.map +1 -0
- package/dist/syncplay/tools.d.ts +2 -2
- package/dist/syncplay/tools.js +2 -2
- package/dist/{types-BXxDmID0.d.ts → types-BV8uchSD.d.ts} +21 -2
- package/dist/vite/{dev-server-V3IZP5XX.js → dev-server-XDCK4DL7.js} +1314 -17
- package/dist/vite/dev-server-XDCK4DL7.js.map +1 -0
- package/dist/vite/index.js +1 -1
- package/docs/README.md +1 -1
- package/docs/SUMMARY.md +2 -2
- package/docs/agents-index.txt +1 -1
- package/docs/rundot-developer-platform/api/AI.md +43 -1
- package/docs/rundot-developer-platform/api/ANALYTICS.md +2 -0
- package/docs/rundot-developer-platform/api/ENVIRONMENT.md +1 -1
- package/docs/rundot-developer-platform/api/FILES.md +20 -1
- package/docs/rundot-developer-platform/api/LIVEOPS.md +120 -2
- package/docs/rundot-developer-platform/api/NOTIFICATIONS.md +92 -221
- package/docs/rundot-developer-platform/api/PURCHASES.md +30 -1
- package/docs/rundot-developer-platform/api/RATE_LIMITS.md +9 -10
- package/docs/rundot-developer-platform/api/SHARING.md +6 -1
- package/docs/rundot-developer-platform/api/SPRITE_GEN.md +5 -3
- package/docs/rundot-developer-platform/api/STORAGE.md +10 -7
- package/docs/rundot-developer-platform/api/SYNCPLAY-MOVEMENT.md +2 -2
- package/docs/rundot-developer-platform/api/SYNCPLAY-PHYSICS.md +234 -16
- package/docs/rundot-developer-platform/api/SYNCPLAY-SECRETS.md +187 -0
- package/docs/rundot-developer-platform/api/SYNCPLAY.md +93 -23
- package/docs/rundot-developer-platform/cli-reference.md +13 -8
- package/docs/rundot-developer-platform/error-handling.md +9 -1
- package/docs/rundot-developer-platform/playground.md +49 -1
- package/package.json +6 -1
- package/dist/chunk-5JSI7LA6.js.map +0 -1
- package/dist/chunk-I3S5ZVHT.js.map +0 -1
- package/dist/chunk-RKWUCLFV.js.map +0 -1
- package/dist/chunk-RNEWXNDL.js.map +0 -1
- package/dist/chunk-TIOJVMES.js.map +0 -1
- package/dist/vite/dev-server-V3IZP5XX.js.map +0 -1
- package/docs/rundot-developer-platform/api/EXPERIMENTS.md +0 -118
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as ProviderErrorDetail, M as LeaderboardApi, I as ImageGenApi, A as AudioGenApi, V as VideoGenApi, q as SpriteGenApi, T as ThreeDGenApi } from './LeaderboardApi-
|
|
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
2
|
import { M as MultiplayerApi } from './MultiplayerApi-nnrGTTcO.js';
|
|
3
3
|
|
|
4
4
|
interface StorageApi {
|
|
@@ -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
|
}
|
|
@@ -241,10 +243,17 @@ interface ScheduleRCSInput {
|
|
|
241
243
|
/** Seconds from now; mutually exclusive with triggerAt; max 7 days */
|
|
242
244
|
delaySeconds?: number;
|
|
243
245
|
}
|
|
244
|
-
|
|
246
|
+
/**
|
|
247
|
+
* `skipped` — nothing was scheduled for a benign reason (e.g. the user is not
|
|
248
|
+
* RCS-reachable, or an identical message is already scheduled). Distinct from
|
|
249
|
+
* `failed`, which indicates a hard scheduling error. See `ScheduleRCSResult.reason`.
|
|
250
|
+
*/
|
|
251
|
+
type ScheduleRCSStatus = 'pending' | 'sent' | 'dry_run' | 'skipped' | 'failed';
|
|
245
252
|
interface ScheduleRCSResult {
|
|
246
253
|
scheduleId: string;
|
|
247
254
|
status: ScheduleRCSStatus;
|
|
255
|
+
/** Why the schedule was skipped. Only set when `status === 'skipped'`. */
|
|
256
|
+
reason?: string;
|
|
248
257
|
/**
|
|
249
258
|
* Reserved for a future schedule-status API. Not returned by
|
|
250
259
|
* `scheduleRCSAsync` in v1 (rate-cap deferral is handled internally at
|
|
@@ -292,14 +301,50 @@ interface RequestRCSOptInResult {
|
|
|
292
301
|
*/
|
|
293
302
|
newlySubscribed: boolean;
|
|
294
303
|
}
|
|
304
|
+
type SubmitMessageChannel = 'local' | 'rcs';
|
|
305
|
+
interface SubmitMessageInput {
|
|
306
|
+
channels: SubmitMessageChannel[];
|
|
307
|
+
title?: string;
|
|
308
|
+
body?: string;
|
|
309
|
+
templateId?: string;
|
|
310
|
+
params?: Record<string, string>;
|
|
311
|
+
collapseKey?: string;
|
|
312
|
+
ctaUrl?: string;
|
|
313
|
+
continuationParams?: Record<string, string>;
|
|
314
|
+
image?: string;
|
|
315
|
+
triggerAt?: string;
|
|
316
|
+
delaySeconds?: number;
|
|
317
|
+
payload?: Record<string, unknown>;
|
|
318
|
+
notificationId?: string;
|
|
319
|
+
priority?: number;
|
|
320
|
+
groupId?: string;
|
|
321
|
+
}
|
|
322
|
+
type SubmitMessageResultChannel = 'local' | 'rcs' | 'inbox';
|
|
323
|
+
interface SubmitMessageChannelResult {
|
|
324
|
+
channel: SubmitMessageResultChannel;
|
|
325
|
+
status: 'scheduled' | 'skipped';
|
|
326
|
+
id?: string;
|
|
327
|
+
reason?: string;
|
|
328
|
+
}
|
|
329
|
+
interface SubmitMessageResult {
|
|
330
|
+
messageId: string;
|
|
331
|
+
results: SubmitMessageChannelResult[];
|
|
332
|
+
}
|
|
295
333
|
interface NotificationsApi {
|
|
334
|
+
/**
|
|
335
|
+
* @deprecated Use `submitMessageAsync({ channels: ['local'], ... })` instead.
|
|
336
|
+
*/
|
|
296
337
|
scheduleAsync(title: string, body: string, seconds: number, notificationId?: string, options?: ScheduleNotificationOptions): Promise<string | null>;
|
|
297
338
|
cancelNotification(notificationId: string): Promise<boolean>;
|
|
298
339
|
getAllScheduledLocalNotifications(): Promise<ScheduleLocalNotification[]>;
|
|
299
340
|
isLocalNotificationsEnabled(): Promise<boolean>;
|
|
300
341
|
setLocalNotificationsEnabled(enabled: boolean): Promise<boolean>;
|
|
301
342
|
getRCSAvailableAsync(): Promise<RCSAvailabilityStatus>;
|
|
343
|
+
/**
|
|
344
|
+
* @deprecated Use `submitMessageAsync({ channels: ['rcs'], ... })` instead.
|
|
345
|
+
*/
|
|
302
346
|
scheduleRCSAsync(input: ScheduleRCSInput): Promise<ScheduleRCSResult>;
|
|
347
|
+
submitMessageAsync(input: SubmitMessageInput): Promise<SubmitMessageResult>;
|
|
303
348
|
/**
|
|
304
349
|
* Trigger the platform-owned RCS opt-in modal. The host shows one of the
|
|
305
350
|
* three modal states depending on whether the user has a phone on file and
|
|
@@ -896,6 +941,25 @@ type AiChatCompletionStreamChunk = {
|
|
|
896
941
|
finishReason: string;
|
|
897
942
|
usage: AiChatCompletionData['usage'];
|
|
898
943
|
};
|
|
944
|
+
/**
|
|
945
|
+
* Request for a templated ("prompt") completion. Games whose textGen config is
|
|
946
|
+
* `mode: 'templated'` don't send raw `model`/`system`/`messages` — they invoke
|
|
947
|
+
* a server-authored prompt by id. The server owns the model, the system
|
|
948
|
+
* prompt, and any `{{var}}` slots; the game contributes only the player's
|
|
949
|
+
* turn via `input`.
|
|
950
|
+
*/
|
|
951
|
+
interface PromptCompletionRequest {
|
|
952
|
+
/** Id of a server-authored prompt declared in rundot/textGen.config.json. */
|
|
953
|
+
promptId: string;
|
|
954
|
+
/** The player's turn; isolation-wrapped server-side. Text-only in v1. */
|
|
955
|
+
input?: string;
|
|
956
|
+
}
|
|
957
|
+
/**
|
|
958
|
+
* Builds the wire object for a templated prompt call explicitly (never
|
|
959
|
+
* spreads the caller's object) so only the templated-call fields ride the
|
|
960
|
+
* wire. Shared by every AiApi transport.
|
|
961
|
+
*/
|
|
962
|
+
declare function toPromptWireRequest(request: PromptCompletionRequest): PromptCompletionRequest;
|
|
899
963
|
interface AiChatCompletionStreamOptions {
|
|
900
964
|
/**
|
|
901
965
|
* Caller-supplied AbortSignal. Aborting causes the iterable to stop
|
|
@@ -977,6 +1041,53 @@ interface AiApi {
|
|
|
977
1041
|
* is non-empty.
|
|
978
1042
|
*/
|
|
979
1043
|
requestChatCompletionStreamAsync(request: AiChatCompletionRequest, options?: AiChatCompletionStreamOptions): AsyncIterable<AiChatCompletionStreamChunk>;
|
|
1044
|
+
/**
|
|
1045
|
+
* Invoke a server-authored prompt by id (templated textGen mode).
|
|
1046
|
+
*
|
|
1047
|
+
* Unlike `requestChatCompletionAsync`, the game does not choose the model
|
|
1048
|
+
* or author the messages — those live server-side in the prompt declared in
|
|
1049
|
+
* `rundot/textGen.config.json`. The optional `input` carries the player's
|
|
1050
|
+
* turn and is isolation-wrapped server-side; it is text-only in v1.
|
|
1051
|
+
*
|
|
1052
|
+
* There are no client-supplied variables in v1: `{{var}}` slots in the
|
|
1053
|
+
* server-side prompt resolve entirely from a trusted server-side bag, so
|
|
1054
|
+
* the call carries nothing to reconcile or sanitize beyond `input`.
|
|
1055
|
+
*
|
|
1056
|
+
* Note: against a templated game, the open-mode
|
|
1057
|
+
* `requestChatCompletionAsync` is rejected with HTTP 403 and error code
|
|
1058
|
+
* `AI_POLICY_DENIED` — use this method instead.
|
|
1059
|
+
*
|
|
1060
|
+
* @example
|
|
1061
|
+
* ```ts
|
|
1062
|
+
* const response = await textGen.requestPromptCompletionAsync({
|
|
1063
|
+
* promptId: 'npc-banter',
|
|
1064
|
+
* input: 'What do you think of the swamp zone?',
|
|
1065
|
+
* })
|
|
1066
|
+
* console.log(response.choices[0].message.content)
|
|
1067
|
+
* ```
|
|
1068
|
+
*/
|
|
1069
|
+
requestPromptCompletionAsync(request: PromptCompletionRequest): Promise<AiChatCompletionData>;
|
|
1070
|
+
/**
|
|
1071
|
+
* Streaming sibling of `requestPromptCompletionAsync`. Returns an async
|
|
1072
|
+
* iterable of chunks — the same chunk contract as
|
|
1073
|
+
* `requestChatCompletionStreamAsync` (see its docs for chunk buffering and
|
|
1074
|
+
* cancellation semantics). Cancel by `break`ing out of `for await`, calling
|
|
1075
|
+
* `return()` on the iterator, or aborting the optional `signal`.
|
|
1076
|
+
*
|
|
1077
|
+
* @example
|
|
1078
|
+
* ```ts
|
|
1079
|
+
* const stream = textGen.requestPromptCompletionStreamAsync({
|
|
1080
|
+
* promptId: 'npc-banter',
|
|
1081
|
+
* input: 'Tell me a story.',
|
|
1082
|
+
* })
|
|
1083
|
+
* let text = ''
|
|
1084
|
+
* for await (const chunk of stream) {
|
|
1085
|
+
* if (chunk.type === 'delta') text += chunk.text
|
|
1086
|
+
* if (chunk.type === 'done') console.log('usage', chunk.usage)
|
|
1087
|
+
* }
|
|
1088
|
+
* ```
|
|
1089
|
+
*/
|
|
1090
|
+
requestPromptCompletionStreamAsync(request: PromptCompletionRequest, options?: AiChatCompletionStreamOptions): AsyncIterable<AiChatCompletionStreamChunk>;
|
|
980
1091
|
}
|
|
981
1092
|
|
|
982
1093
|
type TextGenApi = AiApi;
|
|
@@ -1081,6 +1192,11 @@ interface Experiment {
|
|
|
1081
1192
|
readonly groupName: string | null;
|
|
1082
1193
|
}
|
|
1083
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
|
+
*/
|
|
1084
1200
|
getExperiment(experimentName: string): Promise<Experiment | null>;
|
|
1085
1201
|
getFeatureFlag(flagName: string): Promise<boolean>;
|
|
1086
1202
|
getFeatureGate(gateName: string): Promise<boolean>;
|
|
@@ -1092,29 +1208,75 @@ interface LiveOpsOverride {
|
|
|
1092
1208
|
expiresAt?: string;
|
|
1093
1209
|
values: Record<string, unknown>;
|
|
1094
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
|
+
}
|
|
1095
1238
|
interface LiveOpsSection {
|
|
1096
1239
|
values?: Record<string, unknown>;
|
|
1097
1240
|
overrides?: LiveOpsOverride[];
|
|
1241
|
+
experiments?: LiveOpsExperiment[];
|
|
1098
1242
|
}
|
|
1099
1243
|
interface ResolvedLiveOps {
|
|
1100
1244
|
values: Record<string, unknown>;
|
|
1101
1245
|
activeOverrideIds: string[];
|
|
1246
|
+
assignments: ExperimentAssignment[];
|
|
1102
1247
|
/** Epoch-ms of the next window boundary that changes the active set, or null. */
|
|
1103
1248
|
nextChangeAt: number | null;
|
|
1104
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;
|
|
1105
1265
|
/**
|
|
1106
1266
|
* Resolve a LiveOps `client` section against a caller-supplied clock. Pure: never
|
|
1107
1267
|
* reads an ambient clock (`nowMs` is server-anchored in the SDK real paths,
|
|
1108
1268
|
* `Date.now()` in Mock, UTC now in the CLI preview). Purity is load-bearing — the
|
|
1109
1269
|
* MP authority resolves once at match start with a frozen timestamp.
|
|
1110
1270
|
*/
|
|
1111
|
-
declare function resolveLiveOpsSection(section: LiveOpsSection | undefined, nowMs: number): ResolvedLiveOps;
|
|
1271
|
+
declare function resolveLiveOpsSection(section: LiveOpsSection | undefined, nowMs: number, unitId?: string): ResolvedLiveOps;
|
|
1112
1272
|
|
|
1113
1273
|
/** Resolved config — the foot-gun-free default. */
|
|
1114
1274
|
interface LiveOpsConfigResult {
|
|
1115
|
-
/** Resolved client-visible values (base +
|
|
1275
|
+
/** Resolved client-visible values (base + active overrides + assigned variants). */
|
|
1116
1276
|
values: Record<string, unknown>;
|
|
1117
1277
|
activeOverrideIds: string[];
|
|
1278
|
+
/** Deterministic experiment assignments for the current profile (empty pre-identity). */
|
|
1279
|
+
assignments: ExperimentAssignment[];
|
|
1118
1280
|
/** Server config snapshot id the rules came from — quote it in bug reports. */
|
|
1119
1281
|
configVersion: string;
|
|
1120
1282
|
/** Epoch-ms (server clock) of the next schedule flip, or null. Re-call at/after it. */
|
|
@@ -1124,6 +1286,7 @@ interface LiveOpsConfigResult {
|
|
|
1124
1286
|
interface LiveOpsRawConfig {
|
|
1125
1287
|
values: Record<string, unknown>;
|
|
1126
1288
|
overrides: LiveOpsOverride[];
|
|
1289
|
+
experiments: LiveOpsExperiment[];
|
|
1127
1290
|
configVersion: string;
|
|
1128
1291
|
/** Authoritative server clock at fetch, for callers doing their own resolution. */
|
|
1129
1292
|
serverTimeMs: number;
|
|
@@ -1697,6 +1860,7 @@ interface RundotGameMessage {
|
|
|
1697
1860
|
data?: any;
|
|
1698
1861
|
error?: string;
|
|
1699
1862
|
errorCode?: string;
|
|
1863
|
+
retryAfterMs?: number;
|
|
1700
1864
|
/** Legacy flattened provider detail STRING — the field name is wire-frozen. */
|
|
1701
1865
|
errorDetail?: string;
|
|
1702
1866
|
/** Structured provider rejection detail (new wire field; see errors.ts). */
|
|
@@ -1801,6 +1965,17 @@ declare class RpcSharedAssetsApi implements SharedAssetsApi {
|
|
|
1801
1965
|
private readonly rpcClient;
|
|
1802
1966
|
constructor(rpcClient: RpcClient, rundotGameApi: RundotGameAPI);
|
|
1803
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;
|
|
1804
1979
|
}
|
|
1805
1980
|
interface LoadEmbeddedAssetsRequest {
|
|
1806
1981
|
assetKey: string;
|
|
@@ -1808,6 +1983,21 @@ interface LoadEmbeddedAssetsRequest {
|
|
|
1808
1983
|
interface LoadEmbeddedAssetsResponse {
|
|
1809
1984
|
base64Data: string;
|
|
1810
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
|
+
}
|
|
1811
2001
|
|
|
1812
2002
|
/** the different subscription tiers RUN offers. LITE is lowest, ULTIMATE is highest */
|
|
1813
2003
|
type SubscriptionTier = 'LITE' | 'CORE' | 'PLUS' | 'PRIME' | 'ULTIMATE';
|
|
@@ -1895,6 +2085,30 @@ interface OpenStoreResult {
|
|
|
1895
2085
|
/** The updated balance after the store closed (saves a refetch) */
|
|
1896
2086
|
newBalance: number;
|
|
1897
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
|
+
}
|
|
1898
2112
|
interface IapApi {
|
|
1899
2113
|
getHardCurrencyBalance(): Promise<number>;
|
|
1900
2114
|
spendCurrency(productId: string, amount: number, options?: SpendCurrencyOptions): Promise<SpendCurrencyResult>;
|
|
@@ -1904,6 +2118,7 @@ interface IapApi {
|
|
|
1904
2118
|
purchaseSubscription(tier: SubscriptionTier, interval: SubscriptionInterval): Promise<PurchaseSubscriptionResponse>;
|
|
1905
2119
|
isUserSubscribed(tier: SubscriptionTier): Promise<boolean>;
|
|
1906
2120
|
hasUserMadePurchase(): Promise<boolean>;
|
|
2121
|
+
listDirectPurchaseSkus(gameId: string): Promise<DirectPurchaseSku[]>;
|
|
1907
2122
|
}
|
|
1908
2123
|
|
|
1909
2124
|
/**
|
|
@@ -2664,6 +2879,13 @@ interface ComposeSocialPostOptions {
|
|
|
2664
2879
|
title?: string;
|
|
2665
2880
|
/** Target subreddit (bare name, no `r/` prefix), used only when routed to Reddit. */
|
|
2666
2881
|
subreddit?: string;
|
|
2882
|
+
/**
|
|
2883
|
+
* OpenGraph metadata for the tracked share link minted from `shareParams`
|
|
2884
|
+
* (same semantics as `shareLinkAsync`). Fields left absent fall back to the
|
|
2885
|
+
* game's values (name/thumbnail). Ignored when `shareParams` is absent — no
|
|
2886
|
+
* link is minted, so there is nothing to attach a preview to.
|
|
2887
|
+
*/
|
|
2888
|
+
metadata?: ShareMetadata;
|
|
2667
2889
|
}
|
|
2668
2890
|
interface ComposeSocialPostResult {
|
|
2669
2891
|
/**
|
|
@@ -2997,6 +3219,16 @@ type TransformParams = {
|
|
|
2997
3219
|
outputKey: string;
|
|
2998
3220
|
maxDurationSec: number;
|
|
2999
3221
|
clientRef?: string;
|
|
3222
|
+
} | {
|
|
3223
|
+
op: 'overlay';
|
|
3224
|
+
input: string;
|
|
3225
|
+
overlay: string;
|
|
3226
|
+
outputKey: string;
|
|
3227
|
+
position?: 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
|
|
3228
|
+
scale?: number;
|
|
3229
|
+
margin?: number;
|
|
3230
|
+
opacity?: number;
|
|
3231
|
+
clientRef?: string;
|
|
3000
3232
|
} | ArchiveExtractParams;
|
|
3001
3233
|
interface TransformResult {
|
|
3002
3234
|
jobId: string;
|
|
@@ -4384,6 +4616,11 @@ interface RundotGameAPI {
|
|
|
4384
4616
|
eventName: string;
|
|
4385
4617
|
params?: Record<string, any>;
|
|
4386
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
|
+
*/
|
|
4387
4624
|
getExperiment(options: {
|
|
4388
4625
|
experimentName: string;
|
|
4389
4626
|
}): Promise<any>;
|
|
@@ -4593,4 +4830,4 @@ interface AdsApi {
|
|
|
4593
4830
|
showInterstitialAd(options?: ShowInterstitialAdOptions): Promise<boolean>;
|
|
4594
4831
|
}
|
|
4595
4832
|
|
|
4596
|
-
export { type EnvironmentInfo as $, type AnalyticsApi as A, type BatchRecipeRequirementsResult as B, type NotificationsApi as C, type ScheduleLocalNotification as D, type ScheduleNotificationOptions as E, type RCSAvailabilityStatus as F, type ScheduleRCSInput as G, type Host as H, type ScheduleRCSResult as I, type RequestRCSOptInInput as J, type RequestRCSOptInResult as K, type PopupsApi as L, type ShowToastOptions as M, type NavigationApi as N, type LikeDialogResult as O, type Profile as P, type QuitOptions as Q, type RundotGameAPI as R, type SimulationActiveRunsUpdate as S, type CommentsPanelResult as T, type LikeStateResult as U, type ShowInterstitialAdOptions as V, type ShowRewardedAdOptions as W, type ProfileApi as X, type DeviceApi as Y, type DeviceInfo as Z, type EnvironmentApi as _, type RecipeRequirementQuery as a, type RoomsApi as a$, type SystemApi as a0, type SafeArea as a1, type AddToHomeScreenResult as a2, type CdnApi as a3, type FetchFromCdnOptions as a4, type AssetUrlResult as a5, type TimeApi as a6, type ServerTimeData as a7, type GetFutureTimeOptions as a8, type AiApi as a9, type SimulationApi as aA, type SimulationSlotValidationResult as aB, type SimulationBatchOperation as aC, type SimulationBatchOperationsResult as aD, type SimulationAvailableItem as aE, type SimulationPowerPreview as aF, type SimulationSlotMutationResult as aG, type SimulationSlotContainer as aH, type SimulationAssignment as aI, type SimulationState as aJ, type ExecuteRecipeOptions as aK, type ExecuteRecipeResponse as aL, type CollectRecipeResult as aM, type ResetStateOptions as aN, type ResetStateResult as aO, type GetActiveRunsOptions as aP, type ExecuteScopedRecipeOptions as aQ, type ExecuteScopedRecipeResult as aR, type GetAvailableRecipesOptions as aS, type GetAvailableRecipesResult as aT, type Recipe as aU, type GetBatchRecipeRequirements as aV, type TriggerRecipeChainOptions as aW, type RoomDataUpdate as aX, type RoomMessageEvent as aY, type ProposedMoveEvent as aZ, RundotGameTransport as a_, type AiChatCompletionRequest as aa, type AiChatCompletionData as ab, type AiChatCompletionStreamOptions as ac, type AiChatCompletionStreamChunk as ad, type HapticsApi as ae, HapticFeedbackStyle as af, type GamepadSnapshot as ag, type GamepadConnectionEvent as ah, type Subscription as ai, type GamepadApi as aj, type GamepadLatencyStats as ak, type FeaturesApi as al, type Experiment as am, type LiveOpsApi as an, type LiveOpsConfigResult as ao, type LiveOpsRawConfig as ap, type LiveOpsSection as aq, type LifecycleApi as ar, type SleepCallback as as, type AwakeCallback as at, type PauseCallback as au, type ResumeCallback as av, type QuitCallback as aw, type BackButtonCallback as ax, type IdentityChangedCallback as ay, type IdentityChangedEvent as az, type RecipeRequirementResult as b, type AdminUgcApi as b$, type CreateRoomOptions as b0, type JoinOrCreateRoomOptions as b1, type JoinOrCreateResult as b2, type ListRoomsOptions as b3, type UpdateRoomDataOptions as b4, type RoomMessageRequest as b5, type StartRoomGameOptions as b6, type ProposeMoveRequest as b7, type ProposeMoveResult as b8, type ValidateMoveVerdict as b9, type QRCodeResult as bA, type ShareClickData as bB, type ShareFileOptions as bC, type ShareFileResult as bD, type CanShareFileResult as bE, type ComposeSocialPostOptions as bF, type ComposeSocialPostResult as bG, type EntitlementApi as bH, type Entitlement as bI, type LedgerEntry as bJ, type StatsApi as bK, type GrantInfo as bL, type CollectiblesApi as bM, type CollectibleCard as bN, type VipClaimResult as bO, type ShopApi as bP, type StorefrontResponse as bQ, type StorefrontItem as bR, type ShopPurchaseResponse as bS, type ShopOrderHistoryResponse as bT, type PromptLoginResult as bU, type AccessTier as bV, type AccessGateApi as bW, type TextGenApi as bX, type UgcApi as bY, type VideoApi as bZ, type AppApi as b_, type ValidateMoveResult as ba, type RoomSubscriptionOptions as bb, type LoggingApi as bc, type IapApi as bd, type SpendCurrencyOptions as be, type SpendCurrencyResult as bf, type SubscriptionTier as bg, type RunSubscriptionsResponse as bh, type SubscriptionInterval as bi, type PurchaseSubscriptionResponse as bj, type OpenStoreResult as bk, type LoadEmbeddedAssetsResponse as bl, type SharedAssetsApi as bm, type CreditsApi as bn, type CreditsBillingContext as bo, type CreditBalance as bp, type CreditSubscription as bq, type CreditPlansCatalog as br, type OpenPaywallOptions as bs, type CreditsPurchaseResult as bt, type Unsubscribe as bu, type PreloaderApi as bv, type SocialApi as bw, type ShareMetadata as bx, type ShareLinkResult as by, type SocialQRCodeOptions as bz, type RundotGameAvailableRecipe as c, type AdminUgcEntry as c$, type AdminImageGenApi as c0, type AdminVideoGenApi as c1, type AdminSpriteGenApi as c2, type AdminAudioGenApi as c3, type AdminThreeDGenApi as c4, type AppRole as c5, type ResolveLaunchIntentOptions as c6, type LaunchIntent as c7, type ReleaseNote as c8, type AdminUgcBrowseParams as c9, type InitializationContext as cA, type InitializationOptions as cB, type CaptureConsent as cC, type StartClipRecordingOptions as cD, type ClipBlob as cE, type ClipsSupport as cF, type ClipPersistOptions as cG, type ClipResult as cH, type UgcEntry as cI, type CaptureConsentStatus as cJ, AccessDeniedError as cK, type AdminGenApi as cL, type AdminImageGenBrowseParams as cM, type AdminImageGenBrowseResponse as cN, type AdminImageGenListReportsParams as cO, type AdminImageGenListReportsResponse as cP, type AdminImageGenResolveAction as cQ, type AdminSpriteGenBrowseParams as cR, type AdminSpriteGenBrowseResponse as cS, type AdminSpriteGenListReportsParams as cT, type AdminSpriteGenListReportsResponse as cU, type AdminSpriteGenResolveAction as cV, type AdminThreeDGenBrowseParams as cW, type AdminThreeDGenBrowseResponse as cX, type AdminThreeDGenListReportsParams as cY, type AdminThreeDGenListReportsResponse as cZ, type AdminThreeDGenResolveAction as c_, type AdminUgcBrowseResponse as ca, type AdminUgcListReportsParams as cb, type AdminUgcListReportsResponse as cc, type AdminUgcResolveAction as cd, type AdminGenBrowseParams as ce, type AdminGenBrowseResponse as cf, type ImageGenEntry as cg, type AdminGenListReportsParams as ch, type AdminGenListReportsResponse as ci, type ImageGenReport as cj, type AdminGenResolveAction as ck, type SpriteGenEntry as cl, type SpriteGenReport as cm, type ThreeDGenEntry as cn, type ThreeDGenReport as co, type Avatar3dApi as cp, type AssetManifest as cq, type Avatar3dConfig as cr, type ShowEditorOptions as cs, type Avatar3dEdits as ct, type AdsApi as cu, type RawEnvironmentInfo as cv, type SharedStorageHostApi as cw, type FilesApi as cx, type ClipsApi as cy, type AttributionApi as cz, type RundotGameCollectRecipeResult as d, type RecipeInfo as d$, type AdminVideoGenBrowseParams as d0, type AdminVideoGenBrowseResponse as d1, type AdminVideoGenListReportsParams as d2, type AdminVideoGenListReportsResponse as d3, type AdminVideoGenResolveAction as d4, type AiContentBlock as d5, type AiImageContent as d6, type AiImageUrlContent as d7, type AiMessage as d8, type AiResponseFormat as d9, type GamepadAxes as dA, type GamepadButtonName as dB, type GamepadButtonState as dC, type GamepadSource as dD, type GetSubscriptionsForTierRequest as dE, type HudInsets as dF, type IdentityChangeReason as dG, type InboundForKeyEntry as dH, type InboundMethodIds as dI, type InboundStorageApi as dJ, type IsPlayerSubscribedRequest as dK, type JoinOrCreateRoomEnvelopeResponse as dL, type JoinRoomMatchCriteria as dM, type LaunchIntentKind as dN, type LiveOpsOverride as dO, type LoadEmbeddedAssetsRequest as dP, MockAvatarApi as dQ, type NotificationTriggerInput as dR, type OnNotificationCallback as dS, type OnRequestCallback as dT, type OnResponseCallback as dU, type PlatformCapabilities as dV, type ProposedMovePayload as dW, type PurchaseSubscriptionRequest as dX, type RCSAvailabilityReason as dY, type RCSOptInStatus as dZ, ROOM_GAME_PHASES as d_, type AiTextContent as da, type AiToolResultContent as db, type AiToolUseContent as dc, type Asset as dd, type AudioGenEntry as de, type AudioGenReport as df, CLIP_CONTENT_TYPE as dg, COMPOSE_POST_MAX_TEXT_LENGTH as dh, COMPOSE_POST_MAX_TITLE_LENGTH as di, COMPOSE_POST_SUBREDDIT_PATTERN as dj, CREDITS_EXHAUSTED_CODE as dk, type Category as dl, type ClipAudioOptions as dm, type ClipCameraOptions as dn, type ClipPipLayout as dp, type ClipPipPosition as dq, type ComposeSocialPostMedia as dr, type CreditFreeDailyInfo as ds, type CreditPlan as dt, type CreditTopUpPack as du, type CreditsBilledTo as dv, CreditsExhaustedError as dw, type CreditsExhaustedErrorInfo as dx, type CreditsPurchaseOutcome as dy, GAMEPAD_BUTTON_NAMES as dz, type RundotGameExecuteRecipeOptions as e, type ReleaseType as e0, type ResolvedLiveOps as e1, type RoomEnvelopeResponse as e2, type RoomGamePhase as e3, type RoomMessageEventType as e4, type RoomMessagePayload as e5, type RoomsEnvelopeResponse as e6, RpcInboundStorageApi as e7, RpcSharedAssetsApi as e8, type RpcTransport as e9, type UgcReport as eA, type VideoGenEntry as eB, type VideoGenReport as eC, asCreditsExhaustedError as eD, assertTierSupportsInterval as eE, createHost as eF, isCreditsExhaustedError as eG, mapCreditsExhaustion as eH, resolveCollectionItemPrice as eI, resolveLiveOpsSection as eJ, type RunSubscription as ea, type RundotGameRoomCustomMetadata as eb, type RundotGameRoomPayload as ec, type RundotGameRoomRules as ed, type RundotGameRoomRulesGameState as ee, SHARE_FILE_ALLOWED_MIME_TYPES as ef, SHARE_FILE_MAX_SIZE_BYTES as eg, SOCIAL_COMPOSE_PLATFORMS as eh, type ScheduleRCSStatus as ei, type ShareFileMimeType as ej, type ShopOrder as ek, type SimulationBatchOperationAssign as el, type SimulationBatchOperationRemove as em, type SimulationBatchOperationResult as en, type SimulationPersonalState as eo, type SimulationRoomActiveRecipe as ep, type SimulationRoomState as eq, type SocialComposePlatform as er, type StorefrontCollection as es, type StorefrontCollectionItem as et, type SubPath as eu, TIER_SUPPORTED_INTERVALS as ev, type Tool as ew, type ToolChoice as ex, type ToolUse as ey, type TimeIntervalTriggerInput 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,4 @@
|
|
|
1
|
-
import { h as ReplayFile } from './types-
|
|
1
|
+
import { h as ReplayFile } from './types-BV8uchSD.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';
|
|
@@ -450,6 +450,10 @@ interface AnimateSpriteParams {
|
|
|
450
450
|
sourceFileKey?: string;
|
|
451
451
|
/** Or: an HTTPS URL to import and animate. */
|
|
452
452
|
sourceImageUrl?: string;
|
|
453
|
+
/** Override source-derived animation mode. Omit to infer from the source asset. */
|
|
454
|
+
pixel?: boolean;
|
|
455
|
+
/** Pixel-animation palette size. The animation provider does not accept a fixed hex palette. */
|
|
456
|
+
paletteSize?: number;
|
|
453
457
|
/** Motion description, e.g. "walk cycle, side view" or "idle breathing". */
|
|
454
458
|
prompt: string;
|
|
455
459
|
/** Frame count. Pixel: 2-16 (even), HD: 2-24 (even). Default 8. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { C as CanonicalValue, h as ReplayFile, O as OfflineSession } from './types-
|
|
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
|
|
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 };
|