@rydr/game-sdk 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/README.md +220 -0
  2. package/dist/client/HardwareStore.d.ts +40 -0
  3. package/dist/client/HardwareStore.d.ts.map +1 -0
  4. package/dist/client/HardwareStore.js +36 -0
  5. package/dist/client/HardwareStore.js.map +1 -0
  6. package/dist/client/PlatformClient.d.ts +182 -0
  7. package/dist/client/PlatformClient.d.ts.map +1 -0
  8. package/dist/client/PlatformClient.js +374 -0
  9. package/dist/client/PlatformClient.js.map +1 -0
  10. package/dist/client/Room.d.ts +127 -0
  11. package/dist/client/Room.d.ts.map +1 -0
  12. package/dist/client/Room.js +235 -0
  13. package/dist/client/Room.js.map +1 -0
  14. package/dist/client/adminContent.d.ts +65 -0
  15. package/dist/client/adminContent.d.ts.map +1 -0
  16. package/dist/client/adminContent.js +75 -0
  17. package/dist/client/adminContent.js.map +1 -0
  18. package/dist/client/index.d.ts +7 -0
  19. package/dist/client/index.d.ts.map +1 -0
  20. package/dist/client/index.js +7 -0
  21. package/dist/client/index.js.map +1 -0
  22. package/dist/client/replayCodec.d.ts +27 -0
  23. package/dist/client/replayCodec.d.ts.map +1 -0
  24. package/dist/client/replayCodec.js +74 -0
  25. package/dist/client/replayCodec.js.map +1 -0
  26. package/dist/host/PlatformHost.d.ts +169 -0
  27. package/dist/host/PlatformHost.d.ts.map +1 -0
  28. package/dist/host/PlatformHost.js +248 -0
  29. package/dist/host/PlatformHost.js.map +1 -0
  30. package/dist/host/index.d.ts +3 -0
  31. package/dist/host/index.d.ts.map +1 -0
  32. package/dist/host/index.js +3 -0
  33. package/dist/host/index.js.map +1 -0
  34. package/dist/index.d.ts +12 -0
  35. package/dist/index.d.ts.map +1 -0
  36. package/dist/index.js +12 -0
  37. package/dist/index.js.map +1 -0
  38. package/dist/protocol/boards.d.ts +61 -0
  39. package/dist/protocol/boards.d.ts.map +1 -0
  40. package/dist/protocol/boards.js +53 -0
  41. package/dist/protocol/boards.js.map +1 -0
  42. package/dist/protocol/buttons.d.ts +13 -0
  43. package/dist/protocol/buttons.d.ts.map +1 -0
  44. package/dist/protocol/buttons.js +2 -0
  45. package/dist/protocol/buttons.js.map +1 -0
  46. package/dist/protocol/capabilities.d.ts +23 -0
  47. package/dist/protocol/capabilities.d.ts.map +1 -0
  48. package/dist/protocol/capabilities.js +10 -0
  49. package/dist/protocol/capabilities.js.map +1 -0
  50. package/dist/protocol/gamedata.d.ts +23 -0
  51. package/dist/protocol/gamedata.d.ts.map +1 -0
  52. package/dist/protocol/gamedata.js +2 -0
  53. package/dist/protocol/gamedata.js.map +1 -0
  54. package/dist/protocol/guards.d.ts +15 -0
  55. package/dist/protocol/guards.d.ts.map +1 -0
  56. package/dist/protocol/guards.js +45 -0
  57. package/dist/protocol/guards.js.map +1 -0
  58. package/dist/protocol/identity.d.ts +21 -0
  59. package/dist/protocol/identity.d.ts.map +1 -0
  60. package/dist/protocol/identity.js +2 -0
  61. package/dist/protocol/identity.js.map +1 -0
  62. package/dist/protocol/index.d.ts +12 -0
  63. package/dist/protocol/index.d.ts.map +1 -0
  64. package/dist/protocol/index.js +12 -0
  65. package/dist/protocol/index.js.map +1 -0
  66. package/dist/protocol/messages.d.ts +407 -0
  67. package/dist/protocol/messages.d.ts.map +1 -0
  68. package/dist/protocol/messages.js +2 -0
  69. package/dist/protocol/messages.js.map +1 -0
  70. package/dist/protocol/replays.d.ts +67 -0
  71. package/dist/protocol/replays.d.ts.map +1 -0
  72. package/dist/protocol/replays.js +14 -0
  73. package/dist/protocol/replays.js.map +1 -0
  74. package/dist/protocol/room.d.ts +55 -0
  75. package/dist/protocol/room.d.ts.map +1 -0
  76. package/dist/protocol/room.js +13 -0
  77. package/dist/protocol/room.js.map +1 -0
  78. package/dist/protocol/version.d.ts +12 -0
  79. package/dist/protocol/version.d.ts.map +1 -0
  80. package/dist/protocol/version.js +12 -0
  81. package/dist/protocol/version.js.map +1 -0
  82. package/package.json +37 -0
