@absolutejs/beacon 0.7.0-beta.0 → 0.7.0-beta.10

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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,19 @@
1
+ # Changelog
2
+
3
+ All notable changes to `@absolutejs/beacon`.
4
+
5
+ This file is generated by `absolute-changelog` from the entries in
6
+ `changelog/`. Edit an entry, not this file — and add new ones under
7
+ `changelog/unreleased/`.
8
+
9
+ ## 0.7.0-beta.10 — 2026-09-27
10
+
11
+ ### Fixed
12
+
13
+ - **Ignore wheel events cancelled by later handlers when detecting scroll jail, and capture bounded scroll geometry, overflow policy, direction and modal ownership for genuine immobility without changing issue grouping.** (`createBeacon`, `BEACON_SDK_VERSION`)
14
+
15
+ ## 0.7.0-beta.9 — 2026-09-27
16
+
17
+ ### Fixed
18
+
19
+ - **Exclude known 1Password notification covers and retain request origins in network-failure diagnostics without credentials or query strings. Same-origin grouping remains stable across environments. Keep layout pixel measurements out of fingerprints and include geometry and sticky/fixed ancestor context in collision and occlusion reports. Read only browser-exposed XHR response headers to avoid unsafe-header console errors while preserving available trace correlation.** (`createBeacon`, `BeaconNetworkFailure`, `BEACON_SDK_VERSION`)
package/README.md CHANGED
@@ -65,6 +65,24 @@ beacon.setUser({ id: currentUserId });
65
65
  beacon.captureMessage("checkout started", "info");
