@kya-os/checkpoint-shared 1.4.0 → 1.5.0

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