@hadoku/platform-wire 0.1.89 → 0.1.91

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.
@@ -11,12 +11,14 @@ export declare const clientEventSchema: <const K extends readonly [string, ...st
11
11
  export declare const PAGE_EVENT_PATH = "client-events";
12
12
  /**
13
13
  * The same telemetry from a screen outside a match, sent over HTTP to `PAGE_EVENT_PATH` and written
14
- * into the server's log as a `client` event keyed by page and user. `page: 'front'`, `kind: 'perf'`:
15
- * a list's scroll smoothness, one summary per scroll burst.
14
+ * into the server's log as a `client` event keyed by page and user. `kind: 'perf'`: on `page: 'front'`,
15
+ * a list's scroll smoothness, one summary per scroll burst; on `'front'` and `'draft'`, the screen's frame
16
+ * rate, the same events a match's frame watch sends (bad stretches, long frames, summaries, the machine).
16
17
  */
17
18
  export declare const PageEventSchema: z.ZodObject<{
18
19
  page: z.ZodEnum<{
19
20
  front: "front";
21
+ draft: "draft";
20
22
  }>;
21
23
  kind: z.ZodEnum<{
22
24
  perf: "perf";
package/dist/telemetry.js CHANGED
@@ -13,10 +13,11 @@ export const clientEventSchema = (kinds) => z.object({ matchId: z.string().min(1
13
13
  export const PAGE_EVENT_PATH = 'client-events';
14
14
  /**
15
15
  * The same telemetry from a screen outside a match, sent over HTTP to `PAGE_EVENT_PATH` and written
16
- * into the server's log as a `client` event keyed by page and user. `page: 'front'`, `kind: 'perf'`:
17
- * a list's scroll smoothness, one summary per scroll burst.
16
+ * into the server's log as a `client` event keyed by page and user. `kind: 'perf'`: on `page: 'front'`,
17
+ * a list's scroll smoothness, one summary per scroll burst; on `'front'` and `'draft'`, the screen's frame
18
+ * rate, the same events a match's frame watch sends (bad stretches, long frames, summaries, the machine).
18
19
  */
19
- export const PageEventSchema = z.object({ page: z.enum(['front']), kind: z.enum(['perf']), data: ClientDataSchema }).strict();
20
+ export const PageEventSchema = z.object({ page: z.enum(['front', 'draft']), kind: z.enum(['perf']), data: ClientDataSchema }).strict();
20
21
  /** A socket sending more than this in one second is a client bug; the rest of that second is dropped. */
21
22
  export const CLIENT_EVENT_MAX_PER_SECOND = 20;
22
23
  /** Where the browser's usage batches go, under `/api/`. */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hadoku/platform-wire",
3
- "version": "0.1.89",
4
- "gitHead": "1034d5c338b18597f6895b9aed7c20fdcb1131b0",
3
+ "version": "0.1.91",
4
+ "gitHead": "3347933de738dedd6f2d6d2630bacb42e949159c",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "description": "The wire any game speaks: room ids, telemetry, presence, events and tables, the Discord relay, looks, the restart notice, secure random and a generic server envelope. Knows no game; a game's own part rides as a type parameter. MIT; imports only zod.",