66
66
  ```
67
67
 
68
+ ### Preserve pre-hydration layout shifts
69
+
70
+ If Beacon itself is loaded lazily, install its zero-configuration early buffer
71
+ from the synchronous application entry before framework hydration:
72
+
73
+ ```ts
74
+ import { installEarlyLayoutShiftBuffer } from "@absolutejs/beacon/early";
75
+
76
+ installEarlyLayoutShiftBuffer();
77
+ ```
78
+
79
+ The full Beacon instance consumes this buffer automatically when disruptive
80
+ layout-shift signals are enabled. It retains the entry's original performance
81
+ time, observation time, source rectangles, viewport and document state, plus
82
+ resize and privacy-safe interaction timing. This avoids misclassifying a
83
+ buffered startup entry using only state observed after hydration. The early
84
+ entry point does not initialize Beacon, send telemetry, or import the main SDK.
85
+
68
86
  ## What it does
69
87
 
70
88
  - **Auto-capture** — `window.onerror` + `unhandledrejection` (toggle via `instrument`).
@@ -207,7 +225,10 @@ beacon.captureMessage("checkout started", "info");
207
225
  Instability names shifted elements. When the browser supplies no shifted
208
226
  node, Beacon retains startup/runtime phase plus recent interaction type,
209
227
  target, and age; stable provenance separates issue grouping while volatile
210
- age remains diagnostic-only. Successful HTTP responses can be
228
+ age remains diagnostic-only. Layout shifts during the first two seconds after
229
+ an accepted `pushState`, `replaceState`, or `popstate` route change are treated
230
+ as route settling; later shifts retain navigation type, source, destination,
231
+ and age for diagnosis. Successful HTTP responses can be
211
232
  classified through the host-owned `instrument.classifyResponse` callback for
212
233
  GraphQL-style errors. Selected HTTP 4xx/5xx responses can be promoted through
213
234
  the opt-in `instrument.classifyErrorResponse` callback when application context
package/changelog.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "contract": 1,
3
+ "name": "@absolutejs/beacon",
4
+ "releases": [
5
+ {
6
+ "changes": [
7
+ {
8
+ "kind": "fixed",
9
+ "summary": "Ignore wheel events cancelled by later handlers when detecting scroll jail, and capture bounded scroll geometry, overflow policy, direction and modal ownership for genuine immobility without changing issue grouping.",
10
+ "symbols": [
11
+ "createBeacon",
12
+ "BEACON_SDK_VERSION"
13
+ ]
14
+ }
15
+ ],
16
+ "date": "2026-09-27",
17
+ "version": "0.7.0-beta.10"
18
+ },
19
+ {
20
+ "changes": [
21
+ {
22
+ "kind": "fixed",
23
+ "summary": "Exclude known 1Password notification covers and retain request origins in network-failure diagnostics without credentials or query strings. Same-origin grouping remains stable across environments. Keep layout pixel measurements out of fingerprints and include geometry and sticky/fixed ancestor context in collision and occlusion reports. Read only browser-exposed XHR response headers to avoid unsafe-header console errors while preserving available trace correlation.",
24
+ "symbols": [
25
+ "createBeacon",
26
+ "BeaconNetworkFailure",
27
+ "BEACON_SDK_VERSION"
28
+ ]
29
+ }
30
+ ],
31
+ "date": "2026-09-27",
32
+ "version": "0.7.0-beta.9"
33
+ }
34
+ ]
35
+ }
@@ -0,0 +1,58 @@
1
+ /** Lightweight pre-hydration layout-shift recorder. */
2
+ export type EarlyLayoutShiftRect = {
3
+ bottom: number;
4
+ height: number;
5
+ left: number;
6
+ right: number;
7
+ top: number;
8
+ width: number;
9
+ x: number;
10
+ y: number;
11
+ };
12
+ export type EarlyLayoutShiftViewport = {
13
+ documentHeight: number;
14
+ documentWidth: number;
15
+ innerHeight: number;
16
+ innerWidth: number;
17
+ visualHeight?: number;
18
+ visualOffsetLeft?: number;
19
+ visualOffsetTop?: number;
20
+ visualScale?: number;
21
+ visualWidth?: number;
22
+ };
23
+ export type EarlyLayoutShiftSource = {
24
+ currentRect?: EarlyLayoutShiftRect;
25
+ node?: Node;
26
+ previousRect?: EarlyLayoutShiftRect;
27
+ target: string;
28
+ };
29
+ export type EarlyLayoutShiftEntry = {
30
+ documentReadyState: DocumentReadyState;
31
+ hadRecentInput: boolean;
32
+ observedAt: number;
33
+ sources: EarlyLayoutShiftSource[];
34
+ startTime: number;
35
+ value: number;
36
+ viewport: EarlyLayoutShiftViewport;
37
+ };
38
+ export type EarlyLayoutShiftBuffer = {
39
+ entries: EarlyLayoutShiftEntry[];
40
+ interactionTimes: number[];
41
+ observerStartedAt: number;
42
+ resizeTimes: number[];
43
+ };
44
+ type InstalledEarlyLayoutShiftBuffer = EarlyLayoutShiftBuffer & {
45
+ cleanup: () => void;
46
+ observer: PerformanceObserver;
47
+ recordEntries: (entries: PerformanceEntry[]) => void;
48
+ };
49
+ declare global {
50
+ interface Window {
51
+ __absoluteBeaconEarlyLayoutShift?: InstalledEarlyLayoutShiftBuffer;
52
+ }
53
+ }
54
+ /** Install once from the application's synchronous entry module. SSR-safe. */
55
+ export declare const installEarlyLayoutShiftBuffer: () => void;
56
+ /** Consume and remove the pre-hydration recorder, if one was installed. */
57
+ export declare const consumeEarlyLayoutShiftBuffer: () => EarlyLayoutShiftBuffer | undefined;
58
+ export {};
package/dist/early.js ADDED
@@ -0,0 +1,134 @@
1
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
2
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
3
+ }) : x)(function(x) {
4
+ if (typeof require !== "undefined")
5
+ return require.apply(this, arguments);
6
+ throw Error('Dynamic require of "' + x + '" is not supported');
7
+ });
8
+
9
+ // src/early.ts
10
+ var HISTORY_LIMIT = 16;
11
+ var ENTRY_LIMIT = 50;
12
+ var now = () => typeof performance === "undefined" ? 0 : performance.now();
13
+ var describeNode = (node) => {
14
+ if (!(node instanceof Element))
15
+ return "unknown";
16
+ const id = node.id === "" ? "" : `#${node.id}`;
17
+ const classes = [...node.classList].slice(0, 3).map((name) => `.${name}`).join("");
18
+ return `${node.tagName.toLowerCase()}${id}${classes}`;
19
+ };
20
+ var copyRect = (rect) => rect === undefined ? undefined : {
21
+ bottom: rect.bottom,
22
+ height: rect.height,
23
+ left: rect.left,
24
+ right: rect.right,
25
+ top: rect.top,
26
+ width: rect.width,
27
+ x: rect.x,
28
+ y: rect.y
29
+ };
30
+ var viewportSnapshot = () => {
31
+ const visual = window.visualViewport;
32
+ return {
33
+ documentHeight: document.documentElement.scrollHeight,
34
+ documentWidth: document.documentElement.scrollWidth,
35
+ innerHeight: window.innerHeight,
36
+ innerWidth: window.innerWidth,
37
+ ...visual == null ? {} : {
38
+ visualHeight: visual.height,
39
+ visualOffsetLeft: visual.offsetLeft,
40
+ visualOffsetTop: visual.offsetTop,
41
+ visualScale: visual.scale,
42
+ visualWidth: visual.width
43
+ }
44
+ };
45
+ };
46
+ var appendLimited = (values, value) => {
47
+ values.push(value);
48
+ if (values.length > HISTORY_LIMIT)
49
+ values.splice(0, values.length - HISTORY_LIMIT);
50
+ };
51
+ var installEarlyLayoutShiftBuffer = () => {
52
+ if (typeof window === "undefined" || typeof document === "undefined" || typeof PerformanceObserver === "undefined" || window.__absoluteBeaconEarlyLayoutShift !== undefined)
53
+ return;
54
+ const interactionTimes = [];
55
+ const resizeTimes = [];
56
+ const entries = [];
57
+ const recordInteraction = () => appendLimited(interactionTimes, now());
58
+ const recordResize = () => appendLimited(resizeTimes, now());
59
+ const recordEntries = (rawEntries) => {
60
+ for (const raw of rawEntries) {
61
+ const entry = raw;
62
+ entries.push({
63
+ documentReadyState: document.readyState,
64
+ hadRecentInput: entry.hadRecentInput === true,
65
+ observedAt: now(),
66
+ sources: (entry.sources ?? []).slice(0, 5).map((source) => ({
67
+ ...source.currentRect === undefined ? {} : { currentRect: copyRect(source.currentRect) },
68
+ ...source.node === undefined || source.node === null ? {} : { node: source.node },
69
+ ...source.previousRect === undefined ? {} : { previousRect: copyRect(source.previousRect) },
70
+ target: describeNode(source.node)
71
+ })),
72
+ startTime: entry.startTime,
73
+ value: entry.value ?? 0,
74
+ viewport: viewportSnapshot()
75
+ });
76
+ }
77
+ if (entries.length > ENTRY_LIMIT)
78
+ entries.splice(0, entries.length - ENTRY_LIMIT);
79
+ };
80
+ try {
81
+ const observerStartedAt = now();
82
+ const observer = new PerformanceObserver((list) => recordEntries(list.getEntries()));
83
+ const interactionEvents = [
84
+ "click",
85
+ "keydown",
86
+ "pointerdown",
87
+ "submit"
88
+ ];
89
+ observer.observe({ buffered: true, type: "layout-shift" });
90
+ for (const event of interactionEvents)
91
+ window.addEventListener(event, recordInteraction, true);
92
+ window.addEventListener("resize", recordResize);
93
+ window.visualViewport?.addEventListener("resize", recordResize);
94
+ const cleanup = () => {
95
+ for (const event of interactionEvents)
96
+ window.removeEventListener(event, recordInteraction, true);
97
+ window.removeEventListener("resize", recordResize);
98
+ window.visualViewport?.removeEventListener("resize", recordResize);
99
+ };
100
+ window.__absoluteBeaconEarlyLayoutShift = {
101
+ cleanup,
102
+ entries,
103
+ interactionTimes,
104
+ observer,
105
+ observerStartedAt,
106
+ recordEntries,
107
+ resizeTimes
108
+ };
109
+ } catch {}
110
+ };
111
+ var consumeEarlyLayoutShiftBuffer = () => {
112
+ if (typeof window === "undefined")
113
+ return;
114
+ const installed = window.__absoluteBeaconEarlyLayoutShift;
115
+ if (installed === undefined)
116
+ return;
117
+ installed.recordEntries(installed.observer.takeRecords());
118
+ installed.observer.disconnect();
119
+ installed.cleanup();
120
+ delete window.__absoluteBeaconEarlyLayoutShift;
121
+ return {
122
+ entries: installed.entries,
123
+ interactionTimes: installed.interactionTimes,
124
+ observerStartedAt: installed.observerStartedAt,
125
+ resizeTimes: installed.resizeTimes
126
+ };
127
+ };
128
+ export {
129
+ consumeEarlyLayoutShiftBuffer,
130
+ installEarlyLayoutShiftBuffer
131
+ };
132
+
133
+ //# debugId=FBFFEFDD72BD00F564756E2164756E21
134
+ //# sourceMappingURL=early.js.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/early.ts"],
4
+ "sourcesContent": [
5
+ "/** Lightweight pre-hydration layout-shift recorder. */\n\nexport type EarlyLayoutShiftRect = {\n bottom: number;\n height: number;\n left: number;\n right: number;\n top: number;\n width: number;\n x: number;\n y: number;\n};\n\nexport type EarlyLayoutShiftViewport = {\n documentHeight: number;\n documentWidth: number;\n innerHeight: number;\n innerWidth: number;\n visualHeight?: number;\n visualOffsetLeft?: number;\n visualOffsetTop?: number;\n visualScale?: number;\n visualWidth?: number;\n};\n\nexport type EarlyLayoutShiftSource = {\n currentRect?: EarlyLayoutShiftRect;\n node?: Node;\n previousRect?: EarlyLayoutShiftRect;\n target: string;\n};\n\nexport type EarlyLayoutShiftEntry = {\n documentReadyState: DocumentReadyState;\n hadRecentInput: boolean;\n observedAt: number;\n sources: EarlyLayoutShiftSource[];\n startTime: number;\n value: number;\n viewport: EarlyLayoutShiftViewport;\n};\n\nexport type EarlyLayoutShiftBuffer = {\n entries: EarlyLayoutShiftEntry[];\n interactionTimes: number[];\n observerStartedAt: number;\n resizeTimes: number[];\n};\n\ntype LayoutShiftSourceLike = {\n currentRect?: DOMRectReadOnly;\n node?: Node | null;\n previousRect?: DOMRectReadOnly;\n};\ntype LayoutShiftEntryLike = PerformanceEntry & {\n hadRecentInput?: boolean;\n sources?: LayoutShiftSourceLike[];\n value?: number;\n};\ntype InstalledEarlyLayoutShiftBuffer = EarlyLayoutShiftBuffer & {\n cleanup: () => void;\n observer: PerformanceObserver;\n recordEntries: (entries: PerformanceEntry[]) => void;\n};\n\ndeclare global {\n interface Window {\n __absoluteBeaconEarlyLayoutShift?: InstalledEarlyLayoutShiftBuffer;\n }\n}\n\nconst HISTORY_LIMIT = 16;\nconst ENTRY_LIMIT = 50;\nconst now = (): number =>\n typeof performance === \"undefined\" ? 0 : performance.now();\n\nconst describeNode = (node: Node | null | undefined): string => {\n if (!(node instanceof Element)) return \"unknown\";\n const id = node.id === \"\" ? \"\" : `#${node.id}`;\n const classes = [...node.classList]\n .slice(0, 3)\n .map((name) => `.${name}`)\n .join(\"\");\n return `${node.tagName.toLowerCase()}${id}${classes}`;\n};\n\nconst copyRect = (\n rect: DOMRectReadOnly | undefined,\n): EarlyLayoutShiftRect | undefined =>\n rect === undefined\n ? undefined\n : {\n bottom: rect.bottom,\n height: rect.height,\n left: rect.left,\n right: rect.right,\n top: rect.top,\n width: rect.width,\n x: rect.x,\n y: rect.y,\n };\n\nconst viewportSnapshot = (): EarlyLayoutShiftViewport => {\n const visual = window.visualViewport;\n return {\n documentHeight: document.documentElement.scrollHeight,\n documentWidth: document.documentElement.scrollWidth,\n innerHeight: window.innerHeight,\n innerWidth: window.innerWidth,\n ...(visual == null\n ? {}\n : {\n visualHeight: visual.height,\n visualOffsetLeft: visual.offsetLeft,\n visualOffsetTop: visual.offsetTop,\n visualScale: visual.scale,\n visualWidth: visual.width,\n }),\n };\n};\n\nconst appendLimited = (values: number[], value: number): void => {\n values.push(value);\n if (values.length > HISTORY_LIMIT)\n values.splice(0, values.length - HISTORY_LIMIT);\n};\n\n/** Install once from the application's synchronous entry module. SSR-safe. */\nexport const installEarlyLayoutShiftBuffer = (): void => {\n if (\n typeof window === \"undefined\" ||\n typeof document === \"undefined\" ||\n typeof PerformanceObserver === \"undefined\" ||\n window.__absoluteBeaconEarlyLayoutShift !== undefined\n )\n return;\n\n const interactionTimes: number[] = [];\n const resizeTimes: number[] = [];\n const entries: EarlyLayoutShiftEntry[] = [];\n const recordInteraction = (): void => appendLimited(interactionTimes, now());\n const recordResize = (): void => appendLimited(resizeTimes, now());\n const recordEntries = (rawEntries: PerformanceEntry[]): void => {\n for (const raw of rawEntries) {\n const entry = raw as LayoutShiftEntryLike;\n entries.push({\n documentReadyState: document.readyState,\n hadRecentInput: entry.hadRecentInput === true,\n observedAt: now(),\n sources: (entry.sources ?? []).slice(0, 5).map((source) => ({\n ...(source.currentRect === undefined\n ? {}\n : { currentRect: copyRect(source.currentRect) }),\n ...(source.node === undefined || source.node === null\n ? {}\n : { node: source.node }),\n ...(source.previousRect === undefined\n ? {}\n : { previousRect: copyRect(source.previousRect) }),\n target: describeNode(source.node),\n })),\n startTime: entry.startTime,\n value: entry.value ?? 0,\n viewport: viewportSnapshot(),\n });\n }\n if (entries.length > ENTRY_LIMIT)\n entries.splice(0, entries.length - ENTRY_LIMIT);\n };\n\n try {\n const observerStartedAt = now();\n const observer = new PerformanceObserver((list) =>\n recordEntries(list.getEntries()),\n );\n const interactionEvents = [\n \"click\",\n \"keydown\",\n \"pointerdown\",\n \"submit\",\n ] as const;\n observer.observe({ buffered: true, type: \"layout-shift\" });\n for (const event of interactionEvents)\n window.addEventListener(event, recordInteraction, true);\n window.addEventListener(\"resize\", recordResize);\n window.visualViewport?.addEventListener(\"resize\", recordResize);\n const cleanup = (): void => {\n for (const event of interactionEvents)\n window.removeEventListener(event, recordInteraction, true);\n window.removeEventListener(\"resize\", recordResize);\n window.visualViewport?.removeEventListener(\"resize\", recordResize);\n };\n window.__absoluteBeaconEarlyLayoutShift = {\n cleanup,\n entries,\n interactionTimes,\n observer,\n observerStartedAt,\n recordEntries,\n resizeTimes,\n };\n } catch {\n // Unsupported browsers must not have their startup affected by telemetry.\n }\n};\n\n/** Consume and remove the pre-hydration recorder, if one was installed. */\nexport const consumeEarlyLayoutShiftBuffer = ():\n EarlyLayoutShiftBuffer | undefined => {\n if (typeof window === \"undefined\") return undefined;\n const installed = window.__absoluteBeaconEarlyLayoutShift;\n if (installed === undefined) return undefined;\n installed.recordEntries(installed.observer.takeRecords());\n installed.observer.disconnect();\n installed.cleanup();\n delete window.__absoluteBeaconEarlyLayoutShift;\n return {\n entries: installed.entries,\n interactionTimes: installed.interactionTimes,\n observerStartedAt: installed.observerStartedAt,\n resizeTimes: installed.resizeTimes,\n };\n};\n"
6
+ ],
7
+ "mappings": ";;;;;;;;;AAuEA,IAAM,gBAAgB;AACtB,IAAM,cAAc;AACpB,IAAM,MAAM,MACV,OAAO,gBAAgB,cAAc,IAAI,YAAY,IAAI;AAE3D,IAAM,eAAe,CAAC,SAA0C;AAAA,EAC9D,IAAI,EAAE,gBAAgB;AAAA,IAAU,OAAO;AAAA,EACvC,MAAM,KAAK,KAAK,OAAO,KAAK,KAAK,IAAI,KAAK;AAAA,EAC1C,MAAM,UAAU,CAAC,GAAG,KAAK,SAAS,EAC/B,MAAM,GAAG,CAAC,EACV,IAAI,CAAC,SAAS,IAAI,MAAM,EACxB,KAAK,EAAE;AAAA,EACV,OAAO,GAAG,KAAK,QAAQ,YAAY,IAAI,KAAK;AAAA;AAG9C,IAAM,WAAW,CACf,SAEA,SAAS,YACL,YACA;AAAA,EACE,QAAQ,KAAK;AAAA,EACb,QAAQ,KAAK;AAAA,EACb,MAAM,KAAK;AAAA,EACX,OAAO,KAAK;AAAA,EACZ,KAAK,KAAK;AAAA,EACV,OAAO,KAAK;AAAA,EACZ,GAAG,KAAK;AAAA,EACR,GAAG,KAAK;AACV;AAEN,IAAM,mBAAmB,MAAgC;AAAA,EACvD,MAAM,SAAS,OAAO;AAAA,EACtB,OAAO;AAAA,IACL,gBAAgB,SAAS,gBAAgB;AAAA,IACzC,eAAe,SAAS,gBAAgB;AAAA,IACxC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xD,UAAU,SAAS,WAAW;AAAA,EAC9B,UAAU,QAAQ;AAAA,EAClB,OAAO,OAAO;AAAA,EACd,OAAO;AAAA,IACL,SAAS,UAAU;AAAA,IACnB,kBAAkB,UAAU;AAAA,IAC5B,mBAAmB,UAAU;AAAA,IAC7B,aAAa,UAAU;AAAA,EACzB;AAAA;",
8
+ "debugId": "FBFFEFDD72BD00F564756E2164756E21",
9
+ "names": []
10
+ }
package/dist/index.d.ts CHANGED
@@ -25,7 +25,7 @@ export type BeaconLevel = "fatal" | "error" | "warning" | "info";
25
25
  /** Response header used to correlate a browser signal with its server request. */
