@corbado/observe 1.14.1 → 1.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,787 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/manifest/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ AC_CEREMONY: () => AC_CEREMONY,
24
+ CATEGORIES: () => CATEGORIES,
25
+ CATEGORY_VALUE_LEVELS: () => CATEGORY_VALUE_LEVELS,
26
+ KIND_LADDERS: () => KIND_LADDERS,
27
+ NON_VALUE_LEVELS: () => NON_VALUE_LEVELS,
28
+ SDK_API: () => SDK_API,
29
+ SDK_CAPABILITIES: () => SDK_CAPABILITIES,
30
+ SDK_DEVICE: () => SDK_DEVICE,
31
+ SDK_GATEWAYS: () => SDK_GATEWAYS,
32
+ SDK_GENERATED: () => SDK_GENERATED,
33
+ SDK_INPUT: () => SDK_INPUT,
34
+ SDK_OWN_STORAGE: () => SDK_OWN_STORAGE,
35
+ SDK_PAGE: () => SDK_PAGE,
36
+ SDK_PASSWORD_MANAGERS: () => SDK_PASSWORD_MANAGERS,
37
+ SDK_PRIVATE_MODE: () => SDK_PRIVATE_MODE,
38
+ SDK_RECORD: () => SDK_RECORD,
39
+ SDK_TRANSPORT: () => SDK_TRANSPORT,
40
+ SDK_WINDOW: () => SDK_WINDOW,
41
+ VALUE_LEVELS: () => VALUE_LEVELS,
42
+ capabilities: () => capabilities,
43
+ gateways: () => gateways
44
+ });
45
+ module.exports = __toCommonJS(index_exports);
46
+
47
+ // src/manifest/ac-ceremony.ts
48
+ var AC_CEREMONY = {
49
+ key: "ac:ceremony",
50
+ version: 1,
51
+ title: "Passkey prompts, without credentials or challenges",
52
+ why: "Shows whether passkey sign-in and creation work, and why they fail.",
53
+ collects: [
54
+ "kind (sign-in or creation), how it was offered, phase, outcome, timing",
55
+ "error name from a fixed list",
56
+ "request settings (timeout, user verification, hints, attestation, authenticator selection, names of requested extensions)",
57
+ "the site's domain the passkey belongs to (relying party id)",
58
+ "allowed passkeys: how many, transports or hybrid named, whether the one used was among them (their ids replaced by random stand-ins that only match within the page)",
59
+ "origin the browser reports, cross-origin flags",
60
+ "attestation: format, authenticator certificates (model, not person), the passkey's public key",
61
+ "authenticator data as reported: the site's hash, flags and signature counter",
62
+ "authenticator model (AAGUID), user present / verified, backup eligible / backed up, transports, attachment, algorithm, resident key, PRF enabled",
63
+ "whether a user handle exists"
64
+ ],
65
+ never: [
66
+ {
67
+ text: "the challenge (replaced by zeros in the options and the client data)",
68
+ proof: "ac:ceremony@1#never.challenge"
69
+ },
70
+ { text: "signature", proof: "ac:ceremony@1#never.signature" },
71
+ { text: "user handle (only whether one exists)", proof: "ac:ceremony@1#never.user-handle" },
72
+ { text: "user name, display name or id", proof: "ac:ceremony@1#never.user" },
73
+ { text: "the site's display name in the creation request", proof: "ac:ceremony@1#never.rp-name" },
74
+ { text: "PRF results", proof: "ac:ceremony@1#never.prf" },
75
+ {
76
+ text: "the passkey's id, unless the project names the passkey reference option",
77
+ proof: "ac:ceremony@1#never.credential-id"
78
+ }
79
+ ],
80
+ options: [
81
+ {
82
+ name: "passkeyReference",
83
+ adds: "the passkey's random id, to recognize the same passkey across sign-ins. Its own field, category opaque-identifier, level raw. Without it the ids are replaced by random stand-ins that only match within one page load, so projects that track credentials (passkey KPIs, passkey provider at sign-in) declare passkeyReference: true (adx, vg, vr, adb). A runtime option (not a build switch): the autocapture runtime passes it from the static config, the manifest records its value from build.config."
84
+ }
85
+ ],
86
+ sideEffects: [
87
+ {
88
+ id: "ceremony.wrap-credentials",
89
+ text: "wraps navigator.credentials.get and navigator.credentials.create, so every passkey prompt of the page passes through it"
90
+ },
91
+ {
92
+ id: "ceremony.credentials-proxy",
93
+ text: "navigator.credentials is replaced by a proxy that forwards to the original",
94
+ when: "aap"
95
+ }
96
+ ],
97
+ usedOn: "passkey prompts, passkey data in request bodies and page attributes (fields declared via ac:ceremony@1); default set: technical and device facts only",
98
+ when: "ceremony"
99
+ };
100
+
101
+ // src/manifest/sdk-api.ts
102
+ var SDK_API = {
103
+ key: "sdk:api",
104
+ version: 1,
105
+ source: { key: "host-config:sdk.api", kind: "host-config", title: "Values the integration passes to Observe" },
106
+ title: "Values the integration passes to Observe",
107
+ fields: [
108
+ {
109
+ path: "experiments",
110
+ level: "raw",
111
+ category: "technical",
112
+ label: "Experiment names and variants the site assigns"
113
+ },
114
+ { path: "dataPolicy", level: "raw", category: "technical", label: "Code of the data policy the site applies" },
115
+ {
116
+ path: "emailLink.transactionId",
117
+ level: "pseudonym",
118
+ category: "personal-identifier",
119
+ label: "Transaction reference of an email link, as the integration passes it (a projects' declaration narrows it)",
120
+ // email-link typed operation (`utils/email-link-operation-full.ts`), optional code
121
+ requires: "sdk-operations"
122
+ }
123
+ ]
124
+ };
125
+
126
+ // src/manifest/sdk-device.ts
127
+ var enumBool = { values: [true, false] };
128
+ var SDK_DEVICE = {
129
+ key: "sdk:device",
130
+ version: 1,
131
+ title: "Device and browser features",
132
+ source: { key: "browser-api:sdk.device", kind: "browser-api", title: "Device and browser features" },
133
+ fields: [
134
+ {
135
+ path: "uaHints.platform",
136
+ level: "raw",
137
+ category: "device",
138
+ label: "Operating system",
139
+ examples: ["macOS", "Android", "Windows"]
140
+ },
141
+ {
142
+ path: "uaHints.platformVersion",
143
+ level: "raw",
144
+ category: "device",
145
+ label: "Operating system version",
146
+ examples: ["15.1.0"]
147
+ },
148
+ {
149
+ path: "uaHints.mobile",
150
+ level: "enum",
151
+ category: "device",
152
+ label: "Whether the device is a mobile device",
153
+ transform: enumBool
154
+ },
155
+ {
156
+ path: "uaHints.model",
157
+ level: "raw",
158
+ category: "device",
159
+ label: "Device model",
160
+ examples: ["Pixel 8", "SM-S918B"]
161
+ },
162
+ {
163
+ path: "passkeys.platform",
164
+ level: "enum",
165
+ category: "device",
166
+ label: "Whether the device has a built-in passkey authenticator",
167
+ transform: enumBool
168
+ },
169
+ {
170
+ path: "passkeys.autofill",
171
+ level: "enum",
172
+ category: "device",
173
+ label: "Whether passkey autofill is available",
174
+ transform: enumBool
175
+ },
176
+ {
177
+ path: "clientCapabilities.<capability>",
178
+ level: "enum",
179
+ category: "device",
180
+ label: "Supported passkey features (names as the browser reports them)",
181
+ transform: { values: ["true", "false"] }
182
+ },
183
+ {
184
+ path: "bluetooth",
185
+ level: "enum",
186
+ category: "device",
187
+ label: "Whether Bluetooth is available",
188
+ transform: enumBool
189
+ },
190
+ {
191
+ path: "webdriver",
192
+ level: "enum",
193
+ category: "device",
194
+ label: "Whether the browser is controlled by automation",
195
+ transform: enumBool
196
+ },
197
+ {
198
+ path: "maxTouchPoints",
199
+ level: "raw",
200
+ category: "device",
201
+ label: "Number of touch points of the screen",
202
+ examples: [0, 5]
203
+ },
204
+ {
205
+ path: "collectionErrors[]",
206
+ level: "raw",
207
+ category: "technical",
208
+ label: "Which device check failed or timed out, with the browser's error name and message"
209
+ },
210
+ {
211
+ path: "privateMode",
212
+ level: "enum",
213
+ category: "device",
214
+ label: "Whether the window is private",
215
+ transform: enumBool,
216
+ via: "sdk:private-mode@1",
217
+ when: "privateMode"
218
+ },
219
+ {
220
+ path: "passwordManagers[]",
221
+ level: "enum",
222
+ category: "device",
223
+ label: "Names of detected password managers",
224
+ transform: {
225
+ values: ["1password", "bitwarden", "dashlane", "kaspersky", "keeper", "lastpass", "nordpass", "protonpass"]
226
+ },
227
+ via: "sdk:password-managers@1",
228
+ when: "pmd"
229
+ },
230
+ {
231
+ path: "userAgent.blocked",
232
+ level: "enum",
233
+ category: "device",
234
+ label: "Whether the browser looks like a crawler or bot (then nothing is sent)",
235
+ transform: enumBool
236
+ }
237
+ ]
238
+ };
239
+
240
+ // src/manifest/sdk-generated.ts
241
+ var SDK_GENERATED = {
242
+ key: "sdk:generated",
243
+ version: 1,
244
+ title: "Identifiers the script creates",
245
+ generated: [
246
+ {
247
+ id: "generated:sdk.device-handle",
248
+ category: "opaque-identifier",
249
+ pointsTo: "browser",
250
+ lifetime: "persistent",
251
+ scope: "origin",
252
+ exposedTo: ["corbado", "page scripts (local storage)"],
253
+ label: "Random id of this browser, kept until the site's storage is cleared, sent with the device information together with the time it was created. With the option deviceHandleMaxAge (from the static config, recorded in build.config) it is replaced once older than that maximum; the lifetime is then that duration."
254
+ },
255
+ {
256
+ id: "generated:sdk.session",
257
+ category: "opaque-identifier",
258
+ pointsTo: "session",
259
+ lifetime: "PT30M",
260
+ scope: "all tabs",
261
+ exposedTo: ["corbado", "page scripts (getSessionId)", "page scripts (local storage)"],
262
+ label: "Random id of a visit, shared by the site's tabs and renewed after the configured time without activity (built-in 30 minutes; the build's config decides); without session continuity per tab.",
263
+ when: "sessionContinuity"
264
+ },
265
+ {
266
+ id: "generated:sdk.tab-session",
267
+ category: "opaque-identifier",
268
+ pointsTo: "session",
269
+ lifetime: "tab",
270
+ scope: "tab",
271
+ exposedTo: ["corbado", "page scripts (getSessionId)", "page scripts (session storage)"],
272
+ label: "Random id of a visit in one tab (without session continuity)."
273
+ },
274
+ {
275
+ id: "generated:sdk.tab",
276
+ category: "opaque-identifier",
277
+ pointsTo: "tab",
278
+ lifetime: "tab",
279
+ scope: "tab",
280
+ exposedTo: ["corbado", "page scripts (session storage)"],
281
+ label: "Random id of the browser tab."
282
+ },
283
+ {
284
+ id: "generated:sdk.page",
285
+ category: "opaque-identifier",
286
+ pointsTo: "page",
287
+ lifetime: "page-load",
288
+ scope: "page",
289
+ exposedTo: ["corbado"],
290
+ label: "Random id of one page load, on the field and window interaction records."
291
+ },
292
+ {
293
+ id: "generated:sdk.event",
294
+ category: "opaque-identifier",
295
+ pointsTo: "event",
296
+ lifetime: "event",
297
+ exposedTo: ["corbado"],
298
+ label: "Random id of each record, so a record sent twice counts once (contains its creation time)."
299
+ },
300
+ {
301
+ id: "generated:sdk.passkey-stand-in",
302
+ category: "opaque-identifier",
303
+ pointsTo: "credential",
304
+ lifetime: "page-load",
305
+ scope: "page",
306
+ exposedTo: ["corbado"],
307
+ label: "Random stand-in for a passkey's id within one page load, so the allowed passkeys can be matched with the one used without sending the id.",
308
+ when: "ceremony"
309
+ }
310
+ ]
311
+ };
312
+ var SDK_RECORD = {
313
+ key: "sdk:record",
314
+ version: 1,
315
+ title: "Fields the script adds to each record",
316
+ source: { key: "record:sdk.event", kind: "record", title: "Fields the script adds to each record" },
317
+ fields: [
318
+ {
319
+ path: "seq",
320
+ level: "raw",
321
+ category: "technical",
322
+ label: "Counters that order the records of a visit and of a page (kept with the visit in local storage, shared by the visit's tabs)",
323
+ examples: [1, 2, 17]
324
+ }
325
+ ]
326
+ };
327
+
328
+ // src/manifest/sdk-own-storage.ts
329
+ var DEVICE = "browser-api:sdk.device";
330
+ var API = "host-config:sdk.api";
331
+ var SDK_OWN_STORAGE = {
332
+ key: "sdk:own-storage",
333
+ version: 1,
334
+ title: "What the script keeps in the browser",
335
+ stored: [
336
+ {
337
+ id: "storage:sdk.outbox",
338
+ keys: ["cbo_outbox_*"],
339
+ area: "local",
340
+ scope: "origin",
341
+ retention: "P7D",
342
+ enforced: true,
343
+ owner: "sdk",
344
+ contents: ["sent:events"],
345
+ label: "Records not yet delivered, deleted once sent; never kept longer than 7 days",
346
+ when: "durableOutbox"
347
+ },
348
+ {
349
+ id: "storage:sdk.low-outbox",
350
+ // `cbo_low_outbox_v1` with the default storage scope, `cbo_low_outbox_v1_<projectId>` with storageScope "project"
351
+ keys: ["cbo_low_outbox_v1", "cbo_low_outbox_v1_*"],
352
+ area: "local",
353
+ scope: "origin",
354
+ retention: "P7D",
355
+ enforced: true,
356
+ owner: "sdk",
357
+ contents: ["sent:events"],
358
+ label: "Field and window interaction records not yet delivered; never kept longer than 7 days",
359
+ // queue.ts enqueueLow writes only with durableLowOutbox; the queue always opens the low outbox to recover and
360
+ // resend (or drop after 7 days / on rejection) what an earlier load left
361
+ when: "durableLowOutbox",
362
+ otherwise: {
363
+ note: "Not written by this build (durableLowOutbox is off): low events are sent from memory; entries left by an older build are sent or removed."
364
+ }
365
+ },
366
+ {
367
+ id: "storage:sdk.session",
368
+ keys: ["cbo_session_*"],
369
+ area: "local",
370
+ scope: "origin",
371
+ retention: "persistent",
372
+ enforced: false,
373
+ owner: "sdk",
374
+ contents: ["generated:sdk.session"],
375
+ label: "Visit id with its last activity time; replaced on the next visit after the inactivity window",
376
+ when: "sessionContinuity"
377
+ },
378
+ {
379
+ id: "storage:sdk.seq",
380
+ keys: ["cbo_seq_*"],
381
+ area: "local",
382
+ scope: "origin",
383
+ retention: "persistent",
384
+ owner: "sdk",
385
+ contents: ["record:sdk.event#seq"],
386
+ label: "Record counter of the visit",
387
+ when: "sessionContinuity"
388
+ },
389
+ {
390
+ id: "storage:sdk.tab-session",
391
+ keys: ["cbo_session_id_*"],
392
+ area: "session",
393
+ scope: "tab",
394
+ retention: "tab",
395
+ owner: "sdk",
396
+ contents: ["generated:sdk.tab-session"],
397
+ label: "Visit id of this tab"
398
+ },
399
+ {
400
+ id: "storage:sdk.tab-id",
401
+ keys: ["cbo_tab_id_*"],
402
+ area: "session",
403
+ scope: "tab",
404
+ retention: "tab",
405
+ owner: "sdk",
406
+ contents: ["generated:sdk.tab"],
407
+ label: "Tab id"
408
+ },
409
+ {
410
+ id: "storage:sdk.device-handle",
411
+ keys: ["cbo_client_env_handle_*"],
412
+ area: "local",
413
+ scope: "origin",
414
+ retention: "persistent",
415
+ owner: "sdk",
416
+ contents: ["generated:sdk.device-handle"],
417
+ label: "Browser id with the time it was created; replaced after the deviceHandleMaxAge option's maximum when set (build.config)"
418
+ },
419
+ {
420
+ id: "storage:sdk.config",
421
+ keys: ["cbo_sdk_config_cache_*", "cbo_sdk_config_*"],
422
+ area: "local",
423
+ scope: "origin",
424
+ retention: "P1D",
425
+ enforced: false,
426
+ owner: "sdk",
427
+ contents: [],
428
+ label: "Corbado's settings for the script (no personal data); refreshed at most daily",
429
+ // only ConfigManager (absent from static-config builds) reads, writes or removes it; nothing removes an older
430
+ // cache in a static build (storage/migration.ts may still copy a pre-multi-project `cbo_sdk_config` once)
431
+ when: "!static"
432
+ },
433
+ {
434
+ id: "storage:sdk.private-mode",
435
+ keys: ["cbo_pm_*"],
436
+ area: "local",
437
+ scope: "origin",
438
+ retention: "P7D",
439
+ enforced: true,
440
+ owner: "sdk",
441
+ contents: [`${DEVICE}#privateMode`],
442
+ label: "Result of the private-mode check, reused for 7 days",
443
+ when: "privateMode"
444
+ },
445
+ {
446
+ id: "storage:sdk.experiments",
447
+ keys: ["cbo_experiments_*"],
448
+ area: "local",
449
+ scope: "origin",
450
+ retention: "persistent",
451
+ owner: "sdk",
452
+ contents: [`${API}#experiments`],
453
+ label: "Experiment assignments the site set"
454
+ },
455
+ {
456
+ id: "storage:sdk.data-policy",
457
+ keys: ["cbo_data_policy_*"],
458
+ area: "local",
459
+ scope: "origin",
460
+ retention: "persistent",
461
+ owner: "sdk",
462
+ contents: [`${API}#dataPolicy`],
463
+ label: "Data policy code the site set"
464
+ },
465
+ {
466
+ id: "storage:sdk.email-link-starts",
467
+ keys: ["cbo_email_link_starts_*"],
468
+ area: "local",
469
+ scope: "origin",
470
+ retention: "P1D",
471
+ enforced: true,
472
+ owner: "sdk",
473
+ contents: [`${API}#emailLink.transactionId`, "generated:sdk.event", "generated:sdk.session"],
474
+ label: "Started email links (at most 10), to continue them on the link's page; deleted after 24 hours",
475
+ // written only by the email-link typed operation (`utils/email-link-operation-full.ts`)
476
+ requires: "sdk-operations"
477
+ },
478
+ {
479
+ id: "storage:sdk.storage-schema",
480
+ keys: ["cbo_storage_schema"],
481
+ area: "local",
482
+ scope: "origin",
483
+ retention: "persistent",
484
+ owner: "sdk",
485
+ contents: [],
486
+ label: "Version of the script's storage layout (no personal data)"
487
+ },
488
+ {
489
+ id: "storage:sdk.storage-schema-tab",
490
+ keys: ["cbo_storage_schema"],
491
+ area: "session",
492
+ scope: "tab",
493
+ retention: "tab",
494
+ owner: "sdk",
495
+ contents: [],
496
+ label: "Version of the script's storage layout in this tab (no personal data)"
497
+ },
498
+ {
499
+ id: "storage:sdk.legacy-debug",
500
+ // queue.ts removes the project-scoped keys at start (a one-time storage/migration.ts copy of a pre-multi-project
501
+ // unscoped key included, removed in the same start); the unscoped originals are left untouched
502
+ keys: ["cbo_visibility_change_debug_*", "cbo_pagehide_debug_*"],
503
+ area: "local",
504
+ scope: "origin",
505
+ retention: "PT0S",
506
+ enforced: true,
507
+ deleteOnly: true,
508
+ owner: "sdk",
509
+ contents: [],
510
+ label: "Debug keys of older versions",
511
+ note: "Debug keys of older versions (they held the unmasked page address); removed when found, never written."
512
+ },
513
+ {
514
+ id: "storage:sdk.cross-origin-session",
515
+ keys: ["cbo_xs_*"],
516
+ area: "cookie",
517
+ scope: "cookie domain + path /",
518
+ retention: "PT30M",
519
+ owner: "sdk",
520
+ contents: ["generated:sdk.session", "record:sdk.event#seq"],
521
+ label: "Visit shared across the site's subdomains (first-party cookie); only with the cross-origin session plugin",
522
+ when: "crossOriginSession",
523
+ requires: "cross-origin-session"
524
+ }
525
+ ]
526
+ };
527
+
528
+ // src/manifest/sdk-page.ts
529
+ var SDK_PAGE = {
530
+ key: "sdk:page",
531
+ version: 1,
532
+ source: { key: "page:sdk.location", kind: "url", title: "Page address" },
533
+ title: "Page address",
534
+ fields: [
535
+ {
536
+ path: "sourcePath.path",
537
+ level: "raw",
538
+ category: "technical",
539
+ label: "Page path, as is",
540
+ examples: ["/account-login"]
541
+ },
542
+ {
543
+ path: "sourcePath.query",
544
+ level: "partial",
545
+ category: "technical",
546
+ label: "Names of the page address parameters; their values masked unless the parameter is allowlisted",
547
+ transform: { keep: "keys; values of allowlisted keys", masked: "*" },
548
+ examples: ["?flow=*&locale=*"]
549
+ }
550
+ ]
551
+ };
552
+
553
+ // src/manifest/sdk-input.ts
554
+ var SDK_INPUT = {
555
+ key: "sdk:input",
556
+ version: 1,
557
+ title: "Use of form fields, never their content",
558
+ why: "Shows where people struggle with sign-in fields, such as retyping, pasting or autofill failing, without seeing what they enter.",
559
+ collects: [
560
+ "the field was selected or left",
561
+ "typed into, pasted into, filled automatically by the browser or a password manager",
562
+ "whether something was entered (empty or not)",
563
+ "whether a change inserted or removed several characters at once",
564
+ "start and duration of a typing run",
565
+ "pointer and click on the field, the Escape key pressed in it (only that key)"
566
+ ],
567
+ never: [
568
+ { text: "what is entered", proof: "sdk:input@1#never.content" },
569
+ { text: "how many characters are entered", proof: "sdk:input@1#never.length" },
570
+ { text: "individual keystrokes or their timing", proof: "sdk:input@1#never.keystrokes" },
571
+ { text: "selected text", proof: "sdk:input@1#never.selection" }
572
+ ],
573
+ modes: {
574
+ single: "per field",
575
+ group: "Group (one-time codes): only whether all fields are empty; no moves between the fields"
576
+ },
577
+ sideEffects: [
578
+ {
579
+ id: "dom.mutation-observers",
580
+ text: "watches the whole document for added elements (MutationObserver, child list and subtree) to find declared elements and fields when the page changes"
581
+ }
582
+ ],
583
+ usedOn: "input fields",
584
+ review: "SEC-input-v1"
585
+ };
586
+
587
+ // src/manifest/sdk-password-managers.ts
588
+ var SDK_PASSWORD_MANAGERS = {
589
+ key: "sdk:password-managers",
590
+ version: 1,
591
+ title: "Installed password managers",
592
+ why: "Helps explain autofill behavior and failures.",
593
+ collects: ["names of detected password managers from a fixed list"],
594
+ never: [
595
+ { text: "whether the person is signed in to them", proof: "sdk:password-managers@1#never.signed-in" },
596
+ { text: "anything stored in them", proof: "sdk:password-managers@1#never.contents" }
597
+ ],
598
+ sideEffects: [
599
+ {
600
+ id: "pmd.stylesheet",
601
+ text: "briefly adopts a temporary stylesheet and cancels the animation it starts, in the same task",
602
+ when: "pmd"
603
+ },
604
+ {
605
+ id: "pmd.prototype-check",
606
+ text: "calls browser methods on throwaway objects and reads their source text and error stacks, to recognise extension wrappers",
607
+ when: "pmd"
608
+ },
609
+ {
610
+ id: "pmd.page-global",
611
+ text: "reads the names in one page global (the error-reporting ids of scripts)",
612
+ when: "pmd"
613
+ }
614
+ ],
615
+ usedOn: "after a tracked field gets focus, and once the page has loaded",
616
+ when: "pmd"
617
+ };
618
+
619
+ // src/manifest/sdk-private-mode.ts
620
+ var SDK_PRIVATE_MODE = {
621
+ key: "sdk:private-mode",
622
+ version: 1,
623
+ title: "Private browsing mode",
624
+ why: "Private windows behave differently for passkeys and stored sessions.",
625
+ collects: ["whether the window is private (one yes/no)"],
626
+ never: [
627
+ { text: "browsing history", proof: "sdk:private-mode@1#never.history" },
628
+ { text: "anything else about the browser", proof: "sdk:private-mode@1#never.other" }
629
+ ],
630
+ sideEffects: [
631
+ {
632
+ id: "private-mode.test-storage",
633
+ text: "the third-party library creates temporary test databases, a test directory and a test storage entry, and removes them at once",
634
+ when: "privateMode"
635
+ }
636
+ ],
637
+ usedOn: "once per page, cached for the tab",
638
+ when: "privateMode"
639
+ };
640
+
641
+ // src/manifest/sdk-transport.ts
642
+ var SDK_TRANSPORT = {
643
+ key: "sdk:transport",
644
+ version: 1,
645
+ title: "Sending to Corbado",
646
+ transport: [
647
+ {
648
+ id: "transport:user-agent",
649
+ label: "Browser and operating system identifier (User-Agent header)",
650
+ addedBy: "browser"
651
+ },
652
+ { id: "transport:origin", label: "The page's origin (Origin header)", addedBy: "browser" },
653
+ {
654
+ id: "transport:client-hints",
655
+ label: "The browser's default client hints (brand and version, mobile or not, operating system), if the browser sends them; the detailed device facts (for example the model) are read separately and listed under device information.",
656
+ addedBy: "browser"
657
+ },
658
+ {
659
+ id: "transport:ip-address",
660
+ label: "The visitor's IP address reaches Corbado's backend with every request, as with any web request. It is discarded there and not stored with the data; it is only kept for a limited time (90 days) in firewall logs when the request was flagged as suspicious.",
661
+ addedBy: "browser"
662
+ },
663
+ {
664
+ id: "transport:beacon-cookies",
665
+ label: "Cookies of the ingestion host, on requests sent while the page is closing",
666
+ addedBy: "browser",
667
+ when: "beaconKeepalive"
668
+ },
669
+ { id: "transport:sent-at", label: "Send time and transport kind of each batch", addedBy: "sdk" }
670
+ ]
671
+ };
672
+
673
+ // src/manifest/sdk-window.ts
674
+ var SDK_WINDOW = {
675
+ key: "sdk:window",
676
+ version: 1,
677
+ title: "Window focus, visibility and size",
678
+ why: "Shows when people leave the page, switch tabs or go back during sign-in.",
679
+ collects: [
680
+ "window focus and blur, page hidden or shown",
681
+ "viewport resize and scroll (batched durations)",
682
+ "back navigation, leaving the page",
683
+ "whether focus went to a tracked field"
684
+ ],
685
+ never: [
686
+ { text: "coordinates, scroll positions", proof: "sdk:window@1#never.coordinates" },
687
+ { text: "key presses", proof: "sdk:window@1#never.keys" },
688
+ { text: "other tabs or windows", proof: "sdk:window@1#never.other-windows" }
689
+ ],
690
+ usedOn: "always on"
691
+ };
692
+
693
+ // src/manifest/contract.ts
694
+ var NON_VALUE_LEVELS = [
695
+ "presence",
696
+ "empty",
697
+ "interaction",
698
+ "shown",
699
+ "request-metadata",
700
+ "ceremony",
701
+ "equality"
702
+ ];
703
+ var VALUE_LEVELS = ["size", "class", "enum", "pseudonym", "partial", "pattern", "raw"];
704
+ var CATEGORIES = [
705
+ "secret",
706
+ "personal-identifier",
707
+ "opaque-identifier",
708
+ "personal-data",
709
+ "device",
710
+ "technical"
711
+ ];
712
+ var CATEGORY_VALUE_LEVELS = {
713
+ secret: [],
714
+ "personal-identifier": ["class", "enum", "pseudonym"],
715
+ "opaque-identifier": ["pseudonym", "raw"],
716
+ "personal-data": ["size", "class", "enum", "pattern"],
717
+ device: VALUE_LEVELS,
718
+ technical: VALUE_LEVELS
719
+ };
720
+ var KIND_LADDERS = {
721
+ "dom-input": {
722
+ nonValue: ["presence", "empty", "interaction", "shown"],
723
+ value: ["size", "enum", "pseudonym", "pattern", "raw"]
724
+ },
725
+ "dom-element": {
726
+ nonValue: ["presence", "shown", "interaction"],
727
+ value: ["class", "enum", "pseudonym", "pattern", "raw"]
728
+ },
729
+ url: { nonValue: ["presence"], value: ["size", "enum", "pseudonym", "partial", "pattern", "raw"] },
730
+ request: { nonValue: ["presence", "request-metadata"], value: ["class", "enum", "pseudonym", "pattern", "raw"] },
731
+ storage: { nonValue: ["presence"], value: ["enum", "pseudonym", "pattern", "raw"] },
732
+ "host-config": { nonValue: ["presence"], value: ["enum", "pattern", "raw"] },
733
+ // Decided 2026-11-08: levels apply per payload field; elements in a payload go to the input / element gateway.
734
+ "host-event": {
735
+ nonValue: ["presence", "interaction"],
736
+ value: ["size", "class", "enum", "pseudonym", "pattern", "raw"]
737
+ },
738
+ // `class` added with WP1 (WebAuthn error classes).
739
+ "browser-api": { nonValue: ["presence", "ceremony"], value: ["class", "enum", "pseudonym", "pattern", "raw"] },
740
+ "page/window": { nonValue: ["interaction"], value: [] },
741
+ // additive: technical fields the SDK adds to each record (sequence counters); nothing read from the page
742
+ record: { nonValue: ["presence"], value: ["enum", "raw"] }
743
+ };
744
+
745
+ // src/manifest/index.ts
746
+ var SDK_CAPABILITIES = [
747
+ SDK_INPUT,
748
+ SDK_WINDOW,
749
+ SDK_PASSWORD_MANAGERS,
750
+ SDK_PRIVATE_MODE,
751
+ AC_CEREMONY
752
+ ];
753
+ var SDK_GATEWAYS = [
754
+ SDK_DEVICE,
755
+ SDK_PAGE,
756
+ SDK_API,
757
+ SDK_GENERATED,
758
+ SDK_RECORD,
759
+ SDK_OWN_STORAGE,
760
+ SDK_TRANSPORT
761
+ ];
762
+ var capabilities = [...SDK_CAPABILITIES];
763
+ var gateways = [...SDK_GATEWAYS];
764
+ // Annotate the CommonJS export names for ESM import in node:
765
+ 0 && (module.exports = {
766
+ AC_CEREMONY,
767
+ CATEGORIES,
768
+ CATEGORY_VALUE_LEVELS,
769
+ KIND_LADDERS,
770
+ NON_VALUE_LEVELS,
771
+ SDK_API,
772
+ SDK_CAPABILITIES,
773
+ SDK_DEVICE,
774
+ SDK_GATEWAYS,
775
+ SDK_GENERATED,
776
+ SDK_INPUT,
777
+ SDK_OWN_STORAGE,
778
+ SDK_PAGE,
779
+ SDK_PASSWORD_MANAGERS,
780
+ SDK_PRIVATE_MODE,
781
+ SDK_RECORD,
782
+ SDK_TRANSPORT,
783
+ SDK_WINDOW,
784
+ VALUE_LEVELS,
785
+ capabilities,
786
+ gateways
787
+ });