@dyno-cloud/schema 0.0.0-stage → 0.1.2

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 (107) hide show
  1. package/json/budget.schema.json +239 -0
  2. package/json/catalogue.schema.json +1984 -0
  3. package/json/compare.schema.json +823 -0
  4. package/json/devices.json +399 -0
  5. package/json/doctor.schema.json +144 -0
  6. package/json/driver-message.schema.json +724 -0
  7. package/json/dyno-toml.schema.json +80 -0
  8. package/json/exposure-checkpoint.schema.json +97 -0
  9. package/json/games.schema.json +66 -0
  10. package/json/library-bucket.schema.json +22 -0
  11. package/json/library.schema.json +19 -0
  12. package/json/measures.json +407 -0
  13. package/json/probe-event.schema.json +465 -0
  14. package/json/result.schema.json +1907 -0
  15. package/json/run-request.schema.json +161 -0
  16. package/json/unclean-exit.schema.json +99 -0
  17. package/package.json +22 -4
  18. package/ts/AssetChange.ts +8 -0
  19. package/ts/AssetChangeKind.ts +6 -0
  20. package/ts/AudioState.ts +6 -0
  21. package/ts/BrowserEngine.ts +6 -0
  22. package/ts/BudgetId.ts +6 -0
  23. package/ts/BudgetLimit.ts +8 -0
  24. package/ts/BudgetRef.ts +15 -0
  25. package/ts/BudgetVerdict.ts +22 -0
  26. package/ts/BuildLink.ts +6 -0
  27. package/ts/BuildManifest.ts +17 -0
  28. package/ts/CatalogueEntry.ts +7 -0
  29. package/ts/CatalogueResult.ts +22 -0
  30. package/ts/CheckResult.ts +16 -0
  31. package/ts/CompareDeterministic.ts +42 -0
  32. package/ts/CompareResult.ts +12 -0
  33. package/ts/CompareRun.ts +17 -0
  34. package/ts/ContextKind.ts +6 -0
  35. package/ts/Covers.ts +6 -0
  36. package/ts/Deterministic.ts +35 -0
  37. package/ts/DeviceClass.ts +6 -0
  38. package/ts/DeviceEntry.ts +25 -0
  39. package/ts/DeviceKind.ts +6 -0
  40. package/ts/DoctorCheck.ts +16 -0
  41. package/ts/DoctorCheckId.ts +6 -0
  42. package/ts/DoctorReport.ts +20 -0
  43. package/ts/DriverInfo.ts +10 -0
  44. package/ts/DriverMessage.ts +30 -0
  45. package/ts/Environment.ts +13 -0
  46. package/ts/EnvironmentBrowser.ts +23 -0
  47. package/ts/EnvironmentDevice.ts +27 -0
  48. package/ts/EnvironmentOs.ts +12 -0
  49. package/ts/Evidence.ts +11 -0
  50. package/ts/ExposureCheckpoint.ts +9 -0
  51. package/ts/ExposureSample.ts +15 -0
  52. package/ts/FileKind.ts +6 -0
  53. package/ts/Finding.ts +29 -0
  54. package/ts/Fix.ts +22 -0
  55. package/ts/FixAction.ts +7 -0
  56. package/ts/FrameState.ts +6 -0
  57. package/ts/GameHookKind.ts +6 -0
  58. package/ts/HostProfile.ts +47 -0
  59. package/ts/Inputs.ts +34 -0
  60. package/ts/Library.ts +6 -0
  61. package/ts/LibraryBucket.ts +6 -0
  62. package/ts/LiveFrame.ts +19 -0
  63. package/ts/Machine.ts +14 -0
  64. package/ts/ManifestFile.ts +12 -0
  65. package/ts/Measure.ts +50 -0
  66. package/ts/MeasureChange.ts +14 -0
  67. package/ts/MeasureEntry.ts +13 -0
  68. package/ts/MeasureId.ts +6 -0
  69. package/ts/MeasureItem.ts +15 -0
  70. package/ts/MeasureStatus.ts +6 -0
  71. package/ts/MeasureValue.ts +7 -0
  72. package/ts/MessageDirection.ts +6 -0
  73. package/ts/Method.ts +6 -0
  74. package/ts/OsName.ts +6 -0
  75. package/ts/ProbeEvent.ts +48 -0
  76. package/ts/ProfileRef.ts +6 -0
  77. package/ts/Quantity.ts +7 -0
  78. package/ts/RelPath.ts +9 -0
  79. package/ts/Release.ts +12 -0
  80. package/ts/ResultRef.ts +15 -0
  81. package/ts/RuleId.ts +6 -0
  82. package/ts/RunCoverage.ts +8 -0
  83. package/ts/RunInfo.ts +50 -0
  84. package/ts/RunMark.ts +6 -0
  85. package/ts/RunRequest.ts +24 -0
  86. package/ts/Scenario.ts +6 -0
  87. package/ts/Scope.ts +12 -0
  88. package/ts/Severity.ts +6 -0
  89. package/ts/Shard.ts +17 -0
  90. package/ts/Source.ts +6 -0
  91. package/ts/SourceKind.ts +7 -0
  92. package/ts/Statistic.ts +7 -0
  93. package/ts/Status.ts +9 -0
  94. package/ts/Target.ts +15 -0
  95. package/ts/Tier.ts +9 -0
  96. package/ts/TierReport.ts +26 -0
  97. package/ts/ToolBuild.ts +14 -0
  98. package/ts/Uncertainty.ts +19 -0
  99. package/ts/UncertaintyKind.ts +6 -0
  100. package/ts/UncleanExit.ts +16 -0
  101. package/ts/Unit.ts +6 -0
  102. package/ts/Verdict.ts +6 -0
  103. package/ts/VerdictChange.ts +12 -0
  104. package/ts/Versions.ts +22 -0
  105. package/ts/Viewport.ts +6 -0
  106. package/ts/index.ts +89 -0
  107. package/README.md +0 -3
