@kya-os/checkpoint-shared 1.4.0 → 1.5.1

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 (161) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/beacon-types/index.d.mts +448 -432
  3. package/dist/beacon-types/index.d.mts.map +1 -0
  4. package/dist/beacon-types/index.d.ts +448 -432
  5. package/dist/beacon-types/index.d.ts.map +1 -0
  6. package/dist/beacon-types/index.js +286 -182
  7. package/dist/beacon-types/index.mjs +284 -180
  8. package/dist/beacon-types/index.mjs.map +1 -0
  9. package/dist/browser-posture-cookie-Dmq9Brf_.d.mts +5 -0
  10. package/dist/browser-posture-cookie-Dmq9Brf_.d.mts.map +1 -0
  11. package/dist/browser-posture-cookie-Dmq9Brf_.d.ts +5 -0
  12. package/dist/browser-posture-cookie-Dmq9Brf_.d.ts.map +1 -0
  13. package/dist/browser-posture-cookie.d.mts +2 -0
  14. package/dist/browser-posture-cookie.d.ts +2 -0
  15. package/dist/browser-posture-cookie.js +1 -0
  16. package/dist/browser-posture-cookie.mjs +2 -0
  17. package/dist/browser-posture-cookie.mjs.map +1 -0
  18. package/dist/browser-posture-report.d.mts +48 -44
  19. package/dist/browser-posture-report.d.mts.map +1 -0
  20. package/dist/browser-posture-report.d.ts +48 -44
  21. package/dist/browser-posture-report.d.ts.map +1 -0
  22. package/dist/browser-posture-report.js +1 -1
  23. package/dist/browser-posture-report.mjs +2 -1
  24. package/dist/browser-posture-report.mjs.map +1 -0
  25. package/dist/browser-posture.d.mts +82 -75
  26. package/dist/browser-posture.d.mts.map +1 -0
  27. package/dist/browser-posture.d.ts +82 -75
  28. package/dist/browser-posture.d.ts.map +1 -0
  29. package/dist/browser-posture.js +167 -18993
  30. package/dist/browser-posture.mjs +166 -18990
  31. package/dist/browser-posture.mjs.map +1 -0
  32. package/dist/browser.d.mts +323 -316
  33. package/dist/browser.d.mts.map +1 -0
  34. package/dist/browser.d.ts +323 -316
  35. package/dist/browser.d.ts.map +1 -0
  36. package/dist/browser.js +1 -1
  37. package/dist/browser.mjs +2 -1
  38. package/dist/browser.mjs.map +1 -0
  39. package/dist/canonical-signer/index.d.mts +38 -33
  40. package/dist/canonical-signer/index.d.mts.map +1 -0
  41. package/dist/canonical-signer/index.d.ts +38 -33
  42. package/dist/canonical-signer/index.d.ts.map +1 -0
  43. package/dist/canonical-signer/index.js +411 -181
  44. package/dist/canonical-signer/index.mjs +383 -175
  45. package/dist/canonical-signer/index.mjs.map +1 -0
  46. package/dist/clearance.d.mts +30 -0
  47. package/dist/clearance.d.mts.map +1 -0
  48. package/dist/clearance.d.ts +30 -0
  49. package/dist/clearance.d.ts.map +1 -0
  50. package/dist/clearance.js +120 -0
  51. package/dist/clearance.mjs +112 -0
  52. package/dist/clearance.mjs.map +1 -0
  53. package/dist/client-ip-1y2iXAYW.js +237 -0
  54. package/dist/client-ip-HOfe6ucV.mjs +215 -0
  55. package/dist/client-ip-HOfe6ucV.mjs.map +1 -0
  56. package/dist/deploy/index.d.mts +339 -339
  57. package/dist/deploy/index.d.mts.map +1 -0
  58. package/dist/deploy/index.d.ts +339 -339
  59. package/dist/deploy/index.d.ts.map +1 -0
  60. package/dist/deploy/index.js +505 -413
  61. package/dist/deploy/index.mjs +504 -410
  62. package/dist/deploy/index.mjs.map +1 -0
  63. package/dist/errors/index.d.mts +101 -101
  64. package/dist/errors/index.d.mts.map +1 -0
  65. package/dist/errors/index.d.ts +101 -101
  66. package/dist/errors/index.d.ts.map +1 -0
  67. package/dist/errors/index.js +341 -314
  68. package/dist/errors/index.mjs +340 -311
  69. package/dist/errors/index.mjs.map +1 -0
  70. package/dist/external-jr_S4iSS.d.mts +4187 -0
  71. package/dist/external-jr_S4iSS.d.mts.map +1 -0
  72. package/dist/external-jr_S4iSS.d.ts +4187 -0
  73. package/dist/external-jr_S4iSS.d.ts.map +1 -0
  74. package/dist/gateway/index.d.mts +138 -132
  75. package/dist/gateway/index.d.mts.map +1 -0
  76. package/dist/gateway/index.d.ts +138 -132
  77. package/dist/gateway/index.d.ts.map +1 -0
  78. package/dist/gateway/index.js +117 -81
  79. package/dist/gateway/index.mjs +116 -78
  80. package/dist/gateway/index.mjs.map +1 -0
  81. package/dist/gateway-client-ip.d.mts +59 -0
  82. package/dist/gateway-client-ip.d.mts.map +1 -0
  83. package/dist/gateway-client-ip.d.ts +59 -0
  84. package/dist/gateway-client-ip.d.ts.map +1 -0
  85. package/dist/gateway-client-ip.js +149 -0
  86. package/dist/gateway-client-ip.mjs +139 -0
  87. package/dist/gateway-client-ip.mjs.map +1 -0
  88. package/dist/index.d.mts +14901 -14246
  89. package/dist/index.d.mts.map +1 -0
  90. package/dist/index.d.ts +14901 -14246
  91. package/dist/index.d.ts.map +1 -0
  92. package/dist/index.js +15180 -31025
  93. package/dist/index.mjs +15065 -30942
  94. package/dist/index.mjs.map +1 -0
  95. package/dist/mcpi/agentshield-api/index.d.mts +45 -44
  96. package/dist/mcpi/agentshield-api/index.d.mts.map +1 -0
  97. package/dist/mcpi/agentshield-api/index.d.ts +45 -44
  98. package/dist/mcpi/agentshield-api/index.d.ts.map +1 -0
  99. package/dist/mcpi/agentshield-api/index.js +0 -2
  100. package/dist/mcpi/agentshield-api/index.mjs +1 -1
  101. package/dist/mcpi/approval-grant/index.d.mts +63 -61
  102. package/dist/mcpi/approval-grant/index.d.mts.map +1 -0
  103. package/dist/mcpi/approval-grant/index.d.ts +63 -61
  104. package/dist/mcpi/approval-grant/index.d.ts.map +1 -0
  105. package/dist/mcpi/approval-grant/index.js +220 -140
  106. package/dist/mcpi/approval-grant/index.mjs +219 -137
  107. package/dist/mcpi/approval-grant/index.mjs.map +1 -0
  108. package/dist/mcpi/dashboard-config/index.d.mts +2323 -2318
  109. package/dist/mcpi/dashboard-config/index.d.mts.map +1 -0
  110. package/dist/mcpi/dashboard-config/index.d.ts +2323 -2318
  111. package/dist/mcpi/dashboard-config/index.d.ts.map +1 -0
  112. package/dist/mcpi/dashboard-config/index.js +605 -458
  113. package/dist/mcpi/dashboard-config/index.mjs +604 -455
  114. package/dist/mcpi/dashboard-config/index.mjs.map +1 -0
  115. package/dist/mcpi/multibase-ed25519.d.mts +10 -8
  116. package/dist/mcpi/multibase-ed25519.d.mts.map +1 -0
  117. package/dist/mcpi/multibase-ed25519.d.ts +10 -8
  118. package/dist/mcpi/multibase-ed25519.d.ts.map +1 -0
  119. package/dist/mcpi/multibase-ed25519.js +182 -106
  120. package/dist/mcpi/multibase-ed25519.mjs +181 -103
  121. package/dist/mcpi/multibase-ed25519.mjs.map +1 -0
  122. package/dist/patterns-CkRVOdtV.js +243 -0
  123. package/dist/patterns-DzkGy_qk.mjs +173 -0
  124. package/dist/patterns-DzkGy_qk.mjs.map +1 -0
  125. package/dist/project-verification-key-C3L5rd8a.js +41 -0
  126. package/dist/project-verification-key-CgSVX9_m.mjs +37 -0
  127. package/dist/project-verification-key-CgSVX9_m.mjs.map +1 -0
  128. package/dist/rolldown-runtime-iY2fYEqi.mjs +19 -0
  129. package/dist/schemas-BmjNLAE7.js +5677 -0
  130. package/dist/schemas-DxY-dk9y.mjs +5511 -0
  131. package/dist/schemas-DxY-dk9y.mjs.map +1 -0
  132. package/dist/signals/index.d.mts +125 -115
  133. package/dist/signals/index.d.mts.map +1 -0
  134. package/dist/signals/index.d.ts +125 -115
  135. package/dist/signals/index.d.ts.map +1 -0
  136. package/dist/signals/index.js +1693 -1536
  137. package/dist/signals/index.mjs +1692 -1533
  138. package/dist/signals/index.mjs.map +1 -0
  139. package/dist/test-fixtures/index.d.mts +124 -119
  140. package/dist/test-fixtures/index.d.mts.map +1 -0
  141. package/dist/test-fixtures/index.d.ts +124 -119
  142. package/dist/test-fixtures/index.d.ts.map +1 -0
  143. package/dist/test-fixtures/index.js +460 -228
  144. package/dist/test-fixtures/index.mjs +459 -225
  145. package/dist/test-fixtures/index.mjs.map +1 -0
  146. package/dist/tool-protection/index.d.mts +343 -343
  147. package/dist/tool-protection/index.d.mts.map +1 -0
  148. package/dist/tool-protection/index.d.ts +343 -343
  149. package/dist/tool-protection/index.d.ts.map +1 -0
  150. package/dist/tool-protection/index.js +366 -285
  151. package/dist/tool-protection/index.mjs +365 -282
  152. package/dist/tool-protection/index.mjs.map +1 -0
  153. package/fixtures/bot-signal-resolution.json +142 -0
  154. package/fixtures/browser-posture-claims.json +421 -0
  155. package/fixtures/browser-posture-headers.json +46 -0
  156. package/fixtures/detection/reason-codes.json +10 -1
  157. package/fixtures/kya-http/challenge.delegation.fetcher-200.json +9 -3
  158. package/fixtures/kya-http/challenge.delegation.full.json +9 -3
  159. package/fixtures/kya-http/challenge.delegation.minimal.json +9 -3
  160. package/fixtures/kya-http/error-codes.json +7 -2
  161. package/package.json +20 -6
@@ -1,1596 +1,1745 @@
1
- 'use strict';
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ let _noble_hashes_sha2_js = require("@noble/hashes/sha2.js");
3
+ let _noble_hashes_utils_js = require("@noble/hashes/utils.js");
2
4
 
3
- var sha2_js = require('@noble/hashes/sha2.js');
4
- var utils_js = require('@noble/hashes/utils.js');
5
-
6
- // src/signals/types.ts
7
- var REGISTRY_VERSIONS = ["v1", "v2", "v3"];
8
- var CURRENT_REGISTRY_VERSION = REGISTRY_VERSIONS[REGISTRY_VERSIONS.length - 1];
9
- var FROZEN_FIELDS = ["id", "addedVersion", "denoise", "mode", "plane", "group"];
10
- var TIER_LOCKED_FIELDS = ["tier"];
11
-
12
- // src/signals/sensitive-attributes.ts
13
- var SENSITIVE_REJECTION_LIST_VERSIONS = ["v1"];
14
- var CURRENT_SENSITIVE_REJECTION_LIST_VERSION = SENSITIVE_REJECTION_LIST_VERSIONS[SENSITIVE_REJECTION_LIST_VERSIONS.length - 1];
15
- var SENSITIVE_ATTRIBUTE_REJECTION_LIST = {
16
- v1: [
17
- {
18
- category: "racial-or-ethnic-origin",
19
- description: "Inference indicating racial or ethnic origin.",
20
- regimes: ["CO Privacy Act Rules, 4 CCR 904-3 \xA72.02 (Sensitive Data Inferences)"],
21
- keywords: ["racial origin", "ethnic origin", "race indicator", "ethnicity indicator"]
22
- },
23
- {
24
- category: "religious-or-philosophical-beliefs",
25
- description: "Inference indicating religious or philosophical beliefs.",
26
- regimes: ["CO Privacy Act Rules, 4 CCR 904-3 \xA72.02 (Sensitive Data Inferences)"],
27
- keywords: [
28
- "religious belief",
29
- "religious observance",
30
- "philosophical belief",
31
- "faith affiliation"
32
- ]
33
- },
34
- {
35
- category: "mental-or-physical-health-condition-or-diagnosis",
36
- description: "Inference indicating a mental or physical health condition or diagnosis.",
37
- regimes: [
38
- "CO Privacy Act Rules, 4 CCR 904-3 \xA72.02 (Sensitive Data Inferences)",
39
- "WA My Health My Data Act (RCW 19.373)",
40
- "NV SB 370 (consumer health data)"
41
- ],
42
- keywords: [
43
- "health condition",
44
- "medical condition",
45
- "health diagnosis",
46
- "mental health condition",
47
- "mental health diagnosis",
48
- "physical health condition",
49
- "disability status",
50
- "disease indicator",
51
- "illness indicator"
52
- ]
53
- },
54
- {
55
- category: "sex-life-or-sexual-orientation",
56
- description: "Inference indicating sex life or sexual orientation.",
57
- regimes: ["CO Privacy Act Rules, 4 CCR 904-3 \xA72.02 (Sensitive Data Inferences)"],
58
- keywords: ["sexual orientation", "sex life", "gender identity inferred"]
59
- },
60
- {
61
- category: "citizenship-or-immigration-status",
62
- description: "Inference indicating citizenship or citizenship status.",
63
- regimes: ["CO Privacy Act Rules, 4 CCR 904-3 \xA72.02 (Sensitive Data Inferences)"],
64
- keywords: [
65
- "citizenship status",
66
- "immigration status",
67
- "visa status",
68
- "national origin status",
69
- "resident alien status"
70
- ]
71
- },
72
- {
73
- category: "biometric-identifier-or-derivative",
74
- description: "A biometric identifier, or a derivative of one, used to identify an individual.",
75
- regimes: ["CT Data Privacy Act (Public Act 22-15)"],
76
- keywords: [
77
- "voiceprint",
78
- "faceprint",
79
- "iris scan",
80
- "retina scan",
81
- "facial geometry",
82
- "gait analysis",
83
- "palm print",
84
- "dna profile",
85
- "genetic marker"
86
- ]
87
- },
88
- {
89
- category: "government-identification-number",
90
- description: "A government-issued identification number.",
91
- regimes: ["CT Data Privacy Act (Public Act 22-15)"],
92
- keywords: [
93
- "social security number",
94
- "ssn",
95
- "passport number",
96
- "driver's license number",
97
- "driver license number",
98
- "national id number",
99
- "government id number",
100
- "tax id number"
101
- ]
102
- }
103
- ]
104
- };
105
- var COMPOSITION_RISK_RULES = [
106
- {
107
- id: "accessibility-preference-composite",
108
- category: "mental-or-physical-health-condition-or-diagnosis",
109
- signalIds: [
110
- "platform.reducedMotion",
111
- "platform.invertedColors",
112
- "platform.contrast",
113
- "platform.forcedColors",
114
- "platform.reducedTransparency"
115
- ],
116
- minMatches: 2,
117
- regimes: [
118
- "CO Privacy Act Rules, 4 CCR 904-3 \xA72.02 (Sensitive Data Inferences)",
119
- "WA My Health My Data Act (RCW 19.373)",
120
- "NV SB 370 (consumer health data)"
121
- ],
122
- rationale: "Two or more OS-level accessibility-preference reads (reduced motion, inverted colors, forced colors, reduced contrast, reduced transparency), combined into one derived feature, reliably identify a disability/health accommodation (e.g. vestibular disorder, low vision, photosensitivity), even though each individual CSS media-feature probe is, alone, a consent-gated, near-zero-weight contradiction signal."
123
- },
124
- {
125
- id: "locale-cluster-national-origin-composite",
126
- category: "citizenship-or-immigration-status",
127
- signalIds: ["platform.languages", "platform.timezone", "platform.dateTimeLocale"],
128
- minMatches: 3,
129
- regimes: [
130
- "CO Privacy Act Rules, 4 CCR 904-3 \xA72.02 (Sensitive Data Inferences)",
131
- "CT Data Privacy Act (Public Act 22-15)"
132
- ],
133
- rationale: `Combining accepted-languages, IANA timezone, and resolved locale into one derived "origin" feature moves from three individually benign, user-configurable locale reads into a feature whose purpose is inferring likely national origin/immigration status: the "alone or combined" inference Colorado's rule targets.`
134
- }
5
+ //#region src/signals/types.ts
6
+ /**
7
+ * Signal registry types.
8
+ *
9
+ * A "signal" is one named, independently-collected piece of device/browser
10
+ * entropy (e.g. `canvas.geometry`, `platform.timezone`). The registry is the
11
+ * single declarative source of truth for every signal's version range,
12
+ * stability tier, de-noising policy, consent mode, and linkage weight.
13
+ *
14
+ * Core rule: a shipped signal is never edited, only forked. See
15
+ * `immutability.ts` for the mechanism that enforces this.
16
+ */
17
+ /**
18
+ * Ordered registry versions. Order matters — it defines "added"/"removed"
19
+ * comparisons.
20
+ *
21
+ * A new signal is added at a NEW version once fingerprint trees are being
22
+ * stored (P55 pins `registry_version` on every row): `buildFingerprintTree`
23
+ * digests every signal resolved at a version, absent leaves included, so an
24
+ * addition at an existing version would silently change what every tree
25
+ * pinned to that version recomputes to. v3 = the behavioural plane's first
26
+ * entries (interaction physics).
27
+ */
28
+ const REGISTRY_VERSIONS = [
29
+ "v1",
30
+ "v2",
31
+ "v3"
135
32
  ];
33
+ const CURRENT_REGISTRY_VERSION = REGISTRY_VERSIONS[REGISTRY_VERSIONS.length - 1];
34
+ /** Fields frozen once a signal has shipped (see immutability.ts). */
35
+ const FROZEN_FIELDS = [
36
+ "id",
37
+ "addedVersion",
38
+ "denoise",
39
+ "mode",
40
+ "plane",
41
+ "group"
42
+ ];
43
+ /**
44
+ * Fields frozen only once the tier has been finalized (`measurement.provisional`
45
+ * flips to `false`). While provisional, tier/measurement may be updated in
46
+ * place as real data comes in; once finalized, any further change requires
47
+ * a fork — mirroring the `BatteryFullCapacity` -> `BatteryFullCapacityV2`
48
+ * precedent, where the read didn't change, only its classification did.
49
+ */
50
+ const TIER_LOCKED_FIELDS = ["tier"];
51
+
52
+ //#endregion
53
+ //#region src/signals/sensitive-attributes.ts
54
+ /**
55
+ * Feature-registration guard: rejects any signal (feature) that derives a
56
+ * Sensitive Data Inference, at registration time.
57
+ *
58
+ * WHY THIS EXISTS (P44)
59
+ * ----------------------
60
+ * Liability under CO/WA/NV/CT attaches at the INFERENCE step, not the
61
+ * collection step. Colorado's rule says this most plainly: raw browsing data
62
+ * may be benign, but browsing data which, alone or combined with other
63
+ * personal data, infers sexual orientation IS sensitive, and sensitive data
64
+ * requires opt-in consent. The same raw signal is therefore benign or
65
+ * regulated depending only on what gets computed from it, so the one place
66
+ * that can actually hold this line is the point where a *derived feature*
67
+ * gets named and shipped, not a data-collection policy doc. Enforcing it
68
+ * here, in the code that builds the live signal registry, means the four
69
+ * regimes below are satisfied by one control instead of four separate ones.
70
+ *
71
+ * DECISION LOG: v1 list contents (needs legal/product sign-off)
72
+ * ----------------------------------------------------------------
73
+ * The category list below seeds from the ticket's own citations: Colorado's
74
+ * Sensitive Data Inference categories (race/ethnicity, religion, mental or
75
+ * physical health, sex life/orientation, citizenship status), plus
76
+ * Washington's My Health My Data Act and Nevada SB 370 (health specifically),
77
+ * plus Connecticut's Data Privacy Act (biometric derivatives and government
78
+ * ID numbers). This is an engineering starting point, not a finished legal
79
+ * determination. The mechanism (versioned list plus forced re-evaluation on
80
+ * version bump, see `findSignalsNeedingReevaluation`) exists precisely so
81
+ * Legal/Product can revise the list in place and have every existing
82
+ * registered feature re-reviewed against the new version before it's
83
+ * considered compliant again. Do not treat v1 as final without that sign-off.
84
+ *
85
+ * ON "BIOMETRIC" KEYWORDS: a deliberate omission
86
+ * -------------------------------------------------
87
+ * This module and its neighbors use "fingerprint" pervasively to mean
88
+ * *device/browser* fingerprinting (canvas hash, audio hash, WebGL hash), not
89
+ * a human biometric identifier. Connecticut's biometric-data category means
90
+ * data generated from measurements of an individual's *body* (voiceprint,
91
+ * faceprint, iris/retina scan, gait). The keyword list below intentionally
92
+ * avoids the bare words "fingerprint"/"biometric" for that reason: using
93
+ * them would false-positive on this entire module.
94
+ */
95
+ /** Ordered rejection-list versions. Order matters: CURRENT is always the last entry. */
96
+ const SENSITIVE_REJECTION_LIST_VERSIONS = ["v1"];
97
+ const CURRENT_SENSITIVE_REJECTION_LIST_VERSION = SENSITIVE_REJECTION_LIST_VERSIONS[SENSITIVE_REJECTION_LIST_VERSIONS.length - 1];
98
+ const SENSITIVE_ATTRIBUTE_REJECTION_LIST = { v1: [
99
+ {
100
+ category: "racial-or-ethnic-origin",
101
+ description: "Inference indicating racial or ethnic origin.",
102
+ regimes: ["CO Privacy Act Rules, 4 CCR 904-3 §2.02 (Sensitive Data Inferences)"],
103
+ keywords: [
104
+ "racial origin",
105
+ "ethnic origin",
106
+ "race indicator",
107
+ "ethnicity indicator"
108
+ ]
109
+ },
110
+ {
111
+ category: "religious-or-philosophical-beliefs",
112
+ description: "Inference indicating religious or philosophical beliefs.",
113
+ regimes: ["CO Privacy Act Rules, 4 CCR 904-3 §2.02 (Sensitive Data Inferences)"],
114
+ keywords: [
115
+ "religious belief",
116
+ "religious observance",
117
+ "philosophical belief",
118
+ "faith affiliation"
119
+ ]
120
+ },
121
+ {
122
+ category: "mental-or-physical-health-condition-or-diagnosis",
123
+ description: "Inference indicating a mental or physical health condition or diagnosis.",
124
+ regimes: [
125
+ "CO Privacy Act Rules, 4 CCR 904-3 §2.02 (Sensitive Data Inferences)",
126
+ "WA My Health My Data Act (RCW 19.373)",
127
+ "NV SB 370 (consumer health data)"
128
+ ],
129
+ keywords: [
130
+ "health condition",
131
+ "medical condition",
132
+ "health diagnosis",
133
+ "mental health condition",
134
+ "mental health diagnosis",
135
+ "physical health condition",
136
+ "disability status",
137
+ "disease indicator",
138
+ "illness indicator"
139
+ ]
140
+ },
141
+ {
142
+ category: "sex-life-or-sexual-orientation",
143
+ description: "Inference indicating sex life or sexual orientation.",
144
+ regimes: ["CO Privacy Act Rules, 4 CCR 904-3 §2.02 (Sensitive Data Inferences)"],
145
+ keywords: [
146
+ "sexual orientation",
147
+ "sex life",
148
+ "gender identity inferred"
149
+ ]
150
+ },
151
+ {
152
+ category: "citizenship-or-immigration-status",
153
+ description: "Inference indicating citizenship or citizenship status.",
154
+ regimes: ["CO Privacy Act Rules, 4 CCR 904-3 §2.02 (Sensitive Data Inferences)"],
155
+ keywords: [
156
+ "citizenship status",
157
+ "immigration status",
158
+ "visa status",
159
+ "national origin status",
160
+ "resident alien status"
161
+ ]
162
+ },
163
+ {
164
+ category: "biometric-identifier-or-derivative",
165
+ description: "A biometric identifier, or a derivative of one, used to identify an individual.",
166
+ regimes: ["CT Data Privacy Act (Public Act 22-15)"],
167
+ keywords: [
168
+ "voiceprint",
169
+ "faceprint",
170
+ "iris scan",
171
+ "retina scan",
172
+ "facial geometry",
173
+ "gait analysis",
174
+ "palm print",
175
+ "dna profile",
176
+ "genetic marker"
177
+ ]
178
+ },
179
+ {
180
+ category: "government-identification-number",
181
+ description: "A government-issued identification number.",
182
+ regimes: ["CT Data Privacy Act (Public Act 22-15)"],
183
+ keywords: [
184
+ "social security number",
185
+ "ssn",
186
+ "passport number",
187
+ "driver's license number",
188
+ "driver license number",
189
+ "national id number",
190
+ "government id number",
191
+ "tax id number"
192
+ ]
193
+ }
194
+ ] };
195
+ const COMPOSITION_RISK_RULES = [{
196
+ id: "accessibility-preference-composite",
197
+ category: "mental-or-physical-health-condition-or-diagnosis",
198
+ signalIds: [
199
+ "platform.reducedMotion",
200
+ "platform.invertedColors",
201
+ "platform.contrast",
202
+ "platform.forcedColors",
203
+ "platform.reducedTransparency"
204
+ ],
205
+ minMatches: 2,
206
+ regimes: [
207
+ "CO Privacy Act Rules, 4 CCR 904-3 §2.02 (Sensitive Data Inferences)",
208
+ "WA My Health My Data Act (RCW 19.373)",
209
+ "NV SB 370 (consumer health data)"
210
+ ],
211
+ rationale: "Two or more OS-level accessibility-preference reads (reduced motion, inverted colors, forced colors, reduced contrast, reduced transparency), combined into one derived feature, reliably identify a disability/health accommodation (e.g. vestibular disorder, low vision, photosensitivity), even though each individual CSS media-feature probe is, alone, a consent-gated, near-zero-weight contradiction signal."
212
+ }, {
213
+ id: "locale-cluster-national-origin-composite",
214
+ category: "citizenship-or-immigration-status",
215
+ signalIds: [
216
+ "platform.languages",
217
+ "platform.timezone",
218
+ "platform.dateTimeLocale"
219
+ ],
220
+ minMatches: 3,
221
+ regimes: ["CO Privacy Act Rules, 4 CCR 904-3 §2.02 (Sensitive Data Inferences)", "CT Data Privacy Act (Public Act 22-15)"],
222
+ rationale: "Combining accepted-languages, IANA timezone, and resolved locale into one derived \"origin\" feature moves from three individually benign, user-configurable locale reads into a feature whose purpose is inferring likely national origin/immigration status: the \"alone or combined\" inference Colorado's rule targets."
223
+ }];
224
+ /**
225
+ * Splits a dotted/camelCase/snake_case/kebab-case identifier into
226
+ * space-separated words, so a keyword PHRASE like "mental health condition"
227
+ * can match an id like `health.mentalHealthConditionIndicator`, which has
228
+ * no natural word separators at all.
229
+ */
136
230
  function tokenizeIdentifier(text) {
137
- return text.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[._-]+/g, " ");
231
+ return text.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[._-]+/g, " ");
138
232
  }