26
26
  export declare const BEACON_TRACE_HEADER = "x-absolute-trace-id";
27
27
  /** Beacon package version retained with every captured event. */
28
- export declare const BEACON_SDK_VERSION = "0.7.0-beta.0";
28
+ export declare const BEACON_SDK_VERSION = "0.7.0-beta.10";
29
29
  /** Arbitrary event tags, with Beacon's reserved `signal` tag type-checked. */
30
30
  export type BeaconTags = Record<string, string> & {
31
31
  signal?: BeaconSignal;
@@ -140,6 +140,10 @@ export type BeaconResourceFailure = {
140
140
  * `console.error`. Each detector is feature-gated and independently tunable.
141
141
  */
142
142
  export type BeaconSignals = {
143
+ /** Suppress synthetic watchdog findings for WebDriver and explicitly
144
+ * identified crawler/audit user agents. Explicit exceptions and messages
145
+ * are unaffected. Default false. */
146
+ suppressAutomatedBrowsers?: boolean;
143
147
  /** Back/forward navigations the browser could not restore from bfcache. */
144
148
  bfcacheBlocks?: boolean;
145
149
  /** Browser-specific bfcache reason strings that are inherent to an
@@ -372,6 +376,9 @@ export type BeaconReleaseProbe = {
372
376
  }) => void;
373
377
  };
374
378
  export type BeaconNetworkFailure = {
379
+ /** Request origin only; credentials, path and query are never included. */
380
+ origin?: string;
381
+ sameOrigin?: boolean;
375
382
  at: number;
376
383
  durationMs: number;
377
384
  endpoint: string;
@@ -458,6 +465,8 @@ export type WebVital = {
458
465
  navigationType: string;
459
466
  /** Beacon project identifier, used by authenticated relays for tenant fencing. */
460
467
  project: string;
468
+ /** Per-page Beacon session identifier for cross-signal correlation. */
469
+ sessionId: string;
461
470
  /** Optional application release copied from the Beacon configuration. */
462
471
  release?: string;
463
472
  /** Optional privacy-masked replay correlation. */
@@ -541,6 +550,7 @@ export type Beacon = {
541
550
  export declare const redactBeaconEvent: (event: BeaconEvent) => BeaconEvent;
542
551
  /** Known browser-host/scanner failures that do not originate in page code. */
543
552
  export declare const isKnownBeaconNoise: (event: Pick<BeaconEvent, "message" | "name" | "stack" | "tags">, userAgent?: string) => boolean;
553
+ export declare const isAutomatedBrowser: () => boolean;
544
554
  export declare const createBeacon: (options: BeaconOptions) => Beacon;
545
555
  /** Initialize the global beacon. Returns the instance. */
546
556
  export declare const initBeacon: (options: BeaconOptions) => Beacon;