@@ -0,0 +1,20 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { DoctorCheck } from "./DoctorCheck";
3
+ import type { Status } from "./Status";
4
+
5
+ /**
6
+ * The output of `dyno doctor`.
7
+ */
8
+ export type DoctorReport = { schema_version: number,
9
+ /**
10
+ * The plan phase that builds `doctor`.
11
+ */
12
+ phase: number,
13
+ /**
14
+ * Pass when every check passes. Incomplete while a check is not built.
15
+ */
16
+ status: Status,
17
+ /**
18
+ * Sorted by check id.
19
+ */
20
+ checks: Array<DoctorCheck>, };
@@ -0,0 +1,10 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * The browser driver behind a run: the Rust CDP driver, or a fallback subprocess.
5
+ */
6
+ export type DriverInfo = { name: string, version: string,
7
+ /**
8
+ * The browser and its version, such as "Chromium 140.0.7339.0".
9
+ */
10
+ browser: string | null, };
@@ -0,0 +1,30 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { DriverInfo } from "./DriverInfo";
3
+ import type { ProbeEvent } from "./ProbeEvent";
4
+ import type { RunMark } from "./RunMark";
5
+
6
+ /**
7
+ * One line from a driver. `t_ms` is the time since the driver started the navigation.
8
+ *
9
+ * There are two clocks. A driver message's `t_ms` is on the driver's clock. A probe event's
10
+ * `t_ms` is `performance.now()` in the game frame, which starts at a different moment.
11
+ */
12
+ export type DriverMessage = { "type": "hello", protocol_version: number, driver: DriverInfo, } | { "type": "probe", event: ProbeEvent, } | { "type": "request", url: string,
13
+ /**
14
+ * The response's MIME type. Null when it had none.
15
+ */
16
+ mime_type: string | null,
17
+ /**
18
+ * Bytes received over the network for this request.
19
+ */
20
+ bytes: number, t_ms: number, } | { "type": "heap", used_bytes: number, t_ms: number, } | { "type": "self_check", device_pixel_ratio: number,
21
+ /**
22
+ * The unmasked WebGL renderer. Null when WebGL is off.
23
+ */
24
+ webgl_renderer: string | null,
25
+ /**
26
+ * When the game frame's document clock started, on the driver's clock: a probe event
27
+ * at frame time `t` happened at `t + frame_clock_at_ms` after the navigation. Null from
28
+ * a driver that does not read it.
29
+ */
30
+ frame_clock_at_ms: number | null, t_ms: number, } | { "type": "mark", mark: RunMark, t_ms: number, } | { "type": "done", t_ms: number, } | { "type": "error", message: string, t_ms: number, };
@@ -0,0 +1,13 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { EnvironmentBrowser } from "./EnvironmentBrowser";
3
+ import type { EnvironmentDevice } from "./EnvironmentDevice";
4
+ import type { EnvironmentOs } from "./EnvironmentOs";
5
+
6
+ /**
7
+ * What ran a check. A field is null when the driver does not say.
8
+ */
9
+ export type Environment = { browser: EnvironmentBrowser | null, os: EnvironmentOs | null,
10
+ /**
11
+ * Null for a desktop browser.
12
+ */
13
+ device: EnvironmentDevice | null, };
@@ -0,0 +1,23 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { BrowserEngine } from "./BrowserEngine";
3
+
4
+ /**
5
+ * The browser that loaded the game.
6
+ */
7
+ export type EnvironmentBrowser = {
8
+ /**
9
+ * Such as "Chromium" or "Safari".
10
+ */
11
+ name: string,
12
+ /**
13
+ * Such as "152.0.7977.82". Null when the driver does not say.
14
+ */
15
+ version: string | null,
16
+ /**
17
+ * Null when dyno does not know the browser's engine.
18
+ */
19
+ engine: BrowserEngine | null,
20
+ /**
21
+ * Whether the browser ran with no window. Null when the driver does not say.
22
+ */
23
+ headless: boolean | null, };
@@ -0,0 +1,27 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { DeviceKind } from "./DeviceKind";
3
+
4
+ /**
5
+ * The device the browser ran on.
6
+ */
7
+ export type EnvironmentDevice = {
8
+ /**
9
+ * The device catalogue's key, such as "iphone-14-pro-max": the model name in lower case,
10
+ * with one `-` for each run of other characters. A model the catalogue does not list keeps
11
+ * its own key. Null when the model is not known, as from a user agent, which names only
12
+ * "iPhone".
13
+ */
14
+ key: string | null,
15
+ /**
16
+ * The model as the trace names it, such as "iPhone 14 Pro Max", or the kind of device a user
17
+ * agent names, such as "iPhone". Never the device's own name, which is often its owner's.
18
+ */
19
+ name: string,
20
+ /**
21
+ * Such as "Apple".
22
+ */
23
+ vendor: string, kind: DeviceKind,
24
+ /**
25
+ * The device's memory, from a device run's trace. Null otherwise.
26
+ */
27
+ memory_bytes: number | null, };
@@ -0,0 +1,12 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { OsName } from "./OsName";
3
+
4
+ /**
5
+ * The operating system the browser ran on.
6
+ */
7
+ export type EnvironmentOs = { name: OsName,
8
+ /**
9
+ * Such as "26.6.2". Null when the source does not give it. A user agent's OS version is
10
+ * frozen, as Safari on iOS 26 says iOS 18.6, so dyno never reads it from there.
11
+ */
12
+ version: string | null, };
package/ts/Evidence.ts ADDED
@@ -0,0 +1,11 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { Method } from "./Method";
3
+
4
+ /**
5
+ * One piece of evidence for a value.
6
+ */
7
+ export type Evidence = { method: Method,
8
+ /**
9
+ * A short plain-English note, such as the files read.
10
+ */
11
+ detail: string, };
@@ -0,0 +1,9 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { ExposureSample } from "./ExposureSample";
3
+ import type { ProfileRef } from "./ProfileRef";
4
+
5
+ /**
6
+ * Sampled exposure, written to storage every 30 s or so and sent on the next load. A page
7
+ * that dies loses only the time since its last checkpoint.
8
+ */
9
+ export type ExposureCheckpoint = { schema_version: number, host_profile: ProfileRef, samples: Array<ExposureSample>, };
@@ -0,0 +1,15 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { FrameState } from "./FrameState";
3
+
4
+ /**
5
+ * Live time for one game frame in one state.
6
+ */
7
+ export type ExposureSample = { game_id: string, build_version: string | null, frame_state: FrameState,
8
+ /**
9
+ * Time the frame was live in this state.
10
+ */
11
+ live_ms: number,
12
+ /**
13
+ * The share of sessions that log exposure, from above 0 to 1.
14
+ */
15
+ sampled_share: number, };
package/ts/FileKind.ts ADDED
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * The bucket a file counts in, for bytes by type.
5
+ */
6
+ export type FileKind = "js" | "css" | "html" | "image" | "texture" | "audio" | "video" | "font" | "data" | "other";
package/ts/Finding.ts ADDED
@@ -0,0 +1,29 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { Fix } from "./Fix";
3
+ import type { MeasureId } from "./MeasureId";
4
+ import type { RuleId } from "./RuleId";
5
+ import type { Verdict } from "./Verdict";
6
+
7
+ /**
8
+ * The outcome of one rule, with fixes that clear it.
9
+ *
10
+ * A static finding counts toward the status. A lab finding is in the run part, so it does not.
11
+ */
12
+ export type Finding = { rule: RuleId, verdict: Verdict,
13
+ /**
14
+ * The plan phase that builds this rule: 1 or 2.
15
+ */
16
+ phase: number,
17
+ /**
18
+ * The measures the rule read. Sorted by id.
19
+ */
20
+ measures: Array<MeasureId>,
21
+ /**
22
+ * Fixes that clear the finding. Sorted by path, then action, then bytes saved, then the
23
+ * rest of the fix.
24
+ */
25
+ fixes: Array<Fix>,
26
+ /**
27
+ * Why the verdict is incomplete. Null otherwise.
28
+ */
29
+ reason: string | null, };
package/ts/Fix.ts ADDED
@@ -0,0 +1,22 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { FixAction } from "./FixAction";
3
+ import type { RelPath } from "./RelPath";
4
+
5
+ /**
6
+ * One change that clears a finding, and what it saves.
7
+ */
8
+ export type Fix = { action: FixAction,
9
+ /**
10
+ * The file to change. Null when the fix is in the bundle's code or config.
11
+ */
12
+ path: RelPath | null,
13
+ /**
14
+ * Estimated bytes the fix saves, by the same arithmetic as the measure.
15
+ */
16
+ saves_bytes: number,
17
+ /**
18
+ * Decoded bytes the fix also saves, when `saves_bytes` counts download bytes. Removing a
19
+ * copy saves its file's bytes, and the decoded bytes of an image or sound the game loads
20
+ * once per copy. Null for other fixes, whose `saves_bytes` are decoded bytes already.
21
+ */
22
+ saves_decoded_bytes: number | null, };
@@ -0,0 +1,7 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * What to change. Declared in the alphabetical order of the JSON names, so fixes for the same
5
+ * path sort by name.
6
+ */
7
+ export type FixAction = "cap_resolution" | "downmix_to_mono" | "keep_one_copy" | "remove_duplicate" | "resample_to24k" | "shrink_textures" | "trim_sprite_silence" | "turn_off_antialias";
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * Whether a game frame is the one on screen. Reels calls an inactive frame preloaded.
5
+ */
6
+ export type FrameState = "active" | "inactive";
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * An optional game hook.
5
+ */
6
+ export type GameHookKind = "playable" | "spin_start" | "round_settled" | "game_phase";
@@ -0,0 +1,47 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { Viewport } from "./Viewport";
3
+
4
+ /**
5
+ * How a host page embeds a game, and the device facts the static formulas use. Reels is the
6
+ * first host profile. It holds no assumed cost: the device run measures those.
7
+ */
8
+ export type HostProfile = { name: string,
9
+ /**
10
+ * Bumps when any value below changes.
11
+ */
12
+ version: number,
13
+ /**
14
+ * The message the game sends when it is ready, such as `reels:ready`.
15
+ */
16
+ ready_message: string,
17
+ /**
18
+ * The message the host sends when the game becomes active, such as `reels:active`.
19
+ */
20
+ active_message: string,
21
+ /**
22
+ * The contract's limit on time to the ready message.
23
+ */
24
+ ready_within_ms: number,
25
+ /**
26
+ * The game frame's size in CSS pixels.
27
+ */
28
+ viewport: Viewport,
29
+ /**
30
+ * The device pixel ratio the run forces. The reference iPhone's is 3.
31
+ */
32
+ device_scale_factor: number,
33
+ /**
34
+ * Whether the reference browser has WebGPU on. When it is off, a game that asks for WebGPU
35
+ * gets WebGL.
36
+ */
37
+ webgpu: boolean,
38
+ /**
39
+ * The audio context's sample rate on the reference iPhone. Decoded audio is held at this
40
+ * rate. The measure ids name 48 kHz, so a change needs new ids.
41
+ */
42
+ pcm_rate_hz: number,
43
+ /**
44
+ * The lower context rate that fixes suggest. The measure ids name 24 kHz, so a change needs
45
+ * new ids.
46
+ */
47
+ pcm_low_rate_hz: number, };
package/ts/Inputs.ts ADDED
@@ -0,0 +1,34 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { BudgetRef } from "./BudgetRef";
3
+ import type { ProfileRef } from "./ProfileRef";
4
+ import type { Scenario } from "./Scenario";
5
+
6
+ /**
7
+ * What the check was asked to do. Paths and URLs are in `run.target`.
8
+ */
9
+ export type Inputs = {
10
+ /**
11
+ * Whether a build folder or a .zip of one was given.
12
+ */
13
+ build: boolean,
14
+ /**
15
+ * Whether a launch URL was given.
16
+ */
17
+ launch_url: boolean, host_profile: ProfileRef,
18
+ /**
19
+ * Null when no budget file was given.
20
+ */
21
+ budget: BudgetRef | null, scenario: Scenario,
22
+ /**
23
+ * Spins asked for with `--spins` (Phase 2). Null when none.
24
+ */
25
+ spins: number | null,
26
+ /**
27
+ * Whether `--device` asked for an iPhone run (Phase 2).
28
+ */
29
+ device: boolean,
30
+ /**
31
+ * The runs of the game, and of the empty build, that `--runs` asked for with `--device`.
32
+ * Left out of the JSON when not given, so the hash of a check without it does not change.
33
+ */
34
+ device_runs?: number, };
package/ts/Library.ts ADDED
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * A library the static scan can detect.
5
+ */
6
+ export type Library = "pixi" | "howler" | "web_sdk";
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * What a library does. Only the rendering bucket says how the game draws.
5
+ */
6
+ export type LibraryBucket = "rendering" | "audio" | "other";
@@ -0,0 +1,19 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { FrameState } from "./FrameState";
3
+
4
+ /**
5
+ * A game frame that was live when the page died.
6
+ */
7
+ export type LiveFrame = { game_id: string,
8
+ /**
9
+ * From the frame URL, such as "v12" from `/v12/`. Null when the URL has none.
10
+ */
11
+ build_version: string | null, frame_state: FrameState,
12
+ /**
13
+ * Time since the frame was mounted.
14
+ */
15
+ mount_age_ms: number,
16
+ /**
17
+ * Whether the host saw the game's ready message.
18
+ */
19
+ ready_seen: boolean, };
package/ts/Machine.ts ADDED
@@ -0,0 +1,14 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * The machine dyno ran on. No host name or user name.
5
+ */
6
+ export type Machine = {
7
+ /**
8
+ * "macos", "linux" or "windows".
9
+ */
10
+ os: string,
11
+ /**
12
+ * "aarch64" or "x86_64".
13
+ */
14
+ arch: string, cpus: number, };
@@ -0,0 +1,12 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { FileKind } from "./FileKind";
3
+ import type { RelPath } from "./RelPath";
4
+
5
+ /**
6
+ * One supplied file.
7
+ */
8
+ export type ManifestFile = { path: RelPath, bytes: number,
9
+ /**
10
+ * Lowercase hex SHA-256 of the file's bytes.
11
+ */
12
+ sha256: string, kind: FileKind, };
package/ts/Measure.ts ADDED
@@ -0,0 +1,50 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { Evidence } from "./Evidence";
3
+ import type { MeasureId } from "./MeasureId";
4
+ import type { MeasureItem } from "./MeasureItem";
5
+ import type { MeasureStatus } from "./MeasureStatus";
6
+ import type { MeasureValue } from "./MeasureValue";
7
+ import type { Scope } from "./Scope";
8
+ import type { Source } from "./Source";
9
+ import type { Uncertainty } from "./Uncertainty";
10
+ import type { Unit } from "./Unit";
11
+
12
+ /**
13
+ * One measure in a result.
14
+ */
15
+ export type Measure = { id: MeasureId, status: MeasureStatus, source: Source,
16
+ /**
17
+ * The plan phase that builds this measure: 1 or 2.
18
+ */
19
+ phase: number,
20
+ /**
21
+ * Whether the result needs this measure. A required measure that is missing or invalid
22
+ * stops the result from passing. Phase 2 measures are required only when a flag asks for
23
+ * them.
24
+ */
25
+ required: boolean, unit: Unit,
26
+ /**
27
+ * The value when the status is measured or estimated. An invalid measure may keep the value
28
+ * that failed its check. Null otherwise.
29
+ */
30
+ value: MeasureValue | null,
31
+ /**
32
+ * A breakdown of the value, such as one item per file. Sorted by key, then value.
33
+ */
34
+ items: Array<MeasureItem>,
35
+ /**
36
+ * How the value was found. Sorted.
37
+ */
38
+ evidence: Array<Evidence>,
39
+ /**
40
+ * What the value covers, and what it does not.
41
+ */
42
+ scope: Scope,
43
+ /**
44
+ * How close the value is to the truth.
45
+ */
46
+ uncertainty: Uncertainty,
47
+ /**
48
+ * Why the status is missing, unsupported or invalid. Null otherwise.
49
+ */
50
+ reason: string | null, };
@@ -0,0 +1,14 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { MeasureId } from "./MeasureId";
3
+ import type { MeasureStatus } from "./MeasureStatus";
4
+ import type { MeasureValue } from "./MeasureValue";
5
+ import type { Unit } from "./Unit";
6
+
7
+ /**
8
+ * One deterministic measure that moved.
9
+ */
10
+ export type MeasureChange = { id: MeasureId, unit: Unit, base_status: MeasureStatus, head_status: MeasureStatus, base: MeasureValue | null, head: MeasureValue | null,
11
+ /**
12
+ * Head minus base, for integer values on both sides. Null otherwise.
13
+ */
14
+ delta: number | null, };
@@ -0,0 +1,13 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { Covers } from "./Covers";
3
+ import type { MeasureId } from "./MeasureId";
4
+ import type { Quantity } from "./Quantity";
5
+ import type { Source } from "./Source";
6
+ import type { Statistic } from "./Statistic";
7
+ import type { Unit } from "./Unit";
8
+
9
+ /**
10
+ * One row of `packages/schema/json/measures.json`: a measure id and its spec, so a site can
11
+ * label and group measures with no copy of this table.
12
+ */
13
+ export type MeasureEntry = { id: MeasureId, source: Source, phase: number, unit: Unit, covers: Covers, quantity: Quantity, statistic: Statistic, };
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * Every measure that Phases 1 and 2 name.
5
+ */
6
+ export type MeasureId = "static.inventory.files" | "static.bytes.by_type" | "static.bytes.compressed" | "static.bytes.duplicates" | "static.textures.decoded" | "static.audio.decoded_48k" | "static.audio.decoded_24k" | "static.audio.stereo_files" | "static.audio.stereo_mono_safe" | "static.audio.sprite_silence" | "static.audio.silence_by_decode" | "static.render.antialias" | "static.render.resolution_uncapped" | "static.render.backend" | "static.render.canvas" | "static.bundle.engines" | "static.bundle.external_urls" | "static.bundle.source_map" | "lab.time.first_frame" | "lab.time.ready" | "lab.bytes.loaded_by_idle" | "lab.bytes.to_playable" | "lab.audio.decoded" | "lab.audio.context_rate" | "lab.textures.uploaded" | "lab.textures.resident" | "lab.canvas.contexts" | "lab.canvas.bytes" | "lab.js_heap" | "lab.inactive.audio_running" | "lab.inactive.frame_rate" | "lab.inactive.allocated" | "lab.self_check.frame_dpr" | "lab.self_check.frame_requests" | "lab.self_check.webgl_renderer" | "model.footprint" | "model.footprint_inactive" | "play.spins" | "play.peak" | "play.growth_per_100_spins" | "play.bonus_peak" | "device.phys_footprint" | "device.phys_footprint_peak" | "device.footprint_over_baseline" | "device.kills";
@@ -0,0 +1,15 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { MeasureValue } from "./MeasureValue";
3
+
4
+ /**
5
+ * One part of a measure's breakdown. Items sort by key, then value.
6
+ */
7
+ export type MeasureItem = {
8
+ /**
9
+ * A relative path with '/', a file kind, a sprite name, an engine name or a URL.
10
+ */
11
+ key: string,
12
+ /**
13
+ * In the measure's unit, or text for a fact such as an engine version.
14
+ */
15
+ value: MeasureValue, };
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * How far to trust a measure. "Not measured" is never 0.
5
+ */
6
+ export type MeasureStatus = "measured" | "estimated" | "unsupported" | "missing" | "invalid";
@@ -0,0 +1,7 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * A value. Integers carry every number, so float formatting never changes the output. They are
5
+ * signed, because a change such as memory growth can be negative.
6
+ */
7
+ export type MeasureValue = number | boolean | string;
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * Which way a host message went.
5
+ */
6
+ export type MessageDirection = "to_host" | "from_host";
package/ts/Method.ts ADDED
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * How a value was found. Declared in alphabetical order, so evidence sorts by name.
5
+ */
6
+ export type Method = "audio_decode" | "bundle_scan" | "devtools_protocol" | "file_hash" | "file_header" | "file_size" | "host_message" | "model" | "network" | "probe" | "sprite_map" | "syslog" | "sysmontap" | "xctrace";
package/ts/OsName.ts ADDED
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * An operating system.
5
+ */
6
+ export type OsName = "linux" | "macos" | "windows" | "ios" | "ipados" | "android";
@@ -0,0 +1,48 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { AudioState } from "./AudioState";
3
+ import type { ContextKind } from "./ContextKind";
4
+ import type { GameHookKind } from "./GameHookKind";
5
+ import type { MessageDirection } from "./MessageDirection";
6
+ import type { SourceKind } from "./SourceKind";
7
+
8
+ /**
9
+ * One probe event. `t_ms` is `performance.now()` in the game frame.
10
+ */
11
+ export type ProbeEvent = { "type": "first_frame", t_ms: number, } | { "type": "host_message", direction: MessageDirection, name: string, t_ms: number, } | { "type": "audio_decoded", length: number, channels: number, sample_rate: number, t_ms: number, } | { "type": "audio_context_state", state: AudioState, sample_rate: number, t_ms: number, } | { "type": "texture_uploaded",
12
+ /**
13
+ * The probe's number for the texture, which a later upload or `texture_deleted`
14
+ * repeats. None from a probe that does not number textures.
15
+ */
16
+ texture: number | null,
17
+ /**
18
+ * The cube map face, 0 to 5; 0 for a 2D texture. None for `texStorage2D` on a cube
19
+ * map, which allocates every face at once.
20
+ */
21
+ face: number | null,
22
+ /**
23
+ * The mip level. None for `texStorage2D`, which allocates every level at once.
24
+ */
25
+ level: number | null, width: number, height: number, bytes: number,
26
+ /**
27
+ * The path of the http image or video it came from, without host, query or fragment.
28
+ * The lab probe follows a fetched file to an ImageBitmap, a `blob:` object URL or a
29
+ * response made from it (also through Pixi 8's worker). None for data, a render target,
30
+ * a canvas, or a `data:` URL. An upload by `texSubImage2D` into `texStorage2D` storage is
31
+ * not seen, so its source is not either.
32
+ */
33
+ source: string | null,
34
+ /**
35
+ * What an upload with no source held, when the lab probe can tell: `empty` for an
36
+ * allocation with no pixels, `canvas` for a canvas the game drew. None otherwise, and
37
+ * always from the field probe.
38
+ */
39
+ source_kind: SourceKind | null, t_ms: number, } | { "type": "texture_deleted", texture: number, t_ms: number, } | { "type": "context_created",
40
+ /**
41
+ * The probe's number for the canvas, which its `canvas_resized` events repeat. None from
42
+ * a probe that does not number canvases.
43
+ */
44
+ canvas: number | null, kind: ContextKind,
45
+ /**
46
+ * The canvas's backing size in pixels when it got its context.
47
+ */
48
+ width: number, height: number, antialias: boolean | null, device_pixel_ratio: number, t_ms: number, } | { "type": "canvas_resized", canvas: number, width: number, height: number, t_ms: number, } | { "type": "context_lost", t_ms: number, } | { "type": "frame_times", bucket_upper_ms: Array<number>, counts: Array<number>, t_ms: number, } | { "type": "game_hook", hook: GameHookKind, detail: string | null, t_ms: number, };
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * Which host profile, and which version of it, a result used.
5
+ */
6
+ export type ProfileRef = { name: string, version: number, };
package/ts/Quantity.ts ADDED
@@ -0,0 +1,7 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * What a measure counts, whatever the source or the reading. A site groups measures by it, so
5
+ * the textures a build holds and the textures a run uploaded sit in one row.
6
+ */
7
+ export type Quantity = "files" | "download_bytes" | "compressed_bytes" | "duplicate_bytes" | "textures" | "audio" | "stereo_sounds" | "mono_safe_stereo_sounds" | "sprite_silence" | "audio_silence" | "antialias" | "resolution_uncapped" | "render_backend" | "canvas" | "libraries" | "external_urls" | "script_bytes" | "first_frame_time" | "ready_time" | "audio_rate" | "canvas_contexts" | "js_heap" | "audio_running" | "frame_rate" | "allocated_bytes" | "frame_dpr" | "frame_requests" | "webgl_renderer" | "footprint" | "spins" | "memory" | "kills";
package/ts/RelPath.ts ADDED
@@ -0,0 +1,9 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * A path relative to the build root, with '/' between parts on every platform.
5
+ *
6
+ * Construction normalizes the separators, so the same file gives the same bytes in a result on
7
+ * macOS, Linux and Windows.
8
+ */
9
+ export type RelPath = string;