233
+ /**
234
+ * Two scan surfaces, checked together, not one replacing the other
235
+ * (Cursor Bugbot, PR #4645, two rounds): the RAW lowercased text, where a
236
+ * single fused-case compound like `voicePrint` already contains the
237
+ * single-word keyword "voiceprint" via ordinary substring matching with no
238
+ * tokenization needed; and the TOKENIZED text, where a multi-word phrase
239
+ * keyword like "mental health condition" can match a camelCase id that
240
+ * spells it with no spaces at all. Tokenizing and discarding the raw form
241
+ * fixed the phrase case while silently breaking the fused-word case: a
242
+ * space inserted between "voice" and "Print" stops "voiceprint" from
243
+ * matching. Neither surface alone is sufficient, so both are scanned.
244
+ */
139
245
  function scanTexts(signal) {
140
- const raw = `${signal.id} ${signal.description} ${signal.group}`.toLowerCase();
141
- const tokenized = `${tokenizeIdentifier(signal.id)} ${tokenizeIdentifier(signal.description)} ${tokenizeIdentifier(signal.group)}`.toLowerCase();
142
- return [raw, tokenized];
246
+ return [`${signal.id} ${signal.description} ${signal.group}`.toLowerCase(), `${tokenizeIdentifier(signal.id)} ${tokenizeIdentifier(signal.description)} ${tokenizeIdentifier(signal.group)}`.toLowerCase()];
143
247
  }
248
+ /** Mechanical keyword scan of a signal's own id/description/group against the rejection list. Test 1. */
144
249
  function checkDirectMatch(signal, version = CURRENT_SENSITIVE_REJECTION_LIST_VERSION) {
145
- const texts = scanTexts(signal);
146
- const rules = SENSITIVE_ATTRIBUTE_REJECTION_LIST[version];
147
- const violations = [];
148
- for (const rule of rules) {
149
- const hit = rule.keywords.find((keyword) => texts.some((text) => text.includes(keyword)));
150
- if (hit) {
151
- violations.push({
152
- kind: "direct",
153
- category: rule.category,
154
- ruleId: rule.category,
155
- regimes: rule.regimes,
156
- message: `derives "${rule.category}" (matched "${hit}"): a direct Sensitive Data Inference per ${rule.regimes.join("; ")}.`
157
- });
158
- }
159
- }
160
- return violations;
250
+ const texts = scanTexts(signal);
251
+ const rules = SENSITIVE_ATTRIBUTE_REJECTION_LIST[version];
252
+ const violations = [];
253
+ for (const rule of rules) {
254
+ const hit = rule.keywords.find((keyword) => texts.some((text) => text.includes(keyword)));
255
+ if (hit) violations.push({
256
+ kind: "direct",
257
+ category: rule.category,
258
+ ruleId: rule.category,
259
+ regimes: rule.regimes,
260
+ message: `derives "${rule.category}" (matched "${hit}"): a direct Sensitive Data Inference per ${rule.regimes.join("; ")}.`
261
+ });
262
+ }
263
+ return violations;
161
264
  }
265
+ /**
266
+ * The combination test: does this signal's declared `combinesWith` set,
267
+ * together with its own id, cross a known composition-risk rule's
268
+ * minimum-match threshold? Test 4.
269
+ */
162
270
  function checkCompositionRisk(signalId, combinesWith) {
163
- if (combinesWith.length === 0) return [];
164
- const combinationSet = /* @__PURE__ */ new Set([signalId, ...combinesWith]);
165
- const violations = [];
166
- for (const rule of COMPOSITION_RISK_RULES) {
167
- const matches = rule.signalIds.filter((id) => combinationSet.has(id));
168
- if (matches.length >= rule.minMatches) {
169
- violations.push({
170
- kind: "composition",
171
- category: rule.category,
172
- ruleId: rule.id,
173
- regimes: rule.regimes,
174
- message: `combination rule "${rule.id}" fired: [${matches.join(", ")}] combine into "${rule.category}" per ${rule.regimes.join("; ")}. ${rule.rationale}`
175
- });
176
- }
177
- }
178
- return violations;
271
+ if (combinesWith.length === 0) return [];
272
+ const combinationSet = /* @__PURE__ */ new Set([signalId, ...combinesWith]);
273
+ const violations = [];
274
+ for (const rule of COMPOSITION_RISK_RULES) {
275
+ const matches = rule.signalIds.filter((id) => combinationSet.has(id));
276
+ if (matches.length >= rule.minMatches) violations.push({
277
+ kind: "composition",
278
+ category: rule.category,
279
+ ruleId: rule.id,
280
+ regimes: rule.regimes,
281
+ message: `combination rule "${rule.id}" fired: [${matches.join(", ")}] combine into "${rule.category}" per ${rule.regimes.join("; ")}. ${rule.rationale}`
282
+ });
283
+ }
284
+ return violations;
179
285
  }
286
+ /** A reviewer who declared this feature DOES derive a sensitive category: the honest-disclosure path. */
180
287
  function checkDeclaredCategory(review, version = CURRENT_SENSITIVE_REJECTION_LIST_VERSION) {
181
- if (review.derivesCategory === null) return [];
182
- const rule = SENSITIVE_ATTRIBUTE_REJECTION_LIST[version].find(
183
- (r) => r.category === review.derivesCategory
184
- );
185
- const regimes = rule?.regimes ?? [];
186
- return [
187
- {
188
- kind: "declared",
189
- category: review.derivesCategory,
190
- ruleId: review.derivesCategory,
191
- regimes,
192
- message: `reviewer declared this feature derives "${review.derivesCategory}"${regimes.length ? ` (${regimes.join("; ")})` : ""}.`
193
- }
194
- ];
288
+ if (review.derivesCategory === null) return [];
289
+ const regimes = SENSITIVE_ATTRIBUTE_REJECTION_LIST[version].find((r) => r.category === review.derivesCategory)?.regimes ?? [];
290
+ return [{
291
+ kind: "declared",
292
+ category: review.derivesCategory,
293
+ ruleId: review.derivesCategory,
294
+ regimes,
295
+ message: `reviewer declared this feature derives "${review.derivesCategory}"${regimes.length ? ` (${regimes.join("; ")})` : ""}.`
296
+ }];
195
297
  }
298
+ /**
299
+ * Structural integrity of the review record itself: a missing or stale
300
+ * review is treated as non-compliant, not as "no violations found". This is
301
+ * the enforcement half of "the code needs to enforce that the [human] step
302
+ * happened": an absent or out-of-date review can't silently read as clear.
303
+ */
196
304
  function checkReviewRecordIntegrity(review, currentVersion = CURRENT_SENSITIVE_REJECTION_LIST_VERSION) {
197
- if (!review) {
198
- return [
199
- {
200
- kind: "stale-review",
201
- category: null,
202
- ruleId: "missing-review",
203
- regimes: [],
204
- message: "has no sensitiveAttributeReview record: every registered signal requires one."
205
- }
206
- ];
207
- }
208
- if (!review.reviewedBy || !review.reviewedAt || !review.rationale) {
209
- return [
210
- {
211
- kind: "stale-review",
212
- category: null,
213
- ruleId: "incomplete-review",
214
- regimes: [],
215
- message: "has an incomplete review record (reviewedBy/reviewedAt/rationale required)."
216
- }
217
- ];
218
- }
219
- if (review.listVersion !== currentVersion) {
220
- return [
221
- {
222
- kind: "stale-review",
223
- category: null,
224
- ruleId: "stale-list-version",
225
- regimes: [],
226
- message: `was reviewed against rejection-list version "${review.listVersion}", but the current version is "${currentVersion}": re-evaluation required. See findSignalsNeedingReevaluation().`
227
- }
228
- ];
229
- }
230
- return [];
305
+ if (!review) return [{
306
+ kind: "stale-review",
307
+ category: null,
308
+ ruleId: "missing-review",
309
+ regimes: [],
310
+ message: "has no sensitiveAttributeReview record: every registered signal requires one."
311
+ }];
312
+ if (!review.reviewedBy || !review.reviewedAt || !review.rationale) return [{
313
+ kind: "stale-review",
314
+ category: null,
315
+ ruleId: "incomplete-review",
316
+ regimes: [],
317
+ message: "has an incomplete review record (reviewedBy/reviewedAt/rationale required)."
318
+ }];
319
+ if (review.listVersion !== currentVersion) return [{
320
+ kind: "stale-review",
321
+ category: null,
322
+ ruleId: "stale-list-version",
323
+ regimes: [],
324
+ message: `was reviewed against rejection-list version "${review.listVersion}", but the current version is "${currentVersion}": re-evaluation required. See findSignalsNeedingReevaluation().`
325
+ }];
326
+ return [];
231
327
  }
328
+ /** The single shared check both `registerSignal` and `validateRegistry` call, so there is no logic drift between entry points. */
232
329
  function evaluateSensitiveAttributeCompliance(signal) {
233
- return [
234
- ...checkDirectMatch(signal),
235
- ...checkCompositionRisk(signal.id, signal.review?.combinesWith ?? []),
236
- ...signal.review ? checkDeclaredCategory(signal.review) : [],
237
- ...checkReviewRecordIntegrity(signal.review)
238
- ];
330
+ return [
331
+ ...checkDirectMatch(signal),
332
+ ...checkCompositionRisk(signal.id, signal.review?.combinesWith ?? []),
333
+ ...signal.review ? checkDeclaredCategory(signal.review) : [],
334
+ ...checkReviewRecordIntegrity(signal.review)
335
+ ];
239
336
  }
240
337
  function formatViolation(v) {
241
- return ` - [${v.kind}] ${v.message}`;
338
+ return ` - [${v.kind}] ${v.message}`;
242
339
  }
243
340
  var SensitiveAttributeRejectionError = class extends Error {
244
- signalId;
245
- violations;
246
- constructor(signalId, violations) {
247
- const lines = [
248
- `Feature registration rejected for "${signalId}": Sensitive Data Inference constraint(s) fired.`,
249
- ...violations.map(formatViolation),
250
- "This is a legal boundary (see CO Privacy Act Rules Sensitive Data Inferences; WA My Health My Data Act; NV SB 370; CT Data Privacy Act) enforced in code, not documentation.",
251
- "To register this feature: resolve the conflict (drop the derivation, or narrow combinesWith) and route the change through the sensitive-attribute review process (see docs/governance/sensitive-attribute-rejection-list.md) before re-registering. Do not bypass by editing SIGNAL_REGISTRY directly: validateRegistry() enforces the same check."
252
- ];
253
- super(lines.join("\n"));
254
- this.name = "SensitiveAttributeRejectionError";
255
- this.signalId = signalId;
256
- this.violations = violations;
257
- }
341
+ signalId;
342
+ violations;
343
+ constructor(signalId, violations) {
344
+ const lines = [
345
+ `Feature registration rejected for "${signalId}": Sensitive Data Inference constraint(s) fired.`,
346
+ ...violations.map(formatViolation),
347
+ "This is a legal boundary (see CO Privacy Act Rules Sensitive Data Inferences; WA My Health My Data Act; NV SB 370; CT Data Privacy Act) enforced in code, not documentation.",
348
+ "To register this feature: resolve the conflict (drop the derivation, or narrow combinesWith) and route the change through the sensitive-attribute review process (see docs/governance/sensitive-attribute-rejection-list.md) before re-registering. Do not bypass by editing SIGNAL_REGISTRY directly: validateRegistry() enforces the same check."
349
+ ];
350
+ super(lines.join("\n"));
351
+ this.name = "SensitiveAttributeRejectionError";
352
+ this.signalId = signalId;
353
+ this.violations = violations;
354
+ }
258
355
  };
356
+ /**
357
+ * The single approved way to add a signal to the live registry. Throws with
358
+ * an actionable message (naming the exact category/rule and pointing at the
359
+ * review process) rather than a bare "feature rejected". Returns the
360
+ * definition unchanged on success so callers can do
361
+ * `RAW.map(registerSignal)`.
362
+ */
259
363
  function registerSignal(definition) {
260
- const violations = evaluateSensitiveAttributeCompliance(definition);
261
- if (violations.length > 0) {
262
- throw new SensitiveAttributeRejectionError(definition.id, violations);
263
- }
264
- return definition;
364
+ const violations = evaluateSensitiveAttributeCompliance(definition);
365
+ if (violations.length > 0) throw new SensitiveAttributeRejectionError(definition.id, violations);
366
+ return definition;
265
367
  }
368
+ /**
369
+ * Non-throwing variant used by `validateRegistry` (and directly by anyone
370
+ * validating a whole array) so a bypass of `registerSignal`, such as a
371
+ * hand-edited registry array, is still caught by the same shared logic.
372
+ */
266
373
  function checkSensitiveAttributeCompliance(signal) {
267
- const violations = evaluateSensitiveAttributeCompliance(signal);
268
- return { ok: violations.length === 0, violations };
374
+ const violations = evaluateSensitiveAttributeCompliance(signal);
375
+ return {
376
+ ok: violations.length === 0,
377
+ violations
378
+ };
269
379
  }
380
+ /**
381
+ * Signals whose review is pinned to a rejection-list version older than
382
+ * current: the concrete "changes trigger re-evaluation" mechanism. Also
383
+ * doubles as the "which version was a given model trained under" answer:
384
+ * once this returns empty for a registry snapshot, every feature in it was
385
+ * reviewed against `CURRENT_SENSITIVE_REJECTION_LIST_VERSION`.
386
+ */
270
387
  function findSignalsNeedingReevaluation(signals, currentVersion = CURRENT_SENSITIVE_REJECTION_LIST_VERSION) {
271
- return signals.filter((s) => !s.review || s.review.listVersion !== currentVersion);
388
+ return signals.filter((s) => !s.review || s.review.listVersion !== currentVersion);
272
389
  }
273
390
 
274
- // src/signals/registry.ts
391
+ //#endregion
392
+ //#region src/signals/registry.ts
393
+ /**
394
+ * The signal registry: single declarative source of truth for every
395
+ * signal's version range, stability tier, de-noise policy, consent mode,
396
+ * and Merkle-tree grouping. Collectors and recomputation reference this —
397
+ * nothing hardcodes a signal name or a denoise run count at a call site.
398
+ *
399
+ * A shipped signal is never edited, only forked (see immutability.ts and
400
+ * `.github/workflows/signal-registry-check.yml`). Adding a new signal or
401
+ * finalizing a still-provisional tier does not need a fork; changing
402
+ * addedVersion/denoise/mode/plane/group, or a tier once finalized, does.
403
+ *
404
+ * Provisional tiers: the stability harness that measures real per-browser
405
+ * agreement rates does not exist yet in this repo (tracked as a follow-on).
406
+ * Every tier below is seeded from documented reasoning about each read's
407
+ * known volatility (farbling, driver/OS dependence, etc.), not from
408
+ * measurement, and is marked `measurement.provisional: true` accordingly.
409
+ * A tier with no measurement behind it is a guess wearing a label — so
410
+ * these are explicitly labelled provisional rather than presented as final.
411
+ * Once the harness lands, finalize these in place (see TIER_LOCKED_FIELDS);
412
+ * finalizing is a one-way door — after that, a re-tiering must fork.
413
+ */
275
414
  function provisional(notes) {
276
- return {
277
- agreementRate: null,
278
- sampleSize: 0,
279
- browsers: [],
280
- measuredAt: null,
281
- provisional: true,
282
- notes
283
- };
415
+ return {
416
+ agreementRate: null,
417
+ sampleSize: 0,
418
+ browsers: [],
419
+ measuredAt: null,
420
+ provisional: true,
421
+ notes
422
+ };
284
423
  }
424
+ /**
425
+ * P44 sensitive-attribute review record shared by every signal below that
426
+ * does not derive a Sensitive Data Inference on its own or in combination
427
+ * (see sensitive-attributes.ts for the versioned rejection list and
428
+ * composition-risk table this is checked against at registration). Every
429
+ * signal here evaluates to `derivesCategory: null` with no known composition
430
+ * risk, so one shared record covers them all instead of 38 near-identical
431
+ * inline literals going stale independently.
432
+ */
285
433
  function compliantReview() {
286
- return {
287
- listVersion: CURRENT_SENSITIVE_REJECTION_LIST_VERSION,
288
- reviewedBy: "privacy-review@kya-os.example",
289
- reviewedAt: "2026-08-19",
290
- combinesWith: [],
291
- derivesCategory: null,
292
- rationale: "Raw device/browser entropy read; no plausible link to a Sensitive Data Inference category, individually or via a known composition-risk rule."
293
- };
434
+ return {
435
+ listVersion: CURRENT_SENSITIVE_REJECTION_LIST_VERSION,
436
+ reviewedBy: "privacy-review@kya-os.example",
437
+ reviewedAt: "2026-08-19",
438
+ combinesWith: [],
439
+ derivesCategory: null,
440
+ rationale: "Raw device/browser entropy read; no plausible link to a Sensitive Data Inference category, individually or via a known composition-risk rule."
441
+ };
294
442
  }