@@ -0,0 +1,374 @@
1
+ /**
2
+ * The game-side entry point to the RYDR platform.
3
+ *
4
+ * `connectToPlatform()` performs the handshake with the embedding shell and
5
+ * resolves to a {@link PlatformSession}: a reactive hardware store, the scoped
6
+ * identity, and trainer-control commands. A game uses only this — it never
7
+ * touches `postMessage`, BLE, or PII directly.
8
+ */
9
+ import { RYDR_PROTOCOL_VERSION, RYDR_SDK_VERSION } from "../protocol/version";
10
+ import { ALL_CAPABILITIES } from "../protocol/capabilities";
11
+ import { decodeReplay, encodeReplay } from "./replayCodec";
12
+ import { isPlatformToGameMessage } from "../protocol/guards";
13
+ import { HardwareStore } from "./HardwareStore";
14
+ import { createRelayRoom, createLoopbackRoom } from "./Room";
15
+ function emit(set, value) {
16
+ for (const cb of set)
17
+ cb(value);
18
+ }
19
+ /**
20
+ * Connect to the embedding platform shell.
21
+ *
22
+ * Sends `hello` (retrying until the shell answers, to survive a not-yet-ready
23
+ * parent) and resolves once `welcome` arrives, or rejects on `reject`/timeout.
24
+ */
25
+ export function connectToPlatform(options) {
26
+ const { gameId, capabilities = [...ALL_CAPABILITIES], platformOrigin = "*", target = window.parent, handshakeTimeoutMs = 15_000, } = options;
27
+ const hardware = new HardwareStore();
28
+ const buttonListeners = new Set();
29
+ const pauseListeners = new Set();
30
+ const resumeListeners = new Set();
31
+ const identityListeners = new Set();
32
+ // Generic request/response over postMessage: each request carries a `nonce`;
33
+ // the shell replies with a `*Result` message carrying the same nonce, which
34
+ // resolves the pending promise. Shared by submitScore + getLeaderboard.
35
+ const pending = new Map();
36
+ // Active relayed rooms keyed by roomId; the shell forwards room events which we route to dispatch.
37
+ const rooms = new Map();
38
+ let nextNonce = 1;
39
+ const REQUEST_TIMEOUT_MS = 10_000;
40
+ const request = (send) => {
41
+ const nonce = nextNonce++;
42
+ return new Promise((resolveReq, rejectReq) => {
43
+ const timer = setTimeout(() => {
44
+ pending.delete(nonce);
45
+ rejectReq(new Error("Platform request timed out"));
46
+ }, REQUEST_TIMEOUT_MS);
47
+ pending.set(nonce, (value) => {
48
+ clearTimeout(timer);
49
+ pending.delete(nonce);
50
+ resolveReq(value);
51
+ });
52
+ send(nonce);
53
+ });
54
+ };
55
+ const post = (message) => {
56
+ target.postMessage(message, platformOrigin);
57
+ };
58
+ // gamedata helpers (relayed req/res). The shell replies with one GameDataResultMessage;
59
+ // get→doc, list→docs, save/delete→ok, and `error` rejects.
60
+ const throwIfError = (r) => {
61
+ if (r.error)
62
+ throw new Error(`[rydr-sdk] gamedata: ${r.error}`);
63
+ return r;
64
+ };
65
+ const gamedataGet = (scope, collection, id) => request((nonce) => post({ rydr: true, type: "rydr/gamedata.get", nonce, scope, collection, id })).then(throwIfError).then((r) => r.doc ?? null);
66
+ const gamedataList = (scope, collection) => request((nonce) => post({ rydr: true, type: "rydr/gamedata.list", nonce, scope, collection })).then(throwIfError).then((r) => r.docs ?? []);
67
+ // replay helper (relayed req/res). save→ok, get→blob+meta; `error` rejects.
68
+ const replayGet = (runId) => request((nonce) => post({ rydr: true, type: "rydr/replay.get", nonce, runId })).then((r) => {
69
+ if (r.error)
70
+ throw new Error(`[rydr-sdk] getReplay: ${r.error}`);
71
+ return r.blob ? { blob: r.blob, meta: r.meta ?? null } : null;
72
+ });
73
+ return new Promise((resolve, reject) => {
74
+ let settled = false;
75
+ let identity = null;
76
+ let grantedCapabilities = [];
77
+ let initialPath;
78
+ let boards = [];
79
+ let runId = "";
80
+ let dataHost = "";
81
+ const knownBoard = (boardId) => {
82
+ const ok = boards.some((b) => b.id === boardId);
83
+ if (!ok)
84
+ console.warn(`[rydr-sdk] unknown boardId "${boardId}" — not in the game's manifest boards`);
85
+ return ok;
86
+ };
87
+ const onMessage = (event) => {
88
+ if (platformOrigin !== "*" && event.origin !== platformOrigin)
89
+ return;
90
+ const msg = event.data;
91
+ if (!isPlatformToGameMessage(msg))
92
+ return;
93
+ switch (msg.type) {
94
+ case "rydr/welcome": {
95
+ if (settled)
96
+ return;
97
+ settled = true;
98
+ clearInterval(helloTimer);
99
+ clearTimeout(timeoutTimer);
100
+ const welcome = msg;
101
+ identity = welcome.identity;
102
+ grantedCapabilities = welcome.grantedCapabilities;
103
+ initialPath = welcome.initialPath;
104
+ boards = welcome.boards ?? [];
105
+ runId = welcome.runId ?? "";
106
+ dataHost = welcome.dataHost ?? "";
107
+ resolve(session);
108
+ break;
109
+ }
110
+ case "rydr/reject": {
111
+ if (settled)
112
+ return;
113
+ settled = true;
114
+ clearInterval(helloTimer);
115
+ clearTimeout(timeoutTimer);
116
+ window.removeEventListener("message", onMessage);
117
+ reject(new Error(`Platform rejected handshake: ${msg.reason}`));
118
+ break;
119
+ }
120
+ case "rydr/hw.power":
121
+ hardware._patch({ power: msg.watts, updatedAt: msg.t });
122
+ break;
123
+ case "rydr/hw.cadence":
124
+ hardware._patch({ cadence: msg.rpm, updatedAt: msg.t });
125
+ break;
126
+ case "rydr/hw.heartRate":
127
+ hardware._patch({ heartRate: msg.bpm, updatedAt: msg.t });
128
+ break;
129
+ case "rydr/hw.speed":
130
+ hardware._patch({ speed: msg.mps, updatedAt: msg.t });
131
+ break;
132
+ case "rydr/hw.powerBuffer": {
133
+ const last = msg.samples[msg.samples.length - 1];
134
+ if (last)
135
+ hardware._patch({ power: last.watts, cadence: last.cadence ?? hardware.current.cadence, updatedAt: last.t });
136
+ break;
137
+ }
138
+ case "rydr/input.button":
139
+ emit(buttonListeners, { name: msg.name, edge: msg.edge });
140
+ break;
141
+ case "rydr/identity.update":
142
+ identity = msg.identity;
143
+ emit(identityListeners, msg.identity);
144
+ break;
145
+ case "rydr/trainer.status":
146
+ hardware._patch({ trainerConnected: msg.connected, ergSupported: msg.ergSupported });
147
+ break;
148
+ case "rydr/lifecycle.pause":
149
+ emit(pauseListeners, undefined);
150
+ break;
151
+ case "rydr/lifecycle.resume":
152
+ emit(resumeListeners, undefined);
153
+ break;
154
+ case "rydr/ping":
155
+ post({ rydr: true, type: "rydr/pong", nonce: msg.nonce });
156
+ break;
157
+ case "rydr/leaderboard.submitResult":
158
+ pending.get(msg.nonce)?.(msg.result);
159
+ break;
160
+ case "rydr/leaderboard.queryResult":
161
+ pending.get(msg.nonce)?.({ entries: msg.entries, you: msg.you });
162
+ break;
163
+ case "rydr/gamedata.result":
164
+ pending.get(msg.nonce)?.(msg);
165
+ break;
166
+ case "rydr/asset.uploadUrlResult":
167
+ pending.get(msg.nonce)?.(msg);
168
+ break;
169
+ case "rydr/replay.result":
170
+ pending.get(msg.nonce)?.(msg);
171
+ break;
172
+ case "rydr/run.result":
173
+ pending.get(msg.nonce)?.(msg);
174
+ break;
175
+ case "rydr/room.opened":
176
+ rooms.get(msg.roomId)?.({ type: "rydr/room.opened" });
177
+ break;
178
+ case "rydr/room.closed":
179
+ rooms.get(msg.roomId)?.({ type: "rydr/room.closed" });
180
+ rooms.delete(msg.roomId);
181
+ break;
182
+ case "rydr/room.presence":
183
+ rooms.get(msg.roomId)?.({ type: "rydr/room.presence", members: msg.members });
184
+ break;
185
+ case "rydr/room.state":
186
+ rooms.get(msg.roomId)?.({ type: "rydr/room.state", state: msg.state });
187
+ break;
188
+ case "rydr/room.message":
189
+ rooms.get(msg.roomId)?.({ type: "rydr/room.message", from: msg.from, data: msg.data });
190
+ break;
191
+ case "rydr/room.telemetry":
192
+ rooms.get(msg.roomId)?.({
193
+ type: "rydr/room.telemetry",
194
+ from: msg.from,
195
+ power: msg.power,
196
+ cadence: msg.cadence,
197
+ heartRate: msg.heartRate,
198
+ t: msg.t,
199
+ });
200
+ break;
201
+ case "rydr/room.event":
202
+ rooms.get(msg.roomId)?.({
203
+ type: "rydr/room.event",
204
+ name: msg.name,
205
+ payload: msg.payload,
206
+ at: msg.at,
207
+ from: msg.from,
208
+ });
209
+ break;
210
+ }
211
+ };
212
+ window.addEventListener("message", onMessage);
213
+ const sendHello = () => {
214
+ post({
215
+ rydr: true,
216
+ type: "rydr/hello",
217
+ gameId,
218
+ sdkVersion: RYDR_SDK_VERSION,
219
+ protocolVersion: RYDR_PROTOCOL_VERSION,
220
+ capabilities,
221
+ });
222
+ };
223
+ // Retry hello until the shell answers (it may not be listening on the first tick).
224
+ sendHello();
225
+ const helloTimer = setInterval(sendHello, 250);
226
+ const timeoutTimer = setTimeout(() => {
227
+ if (settled)
228
+ return;
229
+ settled = true;
230
+ clearInterval(helloTimer);
231
+ window.removeEventListener("message", onMessage);
232
+ reject(new Error("Platform handshake timed out"));
233
+ }, handshakeTimeoutMs);
234
+ const session = {
235
+ get identity() {
236
+ if (!identity)
237
+ throw new Error("Session not established");
238
+ return identity;
239
+ },
240
+ get grantedCapabilities() {
241
+ return grantedCapabilities;
242
+ },
243
+ get initialPath() {
244
+ return initialPath;
245
+ },
246
+ get boards() {
247
+ return boards;
248
+ },
249
+ get runId() {
250
+ return runId;
251
+ },
252
+ get dataHost() {
253
+ return dataHost;
254
+ },
255
+ hardware,
256
+ ready: () => post({ rydr: true, type: "rydr/ready" }),
257
+ reportLoadProgress: (progress) => post({ rydr: true, type: "rydr/loadProgress", progress }),
258
+ setSimulation: (gradePercent) => post({ rydr: true, type: "rydr/trainer.setSimulation", gradePercent }),
259
+ setTargetPower: (watts) => post({ rydr: true, type: "rydr/trainer.setTargetPower", watts }),
260
+ setErgMode: (enabled) => post({ rydr: true, type: "rydr/trainer.setErgMode", enabled }),
261
+ submitScore: (boardId, value, opts) => {
262
+ knownBoard(boardId);
263
+ return request((nonce) => post({ rydr: true, type: "rydr/leaderboard.submit", nonce, boardId, value, key: opts?.key }));
264
+ },
265
+ getLeaderboard: (boardId, opts) => {
266
+ knownBoard(boardId);
267
+ return request((nonce) => post({ rydr: true, type: "rydr/leaderboard.query", nonce, boardId, key: opts?.key, limit: opts?.limit }));
268
+ },
269
+ saveRun: (breakdown) => post({ rydr: true, type: "rydr/run.save", breakdown }),
270
+ getRun: (runId) => request((nonce) => post({ rydr: true, type: "rydr/run.get", nonce, runId })).then((r) => {
271
+ if (r.error)
272
+ throw new Error(`[rydr-sdk] getRun: ${r.error}`);
273
+ return r.breakdown ?? null;
274
+ }),
275
+ saveReplay: async (runId, frames, opts) => {
276
+ const { blob, meta } = await encodeReplay(frames, opts?.version ?? 1);
277
+ const r = await request((nonce) => post({ rydr: true, type: "rydr/replay.save", nonce, runId, blob, meta }));
278
+ if (r.error)
279
+ throw new Error(`[rydr-sdk] saveReplay: ${r.error}`);
280
+ },
281
+ getReplay: async (runId) => {
282
+ const stored = await replayGet(runId);
283
+ if (!stored)
284
+ return null;
285
+ const body = await decodeReplay(stored.blob);
286
+ if (!body)
287
+ return null;
288
+ return { body, meta: stored.meta };
289
+ },
290
+ getReplays: async (boardId, opts) => {
291
+ knownBoard(boardId);
292
+ const page = await request((nonce) => post({ rydr: true, type: "rydr/leaderboard.query", nonce, boardId, key: opts?.key, limit: opts?.top ?? 10 }));
293
+ // Each ranked entry that carries a runId maps to a (possibly absent) stored replay.
294
+ const ranked = page.entries.filter((e) => !!e.runId);
295
+ return Promise.all(ranked.map(async (e) => {
296
+ const stored = await replayGet(e.runId);
297
+ return {
298
+ runId: e.runId,
299
+ rank: e.rank,
300
+ displayName: e.displayName,
301
+ value: e.value,
302
+ blob: stored?.blob ?? null,
303
+ meta: stored?.meta ?? null,
304
+ };
305
+ }));
306
+ },
307
+ getContent: (collection, id) => gamedataGet("shared", collection, id),
308
+ listContent: (collection) => gamedataList("shared", collection),
309
+ getData: (collection, id, opts) => gamedataGet(opts?.scope ?? "player", collection, id),
310
+ listData: (collection, opts) => gamedataList(opts?.scope ?? "player", collection),
311
+ saveData: (collection, id, value, opts) => request((nonce) => post({ rydr: true, type: "rydr/gamedata.save", nonce, scope: opts?.scope ?? "player", collection, id, data: value })).then(throwIfError).then(() => undefined),
312
+ deleteData: (collection, id, opts) => request((nonce) => post({ rydr: true, type: "rydr/gamedata.delete", nonce, scope: opts?.scope ?? "player", collection, id })).then(throwIfError).then(() => undefined),
313
+ saveContent: (collection, id, value) => request((nonce) => post({ rydr: true, type: "rydr/gamedata.save", nonce, scope: "shared", collection, id, data: value })).then(throwIfError).then(() => undefined),
314
+ deleteContent: (collection, id) => request((nonce) => post({ rydr: true, type: "rydr/gamedata.delete", nonce, scope: "shared", collection, id })).then(throwIfError).then(() => undefined),
315
+ getUploadUrl: (opts) => request((nonce) => post({ rydr: true, type: "rydr/asset.uploadUrl", nonce, collection: opts.collection, filename: opts.filename, contentType: opts.contentType })).then((r) => {
316
+ if (r.error || !r.uploadUrl || !r.url)
317
+ throw new Error(`[rydr-sdk] getUploadUrl: ${r.error ?? "no url"}`);
318
+ return { uploadUrl: r.uploadUrl, url: r.url };
319
+ }),
320
+ joinRoom: (roomId) => {
321
+ if (!identity)
322
+ throw new Error("[rydr-sdk] joinRoom: session not established");
323
+ // No shell-backed rooms (standalone dev / shell didn't advertise a backend) → loopback.
324
+ if (!dataHost)
325
+ return createLoopbackRoom(identity.playerId, identity.displayName);
326
+ // Shell-relayed room: the shell owns the socket (trusted identity + telemetry).
327
+ const existing = rooms.get(roomId);
328
+ if (existing)
329
+ console.warn(`[rydr-sdk] joinRoom("${roomId}") called twice — re-joining`);
330
+ const { handle, dispatch } = createRelayRoom({
331
+ roomId,
332
+ post,
333
+ onLeave: () => rooms.delete(roomId),
334
+ });
335
+ rooms.set(roomId, dispatch);
336
+ return handle;
337
+ },
338
+ setRoute: (path) => post({ rydr: true, type: "rydr/route.changed", path }),
339
+ setChrome: (visible) => post({ rydr: true, type: "rydr/ui.setChrome", visible }),
340
+ setPowerBar: (visible) => post({ rydr: true, type: "rydr/ui.setPowerBar", visible }),
341
+ requestExit: () => post({ rydr: true, type: "rydr/exitRequest" }),
342
+ requestHardwareModal: () => post({ rydr: true, type: "rydr/ui.requestHardwareModal" }),
343
+ reportError: (message) => post({ rydr: true, type: "rydr/error", message }),
344
+ onButton: (cb) => {
345
+ buttonListeners.add(cb);
346
+ return () => buttonListeners.delete(cb);
347
+ },
348
+ onPause: (cb) => {
349
+ pauseListeners.add(cb);
350
+ return () => pauseListeners.delete(cb);
351
+ },
352
+ onResume: (cb) => {
353
+ resumeListeners.add(cb);
354
+ return () => resumeListeners.delete(cb);
355
+ },
356
+ onIdentityChange: (cb) => {
357
+ identityListeners.add(cb);
358
+ return () => identityListeners.delete(cb);
359
+ },
360
+ dispose: () => {
361
+ clearInterval(helloTimer);
362
+ clearTimeout(timeoutTimer);
363
+ window.removeEventListener("message", onMessage);
364
+ buttonListeners.clear();
365
+ pauseListeners.clear();
366
+ resumeListeners.clear();
367
+ identityListeners.clear();
368
+ pending.clear();
369
+ rooms.clear();
370
+ },
371
+ };
372
+ });
373
+ }
374
+ //# sourceMappingURL=PlatformClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlatformClient.js","sourceRoot":"","sources":["../../src/client/PlatformClient.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAmB,MAAM,0BAA0B,CAAC;AAU7E,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAS3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAwC,MAAM,QAAQ,CAAC;AA+JnG,SAAS,IAAI,CAAI,GAAe,EAAE,KAAQ;IACxC,KAAK,MAAM,EAAE,IAAI,GAAG;QAAE,EAAE,CAAC,KAAK,CAAC,CAAC;AAClC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAuB;IACvD,MAAM,EACJ,MAAM,EACN,YAAY,GAAG,CAAC,GAAG,gBAAgB,CAAC,EACpC,cAAc,GAAG,GAAG,EACpB,MAAM,GAAG,MAAM,CAAC,MAAM,EACtB,kBAAkB,GAAG,MAAM,GAC5B,GAAG,OAAO,CAAC;IAEZ,MAAM,QAAQ,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gBAC1B,YAAY,CAAC,YAAY,CAAC,CAAC;gBAC3B,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;gBACjD,eAAe,CAAC,KAAK,EAAE,CAAC;gBACxB,cAAc,CAAC,KAAK,EAAE,CAAC;gBACvB,eAAe,CAAC,KAAK,EAAE,CAAC;gBACxB,iBAAiB,CAAC,KAAK,EAAE,CAAC;gBAC1B,OAAO,CAAC,KAAK,EAAE,CAAC;gBAChB,KAAK,CAAC,KAAK,EAAE,CAAC;YAChB,CAAC;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,127 @@
1
+ /**
2
+ * Client handle for a generic realtime {@link https://docs.partykit.io | PartyKit} `room`.
3
+ *
4
+ * Three transports, one {@link RoomHandle} shape:
5
+ * - **relay** ({@link createRelayRoom}) — the game side. The game iframe does NOT open a socket;
6
+ * it drives the room through the shell over `rydr/room.*` postMessage frames, and the shell
7
+ * (which owns the hardware + identity) is the sole socket writer. That's what makes presence and
8
+ * {@link RoomTelemetry} trustworthy — a game can't forge another player's identity or wattage.
9
+ * - **direct WS** ({@link createRoom}) — the SHELL side. The shell opens the real socket to the
10
+ * `room` party, relays the game's `send`/`setState`, and injects trusted telemetry.
11
+ * - **loopback** ({@link createLoopbackRoom}) — standalone dev with no shell/backend.
12
+ *
13
+ * Wire protocol (kept in sync with `party/room.ts`):
14
+ * - client→server: `{t:"msg", data}`, `{t:"state", patch}`, `{t:"telemetry", power?, cadence?,
15
+ * heartRate?, ts?}` (shell only)
16
+ * - server→client: `{t:"hello", state, members}`, `{t:"presence", members}`, `{t:"msg", from, data}`,
17
+ * `{t:"state", state}`, `{t:"telemetry", from, power?, cadence?, heartRate?, ts}`, `{t:"full", max}`
18
+ */
19
+ import type { RoomMember, RoomTelemetry, RoomEvent } from "../protocol/room";
20
+ import type { GameToPlatformMessage } from "../protocol/messages";
21
+ export type { RoomMember, RoomTelemetry, RoomEvent };
22
+ export interface RoomHandle {
23
+ /** Relay an opaque message to the other members. */
24
+ send(data: unknown): void;
25
+ /** Merge a patch into the shared opaque state (last-write-wins) and broadcast it. */
26
+ setState(patch: Record<string, unknown>): void;
27
+ /**
28
+ * Schedule a server-stamped orchestration event ({@link RoomEvent}) — the genre-neutral "referee
29
+ * whistle". Omit `at` for an immediate event, or pass a future server-clock instant for a fair,
30
+ * head-start-free transition (a countdown, a round timer, a grace window). The server stamps
31
+ * `from`/`at` and broadcasts to everyone, including the scheduler; clients self-schedule to `at`.
32
+ */
33
+ scheduleEvent(name: string, payload?: unknown, at?: number): void;
34
+ /** Current members (presence). */
35
+ readonly members: readonly RoomMember[];
36
+ /** Current shared opaque state. */
37
+ readonly state: Record<string, unknown>;
38
+ /** Subscribe to an event. Returns an unsubscribe fn.
39
+ * - `message`: `(data, from)` — a relayed peer message.
40
+ * - `presence`: `(members)` — membership changed.
41
+ * - `state`: `(state)` — shared state changed.
42
+ * - `telemetry`: `(reading)` — a peer's trusted, shell-stamped hardware reading.
43
+ * - `event`: `(e)` — a server-stamped orchestration event (see {@link scheduleEvent}).
44
+ * - `open`/`close`: connection lifecycle. */
45
+ on(event: "message", cb: (data: unknown, from: string) => void): () => void;
46
+ on(event: "presence", cb: (members: readonly RoomMember[]) => void): () => void;
47
+ on(event: "state", cb: (state: Record<string, unknown>) => void): () => void;
48
+ on(event: "telemetry", cb: (reading: RoomTelemetry) => void): () => void;
49
+ on(event: "event", cb: (e: RoomEvent) => void): () => void;
50
+ on(event: "open" | "close", cb: () => void): () => void;
51
+ /** Leave the room and close the socket. */
52
+ leave(): void;
53
+ }
54
+ /** Shell-only extension: inject a trusted hardware reading into the room. Games never see this. */
55
+ export interface ShellRoomHandle extends RoomHandle {
56
+ sendTelemetry(reading: {
57
+ power?: number;
58
+ cadence?: number;
59
+ heartRate?: number;
60
+ t?: number;
61
+ }): void;
62
+ }
63
+ interface RoomOptions {
64
+ host: string;
65
+ gameId: string;
66
+ roomId: string;
67
+ playerId: string;
68
+ name?: string;
69
+ /** Max distinct players the room admits (passed to the server). */
70
+ max?: number;
71
+ }
72
+ /**
73
+ * Open a room WebSocket directly — used by the SHELL (the trusted socket owner). Returns a
74
+ * {@link ShellRoomHandle} so the shell can also inject telemetry. Games do NOT call this; they use
75
+ * `session.joinRoom()`, which relays through the shell.
76
+ */
77
+ export declare function createRoom(opts: RoomOptions): ShellRoomHandle;
78
+ /** A platform→game room message, already narrowed to one room by the SDK before dispatch into a
79
+ * relay handle. (Distinct from {@link RoomEvent}, which is the game-facing orchestration event.) */
80
+ export type RoomRelayEvent = {
81
+ type: "rydr/room.opened";
82
+ } | {
83
+ type: "rydr/room.closed";
84
+ } | {
85
+ type: "rydr/room.presence";
86
+ members: RoomMember[];
87
+ } | {
88
+ type: "rydr/room.state";
89
+ state: Record<string, unknown>;
90
+ } | {
91
+ type: "rydr/room.message";
92
+ from: string;
93
+ data: unknown;
94
+ } | {
95
+ type: "rydr/room.telemetry";
96
+ from: string;
97
+ power?: number;
98
+ cadence?: number;
99
+ heartRate?: number;
100
+ t: number;
101
+ } | {
102
+ type: "rydr/room.event";
103
+ name: string;
104
+ payload: unknown;
105
+ at: number;
106
+ from: string;
107
+ };
108
+ /**
109
+ * Game-side room over the shell relay. The handle posts `rydr/room.*` frames to the shell; incoming
110
+ * room events are fed in via the returned `dispatch` (the SDK routes them by `roomId`). This is what
111
+ * `session.joinRoom()` returns when embedded.
112
+ */
113
+ export declare function createRelayRoom(opts: {
114
+ roomId: string;
115
+ post: (msg: GameToPlatformMessage) => void;
116
+ onLeave: () => void;
117
+ }): {
118
+ handle: RoomHandle;
119
+ dispatch: (event: RoomRelayEvent) => void;
120
+ };
121
+ /**
122
+ * A backend-less loopback room for standalone dev (a session with no `dataHost`): a single local
123
+ * member that echoes `send` back as a `message` and reflects `setState`. Lets a game build its
124
+ * realtime UI with no shell/server. No telemetry is emitted (there are no peers).
125
+ */
126
+ export declare function createLoopbackRoom(playerId: string, name?: string): RoomHandle;
127
+ //# sourceM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