295
- var INTERACTION_SIGNAL_IDS = [
296
- "interaction.keyDwellUnder5Share",
297
- "interaction.keyGapUnder5Share",
298
- "interaction.pressUnder10Share",
299
- "interaction.zeroTrailClickShare",
300
- "interaction.untrustedInputShare",
301
- "interaction.mousePerClick"
443
+ /** Every interaction-plane id, for each entry's `combinesWith` (the composite reads them all). */
444
+ const INTERACTION_SIGNAL_IDS = [
445
+ "interaction.keyDwellUnder5Share",
446
+ "interaction.keyGapUnder5Share",
447
+ "interaction.pressUnder10Share",
448
+ "interaction.zeroTrailClickShare",
449
+ "interaction.untrustedInputShare",
450
+ "interaction.mousePerClick"
302
451
  ];
303
452
  function interactionReview(id) {
304
- return {
305
- listVersion: CURRENT_SENSITIVE_REJECTION_LIST_VERSION,
306
- reviewedBy: "privacy-review@kya-os.example",
307
- reviewedAt: "2026-09-03",
308
- combinesWith: INTERACTION_SIGNAL_IDS.filter((other) => other !== id),
309
- derivesCategory: null,
310
- rationale: 'A per-visit share of input events below a physical floor (or a per-visit ratio of two event counts), derived from integer counters; no per-event timing, coordinate, or key identity is collected, so the read cannot reconstruct a typing or pointer rhythm and is not a biometric identifier or a derivative of one (mode: never, so it is excluded from identity linkage regardless). It reads 0 for a person at any speed, ability, or input method, since the floors sit below any hand; it therefore carries no information about a health condition or accommodation. Its only composition is interaction_integrity, a Noisy-OR over the other interaction shares, which derives "driven by software" and nothing about the person.'
311
- };
453
+ return {
454
+ listVersion: CURRENT_SENSITIVE_REJECTION_LIST_VERSION,
455
+ reviewedBy: "privacy-review@kya-os.example",
456
+ reviewedAt: "2026-09-03",
457
+ combinesWith: INTERACTION_SIGNAL_IDS.filter((other) => other !== id),
458
+ derivesCategory: null,
459
+ rationale: "A per-visit share of input events below a physical floor (or a per-visit ratio of two event counts), derived from integer counters; no per-event timing, coordinate, or key identity is collected, so the read cannot reconstruct a typing or pointer rhythm and is not a biometric identifier or a derivative of one (mode: never, so it is excluded from identity linkage regardless). It reads 0 for a person at any speed, ability, or input method, since the floors sit below any hand; it therefore carries no information about a health condition or accommodation. Its only composition is interaction_integrity, a Noisy-OR over the other interaction shares, which derives \"driven by software\" and nothing about the person."
460
+ };
312
461
  }
313
462
  function interactionSignals() {
314
- const entry = (id, description, notes) => ({
315
- id,
316
- addedVersion: "v3",
317
- removedVersion: null,
318
- tier: "low",
319
- measurement: provisional(notes),
320
- denoise: { kind: "none" },
321
- mode: "never",
322
- plane: "behavioural",
323
- group: "interaction",
324
- u: null,
325
- supersedes: null,
326
- description,
327
- review: interactionReview(id)
328
- });
329
- return [
330
- entry(
331
- "interaction.keyDwellUnder5Share",
332
- "Share of paired keystrokes (keydown to keyup) held under 5ms; IME composition, left/right modifiers, and auto-repeat are not timed, and key timing stops once a finger has touched the page.",
333
- "Lab gauntlet, two recordings and three driver rigs against production (plan P0.5): hand minimum dwell 39ms, share 0; CDP drivers 0-1ms on every key, share 1. Playwright type({ delay }) manufactures a hand dwell and reads 0: the timing rungs raise the bar and prove nothing, which is why the ladder ends in a challenge. Seeded from that corpus, not a stability harness; finalize once P3 calibration has the trap populations (IME, dictation, on-screen keyboard, switch access)."
334
- ),
335
- entry(
336
- "interaction.keyGapUnder5Share",
337
- "Share of timed keydown-to-next-keydown gaps within 2s that were under 5ms: a whole string arriving in one tick.",
338
- "Same corpus: hand minimum gap 26ms, share 0; CDP drivers 0ms, share 0.97 to 1. AltGr (Control then Alt back to back) is excluded by the modifier guard; a held key auto-repeats without entering the gap count. Provisional pending the trap populations."
339
- ),
340
- entry(
341
- "interaction.pressUnder10Share",
342
- "Share of primary-pointer presses (pointerdown to pointerup) under 10ms; a second finger is not a press and a cancelled press does not pair with the next release.",
343
- "Same corpus: hand minimum press 38ms, share 0; CDP drivers 2-7ms, share 0.8 to 1. Playwright click({ delay }) holds the press and reads 0. Provisional pending the touch and switch-access populations."
344
- ),
345
- entry(
346
- "interaction.zeroTrailClickShare",
347
- "Of clicks whose own pointerType is mouse and that follow at least one observed pointer move, the share with no mousemove or wheel in the preceding 300ms: a pointer that appeared on its target.",
348
- "Same corpus: every hand click approached, share 0; Claude-in-Chrome 8 of 12 unapproached, the cdp rig 0.7. Taps, keyboard-activated buttons, and a click before any move has been seen are outside the denominator, so a cursor already resting on a button is unknown rather than a teleport. Weaker than the timing rungs (the plan weights it 0.4) because a scroll-then-click is an ordinary thing for a hand; provisional."
349
- ),
350
- entry(
351
- "interaction.untrustedInputShare",
352
- "Share of counted input events (throttled mousemove, keydown, scroll, click, touchstart) dispatched with isTrusted false: input from a script or extension rather than the browser reacting to hardware.",
353
- "The content-script rung (#4842). A person's input is always trusted and the flag is browser-set and read-only, so it cannot be forged upward; the content-script rig reads 0.96 with human-shaped timing, and a CDP-driven browser reads 0 because its synthetic input arrives trusted, which is what the timing rungs above are for. Human baseline 0 of 15 windows. Provisional pending the autofill and accessibility-tool populations, whose events are trusted and should read 0."
354
- ),
355
- entry(
356
- "interaction.mousePerClick",
357
- "Throttled (50ms) mouse moves per mouse click over the visit; undefined on touch traffic, which fires no mousemove.",
358
- "The backstop (#4806): a hand cannot reach a button without dragging the pointer across the screen (measured 33 moves per click) while a driver teleports (measured 2). Noisy on short windows (human 1 to 15 on 4s windows) and undefined for touch, so it is weighted 0.2 in the composite and read only as the mouse-only kinematics reading. Provisional."
359
- )
360
- ];
463
+ const entry = (id, description, notes) => ({
464
+ id,
465
+ addedVersion: "v3",
466
+ removedVersion: null,
467
+ tier: "low",
468
+ measurement: provisional(notes),
469
+ denoise: { kind: "none" },
470
+ mode: "never",
471
+ plane: "behavioural",
472
+ group: "interaction",
473
+ u: null,
474
+ supersedes: null,
475
+ description,
476
+ review: interactionReview(id)
477
+ });
478
+ return [
479
+ entry("interaction.keyDwellUnder5Share", "Share of paired keystrokes (keydown to keyup) held under 5ms; IME composition, left/right modifiers, and auto-repeat are not timed, and key timing stops once a finger has touched the page.", "Lab gauntlet, two recordings and three driver rigs against production (plan P0.5): hand minimum dwell 39ms, share 0; CDP drivers 0-1ms on every key, share 1. Playwright type({ delay }) manufactures a hand dwell and reads 0: the timing rungs raise the bar and prove nothing, which is why the ladder ends in a challenge. Seeded from that corpus, not a stability harness; finalize once P3 calibration has the trap populations (IME, dictation, on-screen keyboard, switch access)."),
480
+ entry("interaction.keyGapUnder5Share", "Share of timed keydown-to-next-keydown gaps within 2s that were under 5ms: a whole string arriving in one tick.", "Same corpus: hand minimum gap 26ms, share 0; CDP drivers 0ms, share 0.97 to 1. AltGr (Control then Alt back to back) is excluded by the modifier guard; a held key auto-repeats without entering the gap count. Provisional pending the trap populations."),
481
+ entry("interaction.pressUnder10Share", "Share of primary-pointer presses (pointerdown to pointerup) under 10ms; a second finger is not a press and a cancelled press does not pair with the next release.", "Same corpus: hand minimum press 38ms, share 0; CDP drivers 2-7ms, share 0.8 to 1. Playwright click({ delay }) holds the press and reads 0. Provisional pending the touch and switch-access populations."),
482
+ entry("interaction.zeroTrailClickShare", "Of clicks whose own pointerType is mouse and that follow at least one observed pointer move, the share with no mousemove or wheel in the preceding 300ms: a pointer that appeared on its target.", "Same corpus: every hand click approached, share 0; Claude-in-Chrome 8 of 12 unapproached, the cdp rig 0.7. Taps, keyboard-activated buttons, and a click before any move has been seen are outside the denominator, so a cursor already resting on a button is unknown rather than a teleport. Weaker than the timing rungs (the plan weights it 0.4) because a scroll-then-click is an ordinary thing for a hand; provisional."),
483
+ entry("interaction.untrustedInputShare", "Share of counted input events (throttled mousemove, keydown, scroll, click, touchstart) dispatched with isTrusted false: input from a script or extension rather than the browser reacting to hardware.", "The content-script rung (#4842). A person's input is always trusted and the flag is browser-set and read-only, so it cannot be forged upward; the content-script rig reads 0.96 with human-shaped timing, and a CDP-driven browser reads 0 because its synthetic input arrives trusted, which is what the timing rungs above are for. Human baseline 0 of 15 windows. Provisional pending the autofill and accessibility-tool populations, whose events are trusted and should read 0."),
484
+ entry("interaction.mousePerClick", "Throttled (50ms) mouse moves per mouse click over the visit; undefined on touch traffic, which fires no mousemove.", "The backstop (#4806): a hand cannot reach a button without dragging the pointer across the screen (measured 33 moves per click) while a driver teleports (measured 2). Noisy on short windows (human 1 to 15 on 4s windows) and undefined for touch, so it is weighted 0.2 in the composite and read only as the mouse-only kinematics reading. Provisional.")
485
+ ];
361
486
  }
362
- var SIGNAL_REGISTRY = [
363
- // --- rendering plane ---------------------------------------------------
364
- {
365
- id: "canvas.geometry",
366
- addedVersion: "v1",
367
- removedVersion: "v2",
368
- tier: "medium",
369
- measurement: provisional(
370
- "Canvas 2D geometry rasterisation is GPU/driver dependent; expected to move on driver updates, stable otherwise. No modal() de-noising applied yet, so privacy-browser farbling is expected to reduce agreement \u2014 this is exactly what the v2 fork below addresses."
371
- ),
372
- denoise: { kind: "none" },
373
- mode: "consent",
374
- plane: "rendering",
375
- group: "canvas",
376
- u: null,
377
- supersedes: null,
378
- description: "Hash of a rendered 2D canvas shape/text scene. Single-read today; superseded by canvas.geometry.v2 once modal(3) de-noising lands (prompt 2).",
379
- review: compliantReview()
380
- },
381
- {
382
- id: "canvas.geometry.v2",
383
- addedVersion: "v2",
384
- removedVersion: null,
385
- tier: "medium",
386
- measurement: provisional(
387
- "Same read as canvas.geometry, sampled 3x and reduced by mode to recover the deterministic render under per-session farbling noise (Brave/Firefox/Safari). Originally a worked fork example proving the versioning mechanism ahead of the real collector; #4256 has since landed the real geometry-only collector (packages/checkpoint-beacon/.../entropy/canvas.ts) with these exact frozen fields (modal(3), consent, rendering/canvas), so this entry is now that signal for real, not just the demo."
388
- ),
389
- denoise: { kind: "modal", runs: 3 },
390
- mode: "consent",
391
- plane: "rendering",
392
- group: "canvas",
393
- u: null,
394
- supersedes: "canvas.geometry",
395
- description: "Hash of a rendered 2D canvas GEOMETRY-ONLY scene (overlapping shapes, a bezier stroke); no text is drawn into this read. Forked from canvas.geometry (which conflated shape and text in one read) to apply modal(3) de-noising instead of editing the shipped v1 definition in place. As of #4256/P10, geometry and text are collected and hashed as two fully independent signals (see canvas.text): a font-stack change moves canvas.text and leaves this one untouched, and vice versa for a GPU/driver change.",
396
- review: compliantReview()
397
- },
398
- {
399
- id: "canvas.text",
400
- addedVersion: "v2",
401
- removedVersion: null,
402
- tier: "low",
403
- measurement: provisional(
404
- "Canvas 2D text rasterisation (mixed fonts, emoji) is materially less stable than canvas geometry: it moves on font-stack changes, emoji font updates, and subpixel antialiasing changes, none of which touch canvas.geometry.v2's arcs/bezier stroke. Hashing geometry and text together (as the pre-#4256 client-side detector did, with a 32-bit DJB2 digest with nowhere near enough entropy to separate devices in the first place) meant any text drift destroyed the geometry evidence too; kept as an independent signal with its own, lower tier instead."
405
- ),
406
- denoise: { kind: "modal", runs: 3 },
407
- mode: "consent",
408
- plane: "rendering",
409
- group: "canvas",
410
- u: null,
411
- supersedes: null,
412
- description: "Hash of a rendered 2D canvas TEXT-ONLY scene (mixed fonts, emoji); no geometry primitives are drawn into this read. Collected and hashed independently of canvas.geometry.v2 by the same collector module (packages/checkpoint-beacon/.../entropy/canvas.ts), so a font-stack or emoji-font change moves this signal without disturbing the geometry one.",
413
- review: compliantReview()
414
- },
415
- {
416
- id: "webgl.render",
417
- addedVersion: "v1",
418
- removedVersion: null,
419
- tier: "medium",
420
- measurement: provisional(
421
- "WebGL renderer/parameter fingerprint. Moves on GPU driver updates; stable within a driver version. Farbling affects some browsers (notably Samsung Internet)."
422
- ),
423
- denoise: { kind: "none" },
424
- mode: "consent",
425
- plane: "rendering",
426
- group: "webgl",
427
- u: null,
428
- supersedes: null,
429
- description: "Hash of WebGL renderer info and a rendered scene.",
430
- review: compliantReview()
431
- },
432
- {
433
- id: "audio.digest",
434
- addedVersion: "v1",
435
- removedVersion: null,
436
- tier: "medium",
437
- measurement: provisional(
438
- "AudioContext oscillator/compressor output digest. Deterministic per audio stack; moves on driver/OS audio-subsystem updates."
439
- ),
440
- denoise: { kind: "none" },
441
- mode: "consent",
442
- plane: "rendering",
443
- group: "audio",
444
- u: null,
445
- supersedes: null,
446
- description: "Digest of a rendered AudioContext sample buffer.",
447
- review: compliantReview()
448
- },
449
- {
450
- id: "rendering.fonts",
451
- addedVersion: "v1",
452
- removedVersion: null,
453
- tier: "medium",
454
- measurement: provisional(
455
- "Enumerated available font list. High entropy but moves whenever the OS font stack changes (OS updates, new app installs)."
456
- ),
457
- denoise: { kind: "none" },
458
- mode: "consent",
459
- plane: "rendering",
460
- group: "fonts",
461
- u: null,
462
- supersedes: null,
463
- description: "Set of locally-available fonts detected via width-probing.",
464
- review: compliantReview()
465
- },
466
- {
467
- id: "rendering.mathFingerprint",
468
- addedVersion: "v1",
469
- removedVersion: null,
470
- tier: "high",
471
- measurement: provisional(
472
- "Floating-point transcendental function results depend on the JS engine and CPU FPU implementation, not on user state or GPU driver \u2014 expected to be stable across sessions and survive most updates, per FingerprintJS/ThumbmarkJS prior art."
473
- ),
474
- denoise: { kind: "none" },
475
- mode: "open",
476
- plane: "rendering",
477
- group: "math",
478
- u: null,
479
- supersedes: null,
480
- description: "Hash of a battery of Math.* transcendental function results.",
481
- review: compliantReview()
482
- },
483
- // --- platform plane ------------------------------------------------------
484
- {
485
- id: "platform.hardwareConcurrency",
486
- addedVersion: "v1",
487
- removedVersion: null,
488
- tier: "high",
489
- measurement: provisional(
490
- "navigator.hardwareConcurrency reflects physical core count, effectively constant for a given device."
491
- ),
492
- denoise: { kind: "none" },
493
- mode: "open",
494
- plane: "platform",
495
- group: "hardware",
496
- u: null,
497
- supersedes: null,
498
- description: "Reported logical CPU core count.",
499
- review: compliantReview()
500
- },
501
- {
502
- id: "platform.deviceMemory",
503
- addedVersion: "v1",
504
- removedVersion: null,
505
- tier: "high",
506
- measurement: provisional(
507
- "navigator.deviceMemory is a coarse, bucketed value tied to physical RAM; effectively constant for a given device."
508
- ),
509
- denoise: { kind: "none" },
510
- mode: "open",
511
- plane: "platform",
512
- group: "hardware",
513
- u: null,
514
- supersedes: null,
515
- description: "Reported device memory in GB, bucketed by the browser.",
516
- review: compliantReview()
517
- },
518
- {
519
- id: "platform.screenResolution",
520
- addedVersion: "v1",
521
- removedVersion: null,
522
- tier: "medium",
523
- measurement: provisional(
524
- "Screen resolution is stable per device but changes on external-monitor connect/disconnect or OS display scaling changes."
525
- ),
526
- denoise: { kind: "none" },
527
- mode: "open",
528
- plane: "platform",
529
- group: "display",
530
- u: null,
531
- supersedes: null,
532
- description: "screen.width/height and color depth.",
533
- review: compliantReview()
534
- },
535
- {
536
- id: "platform.timezone",
537
- addedVersion: "v1",
538
- removedVersion: null,
539
- tier: "medium",
540
- measurement: provisional(
541
- "IANA timezone name. Stable per device/user but changes on travel or explicit user change \u2014 a trivial, legitimate user action, so capped at medium rather than high."
542
- ),
543
- denoise: { kind: "none" },
544
- mode: "open",
545
- plane: "platform",
546
- group: "locale",
547
- u: null,
548
- supersedes: null,
549
- description: "Intl-resolved IANA timezone.",
550
- review: compliantReview()
551
- },
552
- {
553
- id: "platform.languages",
554
- addedVersion: "v1",
555
- removedVersion: null,
556
- tier: "medium",
557
- measurement: provisional(
558
- "navigator.languages ordering/content is stable per device but is user-configurable, a trivial action."
559
- ),
560
- denoise: { kind: "none" },
561
- mode: "open",
562
- plane: "platform",
563
- group: "locale",
564
- u: null,
565
- supersedes: null,
566
- description: "Ordered list of accepted languages.",
567
- review: compliantReview()
568
- },
569
- {
570
- id: "platform.permissions",
571
- addedVersion: "v1",
572
- removedVersion: null,
573
- tier: "low",
574
- measurement: provisional(
575
- "Permission grant states (geolocation, notifications, camera, microphone) change whenever the user grants/revokes a permission \u2014 moves within a session on a trivial user action. Collected for contradiction detection, weighted near zero for identity."
576
- ),
577
- denoise: { kind: "modal", runs: 3 },
578
- mode: "consent",
579
- plane: "platform",
580
- group: "permissions",
581
- u: null,
582
- supersedes: null,
583
- description: "Modal permission state per permission name (Permissions API).",
584
- review: compliantReview()
585
- },
586
- // --- vendored FingerprintJS sources (prompt 9) ---------------------------
587
- // See packages/checkpoint-beacon/src/vendor/fingerprintjs/VENDORING.md for
588
- // the pinned commit and the full included/excluded source reasoning.
589
- {
590
- id: "platform.userAgentData",
591
- addedVersion: "v1",
592
- removedVersion: null,
593
- tier: "high",
594
- measurement: provisional(
595
- "User-Agent Client Hints high-entropy values (architecture, bitness, model, platformVersion), Chromium-only. Device model in particular is highly identifying: the same sensitivity Chromium itself recognises by gating getHighEntropyValues() behind a Permissions-Policy check. Effectively device-constant when available."
596
- ),
597
- denoise: { kind: "none" },
598
- mode: "consent",
599
- plane: "platform",
600
- group: "identity",
601
- u: null,
602
- supersedes: null,
603
- description: "UA-CH brands/mobile/platform plus high-entropy architecture/bitness/model/platformVersion.",
604
- review: compliantReview()
605
- },
606
- {
607
- id: "rendering.fontPreferences",
608
- addedVersion: "v1",
609
- removedVersion: null,
610
- tier: "medium",
611
- measurement: provisional(
612
- "Measured widths of a fixed set of font-preset text samples inside an iframe. Stable per OS/browser install; the upstream source itself documents floating-point measurement noise across zoom levels on some browsers, hence medium rather than high pending real measurement."
613
- ),
614
- denoise: { kind: "none" },
615
- mode: "consent",
616
- plane: "rendering",
617
- group: "fonts",
618
- u: null,
619
- supersedes: null,
620
- description: "Dictionary of measured text-sample widths under a fixed set of font/style presets.",
621
- review: compliantReview()
622
- },
623
- {
624
- id: "platform.osCpu",
625
- addedVersion: "v1",
626
- removedVersion: null,
627
- tier: "low",
628
- measurement: provisional(
629
- "navigator.oscpu, Firefox-only and largely redundant with the platform/UA family. Shared by every user of a given Firefox+OS combination, so low uniqueness on its own: contradiction-detection value only."
630
- ),
631
- denoise: { kind: "none" },
632
- mode: "open",
633
- plane: "platform",
634
- group: "identity",
635
- u: null,
636
- supersedes: null,
637
- description: "navigator.oscpu, when present.",
638
- review: compliantReview()
639
- },
640
- {
641
- id: "platform.colorDepth",
642
- addedVersion: "v1",
643
- removedVersion: null,
644
- tier: "low",
645
- measurement: provisional(
646
- "window.screen.colorDepth is effectively constant (24, occasionally 30) across nearly all modern displays. Very low entropy by itself."
647
- ),
648
- denoise: { kind: "none" },
649
- mode: "open",
650
- plane: "platform",
651
- group: "display",
652
- u: null,
653
- supersedes: null,
654
- description: "Reported screen color depth in bits.",
655
- review: compliantReview()
656
- },
657
- {
658
- id: "platform.sessionStorage",
659
- addedVersion: "v1",
660
- removedVersion: null,
661
- tier: "low",
662
- measurement: provisional(
663
- "Boolean availability of window.sessionStorage. Near-universally true; moves only under specific privacy configurations. Contradiction-detection value only."
664
- ),
665
- denoise: { kind: "none" },
666
- mode: "open",
667
- plane: "platform",
668
- group: "storage",
669
- u: null,
670
- supersedes: null,
671
- description: "Whether window.sessionStorage is available.",
672
- review: compliantReview()
673
- },
674
- {
675
- id: "platform.localStorage",
676
- addedVersion: "v1",
677
- removedVersion: null,
678
- tier: "low",
679
- measurement: provisional(
680
- "Boolean availability of window.localStorage. Near-universally true; moves only under specific privacy configurations. Contradiction-detection value only."
681
- ),
682
- denoise: { kind: "none" },
683
- mode: "open",
684
- plane: "platform",
685
- group: "storage",
686
- u: null,
687
- supersedes: null,
688
- description: "Whether window.localStorage is available.",
689
- review: compliantReview()
690
- },
691
- {
692
- id: "platform.indexedDB",
693
- addedVersion: "v1",
694
- removedVersion: null,
695
- tier: "low",
696
- measurement: provisional(
697
- "Boolean availability of window.indexedDB (undefined on IE/Edge in private mode by design, per upstream source comment). Near-universally true elsewhere. Contradiction-detection value only."
698
- ),
699
- denoise: { kind: "none" },
700
- mode: "open",
701
- plane: "platform",
702
- group: "storage",
703
- u: null,
704
- supersedes: null,
705
- description: "Whether window.indexedDB is available.",
706
- review: compliantReview()
707
- },
708
- {
709
- id: "platform.navigatorPlatform",
710
- addedVersion: "v1",
711
- removedVersion: null,
712
- tier: "low",
713
- measurement: provisional(
714
- "navigator.platform (with the iPad/iPhone WebKit correction upstream applies). Shared by every user of a given OS+browser-mode combination, so low uniqueness alone."
715
- ),
716
- denoise: { kind: "none" },
717
- mode: "open",
718
- plane: "platform",
719
- group: "identity",
720
- u: null,
721
- supersedes: null,
722
- description: "Reported navigator.platform, WebKit iPad/iPhone-corrected.",
723
- review: compliantReview()
724
- },
725
- {
726
- id: "platform.touchSupport",
727
- addedVersion: "v1",
728
- removedVersion: null,
729
- tier: "medium",
730
- measurement: provisional(
731
- "maxTouchPoints + TouchEvent/ontouchstart feature detection. Stable per device and useful for separating phone/tablet from desktop form factors, but shared by every device of the same model."
732
- ),
733
- denoise: { kind: "none" },
734
- mode: "open",
735
- plane: "platform",
736
- group: "hardware",
737
- u: null,
738
- supersedes: null,
739
- description: "maxTouchPoints plus TouchEvent/ontouchstart availability.",
740
- review: compliantReview()
741
- },
742
- {
743
- id: "platform.vendor",
744
- addedVersion: "v1",
745
- removedVersion: null,
746
- tier: "low",
747
- measurement: provisional(
748
- 'navigator.vendor. A handful of possible values shared by huge populations (e.g. every Chromium user reads "Google Inc."). Contradiction-detection value only.'
749
- ),
750
- denoise: { kind: "none" },
751
- mode: "open",
752
- plane: "platform",
753
- group: "identity",
754
- u: null,
755
- supersedes: null,
756
- description: "Reported navigator.vendor.",
757
- review: compliantReview()
758
- },
759
- {
760
- id: "platform.vendorFlavors",
761
- addedVersion: "v1",
762
- removedVersion: null,
763
- tier: "low",
764
- measurement: provisional(
765
- "Presence of browser-specific (not engine-specific) global variables (e.g. window.chrome, window.__firefox__). Distinguishes browser flavor within an engine family; still shared by every install of that browser."
766
- ),
767
- denoise: { kind: "none" },
768
- mode: "open",
769
- plane: "platform",
770
- group: "identity",
771
- u: null,
772
- supersedes: null,
773
- description: "Sorted list of detected browser-specific global variable names.",
774
- review: compliantReview()
775
- },
776
- {
777
- id: "platform.cookiesEnabled",
778
- addedVersion: "v1",
779
- removedVersion: null,
780
- tier: "low",
781
- measurement: provisional(
782
- "Live cookie-write/read probe. Near-universally true; moves whenever the user or a privacy extension blocks cookies, a trivial, legitimate action. Contradiction-detection value only."
783
- ),
784
- denoise: { kind: "none" },
785
- mode: "open",
786
- plane: "platform",
787
- group: "storage",
788
- u: null,
789
- supersedes: null,
790
- description: "Whether a test cookie can be written and read back.",
791
- review: compliantReview()
792
- },
793
- {
794
- id: "platform.colorGamut",
795
- addedVersion: "v1",
796
- removedVersion: null,
797
- tier: "medium",
798
- measurement: provisional(
799
- "CSS color-gamut media-feature probe (srgb/p3/rec2020). Reflects the physical display panel, stable until an external-monitor change."
800
- ),
801
- denoise: { kind: "none" },
802
- mode: "open",
803
- plane: "platform",
804
- group: "display",
805
- u: null,
806
- supersedes: null,
807
- description: "Widest supported color gamut per the CSS color-gamut media feature.",
808
- review: compliantReview()
809
- },
810
- {
811
- id: "platform.invertedColors",
812
- addedVersion: "v1",
813
- removedVersion: null,
814
- tier: "low",
815
- measurement: provisional(
816
- "CSS inverted-colors media-feature probe: an OS-level accessibility preference, not a display capability. Consent-gated like platform.permissions, since it can correlate with a vision-related accessibility need, so it is collected for contradiction detection only and weighted near zero for identity."
817
- ),
818
- denoise: { kind: "none" },
819
- mode: "consent",
820
- plane: "platform",
821
- group: "display",
822
- u: null,
823
- supersedes: null,
824
- description: 'Whether the OS-level "invert colors" accessibility preference is active.',
825
- review: compliantReview()
826
- },
827
- {
828
- id: "platform.forcedColors",
829
- addedVersion: "v1",
830
- removedVersion: null,
831
- tier: "low",
832
- measurement: provisional(
833
- "CSS forced-colors media-feature probe: an OS-level accessibility preference (Windows High Contrast and similar). Consent-gated for the same reason as platform.invertedColors."
834
- ),
835
- denoise: { kind: "none" },
836
- mode: "consent",
837
- plane: "platform",
838
- group: "display",
839
- u: null,
840
- supersedes: null,
841
- description: "Whether an OS-level forced-colors accessibility mode is active.",
842
- review: compliantReview()
843
- },
844
- {
845
- id: "platform.monochrome",
846
- addedVersion: "v1",
847
- removedVersion: null,
848
- tier: "low",
849
- measurement: provisional(
850
- "CSS monochrome media-feature probe (bits per pixel on a non-color/e-ink-style display, or 0). Reflects display hardware, not a user preference, unlike the accessibility-preference probes above."
851
- ),
852
- denoise: { kind: "none" },
853
- mode: "open",
854
- plane: "platform",
855
- group: "display",
856
- u: null,
857
- supersedes: null,
858
- description: "Monochrome display bit depth per the CSS monochrome media feature, or undefined if unsupported.",
859
- review: compliantReview()
860
- },
861
- {
862
- id: "platform.contrast",
863
- addedVersion: "v1",
864
- removedVersion: null,
865
- tier: "low",
866
- measurement: provisional(
867
- "CSS prefers-contrast media-feature probe: an OS-level accessibility preference. Consent-gated for the same reason as platform.invertedColors/platform.forcedColors."
868
- ),
869
- denoise: { kind: "none" },
870
- mode: "consent",
871
- plane: "platform",
872
- group: "display",
873
- u: null,
874
- supersedes: null,
875
- description: "OS-level contrast preference per the CSS prefers-contrast media feature.",
876
- review: compliantReview()
877
- },
878
- {
879
- id: "platform.reducedMotion",
880
- addedVersion: "v1",
881
- removedVersion: null,
882
- tier: "low",
883
- measurement: provisional(
884
- "CSS prefers-reduced-motion media-feature probe: an OS-level accessibility preference that can correlate with a vestibular-disorder accommodation. Consent-gated, contradiction-detection only."
885
- ),
886
- denoise: { kind: "none" },
887
- mode: "consent",
888
- plane: "platform",
889
- group: "display",
890
- u: null,
891
- supersedes: null,
892
- description: 'Whether the OS-level "reduce motion" accessibility preference is active.',
893
- review: compliantReview()
894
- },
895
- {
896
- id: "platform.reducedTransparency",
897
- addedVersion: "v1",
898
- removedVersion: null,
899
- tier: "low",
900
- measurement: provisional(
901
- "CSS prefers-reduced-transparency media-feature probe: an OS-level accessibility preference. Consent-gated for the same reason as platform.reducedMotion."
902
- ),
903
- denoise: { kind: "none" },
904
- mode: "consent",
905
- plane: "platform",
906
- group: "display",
907
- u: null,
908
- supersedes: null,
909
- description: 'Whether the OS-level "reduce transparency" accessibility preference is active.',
910
- review: compliantReview()
911
- },
912
- {
913
- id: "platform.hdr",
914
- addedVersion: "v1",
915
- removedVersion: null,
916
- tier: "medium",
917
- measurement: provisional(
918
- "CSS dynamic-range media-feature probe (high vs standard). Reflects display hardware capability, stable until an external-monitor change."
919
- ),
920
- denoise: { kind: "none" },
921
- mode: "open",
922
- plane: "platform",
923
- group: "display",
924
- u: null,
925
- supersedes: null,
926
- description: "Whether the display supports high dynamic range per the CSS dynamic-range media feature.",
927
- review: compliantReview()
928
- },
929
- {
930
- id: "platform.pdfViewerEnabled",
931
- addedVersion: "v1",
932
- removedVersion: null,
933
- tier: "low",
934
- measurement: provisional(
935
- "navigator.pdfViewerEnabled, Chromium-only. Near-constant true across recent Chromium installs. Contradiction-detection value only."
936
- ),
937
- denoise: { kind: "none" },
938
- mode: "open",
939
- plane: "platform",
940
- group: "capabilities",
941
- u: null,
942
- supersedes: null,
943
- description: "Reported navigator.pdfViewerEnabled.",
944
- review: compliantReview()
945
- },
946
- {
947
- id: "platform.architecture",
948
- addedVersion: "v1",
949
- removedVersion: null,
950
- tier: "high",
951
- measurement: provisional(
952
- "Distinguishes x86/x86-64 from other CPU architectures via IEEE 754 NaN sign-bit behaviour on infinity subtraction. Depends on CPU architecture only, effectively device-constant like hardwareConcurrency/deviceMemory."
953
- ),
954
- denoise: { kind: "none" },
955
- mode: "open",
956
- plane: "platform",
957
- group: "hardware",
958
- u: null,
959
- supersedes: null,
960
- description: "Single byte distinguishing CPU architecture via a floating-point NaN sign-bit probe.",
961
- review: compliantReview()
962
- },
963
- {
964
- id: "platform.applePay",
965
- addedVersion: "v1",
966
- removedVersion: null,
967
- tier: "low",
968
- measurement: provisional(
969
- "ApplePaySession.canMakePayments() state, Safari-only. Depends on device wallet configuration, which can change independently of the fingerprint; mostly useful for Safari-family detection."
970
- ),
971
- denoise: { kind: "none" },
972
- mode: "open",
973
- plane: "platform",
974
- group: "capabilities",
975
- u: null,
976
- supersedes: null,
977
- description: "Apple Pay availability/enabled state (Safari only).",
978
- review: compliantReview()
979
- },
980
- {
981
- id: "platform.privateClickMeasurement",
982
- addedVersion: "v1",
983
- removedVersion: null,
984
- tier: "low",
985
- measurement: provisional(
986
- "Presence of Safari's Privacy-Preserving Ad Measurement attribution-source attribute. Safari-only, mostly stable across recent versions."
987
- ),
988
- denoise: { kind: "none" },
989
- mode: "open",
990
- plane: "platform",
991
- group: "capabilities",
992
- u: null,
993
- supersedes: null,
994
- description: "Whether Safari's private click measurement attribution attribute is present.",
995
- review: compliantReview()
996
- },
997
- {
998
- id: "rendering.audioBaseLatency",
999
- addedVersion: "v1",
1000
- removedVersion: null,
1001
- tier: "medium",
1002
- measurement: provisional(
1003
- "AudioContext.baseLatency, a scalar tied to the audio hardware/OS audio stack. Distinct collection mechanism from audio.digest (no oscillator rendering, no shared context), so this does not duplicate that signal."
1004
- ),
1005
- denoise: { kind: "none" },
1006
- mode: "open",
1007
- plane: "rendering",
1008
- group: "audio",
1009
- u: null,
1010
- supersedes: null,
1011
- description: "Reported AudioContext.baseLatency, or a negative status code when unsupported/disabled.",
1012
- review: compliantReview()
1013
- },
1014
- {
1015
- id: "platform.dateTimeLocale",
1016
- addedVersion: "v1",
1017
- removedVersion: null,
1018
- tier: "medium",
1019
- measurement: provisional(
1020
- "Intl.DateTimeFormat().resolvedOptions().locale. Stable per device/user but trivially user-configurable, same rationale as platform.timezone/platform.languages."
1021
- ),
1022
- denoise: { kind: "none" },
1023
- mode: "open",
1024
- plane: "platform",
1025
- group: "locale",
1026
- u: null,
1027
- supersedes: null,
1028
- description: "Intl-resolved locale string, or a negative status code when unsupported.",
1029
- review: compliantReview()
1030
- },
1031
- // --- ThumbmarkJS-ported sources, prompt 11 ---------------------------
1032
- // Three sources FingerprintJS's 42-source list has no equivalent for at
1033
- // all (see packages/checkpoint-beacon/src/collectors/entropy/webrtc.ts,
1034
- // speech.ts, media-queries.ts for the collectors and the privacy
1035
- // reasoning behind the WebRTC collector in particular).
1036
- {
1037
- id: "transport.webrtcCodecs",
1038
- addedVersion: "v1",
1039
- removedVersion: null,
1040
- tier: "medium",
1041
- measurement: provisional(
1042
- "RTP header extensions and per-codec (rtpmap/fmtp/rtcp-fb) descriptors parsed from a locally-generated SDP offer. Determined by the WebRTC engine build and codec licensing bundled with a given browser version; stable within a browser version, moves on browser updates that add/remove codec or extension support (e.g. AV1/VP9 profile rollout). Collection never gathers a real ICE candidate: setLocalDescription is never called AND iceCandidatePoolSize is 0, so neither of the two ways gathering can start ever fires (see webrtc.ts)."
1043
- ),
1044
- denoise: { kind: "none" },
1045
- mode: "consent",
1046
- plane: "transport",
1047
- group: "webrtc",
1048
- u: null,
1049
- supersedes: null,
1050
- description: "Counts and digests of RTP extensions (extmap) and per-codec descriptors (rtpmap/fmtp/rtcp-fb) for audio and video, parsed from a locally-generated SDP offer.",
1051
- review: compliantReview()
1052
- },
1053
- {
1054
- id: "platform.speechVoices",
1055
- addedVersion: "v1",
1056
- removedVersion: null,
1057
- tier: "medium",
1058
- measurement: provisional(
1059
- "speechSynthesis.getVoices() reduced to voiceURI/name/lang/localService/default per voice, sorted, then hashed. Tied to the OS/browser installed voice set: stable per device, moves when the OS installs a language pack or a browser update changes its bundled voice list. No modal() de-noising applies (voice enumeration is not farbled/randomized per call the way canvas/WebGL/audio reads are) \u2014 the observed timing nondeterminism is handled by the collector's voiceschanged/timeout race, not by resampling."
1060
- ),
1061
- denoise: { kind: "none" },
1062
- mode: "consent",
1063
- plane: "platform",
1064
- group: "capabilities",
1065
- u: null,
1066
- supersedes: null,
1067
- description: "Voice count and a digest of the sorted, normalized speechSynthesis voice list.",
1068
- review: compliantReview()
1069
- },
1070
- {
1071
- id: "platform.mediaQuerySweep",
1072
- addedVersion: "v1",
1073
- removedVersion: "v2",
1074
- tier: "medium",
1075
- measurement: provisional(
1076
- "Systematic sweep of every legal value across 11 CSS media-query families (prefers-contrast, any-hover, any-pointer, pointer, hover, update, inverted-colors, prefers-reduced-motion, prefers-reduced-transparency, scripting, forced-colors). Mostly OS/input-hardware driven and stable per device, but a few families (hover/pointer/any-hover/any-pointer) can move on a trivial user action such as docking a touch device to a mouse, capping this at medium rather than high pending real measurement. Deliberately overlaps 5 already-registered vendored-FingerprintJS signals (platform.contrast, platform.invertedColors, platform.reducedMotion, platform.reducedTransparency, platform.forcedColors) as a cross-validation check, not a duplication bug \u2014 see media-queries.ts."
1077
- ),
1078
- denoise: { kind: "none" },
1079
- mode: "consent",
1080
- plane: "platform",
1081
- group: "display",
1082
- u: null,
1083
- supersedes: null,
1084
- description: `Per-family matched value across 11 media-query families (family absent from the result when unsupported, never a false/placeholder value), plus a family count and a digest. Forked to platform.mediaQuerySweep.v2, which narrows this to 6 families: combining the 5 accessibility-preference families into this one derived feature trips the accessibility-preference-composite Sensitive Data Inference composition rule (see sensitive-attributes.ts) \u2014 a disability/health-accommodation inference risk, per P44. Collector-only; never wired into scoring, transport, or the identity graph at any point in this signal's v1 lifetime, so no stored device data exists to preserve compatibility with (Cursor Bugbot, PR #4639) \u2014 forked anyway, per this file's "never edited, only forked" discipline.`,
1085
- review: compliantReview()
1086
- },
1087
- {
1088
- id: "platform.mediaQuerySweep.v2",
1089
- addedVersion: "v2",
1090
- removedVersion: null,
1091
- tier: "medium",
1092
- measurement: provisional(
1093
- "Systematic sweep of every legal value across 6 CSS media-query families (any-hover, any-pointer, pointer, hover, update, scripting) \u2014 none of which any existing collector reads. Mostly OS/input-hardware driven and stable per device, but a few families (hover/pointer/any-hover/any-pointer) can move on a trivial user action such as docking a touch device to a mouse, capping this at medium rather than high pending real measurement. Forked from platform.mediaQuerySweep (v1) to EXCLUDE the 5 media-query families already registered as their own accessibility-preference signals (platform.contrast, platform.invertedColors, platform.reducedMotion, platform.reducedTransparency, platform.forcedColors): combining 2+ of those into one derived feature trips the accessibility-preference-composite Sensitive Data Inference composition rule (see sensitive-attributes.ts) \u2014 a disability/health-accommodation inference risk, per P44. See media-queries.ts's module doc."
1094
- ),
1095
- denoise: { kind: "none" },
1096
- mode: "consent",
1097
- plane: "platform",
1098
- group: "display",
1099
- u: null,
1100
- supersedes: "platform.mediaQuerySweep",
1101
- description: "Per-family matched value across 6 media-query families with no existing collector (family absent from the result when unsupported, never a false/placeholder value), plus a family count and a digest. Excludes the 5 families already covered by their own registered accessibility-preference signals \u2014 see measurement notes.",
1102
- review: compliantReview()
1103
- },
1104
- // --- User-Agent Client Hints, contradiction-only (prompt 12) ------------
1105
- // Distinct from platform.userAgentData (prompt 9): that signal is the
1106
- // bundled entropy read FingerprintJS itself needs (mode: consent, one
1107
- // signal). These nine are collected purely to catch a spoofed
1108
- // User-Agent string disagreeing with the browser's real Client Hints —
1109
- // mode: 'never', so none of them ever contribute to identity linkage.
1110
- // See packages/checkpoint-beacon/src/collectors/entropy/client-hints.ts.
1111
- {
1112
- id: "platform.clientHints.architecture",
1113
- addedVersion: "v1",
1114
- removedVersion: null,
1115
- tier: "low",
1116
- measurement: provisional(
1117
- "UA-CH high-entropy `architecture` hint (e.g. 'arm', 'x86'). Requested independently of platform.userAgentData's copy of the same hint, specifically so it can feed User-Agent/Client-Hints contradiction detection rather than identity linkage."
1118
- ),
1119
- denoise: { kind: "none" },
1120
- mode: "never",
1121
- plane: "platform",
1122
- group: "clientHints",
1123
- u: null,
1124
- supersedes: null,
1125
- description: "UA-CH high-entropy CPU architecture hint.",
1126
- review: compliantReview()
1127
- },
1128
- {
1129
- id: "platform.clientHints.bitness",
1130
- addedVersion: "v1",
1131
- removedVersion: null,
1132
- tier: "low",
1133
- measurement: provisional(
1134
- "UA-CH high-entropy `bitness` hint (e.g. '64'). Collected for contradiction detection only; see platform.clientHints.architecture."
1135
- ),
1136
- denoise: { kind: "none" },
1137
- mode: "never",
1138
- plane: "platform",
1139
- group: "clientHints",
1140
- u: null,
1141
- supersedes: null,
1142
- description: "UA-CH high-entropy CPU bitness hint.",
1143
- review: compliantReview()
1144
- },
1145
- {
1146
- id: "platform.clientHints.model",
1147
- addedVersion: "v1",
1148
- removedVersion: null,
1149
- tier: "low",
1150
- measurement: provisional(
1151
- "UA-CH high-entropy `model` hint. Empty string on desktop; device model on mobile. Collected for contradiction detection only; see platform.clientHints.architecture."
1152
- ),
1153
- denoise: { kind: "none" },
1154
- mode: "never",
1155
- plane: "platform",
1156
- group: "clientHints",
1157
- u: null,
1158
- supersedes: null,
1159
- description: "UA-CH high-entropy device model hint.",
1160
- review: compliantReview()
1161
- },
1162
- {
1163
- id: "platform.clientHints.platform",
1164
- addedVersion: "v1",
1165
- removedVersion: null,
1166
- tier: "low",
1167
- measurement: provisional(
1168
- "UA-CH low-entropy `platform` (e.g. 'Windows', 'macOS', 'Linux', 'Android', 'Chrome OS'), read synchronously off navigator.userAgentData rather than requested through getHighEntropyValues(). The half of this collector's output the platform contradiction check actually compares against the User-Agent string's platform."
1169
- ),
1170
- denoise: { kind: "none" },
1171
- mode: "never",
1172
- plane: "platform",
1173
- group: "clientHints",
1174
- u: null,
1175
- supersedes: null,
1176
- description: "UA-CH low-entropy platform family string.",
1177
- review: compliantReview()
1178
- },
1179
- {
1180
- id: "platform.clientHints.platformVersion",
1181
- addedVersion: "v1",
1182
- removedVersion: null,
1183
- tier: "low",
1184
- measurement: provisional(
1185
- "UA-CH high-entropy `platformVersion` hint (OS version string). Collected for contradiction detection only; see platform.clientHints.architecture."
1186
- ),
1187
- denoise: { kind: "none" },
1188
- mode: "never",
1189
- plane: "platform",
1190
- group: "clientHints",
1191
- u: null,
1192
- supersedes: null,
1193
- description: "UA-CH high-entropy OS version hint.",
1194
- review: compliantReview()
1195
- },
1196
- {
1197
- id: "platform.clientHints.uaFullVersion",
1198
- addedVersion: "v1",
1199
- removedVersion: null,
1200
- tier: "low",
1201
- measurement: provisional(
1202
- "UA-CH high-entropy `uaFullVersion` hint \u2014 deprecated upstream in favour of `fullVersionList`, but still requested here because a spoofing tool that patches the User-Agent string is more likely to miss this legacy field than the one it actually knows to fake."
1203
- ),
1204
- denoise: { kind: "none" },
1205
- mode: "never",
1206
- plane: "platform",
1207
- group: "clientHints",
1208
- u: null,
1209
- supersedes: null,
1210
- description: "UA-CH high-entropy (deprecated) full browser version hint.",
1211
- review: compliantReview()
1212
- },
1213
- {
1214
- id: "platform.clientHints.fullVersionList",
1215
- addedVersion: "v1",
1216
- removedVersion: null,
1217
- tier: "low",
1218
- measurement: provisional(
1219
- "UA-CH high-entropy `fullVersionList` hint: brand/full-version pairs, GREASE entries filtered before this signal is ever populated (see the collector for the filter and why an unfiltered read would self-split on every request)."
1220
- ),
1221
- denoise: { kind: "none" },
1222
- mode: "never",
1223
- plane: "platform",
1224
- group: "clientHints",
1225
- u: null,
1226
- supersedes: null,
1227
- description: "UA-CH high-entropy brand/full-version list, GREASE-filtered.",
1228
- review: compliantReview()
1229
- },
1230
- {
1231
- id: "platform.clientHints.wow64",
1232
- addedVersion: "v1",
1233
- removedVersion: null,
1234
- tier: "low",
1235
- measurement: provisional(
1236
- "UA-CH high-entropy `wow64` hint: whether a 32-bit browser is running under WOW64 on 64-bit Windows. Collected for contradiction detection only; see platform.clientHints.architecture."
1237
- ),
1238
- denoise: { kind: "none" },
1239
- mode: "never",
1240
- plane: "platform",
1241
- group: "clientHints",
1242
- u: null,
1243
- supersedes: null,
1244
- description: "UA-CH high-entropy Windows WOW64 hint.",
1245
- review: compliantReview()
1246
- },
1247
- {
1248
- id: "platform.clientHints.mobile",
1249
- addedVersion: "v1",
1250
- removedVersion: null,
1251
- tier: "low",
1252
- measurement: provisional(
1253
- "UA-CH low-entropy `mobile` flag, read synchronously off navigator.userAgentData rather than requested through getHighEntropyValues(). Collected for contradiction detection only (e.g. against a desktop User-Agent string), not identity linkage."
1254
- ),
1255
- denoise: { kind: "none" },
1256
- mode: "never",
1257
- plane: "platform",
1258
- group: "clientHints",
1259
- u: null,
1260
- supersedes: null,
1261
- description: "UA-CH low-entropy mobile-device flag.",
1262
- review: compliantReview()
1263
- },
1264
- // --- Interaction physics, contradiction-only (agentic-session plan P1.1) --
1265
- // The behavioural plane's first entries. Each is a per-visit SHARE derived
1266
- // server-side from integer counters the pixel's detector and the beacon's
1267
- // InteractionCollector accumulate (apps/web/lib/detection/timing-physics.ts
1268
- // reads both lanes through one function). They exist to tell a driven
1269
- // browser from a person, never to say WHICH person: mode 'never', so none
1270
- // enters identity linkage or the Merkle tree; tier 'low', because a share
1271
- // of a visit's events is by definition a within-session quantity.
1272
- //
1273
- // The reads are floor-crossings. A hand's shortest measured key dwell on the
1274
- // lab gauntlet was 39ms, its shortest click press 38ms, its shortest
1275
- // inter-key gap 26ms, and every one of its clicks was approached by the
1276
- // pointer; a browser driven over CDP produced 0-1ms dwells, 2-7ms presses,
1277
- // 0ms gaps, and clicks with no approach. The counters bucket at 5ms and 10ms,
1278
- // below any hand, so each share reads 0 for a person whatever their speed
1279
- // and near 1 for a driver. No timestamp, coordinate, or key identity leaves
1280
- // the page; a counter cannot be replayed into a rhythm. The mean dwell and
1281
- // mean press that the same counters also yield are lab-calibration display
1282
- // only and are NOT registered here; promoting either would need its own
1283
- // review, because "how long a hand holds a key" is a property of the hand.
1284
- //
1285
- // Combined downstream by `interaction_integrity` (apps/web/lib/detection/
1286
- // interaction-integrity.ts, scorer v1, shadow-only): a Noisy-OR over the
1287
- // keyboard, press, approach, and provenance readings. That composition is
1288
- // declared on every entry below so the P44 combination test evaluates it.
1289
- ...interactionSignals()
487
+ const SIGNAL_REGISTRY = [
488
+ {
489
+ id: "canvas.geometry",
490
+ addedVersion: "v1",
491
+ removedVersion: "v2",
492
+ tier: "medium",
493
+ measurement: provisional("Canvas 2D geometry rasterisation is GPU/driver dependent; expected to move on driver updates, stable otherwise. No modal() de-noising applied yet, so privacy-browser farbling is expected to reduce agreement — this is exactly what the v2 fork below addresses."),
494
+ denoise: { kind: "none" },
495
+ mode: "consent",
496
+ plane: "rendering",
497
+ group: "canvas",
498
+ u: null,
499
+ supersedes: null,
500
+ description: "Hash of a rendered 2D canvas shape/text scene. Single-read today; superseded by canvas.geometry.v2 once modal(3) de-noising lands (prompt 2).",
501
+ review: compliantReview()
502
+ },
503
+ {
504
+ id: "canvas.geometry.v2",
505
+ addedVersion: "v2",
506
+ removedVersion: null,
507
+ tier: "medium",
508
+ measurement: provisional("Same read as canvas.geometry, sampled 3x and reduced by mode to recover the deterministic render under per-session farbling noise (Brave/Firefox/Safari). Originally a worked fork example proving the versioning mechanism ahead of the real collector; #4256 has since landed the real geometry-only collector (packages/checkpoint-beacon/.../entropy/canvas.ts) with these exact frozen fields (modal(3), consent, rendering/canvas), so this entry is now that signal for real, not just the demo."),
509
+ denoise: {
510
+ kind: "modal",
511
+ runs: 3
512
+ },
513
+ mode: "consent",
514
+ plane: "rendering",
515
+ group: "canvas",
516
+ u: null,
517
+ supersedes: "canvas.geometry",
518
+ description: "Hash of a rendered 2D canvas GEOMETRY-ONLY scene (overlapping shapes, a bezier stroke); no text is drawn into this read. Forked from canvas.geometry (which conflated shape and text in one read) to apply modal(3) de-noising instead of editing the shipped v1 definition in place. As of #4256/P10, geometry and text are collected and hashed as two fully independent signals (see canvas.text): a font-stack change moves canvas.text and leaves this one untouched, and vice versa for a GPU/driver change.",
519
+ review: compliantReview()
520
+ },
521
+ {
522
+ id: "canvas.text",
523
+ addedVersion: "v2",
524
+ removedVersion: null,
525
+ tier: "low",
526
+ measurement: provisional("Canvas 2D text rasterisation (mixed fonts, emoji) is materially less stable than canvas geometry: it moves on font-stack changes, emoji font updates, and subpixel antialiasing changes, none of which touch canvas.geometry.v2's arcs/bezier stroke. Hashing geometry and text together (as the pre-#4256 client-side detector did, with a 32-bit DJB2 digest with nowhere near enough entropy to separate devices in the first place) meant any text drift destroyed the geometry evidence too; kept as an independent signal with its own, lower tier instead."),
527
+ denoise: {
528
+ kind: "modal",
529
+ runs: 3
530
+ },
531
+ mode: "consent",
532
+ plane: "rendering",
533
+ group: "canvas",
534
+ u: null,
535
+ supersedes: null,
536
+ description: "Hash of a rendered 2D canvas TEXT-ONLY scene (mixed fonts, emoji); no geometry primitives are drawn into this read. Collected and hashed independently of canvas.geometry.v2 by the same collector module (packages/checkpoint-beacon/.../entropy/canvas.ts), so a font-stack or emoji-font change moves this signal without disturbing the geometry one.",
537
+ review: compliantReview()
538
+ },
539
+ {
540
+ id: "webgl.render",
541
+ addedVersion: "v1",
542
+ removedVersion: null,
543
+ tier: "medium",
544
+ measurement: provisional("WebGL renderer/parameter fingerprint. Moves on GPU driver updates; stable within a driver version. Farbling affects some browsers (notably Samsung Internet)."),
545
+ denoise: { kind: "none" },
546
+ mode: "consent",
547
+ plane: "rendering",
548
+ group: "webgl",
549
+ u: null,
550
+ supersedes: null,
551
+ description: "Hash of WebGL renderer info and a rendered scene.",
552
+ review: compliantReview()
553
+ },
554
+ {
555
+ id: "audio.digest",
556
+ addedVersion: "v1",
557
+ removedVersion: null,
558
+ tier: "medium",
559
+ measurement: provisional("AudioContext oscillator/compressor output digest. Deterministic per audio stack; moves on driver/OS audio-subsystem updates."),
560
+ denoise: { kind: "none" },
561
+ mode: "consent",
562
+ plane: "rendering",
563
+ group: "audio",
564
+ u: null,
565
+ supersedes: null,
566
+ description: "Digest of a rendered AudioContext sample buffer.",
567
+ review: compliantReview()
568
+ },
569
+ {
570
+ id: "rendering.fonts",
571
+ addedVersion: "v1",
572
+ removedVersion: null,
573
+ tier: "medium",
574
+ measurement: provisional("Enumerated available font list. High entropy but moves whenever the OS font stack changes (OS updates, new app installs)."),
575
+ denoise: { kind: "none" },
576
+ mode: "consent",
577
+ plane: "rendering",
578
+ group: "fonts",
579
+ u: null,
580
+ supersedes: null,
581
+ description: "Set of locally-available fonts detected via width-probing.",
582
+ review: compliantReview()
583
+ },
584
+ {
585
+ id: "rendering.mathFingerprint",
586
+ addedVersion: "v1",
587
+ removedVersion: null,
588
+ tier: "high",
589
+ measurement: provisional("Floating-point transcendental function results depend on the JS engine and CPU FPU implementation, not on user state or GPU driver — expected to be stable across sessions and survive most updates, per FingerprintJS/ThumbmarkJS prior art."),
590
+ denoise: { kind: "none" },
591
+ mode: "open",
592
+ plane: "rendering",
593
+ group: "math",
594
+ u: null,
595
+ supersedes: null,
596
+ description: "Hash of a battery of Math.* transcendental function results.",
597
+ review: compliantReview()
598
+ },
599
+ {
600
+ id: "platform.hardwareConcurrency",
601
+ addedVersion: "v1",
602
+ removedVersion: null,
603
+ tier: "high",
604
+ measurement: provisional("navigator.hardwareConcurrency reflects physical core count, effectively constant for a given device."),
605
+ denoise: { kind: "none" },
606
+ mode: "open",
607
+ plane: "platform",
608
+ group: "hardware",
609
+ u: null,
610
+ supersedes: null,
611
+ description: "Reported logical CPU core count.",
612
+ review: compliantReview()
613
+ },
614
+ {
615
+ id: "platform.deviceMemory",
616
+ addedVersion: "v1",
617
+ removedVersion: null,
618
+ tier: "high",
619
+ measurement: provisional("navigator.deviceMemory is a coarse, bucketed value tied to physical RAM; effectively constant for a given device."),
620
+ denoise: { kind: "none" },
621
+ mode: "open",
622
+ plane: "platform",
623
+ group: "hardware",
624
+ u: null,
625
+ supersedes: null,
626
+ description: "Reported device memory in GB, bucketed by the browser.",
627
+ review: compliantReview()
628
+ },
629
+ {
630
+ id: "platform.screenResolution",
631
+ addedVersion: "v1",
632
+ removedVersion: null,
633
+ tier: "medium",
634
+ measurement: provisional("Screen resolution is stable per device but changes on external-monitor connect/disconnect or OS display scaling changes."),
635
+ denoise: { kind: "none" },
636
+ mode: "open",
637
+ plane: "platform",
638
+ group: "display",
639
+ u: null,
640
+ supersedes: null,
641
+ description: "screen.width/height and color depth.",
642
+ review: compliantReview()
643
+ },
644
+ {
645
+ id: "platform.timezone",
646
+ addedVersion: "v1",
647
+ removedVersion: null,
648
+ tier: "medium",
649
+ measurement: provisional("IANA timezone name. Stable per device/user but changes on travel or explicit user change — a trivial, legitimate user action, so capped at medium rather than high."),
650
+ denoise: { kind: "none" },
651
+ mode: "open",
652
+ plane: "platform",
653
+ group: "locale",
654
+ u: null,
655
+ supersedes: null,
656
+ description: "Intl-resolved IANA timezone.",
657
+ review: compliantReview()
658
+ },
659
+ {
660
+ id: "platform.languages",
661
+ addedVersion: "v1",
662
+ removedVersion: null,
663
+ tier: "medium",
664
+ measurement: provisional("navigator.languages ordering/content is stable per device but is user-configurable, a trivial action."),
665
+ denoise: { kind: "none" },
666
+ mode: "open",
667
+ plane: "platform",
668
+ group: "locale",
669
+ u: null,
670
+ supersedes: null,
671
+ description: "Ordered list of accepted languages.",
672
+ review: compliantReview()
673
+ },
674
+ {
675
+ id: "platform.permissions",
676
+ addedVersion: "v1",
677
+ removedVersion: null,
678
+ tier: "low",
679
+ measurement: provisional("Permission grant states (geolocation, notifications, camera, microphone) change whenever the user grants/revokes a permission — moves within a session on a trivial user action. Collected for contradiction detection, weighted near zero for identity."),
680
+ denoise: {
681
+ kind: "modal",
682
+ runs: 3
683
+ },
684
+ mode: "consent",
685
+ plane: "platform",
686
+ group: "permissions",
687
+ u: null,
688
+ supersedes: null,
689
+ description: "Modal permission state per permission name (Permissions API).",
690
+ review: compliantReview()
691
+ },
692
+ {
693
+ id: "platform.userAgentData",
694
+ addedVersion: "v1",
695
+ removedVersion: null,
696
+ tier: "high",
697
+ measurement: provisional("User-Agent Client Hints high-entropy values (architecture, bitness, model, platformVersion), Chromium-only. Device model in particular is highly identifying: the same sensitivity Chromium itself recognises by gating getHighEntropyValues() behind a Permissions-Policy check. Effectively device-constant when available."),
698
+ denoise: { kind: "none" },
699
+ mode: "consent",
700
+ plane: "platform",
701
+ group: "identity",
702
+ u: null,
703
+ supersedes: null,
704
+ description: "UA-CH brands/mobile/platform plus high-entropy architecture/bitness/model/platformVersion.",
705
+ review: compliantReview()
706
+ },
707
+ {
708
+ id: "rendering.fontPreferences",
709
+ addedVersion: "v1",
710
+ removedVersion: null,
711
+ tier: "medium",
712
+ measurement: provisional("Measured widths of a fixed set of font-preset text samples inside an iframe. Stable per OS/browser install; the upstream source itself documents floating-point measurement noise across zoom levels on some browsers, hence medium rather than high pending real measurement."),
713
+ denoise: { kind: "none" },
714
+ mode: "consent",
715
+ plane: "rendering",
716
+ group: "fonts",
717
+ u: null,
718
+ supersedes: null,
719
+ description: "Dictionary of measured text-sample widths under a fixed set of font/style presets.",
720
+ review: compliantReview()
721
+ },
722
+ {
723
+ id: "platform.osCpu",
724
+ addedVersion: "v1",
725
+ removedVersion: null,
726
+ tier: "low",
727
+ measurement: provisional("navigator.oscpu, Firefox-only and largely redundant with the platform/UA family. Shared by every user of a given Firefox+OS combination, so low uniqueness on its own: contradiction-detection value only."),
728
+ denoise: { kind: "none" },
729
+ mode: "open",
730
+ plane: "platform",
731
+ group: "identity",
732
+ u: null,
733
+ supersedes: null,
734
+ description: "navigator.oscpu, when present.",
735
+ review: compliantReview()
736
+ },
737
+ {
738
+ id: "platform.colorDepth",
739
+ addedVersion: "v1",
740
+ removedVersion: null,
741
+ tier: "low",
742
+ measurement: provisional("window.screen.colorDepth is effectively constant (24, occasionally 30) across nearly all modern displays. Very low entropy by itself."),
743
+ denoise: { kind: "none" },
744
+ mode: "open",
745
+ plane: "platform",
746
+ group: "display",
747
+ u: null,
748
+ supersedes: null,
749
+ description: "Reported screen color depth in bits.",
750
+ review: compliantReview()
751
+ },
752
+ {
753
+ id: "platform.sessionStorage",
754
+ addedVersion: "v1",
755
+ removedVersion: null,
756
+ tier: "low",
757
+ measurement: provisional("Boolean availability of window.sessionStorage. Near-universally true; moves only under specific privacy configurations. Contradiction-detection value only."),
758
+ denoise: { kind: "none" },
759
+ mode: "open",
760
+ plane: "platform",
761
+ group: "storage",
762
+ u: null,
763
+ supersedes: null,
764
+ description: "Whether window.sessionStorage is available.",
765
+ review: compliantReview()
766
+ },
767
+ {
768
+ id: "platform.localStorage",
769
+ addedVersion: "v1",
770
+ removedVersion: null,
771
+ tier: "low",
772
+ measurement: provisional("Boolean availability of window.localStorage. Near-universally true; moves only under specific privacy configurations. Contradiction-detection value only."),
773
+ denoise: { kind: "none" },
774
+ mode: "open",
775
+ plane: "platform",
776
+ group: "storage",
777
+ u: null,
778
+ supersedes: null,
779
+ description: "Whether window.localStorage is available.",
780
+ review: compliantReview()
781
+ },
782
+ {
783
+ id: "platform.indexedDB",
784
+ addedVersion: "v1",
785
+ removedVersion: null,
786
+ tier: "low",
787
+ measurement: provisional("Boolean availability of window.indexedDB (undefined on IE/Edge in private mode by design, per upstream source comment). Near-universally true elsewhere. Contradiction-detection value only."),
788
+ denoise: { kind: "none" },
789
+ mode: "open",
790
+ plane: "platform",
791
+ group: "storage",
792
+ u: null,
793
+ supersedes: null,
794
+ description: "Whether window.indexedDB is available.",
795
+ review: compliantReview()
796
+ },
797
+ {
798
+ id: "platform.navigatorPlatform",
799
+ addedVersion: "v1",
800
+ removedVersion: null,
801
+ tier: "low",
802
+ measurement: provisional("navigator.platform (with the iPad/iPhone WebKit correction upstream applies). Shared by every user of a given OS+browser-mode combination, so low uniqueness alone."),
803
+ denoise: { kind: "none" },
804
+ mode: "open",
805
+ plane: "platform",
806
+ group: "identity",
807
+ u: null,
808
+ supersedes: null,
809
+ description: "Reported navigator.platform, WebKit iPad/iPhone-corrected.",
810
+ review: compliantReview()
811
+ },
812
+ {
813
+ id: "platform.touchSupport",
814
+ addedVersion: "v1",
815
+ removedVersion: null,
816
+ tier: "medium",
817
+ measurement: provisional("maxTouchPoints + TouchEvent/ontouchstart feature detection. Stable per device and useful for separating phone/tablet from desktop form factors, but shared by every device of the same model."),
818
+ denoise: { kind: "none" },
819
+ mode: "open",
820
+ plane: "platform",
821
+ group: "hardware",
822
+ u: null,
823
+ supersedes: null,
824
+ description: "maxTouchPoints plus TouchEvent/ontouchstart availability.",
825
+ review: compliantReview()
826
+ },
827
+ {
828
+ id: "platform.vendor",
829
+ addedVersion: "v1",
830
+ removedVersion: null,
831
+ tier: "low",
832
+ measurement: provisional("navigator.vendor. A handful of possible values shared by huge populations (e.g. every Chromium user reads \"Google Inc.\"). Contradiction-detection value only."),
833
+ denoise: { kind: "none" },
834
+ mode: "open",
835
+ plane: "platform",
836
+ group: "identity",
837
+ u: null,
838
+ supersedes: null,
839
+ description: "Reported navigator.vendor.",
840
+ review: compliantReview()
841
+ },
842
+ {
843
+ id: "platform.vendorFlavors",
844
+ addedVersion: "v1",
845
+ removedVersion: null,
846
+ tier: "low",
847
+ measurement: provisional("Presence of browser-specific (not engine-specific) global variables (e.g. window.chrome, window.__firefox__). Distinguishes browser flavor within an engine family; still shared by every install of that browser."),
848
+ denoise: { kind: "none" },
849
+ mode: "open",
850
+ plane: "platform",
851
+ group: "identity",
852
+ u: null,
853
+ supersedes: null,
854
+ description: "Sorted list of detected browser-specific global variable names.",
855
+ review: compliantReview()
856
+ },
857
+ {
858
+ id: "platform.cookiesEnabled",
859
+ addedVersion: "v1",
860
+ removedVersion: null,
861
+ tier: "low",
862
+ measurement: provisional("Live cookie-write/read probe. Near-universally true; moves whenever the user or a privacy extension blocks cookies, a trivial, legitimate action. Contradiction-detection value only."),
863
+ denoise: { kind: "none" },
864
+ mode: "open",
865
+ plane: "platform",
866
+ group: "storage",
867
+ u: null,
868
+ supersedes: null,
869
+ description: "Whether a test cookie can be written and read back.",
870
+ review: compliantReview()
871
+ },
872
+ {
873
+ id: "platform.colorGamut",
874
+ addedVersion: "v1",
875
+ removedVersion: null,
876
+ tier: "medium",
877
+ measurement: provisional("CSS color-gamut media-feature probe (srgb/p3/rec2020). Reflects the physical display panel, stable until an external-monitor change."),
878
+ denoise: { kind: "none" },
879
+ mode: "open",
880
+ plane: "platform",
881
+ group: "display",
882
+ u: null,
883
+ supersedes: null,
884
+ description: "Widest supported color gamut per the CSS color-gamut media feature.",
885
+ review: compliantReview()
886
+ },
887
+ {
888
+ id: "platform.invertedColors",
889
+ addedVersion: "v1",
890
+ removedVersion: null,
891
+ tier: "low",
892
+ measurement: provisional("CSS inverted-colors media-feature probe: an OS-level accessibility preference, not a display capability. Consent-gated like platform.permissions, since it can correlate with a vision-related accessibility need, so it is collected for contradiction detection only and weighted near zero for identity."),
893
+ denoise: { kind: "none" },
894
+ mode: "consent",
895
+ plane: "platform",
896
+ group: "display",
897
+ u: null,
898
+ supersedes: null,
899
+ description: "Whether the OS-level \"invert colors\" accessibility preference is active.",
900
+ review: compliantReview()
901
+ },
902
+ {
903
+ id: "platform.forcedColors",
904
+ addedVersion: "v1",
905
+ removedVersion: null,
906
+ tier: "low",
907
+ measurement: provisional("CSS forced-colors media-feature probe: an OS-level accessibility preference (Windows High Contrast and similar). Consent-gated for the same reason as platform.invertedColors."),
908
+ denoise: { kind: "none" },
909
+ mode: "consent",
910
+ plane: "platform",
911
+ group: "display",
912
+ u: null,
913
+ supersedes: null,
914
+ description: "Whether an OS-level forced-colors accessibility mode is active.",
915
+ review: compliantReview()
916
+ },
917
+ {
918
+ id: "platform.monochrome",
919
+ addedVersion: "v1",
920
+ removedVersion: null,
921
+ tier: "low",
922
+ measurement: provisional("CSS monochrome media-feature probe (bits per pixel on a non-color/e-ink-style display, or 0). Reflects display hardware, not a user preference, unlike the accessibility-preference probes above."),
923
+ denoise: { kind: "none" },
924
+ mode: "open",
925
+ plane: "platform",
926
+ group: "display",
927
+ u: null,
928
+ supersedes: null,
929
+ description: "Monochrome display bit depth per the CSS monochrome media feature, or undefined if unsupported.",
930
+ review: compliantReview()
931
+ },
932
+ {
933
+ id: "platform.contrast",
934
+ addedVersion: "v1",
935
+ removedVersion: null,
936
+ tier: "low",
937
+ measurement: provisional("CSS prefers-contrast media-feature probe: an OS-level accessibility preference. Consent-gated for the same reason as platform.invertedColors/platform.forcedColors."),
938
+ denoise: { kind: "none" },
939
+ mode: "consent",
940
+ plane: "platform",
941
+ group: "display",
942
+ u: null,
943
+ supersedes: null,
944
+ description: "OS-level contrast preference per the CSS prefers-contrast media feature.",
945
+ review: compliantReview()
946
+ },
947
+ {
948
+ id: "platform.reducedMotion",
949
+ addedVersion: "v1",
950
+ removedVersion: null,
951
+ tier: "low",
952
+ measurement: provisional("CSS prefers-reduced-motion media-feature probe: an OS-level accessibility preference that can correlate with a vestibular-disorder accommodation. Consent-gated, contradiction-detection only."),
953
+ denoise: { kind: "none" },
954
+ mode: "consent",
955
+ plane: "platform",
956
+ group: "display",
957
+ u: null,
958
+ supersedes: null,
959
+ description: "Whether the OS-level \"reduce motion\" accessibility preference is active.",
960
+ review: compliantReview()
961
+ },
962
+ {
963
+ id: "platform.reducedTransparency",
964
+ addedVersion: "v1",
965
+ removedVersion: null,
966
+ tier: "low",
967
+ measurement: provisional("CSS prefers-reduced-transparency media-feature probe: an OS-level accessibility preference. Consent-gated for the same reason as platform.reducedMotion."),
968
+ denoise: { kind: "none" },
969
+ mode: "consent",
970
+ plane: "platform",
971
+ group: "display",
972
+ u: null,
973
+ supersedes: null,
974
+ description: "Whether the OS-level \"reduce transparency\" accessibility preference is active.",
975
+ review: compliantReview()
976
+ },
977
+ {
978
+ id: "platform.hdr",
979
+ addedVersion: "v1",
980
+ removedVersion: null,
981
+ tier: "medium",
982
+ measurement: provisional("CSS dynamic-range media-feature probe (high vs standard). Reflects display hardware capability, stable until an external-monitor change."),
983
+ denoise: { kind: "none" },
984
+ mode: "open",
985
+ plane: "platform",
986
+ group: "display",
987
+ u: null,
988
+ supersedes: null,
989
+ description: "Whether the display supports high dynamic range per the CSS dynamic-range media feature.",
990
+ review: compliantReview()
991
+ },
992
+ {
993
+ id: "platform.pdfViewerEnabled",
994
+ addedVersion: "v1",
995
+ removedVersion: null,
996
+ tier: "low",
997
+ measurement: provisional("navigator.pdfViewerEnabled, Chromium-only. Near-constant true across recent Chromium installs. Contradiction-detection value only."),
998
+ denoise: { kind: "none" },
999
+ mode: "open",
1000
+ plane: "platform",
1001
+ group: "capabilities",
1002
+ u: null,
1003
+ supersedes: null,
1004
+ description: "Reported navigator.pdfViewerEnabled.",
1005
+ review: compliantReview()
1006
+ },
1007
+ {
1008
+ id: "platform.architecture",
1009
+ addedVersion: "v1",
1010
+ removedVersion: null,
1011
+ tier: "high",
1012
+ measurement: provisional("Distinguishes x86/x86-64 from other CPU architectures via IEEE 754 NaN sign-bit behaviour on infinity subtraction. Depends on CPU architecture only, effectively device-constant like hardwareConcurrency/deviceMemory."),
1013
+ denoise: { kind: "none" },
1014
+ mode: "open",
1015
+ plane: "platform",
1016
+ group: "hardware",
1017
+ u: null,
1018
+ supersedes: null,
1019
+ description: "Single byte distinguishing CPU architecture via a floating-point NaN sign-bit probe.",
1020
+ review: compliantReview()
1021
+ },
1022
+ {
1023
+ id: "platform.applePay",
1024
+ addedVersion: "v1",
1025
+ removedVersion: null,
1026
+ tier: "low",
1027
+ measurement: provisional("ApplePaySession.canMakePayments() state, Safari-only. Depends on device wallet configuration, which can change independently of the fingerprint; mostly useful for Safari-family detection."),
1028
+ denoise: { kind: "none" },
1029
+ mode: "open",
1030
+ plane: "platform",
1031
+ group: "capabilities",
1032
+ u: null,
1033
+ supersedes: null,
1034
+ description: "Apple Pay availability/enabled state (Safari only).",
1035
+ review: compliantReview()
1036
+ },
1037
+ {
1038
+ id: "platform.privateClickMeasurement",
1039
+ addedVersion: "v1",
1040
+ removedVersion: null,
1041
+ tier: "low",
1042
+ measurement: provisional("Presence of Safari's Privacy-Preserving Ad Measurement attribution-source attribute. Safari-only, mostly stable across recent versions."),
1043
+ denoise: { kind: "none" },
1044
+ mode: "open",
1045
+ plane: "platform",
1046
+ group: "capabilities",
1047
+ u: null,
1048
+ supersedes: null,
1049
+ description: "Whether Safari's private click measurement attribution attribute is present.",
1050
+ review: compliantReview()
1051
+ },
1052
+ {
1053
+ id: "rendering.audioBaseLatency",
1054
+ addedVersion: "v1",
1055
+ removedVersion: null,
1056
+ tier: "medium",
1057
+ measurement: provisional("AudioContext.baseLatency, a scalar tied to the audio hardware/OS audio stack. Distinct collection mechanism from audio.digest (no oscillator rendering, no shared context), so this does not duplicate that signal."),
1058
+ denoise: { kind: "none" },
1059
+ mode: "open",
1060
+ plane: "rendering",
1061
+ group: "audio",
1062
+ u: null,
1063
+ supersedes: null,
1064
+ description: "Reported AudioContext.baseLatency, or a negative status code when unsupported/disabled.",
1065
+ review: compliantReview()
1066
+ },
1067
+ {
1068
+ id: "platform.dateTimeLocale",
1069
+ addedVersion: "v1",
1070
+ removedVersion: null,
1071
+ tier: "medium",
1072
+ measurement: provisional("Intl.DateTimeFormat().resolvedOptions().locale. Stable per device/user but trivially user-configurable, same rationale as platform.timezone/platform.languages."),
1073
+ denoise: { kind: "none" },
1074
+ mode: "open",
1075
+ plane: "platform",
1076
+ group: "locale",
1077
+ u: null,
1078
+ supersedes: null,
1079
+ description: "Intl-resolved locale string, or a negative status code when unsupported.",
1080
+ review: compliantReview()
1081
+ },
1082
+ {
1083
+ id: "transport.webrtcCodecs",
1084
+ addedVersion: "v1",
1085
+ removedVersion: null,
1086
+ tier: "medium",
1087
+ measurement: provisional("RTP header extensions and per-codec (rtpmap/fmtp/rtcp-fb) descriptors parsed from a locally-generated SDP offer. Determined by the WebRTC engine build and codec licensing bundled with a given browser version; stable within a browser version, moves on browser updates that add/remove codec or extension support (e.g. AV1/VP9 profile rollout). Collection never gathers a real ICE candidate: setLocalDescription is never called AND iceCandidatePoolSize is 0, so neither of the two ways gathering can start ever fires (see webrtc.ts)."),
1088
+ denoise: { kind: "none" },
1089
+ mode: "consent",
1090
+ plane: "transport",
1091
+ group: "webrtc",
1092
+ u: null,
1093
+ supersedes: null,
1094
+ description: "Counts and digests of RTP extensions (extmap) and per-codec descriptors (rtpmap/fmtp/rtcp-fb) for audio and video, parsed from a locally-generated SDP offer.",
1095
+ review: compliantReview()
1096
+ },
1097
+ {
1098
+ id: "platform.speechVoices",
1099
+ addedVersion: "v1",
1100
+ removedVersion: null,
1101
+ tier: "medium",
1102
+ measurement: provisional("speechSynthesis.getVoices() reduced to voiceURI/name/lang/localService/default per voice, sorted, then hashed. Tied to the OS/browser installed voice set: stable per device, moves when the OS installs a language pack or a browser update changes its bundled voice list. No modal() de-noising applies (voice enumeration is not farbled/randomized per call the way canvas/WebGL/audio reads are) — the observed timing nondeterminism is handled by the collector's voiceschanged/timeout race, not by resampling."),
1103
+ denoise: { kind: "none" },
1104
+ mode: "consent",
1105
+ plane: "platform",
1106
+ group: "capabilities",
1107
+ u: null,
1108
+ supersedes: null,
1109
+ description: "Voice count and a digest of the sorted, normalized speechSynthesis voice list.",
1110
+ review: compliantReview()
1111
+ },
1112
+ {
1113
+ id: "platform.mediaQuerySweep",
1114
+ addedVersion: "v1",
1115
+ removedVersion: "v2",
1116
+ tier: "medium",
1117
+ measurement: provisional("Systematic sweep of every legal value across 11 CSS media-query families (prefers-contrast, any-hover, any-pointer, pointer, hover, update, inverted-colors, prefers-reduced-motion, prefers-reduced-transparency, scripting, forced-colors). Mostly OS/input-hardware driven and stable per device, but a few families (hover/pointer/any-hover/any-pointer) can move on a trivial user action such as docking a touch device to a mouse, capping this at medium rather than high pending real measurement. Deliberately overlaps 5 already-registered vendored-FingerprintJS signals (platform.contrast, platform.invertedColors, platform.reducedMotion, platform.reducedTransparency, platform.forcedColors) as a cross-validation check, not a duplication bug — see media-queries.ts."),
1118
+ denoise: { kind: "none" },
1119
+ mode: "consent",
1120
+ plane: "platform",
1121
+ group: "display",
1122
+ u: null,
1123
+ supersedes: null,
1124
+ description: "Per-family matched value across 11 media-query families (family absent from the result when unsupported, never a false/placeholder value), plus a family count and a digest. Forked to platform.mediaQuerySweep.v2, which narrows this to 6 families: combining the 5 accessibility-preference families into this one derived feature trips the accessibility-preference-composite Sensitive Data Inference composition rule (see sensitive-attributes.ts) — a disability/health-accommodation inference risk, per P44. Collector-only; never wired into scoring, transport, or the identity graph at any point in this signal's v1 lifetime, so no stored device data exists to preserve compatibility with (Cursor Bugbot, PR #4639) — forked anyway, per this file's \"never edited, only forked\" discipline.",
1125
+ review: compliantReview()
1126
+ },
1127
+ {
1128
+ id: "platform.mediaQuerySweep.v2",
1129
+ addedVersion: "v2",
1130
+ removedVersion: null,
1131
+ tier: "medium",
1132
+ measurement: provisional("Systematic sweep of every legal value across 6 CSS media-query families (any-hover, any-pointer, pointer, hover, update, scripting) — none of which any existing collector reads. Mostly OS/input-hardware driven and stable per device, but a few families (hover/pointer/any-hover/any-pointer) can move on a trivial user action such as docking a touch device to a mouse, capping this at medium rather than high pending real measurement. Forked from platform.mediaQuerySweep (v1) to EXCLUDE the 5 media-query families already registered as their own accessibility-preference signals (platform.contrast, platform.invertedColors, platform.reducedMotion, platform.reducedTransparency, platform.forcedColors): combining 2+ of those into one derived feature trips the accessibility-preference-composite Sensitive Data Inference composition rule (see sensitive-attributes.ts) — a disability/health-accommodation inference risk, per P44. See media-queries.ts's module doc."),
1133
+ denoise: { kind: "none" },
1134
+ mode: "consent",
1135
+ plane: "platform",
1136
+ group: "display",
1137
+ u: null,
1138
+ supersedes: "platform.mediaQuerySweep",
1139
+ description: "Per-family matched value across 6 media-query families with no existing collector (family absent from the result when unsupported, never a false/placeholder value), plus a family count and a digest. Excludes the 5 families already covered by their own registered accessibility-preference signals — see measurement notes.",
1140
+ review: compliantReview()
1141
+ },
1142
+ {
1143
+ id: "platform.clientHints.architecture",
1144
+ addedVersion: "v1",
1145
+ removedVersion: null,
1146
+ tier: "low",
1147
+ measurement: provisional("UA-CH high-entropy `architecture` hint (e.g. 'arm', 'x86'). Requested independently of platform.userAgentData's copy of the same hint, specifically so it can feed User-Agent/Client-Hints contradiction detection rather than identity linkage."),
1148
+ denoise: { kind: "none" },
1149
+ mode: "never",
1150
+ plane: "platform",
1151
+ group: "clientHints",
1152
+ u: null,
1153
+ supersedes: null,
1154
+ description: "UA-CH high-entropy CPU architecture hint.",
1155
+ review: compliantReview()
1156
+ },
1157
+ {
1158
+ id: "platform.clientHints.bitness",
1159
+ addedVersion: "v1",
1160
+ removedVersion: null,
1161
+ tier: "low",
1162
+ measurement: provisional("UA-CH high-entropy `bitness` hint (e.g. '64'). Collected for contradiction detection only; see platform.clientHints.architecture."),
1163
+ denoise: { kind: "none" },
1164
+ mode: "never",
1165
+ plane: "platform",
1166
+ group: "clientHints",
1167
+ u: null,
1168
+ supersedes: null,
1169
+ description: "UA-CH high-entropy CPU bitness hint.",
1170
+ review: compliantReview()
1171
+ },
1172
+ {
1173
+ id: "platform.clientHints.model",
1174
+ addedVersion: "v1",
1175
+ removedVersion: null,
1176
+ tier: "low",
1177
+ measurement: provisional("UA-CH high-entropy `model` hint. Empty string on desktop; device model on mobile. Collected for contradiction detection only; see platform.clientHints.architecture."),
1178
+ denoise: { kind: "none" },
1179
+ mode: "never",
1180
+ plane: "platform",
1181
+ group: "clientHints",
1182
+ u: null,
1183
+ supersedes: null,
1184
+ description: "UA-CH high-entropy device model hint.",
1185
+ review: compliantReview()
1186
+ },
1187
+ {
1188
+ id: "platform.clientHints.platform",
1189
+ addedVersion: "v1",
1190
+ removedVersion: null,
1191
+ tier: "low",
1192
+ measurement: provisional("UA-CH low-entropy `platform` (e.g. 'Windows', 'macOS', 'Linux', 'Android', 'Chrome OS'), read synchronously off navigator.userAgentData rather than requested through getHighEntropyValues(). The half of this collector's output the platform contradiction check actually compares against the User-Agent string's platform."),
1193
+ denoise: { kind: "none" },
1194
+ mode: "never",
1195
+ plane: "platform",
1196
+ group: "clientHints",
1197
+ u: null,
1198
+ supersedes: null,
1199
+ description: "UA-CH low-entropy platform family string.",
1200
+ review: compliantReview()
1201
+ },
1202
+ {
1203
+ id: "platform.clientHints.platformVersion",
1204
+ addedVersion: "v1",
1205
+ removedVersion: null,
1206
+ tier: "low",
1207
+ measurement: provisional("UA-CH high-entropy `platformVersion` hint (OS version string). Collected for contradiction detection only; see platform.clientHints.architecture."),
1208
+ denoise: { kind: "none" },
1209
+ mode: "never",
1210
+ plane: "platform",
1211
+ group: "clientHints",
1212
+ u: null,
1213
+ supersedes: null,
1214
+ description: "UA-CH high-entropy OS version hint.",
1215
+ review: compliantReview()
1216
+ },
1217
+ {
1218
+ id: "platform.clientHints.uaFullVersion",
1219
+ addedVersion: "v1",
1220
+ removedVersion: null,
1221
+ tier: "low",
1222
+ measurement: provisional("UA-CH high-entropy `uaFullVersion` hint — deprecated upstream in favour of `fullVersionList`, but still requested here because a spoofing tool that patches the User-Agent string is more likely to miss this legacy field than the one it actually knows to fake."),
1223
+ denoise: { kind: "none" },
1224
+ mode: "never",
1225
+ plane: "platform",
1226
+ group: "clientHints",
1227
+ u: null,
1228
+ supersedes: null,
1229
+ description: "UA-CH high-entropy (deprecated) full browser version hint.",
1230
+ review: compliantReview()
1231
+ },
1232
+ {
1233
+ id: "platform.clientHints.fullVersionList",
1234
+ addedVersion: "v1",
1235
+ removedVersion: null,
1236
+ tier: "low",
1237
+ measurement: provisional("UA-CH high-entropy `fullVersionList` hint: brand/full-version pairs, GREASE entries filtered before this signal is ever populated (see the collector for the filter and why an unfiltered read would self-split on every request)."),
1238
+ denoise: { kind: "none" },
1239
+ mode: "never",
1240
+ plane: "platform",
1241
+ group: "clientHints",
1242
+ u: null,
1243
+ supersedes: null,
1244
+ description: "UA-CH high-entropy brand/full-version list, GREASE-filtered.",
1245
+ review: compliantReview()
1246
+ },
1247
+ {
1248
+ id: "platform.clientHints.wow64",
1249
+ addedVersion: "v1",
1250
+ removedVersion: null,
1251
+ tier: "low",
1252
+ measurement: provisional("UA-CH high-entropy `wow64` hint: whether a 32-bit browser is running under WOW64 on 64-bit Windows. Collected for contradiction detection only; see platform.clientHints.architecture."),
1253
+ denoise: { kind: "none" },
1254
+ mode: "never",
1255
+ plane: "platform",
1256
+ group: "clientHints",
1257
+ u: null,
1258
+ supersedes: null,
1259
+ description: "UA-CH high-entropy Windows WOW64 hint.",
1260
+ review: compliantReview()
1261
+ },
1262
+ {
1263
+ id: "platform.clientHints.mobile",
1264
+ addedVersion: "v1",
1265
+ removedVersion: null,
1266
+ tier: "low",
1267
+ measurement: provisional("UA-CH low-entropy `mobile` flag, read synchronously off navigator.userAgentData rather than requested through getHighEntropyValues(). Collected for contradiction detection only (e.g. against a desktop User-Agent string), not identity linkage."),
1268
+ denoise: { kind: "none" },
1269
+ mode: "never",
1270
+ plane: "platform",
1271
+ group: "clientHints",
1272
+ u: null,
1273
+ supersedes: null,
1274
+ description: "UA-CH low-entropy mobile-device flag.",
1275
+ review: compliantReview()
1276
+ },
1277
+ ...interactionSignals()
1290
1278
  ];
1291
1279
 
1292
- // src/signals/resolve.ts
1293
- function versionIndex(version) {
1294
- return REGISTRY_VERSIONS.indexOf(version);
1280
+ //#endregion
1281
+ //#region src/signals/resolve.ts
1282
+ function versionIndex$1(version) {
1283
+ return REGISTRY_VERSIONS.indexOf(version);
1295
1284
  }
1296
1285
  function isActiveAt(signal, version) {
1297
- const at = versionIndex(version);
1298
- const added = versionIndex(signal.addedVersion);
1299
- const removed = signal.removedVersion === null ? Infinity : versionIndex(signal.removedVersion);
1300
- return added <= at && at < removed;
1286
+ const at = versionIndex$1(version);
1287
+ const added = versionIndex$1(signal.addedVersion);
1288
+ const removed = signal.removedVersion === null ? Infinity : versionIndex$1(signal.removedVersion);
1289
+ return added <= at && at < removed;
1301
1290
  }
1291
+ /**
1292
+ * The signal set active at a given registry version. This is what
1293
+ * recomputation of a stored fingerprint MUST call, keyed off the
1294
+ * `registryVersion` pinned on that fingerprint — never the live
1295
+ * `SIGNAL_REGISTRY` — or historical records silently stop matching once the
1296
+ * registry moves on.
1297
+ *
1298
+ * Throws on a version outside `REGISTRY_VERSIONS` rather than silently
1299
+ * resolving to an empty signal set. A stored `registry_version` reaching
1300
+ * here unrecognized (corrupted, truncated, never valid) is exactly the
1301
+ * "historical records silently stop matching" failure this module exists
1302
+ * to prevent — better to fail loud than to hand recomputation zero signals.
1303
+ */
1302
1304
  function resolveSignalsAt(registry, version = CURRENT_REGISTRY_VERSION) {
1303
- if (!REGISTRY_VERSIONS.includes(version)) {
1304
- throw new Error(
1305
- `Unrecognized registry version "${version}". Known versions: ${REGISTRY_VERSIONS.join(", ")}.`
1306
- );
1307
- }
1308
- return registry.filter((signal) => isActiveAt(signal, version));
1305
+ if (!REGISTRY_VERSIONS.includes(version)) throw new Error(`Unrecognized registry version "${version}". Known versions: ${REGISTRY_VERSIONS.join(", ")}.`);
1306
+ return registry.filter((signal) => isActiveAt(signal, version));
1309
1307
  }
1310
1308
  function getSignal(registry, id, version = CURRENT_REGISTRY_VERSION) {
1311
- return resolveSignalsAt(registry, version).find((signal) => signal.id === id);
1309
+ return resolveSignalsAt(registry, version).find((signal) => signal.id === id);
1312
1310
  }
1311
+ /** Every signal that has ever shipped, live or removed — for docs and audits, not for resolving a fingerprint. */
1313
1312
  function listShippedSignals(registry) {
1314
- return [...registry].sort((a, b) => a.id.localeCompare(b.id));
1313
+ return [...registry].sort((a, b) => a.id.localeCompare(b.id));
1315
1314
  }
1315
+ /**
1316
+ * Buckets signals by plane then group, matching the shape a Merkle tree's
1317
+ * leaf grouping should mirror. This module doesn't build a tree — it just
1318
+ * makes the grouping a lookup rather than something re-derived by hand.
1319
+ */
1316
1320
  function groupSignals(signals) {
1317
- const grouped = {};
1318
- for (const signal of signals) {
1319
- const plane = grouped[signal.plane] ??= {};
1320
- (plane[signal.group] ??= []).push(signal);
1321
- }
1322
- return grouped;
1321
+ const grouped = {};
1322
+ for (const signal of signals) {
1323
+ const plane = grouped[signal.plane] ??= {};
1324
+ (plane[signal.group] ??= []).push(signal);
1325
+ }
1326
+ return grouped;
1323
1327
  }
1324
1328
 
1325
- // ../../node_modules/.pnpm/canonicalize@3.0.0/node_modules/canonicalize/lib/canonicalize.js
1329
+ //#endregion
1330
+ //#region ../../node_modules/.pnpm/canonicalize@3.0.0/node_modules/canonicalize/lib/canonicalize.js
1326
1331
  function canonicalize(object, seen = /* @__PURE__ */ new Set()) {
1327
- if (typeof object === "number" && isNaN(object)) {
1328
- throw new Error("NaN is not allowed");
1329
- }
1330
- if (typeof object === "number" && !isFinite(object)) {
1331
- throw new Error("Infinity is not allowed");
1332
- }
1333
- if (object === null || typeof object !== "object") {
1334
- return JSON.stringify(object);
1335
- }
1336
- if (typeof object.toJSON === "function") {
1337
- if (seen.has(object)) {
1338
- throw new Error("Circular reference detected");
1339
- }
1340
- seen.add(object);
1341
- const result2 = canonicalize(object.toJSON(), seen);
1342
- seen.delete(object);
1343
- return result2;
1344
- }
1345
- if (seen.has(object)) {
1346
- throw new Error("Circular reference detected");
1347
- }
1348
- seen.add(object);
1349
- let result;
1350
- if (Array.isArray(object)) {
1351
- const values = object.map((cv) => {
1352
- const value = cv === void 0 || typeof cv === "symbol" ? null : cv;
1353
- return canonicalize(value, seen);
1354
- });
1355
- result = `[${values.join(",")}]`;
1356
- } else {
1357
- const parts = [];
1358
- for (const key of Object.keys(object).sort()) {
1359
- if (object[key] === void 0 || typeof object[key] === "symbol") {
1360
- continue;
1361
- }
1362
- parts.push(`${canonicalize(key)}:${canonicalize(object[key], seen)}`);
1363
- }
1364
- result = `{${parts.join(",")}}`;
1365
- }
1366
- seen.delete(object);
1367
- return result;
1332
+ if (typeof object === "number" && isNaN(object)) throw new Error("NaN is not allowed");
1333
+ if (typeof object === "number" && !isFinite(object)) throw new Error("Infinity is not allowed");
1334
+ if (object === null || typeof object !== "object") return JSON.stringify(object);
1335
+ if (typeof object.toJSON === "function") {
1336
+ if (seen.has(object)) throw new Error("Circular reference detected");
1337
+ seen.add(object);
1338
+ const result = canonicalize(object.toJSON(), seen);
1339
+ seen.delete(object);
1340
+ return result;
1341
+ }
1342
+ if (seen.has(object)) throw new Error("Circular reference detected");
1343
+ seen.add(object);
1344
+ let result;
1345
+ if (Array.isArray(object)) result = `[${object.map((cv) => {
1346
+ return canonicalize(cv === void 0 || typeof cv === "symbol" ? null : cv, seen);
1347
+ }).join(",")}]`;
1348
+ else {
1349
+ const parts = [];
1350
+ for (const key of Object.keys(object).sort()) {
1351
+ if (object[key] === void 0 || typeof object[key] === "symbol") continue;
1352
+ parts.push(`${canonicalize(key)}:${canonicalize(object[key], seen)}`);
1353
+ }
1354
+ result = `{${parts.join(",")}}`;
1355
+ }
1356
+ seen.delete(object);
1357
+ return result;
1368
1358
  }
1369
1359
 
1370
- // src/signals/merkle.ts
1371
- var EXCLUDED_FROM_ROOT = /* @__PURE__ */ new Set(["behavioural"]);
1372
- var TAG_PRESENT = "v:";
1373
- var TAG_ABSENT = "a:";
1374
- var TAG_ERROR = "e:";
1360
+ //#endregion
1361
+ //#region src/signals/merkle.ts
1362
+ /**
1363
+ * Merkle-tree fingerprint calculator (P8).
1364
+ *
1365
+ * Replaces a flat, single-digest fingerprint with a tree: one leaf digest
1366
+ * per signal, rolled up into a digest per group, rolled up into a digest
1367
+ * per plane, rolled up into a root. Every level is independently exposed
1368
+ * on the returned `FingerprintTree`, so "what changed" is answerable by
1369
+ * diffing sub-digests instead of staring at two unrelated flat hashes — a
1370
+ * GPU driver update shifts `planes.rendering` and leaves `planes.platform`
1371
+ * untouched; a different physical machine shifts nearly everything.
1372
+ *
1373
+ * Ported from fingerprintjs-ios's `FingerprintTreeCalculator` (MIT):
1374
+ * leaf = SHA256(value), node = SHA256(concat of children's hex digests).
1375
+ * This module adds the present/absent/error leaf-encoding contract that
1376
+ * upstream doesn't need — a native iOS read doesn't get silently blocked
1377
+ * the way a privacy browser blocks a web API.
1378
+ *
1379
+ * Grouping: this module does NOT invent a new taxonomy. `plane`/`group`
1380
+ * come straight from the signal registry (#4257) — `FROZEN_FIELDS` in
1381
+ * `./types.ts` already locks them once a signal ships, so the grouping
1382
+ * used here IS the registry's grouping, not a parallel one re-derived by
1383
+ * hand. See the P8 PR description for the plane/group semantics ratified
1384
+ * in review.
1385
+ *
1386
+ * Scope: hashing and storage only (P8). Nothing here consumes a
1387
+ * sub-fingerprint for scoring or linkage — that's P21/P31.
1388
+ */
1389
+ /**
1390
+ * Planes excluded from the identity root.
1391
+ *
1392
+ * Behavioural signals (interaction dynamics) change by design on every
1393
+ * session — folding them into the root would make the identity root drift
1394
+ * constantly rather than only on a genuine device change, defeating the
1395
+ * entire point of a stable device identifier. The behavioural subtree is
1396
+ * still computed and exposed on `planes.behavioural` for classification
1397
+ * use downstream; it just never feeds `root`.
1398
+ */
1399
+ const EXCLUDED_FROM_ROOT = /* @__PURE__ */ new Set(["behavioural"]);
1400
+ const TAG_PRESENT = "v:";
1401
+ const TAG_ABSENT = "a:";
1402
+ const TAG_ERROR = "e:";
1375
1403
  function digestHex(bytes) {
1376
- return utils_js.bytesToHex(sha2_js.sha256(bytes));
1404
+ return (0, _noble_hashes_utils_js.bytesToHex)((0, _noble_hashes_sha2_js.sha256)(bytes));
1377
1405
  }
1406
+ /**
1407
+ * Encodes one reading into the bytes that get hashed for its leaf. Every
1408
+ * branch is tag-prefixed with a byte sequence no other branch can ever
1409
+ * produce, so absent/error/present-with-any-value never collide.
1410
+ */
1378
1411
  function leafBytes(reading) {
1379
- if (reading === void 0 || reading.kind === "absent") {
1380
- return new TextEncoder().encode(TAG_ABSENT);
1381
- }
1382
- if (reading.kind === "error") {
1383
- return new TextEncoder().encode(`${TAG_ERROR}error`);
1384
- }
1385
- if (reading.value === void 0) {
1386
- throw new Error(
1387
- 'buildFingerprintTree: a "present" reading with value `undefined` is not a valid leaf \u2014 use { kind: "absent" } instead.'
1388
- );
1389
- }
1390
- const json = canonicalize(reading.value);
1391
- if (json === void 0) {
1392
- throw new Error(
1393
- "buildFingerprintTree: reading value is not JSON-serializable (function, symbol, etc)."
1394
- );
1395
- }
1396
- return new TextEncoder().encode(`${TAG_PRESENT}${json}`);
1412
+ if (reading === void 0 || reading.kind === "absent") return new TextEncoder().encode(TAG_ABSENT);
1413
+ if (reading.kind === "error") return new TextEncoder().encode(`${TAG_ERROR}error`);
1414
+ if (reading.value === void 0) throw new Error("buildFingerprintTree: a \"present\" reading with value `undefined` is not a valid leaf — use { kind: \"absent\" } instead.");
1415
+ const json = canonicalize(reading.value);
1416
+ if (json === void 0) throw new Error("buildFingerprintTree: reading value is not JSON-serializable (function, symbol, etc).");
1417
+ return new TextEncoder().encode(`${TAG_PRESENT}${json}`);
1397
1418
  }
1419
+ /**
1420
+ * Node digest = SHA256(concat of children's hex digests). Children MUST
1421
+ * already be in a caller-determined, key-sorted order — this function
1422
+ * does not re-sort, so ordering invariance is guaranteed by always
1423
+ * deriving the child list from the registry's sorted keys rather than
1424
+ * from a caller-supplied map's iteration order.
1425
+ */
1398
1426
  function nodeDigest(orderedChildDigests) {
1399
- return digestHex(new TextEncoder().encode(orderedChildDigests.join("")));
1427
+ return digestHex(new TextEncoder().encode(orderedChildDigests.join("")));
1400
1428
  }
1429
+ /**
1430
+ * Builds the Merkle fingerprint tree for one collection: a leaf per live
1431
+ * signal (present/absent/error), rolled up by group, rolled up by plane,
1432
+ * rolled up into a root that excludes `behavioural`.
1433
+ *
1434
+ * `readings` is keyed by signal id (`SignalDefinition.id`). A signal id
1435
+ * with no key at all is treated identically to an explicit
1436
+ * `{ kind: 'absent' }` reading.
1437
+ *
1438
+ * Pure and deterministic: the same `(registry, readings, registryVersion)`
1439
+ * always produces the same tree, regardless of `readings`' key order or
1440
+ * `registry`'s element order — every level is rebuilt from the registry's
1441
+ * own sorted `id`/`group`/`plane` keys, never from a caller's map
1442
+ * iteration order. `registryVersion` MUST be the version pinned on the
1443
+ * stored fingerprint when recomputing a historical tree; resolving
1444
+ * against "current" would silently produce a different tree once the
1445
+ * registry moves on (see `resolveSignalsAt`).
1446
+ */
1401
1447
  function buildFingerprintTree(registry, readings, registryVersion = CURRENT_REGISTRY_VERSION) {
1402
- const grouped = groupSignals(resolveSignalsAt(registry, registryVersion));
1403
- const planes = {};
1404
- const rootInputs = [];
1405
- for (const plane of Object.keys(grouped).sort()) {
1406
- const groupsForPlane = grouped[plane];
1407
- const groups = {};
1408
- const groupDigests = [];
1409
- for (const groupName of Object.keys(groupsForPlane).sort()) {
1410
- const signalsInGroup = [...groupsForPlane[groupName]].sort(
1411
- (a, b) => a.id.localeCompare(b.id)
1412
- );
1413
- const leaves = {};
1414
- const leafDigests = [];
1415
- for (const signal of signalsInGroup) {
1416
- const digest = digestHex(leafBytes(readings[signal.id]));
1417
- leaves[signal.id] = digest;
1418
- leafDigests.push(digest);
1419
- }
1420
- const groupDigest = nodeDigest(leafDigests);
1421
- groups[groupName] = { digest: groupDigest, leaves };
1422
- groupDigests.push(groupDigest);
1423
- }
1424
- const planeDigest = nodeDigest(groupDigests);
1425
- const includedInRoot = !EXCLUDED_FROM_ROOT.has(plane);
1426
- planes[plane] = { digest: planeDigest, includedInRoot, groups };
1427
- if (includedInRoot) rootInputs.push(planeDigest);
1428
- }
1429
- return {
1430
- registryVersion,
1431
- root: nodeDigest(rootInputs),
1432
- planes
1433
- };
1448
+ const grouped = groupSignals(resolveSignalsAt(registry, registryVersion));
1449
+ const planes = {};
1450
+ const rootInputs = [];
1451
+ for (const plane of Object.keys(grouped).sort()) {
1452
+ const groupsForPlane = grouped[plane];
1453
+ const groups = {};
1454
+ const groupDigests = [];
1455
+ for (const groupName of Object.keys(groupsForPlane).sort()) {
1456
+ const signalsInGroup = [...groupsForPlane[groupName]].sort((a, b) => a.id.localeCompare(b.id));
1457
+ const leaves = {};
1458
+ const leafDigests = [];
1459
+ for (const signal of signalsInGroup) {
1460
+ const digest = digestHex(leafBytes(readings[signal.id]));
1461
+ leaves[signal.id] = digest;
1462
+ leafDigests.push(digest);
1463
+ }
1464
+ const groupDigest = nodeDigest(leafDigests);
1465
+ groups[groupName] = {
1466
+ digest: groupDigest,
1467
+ leaves
1468
+ };
1469
+ groupDigests.push(groupDigest);
1470
+ }
1471
+ const planeDigest = nodeDigest(groupDigests);
1472
+ const includedInRoot = !EXCLUDED_FROM_ROOT.has(plane);
1473
+ planes[plane] = {
1474
+ digest: planeDigest,
1475
+ includedInRoot,
1476
+ groups
1477
+ };
1478
+ if (includedInRoot) rootInputs.push(planeDigest);
1479
+ }
1480
+ return {
1481
+ registryVersion,
1482
+ root: nodeDigest(rootInputs),
1483
+ planes
1484
+ };
1434
1485
  }
1486
+
1487
+ //#endregion
1488
+ //#region src/signals/session-fingerprint-hash.ts
1489
+ /**
1490
+ * Session-level fingerprint hash (P33).
1491
+ *
1492
+ * `unified_agent_sessions.fingerprint_hash` has been declared since F-19
1493
+ * (migration 0124) — `visitor_id` is a STORED GENERATED column defined as
1494
+ * `COALESCE(user_account_id::text, 'unattributed:' || fingerprint_hash)` —
1495
+ * but nothing ever wrote it. Every anonymous visitor's `visitor_id`
1496
+ * therefore collapsed to the literal constant `'unattributed:'`, so a
1497
+ * COUNT(DISTINCT visitor_id) counted every anonymous visitor across an
1498
+ * entire org as ONE person. See
1499
+ * `docs/architecture/canonical-identity-model.md` (the `visitor_id`
1500
+ * correctness trap) for the full write-up.
1501
+ *
1502
+ * LIMITS (bestbrian, PR #4660): every input to this digest is
1503
+ * client-supplied via the pixel, so a hostile client can inflate or
1504
+ * collide anonymous visitor counts by varying or replaying its reported
1505
+ * attributes — this is inherent to any device-fingerprinting signal, not
1506
+ * specific to this implementation. It only affects the anonymous,
1507
+ * `'unattributed:'`-prefixed bucket: an authenticated `visitor_id` uses
1508
+ * `user_account_id` and never reaches this function, and the
1509
+ * `'unattributed:'` prefix keeps every fingerprinted visitor out of the
1510
+ * identity-merge graph. Treat anonymous visitor counts as estimate-grade
1511
+ * — strictly better than the prior all-collapse-to-one defect, not a
1512
+ * precise headcount.
1513
+ *
1514
+ * WHAT THIS COLUMN HOLDS (read this before changing the algorithm):
1515
+ *
1516
+ * This is a SHA-256 hex digest over the canonicalized (sorted-key, stable
1517
+ * JSON) map of `SignalsEnvelope.client.attributes` — the pixel-collected,
1518
+ * per-attribute entropy (device.platform, browser.language, screen
1519
+ * resolution, …) persisted verbatim on `detections.signals` by P6. It is
1520
+ * NOT the P8 Merkle-tree root (`buildFingerprintTree` in
1521
+ * `./merkle.ts`, `fingerprints.root`), even though P8 has landed: that
1522
+ * root is built from the formal signal REGISTRY (`./registry.ts`),
1523
+ * keyed by registered signal ids
1524
+ * (`canvas.geometry`, `platform.hardwareConcurrency`, …), and P8 itself
1525
+ * ships with zero callers that map a live collection onto those ids — that
1526
+ * mapping is explicitly out of scope for P8 (see its module doc: "nothing
1527
+ * here consumes a sub-fingerprint for scoring or linkage yet — P21/P31").
1528
+ * Inventing that mapping here, unreviewed, to force-fit `buildFingerprintTree`
1529
+ * would be worse than not using it: a registry-shaped root computed from a
1530
+ * fabricated id mapping is not actually comparable to a future REAL
1531
+ * registry-driven root, and callers would have no way to tell the
1532
+ * difference by looking at the column.
1533
+ *
1534
+ * What IS kept forward-compatible with P8, deliberately:
1535
+ * - Same primitive: SHA-256 hex, matching `merkle.ts`'s `digestHex`.
1536
+ * - Same exclusion principle: only IDENTITY-STABLE signals are hashed.
1537
+ * `SignalsEnvelope.behavioural` (mouse movements, scroll depth, time on
1538
+ * page) is a different axis from `client` and is never passed in here —
1539
+ * mirroring P8's own `EXCLUDED_FROM_ROOT` (`behavioural` is hashed for
1540
+ * classification but never rolled into the identity root), for the
1541
+ * same reason: behavioural signals churn every session by design, and
1542
+ * folding them in would make the "same device" hash drift on every
1543
+ * visit instead of only on a genuine device change.
1544
+ * - Same "no entropy → no hash" contract: `null` in, `null` out — this
1545
+ * function must NEVER fabricate a value for a session that carried no
1546
+ * signals. Downstream, `visitor_id` for such a session correctly stays
1547
+ * `'unattributed:'` (an honest bucket for genuinely-unknown visitors,
1548
+ * not a bug to paper over).
1549
+ *
1550
+ * When a real registry-attribute adapter exists (P21/P31), THIS function
1551
+ * should be retired in favor of `buildFingerprintTree(...).root`, and
1552
+ * `fingerprint_hash` should be repointed at it in one migration-free
1553
+ * application change (the column is `text`, so either shape fits) — do not
1554
+ * let the two representations coexist silently in the same column.
1555
+ */
1556
+ /**
1557
+ * @param clientAttributes Signal-attribute-name -> collected string value —
1558
+ * e.g. `SignalsEnvelope.client.attributes` with each `ClientSignalAttribute`
1559
+ * unwrapped to its `.value` by the caller (kept decoupled from
1560
+ * `@kya-os/checkpoint-wasm-runtime`'s engine types on purpose: that
1561
+ * package depends on checkpoint-shared, not the other way around).
1562
+ * `null`/`undefined`/`{}` all mean "no client entropy collected."
1563
+ * @returns A 64-char lowercase hex SHA-256 digest, or `null` when there is
1564
+ * nothing to hash. Never throws — a session with no entropy is a normal,
1565
+ * expected input, not an error.
1566
+ */
1435
1567
  function computeSessionFingerprintHash(clientAttributes) {
1436
- const names = Object.keys(clientAttributes ?? {});
1437
- if (names.length === 0) return null;
1438
- const sorted = {};
1439
- for (const name of names.sort()) sorted[name] = clientAttributes[name];
1440
- const json = canonicalize(sorted);
1441
- if (json === void 0) return null;
1442
- return utils_js.bytesToHex(sha2_js.sha256(new TextEncoder().encode(json)));
1568
+ const names = Object.keys(clientAttributes ?? {});
1569
+ if (names.length === 0) return null;
1570
+ const sorted = {};
1571
+ for (const name of names.sort()) sorted[name] = clientAttributes[name];
1572
+ const json = canonicalize(sorted);
1573
+ if (json === void 0) return null;
1574
+ return (0, _noble_hashes_utils_js.bytesToHex)((0, _noble_hashes_sha2_js.sha256)(new TextEncoder().encode(json)));
1443
1575
  }
1444
1576
 
1445
- // src/signals/validate.ts
1446
- var VALID_TIERS = ["high", "medium", "low"];
1447
- var VALID_MODES = ["open", "consent", "never"];
1448
- function versionIndex2(version) {
1449
- return REGISTRY_VERSIONS.indexOf(version);
1577
+ //#endregion
1578
+ //#region src/signals/validate.ts
1579
+ const VALID_TIERS = [
1580
+ "high",
1581
+ "medium",
1582
+ "low"
1583
+ ];
1584
+ const VALID_MODES = [
1585
+ "open",
1586
+ "consent",
1587
+ "never"
1588
+ ];
1589
+ function versionIndex(version) {
1590
+ return REGISTRY_VERSIONS.indexOf(version);
1450
1591
  }
1592
+ /**
1593
+ * Runtime validation of the registry's invariants. This exists alongside
1594
+ * the TypeScript types (not instead of them) because the enforcement this
1595
+ * feature needs — "CI fails on an untiered signal" — has to hold even if a
1596
+ * signal is constructed dynamically or a type is bypassed with `as any`.
1597
+ */
1451
1598
  function validateRegistry(signals) {
1452
- const errors = [];
1453
- const byId = /* @__PURE__ */ new Map();
1454
- const seenIds = /* @__PURE__ */ new Set();
1455
- for (const signal of signals) {
1456
- const label = signal?.id ?? "<unknown id>";
1457
- if (seenIds.has(signal?.id)) {
1458
- errors.push(`Duplicate signal id "${signal.id}".`);
1459
- } else if (signal?.id) {
1460
- seenIds.add(signal.id);
1461
- byId.set(signal.id, signal);
1462
- }
1463
- if (!signal.tier) {
1464
- errors.push(`Signal "${label}" has no tier. Every signal must carry a stability tier.`);
1465
- } else if (!VALID_TIERS.includes(signal.tier)) {
1466
- errors.push(`Signal "${label}" has invalid tier "${signal.tier}".`);
1467
- }
1468
- if (!signal.mode || !VALID_MODES.includes(signal.mode)) {
1469
- errors.push(`Signal "${label}" has invalid mode "${signal.mode}".`);
1470
- }
1471
- if (!REGISTRY_VERSIONS.includes(signal.addedVersion)) {
1472
- errors.push(`Signal "${label}" has invalid addedVersion "${signal.addedVersion}".`);
1473
- }
1474
- if (signal.removedVersion !== null) {
1475
- if (!REGISTRY_VERSIONS.includes(signal.removedVersion)) {
1476
- errors.push(`Signal "${label}" has invalid removedVersion "${signal.removedVersion}".`);
1477
- } else if (versionIndex2(signal.removedVersion) <= versionIndex2(signal.addedVersion)) {
1478
- errors.push(
1479
- `Signal "${label}" has removedVersion "${signal.removedVersion}" at or before its addedVersion "${signal.addedVersion}".`
1480
- );
1481
- }
1482
- }
1483
- if (!signal.measurement) {
1484
- errors.push(`Signal "${label}" has no measurement record for its tier assignment.`);
1485
- } else if (!signal.measurement.provisional) {
1486
- if (signal.measurement.agreementRate === null || signal.measurement.measuredAt === null) {
1487
- errors.push(
1488
- `Signal "${label}" has a finalized (non-provisional) tier but no recorded measurement (agreementRate/measuredAt). A tier with no measurement behind it is a guess wearing a label.`
1489
- );
1490
- }
1491
- }
1492
- const sensitiveCheck = checkSensitiveAttributeCompliance(signal);
1493
- if (!sensitiveCheck.ok) {
1494
- for (const violation of sensitiveCheck.violations) {
1495
- errors.push(`Signal "${label}" ${violation.message}`);
1496
- }
1497
- }
1498
- }
1499
- for (const signal of signals) {
1500
- if (signal.supersedes === null) continue;
1501
- const target = byId.get(signal.supersedes);
1502
- if (!target) {
1503
- errors.push(
1504
- `Signal "${signal.id}" supersedes "${signal.supersedes}", which does not exist in the registry.`
1505
- );
1506
- continue;
1507
- }
1508
- if (target.removedVersion === null || versionIndex2(target.removedVersion) > versionIndex2(signal.addedVersion)) {
1509
- errors.push(
1510
- `Signal "${signal.id}" forks "${signal.supersedes}" at "${signal.addedVersion}", but "${signal.supersedes}" has no matching removedVersion. Set removedVersion="${signal.addedVersion}" on "${signal.supersedes}" when forking.`
1511
- );
1512
- }
1513
- }
1514
- return { valid: errors.length === 0, errors };
1599
+ const errors = [];
1600
+ const byId = /* @__PURE__ */ new Map();
1601
+ const seenIds = /* @__PURE__ */ new Set();
1602
+ for (const signal of signals) {
1603
+ const label = signal?.id ?? "<unknown id>";
1604
+ if (seenIds.has(signal?.id)) errors.push(`Duplicate signal id "${signal.id}".`);
1605
+ else if (signal?.id) {
1606
+ seenIds.add(signal.id);
1607
+ byId.set(signal.id, signal);
1608
+ }
1609
+ if (!signal.tier) errors.push(`Signal "${label}" has no tier. Every signal must carry a stability tier.`);
1610
+ else if (!VALID_TIERS.includes(signal.tier)) errors.push(`Signal "${label}" has invalid tier "${signal.tier}".`);
1611
+ if (!signal.mode || !VALID_MODES.includes(signal.mode)) errors.push(`Signal "${label}" has invalid mode "${signal.mode}".`);
1612
+ if (!REGISTRY_VERSIONS.includes(signal.addedVersion)) errors.push(`Signal "${label}" has invalid addedVersion "${signal.addedVersion}".`);
1613
+ if (signal.removedVersion !== null) {
1614
+ if (!REGISTRY_VERSIONS.includes(signal.removedVersion)) errors.push(`Signal "${label}" has invalid removedVersion "${signal.removedVersion}".`);
1615
+ else if (versionIndex(signal.removedVersion) <= versionIndex(signal.addedVersion)) errors.push(`Signal "${label}" has removedVersion "${signal.removedVersion}" at or before its addedVersion "${signal.addedVersion}".`);
1616
+ }
1617
+ if (!signal.measurement) errors.push(`Signal "${label}" has no measurement record for its tier assignment.`);
1618
+ else if (!signal.measurement.provisional) {
1619
+ if (signal.measurement.agreementRate === null || signal.measurement.measuredAt === null) errors.push(`Signal "${label}" has a finalized (non-provisional) tier but no recorded measurement (agreementRate/measuredAt). A tier with no measurement behind it is a guess wearing a label.`);
1620
+ }
1621
+ const sensitiveCheck = checkSensitiveAttributeCompliance(signal);
1622
+ if (!sensitiveCheck.ok) for (const violation of sensitiveCheck.violations) errors.push(`Signal "${label}" ${violation.message}`);
1623
+ }
1624
+ for (const signal of signals) {
1625
+ if (signal.supersedes === null) continue;
1626
+ const target = byId.get(signal.supersedes);
1627
+ if (!target) {
1628
+ errors.push(`Signal "${signal.id}" supersedes "${signal.supersedes}", which does not exist in the registry.`);
1629
+ continue;
1630
+ }
1631
+ if (target.removedVersion === null || versionIndex(target.removedVersion) > versionIndex(signal.addedVersion)) errors.push(`Signal "${signal.id}" forks "${signal.supersedes}" at "${signal.addedVersion}", but "${signal.supersedes}" has no matching removedVersion. Set removedVersion="${signal.addedVersion}" on "${signal.supersedes}" when forking.`);
1632
+ }
1633
+ return {
1634
+ valid: errors.length === 0,
1635
+ errors
1636
+ };
1515
1637
  }
1516
1638
 
1517
- // src/signals/immutability.ts
1639
+ //#endregion
1640
+ //#region src/signals/immutability.ts
1518
1641
  function denoiseEqual(a, b) {
1519
- if (a.kind !== b.kind) return false;
1520
- if (a.kind === "modal" && b.kind === "modal") return a.runs === b.runs;
1521
- return true;
1642
+ if (a.kind !== b.kind) return false;
1643
+ if (a.kind === "modal" && b.kind === "modal") return a.runs === b.runs;
1644
+ return true;
1522
1645
  }
1646
+ /**
1647
+ * The frozen snapshot of a signal, as it should be recorded in the
1648
+ * committed snapshot file. `finalizedTier` stays null until the signal's
1649
+ * measurement is no longer provisional (see `TierMeasurement.provisional`),
1650
+ * and `removedVersion` stays null until the signal is forked. Each locks in
1651
+ * exactly once — see `checkSnapshotConsistency`.
1652
+ */
1523
1653
  function computeImmutableSnapshot(signal) {
1524
- return {
1525
- id: signal.id,
1526
- addedVersion: signal.addedVersion,
1527
- removedVersion: signal.removedVersion,
1528
- denoise: signal.denoise,
1529
- mode: signal.mode,
1530
- plane: signal.plane,
1531
- group: signal.group,
1532
- finalizedTier: signal.measurement.provisional ? null : signal.tier
1533
- };
1654
+ return {
1655
+ id: signal.id,
1656
+ addedVersion: signal.addedVersion,
1657
+ removedVersion: signal.removedVersion,
1658
+ denoise: signal.denoise,
1659
+ mode: signal.mode,
1660
+ plane: signal.plane,
1661
+ group: signal.group,
1662
+ finalizedTier: signal.measurement.provisional ? null : signal.tier
1663
+ };
1534
1664
  }
1535
- var FORK_INSTRUCTION = 'Shipped signals are immutable \u2014 a signal is never edited, only forked. Create a new signal (e.g. "<id>.v2") with supersedes set to this id and removedVersion set on this entry, instead of editing it in place.';
1665
+ const FORK_INSTRUCTION = "Shipped signals are immutable — a signal is never edited, only forked. Create a new signal (e.g. \"<id>.v2\") with supersedes set to this id and removedVersion set on this entry, instead of editing it in place.";
1666
+ /**
1667
+ * Compares the committed snapshot (what has already shipped) against the
1668
+ * live registry. This is deliberately NOT "regenerate the snapshot from the
1669
+ * live registry and diff" — that self-referential check would pass even
1670
+ * when an existing entry was edited, because the regenerated file would
1671
+ * just agree with the edit. Instead every id already in `committed` is
1672
+ * pinned, and the live registry is checked against that pin.
1673
+ */
1536
1674
  function checkSnapshotConsistency(committed, live) {
1537
- const violations = [];
1538
- const liveById = new Map(live.map((s) => [s.id, s]));
1539
- const committedIds = new Set(committed.map((r) => r.id));
1540
- for (const record of committed) {
1541
- const current = liveById.get(record.id);
1542
- if (!current) {
1543
- violations.push({
1544
- id: record.id,
1545
- kind: "deleted",
1546
- message: `Signal "${record.id}" was removed from the registry entirely. Mark it removed with removedVersion instead of deleting it \u2014 historical fingerprints still reference it.`
1547
- });
1548
- continue;
1549
- }
1550
- const currentSnapshot = computeImmutableSnapshot(current);
1551
- const frozenMismatch = currentSnapshot.addedVersion !== record.addedVersion || !denoiseEqual(currentSnapshot.denoise, record.denoise) || currentSnapshot.mode !== record.mode || currentSnapshot.plane !== record.plane || currentSnapshot.group !== record.group;
1552
- const tierMismatch = record.finalizedTier !== null && currentSnapshot.finalizedTier !== record.finalizedTier;
1553
- const removedVersionMismatch = record.removedVersion !== null && currentSnapshot.removedVersion !== record.removedVersion;
1554
- if (frozenMismatch || tierMismatch || removedVersionMismatch) {
1555
- violations.push({
1556
- id: record.id,
1557
- kind: "edited",
1558
- message: `Signal "${record.id}" was edited in place. ${FORK_INSTRUCTION} Re-running the snapshot recorder will not fix this \u2014 it refuses to overwrite a divergent entry.`
1559
- });
1560
- }
1561
- }
1562
- for (const current of live) {
1563
- if (!committedIds.has(current.id)) {
1564
- violations.push({
1565
- id: current.id,
1566
- kind: "unrecorded",
1567
- message: `Signal "${current.id}" is new and not yet recorded. Run \`pnpm --filter @kya-os/checkpoint-shared run signals:snapshot -- --write\` and commit the result.`
1568
- });
1569
- }
1570
- }
1571
- return { ok: violations.length === 0, violations };
1675
+ const violations = [];
1676
+ const liveById = new Map(live.map((s) => [s.id, s]));
1677
+ const committedIds = new Set(committed.map((r) => r.id));
1678
+ for (const record of committed) {
1679
+ const current = liveById.get(record.id);
1680
+ if (!current) {
1681
+ violations.push({
1682
+ id: record.id,
1683
+ kind: "deleted",
1684
+ message: `Signal "${record.id}" was removed from the registry entirely. Mark it removed with removedVersion instead of deleting it — historical fingerprints still reference it.`
1685
+ });
1686
+ continue;
1687
+ }
1688
+ const currentSnapshot = computeImmutableSnapshot(current);
1689
+ const frozenMismatch = currentSnapshot.addedVersion !== record.addedVersion || !denoiseEqual(currentSnapshot.denoise, record.denoise) || currentSnapshot.mode !== record.mode || currentSnapshot.plane !== record.plane || currentSnapshot.group !== record.group;
1690
+ const tierMismatch = record.finalizedTier !== null && currentSnapshot.finalizedTier !== record.finalizedTier;
1691
+ const removedVersionMismatch = record.removedVersion !== null && currentSnapshot.removedVersion !== record.removedVersion;
1692
+ if (frozenMismatch || tierMismatch || removedVersionMismatch) violations.push({
1693
+ id: record.id,
1694
+ kind: "edited",
1695
+ message: `Signal "${record.id}" was edited in place. ${FORK_INSTRUCTION} Re-running the snapshot recorder will not fix this — it refuses to overwrite a divergent entry.`
1696
+ });
1697
+ }
1698
+ for (const current of live) if (!committedIds.has(current.id)) violations.push({
1699
+ id: current.id,
1700
+ kind: "unrecorded",
1701
+ message: `Signal "${current.id}" is new and not yet recorded. Run \`pnpm --filter @kya-os/checkpoint-shared run signals:snapshot -- --write\` and commit the result.`
1702
+ });
1703
+ return {
1704
+ ok: violations.length === 0,
1705
+ violations
1706
+ };
1572
1707
  }
1708
+ /**
1709
+ * Snapshot writer: append-only for new signal ids, and refuses (throws)
1710
+ * rather than overwrite any existing record that disagrees with the live
1711
+ * registry — so running this locally after an in-place edit fails loudly
1712
+ * instead of quietly re-recording the edit as the new baseline.
1713
+ *
1714
+ * Existing records DO get rewritten, deliberately: `checkSnapshotConsistency`
1715
+ * having already passed (no violations) means the only way an existing
1716
+ * record can still differ from `computeImmutableSnapshot(current)` is one of
1717
+ * the two allowed one-way transitions (finalizing a provisional tier,
1718
+ * marking a signal removed) — so it's safe to persist the live value.
1719
+ * Recording only the truly-new ids and never updating existing ones was the
1720
+ * bug: a transition that `checkSnapshotConsistency` correctly allowed was
1721
+ * never actually written back, so the committed snapshot stayed at its
1722
+ * pre-transition value forever and the lock never engaged (Bugbot, PR #4257).
1723
+ */
1573
1724
  function recordSnapshot(committed, live) {
1574
- const result = checkSnapshotConsistency(committed, live);
1575
- const editedOrDeleted = result.violations.filter((v) => v.kind !== "unrecorded");
1576
- if (editedOrDeleted.length > 0) {
1577
- throw new Error(editedOrDeleted.map((v) => v.message).join("\n"));
1578
- }
1579
- const liveById = new Map(live.map((s) => [s.id, s]));
1580
- const committedIds = new Set(committed.map((r) => r.id));
1581
- const updated = committed.map((record) => {
1582
- const current = liveById.get(record.id);
1583
- return current ? computeImmutableSnapshot(current) : record;
1584
- });
1585
- const additions = live.filter((s) => !committedIds.has(s.id)).map((s) => computeImmutableSnapshot(s));
1586
- return [...updated, ...additions];
1725
+ const editedOrDeleted = checkSnapshotConsistency(committed, live).violations.filter((v) => v.kind !== "unrecorded");
1726
+ if (editedOrDeleted.length > 0) throw new Error(editedOrDeleted.map((v) => v.message).join("\n"));
1727
+ const liveById = new Map(live.map((s) => [s.id, s]));
1728
+ const committedIds = new Set(committed.map((r) => r.id));
1729
+ const updated = committed.map((record) => {
1730
+ const current = liveById.get(record.id);
1731
+ return current ? computeImmutableSnapshot(current) : record;
1732
+ });
1733
+ const additions = live.filter((s) => !committedIds.has(s.id)).map((s) => computeImmutableSnapshot(s));
1734
+ return [...updated, ...additions];
1587
1735
  }
1588
1736
 
1589
- // src/signals/docs.ts
1590
- var GENERATED_HEADER = `<!-- GENERATED FILE \u2014 do not hand-edit. -->
1737
+ //#endregion
1738
+ //#region src/signals/docs.ts
1739
+ const GENERATED_HEADER = `<!-- GENERATED FILE — do not hand-edit. -->
1591
1740
  <!-- Generated from \`packages/checkpoint-shared/src/signals/registry.ts\` by -->
1592
1741
  <!-- \`pnpm --filter @kya-os/checkpoint-shared run signals:docs\`. -->
1593
- <!-- CI rejects a stale copy of this file \u2014 see .github/workflows/signal-registry-check.yml. -->
1742
+ <!-- CI rejects a stale copy of this file — see .github/workflows/signal-registry-check.yml. -->
1594
1743
 
1595
1744
  # Signal registry
1596
1745
 
@@ -1605,37 +1754,45 @@ historical fingerprints stay reproducible against the version they were
1605
1754
  computed under.
1606
1755
  `;
1607
1756
  function formatDenoise(denoise) {
1608
- return denoise.kind === "modal" ? `modal(${denoise.runs})` : "none";
1757
+ return denoise.kind === "modal" ? `modal(${denoise.runs})` : "none";
1609
1758
  }
1610
1759
  function formatVersion(version) {
1611
- return version ?? "\u2014";
1760
+ return version ?? "—";
1612
1761
  }
1613
1762
  function formatTier(signal) {
1614
- return signal.measurement.provisional ? `${signal.tier} (provisional)` : signal.tier;
1763
+ return signal.measurement.provisional ? `${signal.tier} (provisional)` : signal.tier;
1615
1764
  }
1616
1765
  function formatRow(signal) {
1617
- const cells = [
1618
- `\`${signal.id}\``,
1619
- `${signal.plane}/${signal.group}`,
1620
- formatVersion(signal.addedVersion),
1621
- formatVersion(signal.removedVersion),
1622
- formatTier(signal),
1623
- signal.mode,
1624
- formatDenoise(signal.denoise),
1625
- signal.supersedes ? `\`${signal.supersedes}\`` : "\u2014",
1626
- signal.u === null ? "\u2014" : String(signal.u)
1627
- ];
1628
- return `| ${cells.join(" | ")} |`;
1766
+ return `| ${[
1767
+ `\`${signal.id}\``,
1768
+ `${signal.plane}/${signal.group}`,
1769
+ formatVersion(signal.addedVersion),
1770
+ formatVersion(signal.removedVersion),
1771
+ formatTier(signal),
1772
+ signal.mode,
1773
+ formatDenoise(signal.denoise),
1774
+ signal.supersedes ? `\`${signal.supersedes}\`` : "—",
1775
+ signal.u === null ? "—" : String(signal.u)
1776
+ ].join(" | ")} |`;
1629
1777
  }
1630
- var TABLE_HEADER = [
1631
- "| id | plane/group | added | removed | tier | mode | denoise | supersedes | u |",
1632
- "| --- | --- | --- | --- | --- | --- | --- | --- | --- |"
1633
- ].join("\n");
1778
+ const TABLE_HEADER = ["| id | plane/group | added | removed | tier | mode | denoise | supersedes | u |", "| --- | --- | --- | --- | --- | --- | --- | --- | --- |"].join("\n");
1779
+ /**
1780
+ * Pure markdown generator over the registry — the doc-generation half of
1781
+ * "generate the docs from the registry rather than maintaining them by
1782
+ * hand." Deterministic (stable sort, no timestamps) so regeneration
1783
+ * produces a clean diff only when the registry actually changed.
1784
+ */
1634
1785
  function generateRegistryMarkdown(registry) {
1635
- const rows = listShippedSignals(registry).map(formatRow);
1636
- return [GENERATED_HEADER, TABLE_HEADER, ...rows, ""].join("\n");
1786
+ const rows = listShippedSignals(registry).map(formatRow);
1787
+ return [
1788
+ GENERATED_HEADER,
1789
+ TABLE_HEADER,
1790
+ ...rows,
1791
+ ""
1792
+ ].join("\n");
1637
1793
  }
1638
1794
 
1795
+ //#endregion
1639
1796
  exports.COMPOSITION_RISK_RULES = COMPOSITION_RISK_RULES;
1640
1797
  exports.CURRENT_REGISTRY_VERSION = CURRENT_REGISTRY_VERSION;
1641
1798
  exports.CURRENT_SENSITIVE_REJECTION_LIST_VERSION = CURRENT_SENSITIVE_REJECTION_LIST_VERSION;
@@ -1664,4 +1821,4 @@ exports.listShippedSignals = listShippedSignals;
1664
1821
  exports.recordSnapshot = recordSnapshot;
1665
1822
  exports.registerSignal = registerSignal;
1666
1823
  exports.resolveSignalsAt = resolveSignalsAt;
1667
- exports.validateRegistry = validateRegistry;
1824
+ exports.validateRegistry = validateRegistry;